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 <com/sun/star/container/XIndexContainer.hpp>
28 #include <com/sun/star/container/XNameReplace.hpp>
29 #include <svx/svxdllapi.h>
36 namespace com::sun::star::linguistic2
{
45 class SvxSpellWrapper
;
46 enum class TransliterationFlags
;
50 class SvxHyperlinkTabPageBase
;
51 class SearchAttrItemList
;
55 class SvxSpellWrapper
;
56 struct FmSearchContext
;
58 typedef WhichRangesContainer (*DialogGetRanges
)();
60 typedef ::std::vector
< OUString
> TargetList
;
62 namespace svx
{ class SpellDialogChildWindow
;}
68 class AbstractFmShowColsDialog
: public VclAbstractDialog
71 virtual ~AbstractFmShowColsDialog() override
= default;
73 virtual void SetColumns(const css::uno::Reference
< css::container::XIndexContainer
>& xCols
)= 0;
76 class AbstractSvxZoomDialog
: public VclAbstractDialog
79 virtual ~AbstractSvxZoomDialog() override
= default;
81 virtual void SetLimits( sal_uInt16 nMin
, sal_uInt16 nMax
) = 0;
82 virtual void HideButton( ZoomButtonId nBtnId
)= 0;
83 virtual const SfxItemSet
* GetOutputItemSet() const = 0 ;
86 class AbstractSpellDialog
: public VclAbstractDialog
89 virtual ~AbstractSpellDialog() override
= default;
91 virtual void InvalidateDialog() = 0;
92 virtual std::shared_ptr
<SfxDialogController
> GetController() = 0;
93 virtual SfxBindings
& GetBindings() = 0;
96 class AbstractTitleDialog
:public VclAbstractDialog
99 virtual ~AbstractTitleDialog() override
= default;
101 virtual OUString
GetTitle() const =0;
104 class AbstractGalleryIdDialog
:public VclAbstractDialog
107 virtual ~AbstractGalleryIdDialog() override
= default;
109 virtual sal_uInt32
GetId() const =0;
112 class AbstractURLDlg
:public VclAbstractDialog
115 virtual ~AbstractURLDlg() override
= default;
117 virtual OUString
GetURL() const = 0;
118 virtual OUString
GetAltText() const = 0;
119 virtual OUString
GetDesc() const = 0;
120 virtual OUString
GetTarget() const = 0;
121 virtual OUString
GetName() const = 0;
124 class AbstractSvxSearchSimilarityDialog
:public VclAbstractDialog
127 virtual ~AbstractSvxSearchSimilarityDialog() override
= default;
129 virtual sal_uInt16
GetOther() =0 ;
130 virtual sal_uInt16
GetShorter() =0 ;
131 virtual sal_uInt16
GetLonger() =0 ;
132 virtual bool IsRelaxed() =0 ;
135 class AbstractSvxJSearchOptionsDialog
:public VclAbstractDialog
138 virtual ~AbstractSvxJSearchOptionsDialog() override
= default;
140 virtual TransliterationFlags
GetTransliterationFlags() const = 0;
143 class AbstractFmInputRecordNoDialog
:public VclAbstractDialog
146 virtual ~AbstractFmInputRecordNoDialog() override
= default;
148 virtual void SetValue(tools::Long dNew
) = 0;
149 virtual tools::Long
GetValue() const = 0;
152 class AbstractSvxNewDictionaryDialog
:public VclAbstractDialog
155 virtual ~AbstractSvxNewDictionaryDialog() override
= default;
157 virtual css::uno::Reference
< css::linguistic2::XDictionary
> GetNewDictionary() = 0;
160 class AbstractSvxNameDialog
: public VclAbstractDialog
163 virtual ~AbstractSvxNameDialog() override
= default;
165 virtual void GetName( OUString
& rName
) = 0;
166 virtual void SetCheckNameHdl( const Link
<AbstractSvxNameDialog
&,bool>& rLink
, bool bCheckImmediately
= false ) = 0;
167 virtual void SetCheckNameTooltipHdl( const Link
<AbstractSvxNameDialog
&,OUString
>& rLink
) = 0;
168 virtual void SetEditHelpId(const OUString
&) = 0;
169 virtual void SetHelpId( const OUString
& ) = 0;
170 virtual void SetText( const OUString
& rStr
) = 0;
173 class AbstractSvxObjectNameDialog
:public VclAbstractDialog
176 virtual ~AbstractSvxObjectNameDialog() override
= default;
178 virtual void GetName(OUString
& rName
) = 0;
179 virtual void SetCheckNameHdl(const Link
<AbstractSvxObjectNameDialog
&,bool>& rLink
) = 0;
182 class AbstractSvxObjectTitleDescDialog
:public VclAbstractDialog
185 virtual ~AbstractSvxObjectTitleDescDialog() override
= default;
187 virtual void GetTitle(OUString
& rTitle
) = 0;
188 virtual void GetDescription(OUString
& rDescription
) = 0;
189 virtual void IsDecorative(bool & rIsDecorative
) = 0;
192 /// Abstract class provides the get information from the numbering and position dialog.
193 class AbstractSvxBulletAndPositionDlg
:public VclAbstractDialog
196 virtual ~AbstractSvxBulletAndPositionDlg() override
= default;
198 virtual const SfxItemSet
* GetOutputItemSet( SfxItemSet
* pSet
) const = 0 ;
199 virtual bool IsApplyToMaster() = 0;
200 virtual bool IsSlideScope() = 0;
203 class AbstractSvxMultiPathDialog
: public VclAbstractDialog
206 virtual ~AbstractSvxMultiPathDialog() override
= default;
208 virtual OUString
GetPath() const = 0;
209 virtual void SetPath( const OUString
& rPath
) = 0;
210 virtual void SetTitle( const OUString
& rNewTitle
) = 0;
213 class AbstractSvxHpLinkDlg
: public VclAbstractDialog
216 virtual ~AbstractSvxHpLinkDlg() override
= default;
218 virtual std::shared_ptr
<SfxDialogController
> GetController() = 0;
219 virtual bool QueryClose() = 0;
222 struct FmFoundRecordInformation
;
223 class AbstractFmSearchDialog
:public VclAbstractDialog
226 virtual ~AbstractFmSearchDialog() override
= default;
228 virtual void SetFoundHandler(const Link
<FmFoundRecordInformation
&,void>& lnk
) = 0;
229 virtual void SetCanceledNotFoundHdl(const Link
<FmFoundRecordInformation
&,void>& lnk
)=0;
230 virtual void SetActiveField(const OUString
& strField
)=0;
233 class AbstractGraphicFilterDialog
:public VclAbstractDialog
236 virtual ~AbstractGraphicFilterDialog() override
= default;
238 virtual Graphic
GetFilteredGraphic( const Graphic
& rGraphic
, double fScaleX
, double fScaleY
) = 0;
241 class AbstractSvxAreaTabDialog
:public SfxAbstractTabDialog
244 virtual ~AbstractSvxAreaTabDialog() override
= default;
247 struct SvxSwFrameValidation
;
248 class AbstractSvxTransformTabDialog
: public SfxAbstractTabDialog
251 virtual ~AbstractSvxTransformTabDialog() override
= default;
253 virtual void SetValidateFramePosLink( const Link
<SvxSwFrameValidation
&,void>& rLink
) = 0;
256 class AbstractSvxCaptionDialog
: public SfxAbstractTabDialog
259 virtual ~AbstractSvxCaptionDialog() override
= default;
261 virtual void SetValidateFramePosLink( const Link
<SvxSwFrameValidation
&,void>& rLink
) = 0;
264 class AbstractSvxPostItDialog
: public VclAbstractDialog
267 virtual ~AbstractSvxPostItDialog() override
= default;
269 virtual void SetText( const OUString
& rStr
) = 0;
270 virtual const SfxItemSet
* GetOutputItemSet() const = 0;
271 virtual void SetPrevHdl( const Link
<AbstractSvxPostItDialog
&,void>& rLink
) = 0;
272 virtual void SetNextHdl( const Link
<AbstractSvxPostItDialog
&,void>& rLink
) = 0;
273 virtual void EnableTravel(bool bNext
, bool bPrev
) = 0;
274 virtual OUString
GetNote() = 0;
275 virtual void SetNote(const OUString
& rTxt
) = 0;
276 virtual void ShowLastAuthor(const OUString
& rAuthor
, const OUString
& rDate
) = 0;
277 virtual void DontChangeAuthor() = 0;
278 virtual void HideAuthor() = 0;
279 virtual std::shared_ptr
<weld::Dialog
> GetDialog() = 0;
282 class SvxAbstractSplitTableDialog
: public VclAbstractDialog
285 virtual ~SvxAbstractSplitTableDialog() override
= default;
287 virtual bool IsHorizontal() const = 0;
288 virtual bool IsProportional() const = 0;
289 virtual tools::Long
GetCount() const = 0;
290 virtual void SetSplitVerticalByDefault() = 0;
293 class SvxAbstractNewTableDialog
296 virtual ~SvxAbstractNewTableDialog() = default;
298 virtual sal_Int32
getRows() const = 0;
299 virtual sal_Int32
getColumns() const = 0;
300 virtual std::shared_ptr
<weld::DialogController
> getDialogController() = 0;
303 class SvxAbstractInsRowColDlg
: public VclAbstractDialog
306 virtual ~SvxAbstractInsRowColDlg() override
= default;
308 virtual bool isInsertBefore() const = 0;
309 virtual sal_uInt16
getInsertCount() const = 0;
312 class SVXCORE_DLLPUBLIC SvxAbstractDialogFactory
: public SfxAbstractDialogFactory
, public EditAbstractDialogFactory
315 static SvxAbstractDialogFactory
* Create();
317 virtual ~SvxAbstractDialogFactory() override
;
319 virtual VclPtr
<SfxAbstractTabDialog
> CreateTextTabDialog( weld::Window
* pParent
,
320 const SfxItemSet
* pAttrSet
,
321 SdrView
* pView
) = 0 ;
323 virtual VclPtr
<AbstractSvxCaptionDialog
> CreateCaptionDialog(weld::Window
* pParent
,
324 const SdrView
* pView
,
325 SvxAnchorIds nAnchorTypes
= SvxAnchorIds::NONE
) = 0;
327 virtual VclPtr
<AbstractFmShowColsDialog
> CreateFmShowColsDialog(weld::Window
* pParent
) = 0;
329 virtual VclPtr
<AbstractSvxZoomDialog
> CreateSvxZoomDialog(weld::Window
* pParent
, const SfxItemSet
& rCoreSet
) = 0;
331 virtual VclPtr
<AbstractSpellDialog
> CreateSvxSpellDialog(weld::Window
* pParent
,
332 SfxBindings
* pBindings
,
333 svx::SpellDialogChildWindow
* pSpellChildWindow
)=0;
335 virtual VclPtr
<VclAbstractDialog
> CreateActualizeProgressDialog(weld::Widget
* pParent
,
336 GalleryTheme
* pThm
) = 0;
337 virtual VclPtr
<AbstractTitleDialog
> CreateTitleDialog(weld::Widget
* pParent
,
338 const OUString
& rOldText
) = 0;
339 virtual VclPtr
<AbstractGalleryIdDialog
> CreateGalleryIdDialog(weld::Widget
* pParent
,
340 GalleryTheme
* pThm
) = 0;
341 virtual VclPtr
<VclAbstractDialog
> CreateGalleryThemePropertiesDialog(weld::Widget
* pParent
,
343 SfxItemSet
* pItemSet
) = 0;
345 virtual VclPtr
<AbstractURLDlg
> CreateURLDialog(weld::Widget
* pParent
,
346 const OUString
& rURL
, const OUString
& rAltText
, const OUString
& rDescription
,
347 const OUString
& rTarget
, const OUString
& rName
,
348 TargetList
& rTargetList
) = 0;
350 virtual VclPtr
<SfxAbstractTabDialog
> CreateTabItemDialog(weld::Window
* pParent
, const SfxItemSet
& rSet
) = 0;
351 virtual VclPtr
<VclAbstractDialog
> CreateSvxSearchAttributeDialog(weld::Window
* pParent
,
352 SearchAttrItemList
& rLst
,
353 const WhichRangesContainer
& pWhRanges
)=0;
354 virtual VclPtr
<AbstractSvxSearchSimilarityDialog
> CreateSvxSearchSimilarityDialog( weld::Window
* pParent
,
358 sal_uInt16 nLonger
) = 0;
359 // add for SvxBorderBackgroundDlg
360 virtual VclPtr
<SfxAbstractTabDialog
> CreateSvxBorderBackgroundDlg(
361 weld::Window
* pParent
,
362 const SfxItemSet
& rCoreSet
,
363 bool bEnableDrawingLayerFillStyles
) = 0;
365 virtual VclPtr
<AbstractSvxTransformTabDialog
> CreateSvxTransformTabDialog(weld::Window
* pParent
,
366 const SfxItemSet
* pAttr
,
367 const SdrView
* pView
,
368 SvxAnchorIds nAnchorTypes
= SvxAnchorIds::NONE
) = 0;
369 virtual VclPtr
<SfxAbstractTabDialog
> CreateSchTransformTabDialog(weld::Window
* pParent
,
370 const SfxItemSet
* pAttr
,
371 const SdrView
* pSdrView
,
372 bool bSizeTabPage
) = 0;
373 virtual VclPtr
<AbstractSvxJSearchOptionsDialog
> CreateSvxJSearchOptionsDialog(weld::Window
* pParent
,
374 const SfxItemSet
& rOptionsSet
,
375 TransliterationFlags nInitialFlags
) = 0;
376 virtual VclPtr
<AbstractFmInputRecordNoDialog
> CreateFmInputRecordNoDialog(weld::Window
* pParent
) = 0;
377 virtual VclPtr
<AbstractSvxNewDictionaryDialog
> CreateSvxNewDictionaryDialog(weld::Window
* pParent
) = 0;
378 virtual VclPtr
<VclAbstractDialog
> CreateSvxEditDictionaryDialog(weld::Window
* pParent
, const OUString
& rName
) = 0;
379 virtual VclPtr
<AbstractSvxNameDialog
> CreateSvxNameDialog(weld::Window
* pParent
,
380 const OUString
& rName
, const OUString
& rDesc
) = 0;
383 virtual VclPtr
<AbstractSvxObjectNameDialog
> CreateSvxObjectNameDialog(weld::Window
* pParent
, const OUString
& rName
) = 0;
384 virtual VclPtr
<AbstractSvxObjectTitleDescDialog
> CreateSvxObjectTitleDescDialog(weld::Window
* pParent
, const OUString
& rTitle
, const OUString
& rDescription
, bool isDecorative
) = 0;
385 virtual VclPtr
<AbstractSvxMultiPathDialog
> CreateSvxMultiPathDialog(weld::Window
* pParent
) = 0 ;
386 virtual VclPtr
<AbstractSvxMultiPathDialog
> CreateSvxPathSelectDialog(weld::Window
* pParent
) = 0 ;
387 virtual VclPtr
<AbstractSvxHpLinkDlg
> CreateSvxHpLinkDlg(SfxChildWindow
* pChild
, SfxBindings
* pBindings
, weld::Window
* pParent
) = 0;
388 virtual VclPtr
<AbstractFmSearchDialog
> CreateFmSearchDialog(weld::Window
* pParent
,
389 const OUString
& strInitialText
,
390 const ::std::vector
< OUString
>& _rContexts
,
391 sal_Int16 nInitialContext
,
392 const Link
<FmSearchContext
&,sal_uInt32
>& lnkContextSupplier
)=0;
393 virtual VclPtr
<AbstractGraphicFilterDialog
> CreateGraphicFilterEmboss(weld::Window
* pParent
,
394 const Graphic
& rGraphic
)=0;
395 virtual VclPtr
<AbstractGraphicFilterDialog
> CreateGraphicFilterPoster(weld::Window
* pParent
,
396 const Graphic
& rGraphic
)=0;
397 virtual VclPtr
<AbstractGraphicFilterDialog
> CreateGraphicFilterSepia(weld::Window
* pParent
,
398 const Graphic
& rGraphic
)=0;
399 virtual VclPtr
<AbstractGraphicFilterDialog
> CreateGraphicFilterSmooth(weld::Window
* pParent
,
400 const Graphic
& rGraphic
,
402 virtual VclPtr
<AbstractGraphicFilterDialog
> CreateGraphicFilterSolarize(weld::Window
* pParent
,
403 const Graphic
& rGraphic
)=0;
404 virtual VclPtr
<AbstractGraphicFilterDialog
> CreateGraphicFilterMosaic(weld::Window
* pParent
,
405 const Graphic
& rGraphic
)=0;
406 virtual VclPtr
<AbstractSvxAreaTabDialog
> CreateSvxAreaTabDialog(weld::Window
* pParent
,
407 const SfxItemSet
* pAttr
,
410 bool bSlideBackground
) = 0 ;
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
, bool bStyle
)=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 OUString
& rHelpId
) = 0;
452 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */