bump product version to 6.3.0.0.beta1
[LibreOffice.git] / sd / source / ui / dlg / sddlgfact.hxx
blob322750bcd0e9d942f60fbff6d3073ef9db688cab
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_SD_SOURCE_UI_DLG_SDDLGFACT_HXX
20 #define INCLUDED_SD_SOURCE_UI_DLG_SDDLGFACT_HXX
22 #include <sdabstdlg.hxx>
23 #include <sfx2/basedlgs.hxx>
24 #include <sfx2/sfxdlg.hxx>
25 #include <svx/svxdlg.hxx>
27 #include <morphdlg.hxx>
28 #include <copydlg.hxx>
29 #include <BreakDlg.hxx>
30 #include <headerfooterdlg.hxx>
31 #include <masterlayoutdlg.hxx>
32 #include <custsdlg.hxx>
33 #include <layeroptionsdlg.hxx>
34 #include <inspagob.hxx>
35 #include <dlgfield.hxx>
36 #include <sdpreslt.hxx>
37 #include <prltempl.hxx>
38 #include <pubdlg.hxx>
39 #include <dlgsnap.hxx>
40 #include <present.hxx>
41 #include <vectdlg.hxx>
42 #include <BulletAndPositionDlg.hxx>
44 #define DECL_ABSTDLG_BASE(Class,DialogClass) \
45 ScopedVclPtr<DialogClass> pDlg; \
46 public: \
47 explicit Class(DialogClass* p) \
48 : pDlg(p) \
49 { \
50 } \
51 virtual std::vector<OString> getAllPageUIXMLDescriptions() const override; \
52 virtual bool selectPageByUIXMLDescription(const OString& rUIXMLDescription) override; \
53 virtual BitmapEx createScreenshot() const override; \
54 virtual OString GetScreenshotId() const override; \
55 virtual ~Class() override; \
56 virtual short Execute() override; \
57 virtual bool StartExecuteAsync(AsyncContext &ctx) override;
59 #define IMPL_ABSTDLG_BASE(Class) \
60 std::vector<OString> Class::getAllPageUIXMLDescriptions() const { return pDlg->getAllPageUIXMLDescriptions(); } \
61 bool Class::selectPageByUIXMLDescription(const OString& rUIXMLDescription) { return pDlg->selectPageByUIXMLDescription(rUIXMLDescription); } \
62 BitmapEx Class::createScreenshot() const { return pDlg->createScreenshot();} \
63 OString Class::GetScreenshotId() const { return pDlg->GetScreenshotId();} \
64 Class::~Class() \
65 { \
66 } \
67 short Class::Execute() \
68 { \
69 return pDlg->Execute(); \
70 } \
71 bool Class::StartExecuteAsync(AsyncContext &ctx) \
72 { \
73 return pDlg->StartExecuteAsync(ctx); \
76 //namespace sd {
77 // class MorphDlg;
78 // class CopyDlg;
79 // class BreakDlg;
80 // class HeaderFooterDialog;
81 // class MasterLayoutDialog;
82 //}
84 class SvxBulletAndPositionDlg;
86 /// Provides managing and getting information from the numbering and position dialog.
87 class AbstractSvxBulletAndPositionDlg_Impl :public AbstractSvxBulletAndPositionDlg
89 std::unique_ptr<SvxBulletAndPositionDlg> m_xDlg;
90 public:
91 explicit AbstractSvxBulletAndPositionDlg_Impl(std::unique_ptr<SvxBulletAndPositionDlg> p)
92 : m_xDlg(std::move(p))
95 virtual short Execute() override;
96 virtual const SfxItemSet* GetOutputItemSet( SfxItemSet* ) const override ;
97 virtual bool IsApplyToMaster() override;
98 virtual bool IsSlideScope() override;
102 class SdVclAbstractDialog_Impl : public VclAbstractDialog
104 DECL_ABSTDLG_BASE(SdVclAbstractDialog_Impl,Dialog)
107 class SdAbstractGenericDialog_Impl : public VclAbstractDialog
109 std::unique_ptr<weld::GenericDialogController> m_xDlg;
110 public:
111 explicit SdAbstractGenericDialog_Impl(std::unique_ptr<weld::GenericDialogController> p)
112 : m_xDlg(std::move(p))
115 virtual short Execute() override;
118 class AbstractMasterLayoutDialog_Impl : public VclAbstractDialog
120 private:
121 std::unique_ptr<sd::MasterLayoutDialog> m_xDlg;
122 public:
123 AbstractMasterLayoutDialog_Impl(std::unique_ptr<::sd::MasterLayoutDialog> pDlg);
124 virtual short Execute() override;
127 class AbstractBreakDlg_Impl : public VclAbstractDialog
129 private:
130 std::unique_ptr<sd::BreakDlg> m_xDlg;
131 public:
132 AbstractBreakDlg_Impl(std::unique_ptr<::sd::BreakDlg> pDlg);
133 virtual short Execute() override;
136 class AbstractCopyDlg_Impl : public AbstractCopyDlg
138 private:
139 std::unique_ptr<sd::CopyDlg> m_xDlg;
140 public:
141 AbstractCopyDlg_Impl(std::unique_ptr<::sd::CopyDlg> pDlg)
142 : m_xDlg(std::move(pDlg))
145 virtual short Execute() override;
146 virtual void GetAttr( SfxItemSet& rOutAttrs ) override;
149 class AbstractSdCustomShowDlg_Impl : public AbstractSdCustomShowDlg
151 private:
152 std::unique_ptr<SdCustomShowDlg> m_xDlg;
153 public:
154 AbstractSdCustomShowDlg_Impl(std::unique_ptr<SdCustomShowDlg> pDlg)
155 : m_xDlg(std::move(pDlg))
158 virtual short Execute() override;
159 virtual bool IsModified() const override ;
160 virtual bool IsCustomShow() const override ;
163 class SdAbstractTabController_Impl : public SfxAbstractTabDialog
165 std::shared_ptr<SfxTabDialogController> m_xDlg;
166 public:
167 explicit SdAbstractTabController_Impl(std::unique_ptr<SfxTabDialogController> p)
168 : m_xDlg(std::move(p))
171 virtual short Execute() override;
172 virtual bool StartExecuteAsync(AsyncContext &rCtx) override;
173 virtual void SetCurPageId( const OString &rName ) override;
174 virtual const SfxItemSet* GetOutputItemSet() const override;
175 virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem ) override;
176 virtual void SetInputSet( const SfxItemSet* pInSet ) override;
177 //From class Window.
178 virtual void SetText( const OUString& rStr ) override;
181 class AbstractBulletDialog_Impl : public SfxAbstractTabDialog
183 std::shared_ptr<SfxTabDialogController> m_xDlg;
184 public:
185 explicit AbstractBulletDialog_Impl(std::unique_ptr<SfxTabDialogController> p)
186 : m_xDlg(std::move(p))
189 virtual short Execute() override;
190 virtual bool StartExecuteAsync(AsyncContext &rCtx) override;
191 virtual void SetCurPageId( const OString& rName ) override;
192 virtual const SfxItemSet* GetOutputItemSet() const override;
193 virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem ) override;
194 virtual void SetInputSet( const SfxItemSet* pInSet ) override;
195 //From class Window.
196 virtual void SetText( const OUString& rStr ) override;
199 class SdPresLayoutTemplateDlg_Impl : public SfxAbstractTabDialog
201 std::shared_ptr<SdPresLayoutTemplateDlg> m_xDlg;
202 public:
203 explicit SdPresLayoutTemplateDlg_Impl(std::unique_ptr<SdPresLayoutTemplateDlg> p)
204 : m_xDlg(std::move(p))
207 virtual short Execute() override;
208 virtual bool StartExecuteAsync(AsyncContext &rCtx) override;
209 virtual void SetCurPageId( const OString& rName ) override;
210 virtual const SfxItemSet* GetOutputItemSet() const override;
211 virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem ) override;
212 virtual void SetInputSet( const SfxItemSet* pInSet ) override;
213 //From class Window.
214 virtual void SetText( const OUString& rStr ) override;
217 class AbstractSdModifyFieldDlg_Impl : public AbstractSdModifyFieldDlg
219 private:
220 std::unique_ptr<SdModifyFieldDlg> m_xDlg;
221 public:
222 AbstractSdModifyFieldDlg_Impl(std::unique_ptr<SdModifyFieldDlg> pDlg)
223 : m_xDlg(std::move(pDlg))
226 virtual short Execute() override;
227 virtual SvxFieldData* GetField() override;
228 virtual SfxItemSet GetItemSet() override;
231 class AbstractSdSnapLineDlg_Impl : public AbstractSdSnapLineDlg
233 private:
234 std::unique_ptr<SdSnapLineDlg> m_xDlg;
235 public:
236 AbstractSdSnapLineDlg_Impl(std::unique_ptr<SdSnapLineDlg> pDlg)
237 : m_xDlg(std::move(pDlg))
240 virtual short Execute() override;
241 virtual void GetAttr(SfxItemSet& rOutAttrs) override;
242 virtual void HideRadioGroup() override;
243 virtual void HideDeleteBtn() override;
244 virtual void SetInputFields(bool bEnableX, bool bEnableY) override;
245 //from class Window
246 virtual void SetText( const OUString& rStr ) override;
249 class AbstractSdInsertLayerDlg_Impl : public AbstractSdInsertLayerDlg
251 private:
252 std::unique_ptr<SdInsertLayerDlg> m_xDlg;
253 public:
254 AbstractSdInsertLayerDlg_Impl(std::unique_ptr<SdInsertLayerDlg> pDlg)
255 : m_xDlg(std::move(pDlg))
258 virtual short Execute() override;
259 virtual void GetAttr( SfxItemSet& rOutAttrs ) override ;
260 //from class Window
261 virtual void SetHelpId( const OString& rHelpId ) override ;
264 class AbstractSdInsertPagesObjsDlg_Impl : public AbstractSdInsertPagesObjsDlg
266 private:
267 std::unique_ptr<SdInsertPagesObjsDlg> m_xDlg;
268 public:
269 AbstractSdInsertPagesObjsDlg_Impl(std::unique_ptr<SdInsertPagesObjsDlg> pDlg)
270 : m_xDlg(std::move(pDlg))
273 virtual short Execute() override;
274 virtual std::vector<OUString> GetList ( const sal_uInt16 nType ) override;
275 virtual bool IsLink() override;
276 virtual bool IsRemoveUnnessesaryMasterPages() const override;
279 class AbstractMorphDlg_Impl : public AbstractMorphDlg
281 private:
282 std::unique_ptr<sd::MorphDlg> m_xDlg;
283 public:
284 AbstractMorphDlg_Impl(std::unique_ptr<::sd::MorphDlg> pDlg)
285 : m_xDlg(std::move(pDlg))
288 virtual short Execute() override;
289 virtual void SaveSettings() const override;
290 virtual sal_uInt16 GetFadeSteps() const override;
291 virtual bool IsAttributeFade() const override ;
292 virtual bool IsOrientationFade() const override ;
295 class AbstractSdStartPresDlg_Impl : public AbstractSdStartPresDlg
297 private:
298 std::unique_ptr<SdStartPresentationDlg> m_xDlg;
299 public:
300 AbstractSdStartPresDlg_Impl(std::unique_ptr<SdStartPresentationDlg> pDlg)
301 : m_xDlg(std::move(pDlg))
304 virtual short Execute() override;
305 virtual void GetAttr( SfxItemSet& rOutAttrs ) override;
308 class AbstractSdPresLayoutDlg_Impl : public AbstractSdPresLayoutDlg
310 private:
311 std::unique_ptr<SdPresLayoutDlg> m_xDlg;
312 public:
313 AbstractSdPresLayoutDlg_Impl(std::unique_ptr<SdPresLayoutDlg> pDlg)
314 : m_xDlg(std::move(pDlg))
317 virtual short Execute() override;
318 virtual void GetAttr(SfxItemSet& rOutAttrs) override;
321 class SdAbstractSfxDialog_Impl : public SfxAbstractDialog
323 private:
324 std::unique_ptr<SfxSingleTabDialogController> m_xDlg;
325 public:
326 SdAbstractSfxDialog_Impl(std::unique_ptr<SfxSingleTabDialogController> pDlg)
327 : m_xDlg(std::move(pDlg))
330 virtual short Execute() override;
331 virtual const SfxItemSet* GetOutputItemSet() const override;
332 virtual void SetText( const OUString& rStr ) override;
335 class AbstractSdVectorizeDlg_Impl :public AbstractSdVectorizeDlg
337 private:
338 std::unique_ptr<SdVectorizeDlg> m_xDlg;
339 public:
340 AbstractSdVectorizeDlg_Impl(std::unique_ptr<SdVectorizeDlg> pDlg)
341 : m_xDlg(std::move(pDlg))
344 virtual short Execute() override;
345 virtual const GDIMetaFile& GetGDIMetaFile() const override ;
348 class AbstractSdPublishingDlg_Impl :public AbstractSdPublishingDlg
350 DECL_ABSTDLG_BASE(AbstractSdPublishingDlg_Impl,SdPublishingDlg)
351 virtual void GetParameterSequence( css::uno::Sequence< css::beans::PropertyValue >& rParams ) override;
354 class AbstractHeaderFooterDialog_Impl :public AbstractHeaderFooterDialog
356 DECL_ABSTDLG_BASE(AbstractHeaderFooterDialog_Impl,::sd::HeaderFooterDialog)
359 //AbstractDialogFactory_Impl implementations
360 class SdAbstractDialogFactory_Impl : public SdAbstractDialogFactory
363 public:
364 virtual ~SdAbstractDialogFactory_Impl() {}
366 virtual VclPtr<AbstractSvxBulletAndPositionDlg> CreateSvxBulletAndPositionDlg(weld::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView) override;
367 virtual VclPtr<VclAbstractDialog> CreateBreakDlg(weld::Window* pWindow, ::sd::DrawView* pDrView, ::sd::DrawDocShell* pShell, sal_uLong nSumActionCount, sal_uLong nObjCount) override;
368 virtual VclPtr<AbstractCopyDlg> CreateCopyDlg(weld::Window* pParent, const SfxItemSet& rInAttrs, ::sd::View* pView) override;
369 virtual VclPtr<AbstractSdCustomShowDlg> CreateSdCustomShowDlg(weld::Window* pParent, SdDrawDocument& rDrawDoc) override;
370 virtual VclPtr<SfxAbstractTabDialog> CreateSdTabCharDialog(weld::Window* pWindow, const SfxItemSet* pAttr, SfxObjectShell* pDocShell) override;
371 virtual VclPtr<SfxAbstractTabDialog> CreateSdTabPageDialog(weld::Window* pWindow, const SfxItemSet* pAttr, SfxObjectShell* pDocShell, bool bAreaPage) override;
372 virtual VclPtr<AbstractSdModifyFieldDlg> CreateSdModifyFieldDlg(weld::Window* pWindow, const SvxFieldData* pInField, const SfxItemSet& rSet) override;
373 virtual VclPtr<AbstractSdSnapLineDlg> CreateSdSnapLineDlg(weld::Window* pParent, const SfxItemSet& rInAttrs, ::sd::View* pView) override;
374 virtual VclPtr<AbstractSdInsertLayerDlg> CreateSdInsertLayerDlg(weld::Window* pParent, const SfxItemSet& rInAttrs, bool bDeletable, const OUString& aStr) override;
375 virtual VclPtr<AbstractSdInsertPagesObjsDlg> CreateSdInsertPagesObjsDlg(weld::Window* pParent, const SdDrawDocument* pDoc, SfxMedium* pSfxMedium, const OUString& rFileName ) override;
376 virtual VclPtr<AbstractMorphDlg> CreateMorphDlg(weld::Window* pParent, const SdrObject* pObj1, const SdrObject* pObj2) override;
377 virtual VclPtr<SfxAbstractTabDialog> CreateSdOutlineBulletTabDlg(weld::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView) override;
378 virtual VclPtr<SfxAbstractTabDialog> CreateSdParagraphTabDlg(weld::Window* pParent, const SfxItemSet* pAttr) override;
379 virtual VclPtr<AbstractSdStartPresDlg> CreateSdStartPresentationDlg(weld::Window* pWindow, const SfxItemSet& rInAttrs,
380 const std::vector<OUString> &rPageNames, SdCustomShowList* pCSList ) override;
381 virtual VclPtr<VclAbstractDialog> CreateRemoteDialog( vcl::Window* pWindow ) override; // add for RemoteDialog
382 virtual VclPtr<SfxAbstractTabDialog> CreateSdPresLayoutTemplateDlg(SfxObjectShell* pDocSh, weld::Window* pParent, bool bBackgroundDlg, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool) override;
383 virtual VclPtr<AbstractSdPresLayoutDlg> CreateSdPresLayoutDlg(weld::Window* pParent, ::sd::DrawDocShell* pDocShell, const SfxItemSet& rInAttrs) override;
384 virtual VclPtr<SfxAbstractTabDialog> CreateSdTabTemplateDlg(weld::Window* pParent, const SfxObjectShell* pDocShell, SfxStyleSheetBase& rStyleBase, SdrModel* pModel, SdrView* pView ) override;
385 virtual VclPtr<SfxAbstractDialog> CreatSdActionDialog(weld::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView) override;
386 virtual VclPtr<AbstractSdVectorizeDlg> CreateSdVectorizeDlg(weld::Window* pParent, const Bitmap& rBmp, ::sd::DrawDocShell* pDocShell) override;
387 virtual VclPtr<AbstractSdPublishingDlg> CreateSdPublishingDlg(vcl::Window* pWindow, DocumentType eDocType) override;
389 virtual VclPtr<VclAbstractDialog> CreateSdPhotoAlbumDialog(weld::Window* pWindow, SdDrawDocument* pDoc) override;
391 virtual VclPtr<VclAbstractDialog> CreateMasterLayoutDialog(weld::Window* pParent, SdDrawDocument* pDoc, SdPage*) override;
393 virtual VclPtr<AbstractHeaderFooterDialog> CreateHeaderFooterDialog( sd::ViewShell* pViewShell,
394 vcl::Window* pParent,
395 SdDrawDocument* pDoc,
396 SdPage* pCurrentPage ) override;
398 // For TabPage
399 virtual CreateTabPage GetSdOptionsContentsTabPageCreatorFunc() override;
400 virtual CreateTabPage GetSdPrintOptionsTabPageCreatorFunc() override;
401 virtual CreateTabPage GetSdOptionsMiscTabPageCreatorFunc() override;
402 virtual CreateTabPage GetSdOptionsSnapTabPageCreatorFunc() override;
406 #endif
408 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */