LCOV - code coverage report
Current view: top level - reportdesign/source/ui/inc - DataProviderHandler.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 1 1 100.0 %
Date: 2015-06-13 12:38:46 Functions: 2 2 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       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/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      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 .
      18             :  */
      19             : 
      20             : #ifndef INCLUDED_REPORTDESIGN_SOURCE_UI_INC_DATAPROVIDERHANDLER_HXX
      21             : #define INCLUDED_REPORTDESIGN_SOURCE_UI_INC_DATAPROVIDERHANDLER_HXX
      22             : 
      23             : #include <sal/config.h>
      24             : 
      25             : #include <cppuhelper/compbase2.hxx>
      26             : #include <cppuhelper/basemutex.hxx>
      27             : 
      28             : #include <com/sun/star/uno/XComponentContext.hpp>
      29             : #include <com/sun/star/inspection/XPropertyHandler.hpp>
      30             : #include <com/sun/star/chart2/XChartDocument.hpp>
      31             : #include <com/sun/star/chart2/data/XDatabaseDataProvider.hpp>
      32             : #include <com/sun/star/report/XReportComponent.hpp>
      33             : #include <com/sun/star/script/XTypeConverter.hpp>
      34             : #include <com/sun/star/lang/XServiceInfo.hpp>
      35             : 
      36             : #include <memory>
      37             : 
      38             : 
      39             : namespace rptui
      40             : {
      41             : 
      42             : 
      43             :     class OPropertyInfoService;
      44             : 
      45             :     typedef ::cppu::WeakComponentImplHelper2<   ::com::sun::star::inspection::XPropertyHandler
      46             :                                             ,   ::com::sun::star::lang::XServiceInfo> DataProviderHandler_Base;
      47             : 
      48             :     class DataProviderHandler:
      49             :         private ::cppu::BaseMutex,
      50             :         public DataProviderHandler_Base
      51             :     {
      52             :     public:
      53             :         // XServiceInfo - static versions
      54             :         static OUString getImplementationName_Static(  ) throw(::com::sun::star::uno::RuntimeException);
      55             :         static ::com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_static(  ) throw(::com::sun::star::uno::RuntimeException);
      56             :         static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
      57             :                         create(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >&);
      58             : 
      59             :         explicit DataProviderHandler(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & context);
      60             :     private:
      61             : 
      62             :         // XServiceInfo
      63             :         virtual OUString SAL_CALL getImplementationName(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      64             :         virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      65             :         virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      66             : 
      67             :         // ::com::sun::star::lang::XComponent:
      68             :         virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener)   throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      69             :         virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      70             : 
      71             :         // ::com::sun::star::inspection::XPropertyHandler:
      72             :         virtual void SAL_CALL inspect(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & Component) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::NullPointerException, std::exception) SAL_OVERRIDE;
      73             :         virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(const OUString & PropertyName) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::beans::UnknownPropertyException, std::exception) SAL_OVERRIDE;
      74             :         virtual void SAL_CALL setPropertyValue(const OUString & PropertyName, const ::com::sun::star::uno::Any & Value) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::beans::UnknownPropertyException, std::exception) SAL_OVERRIDE;
      75             :         virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState(const OUString & PropertyName) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::beans::UnknownPropertyException, std::exception) SAL_OVERRIDE;
      76             :         virtual ::com::sun::star::inspection::LineDescriptor SAL_CALL describePropertyLine(const OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyControlFactory >& ControlFactory ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::NullPointerException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      77             :         virtual ::com::sun::star::uno::Any SAL_CALL convertToPropertyValue(const OUString & PropertyName, const ::com::sun::star::uno::Any & ControlValue) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::beans::UnknownPropertyException, std::exception) SAL_OVERRIDE;
      78             :         virtual ::com::sun::star::uno::Any SAL_CALL convertToControlValue(const OUString & PropertyName, const ::com::sun::star::uno::Any & PropertyValue, const ::com::sun::star::uno::Type & ControlValueType) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::beans::UnknownPropertyException, std::exception) SAL_OVERRIDE;
      79             :         virtual void SAL_CALL addPropertyChangeListener(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener > & Listener) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::NullPointerException, std::exception) SAL_OVERRIDE;
      80             :         virtual void SAL_CALL removePropertyChangeListener(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener > & _rxListener) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      81             :         virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property > SAL_CALL getSupportedProperties() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      82             :         virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupersededProperties() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      83             :         virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getActuatingProperties() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      84             :         virtual sal_Bool SAL_CALL isComposable(const OUString & PropertyName) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::beans::UnknownPropertyException, std::exception) SAL_OVERRIDE;
      85             :         virtual ::com::sun::star::inspection::InteractiveSelectionResult SAL_CALL onInteractivePropertySelection(const OUString & PropertyName, sal_Bool Primary, ::com::sun::star::uno::Any & out_Data, const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XObjectInspectorUI > & InspectorUI) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::NullPointerException, std::exception) SAL_OVERRIDE;
      86             :         virtual void SAL_CALL actuatingPropertyChanged(const OUString & ActuatingPropertyName, const ::com::sun::star::uno::Any & NewValue, const ::com::sun::star::uno::Any & OldValue, const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XObjectInspectorUI > & InspectorUI, sal_Bool FirstTimeInit) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::NullPointerException, std::exception) SAL_OVERRIDE;
      87             :         virtual sal_Bool SAL_CALL suspend(sal_Bool Suspend) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      88             : 
      89             :     protected:
      90           2 :         virtual ~DataProviderHandler() {}
      91             :     private:
      92             :         DataProviderHandler(DataProviderHandler &) SAL_DELETED_FUNCTION;
      93             :         void operator =(DataProviderHandler &) SAL_DELETED_FUNCTION;
      94             : 
      95             : 
      96             :         bool impl_dialogLinkedFields_nothrow( ::osl::ClearableMutexGuard& _rClearBeforeDialog ) const;
      97             :         bool impl_dialogChartType_nothrow( ::osl::ClearableMutexGuard& _rClearBeforeDialog ) const;
      98             :         void impl_updateChartTitle_throw(const ::com::sun::star::uno::Any& _aValue);
      99             : 
     100             :         // override WeakComponentImplHelperBase::disposing()
     101             :         // This function is called upon disposing the component,
     102             :         // if your component needs special work when it becomes
     103             :         // disposed, do it here.
     104             :         virtual void SAL_CALL disposing() SAL_OVERRIDE;
     105             : 
     106             :         ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >                m_xContext;
     107             :         ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyHandler >          m_xFormComponentHandler; /// delegatee
     108             :         ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDatabaseDataProvider>    m_xDataProvider; /// inspectee
     109             :         ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >                       m_xFormComponent; /// inspectee
     110             :         ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportComponent >              m_xReportComponent; /// inspectee
     111             :         ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument>                 m_xChartModel;
     112             :         ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >        m_xMasterDetails;
     113             :         /// type converter, needed on various occasions
     114             :         ::com::sun::star::uno::Reference< ::com::sun::star::script::XTypeConverter >                m_xTypeConverter;
     115             :         ::std::unique_ptr< OPropertyInfoService >                                                   m_pInfoService;
     116             :     };
     117             : 
     118             : } // namespace rptui
     119             : 
     120             : 
     121             : #endif // INCLUDED_REPORTDESIGN_SOURCE_UI_INC_DATAPROVIDERHANDLER_HXX
     122             : 
     123             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11