[Libreoffice-commits] core.git: sw/source

Adam Co rattles2013 at gmail.com
Tue Jan 14 01:46:07 PST 2014


 sw/source/core/unocore/unocrsrhelper.cxx |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit a31abd3d203ac8de4e045492fed53ca706bb24d1
Author: Adam Co <rattles2013 at gmail.com>
Date:   Mon Jan 13 14:03:00 2014 +0200

    Some code cleaning & touch-ups
    
    Change-Id: I5e09ee5b9765b01e15dd91dd89ff397fb57b98b6
    Reviewed-on: https://gerrit.libreoffice.org/7402
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx
index 4dd150e..df3caa0 100644
--- a/sw/source/core/unocore/unocrsrhelper.cxx
+++ b/sw/source/core/unocore/unocrsrhelper.cxx
@@ -1177,8 +1177,10 @@ void makeRedline( SwPaM& rPaM,
 {
     IDocumentRedlineAccess* pRedlineAccess = rPaM.GetDoc();
 
-    RedlineType_t eType = nsRedlineType_t::REDLINE_INSERT;
-    if ( rRedlineType == "Delete" )
+    RedlineType_t eType;
+    if      ( rRedlineType == "Insert" )
+        eType = nsRedlineType_t::REDLINE_INSERT;
+    else if ( rRedlineType == "Delete" )
         eType = nsRedlineType_t::REDLINE_DELETE;
     else if ( rRedlineType == "Format" )
         eType = nsRedlineType_t::REDLINE_FORMAT;
@@ -1186,7 +1188,7 @@ void makeRedline( SwPaM& rPaM,
         eType = nsRedlineType_t::REDLINE_TABLE;
     else if ( rRedlineType == "ParagraphFormat" )
         eType = nsRedlineType_t::REDLINE_PARAGRAPH_FORMAT;
-    else if( !rRedlineType.startsWith( "Insert" ))
+    else
         throw lang::IllegalArgumentException();
 
     //todo: what about REDLINE_FMTCOLL?


More information about the Libreoffice-commits mailing list