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

Miklos Vajna vmiklos at collabora.co.uk
Fri Apr 24 02:34:51 PDT 2015


 sw/source/core/table/swtable.cxx  |    8 ++++----
 sw/source/core/undo/untbl.cxx     |    2 +-
 sw/source/core/unocore/unotbl.cxx |    2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 006b70044ae4884563b2b00534c0b1332ef339e6
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Fri Apr 24 11:18:38 2015 +0200

    sw: -Werror=sign-compare
    
    Change-Id: Icbcee0740250c95db1f4931b6d49fb51dda1546f

diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index 9c2a5ae..7b49f5d 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -2086,7 +2086,7 @@ void ChgNumToText( SwTableBox& rBox, sal_uLong nFmt )
         const SfxPoolItem* pItem;
 
         Color* pCol = 0;
-        if( css::util::NumberFormat::TEXT != nFmt )
+        if( css::util::NumberFormat::TEXT != static_cast<sal_Int16>(nFmt) )
         {
             // special text format:
             OUString sTmp;
@@ -2236,14 +2236,14 @@ void SwTableBoxFmt::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
                     // is it newer or has the current been removed?
                     if( pNewVal )
                     {
-                        if( css::util::NumberFormat::TEXT != nNewFmt )
+                        if( css::util::NumberFormat::TEXT != static_cast<sal_Int16>(nNewFmt) )
                         {
                             if( SfxItemState::SET == GetItemState( RES_BOXATR_VALUE, false ))
                                 nOldFmt = css::util::NumberFormat::TEXT;
                             else
                                 nNewFmt = css::util::NumberFormat::TEXT;
                         }
-                        else if( css::util::NumberFormat::TEXT == nNewFmt )
+                        else if( css::util::NumberFormat::TEXT == static_cast<sal_Int16>(nNewFmt) )
                             nOldFmt = 0;
                     }
 
@@ -2259,7 +2259,7 @@ void SwTableBoxFmt::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
                     //          - align top for vertical alignment, if BOTTOM is set
                     SvNumberFormatter* pNumFmtr = GetDoc()->GetNumberFormatter();
                     bool bNewIsTxtFmt = pNumFmtr->IsTextFormat( nNewFmt ) ||
-                                        css::util::NumberFormat::TEXT == nNewFmt;
+                                        css::util::NumberFormat::TEXT == static_cast<sal_Int16>(nNewFmt);
 
                     if( (!bNewIsTxtFmt && nOldFmt != nNewFmt) || pNewFml )
                     {
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index d48e8d2..48d39db 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -2350,7 +2350,7 @@ void SwUndoTblNumFmt::RedoImpl(::sw::UndoRedoContext & rContext)
         RedlineModeInternGuard aGuard( rDoc, nsRedlineMode_t::REDLINE_NONE, nsRedlineMode_t::REDLINE_IGNORE );
         pBoxFmt->SetFmtAttr( aBoxSet );
     }
-    else if( css::util::NumberFormat::TEXT != nFmtIdx )
+    else if( css::util::NumberFormat::TEXT != static_cast<sal_Int16>(nFmtIdx) )
     {
         SfxItemSet aBoxSet( rDoc.GetAttrPool(),
                             RES_BOXATR_FORMAT, RES_BOXATR_VALUE );
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index af466b1..859fab9 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -735,7 +735,7 @@ void sw_setValue( SwXCell &rCell, double nVal )
     // - the current number format is not even a valid number formatter number format, but rather Writer's own 'special' text number format
     if(SfxItemState::SET != pBoxFmt->GetAttrSet().GetItemState(RES_BOXATR_FORMAT, true, &pItem)
         ||  pDoc->GetNumberFormatter()->IsTextFormat(static_cast<const SwTblBoxNumFormat*>(pItem)->GetValue())
-        ||  static_cast<const SwTblBoxNumFormat*>(pItem)->GetValue() == css::util::NumberFormat::TEXT)
+        ||  static_cast<sal_Int16>(static_cast<const SwTblBoxNumFormat*>(pItem)->GetValue()) == css::util::NumberFormat::TEXT)
     {
         aSet.Put(SwTblBoxNumFormat(0));
     }


More information about the Libreoffice-commits mailing list