1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: linkeddocuments.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _DBAUI_LINKEDDOCUMENTS_HXX_
32 #define _DBAUI_LINKEDDOCUMENTS_HXX_
34 #include "AppElementType.hxx"
36 #ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
37 #include <com/sun/star/container/XNameAccess.hpp>
39 #ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
40 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
42 #ifndef _COM_SUN_STAR_LANG_XCOMPONENT_HPP_
43 #include <com/sun/star/lang/XComponent.hpp>
45 #ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
46 #include <com/sun/star/beans/XPropertySet.hpp>
48 #ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
49 #include <com/sun/star/sdbc/XConnection.hpp>
51 #include <com/sun/star/frame/XFrame.hpp>
52 #ifndef _COM_SUN_STAR_FRAME_XCOMPONENTLOADER_HPP_
53 #include <com/sun/star/frame/XComponentLoader.hpp>
55 #ifndef _COM_SUN_STAR_UCB_XCONTENT_HPP_
56 #include <com/sun/star/ucb/XContent.hpp>
59 #include <tools/link.hxx>
62 #include <tools/string.hxx>
64 #ifndef COMPHELPER_NAMEDVALUECOLLECTION_HXX
65 #include <comphelper/namedvaluecollection.hxx>
69 //......................................................................
72 //......................................................................
74 //==================================================================
75 //= OLinkedDocumentsAccess
76 //==================================================================
77 class OLinkedDocumentsAccess
80 ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XMultiServiceFactory
>
82 ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameAccess
>
84 ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XConnection
>
86 ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XFrame
>
88 Window
* m_pDialogParent
;
89 String m_sCurrentlyEditing
;
94 OLinkedDocumentsAccess(
95 Window
* _pDialogParent
96 ,const ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XFrame
>& _rxParentFrame
97 ,const ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XMultiServiceFactory
>& _rxORB
98 ,const ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameAccess
>& _rxContainer
99 ,const ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XConnection
>& _xConnection
100 ,const ::rtl::OUString
& _sDataSourceName
102 ~OLinkedDocumentsAccess();
104 inline sal_Bool
isConnected() const { return m_xConnection
.is(); }
106 ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XComponent
>
108 const ::rtl::OUString
& _rLinkName
,
109 ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XComponent
>& _xDefinition
,
110 ElementOpenMode _eOpenMode
,
111 const ::comphelper::NamedValueCollection
& _rAdditionalArgs
114 ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XComponent
>
116 sal_Int32 _nNewFormId
,
117 ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XComponent
>& _xDefinition
,
118 const sal_Int32 _nCommandType
,
119 const ::rtl::OUString
& _sObjectName
122 ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XComponent
>
124 ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XComponent
>& _xDefinition
,
125 const sal_Int32 _nCommandType
= -1,
126 const ::rtl::OUString
& _rObjectName
= ::rtl::OUString()
129 ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XComponent
>
131 ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XComponent
>& _xDefinition
,
132 const sal_Int32 _nCommandType
= -1,
133 const ::rtl::OUString
& _rObjectName
= ::rtl::OUString()
135 ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XComponent
>
138 ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XComponent
>
148 ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XComponent
>
150 const ::rtl::OUString
& _rLinkName
,
151 ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XComponent
>& _xDefinition
,
152 ElementOpenMode _eOpenMode
,
153 const ::comphelper::NamedValueCollection
& _rAdditionalArgs
156 ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XComponent
>
158 const char* _pWizardService
,
159 ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XComponent
>& _xDefinition
,
160 const sal_Int32 _nCommandType
,
161 const ::rtl::OUString
& _rObjectName
166 //......................................................................
168 //......................................................................
170 #endif // _DBAUI_LINKEDDOCUMENTS_HXX_