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::sun::star::linguistic2
{
46 class SvxSpellWrapper
;
47 enum class TransliterationFlags
;
51 class SvxHyperlinkTabPageBase
;
52 class SearchAttrItemList
;
56 class SvxSpellWrapper
;
57 struct FmSearchContext
;
59 typedef const sal_uInt16
* (*DialogGetRanges
)();
61 typedef ::std::vector
< OUString
> TargetList
;
63 namespace svx
{ class SpellDialogChildWindow
;}
69 class AbstractFmShowColsDialog
: public VclAbstractDialog
72 virtual ~AbstractFmShowColsDialog() override
= default;
74 virtual void SetColumns(const css::uno::Reference
< css::container::XIndexContainer
>& xCols
)= 0;
77 class AbstractSvxZoomDialog
: public VclAbstractDialog
80 virtual ~AbstractSvxZoomDialog() override
= default;
82 virtual void SetLimits( sal_uInt16 nMin
, sal_uInt16 nMax
) = 0;
83 virtual void HideButton( ZoomButtonId nBtnId
)= 0;
84 virtual const SfxItemSet
* GetOutputItemSet() const = 0 ;
87 class AbstractSpellDialog
: public VclAbstractDialog
90 virtual ~AbstractSpellDialog() override
= default;
92 virtual void InvalidateDialog() = 0;
93 virtual std::shared_ptr
<SfxDialogController
> GetController() = 0;
94 virtual SfxBindings
& GetBindings() = 0;
97 class AbstractTitleDialog
:public VclAbstractDialog
100 virtual ~AbstractTitleDialog() override
= default;
102 virtual OUString
GetTitle() const =0;
105 class AbstractGalleryIdDialog
:public VclAbstractDialog
108 virtual ~AbstractGalleryIdDialog() override
= default;
110 virtual sal_uInt32
GetId() const =0;
113 class AbstractURLDlg
:public VclAbstractDialog
116 virtual ~AbstractURLDlg() override
= default;
118 virtual OUString
GetURL() const = 0;
119 virtual OUString
GetAltText() const = 0;
120 virtual OUString
GetDesc() const = 0;
121 virtual OUString
GetTarget() const = 0;
122 virtual OUString
GetName() const = 0;
125 class AbstractSvxSearchSimilarityDialog
:public VclAbstractDialog
128 virtual ~AbstractSvxSearchSimilarityDialog() override
= default;
130 virtual sal_uInt16
GetOther() =0 ;
131 virtual sal_uInt16
GetShorter() =0 ;
132 virtual sal_uInt16
GetLonger() =0 ;
133 virtual bool IsRelaxed() =0 ;
136 class AbstractSvxJSearchOptionsDialog
:public VclAbstractDialog
139 virtual ~AbstractSvxJSearchOptionsDialog() override
= default;
141 virtual TransliterationFlags
GetTransliterationFlags() const = 0;
144 class AbstractFmInputRecordNoDialog
:public VclAbstractDialog
147 virtual ~AbstractFmInputRecordNoDialog() override
= default;
149 virtual void SetValue(tools::Long dNew
) = 0;
150 virtual tools::Long
GetValue() const = 0;
153 class AbstractSvxNewDictionaryDialog
:public VclAbstractDialog
156 virtual ~AbstractSvxNewDictionaryDialog() override
= default;
158 virtual css::uno::Reference
< css::linguistic2::XDictionary
> GetNewDictionary() = 0;
161 class AbstractSvxNameDialog
:public VclAbstractDialog
164 virtual ~AbstractSvxNameDialog() override
= default;
166 virtual void GetName( OUString
& rName
) = 0;
167 virtual void SetCheckNameHdl( const Link
<AbstractSvxNameDialog
&,bool>& rLink
, bool bCheckImmediately
= false ) = 0;
168 virtual void SetCheckNameTooltipHdl( const Link
<AbstractSvxNameDialog
&,OUString
>& rLink
) = 0;
169 virtual void SetEditHelpId(const OString
&) = 0;
171 virtual void SetHelpId( const OString
& ) = 0;
172 virtual void SetText( const OUString
& rStr
) = 0;
175 class AbstractSvxObjectNameDialog
:public VclAbstractDialog
178 virtual ~AbstractSvxObjectNameDialog() override
= default;
180 virtual void GetName(OUString
& rName
) = 0;
181 virtual void SetCheckNameHdl(const Link
<AbstractSvxObjectNameDialog
&,bool>& rLink
) = 0;
184 class AbstractSvxObjectTitleDescDialog
:public VclAbstractDialog
187 virtual ~AbstractSvxObjectTitleDescDialog() override
= default;
189 virtual void GetTitle(OUString
& rTitle
) = 0;
190 virtual void GetDescription(OUString
& rDescription
) = 0;
193 /// Abstract class provides the get information from the numbering and position dialog.
194 class AbstractSvxBulletAndPositionDlg
:public VclAbstractDialog
197 virtual ~AbstractSvxBulletAndPositionDlg() override
= default;
199 virtual const SfxItemSet
* GetOutputItemSet( SfxItemSet
* pSet
) const = 0 ;
200 virtual bool IsApplyToMaster() = 0;
201 virtual bool IsSlideScope() = 0;
204 class AbstractSvxMultiPathDialog
: public VclAbstractDialog
207 virtual ~AbstractSvxMultiPathDialog() override
= default;
209 virtual OUString
GetPath() const = 0;
210 virtual void SetPath( const OUString
& rPath
) = 0;
211 virtual void SetTitle( const OUString
& rNewTitle
) = 0;
214 class AbstractSvxHpLinkDlg
: public VclAbstractDialog
217 virtual ~AbstractSvxHpLinkDlg() override
= default;
219 virtual std::shared_ptr
<SfxDialogController
> GetController() = 0;
220 virtual bool QueryClose() = 0;
223 struct FmFoundRecordInformation
;
224 class AbstractFmSearchDialog
:public VclAbstractDialog
227 virtual ~AbstractFmSearchDialog() override
= default;
229 virtual void SetFoundHandler(const Link
<FmFoundRecordInformation
&,void>& lnk
) = 0;
230 virtual void SetCanceledNotFoundHdl(const Link
<FmFoundRecordInformation
&,void>& lnk
)=0;
231 virtual void SetActiveField(const OUString
& strField
)=0;
234 class AbstractGraphicFilterDialog
:public VclAbstractDialog
237 virtual ~AbstractGraphicFilterDialog() override
= default;
239 virtual Graphic
GetFilteredGraphic( const Graphic
& rGraphic
, double fScaleX
, double fScaleY
) = 0;
242 class AbstractSvxAreaTabDialog
:public SfxAbstractTabDialog
245 virtual ~AbstractSvxAreaTabDialog() override
= default;
248 struct SvxSwFrameValidation
;
249 class AbstractSvxTransformTabDialog
: public SfxAbstractTabDialog
252 virtual ~AbstractSvxTransformTabDialog() override
= default;
254 virtual void SetValidateFramePosLink( const Link
<SvxSwFrameValidation
&,void>& rLink
) = 0;
257 class AbstractSvxCaptionDialog
: public SfxAbstractTabDialog
260 virtual ~AbstractSvxCaptionDialog() override
= default;
262 virtual void SetValidateFramePosLink( const Link
<SvxSwFrameValidation
&,void>& rLink
) = 0;
265 class AbstractSvxPostItDialog
: public VclAbstractDialog
268 virtual ~AbstractSvxPostItDialog() override
= default;
270 virtual void SetText( const OUString
& rStr
) = 0; //From class Window
271 virtual const SfxItemSet
* GetOutputItemSet() const = 0;
272 virtual void SetPrevHdl( const Link
<AbstractSvxPostItDialog
&,void>& rLink
) = 0;
273 virtual void SetNextHdl( const Link
<AbstractSvxPostItDialog
&,void>& rLink
) = 0;
274 virtual void EnableTravel(bool bNext
, bool bPrev
) = 0;
275 virtual OUString
GetNote() = 0;
276 virtual void SetNote(const OUString
& rTxt
) = 0;
277 virtual void ShowLastAuthor(const OUString
& rAuthor
, const OUString
& rDate
) = 0;
278 virtual void DontChangeAuthor() = 0;
279 virtual void HideAuthor() = 0;
280 virtual std::shared_ptr
<weld::Dialog
> GetDialog() = 0;
283 class SvxAbstractSplitTableDialog
: public VclAbstractDialog
286 virtual ~SvxAbstractSplitTableDialog() override
= default;
288 virtual bool IsHorizontal() const = 0;
289 virtual bool IsProportional() const = 0;
290 virtual tools::Long
GetCount() const = 0;
291 virtual void SetSplitVerticalByDefault() = 0;
294 class SvxAbstractNewTableDialog
297 virtual ~SvxAbstractNewTableDialog() = default;
299 virtual sal_Int32
getRows() const = 0;
300 virtual sal_Int32
getColumns() const = 0;
301 virtual std::shared_ptr
<weld::DialogController
> getDialogController() = 0;
304 class SvxAbstractInsRowColDlg
: public VclAbstractDialog
307 virtual ~SvxAbstractInsRowColDlg() override
= default;
309 virtual bool isInsertBefore() const = 0;
310 virtual sal_uInt16
getInsertCount() const = 0;
313 class SVXCORE_DLLPUBLIC SvxAbstractDialogFactory
: public SfxAbstractDialogFactory
, public EditAbstractDialogFactory
316 static SvxAbstractDialogFactory
* Create();
318 virtual ~SvxAbstractDialogFactory() override
;
320 virtual VclPtr
<SfxAbstractTabDialog
> CreateTextTabDialog( weld::Window
* pParent
,
321 const SfxItemSet
* pAttrSet
,
322 SdrView
* pView
) = 0 ;
324 virtual VclPtr
<AbstractSvxCaptionDialog
> CreateCaptionDialog(weld::Window
* pParent
,
325 const SdrView
* pView
,
326 SvxAnchorIds nAnchorTypes
= SvxAnchorIds::NONE
) = 0;
328 virtual VclPtr
<AbstractFmShowColsDialog
> CreateFmShowColsDialog(weld::Window
* pParent
) = 0;
330 virtual VclPtr
<AbstractSvxZoomDialog
> CreateSvxZoomDialog(weld::Window
* pParent
, const SfxItemSet
& rCoreSet
) = 0;
332 virtual VclPtr
<AbstractSpellDialog
> CreateSvxSpellDialog(weld::Window
* pParent
,
333 SfxBindings
* pBindings
,
334 svx::SpellDialogChildWindow
* pSpellChildWindow
)=0;
336 virtual VclPtr
<VclAbstractDialog
> CreateActualizeProgressDialog(weld::Widget
* pParent
,
337 GalleryTheme
* pThm
) = 0;
338 virtual VclPtr
<AbstractTitleDialog
> CreateTitleDialog(weld::Widget
* pParent
,
339 const OUString
& rOldText
) = 0;
340 virtual VclPtr
<AbstractGalleryIdDialog
> CreateGalleryIdDialog(weld::Widget
* pParent
,
341 GalleryTheme
* pThm
) = 0;
342 virtual VclPtr
<VclAbstractDialog
> CreateGalleryThemePropertiesDialog(weld::Widget
* pParent
,
344 SfxItemSet
* pItemSet
) = 0;
346 virtual VclPtr
<AbstractURLDlg
> CreateURLDialog(weld::Widget
* pParent
,
347 const OUString
& rURL
, const OUString
& rAltText
, const OUString
& rDescription
,
348 const OUString
& rTarget
, const OUString
& rName
,
349 TargetList
& rTargetList
) = 0;
351 virtual VclPtr
<SfxAbstractTabDialog
> CreateTabItemDialog(weld::Window
* pParent
, const SfxItemSet
& rSet
) = 0;
352 virtual VclPtr
<VclAbstractDialog
> CreateSvxSearchAttributeDialog(weld::Window
* pParent
,
353 SearchAttrItemList
& rLst
,
354 const sal_uInt16
* pWhRanges
)=0;
355 virtual VclPtr
<AbstractSvxSearchSimilarityDialog
> CreateSvxSearchSimilarityDialog( weld::Window
* pParent
,
359 sal_uInt16 nLonger
) = 0;
360 // add for SvxBorderBackgroundDlg
361 virtual VclPtr
<SfxAbstractTabDialog
> CreateSvxBorderBackgroundDlg(
362 weld::Window
* pParent
,
363 const SfxItemSet
& rCoreSet
,
364 bool bEnableDrawingLayerFillStyles
) = 0;
366 virtual VclPtr
<AbstractSvxTransformTabDialog
> CreateSvxTransformTabDialog(weld::Window
* pParent
,
367 const SfxItemSet
* pAttr
,
368 const SdrView
* pView
,
369 SvxAnchorIds nAnchorTypes
= SvxAnchorIds::NONE
) = 0;
370 virtual VclPtr
<SfxAbstractTabDialog
> CreateSchTransformTabDialog(weld::Window
* pParent
,
371 const SfxItemSet
* pAttr
,
372 const SdrView
* pSdrView
,
373 bool bSizeTabPage
) = 0;
374 virtual VclPtr
<AbstractSvxJSearchOptionsDialog
> CreateSvxJSearchOptionsDialog(weld::Window
* pParent
,
375 const SfxItemSet
& rOptionsSet
,
376 TransliterationFlags nInitialFlags
) = 0;
377 virtual VclPtr
<AbstractFmInputRecordNoDialog
> CreateFmInputRecordNoDialog(weld::Window
* pParent
) = 0;
378 virtual VclPtr
<AbstractSvxNewDictionaryDialog
> CreateSvxNewDictionaryDialog(weld::Window
* pParent
) = 0;
379 virtual VclPtr
<VclAbstractDialog
> CreateSvxEditDictionaryDialog(weld::Window
* pParent
, const OUString
& rName
) = 0;
380 virtual VclPtr
<AbstractSvxNameDialog
> CreateSvxNameDialog(weld::Window
* pParent
,
381 const OUString
& rName
, const OUString
& rDesc
) = 0;
384 virtual VclPtr
<AbstractSvxObjectNameDialog
> CreateSvxObjectNameDialog(weld::Window
* pParent
, const OUString
& rName
) = 0;
385 virtual VclPtr
<AbstractSvxObjectTitleDescDialog
> CreateSvxObjectTitleDescDialog(weld::Window
* pParent
, const OUString
& rTitle
, const OUString
& rDescription
) = 0;
386 virtual VclPtr
<AbstractSvxMultiPathDialog
> CreateSvxMultiPathDialog(weld::Window
* pParent
) = 0 ;
387 virtual VclPtr
<AbstractSvxMultiPathDialog
> CreateSvxPathSelectDialog(weld::Window
* pParent
) = 0 ;
388 virtual VclPtr
<AbstractSvxHpLinkDlg
> CreateSvxHpLinkDlg(SfxChildWindow
* pChild
, SfxBindings
* pBindings
, weld::Window
* pParent
) = 0;
389 virtual VclPtr
<AbstractFmSearchDialog
> CreateFmSearchDialog(weld::Window
* pParent
,
390 const OUString
& strInitialText
,
391 const ::std::vector
< OUString
>& _rContexts
,
392 sal_Int16 nInitialContext
,
393 const Link
<FmSearchContext
&,sal_uInt32
>& lnkContextSupplier
)=0;
394 virtual VclPtr
<AbstractGraphicFilterDialog
> CreateGraphicFilterEmboss(weld::Window
* pParent
,
395 const Graphic
& rGraphic
)=0;
396 virtual VclPtr
<AbstractGraphicFilterDialog
> CreateGraphicFilterPoster(weld::Window
* pParent
,
397 const Graphic
& rGraphic
)=0;
398 virtual VclPtr
<AbstractGraphicFilterDialog
> CreateGraphicFilterSepia(weld::Window
* pParent
,
399 const Graphic
& rGraphic
)=0;
400 virtual VclPtr
<AbstractGraphicFilterDialog
> CreateGraphicFilterSmooth(weld::Window
* pParent
,
401 const Graphic
& rGraphic
,
403 virtual VclPtr
<AbstractGraphicFilterDialog
> CreateGraphicFilterSolarize(weld::Window
* pParent
,
404 const Graphic
& rGraphic
)=0;
405 virtual VclPtr
<AbstractGraphicFilterDialog
> CreateGraphicFilterMosaic(weld::Window
* pParent
,
406 const Graphic
& rGraphic
)=0;
407 virtual VclPtr
<AbstractSvxAreaTabDialog
> CreateSvxAreaTabDialog(weld::Window
* pParent
,
408 const SfxItemSet
* pAttr
,
411 virtual VclPtr
<SfxAbstractTabDialog
> CreateSvxLineTabDialog(weld::Window
* pParent
, const SfxItemSet
* pAttr
, //add forSvxLineTabDialog
413 const SdrObject
* pObj
,
415 virtual VclPtr
<SfxAbstractDialog
> CreateSfxDialog( weld::Window
* pParent
,
416 const SfxItemSet
& rAttr
,
417 const SdrView
* pView
,
418 sal_uInt32 nResId
)=0;
419 virtual VclPtr
<SfxAbstractDialog
> CreateCharMapDialog(weld::Window
* pParent
, const SfxItemSet
& rAttr
,
420 const css::uno::Reference
<css::frame::XFrame
>& rFrame
) = 0;
421 virtual VclPtr
<SfxAbstractDialog
> CreateEventConfigDialog(weld::Widget
* pParent
, const SfxItemSet
& rAttr
,
422 const css::uno::Reference
< css::frame::XFrame
>& rFrame
) = 0;
423 virtual VclPtr
<AbstractSvxPostItDialog
> CreateSvxPostItDialog(weld::Widget
* pParent
, const SfxItemSet
& rCoreSet
, bool bPrevNext
= false) = 0;
424 virtual VclPtr
<VclAbstractDialog
> CreateSvxScriptOrgDialog(weld::Window
* pParent
, const OUString
& rLanguage
) override
= 0;
426 virtual DialogGetRanges
GetDialogGetRangesFunc() = 0;
428 virtual VclPtr
<AbstractScriptSelectorDialog
> CreateScriptSelectorDialog(weld::Window
* pParent
,
429 const css::uno::Reference
< css::frame::XFrame
>& rxFrame
) override
= 0;
431 virtual void ShowAsyncScriptErrorDialog(weld::Window
* pParent
, const css::uno::Any
& rException
) override
= 0;
433 virtual VclPtr
<VclAbstractDialog
> CreateSvxMacroAssignDlg(
434 weld::Window
* _pParent
,
435 const css::uno::Reference
< css::frame::XFrame
>& _rxDocumentFrame
,
436 const bool _bUnoDialogMode
,
437 const css::uno::Reference
< css::container::XNameReplace
>& _rxEvents
,
438 const sal_uInt16 _nInitiallySelectedEvent
441 virtual VclPtr
<SfxAbstractTabDialog
> CreateSvxFormatCellsDialog(weld::Window
* pParent
, const SfxItemSet
* pAttr
, const SdrModel
& rModel
)=0;
443 virtual VclPtr
<SvxAbstractSplitTableDialog
> CreateSvxSplitTableDialog(weld::Window
* pParent
, bool bIsTableVertical
, tools::Long nMaxVertical
) = 0;
445 virtual std::shared_ptr
<SvxAbstractNewTableDialog
> CreateSvxNewTableDialog(weld::Window
* pParent
) = 0;
447 virtual VclPtr
<SvxAbstractInsRowColDlg
> CreateSvxInsRowColDlg(weld::Window
* pParent
, bool bCol
, const OString
& rHelpId
) = 0;
452 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */