Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 : #ifndef INCLUDED_SVX_SVXDLG_HXX
20 : #define INCLUDED_SVX_SVXDLG_HXX
21 :
22 : #include <sfx2/sfxdlg.hxx>
23 : #include <editeng/edtdlg.hxx>
24 :
25 : class SdrModel;
26 : class SdrView;
27 :
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>
34 :
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 : }}}}
43 :
44 : class SvxSpellWrapper;
45 : typedef SfxTabPage* (*CreateSvxDistributePage)(vcl::Window *pParent, const SfxItemSet &rAttrSet, SvxDistributeHorizontal eHor, SvxDistributeVertical eVer);
46 : typedef const sal_uInt16* (*DialogGetRanges)();
47 :
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;
57 :
58 : typedef ::std::vector< OUString > TargetList;
59 :
60 : namespace svx{ class SpellDialogChildWindow;}
61 :
62 0 : class AbstractSvxDistributeDialog :public VclAbstractDialog
63 : {
64 : public:
65 : virtual SvxDistributeHorizontal GetDistributeHor() const = 0;
66 : virtual SvxDistributeVertical GetDistributeVer() const = 0;
67 : };
68 :
69 0 : class AbstractFmShowColsDialog : public VclAbstractDialog
70 : {
71 : public:
72 : virtual void SetColumns(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer>& xCols)= 0;
73 : };
74 :
75 0 : class AbstractSvxZoomDialog : public VclAbstractDialog
76 : {
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 ;
81 : };
82 :
83 0 : class AbstractSpellDialog : public VclAbstractDialog
84 : {
85 : public:
86 : virtual void SetLanguage( sal_uInt16 nLang ) = 0;
87 : virtual bool Close() = 0;
88 : virtual void Invalidate() = 0;
89 : virtual vcl::Window* GetWindow() = 0;
90 : virtual SfxBindings& GetBindings() = 0;
91 : };
92 :
93 : typedef long (*PLinkStub)( void*, void* );
94 :
95 0 : class AbstractSearchProgress :public VclAbstractRefreshableDialog
96 : {
97 : public:
98 : virtual void SetFileType( const OUString& rType ) = 0;
99 : virtual void SetDirectory( const INetURLObject& rURL ) = 0;
100 : virtual PLinkStub GetLinkStubCleanUpHdl() = 0;
101 : };
102 :
103 0 : class AbstractTakeProgress :public VclAbstractRefreshableDialog
104 : {
105 : public:
106 : virtual void SetFile( const INetURLObject& rURL ) = 0;
107 : virtual PLinkStub GetLinkStubCleanUpHdl() = 0;
108 : };
109 :
110 0 : class AbstractTitleDialog :public VclAbstractDialog
111 : {
112 : public:
113 : virtual OUString GetTitle() const =0;
114 : };
115 :
116 0 : class AbstractGalleryIdDialog :public VclAbstractDialog
117 : {
118 : public:
119 : virtual sal_uIntPtr GetId() const =0;
120 : };
121 :
122 0 : class AbstractURLDlg :public VclAbstractDialog
123 : {
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;
130 : };
131 :
132 0 : class AbstractSvxHlinkDlgMarkWnd :public VclAbstractDialog
133 : {
134 : public:
135 : virtual bool MoveTo ( Point aNewPos ) const = 0;
136 : virtual bool ConnectToDialog( bool bDoit = true ) const = 0;
137 : virtual void RefreshTree ( const OUString& aStrURL ) = 0;
138 : virtual void SelectEntry ( const 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() = 0;
144 : virtual bool IsVisible() const = 0;
145 : virtual void Invalidate( sal_uInt16 nFlags = 0 ) = 0;
146 : };
147 :
148 0 : class AbstractSvxSearchSimilarityDialog :public VclAbstractDialog
149 : {
150 : public:
151 : virtual sal_uInt16 GetOther() =0 ;
152 : virtual sal_uInt16 GetShorter() =0 ;
153 : virtual sal_uInt16 GetLonger() =0 ;
154 : virtual bool IsRelaxed() =0 ;
155 : };
156 :
157 0 : class AbstractSvxJSearchOptionsDialog :public VclAbstractDialog
158 : {
159 : public:
160 : virtual sal_Int32 GetTransliterationFlags() const = 0;
161 : };
162 :
163 0 : class AbstractFmInputRecordNoDialog :public VclAbstractDialog
164 : {
165 : public:
166 : virtual void SetValue(long dNew) = 0;
167 : virtual long GetValue() const = 0;
168 : };
169 :
170 0 : class AbstractSvxNewDictionaryDialog :public VclAbstractDialog
171 : {
172 : public:
173 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XDictionary > GetNewDictionary() = 0;
174 : };
175 :
176 0 : class AbstractSvxNameDialog :public VclAbstractDialog
177 : {
178 : public:
179 : virtual void GetName( OUString& rName ) = 0;
180 : virtual void SetCheckNameHdl( const Link& rLink, bool bCheckImmediately = false ) = 0;
181 : virtual void SetEditHelpId(const OString&) = 0;
182 : //from class Window
183 : virtual void SetHelpId( const OString& ) = 0;
184 : virtual void SetText( const OUString& rStr ) = 0;
185 : };
186 :
187 0 : class AbstractSvxObjectNameDialog :public VclAbstractDialog
188 : {
189 : public:
190 : virtual void GetName(OUString& rName) = 0;
191 : virtual void SetCheckNameHdl(const Link& rLink, bool bCheckImmediately = false) = 0;
192 : };
193 :
194 0 : class AbstractSvxObjectTitleDescDialog :public VclAbstractDialog
195 : {
196 : public:
197 : virtual void GetTitle(OUString& rTitle) = 0;
198 : virtual void GetDescription(OUString& rDescription) = 0;
199 : };
200 :
201 0 : class AbstractSvxMessDialog :public VclAbstractDialog
202 : {
203 : public:
204 : virtual void SetButtonText( sal_uInt16 nBtnId, const OUString& rNewTxt ) = 0;
205 : };
206 :
207 0 : class AbstractSvxMultiPathDialog : public VclAbstractDialog
208 : {
209 : public:
210 : virtual OUString GetPath() const = 0;
211 : virtual void SetPath( const OUString& rPath ) = 0;
212 : virtual void SetTitle( const OUString& rNewTitle ) = 0;
213 : };
214 :
215 0 : class AbstractSvxHpLinkDlg : public VclAbstractDialog
216 : {
217 : public:
218 : virtual vcl::Window* GetWindow() = 0;
219 : virtual bool QueryClose() = 0;
220 : };
221 :
222 0 : class AbstractFmSearchDialog :public VclAbstractDialog
223 : {
224 : public:
225 : virtual void SetFoundHandler(const Link& lnk) = 0;
226 : virtual void SetCanceledNotFoundHdl(const Link& lnk)=0;
227 : virtual void SetActiveField(const OUString& strField)=0;
228 : };
229 :
230 0 : class AbstractGraphicFilterDialog :public VclAbstractDialog
231 : {
232 : public:
233 : virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ) = 0;
234 : };
235 :
236 0 : class AbstractSvxAreaTabDialog :public SfxAbstractTabDialog
237 : {
238 : };
239 :
240 0 : class AbstractSvxTransformTabDialog : public SfxAbstractTabDialog
241 : {
242 : public:
243 : virtual void SetValidateFramePosLink( const Link& rLink ) = 0;
244 : };
245 :
246 0 : class AbstractSvxCaptionDialog : public SfxAbstractTabDialog
247 : {
248 : public:
249 : virtual void SetValidateFramePosLink( const Link& rLink ) = 0;
250 : };
251 :
252 0 : class AbstractSvxPostItDialog :public VclAbstractDialog
253 : {
254 : public:
255 : virtual void SetText( const OUString& rStr ) = 0; //From class Window
256 : virtual const SfxItemSet* GetOutputItemSet() const = 0;
257 : virtual void SetPrevHdl( const Link& rLink ) = 0;
258 : virtual void SetNextHdl( const Link& rLink ) = 0;
259 : virtual void EnableTravel(bool bNext, bool bPrev) = 0;
260 : virtual OUString GetNote() = 0;
261 : virtual void SetNote(const OUString& rTxt) = 0;
262 : virtual void ShowLastAuthor(const OUString& rAuthor, const OUString& rDate) = 0;
263 : virtual void DontChangeAuthor() = 0;
264 : virtual void HideAuthor() = 0;
265 : virtual void SetReadonlyPostIt(bool bDisable) = 0;
266 : virtual bool IsOkEnabled() const = 0;
267 : virtual vcl::Window * GetWindow() = 0;
268 : };
269 :
270 0 : class SvxAbstractSplittTableDialog : public VclAbstractDialog
271 : {
272 : public:
273 : virtual bool IsHorizontal() const = 0;
274 : virtual bool IsProportional() const = 0;
275 : virtual long GetCount() const = 0;
276 : };
277 :
278 0 : class SvxAbstractNewTableDialog : public VclAbstractDialog
279 : {
280 : public:
281 : virtual sal_Int32 getRows() const = 0;
282 : virtual sal_Int32 getColumns() const = 0;
283 : };
284 :
285 0 : class SvxAbstractInsRowColDlg : public VclAbstractDialog
286 : {
287 : public:
288 : virtual bool isInsertBefore() const = 0;
289 : virtual sal_uInt16 getInsertCount() const = 0;
290 : };
291 :
292 0 : class SVX_DLLPUBLIC SvxAbstractDialogFactory : public SfxAbstractDialogFactory, public EditAbstractDialogFactory
293 : {
294 : public:
295 : static SvxAbstractDialogFactory* Create();
296 :
297 : // define dtor as this will create typeinfo and in svx library and export vtable
298 : virtual ~SvxAbstractDialogFactory();
299 :
300 : virtual SfxAbstractTabDialog* CreateTextTabDialog( vcl::Window* pParent,
301 : const SfxItemSet* pAttrSet,
302 : SdrView* pView,
303 : SdrModel* pModel=0 ) = 0 ;
304 :
305 : virtual AbstractSvxCaptionDialog* CreateCaptionDialog( vcl::Window* pParent,
306 : const SdrView* pView,
307 : sal_uInt16 nAnchorTypes = 0 ) = 0;
308 :
309 : virtual AbstractSvxDistributeDialog* CreateSvxDistributeDialog(vcl::Window* pParent,
310 : const SfxItemSet& rAttr,
311 : SvxDistributeHorizontal eHor = SvxDistributeHorizontalNone,
312 : SvxDistributeVertical eVer = SvxDistributeVerticalNone)= 0;
313 :
314 : virtual AbstractFmShowColsDialog * CreateFmShowColsDialog( vcl::Window* pParent ) = 0;
315 :
316 : virtual AbstractSvxZoomDialog * CreateSvxZoomDialog( vcl::Window* pParent,
317 : const SfxItemSet& rCoreSet )=0;
318 :
319 : virtual AbstractSpellDialog * CreateSvxSpellDialog(vcl::Window* pParent,
320 : SfxBindings* pBindings,
321 : svx::SpellDialogChildWindow* pSpellChildWindow )=0;
322 :
323 : virtual VclAbstractRefreshableDialog * CreateActualizeProgressDialog( vcl::Window* pParent,
324 : GalleryTheme* pThm ) = 0;
325 : virtual AbstractSearchProgress * CreateSearchProgressDialog( vcl::Window* pParent,
326 : const INetURLObject& rStartURL ) = 0;
327 : virtual AbstractTakeProgress * CreateTakeProgressDialog( vcl::Window* pParent ) = 0;
328 : virtual AbstractTitleDialog * CreateTitleDialog( vcl::Window* pParent,
329 : const OUString& rOldText ) = 0;
330 : virtual AbstractGalleryIdDialog * CreateGalleryIdDialog( vcl::Window* pParent,
331 : GalleryTheme* pThm ) = 0;
332 : virtual VclAbstractDialog2 * CreateGalleryThemePropertiesDialog( vcl::Window* pParent,
333 : ExchangeData* pData,
334 : SfxItemSet* pItemSet ) = 0;
335 : virtual AbstractURLDlg * CreateURLDialog( vcl::Window* pParent,
336 : const OUString& rURL, const OUString& rAltText, const OUString& rDescription,
337 : const OUString& rTarget, const OUString& rName,
338 : TargetList& rTargetList ) = 0;
339 : virtual AbstractSvxHlinkDlgMarkWnd* CreateSvxHlinkDlgMarkWndDialog( SvxHyperlinkTabPageBase* pParent, sal_uInt32 nResId ) =0;
340 :
341 : virtual SfxAbstractTabDialog* CreateTabItemDialog(vcl::Window* pParent,
342 : const SfxItemSet& rSet) = 0;
343 : virtual VclAbstractDialog* CreateSvxSearchAttributeDialog( vcl::Window* pParent,
344 : SearchAttrItemList& rLst,
345 : const sal_uInt16* pWhRanges)=0;
346 : virtual AbstractSvxSearchSimilarityDialog * CreateSvxSearchSimilarityDialog( vcl::Window* pParent,
347 : bool bRelax,
348 : sal_uInt16 nOther,
349 : sal_uInt16 nShorter,
350 : sal_uInt16 nLonger ) = 0;
351 : //UUUU add for SvxBorderBackgroundDlg
352 : virtual SfxAbstractTabDialog* CreateSvxBorderBackgroundDlg(
353 : vcl::Window* pParent,
354 : const SfxItemSet& rCoreSet,
355 : bool bEnableSelector = false,
356 : bool bEnableDrawingLayerFillStyles = false) = 0;
357 :
358 : virtual AbstractSvxTransformTabDialog* CreateSvxTransformTabDialog( vcl::Window* pParent,
359 : const SfxItemSet* pAttr,
360 : const SdrView* pView,
361 : sal_uInt16 nAnchorTypes = 0) = 0;
362 : virtual SfxAbstractTabDialog* CreateSchTransformTabDialog( vcl::Window* pParent,
363 : const SfxItemSet* pAttr,
364 : const SdrView* pSdrView,
365 : sal_uInt32 nResId,
366 : bool bSizeTabPage = false
367 : )=0;
368 : virtual AbstractSvxJSearchOptionsDialog * CreateSvxJSearchOptionsDialog( vcl::Window* pParent,
369 : const SfxItemSet& rOptionsSet,
370 : sal_Int32 nInitialFlags )=0;
371 : virtual AbstractFmInputRecordNoDialog * CreateFmInputRecordNoDialog( vcl::Window* pParent ) = 0;
372 : virtual AbstractSvxNewDictionaryDialog* CreateSvxNewDictionaryDialog( vcl::Window* pParent,
373 : ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XSpellChecker1 > &xSpl ) = 0;
374 : virtual VclAbstractDialog * CreateSvxEditDictionaryDialog( vcl::Window* pParent,
375 : const OUString& rName,
376 : ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XSpellChecker1> &xSpl,
377 : sal_uInt32 nResId) = 0;
378 : virtual AbstractSvxNameDialog * CreateSvxNameDialog( vcl::Window* pParent,
379 : const OUString& rName, const OUString& rDesc ) = 0;
380 :
381 : // #i68101#
382 : virtual AbstractSvxObjectNameDialog* CreateSvxObjectNameDialog(vcl::Window* pParent, const OUString& rName ) = 0;
383 : virtual AbstractSvxObjectTitleDescDialog* CreateSvxObjectTitleDescDialog(vcl::Window* pParent, const OUString& rTitle, const OUString& rDescription) = 0;
384 :
385 : virtual AbstractSvxMessDialog * CreateSvxMessDialog( vcl::Window* pParent, sal_uInt32 nResId,
386 : const OUString& rText, const OUString& rDesc,
387 : Image* pImg = NULL ) = 0;
388 :
389 : virtual AbstractSvxMultiPathDialog * CreateSvxMultiPathDialog(vcl::Window* pParent) = 0 ;
390 : virtual AbstractSvxMultiPathDialog * CreateSvxPathSelectDialog(vcl::Window* pParent) = 0 ;
391 : virtual AbstractSvxHpLinkDlg * CreateSvxHpLinkDlg (vcl::Window* pParent,
392 : SfxBindings* pBindings,
393 : sal_uInt32 nResId)=0;
394 : virtual AbstractFmSearchDialog* CreateFmSearchDialog(vcl::Window* pParent,
395 : const OUString& strInitialText,
396 : const ::std::vector< OUString >& _rContexts,
397 : sal_Int16 nInitialContext,
398 : const Link& lnkContextSupplier)=0;
399 : virtual AbstractGraphicFilterDialog * CreateGraphicFilterEmboss(vcl::Window* pParent,
400 : const Graphic& rGraphic,
401 : RECT_POINT eLightSource)=0;
402 : virtual AbstractGraphicFilterDialog * CreateGraphicFilterPoster(vcl::Window* pParent,
403 : const Graphic& rGraphic,
404 : sal_uInt16 nCount)=0;
405 : virtual AbstractGraphicFilterDialog * CreateGraphicFilterSepia (vcl::Window* pParent,
406 : const Graphic& rGraphic,
407 : sal_uInt16 nCount)=0;
408 : virtual AbstractGraphicFilterDialog * CreateGraphicFilterSmooth (vcl::Window* pParent,
409 : const Graphic& rGraphic,
410 : double nRadius)=0;
411 : virtual AbstractGraphicFilterDialog * CreateGraphicFilterSolarize (vcl::Window* pParent,
412 : const Graphic& rGraphic,
413 : sal_uInt8 nGreyThreshold, bool bInvert)=0;
414 : virtual AbstractGraphicFilterDialog * CreateGraphicFilterMosaic (vcl::Window* pParent,
415 : const Graphic& rGraphic,
416 : sal_uInt16 nTileWidth, sal_uInt16 nTileHeight, bool bEnhanceEdges)=0;
417 : virtual AbstractSvxAreaTabDialog* CreateSvxAreaTabDialog( vcl::Window* pParent,
418 : const SfxItemSet* pAttr,
419 : SdrModel* pModel,
420 : bool bShadow) = 0 ;
421 : virtual SfxAbstractTabDialog* CreateSvxLineTabDialog( vcl::Window* pParent, const SfxItemSet* pAttr, //add forSvxLineTabDialog
422 : SdrModel* pModel,
423 : const SdrObject* pObj = NULL,
424 : bool bHasObj = true )=0;
425 : virtual VclAbstractDialog* CreateSfxDialog( vcl::Window* pParent, const SfxBindings& rBindings, sal_uInt32 nResId ) SAL_OVERRIDE = 0;
426 : virtual SfxAbstractDialog* CreateSfxDialog( vcl::Window* pParent,
427 : const SfxItemSet& rAttr,
428 : const SdrView* pView,
429 : sal_uInt32 nResId
430 : )=0;
431 : virtual SfxAbstractDialog* CreateSfxDialog( vcl::Window* pParent,
432 : const SfxItemSet& rAttr,
433 : const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxFrame,
434 : sal_uInt32 nResId
435 : )=0;
436 : virtual AbstractSvxPostItDialog* CreateSvxPostItDialog( vcl::Window* pParent,
437 : const SfxItemSet& rCoreSet,
438 : bool bPrevNext = false) = 0;
439 : virtual VclAbstractDialog* CreateSvxScriptOrgDialog( vcl::Window* pParent, const OUString& rLanguage ) SAL_OVERRIDE = 0;
440 :
441 : virtual CreateSvxDistributePage GetSvxDistributePageCreatorFunc() = 0;
442 : virtual DialogGetRanges GetDialogGetRangesFunc() = 0;
443 :
444 : virtual AbstractScriptSelectorDialog*
445 : CreateScriptSelectorDialog(
446 : vcl::Window* pParent,
447 : bool bShowSlots,
448 : const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxFrame
449 : ) SAL_OVERRIDE = 0;
450 :
451 : virtual VclAbstractDialog* CreateScriptErrorDialog(
452 : vcl::Window* pParent, com::sun::star::uno::Any aException) SAL_OVERRIDE = 0;
453 :
454 : virtual VclAbstractDialog* CreateSvxMacroAssignDlg(
455 : vcl::Window* _pParent,
456 : const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxDocumentFrame,
457 : const bool _bUnoDialogMode,
458 : const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace >& _rxEvents,
459 : const sal_uInt16 _nInitiallySelectedEvent
460 : ) = 0;
461 :
462 : virtual SfxAbstractTabDialog* CreateSvxFormatCellsDialog( vcl::Window* pParent, const SfxItemSet* pAttr, SdrModel* pModel, const SdrObject* pObj = NULL )=0;
463 :
464 : virtual SvxAbstractSplittTableDialog* CreateSvxSplittTableDialog( vcl::Window* pParent, bool bIsTableVertical, long nMaxVertical, long nMaxHorizontal )=0;
465 :
466 : virtual SvxAbstractNewTableDialog* CreateSvxNewTableDialog( vcl::Window* pParent ) = 0;
467 :
468 : virtual SvxAbstractInsRowColDlg* CreateSvxInsRowColDlg( vcl::Window* pParent, bool bCol, const OString& sHelpId ) = 0;
469 : };
470 :
471 : #endif
472 :
473 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|