dlgfact.hxx 37.2 KB
Newer Older
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
/*
 * This file is part of the LibreOffice project.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * This file incorporates work covered by the following license notice:
 *
 *   Licensed to the Apache Software Foundation (ASF) under one or more
 *   contributor license agreements. See the NOTICE file distributed
 *   with this work for additional information regarding copyright
 *   ownership. The ASF licenses this file to you under the Apache
 *   License, Version 2.0 (the "License"); you may not use this file
 *   except in compliance with the License. You may obtain a copy of
 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 */
19 20
#ifndef INCLUDED_CUI_SOURCE_FACTORY_DLGFACT_HXX
#define INCLUDED_CUI_SOURCE_FACTORY_DLGFACT_HXX
21 22

#include <svx/svxdlg.hxx>
23
#include <svx/zoom_def.hxx>
24 25
#include <com/sun/star/container/XNameReplace.hpp>

26
#include <tools/link.hxx>
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
#include <com/sun/star/frame/XFrame.hpp>

class SfxTabDialog;
class SfxModalDialog;
class Dialog;
class SfxItemPool;
class FmShowColsDialog;
class SvxZoomDialog;
class FmInputRecordNoDialog;
class SvxJSearchOptionsDialog;
class SvxNewDictionaryDialog;
class SvxNameDialog;

// #i68101#
class SvxObjectNameDialog;
class SvxObjectTitleDescDialog;

class SvxMultiPathDialog;
class SvxHpLinkDlg;
class FmSearchDialog;
class Graphic;
48
class GraphicFilterDialog;
49
class GraphicFilterDialogController;
50 51 52 53 54 55
class SvxAreaTabDialog;
class InsertObjectDialog_Impl;
class SvPasteObjectDialog;
class SvBaseLinksDlg;
class SvxTransformTabDialog;
class SvxCaptionTabDialog;
56 57
class SvxThesaurusDialog;
class SvxHyphenWordDialog;
58 59 60 61 62 63 64

namespace svx{
class HangulHanjaConversionDialog;
}
using namespace svx;

#define DECL_ABSTDLG_BASE(Class,DialogClass)        \
65
    ScopedVclPtr<DialogClass> pDlg;                 \
66
public:                                             \
67
    explicit        Class( DialogClass* p)          \
68 69
                     : pDlg(p)                      \
                     {}                             \
70 71
    virtual short   Execute() override;             \
    virtual bool    StartExecuteAsync(VclAbstractDialog::AsyncContext &rCtx) override;
72 73

#define IMPL_ABSTDLG_BASE(Class)                    \
74
short Class::Execute()                              \
75 76
{                                                   \
    return pDlg->Execute();                         \
77 78 79 80
}                                                   \
bool Class::StartExecuteAsync(VclAbstractDialog::AsyncContext &rCtx) \
{                                                   \
    return pDlg->StartExecuteAsync(rCtx);           \
81 82 83 84
}

class VclAbstractDialog2_Impl : public VclAbstractDialog2
{
85
    ScopedVclPtr<Dialog> m_pDlg;
Noel Grandin's avatar
Noel Grandin committed
86
    Link<Dialog&,void>   m_aEndDlgHdl;
87
public:
88
    explicit        VclAbstractDialog2_Impl( Dialog* p ) : m_pDlg( p ) {}
89
    virtual         ~VclAbstractDialog2_Impl() override;
90
    virtual void    dispose() override;
Noel Grandin's avatar
Noel Grandin committed
91
    virtual void    StartExecuteModal( const Link<Dialog&,void>& rEndDialogHdl ) override;
92
    virtual sal_Int32 GetResult() override;
93
private:
94
    DECL_LINK( EndDialogHdl, Dialog&, void );
95 96
};

97
class CuiVclAbstractDialog_Impl : public VclAbstractDialog
98
{
99
    DECL_ABSTDLG_BASE(CuiVclAbstractDialog_Impl,Dialog)
100 101 102 103 104
};

class VclAbstractRefreshableDialog_Impl : public VclAbstractRefreshableDialog
{
    DECL_ABSTDLG_BASE(VclAbstractRefreshableDialog_Impl,Dialog)
105
    virtual void        Update() override ;
106 107
};

108
class CuiAbstractSfxDialog_Impl : public SfxAbstractDialog
109
{
110
    DECL_ABSTDLG_BASE(CuiAbstractSfxDialog_Impl,SfxModalDialog)
111
    virtual const SfxItemSet*   GetOutputItemSet() const override;
112 113

        //From class Window.
114
    virtual void          SetText( const OUString& rStr ) override;
115 116
};

117
class CuiAbstractTabDialog_Impl : public SfxAbstractTabDialog
118
{
119
    DECL_ABSTDLG_BASE(CuiAbstractTabDialog_Impl,SfxTabDialog)
120 121 122 123
    virtual void                SetCurPageId( const OString& rName ) override;
    virtual const SfxItemSet*   GetOutputItemSet() const override;
    virtual const sal_uInt16*       GetInputRanges( const SfxItemPool& pItem ) override;
    virtual void                SetInputSet( const SfxItemSet* pInSet ) override;
124
        //From class Window.
125
    virtual void        SetText( const OUString& rStr ) override;
126 127
};

Caolán McNamara's avatar
Caolán McNamara committed
128 129 130 131 132
class CuiAbstractTabController_Impl : public SfxAbstractTabDialog
{
protected:
    std::unique_ptr<SfxTabDialogController> m_xDlg;
public:
133 134
    explicit CuiAbstractTabController_Impl(std::unique_ptr<SfxTabDialogController> p)
        : m_xDlg(std::move(p))
Caolán McNamara's avatar
Caolán McNamara committed
135 136 137 138 139 140 141 142 143 144 145
    {
    }
    virtual short Execute() override;
    virtual void                SetCurPageId( const OString &rName ) override;
    virtual const SfxItemSet*   GetOutputItemSet() const override;
    virtual const sal_uInt16*   GetInputRanges( const SfxItemPool& pItem ) override;
    virtual void                SetInputSet( const SfxItemSet* pInSet ) override;
        //From class Window.
    virtual void        SetText( const OUString& rStr ) override;
};

146 147 148 149 150
class SvxDistributeDialog;
class AbstractSvxDistributeDialog_Impl: public AbstractSvxDistributeDialog
{
    DECL_ABSTDLG_BASE(AbstractSvxDistributeDialog_Impl,SvxDistributeDialog)
public:
151 152
    virtual SvxDistributeHorizontal GetDistributeHor() const override;
    virtual SvxDistributeVertical GetDistributeVer() const override;
153 154 155 156 157
};

class AbstractHangulHanjaConversionDialog_Impl: public AbstractHangulHanjaConversionDialog
{
    DECL_ABSTDLG_BASE(AbstractHangulHanjaConversionDialog_Impl,HangulHanjaConversionDialog)
158
    virtual void      EndDialog(sal_Int32 nResult) override;
159 160 161 162 163 164 165 166 167 168 169 170 171
    virtual void      EnableRubySupport( bool _bVal ) override;
    virtual void      SetByCharacter( bool _bByCharacter ) override ;
    virtual void      SetConversionDirectionState( bool _bTryBothDirections, editeng::HangulHanjaConversion::ConversionDirection _ePrimaryConversionDirection ) override;
    virtual void      SetConversionFormat( editeng::HangulHanjaConversion::ConversionFormat _eType ) override;
    virtual void      SetOptionsChangedHdl( const Link<LinkParamNone*,void>& _rHdl ) override;
    virtual void      SetIgnoreHdl( const Link<Button*,void>& _rHdl ) override;
    virtual void      SetIgnoreAllHdl( const Link<Button*,void>& _rHdl ) override ;
    virtual void      SetChangeHdl( const Link<Button*,void>& _rHdl ) override ;
    virtual void      SetChangeAllHdl( const Link<Button*,void>& _rHdl ) override ;
    virtual void      SetClickByCharacterHdl( const Link<CheckBox*,void>& _rHdl ) override ;
    virtual void      SetConversionFormatChangedHdl( const Link<Button*,void>& _rHdl ) override ;
    virtual void      SetFindHdl( const Link<Button*,void>& _rHdl ) override;
    virtual bool      GetUseBothDirections( ) const override;
172
    virtual editeng::HangulHanjaConversion::ConversionDirection
173
                      GetDirection( editeng::HangulHanjaConversion::ConversionDirection _eDefaultDirection ) const override;
174 175
    virtual void      SetCurrentString(
                        const OUString& _rNewString,
176
                        const css::uno::Sequence< OUString >& _rSuggestions,
177
                        bool _bOriginatesFromDocument = true
178 179
                      ) override;
    virtual OUString  GetCurrentString( ) const override ;
180
    virtual editeng::HangulHanjaConversion::ConversionFormat
181 182 183
                      GetConversionFormat( ) const override ;
    virtual void      FocusSuggestion( ) override;
    virtual OUString  GetCurrentSuggestion( ) const override;
184 185
};

186 187 188
class AbstractThesaurusDialog_Impl : public AbstractThesaurusDialog
{
    DECL_ABSTDLG_BASE(AbstractThesaurusDialog_Impl,SvxThesaurusDialog)
189
    virtual OUString    GetWord() override;
190 191 192 193 194
};

class AbstractHyphenWordDialog_Impl: public AbstractHyphenWordDialog
{
    DECL_ABSTDLG_BASE(AbstractHyphenWordDialog_Impl,SvxHyphenWordDialog)
195
    virtual vcl::Window* GetWindow() override;
196
};
197 198 199 200 201

class FmShowColsDialog;
class AbstractFmShowColsDialog_Impl : public AbstractFmShowColsDialog
{
    DECL_ABSTDLG_BASE(AbstractFmShowColsDialog_Impl,FmShowColsDialog)
202
     virtual void   SetColumns(const css::uno::Reference< css::container::XIndexContainer>& xCols) override;
203 204 205 206 207
};

class SvxZoomDialog;
class AbstractSvxZoomDialog_Impl : public AbstractSvxZoomDialog
{
Caolán McNamara's avatar
Caolán McNamara committed
208 209 210
protected:
    std::unique_ptr<SvxZoomDialog> m_xDlg;
public:
211 212
    explicit AbstractSvxZoomDialog_Impl(std::unique_ptr<SvxZoomDialog> p)
        : m_xDlg(std::move(p))
Caolán McNamara's avatar
Caolán McNamara committed
213 214 215 216 217
    {
    }
    virtual short Execute() override;
    virtual void  SetLimits( sal_uInt16 nMin, sal_uInt16 nMax ) override;
    virtual void  HideButton( ZoomButtonId nBtnId ) override;
218
    virtual const SfxItemSet*   GetOutputItemSet() const override ;
219 220 221 222 223 224 225
};

namespace svx{ class SpellDialog;}
class AbstractSpellDialog_Impl : public AbstractSpellDialog
{
 public:
    DECL_ABSTDLG_BASE(AbstractSpellDialog_Impl, svx::SpellDialog)
226 227 228
    virtual void        Invalidate() override;
    virtual vcl::Window*     GetWindow() override;
    virtual SfxBindings& GetBindings() override;
229
};
230

231 232 233
class TitleDialog;
class AbstractTitleDialog_Impl : public AbstractTitleDialog
{
Caolán McNamara's avatar
Caolán McNamara committed
234 235 236
protected:
    std::unique_ptr<TitleDialog> m_xDlg;
public:
237 238
    explicit AbstractTitleDialog_Impl(std::unique_ptr<TitleDialog> p)
        : m_xDlg(std::move(p))
Caolán McNamara's avatar
Caolán McNamara committed
239 240 241
    {
    }
    virtual short Execute() override;
242
    virtual OUString  GetTitle() const override ;
243 244 245 246 247 248 249 250 251

};

class SvxScriptSelectorDialog;
class AbstractScriptSelectorDialog_Impl : public AbstractScriptSelectorDialog
{
    DECL_ABSTDLG_BASE(
        AbstractScriptSelectorDialog_Impl, SvxScriptSelectorDialog)

252
    virtual OUString GetScriptURL() const override;
253

254
    virtual void SetRunLabel() override;
255 256 257 258 259
};

class GalleryIdDialog;
class AbstractGalleryIdDialog_Impl : public AbstractGalleryIdDialog
{
Caolán McNamara's avatar
Caolán McNamara committed
260 261 262
protected:
    std::unique_ptr<GalleryIdDialog> m_xDlg;
public:
263 264
    explicit AbstractGalleryIdDialog_Impl(std::unique_ptr<GalleryIdDialog> p)
        : m_xDlg(std::move(p))
Caolán McNamara's avatar
Caolán McNamara committed
265 266 267 268
    {
    }
    virtual short Execute() override;
    virtual sal_uInt32 GetId() const override;
269 270 271 272 273 274
};

class URLDlg;
class AbstractURLDlg_Impl :public AbstractURLDlg
{
    DECL_ABSTDLG_BASE(AbstractURLDlg_Impl,URLDlg)
275 276 277 278 279
    virtual OUString      GetURL() const override;
    virtual OUString      GetAltText() const override;
    virtual OUString      GetDesc() const override;
    virtual OUString      GetTarget() const override;
    virtual OUString      GetName() const override;
280 281 282 283 284
};

class SvxSearchSimilarityDialog;
class AbstractSvxSearchSimilarityDialog_Impl :public AbstractSvxSearchSimilarityDialog
{
285 286 287
protected:
    std::unique_ptr<SvxSearchSimilarityDialog> m_xDlg;
public:
288 289
    explicit AbstractSvxSearchSimilarityDialog_Impl(std::unique_ptr<SvxSearchSimilarityDialog> p)
        : m_xDlg(std::move(p))
290 291 292
    {
    }
    virtual short Execute() override;
293 294 295 296
    virtual sal_uInt16              GetOther() override;
    virtual sal_uInt16              GetShorter() override;
    virtual sal_uInt16              GetLonger() override;
    virtual bool                    IsRelaxed() override;
297 298 299 300 301 302
};

class SvxJSearchOptionsDialog;
class AbstractSvxJSearchOptionsDialog_Impl :public AbstractSvxJSearchOptionsDialog
{
    DECL_ABSTDLG_BASE(AbstractSvxJSearchOptionsDialog_Impl,SvxJSearchOptionsDialog)
303
    virtual TransliterationFlags    GetTransliterationFlags() const override;
304 305 306 307
};

class AbstractSvxTransformTabDialog_Impl : public AbstractSvxTransformTabDialog
{
308 309 310 311 312 313 314 315 316
protected:
    std::shared_ptr<SvxTransformTabDialog> m_xDlg;
public:
    explicit AbstractSvxTransformTabDialog_Impl(SvxTransformTabDialog* p)
        : m_xDlg(p)
    {
    }
    virtual short Execute() override;
    virtual bool StartExecuteAsync(AsyncContext &rCtx) override;
317 318 319 320 321 322
    virtual void SetValidateFramePosLink( const Link<SvxSwFrameValidation&,void>& rLink ) override;
    virtual void                SetCurPageId( const OString& rName ) override;
    virtual const SfxItemSet*   GetOutputItemSet() const override;
    virtual const sal_uInt16*       GetInputRanges( const SfxItemPool& pItem ) override;
    virtual void                SetInputSet( const SfxItemSet* pInSet ) override;
    virtual void        SetText( const OUString& rStr ) override;
323
};
324

325 326
class AbstractSvxCaptionDialog_Impl : public AbstractSvxCaptionDialog
{
327 328 329 330 331 332 333 334 335
protected:
    std::shared_ptr<SvxCaptionTabDialog> m_xDlg;
public:
    explicit AbstractSvxCaptionDialog_Impl(std::unique_ptr<SvxCaptionTabDialog> p)
        : m_xDlg(std::move(p))
    {
    }
    virtual short Execute() override;
    virtual bool StartExecuteAsync(AsyncContext &rCtx) override;
336 337 338 339 340 341
    virtual void SetValidateFramePosLink( const Link<SvxSwFrameValidation&,void>& rLink ) override;
    virtual void                SetCurPageId( const OString& rName ) override;
    virtual const SfxItemSet*   GetOutputItemSet() const override;
    virtual const sal_uInt16*       GetInputRanges( const SfxItemPool& pItem ) override;
    virtual void                SetInputSet( const SfxItemSet* pInSet ) override;
    virtual void        SetText( const OUString& rStr ) override;
342 343 344 345 346
};

class FmInputRecordNoDialog;
class AbstractFmInputRecordNoDialog_Impl :public AbstractFmInputRecordNoDialog
{
347 348 349
protected:
    std::unique_ptr<FmInputRecordNoDialog> m_xDlg;
public:
350 351
    explicit AbstractFmInputRecordNoDialog_Impl(std::unique_ptr<FmInputRecordNoDialog> p)
        : m_xDlg(std::move(p))
352 353 354
    {
    }
    virtual short Execute() override;
355 356
    virtual void SetValue(long nNew) override ;
    virtual long GetValue() const override ;
357 358 359 360 361
};

class SvxNewDictionaryDialog;
class AbstractSvxNewDictionaryDialog_Impl :public AbstractSvxNewDictionaryDialog
{
362 363 364
protected:
    std::unique_ptr<SvxNewDictionaryDialog> m_xDlg;
public:
365 366
    explicit AbstractSvxNewDictionaryDialog_Impl(std::unique_ptr<SvxNewDictionaryDialog> p)
        : m_xDlg(std::move(p))
367 368 369
    {
    }
    virtual short Execute() override;
370
    virtual css::uno::Reference< css::linguistic2::XDictionary >  GetNewDictionary() override;
371 372 373 374 375
};

class SvxNameDialog;
class AbstractSvxNameDialog_Impl :public AbstractSvxNameDialog
{
Caolán McNamara's avatar
Caolán McNamara committed
376 377 378
protected:
    std::unique_ptr<SvxNameDialog> m_xDlg;
public:
379 380
    explicit AbstractSvxNameDialog_Impl(std::unique_ptr<SvxNameDialog> p)
        : m_xDlg(std::move(p))
Caolán McNamara's avatar
Caolán McNamara committed
381 382 383
    {
    }
    virtual short Execute() override;
384 385 386
    virtual void    GetName( OUString& rName ) override ;
    virtual void    SetCheckNameHdl( const Link<AbstractSvxNameDialog&,bool>& rLink, bool bCheckImmediately = false ) override ;
    virtual void    SetEditHelpId(const OString&) override ;
387
    //from class Window
388 389
    virtual void    SetHelpId( const OString& ) override ;
    virtual void    SetText( const OUString& rStr ) override ;
390
private:
Noel Grandin's avatar
Noel Grandin committed
391
    Link<AbstractSvxNameDialog&,bool> aCheckNameHdl;
392
    DECL_LINK(CheckNameHdl, SvxNameDialog&, bool);
393 394 395 396 397
};

class SvxObjectNameDialog;
class SvxObjectTitleDescDialog;

398
class AbstractSvxObjectNameDialog_Impl : public AbstractSvxObjectNameDialog
399
{
400 401 402
protected:
    std::unique_ptr<SvxObjectNameDialog> m_xDlg;
public:
403 404
    explicit AbstractSvxObjectNameDialog_Impl(std::unique_ptr<SvxObjectNameDialog> p)
        : m_xDlg(std::move(p))
405 406 407
    {
    }
    virtual short Execute() override;
408
    virtual void GetName(OUString& rName) override ;
409
    virtual void SetCheckNameHdl(const Link<AbstractSvxObjectNameDialog&,bool>& rLink) override;
410 411

private:
Noel Grandin's avatar
Noel Grandin committed
412
    Link<AbstractSvxObjectNameDialog&,bool> aCheckNameHdl;
413
    DECL_LINK(CheckNameHdl, SvxObjectNameDialog&, bool);
414 415 416 417
};

class AbstractSvxObjectTitleDescDialog_Impl :public AbstractSvxObjectTitleDescDialog
{
418 419 420
protected:
    std::unique_ptr<SvxObjectTitleDescDialog> m_xDlg;
public:
421 422
    explicit AbstractSvxObjectTitleDescDialog_Impl(std::unique_ptr<SvxObjectTitleDescDialog> p)
        : m_xDlg(std::move(p))
423 424 425
    {
    }
    virtual short Execute() override;
426 427
    virtual void GetTitle(OUString& rName) override;
    virtual void GetDescription(OUString& rName) override;
428 429 430
};

class SvxMultiPathDialog;
431
class AbstractSvxMultiPathDialog_Impl : public AbstractSvxMultiPathDialog
432 433
{
    DECL_ABSTDLG_BASE(AbstractSvxMultiPathDialog_Impl,SvxMultiPathDialog)
434 435 436
    virtual OUString        GetPath() const override;
    virtual void            SetPath( const OUString& rPath ) override;
    virtual void            SetTitle( const OUString& rNewTitle ) override;
437 438 439 440 441
};

class SvxPathSelectDialog;
class AbstractSvxPathSelectDialog_Impl : public AbstractSvxMultiPathDialog
{
442 443 444
protected:
    std::unique_ptr<SvxPathSelectDialog> m_xDlg;
public:
445 446
    explicit AbstractSvxPathSelectDialog_Impl(std::unique_ptr<SvxPathSelectDialog> p)
        : m_xDlg(std::move(p))
447 448 449
    {
    }
    virtual short Execute() override;
450 451 452
    virtual OUString        GetPath() const override;
    virtual void            SetPath( const OUString& rPath ) override;
    virtual void            SetTitle( const OUString& rNewTitle ) override;
453 454 455 456 457 458
};

class SvxHpLinkDlg;
class AbstractSvxHpLinkDlg_Impl :public AbstractSvxHpLinkDlg
{
    DECL_ABSTDLG_BASE(AbstractSvxHpLinkDlg_Impl,SvxHpLinkDlg)
459 460
    virtual vcl::Window*     GetWindow() override;
    virtual bool        QueryClose() override;
461 462 463
};

class FmSearchDialog;
Noel Grandin's avatar
Noel Grandin committed
464
struct FmFoundRecordInformation;
465 466 467
class AbstractFmSearchDialog_Impl :public AbstractFmSearchDialog
{
    DECL_ABSTDLG_BASE(AbstractFmSearchDialog_Impl,FmSearchDialog)
468 469 470
    virtual void SetFoundHandler(const Link<FmFoundRecordInformation&,void>& lnk) override ;
    virtual void SetCanceledNotFoundHdl(const Link<FmFoundRecordInformation&,void>& lnk) override;
    virtual void SetActiveField(const OUString& strField) override;
471 472 473 474
};

class AbstractGraphicFilterDialog_Impl :public AbstractGraphicFilterDialog
{
475
    DECL_ABSTDLG_BASE(AbstractGraphicFilterDialog_Impl,GraphicFilterDialog)
476
    virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ) override;
477 478
};

479 480 481 482 483 484 485 486 487 488 489 490 491
class AbstractGraphicFilterDialogController_Impl : public AbstractGraphicFilterDialog
{
protected:
    std::unique_ptr<GraphicFilterDialogController> m_xDlg;
public:
    explicit AbstractGraphicFilterDialogController_Impl(std::unique_ptr<GraphicFilterDialogController> p)
        : m_xDlg(std::move(p))
    {
    }
    virtual short Execute() override;
    virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ) override;
};

492
class SvxAreaTabDialog;
Caolán McNamara's avatar
Caolán McNamara committed
493
class AbstractSvxAreaTabDialog_Impl : public AbstractSvxAreaTabDialog
494
{
Caolán McNamara's avatar
Caolán McNamara committed
495 496 497 498 499 500 501 502 503 504 505 506 507 508
protected:
    std::shared_ptr<SvxAreaTabDialog> m_xDlg;
public:
    explicit AbstractSvxAreaTabDialog_Impl(std::unique_ptr<SvxAreaTabDialog> p)
        : m_xDlg(std::move(p))
    {
    }
    virtual short Execute() override;
    virtual bool StartExecuteAsync(AsyncContext &rCtx) override;
    virtual void SetCurPageId(const OString& rName) override;
    virtual const SfxItemSet* GetOutputItemSet() const override;
    virtual const sal_uInt16* GetInputRanges(const SfxItemPool& pItem) override;
    virtual void SetInputSet(const SfxItemSet* pInSet) override;
    virtual void SetText(const OUString& rStr) override;
509 510 511 512
};

class AbstractInsertObjectDialog_Impl : public SfxAbstractInsertObjectDialog
{
Caolán McNamara's avatar
Caolán McNamara committed
513 514 515
protected:
    std::unique_ptr<InsertObjectDialog_Impl> m_xDlg;
public:
516 517
    explicit AbstractInsertObjectDialog_Impl(std::unique_ptr<InsertObjectDialog_Impl> p)
        : m_xDlg(std::move(p))
Caolán McNamara's avatar
Caolán McNamara committed
518 519 520
    {
    }
    virtual short Execute() override;
521 522 523
    virtual css::uno::Reference < css::embed::XEmbeddedObject > GetObject() override;
    virtual css::uno::Reference< css::io::XInputStream > GetIconIfIconified( OUString* pGraphicMediaType ) override;
    virtual bool IsCreateNew() override;
524 525 526 527
};

class AbstractPasteDialog_Impl : public SfxAbstractPasteDialog
{
528 529 530
protected:
    std::unique_ptr<SvPasteObjectDialog> m_xDlg;
public:
531 532
    explicit AbstractPasteDialog_Impl(std::unique_ptr<SvPasteObjectDialog> p)
        : m_xDlg(std::move(p))
533 534 535
    {
    }
    virtual short Execute() override;
536
public:
537 538
    virtual void Insert( SotClipboardFormatId nFormat, const OUString & rFormatName ) override;
    virtual void SetObjName( const SvGlobalName & rClass, const OUString & rObjName ) override;
539
    virtual SotClipboardFormatId GetFormat( const TransferableDataHelper& aHelper ) override;
540 541 542 543 544 545 546 547 548 549 550
};

class AbstractLinksDialog_Impl : public SfxAbstractLinksDialog
{
public:
    DECL_ABSTDLG_BASE(AbstractLinksDialog_Impl, SvBaseLinksDlg )
};

class SvxPostItDialog;
class AbstractSvxPostItDialog_Impl :public AbstractSvxPostItDialog
{
Caolán McNamara's avatar
Caolán McNamara committed
551 552 553
private:
    std::unique_ptr<SvxPostItDialog> m_xDlg;
public:
554 555
    AbstractSvxPostItDialog_Impl(std::unique_ptr<SvxPostItDialog> pDlg)
        : m_xDlg(std::move(pDlg))
Caolán McNamara's avatar
Caolán McNamara committed
556 557 558
    {
    }
    virtual short               Execute() override;
559 560
    virtual void                SetText( const OUString& rStr ) override;  //From class Window
    virtual const SfxItemSet*   GetOutputItemSet() const override;
Caolán McNamara's avatar
Caolán McNamara committed
561 562 563 564 565 566 567 568 569
    virtual void                SetPrevHdl( const Link<AbstractSvxPostItDialog&,void>& rLink ) override;
    virtual void                SetNextHdl( const Link<AbstractSvxPostItDialog&,void>& rLink ) override;
    virtual void                EnableTravel(bool bNext, bool bPrev) override;
    virtual OUString            GetNote() override;
    virtual void                SetNote(const OUString& rTxt) override;
    virtual void                ShowLastAuthor(const OUString& rAuthor, const OUString& rDate) override;
    virtual void                DontChangeAuthor() override;
    virtual void                HideAuthor() override;
    virtual std::shared_ptr<weld::Dialog> GetDialog() override;
570
private:
Noel Grandin's avatar
Noel Grandin committed
571 572
    Link<AbstractSvxPostItDialog&,void> aNextHdl;
    Link<AbstractSvxPostItDialog&,void> aPrevHdl;
573 574
    DECL_LINK(NextHdl, SvxPostItDialog&, void);
    DECL_LINK(PrevHdl, SvxPostItDialog&, void);
575 576
};

577 578 579
class PasswordToOpenModifyDialog;
class AbstractPasswordToOpenModifyDialog_Impl : public AbstractPasswordToOpenModifyDialog
{
580 581 582
protected:
    std::unique_ptr<PasswordToOpenModifyDialog> m_xDlg;
public:
583 584
    explicit AbstractPasswordToOpenModifyDialog_Impl(std::unique_ptr<PasswordToOpenModifyDialog> p)
        : m_xDlg(std::move(p))
585 586 587
    {
    }
    virtual short Execute() override;
588 589 590
    virtual OUString  GetPasswordToOpen() const override;
    virtual OUString  GetPasswordToModify() const override;
    virtual bool      IsRecommendToOpenReadonly() const override;
591 592
};

593 594 595 596 597 598
class SvxCharacterMap;
class AbstractSvxCharacterMapDialog_Impl : public SfxAbstractDialog
{
protected:
    std::unique_ptr<SvxCharacterMap> m_xDlg;
public:
599 600
    explicit AbstractSvxCharacterMapDialog_Impl(std::unique_ptr<SvxCharacterMap> p)
        : m_xDlg(std::move(p))
601 602 603 604 605 606 607
    {
    }
    virtual short Execute() override;
    virtual const SfxItemSet* GetOutputItemSet() const override;
    virtual void  SetText(const OUString& rStr) override;
};

608 609 610 611 612 613
class ScreenshotAnnotationDlg;
class AbstractScreenshotAnnotationDlg_Impl : public AbstractScreenshotAnnotationDlg
{
    DECL_ABSTDLG_BASE(AbstractScreenshotAnnotationDlg_Impl, ScreenshotAnnotationDlg)
};

614 615 616 617 618 619 620
class SignatureLineDialog;
class AbstractSignatureLineDialog_Impl : public AbstractSignatureLineDialog
{
protected:
    std::unique_ptr<SignatureLineDialog> m_xDlg;

public:
621 622
    explicit AbstractSignatureLineDialog_Impl(std::unique_ptr<SignatureLineDialog> p)
        : m_xDlg(std::move(p))
623 624 625 626 627
    {
    }
    virtual short Execute() override;
};

628 629 630 631 632 633 634
class SignSignatureLineDialog;
class AbstractSignSignatureLineDialog_Impl : public AbstractSignSignatureLineDialog
{
protected:
    std::unique_ptr<SignSignatureLineDialog> m_xDlg;

public:
635 636
    explicit AbstractSignSignatureLineDialog_Impl(std::unique_ptr<SignSignatureLineDialog> p)
        : m_xDlg(std::move(p))
637 638 639 640 641
    {
    }
    virtual short Execute() override;
};

642 643 644 645
//AbstractDialogFactory_Impl implementations
class AbstractDialogFactory_Impl : public SvxAbstractDialogFactory
{
public:
646
    virtual VclPtr<VclAbstractDialog>    CreateVclDialog( vcl::Window* pParent, sal_uInt32 nResId ) override;
647

648
    virtual VclPtr<SfxAbstractDialog>    CreateSfxDialog( vcl::Window* pParent,
649 650
                                            const SfxItemSet& rAttr,
                                            const SdrView* pView,
651
                                            sal_uInt32 nResId ) override;
652
    virtual VclPtr<SfxAbstractDialog>    CreateCharMapDialog(weld::Window* pParent,
653
                                                             const SfxItemSet& rAttr,
654
                                                             bool bInsert) override;
655
    virtual VclPtr<SfxAbstractDialog>    CreateEventConfigDialog( vcl::Window* pParent,
656
                                                             const SfxItemSet& rAttr,
657 658
                                                             const css::uno::Reference< css::frame::XFrame >& _rxFrame
                                                             ) override;
659
    virtual VclPtr<VclAbstractDialog>    CreateFrameDialog(vcl::Window* pParent, const css::uno::Reference< css::frame::XFrame >& rxFrame,
660
                                                           sal_uInt32 nResId,
661
                                                           const OUString& rParameter ) override;
662
    virtual VclPtr<SfxAbstractTabDialog> CreateAutoCorrTabDialog(vcl::Window* pParent, const SfxItemSet* pAttrSet) override;
663
    virtual VclPtr<SfxAbstractTabDialog> CreateCustomizeTabDialog(
664
                                            const SfxItemSet* pAttrSet,
665
                                            const css::uno::Reference< css::frame::XFrame >& xViewFrame ) override;
Caolán McNamara's avatar
Caolán McNamara committed
666
    virtual VclPtr<SfxAbstractTabDialog> CreateTextTabDialog( weld::Window* pParent,
667
                                            const SfxItemSet* pAttrSet,
668
                                            SdrView* pView ) override;
669
    virtual VclPtr<SfxAbstractTabDialog> CreateTabItemDialog(weld::Window* pParent, const SfxItemSet& rSet) override;
670
    virtual VclPtr<AbstractSvxCaptionDialog>
671
                                          CreateCaptionDialog(weld::Window* pParent,
672
                                            const SdrView* pView,
673
                                            SvxAnchorIds nAnchorTypes = SvxAnchorIds::NONE) override;
674 675 676
    virtual VclPtr<AbstractSvxDistributeDialog>
                                          CreateSvxDistributeDialog(const SfxItemSet& rAttr) override;
    virtual VclPtr<SfxAbstractInsertObjectDialog>
Caolán McNamara's avatar
Caolán McNamara committed
677
                                           CreateInsertObjectDialog(weld::Window* pParent, const OUString& rCommmand,
678
                                            const css::uno::Reference < css::embed::XStorage >& xStor,
679
                                            const SvObjectServerList* pList ) override;
Caolán McNamara's avatar
Caolán McNamara committed
680
    virtual VclPtr<VclAbstractDialog>      CreateEditObjectDialog(weld::Window* pParent, const OUString& rCommmand,
681
                                            const css::uno::Reference < css::embed::XEmbeddedObject >& xObj ) override;
682
    virtual VclPtr<SfxAbstractPasteDialog> CreatePasteDialog(weld::Window* pParent) override;
683 684 685
    virtual VclPtr<SfxAbstractLinksDialog> CreateLinksDialog( vcl::Window* pParent, sfx2::LinkManager* pMgr, bool bHTML = false, sfx2::SvBaseLink* p=nullptr  ) override;

    virtual VclPtr<AbstractHangulHanjaConversionDialog> CreateHangulHanjaConversionDialog( vcl::Window* _pParent,
686
                                            editeng::HangulHanjaConversion::ConversionDirection _ePrimaryDirection ) override;
687
    virtual VclPtr<AbstractThesaurusDialog>  CreateThesaurusDialog( vcl::Window*, css::uno::Reference< css::linguistic2::XThesaurus >  xThesaurus,
688
                                                const OUString &rWord, LanguageType nLanguage ) override;
689

690
    virtual VclPtr<AbstractHyphenWordDialog> CreateHyphenWordDialog( vcl::Window*,
691
                                                const OUString &rWord, LanguageType nLang,
692
                                                css::uno::Reference< css::linguistic2::XHyphenator >  &xHyphen,
693
                                                SvxSpellWrapper* pWrapper ) override;
694

695
    virtual VclPtr<AbstractFmShowColsDialog> CreateFmShowColsDialog() override;
Caolán McNamara's avatar
Caolán McNamara committed
696
    virtual VclPtr<AbstractSvxZoomDialog> CreateSvxZoomDialog(weld::Window* pParent, const SfxItemSet& rCoreSet) override;
697
   // add for SvxBorderBackgroundDlg
698
    virtual VclPtr<SfxAbstractTabDialog> CreateSvxBorderBackgroundDlg(
699
       weld::Window* pParent,
700
       const SfxItemSet& rCoreSet,
701
       bool bEnableDrawingLayerFillStyles) override;
702

703 704 705 706 707 708 709 710
    virtual VclPtr<AbstractSvxTransformTabDialog> CreateSvxTransformTabDialog(weld::Window* pParent,
                                                                              const SfxItemSet* pAttr,
                                                                              const SdrView* pView,
                                                                              SvxAnchorIds nAnchorTypes = SvxAnchorIds::NONE) override ;
    virtual VclPtr<SfxAbstractTabDialog> CreateSchTransformTabDialog(weld::Window* pParent,
                                                                     const SfxItemSet* pAttr,
                                                                     const SdrView* pSdrView,
                                                                     bool bSizeTabPage) override;
711
    virtual VclPtr<AbstractSpellDialog>  CreateSvxSpellDialog(
Noel Grandin's avatar
Noel Grandin committed
712
                            vcl::Window* pParent,
713
                            SfxBindings* pBindings,
714
                            svx::SpellDialogChildWindow* pSpellChildWindow ) override;
715

716
    virtual VclPtr<VclAbstractRefreshableDialog> CreateActualizeProgressDialog( vcl::Window* pParent, GalleryTheme* pThm ) override;
Caolán McNamara's avatar
Caolán McNamara committed
717
    virtual VclPtr<AbstractTitleDialog> CreateTitleDialog(weld::Window* pParent, const OUString& rOldText) override;
Caolán McNamara's avatar
Caolán McNamara committed
718
    virtual VclPtr<AbstractGalleryIdDialog> CreateGalleryIdDialog(weld::Window* pParent,
719
                                            GalleryTheme* pThm) override;
720
    virtual VclPtr<VclAbstractDialog2> CreateGalleryThemePropertiesDialog(vcl::Window* pParent,
721
                                            ExchangeData* pData,
722
                                            SfxItemSet* pItemSet) override;
723
    virtual VclPtr<AbstractURLDlg> CreateURLDialog( vcl::Window* pParent,
724 725
                                            const OUString& rURL, const OUString& rAltText, const OUString& rDescription,
                                            const OUString& rTarget, const OUString& rName,
726
                                            TargetList& rTargetList ) override;
727

728
    virtual VclPtr<VclAbstractDialog>      CreateSvxSearchAttributeDialog( vcl::Window* pParent,
729
                                            SearchAttrItemList& rLst,
730
                                            const sal_uInt16* pWhRanges) override;
731
    virtual VclPtr<AbstractSvxSearchSimilarityDialog> CreateSvxSearchSimilarityDialog( weld::Window* pParent,
Noel Grandin's avatar
Noel Grandin committed
732
                                                            bool bRelax,
733 734
                                                            sal_uInt16 nOther,
                                                            sal_uInt16 nShorter,
735
                                                            sal_uInt16 nLonger) override;
736
    virtual VclPtr<AbstractSvxJSearchOptionsDialog> CreateSvxJSearchOptionsDialog( vcl::Window* pParent,
737
                                                            const SfxItemSet& rOptionsSet,
738
                                                            TransliterationFlags nInitialFlags) override;
739
    virtual VclPtr<AbstractFmInputRecordNoDialog> CreateFmInputRecordNoDialog(weld::Window* pParent) override;
740 741
    virtual VclPtr<AbstractSvxNewDictionaryDialog> CreateSvxNewDictionaryDialog(weld::Window* pParent) override;
    virtual VclPtr<VclAbstractDialog>     CreateSvxEditDictionaryDialog(vcl::Window* pParent, const OUString& rName) override;
Caolán McNamara's avatar
Caolán McNamara committed
742 743
    virtual VclPtr<AbstractSvxNameDialog> CreateSvxNameDialog(weld::Window* pParent,
                                            const OUString& rName, const OUString& rDesc) override;
744
    // #i68101#
745
    virtual VclPtr<AbstractSvxObjectNameDialog> CreateSvxObjectNameDialog(weld::Window* pParent, const OUString& rName) override;
746
    virtual VclPtr<AbstractSvxObjectTitleDescDialog> CreateSvxObjectTitleDescDialog(weld::Window* pParent, const OUString& rTitle, const OUString& rDescription) override;
747

748
    virtual VclPtr<AbstractSvxMultiPathDialog>    CreateSvxMultiPathDialog(vcl::Window* pParent) override;
749
    virtual VclPtr<AbstractSvxMultiPathDialog>    CreateSvxPathSelectDialog(weld::Window* pParent) override;
750 751
    virtual VclPtr<AbstractSvxHpLinkDlg>          CreateSvxHpLinkDlg(vcl::Window* pParent, SfxBindings* pBindings) override;
    virtual VclPtr<AbstractFmSearchDialog>         CreateFmSearchDialog(vcl::Window* pParent,
752
                                                        const OUString& strInitialText,
753
                                                        const std::vector< OUString >& _rContexts,
754
                                                        sal_Int16 nInitialContext,
755
                                                        const Link<FmSearchContext&,sal_uInt32>& lnkContextSupplier) override;
756
    virtual VclPtr<AbstractGraphicFilterDialog>   CreateGraphicFilterEmboss(weld::Window* pParent,
757
                                                const Graphic& rGraphic) override;
758
    virtual VclPtr<AbstractGraphicFilterDialog>   CreateGraphicFilterPoster(weld::Window* pParent,
759
                                                const Graphic& rGraphic) override;
760
    virtual VclPtr<AbstractGraphicFilterDialog>   CreateGraphicFilterSepia(weld::Window* pParent,
761
                                                const Graphic& rGraphic) override;
762
    virtual VclPtr<AbstractGraphicFilterDialog>   CreateGraphicFilterSmooth(weld::Window* pParent,
763
                                                const Graphic& rGraphic, double nRadius) override;
764
    virtual VclPtr<AbstractGraphicFilterDialog>  CreateGraphicFilterSolarize(weld::Window* pParent,
765
                                                const Graphic& rGraphic) override;
766
    virtual VclPtr<AbstractGraphicFilterDialog>   CreateGraphicFilterMosaic(weld::Window* pParent,
767
                                                const Graphic& rGraphic) override;
Caolán McNamara's avatar
Caolán McNamara committed
768 769 770 771
    virtual VclPtr<AbstractSvxAreaTabDialog>       CreateSvxAreaTabDialog(weld::Window* pParent,
                                                                          const SfxItemSet* pAttr,
                                                                          SdrModel* pModel,
                                                                          bool bShadow) override;
772
    virtual VclPtr<SfxAbstractTabDialog>           CreateSvxLineTabDialog( vcl::Window* pParent, const SfxItemSet* pAttr,
773
                                                                 SdrModel* pModel,
774
                                                                 const SdrObject* pObj,
775
                                                                 bool bHasObj ) override;
Caolán McNamara's avatar
Caolán McNamara committed
776
    virtual VclPtr<AbstractSvxPostItDialog>        CreateSvxPostItDialog( weld::Window* pParent,
777
                                                                        const SfxItemSet& rCoreSet,
778
                                                                        bool bPrevNext = false ) override;
779 780

    // For TabPage
781
    virtual CreateTabPage               GetTabPageCreatorFunc( sal_uInt16 nId ) override;
782

783 784
    virtual GetTabPageRanges            GetTabPageRangesFunc( sal_uInt16 nId ) override;
    virtual DialogGetRanges             GetDialogGetRangesFunc() override;
785
    virtual VclPtr<VclAbstractDialog>   CreateSvxScriptOrgDialog( vcl::Window* pParent, const OUString& rLanguage ) override;
786

787
    virtual VclPtr<AbstractScriptSelectorDialog>
788
        CreateScriptSelectorDialog(
Noel Grandin's avatar
Noel Grandin committed
789
            vcl::Window* pParent,
790
            const css::uno::Reference< css::frame::XFrame >& _rxFrame
791
        ) override;
792

793
    virtual VclPtr<VclAbstractDialog> CreateScriptErrorDialog(const css::uno::Any& rException) override;
794

795
    virtual VclPtr<VclAbstractDialog>  CreateSvxMacroAssignDlg(
Noel Grandin's avatar
Noel Grandin committed
796
                vcl::Window* _pParent,
797
                const css::uno::Reference< css::frame::XFrame >& _rxDocumentFrame,
798
                const bool _bUnoDialogMode,
799
                const css::uno::Reference< css::container::XNameReplace >& _rxEvents,
800
                const sal_uInt16 _nInitiallySelectedEvent
801
            ) override;
802

803
    virtual VclPtr<SfxAbstractTabDialog> CreateSvxFormatCellsDialog( const SfxItemSet* pAttr, const SdrModel& rModel, const SdrObject* pObj ) override;
804

805
    virtual VclPtr<SvxAbstractSplitTableDialog> CreateSvxSplitTableDialog(weld::Window* pParent, bool bIsTableVertical, long nMaxVertical) override;
806

807
    virtual VclPtr<SvxAbstractNewTableDialog> CreateSvxNewTableDialog(weld::Window* pParent) override ;
808

809
    virtual VclPtr<VclAbstractDialog>          CreateOptionsDialog(
Noel Grandin's avatar
Noel Grandin committed
810
        vcl::Window* pParent, const OUString& rExtensionId ) override;
811

812
    virtual VclPtr<SvxAbstractInsRowColDlg> CreateSvxInsRowColDlg(weld::Window* pParent, bool bCol, const OString& rHelpId) override;
813

814
    virtual VclPtr<AbstractPasswordToOpenModifyDialog> CreatePasswordToOpenModifyDialog(weld::Window * pParent, sal_uInt16 nMaxPasswdLen, bool bIsPasswordToModify) override;
815

816
    virtual VclPtr<AbstractScreenshotAnnotationDlg> CreateScreenshotAnnotationDlg(vcl::Window * pParent, Dialog& rParentDialog) override;
817

818 819 820 821
    virtual VclPtr<AbstractSignatureLineDialog>
    CreateSignatureLineDialog(weld::Window* pParent,
                              const css::uno::Reference<css::frame::XModel> xModel, bool bEditExisting) override;

822 823 824
    virtual VclPtr<AbstractSignSignatureLineDialog>
    CreateSignSignatureLineDialog(weld::Window* pParent,
                                  const css::uno::Reference<css::frame::XModel> xModel) override;
825 826 827 828
};

#endif

829
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */