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 const SfxItemSet* GetOutputItemSet() const;
82 : virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem );
83 : virtual void SetInputSet( const SfxItemSet* pInSet );
84 : //From class Window.
85 : virtual void SetText( const XubString& rStr );
86 : virtual String GetText() const;
87 : };
88 : //add for SdCharDlg end
89 :
90 :
91 : //add for OutlineBulletDlg begin
92 : class SfxTabDialog;
93 : class AbstractBulletDialog_Impl : public SfxAbstractTabDialog
94 : {
95 0 : DECL_ABSTDLG_BASE( AbstractBulletDialog_Impl,SfxTabDialog )
96 : virtual void SetCurPageId( sal_uInt16 nId );
97 : virtual const SfxItemSet* GetOutputItemSet() const;
98 : virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem );
99 : virtual void SetInputSet( const SfxItemSet* pInSet );
100 : //From class Window.
101 : virtual void SetText( const XubString& rStr );
102 : virtual String GetText() const;
103 : };
104 : //add for OutlineBulletDlg end
105 :
106 : class SdPresLayoutTemplateDlg;
107 : class SdPresLayoutTemplateDlg_Impl : public SfxAbstractTabDialog
108 : {
109 0 : DECL_ABSTDLG_BASE( SdPresLayoutTemplateDlg_Impl,SdPresLayoutTemplateDlg )
110 : virtual void SetCurPageId( sal_uInt16 nId );
111 : virtual const SfxItemSet* GetOutputItemSet() const;
112 : virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem );
113 : virtual void SetInputSet( const SfxItemSet* pInSet );
114 : //From class Window.
115 : virtual void SetText( const XubString& rStr );
116 : virtual String GetText() const;
117 : };
118 :
119 : // add for AssistentDlg
120 : class AssistentDlg;
121 : class AbstractAssistentDlg_Impl : public AbstractAssistentDlg
122 : {
123 0 : DECL_ABSTDLG_BASE(AbstractAssistentDlg_Impl,AssistentDlg)
124 : virtual SfxObjectShellLock GetDocument();
125 : virtual OutputType GetOutputMedium() const;
126 : virtual sal_Bool IsSummary() const;
127 : virtual StartType GetStartType() const;
128 : virtual String GetDocPath() const;
129 : virtual sal_Bool GetStartWithFlag() const;
130 : virtual sal_Bool IsDocEmpty() const;
131 : virtual com::sun::star::uno::Sequence< com::sun::star::beans::NamedValue > GetPassword();
132 : };
133 :
134 : // add for SdModifyFieldDlg
135 : class SdModifyFieldDlg;
136 : class AbstractSdModifyFieldDlg_Impl : public AbstractSdModifyFieldDlg
137 : {
138 0 : DECL_ABSTDLG_BASE(AbstractSdModifyFieldDlg_Impl,SdModifyFieldDlg)
139 : virtual SvxFieldData* GetField();
140 : virtual SfxItemSet GetItemSet();
141 : };
142 :
143 : // add for SdSnapLineDlg
144 : class SdSnapLineDlg;
145 : class AbstractSdSnapLineDlg_Impl : public AbstractSdSnapLineDlg
146 : {
147 0 : DECL_ABSTDLG_BASE(AbstractSdSnapLineDlg_Impl,SdSnapLineDlg)
148 : virtual void GetAttr(SfxItemSet& rOutAttrs);
149 : virtual void HideRadioGroup();
150 : virtual void HideDeleteBtn();
151 : virtual void SetInputFields(sal_Bool bEnableX, sal_Bool bEnableY);
152 : //from class Window
153 : virtual void SetText( const XubString& rStr );
154 : };
155 :
156 : // add for SdInsertLayerDlg
157 : class SdInsertLayerDlg;
158 : class AbstractSdInsertLayerDlg_Impl : public AbstractSdInsertLayerDlg
159 : {
160 0 : DECL_ABSTDLG_BASE(AbstractSdInsertLayerDlg_Impl,SdInsertLayerDlg)
161 : virtual void GetAttr( SfxItemSet& rOutAttrs ) ;
162 : //from class Window
163 : virtual void SetHelpId( const rtl::OString& rHelpId ) ;
164 : };
165 :
166 : // add for SdInsertPasteDlg
167 : class SdInsertPasteDlg;
168 : class AbstractSdInsertPasteDlg_Impl : public AbstractSdInsertPasteDlg
169 : {
170 0 : DECL_ABSTDLG_BASE(AbstractSdInsertPasteDlg_Impl,SdInsertPasteDlg)
171 : virtual sal_Bool IsInsertBefore() const;
172 : };
173 :
174 : // add for SdInsertPagesObjsDlg
175 : class SdInsertPagesObjsDlg;
176 : class AbstractSdInsertPagesObjsDlg_Impl : public AbstractSdInsertPagesObjsDlg
177 : {
178 0 : DECL_ABSTDLG_BASE(AbstractSdInsertPagesObjsDlg_Impl,SdInsertPagesObjsDlg)
179 : virtual ::Window * GetWindow(); //this method is added for return a Window type pointer
180 : virtual std::vector<rtl::OUString> GetList ( const sal_uInt16 nType );
181 : virtual sal_Bool IsLink();
182 : virtual sal_Bool IsRemoveUnnessesaryMasterPages() const;
183 : };
184 :
185 : // add for MorphDlg
186 : class AbstractMorphDlg_Impl : public AbstractMorphDlg
187 : {
188 0 : DECL_ABSTDLG_BASE(AbstractMorphDlg_Impl,::sd::MorphDlg)
189 : virtual void SaveSettings() const;
190 : virtual sal_uInt16 GetFadeSteps() const;
191 : virtual sal_Bool IsAttributeFade() const ;
192 : virtual sal_Bool IsOrientationFade() const ;
193 : };
194 :
195 : // add for SdStartPresentationDlg
196 : class SdStartPresentationDlg;
197 : class AbstractSdStartPresDlg_Impl : public AbstractSdStartPresDlg
198 : {
199 0 : DECL_ABSTDLG_BASE(AbstractSdStartPresDlg_Impl,SdStartPresentationDlg)
200 : virtual void GetAttr( SfxItemSet& rOutAttrs );
201 : };
202 :
203 : // add for SdPresLayoutDlg
204 : class SdPresLayoutDlg;
205 : class AbstractSdPresLayoutDlg_Impl : public AbstractSdPresLayoutDlg
206 : {
207 0 : DECL_ABSTDLG_BASE(AbstractSdPresLayoutDlg_Impl,SdPresLayoutDlg)
208 : virtual void GetAttr(SfxItemSet& rOutAttrs);
209 : };
210 :
211 : // add for SdActionDlg
212 : class SdAbstractSfxDialog_Impl : public SfxAbstractDialog
213 : {
214 0 : DECL_ABSTDLG_BASE(SdAbstractSfxDialog_Impl,SfxModalDialog)
215 : virtual const SfxItemSet* GetOutputItemSet() const;
216 : virtual void SetText( const XubString& rStr );
217 : virtual String GetText() const;
218 : };
219 :
220 : // add for SdVectorizeDlg
221 : class SdVectorizeDlg;
222 : class AbstractSdVectorizeDlg_Impl :public AbstractSdVectorizeDlg
223 : {
224 0 : DECL_ABSTDLG_BASE(AbstractSdVectorizeDlg_Impl,SdVectorizeDlg)
225 : virtual const GDIMetaFile& GetGDIMetaFile() const ;
226 : };
227 :
228 : // add for SdPublishingDlg
229 : class SdPublishingDlg;
230 : class AbstractSdPublishingDlg_Impl :public AbstractSdPublishingDlg
231 : {
232 0 : DECL_ABSTDLG_BASE(AbstractSdPublishingDlg_Impl,SdPublishingDlg)
233 : virtual void GetParameterSequence( ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rParams );
234 : };
235 :
236 : // add for HeaderFooterDialog
237 : class AbstractHeaderFooterDialog_Impl :public AbstractHeaderFooterDialog
238 : {
239 0 : DECL_ABSTDLG_BASE(AbstractHeaderFooterDialog_Impl,::sd::HeaderFooterDialog)
240 : virtual void ApplyToAll( TabPage* pPage );
241 : virtual void Apply( TabPage* pPage );
242 : virtual void Cancel( TabPage* pPage );
243 : };
244 :
245 : //------------------------------------------------------------------------
246 : //AbstractDialogFactory_Impl implementations
247 : class SdAbstractDialogFactory_Impl : public SdAbstractDialogFactory
248 : {
249 :
250 : public:
251 0 : virtual ~SdAbstractDialogFactory_Impl() {}
252 :
253 : virtual VclAbstractDialog* CreateBreakDlg(::Window* pWindow, ::sd::DrawView* pDrView, ::sd::DrawDocShell* pShell, sal_uLong nSumActionCount, sal_uLong nObjCount );
254 : virtual AbstractCopyDlg* CreateCopyDlg( ::Window* pWindow, const SfxItemSet& rInAttrs, const rtl::Reference<XColorList> &pColTab, ::sd::View* pView );
255 : virtual AbstractSdCustomShowDlg* CreateSdCustomShowDlg( ::Window* pWindow, SdDrawDocument& rDrawDoc );
256 : virtual SfxAbstractTabDialog* CreateSdTabCharDialog( ::Window* pParent, const SfxItemSet* pAttr, SfxObjectShell* pDocShell );
257 : virtual SfxAbstractTabDialog* CreateSdTabPageDialog( ::Window* pParent, const SfxItemSet* pAttr, SfxObjectShell* pDocShell, sal_Bool bAreaPage = sal_True );
258 : virtual AbstractAssistentDlg* CreateAssistentDlg( ::Window* pParent, sal_Bool bAutoPilot);
259 : virtual AbstractSdModifyFieldDlg* CreateSdModifyFieldDlg( ::Window* pWindow, const SvxFieldData* pInField, const SfxItemSet& rSet );
260 : virtual AbstractSdSnapLineDlg* CreateSdSnapLineDlg( ::Window* pWindow, const SfxItemSet& rInAttrs, ::sd::View* pView);
261 : virtual AbstractSdInsertLayerDlg* CreateSdInsertLayerDlg( ::Window* pWindow, const SfxItemSet& rInAttrs, bool bDeletable, String aStr );
262 : virtual AbstractSdInsertPasteDlg* CreateSdInsertPasteDlg( ::Window* pWindow );
263 : virtual AbstractSdInsertPagesObjsDlg* CreateSdInsertPagesObjsDlg( ::Window* pParent, const SdDrawDocument* pDoc, SfxMedium* pSfxMedium, const String& rFileName );
264 : virtual AbstractMorphDlg* CreateMorphDlg( ::Window* pParent, const SdrObject* pObj1, const SdrObject* pObj2);
265 : virtual SfxAbstractTabDialog* CreateSdOutlineBulletTabDlg ( ::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView = NULL );
266 : virtual SfxAbstractTabDialog* CreateSdParagraphTabDlg ( ::Window* pParent, const SfxItemSet* pAttr );
267 : virtual AbstractSdStartPresDlg* CreateSdStartPresentationDlg( ::Window* pWindow, const SfxItemSet& rInAttrs,
268 : const std::vector<String> &rPageNames, SdCustomShowList* pCSList );
269 : virtual VclAbstractDialog* CreateRemoteDialog( ::Window* pWindow ); // ad for RemoteDialog
270 : virtual SfxAbstractTabDialog* CreateSdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, ::Window* pParent, SdResId DlgId, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool );
271 : virtual AbstractSdPresLayoutDlg* CreateSdPresLayoutDlg( ::sd::DrawDocShell* pDocShell, ::Window* pWindow, const SfxItemSet& rInAttrs);
272 : virtual SfxAbstractTabDialog* CreateSdTabTemplateDlg( ::Window* pParent, const SfxObjectShell* pDocShell, SfxStyleSheetBase& rStyleBase, SdrModel* pModel, SdrView* pView );
273 : virtual SfxAbstractDialog* CreatSdActionDialog( ::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView );
274 : virtual AbstractSdVectorizeDlg* CreateSdVectorizeDlg( ::Window* pParent, const Bitmap& rBmp, ::sd::DrawDocShell* pDocShell );
275 : virtual AbstractSdPublishingDlg* CreateSdPublishingDlg( ::Window* pWindow, DocumentType eDocType);
276 :
277 : virtual VclAbstractDialog* CreateMasterLayoutDialog( ::Window* pParent,
278 : SdDrawDocument* pDoc,
279 : SdPage* ); // add for MasterLayoutDialog
280 :
281 : virtual AbstractHeaderFooterDialog* CreateHeaderFooterDialog( ViewShell* pViewShell,
282 : ::Window* pParent,
283 : SdDrawDocument* pDoc,
284 : SdPage* pCurrentPage ); // add for HeaderFooterDialog
285 :
286 : // For TabPage
287 : virtual CreateTabPage GetSdOptionsContentsTabPageCreatorFunc();
288 : virtual CreateTabPage GetSdPrintOptionsTabPageCreatorFunc();
289 : virtual CreateTabPage GetSdOptionsMiscTabPageCreatorFunc();
290 : virtual CreateTabPage GetSdOptionsSnapTabPageCreatorFunc();
291 : };
292 :
293 : #endif
294 :
295 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|