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