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 _SVX_DIALOG_HXX
20 #define _SVX_DIALOG_HXX
22 #include <sfx2/sfxdlg.hxx>
23 #include <editeng/edtdlg.hxx>
28 #include <svx/dstribut_enum.hxx>
29 #include <svx/rectenum.hxx> //add for enum RECT_POINT
30 #include <com/sun/star/container/XIndexContainer.hpp> //add for FmShowColsDialog
31 #include <com/sun/star/container/XNameReplace.hpp> //add for SvxMacroAssignDlg
32 #include "svx/svxdllapi.h"
35 namespace com
{namespace sun
{namespace star
{
36 namespace linguistic2
{
43 class SvxSpellWrapper
; //add for SvxSpellCheckDialog
44 typedef SfxTabPage
* (*CreateSvxDistributePage
)(Window
*pParent
, const SfxItemSet
&rAttrSet
, SvxDistributeHorizontal eHor
, SvxDistributeVertical eVer
);
45 typedef sal_uInt16
* (*DialogGetRanges
)();
50 class SvxHyperlinkTabPageBase
;
51 class SearchAttrItemList
;
55 class SvxSpellWrapper
;
57 typedef ::std::vector
< String
* > TargetList
;
59 namespace svx
{ class SpellDialogChildWindow
;}
61 class AbstractSvxDistributeDialog
:public VclAbstractDialog
//add for SvxDistributeDialog
64 virtual SvxDistributeHorizontal
GetDistributeHor() const = 0;
65 virtual SvxDistributeVertical
GetDistributeVer() const = 0;
68 class AbstractFmShowColsDialog
: public VclAbstractDialog
//add for FmShowColsDialog
71 virtual void SetColumns(const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XIndexContainer
>& xCols
)= 0;
74 class AbstractSvxZoomDialog
: public VclAbstractDialog
//add for SvxZoomDialog
77 virtual void SetLimits( sal_uInt16 nMin
, sal_uInt16 nMax
) = 0;
78 virtual void HideButton( sal_uInt16 nBtnId
)= 0;
79 virtual const SfxItemSet
* GetOutputItemSet() const = 0 ;
82 class AbstractSpellDialog
: public VclAbstractDialog
//
85 virtual void SetLanguage( sal_uInt16 nLang
) = 0;
86 virtual sal_Bool
Close() = 0;
87 virtual void Invalidate() = 0;
88 virtual Window
* GetWindow() = 0;
89 virtual SfxBindings
& GetBindings() = 0;
92 typedef long (*PLinkStub
)( void*, void* );
94 class AbstractSearchProgress
:public VclAbstractRefreshableDialog
//add for SearchProgress
97 virtual void SetFileType( const String
& rType
) = 0;
98 virtual void SetDirectory( const INetURLObject
& rURL
) = 0;
99 virtual PLinkStub
GetLinkStubCleanUpHdl() = 0;
102 class AbstractTakeProgress
:public VclAbstractRefreshableDialog
//add for TakeProgress
105 virtual void SetFile( const INetURLObject
& rURL
) = 0;
106 virtual PLinkStub
GetLinkStubCleanUpHdl() = 0;
109 class AbstractTitleDialog
:public VclAbstractDialog
//add for TitleDialog
112 virtual String
GetTitle() const =0;
115 class AbstractGalleryIdDialog
:public VclAbstractDialog
//add for GalleryIdDialog
118 virtual sal_uIntPtr
GetId() const =0;
121 class AbstractURLDlg
:public VclAbstractDialog
//add for URLDlg
124 virtual String
GetURL() const = 0;
125 virtual String
GetAltText() const = 0;
126 virtual String
GetDesc() const = 0;
127 virtual String
GetTarget() const = 0;
128 virtual String
GetName() const = 0;
131 class AbstractSvxHlinkDlgMarkWnd
:public VclAbstractDialog
//add for SvxHlinkDlgMarkWnd
134 virtual sal_Bool
MoveTo ( Point aNewPos
)const = 0;
135 virtual sal_Bool
ConnectToDialog( sal_Bool bDoit
= sal_True
)const = 0;
136 virtual void RefreshTree ( String aStrURL
) = 0;
137 virtual void SelectEntry ( String aStrMark
) = 0;
138 virtual sal_uInt16
SetError( sal_uInt16 nError
) = 0;
140 virtual void SetSizePixel( const Size
& rNewSize
) = 0;
141 virtual Size
GetSizePixel() const = 0;
142 virtual void Hide( sal_uInt16 nFlags
= 0 ) = 0;
143 virtual sal_Bool
IsVisible() const = 0;
144 virtual void Invalidate( sal_uInt16 nFlags
= 0 ) = 0;
147 class AbstractSvxSearchFormatDialog
: public SfxAbstractTabDialog
//for SvxSearchFormatDialog
151 virtual void SetText( const OUString
& rStr
) =0 ;
152 virtual OUString
GetText() const =0 ;
155 class AbstractSvxSearchSimilarityDialog
:public VclAbstractDialog
//add for SvxSearchSimilarityDialog
158 virtual sal_uInt16
GetOther() =0 ;
159 virtual sal_uInt16
GetShorter() =0 ;
160 virtual sal_uInt16
GetLonger() =0 ;
161 virtual sal_Bool
IsRelaxed() =0 ;
164 class AbstractSvxJSearchOptionsDialog
:public VclAbstractDialog
//add for SvxJSearchOptionsDialog
167 virtual sal_Int32
GetTransliterationFlags() const = 0;
170 class AbstractFmInputRecordNoDialog
:public VclAbstractDialog
//add for FmInputRecordNoDialog
173 virtual void SetValue(long dNew
) = 0;
174 virtual long GetValue() const = 0;
177 class AbstractSvxNewDictionaryDialog
:public VclAbstractDialog
//add for SvxNewDictionaryDialog
180 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::linguistic2::XDictionary
> GetNewDictionary() = 0;
183 class AbstractSvxNameDialog
:public VclAbstractDialog
//add for SvxNameDialog
186 virtual void GetName( String
& rName
) = 0;
187 virtual void SetCheckNameHdl( const Link
& rLink
, bool bCheckImmediately
= false ) = 0;
188 virtual void SetEditHelpId(const OString
&) = 0;
190 virtual void SetHelpId( const OString
& ) = 0;
191 virtual void SetText( const OUString
& rStr
) = 0;
194 ///////////////////////////////////////////////////////////////////////////////////////////////
197 class AbstractSvxObjectNameDialog
:public VclAbstractDialog
200 virtual void GetName(String
& rName
) = 0;
201 virtual void SetCheckNameHdl(const Link
& rLink
, bool bCheckImmediately
= false) = 0;
204 class AbstractSvxObjectTitleDescDialog
:public VclAbstractDialog
207 virtual void GetTitle(String
& rTitle
) = 0;
208 virtual void GetDescription(String
& rDescription
) = 0;
211 ///////////////////////////////////////////////////////////////////////////////////////////////
213 class AbstractSvxMessDialog
:public VclAbstractDialog
//add for SvxMessDialog
216 virtual void SetButtonText( sal_uInt16 nBtnId
, const String
& rNewTxt
) = 0;
219 class AbstractSvxMultiPathDialog
:public VclAbstractDialog
//add for SvxMultiPathDialog
222 virtual String
GetPath() const = 0;
223 virtual void SetPath( const String
& rPath
) = 0;
224 virtual void EnableRadioButtonMode() = 0;
225 virtual void SetTitle( const String
& rNewTitle
) = 0;
228 class AbstractSvxMultiFileDialog
:public AbstractSvxMultiPathDialog
//add for SvxMultiFileDialog
231 virtual String
GetFiles() const = 0;
232 virtual void SetFiles( const String
& rPath
) = 0;
233 //from SvxMultiPathDialog
234 virtual void SetClassPathMode() = 0;
236 virtual void SetHelpId( const OString
& ) = 0;
239 class AbstractSvxHpLinkDlg
: public VclAbstractDialog
//add for SvxHpLinkDlg
242 virtual Window
* GetWindow() = 0;
243 virtual sal_Bool
QueryClose() = 0;
246 class AbstractFmSearchDialog
:public VclAbstractDialog
//add for FmSearchDialog
249 virtual void SetFoundHandler(const Link
& lnk
) = 0;
250 virtual void SetCanceledNotFoundHdl(const Link
& lnk
)=0;
251 virtual void SetActiveField(const String
& strField
)=0;
253 class AbstractGraphicFilterDialog
:public VclAbstractDialog
//add for GraphicFilterDialog
256 virtual Graphic
GetFilteredGraphic( const Graphic
& rGraphic
, double fScaleX
, double fScaleY
) = 0;
259 class AbstractSvxAreaTabDialog
:public SfxAbstractTabDialog
//add for SvxAreaTabDialog
263 class AbstractSvxTransformTabDialog
: public SfxAbstractTabDialog
266 virtual void SetValidateFramePosLink( const Link
& rLink
) = 0;
268 class AbstractSvxCaptionDialog
: public SfxAbstractTabDialog
271 virtual void SetValidateFramePosLink( const Link
& rLink
) = 0;
274 //-------------------------------------------------------------
276 class AbstractSvxPostItDialog
:public VclAbstractDialog
//add for SvxPostItDialog
279 virtual void SetText( const OUString
& rStr
) = 0; //From class Window
280 virtual const SfxItemSet
* GetOutputItemSet() const = 0;
281 virtual void SetPrevHdl( const Link
& rLink
) = 0;
282 virtual void SetNextHdl( const Link
& rLink
) = 0;
283 virtual void EnableTravel(sal_Bool bNext
, sal_Bool bPrev
) = 0;
284 virtual String
GetNote() = 0;
285 virtual void SetNote(const String
& rTxt
) = 0;
286 virtual void ShowLastAuthor(const String
& rAuthor
, const String
& rDate
) = 0;
287 virtual void DontChangeAuthor() = 0;
288 virtual void HideAuthor() = 0;
289 virtual void SetReadonlyPostIt(sal_Bool bDisable
) = 0;
290 virtual sal_Bool
IsOkEnabled() const = 0;
291 virtual Window
* GetWindow() = 0;
294 //-------------------------------------------------------------
296 class SvxAbstractSplittTableDialog
: public VclAbstractDialog
299 virtual bool IsHorizontal() const = 0;
300 virtual bool IsProportional() const = 0;
301 virtual long GetCount() const = 0;
304 //-------------------------------------------------------------
306 class SvxAbstractNewTableDialog
: public VclAbstractDialog
309 virtual sal_Int32
getRows() const = 0;
310 virtual sal_Int32
getColumns() const = 0;
313 class SvxAbstractInsRowColDlg
: public VclAbstractDialog
316 virtual bool isInsertBefore() const = 0;
317 virtual sal_uInt16
getInsertCount() const = 0;
320 //-------------------------------------------------------------
322 class SVX_DLLPUBLIC SvxAbstractDialogFactory
: public SfxAbstractDialogFactory
, public EditAbstractDialogFactory
325 static SvxAbstractDialogFactory
* Create();
327 // define dtor as this will create typeinfo and in svx library and export vtable
328 virtual ~SvxAbstractDialogFactory();
330 virtual SfxAbstractTabDialog
* CreateTextTabDialog( Window
* pParent
,
331 const SfxItemSet
* pAttrSet
,
333 SdrModel
* pModel
=0 ) = 0 ; //add for SvxTextTabDialog
335 virtual AbstractSvxCaptionDialog
* CreateCaptionDialog( Window
* pParent
,
336 const SdrView
* pView
,
337 sal_uInt16 nAnchorTypes
= 0 ) = 0; //add for SvxCaptionTabDialog
339 virtual AbstractSvxDistributeDialog
* CreateSvxDistributeDialog(Window
* pParent
,
340 const SfxItemSet
& rAttr
,
341 SvxDistributeHorizontal eHor
= SvxDistributeHorizontalNone
,
342 SvxDistributeVertical eVer
= SvxDistributeVerticalNone
)= 0;
344 virtual AbstractFmShowColsDialog
* CreateFmShowColsDialog( Window
* pParent
) = 0;
346 virtual AbstractSvxZoomDialog
* CreateSvxZoomDialog( Window
* pParent
, //add for SvxZoomDialog
347 const SfxItemSet
& rCoreSet
)=0;
349 virtual AbstractSpellDialog
* CreateSvxSpellDialog(Window
* pParent
,
350 SfxBindings
* pBindings
,
351 svx::SpellDialogChildWindow
* pSpellChildWindow
)=0;
353 virtual VclAbstractRefreshableDialog
* CreateActualizeProgressDialog( Window
* pParent
, //add for ActualizeProgress
354 GalleryTheme
* pThm
) = 0;
355 virtual AbstractSearchProgress
* CreateSearchProgressDialog( Window
* pParent
, //add for SearchProgress
356 const INetURLObject
& rStartURL
) = 0;
357 virtual AbstractTakeProgress
* CreateTakeProgressDialog( Window
* pParent
) = 0;
358 virtual AbstractTitleDialog
* CreateTitleDialog( Window
* pParent
, //add for TitleDialog
359 const String
& rOldText
) = 0;
360 virtual AbstractGalleryIdDialog
* CreateGalleryIdDialog( Window
* pParent
, //add for SvxZoomDialog
361 GalleryTheme
* pThm
) = 0;
362 virtual VclAbstractDialog2
* CreateGalleryThemePropertiesDialog( Window
* pParent
, //add for GalleryThemeProperties
364 SfxItemSet
* pItemSet
) = 0;
365 virtual AbstractURLDlg
* CreateURLDialog( Window
* pParent
,
366 const String
& rURL
, const String
& rAltText
, const String
& rDescription
,
367 const String
& rTarget
, const String
& rName
,
368 TargetList
& rTargetList
) = 0;
369 virtual AbstractSvxHlinkDlgMarkWnd
* CreateSvxHlinkDlgMarkWndDialog( SvxHyperlinkTabPageBase
* pParent
, sal_uInt32 nResId
) =0; //add for SvxHlinkDlgMarkWnd
371 virtual SfxAbstractTabDialog
* CreateTabItemDialog( Window
* pParent
, //add for SvxSearchFormatDialog
372 const SfxItemSet
& rSet
,
373 sal_uInt32 nResId
) = 0;
374 virtual VclAbstractDialog
* CreateSvxSearchAttributeDialog( Window
* pParent
, //add for SvxSearchAttributeDialog
375 SearchAttrItemList
& rLst
,
376 const sal_uInt16
* pWhRanges
)=0;
377 virtual AbstractSvxSearchSimilarityDialog
* CreateSvxSearchSimilarityDialog( Window
* pParent
, //add for SvxSearchSimilarityDialog
381 sal_uInt16 nLonger
) = 0;
382 virtual SfxAbstractTabDialog
* CreateSvxBorderBackgroundDlg( Window
* pParent
, //add for SvxBorderBackgroundDlg
383 const SfxItemSet
& rCoreSet
,
384 sal_Bool bEnableSelector
= sal_False
) = 0;
385 virtual AbstractSvxTransformTabDialog
* CreateSvxTransformTabDialog( Window
* pParent
, //add for SvxTransformTabDialog
386 const SfxItemSet
* pAttr
,
387 const SdrView
* pView
,
388 sal_uInt16 nAnchorTypes
= 0) = 0;
389 virtual SfxAbstractTabDialog
* CreateSchTransformTabDialog( Window
* pParent
, //add for SchTransformTabDialog
390 const SfxItemSet
* pAttr
,
391 const SdrView
* pSdrView
,
393 bool bSizeTabPage
= false
395 virtual AbstractSvxJSearchOptionsDialog
* CreateSvxJSearchOptionsDialog( Window
* pParent
,
396 const SfxItemSet
& rOptionsSet
,
397 sal_Int32 nInitialFlags
)=0;
398 virtual AbstractFmInputRecordNoDialog
* CreateFmInputRecordNoDialog( Window
* pParent
) = 0;
399 virtual AbstractSvxNewDictionaryDialog
* CreateSvxNewDictionaryDialog( Window
* pParent
,
400 ::com::sun::star::uno::Reference
< ::com::sun::star::linguistic2::XSpellChecker1
> &xSpl
,
401 sal_uInt32 nResId
) = 0; //add for SvxNewDictionaryDialog
402 virtual VclAbstractDialog
* CreateSvxEditDictionaryDialog( Window
* pParent
,
404 ::com::sun::star::uno::Reference
< ::com::sun::star::linguistic2::XSpellChecker1
> &xSpl
,
405 sal_uInt32 nResId
) = 0;//add for SvxEditDictionaryDialog
406 virtual AbstractSvxNameDialog
* CreateSvxNameDialog( Window
* pParent
,
407 const String
& rName
, const String
& rDesc
) = 0; //add for SvxNameDialog
410 virtual AbstractSvxObjectNameDialog
* CreateSvxObjectNameDialog(Window
* pParent
, const String
& rName
) = 0;
411 virtual AbstractSvxObjectTitleDescDialog
* CreateSvxObjectTitleDescDialog(Window
* pParent
, const String
& rTitle
, const String
& rDescription
) = 0;
413 virtual AbstractSvxMessDialog
* CreateSvxMessDialog( Window
* pParent
, sal_uInt32 nResId
,
414 const String
& rText
, const String
& rDesc
,
415 Image
* pImg
= NULL
) = 0; //add for SvxMessDialog
417 virtual AbstractSvxMultiPathDialog
* CreateSvxMultiPathDialog( Window
* pParent
, sal_Bool bEmptyAllowed
= sal_False
) = 0 ; //add for SvxMultiPathDialog
418 virtual AbstractSvxMultiFileDialog
* CreateSvxMultiFileDialog( Window
* pParent
, sal_Bool bEmptyAllowed
= sal_False
) = 0 ; //add for SvxMultiFileDialog
419 virtual AbstractSvxHpLinkDlg
* CreateSvxHpLinkDlg (Window
* pParent
, //add for SvxMultiFileDialog
420 SfxBindings
* pBindings
,
421 sal_uInt32 nResId
)=0;
422 virtual AbstractFmSearchDialog
* CreateFmSearchDialog(Window
* pParent
, //add for FmSearchDialog
423 const OUString
& strInitialText
,
424 const ::std::vector
< OUString
>& _rContexts
,
425 sal_Int16 nInitialContext
,
426 const Link
& lnkContextSupplier
)=0;
427 virtual AbstractGraphicFilterDialog
* CreateGraphicFilterEmboss (Window
* pParent
, //add for GraphicFilterEmboss
428 const Graphic
& rGraphic
,
429 RECT_POINT eLightSource
, sal_uInt32 nResId
)=0;
430 virtual AbstractGraphicFilterDialog
* CreateGraphicFilterPosterSepia (Window
* pParent
, //add for GraphicFilterPoster & GraphicFilterSepia
431 const Graphic
& rGraphic
,
433 sal_uInt32 nResId
)=0;
434 virtual AbstractGraphicFilterDialog
* CreateGraphicFilterSmooth (Window
* pParent
, //add for GraphicFilterSmooth
435 const Graphic
& rGraphic
,
436 double nRadius
, sal_uInt32 nResId
)=0;
437 virtual AbstractGraphicFilterDialog
* CreateGraphicFilterSolarize (Window
* pParent
, //add for GraphicFilterSolarize
438 const Graphic
& rGraphic
,
439 sal_uInt8 nGreyThreshold
, sal_Bool bInvert
, sal_uInt32 nResId
)=0;
440 virtual AbstractGraphicFilterDialog
* CreateGraphicFilterMosaic (Window
* pParent
, //add for GraphicFilterMosaic
441 const Graphic
& rGraphic
,
442 sal_uInt16 nTileWidth
, sal_uInt16 nTileHeight
, sal_Bool bEnhanceEdges
, sal_uInt32 nResId
)=0;
443 virtual AbstractSvxAreaTabDialog
* CreateSvxAreaTabDialog( Window
* pParent
,//add for SvxAreaTabDialog
444 const SfxItemSet
* pAttr
,
446 const SdrView
* pSdrView
= NULL
) = 0 ;
447 virtual SfxAbstractTabDialog
* CreateSvxLineTabDialog( Window
* pParent
, const SfxItemSet
* pAttr
, //add forSvxLineTabDialog
449 const SdrObject
* pObj
= NULL
,
450 sal_Bool bHasObj
= sal_True
)=0;
451 virtual VclAbstractDialog
* CreateSfxDialog( Window
* pParent
, const SfxBindings
& rBindings
, sal_uInt32 nResId
) = 0;
452 virtual SfxAbstractDialog
* CreateSfxDialog( Window
* pParent
, //add for SvxMeasureDialog & SvxConnectionDialog
453 const SfxItemSet
& rAttr
,
454 const SdrView
* pView
,
457 virtual SfxAbstractDialog
* CreateSfxDialog( Window
* pParent
, //add for SvxMeasureDialog & SvxConnectionDialog
458 const SfxItemSet
& rAttr
,
459 const ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XFrame
>& _rxFrame
,
462 virtual AbstractSvxPostItDialog
* CreateSvxPostItDialog( Window
* pParent
, //add for SvxPostItDialog
463 const SfxItemSet
& rCoreSet
,
464 sal_Bool bPrevNext
= sal_False
) = 0;
465 virtual VclAbstractDialog
* CreateSvxScriptOrgDialog( Window
* pParent
, const String
& rLanguage
) = 0;
467 virtual CreateSvxDistributePage
GetSvxDistributePageCreatorFunc() = 0; // add for SvxDistributePage
468 virtual DialogGetRanges
GetDialogGetRangesFunc() = 0; //add for SvxPostItDialog
470 virtual AbstractScriptSelectorDialog
*
471 CreateScriptSelectorDialog(
474 const ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XFrame
>& _rxFrame
477 virtual VclAbstractDialog
* CreateScriptErrorDialog(
478 Window
* pParent
, com::sun::star::uno::Any aException
) = 0;
480 virtual VclAbstractDialog
* CreateSvxMacroAssignDlg(
482 const ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XFrame
>& _rxDocumentFrame
,
483 const bool _bUnoDialogMode
,
484 const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameReplace
>& _rxEvents
,
485 const sal_uInt16 _nInitiallySelectedEvent
488 virtual SfxAbstractTabDialog
* CreateSvxFormatCellsDialog( Window
* pParent
, const SfxItemSet
* pAttr
, SdrModel
* pModel
, const SdrObject
* pObj
= NULL
)=0;
490 virtual SvxAbstractSplittTableDialog
* CreateSvxSplittTableDialog( Window
* pParent
, bool bIsTableVertical
, long nMaxVertical
, long nMaxHorizontal
)=0;
492 virtual SvxAbstractNewTableDialog
* CreateSvxNewTableDialog( Window
* pParent
) = 0;
494 virtual SvxAbstractInsRowColDlg
* CreateSvxInsRowColDlg( Window
* pParent
, bool bCol
, const OString
& sHelpId
) = 0;
499 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */