diff options
Diffstat (limited to 'sw/source/filter/ww8')
-rw-r--r-- | sw/source/filter/ww8/docxsdrexport.cxx | 17 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtw8esh.cxx | 12 |
2 files changed, 15 insertions, 14 deletions
diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx index c3c5b742e1ed..c3524d3c74d3 100644 --- a/sw/source/filter/ww8/docxsdrexport.cxx +++ b/sw/source/filter/ww8/docxsdrexport.cxx @@ -158,8 +158,8 @@ void lcl_calculateMSOBaseRectangle(const SdrObject& rObj, double& rfMSOLeft, dou // directly usable as 'base rectangle'. double fCenterX = (rObj.GetSnapRect().Left() + rObj.GetSnapRect().Right()) / 2.0; double fCenterY = (rObj.GetSnapRect().Top() + rObj.GetSnapRect().Bottom()) / 2.0; - double fHalfWidth = rObj.GetLogicRect().getWidth() / 2.0; - double fHalfHeight = rObj.GetLogicRect().getHeight() / 2.0; + double fHalfWidth = rObj.GetLogicRect().getOpenWidth() / 2.0; + double fHalfHeight = rObj.GetLogicRect().getOpenHeight() / 2.0; // MSO swaps width and height depending on rotation angle; exception: Word 2007 (vers 12) never // swaps width and height for images. @@ -334,9 +334,9 @@ tools::Polygon lcl_CreateContourPolygon(SdrObject* pSdrObj) basegfx::B2DHomMatrix aTranslateToOrigin( basegfx::utils::createTranslateB2DHomMatrix(-aCenter.X(), -aCenter.Y())); aPolyPolygon.transform(aTranslateToOrigin); - const double fWidth(pSdrObj->GetLogicRect().getWidth()); + const double fWidth(pSdrObj->GetLogicRect().getOpenWidth()); double fScaleX = fWidth == 0.0 ? 1.0 : 21600.0 / fWidth; - const double fHeight(pSdrObj->GetLogicRect().getHeight()); + const double fHeight(pSdrObj->GetLogicRect().getOpenHeight()); double fScaleY = fHeight == 0.0 ? 1.0 : 21600.0 / fHeight; basegfx::B2DHomMatrix aScale(basegfx::utils::createScaleB2DHomMatrix(fScaleX, fScaleY)); aPolyPolygon.transform(aScale); @@ -386,9 +386,9 @@ tools::Polygon lcl_CreateContourPolygon(SdrObject* pSdrObj) basegfx::utils::createTranslateB2DHomMatrix(-aCenter.X(), -aCenter.Y())); aPolyPolygon.transform(aTranslateToOrigin); - const double fWidth(pSdrObj->GetLogicRect().getWidth()); + const double fWidth(pSdrObj->GetLogicRect().getOpenWidth()); double fScaleX = fWidth == 0.0 ? 1.0 : 21600.0 / fWidth; - const double fHeight(pSdrObj->GetLogicRect().getHeight()); + const double fHeight(pSdrObj->GetLogicRect().getOpenHeight()); double fScaleY = fHeight == 0.0 ? 1.0 : 21600.0 / fHeight; basegfx::B2DHomMatrix aScale( basegfx::utils::createScaleB2DHomMatrix(fScaleX, fScaleY)); @@ -1384,7 +1384,8 @@ void DocxSdrExport::writeDMLDrawing(const SdrObject* pSdrObject, const SwFrameFo m_pImpl->getExport().DocxAttrOutput().GetSdtEndBefore(pSdrObject); sax_fastparser::FSHelperPtr pFS = m_pImpl->getSerializer(); - Size aSize(pSdrObject->GetLogicRect().getWidth(), pSdrObject->GetLogicRect().getHeight()); + Size aSize(pSdrObject->GetLogicRect().getOpenWidth(), + pSdrObject->GetLogicRect().getOpenHeight()); startDMLAnchorInline(pFrameFormat, aSize); rtl::Reference<sax_fastparser::FastAttributeList> pDocPrAttrList @@ -1665,7 +1666,7 @@ void DocxSdrExport::writeDiagram(const SdrObject* sdrObject, const SwFrameFormat uno::UNO_QUERY); // write necessary tags to document.xml - Size aSize(sdrObject->GetSnapRect().getWidth(), sdrObject->GetSnapRect().getHeight()); + Size aSize(sdrObject->GetSnapRect().getOpenWidth(), sdrObject->GetSnapRect().getOpenHeight()); startDMLAnchorInline(&rFrameFormat, aSize); m_pImpl->getDrawingML()->SetFS(m_pImpl->getSerializer()); diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index d2de899f2d3d..bcfc410ffb6e 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -676,8 +676,8 @@ void PlcDrawObj::WritePlc( WW8Export& rWrt ) const const bool bAllowSwap = pObj->GetObjIdentifier() != SdrObjKind::Line && pObj->GetObjIdentifier() != SdrObjKind::Group; if ( bAllowSwap && (( nAngle > 4500_deg100 && nAngle <= 13500_deg100 ) || ( nAngle > 22500_deg100 && nAngle <= 31500_deg100 )) ) { - const tools::Long nWidth = aRect.getWidth(); - const tools::Long nHeight = aRect.getHeight(); + const tools::Long nWidth = aRect.getOpenWidth(); + const tools::Long nHeight = aRect.getOpenHeight(); aRect.setWidth( nHeight ); aRect.setHeight( nWidth ); bHasHeightWidthSwapped = true; @@ -749,10 +749,10 @@ void PlcDrawObj::WritePlc( WW8Export& rWrt ) const { SwTwips nXOff; SwTwips nYOff; - SwTwips nSnapWidth = pObj->GetSnapRect().getWidth(); - SwTwips nSnapHeight = pObj->GetSnapRect().getHeight(); - SwTwips nLogicWidth = pObj->GetLogicRect().getWidth(); - SwTwips nLogicHeight = pObj->GetLogicRect().getHeight(); + SwTwips nSnapWidth = pObj->GetSnapRect().getOpenWidth(); + SwTwips nSnapHeight = pObj->GetSnapRect().getOpenHeight(); + SwTwips nLogicWidth = pObj->GetLogicRect().getOpenWidth(); + SwTwips nLogicHeight = pObj->GetLogicRect().getOpenHeight(); // +1 for to compensate integer arithmetic rounding errors if(bHasHeightWidthSwapped) { |