[Libreoffice-commits] core.git: 22 commits - cui/source dbaccess/source desktop/source editeng/source filter/source forms/source framework/source include/editeng include/oox include/xmloff linguistic/source oox/source padmin/source sc/inc sc/source sfx2/source svx/source xmloff/source

Stephan Bergmann sbergman at redhat.com
Tue Jan 14 12:28:41 PST 2014


 cui/source/customize/cfg.cxx                         |   39 +-----
 cui/source/dialogs/SpellAttrib.hxx                   |    2 
 cui/source/dialogs/thesdlg.cxx                       |    2 
 cui/source/inc/swpossizetabpage.hxx                  |    1 
 cui/source/options/certpath.cxx                      |    2 
 cui/source/options/optaboutconfig.cxx                |    3 
 cui/source/tabpages/backgrnd.cxx                     |    4 
 cui/source/tabpages/swpossizetabpage.cxx             |    8 -
 cui/source/tabpages/tpcolor.cxx                      |    2 
 dbaccess/source/ui/app/AppControllerDnD.cxx          |    2 
 dbaccess/source/ui/tabledesign/TableController.cxx   |    2 
 desktop/source/deployment/gui/license_dialog.cxx     |    4 
 editeng/source/editeng/eertfpar.cxx                  |    2 
 editeng/source/editeng/eertfpar.hxx                  |    2 
 editeng/source/editeng/impedit4.cxx                  |    4 
 editeng/source/items/flditem.cxx                     |   28 ++--
 editeng/source/items/svdfield.cxx                    |    2 
 editeng/source/items/textitem.cxx                    |    2 
 editeng/source/misc/hangulhanja.cxx                  |    2 
 editeng/source/misc/svxacorr.cxx                     |    6 -
 editeng/source/misc/txtrange.cxx                     |    2 
 editeng/source/rtf/rtfitem.cxx                       |    7 -
 editeng/source/rtf/svxrtf.cxx                        |    6 -
 filter/source/flash/swfwriter.cxx                    |    4 
 filter/source/flash/swfwriter1.cxx                   |    6 -
 filter/source/graphicfilter/icgm/bitmap.cxx          |    2 
 filter/source/msfilter/svdfppt.cxx                   |    2 
 filter/source/xsltdialog/xmlfiltercommon.hxx         |    2 
 filter/source/xsltdialog/xmlfiltersettingsdialog.cxx |   38 ++----
 forms/source/runtime/formoperations.cxx              |    2 
 forms/source/xforms/computedexpression.cxx           |    4 
 framework/source/helper/tagwindowasmodified.cxx      |    2 
 framework/source/uielement/newmenucontroller.cxx     |    2 
 include/editeng/flditem.hxx                          |   28 ++--
 include/editeng/measfld.hxx                          |    2 
 include/editeng/numitem.hxx                          |    2 
 include/editeng/outliner.hxx                         |    6 -
 include/editeng/svxrtf.hxx                           |   28 ++--
 include/oox/core/contexthandler2.hxx                 |    2 
 include/xmloff/nmspmap.hxx                           |    2 
 include/xmloff/xmlcnimp.hxx                          |    2 
 linguistic/source/defs.hxx                           |    8 -
 oox/source/drawingml/chart/titleconverter.cxx        |    6 -
 oox/source/ole/axbinarywriter.cxx                    |    4 
 oox/source/ole/axcontrol.cxx                         |    2 
 oox/source/ppt/slidetransitioncontext.cxx            |    2 
 padmin/source/prtsetup.cxx                           |    2 
 sc/inc/address.hxx                                   |   14 +-
 sc/inc/bigrange.hxx                                  |    8 -
 sc/inc/conditio.hxx                                  |    4 
 sc/inc/detdata.hxx                                   |    2 
 sc/inc/viewopti.hxx                                  |    4 
 sc/inc/zforauto.hxx                                  |    2 
 sc/source/core/data/conditio.cxx                     |    8 -
 sc/source/core/data/dpoutputgeometry.cxx             |    8 -
 sc/source/core/data/dpsave.cxx                       |   14 +-
 sc/source/core/data/formulacell.cxx                  |    6 -
 sc/source/core/inc/interpre.hxx                      |    4 
 sc/source/core/tool/address.cxx                      |    5 
 sc/source/core/tool/compare.cxx                      |    6 -
 sc/source/core/tool/interpr1.cxx                     |  114 +++++++++----------
 sc/source/core/tool/interpr3.cxx                     |    2 
 sc/source/core/tool/interpr4.cxx                     |    8 -
 sc/source/core/tool/interpr7.cxx                     |    2 
 sc/source/core/tool/scmatrix.cxx                     |    6 -
 sc/source/core/tool/token.cxx                        |    6 -
 sc/source/core/tool/viewopti.cxx                     |    4 
 sc/source/filter/xml/xmlexprt.cxx                    |    2 
 sc/source/ui/app/inputhdl.cxx                        |    2 
 sc/source/ui/inc/inputhdl.hxx                        |    4 
 sfx2/source/dialog/inputdlg.cxx                      |    2 
 svx/source/tbxctrls/fontworkgallery.cxx              |    4 
 xmloff/source/core/nmspmap.cxx                       |    4 
 xmloff/source/core/xmlcnimp.cxx                      |    2 
 xmloff/source/draw/animexp.cxx                       |    2 
 xmloff/source/draw/shapeimport.cxx                   |    2 
 xmloff/source/style/XMLFontAutoStylePool.cxx         |    4 
 77 files changed, 264 insertions(+), 285 deletions(-)

New commits:
commit f95d743edbc91a65861f293b9d10e0d38000db0b
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Jan 14 21:26:41 2014 +0100

    The "true" is likely meant for sal_Bool bAppendStr, not sal_Unicode cSeparator
    
    Change-Id: Ia9fe63ce3d0cefbca708f0da6d88fd33c8b0abaf

diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 3c1adc1..56399a5 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -4727,7 +4727,7 @@ void ScXMLExport::WriteConsolidation()
 
             sStrData = "";
             for( sal_Int32 nIndex = 0; nIndex < pCons->nDataAreaCount; ++nIndex )
-                ScRangeStringConverter::GetStringFromArea( sStrData, *pCons->ppDataAreas[ nIndex ], pDoc, FormulaGrammar::CONV_OOO, true );
+                ScRangeStringConverter::GetStringFromArea( sStrData, *pCons->ppDataAreas[ nIndex ], pDoc, FormulaGrammar::CONV_OOO, ' ', true );
             AddAttribute( XML_NAMESPACE_TABLE, XML_SOURCE_CELL_RANGE_ADDRESSES, sStrData );
 
             ScRangeStringConverter::GetStringFromAddress( sStrData, ScAddress( pCons->nCol, pCons->nRow, pCons->nTab ), pDoc, FormulaGrammar::CONV_OOO );
commit 353fd33edac98961816daec78a7a9f5a3a760d5b
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Jan 14 21:24:45 2014 +0100

    Fix check for odd nStrLen, as suggested by the comments
    
    Change-Id: I41fc496c844c7f4a580bb9496bedc14bac70d37d

diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index ba5b24e..b77166d 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -696,7 +696,7 @@ bool ScInterpreter::CreateStringArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
                         // one day, and room for pad byte check.
                         if ( aTmp.getLength() > ((sal_uInt16)(~0)) - 2 )
                             return false;
-                        // Append a 0-pad-byte if string length is not even
+                        // Append a 0-pad-byte if string length is odd
                         //! MUST be sal_uInt16 and not xub_StrLen
                         sal_uInt16 nStrLen = (sal_uInt16) aTmp.getLength();
                         sal_uInt16 nLen = ( nStrLen + 2 ) & ~1;
@@ -711,7 +711,7 @@ bool ScInterpreter::CreateStringArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
                         memcpy( p, aTmp.getStr(), nStrLen + 1);
                         nPos += 10 + nStrLen + 1;
                         sal_uInt8* q = ( pCellArr + nPos );
-                        if( !nStrLen & 1 )
+                        if( (nStrLen & 1) == 0 )
                             *q++ = 0, nPos++;
                         p = (sal_uInt16*) ( pCellArr + nPos );
                         nCount++;
@@ -819,7 +819,7 @@ bool ScInterpreter::CreateCellArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
                             // one day, and room for pad byte check.
                             if ( aTmp.getLength() > ((sal_uInt16)(~0)) - 2 )
                                 return false;
-                            // Append a 0-pad-byte if string length is not even
+                            // Append a 0-pad-byte if string length is odd
                             //! MUST be sal_uInt16 and not xub_StrLen
                             sal_uInt16 nStrLen = (sal_uInt16) aTmp.getLength();
                             sal_uInt16 nLen = ( nStrLen + 2 ) & ~1;
@@ -829,7 +829,7 @@ bool ScInterpreter::CreateCellArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
                             memcpy( p, aTmp.getStr(), nStrLen + 1);
                             nPos += 2 + nStrLen + 1;
                             sal_uInt8* q = ( pCellArr + nPos );
-                            if( !nStrLen & 1 )
+                            if( (nStrLen & 1) == 0 )
                                 *q++ = 0, nPos++;
                         }
                         nCount++;
commit b1d2ec75cbf6698f0feb7c8a76ff6eb453a0bbc7
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Jan 14 21:23:52 2014 +0100

    Be explicit when using bool as integral value
    
    Change-Id: I04073e87e13984570373d1cf6740aeb082516cc0

diff --git a/sc/source/core/data/dpoutputgeometry.cxx b/sc/source/core/data/dpoutputgeometry.cxx
index fe8947a..f0ec629 100644
--- a/sc/source/core/data/dpoutputgeometry.cxx
+++ b/sc/source/core/data/dpoutputgeometry.cxx
@@ -80,7 +80,7 @@ void ScDPOutputGeometry::getColumnFieldPositions(vector<ScAddress>& rAddrs) cons
 
     if (mnPageFields)
     {
-        SCROW nRowStart = maOutRange.aStart.Row() + mbShowFilter;
+        SCROW nRowStart = maOutRange.aStart.Row() + int(mbShowFilter);
         SCROW nRowEnd   = nRowStart + static_cast<SCCOL>(mnPageFields-1);
         nCurRow = nRowEnd + 2;
     }
@@ -131,7 +131,7 @@ void ScDPOutputGeometry::getPageFieldPositions(vector<ScAddress>& rAddrs) const
     SCTAB nTab = maOutRange.aStart.Tab();
     SCCOL nCol = maOutRange.aStart.Col();
 
-    SCROW nRowStart = maOutRange.aStart.Row() + mbShowFilter;
+    SCROW nRowStart = maOutRange.aStart.Row() + int(mbShowFilter);
     SCROW nRowEnd   = nRowStart + static_cast<SCCOL>(mnPageFields-1);
 
     for (SCROW nRow = nRowStart; nRow <= nRowEnd; ++nRow)
@@ -147,7 +147,7 @@ SCROW ScDPOutputGeometry::getRowFieldHeaderRow() const
 
     if (mnPageFields)
     {
-        SCROW nRowStart = maOutRange.aStart.Row() + mbShowFilter;
+        SCROW nRowStart = maOutRange.aStart.Row() + int(mbShowFilter);
         SCROW nRowEnd   = nRowStart + static_cast<SCCOL>(mnPageFields-1);
         nCurRow = nRowEnd + 2;
     }
@@ -195,7 +195,7 @@ ScDPOutputGeometry::getFieldButtonType(const ScAddress& rPos) const
     if (mnPageFields)
     {
         SCCOL nCol = maOutRange.aStart.Col();
-        SCROW nRowStart = maOutRange.aStart.Row() + mbShowFilter;
+        SCROW nRowStart = maOutRange.aStart.Row() + int(mbShowFilter);
         SCROW nRowEnd   = nRowStart + static_cast<SCCOL>(mnPageFields-1);
         if (rPos.Col() == nCol && nRowStart <= rPos.Row() && rPos.Row() <= nRowEnd)
         {
diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx
index 420baa3..15468d4 100644
--- a/sc/source/core/data/dpsave.cxx
+++ b/sc/source/core/data/dpsave.cxx
@@ -104,7 +104,7 @@ bool ScDPSaveMember::HasIsVisible() const
 
 void ScDPSaveMember::SetIsVisible(bool bSet)
 {
-    nVisibleMode = bSet;
+    nVisibleMode = sal_uInt16(bSet);
 }
 
 bool ScDPSaveMember::HasShowDetails() const
@@ -114,7 +114,7 @@ bool ScDPSaveMember::HasShowDetails() const
 
 void ScDPSaveMember::SetShowDetails(bool bSet)
 {
-    nShowDetailsMode = bSet;
+    nShowDetailsMode = sal_uInt16(bSet);
 }
 
 void ScDPSaveMember::SetName( const OUString& rNew )
@@ -391,7 +391,7 @@ bool ScDPSaveDimension::HasShowEmpty() const
 
 void ScDPSaveDimension::SetShowEmpty(bool bSet)
 {
-    nShowEmptyMode = bSet;
+    nShowEmptyMode = sal_uInt16(bSet);
 }
 
 void ScDPSaveDimension::SetFunction(sal_uInt16 nNew)
@@ -1095,22 +1095,22 @@ void ScDPSaveData::SetPosition( ScDPSaveDimension* pDim, long nNew )
 
 void ScDPSaveData::SetColumnGrand(bool bSet)
 {
-    nColumnGrandMode = bSet;
+    nColumnGrandMode = sal_uInt16(bSet);
 }
 
 void ScDPSaveData::SetRowGrand(bool bSet)
 {
-    nRowGrandMode = bSet;
+    nRowGrandMode = sal_uInt16(bSet);
 }
 
 void ScDPSaveData::SetIgnoreEmptyRows(bool bSet)
 {
-    nIgnoreEmptyMode = bSet;
+    nIgnoreEmptyMode = sal_uInt16(bSet);
 }
 
 void ScDPSaveData::SetRepeatIfEmpty(bool bSet)
 {
-    nRepeatEmptyMode = bSet;
+    nRepeatEmptyMode = sal_uInt16(bSet);
 }
 
 void ScDPSaveData::SetFilterButton(bool bSet)
diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx
index 49c634f..1902dad 100644
--- a/sc/source/core/inc/interpre.hxx
+++ b/sc/source/core/inc/interpre.hxx
@@ -433,7 +433,7 @@ void ScLn();
 void ScLog10();
 void ScSqrt();
 void ScIsEmpty();
-short IsString();
+bool IsString();
 void ScIsString();
 void ScIsNonString();
 void ScIsLogical();
@@ -449,7 +449,7 @@ void ScArabic();
 void ScIsNV();
 void ScIsErr();
 void ScIsError();
-short IsEven();
+bool IsEven();
 void ScIsEven();
 void ScIsOdd();
 void ScN();
diff --git a/sc/source/core/tool/compare.cxx b/sc/source/core/tool/compare.cxx
index 36e18bc..11936b6 100644
--- a/sc/source/core/tool/compare.cxx
+++ b/sc/source/core/tool/compare.cxx
@@ -200,7 +200,7 @@ double CompareFunc( const Compare::Cell& rCell1, const Compare::Cell& rCell2, bo
                     bEqual = rCell2.maStr == rItem.maString;
 
                 // match => fRes=0, else fRes=1
-                fRes = (rEntry.eOp == SC_NOT_EQUAL) ? bEqual : !bEqual;
+                fRes = double((rEntry.eOp == SC_NOT_EQUAL) ? bEqual : !bEqual);
             }
         }
     }
@@ -265,7 +265,7 @@ double CompareFunc( double fCell1, const Compare::Cell& rCell2, CompareOptions*
                 bool bEqual = rCell2.maStr == rItem.maString;
 
                 // match => fRes=0, else fRes=1
-                fRes = (rEntry.eOp == SC_NOT_EQUAL) ? bEqual : !bEqual;
+                fRes = double((rEntry.eOp == SC_NOT_EQUAL) ? bEqual : !bEqual);
             }
         }
     }
@@ -327,7 +327,7 @@ double CompareFunc( const Compare::Cell& rCell1, double fCell2, CompareOptions*
                 bool bEqual = rCell1.maStr == rItem.maString;
 
                 // match => fRes=0, else fRes=1
-                fRes = (rEntry.eOp == SC_NOT_EQUAL) ? bEqual : !bEqual;
+                fRes = double((rEntry.eOp == SC_NOT_EQUAL) ? bEqual : !bEqual);
             }
         }
     }
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index d9d1867..5f13a43 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -1078,7 +1078,7 @@ void ScInterpreter::ScEqual()
         PushMatrix(aMat);
     }
     else
-        PushInt( Compare() == 0 );
+        PushInt( int(Compare() == 0) );
 }
 
 
@@ -1096,7 +1096,7 @@ void ScInterpreter::ScNotEqual()
         PushMatrix(aMat);
     }
     else
-        PushInt( Compare() != 0 );
+        PushInt( int(Compare() != 0) );
 }
 
 
@@ -1114,7 +1114,7 @@ void ScInterpreter::ScLess()
         PushMatrix(aMat);
     }
     else
-        PushInt( Compare() < 0 );
+        PushInt( int(Compare() < 0) );
 }
 
 
@@ -1132,7 +1132,7 @@ void ScInterpreter::ScGreater()
         PushMatrix(aMat);
     }
     else
-        PushInt( Compare() > 0 );
+        PushInt( int(Compare() > 0) );
 }
 
 
@@ -1150,7 +1150,7 @@ void ScInterpreter::ScLessEqual()
         PushMatrix(aMat);
     }
     else
-        PushInt( Compare() <= 0 );
+        PushInt( int(Compare() <= 0) );
 }
 
 
@@ -1168,7 +1168,7 @@ void ScInterpreter::ScGreaterEqual()
         PushMatrix(aMat);
     }
     else
-        PushInt( Compare() >= 0 );
+        PushInt( int(Compare() >= 0) );
 }
 
 
@@ -1179,7 +1179,7 @@ void ScInterpreter::ScAnd()
     if ( MustHaveParamCountMin( nParamCount, 1 ) )
     {
         bool bHaveValue = false;
-        short nRes = true;
+        bool nRes = true;
         size_t nRefInList = 0;
         while( nParamCount-- > 0)
         {
@@ -1265,7 +1265,7 @@ void ScInterpreter::ScAnd()
                 Pop();
         }
         if ( bHaveValue )
-            PushInt( nRes );
+            PushInt( int(nRes) );
         else
             PushNoValue();
     }
@@ -1279,7 +1279,7 @@ void ScInterpreter::ScOr()
     if ( MustHaveParamCountMin( nParamCount, 1 ) )
     {
         bool bHaveValue = false;
-        short nRes = false;
+        bool nRes = false;
         size_t nRefInList = 0;
         while( nParamCount-- > 0)
         {
@@ -1366,7 +1366,7 @@ void ScInterpreter::ScOr()
                 Pop();
         }
         if ( bHaveValue )
-            PushInt( nRes );
+            PushInt( int(nRes) );
         else
             PushNoValue();
     }
@@ -1381,7 +1381,7 @@ void ScInterpreter::ScXor()
     if ( MustHaveParamCountMin( nParamCount, 1 ) )
     {
         bool bHaveValue = false;
-        short nRes = false;
+        bool nRes = false;
         size_t nRefInList = 0;
         while( nParamCount-- > 0)
         {
@@ -1453,7 +1453,7 @@ void ScInterpreter::ScXor()
                             if ( nErr )
                             {
                                 SetError( nErr );
-                                nRes = 0;
+                                nRes = false;
                             }
                             else
                                 nRes ^= ( fVal != 0.0 );
@@ -1470,7 +1470,7 @@ void ScInterpreter::ScXor()
                 Pop();
         }
         if ( bHaveValue )
-            PushInt( nRes );
+            PushInt( int(nRes) );
         else
             PushNoValue();
     }
@@ -1559,7 +1559,7 @@ void ScInterpreter::ScNot()
                         for (SCSIZE j = 0; j < nR; ++j)
                         {
                             if ( pMat->IsValueOrEmpty(i,j) )
-                                pResMat->PutDouble( (pMat->GetDouble(i,j) == 0.0), i, j );
+                                pResMat->PutDouble( double(pMat->GetDouble(i,j) == 0.0), i, j );
                             else
                                 pResMat->PutString(
                                     mrStrPool.intern(ScGlobal::GetRscString(STR_NO_VALUE)), i, j);
@@ -1571,7 +1571,7 @@ void ScInterpreter::ScNot()
         }
         break;
         default:
-            PushInt( GetDouble() == 0.0 );
+            PushInt( int(GetDouble() == 0.0) );
     }
 }
 
@@ -1908,15 +1908,15 @@ void ScInterpreter::ScIsEmpty()
 }
 
 
-short ScInterpreter::IsString()
+bool ScInterpreter::IsString()
 {
     nFuncFmtType = NUMBERFORMAT_LOGICAL;
-    short nRes = 0;
+    bool nRes = false;
     switch ( GetRawStackType() )
     {
         case svString:
             Pop();
-            nRes = 1;
+            nRes = true;
         break;
         case svDoubleRef :
         case svSingleRef :
@@ -1933,7 +1933,7 @@ short ScInterpreter::IsString()
                 {
                     case CELLTYPE_STRING :
                     case CELLTYPE_EDIT :
-                        nRes = 1;
+                        nRes = true;
                         break;
                     case CELLTYPE_FORMULA :
                         nRes = (!aCell.mpFormula->IsValue() && !aCell.mpFormula->IsEmpty());
@@ -1971,19 +1971,19 @@ short ScInterpreter::IsString()
 
 void ScInterpreter::ScIsString()
 {
-    PushInt( IsString() );
+    PushInt( int(IsString()) );
 }
 
 
 void ScInterpreter::ScIsNonString()
 {
-    PushInt( !IsString() );
+    PushInt( int(!IsString()) );
 }
 
 
 void ScInterpreter::ScIsLogical()
 {
-    short nRes = 0;
+    bool nRes = false;
     switch ( GetStackType() )
     {
         case svDoubleRef :
@@ -2016,7 +2016,7 @@ void ScInterpreter::ScIsLogical()
     }
     nCurFmtType = nFuncFmtType = NUMBERFORMAT_LOGICAL;
     nGlobalError = 0;
-    PushInt( nRes );
+    PushInt( int(nRes) );
 }
 
 
@@ -2494,7 +2494,7 @@ void ScInterpreter::ScCellExternal()
 void ScInterpreter::ScIsRef()
 {
     nFuncFmtType = NUMBERFORMAT_LOGICAL;
-    short nRes = 0;
+    bool nRes = false;
     switch ( GetStackType() )
     {
         case svSingleRef :
@@ -2502,7 +2502,7 @@ void ScInterpreter::ScIsRef()
             ScAddress aAdr;
             PopSingleRef( aAdr );
             if ( !nGlobalError )
-                nRes = 1;
+                nRes = true;
         }
         break;
         case svDoubleRef :
@@ -2510,7 +2510,7 @@ void ScInterpreter::ScIsRef()
             ScRange aRange;
             PopDoubleRef( aRange );
             if ( !nGlobalError )
-                nRes = 1;
+                nRes = true;
         }
         break;
         case svRefList :
@@ -2524,19 +2524,19 @@ void ScInterpreter::ScIsRef()
             Pop();
     }
     nGlobalError = 0;
-    PushInt( nRes );
+    PushInt( int(nRes) );
 }
 
 
 void ScInterpreter::ScIsValue()
 {
     nFuncFmtType = NUMBERFORMAT_LOGICAL;
-    short nRes = 0;
+    bool nRes = false;
     switch ( GetRawStackType() )
     {
         case svDouble:
             Pop();
-            nRes = 1;
+            nRes = true;
         break;
         case svDoubleRef :
         case svSingleRef :
@@ -2552,7 +2552,7 @@ void ScInterpreter::ScIsValue()
                 switch (aCell.meType)
                 {
                     case CELLTYPE_VALUE :
-                        nRes = 1;
+                        nRes = true;
                         break;
                     case CELLTYPE_FORMULA :
                         nRes = (aCell.mpFormula->IsValue() && !aCell.mpFormula->IsEmpty());
@@ -2588,14 +2588,14 @@ void ScInterpreter::ScIsValue()
             Pop();
     }
     nGlobalError = 0;
-    PushInt( nRes );
+    PushInt( int(nRes) );
 }
 
 
 void ScInterpreter::ScIsFormula()
 {
     nFuncFmtType = NUMBERFORMAT_LOGICAL;
-    short nRes = 0;
+    bool nRes = false;
     switch ( GetStackType() )
     {
         case svDoubleRef :
@@ -2612,7 +2612,7 @@ void ScInterpreter::ScIsFormula()
             Pop();
     }
     nGlobalError = 0;
-    PushInt( nRes );
+    PushInt( int(nRes) );
 }
 
 
@@ -2652,7 +2652,7 @@ void ScInterpreter::ScFormula()
 void ScInterpreter::ScIsNV()
 {
     nFuncFmtType = NUMBERFORMAT_LOGICAL;
-    short nRes = 0;
+    bool nRes = false;
     switch ( GetStackType() )
     {
         case svDoubleRef :
@@ -2661,7 +2661,7 @@ void ScInterpreter::ScIsNV()
             ScAddress aAdr;
             PopDoubleRefOrSingleRef( aAdr );
             if ( nGlobalError == NOTAVAILABLE )
-                nRes = 1;
+                nRes = true;
             else
             {
                 ScRefCellValue aCell;
@@ -2691,17 +2691,17 @@ void ScInterpreter::ScIsNV()
         default:
             PopError();
             if ( nGlobalError == NOTAVAILABLE )
-                nRes = 1;
+                nRes = true;
     }
     nGlobalError = 0;
-    PushInt( nRes );
+    PushInt( int(nRes) );
 }
 
 
 void ScInterpreter::ScIsErr()
 {
     nFuncFmtType = NUMBERFORMAT_LOGICAL;
-    short nRes = 0;
+    bool nRes = false;
     switch ( GetStackType() )
     {
         case svDoubleRef :
@@ -2710,7 +2710,7 @@ void ScInterpreter::ScIsErr()
             ScAddress aAdr;
             PopDoubleRefOrSingleRef( aAdr );
             if ( nGlobalError && nGlobalError != NOTAVAILABLE )
-                nRes = 1;
+                nRes = true;
             else
             {
                 ScRefCellValue aCell;
@@ -2746,17 +2746,17 @@ void ScInterpreter::ScIsErr()
         default:
             PopError();
             if ( nGlobalError && nGlobalError != NOTAVAILABLE )
-                nRes = 1;
+                nRes = true;
     }
     nGlobalError = 0;
-    PushInt( nRes );
+    PushInt( int(nRes) );
 }
 
 
 void ScInterpreter::ScIsError()
 {
     nFuncFmtType = NUMBERFORMAT_LOGICAL;
-    short nRes = 0;
+    bool nRes = false;
     switch ( GetStackType() )
     {
         case svDoubleRef :
@@ -2765,11 +2765,11 @@ void ScInterpreter::ScIsError()
             ScAddress aAdr;
             if ( !PopDoubleRefOrSingleRef( aAdr ) )
             {
-                nRes = 1;
+                nRes = true;
                 break;
             }
             if ( nGlobalError )
-                nRes = 1;
+                nRes = true;
             else
             {
                 ScRefCellValue aCell;
@@ -2782,7 +2782,7 @@ void ScInterpreter::ScIsError()
         {
             ScMatrixRef pMat = PopMatrix();
             if ( nGlobalError || !pMat )
-                nRes = 1;
+                nRes = true;
             else if ( !pJumpMatrix )
                 nRes = (pMat->GetErrorIfNotString( 0, 0) != 0);
             else
@@ -2798,17 +2798,17 @@ void ScInterpreter::ScIsError()
         default:
             PopError();
             if ( nGlobalError )
-                nRes = 1;
+                nRes = true;
     }
     nGlobalError = 0;
-    PushInt( nRes );
+    PushInt( int(nRes) );
 }
 
 
-short ScInterpreter::IsEven()
+bool ScInterpreter::IsEven()
 {
     nFuncFmtType = NUMBERFORMAT_LOGICAL;
-    short nRes = 0;
+    bool nRes = false;
     double fVal = 0.0;
     switch ( GetStackType() )
     {
@@ -2830,13 +2830,13 @@ short ScInterpreter::IsEven()
                 {
                     case CELLTYPE_VALUE :
                         fVal = GetCellValue(aAdr, aCell);
-                        nRes = 1;
+                        nRes = true;
                     break;
                     case CELLTYPE_FORMULA :
                         if (aCell.mpFormula->IsValue())
                         {
                             fVal = GetCellValue(aAdr, aCell);
-                            nRes = 1;
+                            nRes = true;
                         }
                     break;
                     default:
@@ -2848,7 +2848,7 @@ short ScInterpreter::IsEven()
         case svDouble:
         {
             fVal = PopDouble();
-            nRes = 1;
+            nRes = true;
         }
         break;
         case svMatrix:
@@ -2891,13 +2891,13 @@ short ScInterpreter::IsEven()
 
 void ScInterpreter::ScIsEven()
 {
-    PushInt( IsEven() );
+    PushInt( int(IsEven()) );
 }
 
 
 void ScInterpreter::ScIsOdd()
 {
-    PushInt( !IsEven() );
+    PushInt( int(!IsEven()) );
 }
 
 void ScInterpreter::ScN()
@@ -7787,7 +7787,7 @@ void ScInterpreter::ScExact()
     {
         svl::SharedString s1 = GetString();
         svl::SharedString s2 = GetString();
-        PushInt( s1.getData() == s2.getData() );
+        PushInt( int(s1.getData() == s2.getData()) );
     }
 }
 
@@ -7841,7 +7841,7 @@ bool SAL_CALL lcl_getScriptClass(sal_uInt32 currentChar)
           (MsLangId::getSystemLanguage() == LANGUAGE_JAPANESE) )
         return true;
     sal_uInt16 i;
-    static sal_Int16 nRet = 0;
+    static bool nRet = false;
     UBlockCode block = (UBlockCode)ublock_getCode((sal_uInt32)currentChar);
     for ( i = 0; i < scriptListCount; i++) {
         if (block <= scriptList[i].to) break;
@@ -8051,7 +8051,7 @@ void ScInterpreter::ScSearch()
                 utl::SearchParam::SRCH_REGEXP : utl::SearchParam::SRCH_NORMAL);
             utl::SearchParam sPar(SearchStr, eSearchType, false, false, false);
             utl::TextSearch sT( sPar, *ScGlobal::pCharClass );
-            int nBool = sT.SearchForward(sStr, &nPos, &nEndPos);
+            bool nBool = sT.SearchForward(sStr, &nPos, &nEndPos);
             if (!nBool)
                 PushNoValue();
             else
diff --git a/sc/source/core/tool/interpr7.cxx b/sc/source/core/tool/interpr7.cxx
index 91f7116..a683f15 100644
--- a/sc/source/core/tool/interpr7.cxx
+++ b/sc/source/core/tool/interpr7.cxx
@@ -125,7 +125,7 @@ void ScInterpreter::ScFilterXML()
             case XPATH_BOOLEAN:
                 {
                     bool bVal = pXPathObj->boolval != 0;
-                    PushDouble(bVal);
+                    PushDouble(double(bVal));
                 }
                 break;
             case XPATH_NUMBER:
diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx
index 132923d..9c929fe 100644
--- a/sc/source/core/tool/scmatrix.cxx
+++ b/sc/source/core/tool/scmatrix.cxx
@@ -623,7 +623,7 @@ ScMatrixValue ScMatrixImpl::Get(SCSIZE nC, SCSIZE nR) const
         {
             case mdds::mtm::element_boolean:
                 aVal.nType = SC_MATVAL_BOOLEAN;
-                aVal.fVal = maMat.get_boolean(aPos);
+                aVal.fVal = double(maMat.get_boolean(aPos));
             break;
             case mdds::mtm::element_numeric:
                 aVal.nType = SC_MATVAL_VALUE;
@@ -1355,7 +1355,7 @@ public:
                 {
                     rCell.mbValue = true;
                     rCell.mbEmpty = false;
-                    rCell.mfValue = *it;
+                    rCell.mfValue = double(*it);
                     compare();
                 }
             }
@@ -1454,7 +1454,7 @@ public:
                 block_type::const_iterator it = block_type::begin(*node.data);
                 block_type::const_iterator itEnd = block_type::end(*node.data);
                 for (; it != itEnd; ++it)
-                    compareLeftNumeric(*it);
+                    compareLeftNumeric(double(*it));
             }
             break;
             case mdds::mtm::element_string:
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 8d6ff63c..ed17a49 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -1594,9 +1594,9 @@ size_t HashSingleRef( const ScSingleRefData& rRef )
 {
     size_t nVal = 0;
 
-    nVal += rRef.IsColRel();
-    nVal += (rRef.IsRowRel() << 1);
-    nVal += (rRef.IsTabRel() << 2);
+    nVal += size_t(rRef.IsColRel());
+    nVal += (size_t(rRef.IsRowRel()) << 1);
+    nVal += (size_t(rRef.IsTabRel()) << 2);
 
     return nVal;
 }
commit 8b28c064fa7863b365cbb7fc920bc3ac3067dd27
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Jan 14 21:21:23 2014 +0100

    bool improvements
    
    Change-Id: I27609462f2daba6b2289aff7a6a96686c961f3ce

diff --git a/sc/inc/address.hxx b/sc/inc/address.hxx
index f764e08..7e97245 100644
--- a/sc/inc/address.hxx
+++ b/sc/inc/address.hxx
@@ -627,8 +627,8 @@ public:
     inline ScRangePair& operator= ( const ScRangePair& r );
     const ScRange&      GetRange( sal_uInt16 n ) const { return aRange[n]; }
     ScRange&            GetRange( sal_uInt16 n ) { return aRange[n]; }
-    inline int operator==( const ScRangePair& ) const;
-    inline int operator!=( const ScRangePair& ) const;
+    inline bool operator==( const ScRangePair& ) const;
+    inline bool operator!=( const ScRangePair& ) const;
 };
 
 inline ScRangePair& ScRangePair::operator= ( const ScRangePair& r )
@@ -638,12 +638,12 @@ inline ScRangePair& ScRangePair::operator= ( const ScRangePair& r )
     return *this;
 }
 
-inline int ScRangePair::operator==( const ScRangePair& r ) const
+inline bool ScRangePair::operator==( const ScRangePair& r ) const
 {
     return ( (aRange[0] == r.aRange[0]) && (aRange[1] == r.aRange[1]) );
 }
 
-inline int ScRangePair::operator!=( const ScRangePair& r ) const
+inline bool ScRangePair::operator!=( const ScRangePair& r ) const
 {
     return !operator==( r );
 }
@@ -693,8 +693,8 @@ public:
     inline  SCROW   Row() const { return aAdr.Row(); }
     inline  SCTAB   Tab() const { return aAdr.Tab(); }
 
-    inline  int     operator == ( const ScRefAddress& r ) const;
-    inline  int     operator != ( const ScRefAddress& r ) const
+    inline  bool    operator == ( const ScRefAddress& r ) const;
+    inline  bool    operator != ( const ScRefAddress& r ) const
                     { return !(operator==(r)); }
 
             OUString  GetRefString( ScDocument* pDoc, SCTAB nActTab,
@@ -728,7 +728,7 @@ inline void ScRefAddress::Set( SCCOL nNewCol, SCROW nNewRow, SCTAB nNewTab,
     bRelTab = bNewRelTab;
 }
 
-inline int ScRefAddress::operator==( const ScRefAddress& r ) const
+inline bool ScRefAddress::operator==( const ScRefAddress& r ) const
 {
     return aAdr == r.aAdr && bRelCol == r.bRelCol && bRelRow == r.bRelRow &&
         bRelTab == r.bRelTab;
diff --git a/sc/inc/bigrange.hxx b/sc/inc/bigrange.hxx
index 5abb2b0..8db2b34 100644
--- a/sc/inc/bigrange.hxx
+++ b/sc/inc/bigrange.hxx
@@ -66,9 +66,9 @@ public:
                     { nCol = r.nCol; nRow = r.nRow; nTab = r.nTab; return *this; }
     ScBigAddress&   operator=( const ScAddress& r )
                     { nCol = r.Col(); nRow = r.Row(); nTab = r.Tab(); return *this; }
-    int             operator==( const ScBigAddress& r ) const
+    bool            operator==( const ScBigAddress& r ) const
                     { return nCol == r.nCol && nRow == r.nRow && nTab == r.nTab; }
-    int             operator!=( const ScBigAddress& r ) const
+    bool            operator!=( const ScBigAddress& r ) const
                     { return !operator==( r ); }
 
     friend inline SvStream& operator<< ( SvStream& rStream, const ScBigAddress& rAdr );
@@ -191,9 +191,9 @@ public:
 
     ScBigRange&     operator=( const ScBigRange& r )
                         { aStart = r.aStart; aEnd = r.aEnd; return *this; }
-    int             operator==( const ScBigRange& r ) const
+    bool            operator==( const ScBigRange& r ) const
                         { return (aStart == r.aStart) && (aEnd == r.aEnd); }
-    int             operator!=( const ScBigRange& r ) const
+    bool            operator!=( const ScBigRange& r ) const
                         { return !operator==( r ); }
 
     friend inline SvStream& operator<< ( SvStream& rStream, const ScBigRange& rRange );
diff --git a/sc/inc/conditio.hxx b/sc/inc/conditio.hxx
index 5de4827..b90bb9b 100644
--- a/sc/inc/conditio.hxx
+++ b/sc/inc/conditio.hxx
@@ -202,7 +202,7 @@ public:
             ScConditionEntry( ScDocument* pDocument, const ScConditionEntry& r );
     virtual ~ScConditionEntry();
 
-    int             operator== ( const ScConditionEntry& r ) const;
+    bool            operator== ( const ScConditionEntry& r ) const;
 
     virtual void SetParent( ScConditionalFormat* pNew )  { pCondFormat = pNew; }
 
@@ -308,7 +308,7 @@ public:
             ScCondFormatEntry( ScDocument* pDocument, const ScCondFormatEntry& r );
     virtual ~ScCondFormatEntry();
 
-    int             operator== ( const ScCondFormatEntry& r ) const;
+    bool            operator== ( const ScCondFormatEntry& r ) const;
 
     const OUString&   GetStyle() const        { return aStyleName; }
     void            UpdateStyleName(const OUString& rNew)  { aStyleName=rNew; }
diff --git a/sc/inc/detdata.hxx b/sc/inc/detdata.hxx
index f71becd..8f975c9 100644
--- a/sc/inc/detdata.hxx
+++ b/sc/inc/detdata.hxx
@@ -50,7 +50,7 @@ public:
     // for UpdateRef:
     void                SetPos(const ScAddress& rNew)   { aPos=rNew; }
 
-    int operator==      ( const ScDetOpData& r ) const
+    bool operator==     ( const ScDetOpData& r ) const
                             { return eOperation == r.eOperation && aPos == r.aPos; }
 };
 
diff --git a/sc/inc/viewopti.hxx b/sc/inc/viewopti.hxx
index 0c7cfd6..0277a1e 100644
--- a/sc/inc/viewopti.hxx
+++ b/sc/inc/viewopti.hxx
@@ -99,8 +99,8 @@ public:
     SvxGridItem*            CreateGridItem( sal_uInt16 nId = SID_ATTR_GRID_OPTIONS ) const;
 
     const ScViewOptions&    operator=  ( const ScViewOptions& rCpy );
-    int                     operator== ( const ScViewOptions& rOpt ) const;
-    int                     operator!= ( const ScViewOptions& rOpt ) const { return !(operator==(rOpt)); }
+    bool                    operator== ( const ScViewOptions& rOpt ) const;
+    bool                    operator!= ( const ScViewOptions& rOpt ) const { return !(operator==(rOpt)); }
 
 private:
     bool            aOptArr     [MAX_OPT];
diff --git a/sc/inc/zforauto.hxx b/sc/inc/zforauto.hxx
index dfadff3..3e92797 100644
--- a/sc/inc/zforauto.hxx
+++ b/sc/inc/zforauto.hxx
@@ -41,7 +41,7 @@ public:
     void Save( SvStream& rStream, rtl_TextEncoding eByteStrSet ) const;   // saving of the numberformats
     void PutFormatIndex(sal_uLong nFormat, SvNumberFormatter& rFormatter);
     sal_uLong GetFormatIndex( SvNumberFormatter& rFormatter);
-    inline int operator==(const ScNumFormatAbbrev& rNumFormat) const
+    inline bool operator==(const ScNumFormatAbbrev& rNumFormat) const
     {
         return ((sFormatstring == rNumFormat.sFormatstring)
             && (eLnge == rNumFormat.eLnge)
diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx
index 1a9f869..3d2b0c7 100644
--- a/sc/source/core/data/conditio.cxx
+++ b/sc/source/core/data/conditio.cxx
@@ -592,7 +592,7 @@ static bool lcl_IsEqual( const ScTokenArray* pArr1, const ScTokenArray* pArr2 )
         return !pArr1 && !pArr2;        // beide 0 -> gleich
 }
 
-int ScConditionEntry::operator== ( const ScConditionEntry& r ) const
+bool ScConditionEntry::operator== ( const ScConditionEntry& r ) const
 {
     bool bEq = (eOp == r.eOp && nOptions == r.nOptions &&
                 lcl_IsEqual( pFormula1, r.pFormula1 ) &&
@@ -1085,12 +1085,12 @@ bool ScConditionEntry::IsValid( double nArg, const ScAddress& rPos ) const
             {
                 OUString aStr = OUString::number(nVal1);
                 OUString aStr2 = OUString::number(nArg);
-                bValid = aStr2.endsWith(aStr) == 0;
+                bValid = !aStr2.endsWith(aStr);
             }
             else
             {
                 OUString aStr2 = OUString::number(nArg);
-                bValid = aStr2.endsWith(aStrVal1) == 0;
+                bValid = !aStr2.endsWith(aStrVal1);
             }
             break;
         case SC_COND_CONTAINS_TEXT:
@@ -1576,7 +1576,7 @@ ScCondFormatEntry::ScCondFormatEntry( ScDocument* pDocument, const ScCondFormatE
 {
 }
 
-int ScCondFormatEntry::operator== ( const ScCondFormatEntry& r ) const
+bool ScCondFormatEntry::operator== ( const ScCondFormatEntry& r ) const
 {
     return ScConditionEntry::operator==( r ) &&
             aStyleName == r.aStyleName;
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index 721f268..4837e3c 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -115,8 +115,7 @@ lcl_checkRangeDimensions(
     const bool bSameTabs(lcl_checkRangeDimension(rPos, rRef1, rRef2, lcl_GetTab));
 
     // Test if exactly two dimensions are equal
-    if (!(bSameCols ^ bSameRows ^ bSameTabs)
-            && (bSameCols || bSameRows || bSameTabs))
+    if (int(bSameCols) + int(bSameRows) + int(bSameTabs) == 2)
     {
         bCol = !bSameCols;
         bRow = !bSameRows;
@@ -2676,7 +2675,8 @@ bool ScFormulaCell::UpdateReferenceOnMove(
 
     bValChanged = false;
 
-    if ( ( bCompile = (bCompile || bValChanged || bRefModified || bColRowNameCompile) ) != 0 )
+    bCompile = (bCompile || bValChanged || bRefModified || bColRowNameCompile);
+    if ( bCompile )
     {
         CompileTokenArray( bNewListening ); // no Listening
         bNeedDirty = true;
diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx
index bda4a5a..ff43877 100644
--- a/sc/source/core/tool/address.cxx
+++ b/sc/source/core/tool/address.cxx
@@ -1991,8 +1991,9 @@ bool ScAddress::Move( SCsCOL dx, SCsROW dy, SCsTAB dz, ScDocument* pDoc )
 
 bool ScRange::Move( SCsCOL dx, SCsROW dy, SCsTAB dz, ScDocument* pDoc )
 {
-    // single & to process both
-    return aStart.Move( dx, dy, dz, pDoc ) & aEnd.Move( dx, dy, dz, pDoc );
+    bool b = aStart.Move( dx, dy, dz, pDoc );
+    b &= aEnd.Move( dx, dy, dz, pDoc );
+    return b;
 }
 
 OUString ScAddress::GetColRowString( bool bAbsolute,
diff --git a/sc/source/core/tool/interpr3.cxx b/sc/source/core/tool/interpr3.cxx
index eb5d076..dce8965 100644
--- a/sc/source/core/tool/interpr3.cxx
+++ b/sc/source/core/tool/interpr3.cxx
@@ -2055,7 +2055,7 @@ void ScInterpreter::ScGammaDist( int nMinParamCount )
     sal_uInt8 nParamCount = GetByte();
     if ( !MustHaveParamCount( nParamCount, nMinParamCount, 4 ) )
         return;
-    double bCumulative;
+    bool bCumulative;
     if (nParamCount == 4)
         bCumulative = GetBool();
     else
diff --git a/sc/source/core/tool/viewopti.cxx b/sc/source/core/tool/viewopti.cxx
index 18ecb34..0e105c3 100644
--- a/sc/source/core/tool/viewopti.cxx
+++ b/sc/source/core/tool/viewopti.cxx
@@ -159,9 +159,9 @@ const ScViewOptions& ScViewOptions::operator=( const ScViewOptions& rCpy )
     return *this;
 }
 
-int ScViewOptions::operator==( const ScViewOptions& rOpt ) const
+bool ScViewOptions::operator==( const ScViewOptions& rOpt ) const
 {
-    sal_Bool    bEqual = sal_True;
+    bool bEqual = true;
     sal_uInt16  i;
 
     for ( i=0; i<MAX_OPT && bEqual; i++ )  bEqual = (aOptArr [i] == rOpt.aOptArr[i]);
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index d0e030c..e175839 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -3948,7 +3948,7 @@ ScInputHdlState::~ScInputHdlState()
 
 //------------------------------------------------------------------------
 
-int ScInputHdlState::operator==( const ScInputHdlState& r ) const
+bool ScInputHdlState::operator==( const ScInputHdlState& r ) const
 {
     return (    (aStartPos  == r.aStartPos)
              && (aEndPos    == r.aEndPos)
diff --git a/sc/source/ui/inc/inputhdl.hxx b/sc/source/ui/inc/inputhdl.hxx
index d3fc3b9..bc7afca 100644
--- a/sc/source/ui/inc/inputhdl.hxx
+++ b/sc/source/ui/inc/inputhdl.hxx
@@ -276,8 +276,8 @@ public:
         ~ScInputHdlState();
 
     ScInputHdlState&    operator= ( const ScInputHdlState& r );
-    int                 operator==( const ScInputHdlState& r ) const;
-    int                 operator!=( const ScInputHdlState& r ) const
+    bool                operator==( const ScInputHdlState& r ) const;
+    bool                operator!=( const ScInputHdlState& r ) const
                             { return !operator==( r ); }
 
     const ScAddress&        GetPos() const          { return aCursorPos; }
commit 0c9d002ecdd410b8b5be1fc91f4b84c7cbe5f5bc
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Jan 14 21:14:47 2014 +0100

    bool improvements
    
    Change-Id: I42127c096aa4310e3c8b6c9b6487b4de63e7ac9a

diff --git a/include/xmloff/nmspmap.hxx b/include/xmloff/nmspmap.hxx
index ce3965d..19e7229 100644
--- a/include/xmloff/nmspmap.hxx
+++ b/include/xmloff/nmspmap.hxx
@@ -100,7 +100,7 @@ public:
     SvXMLNamespaceMap( const SvXMLNamespaceMap& );
 
     void operator =( const SvXMLNamespaceMap& rCmp );
-    int operator ==( const SvXMLNamespaceMap& rCmp ) const;
+    bool operator ==( const SvXMLNamespaceMap& rCmp ) const;
 
     sal_uInt16 Add( const OUString& rPrefix,
                 const OUString& rName,
diff --git a/include/xmloff/xmlcnimp.hxx b/include/xmloff/xmlcnimp.hxx
index 49ad191..f6ef3fe 100644
--- a/include/xmloff/xmlcnimp.hxx
+++ b/include/xmloff/xmlcnimp.hxx
@@ -36,7 +36,7 @@ public:
     SvXMLAttrContainerData(const SvXMLAttrContainerData &rCopy);
     ~SvXMLAttrContainerData();
 
-    int  operator ==( const SvXMLAttrContainerData& rCmp ) const;
+    bool operator ==( const SvXMLAttrContainerData& rCmp ) const;
 
     sal_Bool AddAttr( const OUString& rLName, const OUString& rValue );
     sal_Bool AddAttr( const OUString& rPrefix, const OUString& rNamespace,
diff --git a/xmloff/source/core/nmspmap.cxx b/xmloff/source/core/nmspmap.cxx
index 204fb11..b68cafe 100644
--- a/xmloff/source/core/nmspmap.cxx
+++ b/xmloff/source/core/nmspmap.cxx
@@ -68,9 +68,9 @@ SvXMLNamespaceMap::~SvXMLNamespaceMap()
 {
 }
 
-int SvXMLNamespaceMap::operator ==( const SvXMLNamespaceMap& rCmp ) const
+bool SvXMLNamespaceMap::operator ==( const SvXMLNamespaceMap& rCmp ) const
 {
-    return static_cast < int > (aNameHash == rCmp.aNameHash);
+    return aNameHash == rCmp.aNameHash;
 }
 
 sal_uInt16 SvXMLNamespaceMap::_Add( const OUString& rPrefix, const OUString &rName, sal_uInt16 nKey )
diff --git a/xmloff/source/core/xmlcnimp.cxx b/xmloff/source/core/xmlcnimp.cxx
index ca467fb..9e5796a 100644
--- a/xmloff/source/core/xmlcnimp.cxx
+++ b/xmloff/source/core/xmlcnimp.cxx
@@ -36,7 +36,7 @@ SvXMLAttrContainerData::~SvXMLAttrContainerData()
 {
 }
 
-int SvXMLAttrContainerData::operator ==( const SvXMLAttrContainerData& rCmp ) const
+bool SvXMLAttrContainerData::operator ==( const SvXMLAttrContainerData& rCmp ) const
 {
     return ( *(rCmp.pimpl) == *(pimpl) );
 }
diff --git a/xmloff/source/draw/animexp.cxx b/xmloff/source/draw/animexp.cxx
index 53abb8b..83aff72 100644
--- a/xmloff/source/draw/animexp.cxx
+++ b/xmloff/source/draw/animexp.cxx
@@ -211,7 +211,7 @@ struct XMLEffectHint
     sal_Int32       mnPresId;
     sal_Int32       mnPathShapeId;
 
-    int operator<(const XMLEffectHint& rComp) const { return mnPresId < rComp.mnPresId; }
+    bool operator<(const XMLEffectHint& rComp) const { return mnPresId < rComp.mnPresId; }
 
     XMLEffectHint()
     :   meKind( XMLE_SHOW ), mbTextEffect( sal_False ),
diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx
index 0e0ec13..33fcbb3 100644
--- a/xmloff/source/draw/shapeimport.cxx
+++ b/xmloff/source/draw/shapeimport.cxx
@@ -768,7 +768,7 @@ struct ZOrderHint
     sal_Int32 nIs;
     sal_Int32 nShould;
 
-    int operator<(const ZOrderHint& rComp) const { return nShould < rComp.nShould; }
+    bool operator<(const ZOrderHint& rComp) const { return nShould < rComp.nShould; }
 };
 
 class ShapeSortContext
diff --git a/xmloff/source/style/XMLFontAutoStylePool.cxx b/xmloff/source/style/XMLFontAutoStylePool.cxx
index d979e9d..b83bf9c 100644
--- a/xmloff/source/style/XMLFontAutoStylePool.cxx
+++ b/xmloff/source/style/XMLFontAutoStylePool.cxx
@@ -107,8 +107,8 @@ struct XMLFontAutoStylePoolEntryCmp_Impl {
         XMLFontAutoStylePoolEntry_Impl* const& r1,
         XMLFontAutoStylePoolEntry_Impl* const& r2 ) const
     {
-        sal_Int8 nEnc1(r1->GetEncoding() != RTL_TEXTENCODING_SYMBOL);
-        sal_Int8 nEnc2(r2->GetEncoding() != RTL_TEXTENCODING_SYMBOL);
+        bool nEnc1(r1->GetEncoding() != RTL_TEXTENCODING_SYMBOL);
+        bool nEnc2(r2->GetEncoding() != RTL_TEXTENCODING_SYMBOL);
         if( nEnc1 != nEnc2 )
             return nEnc1 < nEnc2;
         else if( r1->GetPitch() != r2->GetPitch() )
commit a067822a515579c59f660d9ce03dca1495768672
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Jan 14 21:12:38 2014 +0100

    Be explicit when using bool as integral value
    
    Change-Id: I23e108de5c8d4c86b7fc29b4b039a0e2019df81d

diff --git a/padmin/source/prtsetup.cxx b/padmin/source/prtsetup.cxx
index a91d43f..d233496 100644
--- a/padmin/source/prtsetup.cxx
+++ b/padmin/source/prtsetup.cxx
@@ -354,7 +354,7 @@ RTSDevicePage::RTSDevicePage( RTSDialog* pParent )
 
     bool bAutoIsPDF = officecfg::Office::Common::Print::Option::Printer::PDFAsStandardPrintJobFormat::get();
 
-    assert(nLevelEntryData != 0 || bAutoIsPDF == m_pParent->m_aJobData.m_nPDFDevice);
+    assert(nLevelEntryData != 0 || int(bAutoIsPDF) == m_pParent->m_aJobData.m_nPDFDevice);
 
     OUString sStr = m_pLevelBox->GetEntry(0);
     m_pLevelBox->InsertEntry(sStr.replaceAll("%s", bAutoIsPDF ? m_pLevelBox->GetEntry(5) : m_pLevelBox->GetEntry(1)), 0);
commit 987454711845a883f7fe232e16c1aa02c2de29b5
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Jan 14 21:11:44 2014 +0100

    bool improvements
    
    Change-Id: Ice9f38b615b325bce6c15fefe9fbb3f528d36b1e

diff --git a/framework/source/helper/tagwindowasmodified.cxx b/framework/source/helper/tagwindowasmodified.cxx
index 12090d2..758092b 100644
--- a/framework/source/helper/tagwindowasmodified.cxx
+++ b/framework/source/helper/tagwindowasmodified.cxx
@@ -112,7 +112,7 @@ void SAL_CALL TagWindowAsModified::modified(const css::lang::EventObject& aEvent
     if (bModified)
         pWindow->SetExtendedStyle(WB_EXT_DOCMODIFIED);
     else
-        pWindow->SetExtendedStyle( ! WB_EXT_DOCMODIFIED);
+        pWindow->SetExtendedStyle(0);
     // <- SYNCHRONIZED
 }
 
commit 7d0db7f0ee7c478cc58669121f517dfdf54eeaee
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Jan 14 21:11:31 2014 +0100

    This shall probably check nId != 0 && ..., not do a bitwise &
    
    Change-Id: I2417f7bff3fc5f2bef6c804af12d1873802b0392

diff --git a/framework/source/uielement/newmenucontroller.cxx b/framework/source/uielement/newmenucontroller.cxx
index 0472218..9857350 100644
--- a/framework/source/uielement/newmenucontroller.cxx
+++ b/framework/source/uielement/newmenucontroller.cxx
@@ -226,7 +226,7 @@ void NewMenuController::setAccelerators( PopupMenu* pPopupMenu )
         for ( sal_uInt32 i = 0; i < nItemCount; i++ )
         {
             sal_uInt16 nId( pPopupMenu->GetItemId( sal_uInt16( i )));
-            if ( nId & ( pPopupMenu->GetItemType( nId ) != MENUITEM_SEPARATOR ))
+            if ( nId && ( pPopupMenu->GetItemType( nId ) != MENUITEM_SEPARATOR ))
             {
                 aIds.push_back( nId );
                 aMenuShortCuts.push_back( aEmptyKeyCode );
commit 5ea58f534b9226ef8f5c9589066ce20e3c64e0d8
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Jan 14 21:09:59 2014 +0100

    bool improvements
    
    Change-Id: Ic6488ac278cac2d1d7e240abff545f9ea0b8eafe

diff --git a/editeng/source/editeng/eertfpar.cxx b/editeng/source/editeng/eertfpar.cxx
index 9e2e265..c336a53 100644
--- a/editeng/source/editeng/eertfpar.cxx
+++ b/editeng/source/editeng/eertfpar.cxx
@@ -285,7 +285,7 @@ void EditRTFParser::SetEndPrevPara( SvxNodeIdx*& rpNodePos,
     rCntPos = pPrevNode->Len();
 }
 
-int EditRTFParser::IsEndPara( SvxNodeIdx* pNd, sal_uInt16 nCnt ) const
+bool EditRTFParser::IsEndPara( SvxNodeIdx* pNd, sal_uInt16 nCnt ) const
 {
     return ( nCnt == ( ((EditNodeIdx*)pNd)->GetNode()->Len()) );
 }
diff --git a/editeng/source/editeng/eertfpar.hxx b/editeng/source/editeng/eertfpar.hxx
index ac8ccf2..206a262 100644
--- a/editeng/source/editeng/eertfpar.hxx
+++ b/editeng/source/editeng/eertfpar.hxx
@@ -86,7 +86,7 @@ protected:
     virtual void        UnknownAttrToken( int nToken, SfxItemSet* pSet );
     virtual void        NextToken( int nToken );
     virtual void        SetAttrInDoc( SvxRTFItemStackType &rSet );
-    virtual int         IsEndPara( SvxNodeIdx* pNd, sal_uInt16 nCnt ) const;
+    virtual bool        IsEndPara( SvxNodeIdx* pNd, sal_uInt16 nCnt ) const;
     virtual void        CalcValue();
     void                CreateStyleSheets();
     SfxStyleSheet*      CreateStyleSheet( SvxRTFStyleType* pRTFStyle );
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index 31deb76..b5168f6 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -893,7 +893,7 @@ void ImpEditEngine::WriteItemAsRTF( const SfxPoolItem& rItem, SvStream& rOutput,
         case EE_CHAR_OUTLINE:
         {
             rOutput << OOO_STRING_SVTOOLS_RTF_OUTL;
-            if ( ((const SvxContourItem&)rItem).GetValue() == 0 )
+            if ( !((const SvxContourItem&)rItem).GetValue() )
                 rOutput << '0';
         }
         break;
@@ -920,7 +920,7 @@ void ImpEditEngine::WriteItemAsRTF( const SfxPoolItem& rItem, SvStream& rOutput,
         case EE_CHAR_SHADOW:
         {
             rOutput << OOO_STRING_SVTOOLS_RTF_SHAD;
-            if ( ((const SvxShadowedItem&)rItem).GetValue() == 0 )
+            if ( !((const SvxShadowedItem&)rItem).GetValue() )
                 rOutput << '0';
         }
         break;
diff --git a/editeng/source/items/flditem.cxx b/editeng/source/items/flditem.cxx
index 5f661c6..96de48e 100644
--- a/editeng/source/items/flditem.cxx
+++ b/editeng/source/items/flditem.cxx
@@ -244,7 +244,7 @@ SvxFieldData* SvxFieldData::Clone() const
 
 // -----------------------------------------------------------------------
 
-int SvxFieldData::operator==( const SvxFieldData& rFld ) const
+bool SvxFieldData::operator==( const SvxFieldData& rFld ) const
 {
     DBG_ASSERT( Type() == rFld.Type(), "==: Different Types" );
     (void)rFld;
@@ -400,7 +400,7 @@ SvxFieldData* SvxDateField::Clone() const
 
 // -----------------------------------------------------------------------
 
-int SvxDateField::operator==( const SvxFieldData& rOther ) const
+bool SvxDateField::operator==( const SvxFieldData& rOther ) const
 {
     if ( rOther.Type() != Type() )
         return sal_False;
@@ -538,7 +538,7 @@ SvxFieldData* SvxURLField::Clone() const
 
 // -----------------------------------------------------------------------
 
-int SvxURLField::operator==( const SvxFieldData& rOther ) const
+bool SvxURLField::operator==( const SvxFieldData& rOther ) const
 {
     if ( rOther.Type() != Type() )
         return sal_False;
@@ -620,7 +620,7 @@ SvxFieldData* SvxPageField::Clone() const
     return new SvxPageField;        // empty
 }
 
-int SvxPageField::operator==( const SvxFieldData& rCmp ) const
+bool SvxPageField::operator==( const SvxFieldData& rCmp ) const
 {
     return ( rCmp.Type() == TYPE(SvxPageField) );
 }
@@ -648,7 +648,7 @@ SvxFieldData* SvxPagesField::Clone() const
     return new SvxPagesField;   // empty
 }
 
-int SvxPagesField::operator==( const SvxFieldData& rCmp ) const
+bool SvxPagesField::operator==( const SvxFieldData& rCmp ) const
 {
     return ( rCmp.Type() == TYPE(SvxPagesField) );
 }
@@ -670,7 +670,7 @@ SvxFieldData* SvxTimeField::Clone() const
     return new SvxTimeField;    // empty
 }
 
-int SvxTimeField::operator==( const SvxFieldData& rCmp ) const
+bool SvxTimeField::operator==( const SvxFieldData& rCmp ) const
 {
     return ( rCmp.Type() == TYPE(SvxTimeField) );
 }
@@ -697,7 +697,7 @@ SvxFieldData* SvxFileField::Clone() const
     return new SvxFileField;    // empty
 }
 
-int SvxFileField::operator==( const SvxFieldData& rCmp ) const
+bool SvxFileField::operator==( const SvxFieldData& rCmp ) const
 {
     return ( rCmp.Type() == TYPE(SvxFileField) );
 }
@@ -731,7 +731,7 @@ SvxFieldData* SvxTableField::Clone() const
     return new SvxTableField(mnTab);
 }
 
-int SvxTableField::operator==( const SvxFieldData& rCmp ) const
+bool SvxTableField::operator==( const SvxFieldData& rCmp ) const
 {
     if (rCmp.Type() != TYPE(SvxTableField))
         return false;
@@ -780,7 +780,7 @@ SvxFieldData* SvxExtTimeField::Clone() const
 
 //----------------------------------------------------------------------------
 
-int SvxExtTimeField::operator==( const SvxFieldData& rOther ) const
+bool SvxExtTimeField::operator==( const SvxFieldData& rOther ) const
 {
     if ( rOther.Type() != Type() )
         return sal_False;
@@ -924,7 +924,7 @@ SvxFieldData* SvxExtFileField::Clone() const
 
 //----------------------------------------------------------------------------
 
-int SvxExtFileField::operator==( const SvxFieldData& rOther ) const
+bool SvxExtFileField::operator==( const SvxFieldData& rOther ) const
 {
     if ( rOther.Type() != Type() )
         return sal_False;
@@ -1076,7 +1076,7 @@ SvxFieldData* SvxAuthorField::Clone() const
 
 //----------------------------------------------------------------------------
 
-int SvxAuthorField::operator==( const SvxFieldData& rOther ) const
+bool SvxAuthorField::operator==( const SvxFieldData& rOther ) const
 {
     if ( rOther.Type() != Type() )
         return sal_False;
@@ -1176,7 +1176,7 @@ SvxFieldData* SvxHeaderField::Clone() const
     return new SvxHeaderField;      // empty
 }
 
-int SvxHeaderField::operator==( const SvxFieldData& rCmp ) const
+bool SvxHeaderField::operator==( const SvxFieldData& rCmp ) const
 {
     return ( rCmp.Type() == TYPE(SvxHeaderField) );
 }
@@ -1199,7 +1199,7 @@ SvxFieldData* SvxFooterField::Clone() const
     return new SvxFooterField;      // empty
 }
 
-int SvxFooterField::operator==( const SvxFieldData& rCmp ) const
+bool SvxFooterField::operator==( const SvxFieldData& rCmp ) const
 {
     return ( rCmp.Type() == TYPE(SvxFooterField) );
 }
@@ -1221,7 +1221,7 @@ SvxFieldData* SvxDateTimeField::Clone() const
     return new SvxDateTimeField;        // empty
 }
 
-int SvxDateTimeField::operator==( const SvxFieldData& rCmp ) const
+bool SvxDateTimeField::operator==( const SvxFieldData& rCmp ) const
 {
     return ( rCmp.Type() == TYPE(SvxDateTimeField) );
 }
diff --git a/editeng/source/items/svdfield.cxx b/editeng/source/items/svdfield.cxx
index 4ec1280..82753f2f 100644
--- a/editeng/source/items/svdfield.cxx
+++ b/editeng/source/items/svdfield.cxx
@@ -31,7 +31,7 @@ SvxFieldData* SdrMeasureField::Clone() const
     return new SdrMeasureField(*this);
 }
 
-int SdrMeasureField::operator==(const SvxFieldData& rSrc) const
+bool SdrMeasureField::operator==(const SvxFieldData& rSrc) const
 {
     return eMeasureFieldKind==((SdrMeasureField&)rSrc).GetMeasureFieldKind();
 }
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index 9b2d207..7089b02 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -347,7 +347,7 @@ bool SvxFontItem::operator==( const SfxPoolItem& rAttr ) const
 
     const SvxFontItem& rItem = (const SvxFontItem&)rAttr;
 
-    int bRet = ( eFamily == rItem.eFamily &&
+    bool bRet = ( eFamily == rItem.eFamily &&
                  aFamilyName == rItem.aFamilyName &&
                  aStyleName == rItem.aStyleName );
 
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 83a4707..a961b2e 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -94,19 +94,19 @@ TYPEINIT0(SvxAutoCorrect)
 
 typedef SvxAutoCorrectLanguageLists* SvxAutoCorrectLanguageListsPtr;
 
-static inline int IsWordDelim( const sal_Unicode c )
+static inline bool IsWordDelim( const sal_Unicode c )
 {
     return ' ' == c || '\t' == c || 0x0a == c ||
             cNonBreakingSpace == c || 0x2011 == c || 0x1 == c;
 }
 
-static inline int IsLowerLetter( sal_Int32 nCharType )
+static inline bool IsLowerLetter( sal_Int32 nCharType )
 {
     return CharClass::isLetterType( nCharType ) &&
             0 == ( ::com::sun::star::i18n::KCharacterType::UPPER & nCharType);
 }
 
-static inline int IsUpperLetter( sal_Int32 nCharType )
+static inline bool IsUpperLetter( sal_Int32 nCharType )
 {
     return CharClass::isLetterType( nCharType ) &&
             0 == ( ::com::sun::star::i18n::KCharacterType::LOWER & nCharType);
diff --git a/editeng/source/misc/txtrange.cxx b/editeng/source/misc/txtrange.cxx
index 79c2ae7..c67e8d8 100644
--- a/editeng/source/misc/txtrange.cxx
+++ b/editeng/source/misc/txtrange.cxx
@@ -287,7 +287,7 @@ void SvxBoundArgs::NoteRange( bool bToggle )
             aBoolArr.erase( aBoolArr.begin() + nMaxIdx, aBoolArr.begin() + (nMaxIdx + nDiff) );
         }
         DBG_ASSERT( nMaxIdx < aBoolArr.size(), "NoteRange: Too much deleted" );
-        aBoolArr[ nMaxIdx ] = aBoolArr[ nMaxIdx ] ^ bToggle;
+        aBoolArr[ nMaxIdx ] = aBoolArr[ nMaxIdx ] != bToggle;
     }
 }
 
diff --git a/editeng/source/rtf/rtfitem.cxx b/editeng/source/rtf/rtfitem.cxx
index 6675edb..023a12f 100644
--- a/editeng/source/rtf/rtfitem.cxx
+++ b/editeng/source/rtf/rtfitem.cxx
@@ -217,7 +217,7 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet )
     RTF_CharTypeDef eCharType = NOTDEF_CHARTYPE;
     sal_uInt16 nFontAlign;
 
-    int bChkStkPos = !bNewGroup && !aAttrStack.empty();
+    bool bChkStkPos = !bNewGroup && !aAttrStack.empty();
 
     while( bContinue && IsParserWorking() )  // as long as known Attribute are recognized
     {
@@ -1403,7 +1403,8 @@ void SvxRTFParser::ReadBorderAttr( int nToken, SfxItemSet& rSet,
         aAttr = *(SvxBoxItem*)pItem;
 
     SvxBorderLine aBrd( 0, DEF_LINE_WIDTH_0 );  // Simple plain line
-    int bContinue = sal_True, nBorderTyp = 0;
+    bool bContinue = true;
+    int nBorderTyp = 0;
 
     long nWidth = 1;
     bool bDoubleWidth = false;
@@ -1585,7 +1586,7 @@ void SvxRTFParser::ReadBackgroundAttr( int nToken, SfxItemSet& rSet,
                                         int bTableDef )
 {
     // then read the border attribute
-    int bContinue = sal_True;
+    bool bContinue = true;
     sal_uInt16 nColor = USHRT_MAX, nFillColor = USHRT_MAX;
     sal_uInt8 nFillValue = 0;
 
diff --git a/editeng/source/rtf/svxrtf.cxx b/editeng/source/rtf/svxrtf.cxx
index 0331be7..cdd6fe8 100644
--- a/editeng/source/rtf/svxrtf.cxx
+++ b/editeng/source/rtf/svxrtf.cxx
@@ -925,7 +925,7 @@ void SvxRTFParser::AttrGroupEnd()   // process the current, delete from Stack
             }
 
             // Set all attributes which have been defined from start until here
-            int bCrsrBack = !pInsPos->GetCntIdx();
+            bool bCrsrBack = !pInsPos->GetCntIdx();
             if( bCrsrBack )
             {
                 // at the beginning of a paragraph? Move back one position
@@ -1025,7 +1025,7 @@ void SvxRTFParser::AttrGroupEnd()   // process the current, delete from Stack
                     {
                         // at the beginning of a paragraph? Move back one position
                         MovePos( sal_True );
-                        bCrsrBack = sal_False;
+                        bCrsrBack = false;
 
                         // Open a new Group.
                         SvxRTFItemStackType* pNew = new SvxRTFItemStackType(
@@ -1094,7 +1094,7 @@ void SvxRTFParser::SetAttrSet( SvxRTFItemStackType &rSet )
 }
 
     // Has no Text been inserted yet? (SttPos from the top Stack entry!)
-int SvxRTFParser::IsAttrSttPos()
+bool SvxRTFParser::IsAttrSttPos()
 {
     SvxRTFItemStackType* pAkt = aAttrStack.empty() ? 0 : aAttrStack.back();
     return !pAkt || (pAkt->pSttNd->GetIdx() == pInsPos->GetNodeIdx() &&
diff --git a/include/editeng/flditem.hxx b/include/editeng/flditem.hxx
index d7c8cdc..9853474 100644
--- a/include/editeng/flditem.hxx
+++ b/include/editeng/flditem.hxx
@@ -56,7 +56,7 @@ public:
     virtual                 ~SvxFieldData();
 
     virtual SvxFieldData*   Clone() const;
-    virtual int             operator==( const SvxFieldData& ) const;
+    virtual bool            operator==( const SvxFieldData& ) const;
 
     virtual MetaAction* createBeginComment() const;
     virtual MetaAction* createEndComment() const;
@@ -136,7 +136,7 @@ public:
     static OUString    GetFormatted( Date& rDate, SvxDateFormat eFormat, SvNumberFormatter& rFormatter, LanguageType eLanguage );
 
     virtual SvxFieldData*   Clone() const;
-    virtual int             operator==( const SvxFieldData& ) const;
+    virtual bool            operator==( const SvxFieldData& ) const;
 
     virtual MetaAction* createBeginComment() const;
 };
@@ -174,7 +174,7 @@ public:
     void                    SetFormat( SvxURLFormat eFmt ) { eFormat = eFmt; }
 
     virtual SvxFieldData*   Clone() const;
-    virtual int             operator==( const SvxFieldData& ) const;
+    virtual bool            operator==( const SvxFieldData& ) const;
 
     virtual MetaAction* createBeginComment() const;
 };
@@ -186,7 +186,7 @@ public:
     SvxPageField();
 
     virtual SvxFieldData*   Clone() const;
-    virtual int             operator==( const SvxFieldData& ) const;
+    virtual bool            operator==( const SvxFieldData& ) const;
 
     virtual MetaAction* createBeginComment() const;
 };
@@ -198,7 +198,7 @@ public:
     SvxPagesField();
 
     virtual SvxFieldData*   Clone() const;
-    virtual int             operator==( const SvxFieldData& ) const;
+    virtual bool            operator==( const SvxFieldData& ) const;
 };
 
 class EDITENG_DLLPUBLIC SvxTimeField : public SvxFieldData
@@ -208,7 +208,7 @@ public:
     SvxTimeField();
 
     virtual SvxFieldData*   Clone() const;
-    virtual int             operator==( const SvxFieldData& ) const;
+    virtual bool            operator==( const SvxFieldData& ) const;
 
     virtual MetaAction* createBeginComment() const;
 };
@@ -220,7 +220,7 @@ public:
     SvxFileField();
 
     virtual SvxFieldData*   Clone() const;
-    virtual int             operator==( const SvxFieldData& ) const;
+    virtual bool            operator==( const SvxFieldData& ) const;
 };
 
 class EDITENG_DLLPUBLIC SvxTableField : public SvxFieldData
@@ -235,7 +235,7 @@ public:
     int GetTab() const;
 
     virtual SvxFieldData*   Clone() const;
-    virtual int             operator==( const SvxFieldData& ) const;
+    virtual bool            operator==( const SvxFieldData& ) const;
 };
 
 
@@ -283,7 +283,7 @@ public:
     static OUString    GetFormatted( Time& rTime, SvxTimeFormat eFormat, SvNumberFormatter& rFormatter, LanguageType eLanguage );
 
     virtual SvxFieldData*   Clone() const;
-    virtual int             operator==( const SvxFieldData& ) const;
+    virtual bool            operator==( const SvxFieldData& ) const;
 
     virtual MetaAction* createBeginComment() const;
 };
@@ -324,7 +324,7 @@ public:
     OUString           GetFormatted() const;
 
     virtual SvxFieldData*   Clone() const;
-    virtual int             operator==( const SvxFieldData& ) const;
+    virtual bool            operator==( const SvxFieldData& ) const;
 };
 
 
@@ -372,7 +372,7 @@ public:
     OUString           GetFormatted() const;
 
     virtual SvxFieldData*   Clone() const;
-    virtual int             operator==( const SvxFieldData& ) const;
+    virtual bool            operator==( const SvxFieldData& ) const;
 };
 
 /** this field is used as a placeholder for a header&footer in impress. The actual
@@ -384,7 +384,7 @@ public:
     SvxHeaderField();
 
     virtual SvxFieldData*   Clone() const;
-    virtual int             operator==( const SvxFieldData& ) const;
+    virtual bool            operator==( const SvxFieldData& ) const;
 };
 
 /** this field is used as a placeholder for a header&footer in impress. The actual
@@ -395,7 +395,7 @@ public:
     SV_DECL_PERSIST1( SvxFooterField, SvxFieldData, com::sun::star::text::textfield::Type::PRESENTATION_FOOTER )
     SvxFooterField();
     virtual SvxFieldData*   Clone() const;
-    virtual int             operator==( const SvxFieldData& ) const;
+    virtual bool            operator==( const SvxFieldData& ) const;
 };
 
 /** this field is used as a placeholder for a header&footer in impress. The actual
@@ -409,7 +409,7 @@ public:
     static OUString    GetFormatted( Date& rDate, Time& rTime, int eFormat, SvNumberFormatter& rFormatter, LanguageType eLanguage );
 
     virtual SvxFieldData*   Clone() const;
-    virtual int             operator==( const SvxFieldData& ) const;
+    virtual bool            operator==( const SvxFieldData& ) const;
 };
 
 
diff --git a/include/editeng/measfld.hxx b/include/editeng/measfld.hxx
index 882b1ee..47adc29d 100644
--- a/include/editeng/measfld.hxx
+++ b/include/editeng/measfld.hxx
@@ -45,7 +45,7 @@ public:
     SdrMeasureField(SdrMeasureFieldKind eNewKind): eMeasureFieldKind(eNewKind) {}
     virtual ~SdrMeasureField();
     virtual SvxFieldData* Clone() const;
-    virtual int operator==(const SvxFieldData&) const;
+    virtual bool operator==(const SvxFieldData&) const;
     SdrMeasureFieldKind GetMeasureFieldKind() const { return eMeasureFieldKind; }
     void SetMeasureFieldKind(SdrMeasureFieldKind eNewKind) { eMeasureFieldKind=eNewKind; }
 };
diff --git a/include/editeng/numitem.hxx b/include/editeng/numitem.hxx
index cd5e83c..2eebd17 100644
--- a/include/editeng/numitem.hxx
+++ b/include/editeng/numitem.hxx
@@ -258,7 +258,7 @@ public:
     virtual ~SvxNumRule();
 
     int                     operator==( const SvxNumRule& ) const;
-    int                     operator!=( const SvxNumRule& rRule ) const {return !(*this == rRule);}
+    bool                    operator!=( const SvxNumRule& rRule ) const {return !(*this == rRule);}
 
     SvxNumRule&             operator=( const SvxNumRule&  );
 
diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx
index 15a781d..1e34d82 100644
--- a/include/editeng/outliner.hxx
+++ b/include/editeng/outliner.hxx
@@ -387,9 +387,9 @@ public:
     long                mnWidthToFill;
 
     // bitfield
-    unsigned            mbEndOfLine : 1;
-    unsigned            mbEndOfParagraph : 1;
-    unsigned            mbEndOfBullet : 1;
+    bool                mbEndOfLine : 1;
+    bool                mbEndOfParagraph : 1;
+    bool                mbEndOfBullet : 1;
 
     sal_uInt8 GetBiDiLevel() const { return mnBiDiLevel; }
     sal_Bool IsRTL() const { return mnBiDiLevel % 2 ? sal_True : sal_False; }
diff --git a/include/editeng/svxrtf.hxx b/include/editeng/svxrtf.hxx
index 808305e..c5f9cc1 100644
--- a/include/editeng/svxrtf.hxx
+++ b/include/editeng/svxrtf.hxx
@@ -267,7 +267,7 @@ protected:
 
     inline SfxItemSet& GetAttrSet();
     // no text yet inserted? (SttPos from the top stack entry!)
-    int IsAttrSttPos();
+    bool IsAttrSttPos();
     void AttrGroupEnd();        // edit the current, delete from stack
     void SetAllAttrOfStk();     // end all Attr. and set it into doc
 
@@ -290,18 +290,18 @@ protected:
                     int bReadNewDoc = sal_True );
     virtual ~SvxRTFParser();
 
-    int IsNewDoc() const                { return bNewDoc; }
-    void SetNewDoc( int bFlag )         { bNewDoc = bFlag; }
-    int IsNewGroup() const              { return bNewGroup; }
-    void SetNewGroup( int bFlag )       { bNewGroup = bFlag; }
-    int IsChkStyleAttr() const          { return bChkStyleAttr; }
-    void SetChkStyleAttr( int bFlag )   { bChkStyleAttr = bFlag; }
-    int IsCalcValue() const             { return bCalcValue; }
-    void SetCalcValue( int bFlag )      { bCalcValue = bFlag; }
-    int IsPardTokenRead() const         { return bPardTokenRead; }
-    void SetPardTokenRead( int bFlag )  { bPardTokenRead = bFlag; }
-    int IsReadDocInfo() const           { return bReadDocInfo; }
-    void SetReadDocInfo( int bFlag )    { bReadDocInfo = bFlag; }
+    bool IsNewDoc() const               { return bNewDoc; }
+    void SetNewDoc( bool bFlag )        { bNewDoc = bFlag; }
+    bool IsNewGroup() const             { return bNewGroup; }
+    void SetNewGroup( bool bFlag )      { bNewGroup = bFlag; }
+    bool IsChkStyleAttr() const         { return bChkStyleAttr; }
+    void SetChkStyleAttr( bool bFlag )  { bChkStyleAttr = bFlag; }
+    bool IsCalcValue() const            { return bCalcValue; }
+    void SetCalcValue( bool bFlag )     { bCalcValue = bFlag; }
+    bool IsPardTokenRead() const        { return bPardTokenRead; }
+    void SetPardTokenRead( bool bFlag ) { bPardTokenRead = bFlag; }
+    bool IsReadDocInfo() const          { return bReadDocInfo; }
+    void SetReadDocInfo( bool bFlag )   { bReadDocInfo = bFlag; }
 
     // Query/Set the current insert position
     SvxPosition& GetInsPos() const      { return *pInsPos; }
@@ -328,7 +328,7 @@ public:
     inline const Color& GetColor( size_t nId ) const;
     const Font& GetFont( sal_uInt16 nId );      // Changes the dflt Font
 
-    virtual int IsEndPara( SvxNodeIdx* pNd, xub_StrLen nCnt ) const = 0;
+    virtual bool IsEndPara( SvxNodeIdx* pNd, xub_StrLen nCnt ) const = 0;
 
     // to det a different attribute pool. May only be done prior to CallParser!
     // The maps are not generated anew!
commit d24134b6a2e6a557bfa17f521e18a01b17e24d98
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Jan 14 21:09:22 2014 +0100

    This shall likely comp. m_eCurrentConversionDirection to HHC::eHangulToHanja
    
    Change-Id: Ib4eba9f6386214d010c880ad15bcacce7665a3af

diff --git a/editeng/source/misc/hangulhanja.cxx b/editeng/source/misc/hangulhanja.cxx
index 248dbfd..aa952b8 100644
--- a/editeng/source/misc/hangulhanja.cxx
+++ b/editeng/source/misc/hangulhanja.cxx
@@ -313,7 +313,7 @@ namespace editeng
     {
         sal_Int16 nConversionType = -1;
         if (m_eConvType == HHC::eConvHangulHanja)
-            nConversionType = HHC::eHangulToHanja == ( m_eCurrentConversionDirection && !bSwitchDirection ) ? TO_HANJA : TO_HANGUL;
+            nConversionType = ( HHC::eHangulToHanja == m_eCurrentConversionDirection && !bSwitchDirection ) ? TO_HANJA : TO_HANGUL;
         else if (m_eConvType == HHC::eConvSimplifiedTraditional)
             nConversionType = LANGUAGE_CHINESE_SIMPLIFIED == m_nTargetLang ? TO_SCHINESE : TO_TCHINESE;
         DBG_ASSERT( nConversionType != -1, "unexpected conversion type" );
commit 54a6b3d7b24bb041f137015feb4e6a9a11891005
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Jan 14 20:46:30 2014 +0100

    bool improvements
    
    Change-Id: I89c35503d22797c5d5117e298f04e953de03044a

diff --git a/include/oox/core/contexthandler2.hxx b/include/oox/core/contexthandler2.hxx
index 48edd9a..db47186 100644
--- a/include/oox/core/contexthandler2.hxx
+++ b/include/oox/core/contexthandler2.hxx
@@ -157,7 +157,7 @@ public:
 
     /** Returns true, if nElement contains the identifier of the specified
         parent element. */
-    sal_Int32    isParentElement( sal_Int32 nElement, sal_Int32 nCountBack = 1 ) const
+    bool isParentElement( sal_Int32 nElement, sal_Int32 nCountBack = 1 ) const
                             { return getParentElement( nCountBack ) == nElement; }
 
     /** Returns true, if the element currently processed is the root element of
diff --git a/oox/source/drawingml/chart/titleconverter.cxx b/oox/source/drawingml/chart/titleconverter.cxx
index c6d0824..5f4f5ea 100644
--- a/oox/source/drawingml/chart/titleconverter.cxx
+++ b/oox/source/drawingml/chart/titleconverter.cxx
@@ -209,7 +209,7 @@ void LegendConverter::convertFromModel( const Reference< XDiagram >& rxDiagram )
         cssc2::LegendPosition eLegendPos = cssc2::LegendPosition_CUSTOM;
         cssc::ChartLegendExpansion eLegendExpand = cssc::ChartLegendExpansion_CUSTOM;
         RelativePosition eRelPos;
-        bool bTopRight=0;
+        bool bTopRight=false;
         switch( mrModel.mnPosition )
         {
             case XML_l:
@@ -225,7 +225,7 @@ void LegendConverter::convertFromModel( const Reference< XDiagram >& rxDiagram )
                 eRelPos.Primary = 1;
                 eRelPos.Secondary =0;
                 eRelPos.Anchor = Alignment_TOP_RIGHT;
-                bTopRight=1;
+                bTopRight=true;
 
             break;
             case XML_t:
@@ -252,7 +252,7 @@ void LegendConverter::convertFromModel( const Reference< XDiagram >& rxDiagram )
         aPropSet.setProperty( PROP_AnchorPosition, eLegendPos );
         aPropSet.setProperty( PROP_Expansion, eLegendExpand );
 
-        if(eLegendPos == LegendPosition_CUSTOM && 1 == bTopRight && bManualLayout==false)
+        if(eLegendPos == LegendPosition_CUSTOM && bTopRight && bManualLayout==false)
             aPropSet.setProperty( PROP_RelativePosition , makeAny(eRelPos));
     }
     catch( Exception& )
diff --git a/oox/source/ole/axbinarywriter.cxx b/oox/source/ole/axbinarywriter.cxx
index 3f71dc2..a6408b2 100644
--- a/oox/source/ole/axbinarywriter.cxx
+++ b/oox/source/ole/axbinarywriter.cxx
@@ -142,8 +142,8 @@ AxBinaryPropertyWriter::AxBinaryPropertyWriter( BinaryOutputStream& rOutStrm, bo
 
 void AxBinaryPropertyWriter::writeBoolProperty( bool orbValue, bool bReverse )
 {
-    // orbValue ^ bReverse true then we want to set the bit, e.g. don't skip
-    startNextProperty(  !( ( orbValue ^ bReverse ) >= 1 ) );
+    // orbValue == bReverse false then we want to set the bit, e.g. don't skip
+    startNextProperty( orbValue == bReverse );
 }
 
 void AxBinaryPropertyWriter::writePairProperty( AxPairData& orPairData )
commit e8ba3d51609238c365ab471ee622513e8b30d721
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Jan 14 20:46:05 2014 +0100

    mnMultiSelect takes AX_SELECTION_* values
    
    Change-Id: I1918f91ec070761a8fe9d04058820af1c7880678

diff --git a/oox/source/ole/axcontrol.cxx b/oox/source/ole/axcontrol.cxx
index a2c4190..98c65c6 100644
--- a/oox/source/ole/axcontrol.cxx
+++ b/oox/source/ole/axcontrol.cxx
@@ -2592,7 +2592,7 @@ HtmlSelectModel::importBinaryModel( BinaryInputStream& rInStrm )
         if ( !nToken ) // first line will tell us if multiselect is enabled
         {
             if ( sLine == sMultiple )
-                mnMultiSelect = true;
+                mnMultiSelect = AX_SELECTION_MULTI;
         }
         // skip first and last lines, no data there
         else if ( nToken < nTokenCount - 1)
commit 9a560bb7bd1915de8e444c17fe936ae31071cea6
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Jan 14 20:45:29 2014 +0100

    Be explicit when using bool as integral value
    
    Change-Id: Ib9810cbc96fab5218a497985aac80cbd7c0c188d

diff --git a/oox/source/ppt/slidetransitioncontext.cxx b/oox/source/ppt/slidetransitioncontext.cxx
index 4f17460..b7f97f6 100644
--- a/oox/source/ppt/slidetransitioncontext.cxx
+++ b/oox/source/ppt/slidetransitioncontext.cxx
@@ -90,7 +90,7 @@ SlideTransitionContext::~SlideTransitionContext() throw()
         if (!mbHasTransition)
         {
             mbHasTransition = true;
-            maTransition.setOoxTransitionType( aElementToken, rAttribs.getBool( XML_thruBlk, false ), 0);
+            maTransition.setOoxTransitionType( aElementToken, sal_Int32(rAttribs.getBool( XML_thruBlk, false )), 0);
         }
         return this;
     case PPT_TOKEN( push ):
commit 66d19856c57d8019c73b09bb3e98aebac50276d5
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Jan 14 20:44:34 2014 +0100

    bool improvements
    
    Change-Id: Ia940d5a064f60c147e743e9e28ac2252cebff840

diff --git a/linguistic/source/defs.hxx b/linguistic/source/defs.hxx
index f6eaa34..c7ecb73 100644
--- a/linguistic/source/defs.hxx
+++ b/linguistic/source/defs.hxx
@@ -56,10 +56,10 @@ struct LangSvcEntries
         aSvcImplNames[0] = rSvcImplName;
     }
 
-    bool    IsAlreadyWarned() const         { return bAlreadyWarned != 0; }
-    void    SetAlreadyWarned( bool bVal )   { bAlreadyWarned = 0 != bVal; }
-    bool    IsDoWarnAgain() const           { return bDoWarnAgain != 0; }
-    void    SetDoWarnAgain( bool bVal )     { bDoWarnAgain = 0 != bVal; }
+    bool    IsAlreadyWarned() const         { return bAlreadyWarned; }
+    void    SetAlreadyWarned( bool bVal )   { bAlreadyWarned = bVal; }
+    bool    IsDoWarnAgain() const           { return bDoWarnAgain; }
+    void    SetDoWarnAgain( bool bVal )     { bDoWarnAgain = bVal; }
 
     inline void Clear()
     {
commit 459c8131ac6951acaa7f65646ca1c13f671b4012
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Jan 14 20:44:06 2014 +0100

    bool improvements
    
    Change-Id: Iba5bf2d2207f80098cb43ff8ce290eef741d21c9

diff --git a/forms/source/runtime/formoperations.cxx b/forms/source/runtime/formoperations.cxx
index 083844e..3e0d8d4 100644
--- a/forms/source/runtime/formoperations.cxx
+++ b/forms/source/runtime/formoperations.cxx
@@ -132,7 +132,7 @@ namespace frm
         ,m_bActiveControlModified( false )
         ,m_bConstructed( false )
     #ifdef DBG_UTIL
-        ,m_nMethodNestingLevel( false )
+        ,m_nMethodNestingLevel( 0 )
     #endif
     {
     }
diff --git a/forms/source/xforms/computedexpression.cxx b/forms/source/xforms/computedexpression.cxx
index 306dbd9..809f80f 100644
--- a/forms/source/xforms/computedexpression.cxx
+++ b/forms/source/xforms/computedexpression.cxx
@@ -98,11 +98,11 @@ bool ComputedExpression::_checkExpression( const sal_Char* pExpression ) const
     sal_Int32 nLength =  msExpression.getLength();
     sal_Int32 nStart = 0;
     sal_Int32 nEnd = nLength;
-    int nSearch = aTextSearch.SearchForward( msExpression, &nStart, &nEnd );
+    bool nSearch = aTextSearch.SearchForward( msExpression, &nStart, &nEnd );
 
     // our expression is static only if 1) we found our regexp, and 2)
     // the regexp goes from beginning to end.
-    return ( nLength == 0  ||  nSearch != 0 )
+    return ( nLength == 0  ||  nSearch )
         && ( nStart == 0  &&  nEnd == nLength );
 }
 
commit 058324532ea07f3388e8d2a893fec590b8e8add8
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Jan 14 20:43:30 2014 +0100

    bool improvements
    
    Change-Id: I4733554d3329525516511bbd60b9ad3fabc12be0

diff --git a/filter/source/graphicfilter/icgm/bitmap.cxx b/filter/source/graphicfilter/icgm/bitmap.cxx
index 995bbe2..09f5adc 100644
--- a/filter/source/graphicfilter/icgm/bitmap.cxx
+++ b/filter/source/graphicfilter/icgm/bitmap.cxx
@@ -287,7 +287,7 @@ sal_Bool CGMBitmap::ImplGetDimensions( CGMBitmapDescriptor& rDesc )
     if ( ( rDesc.mnCompressionMode = mpCGM->ImplGetUI16() ) != 1 )
         rDesc.mbStatus = sal_False;
 
-    if ( ( rDesc.mnX || rDesc.mnY ) == 0 )
+    if ( !( rDesc.mnX || rDesc.mnY ) )
         rDesc.mbStatus = sal_False;
 
     sal_uInt32 nHeaderSize = 2 + 3 * nPrecision + 3 * mpCGM->ImplGetPointSize();
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 3d047a0..e6d882f 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -4456,7 +4456,7 @@ void PPTCharPropSet::ImplMakeUnique()
 void PPTCharPropSet::SetFont( sal_uInt16 nFont )
 {
     sal_uInt32  nMask = 1 << PPT_CharAttr_Font;
-    sal_uInt32  bDoNotMake = pCharSet->mnAttrSet & nMask;
+    bool bDoNotMake = (pCharSet->mnAttrSet & nMask) != 0;
 
     if ( bDoNotMake )
         bDoNotMake = nFont == pCharSet->mnFont;
diff --git a/filter/source/xsltdialog/xmlfiltercommon.hxx b/filter/source/xsltdialog/xmlfiltercommon.hxx
index af2e6f7..92d081a 100644
--- a/filter/source/xsltdialog/xmlfiltercommon.hxx
+++ b/filter/source/xsltdialog/xmlfiltercommon.hxx
@@ -71,7 +71,7 @@ public:
 
     filter_info_impl();
     filter_info_impl( const filter_info_impl& rInfo );
-    int operator==( const filter_info_impl& ) const;
+    bool operator==( const filter_info_impl& ) const;
 
     com::sun::star::uno::Sequence< OUString > getFilterUserData() const;
 };
diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
index b7765e2..c060691 100644
--- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
@@ -1574,28 +1574,24 @@ filter_info_impl::filter_info_impl( const filter_info_impl& rInfo ) :
 
 // -----------------------------------------------------------------------
 
-int filter_info_impl::operator==( const filter_info_impl& r ) const
+bool filter_info_impl::operator==( const filter_info_impl& r ) const
 {
-    if( maFilterName != r.maFilterName ||
-        maType != r.maType ||
-        maDocumentService != r.maDocumentService ||
-        maFilterService != r.maFilterService ||
-        maInterfaceName != r.maInterfaceName ||
-        maComment != r.maComment ||
-        maExtension != r.maExtension ||
-        maDocType != r.maDocType ||
-        maExportXSLT != r.maExportXSLT ||
-        maImportXSLT != r.maImportXSLT ||
-        maExportService != r.maExportService ||
-        maImportService != r.maImportService ||
-        maImportTemplate != r.maImportTemplate ||
-        maFlags != r.maFlags ||
-        maFileFormatVersion != r.maFileFormatVersion ||
-        mbNeedsXSLT2 != r.mbNeedsXSLT2
-        )
-        return false;
-
-    return true;
+    return maFilterName == r.maFilterName &&
+        maType == r.maType &&
+        maDocumentService == r.maDocumentService &&
+        maFilterService == r.maFilterService &&
+        maInterfaceName == r.maInterfaceName &&
+        maComment == r.maComment &&
+        maExtension == r.maExtension &&
+        maDocType == r.maDocType &&
+        maExportXSLT == r.maExportXSLT &&
+        maImportXSLT == r.maImportXSLT &&
+        maExportService == r.maExportService &&
+        maImportService == r.maImportService &&
+        maImportTemplate == r.maImportTemplate &&
+        maFlags == r.maFlags &&
+        maFileFormatVersion == r.maFileFormatVersion &&
+        mbNeedsXSLT2 == r.mbNeedsXSLT2;
 }
 
 // -----------------------------------------------------------------------
commit 2dbed8bc8bf189fef40eb6b5d9cf453b59e83099
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Jan 14 20:43:06 2014 +0100

    Be explicit when using bool as integral value
    
    Change-Id: Ia55702e1ce7ca153de6e82abfce731bb8fc21977

diff --git a/filter/source/flash/swfwriter.cxx b/filter/source/flash/swfwriter.cxx
index 0a6e5627..6737176 100644
--- a/filter/source/flash/swfwriter.cxx
+++ b/filter/source/flash/swfwriter.cxx
@@ -223,9 +223,9 @@ void Writer::placeShape( sal_uInt16 nID, sal_uInt16 nDepth, sal_Int32 x, sal_Int
 
     BitStream aBits;
 
-    aBits.writeUB( nClip != 0, 1 );     // Has Clip Actions?
+    aBits.writeUB( sal_uInt32(nClip != 0), 1 ); // Has Clip Actions?
     aBits.writeUB( 0, 1 );              // reserved
-    aBits.writeUB( pName != NULL, 1 );  // has a name
+    aBits.writeUB( sal_uInt32(pName != NULL), 1 ); // has a name
     aBits.writeUB( 0, 1 );              // no ratio
     aBits.writeUB( 0, 1 );              // no color transform
     aBits.writeUB( 1, 1 );              // has a matrix
diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx
index 5b2dce1..6efcd51 100644
--- a/filter/source/flash/swfwriter1.cxx
+++ b/filter/source/flash/swfwriter1.cxx
@@ -181,7 +181,7 @@ void Writer::Impl_addShapeRecordChange( BitStream& rBits, sal_Int16 dx, sal_Int1
 {
     rBits.writeUB( 0, 1 );          // TypeFlag
     rBits.writeUB( 0, 1 );          // StateNewStyles
-    rBits.writeUB( !bFilled, 1 );   // StateLineStyle
+    rBits.writeUB( sal_uInt32(!bFilled), 1 ); // StateLineStyle
     rBits.writeUB( 0, 1 );          // StateFillStyle0
     rBits.writeUB( bFilled, 1 );        // StateFillStyle1
     rBits.writeUB( 1, 1 );          // StateMoveTo
@@ -218,7 +218,7 @@ void Writer::Impl_addStraightEdgeRecord( BitStream& rBits, sal_Int16 dx, sal_Int
     else
     {
         rBits.writeUB( 0, 1 );
-        rBits.writeUB( ( dx == 0 ), 1 );
+        rBits.writeUB( sal_uInt32( dx == 0 ), 1 );
         if( dx == 0 )
         {
             rBits.writeSB( dy, nBits );     // DeltaY
@@ -855,7 +855,7 @@ sal_uInt16 Writer::defineBitmap( const BitmapEx &bmpSource, sal_Int32 nJPEGQuali
 
     GraphicFilter aFilter;
 
-    Sequence< PropertyValue > aFilterData(nJPEGQualityLevel != -1);
+    Sequence< PropertyValue > aFilterData(sal_Int32(nJPEGQualityLevel != -1));
     if( nJPEGQualityLevel != -1 )
     {
         aFilterData[0].Name = "Quality";
commit 854da46a4b5e201e20841c20a740210b97b2583b
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Jan 14 20:40:31 2014 +0100

    This shall probably use the value of getMaxColumnsInIndex()
    
    Change-Id: I1ae85e416440768ab40c817506d5b106289c4d72

diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx
index 49c3173..ceba53a 100644
--- a/dbaccess/source/ui/tabledesign/TableController.cxx
+++ b/dbaccess/source/ui/tabledesign/TableController.cxx
@@ -493,7 +493,7 @@ void OTableController::doEditIndexes()
     if (!xIndexes.is())
         return;
 
-    DbaIndexDialog aDialog(getView(), aFieldNames, xIndexes, getConnection(), getORB(), isConnected() ? getConnection()->getMetaData().is() && getConnection()->getMetaData()->getMaxColumnsInIndex() : sal_Int32(0));
+    DbaIndexDialog aDialog(getView(), aFieldNames, xIndexes, getConnection(), getORB(), isConnected() && getConnection()->getMetaData().is() ? getConnection()->getMetaData()->getMaxColumnsInIndex() : 0);
     if (RET_OK != aDialog.Execute())
         return;
 
commit 67afa78a4b4b815a798a5915a409a2ade9b67cf5
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Jan 14 20:39:11 2014 +0100

    bool improvements
    
    Change-Id: Ie957ab2b63facc15a990f22347ce2393f6bb6a44

diff --git a/dbaccess/source/ui/app/AppControllerDnD.cxx b/dbaccess/source/ui/app/AppControllerDnD.cxx
index f4d65fc..104984a 100644
--- a/dbaccess/source/ui/app/AppControllerDnD.cxx
+++ b/dbaccess/source/ui/app/AppControllerDnD.cxx
@@ -501,7 +501,7 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH
     SharedConnection xConnection( ensureConnection() );
     Reference< XNameAccess > xDocContainer;
 
-    if ( ( _eType == E_FORM ) | ( _eType == E_REPORT ) )
+    if ( ( _eType == E_FORM ) || ( _eType == E_REPORT ) )
     {
         xDocContainer.set( getElements( _eType ) );
         OSL_ENSURE( xDocContainer.is(), "OApplicationController::getDocumentsAccess: invalid container!" );
commit 7700d10eee335256815763d4f8d4fb91ddab9cd2
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Jan 14 20:37:40 2014 +0100

    bool improvements
    
    Change-Id: Idc397c918980ba4bb47fb73fbd0e6dd11fb6d0b7

diff --git a/cui/source/dialogs/SpellAttrib.hxx b/cui/source/dialogs/SpellAttrib.hxx
index 0e945e4..1605aaa 100644
--- a/cui/source/dialogs/SpellAttrib.hxx
+++ b/cui/source/dialogs/SpellAttrib.hxx
@@ -78,7 +78,7 @@ struct SpellErrorDescription
                 sRuleId = *pRuleId;
         };
 
-    int operator==( const SpellErrorDescription& rDesc ) const
+    bool operator==( const SpellErrorDescription& rDesc ) const
     {
         return bIsGrammarError == rDesc.bIsGrammarError &&
                 sErrorText.equals( rDesc.sErrorText ) &&
diff --git a/cui/source/inc/swpossizetabpage.hxx b/cui/source/inc/swpossizetabpage.hxx
index 2463bd7..29289ca 100644
--- a/cui/source/inc/swpossizetabpage.hxx
+++ b/cui/source/inc/swpossizetabpage.hxx
@@ -88,7 +88,6 @@ class SvxSwPosSizeTabPage : public SfxTabPage
     short   m_nOldVRel;
 
     double  m_fWidthHeightRatio; //width-to-height ratio to support the KeepRatio button
-    sal_uInt16  m_nHtmlMode;
     bool    m_bHtmlMode;
     bool    m_bAtHoriPosModified;
     bool    m_bAtVertPosModified;
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index e1e598d..526d1e5 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -1034,9 +1034,9 @@ sal_Bool SvxBackgroundTabPage::FillItemSetWithWallpaperItem( SfxItemSet& rCoreSe
             // Bitmap-treatment:
             SvxGraphicPosition  eNewPos  = GetGraphicPosition_Impl();
 
-            int bBitmapChanged = ( ( eNewPos != eOldPos ) ||
+            bool bBitmapChanged = ( ( eNewPos != eOldPos ) ||
                                    ( rOldItem.GetGraphicLink() != aBgdGraphicPath ) );
-            int bBrushChanged = ( rOldItem.GetColor() != aBgdColor );
+            bool bBrushChanged = ( rOldItem.GetColor() != aBgdColor );
             if( bBitmapChanged || bBrushChanged )
             {
                 bModified = sal_True;
diff --git a/cui/source/tabpages/swpossizetabpage.cxx b/cui/source/tabpages/swpossizetabpage.cxx
index 69d97bf..3fb4910 100644
--- a/cui/source/tabpages/swpossizetabpage.cxx
+++ b/cui/source/tabpages/swpossizetabpage.cxx
@@ -511,7 +511,6 @@ SvxSwPosSizeTabPage::SvxSwPosSizeTabPage(Window* pParent, const SfxItemSet& rInA
     , m_nOldV(VertOrientation::TOP)
     , m_nOldVRel(RelOrientation::PRINT_AREA)
     , m_fWidthHeightRatio(1.0)
-    , m_nHtmlMode(0)
     , m_bHtmlMode(false)
     , m_bAtHoriPosModified(false)
     , m_bAtVertPosModified(false)
@@ -944,8 +943,11 @@ void SvxSwPosSizeTabPage::Reset( const SfxItemSet& rSet)
 
     pItem = GetItem( rSet, SID_HTML_MODE );
     if(pItem)
-        m_nHtmlMode = static_cast<const SfxUInt16Item*>(pItem)->GetValue();
-    m_bHtmlMode = 0 != (m_bHtmlMode & HTMLMODE_ON);
+    {
+        m_bHtmlMode =
+            (static_cast<const SfxUInt16Item*>(pItem)->GetValue() & HTMLMODE_ON)
+            != 0;
+    }
 
     pItem = GetItem( rSet, SID_ATTR_TRANSFORM_IN_VERTICAL_TEXT );
     if(pItem && static_cast<const SfxBoolItem*>(pItem)->GetValue())
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index c677ee3..2942c83 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -87,7 +87,7 @@ void SvxColorTabPage::SetEmbed( bool bEmbed )
 bool SvxColorTabPage::GetEmbed()
 {
     XPropertyListRef pList = GetList();
-    return pList.is() ? pList->IsEmbedInDocument() : 0;
+    return pList.is() && pList->IsEmbedInDocument();
 }
 
 IMPL_LINK_NOARG(SvxColorTabPage, EmbedToggleHdl_Impl)
commit d8bbe0ede2d5f07a92772dfa04ace97751128005
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Jan 14 20:35:20 2014 +0100

    EndDialog takes long nResult, not bool
    
    Change-Id: Ic6283b7a71a5d1c539ae99155f448e34e877080a

diff --git a/cui/source/dialogs/thesdlg.cxx b/cui/source/dialogs/thesdlg.cxx
index 6ae616a..0aecd52 100644
--- a/cui/source/dialogs/thesdlg.cxx
+++ b/cui/source/dialogs/thesdlg.cxx
@@ -518,7 +518,7 @@ SvxThesaurusDialog::SvxThesaurusDialog(
 
 IMPL_LINK( SvxThesaurusDialog, ReplaceBtnHdl_Impl, Button *, EMPTYARG /*pBtn*/ )
 {
-    EndDialog(true);
+    EndDialog(RET_OK);
     return 0;
 }
 
diff --git a/cui/source/options/certpath.cxx b/cui/source/options/certpath.cxx
index 89dc712..f1873b0 100644
--- a/cui/source/options/certpath.cxx
+++ b/cui/source/options/certpath.cxx
@@ -135,7 +135,7 @@ IMPL_LINK_NOARG(CertPathDialog, OKHdl_Impl)
         SAL_WARN("cui.options", "CertPathDialog::OKHdl_Impl(): caught exception" << e.Message);
     }
 
-    EndDialog(true);
+    EndDialog(RET_OK);
 
     return 0;
 }
diff --git a/desktop/source/deployment/gui/license_dialog.cxx b/desktop/source/deployment/gui/license_dialog.cxx
index da65564..f675661 100644
--- a/desktop/source/deployment/gui/license_dialog.cxx
+++ b/desktop/source/deployment/gui/license_dialog.cxx
@@ -225,13 +225,13 @@ LicenseDialogImpl::LicenseDialogImpl(
 
 IMPL_LINK_NOARG(LicenseDialogImpl, AcceptHdl)
 {
-    EndDialog(true);
+    EndDialog(RET_OK);
     return 0;
 }
 
 IMPL_LINK_NOARG(LicenseDialogImpl, CancelHdl)
 {
-    EndDialog(false);
+    EndDialog(RET_CANCEL);
     return 0;
 }
 
diff --git a/sfx2/source/dialog/inputdlg.cxx b/sfx2/source/dialog/inputdlg.cxx
index b67f389..d46c9ae 100644
--- a/sfx2/source/dialog/inputdlg.cxx
+++ b/sfx2/source/dialog/inputdlg.cxx
@@ -33,7 +33,7 @@ OUString InputDialog::getEntryText() const
 
 IMPL_LINK(InputDialog,ClickHdl,PushButton*, pButton)
 {
-    EndDialog(pButton == m_pOK ? true : false);
+    EndDialog(pButton == m_pOK ? RET_OK : RET_CANCEL);
     return 0;
 }
 
diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx
index 01b34f9..2ec5104 100644
--- a/svx/source/tbxctrls/fontworkgallery.cxx
+++ b/svx/source/tbxctrls/fontworkgallery.cxx
@@ -247,7 +247,7 @@ void FontWorkGalleryDialog::insertSelectedFontwork()
 IMPL_LINK_NOARG(FontWorkGalleryDialog, ClickOKHdl)
 {
     insertSelectedFontwork();
-    EndDialog( true );
+    EndDialog( RET_OK );
     return 0;
 }
 
@@ -256,7 +256,7 @@ IMPL_LINK_NOARG(FontWorkGalleryDialog, ClickOKHdl)
 IMPL_LINK_NOARG(FontWorkGalleryDialog, DoubleClickFavoriteHdl)
 {
     insertSelectedFontwork();
-    EndDialog( true );
+    EndDialog( RET_OK );
     return( 0L );
 }
 
commit 4ebeb52a234d4e5c8de0de4b02bf3def5351d735
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Jan 14 20:31:43 2014 +0100

    Dialog::Execute does not return bool
    
    Change-Id: I4d1c0b6f0586e2ff7adc5aae524a14c9eaa2dc3b

diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 590d9de..87414e4 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -2516,9 +2516,7 @@ IMPL_LINK( SvxMenuConfigPage, MenuSelectHdl, MenuButton *, pButton )
             pNameDialog->SetHelpId( HID_SVX_CONFIG_RENAME_MENU );
             pNameDialog->SetText( CUI_RESSTR( RID_SVXSTR_RENAME_MENU ) );
 
-            bool ret = pNameDialog->Execute();
-
-            if ( ret == RET_OK ) {
+            if ( pNameDialog->Execute() == RET_OK ) {
                 pNameDialog->GetName( aNewName );
                 pMenuData->SetName( aNewName );
 
@@ -2540,9 +2538,7 @@ IMPL_LINK( SvxMenuConfigPage, MenuSelectHdl, MenuButton *, pButton )
                 new SvxMainMenuOrganizerDialog( this,
                     GetSaveInData()->GetEntries(), pMenuData );
 
-            bool ret = pDialog->Execute();
-
-            if ( ret == RET_OK )
+            if ( pDialog->Execute() == RET_OK )
             {
                 GetSaveInData()->SetEntries( pDialog->GetEntries() );
 
@@ -2574,9 +2570,7 @@ IMPL_LINK( SvxMenuConfigPage, EntrySelectHdl, MenuButton *, pButton )
             pNameDialog->SetHelpId( HID_SVX_CONFIG_NAME_SUBMENU );
             pNameDialog->SetText( CUI_RESSTR( RID_SVXSTR_ADD_SUBMENU ) );
 
-            bool ret = pNameDialog->Execute();
-
-            if ( ret == RET_OK ) {
+            if ( pNameDialog->Execute() == RET_OK ) {
                 pNameDialog->GetName(aNewName);
 
                 SvxConfigEntry* pNewEntryData =
@@ -2620,9 +2614,7 @@ IMPL_LINK( SvxMenuConfigPage, EntrySelectHdl, MenuButton *, pButton )
             pNameDialog->SetHelpId( HID_SVX_CONFIG_RENAME_MENU_ITEM );
             pNameDialog->SetText( CUI_RESSTR( RID_SVXSTR_RENAME_MENU ) );
 
-            bool ret = pNameDialog->Execute();
-
-            if ( ret == RET_OK ) {
+            if ( pNameDialog->Execute() == RET_OK ) {
                 pNameDialog->GetName(aNewName);
 
                 pEntry->SetName( aNewName );
@@ -2667,9 +2659,7 @@ IMPL_LINK( SvxMenuConfigPage, NewMenuHdl, Button *, pButton )
         new SvxMainMenuOrganizerDialog( 0,
             GetSaveInData()->GetEntries(), NULL, sal_True );
 
-    bool ret = pDialog->Execute();
-
-    if ( ret == RET_OK )
+    if ( pDialog->Execute() == RET_OK )
     {
         GetSaveInData()->SetEntries( pDialog->GetEntries() );
         ReloadTopLevelListBox( pDialog->GetSelectedEntry() );
@@ -3215,9 +3205,7 @@ IMPL_LINK( SvxToolbarConfigPage, ToolbarSelectHdl, MenuButton *, pButton )
             pNameDialog->SetHelpId( HID_SVX_CONFIG_RENAME_TOOLBAR );
             pNameDialog->SetText( CUI_RESSTR( RID_SVXSTR_RENAME_TOOLBAR ) );
 
-            bool ret = pNameDialog->Execute();
-
-            if ( ret == RET_OK )
+            if ( pNameDialog->Execute() == RET_OK )
             {
                 pNameDialog->GetName(aNewName);
 
@@ -3306,9 +3294,7 @@ IMPL_LINK( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton )
             pNameDialog->SetHelpId( HID_SVX_CONFIG_RENAME_TOOLBAR_ITEM );
             pNameDialog->SetText( CUI_RESSTR( RID_SVXSTR_RENAME_TOOLBAR ) );
 
-            bool ret = pNameDialog->Execute();
-
-            if ( ret == RET_OK ) {
+            if ( pNameDialog->Execute() == RET_OK ) {
                 pNameDialog->GetName(aNewName);
 
                 pEntry->SetName( aNewName );
@@ -3441,9 +3427,7 @@ IMPL_LINK( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton )
                     GetSaveInData()->GetImageManager(),
                     GetSaveInData()->GetParentImageManager() );
 
-            bool ret = pIconDialog->Execute();
-
-            if ( ret == RET_OK )
+            if ( pIconDialog->Execute() == RET_OK )
             {
                 uno::Reference< graphic::XGraphic > newgraphic =
                     pIconDialog->GetSelectedIcon();
@@ -4591,8 +4575,7 @@ IMPL_LINK( SvxToolbarConfigPage, NewToolbarHdl, Button *, pButton )
     pNameDialog->m_pSaveInListBox->SelectEntryPos(
         aSaveInListBox.GetSelectEntryPos(), sal_True );
 
-    bool ret = pNameDialog->Execute();
-    if ( ret == RET_OK )
+    if ( pNameDialog->Execute() == RET_OK )
     {
         aNewName = pNameDialog->GetName();
 
@@ -5197,9 +5180,7 @@ IMPL_LINK( SvxIconSelectorDialog, DeleteHdl, PushButton *, pButton )
     (void)pButton;
 
     OUString message = CUI_RES( RID_SVXSTR_DELETE_ICON_CONFIRM );
-    bool ret = WarningBox( this, WinBits(WB_OK_CANCEL), message ).Execute();
-
-    if ( ret == RET_OK )
+    if ( WarningBox( this, WinBits(WB_OK_CANCEL), message ).Execute() == RET_OK )
     {
         sal_uInt16 nCount = aTbSymbol.GetItemCount();
 
diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx
index 08cfbc5..3d0919e 100644
--- a/cui/source/options/optaboutconfig.cxx
+++ b/cui/source/options/optaboutconfig.cxx
@@ -526,8 +526,7 @@ IMPL_LINK_NOARG( CuiAboutConfigTabPage, StandardHdl_Impl )
 
             CuiAboutConfigValueDialog* pValueDialog = new CuiAboutConfigValueDialog(0, sDialogValue, limit);
 
-            bool ret = pValueDialog->Execute();
-            if( ret == RET_OK )
+            if( pValueDialog->Execute() == RET_OK )
             {
                 sNewValue = pValueDialog->getValue();
                 if ( sPropertyType == "short")


More information about the Libreoffice-commits mailing list