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 .
22 #include "AppElementType.hxx"
24 #include <com/sun/star/container/XNameAccess.hpp>
25 #include <com/sun/star/uno/XComponentContext.hpp>
26 #include <com/sun/star/lang/XComponent.hpp>
27 #include <com/sun/star/sdbc/XConnection.hpp>
28 #include <com/sun/star/sdb/application/XDatabaseDocumentUI.hpp>
29 #include <comphelper/namedvaluecollection.hxx>
31 namespace weld
{ class Window
; }
35 // OLinkedDocumentsAccess
36 class OLinkedDocumentsAccess final
38 css::uno::Reference
< css::uno::XComponentContext
>
40 css::uno::Reference
< css::container::XNameAccess
>
42 css::uno::Reference
< css::sdbc::XConnection
>
44 css::uno::Reference
< css::sdb::application::XDatabaseDocumentUI
>
46 weld::Window
* m_pDialogParent
;
47 OUString m_sDataSourceName
;
50 OLinkedDocumentsAccess(
51 weld::Window
* pDialogParent
,
52 const css::uno::Reference
< css::sdb::application::XDatabaseDocumentUI
>& i_rDocumentUI
,
53 const css::uno::Reference
< css::uno::XComponentContext
>& _rxContext
,
54 const css::uno::Reference
< css::container::XNameAccess
>& _rxContainer
,
55 const css::uno::Reference
< css::sdbc::XConnection
>& _xConnection
,
56 OUString _sDataSourceName
58 ~OLinkedDocumentsAccess();
60 bool isConnected() const { return m_xConnection
.is(); }
62 css::uno::Reference
< css::lang::XComponent
>
64 const OUString
& _rLinkName
,
65 css::uno::Reference
< css::lang::XComponent
>& _xDefinition
,
66 ElementOpenMode _eOpenMode
,
67 const ::comphelper::NamedValueCollection
& _rAdditionalArgs
70 css::uno::Reference
< css::lang::XComponent
>
72 sal_Int32 i_nActionID
,
73 const ::comphelper::NamedValueCollection
& i_rCreationArgs
,
74 css::uno::Reference
< css::lang::XComponent
>& o_rDefinition
77 void newFormWithPilot(
78 const sal_Int32 _nCommandType
,
79 const OUString
& _rObjectName
81 void newReportWithPilot(
82 const sal_Int32 _nCommandType
,
83 const OUString
& _rObjectName
85 void newQueryWithPilot();
86 void newTableWithPilot();
89 css::uno::Reference
< css::lang::XComponent
>
91 const OUString
& _rLinkName
,
92 css::uno::Reference
< css::lang::XComponent
>& _xDefinition
,
93 ElementOpenMode _eOpenMode
,
94 const ::comphelper::NamedValueCollection
& _rAdditionalArgs
99 const char* _pWizardService
,
100 const sal_Int32 _nCommandType
,
101 const OUString
& _rObjectName
108 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */