fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / dbaccess / source / ui / inc / linkeddocuments.hxx
bloba13383b719555aea5ef753db12956fe5add050c3
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
20 #ifndef INCLUDED_DBACCESS_SOURCE_UI_INC_LINKEDDOCUMENTS_HXX
21 #define INCLUDED_DBACCESS_SOURCE_UI_INC_LINKEDDOCUMENTS_HXX
23 #include "AppElementType.hxx"
25 #include <com/sun/star/container/XNameAccess.hpp>
26 #include <com/sun/star/uno/XComponentContext.hpp>
27 #include <com/sun/star/lang/XComponent.hpp>
28 #include <com/sun/star/beans/XPropertySet.hpp>
29 #include <com/sun/star/sdbc/XConnection.hpp>
30 #include <com/sun/star/frame/XFrame.hpp>
31 #include <com/sun/star/frame/XComponentLoader.hpp>
32 #include <com/sun/star/ucb/XContent.hpp>
33 #include <com/sun/star/sdb/application/XDatabaseDocumentUI.hpp>
34 #include <comphelper/namedvaluecollection.hxx>
35 #include <vcl/vclptr.hxx>
37 namespace vcl { class Window; }
38 namespace dbaui
41 // OLinkedDocumentsAccess
42 class OLinkedDocumentsAccess
44 protected:
45 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
46 m_xContext;
47 ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >
48 m_xDocumentContainer;
49 ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>
50 m_xConnection;
51 ::com::sun::star::uno::Reference< ::com::sun::star::sdb::application::XDatabaseDocumentUI >
52 m_xDocumentUI;
53 VclPtr<vcl::Window> m_pDialogParent;
54 OUString m_sCurrentlyEditing;
55 OUString m_sDataSourceName;
57 public:
58 OLinkedDocumentsAccess(
59 vcl::Window* _pDialogParent,
60 const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::application::XDatabaseDocumentUI >& i_rDocumentUI,
61 const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext,
62 const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _rxContainer,
63 const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection,
64 const OUString& _sDataSourceName
66 ~OLinkedDocumentsAccess();
68 inline bool isConnected() const { return m_xConnection.is(); }
70 ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent>
71 open(
72 const OUString& _rLinkName,
73 ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent>& _xDefinition,
74 ElementOpenMode _eOpenMode,
75 const ::comphelper::NamedValueCollection& _rAdditionalArgs
78 ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >
79 newDocument(
80 sal_Int32 i_nActionID,
81 const ::comphelper::NamedValueCollection& i_rCreationArgs,
82 ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& o_rDefinition
85 void newFormWithPilot(
86 const sal_Int32 _nCommandType = -1,
87 const OUString& _rObjectName = OUString()
89 void newReportWithPilot(
90 const sal_Int32 _nCommandType = -1,
91 const OUString& _rObjectName = OUString()
93 void newQueryWithPilot();
94 void newTableWithPilot();
96 enum RESULT
98 ERROR,
99 SUCCESS,
100 CANCEL
102 private:
103 ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >
104 impl_open(
105 const OUString& _rLinkName,
106 ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& _xDefinition,
107 ElementOpenMode _eOpenMode,
108 const ::comphelper::NamedValueCollection& _rAdditionalArgs
111 void
112 impl_newWithPilot(
113 const char* _pWizardService,
114 const sal_Int32 _nCommandType,
115 const OUString& _rObjectName
120 } // namespace dbaui
122 #endif // INCLUDED_DBACCESS_SOURCE_UI_INC_LINKEDDOCUMENTS_HXX
124 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */