[ooo-build-commit] patches/dev300

Pei Feng Lin pflin at kemper.freedesktop.org
Mon Nov 9 02:24:54 PST 2009


 patches/dev300/apply                      |    2 +
 patches/dev300/sw-changes-format-fix.diff |   32 ++++++++++++++++++++++++++++++
 2 files changed, 34 insertions(+)

New commits:
commit 666199d314b6dcec3607a4683becfa9d0202e532
Author: Fong Lin <pflin at novell.com>
Date:   Mon Nov 9 18:23:14 2009 +0800

    Show insertion change first. Fix for n#545815
    
    * patches/dev300/apply:
    * patches/dev300/sw-changes-format-fix.diff:

diff --git a/patches/dev300/apply b/patches/dev300/apply
index b002a2e..8fedd8b 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -3378,6 +3378,8 @@ toolkit-proper-erase-fix.diff, i#106575, thorsten
 sw-ww8-textframe-background-fix.diff, Fong, n#547308
 # fix the bullet indent issue
 sw-ww8-import-list-fix.diff, Fong, n#547308
+# show insertion change first
+sw-changes-format-fix.diff, Fong, n#545815
 
 [ NLPSolverBits ]
 # build NLPSolver extension when enabled (fate#304653)
diff --git a/patches/dev300/sw-changes-format-fix.diff b/patches/dev300/sw-changes-format-fix.diff
new file mode 100644
index 0000000..f9c8c7d
--- /dev/null
+++ b/patches/dev300/sw-changes-format-fix.diff
@@ -0,0 +1,32 @@
+diff --git sw/source/core/doc/docredln.cxx sw/source/core/doc/docredln.cxx
+index ec6e88f..9bc1fa2 100644
+--- sw/source/core/doc/docredln.cxx
++++ sw/source/core/doc/docredln.cxx
+@@ -1570,6 +1570,27 @@ const SwRedline* SwDoc::GetRedline( const SwPosition& rPos,
+                     --nM;
+                     pRedl = (*pRedlineTbl)[ nM ];
+                 }
++                // if there are format and insert changes in the same position
++                // show insert change first.
++                // since the redlines are sorted by position, only check the redline 
++                // before and after the current redline
++                if( nsRedlineType_t::REDLINE_FORMAT == pRedl->GetType() )
++                {
++                    if( nM && rPos >= *(*pRedlineTbl)[ nM - 1 ]->Start() &&
++                        rPos <= *(*pRedlineTbl)[ nM - 1 ]->End() &&
++                        ( nsRedlineType_t::REDLINE_INSERT == (*pRedlineTbl)[ nM - 1 ]->GetType() ) )
++                    {
++                        --nM;
++                        pRedl = (*pRedlineTbl)[ nM ];
++                    }
++                    else if( ( nM + 1 ) <= nO && rPos >= *(*pRedlineTbl)[ nM + 1 ]->Start() &&
++                        rPos <= *(*pRedlineTbl)[ nM + 1 ]->End() &&
++                        ( nsRedlineType_t::REDLINE_INSERT == (*pRedlineTbl)[ nM + 1 ]->GetType() ) )
++                    {
++                        ++nM;
++                        pRedl = (*pRedlineTbl)[ nM ];
++                    }
++                }
+ 
+                 if( pFndPos )
+                     *pFndPos = nM;


More information about the ooo-build-commit mailing list