Branch libreoffice-5-0-4
[LibreOffice.git] / scripting / source / basprov / baslibnode.hxx
blob5b13c271b51fbe649985a043305b74869f993ad6
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_SCRIPTING_SOURCE_BASPROV_BASLIBNODE_HXX
21 #define INCLUDED_SCRIPTING_SOURCE_BASPROV_BASLIBNODE_HXX
23 #include <com/sun/star/beans/XPropertySet.hpp>
24 #include <com/sun/star/script/XLibraryContainer.hpp>
25 #include <com/sun/star/script/browse/XBrowseNode.hpp>
26 #include <com/sun/star/uno/XComponentContext.hpp>
27 #include <cppuhelper/implbase1.hxx>
29 class BasicManager;
33 namespace basprov
38 // class BasicLibraryNodeImpl
41 typedef ::cppu::WeakImplHelper1<
42 ::com::sun::star::script::browse::XBrowseNode > BasicLibraryNodeImpl_BASE;
45 class BasicLibraryNodeImpl : public BasicLibraryNodeImpl_BASE
47 private:
48 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
49 OUString m_sScriptingContext;
50 BasicManager* m_pBasicManager;
51 ::com::sun::star::uno::Reference< ::com::sun::star::script::XLibraryContainer > m_xLibContainer;
52 ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > m_xLibrary;
53 OUString m_sLibName;
54 bool m_bIsAppScript;
56 public:
57 BasicLibraryNodeImpl( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext,
58 const OUString& sScriptingContext,
59 BasicManager* pBasicManager,
60 const ::com::sun::star::uno::Reference< ::com::sun::star::script::XLibraryContainer >& xLibContainer,
61 const OUString& sLibName, bool isAppScript=true );
62 virtual ~BasicLibraryNodeImpl();
64 // XBrowseNode
65 virtual OUString SAL_CALL getName( )
66 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
67 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::script::browse::XBrowseNode > > SAL_CALL getChildNodes( )
68 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
69 virtual sal_Bool SAL_CALL hasChildNodes( )
70 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
71 virtual sal_Int16 SAL_CALL getType( )
72 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
76 } // namespace basprov
79 #endif // INCLUDED_SCRIPTING_SOURCE_BASPROV_BASLIBNODE_HXX
81 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */