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 INCLUDED_SFX2_SFXDLG_HXX
20 #define INCLUDED_SFX2_SFXDLG_HXX
22 #include <sal/config.h>
23 #include <sfx2/dllapi.h>
25 #include <vcl/abstdlg.hxx>
27 #include <sot/formats.hxx>
28 #include <sfx2/tabdlg.hxx>
29 #include <com/sun/star/uno/Reference.h>
33 class SvObjectServerList
;
34 class TransferableDataHelper
;
43 namespace com::sun::star::embed
{ class XEmbeddedObject
; }
44 namespace com::sun::star::embed
{ class XStorage
; }
45 namespace com::sun::star::io
{ class XInputStream
; }
46 namespace com::sun::star::uno
{ class Any
; }
48 class SfxAbstractDialog
: virtual public VclAbstractDialog
51 virtual ~SfxAbstractDialog() override
= default;
53 /** Get a set of items changed in the dialog.
55 virtual const SfxItemSet
* GetOutputItemSet() const = 0;
56 virtual void SetText( const OUString
& rStr
) = 0;
59 class SfxAbstractTabDialog
: virtual public SfxAbstractDialog
62 virtual ~SfxAbstractTabDialog() override
= default;
64 virtual void SetCurPageId( const OUString
&rName
) = 0;
65 virtual WhichRangesContainer
GetInputRanges( const SfxItemPool
& ) = 0;
66 virtual void SetInputSet( const SfxItemSet
* pInSet
) = 0;
69 class SfxAbstractApplyTabDialog
: virtual public SfxAbstractTabDialog
72 virtual ~SfxAbstractApplyTabDialog() override
= default;
74 virtual void SetApplyHdl( const Link
<LinkParamNone
*,void>& rLink
) = 0;
77 class SfxAbstractInsertObjectDialog
: virtual public VclAbstractDialog
80 virtual ~SfxAbstractInsertObjectDialog() override
= default;
82 virtual css::uno::Reference
< css::embed::XEmbeddedObject
> GetObject()=0;
83 virtual css::uno::Reference
< css::io::XInputStream
> GetIconIfIconified( OUString
* pGraphicMediaType
)=0;
84 virtual bool IsCreateNew()=0;
87 class SfxAbstractPasteDialog
: virtual public VclAbstractDialog
90 virtual ~SfxAbstractPasteDialog() override
= default;
92 virtual void Insert( SotClipboardFormatId nFormat
, const OUString
& rFormatName
) = 0;
93 virtual void InsertUno( const OUString
& sCmd
, const OUString
& sLabel
) = 0;
94 virtual void SetObjName( const SvGlobalName
& rClass
, const OUString
& rObjName
) = 0;
95 virtual void PreGetFormat( const TransferableDataHelper
& aHelper
) = 0;
96 virtual SotClipboardFormatId
GetFormatOnly() = 0;
97 virtual SotClipboardFormatId
GetFormat( const TransferableDataHelper
& aHelper
) = 0;
100 class SfxAbstractLinksDialog
: virtual public VclAbstractDialog
103 virtual ~SfxAbstractLinksDialog() override
= default;
106 class AbstractScriptSelectorDialog
: virtual public VclAbstractDialog
109 virtual ~AbstractScriptSelectorDialog() override
= default;
111 virtual OUString
GetScriptURL() const = 0;
112 virtual void SetRunLabel() = 0;
115 namespace com::sun::star::frame
{ class XFrame
; }
117 class SFX2_DLLPUBLIC SfxAbstractDialogFactory
: virtual public VclAbstractDialogFactory
120 virtual ~SfxAbstractDialogFactory() override
; // needed for export of vtable
121 static SfxAbstractDialogFactory
* Create();
122 virtual VclPtr
<VclAbstractDialog
> CreateFrameDialog(weld::Window
* pParent
, const css::uno::Reference
< css::frame::XFrame
>& rFrame
, sal_uInt32 nResId
, sal_uInt16 nPageId
, const OUString
& rParameter
) = 0;
123 virtual VclPtr
<SfxAbstractTabDialog
> CreateAutoCorrTabDialog(weld::Window
* pParent
, const SfxItemSet
* pAttrSet
) = 0;
124 virtual VclPtr
<SfxAbstractTabDialog
> CreateCustomizeTabDialog(weld::Window
* pParent
,
125 const SfxItemSet
* pAttrSet
,
126 const css::uno::Reference
< css::frame::XFrame
>& xViewFrame
) = 0;
127 virtual CreateTabPage
GetTabPageCreatorFunc( sal_uInt16 nId
) = 0;
128 virtual GetTabPageRanges
GetTabPageRangesFunc( sal_uInt16 nId
) = 0;
129 virtual VclPtr
<SfxAbstractInsertObjectDialog
> CreateInsertObjectDialog(weld::Window
* pParent
, const OUString
& rCommand
,
130 const css::uno::Reference
< css::embed::XStorage
>& xStor
,
131 const SvObjectServerList
* pList
)=0;
132 virtual VclPtr
<VclAbstractDialog
> CreateEditObjectDialog(weld::Window
* pParent
, const OUString
& rCommand
,
133 const css::uno::Reference
< css::embed::XEmbeddedObject
>& xObj
)=0;
134 virtual VclPtr
<SfxAbstractPasteDialog
> CreatePasteDialog(weld::Window
* pParent
) = 0;
135 virtual VclPtr
<SfxAbstractLinksDialog
> CreateLinksDialog(weld::Window
* pParent
, sfx2::LinkManager
* pMgr
, bool bHTML
=false, sfx2::SvBaseLink
* p
=nullptr) = 0;
136 virtual VclPtr
<VclAbstractDialog
> CreateSvxScriptOrgDialog(weld::Window
* pParent
, const OUString
& rLanguage
) = 0;
138 virtual VclPtr
<AbstractSecurityOptionsDialog
> CreateSvxSecurityOptionsDialog(weld::Window
* pParent
) = 0;
140 virtual VclPtr
<AbstractScriptSelectorDialog
> CreateScriptSelectorDialog(weld::Window
* pParent
,
141 const css::uno::Reference
< css::frame::XFrame
>& rxFrame
) = 0;
143 virtual void ShowAsyncScriptErrorDialog( weld::Window
* pParent
, const css::uno::Any
& rException
) = 0;
145 virtual VclPtr
<VclAbstractDialog
> CreateOptionsDialog(
146 weld::Window
* pParent
, const OUString
& rExtensionId
) = 0;
148 virtual VclPtr
<VclAbstractDialog
> CreateAboutDialog(weld::Window
* _pParent
) = 0;
150 virtual VclPtr
<VclAbstractDialog
> CreateTipOfTheDayDialog(weld::Window
* _pParent
) = 0;
152 virtual VclPtr
<VclAbstractDialog
> CreateToolbarmodeDialog(weld::Window
* _pParent
) = 0;
154 virtual VclPtr
<VclAbstractDialog
> CreateWidgetTestDialog(weld::Window
* _pParent
) = 0;
159 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */