diff options
author | Radek Doulik <rodo@novell.com> | 2011-11-03 11:37:46 +0100 |
---|---|---|
committer | Radek Doulik <rodo@novell.com> | 2011-11-07 12:08:27 +0100 |
commit | 63570788fbeeb7c611528a60abc7d0af04342fa2 (patch) | |
tree | 379e50928efd6fb3e4ac0bb5d56c124693c5a4e4 /svx | |
parent | 8ed962b9a9c746ef852f7d0c3dbed0faf1c33fd6 (diff) |
ooxml custom shapes wip
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/customshapes/EnhancedCustomShape2d.cxx | 53 |
1 files changed, 32 insertions, 21 deletions
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx index 65b1c88a747a..e91ad20552d3 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx @@ -800,35 +800,46 @@ EnhancedCustomShape2d::EnhancedCustomShape2d( SdrObject* pAObj ) : } fXScale = nCoordWidth == 0 ? 0.0 : (double)aLogicRect.GetWidth() / (double)nCoordWidth; fYScale = nCoordHeight == 0 ? 0.0 : (double)aLogicRect.GetHeight() / (double)nCoordHeight; - if ( bOOXMLShape ) { - fXScaleOOXML = fXScale; - fYScaleOOXML = fYScale; - fXScale = 1; - fYScale = 1; + if ( bOOXMLShape ) + { + fXScaleOOXML = 1; //fXScale; + fYScaleOOXML = 1; //fYScale; + 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 { fXScaleOOXML = 1; fYScaleOOXML = 1; - } - if ( (sal_uInt32)nXRef != 0x80000000 && aLogicRect.GetHeight() ) - { - fXRatio = (double)aLogicRect.GetWidth() / (double)aLogicRect.GetHeight(); - if ( fXRatio > 1 ) - fXScale /= fXRatio; + + if ( (sal_uInt32)nXRef != 0x80000000 && aLogicRect.GetHeight() ) + { + fXRatio = (double)aLogicRect.GetWidth() / (double)aLogicRect.GetHeight(); + if ( fXRatio > 1 ) + fXScale /= fXRatio; + else + fXRatio = 1.0; + } else fXRatio = 1.0; - } - else - fXRatio = 1.0; - if ( (sal_uInt32)nYRef != 0x80000000 && aLogicRect.GetWidth() ) - { - fYRatio = (double)aLogicRect.GetHeight() / (double)aLogicRect.GetWidth(); - if ( fYRatio > 1 ) - fYScale /= fYRatio; + if ( (sal_uInt32)nYRef != 0x80000000 && aLogicRect.GetWidth() ) + { + fYRatio = (double)aLogicRect.GetHeight() / (double)aLogicRect.GetWidth(); + if ( fYRatio > 1 ) + fYScale /= fYRatio; + else + fYRatio = 1.0; + } else fYRatio = 1.0; } - else - fYRatio = 1.0; sal_Int32 i, nLength = seqEquations.getLength(); |