svtools/source/graphic/grfmgr2.cxx |   14 ++++++++++++--
 sw/source/filter/html/htmlfly.cxx  |    3 ++-
 2 files changed, 14 insertions(+), 3 deletions(-)

New commits:
commit 5e5282f4f6048449e7f8a9721775e5b7f9b56332
Author: Michael Stahl <[email protected]>
Date:   Mon Dec 17 17:44:22 2012 +0100

    fdo#58286: sw HTML export: fix missing end tags on FrmFmts
    
    SwHTMLWriter::OutFrmFmtOptions must return a value that includes the
    parameter rEndTags.
    
    (regression from 3852a6f54880af8ed9161227baa555580c7d4517)
    
    Change-Id: I280a0de57e254f75b69d08d93e23bf7c765058ec
    (cherry picked from commit a923084f872b8ce13f6213827fe5b1c711e6b15f)

diff --git a/sw/source/filter/html/htmlfly.cxx 
b/sw/source/filter/html/htmlfly.cxx
index cdf6292..f9761aa 100644
--- a/sw/source/filter/html/htmlfly.cxx
+++ b/sw/source/filter/html/htmlfly.cxx
@@ -534,7 +534,7 @@ rtl::OString SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt 
&rFrmFmt,
                                      sal_uInt32 nFrmOpts,
                                      const rtl::OString &rEndTags )
 {
-    rtl::OString sRetEndTags;
+    rtl::OString sRetEndTags(rEndTags);
     rtl::OStringBuffer sOut;
     const SfxPoolItem* pItem;
     const SfxItemSet& rItemSet = rFrmFmt.GetAttrSet();
@@ -811,6 +811,7 @@ rtl::OString SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt 
&rFrmFmt,
             sRetEndTags = sOut.makeStringAndClear();
         }
     }
+    assert(sRetEndTags.endsWith(rEndTags)); // fdo#58286
     return sRetEndTags;
 }
 
commit 5cb9fe63458558951f91ed1aaf6e90472dff9a28
Author: Werner Koerner <[email protected]>
Date:   Thu Dec 13 21:38:02 2012 +0100

    fdo#58196 Viewing: Reenable mirroring for scaled-down images
    
    commit I6feb744712956a92d6140d079dc3a85ee8511930 (Stepwise
    rebuild bitmap rendering from scratch to avoid rendering bugs)
    missed horizontal and vertical flipping for images scaled down
    by more than about 60%.
    
    Change-Id: I68241792d2b43edde33f478c998d447debd8fd13
    Reviewed-on: https://gerrit.libreoffice.org/1332
    Reviewed-by: Michael Stahl <[email protected]>
    Tested-by: Michael Stahl <[email protected]>
    (cherry picked from commit 3d969a60852d505cfa02a6b3410d4461718138ba)
    
    Signed-off-by: Michael Stahl <[email protected]>

diff --git a/svtools/source/graphic/grfmgr2.cxx 
b/svtools/source/graphic/grfmgr2.cxx
index b992144..4aeccf9 100644
--- a/svtools/source/graphic/grfmgr2.cxx
+++ b/svtools/source/graphic/grfmgr2.cxx
@@ -436,7 +436,7 @@ sal_Bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, 
const GraphicAttr& rAt
                     }
                 }
             }
-            else
+            else // scaleByAveraging
             {
                 double aSumRed, aSumGreen, aSumBlue, aCount;
                 BitmapColor aColor;
@@ -452,6 +452,11 @@ sal_Bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, 
const GraphicAttr& rAt
                         double aUnrotatedX = ( pCosX[ x ] - nSinY ) / 256.0;
                         double aUnrotatedY = ( pSinX[ x ] + nCosY ) / 256.0;
 
+                        if ( bHMirr )
+                            aUnrotatedX = aUnrotatedWidth - aUnrotatedX - 1;
+                        if ( bVMirr )
+                            aUnrotatedY = aUnrotatedHeight - aUnrotatedY - 1;
+
                         if( ( aUnrotatedX >= 0 ) && ( aUnrotatedX < 
aUnrotatedWidth ) &&
                             ( aUnrotatedY >= 0 ) && ( aUnrotatedY < 
aUnrotatedHeight ) )
                         {
@@ -563,7 +568,7 @@ sal_Bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, 
const GraphicAttr& rAt
                                 }
                             }
                         }
-                        else
+                        else // scaleByAveraging
                         {
                             const BitmapColor   aTrans( 
pWriteAccess->GetBestMatchingColor( Color( COL_WHITE ) ) );
                             BitmapColor         aResultColor( 0 );
@@ -580,6 +585,11 @@ sal_Bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, 
const GraphicAttr& rAt
                                     double aUnrotatedX = ( pCosX[ x ] - nSinY 
) / 256.0;
                                     double aUnrotatedY = ( pSinX[ x ] + nCosY 
) / 256.0;
 
+                                    if ( bHMirr )
+                                        aUnrotatedX = aUnrotatedWidth - 
aUnrotatedX - 1;
+                                    if ( bVMirr )
+                                        aUnrotatedY = aUnrotatedHeight - 
aUnrotatedY - 1;
+
                                     if( ( aUnrotatedX >= 0 ) && ( aUnrotatedX 
< aUnrotatedWidth ) &&
                                         ( aUnrotatedY >= 0 ) && ( aUnrotatedY 
< aUnrotatedHeight ) )
                                     {
_______________________________________________
Libreoffice-commits mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to