diff options
author | Matúš Kukan <matus.kukan@collabora.com> | 2014-06-24 21:16:18 +0200 |
---|---|---|
committer | Matúš Kukan <matus.kukan@collabora.com> | 2014-06-25 09:45:26 +0200 |
commit | 2e049367219d427e315e58ef193438ea48a0196b (patch) | |
tree | b9d8f4e8589a102528022c01bec9c342aa7d41df /include/oox | |
parent | 3a8d0c0ff5c3b23de3bfb416a5c0e44e5ddc467a (diff) |
Move more oox/drawingml/ internal headers to oox/inc.
Change-Id: I0963c92356f8388ce02fb36e172ad3b2af8ba8f8
Diffstat (limited to 'include/oox')
25 files changed, 0 insertions, 2919 deletions
diff --git a/include/oox/drawingml/chart/axiscontext.hxx b/include/oox/drawingml/chart/axiscontext.hxx deleted file mode 100644 index 0c832802b896..000000000000 --- a/include/oox/drawingml/chart/axiscontext.hxx +++ /dev/null @@ -1,120 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * 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 . - */ - -#ifndef INCLUDED_OOX_DRAWINGML_CHART_AXISCONTEXT_HXX -#define INCLUDED_OOX_DRAWINGML_CHART_AXISCONTEXT_HXX - -#include <oox/drawingml/chart/chartcontextbase.hxx> - -namespace oox { -namespace drawingml { -namespace chart { - - - -struct AxisDispUnitsModel; - -/** Handler for a value axis display units context (c:dispUnits element). - */ -class AxisDispUnitsContext : public ContextBase< AxisDispUnitsModel > -{ -public: - explicit AxisDispUnitsContext( ::oox::core::ContextHandler2Helper& rParent, AxisDispUnitsModel& rModel ); - virtual ~AxisDispUnitsContext(); - - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) SAL_OVERRIDE; -}; - - - -struct AxisModel; - -/** Base class for axis context handlers (c:catAx, c:dateAx, c:serAx, c:valAx - elements). - */ -class AxisContextBase : public ContextBase< AxisModel > -{ -public: - explicit AxisContextBase( ::oox::core::ContextHandler2Helper& rParent, AxisModel& rModel ); - virtual ~AxisContextBase(); - - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) SAL_OVERRIDE; -}; - - - -/** Handler for a category axis context (c:catAx element). - */ -class CatAxisContext : public AxisContextBase -{ -public: - explicit CatAxisContext( ::oox::core::ContextHandler2Helper& rParent, AxisModel& rModel ); - virtual ~CatAxisContext(); - - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) SAL_OVERRIDE; -}; - - - -/** Handler for a date axis context (c:dateAx element). - */ -class DateAxisContext : public AxisContextBase -{ -public: - explicit DateAxisContext( ::oox::core::ContextHandler2Helper& rParent, AxisModel& rModel ); - virtual ~DateAxisContext(); - - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) SAL_OVERRIDE; -}; - - - -/** Handler for a series axis context (c:serAx element). - */ -class SerAxisContext : public AxisContextBase -{ -public: - explicit SerAxisContext( ::oox::core::ContextHandler2Helper& rParent, AxisModel& rModel ); - virtual ~SerAxisContext(); - - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) SAL_OVERRIDE; -}; - - - -/** Handler for a value axis context (c:valAx element). - */ -class ValAxisContext : public AxisContextBase -{ -public: - explicit ValAxisContext( ::oox::core::ContextHandler2Helper& rParent, AxisModel& rModel ); - virtual ~ValAxisContext(); - - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) SAL_OVERRIDE; -}; - - - -} // namespace chart -} // namespace drawingml -} // namespace oox - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/oox/drawingml/chart/axisconverter.hxx b/include/oox/drawingml/chart/axisconverter.hxx deleted file mode 100644 index 3b7a58720004..000000000000 --- a/include/oox/drawingml/chart/axisconverter.hxx +++ /dev/null @@ -1,79 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * 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 . - */ - -#ifndef INCLUDED_OOX_DRAWINGML_CHART_AXISCONVERTER_HXX -#define INCLUDED_OOX_DRAWINGML_CHART_AXISCONVERTER_HXX - -#include <oox/drawingml/chart/converterbase.hxx> - -namespace com { namespace sun { namespace star { - namespace chart2 { class XAxis; } - namespace chart2 { class XCoordinateSystem; } -} } } - -namespace oox { -namespace drawingml { -namespace chart { - - - -struct AxisDispUnitsModel; - -class AxisDispUnitsConverter : public ConverterBase< AxisDispUnitsModel > -{ -public: - explicit AxisDispUnitsConverter( - const ConverterRoot& rParent, - AxisDispUnitsModel& rModel ); - virtual ~AxisDispUnitsConverter(); - - /** Creates a chart2 axis and inserts it into the passed coordinate system. */ - void convertFromModel( - const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XAxis >& rxAxis); -}; - -struct AxisModel; -class TypeGroupConverter; - -class AxisConverter : public ConverterBase< AxisModel > -{ -public: - explicit AxisConverter( - const ConverterRoot& rParent, - AxisModel& rModel ); - virtual ~AxisConverter(); - - /** Creates a chart2 axis and inserts it into the passed coordinate system. */ - void convertFromModel( - const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XCoordinateSystem >& rxCoordSystem, - TypeGroupConverter& rTypeGroup, - const AxisModel* pCrossingAxis, - sal_Int32 nAxesSetIdx, - sal_Int32 nAxisIdx ); -}; - - - -} // namespace chart -} // namespace drawingml -} // namespace oox - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/oox/drawingml/chart/axismodel.hxx b/include/oox/drawingml/chart/axismodel.hxx deleted file mode 100644 index b3a18f05bbff..000000000000 --- a/include/oox/drawingml/chart/axismodel.hxx +++ /dev/null @@ -1,105 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * 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 . - */ - -#ifndef INCLUDED_OOX_DRAWINGML_CHART_AXISMODEL_HXX -#define INCLUDED_OOX_DRAWINGML_CHART_AXISMODEL_HXX - -#include <oox/drawingml/shape.hxx> -#include <oox/drawingml/chart/titlemodel.hxx> - -namespace oox { -namespace drawingml { -namespace chart { - - - -struct AxisDispUnitsModel -{ - typedef ModelRef< Shape > ShapeRef; - typedef ModelRef< TextBody > TextBodyRef; - typedef ModelRef< LayoutModel > LayoutRef; - typedef ModelRef< TextModel > TextRef; - - ShapeRef mxShapeProp; /// Label frame formatting. - TextBodyRef mxTextProp; /// Label text formatting. - LayoutRef mxLayout; /// Layout/position of the axis units label. - TextRef mxText; /// Text source of the axis units label. - double mfCustomUnit; /// Custom unit size on value axis. - OUString mnBuiltInUnit; /// Built-in unit on value axis. - - explicit AxisDispUnitsModel(); - ~AxisDispUnitsModel(); -}; - - - -struct AxisModel -{ - typedef ModelRef< Shape > ShapeRef; - typedef ModelRef< TextBody > TextBodyRef; - typedef ModelRef< TitleModel > TitleRef; - typedef ModelRef< AxisDispUnitsModel > AxisDispUnitsRef; - - ShapeRef mxShapeProp; /// Axis line formatting. - TextBodyRef mxTextProp; /// Axis label text formatting. - TitleRef mxTitle; /// Axis title. - AxisDispUnitsRef mxDispUnits; /// Axis units label. - ShapeRef mxMajorGridLines; /// Major grid lines formatting. - ShapeRef mxMinorGridLines; /// Minor grid lines formatting. - NumberFormat maNumberFormat; /// Number format for axis tick labels. - OptValue< double > mofCrossesAt; /// Position on this axis where another axis crosses. - OptValue< double > mofMajorUnit; /// Unit for major tick marks on date/value axis. - OptValue< double > mofMinorUnit; /// Unit for minor tick marks on date/value axis. - OptValue< double > mofLogBase; /// Logarithmic base for logarithmic axes. - OptValue< double > mofMax; /// Maximum axis value. - OptValue< double > mofMin; /// Minimum axis value. - OptValue< sal_Int32 > monBaseTimeUnit; /// Base time unit shown on a date axis. - sal_Int32 mnAxisId; /// Unique axis identifier. - sal_Int32 mnAxisPos; /// Position of the axis (top/bottom/left/right). - sal_Int32 mnCrossAxisId; /// Identifier of a crossing axis. - sal_Int32 mnCrossBetween; /// This value axis crosses between or inside category. - sal_Int32 mnCrossMode; /// Mode this axis crosses another axis (min, max, auto). - sal_Int32 mnLabelAlign; /// Tick mark label alignment. - sal_Int32 mnLabelOffset; /// Tick mark label distance from axis. - sal_Int32 mnMajorTickMark; /// Major tick mark style. - sal_Int32 mnMajorTimeUnit; /// Time unit for major tick marks on date axis. - sal_Int32 mnMinorTickMark; /// Mainor tick mark style. - sal_Int32 mnMinorTimeUnit; /// Time unit for minor tick marks on date axis. - sal_Int32 mnOrientation; /// Axis orientation (value order min to max, or max to min). - sal_Int32 mnTickLabelPos; /// Position of tick mark labels relative to the axis. - sal_Int32 mnTickLabelSkip; /// Number of tick mark labels to skip. - sal_Int32 mnTickMarkSkip; /// Number of tick marks to skip. - sal_Int32 mnTypeId; /// Type identifier of this axis. - bool mbAuto; /// True = automatic selection of text/date axis type. - bool mbDeleted; /// True = axis has been deleted manually. - bool mbNoMultiLevel; /// True = no multi-level categories supported. - - explicit AxisModel( sal_Int32 nTypeId ); - ~AxisModel(); -}; - - - -} // namespace chart -} // namespace drawingml -} // namespace oox - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/oox/drawingml/chart/chartcontextbase.hxx b/include/oox/drawingml/chart/chartcontextbase.hxx deleted file mode 100644 index 9bf80ce947fc..000000000000 --- a/include/oox/drawingml/chart/chartcontextbase.hxx +++ /dev/null @@ -1,95 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * 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 . - */ - -#ifndef INCLUDED_OOX_DRAWINGML_CHART_CHARTCONTEXTBASE_HXX -#define INCLUDED_OOX_DRAWINGML_CHART_CHARTCONTEXTBASE_HXX - -#include <oox/core/fragmenthandler2.hxx> - -namespace oox { namespace drawingml { class Shape; } } - -namespace oox { -namespace drawingml { -namespace chart { - - - -template< typename ModelType > -class ContextBase : public ::oox::core::ContextHandler2 -{ -public: - explicit ContextBase( ::oox::core::ContextHandler2Helper& rParent, ModelType& rModel ) : - ::oox::core::ContextHandler2( rParent ), mrModel( rModel ) {} - virtual ~ContextBase() {} - -protected: - ModelType& mrModel; -}; - - - -template< typename ModelType > -class FragmentBase : public ::oox::core::FragmentHandler2 -{ -public: - explicit FragmentBase( ::oox::core::XmlFilterBase& rFilter, const OUString& rFragmentPath, ModelType& rModel ) : - ::oox::core::FragmentHandler2( rFilter, rFragmentPath, false ), mrModel( rModel ) {} - virtual ~FragmentBase() {} - -protected: - ModelType& mrModel; -}; - - - -/** Help class for all contexts that have only the c:spPr child element. - */ -class ShapePrWrapperContext : public ContextBase< Shape > -{ -public: - explicit ShapePrWrapperContext( ::oox::core::ContextHandler2Helper& rParent, Shape& rModel ); - virtual ~ShapePrWrapperContext(); - - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) SAL_OVERRIDE; -}; - - - -struct LayoutModel; - -/** Handler for a chart layout context (c:layout element). - */ -class LayoutContext : public ContextBase< LayoutModel > -{ -public: - explicit LayoutContext( ::oox::core::ContextHandler2Helper& rParent, LayoutModel& rModel ); - virtual ~LayoutContext(); - - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) SAL_OVERRIDE; -}; - - - -} // namespace chart -} // namespace drawingml -} // namespace oox - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/oox/drawingml/chart/chartdrawingfragment.hxx b/include/oox/drawingml/chart/chartdrawingfragment.hxx deleted file mode 100644 index b2d48df71b65..000000000000 --- a/include/oox/drawingml/chart/chartdrawingfragment.hxx +++ /dev/null @@ -1,115 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * 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 . - */ - -#ifndef INCLUDED_OOX_DRAWINGML_CHART_CHARTDRAWINGFRAGMENT_HXX -#define INCLUDED_OOX_DRAWINGML_CHART_CHARTDRAWINGFRAGMENT_HXX - -#include <oox/core/fragmenthandler2.hxx> -#include <oox/drawingml/shape.hxx> - -namespace oox { -namespace drawingml { -namespace chart { - - - -/** Relative shape position in a chart object. */ -struct AnchorPosModel -{ - double mfX; /// X coordinate relative to chart object (0.0 to 1.0). - double mfY; /// Y coordinate relative to chart object (0.0 to 1.0). - - AnchorPosModel() : mfX( -1.0 ), mfY( -1.0 ) {} - bool isValid() const { return (0.0 <= mfX) && (mfX <= 1.0) && (0.0 <= mfY) && (mfY <= 1.0); } -}; - - - -/** Absolute shape size in a chart object (in EMUs). */ -struct AnchorSizeModel : public EmuSize -{ - AnchorSizeModel() : EmuSize( -1, -1 ) {} - bool isValid() const { return (Width >= 0) && (Height >= 0); } -}; - - - -/** Contains the position of a shape in the chart object. Supports different - shape anchor modes (absolute, relative). - */ -class ShapeAnchor -{ -public: - explicit ShapeAnchor( bool bRelSize ); - - /** Imports the absolute anchor size from the cdr:ext element. */ - void importExt( const AttributeList& rAttribs ); - /** Sets an the relative anchor position from the cdr:from or cdr:to element. */ - void setPos( sal_Int32 nElement, sal_Int32 nParentContext, const OUString& rValue ); - - /** Calculates the resulting shape anchor in EMUs. */ - EmuRectangle calcAnchorRectEmu( const EmuRectangle& rChartRect ) const; - -private: - AnchorPosModel maFrom; /// Top-left position relative to chart object. - AnchorPosModel maTo; /// Bottom-right position relative to chart object. - AnchorSizeModel maSize; /// Shape size, if anchor has absolute size. - bool mbRelSize; /// True = relative size, false = absolute size. -}; - -typedef ::boost::shared_ptr< ShapeAnchor > ShapeAnchorRef; - - - -/** Handler for a chart drawing fragment (c:userShapes root element). - */ -class ChartDrawingFragment : public ::oox::core::FragmentHandler2 -{ -public: - explicit ChartDrawingFragment( - ::oox::core::XmlFilterBase& rFilter, - const OUString& rFragmentPath, - const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& rxDrawPage, - const ::com::sun::star::awt::Size& rChartSize, - const ::com::sun::star::awt::Point& rShapesOffset, - bool bOleSupport ); - virtual ~ChartDrawingFragment(); - - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) SAL_OVERRIDE; - virtual void onCharacters( const OUString& rChars ) SAL_OVERRIDE; - virtual void onEndElement() SAL_OVERRIDE; - -private: - ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > - mxDrawPage; /// Drawing page of this sheet. - ::oox::drawingml::ShapePtr mxShape; /// Current top-level shape. - ShapeAnchorRef mxAnchor; /// Current anchor of top-level shape. - EmuRectangle maChartRectEmu; /// Position and size of the chart object for embedded shapes (in EMUs). - bool mbOleSupport; /// True = allow to insert OLE objects into the drawing page. -}; - - - -} // namespace chart -} // namespace drawingml -} // namespace oox - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/oox/drawingml/chart/chartspaceconverter.hxx b/include/oox/drawingml/chart/chartspaceconverter.hxx deleted file mode 100644 index a273ba91dbd8..000000000000 --- a/include/oox/drawingml/chart/chartspaceconverter.hxx +++ /dev/null @@ -1,57 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * 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 . - */ - -#ifndef INCLUDED_OOX_DRAWINGML_CHART_CHARTSPACECONVERTER_HXX -#define INCLUDED_OOX_DRAWINGML_CHART_CHARTSPACECONVERTER_HXX - -#include <oox/drawingml/chart/converterbase.hxx> - -namespace com { namespace sun { namespace star { - namespace drawing { class XShapes; } -} } } - -namespace oox { -namespace drawingml { -namespace chart { - - - -struct ChartSpaceModel; - -class ChartSpaceConverter : public ConverterBase< ChartSpaceModel > -{ -public: - explicit ChartSpaceConverter( const ConverterRoot& rParent, ChartSpaceModel& rModel ); - virtual ~ChartSpaceConverter(); - - /** Converts the contained OOXML chart model to a chart2 document. */ - void convertFromModel( - const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& rxExternalPage, - const ::com::sun::star::awt::Point& rChartPos ); -}; - - - -} // namespace chart -} // namespace drawingml -} // namespace oox - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/oox/drawingml/chart/chartspacefragment.hxx b/include/oox/drawingml/chart/chartspacefragment.hxx deleted file mode 100644 index 8f73594d8673..000000000000 --- a/include/oox/drawingml/chart/chartspacefragment.hxx +++ /dev/null @@ -1,57 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * 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 . - */ - -#ifndef INCLUDED_OOX_DRAWINGML_CHART_CHARTSPACEFRAGMENT_HXX -#define INCLUDED_OOX_DRAWINGML_CHART_CHARTSPACEFRAGMENT_HXX - -#include <oox/drawingml/chart/chartcontextbase.hxx> - -namespace oox { -namespace drawingml { -namespace chart { - - - -struct ChartSpaceModel; - -/** Handler for a chart fragment (c:chartSpace root element). - */ -class ChartSpaceFragment : public FragmentBase< ChartSpaceModel > -{ -public: - explicit ChartSpaceFragment( - ::oox::core::XmlFilterBase& rFilter, - const OUString& rFragmentPath, - ChartSpaceModel& rModel ); - virtual ~ChartSpaceFragment(); - - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) SAL_OVERRIDE; - - ::oox::core::XmlFilterBase& mpFilterBase; -}; - - - -} // namespace chart -} // namespace drawingml -} // namespace oox - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/oox/drawingml/chart/chartspacemodel.hxx b/include/oox/drawingml/chart/chartspacemodel.hxx deleted file mode 100644 index cc9015d2020a..000000000000 --- a/include/oox/drawingml/chart/chartspacemodel.hxx +++ /dev/null @@ -1,73 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * 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 . - */ - -#ifndef INCLUDED_OOX_DRAWINGML_CHART_CHARTSPACEMODEL_HXX -#define INCLUDED_OOX_DRAWINGML_CHART_CHARTSPACEMODEL_HXX - -#include <oox/drawingml/shape.hxx> -#include <oox/drawingml/chart/plotareamodel.hxx> -#include <oox/drawingml/chart/titlemodel.hxx> - -namespace oox { -namespace drawingml { -namespace chart { - - - -struct ChartSpaceModel -{ - typedef ModelRef< Shape > ShapeRef; - typedef ModelRef< TextBody > TextBodyRef; - typedef ModelRef< PlotAreaModel > PlotAreaRef; - typedef ModelRef< WallFloorModel > WallFloorRef; - typedef ModelRef< View3DModel > View3DRef; - typedef ModelRef< TitleModel > TitleRef; - typedef ModelRef< LegendModel > LegendRef; - - ShapeRef mxShapeProp; /// Chart frame formatting. - TextBodyRef mxTextProp; /// Global chart text formatting. - PlotAreaRef mxPlotArea; /// Plot area of the chart. - WallFloorRef mxFloor; /// Floor formatting in 3D charts. - WallFloorRef mxBackWall; /// Back wall formatting in 3D charts. - WallFloorRef mxSideWall; /// Side wall formatting in 3D charts. - View3DRef mxView3D; /// 3D settings. - TitleRef mxTitle; /// Chart main title. - LegendRef mxLegend; /// Chart legend. - OUString maDrawingPath; /// Path to drawing fragment with embedded shapes. - OUString maSheetPath; /// Path to embedded charts. - sal_Int32 mnDispBlanksAs; /// Mode how to display blank values. - sal_Int32 mnStyle; /// Index to default formatting. - bool mbAutoTitleDel; /// True = automatic title deleted manually. - bool mbPlotVisOnly; /// True = plot visible cells in a sheet only. - bool mbShowLabelsOverMax;/// True = show labels over chart maximum. - bool mbPivotChart; /// True = pivot chart. - - explicit ChartSpaceModel(); - ~ChartSpaceModel(); -}; - - - -} // namespace chart -} // namespace drawingml -} // namespace oox - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/oox/drawingml/chart/converterbase.hxx b/include/oox/drawingml/chart/converterbase.hxx deleted file mode 100644 index e58eb9df3456..000000000000 --- a/include/oox/drawingml/chart/converterbase.hxx +++ /dev/null @@ -1,155 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * 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 . - */ - -#ifndef INCLUDED_OOX_DRAWINGML_CHART_CONVERTERBASE_HXX -#define INCLUDED_OOX_DRAWINGML_CHART_CONVERTERBASE_HXX - -#include <oox/drawingml/chart/chartcontextbase.hxx> -#include <oox/drawingml/chart/objectformatter.hxx> - -namespace com { namespace sun { namespace star { - namespace awt { struct Rectangle; } - namespace awt { struct Size; } - namespace chart2 { class XChartDocument; } - namespace chart2 { class XTitle; } - namespace drawing { class XShape; } - namespace uno { class XComponentContext; } -} } } - -namespace oox { namespace core { - class XmlFilterBase; -} } - -namespace oox { -namespace drawingml { -namespace chart { - -class ChartConverter; -struct ChartSpaceModel; -struct ConverterData; - - - -const sal_Int32 API_PRIM_AXESSET = 0; -const sal_Int32 API_SECN_AXESSET = 1; - -const sal_Int32 API_X_AXIS = 0; -const sal_Int32 API_Y_AXIS = 1; -const sal_Int32 API_Z_AXIS = 2; - - - -class ConverterRoot -{ -public: - explicit ConverterRoot( - ::oox::core::XmlFilterBase& rFilter, - ChartConverter& rChartConverter, - const ChartSpaceModel& rChartModel, - const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument >& rxChartDoc, - const ::com::sun::star::awt::Size& rChartSize ); - virtual ~ConverterRoot(); - - /** Creates an instance for the passed service name, using the process service factory. */ - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > - createInstance( const OUString& rServiceName ) const; - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > - getComponentContext() const; - -protected: - /** Returns the filter object of the imported/exported document. */ - ::oox::core::XmlFilterBase& getFilter() const; - /** Returns the chart converter. */ - ChartConverter* getChartConverter() const; - /** Returns the API chart document model. */ - ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument > - getChartDocument() const; - /** Returns the position and size of the chart shape in 1/100 mm. */ - const ::com::sun::star::awt::Size& getChartSize() const; - /** Returns the object formatter. */ - ObjectFormatter& getFormatter() const; - - /** Registers a title object and its layout data, needed for conversion of - the title position using the old Chart1 API. */ - void registerTitleLayout( - const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XTitle >& rxTitle, - const ModelRef< LayoutModel >& rxLayout, ObjectType eObjType, - sal_Int32 nMainIdx = -1, sal_Int32 nSubIdx = -1 ); - /** Converts the positions of the main title and all axis titles. */ - void convertTitlePositions(); - -private: - ::boost::shared_ptr< ConverterData > mxData; -}; - - - -/** Base class of all converter classes. Holds a reference to a model structure - of the specified type. - */ -template< typename ModelType > -class ConverterBase : public ConverterRoot -{ -public: - const ModelType& getModel() const { return mrModel; } - -protected: - explicit ConverterBase( const ConverterRoot& rParent, ModelType& rModel ) : - ConverterRoot( rParent ), mrModel( rModel ) {} - virtual ~ConverterBase() {} - -protected: - ModelType& mrModel; -}; - - - -/** A layout converter calculates positions and sizes for various chart objects. - */ -class LayoutConverter : public ConverterBase< LayoutModel > -{ -public: - explicit LayoutConverter( const ConverterRoot& rParent, LayoutModel& rModel ); - virtual ~LayoutConverter(); - - /** Tries to calculate the absolute position and size from the contained - OOXML layout model. Returns true, if returned rectangle is valid. */ - bool calcAbsRectangle( ::com::sun::star::awt::Rectangle& orRect ) const; - - /** Tries to set the position and size from the contained OOXML layout model. - Returns true, if a manual position and size could be calculated. */ - bool convertFromModel( PropertySet& rPropSet ); - - /** Tries to set the position from the contained OOXML layout model. - Returns true, if a manual position could be calculated. */ - bool convertFromModel( - const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& rxShape, - double fRotationAngle ); - bool getAutoLayout(){return mrModel.mbAutoLayout;} -}; - - - -} // namespace chart -} // namespace drawingml -} // namespace oox - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/oox/drawingml/chart/datasourcecontext.hxx b/include/oox/drawingml/chart/datasourcecontext.hxx deleted file mode 100644 index 84c43bb921ac..000000000000 --- a/include/oox/drawingml/chart/datasourcecontext.hxx +++ /dev/null @@ -1,94 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * 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 . - */ - -#ifndef INCLUDED_OOX_DRAWINGML_CHART_DATASOURCECONTEXT_HXX -#define INCLUDED_OOX_DRAWINGML_CHART_DATASOURCECONTEXT_HXX - -#include <oox/drawingml/chart/chartcontextbase.hxx> - -namespace oox { -namespace drawingml { -namespace chart { - - - -struct DataSequenceModel; - -typedef ContextBase< DataSequenceModel > DataSequenceContextBase; - - - -/** Handler for a double sequence context (c:numLit, c:numRef elements). - */ -class DoubleSequenceContext : public DataSequenceContextBase -{ -public: - explicit DoubleSequenceContext( ::oox::core::ContextHandler2Helper& rParent, DataSequenceModel& rModel ); - virtual ~DoubleSequenceContext(); - - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) SAL_OVERRIDE; - virtual void onCharacters( const OUString& rChars ) SAL_OVERRIDE; - -private: - sal_Int32 mnPtIndex; /// Current data point index. -}; - - - -/** Handler for a string sequence context (c:multiLvlStrRef, c:strLit, - c:strRef elements). - */ -class StringSequenceContext : public DataSequenceContextBase -{ -public: - explicit StringSequenceContext( ::oox::core::ContextHandler2Helper& rParent, DataSequenceModel& rModel ); - virtual ~StringSequenceContext(); - - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) SAL_OVERRIDE; - virtual void onCharacters( const OUString& rChars ) SAL_OVERRIDE; - -private: - sal_Int32 mnPtIndex; /// Current data point index. -}; - - - -struct DataSourceModel; - -/** Handler for a data source context (c:bubbleSize, c:cat, c:minus, c:plus, - c:val, c:xVal, c:yVal elements). - */ -class DataSourceContext : public ContextBase< DataSourceModel > -{ -public: - explicit DataSourceContext( ::oox::core::ContextHandler2Helper& rParent, DataSourceModel& rModel ); - virtual ~DataSourceContext(); - - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) SAL_OVERRIDE; -}; - - - -} // namespace chart -} // namespace drawingml -} // namespace oox - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/oox/drawingml/chart/datasourceconverter.hxx b/include/oox/drawingml/chart/datasourceconverter.hxx deleted file mode 100644 index 6b6ce95d8dfe..000000000000 --- a/include/oox/drawingml/chart/datasourceconverter.hxx +++ /dev/null @@ -1,71 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * 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 . - */ - -#ifndef INCLUDED_OOX_DRAWINGML_CHART_DATASOURCECONVERTER_HXX -#define INCLUDED_OOX_DRAWINGML_CHART_DATASOURCECONVERTER_HXX - -#include <oox/drawingml/chart/converterbase.hxx> - -namespace com { namespace sun { namespace star { - namespace chart2 { namespace data { class XDataSequence; } } -} } } - -namespace oox { -namespace drawingml { -namespace chart { - - - -struct DataSequenceModel; - -class DataSequenceConverter : public ConverterBase< DataSequenceModel > -{ -public: - explicit DataSequenceConverter( const ConverterRoot& rParent, DataSequenceModel& rModel ); - virtual ~DataSequenceConverter(); - - /** Creates a data sequence object from the contained formula link. */ - ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > - createDataSequence( const OUString& rRole ); -}; - - - -struct DataSourceModel; - -class DataSourceConverter : public ConverterBase< DataSourceModel > -{ -public: - explicit DataSourceConverter( const ConverterRoot& rParent, DataSourceModel& rModel ); - virtual ~DataSourceConverter(); - - /** Creates a data sequence object from the contained series data. */ - ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > - createDataSequence( const OUString& rRole ); -}; - - - -} // namespace chart -} // namespace drawingml -} // namespace oox - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/oox/drawingml/chart/objectformatter.hxx b/include/oox/drawingml/chart/objectformatter.hxx deleted file mode 100644 index ebe5a01d8991..000000000000 --- a/include/oox/drawingml/chart/objectformatter.hxx +++ /dev/null @@ -1,157 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * 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 . - */ - -#ifndef INCLUDED_OOX_DRAWINGML_CHART_OBJECTFORMATTER_HXX -#define INCLUDED_OOX_DRAWINGML_CHART_OBJECTFORMATTER_HXX - -#include <oox/helper/propertyset.hxx> -#include <oox/drawingml/drawingmltypes.hxx> -#include <oox/drawingml/chart/modelbase.hxx> - -namespace com { namespace sun { namespace star { - namespace chart2 { class XChartDocument; } -} } } - -namespace oox { namespace core { class XmlFilterBase; } } - -namespace oox { -namespace drawingml { -namespace chart { - - - -/** Enumerates different object types for specific automatic formatting behaviour. */ -enum ObjectType -{ - OBJECTTYPE_CHARTSPACE, /// Chart background. - OBJECTTYPE_CHARTTITLE, /// Chart title. - OBJECTTYPE_LEGEND, /// Legend. - OBJECTTYPE_PLOTAREA2D, /// Plot area containing axes and data series in 2D charts. - OBJECTTYPE_PLOTAREA3D, /// Plot area containing axes and data series in 3D charts. - OBJECTTYPE_WALL, /// Background and side wall in 3D charts. - OBJECTTYPE_FLOOR, /// Floor in 3D charts. - OBJECTTYPE_AXIS, /// Axis line, labels, tick marks. - OBJECTTYPE_AXISTITLE, /// Axis title. - OBJECTTYPE_AXISUNIT, /// Axis unit label. - OBJECTTYPE_MAJORGRIDLINE, /// Axis major grid line. - OBJECTTYPE_MINORGRIDLINE, /// Axis minor grid line. - OBJECTTYPE_LINEARSERIES2D, /// Linear series in 2D line/radarline/scatter charts. - OBJECTTYPE_FILLEDSERIES2D, /// Filled series in 2D bar/area/radararea/bubble/pie/surface charts. - OBJECTTYPE_FILLEDSERIES3D, /// Filled series in 3D charts. - OBJECTTYPE_DATALABEL, /// Labels for data points. - OBJECTTYPE_TRENDLINE, /// Data series trend line. - OBJECTTYPE_TRENDLINELABEL, /// Trend line label. - OBJECTTYPE_ERRORBAR, /// Data series error indicator line. - OBJECTTYPE_SERLINE, /// Data point connector lines. - OBJECTTYPE_LEADERLINE, /// Leader lines between pie slice and data label. - OBJECTTYPE_DROPLINE, /// Drop lines between data points and X axis. - OBJECTTYPE_HILOLINE, /// High/low lines in line/stock charts. - OBJECTTYPE_UPBAR, /// Up-bar in line/stock charts. - OBJECTTYPE_DOWNBAR, /// Down-bar in line/stock charts. - OBJECTTYPE_DATATABLE /// Data table. -}; - - - -struct ChartSpaceModel; -struct ObjectFormatterData; -struct PictureOptionsModel; - -class ObjectFormatter -{ -public: - explicit ObjectFormatter( - const ::oox::core::XmlFilterBase& rFilter, - const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument >& rxChartDoc, - const ChartSpaceModel& rChartSpace ); - ~ObjectFormatter(); - - /** Sets the maximum series index used for color cycling/fading. */ - void setMaxSeriesIndex( sal_Int32 nMaxSeriesIdx ); - /** Returns the current maximum series index used for color cycling/fading. */ - sal_Int32 getMaxSeriesIndex() const; - - /** Sets frame formatting properties to the passed property set. */ - void convertFrameFormatting( - PropertySet& rPropSet, - const ModelRef< Shape >& rxShapeProp, - ObjectType eObjType, - sal_Int32 nSeriesIdx = -1 ); - - /** Sets frame formatting properties to the passed property set. */ - void convertFrameFormatting( - PropertySet& rPropSet, - const ModelRef< Shape >& rxShapeProp, - const PictureOptionsModel& rPicOptions, - ObjectType eObjType, - sal_Int32 nSeriesIdx = -1 ); - - /** Sets text formatting properties to the passed property set. */ - void convertTextFormatting( - PropertySet& rPropSet, - const ModelRef< TextBody >& rxTextProp, - ObjectType eObjType ); - - /** Sets frame/text formatting properties to the passed property set. */ - void convertFormatting( - PropertySet& rPropSet, - const ModelRef< Shape >& rxShapeProp, - const ModelRef< TextBody >& rxTextProp, - ObjectType eObjType ); - - /** Sets text formatting properties to the passed property set. */ - void convertTextFormatting( - PropertySet& rPropSet, - const TextCharacterProperties& rTextProps, - ObjectType eObjType ); - - /** Sets text rotation properties to the passed property set. */ - void convertTextRotation( - PropertySet& rPropSet, - const ModelRef< TextBody >& rxTextProp, - bool bSupportsStacked ); - - /** Sets number format properties to the passed property set. */ - void convertNumberFormat( - PropertySet& rPropSet, - const NumberFormat& rNumberFormat, - bool bPercentFormat = false ); - - /** Sets automatic fill properties to the passed property set. */ - void convertAutomaticFill( - PropertySet& rPropSet, - ObjectType eObjType, - sal_Int32 nSeriesIdx = -1 ); - - /** Returns true, if the passed shape properties have automatic fill mode. */ - static bool isAutomaticFill( const ModelRef< Shape >& rxShapeProp ); - -private: - ::boost::shared_ptr< ObjectFormatterData > mxData; -}; - - - -} // namespace chart -} // namespace drawingml -} // namespace oox - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/oox/drawingml/chart/plotareacontext.hxx b/include/oox/drawingml/chart/plotareacontext.hxx deleted file mode 100644 index 4a2c06d90ec1..000000000000 --- a/include/oox/drawingml/chart/plotareacontext.hxx +++ /dev/null @@ -1,98 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * 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 . - */ - -#ifndef INCLUDED_OOX_DRAWINGML_CHART_PLOTAREACONTEXT_HXX -#define INCLUDED_OOX_DRAWINGML_CHART_PLOTAREACONTEXT_HXX - -#include <oox/drawingml/chart/chartcontextbase.hxx> - -namespace oox { -namespace drawingml { -namespace chart { - - - -struct View3DModel; - -/** Handler for a chart plot area context (c:plotArea element). - */ -class View3DContext : public ContextBase< View3DModel > -{ -public: - explicit View3DContext( ::oox::core::ContextHandler2Helper& rParent, View3DModel& rModel ); - virtual ~View3DContext(); - - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) SAL_OVERRIDE; -}; - - - -struct WallFloorModel; - -/** Handler for a chart wall/floor context (c:backWall, c:floor, c:sideWall - elements). - */ -class WallFloorContext : public ContextBase< WallFloorModel > -{ -public: - explicit WallFloorContext( ::oox::core::ContextHandler2Helper& rParent, WallFloorModel& rModel ); - virtual ~WallFloorContext(); - - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) SAL_OVERRIDE; -}; - - - -struct DataTableModel; - -/** Handler for a data table context (c:dTable element). - */ -class DataTableContext : public ContextBase< DataTableModel > -{ -public: - explicit DataTableContext( ::oox::core::ContextHandler2Helper& rParent, DataTableModel& rModel ); - virtual ~DataTableContext(); - - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) SAL_OVERRIDE; -}; - - - -struct PlotAreaModel; - -/** Handler for a chart plot area context (c:plotArea element). - */ -class PlotAreaContext : public ContextBase< PlotAreaModel > -{ -public: - explicit PlotAreaContext( ::oox::core::ContextHandler2Helper& rParent, PlotAreaModel& rModel ); - virtual ~PlotAreaContext(); - - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) SAL_OVERRIDE; -}; - - - -} // namespace chart -} // namespace drawingml -} // namespace oox - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/oox/drawingml/chart/plotareaconverter.hxx b/include/oox/drawingml/chart/plotareaconverter.hxx deleted file mode 100644 index 3123c1595ec4..000000000000 --- a/include/oox/drawingml/chart/plotareaconverter.hxx +++ /dev/null @@ -1,118 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * 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 . - */ - -#ifndef INCLUDED_OOX_DRAWINGML_CHART_PLOTAREACONVERTER_HXX -#define INCLUDED_OOX_DRAWINGML_CHART_PLOTAREACONVERTER_HXX - -#include <oox/drawingml/chart/converterbase.hxx> - -namespace com { namespace sun { namespace star { - namespace chart2 { class XDiagram; } -} } } - -namespace oox { -namespace drawingml { -namespace chart { - - - -struct View3DModel; -class TypeGroupConverter; - -class View3DConverter : public ConverterBase< View3DModel > -{ -public: - explicit View3DConverter( const ConverterRoot& rParent, View3DModel& rModel ); - virtual ~View3DConverter(); - - /** Converts the OOXML plot area model to a chart2 diagram. */ - void convertFromModel( - const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDiagram >& rxDiagram, - TypeGroupConverter& rTypeGroup ); -}; - - - -struct WallFloorModel; - -class WallFloorConverter : public ConverterBase< WallFloorModel > -{ -public: - explicit WallFloorConverter( const ConverterRoot& rParent, WallFloorModel& rModel ); - virtual ~WallFloorConverter(); - - /** Converts the OOXML wall/floor model to a chart2 diagram. */ - void convertFromModel( - const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDiagram >& rxDiagram, - ObjectType eObjType ); -}; - - - -struct DataTableModel; - -class DataTableConverter : public ConverterBase< DataTableModel > -{ -public: - explicit DataTableConverter( const ConverterRoot& rParent, DataTableModel& rModel ); - virtual ~DataTableConverter(); - - /** Converts the OOXML data table model to a chart2 diagram. */ - void convertFromModel( - const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDiagram >& rxDiagram); -}; - - - -struct PlotAreaModel; - -class PlotAreaConverter : public ConverterBase< PlotAreaModel > -{ -public: - explicit PlotAreaConverter( const ConverterRoot& rParent, PlotAreaModel& rModel ); - virtual ~PlotAreaConverter(); - - /** Converts the OOXML plot area model to a chart2 diagram. */ - void convertFromModel( View3DModel& rView3DModel ); - /** Converts the manual plot area position and size, if set. */ - void convertPositionFromModel(); - - /** Returns the automatic chart title if the chart contains only one series. */ - const OUString& getAutomaticTitle() const { return maAutoTitle; } - /** Returns true, if the chart is three-dimensional. */ - bool is3dChart() const { return mb3dChart; } - /** Returns true, if chart type supports wall and floor format in 3D mode. */ - bool isWall3dChart() const { return mbWall3dChart; } - -private: - OUString maAutoTitle; - bool mb3dChart; - bool mbWall3dChart; - bool mbPieChart; -}; - - - -} // namespace chart -} // namespace drawingml -} // namespace oox - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/oox/drawingml/chart/plotareamodel.hxx b/include/oox/drawingml/chart/plotareamodel.hxx deleted file mode 100644 index f0dd30469ef7..000000000000 --- a/include/oox/drawingml/chart/plotareamodel.hxx +++ /dev/null @@ -1,100 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * 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 . - */ - -#ifndef INCLUDED_OOX_DRAWINGML_CHART_PLOTAREAMODEL_HXX -#define INCLUDED_OOX_DRAWINGML_CHART_PLOTAREAMODEL_HXX - -#include <oox/drawingml/shape.hxx> -#include <oox/drawingml/chart/axismodel.hxx> -#include <oox/drawingml/chart/seriesmodel.hxx> -#include <oox/drawingml/chart/typegroupmodel.hxx> - -namespace oox { -namespace drawingml { -namespace chart { - - - -struct View3DModel -{ - OptValue< sal_Int32 > monHeightPercent; /// Height of the 3D view, relative to chart width. - OptValue< sal_Int32 > monRotationX; /// Horizontal rotation in degrees. - OptValue< sal_Int32 > monRotationY; /// Vertical rotation in degrees. - sal_Int32 mnDepthPercent; /// Depth of the 3D view, relative to chart width. - sal_Int32 mnPerspective; /// Eye distance to the 3D objects. - bool mbRightAngled; /// True = right-angled axes in 3D view. - - explicit View3DModel(); - ~View3DModel(); -}; - - - -struct WallFloorModel -{ - typedef ModelRef< Shape > ShapeRef; - typedef ModelRef< PictureOptionsModel > PictureOptionsRef; - - ShapeRef mxShapeProp; /// Wall/floor frame formatting. - PictureOptionsRef mxPicOptions; /// Fill bitmap settings. - - explicit WallFloorModel(); - ~WallFloorModel(); -}; - - - -struct DataTableModel -{ - bool mbShowHBorder; /// Show Horizontal Border - bool mbShowVBorder; /// Show Verticle Border - bool mbShowOutline; /// Show outline - explicit DataTableModel(); - ~DataTableModel(); -}; - - - -struct PlotAreaModel -{ - typedef ModelVector< TypeGroupModel > TypeGroupVector; - typedef ModelVector< AxisModel > AxisVector; - typedef ModelRef< Shape > ShapeRef; - typedef ModelRef< LayoutModel > LayoutRef; - typedef ModelRef< DataTableModel > DataTableRef; - - TypeGroupVector maTypeGroups; /// All chart type groups contained in the chart. - AxisVector maAxes; /// All axes contained in the chart. - ShapeRef mxShapeProp; /// Plot area frame formatting. - LayoutRef mxLayout; /// Layout/position of the plot area. - DataTableRef mxDataTable; /// Data table of the plot area. - - explicit PlotAreaModel(); - ~PlotAreaModel(); -}; - - - -} // namespace chart -} // namespace drawingml -} // namespace oox - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/oox/drawingml/chart/seriescontext.hxx b/include/oox/drawingml/chart/seriescontext.hxx deleted file mode 100644 index d2be09c82486..000000000000 --- a/include/oox/drawingml/chart/seriescontext.hxx +++ /dev/null @@ -1,266 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * 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 . - */ - -#ifndef INCLUDED_OOX_DRAWINGML_CHART_SERIESCONTEXT_HXX -#define INCLUDED_OOX_DRAWINGML_CHART_SERIESCONTEXT_HXX - -#include <oox/drawingml/chart/chartcontextbase.hxx> - -namespace oox { -namespace drawingml { -namespace chart { - - - -struct DataLabelModel; - -/** Handler for a chart data point label context (c:dLbl element). - */ -class DataLabelContext : public ContextBase< DataLabelModel > -{ -public: - explicit DataLabelContext( ::oox::core::ContextHandler2Helper& rParent, DataLabelModel& rModel ); - virtual ~DataLabelContext(); - - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) SAL_OVERRIDE; - virtual void onCharacters( const OUString& rChars ) SAL_OVERRIDE; -}; - - - -struct DataLabelsModel; - -/** Handler for a chart data point label context (c:dLbl element). - */ -class DataLabelsContext : public ContextBase< DataLabelsModel > -{ -public: - explicit DataLabelsContext( ::oox::core::ContextHandler2Helper& rParent, DataLabelsModel& rModel ); - virtual ~DataLabelsContext(); - - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) SAL_OVERRIDE; - virtual void onCharacters( const OUString& rChars ) SAL_OVERRIDE; -}; - - - -struct PictureOptionsModel; - -/** Handler for fill bitmap settings (c:pictureOptions element). - */ -class PictureOptionsContext : public ContextBase< PictureOptionsModel > -{ -public: - explicit PictureOptionsContext( ::oox::core::ContextHandler2Helper& rParent, PictureOptionsModel& rModel ); - virtual ~PictureOptionsContext(); - - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) SAL_OVERRIDE; -}; - - - -struct ErrorBarModel; - -/** Handler for a series error bar context (c:errBars element). - */ -class ErrorBarContext : public ContextBase< ErrorBarModel > -{ -public: - explicit ErrorBarContext( ::oox::core::ContextHandler2Helper& rParent, ErrorBarModel& rModel ); - virtual ~ErrorBarContext(); - - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) SAL_OVERRIDE; -}; - - - -struct TrendlineLabelModel; - -/** Handler for a series trendline label context (c:trendlineLbl element). - */ -class TrendlineLabelContext : public ContextBase< TrendlineLabelModel > -{ -public: - explicit TrendlineLabelContext( ::oox::core::ContextHandler2Helper& rParent, TrendlineLabelModel& rModel ); - virtual ~TrendlineLabelContext(); - - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) SAL_OVERRIDE; -}; - - - -struct TrendlineModel; - -/** Handler for a series trendline context (c:trendline element). - */ -class TrendlineContext : public ContextBase< TrendlineModel > -{ -public: - explicit TrendlineContext( ::oox::core::ContextHandler2Helper& rParent, TrendlineModel& rModel ); - virtual ~TrendlineContext(); - - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) SAL_OVERRIDE; - virtual void onCharacters( const OUString& rChars ) SAL_OVERRIDE; -}; - - - -struct DataPointModel; - -/** Handler for a chart data point context (c:dPt element). - */ -class DataPointContext : public ContextBase< DataPointModel > -{ -public: - explicit DataPointContext( ::oox::core::ContextHandler2Helper& rParent, DataPointModel& rModel ); - virtual ~DataPointContext(); - - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) SAL_OVERRIDE; -}; - - - -struct SeriesModel; - -/** Handler base class for chart data series contexts (c:ser element). - */ -class SeriesContextBase : public ContextBase< SeriesModel > -{ -public: - explicit SeriesContextBase( ::oox::core::ContextHandler2Helper& rParent, SeriesModel& rModel ); - virtual ~SeriesContextBase(); - - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) SAL_OVERRIDE; -}; - - - -/** Handler for a data series context for area chart types (c:ser element). - */ -class AreaSeriesContext : public SeriesContextBase -{ -public: - explicit AreaSeriesContext( ::oox::core::ContextHandler2Helper& rParent, SeriesModel& rModel ); - virtual ~AreaSeriesContext(); - - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) SAL_OVERRIDE; -}; - - - -/** Handler for a data series context for bar chart types (c:ser element). - */ -class BarSeriesContext : public SeriesContextBase -{ -public: - explicit BarSeriesContext( ::oox::core::ContextHandler2Helper& rParent, SeriesModel& rModel ); - virtual ~BarSeriesContext(); - - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) SAL_OVERRIDE; -}; - - - -/** Handler for a data series context for bubble chart types (c:ser element). - */ -class BubbleSeriesContext : public SeriesContextBase -{ -public: - explicit BubbleSeriesContext( ::oox::core::ContextHandler2Helper& rParent, SeriesModel& rModel ); - virtual ~BubbleSeriesContext(); - - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) SAL_OVERRIDE; -}; - - - -/** Handler for a data series context for line and stock chart types (c:ser - element). - */ -class LineSeriesContext : public SeriesContextBase -{ -public: - explicit LineSeriesContext( ::oox::core::ContextHandler2Helper& rParent, SeriesModel& rModel ); - virtual ~LineSeriesContext(); - - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) SAL_OVERRIDE; -}; - - - -/** Handler for a data series context for pie and doughnut chart types (c:ser - element). - */ -class PieSeriesContext : public SeriesContextBase -{ -public: - explicit PieSeriesContext( ::oox::core::ContextHandler2Helper& rParent, SeriesModel& rModel ); - virtual ~PieSeriesContext(); - - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) SAL_OVERRIDE; -}; - - - -/** Handler for a data series context for radar chart types (c:ser element). - */ -class RadarSeriesContext : public SeriesContextBase -{ -public: - explicit RadarSeriesContext( ::oox::core::ContextHandler2Helper& rParent, SeriesModel& rModel ); - virtual ~RadarSeriesContext(); - - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) SAL_OVERRIDE; -}; - - - -/** Handler for a data series context for scatter chart types (c:ser element). - */ -class ScatterSeriesContext : public SeriesContextBase -{ -public: - explicit ScatterSeriesContext( ::oox::core::ContextHandler2Helper& rParent, SeriesModel& rModel ); - virtual ~ScatterSeriesContext(); - - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) SAL_OVERRIDE; -}; - - - -/** Handler for a data series context for scatter chart types (c:ser element). - */ -class SurfaceSeriesContext : public SeriesContextBase -{ -public: - explicit SurfaceSeriesContext( ::oox::core::ContextHandler2Helper& rParent, SeriesModel& rModel ); - virtual ~SurfaceSeriesContext(); - - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) SAL_OVERRIDE; -}; - - - -} // namespace chart -} // namespace drawingml -} // namespace oox - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/oox/drawingml/chart/seriesconverter.hxx b/include/oox/drawingml/chart/seriesconverter.hxx deleted file mode 100644 index 2cbd5665a5c5..000000000000 --- a/include/oox/drawingml/chart/seriesconverter.hxx +++ /dev/null @@ -1,167 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * 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 . - */ - -#ifndef INCLUDED_OOX_DRAWINGML_CHART_SERIESCONVERTER_HXX -#define INCLUDED_OOX_DRAWINGML_CHART_SERIESCONVERTER_HXX - -#include <oox/drawingml/chart/converterbase.hxx> -#include <oox/drawingml/chart/seriesmodel.hxx> - -namespace com { namespace sun { namespace star { - namespace chart2 { class XDataSeries; } - namespace chart2 { namespace data { class XLabeledDataSequence; } } -} } } - -namespace oox { -namespace drawingml { -namespace chart { - -class TypeGroupConverter; - -// #i66858# enable this when Chart2 supports smoothed lines per data series -#define OOX_CHART_SMOOTHED_PER_SERIES 0 - - - -class DataLabelConverter : public ConverterBase< DataLabelModel > -{ -public: - explicit DataLabelConverter( const ConverterRoot& rParent, DataLabelModel& rModel ); - virtual ~DataLabelConverter(); - - /** Converts OOXML data label settings for the passed data point. */ - void convertFromModel( - const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries >& rxDataSeries, - const TypeGroupConverter& rTypeGroup ); - - /** Conversion helper for data series and data points. */ - static void convertLabelFormatting( - PropertySet& rPropSet, - ObjectFormatter& rFormatter, - const DataLabelModelBase& rDataLabel, - const TypeGroupConverter& rTypeGroup, - bool bDataSeriesLabel ); -}; - - - -class DataLabelsConverter : public ConverterBase< DataLabelsModel > -{ -public: - explicit DataLabelsConverter( const ConverterRoot& rParent, DataLabelsModel& rModel ); - virtual ~DataLabelsConverter(); - - /** Converts OOXML data label settings for the passed data series. */ - void convertFromModel( - const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries >& rxDataSeries, - const TypeGroupConverter& rTypeGroup ); -}; - - - -class ErrorBarConverter : public ConverterBase< ErrorBarModel > -{ -public: - explicit ErrorBarConverter( const ConverterRoot& rParent, ErrorBarModel& rModel ); - virtual ~ErrorBarConverter(); - - /** Converts an OOXML errorbar and inserts it into the passed data series. */ - void convertFromModel( - const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries >& rxDataSeries ); - -private: - ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XLabeledDataSequence > - createLabeledDataSequence( ErrorBarModel::SourceType eSourceType ); -}; - - - -class TrendlineLabelConverter : public ConverterBase< TrendlineLabelModel > -{ -public: - explicit TrendlineLabelConverter( const ConverterRoot& rParent, TrendlineLabelModel& rModel ); - virtual ~TrendlineLabelConverter(); - - /** Converts the OOXML trendline label. */ - void convertFromModel( PropertySet& rPropSet ); -}; - - - -class TrendlineConverter : public ConverterBase< TrendlineModel > -{ -public: - explicit TrendlineConverter( const ConverterRoot& rParent, TrendlineModel& rModel ); - virtual ~TrendlineConverter(); - - /** Converts an OOXML trendline and inserts it into the passed data series. */ - void convertFromModel( - const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries >& rxDataSeries ); -}; - - - -class DataPointConverter : public ConverterBase< DataPointModel > -{ -public: - explicit DataPointConverter( const ConverterRoot& rParent, DataPointModel& rModel ); - virtual ~DataPointConverter(); - - /** Converts settings for a data point in the passed series. */ - void convertFromModel( - const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries >& rxDataSeries, - const TypeGroupConverter& rTypeGroup, - const SeriesModel& rSeries ); -}; - - - -class SeriesConverter : public ConverterBase< SeriesModel > -{ -public: - explicit SeriesConverter( const ConverterRoot& rParent, SeriesModel& rModel ); - virtual ~SeriesConverter(); - - /** Creates a labeled data sequence object from category data link. */ - ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XLabeledDataSequence > - createCategorySequence( const OUString& rRole ); - /** Creates a labeled data sequence object from value data link. */ - ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XLabeledDataSequence > - createValueSequence( const OUString& rRole ); - /** Creates a data series object with initialized source links. */ - ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries > - createDataSeries( const TypeGroupConverter& rTypeGroup, bool bVaryColorsByPoint ); - -private: - ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XLabeledDataSequence > - createLabeledDataSequence( - SeriesModel::SourceType eSourceType, - const OUString& rRole, - bool bUseTextLabel ); -}; - - - -} // namespace chart -} // namespace drawingml -} // namespace oox - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/oox/drawingml/chart/seriesmodel.hxx b/include/oox/drawingml/chart/seriesmodel.hxx deleted file mode 100644 index b9c2c3c3ff17..000000000000 --- a/include/oox/drawingml/chart/seriesmodel.hxx +++ /dev/null @@ -1,217 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * 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 . - */ - -#ifndef INCLUDED_OOX_DRAWINGML_CHART_SERIESMODEL_HXX -#define INCLUDED_OOX_DRAWINGML_CHART_SERIESMODEL_HXX - -#include <oox/drawingml/chart/datasourcemodel.hxx> -#include <oox/drawingml/chart/titlemodel.hxx> - -namespace oox { -namespace drawingml { -namespace chart { - -struct DataLabelModelBase -{ - typedef ModelRef< Shape > ShapeRef; - typedef ModelRef< TextBody > TextBodyRef; - - ShapeRef mxShapeProp; /// Data label frame formatting. - TextBodyRef mxTextProp; /// Data label text formatting. - NumberFormat maNumberFormat; /// Number format for numeric data labels. - OptValue< OUString > moaSeparator;/// Separator between label components. - OptValue< sal_Int32 > monLabelPos; /// Data label position. - OptValue< bool > mobShowBubbleSize; /// True = show size of bubbles in bubble charts. - OptValue< bool > mobShowCatName; /// True = show category name of data points. - OptValue< bool > mobShowLegendKey; /// True = show legend key of data series. - OptValue< bool > mobShowPercent; /// True = show percentual value in pie/doughnut charts. - OptValue< bool > mobShowSerName; /// True = show series name. - OptValue< bool > mobShowVal; /// True = show data point value. - bool mbDeleted; /// True = data label(s) deleted. - - explicit DataLabelModelBase(); - ~DataLabelModelBase(); -}; - -struct DataLabelModel : public DataLabelModelBase -{ - typedef ModelRef< LayoutModel > LayoutRef; - typedef ModelRef< TextModel > TextRef; - - LayoutRef mxLayout; /// Layout/position of the data point label frame. - TextRef mxText; /// Manual or linked text for this data point label. - sal_Int32 mnIndex; /// Data point index for this data label. - - explicit DataLabelModel(); - ~DataLabelModel(); -}; - -struct DataLabelsModel : public DataLabelModelBase -{ - typedef ModelVector< DataLabelModel > DataLabelVector; - typedef ModelRef< Shape > ShapeRef; - - DataLabelVector maPointLabels; /// Settings for individual data point labels. - ShapeRef mxLeaderLines; /// Formatting of connector lines between data points and labels. - bool mbShowLeaderLines; /// True = show connector lines between data points and labels. - - explicit DataLabelsModel(); - ~DataLabelsModel(); -}; - -struct PictureOptionsModel -{ - double mfStackUnit; /// Bitmap stacking unit. - sal_Int32 mnPictureFormat; /// Bitmap mode (stretch/tile). - bool mbApplyToFront; /// True = draw picture at front/back side of 3D data points. - bool mbApplyToSides; /// True = draw picture at left/right side of 3D data points. - bool mbApplyToEnd; /// True = draw picture at top/bottom side of 3D data points. - - explicit PictureOptionsModel(); - ~PictureOptionsModel(); -}; - -struct ErrorBarModel -{ - enum SourceType - { - PLUS, /// Plus error bar values. - MINUS /// Minus error bar values. - }; - - typedef ModelMap< SourceType, DataSourceModel > DataSourceMap; - typedef ModelRef< Shape > ShapeRef; - - DataSourceMap maSources; /// Source ranges for manual error bar values. - ShapeRef mxShapeProp; /// Error line formatting. - double mfValue; /// Fixed value for several error bar types. - sal_Int32 mnDirection; /// Direction of the error bars (x/y). - sal_Int32 mnTypeId; /// Type of the error bars (plus/minus/both). - sal_Int32 mnValueType; /// Type of the values. - bool mbNoEndCap; /// True = no end cap at error bar lines. - - explicit ErrorBarModel(); - ~ErrorBarModel(); -}; - -struct TrendlineLabelModel -{ - typedef ModelRef< Shape > ShapeRef; - typedef ModelRef< TextBody > TextBodyRef; - typedef ModelRef< LayoutModel > LayoutRef; - typedef ModelRef< TextModel > TextRef; - - ShapeRef mxShapeProp; /// Label frame formatting. - TextBodyRef mxTextProp; /// Label text formatting. - LayoutRef mxLayout; /// Layout/position of the frame. - TextRef mxText; /// Text source of the label. - NumberFormat maNumberFormat; /// Number format for coefficients. - - explicit TrendlineLabelModel(); - ~TrendlineLabelModel(); -}; - -struct TrendlineModel -{ - typedef ModelRef< Shape > ShapeRef; - typedef ModelRef< TrendlineLabelModel > TrendlineLabelRef; - - ShapeRef mxShapeProp; /// Trendline formatting. - TrendlineLabelRef mxLabel; /// Trendline label text object. - OUString maName; /// User-defined name of the trendline. - OptValue< double > mfBackward; /// Size of trendline before first data point. - OptValue< double > mfForward; /// Size of trendline behind last data point. - OptValue< double > mfIntercept; /// Crossing point with Y axis. - sal_Int32 mnOrder; /// Polynomial order in range [2, 6]. - sal_Int32 mnPeriod; /// Moving average period in range [2, 255]. - sal_Int32 mnTypeId; /// Type of the trendline. - bool mbDispEquation; /// True = show equation of the trendline. - bool mbDispRSquared; /// True = show R-squared of the trendline. - - explicit TrendlineModel(); - ~TrendlineModel(); -}; - -struct DataPointModel -{ - typedef ModelRef< Shape > ShapeRef; - typedef ModelRef< PictureOptionsModel > PictureOptionsRef; - - ShapeRef mxShapeProp; /// Data point formatting. - PictureOptionsRef mxPicOptions; /// Fill bitmap settings. - ShapeRef mxMarkerProp; /// Data point marker formatting. - OptValue< sal_Int32 > monExplosion; /// Pie slice moved from pie center. - OptValue< sal_Int32 > monMarkerSize; /// Size of the series line marker (2...72). - OptValue< sal_Int32 > monMarkerSymbol; /// Series line marker symbol. - OptValue< bool > mobBubble3d; /// True = show bubbles with 3D shade. - sal_Int32 mnIndex; /// Unique data point index. - bool mbInvertNeg; /// True = invert negative data points (not derived from series!). - - explicit DataPointModel(); - ~DataPointModel(); -}; - -struct SeriesModel -{ - enum SourceType - { - CATEGORIES, /// Data point categories. - VALUES, /// Data point values. - POINTS /// Data point size (e.g. bubble size in bubble charts). - }; - - typedef ModelMap< SourceType, DataSourceModel > DataSourceMap; - typedef ModelVector< ErrorBarModel > ErrorBarVector; - typedef ModelVector< TrendlineModel > TrendlineVector; - typedef ModelVector< DataPointModel > DataPointVector; - typedef ModelRef< Shape > ShapeRef; - typedef ModelRef< PictureOptionsModel > PictureOptionsRef; - typedef ModelRef< TextModel > TextRef; - typedef ModelRef< DataLabelsModel > DataLabelsRef; - - DataSourceMap maSources; /// Series source ranges. - ErrorBarVector maErrorBars; /// All error bars of this series. - TrendlineVector maTrendlines; /// All trendlines of this series. - DataPointVector maPoints; /// Explicit formatted data points. - ShapeRef mxShapeProp; /// Series formatting. - PictureOptionsRef mxPicOptions; /// Fill bitmap settings. - ShapeRef mxMarkerProp; /// Data point marker formatting. - TextRef mxText; /// Series title source. - DataLabelsRef mxLabels; /// Data point label settings for all points. - OptValue< sal_Int32 > monShape; /// 3D bar shape type. - sal_Int32 mnExplosion; /// Pie slice moved from pie center. - sal_Int32 mnIndex; /// Series index used for automatic formatting. - sal_Int32 mnMarkerSize; /// Size of the series line marker (2...72). - sal_Int32 mnMarkerSymbol; /// Series line marker symbol. - sal_Int32 mnOrder; /// Series order. - bool mbBubble3d; /// True = show bubbles with 3D shade. - bool mbInvertNeg; /// True = invert negative data points. - bool mbSmooth; /// True = smooth series line. - - explicit SeriesModel(); - ~SeriesModel(); -}; - -} // namespace chart -} // namespace drawingml -} // namespace oox - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/oox/drawingml/chart/titlecontext.hxx b/include/oox/drawingml/chart/titlecontext.hxx deleted file mode 100644 index 30c5abf24260..000000000000 --- a/include/oox/drawingml/chart/titlecontext.hxx +++ /dev/null @@ -1,83 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * 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 . - */ - -#ifndef INCLUDED_OOX_DRAWINGML_CHART_TITLECONTEXT_HXX -#define INCLUDED_OOX_DRAWINGML_CHART_TITLECONTEXT_HXX - -#include <oox/drawingml/chart/chartcontextbase.hxx> - -namespace oox { -namespace drawingml { -namespace chart { - - - -struct TextModel; - -/** Handler for a chart text context (c:tx element). - */ -class TextContext : public ContextBase< TextModel > -{ -public: - explicit TextContext( ::oox::core::ContextHandler2Helper& rParent, TextModel& rModel ); - virtual ~TextContext(); - - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) SAL_OVERRIDE; - virtual void onCharacters( const OUString& rChars ) SAL_OVERRIDE; -}; - - - -struct TitleModel; - -/** Handler for a chart title context (c:title element). - */ -class TitleContext : public ContextBase< TitleModel > -{ -public: - explicit TitleContext( ::oox::core::ContextHandler2Helper& rParent, TitleModel& rModel ); - virtual ~TitleContext(); - - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) SAL_OVERRIDE; -}; - - - -struct LegendModel; - -/** Handler for a chart legend context (c:legend element). - */ -class LegendContext : public ContextBase< LegendModel > -{ -public: - explicit LegendContext( ::oox::core::ContextHandler2Helper& rParent, LegendModel& rModel ); - virtual ~LegendContext(); - - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) SAL_OVERRIDE; -}; - - - -} // namespace chart -} // namespace drawingml -} // namespace oox - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/oox/drawingml/chart/titleconverter.hxx b/include/oox/drawingml/chart/titleconverter.hxx deleted file mode 100644 index 5515efbc5821..000000000000 --- a/include/oox/drawingml/chart/titleconverter.hxx +++ /dev/null @@ -1,106 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * 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 . - */ - -#ifndef INCLUDED_OOX_DRAWINGML_CHART_TITLECONVERTER_HXX -#define INCLUDED_OOX_DRAWINGML_CHART_TITLECONVERTER_HXX - -#include <oox/drawingml/chart/converterbase.hxx> - -namespace com { namespace sun { namespace star { - namespace chart2 { class XDiagram; } - namespace chart2 { class XFormattedString; } - namespace chart2 { class XTitled; } - namespace chart2 { namespace data { class XDataSequence; } } -} } } - -namespace oox { namespace drawingml { struct TextCharacterProperties; } } - -namespace oox { -namespace drawingml { -namespace chart { - - - -struct TextModel; - -class TextConverter : public ConverterBase< TextModel > -{ -public: - explicit TextConverter( const ConverterRoot& rParent, TextModel& rModel ); - virtual ~TextConverter(); - - /** Creates a data sequence object from the contained text data. */ - ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > - createDataSequence( const OUString& rRole ); - /** Creates a sequence of formatted string objects. */ - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XFormattedString > > - createStringSequence( - const OUString& rDefaultText, - const ModelRef< TextBody >& rxTextProp, - ObjectType eObjType ); - -private: - ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XFormattedString > - appendFormattedString( - ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XFormattedString > >& orStringVec, - const OUString& rString, - bool bAddNewLine ) const; -}; - - - -struct TitleModel; - -class TitleConverter : public ConverterBase< TitleModel > -{ -public: - explicit TitleConverter( const ConverterRoot& rParent, TitleModel& rModel ); - virtual ~TitleConverter(); - - /** Creates a title text object and attaches it at the passed interface. */ - void convertFromModel( - const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XTitled >& rxTitled, - const OUString& rAutoTitle, ObjectType eObjType, - sal_Int32 nMainIdx = -1, sal_Int32 nSubIdx = -1 ); -}; - - - -struct LegendModel; - -class LegendConverter : public ConverterBase< LegendModel > -{ -public: - explicit LegendConverter( const ConverterRoot& rParent, LegendModel& rModel ); - virtual ~LegendConverter(); - - /** Creates a legend object and attaches it at the passed diagram. */ - void convertFromModel( - const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDiagram >& rxDiagram ); -}; - - - -} // namespace chart -} // namespace drawingml -} // namespace oox - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/oox/drawingml/chart/titlemodel.hxx b/include/oox/drawingml/chart/titlemodel.hxx deleted file mode 100644 index 3d140c93f755..000000000000 --- a/include/oox/drawingml/chart/titlemodel.hxx +++ /dev/null @@ -1,89 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * 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 . - */ - -#ifndef INCLUDED_OOX_DRAWINGML_CHART_TITLEMODEL_HXX -#define INCLUDED_OOX_DRAWINGML_CHART_TITLEMODEL_HXX - -#include <oox/drawingml/shape.hxx> -#include <oox/drawingml/chart/datasourcemodel.hxx> - -namespace oox { -namespace drawingml { -namespace chart { - - - -struct TextModel -{ - typedef ModelRef< DataSequenceModel > DataSequenceRef; - typedef ModelRef< TextBody > TextBodyRef; - - DataSequenceRef mxDataSeq; /// The string data or formula link of this text. - TextBodyRef mxTextBody; /// Rich-formatted literal text (for title objects only). - - explicit TextModel(); - ~TextModel(); -}; - - - -struct TitleModel -{ - typedef ModelRef< Shape > ShapeRef; - typedef ModelRef< TextBody > TextBodyRef; - typedef ModelRef< LayoutModel > LayoutRef; - typedef ModelRef< TextModel > TextRef; - - ShapeRef mxShapeProp; /// Title shape formatting. - TextBodyRef mxTextProp; /// Title text formatting. - LayoutRef mxLayout; /// Layout/position of the frame. - TextRef mxText; /// Text source of the title. - bool mbOverlay; /// True = title may overlay other objects. - - explicit TitleModel(); - ~TitleModel(); -}; - - - -struct LegendModel -{ - typedef ModelRef< Shape > ShapeRef; - typedef ModelRef< TextBody > TextBodyRef; - typedef ModelRef< LayoutModel > LayoutRef; - - ShapeRef mxShapeProp; /// Legend shape formatting. - TextBodyRef mxTextProp; /// Legend text formatting. - LayoutRef mxLayout; /// Layout/position of the legend. - sal_Int32 mnPosition; /// Legend position. - bool mbOverlay; /// True = legend may overlay other objects. - - explicit LegendModel(); - ~LegendModel(); -}; - - - -} // namespace chart -} // namespace drawingml -} // namespace oox - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/oox/drawingml/chart/typegroupcontext.hxx b/include/oox/drawingml/chart/typegroupcontext.hxx deleted file mode 100644 index 7526a88f2f6e..000000000000 --- a/include/oox/drawingml/chart/typegroupcontext.hxx +++ /dev/null @@ -1,164 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * 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 . - */ - -#ifndef INCLUDED_OOX_DRAWINGML_CHART_TYPEGROUPCONTEXT_HXX -#define INCLUDED_OOX_DRAWINGML_CHART_TYPEGROUPCONTEXT_HXX - -#include <oox/drawingml/chart/chartcontextbase.hxx> - -namespace oox { -namespace drawingml { -namespace chart { - - - -struct UpDownBarsModel; - -/** Handler for an up/down bars context (c:upDownBars element). - */ -class UpDownBarsContext : public ContextBase< UpDownBarsModel > -{ -public: - explicit UpDownBarsContext( ::oox::core::ContextHandler2Helper& rParent, UpDownBarsModel& rModel ); - virtual ~UpDownBarsContext(); - - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) SAL_OVERRIDE; -}; - - - -struct TypeGroupModel; -typedef ContextBase< TypeGroupModel > TypeGroupContextBase; - - - -/** Handler for area type group contexts (c:area3DChart, c:areaChart elements). - */ -class AreaTypeGroupContext : public TypeGroupContextBase -{ -public: - explicit AreaTypeGroupContext( ::oox::core::ContextHandler2Helper& rParent, TypeGroupModel& rModel ); - virtual ~AreaTypeGroupContext(); - - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) SAL_OVERRIDE; -}; - - - -/** Handler for bar type group contexts (c:bar3DChart, c:barChart elements). - */ -class BarTypeGroupContext : public TypeGroupContextBase -{ -public: - explicit BarTypeGroupContext( ::oox::core::ContextHandler2Helper& rParent, TypeGroupModel& rModel ); - virtual ~BarTypeGroupContext(); - - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) SAL_OVERRIDE; -}; - - - -/** Handler for bubble type group context (c:bubbleChart element). - */ -class BubbleTypeGroupContext : public TypeGroupContextBase -{ -public: - explicit BubbleTypeGroupContext( ::oox::core::ContextHandler2Helper& rParent, TypeGroupModel& rModel ); - virtual ~BubbleTypeGroupContext(); - - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) SAL_OVERRIDE; -}; - - - -/** Handler for line type group contexts (c:line3DChart, c:lineChart, - c:stockChart elements). - */ -class LineTypeGroupContext : public TypeGroupContextBase -{ -public: - explicit LineTypeGroupContext( ::oox::core::ContextHandler2Helper& rParent, TypeGroupModel& rModel ); - virtual ~LineTypeGroupContext(); - - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) SAL_OVERRIDE; -}; - - - -/** Handler for pie type group contexts (c:doughnutChart, c:ofPieChart, - c:pie3DChart, c:pieChart elements). - */ -class PieTypeGroupContext : public TypeGroupContextBase -{ -public: - explicit PieTypeGroupContext( ::oox::core::ContextHandler2Helper& rParent, TypeGroupModel& rModel ); - virtual ~PieTypeGroupContext(); - - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) SAL_OVERRIDE; -}; - - - -/** Handler for radar type group context (c:radarChart element). - */ -class RadarTypeGroupContext : public TypeGroupContextBase -{ -public: - explicit RadarTypeGroupContext( ::oox::core::ContextHandler2Helper& rParent, TypeGroupModel& rModel ); - virtual ~RadarTypeGroupContext(); - - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) SAL_OVERRIDE; -}; - - - -/** Handler for scatter type group context (c:scatterChart element). - */ -class ScatterTypeGroupContext : public TypeGroupContextBase -{ -public: - explicit ScatterTypeGroupContext( ::oox::core::ContextHandler2Helper& rParent, TypeGroupModel& rModel ); - virtual ~ScatterTypeGroupContext(); - - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) SAL_OVERRIDE; -}; - - - -/** Handler for surface type group contexts (c:surface3DChart, c:surfaceChart - elements). - */ -class SurfaceTypeGroupContext : public TypeGroupContextBase -{ -public: - explicit SurfaceTypeGroupContext( ::oox::core::ContextHandler2Helper& rParent, TypeGroupModel& rModel ); - virtual ~SurfaceTypeGroupContext(); - - virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) SAL_OVERRIDE; -}; - - - -} // namespace chart -} // namespace drawingml -} // namespace oox - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/oox/drawingml/chart/typegroupconverter.hxx b/include/oox/drawingml/chart/typegroupconverter.hxx deleted file mode 100644 index 4f1e2f82f7cf..000000000000 --- a/include/oox/drawingml/chart/typegroupconverter.hxx +++ /dev/null @@ -1,185 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * 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 . - */ - -#ifndef INCLUDED_OOX_DRAWINGML_CHART_TYPEGROUPCONVERTER_HXX -#define INCLUDED_OOX_DRAWINGML_CHART_TYPEGROUPCONVERTER_HXX - -#include <oox/drawingml/chart/converterbase.hxx> - -namespace com { namespace sun { namespace star { - namespace chart2 { class XChartType; } - namespace chart2 { class XCoordinateSystem; } - namespace chart2 { class XDataSeries; } - namespace chart2 { class XDiagram; } - namespace chart2 { namespace data { class XLabeledDataSequence; } } -} } } - -namespace oox { -namespace drawingml { -namespace chart { - -/** Enumerates different chart types. */ -enum TypeId -{ - TYPEID_BAR, /// Vertical bar chart. - TYPEID_HORBAR, /// Horizontal bar chart. - TYPEID_LINE, /// Line chart. - TYPEID_AREA, /// Area chart. - TYPEID_STOCK, /// Stock chart. - TYPEID_RADARLINE, /// Linear radar chart. - TYPEID_RADARAREA, /// Filled radar chart. - TYPEID_PIE, /// Pie chart. - TYPEID_DOUGHNUT, /// Doughnut (ring) chart. - TYPEID_OFPIE, /// Pie-to-pie or pie-to-bar chart. - TYPEID_SCATTER, /// Scatter (XY) chart. - TYPEID_BUBBLE, /// Bubble chart. - TYPEID_SURFACE, /// Surface chart. - TYPEID_UNKNOWN /// Default for unknown chart types. -}; - -/** Enumerates different categories of similar chart types. */ -enum TypeCategory -{ - TYPECATEGORY_BAR, /// Bar charts (horizontal or vertical). - TYPECATEGORY_LINE, /// Line charts (line, area, stock charts). - TYPECATEGORY_RADAR, /// Radar charts (linear or filled). - TYPECATEGORY_PIE, /// Pie and donut charts. - TYPECATEGORY_SCATTER, /// Scatter and bubble charts. - TYPECATEGORY_SURFACE /// Surface charts. -}; - -/** Enumerates modes for varying point colors in a series. */ -enum VarPointMode -{ - VARPOINTMODE_NONE, /// No varied colors supported. - VARPOINTMODE_SINGLE, /// Only supported, if type group contains only one series. - VARPOINTMODE_MULTI /// Supported for multiple series in a chart type group. -}; - -/** Contains info for a chart type related to the OpenOffice.org chart module. */ -struct TypeGroupInfo -{ - TypeId meTypeId; /// Unique chart type identifier. - TypeCategory meTypeCategory; /// Category this chart type belongs to. - const sal_Char* mpcServiceName; /// Service name of the type. - VarPointMode meVarPointMode; /// Mode for varying point colors. - sal_Int32 mnDefLabelPos; /// Default data label position (API constant). - bool mbCombinable2d; /// True = types can be combined in one axes set. - bool mbSupports3d; /// True = 3D type allowed, false = only 2D type. - bool mbPolarCoordSystem; /// True = polar, false = cartesian. - bool mbSeriesIsFrame2d; /// True = 2D type series with area formatting. - bool mbSingleSeriesVis; /// True = only first series visible (e.g. pie charts). - bool mbCategoryAxis; /// True = X axis contains categories. - bool mbSwappedAxesSet; /// True = X axis and Y axis are swapped. - bool mbSupportsStacking; /// True = data points can be stacked on each other. - bool mbReverseSeries; /// True = insert unstacked series in reverse order. - bool mbTicksBetweenCateg; /// True = X axis ticks between categories. - bool mbPictureOptions; /// True = bitmaps support options from c:pictureOptions. -}; - -struct UpDownBarsModel; - -class UpDownBarsConverter : public ConverterBase< UpDownBarsModel > -{ -public: - explicit UpDownBarsConverter( const ConverterRoot& rParent, UpDownBarsModel& rModel ); - virtual ~UpDownBarsConverter(); - - /** Converts the OOXML up/down bars. */ - void convertFromModel( - const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& rxChartType ); -}; - -struct TypeGroupModel; -struct View3DModel; - -class TypeGroupConverter : public ConverterBase< TypeGroupModel > -{ -public: - explicit TypeGroupConverter( const ConverterRoot& rParent, TypeGroupModel& rModel ); - virtual ~TypeGroupConverter(); - - /** Returns the type info struct that describes this chart type group. */ - const TypeGroupInfo& getTypeInfo() const { return maTypeInfo; } - - /** Returns true, if the series in this chart type group are stacked on each other (no percentage). */ - bool isStacked() const; - /** Returns true, if the series in this chart type group are stacked on each other as percentage. */ - bool isPercent() const; - /** Returns true, if the chart is three-dimensional. */ - bool is3dChart() const { return mb3dChart;} - /** Returns true, if chart type supports wall and floor format in 3D mode. */ - bool isWall3dChart() const; - /** Returns true, if the series in this chart type group are ordered on the Z axis. */ - bool isDeep3dChart() const; - - /** Returns true, if this chart type supports area formatting for its series. */ - bool isSeriesFrameFormat() const; - /** Returns the object type for a series depending on the chart type. */ - ObjectType getSeriesObjectType() const; - - /** Returns true, if this chart type has to reverse its series order. */ - bool isReverseSeries() const; - /** Returns series title, if the chart type group contains only one single series. */ - OUString getSingleSeriesTitle() const; - - /** Creates a coordinate system according to the contained chart type. */ - ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XCoordinateSystem > - createCoordinateSystem(); - /** Creates a labeled data sequence object for axis categories. */ - ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XLabeledDataSequence > - createCategorySequence(); - - /** Converts the OOXML type group model into a chart2 coordinate system. */ - void convertFromModel( - const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDiagram >& rxDiagram, - const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XCoordinateSystem >& rxCoordSystem, - sal_Int32 nAxesSetIdx, bool bSupportsVaryColorsByPoint ); - - /** Sets the passed OOXML marker style at the passed property set. */ - void convertMarker( PropertySet& rPropSet, sal_Int32 nOoxSymbol, sal_Int32 nOoxSize, - ModelRef< Shape > xShapeProps ) const; - /** Sets the passed OOXML line smoothing at the passed property set. */ - void convertLineSmooth( PropertySet& rPropSet, bool bOoxSmooth ) const; - /** Sets the passed OOXML bar 3D geometry at the passed property set. */ - void convertBarGeometry( PropertySet& rPropSet, sal_Int32 nOoxShape ) const; - /** Sets the passed OOXML pie rotation at the passed property set. */ - void convertPieRotation( PropertySet& rPropSet, sal_Int32 nOoxAngle ) const; - /** Sets the passed OOXML pie explosion at the passed property set. */ - void convertPieExplosion( PropertySet& rPropSet, sal_Int32 nOoxExplosion ) const; - -private: - /** Inserts the passed series into the chart type. Adds additional properties to the series. */ - void insertDataSeries( - const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& rxChartType, - const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries >& rxSeries, - sal_Int32 nAxesSetIdx ); - -private: - TypeGroupInfo maTypeInfo; /// Extended type info for contained chart type model. - bool mb3dChart; /// True = type is a 3D chart type. -}; - -} // namespace chart -} // namespace drawingml -} // namespace oox - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/oox/drawingml/chart/typegroupmodel.hxx b/include/oox/drawingml/chart/typegroupmodel.hxx deleted file mode 100644 index 91570e324a73..000000000000 --- a/include/oox/drawingml/chart/typegroupmodel.hxx +++ /dev/null @@ -1,90 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * 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 . - */ - -#ifndef INCLUDED_OOX_DRAWINGML_CHART_TYPEGROUPMODEL_HXX -#define INCLUDED_OOX_DRAWINGML_CHART_TYPEGROUPMODEL_HXX - -#include <oox/drawingml/chart/seriesmodel.hxx> - -namespace oox { -namespace drawingml { -namespace chart { - -struct UpDownBarsModel -{ - typedef ModelRef< Shape > ShapeRef; - - ShapeRef mxDownBars; /// Formatting of down bars. - ShapeRef mxUpBars; /// Formatting of up bars. - sal_Int32 mnGapWidth; /// Space between up/down bars. - - explicit UpDownBarsModel(); - ~UpDownBarsModel(); -}; - -struct TypeGroupModel -{ - typedef ModelVector< SeriesModel > SeriesVector; - typedef ::std::vector< sal_Int32 > AxisIdVector; - typedef ModelRef< DataLabelsModel > DataLabelsRef; - typedef ModelRef< UpDownBarsModel > UpDownBarsRef; - typedef ModelRef< Shape > ShapeRef; - - SeriesVector maSeries; /// Series attached to this chart type group. - AxisIdVector maAxisIds; /// List of axis identifiers used by this chart type. - DataLabelsRef mxLabels; /// Data point label settings for all series. - UpDownBarsRef mxUpDownBars; /// Up/down bars in stock charts. - ShapeRef mxSerLines; /// Connector lines in stacked bar charts. - ShapeRef mxDropLines; /// Drop lines connecting data points with X axis. - ShapeRef mxHiLowLines; /// High/low lines connecting lowest and highest data points. - double mfSplitPos; /// Threshold value in pie-to charts. - sal_Int32 mnBarDir; /// Bar direction in bar charts (vertical/horizontal). - sal_Int32 mnBubbleScale; /// Relative scaling of bubble size (percent). - sal_Int32 mnFirstAngle; /// Rotation angle of first slice in pie charts. - sal_Int32 mnGapDepth; /// Space between series in deep 3D charts. - sal_Int32 mnGapWidth; /// Space between bars in bar charts, or space in pie-to charts. - sal_Int32 mnGrouping; /// Series grouping mode. - sal_Int32 mnHoleSize; /// Hole size in doughnut charts. - sal_Int32 mnOfPieType; /// Pie-to-pie or pie-to-bar chart. - sal_Int32 mnOverlap; /// Bar overlap per category (2D bar charts only). - sal_Int32 mnRadarStyle; /// Type of radar chart (lines, markers, filled). - sal_Int32 mnScatterStyle; /// Type of scatter chart (lines, markers, smooth). - sal_Int32 mnSecondPieSize; /// relative size of second pie/bar in pie-to charts (percent). - sal_Int32 mnShape; /// 3D bar shape type. - sal_Int32 mnSizeRepresents; /// Bubble size represents area or width. - sal_Int32 mnSplitType; /// Split type in pie-to charts. - sal_Int32 mnTypeId; /// Chart type identifier. - bool mbBubble3d; /// True = show bubbles with 3D shade. - bool mbShowMarker; /// True = show point markers in line charts. - bool mbShowNegBubbles; /// True = show absolute value of negative bubbles. - bool mbSmooth; /// True = smooth lines in line charts. - bool mbVaryColors; /// True = different automatic colors for each point. - bool mbWireframe; /// True = wireframe surface chart, false = filled surface chart. - - explicit TypeGroupModel( sal_Int32 nTypeId ); - ~TypeGroupModel(); -}; - -} // namespace chart -} // namespace drawingml -} // namespace oox - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/oox/drawingml/diagram/diagram.hxx b/include/oox/drawingml/diagram/diagram.hxx deleted file mode 100644 index d2bca17c0ba6..000000000000 --- a/include/oox/drawingml/diagram/diagram.hxx +++ /dev/null @@ -1,58 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * 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 . - */ - -#ifndef INCLUDED_OOX_DRAWINGML_DIAGRAM_DIAGRAM_HXX -#define INCLUDED_OOX_DRAWINGML_DIAGRAM_DIAGRAM_HXX - -#include <rtl/ustring.hxx> -#include <oox/drawingml/shape.hxx> -#include <oox/core/xmlfilterbase.hxx> - -#include <com/sun/star/xml/dom/XDocument.hpp> - -namespace oox { namespace drawingml { - -/** load diagram data, and put resulting graphic into shape - - This method loads the diagram data fragments from the given paths, - generate and layout the shapes, and push it as children into the - referenced shape. - */ -void loadDiagram( ShapePtr& pShape, - core::XmlFilterBase& rFilter, - const OUString& rDataModelPath, - const OUString& rLayoutPath, - const OUString& rQStylePath, - const OUString& rColorStylePath ); - -void loadDiagram( const ShapePtr& pShape, - core::XmlFilterBase& rFilter, - const ::com::sun::star::uno::Reference< - ::com::sun::star::xml::dom::XDocument>& rXDataModelDom, - const ::com::sun::star::uno::Reference< - ::com::sun::star::xml::dom::XDocument>& rXLayoutDom, - const ::com::sun::star::uno::Reference< - ::com::sun::star::xml::dom::XDocument>& rXQStyleDom, - const ::com::sun::star::uno::Reference< - ::com::sun::star::xml::dom::XDocument>& rXColorStyleDom ); -} } - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |