LCOV - code coverage report
Current view: top level - xmloff/source/chart - SchXMLChartContext.hxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 1 0.0 %
Date: 2014-04-14 Functions: 0 2 0.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 INCLUDED_XMLOFF_SOURCE_CHART_SCHXMLCHARTCONTEXT_HXX
      20             : #define INCLUDED_XMLOFF_SOURCE_CHART_SCHXMLCHARTCONTEXT_HXX
      21             : 
      22             : #include <xmloff/xmlictxt.hxx>
      23             : #include <com/sun/star/uno/Sequence.h>
      24             : #include <com/sun/star/drawing/XShape.hpp>
      25             : #include <com/sun/star/chart/ChartDataRowSource.hpp>
      26             : #include <com/sun/star/chart2/XChartDocument.hpp>
      27             : #include <com/sun/star/awt/Size.hpp>
      28             : 
      29             : #include "transporttypes.hxx"
      30             : 
      31             : #include <list>
      32             : 
      33             : class SchXMLImportHelper;
      34             : 
      35             : namespace com { namespace sun { namespace star {
      36             :     namespace chart {
      37             :         class XChartDocument;
      38             :         struct ChartSeriesAddress;
      39             :     }
      40             :     namespace xml { namespace sax {
      41             :         class XAttributeList;
      42             :     }}
      43             :     namespace drawing {
      44             :         class XShapes;
      45             :     }
      46             : }}}
      47             : 
      48           0 : struct SeriesDefaultsAndStyles
      49             : {
      50             :     //default values for series:
      51             :     ::com::sun::star::uno::Any    maSymbolTypeDefault;
      52             :     ::com::sun::star::uno::Any    maDataCaptionDefault;
      53             : 
      54             :     ::com::sun::star::uno::Any    maErrorIndicatorDefault;
      55             :     ::com::sun::star::uno::Any    maErrorCategoryDefault;
      56             :     ::com::sun::star::uno::Any    maConstantErrorLowDefault;
      57             :     ::com::sun::star::uno::Any    maConstantErrorHighDefault;
      58             :     ::com::sun::star::uno::Any    maPercentageErrorDefault;
      59             :     ::com::sun::star::uno::Any    maErrorMarginDefault;
      60             : 
      61             :     ::com::sun::star::uno::Any    maMeanValueDefault;
      62             :     ::com::sun::star::uno::Any    maRegressionCurvesDefault;
      63             : 
      64             :     ::com::sun::star::uno::Any    maStackedDefault;
      65             :     ::com::sun::star::uno::Any    maPercentDefault;
      66             :     ::com::sun::star::uno::Any    maDeepDefault;
      67             :     ::com::sun::star::uno::Any    maStackedBarsConnectedDefault;
      68             : 
      69             :     //additional information
      70             :     ::com::sun::star::uno::Any    maLinesOnProperty;
      71             : 
      72             :     //styles for series and datapoints
      73             :     ::std::list< DataRowPointStyle > maSeriesStyleList;
      74             :     ::std::list< RegressionStyle >   maRegressionStyleList;
      75             : };
      76             : 
      77             : class SchXMLChartContext : public SvXMLImportContext
      78             : {
      79             : public:
      80             :     SchXMLChartContext( SchXMLImportHelper& rImpHelper,
      81             :                         SvXMLImport& rImport, const OUString& rLocalName );
      82             :     virtual ~SchXMLChartContext();
      83             : 
      84             :     virtual void StartElement( const com::sun::star::uno::Reference<
      85             :                                      com::sun::star::xml::sax::XAttributeList >& xAttrList ) SAL_OVERRIDE;
      86             :     virtual void EndElement() SAL_OVERRIDE;
      87             :     virtual SvXMLImportContext *CreateChildContext(
      88             :         sal_uInt16 nPrefix,
      89             :         const OUString& rLocalName,
      90             :         const com::sun::star::uno::Reference<
      91             :             com::sun::star::xml::sax::XAttributeList >& xAttrList ) SAL_OVERRIDE;
      92             : 
      93             : private:
      94             :     SchXMLTable maTable;
      95             :     SchXMLImportHelper& mrImportHelper;
      96             : 
      97             :     OUString maMainTitle, maSubTitle;
      98             :     com::sun::star::awt::Point maMainTitlePos, maSubTitlePos, maLegendPos;
      99             :     OUString m_aXLinkHRefAttributeToIndicateDataProvider;
     100             :     bool m_bHasRangeAtPlotArea;
     101             :     bool m_bHasTableElement;
     102             :     sal_Bool mbAllRangeAddressesAvailable;
     103             :     sal_Bool mbColHasLabels;
     104             :     sal_Bool mbRowHasLabels;
     105             :     ::com::sun::star::chart::ChartDataRowSource meDataRowSource;
     106             :     bool mbIsStockChart;
     107             : 
     108             :     com::sun::star::uno::Sequence< com::sun::star::chart::ChartSeriesAddress > maSeriesAddresses;
     109             :     OUString msCategoriesAddress;
     110             :     OUString msChartAddress;
     111             : 
     112             :     SeriesDefaultsAndStyles maSeriesDefaultsAndStyles;
     113             :     tSchXMLLSequencesPerIndex maLSequencesPerIndex;
     114             : 
     115             :     ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > mxDrawPage;
     116             :     OUString msColTrans;
     117             :     OUString msRowTrans;
     118             :     OUString maChartTypeServiceName;
     119             : 
     120             :     ::com::sun::star::awt::Size maChartSize;
     121             : 
     122             :     /** @descr  This method bundles some settings to the chart model and executes them with
     123             :             a locked controller.  This includes setting the chart type.
     124             :         @param  aServiceName The name of the service the diagram is initialized with.
     125             :         @param  bSetWitchData   Indicates whether the data set takes it's data series from
     126             :             rows or from columns.
     127             :     */
     128             :     void    InitChart   (const OUString & rChartTypeServiceName,
     129             :                         bool bSetSwitchData);
     130             : 
     131             :     void MergeSeriesForStockChart();
     132             : };
     133             : 
     134             : class SchXMLTitleContext : public SvXMLImportContext
     135             : {
     136             : private:
     137             :     SchXMLImportHelper& mrImportHelper;
     138             :     OUString& mrTitle;
     139             :     com::sun::star::uno::Reference< com::sun::star::drawing::XShape > mxTitleShape;
     140             :     OUString msAutoStyleName;
     141             : 
     142             : public:
     143             :     SchXMLTitleContext( SchXMLImportHelper& rImpHelper,
     144             :                         SvXMLImport& rImport, const OUString& rLocalName,
     145             :                         OUString& rTitle,
     146             :                         com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xTitleShape );
     147             :     virtual ~SchXMLTitleContext();
     148             : 
     149             :     virtual void StartElement( const com::sun::star::uno::Reference<
     150             :                                com::sun::star::xml::sax::XAttributeList >& xAttrList ) SAL_OVERRIDE;
     151             :     virtual SvXMLImportContext *CreateChildContext(
     152             :         sal_uInt16 nPrefix,
     153             :         const OUString& rLocalName,
     154             :         const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList ) SAL_OVERRIDE;
     155             : };
     156             : 
     157             : #endif // INCLUDED_XMLOFF_SOURCE_CHART_SCHXMLCHARTCONTEXT_HXX
     158             : 
     159             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10