Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / include / svx / svxdlg.hxx
blob55164b3234edae4ff0ad87a3a4236168581fe82f
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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>
30 #include <vector>
32 namespace sd {
33 class View;
36 namespace com::sun::star::linguistic2 {
37 class XDictionary;
38 class XSpellChecker1;
39 class XSpellChecker;
40 class XThesaurus;
41 class XHyphenator;
43 class SdrModel;
44 class SdrView;
45 class SvxSpellWrapper;
46 enum class TransliterationFlags;
47 struct ExchangeData;
48 class INetURLObject;
49 class GalleryTheme;
50 class SvxHyperlinkTabPageBase;
51 class SearchAttrItemList;
52 class FmFormShell;
53 class Graphic;
54 class SdrObject;
55 class SvxSpellWrapper;
56 struct FmSearchContext;
58 typedef WhichRangesContainer (*DialogGetRanges)();
60 typedef ::std::vector< OUString > TargetList;
62 namespace svx{ class SpellDialogChildWindow;}
63 namespace weld{
64 class Dialog;
65 class Window;
68 class AbstractFmShowColsDialog : public VclAbstractDialog
70 protected:
71 virtual ~AbstractFmShowColsDialog() override = default;
72 public:
73 virtual void SetColumns(const css::uno::Reference< css::container::XIndexContainer>& xCols)= 0;
76 class AbstractSvxZoomDialog : public VclAbstractDialog
78 protected:
79 virtual ~AbstractSvxZoomDialog() override = default;
80 public:
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
88 protected:
89 virtual ~AbstractSpellDialog() override = default;
90 public:
91 virtual void InvalidateDialog() = 0;
92 virtual std::shared_ptr<SfxDialogController> GetController() = 0;
93 virtual SfxBindings& GetBindings() = 0;
96 class AbstractTitleDialog :public VclAbstractDialog
98 protected:
99 virtual ~AbstractTitleDialog() override = default;
100 public:
101 virtual OUString GetTitle() const =0;
104 class AbstractGalleryIdDialog :public VclAbstractDialog
106 protected:
107 virtual ~AbstractGalleryIdDialog() override = default;
108 public:
109 virtual sal_uInt32 GetId() const =0;
112 class AbstractURLDlg :public VclAbstractDialog
114 protected:
115 virtual ~AbstractURLDlg() override = default;
116 public:
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
126 protected:
127 virtual ~AbstractSvxSearchSimilarityDialog() override = default;
128 public:
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
137 protected:
138 virtual ~AbstractSvxJSearchOptionsDialog() override = default;
139 public:
140 virtual TransliterationFlags GetTransliterationFlags() const = 0;
143 class AbstractFmInputRecordNoDialog :public VclAbstractDialog
145 protected:
146 virtual ~AbstractFmInputRecordNoDialog() override = default;
147 public:
148 virtual void SetValue(tools::Long dNew) = 0;
149 virtual tools::Long GetValue() const = 0;
152 class AbstractSvxNewDictionaryDialog :public VclAbstractDialog
154 protected:
155 virtual ~AbstractSvxNewDictionaryDialog() override = default;
156 public:
157 virtual css::uno::Reference< css::linguistic2::XDictionary > GetNewDictionary() = 0;
160 class AbstractSvxNameDialog : public VclAbstractDialog
162 protected:
163 virtual ~AbstractSvxNameDialog() override = default;
164 public:
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
175 protected:
176 virtual ~AbstractSvxObjectNameDialog() override = default;
177 public:
178 virtual void GetName(OUString& rName) = 0;
179 virtual void SetCheckNameHdl(const Link<AbstractSvxObjectNameDialog&,bool>& rLink) = 0;
182 class AbstractSvxObjectTitleDescDialog :public VclAbstractDialog
184 protected:
185 virtual ~AbstractSvxObjectTitleDescDialog() override = default;
186 public:
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
195 protected:
196 virtual ~AbstractSvxBulletAndPositionDlg() override = default;
197 public:
198 virtual const SfxItemSet* GetOutputItemSet( SfxItemSet* pSet) const = 0 ;
199 virtual bool IsApplyToMaster() = 0;
200 virtual bool IsSlideScope() = 0;
203 class AbstractSvxMultiPathDialog : public VclAbstractDialog
205 protected:
206 virtual ~AbstractSvxMultiPathDialog() override = default;
207 public:
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
215 protected:
216 virtual ~AbstractSvxHpLinkDlg() override = default;
217 public:
218 virtual std::shared_ptr<SfxDialogController> GetController() = 0;
219 virtual bool QueryClose() = 0;
222 struct FmFoundRecordInformation;
223 class AbstractFmSearchDialog :public VclAbstractDialog
225 protected:
226 virtual ~AbstractFmSearchDialog() override = default;
227 public:
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
235 protected:
236 virtual ~AbstractGraphicFilterDialog() override = default;
237 public:
238 virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ) = 0;
241 class AbstractSvxAreaTabDialog :public SfxAbstractTabDialog
243 protected:
244 virtual ~AbstractSvxAreaTabDialog() override = default;
247 struct SvxSwFrameValidation;
248 class AbstractSvxTransformTabDialog : public SfxAbstractTabDialog
250 protected:
251 virtual ~AbstractSvxTransformTabDialog() override = default;
252 public:
253 virtual void SetValidateFramePosLink( const Link<SvxSwFrameValidation&,void>& rLink ) = 0;
256 class AbstractSvxCaptionDialog : public SfxAbstractTabDialog
258 protected:
259 virtual ~AbstractSvxCaptionDialog() override = default;
260 public:
261 virtual void SetValidateFramePosLink( const Link<SvxSwFrameValidation&,void>& rLink ) = 0;
264 class AbstractSvxPostItDialog : public VclAbstractDialog
266 protected:
267 virtual ~AbstractSvxPostItDialog() override = default;
268 public:
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
284 protected:
285 virtual ~SvxAbstractSplitTableDialog() override = default;
286 public:
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
295 protected:
296 virtual ~SvxAbstractNewTableDialog() = default;
297 public:
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
305 protected:
306 virtual ~SvxAbstractInsRowColDlg() override = default;
307 public:
308 virtual bool isInsertBefore() const = 0;
309 virtual sal_uInt16 getInsertCount() const = 0;
312 class SVXCORE_DLLPUBLIC SvxAbstractDialogFactory : public SfxAbstractDialogFactory, public EditAbstractDialogFactory
314 public:
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,
342 ExchangeData* pData,
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,
355 bool bRelax,
356 sal_uInt16 nOther,
357 sal_uInt16 nShorter,
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;
382 // #i68101#
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,
401 double nRadius)=0;
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,
408 SdrModel* pModel,
409 bool bShadow,
410 bool bSlideBackground) = 0 ;
411 virtual VclPtr<SfxAbstractTabDialog> CreateSvxLineTabDialog(weld::Window* pParent, const SfxItemSet* pAttr, //add forSvxLineTabDialog
412 SdrModel* pModel,
413 const SdrObject* pObj,
414 bool bHasObj )=0;
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
439 ) = 0;
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;
450 #endif
452 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */