From ec712408961a4a2efc667a7af83a21209907f9eb Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Fri, 20 Nov 2009 11:58:22 +0100 Subject: chartpositioning: #i100778# chart positioning excluding labels --- xmloff/source/chart/SchXMLPlotAreaContext.hxx | 59 +++++++++++++++++++++++++-- 1 file changed, 55 insertions(+), 4 deletions(-) (limited to 'xmloff/source/chart/SchXMLPlotAreaContext.hxx') diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.hxx b/xmloff/source/chart/SchXMLPlotAreaContext.hxx index ed01ad2fa8da..af6f600200d5 100644 --- a/xmloff/source/chart/SchXMLPlotAreaContext.hxx +++ b/xmloff/source/chart/SchXMLPlotAreaContext.hxx @@ -69,6 +69,42 @@ private: SchXML3DSceneAttributesHelper(); }; +// ---------------------------------------- + +class SchXMLPositonAttributesHelper +{ +public: + SchXMLPositonAttributesHelper( SvXMLImport& rImporter ); + ~SchXMLPositonAttributesHelper(); + + bool readPositioningAttribute( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::rtl::OUString& rValue ); + void readAutomaticPositioningProperties( XMLPropStyleContext* pPropStyleContext, const SvXMLStylesContext* pStylesCtxt ); + + bool hasPosSize() const; + ::com::sun::star::awt::Rectangle getRectangle() const; + + +private: + bool hasSize() const; + bool hasPosition() const; + ::com::sun::star::awt::Size getSize() const; + ::com::sun::star::awt::Point getPosition() const; + + SvXMLImport& m_rImport; + + ::com::sun::star::awt::Point m_aPosition; + ::com::sun::star::awt::Size m_aSize; + + bool m_bHasSizeWidth; + bool m_bHasSizeHeight; + bool m_bHasPositionX; + bool m_bHasPositionY; + sal_Bool m_bAutoSize; + sal_Bool m_bAutoPosition; +}; + +// ---------------------------------------- + class SchXMLPlotAreaContext : public SvXMLImportContext { public: @@ -113,10 +149,8 @@ private: GlobalSeriesImportInfo m_aGlobalSeriesImportInfo; SchXML3DSceneAttributesHelper maSceneImportHelper; - ::com::sun::star::awt::Size maSize; - ::com::sun::star::awt::Point maPosition; - bool mbHasSize; - bool mbHasPosition; + SchXMLPositonAttributesHelper m_aOuterPositioning;//including axes and axes titles + SchXMLPositonAttributesHelper m_aInnerPositioning;//excluding axes and axes titles bool mbPercentStacked; bool m_bAxisPositionAttributeImported; ::rtl::OUString msAutoStyleName; @@ -219,6 +253,23 @@ public: // ---------------------------------------- +class SchXMLExcludingPositionContext : public SvXMLImportContext +{ +public: + SchXMLExcludingPositionContext( + SvXMLImport& rImport + , sal_uInt16 nPrefix + , const rtl::OUString& rLocalName + , SchXMLPositonAttributesHelper& rPositioning ); + virtual ~SchXMLExcludingPositionContext(); + virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ); + +private: + SchXMLPositonAttributesHelper& m_rPositioning; +}; + +// ---------------------------------------- + class SchXMLWallFloorContext : public SvXMLImportContext { public: -- cgit From b7db16a355f9bfbab65e1a88e1e4dede35bf7357 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Wed, 31 Mar 2010 18:43:41 +0200 Subject: chartpositioning: #i98398# treat diagram size without title sizes (correct ODF import/export, correct diagram sizing per mouse, correct API for import) --- xmloff/source/chart/SchXMLPlotAreaContext.hxx | 1 + 1 file changed, 1 insertion(+) (limited to 'xmloff/source/chart/SchXMLPlotAreaContext.hxx') diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.hxx b/xmloff/source/chart/SchXMLPlotAreaContext.hxx index 632abe209188..cb986d7e7a3d 100644 --- a/xmloff/source/chart/SchXMLPlotAreaContext.hxx +++ b/xmloff/source/chart/SchXMLPlotAreaContext.hxx @@ -78,6 +78,7 @@ public: void readAutomaticPositioningProperties( XMLPropStyleContext* pPropStyleContext, const SvXMLStylesContext* pStylesCtxt ); bool hasPosSize() const; + bool isAutomatic() const; ::com::sun::star::awt::Rectangle getRectangle() const; -- cgit From e5fca8fd92fed0b7b719645c461ffe89401ff62a Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Wed, 5 May 2010 18:16:33 +0200 Subject: chartpositioning: #i100778# simplify user interface: reduce sizing options to new excluding mode only --- xmloff/source/chart/SchXMLPlotAreaContext.hxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xmloff/source/chart/SchXMLPlotAreaContext.hxx') diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.hxx b/xmloff/source/chart/SchXMLPlotAreaContext.hxx index cb986d7e7a3d..1f0de466dcb1 100644 --- a/xmloff/source/chart/SchXMLPlotAreaContext.hxx +++ b/xmloff/source/chart/SchXMLPlotAreaContext.hxx @@ -251,15 +251,15 @@ public: // ---------------------------------------- -class SchXMLExcludingPositionContext : public SvXMLImportContext +class SchXMLCoordinateRegionContext : public SvXMLImportContext { public: - SchXMLExcludingPositionContext( + SchXMLCoordinateRegionContext( SvXMLImport& rImport , sal_uInt16 nPrefix , const rtl::OUString& rLocalName , SchXMLPositonAttributesHelper& rPositioning ); - virtual ~SchXMLExcludingPositionContext(); + virtual ~SchXMLCoordinateRegionContext(); virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ); private: -- cgit