xref: /aoo41x/main/sfx2/inc/sfx2/docinsert.hxx (revision 353d8f4d)
1*353d8f4dSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*353d8f4dSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*353d8f4dSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*353d8f4dSAndrew Rist  * distributed with this work for additional information
6*353d8f4dSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*353d8f4dSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*353d8f4dSAndrew Rist  * "License"); you may not use this file except in compliance
9*353d8f4dSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*353d8f4dSAndrew Rist  *
11*353d8f4dSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*353d8f4dSAndrew Rist  *
13*353d8f4dSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*353d8f4dSAndrew Rist  * software distributed under the License is distributed on an
15*353d8f4dSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*353d8f4dSAndrew Rist  * KIND, either express or implied.  See the License for the
17*353d8f4dSAndrew Rist  * specific language governing permissions and limitations
18*353d8f4dSAndrew Rist  * under the License.
19*353d8f4dSAndrew Rist  *
20*353d8f4dSAndrew Rist  *************************************************************/
21*353d8f4dSAndrew Rist 
22*353d8f4dSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef _SFX_DOCINSERT_HXX
25cdf0e10cSrcweir #define _SFX_DOCINSERT_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include <tools/errcode.hxx>
28cdf0e10cSrcweir #include <tools/link.hxx>
29cdf0e10cSrcweir #include <tools/string.hxx>
30cdf0e10cSrcweir 
31cdf0e10cSrcweir #include "sfx2/dllapi.h"
32cdf0e10cSrcweir 
33cdf0e10cSrcweir namespace sfx2 { class FileDialogHelper; }
34cdf0e10cSrcweir class SfxMedium;
35cdf0e10cSrcweir class SfxMediumList;
36cdf0e10cSrcweir class SfxItemSet;
37cdf0e10cSrcweir class SvStringsDtor;
38cdf0e10cSrcweir 
39cdf0e10cSrcweir // ============================================================================
40cdf0e10cSrcweir 
41cdf0e10cSrcweir namespace sfx2 {
42cdf0e10cSrcweir 
43cdf0e10cSrcweir // ============================================================================
44cdf0e10cSrcweir 
45cdf0e10cSrcweir // ============================================================================
46cdf0e10cSrcweir // DocumentInserter
47cdf0e10cSrcweir // ============================================================================
48cdf0e10cSrcweir 
49cdf0e10cSrcweir class SFX2_DLLPUBLIC DocumentInserter
50cdf0e10cSrcweir {
51cdf0e10cSrcweir private:
52cdf0e10cSrcweir     String                  m_sDocFactory;
53cdf0e10cSrcweir     String                  m_sFilter;
54cdf0e10cSrcweir     Link                    m_aDialogClosedLink;
55cdf0e10cSrcweir 
56cdf0e10cSrcweir     bool                    m_bMultiSelectionEnabled;
57cdf0e10cSrcweir     sal_Int64               m_nDlgFlags;
58cdf0e10cSrcweir     ErrCode                 m_nError;
59cdf0e10cSrcweir 
60cdf0e10cSrcweir     sfx2::FileDialogHelper* m_pFileDlg;
61cdf0e10cSrcweir     SfxItemSet*             m_pItemSet;
62cdf0e10cSrcweir     SvStringsDtor*          m_pURLList;
63cdf0e10cSrcweir 
64cdf0e10cSrcweir     DECL_LINK(              DialogClosedHdl, sfx2::FileDialogHelper* );
65cdf0e10cSrcweir 
66cdf0e10cSrcweir public:
67cdf0e10cSrcweir     DocumentInserter( sal_Int64 _nFlags, const String& _rFactory, bool _bEnableMultiSelection = false );
68cdf0e10cSrcweir     ~DocumentInserter();
69cdf0e10cSrcweir 
70cdf0e10cSrcweir     void                    StartExecuteModal( const Link& _rDialogClosedLink );
71cdf0e10cSrcweir     SfxMedium*              CreateMedium();
72cdf0e10cSrcweir     SfxMediumList*          CreateMediumList();
73cdf0e10cSrcweir 
GetError() const74cdf0e10cSrcweir     inline ErrCode          GetError() const { return m_nError; }
GetFilter() const75cdf0e10cSrcweir     inline String           GetFilter() const { return m_sFilter; }
76cdf0e10cSrcweir };
77cdf0e10cSrcweir 
78cdf0e10cSrcweir // ============================================================================
79cdf0e10cSrcweir 
80cdf0e10cSrcweir } // namespace sfx2
81cdf0e10cSrcweir 
82cdf0e10cSrcweir // ============================================================================
83cdf0e10cSrcweir 
84cdf0e10cSrcweir #endif // _SFX_DOCINSERT_HXX
85cdf0e10cSrcweir 
86