LCOV - code coverage report
Current view: top level - xmloff/source/chart - SchXMLChartContext.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 1 1 100.0 %
Date: 2012-08-25 Functions: 2 2 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 1 2 50.0 %

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      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.
      15                 :            :  *
      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).
      21                 :            :  *
      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.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : #ifndef _SCH_XMLCHARTCONTEXT_HXX_
      29                 :            : #define _SCH_XMLCHARTCONTEXT_HXX_
      30                 :            : 
      31                 :            : #include <xmloff/xmlictxt.hxx>
      32                 :            : #include <com/sun/star/uno/Sequence.h>
      33                 :            : #include <com/sun/star/drawing/XShape.hpp>
      34                 :            : #include <com/sun/star/chart/ChartDataRowSource.hpp>
      35                 :            : #include <com/sun/star/chart2/XChartDocument.hpp>
      36                 :            : #include <com/sun/star/awt/Size.hpp>
      37                 :            : 
      38                 :            : #include "transporttypes.hxx"
      39                 :            : 
      40                 :            : #include <list>
      41                 :            : 
      42                 :            : class SchXMLImportHelper;
      43                 :            : 
      44                 :            : namespace com { namespace sun { namespace star {
      45                 :            :     namespace chart {
      46                 :            :         class XChartDocument;
      47                 :            :         struct ChartSeriesAddress;
      48                 :            :     }
      49                 :            :     namespace xml { namespace sax {
      50                 :            :         class XAttributeList;
      51                 :            :     }}
      52                 :            :     namespace drawing {
      53                 :            :         class XShapes;
      54                 :            :     }
      55                 :            : }}}
      56                 :            : 
      57                 :            : // ----------------------------------------
      58                 :            : 
      59         [ +  - ]:         12 : struct SeriesDefaultsAndStyles
      60                 :            : {
      61                 :            :     //default values for series:
      62                 :            :     ::com::sun::star::uno::Any    maSymbolTypeDefault;
      63                 :            :     ::com::sun::star::uno::Any    maDataCaptionDefault;
      64                 :            : 
      65                 :            :     ::com::sun::star::uno::Any    maErrorIndicatorDefault;
      66                 :            :     ::com::sun::star::uno::Any    maErrorCategoryDefault;
      67                 :            :     ::com::sun::star::uno::Any    maConstantErrorLowDefault;
      68                 :            :     ::com::sun::star::uno::Any    maConstantErrorHighDefault;
      69                 :            :     ::com::sun::star::uno::Any    maPercentageErrorDefault;
      70                 :            :     ::com::sun::star::uno::Any    maErrorMarginDefault;
      71                 :            : 
      72                 :            :     ::com::sun::star::uno::Any    maMeanValueDefault;
      73                 :            :     ::com::sun::star::uno::Any    maRegressionCurvesDefault;
      74                 :            : 
      75                 :            :     ::com::sun::star::uno::Any    maStackedDefault;
      76                 :            :     ::com::sun::star::uno::Any    maPercentDefault;
      77                 :            :     ::com::sun::star::uno::Any    maDeepDefault;
      78                 :            :     ::com::sun::star::uno::Any    maStackedBarsConnectedDefault;
      79                 :            : 
      80                 :            :     //additional information
      81                 :            :     ::com::sun::star::uno::Any    maLinesOnProperty;
      82                 :            : 
      83                 :            :     //styles for series and datapoints
      84                 :            :     ::std::list< DataRowPointStyle > maSeriesStyleList;
      85                 :            : };
      86                 :            : 
      87                 :            : class SchXMLChartContext : public SvXMLImportContext
      88                 :            : {
      89                 :            : public:
      90                 :            :     SchXMLChartContext( SchXMLImportHelper& rImpHelper,
      91                 :            :                         SvXMLImport& rImport, const rtl::OUString& rLocalName );
      92                 :            :     virtual ~SchXMLChartContext();
      93                 :            : 
      94                 :            :     virtual void StartElement( const com::sun::star::uno::Reference<
      95                 :            :                                      com::sun::star::xml::sax::XAttributeList >& xAttrList );
      96                 :            :     virtual void EndElement();
      97                 :            :     virtual SvXMLImportContext *CreateChildContext(
      98                 :            :         sal_uInt16 nPrefix,
      99                 :            :         const rtl::OUString& rLocalName,
     100                 :            :         const com::sun::star::uno::Reference<
     101                 :            :             com::sun::star::xml::sax::XAttributeList >& xAttrList );
     102                 :            : 
     103                 :            : private:
     104                 :            :     SchXMLTable maTable;
     105                 :            :     SchXMLImportHelper& mrImportHelper;
     106                 :            : 
     107                 :            :     ::rtl::OUString maMainTitle, maSubTitle;
     108                 :            :     com::sun::star::awt::Point maMainTitlePos, maSubTitlePos, maLegendPos;
     109                 :            :     ::rtl::OUString m_aXLinkHRefAttributeToIndicateDataProvider;
     110                 :            :     bool m_bHasRangeAtPlotArea;
     111                 :            :     bool m_bHasTableElement;
     112                 :            :     sal_Bool mbAllRangeAddressesAvailable;
     113                 :            :     sal_Bool mbColHasLabels;
     114                 :            :     sal_Bool mbRowHasLabels;
     115                 :            :     ::com::sun::star::chart::ChartDataRowSource meDataRowSource;
     116                 :            :     bool mbIsStockChart;
     117                 :            : 
     118                 :            :     com::sun::star::uno::Sequence< com::sun::star::chart::ChartSeriesAddress > maSeriesAddresses;
     119                 :            :     ::rtl::OUString msCategoriesAddress;
     120                 :            :     ::rtl::OUString msChartAddress;
     121                 :            : 
     122                 :            :     SeriesDefaultsAndStyles maSeriesDefaultsAndStyles;
     123                 :            :     tSchXMLLSequencesPerIndex maLSequencesPerIndex;
     124                 :            : 
     125                 :            :     ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > mxDrawPage;
     126                 :            :     ::rtl::OUString msColTrans;
     127                 :            :     ::rtl::OUString msRowTrans;
     128                 :            :     ::rtl::OUString maChartTypeServiceName;
     129                 :            : 
     130                 :            :     ::com::sun::star::awt::Size maChartSize;
     131                 :            : 
     132                 :            :     /** @descr  This method bundles some settings to the chart model and executes them with
     133                 :            :             a locked controller.  This includes setting the chart type.
     134                 :            :         @param  aServiceName The name of the service the diagram is initialized with.
     135                 :            :         @param  bSetWitchData   Indicates whether the data set takes it's data series from
     136                 :            :             rows or from columns.
     137                 :            :     */
     138                 :            :     void    InitChart   (const ::rtl::OUString & rChartTypeServiceName,
     139                 :            :                         sal_Bool bSetSwitchData);
     140                 :            : 
     141                 :            :     void MergeSeriesForStockChart();
     142                 :            : };
     143                 :            : 
     144                 :            : // ----------------------------------------
     145                 :            : 
     146                 :            : class SchXMLTitleContext : public SvXMLImportContext
     147                 :            : {
     148                 :            : private:
     149                 :            :     SchXMLImportHelper& mrImportHelper;
     150                 :            :     rtl::OUString& mrTitle;
     151                 :            :     com::sun::star::uno::Reference< com::sun::star::drawing::XShape > mxTitleShape;
     152                 :            :     rtl::OUString msAutoStyleName;
     153                 :            : 
     154                 :            : public:
     155                 :            :     SchXMLTitleContext( SchXMLImportHelper& rImpHelper,
     156                 :            :                         SvXMLImport& rImport, const rtl::OUString& rLocalName,
     157                 :            :                         rtl::OUString& rTitle,
     158                 :            :                         com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xTitleShape );
     159                 :            :     virtual ~SchXMLTitleContext();
     160                 :            : 
     161                 :            :     virtual void StartElement( const com::sun::star::uno::Reference<
     162                 :            :                                com::sun::star::xml::sax::XAttributeList >& xAttrList );
     163                 :            :     virtual SvXMLImportContext *CreateChildContext(
     164                 :            :         sal_uInt16 nPrefix,
     165                 :            :         const rtl::OUString& rLocalName,
     166                 :            :         const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList );
     167                 :            : };
     168                 :            : 
     169                 :            : #endif  // _SCH_XMLCHARTCONTEXT_HXX_
     170                 :            : 
     171                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10