fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / dbaccess / source / core / dataaccess / documentcontainer.hxx
blobc30eebb75e716fe19c66b626eb958bad5a07b697
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_CORE_DATAACCESS_DOCUMENTCONTAINER_HXX
21 #define INCLUDED_DBACCESS_SOURCE_CORE_DATAACCESS_DOCUMENTCONTAINER_HXX
23 #include "definitioncontainer.hxx"
24 #include <cppuhelper/implbase5.hxx>
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/XTransactedObject.hpp>
30 #include <comphelper/propertystatecontainer.hxx>
31 #include <comphelper/proparrhlp.hxx>
32 #include "apitools.hxx"
34 namespace dbaccess
36 typedef ::cppu::ImplHelper5 < ::com::sun::star::frame::XComponentLoader
37 , ::com::sun::star::lang::XMultiServiceFactory
38 , ::com::sun::star::container::XHierarchicalNameContainer
39 , ::com::sun::star::container::XHierarchicalName
40 , ::com::sun::star::embed::XTransactedObject
41 > ODocumentContainer_Base;
42 // ODocumentContainer - collections of database documents (reports/forms)
43 class ODocumentContainer : public ODefinitionContainer
44 , public ODocumentContainer_Base
45 , public ::comphelper::OPropertyStateContainer
46 , public ::comphelper::OPropertyArrayUsageHelper< ODocumentContainer >
48 bool m_bFormsContainer;
50 public:
51 /** constructs the container.<BR>
53 ODocumentContainer(
54 const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _xORB
55 , const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xParentContainer
56 ,const TContentPtr& _pImpl
57 , bool _bFormsContainer
60 // ::com::sun::star::uno::XInterface
61 DECLARE_XINTERFACE( )
63 virtual css::uno::Sequence<css::uno::Type> SAL_CALL getTypes()
64 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
65 virtual css::uno::Sequence<sal_Int8> SAL_CALL getImplementationId()
66 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
68 // ::com::sun::star::lang::XServiceInfo
69 DECLARE_SERVICE_INFO();
71 // XComponentLoader
72 virtual ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > SAL_CALL loadComponentFromURL( const OUString& URL, const OUString& TargetFrameName, sal_Int32 SearchFlags, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& Arguments ) throw (::com::sun::star::io::IOException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
74 // ::com::sun::star::lang::XMultiServiceFactory
75 virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstance( const OUString& aServiceSpecifier ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
76 virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstanceWithArguments( const OUString& ServiceSpecifier, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Arguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
77 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getAvailableServiceNames( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
79 // XCommandProcessor
80 virtual ::com::sun::star::uno::Any SAL_CALL execute( const ::com::sun::star::ucb::Command& aCommand, sal_Int32 CommandId, const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >& Environment ) throw (::com::sun::star::uno::Exception, ::com::sun::star::ucb::CommandAbortedException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE ;
82 // XHierarchicalNameAccess
83 virtual ::com::sun::star::uno::Any SAL_CALL getByHierarchicalName( const OUString& _sName ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
84 virtual sal_Bool SAL_CALL hasByHierarchicalName( const OUString& _sName ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
86 // XHierarchicalNameContainer
87 virtual void SAL_CALL insertByHierarchicalName( const OUString& aName, const ::com::sun::star::uno::Any& aElement ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
88 virtual void SAL_CALL removeByHierarchicalName( const OUString& Name ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
90 // XHierarchicalName
91 virtual OUString SAL_CALL getHierarchicalName( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
92 virtual OUString SAL_CALL composeHierarchicalName( const OUString& aRelativeName ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
94 // XNameContainer
95 virtual void SAL_CALL removeByName( const OUString& _rName ) throw(::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
97 // XHierarchicalNameReplace
98 virtual void SAL_CALL replaceByHierarchicalName( const OUString& aName, const ::com::sun::star::uno::Any& aElement ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
100 // ::com::sun::star::beans::XPropertySet
101 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
103 // XTransactedObject
104 virtual void SAL_CALL commit( ) throw (::com::sun::star::io::IOException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
105 virtual void SAL_CALL revert( ) throw (::com::sun::star::io::IOException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
107 // XRename
108 virtual void SAL_CALL rename( const OUString& newName ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::container::ElementExistException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
110 // OPropertySetHelper
111 virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() SAL_OVERRIDE;
113 // helper
114 ::rtl::Reference<OContentHelper> getContent(const OUString& _sName) const;
115 ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > getContainerStorage() const;
117 protected:
118 virtual ~ODocumentContainer();
120 /** OContentHelper
122 virtual OUString determineContentType() const SAL_OVERRIDE;
124 // ODefinitionContainer
125 virtual ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent > createObject(
126 const OUString& _rName
127 ) SAL_OVERRIDE;
129 virtual void getPropertyDefaultByHandle( sal_Int32 _nHandle, ::com::sun::star::uno::Any& _rDefault ) const SAL_OVERRIDE;
131 // OPropertyArrayUsageHelper
132 virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const SAL_OVERRIDE;
135 } // namespace dbaccess
137 #endif // INCLUDED_DBACCESS_SOURCE_CORE_DATAACCESS_DOCUMENTCONTAINER_HXX
139 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */