1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
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>
38 #include <dlgsnap.hxx>
39 #include <present.hxx>
40 #include <vectdlg.hxx>
41 #include <BulletAndPositionDlg.hxx>
47 // class HeaderFooterDialog;
48 // class MasterLayoutDialog;
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
;
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
;
72 explicit SdAbstractGenericDialog_Impl(std::unique_ptr
<weld::GenericDialogController
> p
)
73 : m_xDlg(std::move(p
))
76 virtual short Execute() override
;
79 virtual BitmapEx
createScreenshot() const override
;
80 virtual OUString
GetScreenshotId() const override
;
83 class AbstractMasterLayoutDialog_Impl
: public VclAbstractDialog
86 std::unique_ptr
<sd::MasterLayoutDialog
> m_xDlg
;
88 AbstractMasterLayoutDialog_Impl(std::unique_ptr
<::sd::MasterLayoutDialog
> pDlg
);
89 virtual short Execute() override
;
92 virtual BitmapEx
createScreenshot() const override
;
93 virtual OUString
GetScreenshotId() const override
;
96 class AbstractBreakDlg_Impl
: public VclAbstractDialog
99 std::unique_ptr
<sd::BreakDlg
> m_xDlg
;
101 AbstractBreakDlg_Impl(std::unique_ptr
<::sd::BreakDlg
> pDlg
);
102 virtual short Execute() override
;
105 virtual BitmapEx
createScreenshot() const override
;
106 virtual OUString
GetScreenshotId() const override
;
109 class AbstractCopyDlg_Impl
: public AbstractCopyDlg
112 std::unique_ptr
<sd::CopyDlg
> m_xDlg
;
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
;
122 virtual BitmapEx
createScreenshot() const override
;
123 virtual OUString
GetScreenshotId() const override
;
126 class AbstractSdCustomShowDlg_Impl
: public AbstractSdCustomShowDlg
129 std::unique_ptr
<SdCustomShowDlg
> m_xDlg
;
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
;
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
;
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
;
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
;
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
;
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
;
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
;
202 virtual BitmapEx
createScreenshot() const override
;
203 virtual OUString
GetScreenshotId() const override
;
206 class AbstractSdModifyFieldDlg_Impl
: public AbstractSdModifyFieldDlg
209 std::unique_ptr
<SdModifyFieldDlg
> m_xDlg
;
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
;
220 virtual BitmapEx
createScreenshot() const override
;
221 virtual OUString
GetScreenshotId() const override
;
224 class AbstractSdSnapLineDlg_Impl
: public AbstractSdSnapLineDlg
227 std::unique_ptr
<SdSnapLineDlg
> m_xDlg
;
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
;
241 virtual BitmapEx
createScreenshot() const override
;
242 virtual OUString
GetScreenshotId() const override
;
245 class AbstractSdInsertLayerDlg_Impl
: public AbstractSdInsertLayerDlg
248 std::unique_ptr
<SdInsertLayerDlg
> m_xDlg
;
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
;
259 virtual BitmapEx
createScreenshot() const override
;
260 virtual OUString
GetScreenshotId() const override
;
263 class AbstractSdInsertPagesObjsDlg_Impl
: public AbstractSdInsertPagesObjsDlg
266 std::unique_ptr
<SdInsertPagesObjsDlg
> m_xDlg
;
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
;
278 virtual BitmapEx
createScreenshot() const override
;
279 virtual OUString
GetScreenshotId() const override
;
282 class AbstractMorphDlg_Impl
: public AbstractMorphDlg
285 std::unique_ptr
<sd::MorphDlg
> m_xDlg
;
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
;
298 virtual BitmapEx
createScreenshot() const override
;
299 virtual OUString
GetScreenshotId() const override
;
302 class AbstractSdStartPresDlg_Impl
: public AbstractSdStartPresDlg
305 std::unique_ptr
<SdStartPresentationDlg
> m_xDlg
;
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
;
315 virtual BitmapEx
createScreenshot() const override
;
316 virtual OUString
GetScreenshotId() const override
;
319 class AbstractSdPresLayoutDlg_Impl
: public AbstractSdPresLayoutDlg
322 std::unique_ptr
<SdPresLayoutDlg
> m_xDlg
;
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
;
332 virtual BitmapEx
createScreenshot() const override
;
333 virtual OUString
GetScreenshotId() const override
;
336 class SdAbstractSfxDialog_Impl
: public SfxAbstractDialog
339 std::unique_ptr
<SfxSingleTabDialogController
> m_xDlg
;
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
353 std::unique_ptr
<SdVectorizeDlg
> m_xDlg
;
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
;
363 virtual BitmapEx
createScreenshot() const override
;
364 virtual OUString
GetScreenshotId() const override
;
367 class AbstractSdPublishingDlg_Impl
:public AbstractSdPublishingDlg
370 std::unique_ptr
<SdPublishingDlg
> m_xDlg
;
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
;
380 virtual BitmapEx
createScreenshot() const override
;
381 virtual OUString
GetScreenshotId() const override
;
384 class AbstractHeaderFooterDialog_Impl
:public AbstractHeaderFooterDialog
387 std::shared_ptr
<::sd::HeaderFooterDialog
> m_xDlg
;
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
;
397 virtual BitmapEx
createScreenshot() const override
;
398 virtual OUString
GetScreenshotId() const override
;
401 //AbstractDialogFactory_Impl implementations
402 class SdAbstractDialogFactory_Impl
: public SdAbstractDialogFactory
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
;
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: */