2010-10-27 13:11:31 +01:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-11-12 17:21:24 +00:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2000-09-18 16:07:07 +00:00
|
|
|
#ifndef _SCH_XMLPLOTAREACONTEXT_HXX_
|
|
|
|
#define _SCH_XMLPLOTAREACONTEXT_HXX_
|
|
|
|
|
2008-03-06 14:51:29 +00:00
|
|
|
#include "SchXMLImport.hxx"
|
2007-05-22 15:06:52 +00:00
|
|
|
#include "SchXMLChartContext.hxx"
|
2007-06-27 13:49:11 +00:00
|
|
|
#include <xmloff/xmlictxt.hxx>
|
|
|
|
#include <xmloff/shapeimport.hxx>
|
2007-05-22 15:06:52 +00:00
|
|
|
#include <com/sun/star/chart/ChartDataRowSource.hpp>
|
2001-03-22 11:31:46 +00:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
#include "transporttypes.hxx"
|
|
|
|
|
|
|
|
class SvXMLImport;
|
|
|
|
|
|
|
|
namespace com { namespace sun { namespace star {
|
|
|
|
namespace chart {
|
|
|
|
class XDiagram;
|
2001-01-15 07:58:30 +00:00
|
|
|
class X3DDisplay;
|
2001-12-17 09:22:11 +00:00
|
|
|
class XStatisticDisplay;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
2007-05-22 15:06:52 +00:00
|
|
|
namespace chart2 {
|
|
|
|
class XChartDocument;
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
namespace xml { namespace sax {
|
|
|
|
class XAttributeList;
|
|
|
|
}}}}}
|
|
|
|
|
2005-07-05 09:56:13 +00:00
|
|
|
// ----------------------------------------
|
|
|
|
|
|
|
|
class SchXML3DSceneAttributesHelper : public SdXML3DSceneAttributesHelper
|
|
|
|
{
|
|
|
|
public:
|
2007-05-22 15:06:52 +00:00
|
|
|
SchXML3DSceneAttributesHelper( SvXMLImport& rImporter );
|
|
|
|
virtual ~SchXML3DSceneAttributesHelper();
|
2005-07-05 09:56:13 +00:00
|
|
|
|
2007-05-22 15:06:52 +00:00
|
|
|
void getCameraDefaultFromDiagram( const ::com::sun::star::uno::Reference< com::sun::star::chart::XDiagram >& xDiagram );
|
2005-07-05 09:56:13 +00:00
|
|
|
|
|
|
|
private:
|
2007-05-22 15:06:52 +00:00
|
|
|
SchXML3DSceneAttributesHelper();
|
2005-07-05 09:56:13 +00:00
|
|
|
};
|
|
|
|
|
2009-11-20 11:58:22 +01:00
|
|
|
// ----------------------------------------
|
|
|
|
|
|
|
|
class SchXMLPositonAttributesHelper
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
SchXMLPositonAttributesHelper( SvXMLImport& rImporter );
|
|
|
|
~SchXMLPositonAttributesHelper();
|
|
|
|
|
|
|
|
bool readPositioningAttribute( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::rtl::OUString& rValue );
|
|
|
|
void readAutomaticPositioningProperties( XMLPropStyleContext* pPropStyleContext, const SvXMLStylesContext* pStylesCtxt );
|
|
|
|
|
|
|
|
bool hasPosSize() const;
|
2010-03-31 18:43:41 +02:00
|
|
|
bool isAutomatic() const;
|
2009-11-20 11:58:22 +01:00
|
|
|
::com::sun::star::awt::Rectangle getRectangle() const;
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
bool hasSize() const;
|
|
|
|
bool hasPosition() const;
|
|
|
|
|
|
|
|
SvXMLImport& m_rImport;
|
|
|
|
|
|
|
|
::com::sun::star::awt::Point m_aPosition;
|
|
|
|
::com::sun::star::awt::Size m_aSize;
|
|
|
|
|
|
|
|
bool m_bHasSizeWidth;
|
|
|
|
bool m_bHasSizeHeight;
|
|
|
|
bool m_bHasPositionX;
|
|
|
|
bool m_bHasPositionY;
|
|
|
|
sal_Bool m_bAutoSize;
|
|
|
|
sal_Bool m_bAutoPosition;
|
|
|
|
};
|
|
|
|
|
|
|
|
// ----------------------------------------
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
class SchXMLPlotAreaContext : public SvXMLImportContext
|
|
|
|
{
|
2008-03-06 14:51:29 +00:00
|
|
|
public:
|
|
|
|
SchXMLPlotAreaContext( SchXMLImportHelper& rImpHelper,
|
|
|
|
SvXMLImport& rImport, const rtl::OUString& rLocalName,
|
2009-07-28 10:25:31 +00:00
|
|
|
const rtl::OUString& rXLinkHRefAttributeToIndicateDataProvider,
|
2008-03-06 14:51:29 +00:00
|
|
|
::rtl::OUString& rCategoriesAddress,
|
|
|
|
::rtl::OUString& rChartAddress,
|
2009-07-28 10:25:31 +00:00
|
|
|
bool& bHasRangeAtPlotArea,
|
2008-03-06 14:51:29 +00:00
|
|
|
sal_Bool & rAllRangeAddressesAvailable,
|
|
|
|
sal_Bool & rColHasLabels,
|
|
|
|
sal_Bool & rRowHasLabels,
|
|
|
|
::com::sun::star::chart::ChartDataRowSource & rDataRowSource,
|
|
|
|
SeriesDefaultsAndStyles& rSeriesDefaultsAndStyles,
|
|
|
|
const ::rtl::OUString& aChartTypeServiceName,
|
|
|
|
tSchXMLLSequencesPerIndex & rLSequencesPerIndex,
|
|
|
|
const ::com::sun::star::awt::Size & rChartSize );
|
|
|
|
virtual ~SchXMLPlotAreaContext();
|
|
|
|
|
|
|
|
virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
|
|
|
|
virtual SvXMLImportContext* CreateChildContext(
|
2010-11-10 13:50:33 +08:00
|
|
|
sal_uInt16 nPrefix,
|
2008-03-06 14:51:29 +00:00
|
|
|
const rtl::OUString& rLocalName,
|
|
|
|
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
|
|
|
|
virtual void EndElement();
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
private:
|
|
|
|
SchXMLImportHelper& mrImportHelper;
|
2007-05-22 15:06:52 +00:00
|
|
|
::com::sun::star::uno::Reference< com::sun::star::chart::XDiagram > mxDiagram;
|
|
|
|
::com::sun::star::uno::Reference< com::sun::star::chart2::XChartDocument > mxNewDoc;
|
|
|
|
::std::vector< SchXMLAxis > maAxes;
|
2000-09-18 16:07:07 +00:00
|
|
|
rtl::OUString& mrCategoriesAddress;
|
2007-05-22 15:06:52 +00:00
|
|
|
SeriesDefaultsAndStyles& mrSeriesDefaultsAndStyles;
|
|
|
|
sal_Int32 mnNumOfLinesProp;
|
2004-08-20 07:54:10 +00:00
|
|
|
sal_Bool mbStockHasVolume;
|
2001-03-22 11:31:46 +00:00
|
|
|
sal_Int32 mnSeries;
|
2009-07-02 19:17:43 +00:00
|
|
|
GlobalSeriesImportInfo m_aGlobalSeriesImportInfo;
|
|
|
|
|
2005-07-05 09:56:13 +00:00
|
|
|
SchXML3DSceneAttributesHelper maSceneImportHelper;
|
2009-11-20 11:58:22 +01:00
|
|
|
SchXMLPositonAttributesHelper m_aOuterPositioning;//including axes and axes titles
|
|
|
|
SchXMLPositonAttributesHelper m_aInnerPositioning;//excluding axes and axes titles
|
2007-05-22 15:06:52 +00:00
|
|
|
bool mbPercentStacked;
|
2008-12-12 12:17:17 +00:00
|
|
|
bool m_bAxisPositionAttributeImported;
|
2001-03-28 18:30:56 +00:00
|
|
|
::rtl::OUString msAutoStyleName;
|
2009-07-28 10:25:31 +00:00
|
|
|
const ::rtl::OUString& m_rXLinkHRefAttributeToIndicateDataProvider;
|
2001-05-15 11:27:08 +00:00
|
|
|
::rtl::OUString& mrChartAddress;
|
2009-07-28 10:25:31 +00:00
|
|
|
bool& m_rbHasRangeAtPlotArea;
|
2007-05-22 15:06:52 +00:00
|
|
|
sal_Bool & mrColHasLabels;
|
|
|
|
sal_Bool & mrRowHasLabels;
|
|
|
|
::com::sun::star::chart::ChartDataRowSource & mrDataRowSource;
|
|
|
|
::rtl::OUString maChartTypeServiceName;
|
|
|
|
|
|
|
|
tSchXMLLSequencesPerIndex & mrLSequencesPerIndex;
|
2009-07-02 19:17:43 +00:00
|
|
|
|
2007-05-22 15:06:52 +00:00
|
|
|
bool mbGlobalChartTypeUsedBySeries;
|
2007-11-23 10:37:05 +00:00
|
|
|
::com::sun::star::awt::Size maChartSize;
|
2000-09-18 16:07:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//----------------------------------------
|
|
|
|
|
|
|
|
class SchXMLDataPointContext : public SvXMLImportContext
|
|
|
|
{
|
|
|
|
private:
|
2007-05-22 15:06:52 +00:00
|
|
|
::std::list< DataRowPointStyle >& mrStyleList;
|
|
|
|
::com::sun::star::uno::Reference<
|
|
|
|
::com::sun::star::chart2::XDataSeries > m_xSeries;
|
2000-09-18 16:07:07 +00:00
|
|
|
sal_Int32& mrIndex;
|
2007-08-17 11:05:23 +00:00
|
|
|
bool mbSymbolSizeForSeriesIsMissingInFile;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
public:
|
2012-08-15 16:18:53 +02:00
|
|
|
SchXMLDataPointContext( SvXMLImport& rImport, const rtl::OUString& rLocalName,
|
2007-05-22 15:06:52 +00:00
|
|
|
::std::list< DataRowPointStyle >& rStyleList,
|
|
|
|
const ::com::sun::star::uno::Reference<
|
2007-08-17 11:05:23 +00:00
|
|
|
::com::sun::star::chart2::XDataSeries >& xSeries, sal_Int32& rIndex,
|
|
|
|
bool bSymbolSizeForSeriesIsMissingInFile );
|
2000-09-18 16:07:07 +00:00
|
|
|
virtual ~SchXMLDataPointContext();
|
|
|
|
|
|
|
|
virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
|
|
|
|
};
|
|
|
|
|
|
|
|
// ----------------------------------------
|
|
|
|
|
2010-05-05 18:16:33 +02:00
|
|
|
class SchXMLCoordinateRegionContext : public SvXMLImportContext
|
2009-11-20 11:58:22 +01:00
|
|
|
{
|
|
|
|
public:
|
2010-05-05 18:16:33 +02:00
|
|
|
SchXMLCoordinateRegionContext(
|
2009-11-20 11:58:22 +01:00
|
|
|
SvXMLImport& rImport
|
|
|
|
, sal_uInt16 nPrefix
|
|
|
|
, const rtl::OUString& rLocalName
|
|
|
|
, SchXMLPositonAttributesHelper& rPositioning );
|
2010-05-05 18:16:33 +02:00
|
|
|
virtual ~SchXMLCoordinateRegionContext();
|
2009-11-20 11:58:22 +01:00
|
|
|
virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
|
|
|
|
|
|
|
|
private:
|
|
|
|
SchXMLPositonAttributesHelper& m_rPositioning;
|
|
|
|
};
|
|
|
|
|
|
|
|
// ----------------------------------------
|
|
|
|
|
2001-01-15 07:58:30 +00:00
|
|
|
class SchXMLWallFloorContext : public SvXMLImportContext
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
enum ContextType
|
|
|
|
{
|
|
|
|
CONTEXT_TYPE_WALL,
|
|
|
|
CONTEXT_TYPE_FLOOR
|
|
|
|
};
|
|
|
|
|
|
|
|
private:
|
|
|
|
SchXMLImportHelper& mrImportHelper;
|
2007-05-22 15:06:52 +00:00
|
|
|
::com::sun::star::uno::Reference< ::com::sun::star::chart::X3DDisplay > mxWallFloorSupplier;
|
2001-01-15 07:58:30 +00:00
|
|
|
ContextType meContextType;
|
|
|
|
|
|
|
|
public:
|
|
|
|
SchXMLWallFloorContext( SchXMLImportHelper& rImportHelper,
|
|
|
|
SvXMLImport& rImport,
|
|
|
|
sal_uInt16 nPrefix,
|
|
|
|
const rtl::OUString& rLocalName,
|
2007-05-22 15:06:52 +00:00
|
|
|
::com::sun::star::uno::Reference< ::com::sun::star::chart::XDiagram >& xDiagram,
|
2001-01-15 07:58:30 +00:00
|
|
|
ContextType eContextType );
|
2002-05-06 06:24:33 +00:00
|
|
|
virtual ~SchXMLWallFloorContext();
|
2001-01-15 07:58:30 +00:00
|
|
|
virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
|
|
|
|
};
|
|
|
|
|
2001-12-17 09:22:11 +00:00
|
|
|
// ----------------------------------------
|
|
|
|
|
|
|
|
class SchXMLStockContext : public SvXMLImportContext
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
enum ContextType
|
|
|
|
{
|
|
|
|
CONTEXT_TYPE_GAIN,
|
|
|
|
CONTEXT_TYPE_LOSS,
|
|
|
|
CONTEXT_TYPE_RANGE
|
|
|
|
};
|
|
|
|
|
|
|
|
private:
|
|
|
|
SchXMLImportHelper& mrImportHelper;
|
2007-05-22 15:06:52 +00:00
|
|
|
::com::sun::star::uno::Reference< ::com::sun::star::chart::XStatisticDisplay > mxStockPropProvider;
|
2001-12-17 09:22:11 +00:00
|
|
|
ContextType meContextType;
|
|
|
|
|
|
|
|
public:
|
|
|
|
SchXMLStockContext( SchXMLImportHelper& rImportHelper,
|
|
|
|
SvXMLImport& rImport,
|
|
|
|
sal_uInt16 nPrefix,
|
|
|
|
const rtl::OUString& rLocalName,
|
2007-05-22 15:06:52 +00:00
|
|
|
::com::sun::star::uno::Reference< ::com::sun::star::chart::XDiagram >& xDiagram,
|
2001-12-17 09:22:11 +00:00
|
|
|
ContextType eContextType );
|
2002-05-06 06:24:33 +00:00
|
|
|
virtual ~SchXMLStockContext();
|
2001-12-17 09:22:11 +00:00
|
|
|
virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
|
|
|
|
};
|
|
|
|
|
2002-05-06 06:24:33 +00:00
|
|
|
// ----------------------------------------
|
|
|
|
|
|
|
|
class SchXMLStatisticsObjectContext : public SvXMLImportContext
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
enum ContextType
|
|
|
|
{
|
|
|
|
CONTEXT_TYPE_MEAN_VALUE_LINE,
|
|
|
|
CONTEXT_TYPE_REGRESSION_CURVE,
|
|
|
|
CONTEXT_TYPE_ERROR_INDICATOR
|
|
|
|
};
|
|
|
|
|
|
|
|
SchXMLStatisticsObjectContext(
|
|
|
|
SchXMLImportHelper& rImportHelper,
|
|
|
|
SvXMLImport& rImport,
|
|
|
|
sal_uInt16 nPrefix,
|
|
|
|
const rtl::OUString& rLocalName,
|
2012-04-28 14:46:51 -04:30
|
|
|
const rtl::OUString &rSeriesStyleName,
|
2007-05-22 15:06:52 +00:00
|
|
|
::std::list< DataRowPointStyle >& rStyleList,
|
|
|
|
const ::com::sun::star::uno::Reference<
|
|
|
|
::com::sun::star::chart2::XDataSeries >& xSeries,
|
2007-11-23 10:37:05 +00:00
|
|
|
ContextType eContextType,
|
|
|
|
const ::com::sun::star::awt::Size & rChartSize );
|
2002-05-06 06:24:33 +00:00
|
|
|
|
|
|
|
virtual ~SchXMLStatisticsObjectContext();
|
|
|
|
|
|
|
|
virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
|
2007-11-23 10:37:05 +00:00
|
|
|
virtual SvXMLImportContext* CreateChildContext(
|
2010-11-10 13:50:33 +08:00
|
|
|
sal_uInt16 nPrefix,
|
2007-11-23 10:37:05 +00:00
|
|
|
const rtl::OUString& rLocalName,
|
|
|
|
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
|
2002-05-06 06:24:33 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
SchXMLImportHelper & mrImportHelper;
|
2007-05-22 15:06:52 +00:00
|
|
|
::std::list< DataRowPointStyle > & mrStyleList;
|
|
|
|
::com::sun::star::uno::Reference<
|
|
|
|
::com::sun::star::chart2::XDataSeries > m_xSeries;
|
2002-05-06 06:24:33 +00:00
|
|
|
ContextType meContextType;
|
2007-11-23 10:37:05 +00:00
|
|
|
::com::sun::star::awt::Size maChartSize;
|
2012-04-28 14:46:51 -04:30
|
|
|
rtl::OUString maSeriesStyleName;
|
2007-11-23 10:37:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// ----------------------------------------
|
|
|
|
|
|
|
|
class SchXMLEquationContext : public SvXMLImportContext
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
SchXMLEquationContext(
|
|
|
|
SchXMLImportHelper& rImportHelper,
|
|
|
|
SvXMLImport& rImport,
|
|
|
|
sal_uInt16 nPrefix,
|
|
|
|
const rtl::OUString& rLocalName,
|
|
|
|
const ::com::sun::star::uno::Reference<
|
|
|
|
::com::sun::star::chart2::XDataSeries >& xSeries,
|
|
|
|
const ::com::sun::star::awt::Size & rChartSize,
|
|
|
|
DataRowPointStyle & rRegressionStyle );
|
|
|
|
|
|
|
|
virtual ~SchXMLEquationContext();
|
|
|
|
|
|
|
|
virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
|
|
|
|
|
|
|
|
private:
|
|
|
|
SchXMLImportHelper & mrImportHelper;
|
|
|
|
DataRowPointStyle & mrRegressionStyle;
|
|
|
|
::com::sun::star::uno::Reference<
|
|
|
|
::com::sun::star::chart2::XDataSeries > m_xSeries;
|
|
|
|
::com::sun::star::awt::Size maChartSize;
|
2002-05-06 06:24:33 +00:00
|
|
|
};
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
#endif // _SCH_XMLPLOTAREACONTEXT_HXX_
|
2010-10-27 13:11:31 +01:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|