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 AbstractSvxDistributeDialog
:public VclAbstractDialog
73 virtual ~AbstractSvxDistributeDialog() override
= default;
75 virtual SvxDistributeHorizontal
GetDistributeHor() const = 0;
76 virtual SvxDistributeVertical
GetDistributeVer() const = 0;
79 class AbstractFmShowColsDialog
: public VclAbstractDialog
82 virtual ~AbstractFmShowColsDialog() override
= default;
84 virtual void SetColumns(const css::uno::Reference
< css::container::XIndexContainer
>& xCols
)= 0;
87 class AbstractSvxZoomDialog
: public VclAbstractDialog
90 virtual ~AbstractSvxZoomDialog() override
= default;
92 virtual void SetLimits( sal_uInt16 nMin
, sal_uInt16 nMax
) = 0;
93 virtual void HideButton( ZoomButtonId nBtnId
)= 0;
94 virtual const SfxItemSet
* GetOutputItemSet() const = 0 ;
97 class AbstractSpellDialog
: public VclAbstractDialog
100 virtual ~AbstractSpellDialog() override
= default;
102 virtual void InvalidateDialog() = 0;
103 virtual std::shared_ptr
<SfxDialogController
> GetController() = 0;
104 virtual SfxBindings
& GetBindings() = 0;
107 class AbstractTitleDialog
:public VclAbstractDialog
110 virtual ~AbstractTitleDialog() override
= default;
112 virtual OUString
GetTitle() const =0;
115 class AbstractGalleryIdDialog
:public VclAbstractDialog
118 virtual ~AbstractGalleryIdDialog() override
= default;
120 virtual sal_uInt32
GetId() const =0;
123 class AbstractURLDlg
:public VclAbstractDialog
126 virtual ~AbstractURLDlg() override
= default;
128 virtual OUString
GetURL() const = 0;
129 virtual OUString
GetAltText() const = 0;
130 virtual OUString
GetDesc() const = 0;
131 virtual OUString
GetTarget() const = 0;
132 virtual OUString
GetName() const = 0;
135 class AbstractSvxHlinkDlgMarkWnd
: public VclAbstractDialog
138 virtual ~AbstractSvxHlinkDlgMarkWnd() override
= default;
141 class AbstractSvxSearchSimilarityDialog
:public VclAbstractDialog
144 virtual ~AbstractSvxSearchSimilarityDialog() override
= default;
146 virtual sal_uInt16
GetOther() =0 ;
147 virtual sal_uInt16
GetShorter() =0 ;
148 virtual sal_uInt16
GetLonger() =0 ;
149 virtual bool IsRelaxed() =0 ;
152 class AbstractSvxJSearchOptionsDialog
:public VclAbstractDialog
155 virtual ~AbstractSvxJSearchOptionsDialog() override
= default;
157 virtual TransliterationFlags
GetTransliterationFlags() const = 0;
160 class AbstractFmInputRecordNoDialog
:public VclAbstractDialog
163 virtual ~AbstractFmInputRecordNoDialog() override
= default;
165 virtual void SetValue(long dNew
) = 0;
166 virtual long GetValue() const = 0;
169 class AbstractSvxNewDictionaryDialog
:public VclAbstractDialog
172 virtual ~AbstractSvxNewDictionaryDialog() override
= default;
174 virtual css::uno::Reference
< css::linguistic2::XDictionary
> GetNewDictionary() = 0;
177 class AbstractSvxNameDialog
:public VclAbstractDialog
180 virtual ~AbstractSvxNameDialog() override
= default;
182 virtual void GetName( OUString
& rName
) = 0;
183 virtual void SetCheckNameHdl( const Link
<AbstractSvxNameDialog
&,bool>& rLink
, bool bCheckImmediately
= false ) = 0;
184 virtual void SetEditHelpId(const OString
&) = 0;
186 virtual void SetHelpId( const OString
& ) = 0;
187 virtual void SetText( const OUString
& rStr
) = 0;
190 class AbstractSvxObjectNameDialog
:public VclAbstractDialog
193 virtual ~AbstractSvxObjectNameDialog() override
= default;
195 virtual void GetName(OUString
& rName
) = 0;
196 virtual void SetCheckNameHdl(const Link
<AbstractSvxObjectNameDialog
&,bool>& rLink
) = 0;
199 class AbstractSvxObjectTitleDescDialog
:public VclAbstractDialog
202 virtual ~AbstractSvxObjectTitleDescDialog() override
= default;
204 virtual void GetTitle(OUString
& rTitle
) = 0;
205 virtual void GetDescription(OUString
& rDescription
) = 0;
208 /// Abstract class provides the get information from the numbering and position dialog.
209 class AbstractSvxBulletAndPositionDlg
:public VclAbstractDialog
212 virtual ~AbstractSvxBulletAndPositionDlg() override
= default;
214 virtual const SfxItemSet
* GetOutputItemSet( SfxItemSet
* pSet
) const = 0 ;
215 virtual bool IsApplyToMaster() = 0;
216 virtual bool IsSlideScope() = 0;
219 class AbstractSvxMessDialog
: public VclAbstractDialog
222 virtual ~AbstractSvxMessDialog() override
= default;
225 class AbstractSvxMultiPathDialog
: public VclAbstractDialog
228 virtual ~AbstractSvxMultiPathDialog() override
= default;
230 virtual OUString
GetPath() const = 0;
231 virtual void SetPath( const OUString
& rPath
) = 0;
232 virtual void SetTitle( const OUString
& rNewTitle
) = 0;
235 class AbstractSvxHpLinkDlg
: public VclAbstractDialog
238 virtual ~AbstractSvxHpLinkDlg() override
= default;
240 virtual std::shared_ptr
<SfxDialogController
> GetController() = 0;
241 virtual bool QueryClose() = 0;
244 struct FmFoundRecordInformation
;
245 class AbstractFmSearchDialog
:public VclAbstractDialog
248 virtual ~AbstractFmSearchDialog() override
= default;
250 virtual void SetFoundHandler(const Link
<FmFoundRecordInformation
&,void>& lnk
) = 0;
251 virtual void SetCanceledNotFoundHdl(const Link
<FmFoundRecordInformation
&,void>& lnk
)=0;
252 virtual void SetActiveField(const OUString
& strField
)=0;
255 class AbstractGraphicFilterDialog
:public VclAbstractDialog
258 virtual ~AbstractGraphicFilterDialog() override
= default;
260 virtual Graphic
GetFilteredGraphic( const Graphic
& rGraphic
, double fScaleX
, double fScaleY
) = 0;
263 class AbstractSvxAreaTabDialog
:public SfxAbstractTabDialog
266 virtual ~AbstractSvxAreaTabDialog() override
= default;
269 struct SvxSwFrameValidation
;
270 class AbstractSvxTransformTabDialog
: public SfxAbstractTabDialog
273 virtual ~AbstractSvxTransformTabDialog() override
= default;
275 virtual void SetValidateFramePosLink( const Link
<SvxSwFrameValidation
&,void>& rLink
) = 0;
278 class AbstractSvxCaptionDialog
: public SfxAbstractTabDialog
281 virtual ~AbstractSvxCaptionDialog() override
= default;
283 virtual void SetValidateFramePosLink( const Link
<SvxSwFrameValidation
&,void>& rLink
) = 0;
286 class AbstractSvxPostItDialog
: public VclAbstractDialog
289 virtual ~AbstractSvxPostItDialog() override
= default;
291 virtual void SetText( const OUString
& rStr
) = 0; //From class Window
292 virtual const SfxItemSet
* GetOutputItemSet() const = 0;
293 virtual void SetPrevHdl( const Link
<AbstractSvxPostItDialog
&,void>& rLink
) = 0;
294 virtual void SetNextHdl( const Link
<AbstractSvxPostItDialog
&,void>& rLink
) = 0;
295 virtual void EnableTravel(bool bNext
, bool bPrev
) = 0;
296 virtual OUString
GetNote() = 0;
297 virtual void SetNote(const OUString
& rTxt
) = 0;
298 virtual void ShowLastAuthor(const OUString
& rAuthor
, const OUString
& rDate
) = 0;
299 virtual void DontChangeAuthor() = 0;
300 virtual void HideAuthor() = 0;
301 virtual std::shared_ptr
<weld::Dialog
> GetDialog() = 0;
304 class SvxAbstractSplitTableDialog
: public VclAbstractDialog
307 virtual ~SvxAbstractSplitTableDialog() override
= default;
309 virtual bool IsHorizontal() const = 0;
310 virtual bool IsProportional() const = 0;
311 virtual long GetCount() const = 0;
312 virtual void SetSplitVerticalByDefault() = 0;
315 class SvxAbstractNewTableDialog
: public VclAbstractDialog
318 virtual ~SvxAbstractNewTableDialog() override
= default;
320 virtual sal_Int32
getRows() const = 0;
321 virtual sal_Int32
getColumns() const = 0;
324 class SvxAbstractInsRowColDlg
: public VclAbstractDialog
327 virtual ~SvxAbstractInsRowColDlg() override
= default;
329 virtual bool isInsertBefore() const = 0;
330 virtual sal_uInt16
getInsertCount() const = 0;
333 class SVX_DLLPUBLIC SvxAbstractDialogFactory
: public SfxAbstractDialogFactory
, public EditAbstractDialogFactory
336 static SvxAbstractDialogFactory
* Create();
338 virtual ~SvxAbstractDialogFactory() override
;
340 virtual VclPtr
<SfxAbstractTabDialog
> CreateTextTabDialog( weld::Window
* pParent
,
341 const SfxItemSet
* pAttrSet
,
342 SdrView
* pView
) = 0 ;
344 virtual VclPtr
<AbstractSvxCaptionDialog
> CreateCaptionDialog(weld::Window
* pParent
,
345 const SdrView
* pView
,
346 SvxAnchorIds nAnchorTypes
= SvxAnchorIds::NONE
) = 0;
348 virtual VclPtr
<AbstractSvxDistributeDialog
> CreateSvxDistributeDialog(weld::Window
* pParent
,
349 const SfxItemSet
& rAttr
)= 0;
351 virtual VclPtr
<AbstractFmShowColsDialog
> CreateFmShowColsDialog(weld::Window
* pParent
) = 0;
353 virtual VclPtr
<AbstractSvxZoomDialog
> CreateSvxZoomDialog(weld::Window
* pParent
, const SfxItemSet
& rCoreSet
) = 0;
355 virtual VclPtr
<AbstractSpellDialog
> CreateSvxSpellDialog(weld::Window
* pParent
,
356 SfxBindings
* pBindings
,
357 svx::SpellDialogChildWindow
* pSpellChildWindow
)=0;
359 virtual VclPtr
<VclAbstractDialog
> CreateActualizeProgressDialog(weld::Window
* pParent
,
360 GalleryTheme
* pThm
) = 0;
361 virtual VclPtr
<AbstractTitleDialog
> CreateTitleDialog(weld::Window
* pParent
,
362 const OUString
& rOldText
) = 0;
363 virtual VclPtr
<AbstractGalleryIdDialog
> CreateGalleryIdDialog(weld::Window
* pParent
,
364 GalleryTheme
* pThm
) = 0;
365 virtual VclPtr
<VclAbstractDialog
> CreateGalleryThemePropertiesDialog(weld::Window
* pParent
,
367 SfxItemSet
* pItemSet
) = 0;
368 virtual VclPtr
<AbstractURLDlg
> CreateURLDialog(weld::Widget
* pParent
,
369 const OUString
& rURL
, const OUString
& rAltText
, const OUString
& rDescription
,
370 const OUString
& rTarget
, const OUString
& rName
,
371 TargetList
& rTargetList
) = 0;
373 virtual VclPtr
<SfxAbstractTabDialog
> CreateTabItemDialog(weld::Window
* pParent
, const SfxItemSet
& rSet
) = 0;
374 virtual VclPtr
<VclAbstractDialog
> CreateSvxSearchAttributeDialog(weld::Window
* pParent
,
375 SearchAttrItemList
& rLst
,
376 const sal_uInt16
* pWhRanges
)=0;
377 virtual VclPtr
<AbstractSvxSearchSimilarityDialog
> CreateSvxSearchSimilarityDialog( weld::Window
* pParent
,
381 sal_uInt16 nLonger
) = 0;
382 // add for SvxBorderBackgroundDlg
383 virtual VclPtr
<SfxAbstractTabDialog
> CreateSvxBorderBackgroundDlg(
384 weld::Window
* pParent
,
385 const SfxItemSet
& rCoreSet
,
386 bool bEnableDrawingLayerFillStyles
) = 0;
388 virtual VclPtr
<AbstractSvxTransformTabDialog
> CreateSvxTransformTabDialog(weld::Window
* pParent
,
389 const SfxItemSet
* pAttr
,
390 const SdrView
* pView
,
391 SvxAnchorIds nAnchorTypes
= SvxAnchorIds::NONE
) = 0;
392 virtual VclPtr
<SfxAbstractTabDialog
> CreateSchTransformTabDialog(weld::Window
* pParent
,
393 const SfxItemSet
* pAttr
,
394 const SdrView
* pSdrView
,
395 bool bSizeTabPage
) = 0;
396 virtual VclPtr
<AbstractSvxJSearchOptionsDialog
> CreateSvxJSearchOptionsDialog(weld::Window
* pParent
,
397 const SfxItemSet
& rOptionsSet
,
398 TransliterationFlags nInitialFlags
) = 0;
399 virtual VclPtr
<AbstractFmInputRecordNoDialog
> CreateFmInputRecordNoDialog(weld::Window
* pParent
) = 0;
400 virtual VclPtr
<AbstractSvxNewDictionaryDialog
> CreateSvxNewDictionaryDialog(weld::Window
* pParent
) = 0;
401 virtual VclPtr
<VclAbstractDialog
> CreateSvxEditDictionaryDialog(weld::Window
* pParent
, const OUString
& rName
) = 0;
402 virtual VclPtr
<AbstractSvxNameDialog
> CreateSvxNameDialog(weld::Window
* pParent
,
403 const OUString
& rName
, const OUString
& rDesc
) = 0;
406 virtual VclPtr
<AbstractSvxObjectNameDialog
> CreateSvxObjectNameDialog(weld::Window
* pParent
, const OUString
& rName
) = 0;
407 virtual VclPtr
<AbstractSvxObjectTitleDescDialog
> CreateSvxObjectTitleDescDialog(weld::Window
* pParent
, const OUString
& rTitle
, const OUString
& rDescription
) = 0;
408 virtual VclPtr
<AbstractSvxMultiPathDialog
> CreateSvxMultiPathDialog(weld::Window
* pParent
) = 0 ;
409 virtual VclPtr
<AbstractSvxMultiPathDialog
> CreateSvxPathSelectDialog(weld::Window
* pParent
) = 0 ;
410 virtual VclPtr
<AbstractSvxHpLinkDlg
> CreateSvxHpLinkDlg(SfxChildWindow
* pChild
, SfxBindings
* pBindings
, weld::Window
* pParent
) = 0;
411 virtual VclPtr
<AbstractFmSearchDialog
> CreateFmSearchDialog(weld::Window
* pParent
,
412 const OUString
& strInitialText
,
413 const ::std::vector
< OUString
>& _rContexts
,
414 sal_Int16 nInitialContext
,
415 const Link
<FmSearchContext
&,sal_uInt32
>& lnkContextSupplier
)=0;
416 virtual VclPtr
<AbstractGraphicFilterDialog
> CreateGraphicFilterEmboss(weld::Window
* pParent
,
417 const Graphic
& rGraphic
)=0;
418 virtual VclPtr
<AbstractGraphicFilterDialog
> CreateGraphicFilterPoster(weld::Window
* pParent
,
419 const Graphic
& rGraphic
)=0;
420 virtual VclPtr
<AbstractGraphicFilterDialog
> CreateGraphicFilterSepia(weld::Window
* pParent
,
421 const Graphic
& rGraphic
)=0;
422 virtual VclPtr
<AbstractGraphicFilterDialog
> CreateGraphicFilterSmooth(weld::Window
* pParent
,
423 const Graphic
& rGraphic
,
425 virtual VclPtr
<AbstractGraphicFilterDialog
> CreateGraphicFilterSolarize(weld::Window
* pParent
,
426 const Graphic
& rGraphic
)=0;
427 virtual VclPtr
<AbstractGraphicFilterDialog
> CreateGraphicFilterMosaic(weld::Window
* pParent
,
428 const Graphic
& rGraphic
)=0;
429 virtual VclPtr
<AbstractSvxAreaTabDialog
> CreateSvxAreaTabDialog(weld::Window
* pParent
,
430 const SfxItemSet
* pAttr
,
433 virtual VclPtr
<SfxAbstractTabDialog
> CreateSvxLineTabDialog(weld::Window
* pParent
, const SfxItemSet
* pAttr
, //add forSvxLineTabDialog
435 const SdrObject
* pObj
,
437 virtual VclPtr
<SfxAbstractDialog
> CreateSfxDialog( weld::Window
* pParent
,
438 const SfxItemSet
& rAttr
,
439 const SdrView
* pView
,
440 sal_uInt32 nResId
)=0;
441 virtual VclPtr
<SfxAbstractDialog
> CreateCharMapDialog(weld::Window
* pParent
, const SfxItemSet
& rAttr
,
442 const css::uno::Reference
<css::frame::XFrame
>& rFrame
) = 0;
443 virtual VclPtr
<SfxAbstractDialog
> CreateEventConfigDialog(weld::Widget
* pParent
, const SfxItemSet
& rAttr
,
444 const css::uno::Reference
< css::frame::XFrame
>& rFrame
) = 0;
445 virtual VclPtr
<AbstractSvxPostItDialog
> CreateSvxPostItDialog(weld::Widget
* pParent
, const SfxItemSet
& rCoreSet
, bool bPrevNext
= false) = 0;
446 virtual VclPtr
<VclAbstractDialog
> CreateSvxScriptOrgDialog(weld::Window
* pParent
, const OUString
& rLanguage
) override
= 0;
448 virtual DialogGetRanges
GetDialogGetRangesFunc() = 0;
450 virtual VclPtr
<AbstractScriptSelectorDialog
> CreateScriptSelectorDialog(weld::Window
* pParent
,
451 const css::uno::Reference
< css::frame::XFrame
>& rxFrame
) override
= 0;
453 virtual VclPtr
<VclAbstractDialog
> CreateScriptErrorDialog(const css::uno::Any
& rException
) override
= 0;
455 virtual VclPtr
<VclAbstractDialog
> CreateSvxMacroAssignDlg(
456 weld::Window
* _pParent
,
457 const css::uno::Reference
< css::frame::XFrame
>& _rxDocumentFrame
,
458 const bool _bUnoDialogMode
,
459 const css::uno::Reference
< css::container::XNameReplace
>& _rxEvents
,
460 const sal_uInt16 _nInitiallySelectedEvent
463 virtual VclPtr
<SfxAbstractTabDialog
> CreateSvxFormatCellsDialog(weld::Window
* pParent
, const SfxItemSet
* pAttr
, const SdrModel
& rModel
)=0;
465 virtual VclPtr
<SvxAbstractSplitTableDialog
> CreateSvxSplitTableDialog(weld::Window
* pParent
, bool bIsTableVertical
, long nMaxVertical
) = 0;
467 virtual VclPtr
<SvxAbstractNewTableDialog
> CreateSvxNewTableDialog(weld::Window
* pParent
) = 0;
469 virtual VclPtr
<SvxAbstractInsRowColDlg
> CreateSvxInsRowColDlg(weld::Window
* pParent
, bool bCol
, const OString
& rHelpId
) = 0;
474 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */