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 _SFX2_DIALOG_HXX
20 #define _SFX2_DIALOG_HXX
22 #include "sal/config.h"
23 #include "sfx2/dllapi.h"
25 #include <vcl/abstdlg.hxx>
26 #include <com/sun/star/embed/XEmbeddedObject.hpp>
27 #include <com/sun/star/embed/XStorage.hpp>
28 #include <com/sun/star/frame/XFrame.hpp>
30 #include <sot/exchange.hxx>
31 #include <sfx2/lnkbase.hxx>
32 #include <com/sun/star/uno/Any.hxx>
33 #include <com/sun/star/uno/Reference.h>
43 class SvObjectServerList
;
44 class TransferableDataHelper
;
45 struct TransferableObjectDescriptor
;
47 #include <sfx2/tabdlg.hxx>
54 namespace com
{ namespace sun
{ namespace star
{ namespace frame
{
58 class SfxAbstractDialog
: virtual public VclAbstractDialog
61 virtual const SfxItemSet
* GetOutputItemSet() const = 0;
62 virtual void SetText( const OUString
& rStr
) = 0;
63 virtual OUString
GetText() const = 0;
66 class SfxAbstractTabDialog
: virtual public SfxAbstractDialog
69 virtual void SetCurPageId( sal_uInt16 nId
) = 0;
70 virtual void SetCurPageId( const OString
&rName
) = 0;
71 virtual const sal_uInt16
* GetInputRanges( const SfxItemPool
& ) = 0;
72 virtual void SetInputSet( const SfxItemSet
* pInSet
) = 0;
75 class SfxAbstractApplyTabDialog
: virtual public SfxAbstractTabDialog
78 virtual void SetApplyHdl( const Link
& rLink
) = 0;
81 class SfxAbstractInsertObjectDialog
: virtual public VclAbstractDialog
84 virtual com::sun::star::uno::Reference
< com::sun::star::embed::XEmbeddedObject
> GetObject()=0;
85 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::io::XInputStream
> GetIconIfIconified( OUString
* pGraphicMediaType
)=0;
86 virtual sal_Bool
IsCreateNew()=0;
89 class SfxAbstractPasteDialog
: virtual public VclAbstractDialog
92 virtual void Insert( SotFormatStringId nFormat
, const String
& rFormatName
) = 0;
93 virtual void SetObjName( const SvGlobalName
& rClass
, const String
& rObjName
) = 0;
94 virtual sal_uIntPtr
GetFormat( const TransferableDataHelper
& aHelper
,
95 const DataFlavorExVector
* pFormats
=0,
96 const TransferableObjectDescriptor
* pDesc
=0 ) = 0;
99 class SfxAbstractLinksDialog
: virtual public VclAbstractDialog
103 class AbstractScriptSelectorDialog
: virtual public VclAbstractDialog
106 virtual String
GetScriptURL() const = 0;
107 virtual void SetRunLabel() = 0;
110 namespace com
{ namespace sun
{ namespace star
{ namespace frame
{ class XFrame
; } } } }
112 class SFX2_DLLPUBLIC SfxAbstractDialogFactory
: virtual public VclAbstractDialogFactory
115 virtual ~SfxAbstractDialogFactory(); // needed for export of vtable
116 static SfxAbstractDialogFactory
* Create();
117 virtual VclAbstractDialog
* CreateSfxDialog( Window
* pParent
, const SfxBindings
& rBindings
, sal_uInt32 nResId
) = 0;
118 virtual VclAbstractDialog
* CreateFrameDialog( Window
* pParent
, const com::sun::star::uno::Reference
< com::sun::star::frame::XFrame
>& rFrame
, sal_uInt32 nResId
, const String
& rParameter
) = 0;
119 virtual SfxAbstractTabDialog
* CreateTabDialog( sal_uInt32 nResId
,
121 const SfxItemSet
* pAttrSet
,
122 SfxViewFrame
* pViewFrame
,
124 const String
*pUserButtonText
=0 ) = 0;
125 virtual SfxAbstractTabDialog
* CreateTabDialog( sal_uInt32 nResId
,
127 const SfxItemSet
* pAttrSet
,
128 const ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XFrame
>& xViewFrame
,
130 const String
*pUserButtonText
=0 ) = 0;
131 virtual CreateTabPage
GetTabPageCreatorFunc( sal_uInt16 nId
) = 0;
132 virtual GetTabPageRanges
GetTabPageRangesFunc( sal_uInt16 nId
) = 0;
133 virtual SfxAbstractInsertObjectDialog
* CreateInsertObjectDialog( Window
* pParent
, const OUString
& rCommand
,
134 const com::sun::star::uno::Reference
< com::sun::star::embed::XStorage
>& xStor
,
135 const SvObjectServerList
* pList
= 0 )=0;
136 virtual VclAbstractDialog
* CreateEditObjectDialog( Window
* pParent
, const OUString
& rCommand
,
137 const com::sun::star::uno::Reference
< com::sun::star::embed::XEmbeddedObject
>& xObj
)=0;
138 virtual SfxAbstractPasteDialog
* CreatePasteDialog( Window
* pParent
)=0;
139 virtual SfxAbstractLinksDialog
* CreateLinksDialog( Window
* pParent
, sfx2::LinkManager
* pMgr
, sal_Bool bHTML
=sal_False
, sfx2::SvBaseLink
* p
=0 )=0;
140 virtual VclAbstractDialog
* CreateSvxScriptOrgDialog( Window
* pParent
, const String
& rLanguage
) = 0;
142 virtual AbstractScriptSelectorDialog
*
143 CreateScriptSelectorDialog(
146 const ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XFrame
>& _rxFrame
149 virtual VclAbstractDialog
* CreateScriptErrorDialog(
150 Window
* pParent
, com::sun::star::uno::Any aException
) = 0;
152 virtual VclAbstractDialog
* CreateOptionsDialog(
153 Window
* pParent
, const OUString
& rExtensionId
, const OUString
& rApplicationContext
) = 0;
158 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */