bump product version to 4.2.0.1
[LibreOffice.git] / include / svx / svxdlg.hxx
blob919f6f5957af5f5fe3e71b582f49dee0e70d702c
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 <editeng/edtdlg.hxx>
25 class SdrModel;
26 class SdrView;
28 #include <svx/dstribut_enum.hxx>
29 #include <svx/rectenum.hxx>
30 #include <com/sun/star/container/XIndexContainer.hpp>
31 #include <com/sun/star/container/XNameReplace.hpp>
32 #include <svx/svxdllapi.h>
33 #include <vector>
35 namespace com{namespace sun{namespace star{
36 namespace linguistic2{
37 class XDictionary;
38 class XSpellChecker1;
39 class XSpellChecker;
40 class XThesaurus;
41 class XHyphenator;
42 }}}}
44 class SvxSpellWrapper;
45 typedef SfxTabPage* (*CreateSvxDistributePage)(Window *pParent, const SfxItemSet &rAttrSet, SvxDistributeHorizontal eHor, SvxDistributeVertical eVer);
46 typedef sal_uInt16* (*DialogGetRanges)();
48 struct ExchangeData;
49 class INetURLObject;
50 class GalleryTheme;
51 class SvxHyperlinkTabPageBase;
52 class SearchAttrItemList;
53 class FmFormShell;
54 class Graphic;
55 class SdrObject;
56 class SvxSpellWrapper;
58 typedef ::std::vector< OUString > TargetList;
60 namespace svx{ class SpellDialogChildWindow;}
62 class AbstractSvxDistributeDialog :public VclAbstractDialog
64 public:
65 virtual SvxDistributeHorizontal GetDistributeHor() const = 0;
66 virtual SvxDistributeVertical GetDistributeVer() const = 0;
69 class AbstractFmShowColsDialog : public VclAbstractDialog
71 public:
72 virtual void SetColumns(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer>& xCols)= 0;
75 class AbstractSvxZoomDialog : public VclAbstractDialog
77 public:
78 virtual void SetLimits( sal_uInt16 nMin, sal_uInt16 nMax ) = 0;
79 virtual void HideButton( sal_uInt16 nBtnId )= 0;
80 virtual const SfxItemSet* GetOutputItemSet() const = 0 ;
83 class AbstractSpellDialog : public VclAbstractDialog //
85 public:
86 virtual void SetLanguage( sal_uInt16 nLang ) = 0;
87 virtual sal_Bool Close() = 0;
88 virtual void Invalidate() = 0;
89 virtual Window* GetWindow() = 0;
90 virtual SfxBindings& GetBindings() = 0;
93 typedef long (*PLinkStub)( void*, void* );
95 class AbstractSearchProgress :public VclAbstractRefreshableDialog
97 public:
98 virtual void SetFileType( const OUString& rType ) = 0;
99 virtual void SetDirectory( const INetURLObject& rURL ) = 0;
100 virtual PLinkStub GetLinkStubCleanUpHdl() = 0;
103 class AbstractTakeProgress :public VclAbstractRefreshableDialog
105 public:
106 virtual void SetFile( const INetURLObject& rURL ) = 0;
107 virtual PLinkStub GetLinkStubCleanUpHdl() = 0;
110 class AbstractTitleDialog :public VclAbstractDialog
112 public:
113 virtual OUString GetTitle() const =0;
116 class AbstractGalleryIdDialog :public VclAbstractDialog
118 public:
119 virtual sal_uIntPtr GetId() const =0;
122 class AbstractURLDlg :public VclAbstractDialog
124 public:
125 virtual OUString GetURL() const = 0;
126 virtual OUString GetAltText() const = 0;
127 virtual OUString GetDesc() const = 0;
128 virtual OUString GetTarget() const = 0;
129 virtual OUString GetName() const = 0;
132 class AbstractSvxHlinkDlgMarkWnd :public VclAbstractDialog
134 public:
135 virtual sal_Bool MoveTo ( Point aNewPos )const = 0;
136 virtual sal_Bool ConnectToDialog( sal_Bool bDoit = sal_True )const = 0;
137 virtual void RefreshTree ( OUString aStrURL ) = 0;
138 virtual void SelectEntry ( OUString aStrMark ) = 0;
139 virtual sal_uInt16 SetError( sal_uInt16 nError) = 0;
140 // in class Window
141 virtual void SetSizePixel( const Size& rNewSize ) = 0;
142 virtual Size GetSizePixel() const = 0;
143 virtual void Hide( sal_uInt16 nFlags = 0 ) = 0;
144 virtual sal_Bool IsVisible() const = 0;
145 virtual void Invalidate( sal_uInt16 nFlags = 0 ) = 0;
148 class AbstractSvxSearchFormatDialog : public SfxAbstractTabDialog //for SvxSearchFormatDialog
150 public:
151 //From class Window.
152 virtual void SetText( const OUString& rStr ) =0 ;
153 virtual OUString GetText() const =0 ;
156 class AbstractSvxSearchSimilarityDialog :public VclAbstractDialog
158 public:
159 virtual sal_uInt16 GetOther() =0 ;
160 virtual sal_uInt16 GetShorter() =0 ;
161 virtual sal_uInt16 GetLonger() =0 ;
162 virtual sal_Bool IsRelaxed() =0 ;
165 class AbstractSvxJSearchOptionsDialog :public VclAbstractDialog
167 public:
168 virtual sal_Int32 GetTransliterationFlags() const = 0;
171 class AbstractFmInputRecordNoDialog :public VclAbstractDialog
173 public:
174 virtual void SetValue(long dNew) = 0;
175 virtual long GetValue() const = 0;
178 class AbstractSvxNewDictionaryDialog :public VclAbstractDialog
180 public:
181 virtual ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XDictionary > GetNewDictionary() = 0;
184 class AbstractSvxNameDialog :public VclAbstractDialog
186 public:
187 virtual void GetName( OUString& rName ) = 0;
188 virtual void SetCheckNameHdl( const Link& rLink, bool bCheckImmediately = false ) = 0;
189 virtual void SetEditHelpId(const OString&) = 0;
190 //from class Window
191 virtual void SetHelpId( const OString& ) = 0;
192 virtual void SetText( const OUString& rStr ) = 0;
195 class AbstractSvxObjectNameDialog :public VclAbstractDialog
197 public:
198 virtual void GetName(OUString& rName) = 0;
199 virtual void SetCheckNameHdl(const Link& rLink, bool bCheckImmediately = false) = 0;
202 class AbstractSvxObjectTitleDescDialog :public VclAbstractDialog
204 public:
205 virtual void GetTitle(OUString& rTitle) = 0;
206 virtual void GetDescription(OUString& rDescription) = 0;
209 class AbstractSvxMessDialog :public VclAbstractDialog
211 public:
212 virtual void SetButtonText( sal_uInt16 nBtnId, const OUString& rNewTxt ) = 0;
215 class AbstractSvxMultiPathDialog :public VclAbstractDialog
217 public:
218 virtual OUString GetPath() const = 0;
219 virtual void SetPath( const OUString& rPath ) = 0;
220 virtual void EnableRadioButtonMode() = 0;
221 virtual void SetTitle( const OUString& rNewTitle ) = 0;
224 class AbstractSvxMultiFileDialog :public AbstractSvxMultiPathDialog
226 public:
227 virtual OUString GetFiles() const = 0;
228 virtual void SetFiles( const OUString& rPath ) = 0;
229 //from SvxMultiPathDialog
230 virtual void SetClassPathMode() = 0;
231 //From Class Window
232 virtual void SetHelpId( const OString& ) = 0;
235 class AbstractSvxHpLinkDlg : public VclAbstractDialog
237 public:
238 virtual Window* GetWindow() = 0;
239 virtual sal_Bool QueryClose() = 0;
242 class AbstractFmSearchDialog :public VclAbstractDialog
244 public:
245 virtual void SetFoundHandler(const Link& lnk) = 0;
246 virtual void SetCanceledNotFoundHdl(const Link& lnk)=0;
247 virtual void SetActiveField(const OUString& strField)=0;
250 class AbstractGraphicFilterDialog :public VclAbstractDialog
252 public:
253 virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ) = 0;
256 class AbstractSvxAreaTabDialog :public SfxAbstractTabDialog
260 class AbstractSvxTransformTabDialog : public SfxAbstractTabDialog
262 public:
263 virtual void SetValidateFramePosLink( const Link& rLink ) = 0;
266 class AbstractSvxCaptionDialog : public SfxAbstractTabDialog
268 public:
269 virtual void SetValidateFramePosLink( const Link& rLink ) = 0;
272 class AbstractSvxPostItDialog :public VclAbstractDialog
274 public:
275 virtual void SetText( const OUString& rStr ) = 0; //From class Window
276 virtual const SfxItemSet* GetOutputItemSet() const = 0;
277 virtual void SetPrevHdl( const Link& rLink ) = 0;
278 virtual void SetNextHdl( const Link& rLink ) = 0;
279 virtual void EnableTravel(sal_Bool bNext, sal_Bool bPrev) = 0;
280 virtual OUString GetNote() = 0;
281 virtual void SetNote(const OUString& rTxt) = 0;
282 virtual void ShowLastAuthor(const OUString& rAuthor, const OUString& rDate) = 0;
283 virtual void DontChangeAuthor() = 0;
284 virtual void HideAuthor() = 0;
285 virtual void SetReadonlyPostIt(sal_Bool bDisable) = 0;
286 virtual sal_Bool IsOkEnabled() const = 0;
287 virtual Window * GetWindow() = 0;
290 class SvxAbstractSplittTableDialog : public VclAbstractDialog
292 public:
293 virtual bool IsHorizontal() const = 0;
294 virtual bool IsProportional() const = 0;
295 virtual long GetCount() const = 0;
298 class SvxAbstractNewTableDialog : public VclAbstractDialog
300 public:
301 virtual sal_Int32 getRows() const = 0;
302 virtual sal_Int32 getColumns() const = 0;
305 class SvxAbstractInsRowColDlg : public VclAbstractDialog
307 public:
308 virtual bool isInsertBefore() const = 0;
309 virtual sal_uInt16 getInsertCount() const = 0;
312 class SVX_DLLPUBLIC SvxAbstractDialogFactory : public SfxAbstractDialogFactory, public EditAbstractDialogFactory
314 public:
315 static SvxAbstractDialogFactory* Create();
317 // define dtor as this will create typeinfo and in svx library and export vtable
318 virtual ~SvxAbstractDialogFactory();
320 virtual SfxAbstractTabDialog* CreateTextTabDialog( Window* pParent,
321 const SfxItemSet* pAttrSet,
322 SdrView* pView,
323 SdrModel* pModel=0 ) = 0 ;
325 virtual AbstractSvxCaptionDialog* CreateCaptionDialog( Window* pParent,
326 const SdrView* pView,
327 sal_uInt16 nAnchorTypes = 0 ) = 0;
329 virtual AbstractSvxDistributeDialog* CreateSvxDistributeDialog(Window* pParent,
330 const SfxItemSet& rAttr,
331 SvxDistributeHorizontal eHor = SvxDistributeHorizontalNone,
332 SvxDistributeVertical eVer = SvxDistributeVerticalNone)= 0;
334 virtual AbstractFmShowColsDialog * CreateFmShowColsDialog( Window* pParent ) = 0;
336 virtual AbstractSvxZoomDialog * CreateSvxZoomDialog( Window* pParent,
337 const SfxItemSet& rCoreSet )=0;
339 virtual AbstractSpellDialog * CreateSvxSpellDialog(Window* pParent,
340 SfxBindings* pBindings,
341 svx::SpellDialogChildWindow* pSpellChildWindow )=0;
343 virtual VclAbstractRefreshableDialog * CreateActualizeProgressDialog( Window* pParent,
344 GalleryTheme* pThm ) = 0;
345 virtual AbstractSearchProgress * CreateSearchProgressDialog( Window* pParent,
346 const INetURLObject& rStartURL ) = 0;
347 virtual AbstractTakeProgress * CreateTakeProgressDialog( Window* pParent ) = 0;
348 virtual AbstractTitleDialog * CreateTitleDialog( Window* pParent,
349 const OUString& rOldText ) = 0;
350 virtual AbstractGalleryIdDialog * CreateGalleryIdDialog( Window* pParent,
351 GalleryTheme* pThm ) = 0;
352 virtual VclAbstractDialog2 * CreateGalleryThemePropertiesDialog( Window* pParent,
353 ExchangeData* pData,
354 SfxItemSet* pItemSet ) = 0;
355 virtual AbstractURLDlg * CreateURLDialog( Window* pParent,
356 const OUString& rURL, const OUString& rAltText, const OUString& rDescription,
357 const OUString& rTarget, const OUString& rName,
358 TargetList& rTargetList ) = 0;
359 virtual AbstractSvxHlinkDlgMarkWnd* CreateSvxHlinkDlgMarkWndDialog( SvxHyperlinkTabPageBase* pParent, sal_uInt32 nResId ) =0;
361 virtual SfxAbstractTabDialog* CreateTabItemDialog( Window* pParent,
362 const SfxItemSet& rSet,
363 sal_uInt32 nResId) = 0;
364 virtual VclAbstractDialog* CreateSvxSearchAttributeDialog( Window* pParent,
365 SearchAttrItemList& rLst,
366 const sal_uInt16* pWhRanges)=0;
367 virtual AbstractSvxSearchSimilarityDialog * CreateSvxSearchSimilarityDialog( Window* pParent,
368 sal_Bool bRelax,
369 sal_uInt16 nOther,
370 sal_uInt16 nShorter,
371 sal_uInt16 nLonger ) = 0;
372 virtual SfxAbstractTabDialog* CreateSvxBorderBackgroundDlg( Window* pParent,
373 const SfxItemSet& rCoreSet,
374 sal_Bool bEnableSelector = sal_False) = 0;
375 virtual AbstractSvxTransformTabDialog* CreateSvxTransformTabDialog( Window* pParent,
376 const SfxItemSet* pAttr,
377 const SdrView* pView,
378 sal_uInt16 nAnchorTypes = 0) = 0;
379 virtual SfxAbstractTabDialog* CreateSchTransformTabDialog( Window* pParent,
380 const SfxItemSet* pAttr,
381 const SdrView* pSdrView,
382 sal_uInt32 nResId,
383 bool bSizeTabPage = false
384 )=0;
385 virtual AbstractSvxJSearchOptionsDialog * CreateSvxJSearchOptionsDialog( Window* pParent,
386 const SfxItemSet& rOptionsSet,
387 sal_Int32 nInitialFlags )=0;
388 virtual AbstractFmInputRecordNoDialog * CreateFmInputRecordNoDialog( Window* pParent ) = 0;
389 virtual AbstractSvxNewDictionaryDialog* CreateSvxNewDictionaryDialog( Window* pParent,
390 ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XSpellChecker1 > &xSpl ) = 0;
391 virtual VclAbstractDialog * CreateSvxEditDictionaryDialog( Window* pParent,
392 const OUString& rName,
393 ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XSpellChecker1> &xSpl,
394 sal_uInt32 nResId) = 0;
395 virtual AbstractSvxNameDialog * CreateSvxNameDialog( Window* pParent,
396 const OUString& rName, const OUString& rDesc ) = 0;
398 // #i68101#
399 virtual AbstractSvxObjectNameDialog* CreateSvxObjectNameDialog(Window* pParent, const OUString& rName ) = 0;
400 virtual AbstractSvxObjectTitleDescDialog* CreateSvxObjectTitleDescDialog(Window* pParent, const OUString& rTitle, const OUString& rDescription) = 0;
402 virtual AbstractSvxMessDialog * CreateSvxMessDialog( Window* pParent, sal_uInt32 nResId,
403 const OUString& rText, const OUString& rDesc,
404 Image* pImg = NULL ) = 0;
406 virtual AbstractSvxMultiPathDialog * CreateSvxMultiPathDialog( Window* pParent, sal_Bool bEmptyAllowed = sal_False ) = 0 ;
407 virtual AbstractSvxMultiFileDialog * CreateSvxMultiFileDialog( Window* pParent, sal_Bool bEmptyAllowed = sal_False ) = 0 ;
408 virtual AbstractSvxHpLinkDlg * CreateSvxHpLinkDlg (Window* pParent,
409 SfxBindings* pBindings,
410 sal_uInt32 nResId)=0;
411 virtual AbstractFmSearchDialog* CreateFmSearchDialog(Window* pParent,
412 const OUString& strInitialText,
413 const ::std::vector< OUString >& _rContexts,
414 sal_Int16 nInitialContext,
415 const Link& lnkContextSupplier)=0;
416 virtual AbstractGraphicFilterDialog * CreateGraphicFilterEmboss (Window* pParent,
417 const Graphic& rGraphic,
418 RECT_POINT eLightSource, sal_uInt32 nResId )=0;
419 virtual AbstractGraphicFilterDialog * CreateGraphicFilterPosterSepia (Window* pParent,
420 const Graphic& rGraphic,
421 sal_uInt16 nCount,
422 sal_uInt32 nResId)=0;
423 virtual AbstractGraphicFilterDialog * CreateGraphicFilterSmooth (Window* pParent,
424 const Graphic& rGraphic,
425 double nRadius, sal_uInt32 nResId)=0;
426 virtual AbstractGraphicFilterDialog * CreateGraphicFilterSolarize (Window* pParent,
427 const Graphic& rGraphic,
428 sal_uInt8 nGreyThreshold, sal_Bool bInvert, sal_uInt32 nResId)=0;
429 virtual AbstractGraphicFilterDialog * CreateGraphicFilterMosaic (Window* pParent,
430 const Graphic& rGraphic,
431 sal_uInt16 nTileWidth, sal_uInt16 nTileHeight, sal_Bool bEnhanceEdges, sal_uInt32 nResId)=0;
432 virtual AbstractSvxAreaTabDialog* CreateSvxAreaTabDialog( Window* pParent,
433 const SfxItemSet* pAttr,
434 SdrModel* pModel,
435 const SdrView* pSdrView = NULL ) = 0 ;
436 virtual SfxAbstractTabDialog* CreateSvxLineTabDialog( Window* pParent, const SfxItemSet* pAttr, //add forSvxLineTabDialog
437 SdrModel* pModel,
438 const SdrObject* pObj = NULL,
439 sal_Bool bHasObj = sal_True )=0;
440 virtual VclAbstractDialog* CreateSfxDialog( Window* pParent, const SfxBindings& rBindings, sal_uInt32 nResId ) = 0;
441 virtual SfxAbstractDialog* CreateSfxDialog( Window* pParent,
442 const SfxItemSet& rAttr,
443 const SdrView* pView,
444 sal_uInt32 nResId
445 )=0;
446 virtual SfxAbstractDialog* CreateSfxDialog( Window* pParent,
447 const SfxItemSet& rAttr,
448 const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxFrame,
449 sal_uInt32 nResId
450 )=0;
451 virtual AbstractSvxPostItDialog* CreateSvxPostItDialog( Window* pParent,
452 const SfxItemSet& rCoreSet,
453 sal_Bool bPrevNext = sal_False) = 0;
454 virtual VclAbstractDialog* CreateSvxScriptOrgDialog( Window* pParent, const OUString& rLanguage ) = 0;
456 virtual CreateSvxDistributePage GetSvxDistributePageCreatorFunc() = 0;
457 virtual DialogGetRanges GetDialogGetRangesFunc() = 0;
459 virtual AbstractScriptSelectorDialog*
460 CreateScriptSelectorDialog(
461 Window* pParent,
462 sal_Bool bShowSlots,
463 const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxFrame
464 ) = 0;
466 virtual VclAbstractDialog* CreateScriptErrorDialog(
467 Window* pParent, com::sun::star::uno::Any aException) = 0;
469 virtual VclAbstractDialog* CreateSvxMacroAssignDlg(
470 Window* _pParent,
471 const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxDocumentFrame,
472 const bool _bUnoDialogMode,
473 const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace >& _rxEvents,
474 const sal_uInt16 _nInitiallySelectedEvent
475 ) = 0;
477 virtual SfxAbstractTabDialog* CreateSvxFormatCellsDialog( Window* pParent, const SfxItemSet* pAttr, SdrModel* pModel, const SdrObject* pObj = NULL )=0;
479 virtual SvxAbstractSplittTableDialog* CreateSvxSplittTableDialog( Window* pParent, bool bIsTableVertical, long nMaxVertical, long nMaxHorizontal )=0;
481 virtual SvxAbstractNewTableDialog* CreateSvxNewTableDialog( Window* pParent ) = 0;
483 virtual SvxAbstractInsRowColDlg* CreateSvxInsRowColDlg( Window* pParent, bool bCol, const OString& sHelpId ) = 0;
486 #endif
488 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */