diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2016-02-04 00:23:52 +1100 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2016-02-04 00:24:51 +1100 |
commit | 8db902785ed40ef388218bd5068f14f5d4bedd69 (patch) | |
tree | 08a02ad07d02fce16bd37b6c02503239483911c9 | |
parent | 4a2824e72aae407f5f2a86e6ef45278ef864d437 (diff) |
tdf#94269 Replace "n" prefix for bool variables with "b"
Change-Id: I8999dc2701010424ea4d2504e99ed429030d7d4e
-rw-r--r-- | editeng/source/outliner/outlundo.hxx | 2 | ||||
-rw-r--r-- | filter/source/graphicfilter/ipcx/ipcx.cxx | 24 | ||||
-rw-r--r-- | idl/inc/bastype.hxx | 26 | ||||
-rw-r--r-- | sc/source/core/tool/rangeutl.cxx | 8 | ||||
-rw-r--r-- | sc/source/filter/inc/xcl97rec.hxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xcl97/xcl97rec.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/dlg/navigatr.cxx | 10 | ||||
-rw-r--r-- | vcl/source/window/winproc.cxx | 6 |
8 files changed, 42 insertions, 42 deletions
diff --git a/editeng/source/outliner/outlundo.hxx b/editeng/source/outliner/outlundo.hxx index cb36c574cca5..adc15549593b 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 33308a028c08..6710f5d5f782 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 de0d8aa7df66..3fd6069a7373 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 688b74f24f02..8c1d138e5bad 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 9f23f9cfc627..f21e10c52d18 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 8f5ac1491491..43a355a4db3c 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 18eeb10953d6..32098f7c57e6 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 e2520c9cbe33..4fb5c9ce4645 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, |