Update git submodules
[LibreOffice.git] / sd / source / ui / dlg / sddlgfact.hxx
blobb9dd75226841e3d52d080022eae69b025ea163c8
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 #pragma once
21 #include <sdabstdlg.hxx>
22 #include <sfx2/basedlgs.hxx>
23 #include <sfx2/sfxdlg.hxx>
24 #include <svx/svxdlg.hxx>
26 #include <morphdlg.hxx>
27 #include <copydlg.hxx>
28 #include <BreakDlg.hxx>
29 #include <headerfooterdlg.hxx>
30 #include <masterlayoutdlg.hxx>
31 #include <custsdlg.hxx>
32 #include <layeroptionsdlg.hxx>
33 #include <inspagob.hxx>
34 #include <dlgfield.hxx>
35 #include <sdpreslt.hxx>
36 #include <prltempl.hxx>
37 #include <pubdlg.hxx>
38 #include <dlgsnap.hxx>
39 #include <present.hxx>
40 #include <vectdlg.hxx>
41 #include <BulletAndPositionDlg.hxx>
43 //namespace sd {
44 // class MorphDlg;
45 // class CopyDlg;
46 // class BreakDlg;
47 // class HeaderFooterDialog;
48 // class MasterLayoutDialog;
49 //}
51 class SvxBulletAndPositionDlg;
53 /// Provides managing and getting information from the numbering and position dialog.
54 class AbstractSvxBulletAndPositionDlg_Impl :public AbstractSvxBulletAndPositionDlg
56 std::unique_ptr<SvxBulletAndPositionDlg> m_xDlg;
57 public:
58 explicit AbstractSvxBulletAndPositionDlg_Impl(std::unique_ptr<SvxBulletAndPositionDlg> p)
59 : m_xDlg(std::move(p))
62 virtual short Execute() override;
63 virtual const SfxItemSet* GetOutputItemSet( SfxItemSet* ) const override ;
64 virtual bool IsApplyToMaster() override;
65 virtual bool IsSlideScope() override;
68 class SdAbstractGenericDialog_Impl : public VclAbstractDialog
70 std::unique_ptr<weld::GenericDialogController> m_xDlg;
71 public:
72 explicit SdAbstractGenericDialog_Impl(std::unique_ptr<weld::GenericDialogController> p)
73 : m_xDlg(std::move(p))
76 virtual short Execute() override;
78 // screenshotting
79 virtual BitmapEx createScreenshot() const override;
80 virtual OUString GetScreenshotId() const override;
83 class AbstractMasterLayoutDialog_Impl : public VclAbstractDialog
85 private:
86 std::unique_ptr<sd::MasterLayoutDialog> m_xDlg;
87 public:
88 AbstractMasterLayoutDialog_Impl(std::unique_ptr<::sd::MasterLayoutDialog> pDlg);
89 virtual short Execute() override;
91 // screenshotting
92 virtual BitmapEx createScreenshot() const override;
93 virtual OUString GetScreenshotId() const override;
96 class AbstractBreakDlg_Impl : public VclAbstractDialog
98 private:
99 std::unique_ptr<sd::BreakDlg> m_xDlg;
100 public:
101 AbstractBreakDlg_Impl(std::unique_ptr<::sd::BreakDlg> pDlg);
102 virtual short Execute() override;
104 // screenshotting
105 virtual BitmapEx createScreenshot() const override;
106 virtual OUString GetScreenshotId() const override;
109 class AbstractCopyDlg_Impl : public AbstractCopyDlg
111 private:
112 std::unique_ptr<sd::CopyDlg> m_xDlg;
113 public:
114 AbstractCopyDlg_Impl(std::unique_ptr<::sd::CopyDlg> pDlg)
115 : m_xDlg(std::move(pDlg))
118 virtual short Execute() override;
119 virtual void GetAttr( SfxItemSet& rOutAttrs ) override;
121 // screenshotting
122 virtual BitmapEx createScreenshot() const override;
123 virtual OUString GetScreenshotId() const override;
126 class AbstractSdCustomShowDlg_Impl : public AbstractSdCustomShowDlg
128 private:
129 std::unique_ptr<SdCustomShowDlg> m_xDlg;
130 public:
131 AbstractSdCustomShowDlg_Impl(std::unique_ptr<SdCustomShowDlg> pDlg)
132 : m_xDlg(std::move(pDlg))
135 virtual short Execute() override;
136 virtual bool IsCustomShow() const override ;
138 // screenshotting
139 virtual BitmapEx createScreenshot() const override;
140 virtual OUString GetScreenshotId() const override;
143 class SdAbstractTabController_Impl : public SfxAbstractTabDialog
145 std::shared_ptr<SfxTabDialogController> m_xDlg;
146 public:
147 explicit SdAbstractTabController_Impl(std::shared_ptr<SfxTabDialogController> p)
148 : m_xDlg(std::move(p))
151 virtual short Execute() override;
152 virtual bool StartExecuteAsync(AsyncContext &rCtx) override;
153 virtual void SetCurPageId( const OUString &rName ) override;
154 virtual const SfxItemSet* GetOutputItemSet() const override;
155 virtual WhichRangesContainer GetInputRanges( const SfxItemPool& pItem ) override;
156 virtual void SetInputSet( const SfxItemSet* pInSet ) override;
157 virtual void SetText( const OUString& rStr ) override;
159 // screenshotting
160 virtual BitmapEx createScreenshot() const override;
161 virtual OUString GetScreenshotId() const override;
164 class AbstractBulletDialog_Impl : public SfxAbstractTabDialog
166 std::shared_ptr<SfxTabDialogController> m_xDlg;
167 public:
168 explicit AbstractBulletDialog_Impl(std::shared_ptr<SfxTabDialogController> p)
169 : m_xDlg(std::move(p))
172 virtual short Execute() override;
173 virtual bool StartExecuteAsync(AsyncContext &rCtx) override;
174 virtual void SetCurPageId( const OUString& rName ) override;
175 virtual const SfxItemSet* GetOutputItemSet() const override;
176 virtual WhichRangesContainer GetInputRanges( const SfxItemPool& pItem ) override;
177 virtual void SetInputSet( const SfxItemSet* pInSet ) override;
178 virtual void SetText( const OUString& rStr ) override;
180 // screenshotting
181 virtual BitmapEx createScreenshot() const override;
182 virtual OUString GetScreenshotId() const override;
185 class SdPresLayoutTemplateDlg_Impl : public SfxAbstractTabDialog
187 std::shared_ptr<SdPresLayoutTemplateDlg> m_xDlg;
188 public:
189 explicit SdPresLayoutTemplateDlg_Impl(std::shared_ptr<SdPresLayoutTemplateDlg> p)
190 : m_xDlg(std::move(p))
193 virtual short Execute() override;
194 virtual bool StartExecuteAsync(AsyncContext &rCtx) override;
195 virtual void SetCurPageId( const OUString& rName ) override;
196 virtual const SfxItemSet* GetOutputItemSet() const override;
197 virtual WhichRangesContainer GetInputRanges( const SfxItemPool& pItem ) override;
198 virtual void SetInputSet( const SfxItemSet* pInSet ) override;
199 virtual void SetText( const OUString& rStr ) override;
201 // screenshotting
202 virtual BitmapEx createScreenshot() const override;
203 virtual OUString GetScreenshotId() const override;
206 class AbstractSdModifyFieldDlg_Impl : public AbstractSdModifyFieldDlg
208 private:
209 std::unique_ptr<SdModifyFieldDlg> m_xDlg;
210 public:
211 AbstractSdModifyFieldDlg_Impl(std::unique_ptr<SdModifyFieldDlg> pDlg)
212 : m_xDlg(std::move(pDlg))
215 virtual short Execute() override;
216 virtual SvxFieldData* GetField() override;
217 virtual SfxItemSet GetItemSet() override;
219 // screenshotting
220 virtual BitmapEx createScreenshot() const override;
221 virtual OUString GetScreenshotId() const override;
224 class AbstractSdSnapLineDlg_Impl : public AbstractSdSnapLineDlg
226 private:
227 std::unique_ptr<SdSnapLineDlg> m_xDlg;
228 public:
229 AbstractSdSnapLineDlg_Impl(std::unique_ptr<SdSnapLineDlg> pDlg)
230 : m_xDlg(std::move(pDlg))
233 virtual short Execute() override;
234 virtual void GetAttr(SfxItemSet& rOutAttrs) override;
235 virtual void HideRadioGroup() override;
236 virtual void HideDeleteBtn() override;
237 virtual void SetInputFields(bool bEnableX, bool bEnableY) override;
238 virtual void SetText( const OUString& rStr ) override;
240 // screenshotting
241 virtual BitmapEx createScreenshot() const override;
242 virtual OUString GetScreenshotId() const override;
245 class AbstractSdInsertLayerDlg_Impl : public AbstractSdInsertLayerDlg
247 private:
248 std::unique_ptr<SdInsertLayerDlg> m_xDlg;
249 public:
250 AbstractSdInsertLayerDlg_Impl(std::unique_ptr<SdInsertLayerDlg> pDlg)
251 : m_xDlg(std::move(pDlg))
254 virtual short Execute() override;
255 virtual void GetAttr( SfxItemSet& rOutAttrs ) override ;
256 virtual void SetHelpId( const OUString& rHelpId ) override ;
258 // screenshotting
259 virtual BitmapEx createScreenshot() const override;
260 virtual OUString GetScreenshotId() const override;
263 class AbstractSdInsertPagesObjsDlg_Impl : public AbstractSdInsertPagesObjsDlg
265 private:
266 std::unique_ptr<SdInsertPagesObjsDlg> m_xDlg;
267 public:
268 AbstractSdInsertPagesObjsDlg_Impl(std::unique_ptr<SdInsertPagesObjsDlg> pDlg)
269 : m_xDlg(std::move(pDlg))
272 virtual short Execute() override;
273 virtual std::vector<OUString> GetList ( const sal_uInt16 nType ) override;
274 virtual bool IsLink() override;
275 virtual bool IsRemoveUnnecessaryMasterPages() const override;
277 // screenshotting
278 virtual BitmapEx createScreenshot() const override;
279 virtual OUString GetScreenshotId() const override;
282 class AbstractMorphDlg_Impl : public AbstractMorphDlg
284 private:
285 std::unique_ptr<sd::MorphDlg> m_xDlg;
286 public:
287 AbstractMorphDlg_Impl(std::unique_ptr<::sd::MorphDlg> pDlg)
288 : m_xDlg(std::move(pDlg))
291 virtual short Execute() override;
292 virtual void SaveSettings() const override;
293 virtual sal_uInt16 GetFadeSteps() const override;
294 virtual bool IsAttributeFade() const override ;
295 virtual bool IsOrientationFade() const override ;
297 // screenshotting
298 virtual BitmapEx createScreenshot() const override;
299 virtual OUString GetScreenshotId() const override;
302 class AbstractSdStartPresDlg_Impl : public AbstractSdStartPresDlg
304 private:
305 std::unique_ptr<SdStartPresentationDlg> m_xDlg;
306 public:
307 AbstractSdStartPresDlg_Impl(std::unique_ptr<SdStartPresentationDlg> pDlg)
308 : m_xDlg(std::move(pDlg))
311 virtual short Execute() override;
312 virtual void GetAttr( SfxItemSet& rOutAttrs ) override;
314 // screenshotting
315 virtual BitmapEx createScreenshot() const override;
316 virtual OUString GetScreenshotId() const override;
319 class AbstractSdPresLayoutDlg_Impl : public AbstractSdPresLayoutDlg
321 private:
322 std::unique_ptr<SdPresLayoutDlg> m_xDlg;
323 public:
324 AbstractSdPresLayoutDlg_Impl(std::unique_ptr<SdPresLayoutDlg> pDlg)
325 : m_xDlg(std::move(pDlg))
328 virtual short Execute() override;
329 virtual void GetAttr(SfxItemSet& rOutAttrs) override;
331 // screenshotting
332 virtual BitmapEx createScreenshot() const override;
333 virtual OUString GetScreenshotId() const override;
336 class SdAbstractSfxDialog_Impl : public SfxAbstractDialog
338 private:
339 std::unique_ptr<SfxSingleTabDialogController> m_xDlg;
340 public:
341 SdAbstractSfxDialog_Impl(std::unique_ptr<SfxSingleTabDialogController> pDlg)
342 : m_xDlg(std::move(pDlg))
345 virtual short Execute() override;
346 virtual const SfxItemSet* GetOutputItemSet() const override;
347 virtual void SetText( const OUString& rStr ) override;
350 class AbstractSdVectorizeDlg_Impl :public AbstractSdVectorizeDlg
352 private:
353 std::unique_ptr<SdVectorizeDlg> m_xDlg;
354 public:
355 AbstractSdVectorizeDlg_Impl(std::unique_ptr<SdVectorizeDlg> pDlg)
356 : m_xDlg(std::move(pDlg))
359 virtual short Execute() override;
360 virtual const GDIMetaFile& GetGDIMetaFile() const override ;
362 // screenshotting
363 virtual BitmapEx createScreenshot() const override;
364 virtual OUString GetScreenshotId() const override;
367 class AbstractSdPublishingDlg_Impl :public AbstractSdPublishingDlg
369 private:
370 std::unique_ptr<SdPublishingDlg> m_xDlg;
371 public:
372 AbstractSdPublishingDlg_Impl(std::unique_ptr<SdPublishingDlg> pDlg)
373 : m_xDlg(std::move(pDlg))
376 virtual short Execute() override;
377 virtual void GetParameterSequence( css::uno::Sequence< css::beans::PropertyValue >& rParams ) override;
379 // screenshotting
380 virtual BitmapEx createScreenshot() const override;
381 virtual OUString GetScreenshotId() const override;
384 class AbstractHeaderFooterDialog_Impl :public AbstractHeaderFooterDialog
386 private:
387 std::shared_ptr<::sd::HeaderFooterDialog> m_xDlg;
388 public:
389 AbstractHeaderFooterDialog_Impl(std::shared_ptr<::sd::HeaderFooterDialog> pDlg)
390 : m_xDlg(std::move(pDlg))
393 virtual short Execute() override;
394 virtual bool StartExecuteAsync(AsyncContext &rCtx) override;
396 // screenshotting
397 virtual BitmapEx createScreenshot() const override;
398 virtual OUString GetScreenshotId() const override;
401 //AbstractDialogFactory_Impl implementations
402 class SdAbstractDialogFactory_Impl : public SdAbstractDialogFactory
405 public:
406 virtual ~SdAbstractDialogFactory_Impl() {}
408 virtual VclPtr<AbstractSvxBulletAndPositionDlg> CreateSvxBulletAndPositionDlg(weld::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView) override;
409 virtual VclPtr<VclAbstractDialog> CreateBreakDlg(weld::Window* pWindow, ::sd::DrawView* pDrView, ::sd::DrawDocShell* pShell, sal_uLong nSumActionCount, sal_uLong nObjCount) override;
410 virtual VclPtr<AbstractCopyDlg> CreateCopyDlg(weld::Window* pParent, const SfxItemSet& rInAttrs, ::sd::View* pView) override;
411 virtual VclPtr<AbstractSdCustomShowDlg> CreateSdCustomShowDlg(weld::Window* pParent, SdDrawDocument& rDrawDoc) override;
412 virtual VclPtr<SfxAbstractTabDialog> CreateSdTabCharDialog(weld::Window* pWindow, const SfxItemSet* pAttr, SfxObjectShell* pDocShell) override;
413 virtual VclPtr<SfxAbstractTabDialog> CreateSdTabPageDialog(weld::Window* pWindow, const SfxItemSet* pAttr, SfxObjectShell* pDocShell, bool bAreaPage, bool bIsImpressDoc, bool bIsImpressMaster) override;
414 virtual VclPtr<AbstractSdModifyFieldDlg> CreateSdModifyFieldDlg(weld::Window* pWindow, const SvxFieldData* pInField, const SfxItemSet& rSet) override;
415 virtual VclPtr<AbstractSdSnapLineDlg> CreateSdSnapLineDlg(weld::Window* pParent, const SfxItemSet& rInAttrs, ::sd::View* pView) override;
416 virtual VclPtr<AbstractSdInsertLayerDlg> CreateSdInsertLayerDlg(weld::Window* pParent, const SfxItemSet& rInAttrs, bool bDeletable, const OUString& aStr) override;
417 virtual VclPtr<AbstractSdInsertPagesObjsDlg> CreateSdInsertPagesObjsDlg(weld::Window* pParent, const SdDrawDocument* pDoc, SfxMedium* pSfxMedium, const OUString& rFileName ) override;
418 virtual VclPtr<AbstractMorphDlg> CreateMorphDlg(weld::Window* pParent, const SdrObject* pObj1, const SdrObject* pObj2) override;
419 virtual VclPtr<SfxAbstractTabDialog> CreateSdOutlineBulletTabDlg(weld::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView) override;
420 virtual VclPtr<SfxAbstractTabDialog> CreateSdParagraphTabDlg(weld::Window* pParent, const SfxItemSet* pAttr) override;
421 virtual VclPtr<AbstractSdStartPresDlg> CreateSdStartPresentationDlg(weld::Window* pWindow, const SfxItemSet& rInAttrs,
422 const std::vector<OUString> &rPageNames, SdCustomShowList* pCSList ) override;
423 virtual VclPtr<VclAbstractDialog> CreateRemoteDialog(weld::Window* pWindow) override; // add for RemoteDialog
424 virtual VclPtr<SfxAbstractTabDialog> CreateSdPresLayoutTemplateDlg(SfxObjectShell* pDocSh, weld::Window* pParent, bool bBackgroundDlg, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool) override;
425 virtual VclPtr<AbstractSdPresLayoutDlg> CreateSdPresLayoutDlg(weld::Window* pParent, ::sd::DrawDocShell* pDocShell, const SfxItemSet& rInAttrs) override;
426 virtual VclPtr<SfxAbstractTabDialog> CreateSdTabTemplateDlg(weld::Window* pParent, const SfxObjectShell* pDocShell, SfxStyleSheetBase& rStyleBase, SdrModel* pModel, SdrView* pView ) override;
427 virtual VclPtr<SfxAbstractDialog> CreatSdActionDialog(weld::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView) override;
428 virtual VclPtr<AbstractSdVectorizeDlg> CreateSdVectorizeDlg(weld::Window* pParent, const Bitmap& rBmp, ::sd::DrawDocShell* pDocShell) override;
429 virtual VclPtr<AbstractSdPublishingDlg> CreateSdPublishingDlg(weld::Window* pWindow, DocumentType eDocType) override;
431 virtual VclPtr<VclAbstractDialog> CreateSdPhotoAlbumDialog(weld::Window* pWindow, SdDrawDocument* pDoc) override;
433 virtual VclPtr<VclAbstractDialog> CreateMasterLayoutDialog(weld::Window* pParent, SdDrawDocument* pDoc, SdPage*) override;
435 virtual VclPtr<AbstractHeaderFooterDialog> CreateHeaderFooterDialog(sd::ViewShell* pViewShell,
436 weld::Window* pParent,
437 SdDrawDocument* pDoc,
438 SdPage* pCurrentPage) override;
440 // For TabPage
441 virtual CreateTabPage GetSdOptionsContentsTabPageCreatorFunc() override;
442 virtual CreateTabPage GetSdPrintOptionsTabPageCreatorFunc() override;
443 virtual CreateTabPage GetSdOptionsMiscTabPageCreatorFunc() override;
444 virtual CreateTabPage GetSdOptionsSnapTabPageCreatorFunc() override;
448 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */