LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/chart2/source/inc/chartview - ExplicitValueProvider.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 2 2 100.0 %
Date: 2013-07-09 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             : #ifndef _CHART2_EXPLICITVALUEPROVIDER_HXX
      20             : #define _CHART2_EXPLICITVALUEPROVIDER_HXX
      21             : 
      22             : #include "ExplicitScaleValues.hxx"
      23             : 
      24             : #include <boost/shared_ptr.hpp>
      25             : #include <com/sun/star/chart2/XAxis.hpp>
      26             : #include <com/sun/star/chart2/XCoordinateSystem.hpp>
      27             : #include <com/sun/star/chart2/XDataSeries.hpp>
      28             : #include <com/sun/star/chart2/XDiagram.hpp>
      29             : #include <com/sun/star/awt/Rectangle.hpp>
      30             : #include <com/sun/star/frame/XModel.hpp>
      31             : #include <com/sun/star/drawing/XShape.hpp>
      32             : #include <com/sun/star/util/XNumberFormatsSupplier.hpp>
      33             : #include "chartviewdllapi.hxx"
      34             : 
      35             : //.............................................................................
      36             : namespace chart
      37             : {
      38             : //.............................................................................
      39             : 
      40             : //-----------------------------------------------------------------------------
      41             : /**
      42             : */
      43             : 
      44             : class DrawModelWrapper;
      45          89 : class OOO_DLLPUBLIC_CHARTVIEW ExplicitValueProvider
      46             : {
      47             : public:
      48             :     /** Gives calculated scale and increment values for a given xAxis in the current view.
      49             :         In contrast to the model data these explicit values are always complete as misssing auto properties are calculated.
      50             :         If the given Axis could not be found or for another reason no correct output can be given false is returned.
      51             :      */
      52             :     virtual sal_Bool getExplicitValuesForAxis(
      53             :         ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XAxis > xAxis
      54             :         , ExplicitScaleData&  rExplicitScale
      55             :         , ExplicitIncrementData& rExplicitIncrement )=0;
      56             : 
      57             :     /** for rotated objects the shape size and position differs from the visible rectangle
      58             :         if bSnapRect is set to true you get the resulting visible position (left-top) and size
      59             :     */
      60             :     virtual ::com::sun::star::awt::Rectangle
      61             :         getRectangleOfObject( const OUString& rObjectCID, bool bSnapRect=false )=0;
      62             : 
      63             :     virtual ::com::sun::star::awt::Rectangle getDiagramRectangleExcludingAxes()=0;
      64             : 
      65             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >
      66             :         getShapeForCID( const OUString& rObjectCID )=0;
      67             : 
      68             :     virtual ::boost::shared_ptr< DrawModelWrapper > getDrawModelWrapper() = 0;
      69             : 
      70             :     static const com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId();
      71             :     static ExplicitValueProvider* getExplicitValueProvider( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xChartView );
      72             : 
      73             :     static ::com::sun::star::awt::Rectangle
      74             :         addAxisTitleSizes(
      75             :             const ::com::sun::star::uno::Reference<
      76             :                 ::com::sun::star::frame::XModel >& xChartModel
      77             :             , const ::com::sun::star::uno::Reference<
      78             :                 ::com::sun::star::uno::XInterface >& xChartView
      79             :             , const ::com::sun::star::awt::Rectangle& rExcludingPositionAndSize );
      80             : 
      81             :     static ::com::sun::star::awt::Rectangle
      82             :         substractAxisTitleSizes(
      83             :             const ::com::sun::star::uno::Reference<
      84             :                 ::com::sun::star::frame::XModel >& xChartModel
      85             :             , const ::com::sun::star::uno::Reference<
      86             :                 ::com::sun::star::uno::XInterface >& xChartView
      87             :             , const ::com::sun::star::awt::Rectangle& rPositionAndSizeIncludingTitles );
      88             : 
      89             :     static sal_Int32 getExplicitNumberFormatKeyForAxis(
      90             :               const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XAxis >& xAxis
      91             :             , const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XCoordinateSystem > & xCorrespondingCoordinateSystem
      92             :             , const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier >& xNumberFormatsSupplier );
      93             : 
      94             :     static sal_Int32 getExplicitNumberFormatKeyForDataLabel(
      95             :             const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xSeriesOrPointProp
      96             :             , const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries >& xSeries
      97             :             , sal_Int32 nPointIndex /*-1 for whole series*/
      98             :             , const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDiagram >& xDiagram );
      99             : 
     100             :     static sal_Int32 getExplicitPercentageNumberFormatKeyForDataLabel(
     101             :             const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xSeriesOrPointProp
     102             :             , const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier >& xNumberFormatsSupplier );
     103             : 
     104             : protected:
     105          89 :     ~ExplicitValueProvider() {}
     106             : };
     107             : 
     108             : //.............................................................................
     109             : } //namespace chart
     110             : //.............................................................................
     111             : #endif
     112             : 
     113             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10