Bump version to 6.4-15
[LibreOffice.git] / include / svx / svxdlg.hxx
blobf81a8d9835395d418add378ce972c71af1100316
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 <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>
31 #include <vector>
33 namespace sd {
34 class View;
37 namespace com{namespace sun{namespace star{
38 namespace linguistic2{
39 class XDictionary;
40 class XSpellChecker1;
41 class XSpellChecker;
42 class XThesaurus;
43 class XHyphenator;
44 }}}}
45 class SdrModel;
46 class SdrView;
47 class SvxSpellWrapper;
48 enum class TransliterationFlags;
49 struct ExchangeData;
50 class INetURLObject;
51 class GalleryTheme;
52 class SvxHyperlinkTabPageBase;
53 class SearchAttrItemList;
54 class FmFormShell;
55 class Graphic;
56 class SdrObject;
57 class SvxSpellWrapper;
58 struct FmSearchContext;
60 typedef const sal_uInt16* (*DialogGetRanges)();
62 typedef ::std::vector< OUString > TargetList;
64 namespace svx{ class SpellDialogChildWindow;}
65 namespace weld{
66 class Dialog;
67 class Window;
70 class AbstractTabController
72 public:
73 virtual ~AbstractTabController() = default;
74 virtual bool StartExecuteAsync(VclAbstractDialog::AsyncContext &rCtx) = 0;
75 virtual void SetCurPageId( const OString &rName ) = 0;
76 virtual const SfxItemSet* GetOutputItemSet() const = 0;
79 class AbstractSvxDistributeDialog :public VclAbstractDialog
81 protected:
82 virtual ~AbstractSvxDistributeDialog() override = default;
83 public:
84 virtual SvxDistributeHorizontal GetDistributeHor() const = 0;
85 virtual SvxDistributeVertical GetDistributeVer() const = 0;
88 class AbstractFmShowColsDialog : public VclAbstractDialog
90 protected:
91 virtual ~AbstractFmShowColsDialog() override = default;
92 public:
93 virtual void SetColumns(const css::uno::Reference< css::container::XIndexContainer>& xCols)= 0;
96 class AbstractSvxZoomDialog : public VclAbstractDialog
98 protected:
99 virtual ~AbstractSvxZoomDialog() override = default;
100 public:
101 virtual void SetLimits( sal_uInt16 nMin, sal_uInt16 nMax ) = 0;
102 virtual void HideButton( ZoomButtonId nBtnId )= 0;
103 virtual const SfxItemSet* GetOutputItemSet() const = 0 ;
106 class AbstractSpellDialog : public VclAbstractDialog
108 protected:
109 virtual ~AbstractSpellDialog() override = default;
110 public:
111 virtual void InvalidateDialog() = 0;
112 virtual std::shared_ptr<SfxDialogController> GetController() = 0;
113 virtual SfxBindings& GetBindings() = 0;
116 class AbstractTitleDialog :public VclAbstractDialog
118 protected:
119 virtual ~AbstractTitleDialog() override = default;
120 public:
121 virtual OUString GetTitle() const =0;
124 class AbstractGalleryIdDialog :public VclAbstractDialog
126 protected:
127 virtual ~AbstractGalleryIdDialog() override = default;
128 public:
129 virtual sal_uInt32 GetId() const =0;
132 class AbstractURLDlg :public VclAbstractDialog
134 protected:
135 virtual ~AbstractURLDlg() override = default;
136 public:
137 virtual OUString GetURL() const = 0;
138 virtual OUString GetAltText() const = 0;
139 virtual OUString GetDesc() const = 0;
140 virtual OUString GetTarget() const = 0;
141 virtual OUString GetName() const = 0;
144 class AbstractSvxHlinkDlgMarkWnd : public VclAbstractDialog
146 protected:
147 virtual ~AbstractSvxHlinkDlgMarkWnd() override = default;
150 class AbstractSvxSearchSimilarityDialog :public VclAbstractDialog
152 protected:
153 virtual ~AbstractSvxSearchSimilarityDialog() override = default;
154 public:
155 virtual sal_uInt16 GetOther() =0 ;
156 virtual sal_uInt16 GetShorter() =0 ;
157 virtual sal_uInt16 GetLonger() =0 ;
158 virtual bool IsRelaxed() =0 ;
161 class AbstractSvxJSearchOptionsDialog :public VclAbstractDialog
163 protected:
164 virtual ~AbstractSvxJSearchOptionsDialog() override = default;
165 public:
166 virtual TransliterationFlags GetTransliterationFlags() const = 0;
169 class AbstractFmInputRecordNoDialog :public VclAbstractDialog
171 protected:
172 virtual ~AbstractFmInputRecordNoDialog() override = default;
173 public:
174 virtual void SetValue(long dNew) = 0;
175 virtual long GetValue() const = 0;
178 class AbstractSvxNewDictionaryDialog :public VclAbstractDialog
180 protected:
181 virtual ~AbstractSvxNewDictionaryDialog() override = default;
182 public:
183 virtual css::uno::Reference< css::linguistic2::XDictionary > GetNewDictionary() = 0;
186 class AbstractSvxNameDialog :public VclAbstractDialog
188 protected:
189 virtual ~AbstractSvxNameDialog() override = default;
190 public:
191 virtual void GetName( OUString& rName ) = 0;
192 virtual void SetCheckNameHdl( const Link<AbstractSvxNameDialog&,bool>& rLink, bool bCheckImmediately = false ) = 0;
193 virtual void SetEditHelpId(const OString&) = 0;
194 //from class Window
195 virtual void SetHelpId( const OString& ) = 0;
196 virtual void SetText( const OUString& rStr ) = 0;
199 class AbstractSvxObjectNameDialog :public VclAbstractDialog
201 protected:
202 virtual ~AbstractSvxObjectNameDialog() override = default;
203 public:
204 virtual void GetName(OUString& rName) = 0;
205 virtual void SetCheckNameHdl(const Link<AbstractSvxObjectNameDialog&,bool>& rLink) = 0;
208 class AbstractSvxObjectTitleDescDialog :public VclAbstractDialog
210 protected:
211 virtual ~AbstractSvxObjectTitleDescDialog() override = default;
212 public:
213 virtual void GetTitle(OUString& rTitle) = 0;
214 virtual void GetDescription(OUString& rDescription) = 0;
217 /// Abstract class provides the get information from the numbering and position dialog.
218 class AbstractSvxBulletAndPositionDlg :public VclAbstractDialog
220 protected:
221 virtual ~AbstractSvxBulletAndPositionDlg() override = default;
222 public:
223 virtual const SfxItemSet* GetOutputItemSet( SfxItemSet* pSet) const = 0 ;
224 virtual bool IsApplyToMaster() = 0;
225 virtual bool IsSlideScope() = 0;
228 class AbstractSvxMessDialog : public VclAbstractDialog
230 protected:
231 virtual ~AbstractSvxMessDialog() override = default;
234 class AbstractSvxMultiPathDialog : public VclAbstractDialog
236 protected:
237 virtual ~AbstractSvxMultiPathDialog() override = default;
238 public:
239 virtual OUString GetPath() const = 0;
240 virtual void SetPath( const OUString& rPath ) = 0;
241 virtual void SetTitle( const OUString& rNewTitle ) = 0;
244 class AbstractSvxHpLinkDlg : public VclAbstractDialog
246 protected:
247 virtual ~AbstractSvxHpLinkDlg() override = default;
248 public:
249 virtual std::shared_ptr<SfxDialogController> GetController() = 0;
250 virtual bool QueryClose() = 0;
253 struct FmFoundRecordInformation;
254 class AbstractFmSearchDialog :public VclAbstractDialog
256 protected:
257 virtual ~AbstractFmSearchDialog() override = default;
258 public:
259 virtual void SetFoundHandler(const Link<FmFoundRecordInformation&,void>& lnk) = 0;
260 virtual void SetCanceledNotFoundHdl(const Link<FmFoundRecordInformation&,void>& lnk)=0;
261 virtual void SetActiveField(const OUString& strField)=0;
264 class AbstractGraphicFilterDialog :public VclAbstractDialog
266 protected:
267 virtual ~AbstractGraphicFilterDialog() override = default;
268 public:
269 virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ) = 0;
272 class AbstractSvxAreaTabDialog :public SfxAbstractTabDialog
274 protected:
275 virtual ~AbstractSvxAreaTabDialog() override = default;
278 struct SvxSwFrameValidation;
279 class AbstractSvxTransformTabDialog : public SfxAbstractTabDialog
281 protected:
282 virtual ~AbstractSvxTransformTabDialog() override = default;
283 public:
284 virtual void SetValidateFramePosLink( const Link<SvxSwFrameValidation&,void>& rLink ) = 0;
287 class AbstractSvxCaptionDialog : public SfxAbstractTabDialog
289 protected:
290 virtual ~AbstractSvxCaptionDialog() override = default;
291 public:
292 virtual void SetValidateFramePosLink( const Link<SvxSwFrameValidation&,void>& rLink ) = 0;
295 class AbstractSvxPostItDialog : public VclAbstractDialog
297 protected:
298 virtual ~AbstractSvxPostItDialog() override = default;
299 public:
300 virtual void SetText( const OUString& rStr ) = 0; //From class Window
301 virtual const SfxItemSet* GetOutputItemSet() const = 0;
302 virtual void SetPrevHdl( const Link<AbstractSvxPostItDialog&,void>& rLink ) = 0;
303 virtual void SetNextHdl( const Link<AbstractSvxPostItDialog&,void>& rLink ) = 0;
304 virtual void EnableTravel(bool bNext, bool bPrev) = 0;
305 virtual OUString GetNote() = 0;
306 virtual void SetNote(const OUString& rTxt) = 0;
307 virtual void ShowLastAuthor(const OUString& rAuthor, const OUString& rDate) = 0;
308 virtual void DontChangeAuthor() = 0;
309 virtual void HideAuthor() = 0;
310 virtual std::shared_ptr<weld::Dialog> GetDialog() = 0;
313 class SvxAbstractSplitTableDialog : public VclAbstractDialog
315 protected:
316 virtual ~SvxAbstractSplitTableDialog() override = default;
317 public:
318 virtual bool IsHorizontal() const = 0;
319 virtual bool IsProportional() const = 0;
320 virtual long GetCount() const = 0;
321 virtual void SetSplitVerticalByDefault() = 0;
324 class SvxAbstractNewTableDialog
326 protected:
327 virtual ~SvxAbstractNewTableDialog() = default;
328 public:
329 virtual sal_Int32 getRows() const = 0;
330 virtual sal_Int32 getColumns() const = 0;
331 virtual std::shared_ptr<weld::DialogController> getDialogController() = 0;
334 class SvxAbstractInsRowColDlg : public VclAbstractDialog
336 protected:
337 virtual ~SvxAbstractInsRowColDlg() override = default;
338 public:
339 virtual bool isInsertBefore() const = 0;
340 virtual sal_uInt16 getInsertCount() const = 0;
343 class SVX_DLLPUBLIC SvxAbstractDialogFactory : public SfxAbstractDialogFactory, public EditAbstractDialogFactory
345 public:
346 static SvxAbstractDialogFactory* Create();
348 virtual ~SvxAbstractDialogFactory() override;
350 virtual VclPtr<SfxAbstractTabDialog> CreateTextTabDialog( weld::Window* pParent,
351 const SfxItemSet* pAttrSet,
352 SdrView* pView ) = 0 ;
354 virtual VclPtr<AbstractSvxCaptionDialog> CreateCaptionDialog(weld::Window* pParent,
355 const SdrView* pView,
356 SvxAnchorIds nAnchorTypes = SvxAnchorIds::NONE) = 0;
358 virtual VclPtr<AbstractSvxDistributeDialog> CreateSvxDistributeDialog(weld::Window* pParent,
359 const SfxItemSet& rAttr)= 0;
361 virtual VclPtr<AbstractFmShowColsDialog> CreateFmShowColsDialog(weld::Window* pParent) = 0;
363 virtual VclPtr<AbstractSvxZoomDialog> CreateSvxZoomDialog(weld::Window* pParent, const SfxItemSet& rCoreSet) = 0;
365 virtual VclPtr<AbstractSpellDialog> CreateSvxSpellDialog(weld::Window* pParent,
366 SfxBindings* pBindings,
367 svx::SpellDialogChildWindow* pSpellChildWindow )=0;
369 virtual VclPtr<VclAbstractDialog> CreateActualizeProgressDialog(weld::Window* pParent,
370 GalleryTheme* pThm) = 0;
371 virtual VclPtr<AbstractTitleDialog> CreateTitleDialog(weld::Window* pParent,
372 const OUString& rOldText) = 0;
373 virtual VclPtr<AbstractGalleryIdDialog> CreateGalleryIdDialog(weld::Window* pParent,
374 GalleryTheme* pThm) = 0;
375 virtual VclPtr<VclAbstractDialog> CreateGalleryThemePropertiesDialog(weld::Window* pParent,
376 ExchangeData* pData,
377 SfxItemSet* pItemSet ) = 0;
378 virtual VclPtr<AbstractURLDlg> CreateURLDialog(weld::Widget* pParent,
379 const OUString& rURL, const OUString& rAltText, const OUString& rDescription,
380 const OUString& rTarget, const OUString& rName,
381 TargetList& rTargetList ) = 0;
383 virtual VclPtr<SfxAbstractTabDialog> CreateTabItemDialog(weld::Window* pParent, const SfxItemSet& rSet) = 0;
384 virtual VclPtr<VclAbstractDialog> CreateSvxSearchAttributeDialog(weld::Window* pParent,
385 SearchAttrItemList& rLst,
386 const sal_uInt16* pWhRanges)=0;
387 virtual VclPtr<AbstractSvxSearchSimilarityDialog> CreateSvxSearchSimilarityDialog( weld::Window* pParent,
388 bool bRelax,
389 sal_uInt16 nOther,
390 sal_uInt16 nShorter,
391 sal_uInt16 nLonger ) = 0;
392 // add for SvxBorderBackgroundDlg
393 virtual VclPtr<SfxAbstractTabDialog> CreateSvxBorderBackgroundDlg(
394 weld::Window* pParent,
395 const SfxItemSet& rCoreSet,
396 bool bEnableDrawingLayerFillStyles) = 0;
398 virtual VclPtr<AbstractSvxTransformTabDialog> CreateSvxTransformTabDialog(weld::Window* pParent,
399 const SfxItemSet* pAttr,
400 const SdrView* pView,
401 SvxAnchorIds nAnchorTypes = SvxAnchorIds::NONE) = 0;
402 virtual VclPtr<SfxAbstractTabDialog> CreateSchTransformTabDialog(weld::Window* pParent,
403 const SfxItemSet* pAttr,
404 const SdrView* pSdrView,
405 bool bSizeTabPage) = 0;
406 virtual VclPtr<AbstractSvxJSearchOptionsDialog> CreateSvxJSearchOptionsDialog(weld::Window* pParent,
407 const SfxItemSet& rOptionsSet,
408 TransliterationFlags nInitialFlags) = 0;
409 virtual VclPtr<AbstractFmInputRecordNoDialog> CreateFmInputRecordNoDialog(weld::Window* pParent) = 0;
410 virtual VclPtr<AbstractSvxNewDictionaryDialog> CreateSvxNewDictionaryDialog(weld::Window* pParent) = 0;
411 virtual VclPtr<VclAbstractDialog> CreateSvxEditDictionaryDialog(weld::Window* pParent, const OUString& rName) = 0;
412 virtual VclPtr<AbstractSvxNameDialog> CreateSvxNameDialog(weld::Window* pParent,
413 const OUString& rName, const OUString& rDesc ) = 0;
415 // #i68101#
416 virtual VclPtr<AbstractSvxObjectNameDialog> CreateSvxObjectNameDialog(weld::Window* pParent, const OUString& rName) = 0;
417 virtual VclPtr<AbstractSvxObjectTitleDescDialog> CreateSvxObjectTitleDescDialog(weld::Window* pParent, const OUString& rTitle, const OUString& rDescription) = 0;
418 virtual VclPtr<AbstractSvxMultiPathDialog> CreateSvxMultiPathDialog(weld::Window* pParent) = 0 ;
419 virtual VclPtr<AbstractSvxMultiPathDialog> CreateSvxPathSelectDialog(weld::Window* pParent) = 0 ;
420 virtual VclPtr<AbstractSvxHpLinkDlg> CreateSvxHpLinkDlg(SfxChildWindow* pChild, SfxBindings* pBindings, weld::Window* pParent) = 0;
421 virtual VclPtr<AbstractFmSearchDialog> CreateFmSearchDialog(weld::Window* pParent,
422 const OUString& strInitialText,
423 const ::std::vector< OUString >& _rContexts,
424 sal_Int16 nInitialContext,
425 const Link<FmSearchContext&,sal_uInt32>& lnkContextSupplier)=0;
426 virtual VclPtr<AbstractGraphicFilterDialog> CreateGraphicFilterEmboss(weld::Window* pParent,
427 const Graphic& rGraphic)=0;
428 virtual VclPtr<AbstractGraphicFilterDialog> CreateGraphicFilterPoster(weld::Window* pParent,
429 const Graphic& rGraphic)=0;
430 virtual VclPtr<AbstractGraphicFilterDialog> CreateGraphicFilterSepia(weld::Window* pParent,
431 const Graphic& rGraphic)=0;
432 virtual VclPtr<AbstractGraphicFilterDialog> CreateGraphicFilterSmooth(weld::Window* pParent,
433 const Graphic& rGraphic,
434 double nRadius)=0;
435 virtual VclPtr<AbstractGraphicFilterDialog> CreateGraphicFilterSolarize(weld::Window* pParent,
436 const Graphic& rGraphic)=0;
437 virtual VclPtr<AbstractGraphicFilterDialog> CreateGraphicFilterMosaic(weld::Window* pParent,
438 const Graphic& rGraphic)=0;
439 virtual VclPtr<AbstractSvxAreaTabDialog> CreateSvxAreaTabDialog(weld::Window* pParent,
440 const SfxItemSet* pAttr,
441 SdrModel* pModel,
442 bool bShadow) = 0 ;
443 virtual VclPtr<SfxAbstractTabDialog> CreateSvxLineTabDialog(weld::Window* pParent, const SfxItemSet* pAttr, //add forSvxLineTabDialog
444 SdrModel* pModel,
445 const SdrObject* pObj,
446 bool bHasObj )=0;
447 virtual VclPtr<SfxAbstractDialog> CreateSfxDialog( weld::Window* pParent,
448 const SfxItemSet& rAttr,
449 const SdrView* pView,
450 sal_uInt32 nResId )=0;
451 virtual VclPtr<SfxAbstractDialog> CreateCharMapDialog(weld::Window* pParent, const SfxItemSet& rAttr,
452 const css::uno::Reference<css::frame::XFrame>& rFrame) = 0;
453 virtual VclPtr<SfxAbstractDialog> CreateEventConfigDialog(weld::Widget* pParent, const SfxItemSet& rAttr,
454 const css::uno::Reference< css::frame::XFrame >& rFrame) = 0;
455 virtual VclPtr<AbstractSvxPostItDialog> CreateSvxPostItDialog(weld::Widget* pParent, const SfxItemSet& rCoreSet, bool bPrevNext = false) = 0;
456 virtual VclPtr<VclAbstractDialog> CreateSvxScriptOrgDialog(weld::Window* pParent, const OUString& rLanguage) override = 0;
458 virtual DialogGetRanges GetDialogGetRangesFunc() = 0;
460 virtual VclPtr<AbstractScriptSelectorDialog> CreateScriptSelectorDialog(weld::Window* pParent,
461 const css::uno::Reference< css::frame::XFrame >& rxFrame) override = 0;
463 virtual VclPtr<VclAbstractDialog> CreateScriptErrorDialog(const css::uno::Any& rException) override = 0;
465 virtual VclPtr<VclAbstractDialog> CreateSvxMacroAssignDlg(
466 weld::Window* _pParent,
467 const css::uno::Reference< css::frame::XFrame >& _rxDocumentFrame,
468 const bool _bUnoDialogMode,
469 const css::uno::Reference< css::container::XNameReplace >& _rxEvents,
470 const sal_uInt16 _nInitiallySelectedEvent
471 ) = 0;
473 virtual std::shared_ptr<AbstractTabController> CreateSvxFormatCellsDialog(weld::Window* pParent, const SfxItemSet* pAttr, const SdrModel& rModel )=0;
475 virtual VclPtr<SvxAbstractSplitTableDialog> CreateSvxSplitTableDialog(weld::Window* pParent, bool bIsTableVertical, long nMaxVertical) = 0;
477 virtual std::shared_ptr<SvxAbstractNewTableDialog> CreateSvxNewTableDialog(weld::Window* pParent) = 0;
479 virtual VclPtr<SvxAbstractInsRowColDlg> CreateSvxInsRowColDlg(weld::Window* pParent, bool bCol, const OString& rHelpId) = 0;
482 #endif
484 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */