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>
32 namespace vcl
{ class Window
; }
34 class SvObjectServerList
;
35 class TransferableDataHelper
;
44 namespace com::sun::star::embed
{ class XEmbeddedObject
; }
45 namespace com::sun::star::embed
{ class XStorage
; }
46 namespace com::sun::star::io
{ class XInputStream
; }
47 namespace com::sun::star::uno
{ class Any
; }
49 class SfxAbstractDialog
: virtual public VclAbstractDialog
52 virtual ~SfxAbstractDialog() override
= default;
54 /** Get a set of items changed in the dialog.
56 virtual const SfxItemSet
* GetOutputItemSet() const = 0;
57 virtual void SetText( const OUString
& rStr
) = 0;
60 class SfxAbstractTabDialog
: virtual public SfxAbstractDialog
63 virtual ~SfxAbstractTabDialog() override
= default;
65 virtual void SetCurPageId( const OString
&rName
) = 0;
66 virtual const sal_uInt16
* GetInputRanges( const SfxItemPool
& ) = 0;
67 virtual void SetInputSet( const SfxItemSet
* pInSet
) = 0;
70 class SfxAbstractApplyTabDialog
: virtual public SfxAbstractTabDialog
73 virtual ~SfxAbstractApplyTabDialog() override
= default;
75 virtual void SetApplyHdl( const Link
<LinkParamNone
*,void>& rLink
) = 0;
78 class SfxAbstractInsertObjectDialog
: virtual public VclAbstractDialog
81 virtual ~SfxAbstractInsertObjectDialog() override
= default;
83 virtual css::uno::Reference
< css::embed::XEmbeddedObject
> GetObject()=0;
84 virtual css::uno::Reference
< css::io::XInputStream
> GetIconIfIconified( OUString
* pGraphicMediaType
)=0;
85 virtual bool IsCreateNew()=0;
88 class SfxAbstractPasteDialog
: virtual public VclAbstractDialog
91 virtual ~SfxAbstractPasteDialog() override
= default;
93 virtual void Insert( SotClipboardFormatId nFormat
, const OUString
& rFormatName
) = 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
, 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;
137 virtual VclPtr
<VclAbstractDialog
> CreateAboutDialog(weld::Window
* pParent
) = 0;
139 virtual VclPtr
<AbstractScriptSelectorDialog
> CreateScriptSelectorDialog(weld::Window
* pParent
,
140 const css::uno::Reference
< css::frame::XFrame
>& rxFrame
) = 0;
142 virtual VclPtr
<VclAbstractDialog
> CreateScriptErrorDialog( const css::uno::Any
& rException
) = 0;
144 virtual VclPtr
<VclAbstractDialog
> CreateOptionsDialog(
145 weld::Window
* pParent
, const OUString
& rExtensionId
) = 0;
150 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */