merge the formfield patch from ooo-build
[ooovba.git] / scripting / source / provider / BrowseNodeFactoryImpl.hxx
blob95611f46a06c007a1918a78805bb0f1b6ddbe199
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: BrowseNodeFactoryImpl.hxx,v $
10 * $Revision: 1.6 $
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 #include <rtl/ustring.hxx>
32 #include <cppuhelper/implbase2.hxx>
34 #include <com/sun/star/uno/XComponentContext.hpp>
35 #include <com/sun/star/lang/XServiceInfo.hpp>
36 #include <com/sun/star/uno/RuntimeException.hpp>
37 #include <com/sun/star/registry/XRegistryKey.hpp>
39 #include <com/sun/star/script/browse/XBrowseNode.hpp>
40 #include <com/sun/star/script/browse/BrowseNodeTypes.hpp>
41 #include <com/sun/star/script/browse/XBrowseNodeFactory.hpp>
43 namespace browsenodefactory
45 // for simplification
46 #define css ::com::sun::star
48 class BrowseNodeFactoryImpl :
49 public ::cppu::WeakImplHelper2 <
50 css::script::browse::XBrowseNodeFactory,
51 css::lang::XServiceInfo >
53 private:
54 css::uno::Reference< css::uno::XComponentContext > m_xComponentContext;
55 css::uno::Reference< css::script::browse::XBrowseNode > m_xSelectorBrowseNode;
57 protected:
58 virtual ~BrowseNodeFactoryImpl();
60 public:
61 BrowseNodeFactoryImpl(
62 css::uno::Reference< css::uno::XComponentContext > const & xComponentContext );
64 // XServiceInfo
65 virtual ::rtl::OUString SAL_CALL getImplementationName()
66 throw ( css::uno::RuntimeException );
68 virtual sal_Bool SAL_CALL
69 supportsService( ::rtl::OUString const & serviceName )
70 throw ( css::uno::RuntimeException );
72 virtual css::uno::Sequence< ::rtl::OUString > SAL_CALL
73 getSupportedServiceNames()
74 throw ( css::uno::RuntimeException );
76 // XBrowseNodeFactory
77 virtual css::uno::Reference< css::script::browse::XBrowseNode > SAL_CALL
78 createView( sal_Int16 viewType )
79 throw ( css::uno::RuntimeException );
80 private:
81 css::uno::Reference< css::script::browse::XBrowseNode >
82 getSelectorHierarchy()
83 throw ( css::uno::RuntimeException );
85 css::uno::Reference< css::script::browse::XBrowseNode >
86 getOrganizerHierarchy()
87 throw ( css::uno::RuntimeException );
91 } // namespace browsenodefactory