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

Generated by: LCOV version 1.10