LibreOffice Module dbaccess (master) 1
documentcontainer.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
25#include <com/sun/star/lang/XMultiServiceFactory.hpp>
26#include <com/sun/star/frame/XComponentLoader.hpp>
27#include <com/sun/star/container/XHierarchicalNameContainer.hpp>
28#include <com/sun/star/container/XHierarchicalName.hpp>
29#include <com/sun/star/embed/XStorage.hpp>
30#include <com/sun/star/embed/XTransactedObject.hpp>
33#include <rtl/ref.hxx>
34#include <apitools.hxx>
35
36namespace dbaccess
37{
38typedef ::cppu::ImplHelper5 < css::frame::XComponentLoader
39 , css::lang::XMultiServiceFactory
40 , css::container::XHierarchicalNameContainer
41 , css::container::XHierarchicalName
42 , css::embed::XTransactedObject
44// ODocumentContainer - collections of database documents (reports/forms)
48 , public ::comphelper::OPropertyArrayUsageHelper< ODocumentContainer >
49{
51
52public:
56 const css::uno::Reference< css::uno::XComponentContext >& _xORB
57 , const css::uno::Reference< css::uno::XInterface >& _xParentContainer
58 ,const TContentPtr& _pImpl
59 , bool _bFormsContainer
60 );
61
62 // css::uno::XInterface
64
65 virtual css::uno::Sequence<css::uno::Type> SAL_CALL getTypes() override;
66 virtual css::uno::Sequence<sal_Int8> SAL_CALL getImplementationId() override;
67
68 // css::lang::XServiceInfo
70
71 // XComponentLoader
72 virtual css::uno::Reference< css::lang::XComponent > SAL_CALL loadComponentFromURL( const OUString& URL, const OUString& TargetFrameName, sal_Int32 SearchFlags, const css::uno::Sequence< css::beans::PropertyValue >& Arguments ) override;
73
74 // css::lang::XMultiServiceFactory
75 virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance( const OUString& aServiceSpecifier ) override;
76 virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstanceWithArguments( const OUString& ServiceSpecifier, const css::uno::Sequence< css::uno::Any >& Arguments ) override;
77 virtual css::uno::Sequence< OUString > SAL_CALL getAvailableServiceNames( ) override;
78
79 // XCommandProcessor
80 virtual css::uno::Any SAL_CALL execute( const css::ucb::Command& aCommand, sal_Int32 CommandId, const css::uno::Reference< css::ucb::XCommandEnvironment >& Environment ) override ;
81
82 // XHierarchicalNameAccess
83 virtual css::uno::Any SAL_CALL getByHierarchicalName( const OUString& _sName ) override;
84 virtual sal_Bool SAL_CALL hasByHierarchicalName( const OUString& _sName ) override;
85
86 // XHierarchicalNameContainer
87 virtual void SAL_CALL insertByHierarchicalName( const OUString& aName, const css::uno::Any& aElement ) override;
88 virtual void SAL_CALL removeByHierarchicalName( const OUString& Name ) override;
89
90 // XHierarchicalName
91 virtual OUString SAL_CALL getHierarchicalName( ) override;
92 virtual OUString SAL_CALL composeHierarchicalName( const OUString& aRelativeName ) override;
93
94 // XNameContainer
95 virtual void SAL_CALL removeByName( const OUString& _rName ) override;
96
97 // XHierarchicalNameReplace
98 virtual void SAL_CALL replaceByHierarchicalName( const OUString& aName, const css::uno::Any& aElement ) override;
99
100 // css::beans::XPropertySet
101 virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override;
102
103 // XTransactedObject
104 virtual void SAL_CALL commit( ) override;
105 virtual void SAL_CALL revert( ) override;
106
107 // XRename
108 virtual void SAL_CALL rename( const OUString& newName ) override;
109
110 // OPropertySetHelper
111 virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
112
113 // helper
114 ::rtl::Reference<OContentHelper> getContent(const OUString& _sName) const;
115 css::uno::Reference< css::embed::XStorage > getContainerStorage() const;
116
117protected:
118 virtual ~ODocumentContainer() override;
119
122 virtual OUString determineContentType() const override;
123
124 // ODefinitionContainer
125 virtual css::uno::Reference< css::ucb::XContent > createObject(
126 const OUString& _rName
127 ) override;
128
129 virtual void getPropertyDefaultByHandle( sal_Int32 _nHandle, css::uno::Any& _rDefault ) const override;
130
131 // OPropertyArrayUsageHelper
132 virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const override;
133};
134
135} // namespace dbaccess
136
137/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void SAL_CALL removeByName(const OUString &_rName) override
css::uno::Reference< css::embed::XStorage > getContainerStorage() const
ODocumentContainer(const css::uno::Reference< css::uno::XComponentContext > &_xORB, const css::uno::Reference< css::uno::XInterface > &_xParentContainer, const TContentPtr &_pImpl, bool _bFormsContainer)
constructs the container.
virtual void SAL_CALL removeByHierarchicalName(const OUString &Name) override
virtual OUString determineContentType() const override
OContentHelper.
virtual css::uno::Any SAL_CALL execute(const css::ucb::Command &aCommand, sal_Int32 CommandId, const css::uno::Reference< css::ucb::XCommandEnvironment > &Environment) override
virtual sal_Bool SAL_CALL hasByHierarchicalName(const OUString &_sName) override
virtual void SAL_CALL commit() override
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance(const OUString &aServiceSpecifier) override
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper() override
virtual void getPropertyDefaultByHandle(sal_Int32 _nHandle, css::uno::Any &_rDefault) const override
virtual void SAL_CALL insertByHierarchicalName(const OUString &aName, const css::uno::Any &aElement) override
::rtl::Reference< OContentHelper > getContent(const OUString &_sName) const
virtual css::uno::Any SAL_CALL getByHierarchicalName(const OUString &_sName) override
virtual void SAL_CALL rename(const OUString &newName) override
virtual OUString SAL_CALL getHierarchicalName() override
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstanceWithArguments(const OUString &ServiceSpecifier, const css::uno::Sequence< css::uno::Any > &Arguments) override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual void SAL_CALL revert() override
virtual css::uno::Reference< css::ucb::XContent > createObject(const OUString &_rName) override
create an object from its persistent data within the configuration.
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
virtual void SAL_CALL replaceByHierarchicalName(const OUString &aName, const css::uno::Any &aElement) override
virtual ::cppu::IPropertyArrayHelper * createArrayHelper() const override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual css::uno::Sequence< OUString > SAL_CALL getAvailableServiceNames() override
virtual OUString SAL_CALL composeHierarchicalName(const OUString &aRelativeName) override
virtual css::uno::Reference< css::lang::XComponent > SAL_CALL loadComponentFromURL(const OUString &URL, const OUString &TargetFrameName, sal_Int32 SearchFlags, const css::uno::Sequence< css::beans::PropertyValue > &Arguments) override
Type
std::shared_ptr< OContentHelper_Impl > TContentPtr
::cppu::ImplHelper5< css::frame::XComponentLoader, css::lang::XMultiServiceFactory, css::container::XHierarchicalNameContainer, css::container::XHierarchicalName, css::embed::XTransactedObject > ODocumentContainer_Base
unsigned char sal_Bool
signed char sal_Int8
#define DECLARE_XINTERFACE()