xref: /aoo41x/main/sd/source/ui/dlg/sddlgfact.hxx (revision c7be74b1)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef _SD_DLGFACT_HXX
24 #define _SD_DLGFACT_HXX
25 
26 // include ---------------------------------------------------------------
27 #include "sdabstdlg.hxx"
28 #include <sfx2/basedlgs.hxx>
29 
30 #define DECL_ABSTDLG_BASE(Class,DialogClass)		\
31 	DialogClass* 		pDlg;                   	\
32 public:												\
33 					Class( DialogClass* p)			\
34 					 : pDlg(p)						\
35 					 {}                             \
36 	virtual			~Class();               		\
37 	virtual	short	Execute() ;
38 
39 #define IMPL_ABSTDLG_BASE(Class)					\
40 Class::~Class()                    					\
41 {                                                   \
42 	delete pDlg;                                 	\
43 }													\
44 short Class::Execute()                             \
45 {                                                   \
46 	return pDlg->Execute();                      	\
47 }
48 
49 namespace sd {
50 	class MorphDlg;
51 	class CopyDlg;
52 	class BreakDlg;
53 	class OutlineBulletDlg;
54         class HeaderFooterDialog;
55 }
56 // add for BreakDlg
57 class Dialog;
58 class VclAbstractDialog_Impl : public VclAbstractDialog
59 {
60 	DECL_ABSTDLG_BASE(VclAbstractDialog_Impl,Dialog)
61 };
62 
63 // add for CopyDlg
64 
65 class AbstractCopyDlg_Impl : public AbstractCopyDlg
66 {
67 	DECL_ABSTDLG_BASE(AbstractCopyDlg_Impl,::sd::CopyDlg)
68 	virtual void	GetAttr( SfxItemSet& rOutAttrs );
69 };
70 
71 // add for SdCustomShowDlg
72 class SdCustomShowDlg;
73 class AbstractSdCustomShowDlg_Impl : public AbstractSdCustomShowDlg
74 {
75 	DECL_ABSTDLG_BASE(AbstractSdCustomShowDlg_Impl,SdCustomShowDlg)
76 	virtual sal_Bool		IsModified() const ;
77 	virtual sal_Bool		IsCustomShow() const ;
78 };
79 
80 //add for SdCharDlg begin
81 class SfxTabDialog;
82 class AbstractTabDialog_Impl : public SfxAbstractTabDialog
83 {
84 	DECL_ABSTDLG_BASE( AbstractTabDialog_Impl,SfxTabDialog )
85 	virtual void				SetCurPageId( sal_uInt16 nId );
86 	virtual const SfxItemSet* 	GetOutputItemSet() const;
87 	virtual const sal_uInt16*		GetInputRanges( const SfxItemPool& pItem );
88 	virtual void				SetInputSet( const SfxItemSet* pInSet );
89 		//From class Window.
90     virtual void		SetText( const XubString& rStr );
91     virtual String   	GetText() const;
92 };
93 //add for SdCharDlg end
94 
95 
96 //add for OutlineBulletDlg begin
97 class SfxTabDialog;
98 class AbstractBulletDialog_Impl : public SfxAbstractTabDialog
99 {
100 	DECL_ABSTDLG_BASE( AbstractBulletDialog_Impl,SfxTabDialog )
101 	virtual void				SetCurPageId( sal_uInt16 nId );
102 	virtual const SfxItemSet* 	GetOutputItemSet() const;
103 	virtual const sal_uInt16*		GetInputRanges( const SfxItemPool& pItem );
104 	virtual void				SetInputSet( const SfxItemSet* pInSet );
105 		//From class Window.
106     virtual void		SetText( const XubString& rStr );
107     virtual String   	GetText() const;
108 };
109 //add for OutlineBulletDlg end
110 
111 class SdPresLayoutTemplateDlg;
112 class SdPresLayoutTemplateDlg_Impl : public SfxAbstractTabDialog
113 {
114 	DECL_ABSTDLG_BASE( SdPresLayoutTemplateDlg_Impl,SdPresLayoutTemplateDlg )
115 	virtual void				SetCurPageId( sal_uInt16 nId );
116 	virtual const SfxItemSet* 	GetOutputItemSet() const;
117 	virtual const sal_uInt16*		GetInputRanges( const SfxItemPool& pItem );
118 	virtual void				SetInputSet( const SfxItemSet* pInSet );
119 		//From class Window.
120     virtual void		SetText( const XubString& rStr );
121     virtual String   	GetText() const;
122 };
123 
124 // add for AssistentDlg
125 class AssistentDlg;
126 class AbstractAssistentDlg_Impl : public AbstractAssistentDlg
127 {
128 	DECL_ABSTDLG_BASE(AbstractAssistentDlg_Impl,AssistentDlg)
129 	virtual SfxObjectShellLock GetDocument();
130 	virtual OutputType GetOutputMedium() const;
131 	virtual sal_Bool IsSummary() const;
132 	virtual StartType GetStartType() const;
133 	virtual String GetDocPath() const;
134 	virtual sal_Bool GetStartWithFlag() const;
135 	virtual sal_Bool IsDocEmpty() const;
136 	virtual String GetPassword();
137 };
138 
139 // add for SdModifyFieldDlg
140 class SdModifyFieldDlg;
141 class AbstractSdModifyFieldDlg_Impl : public AbstractSdModifyFieldDlg
142 {
143 	DECL_ABSTDLG_BASE(AbstractSdModifyFieldDlg_Impl,SdModifyFieldDlg)
144 	virtual SvxFieldData*		GetField();
145 	virtual SfxItemSet			GetItemSet();
146 };
147 
148 // add for SdSnapLineDlg
149 class SdSnapLineDlg;
150 class AbstractSdSnapLineDlg_Impl : public AbstractSdSnapLineDlg
151 {
152 	DECL_ABSTDLG_BASE(AbstractSdSnapLineDlg_Impl,SdSnapLineDlg)
153 	virtual void GetAttr(SfxItemSet& rOutAttrs);
154 	virtual void HideRadioGroup();
155 	virtual void HideDeleteBtn();
156 	virtual void SetInputFields(sal_Bool bEnableX, sal_Bool bEnableY);
157 	//from class Window
158 	virtual void    SetText( const XubString& rStr );
159 };
160 
161 // add for SdInsertLayerDlg
162 class SdInsertLayerDlg;
163 class AbstractSdInsertLayerDlg_Impl : public AbstractSdInsertLayerDlg
164 {
165 	DECL_ABSTDLG_BASE(AbstractSdInsertLayerDlg_Impl,SdInsertLayerDlg)
166 	virtual void	GetAttr( SfxItemSet& rOutAttrs ) ;
167 	//from class Window
168 	virtual void    SetHelpId( const rtl::OString& rHelpId ) ;
169 };
170 
171 // add for SdInsertPasteDlg
172 class SdInsertPasteDlg;
173 class AbstractSdInsertPasteDlg_Impl : public AbstractSdInsertPasteDlg
174 {
175 	DECL_ABSTDLG_BASE(AbstractSdInsertPasteDlg_Impl,SdInsertPasteDlg)
176 	virtual sal_Bool			IsInsertBefore() const;
177 };
178 
179 // add for SdInsertPagesObjsDlg
180 class SdInsertPagesObjsDlg;
181 class AbstractSdInsertPagesObjsDlg_Impl : public AbstractSdInsertPagesObjsDlg
182 {
183 	DECL_ABSTDLG_BASE(AbstractSdInsertPagesObjsDlg_Impl,SdInsertPagesObjsDlg)
184 	virtual ::Window *	GetWindow(); //this method is added for return a Window type pointer
185 	virtual List*   	GetList( sal_uInt16 nType );
186 	virtual sal_Bool		IsLink();
187 	virtual sal_Bool 		IsRemoveUnnessesaryMasterPages() const;
188 };
189 
190 // add for MorphDlg
191 class AbstractMorphDlg_Impl : public AbstractMorphDlg
192 {
193 	DECL_ABSTDLG_BASE(AbstractMorphDlg_Impl,::sd::MorphDlg)
194 	virtual void			SaveSettings() const;
195 	virtual sal_uInt16			GetFadeSteps() const;
196 	virtual sal_Bool			IsAttributeFade() const ;
197 	virtual sal_Bool			IsOrientationFade() const ;
198 };
199 
200 // add for SdStartPresentationDlg
201 class SdStartPresentationDlg;
202 class AbstractSdStartPresDlg_Impl : public AbstractSdStartPresDlg
203 {
204 	DECL_ABSTDLG_BASE(AbstractSdStartPresDlg_Impl,SdStartPresentationDlg)
205 	virtual void	GetAttr( SfxItemSet& rOutAttrs );
206 };
207 
208 // add for SdPresLayoutDlg
209 class SdPresLayoutDlg;
210 class AbstractSdPresLayoutDlg_Impl : public AbstractSdPresLayoutDlg
211 {
212 	DECL_ABSTDLG_BASE(AbstractSdPresLayoutDlg_Impl,SdPresLayoutDlg)
213 	virtual void	GetAttr(SfxItemSet& rOutAttrs);
214 };
215 
216 // add for SdActionDlg
217 class SfxSingleTabDialog;
218 class AbstractSfxDialog_Impl : public SfxAbstractDialog
219 {
220 	DECL_ABSTDLG_BASE(AbstractSfxDialog_Impl,SfxModalDialog)
221 	virtual const SfxItemSet* 	GetOutputItemSet() const;
222 	virtual void		SetText( const XubString& rStr );
223     virtual String   	GetText() const;
224 };
225 
226 // add for SdVectorizeDlg
227 class SdVectorizeDlg;
228 class AbstractSdVectorizeDlg_Impl :public AbstractSdVectorizeDlg
229 {
230 	DECL_ABSTDLG_BASE(AbstractSdVectorizeDlg_Impl,SdVectorizeDlg)
231 	virtual const GDIMetaFile&	GetGDIMetaFile() const ;
232 };
233 
234 // add for SdPublishingDlg
235 class SdPublishingDlg;
236 class AbstractSdPublishingDlg_Impl :public AbstractSdPublishingDlg
237 {
238 	DECL_ABSTDLG_BASE(AbstractSdPublishingDlg_Impl,SdPublishingDlg)
239 	virtual void GetParameterSequence( ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rParams );
240 };
241 
242 // add for HeaderFooterDialog
243 class AbstractHeaderFooterDialog_Impl :public AbstractHeaderFooterDialog
244 {
245   DECL_ABSTDLG_BASE(AbstractHeaderFooterDialog_Impl,::sd::HeaderFooterDialog)
246   virtual void ApplyToAll( TabPage* pPage );
247   virtual void Apply( TabPage* pPage );
248   virtual void Cancel( TabPage* pPage );
249 };
250 
251 //------------------------------------------------------------------------
252 //AbstractDialogFactory_Impl implementations
253 class SdAbstractDialogFactory_Impl : public SdAbstractDialogFactory
254 {
255 
256 public:
257 	virtual VclAbstractDialog* 			CreateBreakDlg(::Window* pWindow, ::sd::DrawView* pDrView, ::sd::DrawDocShell* pShell, sal_uLong nSumActionCount, sal_uLong nObjCount );
258 	virtual AbstractCopyDlg*			CreateCopyDlg( ::Window* pWindow, const SfxItemSet& rInAttrs, XColorListSharedPtr aColTab, ::sd::View* pView );
259 	virtual AbstractSdCustomShowDlg*	CreateSdCustomShowDlg( ::Window* pWindow, SdDrawDocument& rDrawDoc );
260 	virtual SfxAbstractTabDialog*		CreateSdTabCharDialog( ::Window* pParent, const SfxItemSet* pAttr, SfxObjectShell* pDocShell );
261 	virtual SfxAbstractTabDialog*		CreateSdTabPageDialog( ::Window* pParent, const SfxItemSet* pAttr, SfxObjectShell* pDocShell, sal_Bool bAreaPage = sal_True );
262 	virtual AbstractAssistentDlg*		CreateAssistentDlg( ::Window* pParent, sal_Bool bAutoPilot);
263 	virtual AbstractSdModifyFieldDlg*	CreateSdModifyFieldDlg( ::Window* pWindow, const SvxFieldData* pInField, const SfxItemSet& rSet );
264 	virtual AbstractSdSnapLineDlg*		CreateSdSnapLineDlg( ::Window* pWindow, const SfxItemSet& rInAttrs, ::sd::View* pView);
265 	virtual AbstractSdInsertLayerDlg*	CreateSdInsertLayerDlg( ::Window* pWindow, const SfxItemSet& rInAttrs, bool bDeletable,	String aStr );
266 	virtual AbstractSdInsertPasteDlg*	CreateSdInsertPasteDlg( ::Window* pWindow );
267 	virtual AbstractSdInsertPagesObjsDlg* CreateSdInsertPagesObjsDlg( ::Window* pParent, const SdDrawDocument* pDoc, SfxMedium* pSfxMedium, const String& rFileName );
268 	virtual AbstractMorphDlg*			CreateMorphDlg( ::Window* pParent, const SdrObject* pObj1, const SdrObject* pObj2);
269 	virtual SfxAbstractTabDialog*		CreateSdOutlineBulletTabDlg ( ::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView = NULL );
270 	virtual SfxAbstractTabDialog*		CreateSdParagraphTabDlg ( ::Window* pParent, const SfxItemSet* pAttr );
271 	virtual AbstractSdStartPresDlg*		CreateSdStartPresentationDlg( ::Window* pWindow, const SfxItemSet& rInAttrs, List& rPageNames, List* pCSList );
272 	virtual SfxAbstractTabDialog*		CreateSdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, ::Window* pParent, SdResId DlgId, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool );
273 	virtual AbstractSdPresLayoutDlg*	CreateSdPresLayoutDlg( ::sd::DrawDocShell* pDocShell, ::sd::ViewShell* pViewShell, ::Window* pWindow, const SfxItemSet& rInAttrs);
274 	virtual SfxAbstractTabDialog*		CreateSdTabTemplateDlg( ::Window* pParent, const SfxObjectShell* pDocShell, SfxStyleSheetBase& rStyleBase, SdrModel* pModel, SdrView* pView );
275 	virtual SfxAbstractDialog*			CreatSdActionDialog( ::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView );
276 	virtual AbstractSdVectorizeDlg*		CreateSdVectorizeDlg( ::Window* pParent, const Bitmap& rBmp, ::sd::DrawDocShell* pDocShell );
277 	virtual AbstractSdPublishingDlg*	CreateSdPublishingDlg( ::Window* pWindow, DocumentType eDocType);
278 
279   	virtual VclAbstractDialog*          CreateMasterLayoutDialog( ::Window* pParent,
280 																  SdDrawDocument* pDoc,
281 																  SdPage* ); // add for MasterLayoutDialog
282 
283 	virtual AbstractHeaderFooterDialog* CreateHeaderFooterDialog( ViewShell* pViewShell,
284 																  ::Window* pParent,
285 																  SdDrawDocument* pDoc,
286 																  SdPage* pCurrentPage ); // add for HeaderFooterDialog
287 
288 	// For TabPage
289 	virtual CreateTabPage				GetSdOptionsContentsTabPageCreatorFunc();
290 	virtual CreateTabPage				GetSdPrintOptionsTabPageCreatorFunc();
291 	virtual CreateTabPage				GetSdOptionsMiscTabPageCreatorFunc();
292 	virtual CreateTabPage				GetSdOptionsSnapTabPageCreatorFunc();
293 };
294 
295 #endif
296 
297