[Libreoffice-commits] .: Branch 'libreoffice-3-5' - 2 commits - svtools/source sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Oct 26 10:44:42 PDT 2012


 svtools/source/filter/wmf/enhwmf.cxx |    8 ++++----
 sw/source/filter/ww1/fltshell.cxx    |    6 ++++--
 2 files changed, 8 insertions(+), 6 deletions(-)

New commits:
commit ef7f951cc3326f64a9e3e856bd90824c96496ff6
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Oct 26 14:51:16 2012 +0100

    Resolves: fdo#47291 polypoly[line|gon] points are signed
    
    regression from f6a34255af1339cd7132b7527dc0c10c10d38249
    
    Change-Id: Iabfaf92629cd4d53ab7af5f3e3013eb81bb8104d
    (cherry picked from commit 2536fae7b8565b5dd9f09bb3dc015576fafe4031)
    
    Signed-off-by: Michael Stahl <mstahl at redhat.com>

diff --git a/svtools/source/filter/wmf/enhwmf.cxx b/svtools/source/filter/wmf/enhwmf.cxx
index 97f1d5c..4a665ca 100644
--- a/svtools/source/filter/wmf/enhwmf.cxx
+++ b/svtools/source/filter/wmf/enhwmf.cxx
@@ -522,11 +522,11 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
             break;
 
             case EMR_POLYPOLYLINE :
-                ReadAndDrawPolyLine<sal_uInt32>();
+                ReadAndDrawPolyLine<sal_Int32>();
             break;
 
             case EMR_POLYPOLYGON :
-                ReadAndDrawPolyPolygon<sal_uInt32>();
+                ReadAndDrawPolyPolygon<sal_Int32>();
             break;
 
             case EMR_SETWINDOWEXTEX :
@@ -1210,11 +1210,11 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
             break;
 
             case EMR_POLYPOLYLINE16 :
-                ReadAndDrawPolyLine<sal_uInt16>();
+                ReadAndDrawPolyLine<sal_Int16>();
                 break;
 
             case EMR_POLYPOLYGON16 :
-                ReadAndDrawPolyPolygon<sal_uInt16>();
+                ReadAndDrawPolyPolygon<sal_Int16>();
             break;
 
             case EMR_FILLRGN :
commit f3820602b6f8d22ad4177cbd4e51b4153087986d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Oct 26 11:47:13 2012 +0100

    Resolves: fdo#50285 merging props unsafe with intermediate charstyle prop
    
    Its a nice idea to merge properties of the same type and value if one starts
    and the same place the last one ended. But character styles are properties as
    well, so if we have character-style+superscript on range a, and
    character-style+superscript on range b and merge these so that we end up as...
    
    character-style on range a, superscript on range a+b, and character-style on
    range b then that clearly gives the wrong result if applied in that order.
    
    So its only safe to merge if there are no intermediate properties that can
    affect the merge candidates.
    
    A regression from b3cee382f449aa69213dc21f7b1ba6a5356d2865
    
    Change-Id: I541563d11265426736b840de068922eef8d45573
    (cherry picked from commit 08ffb7bc5ec4472126762f4cb9677349b61122f6)
    
    Signed-off-by: Michael Stahl <mstahl at redhat.com>

diff --git a/sw/source/filter/ww1/fltshell.cxx b/sw/source/filter/ww1/fltshell.cxx
index 42beaa1..21ddff0 100644
--- a/sw/source/filter/ww1/fltshell.cxx
+++ b/sw/source/filter/ww1/fltshell.cxx
@@ -327,6 +327,8 @@ SwFltStackEntry* SwFltControlStack::SetAttr(const SwPosition& rPos,
     myEIter aI = maEntries.begin();
     while (aI != maEntries.end())
     {
+        bool bLastEntry = aI == maEntries.end() - 1;
+
         SwFltStackEntry& rEntry = *aI;
         if (rEntry.bOpen)
         {
@@ -352,7 +354,7 @@ SwFltStackEntry* SwFltControlStack::SetAttr(const SwPosition& rPos,
             {
                 rEntry.bConsumedByField = consumedByField;
                 rEntry.SetEndPos(rPos);
-                if (nAttrId == rEntry.pAttr->Which())
+                if (bLastEntry && nAttrId == rEntry.pAttr->Which())
                 {
                     //potential candidate for merging with an identical
                     //property beginning at rPos
@@ -379,7 +381,7 @@ SwFltStackEntry* SwFltControlStack::SetAttr(const SwPosition& rPos,
             //we advance to the next node, or finish processing the document
             if (rEntry.m_aPtPos.m_nNode.GetIndex() == aFltPos.m_nNode.GetIndex())
             {
-                if (nAttrId == rEntry.pAttr->Which() &&
+                if (bLastEntry && nAttrId == rEntry.pAttr->Which() &&
                     rEntry.m_aPtPos.m_nCntnt == aFltPos.m_nCntnt)
                 {
                     //potential candidate for merging with an identical


More information about the Libreoffice-commits mailing list