Modified: openoffice/branches/alg/aw080/main/xmloff/source/draw/ximpshap.hxx URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/xmloff/source/draw/ximpshap.hxx?rev=1511822&r1=1511821&r2=1511822&view=diff ============================================================================== --- openoffice/branches/alg/aw080/main/xmloff/source/draw/ximpshap.hxx (original) +++ openoffice/branches/alg/aw080/main/xmloff/source/draw/ximpshap.hxx Thu Aug 8 15:01:55 2013 @@ -36,6 +36,8 @@ #include <xmloff/shapeimport.hxx> #include <xmloff/xmlmultiimagehelper.hxx> #include <basegfx/matrix/b2dhommatrix.hxx> +#include <basegfx/point/b2dpoint.hxx> +#include <basegfx/vector/b2dvector.hxx> ////////////////////////////////////////////////////////////////////////////// // common shape context @@ -43,77 +45,81 @@ class SdXMLShapeContext : public SvXMLShapeContext { protected: - // the shape group this object should be created inside - com::sun::star::uno::Reference< com::sun::star::drawing::XShapes > mxShapes; - com::sun::star::uno::Reference< com::sun::star::text::XTextCursor > mxCursor; - com::sun::star::uno::Reference< com::sun::star::text::XTextCursor > mxOldCursor; - com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList> mxAttrList; - com::sun::star::uno::Reference< com::sun::star::container::XIdentifierContainer > mxGluePoints; - com::sun::star::uno::Reference< com::sun::star::document::XActionLockable > mxLockable; - - rtl::OUString maDrawStyleName; - rtl::OUString maTextStyleName; - rtl::OUString maPresentationClass; - rtl::OUString maShapeName; - rtl::OUString maThumbnailURL; + // the shape group this object should be created inside + com::sun::star::uno::Reference< com::sun::star::drawing::XShapes > mxShapes; + com::sun::star::uno::Reference< com::sun::star::text::XTextCursor > mxCursor; + com::sun::star::uno::Reference< com::sun::star::text::XTextCursor > mxOldCursor; + com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList> mxAttrList; + com::sun::star::uno::Reference< com::sun::star::container::XIdentifierContainer > mxGluePoints; + com::sun::star::uno::Reference< com::sun::star::document::XActionLockable > mxLockable; + + rtl::OUString maDrawStyleName; + rtl::OUString maTextStyleName; + rtl::OUString maPresentationClass; + rtl::OUString maShapeName; + rtl::OUString maThumbnailURL; + + sal_uInt16 mnStyleFamily; + sal_uInt16 mnClass; + sal_Int32 mnZOrder; + rtl::OUString maShapeId; + rtl::OUString maLayerName; + + // #i68101# + rtl::OUString maShapeTitle; + rtl::OUString maShapeDescription; + + SdXMLImExTransform2D mnTransform; + basegfx::B2DVector maObjectSize; + basegfx::B2DPoint maObjectPosition; + //com::sun::star::awt::Size maSize; + //com::sun::star::awt::Point maPosition; + basegfx::B2DHomMatrix maUsedTransformation; - /// whether to restore list context (#91964#) - bool mbListContextPushed; + /// bitfield + bool mbVisible : 1; + bool mbPrintable : 1; - sal_uInt16 mnStyleFamily; - sal_uInt16 mnClass; - sal_Bool mbIsPlaceholder; - bool mbClearDefaultAttributes; - sal_Bool mbIsUserTransformed; - sal_Int32 mnZOrder; - rtl::OUString maShapeId; - rtl::OUString maLayerName; - - // #i68101# - rtl::OUString maShapeTitle; - rtl::OUString maShapeDescription; - - SdXMLImExTransform2D mnTransform; - com::sun::star::awt::Size maSize; - com::sun::star::awt::Point maPosition; - basegfx::B2DHomMatrix maUsedTransformation; + /// whether to restore list context (#91964#) + bool mbListContextPushed : 1; - bool mbVisible; - bool mbPrintable; + bool mbIsPlaceholder : 1; + bool mbClearDefaultAttributes : 1; + bool mbIsUserTransformed : 1; - /** if bSupportsStyle is false, auto styles will be set but not a style */ - void SetStyle( bool bSupportsStyle = true ); - void SetLayer(); - void SetThumbnail(); + /** if bSupportsStyle is false, auto styles will be set but not a style */ + void SetStyle( bool bSupportsStyle = true ); + void SetLayer(); + void SetThumbnail(); - void AddShape(com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape); - void AddShape(const char* pServiceName ); - void SetTransformation(); + void AddShape(com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape); + void AddShape(const char* pServiceName ); + void SetTransformation(); - SvXMLImport& GetImport() { return SvXMLImportContext::GetImport(); } - const SvXMLImport& GetImport() const { return SvXMLImportContext::GetImport(); } + SvXMLImport& GetImport() { return SvXMLImportContext::GetImport(); } + const SvXMLImport& GetImport() const { return SvXMLImportContext::GetImport(); } - void addGluePoint( const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList ); + void addGluePoint( const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList ); - sal_Bool isPresentationShape() const; + sal_Bool isPresentationShape() const; public: - SdXMLShapeContext( SvXMLImport& rImport, - sal_uInt16 nPrfx, - const rtl::OUString& rLocalName, - const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, - com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes, - sal_Bool bTemporaryShape); - virtual ~SdXMLShapeContext(); + SdXMLShapeContext( SvXMLImport& rImport, + sal_uInt16 nPrfx, + const rtl::OUString& rLocalName, + const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, + com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes, + bool bTemporaryShape); + virtual ~SdXMLShapeContext(); - virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList); - virtual void EndElement(); + virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList); + virtual void EndElement(); - virtual SvXMLImportContext * CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, - const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList ); + virtual SvXMLImportContext * CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, + const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList ); - // this is called from the parent group for each unparsed attribute in the attribute list - virtual void processAttribute( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::rtl::OUString& rValue ); + // this is called from the parent group for each unparsed attribute in the attribute list + virtual void processAttribute( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::rtl::OUString& rValue ); /// access to ShapeId for evtl. late adding const rtl::OUString& getShapeId() const { return maShapeId; } @@ -131,7 +137,7 @@ public: const rtl::OUString& rLocalName, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes, - sal_Bool bTemporaryShape); + bool bTemporaryShape); virtual ~SdXMLRectShapeContext(); virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList); @@ -144,22 +150,23 @@ public: class SdXMLLineShapeContext : public SdXMLShapeContext { - sal_Int32 mnX1; - sal_Int32 mnY1; - sal_Int32 mnX2; - sal_Int32 mnY2; - -public: - SdXMLLineShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx, - const rtl::OUString& rLocalName, - const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, - com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes, - sal_Bool bTemporaryShape); - virtual ~SdXMLLineShapeContext(); - virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList); +private: + double mfX1; + double mfY1; + double mfX2; + double mfY2; + +public: + SdXMLLineShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx, + const rtl::OUString& rLocalName, + const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, + com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes, + bool bTemporaryShape); + virtual ~SdXMLLineShapeContext(); + virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList); - // this is called from the parent group for each unparsed attribute in the attribute list - virtual void processAttribute( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::rtl::OUString& rValue ); + // this is called from the parent group for each unparsed attribute in the attribute list + virtual void processAttribute( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::rtl::OUString& rValue ); }; ////////////////////////////////////////////////////////////////////////////// @@ -167,25 +174,25 @@ public: class SdXMLEllipseShapeContext : public SdXMLShapeContext { - sal_Int32 mnCX; - sal_Int32 mnCY; - sal_Int32 mnRX; - sal_Int32 mnRY; + double mfCX; + double mfCY; + double mfRX; + double mfRY; + + sal_uInt16 meKind; + sal_Int32 mnStartAngle; + sal_Int32 mnEndAngle; +public: + SdXMLEllipseShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx, + const rtl::OUString& rLocalName, + const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, + com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes, + bool bTemporaryShape); + virtual ~SdXMLEllipseShapeContext(); + virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList); - sal_uInt16 meKind; - sal_Int32 mnStartAngle; - sal_Int32 mnEndAngle; -public: - SdXMLEllipseShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx, - const rtl::OUString& rLocalName, - const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, - com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes, - sal_Bool bTemporaryShape); - virtual ~SdXMLEllipseShapeContext(); - virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList); - - // this is called from the parent group for each unparsed attribute in the attribute list - virtual void processAttribute( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::rtl::OUString& rValue ); + // this is called from the parent group for each unparsed attribute in the attribute list + virtual void processAttribute( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::rtl::OUString& rValue ); }; ////////////////////////////////////////////////////////////////////////////// @@ -195,13 +202,15 @@ class SdXMLPolygonShapeContext : public { rtl::OUString maPoints; rtl::OUString maViewBox; - sal_Bool mbClosed; + bool mbClosed; public: SdXMLPolygonShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const rtl::OUString& rLocalName, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, - com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes, sal_Bool bClosed, sal_Bool bTemporaryShape); + com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes, + bool bClosed, + bool bTemporaryShape); virtual ~SdXMLPolygonShapeContext(); virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList); @@ -216,14 +225,14 @@ class SdXMLPathShapeContext : public SdX { rtl::OUString maD; rtl::OUString maViewBox; - sal_Bool mbClosed; + bool mbClosed; public: SdXMLPathShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const rtl::OUString& rLocalName, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes, - sal_Bool bTemporaryShape); + bool bTemporaryShape); virtual ~SdXMLPathShapeContext(); virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList); @@ -243,7 +252,7 @@ public: const rtl::OUString& rLocalName, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes, - sal_Bool bTemporaryShape); + bool bTemporaryShape); virtual ~SdXMLTextBoxShapeContext(); virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList); @@ -264,7 +273,7 @@ public: const rtl::OUString& rLocalName, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes, - sal_Bool bTemporaryShape); + bool bTemporaryShape); virtual ~SdXMLControlShapeContext(); virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList); @@ -299,7 +308,7 @@ public: const rtl::OUString& rLocalName, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes, - sal_Bool bTemporaryShape); + bool bTemporaryShape); virtual ~SdXMLConnectorShapeContext(); virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList); @@ -321,7 +330,7 @@ public: const rtl::OUString& rLocalName, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes, - sal_Bool bTemporaryShape); + bool bTemporaryShape); virtual ~SdXMLMeasureShapeContext(); virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList); virtual void EndElement(); @@ -342,7 +351,7 @@ public: const rtl::OUString& rLocalName, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes, - sal_Bool bTemporaryShape); + bool bTemporaryShape); virtual ~SdXMLPageShapeContext(); virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList); @@ -364,7 +373,7 @@ public: const rtl::OUString& rLocalName, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes, - sal_Bool bTemporaryShape); + bool bTemporaryShape); virtual ~SdXMLCaptionShapeContext(); virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList); @@ -389,7 +398,7 @@ public: const rtl::OUString& rLocalName, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes, - sal_Bool bTemporaryShape); + bool bTemporaryShape); virtual ~SdXMLGraphicObjectShapeContext(); virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ); @@ -417,7 +426,7 @@ public: const rtl::OUString& rLocalName, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes, - sal_Bool bTemporaryShape); + bool bTemporaryShape); virtual ~SdXMLChartShapeContext(); virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ); @@ -444,7 +453,7 @@ public: const rtl::OUString& rLocalName, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes, - sal_Bool bTemporaryShape); + bool bTemporaryShape); virtual ~SdXMLObjectShapeContext(); virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ); @@ -476,7 +485,7 @@ public: const rtl::OUString& rLocalName, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes, - sal_Bool bTemporaryShape); + bool bTemporaryShape); virtual ~SdXMLAppletShapeContext(); virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ); @@ -506,7 +515,7 @@ public: const rtl::OUString& rLocalName, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes, - sal_Bool bTemporaryShape); + bool bTemporaryShape); virtual ~SdXMLPluginShapeContext(); virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ); @@ -533,7 +542,7 @@ public: const rtl::OUString& rLocalName, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes, - sal_Bool bTemporaryShape); + bool bTemporaryShape); virtual ~SdXMLFloatingFrameShapeContext(); virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ); @@ -563,7 +572,7 @@ public: const rtl::OUString& rLocalName, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes, - sal_Bool bTemporaryShape); + bool bTemporaryShape); virtual ~SdXMLFrameShapeContext(); virtual SvXMLImportContext * CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, @@ -590,7 +599,7 @@ public: SdXMLCustomShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const rtl::OUString& rLocalName, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes, - sal_Bool bTemporaryShape); + bool bTemporaryShape); virtual ~SdXMLCustomShapeContext(); virtual void StartElement( const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList );
Modified: openoffice/branches/alg/aw080/main/xmloff/source/style/chrhghdl.cxx URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/xmloff/source/style/chrhghdl.cxx?rev=1511822&r1=1511821&r2=1511822&view=diff ============================================================================== --- openoffice/branches/alg/aw080/main/xmloff/source/style/chrhghdl.cxx (original) +++ openoffice/branches/alg/aw080/main/xmloff/source/style/chrhghdl.cxx Thu Aug 8 15:01:55 2013 @@ -58,7 +58,7 @@ sal_Bool XMLCharHeightHdl::importXML( co if( rStrImpValue.indexOf( sal_Unicode('%') ) == -1 ) { MapUnit eSrcUnit = SvXMLExportHelper::GetUnitFromString( rStrImpValue, MAP_POINT ); - if( SvXMLUnitConverter::convertDouble( fSize, rStrImpValue, eSrcUnit, MAP_POINT )) + if( SvXMLUnitConverter::convertDoubleAndUnit( fSize, rStrImpValue, eSrcUnit, MAP_POINT )) { rValue <<= (float)fSize; return sal_True; @@ -75,7 +75,7 @@ sal_Bool XMLCharHeightHdl::exportXML( OU float fSize = 0; if( rValue >>= fSize ) { - SvXMLUnitConverter::convertDouble( aOut, (double)fSize, sal_True, MAP_POINT, MAP_POINT ); + SvXMLUnitConverter::convertDoubleAndUnit( aOut, (double)fSize, sal_True, MAP_POINT, MAP_POINT ); aOut.append( sal_Unicode('p')); aOut.append( sal_Unicode('t')); }