xref: /aoo41x/main/sfx2/inc/sfx2/sfxdlg.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 #ifndef _SFX2_DIALOG_HXX
24cdf0e10cSrcweir #define _SFX2_DIALOG_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #include "sal/config.h"
27cdf0e10cSrcweir #include "sfx2/dllapi.h"
28cdf0e10cSrcweir 
29cdf0e10cSrcweir #include <vcl/abstdlg.hxx>
30cdf0e10cSrcweir #include <com/sun/star/embed/XEmbeddedObject.hpp>
31cdf0e10cSrcweir #include <com/sun/star/embed/XStorage.hpp>
32cdf0e10cSrcweir #include <com/sun/star/frame/XFrame.hpp>
33cdf0e10cSrcweir 
34cdf0e10cSrcweir #include <sot/exchange.hxx>
35cdf0e10cSrcweir #include <sfx2/lnkbase.hxx>
36cdf0e10cSrcweir #include <com/sun/star/uno/Any.hxx>
37cdf0e10cSrcweir #include <com/sun/star/uno/Reference.h>
38cdf0e10cSrcweir 
39cdf0e10cSrcweir class SfxTabPage;
40cdf0e10cSrcweir class SfxViewFrame;
41cdf0e10cSrcweir class SfxBindings;
42cdf0e10cSrcweir class SfxItemSet;
43cdf0e10cSrcweir class ResId;
44cdf0e10cSrcweir class Window;
45cdf0e10cSrcweir class String;
46cdf0e10cSrcweir class SfxItemPool;
47cdf0e10cSrcweir class SvObjectServerList;
48cdf0e10cSrcweir class TransferableDataHelper;
49cdf0e10cSrcweir struct TransferableObjectDescriptor;
50cdf0e10cSrcweir 
51cdf0e10cSrcweir #include <sfx2/tabdlg.hxx>
52cdf0e10cSrcweir //typedef SfxTabPage* (*CreateTabPage)(Window *pParent, const SfxItemSet &rAttrSet);
53cdf0e10cSrcweir //typedef sal_uInt16*		(*GetTabPageRanges)();
54cdf0e10cSrcweir 
55cdf0e10cSrcweir namespace sfx2
56cdf0e10cSrcweir {
57cdf0e10cSrcweir     class LinkManager;
58cdf0e10cSrcweir }
59cdf0e10cSrcweir 
60cdf0e10cSrcweir namespace com { namespace sun { namespace star { namespace frame {
61cdf0e10cSrcweir     class XModel;
62cdf0e10cSrcweir } } } }
63cdf0e10cSrcweir 
64cdf0e10cSrcweir class SfxAbstractDialog : public VclAbstractDialog
65cdf0e10cSrcweir {
66cdf0e10cSrcweir public:
67cdf0e10cSrcweir 	virtual const SfxItemSet* 	GetOutputItemSet() const = 0;
68cdf0e10cSrcweir 	virtual void				SetText( const XubString& rStr ) = 0;
69cdf0e10cSrcweir     virtual String   			GetText() const = 0;
70cdf0e10cSrcweir };
71cdf0e10cSrcweir 
72cdf0e10cSrcweir class SfxAbstractTabDialog : public SfxAbstractDialog
73cdf0e10cSrcweir {
74cdf0e10cSrcweir public:
75cdf0e10cSrcweir 	virtual void				SetCurPageId( sal_uInt16 nId ) = 0;
76cdf0e10cSrcweir 	virtual const sal_uInt16*		GetInputRanges( const SfxItemPool& ) = 0;
77cdf0e10cSrcweir 	virtual void				SetInputSet( const SfxItemSet* pInSet ) = 0;
78cdf0e10cSrcweir };
79cdf0e10cSrcweir 
80cdf0e10cSrcweir class SfxAbstractInsertObjectDialog : public VclAbstractDialog
81cdf0e10cSrcweir {
82cdf0e10cSrcweir public:
83cdf0e10cSrcweir     virtual com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > GetObject()=0;
84cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > GetIconIfIconified( ::rtl::OUString* pGraphicMediaType )=0;
85cdf0e10cSrcweir     virtual sal_Bool IsCreateNew()=0;
86cdf0e10cSrcweir };
87cdf0e10cSrcweir 
88cdf0e10cSrcweir class SfxAbstractPasteDialog : public VclAbstractDialog
89cdf0e10cSrcweir {
90cdf0e10cSrcweir public:
91cdf0e10cSrcweir     virtual void Insert( SotFormatStringId nFormat, const String & rFormatName ) = 0;
92cdf0e10cSrcweir     virtual void SetObjName( const SvGlobalName & rClass, const String & rObjName ) = 0;
93cdf0e10cSrcweir     virtual sal_uIntPtr GetFormat( const TransferableDataHelper& aHelper,
94cdf0e10cSrcweir                         const DataFlavorExVector* pFormats=0,
95cdf0e10cSrcweir                         const TransferableObjectDescriptor* pDesc=0 ) = 0;
96cdf0e10cSrcweir };
97cdf0e10cSrcweir 
98cdf0e10cSrcweir class SfxAbstractLinksDialog : public VclAbstractDialog
99cdf0e10cSrcweir {
100cdf0e10cSrcweir };
101cdf0e10cSrcweir 
102cdf0e10cSrcweir class AbstractScriptSelectorDialog : public VclAbstractDialog
103cdf0e10cSrcweir {
104cdf0e10cSrcweir public:
105cdf0e10cSrcweir 	virtual String				GetScriptURL() const = 0;
106cdf0e10cSrcweir 	virtual void				SetRunLabel() = 0;
107cdf0e10cSrcweir };
108cdf0e10cSrcweir 
109cdf0e10cSrcweir namespace com { namespace sun { namespace star { namespace frame { class XFrame; } } } }
110cdf0e10cSrcweir 
111cdf0e10cSrcweir class SFX2_DLLPUBLIC SfxAbstractDialogFactory : virtual public VclAbstractDialogFactory
112cdf0e10cSrcweir {
113cdf0e10cSrcweir public:
114cdf0e10cSrcweir 										virtual ~SfxAbstractDialogFactory();	// needed for export of vtable
115cdf0e10cSrcweir 	static SfxAbstractDialogFactory* 	Create();
116cdf0e10cSrcweir     virtual VclAbstractDialog*          CreateSfxDialog( Window* pParent, const SfxBindings& rBindings, sal_uInt32 nResId ) = 0;
117cdf0e10cSrcweir     virtual VclAbstractDialog*          CreateFrameDialog( Window* pParent, const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rFrame, sal_uInt32 nResId, const String& rParameter ) = 0;
118cdf0e10cSrcweir 	virtual SfxAbstractTabDialog*		CreateTabDialog( sal_uInt32 nResId,
119cdf0e10cSrcweir 											Window* pParent,
120cdf0e10cSrcweir 											const SfxItemSet* pAttrSet,
121cdf0e10cSrcweir 											SfxViewFrame* pViewFrame,
122cdf0e10cSrcweir 											bool bEditFmt=false,
123cdf0e10cSrcweir 											const String *pUserButtonText=0 ) = 0;
124cdf0e10cSrcweir 	virtual SfxAbstractTabDialog*		CreateTabDialog( sal_uInt32 nResId,
125cdf0e10cSrcweir 											Window* pParent,
126cdf0e10cSrcweir 											const SfxItemSet* pAttrSet,
127cdf0e10cSrcweir 											const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xViewFrame,
128cdf0e10cSrcweir 											bool bEditFmt=false,
129cdf0e10cSrcweir 											const String *pUserButtonText=0 ) = 0;
130cdf0e10cSrcweir 	virtual CreateTabPage				GetTabPageCreatorFunc( sal_uInt16 nId ) = 0;
131cdf0e10cSrcweir 	virtual GetTabPageRanges			GetTabPageRangesFunc( sal_uInt16 nId ) = 0;
132cdf0e10cSrcweir     virtual SfxAbstractInsertObjectDialog* CreateInsertObjectDialog( Window* pParent, const rtl::OUString& rCommand,
133cdf0e10cSrcweir             const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& xStor,
134cdf0e10cSrcweir             const SvObjectServerList* pList = 0 )=0;
135cdf0e10cSrcweir     virtual VclAbstractDialog*          CreateEditObjectDialog( Window* pParent, const rtl::OUString& rCommand,
136cdf0e10cSrcweir             const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject >& xObj )=0;
137cdf0e10cSrcweir     virtual  SfxAbstractPasteDialog*         CreatePasteDialog( Window* pParent )=0;
138cdf0e10cSrcweir     virtual  SfxAbstractLinksDialog*         CreateLinksDialog( Window* pParent, sfx2::LinkManager* pMgr, sal_Bool bHTML=sal_False, sfx2::SvBaseLink* p=0 )=0;
139cdf0e10cSrcweir     virtual VclAbstractDialog *         CreateSvxScriptOrgDialog( Window* pParent,  const String& rLanguage ) = 0;
140cdf0e10cSrcweir 
141cdf0e10cSrcweir     virtual AbstractScriptSelectorDialog*
142cdf0e10cSrcweir 		CreateScriptSelectorDialog(
143cdf0e10cSrcweir 			Window* pParent,
144cdf0e10cSrcweir             sal_Bool bShowSlots,
145cdf0e10cSrcweir             const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxFrame
146cdf0e10cSrcweir         ) = 0;
147cdf0e10cSrcweir 
148cdf0e10cSrcweir     virtual VclAbstractDialog* CreateScriptErrorDialog(
149cdf0e10cSrcweir 		Window* pParent, com::sun::star::uno::Any aException ) = 0;
150cdf0e10cSrcweir 
151cdf0e10cSrcweir     virtual VclAbstractDialog*  CreateOptionsDialog(
152cdf0e10cSrcweir         Window* pParent, const rtl::OUString& rExtensionId, const rtl::OUString& rApplicationContext ) = 0;
153cdf0e10cSrcweir };
154cdf0e10cSrcweir 
155cdf0e10cSrcweir #endif
156cdf0e10cSrcweir 
157