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