[Libreoffice-commits] core.git: editeng/source filter/source idl/inc sc/source sd/source vcl/source

Chris Sherlock chris.sherlock79 at gmail.com
Wed Feb 3 13:25:30 UTC 2016


 editeng/source/outliner/outlundo.hxx      |    2 +-
 filter/source/graphicfilter/ipcx/ipcx.cxx |   24 ++++++++++++------------
 idl/inc/bastype.hxx                       |   26 +++++++++++++-------------
 sc/source/core/tool/rangeutl.cxx          |    8 ++++----
 sc/source/filter/inc/xcl97rec.hxx         |    2 +-
 sc/source/filter/xcl97/xcl97rec.cxx       |    6 +++---
 sd/source/ui/dlg/navigatr.cxx             |   10 +++++-----
 vcl/source/window/winproc.cxx             |    6 +++---
 8 files changed, 42 insertions(+), 42 deletions(-)

New commits:
commit 8db902785ed40ef388218bd5068f14f5d4bedd69
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date:   Thu Feb 4 00:23:52 2016 +1100

    tdf#94269 Replace "n" prefix for bool variables with "b"
    
    Change-Id: I8999dc2701010424ea4d2504e99ed429030d7d4e

diff --git a/editeng/source/outliner/outlundo.hxx b/editeng/source/outliner/outlundo.hxx
index cb36c57..adc1554 100644
--- a/editeng/source/outliner/outlundo.hxx
+++ b/editeng/source/outliner/outlundo.hxx
@@ -69,7 +69,7 @@ private:
 public:
     OutlinerUndoChangeParaNumberingRestart( Outliner* pOutliner, sal_Int32 nPara,
         sal_Int16 nOldNumberingStartValue, sal_Int16 mnNewNumberingStartValue,
-        bool  nOldbParaIsNumberingRestart, bool nbNewParaIsNumberingRestart );
+        bool  bOldbParaIsNumberingRestart, bool bNewParaIsNumberingRestart );
 
     virtual void    Undo() override;
     virtual void    Redo() override;
diff --git a/filter/source/graphicfilter/ipcx/ipcx.cxx b/filter/source/graphicfilter/ipcx/ipcx.cxx
index 33308a0..6710f5d 100644
--- a/filter/source/graphicfilter/ipcx/ipcx.cxx
+++ b/filter/source/graphicfilter/ipcx/ipcx.cxx
@@ -43,7 +43,7 @@ private:
     sal_uInt16          nResX, nResY;       // resolution in pixel per inch oder 0,0
     sal_uInt16          nDestBitsPerPixel;  // bits per pixel in destination bitmap 1,4,8 or 24
     sal_uInt8*          pPalette;
-    bool                nStatus;            // from now on do not read status from stream ( SJ )
+    bool                bStatus;            // from now on do not read status from stream ( SJ )
 
 
     void                ImplReadBody(BitmapWriteAccess * pAcc);
@@ -72,7 +72,7 @@ PCXReader::PCXReader(SvStream &rStream)
     , nResX(0)
     , nResY(0)
     , nDestBitsPerPixel(0)
-    , nStatus(false)
+    , bStatus(false)
 {
     pPalette = new sal_uInt8[ 768 ];
 }
@@ -91,12 +91,12 @@ bool PCXReader::ReadPCX(Graphic & rGraphic)
 
     // read header:
 
-    nStatus = true;
+    bStatus = true;
 
     ImplReadHeader();
 
     // Write BMP header and conditionally (maybe invalid for now) color palette:
-    if ( nStatus )
+    if ( bStatus )
     {
         aBmp = Bitmap( Size( nWidth, nHeight ), nDestBitsPerPixel );
         Bitmap::ScopedWriteAccess pAcc(aBmp);
@@ -118,7 +118,7 @@ bool PCXReader::ReadPCX(Graphic & rGraphic)
 
         // If an extended color palette exists at the end of the file, then read it and
         // and write again in palette:
-        if ( nDestBitsPerPixel == 8 && nStatus )
+        if ( nDestBitsPerPixel == 8 && bStatus )
         {
             sal_uInt8* pPal = pPalette;
             m_rPCX.SeekRel(1);
@@ -136,7 +136,7 @@ bool PCXReader::ReadPCX(Graphic & rGraphic)
             rBitmap.SetPrefMapMode(aMapMode);
             rBitmap.SetPrefSize(Size(nWidth,nHeight));
         }
-    */  if ( nStatus )
+    */  if ( bStatus )
         {
             rGraphic = aBmp;
             return true;
@@ -151,7 +151,7 @@ void PCXReader::ImplReadHeader()
     m_rPCX.ReadUChar( nbyte ).ReadUChar( nVersion ).ReadUChar( nEncoding );
     if ( nbyte!=0x0a || (nVersion != 0 && nVersion != 2 && nVersion != 3 && nVersion != 5) || nEncoding > 1 )
     {
-        nStatus = false;
+        bStatus = false;
         return;
     }
 
@@ -162,7 +162,7 @@ void PCXReader::ImplReadHeader()
 
     if ((nMinX > nMaxX) || (nMinY > nMaxY))
     {
-        nStatus = false;
+        bStatus = false;
         return;
     }
 
@@ -191,7 +191,7 @@ void PCXReader::ImplReadHeader()
     if ( ( nDestBitsPerPixel != 1 && nDestBitsPerPixel != 4 && nDestBitsPerPixel != 8 && nDestBitsPerPixel != 24 )
         || nPlanes > 4 || nBytesPerPlaneLin < ( ( nWidth * nBitsPerPlanePix+7 ) >> 3 ) )
     {
-        nStatus = false;
+        bStatus = false;
         return;
     }
 
@@ -214,7 +214,7 @@ void PCXReader::ImplReadBody(BitmapWriteAccess * pAcc)
     //sanity check there is enough data before trying allocation
     if (nBytesPerPlaneLin > m_rPCX.remainingSize() / nPlanes)
     {
-        nStatus = false;
+        bStatus = false;
         return;
     }
 
@@ -226,7 +226,7 @@ void PCXReader::ImplReadBody(BitmapWriteAccess * pAcc)
     {
         if (!m_rPCX.good())
         {
-            nStatus = false;
+            bStatus = false;
             break;
         }
         nPercent = ny * 60 / nHeight + 10;
@@ -378,7 +378,7 @@ void PCXReader::ImplReadBody(BitmapWriteAccess * pAcc)
                 }
                 break;
             default :
-                nStatus = false;
+                bStatus = false;
                 break;
         }
     }
diff --git a/idl/inc/bastype.hxx b/idl/inc/bastype.hxx
index de0d8aa..3fd6069 100644
--- a/idl/inc/bastype.hxx
+++ b/idl/inc/bastype.hxx
@@ -31,30 +31,30 @@ class SvTokenStream;
 
 class Svint
 {
-    int     nVal;
+    int     bVal;
     bool    bSet;
 public:
-                Svint() { nVal = 0; bSet = false; }
-                Svint( int n ) : nVal( n ), bSet( true ) {}
-                Svint( int n, bool bSetP ) : nVal( n ), bSet( bSetP ) {}
-    Svint    &  operator = ( int n ) { nVal = n; bSet = true; return *this; }
+                Svint() { bVal = 0; bSet = false; }
+                Svint( int n ) : bVal( n ), bSet( true ) {}
+                Svint( int n, bool bSetP ) : bVal( n ), bSet( bSetP ) {}
+    Svint    &  operator = ( int n ) { bVal = n; bSet = true; return *this; }
 
-    operator    int ()const { return nVal; }
+    operator    int ()const { return bVal; }
     bool        IsSet() const { return bSet; }
 };
 
 
 class SvBOOL
 {
-    bool  nVal:1,
+    bool  bVal:1,
           bSet:1;
 public:
-                SvBOOL() { bSet = nVal = false; }
-                SvBOOL( bool n ) : nVal( n ), bSet( true ) {}
-                SvBOOL( bool n, bool bSetP ) : nVal( n ), bSet( bSetP ) {}
-    SvBOOL &    operator = ( bool n ) { nVal = n; bSet = true; return *this; }
+                SvBOOL() { bSet = bVal = false; }
+                SvBOOL( bool b ) : bVal( b ), bSet( true ) {}
+                SvBOOL( bool b, bool bSetP ) : bVal( b ), bSet( bSetP ) {}
+    SvBOOL &    operator = ( bool n ) { bVal = n; bSet = true; return *this; }
 
-    operator    bool() const { return nVal; }
+    operator    bool() const { return bVal; }
     bool        IsSet() const { return bSet; }
 
     bool        ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm );
@@ -77,7 +77,7 @@ public:
                     return !m_aStr.isEmpty() || nValue != 0;
                 }
     sal_uInt32  GetValue() const { return nValue; }
-    void        SetValue( sal_uInt32 nVal ) { nValue = nVal; }
+    void        SetValue( sal_uInt32 bVal ) { nValue = bVal; }
 
     void        ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
     void        ReadSvIdl( SvIdlDataBase &, SvStringHashEntry * pName,
diff --git a/sc/source/core/tool/rangeutl.cxx b/sc/source/core/tool/rangeutl.cxx
index 688b74f..8c1d138e 100644
--- a/sc/source/core/tool/rangeutl.cxx
+++ b/sc/source/core/tool/rangeutl.cxx
@@ -42,7 +42,7 @@ bool ScRangeUtil::MakeArea( const OUString&   rAreaStr,
     // BROKEN BROKEN BROKEN
     // but it is only used in the consolidate dialog.  Ignore for now.
 
-    bool        nSuccess    = false;
+    bool        bSuccess    = false;
     sal_Int32       nPointPos   = rAreaStr.indexOf('.');
     sal_Int32       nColonPos   = rAreaStr.indexOf(':');
     OUString      aStrArea( rAreaStr );
@@ -55,14 +55,14 @@ bool ScRangeUtil::MakeArea( const OUString&   rAreaStr,
         aStrArea += rAreaStr.copy( nPointPos+1 ); // do not include '.' in copy
     }
 
-    nSuccess = ConvertDoubleRef( pDoc, aStrArea, nTab, startPos, endPos, rDetails );
+    bSuccess = ConvertDoubleRef( pDoc, aStrArea, nTab, startPos, endPos, rDetails );
 
-    if ( nSuccess )
+    if ( bSuccess )
         rArea = ScArea( startPos.Tab(),
                         startPos.Col(), startPos.Row(),
                         endPos.Col(),   endPos.Row() );
 
-    return nSuccess;
+    return bSuccess;
 }
 
 void ScRangeUtil::CutPosString( const OUString&   theAreaStr,
diff --git a/sc/source/filter/inc/xcl97rec.hxx b/sc/source/filter/inc/xcl97rec.hxx
index 9f23f9c..f21e10c 100644
--- a/sc/source/filter/inc/xcl97rec.hxx
+++ b/sc/source/filter/inc/xcl97rec.hxx
@@ -375,7 +375,7 @@ private:
     XclExpString                sName;
     XclExpString                sComment;
     XclExpString                sUserName;
-    bool                        nProtected;
+    bool                        bProtected;
 
     std::vector<ExcEScenarioCell> aCells;
 
diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx
index 8f5ac14..43a355a 100644
--- a/sc/source/filter/xcl97/xcl97rec.cxx
+++ b/sc/source/filter/xcl97/xcl97rec.cxx
@@ -1346,7 +1346,7 @@ ExcEScenario::ExcEScenario( const XclExpRoot& rRoot, SCTAB nTab )
     sComment.Assign( sTmpComm, EXC_STR_DEFAULT, 255 );
     if( sComment.Len() )
         nRecLen += sComment.GetSize();
-    nProtected = (nFlags & SC_SCENARIO_PROTECT);
+    bProtected = (nFlags & SC_SCENARIO_PROTECT);
 
     sUserName.Assign( rRoot.GetUserName(), EXC_STR_DEFAULT, 255 );
     nRecLen += sUserName.GetSize();
@@ -1404,7 +1404,7 @@ void ExcEScenario::SaveCont( XclExpStream& rStrm )
     sal_uInt16 count = aCells.size();
 
     rStrm   << (sal_uInt16) count               // number of cells
-            << sal_uInt8(nProtected)            // fProtection
+            << sal_uInt8(bProtected)            // fProtection
             << (sal_uInt8) 0                    // fHidden
             << (sal_uInt8) sName.Len()          // length of scen name
             << (sal_uInt8) sComment.Len()       // length of comment
@@ -1441,7 +1441,7 @@ void ExcEScenario::SaveXml( XclExpXmlStream& rStrm )
     sax_fastparser::FSHelperPtr& rWorkbook = rStrm.GetCurrentStream();
     rWorkbook->startElement( XML_scenario,
             XML_name,       XclXmlUtils::ToOString( sName ).getStr(),
-            XML_locked,     XclXmlUtils::ToPsz( nProtected ),
+            XML_locked,     XclXmlUtils::ToPsz( bProtected ),
             // OOXTODO: XML_hidden,
             XML_count,      OString::number(  aCells.size() ).getStr(),
             XML_user,       XESTRING_TO_PSZ( sUserName ),
diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index 18eeb10..32098f7 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -764,7 +764,7 @@ NavDocInfo* SdNavigatorWin::GetDocInfo()
 bool SdNavigatorWin::Notify(NotifyEvent& rNEvt)
 {
     const KeyEvent* pKEvt = rNEvt.GetKeyEvent();
-    bool            nOK = false;
+    bool            bOK = false;
 
     if( pKEvt )
     {
@@ -773,7 +773,7 @@ bool SdNavigatorWin::Notify(NotifyEvent& rNEvt)
             if( SdPageObjsTLB::IsInDrag() )
             {
                 // during drag'n'drop we just stop the drag but do not close the navigator
-                nOK = true;
+                bOK = true;
             }
             else
             {
@@ -791,10 +791,10 @@ bool SdNavigatorWin::Notify(NotifyEvent& rNEvt)
         }
     }
 
-    if( !nOK )
-        nOK = Window::Notify( rNEvt );
+    if( !bOK )
+        bOK = Window::Notify( rNEvt );
 
-    return nOK;
+    return bOK;
 }
 
 /**
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index e2520c9..4fb5c9c 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -1213,7 +1213,7 @@ static bool ImplHandleEndExtTextInput( vcl::Window* /* pWindow */ )
 {
     ImplSVData* pSVData = ImplGetSVData();
     vcl::Window*     pChild = pSVData->maWinData.mpExtTextInputWin;
-    bool        nRet = false;
+    bool        bRet = false;
 
     if ( pChild )
     {
@@ -1230,10 +1230,10 @@ static bool ImplHandleEndExtTextInput( vcl::Window* /* pWindow */ )
             delete [] pWinData->mpExtOldAttrAry;
             pWinData->mpExtOldAttrAry = nullptr;
         }
-        nRet = !ImplCallCommand( pChild, CommandEventId::EndExtTextInput );
+        bRet = !ImplCallCommand( pChild, CommandEventId::EndExtTextInput );
     }
 
-    return nRet;
+    return bRet;
 }
 
 static void ImplHandleExtTextInputPos( vcl::Window* pWindow,


More information about the Libreoffice-commits mailing list