Author: alg
Date: Fri Aug 2 13:55:37 2013
New Revision: 1509715
URL: http://svn.apache.org/r1509715
Log:
corrected first PolyPolygon handling stuff in xmloff
Modified:
openoffice/branches/alg/aw080/main/basegfx/inc/basegfx/matrix/b2dhommatrixtools.hxx
openoffice/branches/alg/aw080/main/basegfx/source/matrix/b2dhommatrixtools.cxx
openoffice/branches/alg/aw080/main/svgio/source/svgreader/svgpolynode.cxx
openoffice/branches/alg/aw080/main/svx/source/svdraw/svdopath.cxx
openoffice/branches/alg/aw080/main/xmloff/source/draw/shapeexport2.cxx
openoffice/branches/alg/aw080/main/xmloff/source/draw/xexptran.cxx
openoffice/branches/alg/aw080/main/xmloff/source/draw/ximpshap.cxx
Modified:
openoffice/branches/alg/aw080/main/basegfx/inc/basegfx/matrix/b2dhommatrixtools.hxx
URL:
http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/basegfx/inc/basegfx/matrix/b2dhommatrixtools.hxx?rev=1509715&r1=1509714&r2=1509715&view=diff
==============================================================================
---
openoffice/branches/alg/aw080/main/basegfx/inc/basegfx/matrix/b2dhommatrixtools.hxx
(original)
+++
openoffice/branches/alg/aw080/main/basegfx/inc/basegfx/matrix/b2dhommatrixtools.hxx
Fri Aug 2 13:55:37 2013
@@ -187,10 +187,10 @@ namespace basegfx
class B2DHomMatrixBufferedDecompose
{
private:
- B2DVector maScale;
- B2DPoint maTranslate;
- double mfRotate;
- double mfShearX;
+ B2DVector maScale;
+ B2DPoint maTranslate;
+ double mfRotate;
+ double mfShearX;
public:
B2DHomMatrixBufferedDecompose(const B2DHomMatrix&
rB2DHomMatrix = B2DHomMatrix())
@@ -236,12 +236,13 @@ namespace basegfx
bool mbDecomposed : 1;
bool mbCombined : 1;
+ void impDecompose();
+
void impCheckDecompose()
{
if(!mbDecomposed)
{
- maB2DHomMatrix.decompose(maScale,
maTranslate, mfRotate, mfShearX);
- mbDecomposed = true;
+ impDecompose();
}
}
Modified:
openoffice/branches/alg/aw080/main/basegfx/source/matrix/b2dhommatrixtools.cxx
URL:
http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/basegfx/source/matrix/b2dhommatrixtools.cxx?rev=1509715&r1=1509714&r2=1509715&view=diff
==============================================================================
---
openoffice/branches/alg/aw080/main/basegfx/source/matrix/b2dhommatrixtools.cxx
(original)
+++
openoffice/branches/alg/aw080/main/basegfx/source/matrix/b2dhommatrixtools.cxx
Fri Aug 2 13:55:37 2013
@@ -515,4 +515,27 @@ namespace basegfx
} // end of namespace basegfx
///////////////////////////////////////////////////////////////////////////////
+
+namespace basegfx
+{
+ namespace tools
+ {
+ void B2DHomMatrixBufferedOnDemandDecompose::impDecompose()
+ {
+ maB2DHomMatrix.decompose(maScale, maTranslate, mfRotate, mfShearX);
+
+ if(maScale.getX() < 0.0 && maScale.getY() < 0.0)
+ {
+ // mirrored in X and Y, same as rotated by 180 degrees; prefer
rotation
+ maScale.setX(-maScale.getX());
+ maScale.setY(-maScale.getY());
+ mfRotate = fmod(mfRotate + F_PI, F_2PI);
+ }
+
+ mbDecomposed = true;
+ }
+ } // end of namespace tools
+} // end of namespace basegfx
+
+///////////////////////////////////////////////////////////////////////////////
// eof
Modified:
openoffice/branches/alg/aw080/main/svgio/source/svgreader/svgpolynode.cxx
URL:
http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/svgio/source/svgreader/svgpolynode.cxx?rev=1509715&r1=1509714&r2=1509715&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/svgio/source/svgreader/svgpolynode.cxx
(original)
+++ openoffice/branches/alg/aw080/main/svgio/source/svgreader/svgpolynode.cxx
Fri Aug 2 13:55:37 2013
@@ -24,7 +24,7 @@
#include <svgio/svgreader/svgpolynode.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
-#include <basegfx/polygon/b2dpolypolygontools.hxx>
+#include <basegfx/polygon/b2dpolygontools.hxx>
//////////////////////////////////////////////////////////////////////////////
Modified: openoffice/branches/alg/aw080/main/svx/source/svdraw/svdopath.cxx
URL:
http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/svx/source/svdraw/svdopath.cxx?rev=1509715&r1=1509714&r2=1509715&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/svx/source/svdraw/svdopath.cxx (original)
+++ openoffice/branches/alg/aw080/main/svx/source/svdraw/svdopath.cxx Fri Aug
2 13:55:37 2013
@@ -1627,9 +1627,31 @@ void SdrPathObj::impSetPathPolyPolygonWi
return;
}
- static bool bRsetCoordinateSystemAfterWasLine(true);
+ // remember if this was a line before geometry change
+ static bool bResetCoordinateSystemAfterWasLine(true);
+ const bool bWasLineAndReset(bResetCoordinateSystemAfterWasLine &&
isLine());
- if(bRsetCoordinateSystemAfterWasLine && isLine())
+ // in all other cases, set new geometry
+ maPathPolyPolygon = rNew;
+
+ if(isLine())
+ {
+ // new geometry is a non-curved line, create unit transformation so
that (0,0) is
+ // 1st point and (1,0) is 2nd point
+ const basegfx::B2DPoint aPointA(rNew.getB2DPolygon(0).getB2DPoint(0));
+ const basegfx::B2DPoint aPointB(rNew.getB2DPolygon(0).getB2DPoint(1));
+ const basegfx::B2DVector aDelta(aPointB - aPointA);
+
+ maSdrObjectTransformation.setB2DHomMatrix(
+ basegfx::tools::createScaleRotateTranslateB2DHomMatrix(
+ basegfx::B2DTuple(aDelta.getLength(), 1.0),
+ atan2(aDelta.getY(), aDelta.getX()),
+ aPointA));
+ return;
+ }
+
+
+ if(bWasLineAndReset)
{
// the SdrPathObj has two basic states, line and other. Line is for
two points
// and no bezier, it uses a specialized geometry (unified line from
0.0, to 1.0)
@@ -1646,10 +1668,9 @@ void SdrPathObj::impSetPathPolyPolygonWi
// For this reason this is disabled and the old behaviour activated by
adding this
// case to esp. change back to the most trivial transformation in the
transition
// between line status and other. To try out the also possible new
alternative,
- // change the value of bRsetCoordinateSystemAfterWasLine to false.
+ // change the value of bResetCoordinateSystemAfterWasLine to false.
const basegfx::B2DRange aRangeNewGeometry(rNew.getB2DRange());
- maPathPolyPolygon = rNew;
maSdrObjectTransformation.setB2DHomMatrix(
basegfx::tools::createScaleTranslateB2DHomMatrix(
aRangeNewGeometry.getRange(),
@@ -1657,27 +1678,6 @@ void SdrPathObj::impSetPathPolyPolygonWi
return;
}
- // set new geometry
- maPathPolyPolygon = rNew;
-
- if(!rNew.areControlPointsUsed()
- && 1 == rNew.count()
- && 2 == rNew.getB2DPolygon(0).count())
- {
- // new geometry is a non-curved line, create unit transformation so
that (0,0) is
- // 1st point and (1,0) is 2nd point
- const basegfx::B2DPoint aPointA(rNew.getB2DPolygon(0).getB2DPoint(0));
- const basegfx::B2DPoint aPointB(rNew.getB2DPolygon(0).getB2DPoint(1));
- const basegfx::B2DVector aDelta(aPointB - aPointA);
-
- maSdrObjectTransformation.setB2DHomMatrix(
- basegfx::tools::createScaleRotateTranslateB2DHomMatrix(
- basegfx::B2DTuple(aDelta.getLength(), 1.0),
- atan2(aDelta.getY(), aDelta.getX()),
- aPointA));
- return;
- }
-
// get range of the target geometry
const basegfx::B2DRange aRangeNewGeometry(rNew.getB2DRange());
@@ -2167,7 +2167,7 @@ SdrPathObjType SdrPathObj::getSdrPathObj
}
}
- // default
+ // default; unreachable but safe
return PathType_Line;
}
Modified: openoffice/branches/alg/aw080/main/xmloff/source/draw/shapeexport2.cxx
URL:
http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/xmloff/source/draw/shapeexport2.cxx?rev=1509715&r1=1509714&r2=1509715&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/xmloff/source/draw/shapeexport2.cxx
(original)
+++ openoffice/branches/alg/aw080/main/xmloff/source/draw/shapeexport2.cxx Fri
Aug 2 13:55:37 2013
@@ -82,7 +82,7 @@ void XMLShapeExport::ImpExportNewTrans(c
}
void
XMLShapeExport::ImpExportNewTrans_GetB2DHomMatrix(::basegfx::B2DHomMatrix&
rMatrix,
- const uno::Reference< beans::XPropertySet >& xPropSet)
+ const uno::Reference< beans::XPropertySet >& xPropSet)
{
// --> OD 2004-08-09 #i28749# - Get <TransformationInHoriL2R>, if it exist
// and if the document is exported into the OpenOffice.org file format.
@@ -106,44 +106,44 @@ void XMLShapeExport::ImpExportNewTrans_G
aAny =
xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("Transformation")));
}
// <--
- drawing::HomogenMatrix3 aMatrix;
- aAny >>= aMatrix;
- rMatrix = basegfx::tools::UnoHomogenMatrix3ToB2DHomMatrix(aMatrix);
+ drawing::HomogenMatrix3 aMatrix;
+ aAny >>= aMatrix;
+ rMatrix = basegfx::tools::UnoHomogenMatrix3ToB2DHomMatrix(aMatrix);
}
void XMLShapeExport::ImpExportNewTrans_DecomposeAndRefPoint(const
::basegfx::B2DHomMatrix& rMatrix, ::basegfx::B2DTuple& rTRScale,
- double& fTRShear, double& fTRRotate, ::basegfx::B2DTuple& rTRTranslate,
com::sun::star::awt::Point* pRefPoint)
+ double& fTRShear, double& fTRRotate, ::basegfx::B2DTuple& rTRTranslate,
com::sun::star::awt::Point* pRefPoint)
{
- // decompose matrix
- rMatrix.decompose(rTRScale, rTRTranslate, fTRRotate, fTRShear);
+ // decompose matrix
+ rMatrix.decompose(rTRScale, rTRTranslate, fTRRotate, fTRShear);
- // correct translation about pRefPoint
- if(pRefPoint)
- {
- rTRTranslate -= ::basegfx::B2DTuple(pRefPoint->X, pRefPoint->Y);
- }
+ // correct translation about pRefPoint
+ if(pRefPoint)
+ {
+ rTRTranslate -= ::basegfx::B2DTuple(pRefPoint->X, pRefPoint->Y);
+ }
}
void XMLShapeExport::ImpExportNewTrans_FeaturesAndWrite(::basegfx::B2DTuple&
rTRScale, double fTRShear,
- double fTRRotate, ::basegfx::B2DTuple& rTRTranslate, const sal_Int32
nFeatures)
+ double fTRRotate, ::basegfx::B2DTuple& rTRTranslate, const sal_Int32
nFeatures)
{
- // allways write Size (rTRScale) since this statement carries the union
- // of the object
- OUString aStr;
- OUStringBuffer sStringBuffer;
- ::basegfx::B2DTuple aTRScale(rTRScale);
+ // allways write Size (rTRScale) since this statement carries the union
+ // of the object
+ OUString aStr;
+ OUStringBuffer sStringBuffer;
+ ::basegfx::B2DTuple aTRScale(rTRScale);
- // svg: width
- if(!(nFeatures & SEF_EXPORT_WIDTH))
- {
- aTRScale.setX(1.0);
- }
+ // svg: width
+ if(!(nFeatures & SEF_EXPORT_WIDTH))
+ {
+ aTRScale.setX(1.0);
+ }
- // svg: height
- if(!(nFeatures & SEF_EXPORT_HEIGHT))
- {
- aTRScale.setY(1.0);
- }
+ // svg: height
+ if(!(nFeatures & SEF_EXPORT_HEIGHT))
+ {
+ aTRScale.setY(1.0);
+ }
// svg:width and svg:height are not allowed negative, extract that and
// set back to absolute values
@@ -161,21 +161,23 @@ void XMLShapeExport::ImpExportNewTrans_F
}
// write positive svg:width
- mrExport.GetMM100UnitConverter().convertMeasure(sStringBuffer,
FRound(aTRScale.getX()));
- aStr = sStringBuffer.makeStringAndClear();
- mrExport.AddAttribute(XML_NAMESPACE_SVG, XML_WIDTH, aStr);
+ mrExport.GetMM100UnitConverter().convertDouble(sStringBuffer,
aTRScale.getX(), true);
+ //mrExport.GetMM100UnitConverter().convertMeasure(sStringBuffer,
FRound(aTRScale.getX()));
+ aStr = sStringBuffer.makeStringAndClear();
+ mrExport.AddAttribute(XML_NAMESPACE_SVG, XML_WIDTH, aStr);
// write positive svg:height
- mrExport.GetMM100UnitConverter().convertMeasure(sStringBuffer,
FRound(aTRScale.getY()));
- aStr = sStringBuffer.makeStringAndClear();
- mrExport.AddAttribute(XML_NAMESPACE_SVG, XML_HEIGHT, aStr);
+ mrExport.GetMM100UnitConverter().convertDouble(sStringBuffer,
aTRScale.getY(), true);
+ //mrExport.GetMM100UnitConverter().convertMeasure(sStringBuffer,
FRound(aTRScale.getY()));
+ aStr = sStringBuffer.makeStringAndClear();
+ mrExport.AddAttribute(XML_NAMESPACE_SVG, XML_HEIGHT, aStr);
- // decide if transformation is neccessary, new is that mirrorings are
now
+ // decide if transformation is neccessary, new is that mirrorings are now
// part of this to not write negative svg:width or svg:height entries
- const bool bTransformationIsNeccessary(fTRShear != 0.0 || fTRRotate !=
0.0 || bMirrorX || bMirrorY);
+ const bool bTransformationIsNeccessary(fTRShear != 0.0 || fTRRotate != 0.0
|| bMirrorX || bMirrorY);
- if(bTransformationIsNeccessary)
- {
+ if(bTransformationIsNeccessary)
+ {
// write transformation, but WITHOUT scale which is exported as size
above
SdXMLImExTransform2D aTransform;
@@ -220,31 +222,33 @@ void XMLShapeExport::ImpExportNewTrans_F
aTransform.AddTranslate(aTRTranslate);
}
- // does transformation need to be exported?
- if(aTransform.NeedsAction())
+ // does transformation need to be exported?
+ if(aTransform.NeedsAction())
{
- mrExport.AddAttribute(XML_NAMESPACE_DRAW,
XML_TRANSFORM, aTransform.GetExportString(mrExport.GetMM100UnitConverter()));
+ mrExport.AddAttribute(XML_NAMESPACE_DRAW, XML_TRANSFORM,
aTransform.GetExportString(mrExport.GetMM100UnitConverter()));
+ }
+ }
+ else
+ {
+ // no shear, no rotate, no mirror; just add object position to export
and we are done
+ if(nFeatures & SEF_EXPORT_X)
+ {
+ // svg: x
+ mrExport.GetMM100UnitConverter().convertDouble(sStringBuffer,
rTRTranslate.getX(), true);
+ //mrExport.GetMM100UnitConverter().convertMeasure(sStringBuffer,
FRound(rTRTranslate.getX()));
+ aStr = sStringBuffer.makeStringAndClear();
+ mrExport.AddAttribute(XML_NAMESPACE_SVG, XML_X, aStr);
}
- }
- else
- {
- // no shear, no rotate, no mirror; just add object position to
export and we are done
- if(nFeatures & SEF_EXPORT_X)
- {
- // svg: x
-
mrExport.GetMM100UnitConverter().convertMeasure(sStringBuffer,
FRound(rTRTranslate.getX()));
- aStr = sStringBuffer.makeStringAndClear();
- mrExport.AddAttribute(XML_NAMESPACE_SVG, XML_X, aStr);
- }
- if(nFeatures & SEF_EXPORT_Y)
- {
- // svg: y
-
mrExport.GetMM100UnitConverter().convertMeasure(sStringBuffer,
FRound(rTRTranslate.getY()));
- aStr = sStringBuffer.makeStringAndClear();
- mrExport.AddAttribute(XML_NAMESPACE_SVG, XML_Y, aStr);
- }
- }
+ if(nFeatures & SEF_EXPORT_Y)
+ {
+ // svg: y
+ mrExport.GetMM100UnitConverter().convertDouble(sStringBuffer,
rTRTranslate.getY(), true);
+ //mrExport.GetMM100UnitConverter().convertMeasure(sStringBuffer,
FRound(rTRTranslate.getY()));
+ aStr = sStringBuffer.makeStringAndClear();
+ mrExport.AddAttribute(XML_NAMESPACE_SVG, XML_Y, aStr);
+ }
+ }
}
//////////////////////////////////////////////////////////////////////////////
@@ -827,76 +831,76 @@ void XMLShapeExport::ImpExportRectangleS
//////////////////////////////////////////////////////////////////////////////
void XMLShapeExport::ImpExportLineShape(
- const uno::Reference< drawing::XShape >& xShape,
- XmlShapeType, sal_Int32 nFeatures, awt::Point* pRefPoint)
+ const uno::Reference< drawing::XShape >& xShape,
+ XmlShapeType, sal_Int32 nFeatures, awt::Point* pRefPoint)
{
- const uno::Reference< beans::XPropertySet > xPropSet(xShape,
uno::UNO_QUERY);
- if(xPropSet.is())
- {
- OUString aStr;
- OUStringBuffer sStringBuffer;
-
- // get matrix
- basegfx::B2DHomMatrix aMatrix;
- ImpExportNewTrans_GetB2DHomMatrix(aMatrix, xPropSet);
-
- // Create the two points directy using the transformation
- basegfx::B2DPoint aB2DStart(aMatrix * basegfx::B2DPoint(0.0,
0.0));
- basegfx::B2DPoint aB2DEnd(aMatrix * basegfx::B2DPoint(1.0,
0.0));
-
- if(pRefPoint)
- {
- const basegfx::B2DPoint aRefPoint(pRefPoint->X,
pRefPoint->Y);
- aB2DStart -= aRefPoint;
- aB2DEnd -= aRefPoint;
- }
+ const uno::Reference< beans::XPropertySet > xPropSet(xShape,
uno::UNO_QUERY);
+ if(xPropSet.is())
+ {
+ OUString aStr;
+ OUStringBuffer sStringBuffer;
- awt::Point aStart(basegfx::fround(aB2DStart.getX()),
basegfx::fround(aB2DStart.getY()));
- awt::Point aEnd(basegfx::fround(aB2DEnd.getX()),
basegfx::fround(aB2DEnd.getY()));
+ // get matrix
+ basegfx::B2DHomMatrix aMatrix;
+ ImpExportNewTrans_GetB2DHomMatrix(aMatrix, xPropSet);
- if( nFeatures & SEF_EXPORT_X )
- {
- // svg: x1
-
mrExport.GetMM100UnitConverter().convertMeasure(sStringBuffer, aStart.X);
- aStr = sStringBuffer.makeStringAndClear();
- mrExport.AddAttribute(XML_NAMESPACE_SVG, XML_X1, aStr);
- }
- else
- {
- aEnd.X -= aStart.X;
- }
+ // Create the two points directy using the transformation
+ basegfx::B2DPoint aB2DStart(aMatrix * basegfx::B2DPoint(0.0, 0.0));
+ basegfx::B2DPoint aB2DEnd(aMatrix * basegfx::B2DPoint(1.0, 0.0));
+
+ if(pRefPoint)
+ {
+ const basegfx::B2DPoint aRefPoint(pRefPoint->X, pRefPoint->Y);
+ aB2DStart -= aRefPoint;
+ aB2DEnd -= aRefPoint;
+ }
- if( nFeatures & SEF_EXPORT_Y )
- {
- // svg: y1
-
mrExport.GetMM100UnitConverter().convertMeasure(sStringBuffer, aStart.Y);
- aStr = sStringBuffer.makeStringAndClear();
- mrExport.AddAttribute(XML_NAMESPACE_SVG, XML_Y1, aStr);
- }
- else
- {
- aEnd.Y -= aStart.Y;
- }
+ awt::Point aStart(basegfx::fround(aB2DStart.getX()),
basegfx::fround(aB2DStart.getY()));
+ awt::Point aEnd(basegfx::fround(aB2DEnd.getX()),
basegfx::fround(aB2DEnd.getY()));
- // svg: x2
- mrExport.GetMM100UnitConverter().convertMeasure(sStringBuffer,
aEnd.X);
- aStr = sStringBuffer.makeStringAndClear();
- mrExport.AddAttribute(XML_NAMESPACE_SVG, XML_X2, aStr);
+ if( nFeatures & SEF_EXPORT_X )
+ {
+ // svg: x1
+ mrExport.GetMM100UnitConverter().convertMeasure(sStringBuffer,
aStart.X);
+ aStr = sStringBuffer.makeStringAndClear();
+ mrExport.AddAttribute(XML_NAMESPACE_SVG, XML_X1, aStr);
+ }
+ else
+ {
+ aEnd.X -= aStart.X;
+ }
- // svg: y2
- mrExport.GetMM100UnitConverter().convertMeasure(sStringBuffer,
aEnd.Y);
- aStr = sStringBuffer.makeStringAndClear();
- mrExport.AddAttribute(XML_NAMESPACE_SVG, XML_Y2, aStr);
+ if( nFeatures & SEF_EXPORT_Y )
+ {
+ // svg: y1
+ mrExport.GetMM100UnitConverter().convertMeasure(sStringBuffer,
aStart.Y);
+ aStr = sStringBuffer.makeStringAndClear();
+ mrExport.AddAttribute(XML_NAMESPACE_SVG, XML_Y1, aStr);
+ }
+ else
+ {
+ aEnd.Y -= aStart.Y;
+ }
- // write line
- sal_Bool bCreateNewline( (nFeatures & SEF_EXPORT_NO_WS) == 0 );
// #86116#/#92210#
- SvXMLElementExport aOBJ(mrExport, XML_NAMESPACE_DRAW, XML_LINE,
bCreateNewline, sal_True);
+ // svg: x2
+ mrExport.GetMM100UnitConverter().convertMeasure(sStringBuffer, aEnd.X);
+ aStr = sStringBuffer.makeStringAndClear();
+ mrExport.AddAttribute(XML_NAMESPACE_SVG, XML_X2, aStr);
+
+ // svg: y2
+ mrExport.GetMM100UnitConverter().convertMeasure(sStringBuffer, aEnd.Y);
+ aStr = sStringBuffer.makeStringAndClear();
+ mrExport.AddAttribute(XML_NAMESPACE_SVG, XML_Y2, aStr);
+
+ // write line
+ sal_Bool bCreateNewline( (nFeatures & SEF_EXPORT_NO_WS) == 0 ); //
#86116#/#92210#
+ SvXMLElementExport aOBJ(mrExport, XML_NAMESPACE_DRAW, XML_LINE,
bCreateNewline, sal_True);
- ImpExportDescription( xShape ); // #i68101#
- ImpExportEvents( xShape );
- ImpExportGluePoints( xShape );
- ImpExportText( xShape );
- }
+ ImpExportDescription( xShape ); // #i68101#
+ ImpExportEvents( xShape );
+ ImpExportGluePoints( xShape );
+ ImpExportText( xShape );
+ }
}
//////////////////////////////////////////////////////////////////////////////
Modified: openoffice/branches/alg/aw080/main/xmloff/source/draw/xexptran.cxx
URL:
http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/xmloff/source/draw/xexptran.cxx?rev=1509715&r1=1509714&r2=1509715&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/xmloff/source/draw/xexptran.cxx
(original)
+++ openoffice/branches/alg/aw080/main/xmloff/source/draw/xexptran.cxx Fri Aug
2 13:55:37 2013
@@ -138,9 +138,16 @@ void Imp_SkipDoubleAndSpacesAndCommas(co
void Imp_PutNumberChar(OUString& rStr, sal_Int32 nValue)
{
- OUStringBuffer sStringBuffer;
- SvXMLUnitConverter::convertNumber(sStringBuffer, nValue);
- rStr += OUString(sStringBuffer.makeStringAndClear());
+ OUStringBuffer sStringBuffer;
+ SvXMLUnitConverter::convertNumber(sStringBuffer, nValue);
+ rStr += OUString(sStringBuffer.makeStringAndClear());
+}
+
+void Imp_PutDoubleChar(OUString& rStr, double fValue)
+{
+ OUStringBuffer sStringBuffer;
+ SvXMLUnitConverter::convertDouble(sStringBuffer, fValue);
+ rStr += OUString(sStringBuffer.makeStringAndClear());
}
void Imp_PutNumberCharWithSpace(OUString& rStr, sal_Int32 nValue)
@@ -1295,16 +1302,16 @@ const OUString& SdXMLImExViewBox::GetExp
OUString aNewString;
OUString aEmptySpace(sal_Unicode(' '));
- Imp_PutNumberChar(aNewString, mfX);
+ Imp_PutDoubleChar(aNewString, mfX);
aNewString += aEmptySpace;
- Imp_PutNumberChar(aNewString, mfY);
+ Imp_PutDoubleChar(aNewString, mfY);
aNewString += aEmptySpace;
- Imp_PutNumberChar(aNewString, mfW);
+ Imp_PutDoubleChar(aNewString, mfW);
aNewString += aEmptySpace;
- Imp_PutNumberChar(aNewString, mfH);
+ Imp_PutDoubleChar(aNewString, mfH);
// set new string
msString = aNewString;
Modified: openoffice/branches/alg/aw080/main/xmloff/source/draw/ximpshap.cxx
URL:
http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/xmloff/source/draw/ximpshap.cxx?rev=1509715&r1=1509714&r2=1509715&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/xmloff/source/draw/ximpshap.cxx
(original)
+++ openoffice/branches/alg/aw080/main/xmloff/source/draw/ximpshap.cxx Fri Aug
2 13:55:37 2013
@@ -1467,6 +1467,9 @@ void SdXMLPathShapeContext::StartElement
}
}
+ // Add, set Style and properties from base shape
+ AddShape(pService);
+
// #89344# test for mxShape.is() and not for mxShapes.is() to
support
// shape import helper classes WITHOUT XShapes (member
mxShapes). This
// is used by the writer.