Bump for 3.6-28
[LibreOffice.git] / extensions / source / propctrlr / defaulthelpprovider.hxx
blobb99d513c2f5e75263f058ce898187f5000629add
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #ifndef EXTENSIONS_DEFAULTHELPPROVIDER_HXX
30 #define EXTENSIONS_DEFAULTHELPPROVIDER_HXX
32 /** === begin UNO includes === **/
33 #include <com/sun/star/inspection/XPropertyControlObserver.hpp>
34 #include <com/sun/star/lang/XInitialization.hpp>
35 #include <com/sun/star/inspection/XObjectInspectorUI.hpp>
36 /** === end UNO includes === **/
38 #include <cppuhelper/implbase2.hxx>
39 #include <comphelper/componentcontext.hxx>
41 class Window;
43 //........................................................................
44 namespace pcr
46 //........................................................................
48 //====================================================================
49 //= DefaultHelpProvider
50 //====================================================================
51 typedef ::cppu::WeakImplHelper2 < ::com::sun::star::inspection::XPropertyControlObserver
52 , ::com::sun::star::lang::XInitialization
53 > DefaultHelpProvider_Base;
54 class DefaultHelpProvider : public DefaultHelpProvider_Base
56 private:
57 ::comphelper::ComponentContext m_aContext;
58 bool m_bConstructed;
59 ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XObjectInspectorUI >
60 m_xInspectorUI;
62 public:
63 DefaultHelpProvider( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext );
65 // XServiceInfo - static versions
66 static ::rtl::OUString getImplementationName_static( ) throw(::com::sun::star::uno::RuntimeException);
67 static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_static( ) throw(::com::sun::star::uno::RuntimeException);
68 static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
69 Create(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >&);
71 protected:
72 ~DefaultHelpProvider();
74 // XPropertyControlObserver
75 virtual void SAL_CALL focusGained( const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyControl >& Control ) throw (::com::sun::star::uno::RuntimeException);
76 virtual void SAL_CALL valueChanged( const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyControl >& Control ) throw (::com::sun::star::uno::RuntimeException);
78 // XInitialization
79 virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
81 protected:
82 // Service constructors
83 void create( const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XObjectInspectorUI >& _rxUI );
85 private:
86 Window* impl_getVclControlWindow_nothrow( const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyControl >& _rxControl );
87 ::rtl::OUString impl_getHelpText_nothrow( const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyControl >& _rxControl );
90 //........................................................................
91 } // namespace pcr
92 //........................................................................
94 #endif // EXTENSIONS_DEFAULTHELPPROVIDER_HXX
96 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */