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)(Window *pParent, const SfxItemSet &rAttrSet, SvxDistributeHorizontal eHor, SvxDistributeVertical eVer);
46 : typedef 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 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 : class AbstractSvxSearchFormatDialog : public SfxAbstractTabDialog //for SvxSearchFormatDialog
149 : {
150 : public:
151 : //From class Window.
152 : virtual void SetText( const OUString& rStr ) SAL_OVERRIDE =0 ;
153 : virtual OUString GetText() const SAL_OVERRIDE =0 ;
154 : };
155 :
156 0 : class AbstractSvxSearchSimilarityDialog :public VclAbstractDialog
157 : {
158 : public:
159 : virtual sal_uInt16 GetOther() =0 ;
160 : virtual sal_uInt16 GetShorter() =0 ;
161 : virtual sal_uInt16 GetLonger() =0 ;
162 : virtual bool IsRelaxed() =0 ;
163 : };
164 :
165 0 : class AbstractSvxJSearchOptionsDialog :public VclAbstractDialog
166 : {
167 : public:
168 : virtual sal_Int32 GetTransliterationFlags() const = 0;
169 : };
170 :
171 0 : class AbstractFmInputRecordNoDialog :public VclAbstractDialog
172 : {
173 : public:
174 : virtual void SetValue(long dNew) = 0;
175 : virtual long GetValue() const = 0;
176 : };
177 :
178 0 : class AbstractSvxNewDictionaryDialog :public VclAbstractDialog
179 : {
180 : public:
181 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XDictionary > GetNewDictionary() = 0;
182 : };
183 :
184 0 : class AbstractSvxNameDialog :public VclAbstractDialog
185 : {
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;
193 : };
194 :
195 0 : class AbstractSvxObjectNameDialog :public VclAbstractDialog
196 : {
197 : public:
198 : virtual void GetName(OUString& rName) = 0;
199 : virtual void SetCheckNameHdl(const Link& rLink, bool bCheckImmediately = false) = 0;
200 : };
201 :
202 0 : class AbstractSvxObjectTitleDescDialog :public VclAbstractDialog
203 : {
204 : public:
205 : virtual void GetTitle(OUString& rTitle) = 0;
206 : virtual void GetDescription(OUString& rDescription) = 0;
207 : };
208 :
209 0 : class AbstractSvxMessDialog :public VclAbstractDialog
210 : {
211 : public:
212 : virtual void SetButtonText( sal_uInt16 nBtnId, const OUString& rNewTxt ) = 0;
213 : };
214 :
215 0 : class AbstractSvxMultiPathDialog : public VclAbstractDialog
216 : {
217 : public:
218 : virtual OUString GetPath() const = 0;
219 : virtual void SetPath( const OUString& rPath ) = 0;
220 : virtual void SetTitle( const OUString& rNewTitle ) = 0;
221 : };
222 :
223 : class AbstractSvxMultiFileDialog : public AbstractSvxMultiPathDialog
224 : {
225 : public:
226 : virtual OUString GetFiles() const = 0;
227 : virtual void SetFiles( const OUString& rPath ) = 0;
228 : //from SvxMultiPathDialog
229 : virtual void SetClassPathMode() = 0;
230 : //From Class Window
231 : virtual void SetHelpId( const OString& ) = 0;
232 : };
233 :
234 0 : class AbstractSvxHpLinkDlg : public VclAbstractDialog
235 : {
236 : public:
237 : virtual Window* GetWindow() = 0;
238 : virtual bool QueryClose() = 0;
239 : };
240 :
241 0 : class AbstractFmSearchDialog :public VclAbstractDialog
242 : {
243 : public:
244 : virtual void SetFoundHandler(const Link& lnk) = 0;
245 : virtual void SetCanceledNotFoundHdl(const Link& lnk)=0;
246 : virtual void SetActiveField(const OUString& strField)=0;
247 : };
248 :
249 0 : class AbstractGraphicFilterDialog :public VclAbstractDialog
250 : {
251 : public:
252 : virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ) = 0;
253 : };
254 :
255 0 : class AbstractSvxAreaTabDialog :public SfxAbstractTabDialog
256 : {
257 : };
258 :
259 0 : class AbstractSvxTransformTabDialog : public SfxAbstractTabDialog
260 : {
261 : public:
262 : virtual void SetValidateFramePosLink( const Link& rLink ) = 0;
263 : };
264 :
265 0 : class AbstractSvxCaptionDialog : public SfxAbstractTabDialog
266 : {
267 : public:
268 : virtual void SetValidateFramePosLink( const Link& rLink ) = 0;
269 : };
270 :
271 0 : class AbstractSvxPostItDialog :public VclAbstractDialog
272 : {
273 : public:
274 : virtual void SetText( const OUString& rStr ) = 0; //From class Window
275 : virtual const SfxItemSet* GetOutputItemSet() const = 0;
276 : virtual void SetPrevHdl( const Link& rLink ) = 0;
277 : virtual void SetNextHdl( const Link& rLink ) = 0;
278 : virtual void EnableTravel(bool bNext, bool bPrev) = 0;
279 : virtual OUString GetNote() = 0;
280 : virtual void SetNote(const OUString& rTxt) = 0;
281 : virtual void ShowLastAuthor(const OUString& rAuthor, const OUString& rDate) = 0;
282 : virtual void DontChangeAuthor() = 0;
283 : virtual void HideAuthor() = 0;
284 : virtual void SetReadonlyPostIt(bool bDisable) = 0;
285 : virtual bool IsOkEnabled() const = 0;
286 : virtual Window * GetWindow() = 0;
287 : };
288 :
289 0 : class SvxAbstractSplittTableDialog : public VclAbstractDialog
290 : {
291 : public:
292 : virtual bool IsHorizontal() const = 0;
293 : virtual bool IsProportional() const = 0;
294 : virtual long GetCount() const = 0;
295 : };
296 :
297 0 : class SvxAbstractNewTableDialog : public VclAbstractDialog
298 : {
299 : public:
300 : virtual sal_Int32 getRows() const = 0;
301 : virtual sal_Int32 getColumns() const = 0;
302 : };
303 :
304 0 : class SvxAbstractInsRowColDlg : public VclAbstractDialog
305 : {
306 : public:
307 : virtual bool isInsertBefore() const = 0;
308 : virtual sal_uInt16 getInsertCount() const = 0;
309 : };
310 :
311 0 : class SVX_DLLPUBLIC SvxAbstractDialogFactory : public SfxAbstractDialogFactory, public EditAbstractDialogFactory
312 : {
313 : public:
314 : static SvxAbstractDialogFactory* Create();
315 :
316 : // define dtor as this will create typeinfo and in svx library and export vtable
317 : virtual ~SvxAbstractDialogFactory();
318 :
319 : virtual SfxAbstractTabDialog* CreateTextTabDialog( Window* pParent,
320 : const SfxItemSet* pAttrSet,
321 : SdrView* pView,
322 : SdrModel* pModel=0 ) = 0 ;
323 :
324 : virtual AbstractSvxCaptionDialog* CreateCaptionDialog( Window* pParent,
325 : const SdrView* pView,
326 : sal_uInt16 nAnchorTypes = 0 ) = 0;
327 :
328 : virtual AbstractSvxDistributeDialog* CreateSvxDistributeDialog(Window* pParent,
329 : const SfxItemSet& rAttr,
330 : SvxDistributeHorizontal eHor = SvxDistributeHorizontalNone,
331 : SvxDistributeVertical eVer = SvxDistributeVerticalNone)= 0;
332 :
333 : virtual AbstractFmShowColsDialog * CreateFmShowColsDialog( Window* pParent ) = 0;
334 :
335 : virtual AbstractSvxZoomDialog * CreateSvxZoomDialog( Window* pParent,
336 : const SfxItemSet& rCoreSet )=0;
337 :
338 : virtual AbstractSpellDialog * CreateSvxSpellDialog(Window* pParent,
339 : SfxBindings* pBindings,
340 : svx::SpellDialogChildWindow* pSpellChildWindow )=0;
341 :
342 : virtual VclAbstractRefreshableDialog * CreateActualizeProgressDialog( Window* pParent,
343 : GalleryTheme* pThm ) = 0;
344 : virtual AbstractSearchProgress * CreateSearchProgressDialog( Window* pParent,
345 : const INetURLObject& rStartURL ) = 0;
346 : virtual AbstractTakeProgress * CreateTakeProgressDialog( Window* pParent ) = 0;
347 : virtual AbstractTitleDialog * CreateTitleDialog( Window* pParent,
348 : const OUString& rOldText ) = 0;
349 : virtual AbstractGalleryIdDialog * CreateGalleryIdDialog( Window* pParent,
350 : GalleryTheme* pThm ) = 0;
351 : virtual VclAbstractDialog2 * CreateGalleryThemePropertiesDialog( Window* pParent,
352 : ExchangeData* pData,
353 : SfxItemSet* pItemSet ) = 0;
354 : virtual AbstractURLDlg * CreateURLDialog( Window* pParent,
355 : const OUString& rURL, const OUString& rAltText, const OUString& rDescription,
356 : const OUString& rTarget, const OUString& rName,
357 : TargetList& rTargetList ) = 0;
358 : virtual AbstractSvxHlinkDlgMarkWnd* CreateSvxHlinkDlgMarkWndDialog( SvxHyperlinkTabPageBase* pParent, sal_uInt32 nResId ) =0;
359 :
360 : virtual SfxAbstractTabDialog* CreateTabItemDialog(Window* pParent,
361 : const SfxItemSet& rSet) = 0;
362 : virtual VclAbstractDialog* CreateSvxSearchAttributeDialog( Window* pParent,
363 : SearchAttrItemList& rLst,
364 : const sal_uInt16* pWhRanges)=0;
365 : virtual AbstractSvxSearchSimilarityDialog * CreateSvxSearchSimilarityDialog( Window* pParent,
366 : bool bRelax,
367 : sal_uInt16 nOther,
368 : sal_uInt16 nShorter,
369 : sal_uInt16 nLonger ) = 0;
370 : virtual SfxAbstractTabDialog* CreateSvxBorderBackgroundDlg( Window* pParent,
371 : const SfxItemSet& rCoreSet,
372 : bool bEnableSelector = false) = 0;
373 : virtual AbstractSvxTransformTabDialog* CreateSvxTransformTabDialog( Window* pParent,
374 : const SfxItemSet* pAttr,
375 : const SdrView* pView,
376 : sal_uInt16 nAnchorTypes = 0) = 0;
377 : virtual SfxAbstractTabDialog* CreateSchTransformTabDialog( Window* pParent,
378 : const SfxItemSet* pAttr,
379 : const SdrView* pSdrView,
380 : sal_uInt32 nResId,
381 : bool bSizeTabPage = false
382 : )=0;
383 : virtual AbstractSvxJSearchOptionsDialog * CreateSvxJSearchOptionsDialog( Window* pParent,
384 : const SfxItemSet& rOptionsSet,
385 : sal_Int32 nInitialFlags )=0;
386 : virtual AbstractFmInputRecordNoDialog * CreateFmInputRecordNoDialog( Window* pParent ) = 0;
387 : virtual AbstractSvxNewDictionaryDialog* CreateSvxNewDictionaryDialog( Window* pParent,
388 : ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XSpellChecker1 > &xSpl ) = 0;
389 : virtual VclAbstractDialog * CreateSvxEditDictionaryDialog( Window* pParent,
390 : const OUString& rName,
391 : ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XSpellChecker1> &xSpl,
392 : sal_uInt32 nResId) = 0;
393 : virtual AbstractSvxNameDialog * CreateSvxNameDialog( Window* pParent,
394 : const OUString& rName, const OUString& rDesc ) = 0;
395 :
396 : // #i68101#
397 : virtual AbstractSvxObjectNameDialog* CreateSvxObjectNameDialog(Window* pParent, const OUString& rName ) = 0;
398 : virtual AbstractSvxObjectTitleDescDialog* CreateSvxObjectTitleDescDialog(Window* pParent, const OUString& rTitle, const OUString& rDescription) = 0;
399 :
400 : virtual AbstractSvxMessDialog * CreateSvxMessDialog( Window* pParent, sal_uInt32 nResId,
401 : const OUString& rText, const OUString& rDesc,
402 : Image* pImg = NULL ) = 0;
403 :
404 : virtual AbstractSvxMultiPathDialog * CreateSvxMultiPathDialog(Window* pParent) = 0 ;
405 : virtual AbstractSvxMultiPathDialog * CreateSvxPathSelectDialog(Window* pParent) = 0 ;
406 : virtual AbstractSvxHpLinkDlg * CreateSvxHpLinkDlg (Window* pParent,
407 : SfxBindings* pBindings,
408 : sal_uInt32 nResId)=0;
409 : virtual AbstractFmSearchDialog* CreateFmSearchDialog(Window* pParent,
410 : const OUString& strInitialText,
411 : const ::std::vector< OUString >& _rContexts,
412 : sal_Int16 nInitialContext,
413 : const Link& lnkContextSupplier)=0;
414 : virtual AbstractGraphicFilterDialog * CreateGraphicFilterEmboss(Window* pParent,
415 : const Graphic& rGraphic,
416 : RECT_POINT eLightSource)=0;
417 : virtual AbstractGraphicFilterDialog * CreateGraphicFilterPoster(Window* pParent,
418 : const Graphic& rGraphic,
419 : sal_uInt16 nCount)=0;
420 : virtual AbstractGraphicFilterDialog * CreateGraphicFilterSepia (Window* pParent,
421 : const Graphic& rGraphic,
422 : sal_uInt16 nCount)=0;
423 : virtual AbstractGraphicFilterDialog * CreateGraphicFilterSmooth (Window* pParent,
424 : const Graphic& rGraphic,
425 : double nRadius)=0;
426 : virtual AbstractGraphicFilterDialog * CreateGraphicFilterSolarize (Window* pParent,
427 : const Graphic& rGraphic,
428 : sal_uInt8 nGreyThreshold, bool bInvert)=0;
429 : virtual AbstractGraphicFilterDialog * CreateGraphicFilterMosaic (Window* pParent,
430 : const Graphic& rGraphic,
431 : sal_uInt16 nTileWidth, sal_uInt16 nTileHeight, bool bEnhanceEdges)=0;
432 : virtual AbstractSvxAreaTabDialog* CreateSvxAreaTabDialog( Window* pParent,
433 : const SfxItemSet* pAttr,
434 : SdrModel* pModel,
435 : bool bShadow) = 0 ;
436 : virtual SfxAbstractTabDialog* CreateSvxLineTabDialog( Window* pParent, const SfxItemSet* pAttr, //add forSvxLineTabDialog
437 : SdrModel* pModel,
438 : const SdrObject* pObj = NULL,
439 : bool bHasObj = true )=0;
440 : virtual VclAbstractDialog* CreateSfxDialog( Window* pParent, const SfxBindings& rBindings, sal_uInt32 nResId ) SAL_OVERRIDE = 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 : bool bPrevNext = false) = 0;
454 : virtual VclAbstractDialog* CreateSvxScriptOrgDialog( Window* pParent, const OUString& rLanguage ) SAL_OVERRIDE = 0;
455 :
456 : virtual CreateSvxDistributePage GetSvxDistributePageCreatorFunc() = 0;
457 : virtual DialogGetRanges GetDialogGetRangesFunc() = 0;
458 :
459 : virtual AbstractScriptSelectorDialog*
460 : CreateScriptSelectorDialog(
461 : Window* pParent,
462 : bool bShowSlots,
463 : const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxFrame
464 : ) SAL_OVERRIDE = 0;
465 :
466 : virtual VclAbstractDialog* CreateScriptErrorDialog(
467 : Window* pParent, com::sun::star::uno::Any aException) SAL_OVERRIDE = 0;
468 :
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;
476 :
477 : virtual SfxAbstractTabDialog* CreateSvxFormatCellsDialog( Window* pParent, const SfxItemSet* pAttr, SdrModel* pModel, const SdrObject* pObj = NULL )=0;
478 :
479 : virtual SvxAbstractSplittTableDialog* CreateSvxSplittTableDialog( Window* pParent, bool bIsTableVertical, long nMaxVertical, long nMaxHorizontal )=0;
480 :
481 : virtual SvxAbstractNewTableDialog* CreateSvxNewTableDialog( Window* pParent ) = 0;
482 :
483 : virtual SvxAbstractInsRowColDlg* CreateSvxInsRowColDlg( Window* pParent, bool bCol, const OString& sHelpId ) = 0;
484 : };
485 :
486 : #endif
487 :
488 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|