summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedric.bosdonnat@free.fr>2013-06-19 10:42:47 +0200
committerCédric Bosdonnat <cedric.bosdonnat@free.fr>2013-06-19 10:55:40 +0200
commitf2100b09abdf7893104f23f33cf77cc0848b55cb (patch)
tree4120faf1a9c9c5e669f4745bcf6e86e2951a796d
parent5c73a72418251e40c44b7e1634011aea6f8db376 (diff)
n#820800: docx import of wrap polyon was based on dest size of picture
... instead of the original size of it. Change-Id: Ib251206dd092a7c47343caf50bd05a3dfec1af09 (cherry picked from commit ae6981601b0e9175efaf9849b1279290ea3380f6)
-rw-r--r--writerfilter/source/dmapper/GraphicImport.cxx3
-rw-r--r--writerfilter/source/dmapper/WrapPolygonHandler.cxx8
-rw-r--r--writerfilter/source/dmapper/WrapPolygonHandler.hxx2
3 files changed, 6 insertions, 7 deletions
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx
index e64becaf97f1..20dd71af4ab1 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -1495,8 +1495,7 @@ uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const b
if( aGraphicSize.Width && aGraphicSize.Height &&
m_pImpl->mpWrapPolygon.get() != NULL)
{
- awt::Size aDstSize(m_pImpl->getXSize(), m_pImpl->getYSize());
- WrapPolygon::Pointer_t pCorrected = m_pImpl->mpWrapPolygon->correctWordWrapPolygon(aGraphicSize, aDstSize);
+ WrapPolygon::Pointer_t pCorrected = m_pImpl->mpWrapPolygon->correctWordWrapPolygon(aGraphicSize);
aContourPolyPolygon <<= pCorrected->getPointSequenceSequence();
}
diff --git a/writerfilter/source/dmapper/WrapPolygonHandler.cxx b/writerfilter/source/dmapper/WrapPolygonHandler.cxx
index 8d6682a4fee0..73f24b44b54f 100644
--- a/writerfilter/source/dmapper/WrapPolygonHandler.cxx
+++ b/writerfilter/source/dmapper/WrapPolygonHandler.cxx
@@ -113,7 +113,7 @@ WrapPolygon::Pointer_t WrapPolygon::scale(const Fraction & rFractionX, const Fra
return pResult;
}
-WrapPolygon::Pointer_t WrapPolygon::correctWordWrapPolygon(const awt::Size & rSrcSize, const awt::Size & rDstSize)
+WrapPolygon::Pointer_t WrapPolygon::correctWordWrapPolygon(const awt::Size & rSrcSize)
{
WrapPolygon::Pointer_t pResult;
@@ -128,9 +128,9 @@ WrapPolygon::Pointer_t WrapPolygon::correctWordWrapPolygon(const awt::Size & rSr
Fraction aScaleY(nWrap100Percent, Fraction(nWrap100Percent) - aMove);
pResult = pResult->scale(aScaleX, aScaleY);
- Fraction aScaleDestX(rDstSize.Width, nWrap100Percent);
- Fraction aScaleDestY(rDstSize.Height, nWrap100Percent);
- pResult = pResult->scale(aScaleDestX, aScaleDestY);
+ Fraction aScaleSrcX(rSrcSize.Width, nWrap100Percent);
+ Fraction aScaleSrcY(rSrcSize.Height, nWrap100Percent);
+ pResult = pResult->scale(aScaleSrcX, aScaleSrcY);
return pResult;
}
diff --git a/writerfilter/source/dmapper/WrapPolygonHandler.hxx b/writerfilter/source/dmapper/WrapPolygonHandler.hxx
index 8e51b7344ed9..5783f0de61b7 100644
--- a/writerfilter/source/dmapper/WrapPolygonHandler.hxx
+++ b/writerfilter/source/dmapper/WrapPolygonHandler.hxx
@@ -64,7 +64,7 @@ public:
WrapPolygon::Pointer_t move(const awt::Point & rMove);
WrapPolygon::Pointer_t scale(const Fraction & rFractionX, const Fraction & rFractionY);
- WrapPolygon::Pointer_t correctWordWrapPolygon(const awt::Size & rSrcSize, const awt::Size & rDstSize);
+ WrapPolygon::Pointer_t correctWordWrapPolygon(const awt::Size & rSrcSize);
drawing::PointSequenceSequence getPointSequenceSequence() const;
};