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 .
19 #ifndef INCLUDED_SVX_SVXDLG_HXX
20 #define INCLUDED_SVX_SVXDLG_HXX
22 #include <sfx2/sfxdlg.hxx>
23 #include <svx/anchorid.hxx>
24 #include <svx/zoom_def.hxx>
25 #include <editeng/edtdlg.hxx>
27 #include <svx/dstribut_enum.hxx>
28 #include <com/sun/star/container/XIndexContainer.hpp>
29 #include <com/sun/star/container/XNameReplace.hpp>
30 #include <svx/svxdllapi.h>
37 namespace com
{namespace sun
{namespace star
{
38 namespace linguistic2
{
47 class SvxSpellWrapper
;
48 enum class TransliterationFlags
;
52 class SvxHyperlinkTabPageBase
;
53 class SearchAttrItemList
;
57 class SvxSpellWrapper
;
58 struct FmSearchContext
;
60 typedef const sal_uInt16
* (*DialogGetRanges
)();
62 typedef ::std::vector
< OUString
> TargetList
;
64 namespace svx
{ class SpellDialogChildWindow
;}
70 class AbstractTabController
73 virtual ~AbstractTabController() = default;
74 virtual bool StartExecuteAsync(VclAbstractDialog::AsyncContext
&rCtx
) = 0;
75 virtual void SetCurPageId( const OString
&rName
) = 0;
76 virtual const SfxItemSet
* GetOutputItemSet() const = 0;
79 class AbstractSvxDistributeDialog
:public VclAbstractDialog
82 virtual ~AbstractSvxDistributeDialog() override
= default;
84 virtual SvxDistributeHorizontal
GetDistributeHor() const = 0;
85 virtual SvxDistributeVertical
GetDistributeVer() const = 0;
88 class AbstractFmShowColsDialog
: public VclAbstractDialog
91 virtual ~AbstractFmShowColsDialog() override
= default;
93 virtual void SetColumns(const css::uno::Reference
< css::container::XIndexContainer
>& xCols
)= 0;
96 class AbstractSvxZoomDialog
: public VclAbstractDialog
99 virtual ~AbstractSvxZoomDialog() override
= default;
101 virtual void SetLimits( sal_uInt16 nMin
, sal_uInt16 nMax
) = 0;
102 virtual void HideButton( ZoomButtonId nBtnId
)= 0;
103 virtual const SfxItemSet
* GetOutputItemSet() const = 0 ;
106 class AbstractSpellDialog
: public VclAbstractDialog
109 virtual ~AbstractSpellDialog() override
= default;
111 virtual void InvalidateDialog() = 0;
112 virtual std::shared_ptr
<SfxDialogController
> GetController() = 0;
113 virtual SfxBindings
& GetBindings() = 0;
116 class AbstractTitleDialog
:public VclAbstractDialog
119 virtual ~AbstractTitleDialog() override
= default;
121 virtual OUString
GetTitle() const =0;
124 class AbstractGalleryIdDialog
:public VclAbstractDialog
127 virtual ~AbstractGalleryIdDialog() override
= default;
129 virtual sal_uInt32
GetId() const =0;
132 class AbstractURLDlg
:public VclAbstractDialog
135 virtual ~AbstractURLDlg() override
= default;
137 virtual OUString
GetURL() const = 0;
138 virtual OUString
GetAltText() const = 0;
139 virtual OUString
GetDesc() const = 0;
140 virtual OUString
GetTarget() const = 0;
141 virtual OUString
GetName() const = 0;
144 class AbstractSvxHlinkDlgMarkWnd
: public VclAbstractDialog
147 virtual ~AbstractSvxHlinkDlgMarkWnd() override
= default;
150 class AbstractSvxSearchSimilarityDialog
:public VclAbstractDialog
153 virtual ~AbstractSvxSearchSimilarityDialog() override
= default;
155 virtual sal_uInt16
GetOther() =0 ;
156 virtual sal_uInt16
GetShorter() =0 ;
157 virtual sal_uInt16
GetLonger() =0 ;
158 virtual bool IsRelaxed() =0 ;
161 class AbstractSvxJSearchOptionsDialog
:public VclAbstractDialog
164 virtual ~AbstractSvxJSearchOptionsDialog() override
= default;
166 virtual TransliterationFlags
GetTransliterationFlags() const = 0;
169 class AbstractFmInputRecordNoDialog
:public VclAbstractDialog
172 virtual ~AbstractFmInputRecordNoDialog() override
= default;
174 virtual void SetValue(long dNew
) = 0;
175 virtual long GetValue() const = 0;
178 class AbstractSvxNewDictionaryDialog
:public VclAbstractDialog
181 virtual ~AbstractSvxNewDictionaryDialog() override
= default;
183 virtual css::uno::Reference
< css::linguistic2::XDictionary
> GetNewDictionary() = 0;
186 class AbstractSvxNameDialog
:public VclAbstractDialog
189 virtual ~AbstractSvxNameDialog() override
= default;
191 virtual void GetName( OUString
& rName
) = 0;
192 virtual void SetCheckNameHdl( const Link
<AbstractSvxNameDialog
&,bool>& rLink
, bool bCheckImmediately
= false ) = 0;
193 virtual void SetEditHelpId(const OString
&) = 0;
195 virtual void SetHelpId( const OString
& ) = 0;
196 virtual void SetText( const OUString
& rStr
) = 0;
199 class AbstractSvxObjectNameDialog
:public VclAbstractDialog
202 virtual ~AbstractSvxObjectNameDialog() override
= default;
204 virtual void GetName(OUString
& rName
) = 0;
205 virtual void SetCheckNameHdl(const Link
<AbstractSvxObjectNameDialog
&,bool>& rLink
) = 0;
208 class AbstractSvxObjectTitleDescDialog
:public VclAbstractDialog
211 virtual ~AbstractSvxObjectTitleDescDialog() override
= default;
213 virtual void GetTitle(OUString
& rTitle
) = 0;
214 virtual void GetDescription(OUString
& rDescription
) = 0;
217 /// Abstract class provides the get information from the numbering and position dialog.
218 class AbstractSvxBulletAndPositionDlg
:public VclAbstractDialog
221 virtual ~AbstractSvxBulletAndPositionDlg() override
= default;
223 virtual const SfxItemSet
* GetOutputItemSet( SfxItemSet
* pSet
) const = 0 ;
224 virtual bool IsApplyToMaster() = 0;
225 virtual bool IsSlideScope() = 0;
228 class AbstractSvxMessDialog
: public VclAbstractDialog
231 virtual ~AbstractSvxMessDialog() override
= default;
234 class AbstractSvxMultiPathDialog
: public VclAbstractDialog
237 virtual ~AbstractSvxMultiPathDialog() override
= default;
239 virtual OUString
GetPath() const = 0;
240 virtual void SetPath( const OUString
& rPath
) = 0;
241 virtual void SetTitle( const OUString
& rNewTitle
) = 0;
244 class AbstractSvxHpLinkDlg
: public VclAbstractDialog
247 virtual ~AbstractSvxHpLinkDlg() override
= default;
249 virtual std::shared_ptr
<SfxDialogController
> GetController() = 0;
250 virtual bool QueryClose() = 0;
253 struct FmFoundRecordInformation
;
254 class AbstractFmSearchDialog
:public VclAbstractDialog
257 virtual ~AbstractFmSearchDialog() override
= default;
259 virtual void SetFoundHandler(const Link
<FmFoundRecordInformation
&,void>& lnk
) = 0;
260 virtual void SetCanceledNotFoundHdl(const Link
<FmFoundRecordInformation
&,void>& lnk
)=0;
261 virtual void SetActiveField(const OUString
& strField
)=0;
264 class AbstractGraphicFilterDialog
:public VclAbstractDialog
267 virtual ~AbstractGraphicFilterDialog() override
= default;
269 virtual Graphic
GetFilteredGraphic( const Graphic
& rGraphic
, double fScaleX
, double fScaleY
) = 0;
272 class AbstractSvxAreaTabDialog
:public SfxAbstractTabDialog
275 virtual ~AbstractSvxAreaTabDialog() override
= default;
278 struct SvxSwFrameValidation
;
279 class AbstractSvxTransformTabDialog
: public SfxAbstractTabDialog
282 virtual ~AbstractSvxTransformTabDialog() override
= default;
284 virtual void SetValidateFramePosLink( const Link
<SvxSwFrameValidation
&,void>& rLink
) = 0;
287 class AbstractSvxCaptionDialog
: public SfxAbstractTabDialog
290 virtual ~AbstractSvxCaptionDialog() override
= default;
292 virtual void SetValidateFramePosLink( const Link
<SvxSwFrameValidation
&,void>& rLink
) = 0;
295 class AbstractSvxPostItDialog
: public VclAbstractDialog
298 virtual ~AbstractSvxPostItDialog() override
= default;
300 virtual void SetText( const OUString
& rStr
) = 0; //From class Window
301 virtual const SfxItemSet
* GetOutputItemSet() const = 0;
302 virtual void SetPrevHdl( const Link
<AbstractSvxPostItDialog
&,void>& rLink
) = 0;
303 virtual void SetNextHdl( const Link
<AbstractSvxPostItDialog
&,void>& rLink
) = 0;
304 virtual void EnableTravel(bool bNext
, bool bPrev
) = 0;
305 virtual OUString
GetNote() = 0;
306 virtual void SetNote(const OUString
& rTxt
) = 0;
307 virtual void ShowLastAuthor(const OUString
& rAuthor
, const OUString
& rDate
) = 0;
308 virtual void DontChangeAuthor() = 0;
309 virtual void HideAuthor() = 0;
310 virtual std::shared_ptr
<weld::Dialog
> GetDialog() = 0;
313 class SvxAbstractSplitTableDialog
: public VclAbstractDialog
316 virtual ~SvxAbstractSplitTableDialog() override
= default;
318 virtual bool IsHorizontal() const = 0;
319 virtual bool IsProportional() const = 0;
320 virtual long GetCount() const = 0;
321 virtual void SetSplitVerticalByDefault() = 0;
324 class SvxAbstractNewTableDialog
327 virtual ~SvxAbstractNewTableDialog() = default;
329 virtual sal_Int32
getRows() const = 0;
330 virtual sal_Int32
getColumns() const = 0;
331 virtual std::shared_ptr
<weld::DialogController
> getDialogController() = 0;
334 class SvxAbstractInsRowColDlg
: public VclAbstractDialog
337 virtual ~SvxAbstractInsRowColDlg() override
= default;
339 virtual bool isInsertBefore() const = 0;
340 virtual sal_uInt16
getInsertCount() const = 0;
343 class SVX_DLLPUBLIC SvxAbstractDialogFactory
: public SfxAbstractDialogFactory
, public EditAbstractDialogFactory
346 static SvxAbstractDialogFactory
* Create();
348 virtual ~SvxAbstractDialogFactory() override
;
350 virtual VclPtr
<SfxAbstractTabDialog
> CreateTextTabDialog( weld::Window
* pParent
,
351 const SfxItemSet
* pAttrSet
,
352 SdrView
* pView
) = 0 ;
354 virtual VclPtr
<AbstractSvxCaptionDialog
> CreateCaptionDialog(weld::Window
* pParent
,
355 const SdrView
* pView
,
356 SvxAnchorIds nAnchorTypes
= SvxAnchorIds::NONE
) = 0;
358 virtual VclPtr
<AbstractSvxDistributeDialog
> CreateSvxDistributeDialog(weld::Window
* pParent
,
359 const SfxItemSet
& rAttr
)= 0;
361 virtual VclPtr
<AbstractFmShowColsDialog
> CreateFmShowColsDialog(weld::Window
* pParent
) = 0;
363 virtual VclPtr
<AbstractSvxZoomDialog
> CreateSvxZoomDialog(weld::Window
* pParent
, const SfxItemSet
& rCoreSet
) = 0;
365 virtual VclPtr
<AbstractSpellDialog
> CreateSvxSpellDialog(weld::Window
* pParent
,
366 SfxBindings
* pBindings
,
367 svx::SpellDialogChildWindow
* pSpellChildWindow
)=0;
369 virtual VclPtr
<VclAbstractDialog
> CreateActualizeProgressDialog(weld::Window
* pParent
,
370 GalleryTheme
* pThm
) = 0;
371 virtual VclPtr
<AbstractTitleDialog
> CreateTitleDialog(weld::Window
* pParent
,
372 const OUString
& rOldText
) = 0;
373 virtual VclPtr
<AbstractGalleryIdDialog
> CreateGalleryIdDialog(weld::Window
* pParent
,
374 GalleryTheme
* pThm
) = 0;
375 virtual VclPtr
<VclAbstractDialog
> CreateGalleryThemePropertiesDialog(weld::Window
* pParent
,
377 SfxItemSet
* pItemSet
) = 0;
378 virtual VclPtr
<AbstractURLDlg
> CreateURLDialog(weld::Widget
* pParent
,
379 const OUString
& rURL
, const OUString
& rAltText
, const OUString
& rDescription
,
380 const OUString
& rTarget
, const OUString
& rName
,
381 TargetList
& rTargetList
) = 0;
383 virtual VclPtr
<SfxAbstractTabDialog
> CreateTabItemDialog(weld::Window
* pParent
, const SfxItemSet
& rSet
) = 0;
384 virtual VclPtr
<VclAbstractDialog
> CreateSvxSearchAttributeDialog(weld::Window
* pParent
,
385 SearchAttrItemList
& rLst
,
386 const sal_uInt16
* pWhRanges
)=0;
387 virtual VclPtr
<AbstractSvxSearchSimilarityDialog
> CreateSvxSearchSimilarityDialog( weld::Window
* pParent
,
391 sal_uInt16 nLonger
) = 0;
392 // add for SvxBorderBackgroundDlg
393 virtual VclPtr
<SfxAbstractTabDialog
> CreateSvxBorderBackgroundDlg(
394 weld::Window
* pParent
,
395 const SfxItemSet
& rCoreSet
,
396 bool bEnableDrawingLayerFillStyles
) = 0;
398 virtual VclPtr
<AbstractSvxTransformTabDialog
> CreateSvxTransformTabDialog(weld::Window
* pParent
,
399 const SfxItemSet
* pAttr
,
400 const SdrView
* pView
,
401 SvxAnchorIds nAnchorTypes
= SvxAnchorIds::NONE
) = 0;
402 virtual VclPtr
<SfxAbstractTabDialog
> CreateSchTransformTabDialog(weld::Window
* pParent
,
403 const SfxItemSet
* pAttr
,
404 const SdrView
* pSdrView
,
405 bool bSizeTabPage
) = 0;
406 virtual VclPtr
<AbstractSvxJSearchOptionsDialog
> CreateSvxJSearchOptionsDialog(weld::Window
* pParent
,
407 const SfxItemSet
& rOptionsSet
,
408 TransliterationFlags nInitialFlags
) = 0;
409 virtual VclPtr
<AbstractFmInputRecordNoDialog
> CreateFmInputRecordNoDialog(weld::Window
* pParent
) = 0;
410 virtual VclPtr
<AbstractSvxNewDictionaryDialog
> CreateSvxNewDictionaryDialog(weld::Window
* pParent
) = 0;
411 virtual VclPtr
<VclAbstractDialog
> CreateSvxEditDictionaryDialog(weld::Window
* pParent
, const OUString
& rName
) = 0;
412 virtual VclPtr
<AbstractSvxNameDialog
> CreateSvxNameDialog(weld::Window
* pParent
,
413 const OUString
& rName
, const OUString
& rDesc
) = 0;
416 virtual VclPtr
<AbstractSvxObjectNameDialog
> CreateSvxObjectNameDialog(weld::Window
* pParent
, const OUString
& rName
) = 0;
417 virtual VclPtr
<AbstractSvxObjectTitleDescDialog
> CreateSvxObjectTitleDescDialog(weld::Window
* pParent
, const OUString
& rTitle
, const OUString
& rDescription
) = 0;
418 virtual VclPtr
<AbstractSvxMultiPathDialog
> CreateSvxMultiPathDialog(weld::Window
* pParent
) = 0 ;
419 virtual VclPtr
<AbstractSvxMultiPathDialog
> CreateSvxPathSelectDialog(weld::Window
* pParent
) = 0 ;
420 virtual VclPtr
<AbstractSvxHpLinkDlg
> CreateSvxHpLinkDlg(SfxChildWindow
* pChild
, SfxBindings
* pBindings
, weld::Window
* pParent
) = 0;
421 virtual VclPtr
<AbstractFmSearchDialog
> CreateFmSearchDialog(weld::Window
* pParent
,
422 const OUString
& strInitialText
,
423 const ::std::vector
< OUString
>& _rContexts
,
424 sal_Int16 nInitialContext
,
425 const Link
<FmSearchContext
&,sal_uInt32
>& lnkContextSupplier
)=0;
426 virtual VclPtr
<AbstractGraphicFilterDialog
> CreateGraphicFilterEmboss(weld::Window
* pParent
,
427 const Graphic
& rGraphic
)=0;
428 virtual VclPtr
<AbstractGraphicFilterDialog
> CreateGraphicFilterPoster(weld::Window
* pParent
,
429 const Graphic
& rGraphic
)=0;
430 virtual VclPtr
<AbstractGraphicFilterDialog
> CreateGraphicFilterSepia(weld::Window
* pParent
,
431 const Graphic
& rGraphic
)=0;
432 virtual VclPtr
<AbstractGraphicFilterDialog
> CreateGraphicFilterSmooth(weld::Window
* pParent
,
433 const Graphic
& rGraphic
,
435 virtual VclPtr
<AbstractGraphicFilterDialog
> CreateGraphicFilterSolarize(weld::Window
* pParent
,
436 const Graphic
& rGraphic
)=0;
437 virtual VclPtr
<AbstractGraphicFilterDialog
> CreateGraphicFilterMosaic(weld::Window
* pParent
,
438 const Graphic
& rGraphic
)=0;
439 virtual VclPtr
<AbstractSvxAreaTabDialog
> CreateSvxAreaTabDialog(weld::Window
* pParent
,
440 const SfxItemSet
* pAttr
,
443 virtual VclPtr
<SfxAbstractTabDialog
> CreateSvxLineTabDialog(weld::Window
* pParent
, const SfxItemSet
* pAttr
, //add forSvxLineTabDialog
445 const SdrObject
* pObj
,
447 virtual VclPtr
<SfxAbstractDialog
> CreateSfxDialog( weld::Window
* pParent
,
448 const SfxItemSet
& rAttr
,
449 const SdrView
* pView
,
450 sal_uInt32 nResId
)=0;
451 virtual VclPtr
<SfxAbstractDialog
> CreateCharMapDialog(weld::Window
* pParent
, const SfxItemSet
& rAttr
,
452 const css::uno::Reference
<css::frame::XFrame
>& rFrame
) = 0;
453 virtual VclPtr
<SfxAbstractDialog
> CreateEventConfigDialog(weld::Widget
* pParent
, const SfxItemSet
& rAttr
,
454 const css::uno::Reference
< css::frame::XFrame
>& rFrame
) = 0;
455 virtual VclPtr
<AbstractSvxPostItDialog
> CreateSvxPostItDialog(weld::Widget
* pParent
, const SfxItemSet
& rCoreSet
, bool bPrevNext
= false) = 0;
456 virtual VclPtr
<VclAbstractDialog
> CreateSvxScriptOrgDialog(weld::Window
* pParent
, const OUString
& rLanguage
) override
= 0;
458 virtual DialogGetRanges
GetDialogGetRangesFunc() = 0;
460 virtual VclPtr
<AbstractScriptSelectorDialog
> CreateScriptSelectorDialog(weld::Window
* pParent
,
461 const css::uno::Reference
< css::frame::XFrame
>& rxFrame
) override
= 0;
463 virtual VclPtr
<VclAbstractDialog
> CreateScriptErrorDialog(const css::uno::Any
& rException
) override
= 0;
465 virtual VclPtr
<VclAbstractDialog
> CreateSvxMacroAssignDlg(
466 weld::Window
* _pParent
,
467 const css::uno::Reference
< css::frame::XFrame
>& _rxDocumentFrame
,
468 const bool _bUnoDialogMode
,
469 const css::uno::Reference
< css::container::XNameReplace
>& _rxEvents
,
470 const sal_uInt16 _nInitiallySelectedEvent
473 virtual std::shared_ptr
<AbstractTabController
> CreateSvxFormatCellsDialog(weld::Window
* pParent
, const SfxItemSet
* pAttr
, const SdrModel
& rModel
)=0;
475 virtual VclPtr
<SvxAbstractSplitTableDialog
> CreateSvxSplitTableDialog(weld::Window
* pParent
, bool bIsTableVertical
, long nMaxVertical
) = 0;
477 virtual std::shared_ptr
<SvxAbstractNewTableDialog
> CreateSvxNewTableDialog(weld::Window
* pParent
) = 0;
479 virtual VclPtr
<SvxAbstractInsRowColDlg
> CreateSvxInsRowColDlg(weld::Window
* pParent
, bool bCol
, const OString
& rHelpId
) = 0;
484 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */