[Libreoffice-commits] core.git: Branch 'distro/suse/suse-4.0' - writerfilter/source

Cédric Bosdonnat cedric.bosdonnat at free.fr
Wed Jun 19 01:48:37 PDT 2013


 writerfilter/source/dmapper/GraphicImport.cxx      |    3 +--
 writerfilter/source/dmapper/WrapPolygonHandler.cxx |    8 ++++----
 writerfilter/source/dmapper/WrapPolygonHandler.hxx |    2 +-
 3 files changed, 6 insertions(+), 7 deletions(-)

New commits:
commit ae6981601b0e9175efaf9849b1279290ea3380f6
Author: Cédric Bosdonnat <cedric.bosdonnat at free.fr>
Date:   Wed Jun 19 10:42:47 2013 +0200

    n#820800: docx import of wrap polyon was based on dest size of picture
    
    ... instead of the original size of it.
    
    Change-Id: Ib251206dd092a7c47343caf50bd05a3dfec1af09

diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx
index ed1800a..1e3cb11 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -1530,8 +1530,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 885925d..134c49c 100644
--- a/writerfilter/source/dmapper/WrapPolygonHandler.cxx
+++ b/writerfilter/source/dmapper/WrapPolygonHandler.cxx
@@ -104,7 +104,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;
 
@@ -119,9 +119,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 9312db7..52cdf5e 100644
--- a/writerfilter/source/dmapper/WrapPolygonHandler.hxx
+++ b/writerfilter/source/dmapper/WrapPolygonHandler.hxx
@@ -55,7 +55,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;
 };
 


More information about the Libreoffice-commits mailing list