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 <svx/rectenum.hxx>
29 #include <com/sun/star/container/XIndexContainer.hpp>
30 #include <com/sun/star/container/XNameReplace.hpp>
31 #include <svx/svxdllapi.h>
34 namespace com
{namespace sun
{namespace star
{
35 namespace linguistic2
{
44 class SvxSpellWrapper
;
45 enum class TransliterationFlags
;
49 class SvxHyperlinkTabPageBase
;
50 class SearchAttrItemList
;
54 class SvxSpellWrapper
;
55 struct FmSearchContext
;
57 typedef VclPtr
<SfxTabPage
> (*CreateSvxDistributePage
)(vcl::Window
*pParent
, const SfxItemSet
&rAttrSet
, SvxDistributeHorizontal eHor
, SvxDistributeVertical eVer
);
58 typedef const sal_uInt16
* (*DialogGetRanges
)();
60 typedef ::std::vector
< OUString
> TargetList
;
62 namespace svx
{ class SpellDialogChildWindow
;}
64 class AbstractSvxDistributeDialog
:public VclAbstractDialog
67 virtual ~AbstractSvxDistributeDialog() override
= default;
69 virtual SvxDistributeHorizontal
GetDistributeHor() const = 0;
70 virtual SvxDistributeVertical
GetDistributeVer() const = 0;
73 class AbstractFmShowColsDialog
: public VclAbstractDialog
76 virtual ~AbstractFmShowColsDialog() override
= default;
78 virtual void SetColumns(const css::uno::Reference
< css::container::XIndexContainer
>& xCols
)= 0;
81 class AbstractSvxZoomDialog
: public VclAbstractDialog
84 virtual ~AbstractSvxZoomDialog() override
= default;
86 virtual void SetLimits( sal_uInt16 nMin
, sal_uInt16 nMax
) = 0;
87 virtual void HideButton( ZoomButtonId nBtnId
)= 0;
88 virtual const SfxItemSet
* GetOutputItemSet() const = 0 ;
91 class AbstractSpellDialog
: public VclAbstractDialog
94 virtual ~AbstractSpellDialog() override
= default;
96 virtual void Invalidate() = 0;
97 virtual vcl::Window
* GetWindow() = 0;
98 virtual SfxBindings
& GetBindings() = 0;
101 typedef sal_IntPtr (*PLinkStub
)( void*, void* );
103 class AbstractSearchProgress
:public VclAbstractRefreshableDialog
106 virtual ~AbstractSearchProgress() override
= default;
109 class AbstractTakeProgress
:public VclAbstractRefreshableDialog
112 virtual ~AbstractTakeProgress() override
= default;
115 class AbstractTitleDialog
:public VclAbstractDialog
118 virtual ~AbstractTitleDialog() override
= default;
120 virtual OUString
GetTitle() const =0;
123 class AbstractGalleryIdDialog
:public VclAbstractDialog
126 virtual ~AbstractGalleryIdDialog() override
= default;
128 virtual sal_uIntPtr
GetId() const =0;
131 class AbstractURLDlg
:public VclAbstractDialog
134 virtual ~AbstractURLDlg() override
= default;
136 virtual OUString
GetURL() const = 0;
137 virtual OUString
GetAltText() const = 0;
138 virtual OUString
GetDesc() const = 0;
139 virtual OUString
GetTarget() const = 0;
140 virtual OUString
GetName() const = 0;
143 class AbstractSvxHlinkDlgMarkWnd
:public VclAbstractDialog
146 virtual ~AbstractSvxHlinkDlgMarkWnd() override
= default;
149 class AbstractSvxSearchSimilarityDialog
:public VclAbstractDialog
152 virtual ~AbstractSvxSearchSimilarityDialog() override
= default;
154 virtual sal_uInt16
GetOther() =0 ;
155 virtual sal_uInt16
GetShorter() =0 ;
156 virtual sal_uInt16
GetLonger() =0 ;
157 virtual bool IsRelaxed() =0 ;
160 class AbstractSvxJSearchOptionsDialog
:public VclAbstractDialog
163 virtual ~AbstractSvxJSearchOptionsDialog() override
= default;
165 virtual TransliterationFlags
GetTransliterationFlags() const = 0;
168 class AbstractFmInputRecordNoDialog
:public VclAbstractDialog
171 virtual ~AbstractFmInputRecordNoDialog() override
= default;
173 virtual void SetValue(long dNew
) = 0;
174 virtual long GetValue() const = 0;
177 class AbstractSvxNewDictionaryDialog
:public VclAbstractDialog
180 virtual ~AbstractSvxNewDictionaryDialog() override
= default;
182 virtual css::uno::Reference
< css::linguistic2::XDictionary
> GetNewDictionary() = 0;
185 class AbstractSvxNameDialog
:public VclAbstractDialog
188 virtual ~AbstractSvxNameDialog() override
= default;
190 virtual void GetName( OUString
& rName
) = 0;
191 virtual void SetCheckNameHdl( const Link
<AbstractSvxNameDialog
&,bool>& rLink
, bool bCheckImmediately
= false ) = 0;
192 virtual void SetEditHelpId(const OString
&) = 0;
194 virtual void SetHelpId( const OString
& ) = 0;
195 virtual void SetText( const OUString
& rStr
) = 0;
198 class AbstractSvxObjectNameDialog
:public VclAbstractDialog
201 virtual ~AbstractSvxObjectNameDialog() override
= default;
203 virtual void GetName(OUString
& rName
) = 0;
204 virtual void SetCheckNameHdl(const Link
<AbstractSvxObjectNameDialog
&,bool>& rLink
) = 0;
207 class AbstractSvxObjectTitleDescDialog
:public VclAbstractDialog
210 virtual ~AbstractSvxObjectTitleDescDialog() override
= default;
212 virtual void GetTitle(OUString
& rTitle
) = 0;
213 virtual void GetDescription(OUString
& rDescription
) = 0;
216 class AbstractSvxMessDialog
:public VclAbstractDialog
219 virtual ~AbstractSvxMessDialog() override
= default;
222 class AbstractSvxMultiPathDialog
: public VclAbstractDialog
225 virtual ~AbstractSvxMultiPathDialog() override
= default;
227 virtual OUString
GetPath() const = 0;
228 virtual void SetPath( const OUString
& rPath
) = 0;
229 virtual void SetTitle( const OUString
& rNewTitle
) = 0;
232 class AbstractSvxHpLinkDlg
: public VclAbstractDialog
235 virtual ~AbstractSvxHpLinkDlg() override
= default;
237 virtual vcl::Window
* GetWindow() = 0;
238 virtual bool QueryClose() = 0;
241 struct FmFoundRecordInformation
;
242 class AbstractFmSearchDialog
:public VclAbstractDialog
245 virtual ~AbstractFmSearchDialog() override
= default;
247 virtual void SetFoundHandler(const Link
<FmFoundRecordInformation
&,void>& lnk
) = 0;
248 virtual void SetCanceledNotFoundHdl(const Link
<FmFoundRecordInformation
&,void>& lnk
)=0;
249 virtual void SetActiveField(const OUString
& strField
)=0;
252 class AbstractGraphicFilterDialog
:public VclAbstractDialog
255 virtual ~AbstractGraphicFilterDialog() override
= default;
257 virtual Graphic
GetFilteredGraphic( const Graphic
& rGraphic
, double fScaleX
, double fScaleY
) = 0;
260 class AbstractSvxAreaTabDialog
:public SfxAbstractTabDialog
263 virtual ~AbstractSvxAreaTabDialog() override
= default;
266 struct SvxSwFrameValidation
;
267 class AbstractSvxTransformTabDialog
: public SfxAbstractTabDialog
270 virtual ~AbstractSvxTransformTabDialog() override
= default;
272 virtual void SetValidateFramePosLink( const Link
<SvxSwFrameValidation
&,void>& rLink
) = 0;
275 class AbstractSvxCaptionDialog
: public SfxAbstractTabDialog
278 virtual ~AbstractSvxCaptionDialog() override
= default;
280 virtual void SetValidateFramePosLink( const Link
<SvxSwFrameValidation
&,void>& rLink
) = 0;
283 class AbstractSvxPostItDialog
:public VclAbstractDialog
286 virtual ~AbstractSvxPostItDialog() override
= default;
288 virtual void SetText( const OUString
& rStr
) = 0; //From class Window
289 virtual const SfxItemSet
* GetOutputItemSet() const = 0;
290 virtual void SetPrevHdl( const Link
<AbstractSvxPostItDialog
&,void>& rLink
) = 0;
291 virtual void SetNextHdl( const Link
<AbstractSvxPostItDialog
&,void>& rLink
) = 0;
292 virtual void EnableTravel(bool bNext
, bool bPrev
) = 0;
293 virtual OUString
GetNote() = 0;
294 virtual void SetNote(const OUString
& rTxt
) = 0;
295 virtual void ShowLastAuthor(const OUString
& rAuthor
, const OUString
& rDate
) = 0;
296 virtual void DontChangeAuthor() = 0;
297 virtual void HideAuthor() = 0;
298 virtual vcl::Window
* GetWindow() = 0;
301 class SvxAbstractSplittTableDialog
: public VclAbstractDialog
304 virtual ~SvxAbstractSplittTableDialog() override
= default;
306 virtual bool IsHorizontal() const = 0;
307 virtual bool IsProportional() const = 0;
308 virtual long GetCount() const = 0;
311 class SvxAbstractNewTableDialog
: public VclAbstractDialog
314 virtual ~SvxAbstractNewTableDialog() override
= default;
316 virtual sal_Int32
getRows() const = 0;
317 virtual sal_Int32
getColumns() const = 0;
320 class SvxAbstractInsRowColDlg
: public VclAbstractDialog
323 virtual ~SvxAbstractInsRowColDlg() override
= default;
325 virtual bool isInsertBefore() const = 0;
326 virtual sal_uInt16
getInsertCount() const = 0;
329 class SVX_DLLPUBLIC SvxAbstractDialogFactory
: public SfxAbstractDialogFactory
, public EditAbstractDialogFactory
332 static SvxAbstractDialogFactory
* Create();
334 virtual ~SvxAbstractDialogFactory() override
;
336 virtual VclPtr
<SfxAbstractTabDialog
> CreateTextTabDialog( vcl::Window
* pParent
,
337 const SfxItemSet
* pAttrSet
,
338 SdrView
* pView
) = 0 ;
340 virtual VclPtr
<AbstractSvxCaptionDialog
> CreateCaptionDialog( vcl::Window
* pParent
,
341 const SdrView
* pView
,
342 SvxAnchorIds nAnchorTypes
= SvxAnchorIds::NONE
) = 0;
344 virtual VclPtr
<AbstractSvxDistributeDialog
> CreateSvxDistributeDialog(
345 const SfxItemSet
& rAttr
)= 0;
347 virtual VclPtr
<AbstractFmShowColsDialog
> CreateFmShowColsDialog() = 0;
349 virtual VclPtr
<AbstractSvxZoomDialog
> CreateSvxZoomDialog( vcl::Window
* pParent
,
350 const SfxItemSet
& rCoreSet
)=0;
352 virtual VclPtr
<AbstractSpellDialog
> CreateSvxSpellDialog(vcl::Window
* pParent
,
353 SfxBindings
* pBindings
,
354 svx::SpellDialogChildWindow
* pSpellChildWindow
)=0;
356 virtual VclPtr
<VclAbstractRefreshableDialog
> CreateActualizeProgressDialog( vcl::Window
* pParent
,
357 GalleryTheme
* pThm
) = 0;
358 virtual VclPtr
<AbstractTitleDialog
> CreateTitleDialog( vcl::Window
* pParent
,
359 const OUString
& rOldText
) = 0;
360 virtual VclPtr
<AbstractGalleryIdDialog
> CreateGalleryIdDialog( vcl::Window
* pParent
,
361 GalleryTheme
* pThm
) = 0;
362 virtual VclPtr
<VclAbstractDialog2
> CreateGalleryThemePropertiesDialog(
364 SfxItemSet
* pItemSet
) = 0;
365 virtual VclPtr
<AbstractURLDlg
> CreateURLDialog( vcl::Window
* pParent
,
366 const OUString
& rURL
, const OUString
& rAltText
, const OUString
& rDescription
,
367 const OUString
& rTarget
, const OUString
& rName
,
368 TargetList
& rTargetList
) = 0;
370 virtual VclPtr
<SfxAbstractTabDialog
> CreateTabItemDialog(vcl::Window
* pParent
,
371 const SfxItemSet
& rSet
) = 0;
372 virtual VclPtr
<VclAbstractDialog
> CreateSvxSearchAttributeDialog( vcl::Window
* pParent
,
373 SearchAttrItemList
& rLst
,
374 const sal_uInt16
* pWhRanges
)=0;
375 virtual VclPtr
<AbstractSvxSearchSimilarityDialog
> CreateSvxSearchSimilarityDialog( vcl::Window
* pParent
,
379 sal_uInt16 nLonger
) = 0;
380 // add for SvxBorderBackgroundDlg
381 virtual VclPtr
<SfxAbstractTabDialog
> CreateSvxBorderBackgroundDlg(
382 vcl::Window
* pParent
,
383 const SfxItemSet
& rCoreSet
,
384 bool bEnableSelector
,
385 bool bEnableDrawingLayerFillStyles
= false) = 0;
387 virtual VclPtr
<AbstractSvxTransformTabDialog
> CreateSvxTransformTabDialog( vcl::Window
* pParent
,
388 const SfxItemSet
* pAttr
,
389 const SdrView
* pView
,
390 SvxAnchorIds nAnchorTypes
= SvxAnchorIds::NONE
) = 0;
391 virtual VclPtr
<SfxAbstractTabDialog
> CreateSchTransformTabDialog( vcl::Window
* pParent
,
392 const SfxItemSet
* pAttr
,
393 const SdrView
* pSdrView
,
396 virtual VclPtr
<AbstractSvxJSearchOptionsDialog
> CreateSvxJSearchOptionsDialog( vcl::Window
* pParent
,
397 const SfxItemSet
& rOptionsSet
,
398 TransliterationFlags nInitialFlags
)=0;
399 virtual VclPtr
<AbstractFmInputRecordNoDialog
> CreateFmInputRecordNoDialog() = 0;
400 virtual VclPtr
<AbstractSvxNewDictionaryDialog
> CreateSvxNewDictionaryDialog( vcl::Window
* pParent
) = 0;
401 virtual VclPtr
<VclAbstractDialog
> CreateSvxEditDictionaryDialog( vcl::Window
* pParent
,
402 const OUString
& rName
) = 0;
403 virtual VclPtr
<AbstractSvxNameDialog
> CreateSvxNameDialog( vcl::Window
* pParent
,
404 const OUString
& rName
, const OUString
& rDesc
) = 0;
407 virtual VclPtr
<AbstractSvxObjectNameDialog
> CreateSvxObjectNameDialog(const OUString
& rName
) = 0;
408 virtual VclPtr
<AbstractSvxObjectTitleDescDialog
> CreateSvxObjectTitleDescDialog(const OUString
& rTitle
, const OUString
& rDescription
) = 0;
410 virtual VclPtr
<AbstractSvxMultiPathDialog
> CreateSvxMultiPathDialog(vcl::Window
* pParent
) = 0 ;
411 virtual VclPtr
<AbstractSvxMultiPathDialog
> CreateSvxPathSelectDialog(vcl::Window
* pParent
) = 0 ;
412 virtual VclPtr
<AbstractSvxHpLinkDlg
> CreateSvxHpLinkDlg(vcl::Window
* pParent
, SfxBindings
* pBindings
)=0;
413 virtual VclPtr
<AbstractFmSearchDialog
> CreateFmSearchDialog(vcl::Window
* pParent
,
414 const OUString
& strInitialText
,
415 const ::std::vector
< OUString
>& _rContexts
,
416 sal_Int16 nInitialContext
,
417 const Link
<FmSearchContext
&,sal_uInt32
>& lnkContextSupplier
)=0;
418 virtual VclPtr
<AbstractGraphicFilterDialog
> CreateGraphicFilterEmboss(vcl::Window
* pParent
,
419 const Graphic
& rGraphic
)=0;
420 virtual VclPtr
<AbstractGraphicFilterDialog
> CreateGraphicFilterPoster(vcl::Window
* pParent
,
421 const Graphic
& rGraphic
)=0;
422 virtual VclPtr
<AbstractGraphicFilterDialog
> CreateGraphicFilterSepia (vcl::Window
* pParent
,
423 const Graphic
& rGraphic
)=0;
424 virtual VclPtr
<AbstractGraphicFilterDialog
> CreateGraphicFilterSmooth (vcl::Window
* pParent
,
425 const Graphic
& rGraphic
,
427 virtual VclPtr
<AbstractGraphicFilterDialog
> CreateGraphicFilterSolarize (vcl::Window
* pParent
,
428 const Graphic
& rGraphic
)=0;
429 virtual VclPtr
<AbstractGraphicFilterDialog
> CreateGraphicFilterMosaic (vcl::Window
* pParent
,
430 const Graphic
& rGraphic
)=0;
431 virtual VclPtr
<AbstractSvxAreaTabDialog
> CreateSvxAreaTabDialog( vcl::Window
* pParent
,
432 const SfxItemSet
* pAttr
,
435 virtual VclPtr
<SfxAbstractTabDialog
> CreateSvxLineTabDialog( vcl::Window
* pParent
, const SfxItemSet
* pAttr
, //add forSvxLineTabDialog
437 const SdrObject
* pObj
,
439 virtual VclPtr
<SfxAbstractDialog
> CreateSfxDialog( vcl::Window
* pParent
,
440 const SfxItemSet
& rAttr
,
441 const SdrView
* pView
,
444 virtual VclPtr
<SfxAbstractDialog
> CreateSfxDialog( vcl::Window
* pParent
,
445 const SfxItemSet
& rAttr
,
446 const css::uno::Reference
< css::frame::XFrame
>& _rxFrame
,
449 virtual VclPtr
<AbstractSvxPostItDialog
> CreateSvxPostItDialog( vcl::Window
* pParent
,
450 const SfxItemSet
& rCoreSet
,
451 bool bPrevNext
= false) = 0;
452 virtual VclPtr
<VclAbstractDialog
> CreateSvxScriptOrgDialog( vcl::Window
* pParent
, const OUString
& rLanguage
) override
= 0;
454 virtual DialogGetRanges
GetDialogGetRangesFunc() = 0;
456 virtual VclPtr
<AbstractScriptSelectorDialog
>
457 CreateScriptSelectorDialog(
458 vcl::Window
* pParent
,
459 const css::uno::Reference
< css::frame::XFrame
>& _rxFrame
462 virtual VclPtr
<VclAbstractDialog
> CreateScriptErrorDialog(const css::uno::Any
& rException
) override
= 0;
464 virtual VclPtr
<VclAbstractDialog
> CreateSvxMacroAssignDlg(
465 vcl::Window
* _pParent
,
466 const css::uno::Reference
< css::frame::XFrame
>& _rxDocumentFrame
,
467 const bool _bUnoDialogMode
,
468 const css::uno::Reference
< css::container::XNameReplace
>& _rxEvents
,
469 const sal_uInt16 _nInitiallySelectedEvent
472 virtual VclPtr
<SfxAbstractTabDialog
> CreateSvxFormatCellsDialog( const SfxItemSet
* pAttr
, SdrModel
* pModel
, const SdrObject
* pObj
)=0;
474 virtual VclPtr
<SvxAbstractSplittTableDialog
> CreateSvxSplittTableDialog( vcl::Window
* pParent
, bool bIsTableVertical
, long nMaxVertical
)=0;
476 virtual VclPtr
<SvxAbstractNewTableDialog
> CreateSvxNewTableDialog() = 0;
478 virtual VclPtr
<SvxAbstractInsRowColDlg
> CreateSvxInsRowColDlg( vcl::Window
* pParent
, bool bCol
, const OString
& sHelpId
) = 0;
483 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */