merge the formfield patch from ooo-build
[ooovba.git] / configmgr / source / treemgr / defaultproviderproxy.hxx
blob7d1867015dba8705f89ea6bd21063d16536fe0b6
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: defaultproviderproxy.hxx,v $
10 * $Revision: 1.9 $
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 CONFIGMGR_DEFAULTPROVIDER_PROXY_HXX_
32 #define CONFIGMGR_DEFAULTPROVIDER_PROXY_HXX_
34 #include "configpath.hxx"
35 #include "utility.hxx"
36 #include "requestoptions.hxx"
37 #include <rtl/ref.hxx>
38 #include <salhelper/simplereferenceobject.hxx>
40 #ifndef INCLUDED_MEMORY
41 #include <memory>
42 #define INCLUDED_MEMORY
43 #endif
45 namespace configmgr
47 //-----------------------------------------------------------------------------
48 class ISubtree;
49 class IDefaultableTreeManager;
50 class OOptions;
51 class TreeManager;
52 //-----------------------------------------------------------------------------
53 namespace configuration
55 //-----------------------------------------------------------------------------
57 /// provides access to the defaults for a given request
58 class DefaultProviderProxy
59 : public salhelper::SimpleReferenceObject
61 // the data defining a request
62 AbsolutePath m_aBaseLocation;
63 RequestOptions m_aOptions;
65 // the object(s) that provide the defaults
66 rtl::Reference< TreeManager > m_xDefaultTreeProvider;
67 IDefaultableTreeManager * m_pDefaultTreeManager;
68 public:
69 explicit
70 DefaultProviderProxy(
71 rtl::Reference< TreeManager > const & _xDefaultTreeProvider,
72 IDefaultableTreeManager * _pDefaultTreeManager,
73 AbsolutePath const& _aBaseLocation,
74 RequestOptions const& _aOptions
77 ~DefaultProviderProxy();
79 /// tries to load a default instance of the specified node (which must be within the request range owned)
80 std::auto_ptr<ISubtree> getDefaultTree(AbsolutePath const& _aLocation) const SAL_THROW((com::sun::star::uno::Exception));
82 /// tries to load default data into the owned tree - call only outside of any locks
83 bool fetchDefaultData() SAL_THROW((com::sun::star::uno::Exception));
85 //-----------------------------------------------------------------------------
89 #endif // CONFIGMGR_DEFAULTPROVIDER_PROXY_HXX_