Kaydet (Commit) 63570788 authored tarafından Radek Doulik's avatar Radek Doulik

ooxml custom shapes wip

üst 8ed962b9
...@@ -800,35 +800,46 @@ EnhancedCustomShape2d::EnhancedCustomShape2d( SdrObject* pAObj ) : ...@@ -800,35 +800,46 @@ EnhancedCustomShape2d::EnhancedCustomShape2d( SdrObject* pAObj ) :
} }
fXScale = nCoordWidth == 0 ? 0.0 : (double)aLogicRect.GetWidth() / (double)nCoordWidth; fXScale = nCoordWidth == 0 ? 0.0 : (double)aLogicRect.GetWidth() / (double)nCoordWidth;
fYScale = nCoordHeight == 0 ? 0.0 : (double)aLogicRect.GetHeight() / (double)nCoordHeight; fYScale = nCoordHeight == 0 ? 0.0 : (double)aLogicRect.GetHeight() / (double)nCoordHeight;
if ( bOOXMLShape ) { if ( bOOXMLShape )
fXScaleOOXML = fXScale; {
fYScaleOOXML = fYScale; fXScaleOOXML = 1; //fXScale;
fXScale = 1; fYScaleOOXML = 1; //fYScale;
fYScale = 1; fXScale = 1.0/(double)nCoordWidth;
fYScale = 1.0/(double)nCoordHeight;
// if ( nXRef != (sal_uInt32)nXRef != 0x80000000 && nXRef != 0 )
// {
// fXScale *= (double)aLogicRect.GetWidth() / (double) nXRef;
// }
// if ( nYRef != (sal_uInt32)nYRef != 0x80000000 && nYRef != 0 )
// {
// fYScale *= (double)aLogicRect.GetHeight() / (double) nYRef;
// }
} else { } else {
fXScaleOOXML = 1; fXScaleOOXML = 1;
fYScaleOOXML = 1; fYScaleOOXML = 1;
}
if ( (sal_uInt32)nXRef != 0x80000000 && aLogicRect.GetHeight() ) if ( (sal_uInt32)nXRef != 0x80000000 && aLogicRect.GetHeight() )
{ {
fXRatio = (double)aLogicRect.GetWidth() / (double)aLogicRect.GetHeight(); fXRatio = (double)aLogicRect.GetWidth() / (double)aLogicRect.GetHeight();
if ( fXRatio > 1 ) if ( fXRatio > 1 )
fXScale /= fXRatio; fXScale /= fXRatio;
else
fXRatio = 1.0;
}
else else
fXRatio = 1.0; fXRatio = 1.0;
} if ( (sal_uInt32)nYRef != 0x80000000 && aLogicRect.GetWidth() )
else {
fXRatio = 1.0; fYRatio = (double)aLogicRect.GetHeight() / (double)aLogicRect.GetWidth();
if ( (sal_uInt32)nYRef != 0x80000000 && aLogicRect.GetWidth() ) if ( fYRatio > 1 )
{ fYScale /= fYRatio;
fYRatio = (double)aLogicRect.GetHeight() / (double)aLogicRect.GetWidth(); else
if ( fYRatio > 1 ) fYRatio = 1.0;
fYScale /= fYRatio; }
else else
fYRatio = 1.0; fYRatio = 1.0;
} }
else
fYRatio = 1.0;
sal_Int32 i, nLength = seqEquations.getLength(); sal_Int32 i, nLength = seqEquations.getLength();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment