diff options
author | Noel Grandin <noel@peralex.com> | 2014-04-23 11:08:48 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-04-23 11:11:51 +0200 |
commit | 6dda3d45c902d64323a085ea1604a993521f313d (patch) | |
tree | 9b964839510ac36762733bd99951539040f8ffc0 /sc | |
parent | e32da7783686f088fa83cdae209bcf1c81d82f1e (diff) |
sc: sal_Bool->bool
Change-Id: I70aad0b38979f45a313b8ac36890fb6c64d11bb0
Diffstat (limited to 'sc')
231 files changed, 1753 insertions, 1755 deletions
diff --git a/sc/inc/AccessibleFilterMenu.hxx b/sc/inc/AccessibleFilterMenu.hxx index f24dd1440cc2..a78fa209a289 100644 --- a/sc/inc/AccessibleFilterMenu.hxx +++ b/sc/inc/AccessibleFilterMenu.hxx @@ -52,15 +52,15 @@ public: ScMenuFloatingWindow* pWin, const OUString& rName, size_t nMenuPos); virtual ~ScAccessibleFilterMenu(); + virtual bool SAL_CALL isVisible() + throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + /// XAccessibleComponent virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const ::com::sun::star::awt::Point& rPoint ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL isVisible() - throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual void SAL_CALL grabFocus() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; diff --git a/sc/inc/appluno.hxx b/sc/inc/appluno.hxx index 0bf97b89a953..49fbd8d5af1d 100644 --- a/sc/inc/appluno.hxx +++ b/sc/inc/appluno.hxx @@ -137,9 +137,9 @@ private: SfxItemPropertySet aPropSet; - sal_Bool getPropertyBool(const OUString& aPropertyName) throw (css::uno::RuntimeException); + bool getPropertyBool(const OUString& aPropertyName) throw (css::uno::RuntimeException); sal_Int16 getPropertyInt16(const OUString& aPropertyName) throw (css::uno::RuntimeException); - void setProperty(const OUString& aPropertyName, sal_Bool p1) throw (css::uno::RuntimeException) + void setProperty(const OUString& aPropertyName, bool p1) throw (css::uno::RuntimeException) { setPropertyValue( aPropertyName, css::uno::Any(p1) ); } void setProperty(const OUString& aPropertyName, sal_Int16 p1) throw (css::uno::RuntimeException) { setPropertyValue( aPropertyName, css::uno::Any(p1) ); } @@ -154,7 +154,7 @@ public: virtual sal_Bool SAL_CALL getMoveSelection() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return getPropertyBool("MoveSelection"); } virtual void SAL_CALL setMoveSelection(sal_Bool p1) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE - { setProperty("MoveSelection", p1); } + { setProperty("MoveSelection", (bool)p1); } virtual sal_Int16 SAL_CALL getMoveDirection() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return getPropertyInt16("MoveDirection"); } virtual void SAL_CALL setMoveDirection(sal_Int16 p1) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE @@ -162,27 +162,27 @@ public: virtual sal_Bool SAL_CALL getEnterEdit() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return getPropertyBool("EnterEdit"); } virtual void SAL_CALL setEnterEdit(sal_Bool p1) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE - { setProperty("EnterEdit", p1); } + { setProperty("EnterEdit", (bool)p1); } virtual sal_Bool SAL_CALL getExtendFormat() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return getPropertyBool("ExtendFormat"); } virtual void SAL_CALL setExtendFormat(sal_Bool p1) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE - { setProperty("ExtendFormat", p1); } + { setProperty("ExtendFormat", (bool)p1); } virtual sal_Bool SAL_CALL getRangeFinder() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return getPropertyBool("RangeFinder"); } virtual void SAL_CALL setRangeFinder(sal_Bool p1) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE - { setProperty("RangeFinder", p1); } + { setProperty("RangeFinder", (bool)p1); } virtual sal_Bool SAL_CALL getExpandReferences() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return getPropertyBool("ExpandReferences"); } virtual void SAL_CALL setExpandReferences(sal_Bool p1) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE - { setProperty("ExpandReferences", p1); } + { setProperty("ExpandReferences", (bool)p1); } virtual sal_Bool SAL_CALL getMarkHeader() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return getPropertyBool("MarkHeader"); } virtual void SAL_CALL setMarkHeader(sal_Bool p1) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE - { setProperty("MarkHeader", p1); } + { setProperty("MarkHeader", (bool)p1); } virtual sal_Bool SAL_CALL getUseTabCol() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return getPropertyBool("UseTabCol"); } virtual void SAL_CALL setUseTabCol(sal_Bool p1) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE - { setProperty("UseTabCol", p1); } + { setProperty("UseTabCol", (bool)p1); } virtual sal_Int16 SAL_CALL getMetric() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return getPropertyInt16("Metric"); } virtual void SAL_CALL setMetric(sal_Int16 p1) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE @@ -194,7 +194,7 @@ public: virtual sal_Bool SAL_CALL getDoAutoComplete() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return getPropertyBool("DoAutoComplete"); } virtual void SAL_CALL setDoAutoComplete(sal_Bool p1) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE - { setProperty("DoAutoComplete", p1); } + { setProperty("DoAutoComplete", (bool)p1); } virtual sal_Int16 SAL_CALL getStatusBarFunction() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return getPropertyInt16("StatusBarFunction"); } virtual void SAL_CALL setStatusBarFunction(sal_Int16 p1) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE @@ -215,19 +215,19 @@ public: virtual sal_Bool SAL_CALL getPrintAllSheets() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return getPropertyBool("PrintAllSheets"); } virtual void SAL_CALL setPrintAllSheets(sal_Bool p1) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE - { setProperty("PrintAllSheets", p1); } + { setProperty("PrintAllSheets", (bool)p1); } virtual sal_Bool SAL_CALL getPrintEmptyPages() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return getPropertyBool("PrintEmptyPages"); } virtual void SAL_CALL setPrintEmptyPages(sal_Bool p1) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE - { setProperty("PrintEmptyPages", p1); } + { setProperty("PrintEmptyPages", (bool)p1); } virtual sal_Bool SAL_CALL getUsePrinterMetrics() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return getPropertyBool("UsePrinterMetrics"); } virtual void SAL_CALL setUsePrinterMetrics(sal_Bool p1) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE - { setProperty("UsePrinterMetrics", p1); } + { setProperty("UsePrinterMetrics", (bool)p1); } virtual sal_Bool SAL_CALL getReplaceCellsWarning() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE { return getPropertyBool("ReplaceCellsWarning"); } virtual void SAL_CALL setReplaceCellsWarning(sal_Bool p1) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE - { setProperty("ReplaceCellsWarning", p1); } + { setProperty("ReplaceCellsWarning", (bool)p1); } // XPropertySet virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > diff --git a/sc/inc/cellsuno.hxx b/sc/inc/cellsuno.hxx index 6258bbc33ac0..da3247270db8 100644 --- a/sc/inc/cellsuno.hxx +++ b/sc/inc/cellsuno.hxx @@ -208,7 +208,7 @@ private: com::sun::star::uno::Reference<com::sun::star::sheet::XSheetCellRanges> QueryDifferences_Impl(const com::sun::star::table::CellAddress& aCompare, - sal_Bool bColumnDiff); + bool bColumnDiff); com::sun::star::uno::Reference<com::sun::star::uno::XInterface> Find_Impl(const com::sun::star::uno::Reference< com::sun::star::util::XSearchDescriptor>& xDesc, diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index df1cc2ebec52..b57ce70bedba 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -451,8 +451,8 @@ private: bool mbUseEmbedFonts; public: - sal_Bool IsCellInChangeTrack(const ScAddress &cell,Color *pColCellBoder); - void GetCellChangeTrackNote(const ScAddress &cell, OUString &strTrackText, sal_Bool &pbLeftEdge); + bool IsCellInChangeTrack(const ScAddress &cell,Color *pColCellBoder); + void GetCellChangeTrackNote(const ScAddress &cell, OUString &strTrackText, bool &pbLeftEdge); bool IsUsingEmbededFonts() { return mbUseEmbedFonts; } void SetIsUsingEmbededFonts( bool bUse ) { mbUseEmbedFonts = bUse; } SC_DLLPUBLIC sal_uLong GetCellCount() const; // all cells diff --git a/sc/inc/shapeuno.hxx b/sc/inc/shapeuno.hxx index 7110d0a90680..6fdf66a0dd9b 100644 --- a/sc/inc/shapeuno.hxx +++ b/sc/inc/shapeuno.hxx @@ -64,7 +64,7 @@ class ScShapeObj :public ScShapeObj_Base ,public ScShapeObj_ChildBase { private: - friend ScMacroInfo* ScShapeObj_getShapeHyperMacroInfo( ScShapeObj* pShape, sal_Bool bCreate ); + friend ScMacroInfo* ScShapeObj_getShapeHyperMacroInfo( ScShapeObj* pShape, bool bCreate ); ::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation > mxShapeAgg; // cached pointers to avoid repeated queryAggregation calls: ::com::sun::star::beans::XPropertySet* pShapePropertySet; diff --git a/sc/source/core/data/attrib.cxx b/sc/source/core/data/attrib.cxx index ae0335b4b1ce..df14e4ec8bce 100644 --- a/sc/source/core/data/attrib.cxx +++ b/sc/source/core/data/attrib.cxx @@ -223,13 +223,13 @@ bool ScProtectionAttr::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const break; } case MID_1 : - rVal <<= (sal_Bool ) bProtection; break; + rVal <<= bProtection; break; case MID_2 : - rVal <<= (sal_Bool ) bHideFormula; break; + rVal <<= bHideFormula; break; case MID_3 : - rVal <<= (sal_Bool ) bHideCell; break; + rVal <<= bHideCell; break; case MID_4 : - rVal <<= (sal_Bool ) bHidePrint; break; + rVal <<= bHidePrint; break; default: OSL_FAIL("Wrong MemberID!"); return false; @@ -241,7 +241,7 @@ bool ScProtectionAttr::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const bool ScProtectionAttr::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { bool bRet = false; - sal_Bool bVal = sal_False; + bool bVal = false; nMemberId &= ~CONVERT_TWIPS; switch ( nMemberId ) { @@ -359,15 +359,15 @@ SfxPoolItem* ScProtectionAttr::Clone( SfxItemPool * ) const SfxPoolItem* ScProtectionAttr::Create( SvStream& rStream, sal_uInt16 /* n */ ) const { - sal_Bool bProtect; - sal_Bool bHFormula; - sal_Bool bHCell; - sal_Bool bHPrint; + bool bProtect; + bool bHFormula; + bool bHCell; + bool bHPrint; - rStream.ReadUChar( bProtect ); - rStream.ReadUChar( bHFormula ); - rStream.ReadUChar( bHCell ); - rStream.ReadUChar( bHPrint ); + rStream.ReadCharAsBool( bProtect ); + rStream.ReadCharAsBool( bHFormula ); + rStream.ReadCharAsBool( bHCell ); + rStream.ReadCharAsBool( bHPrint ); return new ScProtectionAttr(bProtect,bHFormula,bHCell,bHPrint); } diff --git a/sc/source/core/data/dbdocutl.cxx b/sc/source/core/data/dbdocutl.cxx index 586f8d0bdeee..147f312a15e0 100644 --- a/sc/source/core/data/dbdocutl.cxx +++ b/sc/source/core/data/dbdocutl.cxx @@ -41,9 +41,9 @@ void ScDatabaseDocUtil::PutData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB { OUString aString; double nVal = 0.0; - sal_Bool bValue = false; - sal_Bool bEmptyFlag = false; - sal_Bool bError = false; + bool bValue = false; + bool bEmptyFlag = false; + bool bError = false; sal_uLong nFormatIndex = 0; //! wasNull calls only if null value was found? @@ -59,7 +59,7 @@ void ScDatabaseDocUtil::PutData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB NUMBERFORMAT_LOGICAL, ScGlobal::eLnge ); nVal = (xRow->getBoolean(nRowPos) ? 1 : 0); bEmptyFlag = ( nVal == 0.0 ) && xRow->wasNull(); - bValue = sal_True; + bValue = true; break; case sdbc::DataType::TINYINT: @@ -74,7 +74,7 @@ void ScDatabaseDocUtil::PutData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB //! do the conversion here? nVal = xRow->getDouble(nRowPos); bEmptyFlag = ( nVal == 0.0 ) && xRow->wasNull(); - bValue = sal_True; + bValue = true; break; case sdbc::DataType::CHAR: @@ -94,7 +94,7 @@ void ScDatabaseDocUtil::PutData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nVal = Date( aDate.Day, aDate.Month, aDate.Year ) - *pFormTable->GetNullDate(); bEmptyFlag = xRow->wasNull(); - bValue = sal_True; + bValue = true; } break; @@ -110,7 +110,7 @@ void ScDatabaseDocUtil::PutData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB aTime.Seconds / static_cast<double>(::Time::secondPerDay) + aTime.NanoSeconds / static_cast<double>(::Time::nanoSecPerDay); bEmptyFlag = xRow->wasNull(); - bValue = sal_True; + bValue = true; } break; @@ -128,24 +128,24 @@ void ScDatabaseDocUtil::PutData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB aStamp.Seconds / static_cast<double>(::Time::secondPerDay) + aStamp.NanoSeconds / static_cast<double>(::Time::nanoSecPerDay); bEmptyFlag = xRow->wasNull(); - bValue = sal_True; + bValue = true; } break; case sdbc::DataType::SQLNULL: - bEmptyFlag = sal_True; + bEmptyFlag = true; break; case sdbc::DataType::BINARY: case sdbc::DataType::VARBINARY: case sdbc::DataType::LONGVARBINARY: default: - bError = sal_True; // unknown type + bError = true; // unknown type } } catch ( uno::Exception& ) { - bError = sal_True; + bError = true; } if ( bValue && bCurrency ) diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx index 1ea05ca78768..20b38f6b42d9 100644 --- a/sc/source/core/data/documen2.cxx +++ b/sc/source/core/data/documen2.cxx @@ -1226,12 +1226,12 @@ void ScDocument::ClearLookupCaches() pLookupCacheMapImpl->clear(); } -sal_Bool ScDocument::IsCellInChangeTrack(const ScAddress &cell,Color *pColCellBoder) +bool ScDocument::IsCellInChangeTrack(const ScAddress &cell,Color *pColCellBoder) { ScChangeTrack* pTrack = GetChangeTrack(); ScChangeViewSettings* pSettings = GetChangeViewSettings(); if ( !pTrack || !pTrack->GetFirst() || !pSettings || !pSettings->ShowChanges() ) - return sal_False; // nix da oder abgeschaltet + return false; // nix da oder abgeschaltet ScActionColorChanger aColorChanger(*pTrack); // Clipping passiert von aussen //! ohne Clipping, nur betroffene Zeilen painten ??!??!? @@ -1260,7 +1260,7 @@ sal_Bool ScDocument::IsCellInChangeTrack(const ScAddress &cell,Color *pColCellBo Color aColor( aColorChanger.GetColor() ); *pColCellBoder = aColor; } - return sal_True; + return true; } } } @@ -1280,17 +1280,17 @@ sal_Bool ScDocument::IsCellInChangeTrack(const ScAddress &cell,Color *pColCellBo Color aColor( aColorChanger.GetColor() ); *pColCellBoder = aColor; } - return sal_True; + return true; } } } } pAction = pAction->GetNext(); } - return sal_False; + return false; } -void ScDocument::GetCellChangeTrackNote( const ScAddress &aCellPos, OUString &aTrackText,sal_Bool &bLeftEdge) +void ScDocument::GetCellChangeTrackNote( const ScAddress &aCellPos, OUString &aTrackText,bool &bLeftEdge) { aTrackText = OUString(); // Change-Tracking @@ -1358,7 +1358,7 @@ void ScDocument::GetCellChangeTrackNote( const ScAddress &aCellPos, OUString &aT pFound = pFoundMove; // Move gewinnt // bei geloeschten Spalten: Pfeil auf die linke Seite der Zelle if ( pFound->GetType() == SC_CAT_DELETE_COLS ) - bLeftEdge = sal_True; + bLeftEdge = true; DateTime aDT = pFound->GetDateTime(); aTrackText = pFound->GetUser(); aTrackText += ", "; diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx index df1419c3a5fa..97b1a153fc0b 100644 --- a/sc/source/core/data/dpobject.cxx +++ b/sc/source/core/data/dpobject.cxx @@ -265,7 +265,7 @@ sal_uInt16 lcl_GetDataGetOrientation( const uno::Reference<sheet::XDimensionsSup uno::Reference<container::XNameAccess> xDimsName = xSource->getDimensions(); uno::Reference<container::XIndexAccess> xIntDims = new ScNameToIndexAccess( xDimsName ); long nIntCount = xIntDims->getCount(); - sal_Bool bFound = false; + bool bFound = false; for (long nIntDim=0; nIntDim<nIntCount && !bFound; nIntDim++) { uno::Reference<uno::XInterface> xIntDim = @@ -536,7 +536,7 @@ void ScDPObject::CreateOutput() CreateObjects(); if (!pOutput) { - sal_Bool bFilterButton = IsSheetData() && pSaveData && pSaveData->GetFilterButton(); + bool bFilterButton = IsSheetData() && pSaveData && pSaveData->GetFilterButton(); pOutput = new ScDPOutput( pDoc, xSource, aOutRange.aStart, bFilterButton ); pOutput->SetHeaderLayout ( mbHeaderLayout ); @@ -936,7 +936,7 @@ const ScRange ScDPObject::GetOutputRangeByType( sal_Int32 nType ) return pOutput->GetOutputRange(nType); } -static sal_Bool lcl_HasButton( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab ) +static bool lcl_HasButton( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab ) { return ((const ScMergeFlagAttr*)pDoc->GetAttr( nCol, nRow, nTab, ATTR_MERGE_FLAG ))->HasPivotButton(); } @@ -1223,7 +1223,7 @@ OUString ScDPObject::GetDimName( long nDim, bool& rIsDataLayout, sal_Int32* pFla uno::Reference<beans::XPropertySet> xDimProp( xIntDim, uno::UNO_QUERY ); if ( xDimName.is() && xDimProp.is() ) { - sal_Bool bData = ScUnoHelpFunctions::GetBoolProperty( xDimProp, + bool bData = ScUnoHelpFunctions::GetBoolProperty( xDimProp, OUString(SC_UNO_DP_ISDATALAYOUT) ); //! error checking -- is "IsDataLayoutDimension" property required?? @@ -1694,7 +1694,7 @@ bool ScDPObject::ParseFilters( uno::Reference<container::XNamed> xDim( xIntDim, uno::UNO_QUERY ); uno::Reference<beans::XPropertySet> xDimProp( xDim, uno::UNO_QUERY ); uno::Reference<sheet::XHierarchiesSupplier> xDimSupp( xDim, uno::UNO_QUERY ); - sal_Bool bDataLayout = ScUnoHelpFunctions::GetBoolProperty( xDimProp, + bool bDataLayout = ScUnoHelpFunctions::GetBoolProperty( xDimProp, OUString(SC_UNO_DP_ISDATALAYOUT) ); sal_Int32 nOrient = ScUnoHelpFunctions::GetEnumProperty( xDimProp, OUString(SC_UNO_DP_ORIENTATION), @@ -1901,7 +1901,7 @@ void ScDPObject::ToggleDetails(const DataPilotTableHeaderData& rElemDesc, ScDPOb OUString aDimName = xDim->getName(); uno::Reference<beans::XPropertySet> xDimProp( xDim, uno::UNO_QUERY ); - sal_Bool bDataLayout = ScUnoHelpFunctions::GetBoolProperty( xDimProp, + bool bDataLayout = ScUnoHelpFunctions::GetBoolProperty( xDimProp, OUString(SC_UNO_DP_ISDATALAYOUT) ); if (bDataLayout) { @@ -1947,8 +1947,8 @@ void ScDPObject::ToggleDetails(const DataPilotTableHeaderData& rElemDesc, ScDPOb if ( xMbrSupp.is() ) xMembers = xMbrSupp->getMembers(); - sal_Bool bFound = false; - sal_Bool bShowDetails = sal_True; + bool bFound = false; + bool bShowDetails = true; if ( xMembers.is() ) { @@ -1962,7 +1962,7 @@ void ScDPObject::ToggleDetails(const DataPilotTableHeaderData& rElemDesc, ScDPOb bShowDetails = ScUnoHelpFunctions::GetBoolProperty( xMbrProp, OUString(SC_UNO_DP_SHOWDETAILS) ); //! don't set bFound if property is unknown? - bFound = sal_True; + bFound = true; } } } diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx index 15468d4ffa33..d26cfd8ece0b 100644 --- a/sc/source/core/data/dpsave.cxx +++ b/sc/source/core/data/dpsave.cxx @@ -58,7 +58,7 @@ using ::std::auto_ptr; #define SC_DPSAVEMODE_DONTKNOW 2 static void lcl_SetBoolProperty( const uno::Reference<beans::XPropertySet>& xProp, - const OUString& rName, sal_Bool bValue ) + const OUString& rName, bool bValue ) { //! move to ScUnoHelpFunctions? diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx index 3fbb0bdad387..d3fe137cf069 100644 --- a/sc/source/core/data/dptabsrc.cxx +++ b/sc/source/core/data/dptabsrc.cxx @@ -85,14 +85,14 @@ SC_SIMPLE_SERVICE_INFO( ScDPMember, "ScDPMember", "com.sun.star.sheet. // DataDescription / NumberFormat are internal //! move to a header? -static sal_Bool lcl_GetBoolFromAny( const uno::Any& aAny ) +static bool lcl_GetBoolFromAny( const uno::Any& aAny ) { if ( aAny.getValueTypeClass() == uno::TypeClass_BOOLEAN ) return *(sal_Bool*)aAny.getValue(); return false; } -static void lcl_SetBoolInAny( uno::Any& rAny, sal_Bool bValue ) +static void lcl_SetBoolInAny( uno::Any& rAny, bool bValue ) { rAny.setValue( &bValue, getBooleanCppuType() ); } @@ -571,7 +571,7 @@ static long lcl_CountMinMembers(const vector<ScDPDimension*>& ppDim, const vecto long nTotal = 1; long nDataCount = 1; - sal_Bool bWasShowAll = sal_True; + bool bWasShowAll = true; long nPos = nLevels; while ( nPos > 0 ) { @@ -583,7 +583,7 @@ static long lcl_CountMinMembers(const vector<ScDPDimension*>& ppDim, const vecto return 0; } - sal_Bool bDo = false; + bool bDo = false; if ( ppDim[nPos]->getIsDataLayoutDimension() ) { // data layout dim doesn't interfere with "show all" flags @@ -593,7 +593,7 @@ static long lcl_CountMinMembers(const vector<ScDPDimension*>& ppDim, const vecto } else if ( bWasShowAll ) // "show all" set for all following levels? { - bDo = sal_True; + bDo = true; if ( !ppLevel[nPos]->getShowEmpty() ) { // this level is counted, following ones are not @@ -1565,7 +1565,7 @@ void SAL_CALL ScDPDimension::setPropertyValue( const OUString& aPropertyName, co aValue >>= aReferenceValue; else if ( aPropertyName.equalsAscii( SC_UNO_DP_FILTER ) ) { - sal_Bool bDone = false; + bool bDone = false; uno::Sequence<sheet::TableFilterField> aSeq; if (aValue >>= aSeq) { @@ -1574,7 +1574,7 @@ void SAL_CALL ScDPDimension::setPropertyValue( const OUString& aPropertyName, co { aSelectedPage = ""; bHasSelectedPage = false; - bDone = sal_True; + bDone = true; } else if ( nLength == 1 ) { @@ -1583,7 +1583,7 @@ void SAL_CALL ScDPDimension::setPropertyValue( const OUString& aPropertyName, co { aSelectedPage = rField.StringValue; bHasSelectedPage = true; - bDone = sal_True; + bDone = true; } } } @@ -1608,7 +1608,7 @@ void SAL_CALL ScDPDimension::setPropertyValue( const OUString& aPropertyName, co } else if (aPropertyName.equalsAscii(SC_UNO_DP_HAS_HIDDEN_MEMBER)) { - sal_Bool b = false; + bool b = false; aValue >>= b; mbHasHiddenMember = b; } @@ -1697,7 +1697,7 @@ uno::Any SAL_CALL ScDPDimension::getPropertyValue( const OUString& aPropertyName else if (aPropertyName.equalsAscii(SC_UNO_DP_FIELD_SUBTOTALNAME)) aRet <<= mpSubtotalName.get() ? *mpSubtotalName : OUString(""); else if (aPropertyName.equalsAscii(SC_UNO_DP_HAS_HIDDEN_MEMBER)) - aRet <<= static_cast<sal_Bool>(mbHasHiddenMember); + aRet <<= mbHasHiddenMember; else if (aPropertyName.equalsAscii(SC_UNO_DP_FLAGS)) { sal_Int32 nFlags = 0; // tabular data: all orientations are possible @@ -1998,19 +1998,19 @@ ScDPLevel* ScDPLevels::getByIndex(long nIndex) const class ScDPGlobalMembersOrder { ScDPLevel& rLevel; - sal_Bool bAscending; + bool bAscending; public: - ScDPGlobalMembersOrder( ScDPLevel& rLev, sal_Bool bAsc ) : + ScDPGlobalMembersOrder( ScDPLevel& rLev, bool bAsc ) : rLevel(rLev), bAscending(bAsc) {} ~ScDPGlobalMembersOrder() {} - sal_Bool operator()( sal_Int32 nIndex1, sal_Int32 nIndex2 ) const; + bool operator()( sal_Int32 nIndex1, sal_Int32 nIndex2 ) const; }; -sal_Bool ScDPGlobalMembersOrder::operator()( sal_Int32 nIndex1, sal_Int32 nIndex2 ) const +bool ScDPGlobalMembersOrder::operator()( sal_Int32 nIndex1, sal_Int32 nIndex2 ) const { sal_Int32 nCompare = 0; // seems that some ::std::sort() implementations pass the same index twice @@ -2080,7 +2080,7 @@ void ScDPLevel::EvaluateSortOrder() aGlobalOrder[nPos] = nPos; // allow manual or name (manual is always ascending) - sal_Bool bAscending = ( aSortInfo.Mode == sheet::DataPilotFieldSortMode::MANUAL || aSortInfo.IsAscending ); + bool bAscending = ( aSortInfo.Mode == sheet::DataPilotFieldSortMode::MANUAL || aSortInfo.IsAscending ); ScDPGlobalMembersOrder aComp( *this, bAscending ); ::std::sort( aGlobalOrder.begin(), aGlobalOrder.end(), aComp ); } diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx index 5a7e3025b6ff..d807c163da1e 100644 --- a/sc/source/core/data/drwlayer.cxx +++ b/sc/source/core/data/drwlayer.cxx @@ -93,7 +93,7 @@ static sal_uInt16 nInst = 0; SfxObjectShell* ScDrawLayer::pGlobalDrawPersist = NULL; -sal_Bool bDrawIsInUndo = false; //! Member +bool bDrawIsInUndo = false; //! Member ScUndoObjData::ScUndoObjData( SdrObject* pObjP, const ScAddress& rOS, const ScAddress& rOE, const ScAddress& rNS, const ScAddress& rNE ) : @@ -456,7 +456,7 @@ void ScDrawLayer::ResetTab( SCTAB nStart, SCTAB nEnd ) } } -inline sal_Bool IsInBlock( const ScAddress& rPos, SCCOL nCol1,SCROW nRow1, SCCOL nCol2,SCROW nRow2 ) +inline bool IsInBlock( const ScAddress& rPos, SCCOL nCol1,SCROW nRow1, SCCOL nCol2,SCROW nRow2 ) { return rPos.Col() >= nCol1 && rPos.Col() <= nCol2 && rPos.Row() >= nRow1 && rPos.Row() <= nRow2; @@ -470,7 +470,7 @@ void ScDrawLayer::MoveCells( SCTAB nTab, SCCOL nCol1,SCROW nRow1, SCCOL nCol2,SC if (!pPage) return; - sal_Bool bNegativePage = pDoc && pDoc->IsNegativePage( nTab ); + bool bNegativePage = pDoc && pDoc->IsNegativePage( nTab ); sal_uLong nCount = pPage->GetObjCount(); for ( sal_uLong i = 0; i < nCount; i++ ) @@ -481,18 +481,18 @@ void ScDrawLayer::MoveCells( SCTAB nTab, SCCOL nCol1,SCROW nRow1, SCCOL nCol2,SC { const ScAddress aOldStt = pData->maStart; const ScAddress aOldEnd = pData->maEnd; - sal_Bool bChange = false; + bool bChange = false; if ( aOldStt.IsValid() && IsInBlock( aOldStt, nCol1,nRow1, nCol2,nRow2 ) ) { pData->maStart.IncCol( nDx ); pData->maStart.IncRow( nDy ); - bChange = sal_True; + bChange = true; } if ( aOldEnd.IsValid() && IsInBlock( aOldEnd, nCol1,nRow1, nCol2,nRow2 ) ) { pData->maEnd.IncCol( nDx ); pData->maEnd.IncRow( nDy ); - bChange = sal_True; + bChange = true; } if (bChange) { @@ -520,7 +520,7 @@ void ScDrawLayer::SetPageSize( sal_uInt16 nPageNo, const Size& rSize, bool bUpda // auch wenn Groesse gleich geblieben ist // (einzelne Zeilen/Spalten koennen geaendert sein) - sal_Bool bNegativePage = pDoc && pDoc->IsNegativePage( static_cast<SCTAB>(nPageNo) ); + bool bNegativePage = pDoc && pDoc->IsNegativePage( static_cast<SCTAB>(nPageNo) ); sal_uLong nCount = pPage->GetObjCount(); for ( sal_uLong i = 0; i < nCount; i++ ) @@ -873,7 +873,7 @@ bool ScDrawLayer::GetPrintArea( ScRange& rRange, bool bSetHor, bool bSetVer ) co SCTAB nTab = rRange.aStart.Tab(); OSL_ENSURE( rRange.aEnd.Tab() == nTab, "GetPrintArea: Tab differ" ); - sal_Bool bNegativePage = pDoc->IsNegativePage( nTab ); + bool bNegativePage = pDoc->IsNegativePage( nTab ); bool bAny = false; long nEndX = 0; @@ -924,7 +924,7 @@ bool ScDrawLayer::GetPrintArea( ScRange& rRange, bool bSetHor, bool bSetVer ) co //! Flags (ausgeblendet?) testen Rectangle aObjRect = pObject->GetCurrentBoundRect(); - sal_Bool bFit = sal_True; + bool bFit = true; if ( !bSetHor && ( aObjRect.Right() < nStartX || aObjRect.Left() > nEndX ) ) bFit = false; if ( !bSetVer && ( aObjRect.Bottom() < nStartY || aObjRect.Top() > nEndY ) ) @@ -1044,7 +1044,7 @@ void ScDrawLayer::MoveArea( SCTAB nTab, SCCOL nCol1,SCROW nRow1, SCCOL nCol2,SCR if (!bAdjustEnabled) return; - sal_Bool bNegativePage = pDoc->IsNegativePage( nTab ); + bool bNegativePage = pDoc->IsNegativePage( nTab ); Rectangle aRect = pDoc->GetMMRect( nCol1, nRow1, nCol2, nRow2, nTab ); lcl_ReverseTwipsToMM( aRect ); @@ -1115,7 +1115,7 @@ bool ScDrawLayer::HasObjectsInRows( SCTAB nTab, SCROW nStartRow, SCROW nEndRow ) aTestRect.Left() = 0; aTestRect.Right() = MAXMM; - sal_Bool bNegativePage = pDoc->IsNegativePage( nTab ); + bool bNegativePage = pDoc->IsNegativePage( nTab ); if ( bNegativePage ) MirrorRectRTL( aTestRect ); @@ -1312,7 +1312,7 @@ void ScDrawLayer::CopyToClip( ScDocument* pClipDoc, SCTAB nTab, const Rectangle& } } -static sal_Bool lcl_IsAllInRange( const ::std::vector< ScRangeList >& rRangesVector, const ScRange& rClipRange ) +static bool lcl_IsAllInRange( const ::std::vector< ScRangeList >& rRangesVector, const ScRange& rClipRange ) { // check if every range of rRangesVector is completely in rClipRange @@ -1330,12 +1330,12 @@ static sal_Bool lcl_IsAllInRange( const ::std::vector< ScRangeList >& rRangesVec } } - return sal_True; // everything is fine + return true; // everything is fine } -static sal_Bool lcl_MoveRanges( ::std::vector< ScRangeList >& rRangesVector, const ScRange& rSourceRange, const ScAddress& rDestPos ) +static bool lcl_MoveRanges( ::std::vector< ScRangeList >& rRangesVector, const ScRange& rSourceRange, const ScAddress& rDestPos ) { - sal_Bool bChanged = false; + bool bChanged = false; ::std::vector< ScRangeList >::iterator aIt = rRangesVector.begin(); for( ;aIt!=rRangesVector.end(); ++aIt ) @@ -1350,7 +1350,7 @@ static sal_Bool lcl_MoveRanges( ::std::vector< ScRangeList >& rRangesVector, con SCsROW nDiffY = rDestPos.Row() - (SCsROW)rSourceRange.aStart.Row(); SCsTAB nDiffZ = rDestPos.Tab() - (SCsTAB)rSourceRange.aStart.Tab(); pRange->Move( nDiffX, nDiffY, nDiffZ ); - bChanged = sal_True; + bChanged = true; } } } @@ -1374,7 +1374,7 @@ void ScDrawLayer::CopyFromClip( ScDrawLayer* pClipModel, SCTAB nSourceTab, const return; } - sal_Bool bMirrorObj = ( rSourceRange.Left() < 0 && rSourceRange.Right() < 0 && + bool bMirrorObj = ( rSourceRange.Left() < 0 && rSourceRange.Right() < 0 && rDestRange.Left() > 0 && rDestRange.Right() > 0 ) || ( rSourceRange.Left() > 0 && rSourceRange.Right() > 0 && rDestRange.Left() < 0 && rDestRange.Right() < 0 ); @@ -1397,13 +1397,13 @@ void ScDrawLayer::CopyFromClip( ScDrawLayer* pClipModel, SCTAB nSourceTab, const // a clipboard document and its source share the same document item pool, // so the pointers can be compared to see if this is copy&paste within // the same document - sal_Bool bSameDoc = pDoc && pClipDoc && pDoc->GetPool() == pClipDoc->GetPool(); - sal_Bool bDestClip = pDoc && pDoc->IsClipboard(); + bool bSameDoc = pDoc && pClipDoc && pDoc->GetPool() == pClipDoc->GetPool(); + bool bDestClip = pDoc && pDoc->IsClipboard(); //#i110034# charts need correct sheet names for xml range conversion during load //so the target sheet name is temporarily renamed (if we have any SdrObjects) OUString aDestTabName; - sal_Bool bRestoreDestTabName = false; + bool bRestoreDestTabName = false; if( pOldObject && !bSameDoc && !bDestClip ) { if( pDoc && pClipDoc ) @@ -1434,18 +1434,18 @@ void ScDrawLayer::CopyFromClip( ScDrawLayer* pClipModel, SCTAB nSourceTab, const Fraction aHorFract(1,1); Fraction aVerFract(1,1); - sal_Bool bResize = false; + bool bResize = false; // sizes can differ by 1 from twips->1/100mm conversion for equal cell sizes, // don't resize to empty size when pasting into hidden columns or rows if ( std::abs(nWidthDiff) > 1 && nDestWidth > 1 && nSourceWidth > 1 ) { aHorFract = Fraction( nDestWidth, nSourceWidth ); - bResize = sal_True; + bResize = true; } if ( std::abs(nHeightDiff) > 1 && nDestHeight > 1 && nSourceHeight > 1 ) { aVerFract = Fraction( nDestHeight, nSourceHeight ); - bResize = sal_True; + bResize = true; } Point aRefPos = rDestRange.TopLeft(); // for resizing (after moving) @@ -1497,7 +1497,7 @@ void ScDrawLayer::CopyFromClip( ScDrawLayer* pClipModel, SCTAB nSourceTab, const pDoc->GetChartRanges( aChartName, aRangesVector, pDoc ); if( !aRangesVector.empty() ) { - sal_Bool bInSourceRange = false; + bool bInSourceRange = false; ScRange aClipRange; if ( pClipDoc ) { @@ -1565,7 +1565,7 @@ void ScDrawLayer::MirrorRTL( SdrObject* pObj ) // don't mirror OLE or graphics, otherwise ask the object // if it can be mirrored - sal_Bool bCanMirror = ( nIdent != OBJ_GRAF && nIdent != OBJ_OLE2 ); + bool bCanMirror = ( nIdent != OBJ_GRAF && nIdent != OBJ_OLE2 ); if (bCanMirror) { SdrObjTransformInfoRec aInfo; @@ -1659,7 +1659,7 @@ OUString ScDrawLayer::GetVisibleName( SdrObject* pObj ) return aName; } -inline sal_Bool IsNamedObject( SdrObject* pObj, const OUString& rName ) +inline bool IsNamedObject( SdrObject* pObj, const OUString& rName ) { // sal_True if rName is the object's Name or PersistName // (used to find a named object) @@ -1959,7 +1959,7 @@ IMapObject* ScDrawLayer::GetHitIMapObject( SdrObject* pObj, Size aGraphSize; ImageMap& rImageMap = (ImageMap&) pIMapInfo->GetImageMap(); Graphic aGraphic; - sal_Bool bObjSupported = false; + bool bObjSupported = false; if ( pObj->ISA( SdrGrafObj ) ) // einfaches Grafik-Objekt { @@ -1988,7 +1988,7 @@ IMapObject* ScDrawLayer::GetHitIMapObject( SdrObject* pObj, rGraphic.GetPrefMapMode(), aMap100 ); - bObjSupported = sal_True; + bObjSupported = true; } else if ( pObj->ISA( SdrOle2Obj ) ) // OLE-Objekt { diff --git a/sc/source/core/data/markarr.cxx b/sc/source/core/data/markarr.cxx index 348696b20431..2b1cfec80f72 100644 --- a/sc/source/core/data/markarr.cxx +++ b/sc/source/core/data/markarr.cxx @@ -122,8 +122,8 @@ void ScMarkArray::SetMarkArea( SCROW nStartRow, SCROW nEndRow, bool bMarked ) SCSIZE ni; // number of entries in beginning SCSIZE nInsert; // insert position (MAXROW+1 := no insert) - sal_Bool bCombined = false; - sal_Bool bSplit = false; + bool bCombined = false; + bool bSplit = false; if ( nStartRow > 0 ) { // skip beginning @@ -138,7 +138,7 @@ void ScMarkArray::SetMarkArea( SCROW nStartRow, SCROW nEndRow, bool bMarked ) { // may be a split or a simple insert or just a shrink, // row adjustment is done further down if ( pData[ni].nRow > nEndRow ) - bSplit = sal_True; + bSplit = true; ni++; nInsert = ni; } @@ -149,7 +149,7 @@ void ScMarkArray::SetMarkArea( SCROW nStartRow, SCROW nEndRow, bool bMarked ) { // combine pData[ni-1].nRow = nEndRow; nInsert = MAXROWCOUNT; - bCombined = sal_True; + bCombined = true; } } else @@ -176,7 +176,7 @@ void ScMarkArray::SetMarkArea( SCROW nStartRow, SCROW nEndRow, bool bMarked ) pData[ni-1].nRow = nStartRow - 1; // shrink } nInsert = MAXROWCOUNT; - bCombined = sal_True; + bCombined = true; } else if ( ni > 0 && ni == nInsert ) pData[ni-1].nRow = nStartRow - 1; // shrink diff --git a/sc/source/core/data/olinetab.cxx b/sc/source/core/data/olinetab.cxx index a3bebc34a50e..605c80d9def5 100644 --- a/sc/source/core/data/olinetab.cxx +++ b/sc/source/core/data/olinetab.cxx @@ -706,8 +706,8 @@ void ScOutlineArray::InsertSpace(SCCOLROW nStartPos, SCSIZE nSize) bool ScOutlineArray::DeleteSpace(SCCOLROW nStartPos, SCSIZE nSize) { SCCOLROW nEndPos = nStartPos + nSize - 1; - sal_Bool bNeedSave = false; // Original fuer Undo benoetigt? - sal_Bool bChanged = false; // fuer Test auf Level + bool bNeedSave = false; // Original fuer Undo benoetigt? + bool bChanged = false; // fuer Test auf Level ScSubOutlineIterator aIter( this ); ScOutlineEntry* pEntry; diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx index fc01c59e32b1..79905b68f76d 100644 --- a/sc/source/core/data/patattr.cxx +++ b/sc/source/core/data/patattr.cxx @@ -147,9 +147,9 @@ bool ScPatternAttr::operator==( const SfxPoolItem& rCmp ) const SfxPoolItem* ScPatternAttr::Create( SvStream& rStream, sal_uInt16 /* nVersion */ ) const { OUString* pStr; - sal_Bool bHasStyle; + bool bHasStyle; - rStream.ReadUChar( bHasStyle ); + rStream.ReadCharAsBool( bHasStyle ); if ( bHasStyle ) { @@ -174,7 +174,7 @@ SfxPoolItem* ScPatternAttr::Create( SvStream& rStream, sal_uInt16 /* nVersion */ SvStream& ScPatternAttr::Store(SvStream& rStream, sal_uInt16 /* nItemVersion */) const { - rStream.WriteUChar( (sal_Bool)sal_True ); + rStream.WriteUChar( true ); if ( pStyle ) rStream.WriteUniOrByteString( pStyle->GetName(), rStream.GetStreamCharSet() ); diff --git a/sc/source/core/tool/appoptio.cxx b/sc/source/core/tool/appoptio.cxx index a5ad954231c1..bc2cf5378dd9 100644 --- a/sc/source/core/tool/appoptio.cxx +++ b/sc/source/core/tool/appoptio.cxx @@ -176,7 +176,7 @@ static void lcl_SetSortList( const Any& rValue ) // if setting is "default", keep default values from ScUserList ctor //! mark "default" in a safe way - sal_Bool bDefault = ( nCount == 1 && pArray[0] == "NULL" ); + bool bDefault = ( nCount == 1 && pArray[0] == "NULL" ); if (!bDefault) { diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx index 4f1f8e7718b7..b8ddd9ce2127 100644 --- a/sc/source/core/tool/autoform.cxx +++ b/sc/source/core/tool/autoform.cxx @@ -768,13 +768,13 @@ bool ScAutoFormatData::Load( SvStream& rStream, const ScAfVersions& rVersions ) nStrResId = USHRT_MAX; } - sal_Bool b; - rStream.ReadUChar( b ); bIncludeFont = b; - rStream.ReadUChar( b ); bIncludeJustify = b; - rStream.ReadUChar( b ); bIncludeFrame = b; - rStream.ReadUChar( b ); bIncludeBackground = b; - rStream.ReadUChar( b ); bIncludeValueFormat = b; - rStream.ReadUChar( b ); bIncludeWidthHeight = b; + bool b; + rStream.ReadCharAsBool( b ); bIncludeFont = b; + rStream.ReadCharAsBool( b ); bIncludeJustify = b; + rStream.ReadCharAsBool( b ); bIncludeFrame = b; + rStream.ReadCharAsBool( b ); bIncludeBackground = b; + rStream.ReadCharAsBool( b ); bIncludeValueFormat = b; + rStream.ReadCharAsBool( b ); bIncludeWidthHeight = b; if (nVer >= AUTOFORMAT_DATA_ID_31005) rStream >> m_swFields; diff --git a/sc/source/core/tool/chartpos.cxx b/sc/source/core/tool/chartpos.cxx index e73e7e0a0261..11a0bb281613 100644 --- a/sc/source/core/tool/chartpos.cxx +++ b/sc/source/core/tool/chartpos.cxx @@ -197,9 +197,9 @@ void ScChartPositioner::GlueState() *p = nOccu; } } - sal_Bool bGlue = sal_True; + bool bGlue = true; - sal_Bool bGlueCols = false; + bool bGlueCols = false; for ( nCol = 0; bGlue && nCol < nC; nCol++ ) { // iterate columns and try to mark as unused p = pA.get() + (sal_uLong)nCol * nR; @@ -220,11 +220,11 @@ void ScChartPositioner::GlueState() if ( bGlue && *(p = (pA.get() + ((((sal_uLong)nCol+1) * nR) - 1))) == nFree ) { // mark column as totally unused *p = nGlue; - bGlueCols = sal_True; // one unused column at least + bGlueCols = true; // one unused column at least } } - sal_Bool bGlueRows = false; + bool bGlueRows = false; for ( nRow = 0; bGlue && nRow < nR; nRow++ ) { // iterate rows and try to mark as unused p = pA.get() + nRow; @@ -243,7 +243,7 @@ void ScChartPositioner::GlueState() if ( bGlue && *(p = (pA.get() + ((((sal_uLong)nC-1) * nR) + nRow))) == nFree ) { // mark row as totally unused *p = nGlue; - bGlueRows = sal_True; // one unused row at least + bGlueRows = true; // one unused row at least } } @@ -278,8 +278,8 @@ void ScChartPositioner::CheckColRowHeaders() SCROW nRow1, nRow2, iRow; SCTAB nTab1, nTab2; - sal_Bool bColStrings = sal_True; - sal_Bool bRowStrings = sal_True; + bool bColStrings = true; + bool bRowStrings = true; GlueState(); if ( aRangeListRef->size() == 1 ) { @@ -302,7 +302,7 @@ void ScChartPositioner::CheckColRowHeaders() } else { - sal_Bool bVert = (eGlue == SC_CHARTGLUE_NONE || eGlue == SC_CHARTGLUE_ROWS); + bool bVert = (eGlue == SC_CHARTGLUE_NONE || eGlue == SC_CHARTGLUE_ROWS); for ( size_t i = 0, nRanges = aRangeListRef->size(); (i < nRanges) && (bColStrings || bRowStrings); ++i @@ -310,7 +310,7 @@ void ScChartPositioner::CheckColRowHeaders() { ScRange* pR = (*aRangeListRef)[i]; pR->GetVars( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 ); - sal_Bool bTopRow = (nRow1 == nStartRow); + bool bTopRow = (nRow1 == nStartRow); if ( bRowStrings && (bVert || nCol1 == nStartCol) ) { // NONE or ROWS: RowStrings in every selection possible // COLS or BOTH: only from first column @@ -370,7 +370,7 @@ void ScChartPositioner::CreatePositionMap() GlueState(); - const sal_Bool bNoGlue = (eGlue == SC_CHARTGLUE_NONE); + const bool bNoGlue = (eGlue == SC_CHARTGLUE_NONE); ColumnMap* pCols = new ColumnMap; SCROW nNoGlueRow = 0; for ( size_t i = 0, nRanges = aRangeListRef->size(); i < nRanges; ++i ) diff --git a/sc/source/core/tool/consoli.cxx b/sc/source/core/tool/consoli.cxx index d82134f6a7b2..1b5bed4fd302 100644 --- a/sc/source/core/tool/consoli.cxx +++ b/sc/source/core/tool/consoli.cxx @@ -356,7 +356,7 @@ static void lcl_UpdateArray( ScSubTotalFunc eFunc, case SUBTOTAL_FUNC_VAR: case SUBTOTAL_FUNC_VARP: { - sal_Bool bOk = SubTotal::SafePlus(rSum, nVal); + bool bOk = SubTotal::SafePlus(rSum, nVal); bOk = bOk && SubTotal::SafeMult(nVal, nVal); bOk = bOk && SubTotal::SafePlus(rSumSqr, nVal); if (!bOk) @@ -391,7 +391,7 @@ static void lcl_InitArray( ScSubTotalFunc eFunc, case SUBTOTAL_FUNC_VARP: { rSum = nVal; - sal_Bool bOk = SubTotal::SafeMult(nVal, nVal); + bool bOk = SubTotal::SafeMult(nVal, nVal); if (bOk) rSumSqr = nVal; else diff --git a/sc/source/core/tool/ddelink.cxx b/sc/source/core/tool/ddelink.cxx index 925678de860c..0336ce4bebff 100644 --- a/sc/source/core/tool/ddelink.cxx +++ b/sc/source/core/tool/ddelink.cxx @@ -87,8 +87,8 @@ ScDdeLink::ScDdeLink( ScDocument* pD, SvStream& rStream, ScMultipleReadHeader& r aTopic = rStream.ReadUniOrByteString( eCharSet ); aItem = rStream.ReadUniOrByteString( eCharSet ); - sal_Bool bHasValue; - rStream.ReadUChar( bHasValue ); + bool bHasValue; + rStream.ReadCharAsBool( bHasValue ); if ( bHasValue ) pResult = new ScMatrix(0, 0); @@ -109,7 +109,7 @@ void ScDdeLink::Store( SvStream& rStream, ScMultipleWriteHeader& rHdr ) const rStream.WriteUniOrByteString( aTopic, eCharSet ); rStream.WriteUniOrByteString( aItem, eCharSet ); - sal_Bool bHasValue = ( pResult != 0 ); + bool bHasValue = ( pResult != 0 ); rStream.WriteUChar( bHasValue ); if( rStream.GetVersion() > SOFFICE_FILEFORMAT_40 ) // nicht bei 4.0 Export diff --git a/sc/source/core/tool/doubleref.cxx b/sc/source/core/tool/doubleref.cxx index ce6d45cad0be..e6ed4e1e1e05 100644 --- a/sc/source/core/tool/doubleref.cxx +++ b/sc/source/core/tool/doubleref.cxx @@ -56,7 +56,7 @@ bool lcl_createStarQuery( if (pQueryRef->getColSize() < 4) return false; - sal_Bool bValid; + bool bValid; OUString aCellStr; SCSIZE nIndex = 0; SCROW nRow = 0; @@ -78,12 +78,12 @@ bool lcl_createStarQuery( if ( aCellStr.equals(ScGlobal::GetRscString(STR_TABLE_UND)) ) { rEntry.eConnect = SC_AND; - bValid = sal_True; + bValid = true; } else if ( aCellStr.equals(ScGlobal::GetRscString(STR_TABLE_ODER)) ) { rEntry.eConnect = SC_OR; - bValid = sal_True; + bValid = true; } } @@ -345,7 +345,7 @@ SCCOL ScDBInternalRange::findFieldColumn(const OUString& rStr, sal_uInt16* pErr) SCCOL nDBCol2 = e.Col(); SCCOL nField = nDBCol1; - sal_Bool bFound = sal_False; + bool bFound = false; OUString aCellStr; ScAddress aLook( nDBCol1, nDBRow1, nDBTab1 ); diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx index f1206c003b4c..732d55c15609 100644 --- a/sc/source/core/tool/editutil.cxx +++ b/sc/source/core/tool/editutil.cxx @@ -282,7 +282,7 @@ Rectangle ScEditUtil::GetEditArea( const ScPatternAttr* pPattern, bool bForceToT Point aStartPos = aScrPos; - sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); long nLayoutSign = bLayoutRTL ? -1 : 1; const ScMergeAttr* pMerge = (const ScMergeAttr*)&pPattern->GetItem(ATTR_MERGE); @@ -317,7 +317,7 @@ Rectangle ScEditUtil::GetEditArea( const ScPatternAttr* pPattern, bool bForceToT GetItem(ATTR_VER_JUSTIFY)).GetValue(); // asian vertical is always edited top-aligned - sal_Bool bAsianVertical = ((const SfxBoolItem&)pPattern->GetItem( ATTR_STACKED )).GetValue() && + bool bAsianVertical = ((const SfxBoolItem&)pPattern->GetItem( ATTR_STACKED )).GetValue() && ((const SfxBoolItem&)pPattern->GetItem( ATTR_VERTICAL_ASIAN )).GetValue(); if ( eJust == SVX_VER_JUSTIFY_TOP || @@ -486,9 +486,9 @@ void ScEditEngineDefaulter::SetDefaults( const SfxItemSet& rSet, bool bRememberC bDeleteDefaults = true; } const SfxItemSet& rNewSet = bRememberCopy ? *pDefaults : rSet; - sal_Bool bUndo = IsUndoEnabled(); + bool bUndo = IsUndoEnabled(); EnableUndo( false ); - sal_Bool bUpdateMode = GetUpdateMode(); + bool bUpdateMode = GetUpdateMode(); if ( bUpdateMode ) SetUpdateMode( false ); sal_Int32 nPara = GetParagraphCount(); @@ -535,7 +535,7 @@ const SfxItemSet& ScEditEngineDefaulter::GetDefaults() void ScEditEngineDefaulter::SetText( const EditTextObject& rTextObject ) { - sal_Bool bUpdateMode = GetUpdateMode(); + bool bUpdateMode = GetUpdateMode(); if ( bUpdateMode ) SetUpdateMode( false ); EditEngine::SetText( rTextObject ); @@ -548,7 +548,7 @@ void ScEditEngineDefaulter::SetText( const EditTextObject& rTextObject ) void ScEditEngineDefaulter::SetTextNewDefaults( const EditTextObject& rTextObject, const SfxItemSet& rSet, bool bRememberCopy ) { - sal_Bool bUpdateMode = GetUpdateMode(); + bool bUpdateMode = GetUpdateMode(); if ( bUpdateMode ) SetUpdateMode( false ); EditEngine::SetText( rTextObject ); @@ -560,7 +560,7 @@ void ScEditEngineDefaulter::SetTextNewDefaults( const EditTextObject& rTextObjec void ScEditEngineDefaulter::SetTextNewDefaults( const EditTextObject& rTextObject, SfxItemSet* pSet, bool bTakeOwnership ) { - sal_Bool bUpdateMode = GetUpdateMode(); + bool bUpdateMode = GetUpdateMode(); if ( bUpdateMode ) SetUpdateMode( false ); EditEngine::SetText( rTextObject ); @@ -571,7 +571,7 @@ void ScEditEngineDefaulter::SetTextNewDefaults( const EditTextObject& rTextObjec void ScEditEngineDefaulter::SetText( const OUString& rText ) { - sal_Bool bUpdateMode = GetUpdateMode(); + bool bUpdateMode = GetUpdateMode(); if ( bUpdateMode ) SetUpdateMode( false ); EditEngine::SetText( rText ); @@ -584,7 +584,7 @@ void ScEditEngineDefaulter::SetText( const OUString& rText ) void ScEditEngineDefaulter::SetTextNewDefaults( const OUString& rText, const SfxItemSet& rSet, bool bRememberCopy ) { - sal_Bool bUpdateMode = GetUpdateMode(); + bool bUpdateMode = GetUpdateMode(); if ( bUpdateMode ) SetUpdateMode( false ); EditEngine::SetText( rText ); @@ -596,7 +596,7 @@ void ScEditEngineDefaulter::SetTextNewDefaults( const OUString& rText, void ScEditEngineDefaulter::SetTextNewDefaults( const OUString& rText, SfxItemSet* pSet, bool bTakeOwnership ) { - sal_Bool bUpdateMode = GetUpdateMode(); + bool bUpdateMode = GetUpdateMode(); if ( bUpdateMode ) SetUpdateMode( false ); EditEngine::SetText( rText ); @@ -618,7 +618,7 @@ void ScEditEngineDefaulter::RepeatDefaults() void ScEditEngineDefaulter::RemoveParaAttribs() { SfxItemSet* pCharItems = NULL; - sal_Bool bUpdateMode = GetUpdateMode(); + bool bUpdateMode = GetUpdateMode(); if ( bUpdateMode ) SetUpdateMode( false ); sal_Int32 nParCount = GetParagraphCount(); diff --git a/sc/source/core/tool/formulaopt.cxx b/sc/source/core/tool/formulaopt.cxx index 235a594034d5..581c2f734d5c 100644 --- a/sc/source/core/tool/formulaopt.cxx +++ b/sc/source/core/tool/formulaopt.cxx @@ -296,7 +296,7 @@ void ScFormulaCfg::UpdateFromProperties( const Sequence<OUString>& aNames ) break; case SCFORMULAOPT_ENGLISH_FUNCNAME: { - sal_Bool bEnglish = false; + bool bEnglish = false; if (pValues[nProp] >>= bEnglish) SetUseEnglishFuncName(bEnglish); } @@ -390,7 +390,7 @@ void ScFormulaCfg::UpdateFromProperties( const Sequence<OUString>& aNames ) break; case SCFORMULAOPT_EMPTY_OUSTRING_AS_ZERO: { - sal_Bool bVal = GetCalcConfig().mbEmptyStringAsZero; + bool bVal = GetCalcConfig().mbEmptyStringAsZero; pValues[nProp] >>= bVal; GetCalcConfig().mbEmptyStringAsZero = bVal; } @@ -445,7 +445,7 @@ void ScFormulaCfg::UpdateFromProperties( const Sequence<OUString>& aNames ) break; case SCFORMULAOPT_OPENCL_ENABLED: { - sal_Bool bVal = GetCalcConfig().mbOpenCLEnabled; + bool bVal = GetCalcConfig().mbOpenCLEnabled; pValues[nProp] >>= bVal; #if 0 // Don't remove please. // The intent here is that tml when running CppunitTest_sc_opencl_test turns this on. @@ -456,7 +456,7 @@ void ScFormulaCfg::UpdateFromProperties( const Sequence<OUString>& aNames ) break; case SCFORMULAOPT_OPENCL_AUTOSELECT: { - sal_Bool bVal = GetCalcConfig().mbOpenCLAutoSelect; + bool bVal = GetCalcConfig().mbOpenCLAutoSelect; pValues[nProp] >>= bVal; GetCalcConfig().mbOpenCLAutoSelect = bVal; } @@ -501,7 +501,7 @@ void ScFormulaCfg::Commit() break; case SCFORMULAOPT_ENGLISH_FUNCNAME: { - sal_Bool b = GetUseEnglishFuncName(); + bool b = GetUseEnglishFuncName(); pValues[nProp] <<= b; } break; @@ -542,7 +542,7 @@ void ScFormulaCfg::Commit() break; case SCFORMULAOPT_EMPTY_OUSTRING_AS_ZERO: { - sal_Bool bVal = GetCalcConfig().mbEmptyStringAsZero; + bool bVal = GetCalcConfig().mbEmptyStringAsZero; pValues[nProp] <<= bVal; } break; @@ -586,14 +586,14 @@ void ScFormulaCfg::Commit() break; case SCFORMULAOPT_OPENCL_ENABLED: { - sal_Bool bVal = GetCalcConfig().mbOpenCLEnabled; + bool bVal = GetCalcConfig().mbOpenCLEnabled; pValues[nProp] <<= bVal; bSetOpenCL = bVal; } break; case SCFORMULAOPT_OPENCL_AUTOSELECT: { - sal_Bool bVal = GetCalcConfig().mbOpenCLAutoSelect; + bool bVal = GetCalcConfig().mbOpenCLAutoSelect; pValues[nProp] <<= bVal; bSetOpenCL = true; } diff --git a/sc/source/core/tool/prnsave.cxx b/sc/source/core/tool/prnsave.cxx index ea41a617b040..b47341892859 100644 --- a/sc/source/core/tool/prnsave.cxx +++ b/sc/source/core/tool/prnsave.cxx @@ -54,7 +54,7 @@ void ScPrintSaverTab::SetRepeat( const ScRange* pCol, const ScRange* pRow ) mpRepeatRow = pRow ? new ScRange(*pRow) : NULL; } -inline sal_Bool PtrEqual( const ScRange* p1, const ScRange* p2 ) +inline bool PtrEqual( const ScRange* p1, const ScRange* p2 ) { return ( !p1 && !p2 ) || ( p1 && p2 && *p1 == *p2 ); } diff --git a/sc/source/core/tool/progress.cxx b/sc/source/core/tool/progress.cxx index 634f167dce6d..5909fa909974 100644 --- a/sc/source/core/tool/progress.cxx +++ b/sc/source/core/tool/progress.cxx @@ -47,7 +47,7 @@ ScDocument* ScProgress::pInterpretDoc; bool ScProgress::bIdleWasEnabled = false; -static sal_Bool lcl_IsHiddenDocument( SfxObjectShell* pObjSh ) +static bool lcl_IsHiddenDocument( SfxObjectShell* pObjSh ) { if (pObjSh) { @@ -58,7 +58,7 @@ static sal_Bool lcl_IsHiddenDocument( SfxObjectShell* pObjSh ) const SfxPoolItem* pItem; if ( pSet && SFX_ITEM_SET == pSet->GetItemState( SID_HIDDEN, true, &pItem ) && ((const SfxBoolItem*)pItem)->GetValue() ) - return sal_True; + return true; } } return false; diff --git a/sc/source/core/tool/rangeutl.cxx b/sc/source/core/tool/rangeutl.cxx index 14dc78e45e3b..31ea9a2ab6aa 100644 --- a/sc/source/core/tool/rangeutl.cxx +++ b/sc/source/core/tool/rangeutl.cxx @@ -357,7 +357,7 @@ sal_Int32 ScRangeStringConverter::IndexOf( sal_Int32 nLength = rString.getLength(); sal_Int32 nIndex = nOffset; bool bQuoted = false; - sal_Bool bExitLoop = false; + bool bExitLoop = false; while( !bExitLoop && (nIndex >= 0 && nIndex < nLength) ) { @@ -377,7 +377,7 @@ sal_Int32 ScRangeStringConverter::IndexOfDifferent( { sal_Int32 nLength = rString.getLength(); sal_Int32 nIndex = nOffset; - sal_Bool bExitLoop = false; + bool bExitLoop = false; while( !bExitLoop && (nIndex >= 0 && nIndex < nLength) ) { diff --git a/sc/source/core/tool/refreshtimer.cxx b/sc/source/core/tool/refreshtimer.cxx index 47f68963300a..380d7546fda7 100644 --- a/sc/source/core/tool/refreshtimer.cxx +++ b/sc/source/core/tool/refreshtimer.cxx @@ -106,7 +106,7 @@ void ScRefreshTimer::StopRefreshTimer() void ScRefreshTimer::SetRefreshDelay( sal_uLong nSeconds ) { - sal_Bool bActive = IsActive(); + bool bActive = IsActive(); if ( bActive && !nSeconds ) Stop(); SetTimeout( nSeconds * 1000 ); diff --git a/sc/source/filter/dif/difimp.cxx b/sc/source/filter/dif/difimp.cxx index e759778607eb..87c3fb0b2003 100644 --- a/sc/source/filter/dif/difimp.cxx +++ b/sc/source/filter/dif/difimp.cxx @@ -329,7 +329,7 @@ TOPIC DifParser::GetNextTopic( void ) { const sal_Unicode* pRef; sal_uInt16 nCnt = 0; - sal_Bool bSearch = sal_True; + bool bSearch = true; pRef = ppKeys[ nCnt ]; @@ -637,11 +637,11 @@ const sal_Unicode* DifParser::ScanIntVal( const sal_Unicode* pStart, sal_uInt32& bool DifParser::ScanFloatVal( const sal_Unicode* pStart ) { - sal_Bool bNeg = false; + bool bNeg = false; double fFracPos = 1.0; sal_Int32 nExp = 0; - sal_Bool bExpNeg = false; - sal_Bool bExpOverflow = false; + bool bExpNeg = false; + bool bExpOverflow = false; static const sal_uInt16 nExpLimit = 4096; // ACHTUNG: muss genauer ermittelt werden! sal_Unicode cAkt; @@ -767,7 +767,7 @@ bool DifParser::ScanFloatVal( const sal_Unicode* pStart ) } else { - bExpOverflow = sal_True; + bExpOverflow = true; eS = S_FINDEND; } } diff --git a/sc/source/filter/excel/excel.cxx b/sc/source/filter/excel/excel.cxx index 80faea664427..9d574cbb591b 100644 --- a/sc/source/filter/excel/excel.cxx +++ b/sc/source/filter/excel/excel.cxx @@ -144,7 +144,7 @@ FltError ScFormatFilterPluginImpl::ScImportExcel( SfxMedium& rMedium, ScDocument static FltError lcl_ExportExcelBiff( SfxMedium& rMedium, ScDocument *pDocument, - SvStream* pMedStrm, sal_Bool bBiff8, rtl_TextEncoding eNach ) + SvStream* pMedStrm, bool bBiff8, rtl_TextEncoding eNach ) { // try to open an OLE storage SotStorageRef xRootStrg = new SotStorage( pMedStrm, false ); diff --git a/sc/source/filter/excel/excform.cxx b/sc/source/filter/excel/excform.cxx index 99c2d7dbab81..cc85f4f92fe4 100644 --- a/sc/source/filter/excel/excform.cxx +++ b/sc/source/filter/excel/excform.cxx @@ -49,7 +49,7 @@ void ImportExcel::Formula25() sal_uInt16 nXF = 0, nFormLen; double fCurVal; sal_uInt8 nFlag0; - sal_Bool bShrFmla; + bool bShrFmla; aIn >> aXclPos; @@ -214,12 +214,12 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s double fDouble; OUString aString; bool bError = false; - sal_Bool bArrayFormula = false; + bool bArrayFormula = false; TokenId nMerk0; - const sal_Bool bRangeName = eFT == FT_RangeName; - const sal_Bool bSharedFormula = eFT == FT_SharedFormula; - const sal_Bool bConditional = eFT == FT_CondFormat; - const sal_Bool bRNorSF = bRangeName || bSharedFormula || bConditional; + const bool bRangeName = eFT == FT_RangeName; + const bool bSharedFormula = eFT == FT_SharedFormula; + const bool bConditional = eFT == FT_CondFormat; + const bool bRNorSF = bRangeName || bSharedFormula || bConditional; ScSingleRefData aSRD; ScComplexRefData aCRD; @@ -263,7 +263,7 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s aIn.Ignore( nUINT16 ); - bArrayFormula = sal_True; + bArrayFormula = true; break; case 0x03: // Addition [312 264] aStack >> nMerk0; @@ -903,9 +903,9 @@ ConvErr ExcelToSc::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal sal_uInt16 nUINT16; sal_uInt8 nByte; bool bError = false; - const sal_Bool bRangeName = eFT == FT_RangeName; - const sal_Bool bSharedFormula = eFT == FT_SharedFormula; - const sal_Bool bRNorSF = bRangeName || bSharedFormula; + const bool bRangeName = eFT == FT_RangeName; + const bool bSharedFormula = eFT == FT_SharedFormula; + const bool bRNorSF = bRangeName || bSharedFormula; ScSingleRefData aSRD; ScComplexRefData aCRD; diff --git a/sc/source/filter/excel/excform8.cxx b/sc/source/filter/excel/excform8.cxx index 83671ab0a575..1653ea9f1868 100644 --- a/sc/source/filter/excel/excform8.cxx +++ b/sc/source/filter/excel/excform8.cxx @@ -143,7 +143,7 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn, double fDouble; OUString aString; bool bError = false; - sal_Bool bArrayFormula = false; + bool bArrayFormula = false; TokenId nMerk0; const bool bCondFormat = eFT == FT_CondFormat; const bool bRangeName = eFT == FT_RangeName || bCondFormat; @@ -185,7 +185,7 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn, case 0x02: // Data Table [325 277] aIn.Ignore( 4 ); - bArrayFormula = sal_True; + bArrayFormula = true; break; case 0x03: // Addition [312 264] aStack >> nMerk0; diff --git a/sc/source/filter/excel/excimp8.cxx b/sc/source/filter/excel/excimp8.cxx index 24adc64923e8..d0269961e1f8 100644 --- a/sc/source/filter/excel/excimp8.cxx +++ b/sc/source/filter/excel/excimp8.cxx @@ -578,7 +578,7 @@ void XclImpAutoFilterData::InsertQueryParam() if (pCurrDBData) { ScRange aAdvRange; - sal_Bool bHasAdv = pCurrDBData->GetAdvancedQuerySource( aAdvRange ); + bool bHasAdv = pCurrDBData->GetAdvancedQuerySource( aAdvRange ); if( bHasAdv ) pExcRoot->pIR->GetDoc().CreateQueryParam( aAdvRange.aStart.Col(), aAdvRange.aStart.Row(), aAdvRange.aEnd.Col(), aAdvRange.aEnd.Row(), diff --git a/sc/source/filter/excel/excrecds.cxx b/sc/source/filter/excel/excrecds.cxx index f45ba187ffd7..674861fa4b7b 100644 --- a/sc/source/filter/excel/excrecds.cxx +++ b/sc/source/filter/excel/excrecds.cxx @@ -907,8 +907,8 @@ ExcAutoFilterRecs::ExcAutoFilterRecs( const XclExpRoot& rRoot, SCTAB nTab ) : { XclExpNameManager& rNameMgr = GetNameManager(); - sal_Bool bFound = false; - sal_Bool bAdvanced = false; + bool bFound = false; + bool bAdvanced = false; ScDBData* pData = rRoot.GetDoc().GetAnonymousDBData(nTab); ScRange aAdvRange; if (pData) @@ -951,8 +951,8 @@ ExcAutoFilterRecs::ExcAutoFilterRecs( const XclExpRoot& rRoot, SCTAB nTab ) : // AutoFilter else { - sal_Bool bConflict = false; - sal_Bool bContLoop = sal_True; + bool bConflict = false; + bool bContLoop = true; bool bHasOr = false; SCCOLROW nFirstField = aParam.GetEntry( 0 ).nField; diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx index 8ee0d7d7f53e..bf553117a014 100644 --- a/sc/source/filter/excel/impop.cxx +++ b/sc/source/filter/excel/impop.cxx @@ -1347,8 +1347,8 @@ void ImportExcel::PostDocLoad( void ) p = pExcRoot->pPrintTitles->First(n); if( p ) { - sal_Bool bRowVirgin = sal_True; - sal_Bool bColVirgin = sal_True; + bool bRowVirgin = true; + bool bColVirgin = true; while( p ) { diff --git a/sc/source/filter/excel/xechart.cxx b/sc/source/filter/excel/xechart.cxx index f4c3dd98af94..5d10e380fc80 100644 --- a/sc/source/filter/excel/xechart.cxx +++ b/sc/source/filter/excel/xechart.cxx @@ -1693,7 +1693,7 @@ bool XclExpChSerTrendLine::Convert( Reference< XRegressionCurve > xRegCurve, sal aCurveProp.GetProperty(maData.mfForecastFor, EXC_CHPROP_EXTRAPOLATE_FORWARD); aCurveProp.GetProperty(maData.mfForecastBack, EXC_CHPROP_EXTRAPOLATE_BACKWARD); - sal_Bool bIsForceIntercept = false; + bool bIsForceIntercept = false; aCurveProp.GetProperty(bIsForceIntercept, EXC_CHPROP_FORCE_INTERCEPT); if (bIsForceIntercept) aCurveProp.GetProperty(maData.mfIntercept, EXC_CHPROP_INTERCEPT_VALUE); diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx index c5301d6bd546..b59c987bdd39 100644 --- a/sc/source/filter/excel/xehelper.cxx +++ b/sc/source/filter/excel/xehelper.cxx @@ -570,7 +570,7 @@ XclExpStringRef XclExpStringHelper::CreateCellString( // formatted cell ScEditEngineDefaulter& rEE = rRoot.GetEditEngine(); - sal_Bool bOldUpdateMode = rEE.GetUpdateMode(); + bool bOldUpdateMode = rEE.GetUpdateMode(); rEE.SetUpdateMode( true ); // default items @@ -595,7 +595,7 @@ XclExpStringRef XclExpStringHelper::CreateString( if( const OutlinerParaObject* pParaObj = rTextObj.GetOutlinerParaObject() ) { EditEngine& rEE = rRoot.GetDrawEditEngine(); - sal_Bool bOldUpdateMode = rEE.GetUpdateMode(); + bool bOldUpdateMode = rEE.GetUpdateMode(); rEE.SetUpdateMode( true ); // create the string rEE.SetText( pParaObj->GetTextObject() ); @@ -623,7 +623,7 @@ XclExpStringRef XclExpStringHelper::CreateString( { XclExpStringRef xString; EditEngine& rEE = rRoot.GetDrawEditEngine(); - sal_Bool bOldUpdateMode = rEE.GetUpdateMode(); + bool bOldUpdateMode = rEE.GetUpdateMode(); rEE.SetUpdateMode( true ); rEE.SetText( rEditObj ); xString = lclCreateFormattedString( rRoot, rEE, 0, nFlags, nMaxLen ); @@ -683,7 +683,7 @@ void XclExpHFConverter::AppendPortion( const EditTextObject* pTextObj, sal_Unico SfxItemSet aItemSet( *GetDoc().GetPool(), ATTR_PATTERN_START, ATTR_PATTERN_END ); // edit engine - sal_Bool bOldUpdateMode = mrEE.GetUpdateMode(); + bool bOldUpdateMode = mrEE.GetUpdateMode(); mrEE.SetUpdateMode( true ); mrEE.SetText( *pTextObj ); diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx index 82a814591163..fb8d326b0631 100644 --- a/sc/source/filter/excel/xichart.cxx +++ b/sc/source/filter/excel/xichart.cxx @@ -1619,7 +1619,7 @@ Reference< XRegressionCurve > XclImpChSerTrendLine::CreateRegressionCurve() cons aPropSet.SetProperty(EXC_CHPROP_EXTRAPOLATE_FORWARD, maData.mfForecastFor); aPropSet.SetProperty(EXC_CHPROP_EXTRAPOLATE_BACKWARD, maData.mfForecastBack); - sal_Bool bForceIntercept = !rtl::math::isNan(maData.mfIntercept); + bool bForceIntercept = !rtl::math::isNan(maData.mfIntercept); aPropSet.SetProperty(EXC_CHPROP_FORCE_INTERCEPT, bForceIntercept); if (bForceIntercept) { diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx index 1b7ecc60ce8b..29897285cee8 100644 --- a/sc/source/filter/excel/xiescher.cxx +++ b/sc/source/filter/excel/xiescher.cxx @@ -1433,7 +1433,7 @@ SdrObject* XclImpTextObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const Re OUString aRectType = "rectangle"; xSdrObj->MergeDefaultAttributes( &aRectType ); ConvertRectStyle( *xSdrObj ); - sal_Bool bAutoSize = ::get_flag( maTextData.maData.mnFlags, EXC_OBJ_TEXT_AUTOSIZE ); + bool bAutoSize = ::get_flag( maTextData.maData.mnFlags, EXC_OBJ_TEXT_AUTOSIZE ); xSdrObj->SetMergedItem( SdrTextAutoGrowWidthItem( bAutoSize ) ); xSdrObj->SetMergedItem( SdrTextAutoGrowHeightItem( bAutoSize ) ); xSdrObj->SetMergedItem( SdrTextWordWrapItem( true ) ); diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx index 2c56e435e766..329d9e04336d 100644 --- a/sc/source/filter/html/htmlexp.cxx +++ b/sc/source/filter/html/htmlexp.cxx @@ -975,11 +975,11 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab ) else aBgColor = rBrushItem.GetColor(); - sal_Bool bBold = ( WEIGHT_BOLD <= rWeightItem.GetWeight() ); - sal_Bool bItalic = ( ITALIC_NONE != rPostureItem.GetPosture() ); - sal_Bool bUnderline = ( UNDERLINE_NONE != rUnderlineItem.GetLineStyle() ); - sal_Bool bSetFontColor = ( COL_AUTO != rColorItem.GetValue().GetColor() ); // default is AUTO now - sal_Bool bSetFontName = ( aHTMLStyle.aFontFamilyName != rFontItem.GetFamilyName() ); + bool bBold = ( WEIGHT_BOLD <= rWeightItem.GetWeight() ); + bool bItalic = ( ITALIC_NONE != rPostureItem.GetPosture() ); + bool bUnderline = ( UNDERLINE_NONE != rUnderlineItem.GetLineStyle() ); + bool bSetFontColor = ( COL_AUTO != rColorItem.GetValue().GetColor() ); // default is AUTO now + bool bSetFontName = ( aHTMLStyle.aFontFamilyName != rFontItem.GetFamilyName() ); sal_uInt16 nSetFontSizeNumber = 0; sal_uInt32 nFontHeight = rFontHeightItem.GetHeight(); if ( nFontHeight != aHTMLStyle.nFontHeight ) @@ -989,7 +989,7 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab ) nSetFontSizeNumber = 0; // no difference, don't set } - sal_Bool bSetFont = (bSetFontColor || bSetFontName || nSetFontSizeNumber); + bool bSetFont = (bSetFontColor || bSetFontName || nSetFontSizeNumber); //! TODO: we could entirely use CSS1 here instead, but that would exclude //! Netscape 3.0 and Netscape 4.x without JavaScript enabled. @@ -1182,7 +1182,7 @@ bool ScHTMLExport::WriteFieldText( const EditTextObject* pData ) } if ( bFields ) { - sal_Bool bOldUpdateMode = rEngine.GetUpdateMode(); + bool bOldUpdateMode = rEngine.GetUpdateMode(); rEngine.SetUpdateMode( true ); // no portions if not formatted for ( sal_Int32 nPar=0; nPar < nParas; nPar++ ) { @@ -1195,7 +1195,7 @@ bool ScHTMLExport::WriteFieldText( const EditTextObject* pData ) { sal_Int32 nEnd = *it; ESelection aSel( nPar, nStart, nPar, nEnd ); - sal_Bool bUrl = false; + bool bUrl = false; // fields are single characters if ( nEnd == nStart+1 ) { @@ -1206,7 +1206,7 @@ bool ScHTMLExport::WriteFieldText( const EditTextObject* pData ) const SvxFieldData* pField = ((const SvxFieldItem*)pItem)->GetField(); if ( pField && pField->ISA(SvxURLField) ) { - bUrl = sal_True; + bUrl = true; const SvxURLField* pURLField = (const SvxURLField*)pField; // String aFieldText = rEngine.GetText( aSel ); rStrm.WriteChar( '<' ).WriteCharPtr( OOO_STRING_SVTOOLS_HTML_anchor ).WriteChar( ' ' ).WriteCharPtr( OOO_STRING_SVTOOLS_HTML_O_href ).WriteCharPtr( "=\"" ); diff --git a/sc/source/filter/html/htmlexp2.cxx b/sc/source/filter/html/htmlexp2.cxx index 0c5fcdfa6817..5710afbc1cbb 100644 --- a/sc/source/filter/html/htmlexp2.cxx +++ b/sc/source/filter/html/htmlexp2.cxx @@ -93,7 +93,7 @@ void ScHTMLExport::FillGraphList( const SdrPage* pPage, SCTAB nTab, SCCOL nCol2 = aR.aEnd.Col(); SCROW nRow2 = aR.aEnd.Row(); // All cells empty under object? - sal_Bool bInCell = (pDoc->GetEmptyLinesInBlock( + bool bInCell = (pDoc->GetEmptyLinesInBlock( nCol1, nRow1, nTab, nCol2, nRow2, nTab, DIR_TOP ) == static_cast< SCSIZE >( nRow2 - nRow1 )); // rows-1 ! if ( bInCell ) @@ -142,8 +142,8 @@ void ScHTMLExport::WriteGraphEntry( ScHTMLGraphEntry* pE ) const SdrGrafObjGeoData* pGeo = (SdrGrafObjGeoData*)pSGO->GetGeoData(); sal_uInt16 nMirrorCase = (pGeo->aGeo.nDrehWink == 18000 ? ( pGeo->bMirrored ? 3 : 4 ) : ( pGeo->bMirrored ? 2 : 1 )); - sal_Bool bHMirr = ( ( nMirrorCase == 2 ) || ( nMirrorCase == 4 ) ); - sal_Bool bVMirr = ( ( nMirrorCase == 3 ) || ( nMirrorCase == 4 ) ); + bool bHMirr = ( ( nMirrorCase == 2 ) || ( nMirrorCase == 4 ) ); + bool bVMirr = ( ( nMirrorCase == 3 ) || ( nMirrorCase == 4 ) ); sal_uLong nXOutFlags = 0; if ( bHMirr ) nXOutFlags |= XOUTBMP_MIRROR_HORZ; diff --git a/sc/source/filter/inc/scmem.h b/sc/source/filter/inc/scmem.h index 2d7fd74b4baf..c46645fc0402 100644 --- a/sc/source/filter/inc/scmem.h +++ b/sc/source/filter/inc/scmem.h @@ -24,7 +24,7 @@ #include <sal/types.h> -sal_Bool MemNew( void ); +bool MemNew( void ); void MemDelete( void ); #endif diff --git a/sc/source/filter/inc/tool.h b/sc/source/filter/inc/tool.h index 4e3fa9b708c2..cadf3f5af87d 100644 --- a/sc/source/filter/inc/tool.h +++ b/sc/source/filter/inc/tool.h @@ -69,12 +69,12 @@ public: pAttr = NULL; } - sal_Bool operator ==( const FormIdent& rComp ) const + bool operator ==( const FormIdent& rComp ) const { return ( nStamp == rComp.nStamp ); } - sal_Bool operator ==( const StampTyp& rStamp ) const + bool operator ==( const StampTyp& rStamp ) const { return ( nStamp == rStamp ); } diff --git a/sc/source/filter/lotus/filter.cxx b/sc/source/filter/lotus/filter.cxx index 6ea74064f068..79a74c815590 100644 --- a/sc/source/filter/lotus/filter.cxx +++ b/sc/source/filter/lotus/filter.cxx @@ -46,8 +46,8 @@ const sal_uInt16 nBOF = 0x0000; extern WKTYP eTyp; // Typ der gerade in bearbeitung befindlichen Datei WKTYP eTyp; -extern sal_Bool bEOF; // zeigt Ende der Datei -sal_Bool bEOF; +extern bool bEOF; // zeigt Ende der Datei +bool bEOF; extern rtl_TextEncoding eCharVon; rtl_TextEncoding eCharVon; @@ -100,7 +100,7 @@ generate_Opcodes( SvStream& aStream, ScDocument& rDoc, aStream.ReadUInt16( nOpcode ).ReadUInt16( nLength ); aPrgrsBar.Progress(); if( nOpcode == LOTUS_EOF ) - bEOF = sal_True; + bEOF = true; else if( nOpcode == LOTUS_FILEPASSWD ) return eERR_FILEPASSWD; diff --git a/sc/source/filter/lotus/lotform.cxx b/sc/source/filter/lotus/lotform.cxx index 6cd07c838397..f767504b753e 100644 --- a/sc/source/filter/lotus/lotform.cxx +++ b/sc/source/filter/lotus/lotform.cxx @@ -41,7 +41,7 @@ void LotusToSc::DoFunc( DefTokenId eOc, sal_uInt8 nAnz, const sal_Char* pExtStri sal_Int32 nLauf; TokenId nMerk0, nMerk1; - sal_Bool bAddIn = false; + bool bAddIn = false; OSL_ENSURE( nAnz < 128, "-LotusToSc::DoFunc(): Neee! -so viel kann ich nicht!" ); @@ -70,7 +70,7 @@ void LotusToSc::DoFunc( DefTokenId eOc, sal_uInt8 nAnz, const sal_Char* pExtStri if( eOc == ocNoName ) { - bAddIn = sal_True; + bAddIn = true; nMerk0 = aPool.Store(eOc, OStringToOUString(t, eSrcChar)); aPool << nMerk0; diff --git a/sc/source/filter/lotus/lotimpop.cxx b/sc/source/filter/lotus/lotimpop.cxx index 0a31e33a681d..a17b94d4b8fa 100644 --- a/sc/source/filter/lotus/lotimpop.cxx +++ b/sc/source/filter/lotus/lotimpop.cxx @@ -404,7 +404,7 @@ void ImportLotus::_Row( const sal_uInt16 nRecLen ) sal_uInt8 nRepeats; LotAttrWK3 aAttr; - sal_Bool bCenter = false; + bool bCenter = false; SCCOL nCenterStart = 0, nCenterEnd = 0; Read( nRow ); @@ -440,7 +440,7 @@ void ImportLotus::_Row( const sal_uInt16 nRecLen ) } else {// ganz neue Center - bCenter = sal_True; + bCenter = true; nCenterStart = nColCnt; } nCenterEnd = nColCnt + static_cast<SCCOL>(nRepeats); diff --git a/sc/source/filter/lotus/lotread.cxx b/sc/source/filter/lotus/lotread.cxx index d38b0c0b1160..525ea505b48c 100644 --- a/sc/source/filter/lotus/lotread.cxx +++ b/sc/source/filter/lotus/lotread.cxx @@ -232,7 +232,7 @@ FltError ImportLotus::Read( SvStream& rIn ) { pIn = &rIn; - sal_Bool bRead = sal_True; + bool bRead = true; sal_uInt16 nOp; sal_uInt16 nRecLen; sal_uInt32 nNextRec = 0UL; diff --git a/sc/source/filter/lotus/lotus.cxx b/sc/source/filter/lotus/lotus.cxx index c7cc4d0ce906..cc0af0924f5d 100644 --- a/sc/source/filter/lotus/lotus.cxx +++ b/sc/source/filter/lotus/lotus.cxx @@ -30,7 +30,7 @@ FltError ScFormatFilterPluginImpl::ScImportLotus123( SfxMedium& rMedium, ScDocument* pDocument, rtl_TextEncoding eSrc ) { ScFilterOptions aFilterOpt; - sal_Bool bWithWK3 = aFilterOpt.GetWK3Flag(); + bool bWithWK3 = aFilterOpt.GetWK3Flag(); SvStream* pStream = rMedium.GetInStream(); diff --git a/sc/source/filter/lotus/memory.cxx b/sc/source/filter/lotus/memory.cxx index 33b4858781b2..921ebd176d92 100644 --- a/sc/source/filter/lotus/memory.cxx +++ b/sc/source/filter/lotus/memory.cxx @@ -38,7 +38,7 @@ extern SvxHorJustifyItem *pAttrRight, *pAttrLeft, *pAttrCenter, *pAttrRepeat, *pAttrStandard; // -> tool.cxx, fuer GetFormAttr() extern ScProtectionAttr* pAttrUnprot; // -> tool.cxx, fuer PutFormString() -sal_Bool MemNew( void ) +bool MemNew( void ) { pValueFormCache = new FormCache( pDoc ); @@ -50,7 +50,7 @@ sal_Bool MemNew( void ) pAttrRepeat = new SvxHorJustifyItem( SVX_HOR_JUSTIFY_REPEAT, ATTR_HOR_JUSTIFY ); pAttrStandard = new SvxHorJustifyItem( SVX_HOR_JUSTIFY_STANDARD, ATTR_HOR_JUSTIFY ); - return sal_True; + return true; } diff --git a/sc/source/filter/lotus/op.cxx b/sc/source/filter/lotus/op.cxx index 105892a30f8c..fbbda654017c 100644 --- a/sc/source/filter/lotus/op.cxx +++ b/sc/source/filter/lotus/op.cxx @@ -55,7 +55,7 @@ #include <boost/scoped_array.hpp> extern WKTYP eTyp; // -> filter.cxx, aktueller Dateityp -extern sal_Bool bEOF; // -> filter.cxx, zeigt Dateiende an +extern bool bEOF; // -> filter.cxx, zeigt Dateiende an extern sal_uInt8 nDefaultFormat; // -> tool.cxx, Default-Zellenformat extern ScDocument* pDoc; // -> filter.cxx, Aufhaenger zum Dokumentzugriff extern rtl_TextEncoding eCharVon; // -> filter.cxx, character set specified @@ -76,7 +76,7 @@ void OP_BOF( SvStream& r, sal_uInt16 /*n*/ ) void OP_EOF( SvStream& /*r*/, sal_uInt16 /*n*/ ) { - bEOF = sal_True; + bEOF = true; } void OP_Integer( SvStream& r, sal_uInt16 /*n*/ ) @@ -344,7 +344,7 @@ void OP_BOF123( SvStream& r, sal_uInt16 /*n*/ ) void OP_EOF123( SvStream& /*r*/, sal_uInt16 /*n*/ ) { - bEOF = sal_True; + bEOF = true; } void OP_Label123( SvStream& r, sal_uInt16 n ) @@ -513,7 +513,7 @@ void OP_CreatePattern123( SvStream& r, sal_uInt16 n) r.ReadUInt16( nPatternId ); sal_uInt8 Hor_Align, Ver_Align, temp; - sal_Bool bIsBold,bIsUnderLine,bIsItalics; + bool bIsBold,bIsUnderLine,bIsItalics; r.SeekRel(12); diff --git a/sc/source/filter/lotus/tool.cxx b/sc/source/filter/lotus/tool.cxx index a1bdf41cd58a..288522ad931e 100644 --- a/sc/source/filter/lotus/tool.cxx +++ b/sc/source/filter/lotus/tool.cxx @@ -190,7 +190,7 @@ SfxUInt32Item* FormCache::NewAttr( sal_uInt8 nFormat, sal_uInt8 nSt ) sal_uInt32 nIndex1; sal_uInt32 nHandle; NfIndexTableOffset eIndexTableOffset = NF_NUMERIC_START; - sal_Bool bDefault = false; + bool bDefault = false; if( nForm == 0xFF ) // Default-Format? nForm = nDefaultFormat; @@ -330,11 +330,11 @@ SfxUInt32Item* FormCache::NewAttr( sal_uInt8 nFormat, sal_uInt8 nSt ) break; case 0x0F: // Standardeinstellung //fStandard;nSt; - bDefault = sal_True; + bDefault = true; break; default: //fStandard;nSt; - bDefault = sal_True; + bDefault = true; break; } break; diff --git a/sc/source/filter/oox/commentsbuffer.cxx b/sc/source/filter/oox/commentsbuffer.cxx index 7fe06e0cebb4..93555ad65fd3 100644 --- a/sc/source/filter/oox/commentsbuffer.cxx +++ b/sc/source/filter/oox/commentsbuffer.cxx @@ -153,7 +153,7 @@ void Comment::finalizeImport() Reference< XShape > xAnnoShape( xAnnoShapeSupp->getAnnotationShape(), UNO_SET_THROW ); // convert shape formatting and visibility - sal_Bool bVisible = sal_True; + bool bVisible = true; switch( getFilterType() ) { case FILTER_OOXML: diff --git a/sc/source/filter/oox/pivotcachebuffer.cxx b/sc/source/filter/oox/pivotcachebuffer.cxx index 454a1acf1299..004fe58e2964 100644 --- a/sc/source/filter/oox/pivotcachebuffer.cxx +++ b/sc/source/filter/oox/pivotcachebuffer.cxx @@ -285,10 +285,10 @@ OUString PivotCacheItem::getName() const { case XML_m: return OUString(); case XML_s: return maValue.get< OUString >(); - case XML_n: return OUString::number( maValue.get< double >() ); // !TODO + case XML_n: return OUString::number( maValue.get< double >() ); // !TODO case XML_i: return OUString::number( maValue.get< sal_Int32 >() ); case XML_d: return OUString(); // !TODO - case XML_b: return OUString::boolean( static_cast< sal_Bool >( maValue.get< bool >() ) ); // !TODO + case XML_b: return OUString::boolean( maValue.get< bool >() ); // !TODO case XML_e: return OUString(); // !TODO } OSL_FAIL( "PivotCacheItem::getName - invalid data type" ); diff --git a/sc/source/filter/qpro/qproform.cxx b/sc/source/filter/qpro/qproform.cxx index 5665e99e70a9..a61d0882f74e 100644 --- a/sc/source/filter/qpro/qproform.cxx +++ b/sc/source/filter/qpro/qproform.cxx @@ -78,11 +78,11 @@ void QProToSc::DoFunc( DefTokenId eOc, sal_uInt16 nArgs, const sal_Char* pExtStr sal_Int32 nCount; TokenId nPush, nPush1; - sal_Bool bAddIn = false; + bool bAddIn = false; if( eOc == ocNoName ) { - bAddIn = sal_True; + bAddIn = true; if( pExtString ) { OStringBuffer s("QPRO_"); diff --git a/sc/source/filter/qpro/qprostyle.cxx b/sc/source/filter/qpro/qprostyle.cxx index 5837c658e102..e0db22096c4a 100644 --- a/sc/source/filter/qpro/qprostyle.cxx +++ b/sc/source/filter/qpro/qprostyle.cxx @@ -131,7 +131,7 @@ void ScQProStyle::SetFormat( ScDocument *pDoc, sal_uInt8 nCol, sal_uInt16 nRow, // Font Attributes sal_uInt16 nTmpFnt = maFontRecord[ maFont[ nStyle ] ]; - sal_Bool bIsBold, bIsItalic, bIsUnderLine; + bool bIsBold, bIsItalic, bIsUnderLine; bIsBold = ( nTmpFnt & 0x0001 ) != 0; bIsItalic = ( nTmpFnt & 0x0002 ) != 0; diff --git a/sc/source/filter/rtf/eeimpars.cxx b/sc/source/filter/rtf/eeimpars.cxx index 199772b66cdd..f26adcdb46c0 100644 --- a/sc/source/filter/rtf/eeimpars.cxx +++ b/sc/source/filter/rtf/eeimpars.cxx @@ -177,7 +177,7 @@ void ScEEImport::WriteToDocument( bool bSizeColsRows, double nOutputFactor, SvNu aSet.ClearItem( EE_PARA_JUST ); // Test whether simple String without mixed attributes - sal_Bool bSimple = ( pE->aSel.nStartPara == pE->aSel.nEndPara ); + bool bSimple = ( pE->aSel.nStartPara == pE->aSel.nEndPara ); for (sal_uInt16 nId = EE_CHAR_START; nId <= EE_CHAR_END && bSimple; nId++) { const SfxPoolItem* pItem = 0; diff --git a/sc/source/filter/rtf/rtfexp.cxx b/sc/source/filter/rtf/rtfexp.cxx index 209531436621..bbbda812300c 100644 --- a/sc/source/filter/rtf/rtfexp.cxx +++ b/sc/source/filter/rtf/rtfexp.cxx @@ -199,7 +199,7 @@ void ScRTFExport::WriteCell( SCTAB nTab, SCROW nRow, SCCOL nCol ) } } - sal_Bool bResetPar, bResetAttr; + bool bResetPar, bResetAttr; bResetPar = bResetAttr = false; const SvxHorJustifyItem& rHorJustifyItem = (const SvxHorJustifyItem&)pAttr->GetItem( ATTR_HOR_JUSTIFY ); @@ -225,17 +225,17 @@ void ScRTFExport::WriteCell( SCTAB nTab, SCROW nRow, SCCOL nCol ) if ( rWeightItem.GetWeight() >= WEIGHT_BOLD ) { // bold - bResetAttr = sal_True; + bResetAttr = true; rStrm.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_B ); } if ( rPostureItem.GetPosture() != ITALIC_NONE ) { // italic - bResetAttr = sal_True; + bResetAttr = true; rStrm.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_I ); } if ( rUnderlineItem.GetLineStyle() != UNDERLINE_NONE ) { // underline - bResetAttr = sal_True; + bResetAttr = true; rStrm.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_UL ); } diff --git a/sc/source/filter/rtf/rtfparse.cxx b/sc/source/filter/rtf/rtfparse.cxx index 3280eb55833a..3449bb177cb5 100644 --- a/sc/source/filter/rtf/rtfparse.cxx +++ b/sc/source/filter/rtf/rtfparse.cxx @@ -113,7 +113,7 @@ inline void ScRTFParser::NextRow() bool ScRTFParser::SeekTwips( sal_uInt16 nTwips, SCCOL* pCol ) { ScRTFColTwips::const_iterator it = pColTwips->find( nTwips ); - sal_Bool bFound = it != pColTwips->end(); + bool bFound = it != pColTwips->end(); sal_uInt16 nPos = it - pColTwips->begin(); *pCol = static_cast<SCCOL>(nPos); if ( bFound ) diff --git a/sc/source/filter/starcalc/scflt.cxx b/sc/source/filter/starcalc/scflt.cxx index 91da40fc471a..b9251bf0fac1 100644 --- a/sc/source/filter/starcalc/scflt.cxx +++ b/sc/source/filter/starcalc/scflt.cxx @@ -802,10 +802,10 @@ void Sc10PageCollection::PutToDoc( ScDocument* pDoc ) Color aRColor( nColor.Red, nColor.Green, nColor.Blue ); sal_uInt16 nFact; - sal_Bool bSwapCol = false; + bool bSwapCol = false; switch (pHeadFootLine->Raster) { - case raNone: nFact = 0xffff; bSwapCol = sal_True; break; + case raNone: nFact = 0xffff; bSwapCol = true; break; case raGray12: nFact = (0xffff / 100) * 12; break; case raGray25: nFact = (0xffff / 100) * 25; break; case raGray50: nFact = (0xffff / 100) * 50; break; @@ -1083,10 +1083,10 @@ void Sc10Import::LoadProtect() void Sc10Import::LoadViewColRowBar() { - sal_uInt8 ViewColRowBar; - rStream.ReadUChar( ViewColRowBar ); + bool bViewColRowBar; + rStream.ReadCharAsBool( bViewColRowBar ); nError = rStream.GetError(); - aSc30ViewOpt.SetOption( VOPT_HEADER, (sal_Bool)ViewColRowBar ); + aSc30ViewOpt.SetOption( VOPT_HEADER, bViewColRowBar ); } @@ -1330,11 +1330,11 @@ void Sc10Import::LoadPatternCollection() Color aRColor( COL_BLACK ); lcl_ChangeColor( nRColor, aRColor ); sal_uInt16 nFact; - sal_Bool bSwapCol = false; - sal_Bool bSetItem = sal_True; + bool bSwapCol = false; + bool bSetItem = true; switch (pPattern->Raster) { - case raNone: nFact = 0xffff; bSwapCol = sal_True; bSetItem = (nBColor > 0); break; + case raNone: nFact = 0xffff; bSwapCol = true; bSetItem = (nBColor > 0); break; case raGray12: nFact = (0xffff / 100) * 12; break; case raGray25: nFact = (0xffff / 100) * 25; break; case raGray50: nFact = (0xffff / 100) * 50; break; @@ -1363,10 +1363,10 @@ void Sc10Import::LoadPatternCollection() if( ( pPattern->Flags != 0 ) && ( ( pPattern->FormatFlags & pfProtection ) == pfProtection ) ) { - sal_Bool bProtect = ( ( pPattern->Flags & paProtect ) == paProtect ); - sal_Bool bHFormula = ( ( pPattern->Flags & paHideFormula ) == paHideFormula ); - sal_Bool bHCell = ( ( pPattern->Flags & paHideAll ) == paHideAll ); - sal_Bool bHPrint = ( ( pPattern->Flags & paHidePrint ) == paHidePrint ); + bool bProtect = ( ( pPattern->Flags & paProtect ) == paProtect ); + bool bHFormula = ( ( pPattern->Flags & paHideFormula ) == paHideFormula ); + bool bHCell = ( ( pPattern->Flags & paHideAll ) == paHideAll ); + bool bHPrint = ( ( pPattern->Flags & paHidePrint ) == paHidePrint ); rItemSet.Put( ScProtectionAttr( bProtect, bHFormula, bHCell, bHPrint ) ); } } // if Style != 0 @@ -1391,7 +1391,7 @@ void Sc10Import::LoadDataBaseCollection() ( SCCOL ) pOldData->DataBaseRec.Block.x2, ( SCROW ) pOldData->DataBaseRec.Block.y2, true, - ( sal_Bool) pOldData->DataBaseRec.RowHeader ); + (bool) pOldData->DataBaseRec.RowHeader ); bool ins = pDoc->GetDBCollection()->getNamedDBs().insert(pNewData); assert(ins); (void)ins; //TODO: or can this fail (and need delete pNewData)? @@ -1871,7 +1871,7 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab) nStart = nEnd + 1; } // Border - sal_Bool bEnd = false; + bool bEnd = false; sal_uInt16 nColorIndex = 0; sal_uInt16 nFrameIndex = 0; @@ -2027,11 +2027,11 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab) ScPatternAttr aScPattern( pDoc->GetPool() ); sal_uInt16 nFact; - sal_Bool bSwapCol = false; - sal_Bool bSetItem = sal_True; + bool bSwapCol = false; + bool bSetItem = true; switch ( aRaster.pData[ nRasterIndex ].Value ) { - case raNone: nFact = 0xffff; bSwapCol = sal_True; bSetItem = (nBColor > 0); break; + case raNone: nFact = 0xffff; bSwapCol = true; bSetItem = (nBColor > 0); break; case raGray12: nFact = (0xffff / 100) * 12; break; case raGray25: nFact = (0xffff / 100) * 25; break; case raGray50: nFact = (0xffff / 100) * 50; break; @@ -2114,10 +2114,10 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab) nEnd = static_cast<SCROW>(aFlag.pData[i].Row); if ((nStart <= nEnd) && (aFlag.pData[i].Value != 0)) { - sal_Bool bProtect = ((aFlag.pData[i].Value & paProtect) == paProtect); - sal_Bool bHFormula = ((aFlag.pData[i].Value & paHideFormula) == paHideFormula); - sal_Bool bHCell = ((aFlag.pData[i].Value & paHideAll) == paHideAll); - sal_Bool bHPrint = ((aFlag.pData[i].Value & paHidePrint) == paHidePrint); + bool bProtect = ((aFlag.pData[i].Value & paProtect) == paProtect); + bool bHFormula = ((aFlag.pData[i].Value & paHideFormula) == paHideFormula); + bool bHCell = ((aFlag.pData[i].Value & paHideAll) == paHideAll); + bool bHPrint = ((aFlag.pData[i].Value & paHidePrint) == paHidePrint); ScPatternAttr aScPattern(pDoc->GetPool()); aScPattern.GetItemSet().Put(ScProtectionAttr(bProtect, bHFormula, bHCell, bHPrint)); pDoc->ApplyPatternAreaTab(Col, nStart, Col, nEnd, Tab, aScPattern); @@ -2335,7 +2335,7 @@ void Sc10Import::LoadObjects() { sal_uInt8 ObjectType; Sc10GraphHeader GraphHeader; - sal_Bool IsOleObject = false; // Achtung dies ist nur ein Notnagel + bool IsOleObject = false; // Achtung dies ist nur ein Notnagel for (sal_uInt16 i = 0; (i < nAnz) && (nError == 0) && !rStream.IsEof() && !IsOleObject; i++) { rStream.ReadUChar( ObjectType ); @@ -2361,7 +2361,7 @@ void Sc10Import::LoadObjects() { case otOle : // Achtung hier muss sowas wie OleLoadFromStream passieren - IsOleObject = sal_True; + IsOleObject = true; break; case otImage : { diff --git a/sc/source/filter/xcl97/XclImpChangeTrack.cxx b/sc/source/filter/xcl97/XclImpChangeTrack.cxx index 9d0d95d71d50..c5b0a7333ba4 100644 --- a/sc/source/filter/xcl97/XclImpChangeTrack.cxx +++ b/sc/source/filter/xcl97/XclImpChangeTrack.cxx @@ -209,7 +209,7 @@ void XclImpChangeTrack::ReadFormula( ScTokenArray*& rpTokenArray, const ScAddres // read the formula, 3D tab refs from extended data const ScTokenArray* pArray = NULL; aFmlConv.Reset( rPosition ); - sal_Bool bOK = (aFmlConv.Convert( pArray, aFmlaStrm, nFmlSize, false, FT_CellFormula) == ConvOK); // JEG : Check This + bool bOK = (aFmlConv.Convert( pArray, aFmlaStrm, nFmlSize, false, FT_CellFormula) == ConvOK); // JEG : Check This rpTokenArray = (bOK && pArray) ? new ScTokenArray( *pArray ) : NULL; pStrm->Ignore( 1 ); } @@ -307,7 +307,7 @@ void XclImpChangeTrack::ReadChTrInsert() else aRange.aEnd.SetCol( MAXCOL ); - sal_Bool bValid = pStrm->IsValid(); + bool bValid = pStrm->IsValid(); if( FoundNestedMode() ) ReadNestedRecords(); @@ -407,7 +407,7 @@ void XclImpChangeTrack::ReadChTrMoveRange() aSourceRange.aStart.SetTab( ReadTabNum() ); aSourceRange.aEnd.SetTab( aSourceRange.aStart.Tab() ); - sal_Bool bValid = pStrm->IsValid(); + bool bValid = pStrm->IsValid(); if( FoundNestedMode() ) ReadNestedRecords(); @@ -460,7 +460,7 @@ bool XclImpChangeTrack::EndNestedMode() void XclImpChangeTrack::ReadRecords() { - sal_Bool bExitLoop = false; + bool bExitLoop = false; while( !bExitLoop && !bGlobExit && pStrm->StartNextRecord() ) { diff --git a/sc/source/filter/xcl97/xcl97esc.cxx b/sc/source/filter/xcl97/xcl97esc.cxx index 5c673627294d..3e7f6ee29edf 100644 --- a/sc/source/filter/xcl97/xcl97esc.cxx +++ b/sc/source/filter/xcl97/xcl97esc.cxx @@ -194,7 +194,7 @@ EscherExHostAppData* XclEscherEx::StartShape( const Reference< XShape >& rxShape { if ( nAdditionalText ) nAdditionalText++; - sal_Bool bInGroup = ( pCurrXclObj != NULL ); + bool bInGroup = ( pCurrXclObj != NULL ); if ( bInGroup ) { // stacked recursive group object if ( !pCurrAppData->IsStackedGroup() ) diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx index 285fc62b83a0..5f1853c8d3ee 100644 --- a/sc/source/filter/xcl97/xcl97rec.cxx +++ b/sc/source/filter/xcl97/xcl97rec.cxx @@ -1225,7 +1225,7 @@ ExcEScenario::ExcEScenario( const XclExpRoot& rRoot, SCTAB nTab ) if( !pRList ) return; - sal_Bool bContLoop = sal_True; + bool bContLoop = true; SCROW nRow; SCCOL nCol; OUString sText; diff --git a/sc/source/filter/xml/XMLTableMasterPageExport.cxx b/sc/source/filter/xml/XMLTableMasterPageExport.cxx index 64543206cba6..ef5bbb0e595c 100644 --- a/sc/source/filter/xml/XMLTableMasterPageExport.cxx +++ b/sc/source/filter/xml/XMLTableMasterPageExport.cxx @@ -146,19 +146,19 @@ void XMLTableMasterPageExport::exportMasterPageContent( } else { - sal_Bool bHeader(::cppu::any2bool(rPropSet->getPropertyValue( OUString( SC_UNO_PAGE_HDRON ) ))); + bool bHeader(::cppu::any2bool(rPropSet->getPropertyValue( OUString( SC_UNO_PAGE_HDRON ) ))); exportHeaderFooter(xHeader, XML_HEADER, bHeader ); - sal_Bool bLeftHeader(!::cppu::any2bool(rPropSet->getPropertyValue( OUString( SC_UNO_PAGE_HDRSHARED ) )) && bHeader); + bool bLeftHeader(!::cppu::any2bool(rPropSet->getPropertyValue( OUString( SC_UNO_PAGE_HDRSHARED ) )) && bHeader); exportHeaderFooter( xHeaderLeft, XML_HEADER_LEFT, bLeftHeader ); - sal_Bool bFooter(::cppu::any2bool(rPropSet->getPropertyValue( OUString( SC_UNO_PAGE_FTRON ) ))); + bool bFooter(::cppu::any2bool(rPropSet->getPropertyValue( OUString( SC_UNO_PAGE_FTRON ) ))); exportHeaderFooter( xFooter, XML_FOOTER, bFooter ); - sal_Bool bLeftFooter = (!::cppu::any2bool(rPropSet->getPropertyValue( OUString( SC_UNO_PAGE_FTRSHARED ) )) && bFooter); + bool bLeftFooter = (!::cppu::any2bool(rPropSet->getPropertyValue( OUString( SC_UNO_PAGE_FTRSHARED ) )) && bFooter); exportHeaderFooter( xFooterLeft, XML_FOOTER_LEFT, bLeftFooter ); } diff --git a/sc/source/filter/xml/XMLTrackedChangesContext.cxx b/sc/source/filter/xml/XMLTrackedChangesContext.cxx index e158e356efe4..0b537deb735c 100644 --- a/sc/source/filter/xml/XMLTrackedChangesContext.cxx +++ b/sc/source/filter/xml/XMLTrackedChangesContext.cxx @@ -103,8 +103,8 @@ class ScXMLCellContentDeletionContext : public SvXMLImportContext formula::FormulaGrammar::Grammar eGrammar; sal_uInt16 nType; sal_uInt8 nMatrixFlag; - sal_Bool bBigRange; - sal_Bool bContainsCell; + bool bBigRange; + bool bContainsCell; ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); } @@ -250,10 +250,10 @@ class ScXMLChangeCellContext : public SvXMLImportContext double& rDateTimeValue; double fValue; sal_uInt16& rType; - sal_Bool bEmpty; - sal_Bool bFirstParagraph; - sal_Bool bString; - sal_Bool bFormula; + bool bEmpty; + bool bFirstParagraph; + bool bString; + bool bFormula; ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); } @@ -273,8 +273,8 @@ public: const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) SAL_OVERRIDE; - void CreateTextPContext(sal_Bool bIsNewParagraph); - sal_Bool IsEditCell() { return pEditTextObj != 0; } + void CreateTextPContext(bool bIsNewParagraph); + bool IsEditCell() { return pEditTextObj != 0; } void SetText(const OUString& sTempText) { sText = sTempText; } virtual void EndElement() SAL_OVERRIDE; @@ -640,9 +640,9 @@ ScXMLBigRangeContext::ScXMLBigRangeContext( ScXMLImport& rImport, SvXMLImportContext( rImport, nPrfx, rLName ), rBigRange(rTempBigRange) { - sal_Bool bColumn(false); - sal_Bool bRow(false); - sal_Bool bTable(false); + bool bColumn(false); + bool bRow(false); + bool bTable(false); sal_Int32 nColumn(0); sal_Int32 nRow(0); sal_Int32 nTable(0); @@ -666,17 +666,17 @@ ScXMLBigRangeContext::ScXMLBigRangeContext( ScXMLImport& rImport, if (IsXMLToken(aLocalName, XML_COLUMN)) { ::sax::Converter::convertNumber(nColumn, sValue); - bColumn = sal_True; + bColumn = true; } else if (IsXMLToken(aLocalName, XML_ROW)) { ::sax::Converter::convertNumber(nRow, sValue); - bRow = sal_True; + bRow = true; } else if (IsXMLToken(aLocalName, XML_TABLE)) { ::sax::Converter::convertNumber(nTable, sValue); - bTable = sal_True; + bTable = true; } else if (IsXMLToken(aLocalName, XML_START_COLUMN)) ::sax::Converter::convertNumber(nStartColumn, sValue); @@ -774,7 +774,7 @@ SvXMLImportContext *ScXMLCellContentDeletionContext::CreateChildContext( sal_uIn else if (IsXMLToken(rLocalName, XML_CELL_ADDRESS)) { OSL_ENSURE(!nID, "a action with a ID should not contain a BigRange"); - bBigRange = sal_True; + bBigRange = true; pContext = new ScXMLBigRangeContext(GetScImport(), nPrefix, rLocalName, xAttrList, aBigRange); } } @@ -1014,7 +1014,7 @@ SvXMLImportContext *ScXMLChangeTextPContext::CreateChildContext( sal_uInt16 nTem { if (!pChangeCellContext->IsEditCell()) pChangeCellContext->CreateTextPContext(false); - sal_Bool bWasContext (sal_True); + bool bWasContext (true); if (!pTextPContext) { bWasContext = false; @@ -1065,13 +1065,13 @@ ScXMLChangeCellContext::ScXMLChangeCellContext( ScXMLImport& rImport, , rDateTimeValue(fDateTimeValue) , fValue(0.0) , rType(nType) - , bEmpty(sal_True) - , bFirstParagraph(sal_True) - , bString(sal_True) + , bEmpty(true) + , bFirstParagraph(true) + , bString(true) , bFormula(false) { - sal_Bool bIsMatrix(false); - sal_Bool bIsCoveredMatrix(false); + bool bIsMatrix(false); + bool bIsCoveredMatrix(false); sal_Int16 nAttrCount(xAttrList.is() ? xAttrList->getLength() : 0); for( sal_Int16 i=0; i < nAttrCount; ++i ) { @@ -1087,7 +1087,7 @@ ScXMLChangeCellContext::ScXMLChangeCellContext( ScXMLImport& rImport, { bEmpty = false; GetScImport().ExtractFormulaNamespaceGrammar( rFormula, rFormulaNmsp, rGrammar, sValue ); - bFormula = sal_True; + bFormula = true; } else if (IsXMLToken(aLocalName, XML_CELL_ADDRESS)) { @@ -1099,12 +1099,12 @@ ScXMLChangeCellContext::ScXMLChangeCellContext( ScXMLImport& rImport, } else if (IsXMLToken(aLocalName, XML_NUMBER_MATRIX_COLUMNS_SPANNED)) { - bIsMatrix = sal_True; + bIsMatrix = true; ::sax::Converter::convertNumber(nMatrixCols, sValue); } else if (IsXMLToken(aLocalName, XML_NUMBER_MATRIX_ROWS_SPANNED)) { - bIsMatrix = sal_True; + bIsMatrix = true; ::sax::Converter::convertNumber(nMatrixRows, sValue); } } @@ -1173,7 +1173,7 @@ SvXMLImportContext *ScXMLChangeCellContext::CreateChildContext( sal_uInt16 nPref else { if (!pEditTextObj) - CreateTextPContext(sal_True); + CreateTextPContext(true); pContext = GetScImport().GetTextImport()->CreateTextChildContext( GetScImport(), nPrefix, rLocalName, xAttrList); } @@ -1185,7 +1185,7 @@ SvXMLImportContext *ScXMLChangeCellContext::CreateChildContext( sal_uInt16 nPref return pContext; } -void ScXMLChangeCellContext::CreateTextPContext(sal_Bool bIsNewParagraph) +void ScXMLChangeCellContext::CreateTextPContext(bool bIsNewParagraph) { if (GetScImport().GetDocument()) { @@ -1575,7 +1575,7 @@ ScXMLMovementCutOffContext::ScXMLMovementCutOffContext( ScXMLImport& rImport, sal_Int32 nPosition(0); sal_Int32 nStartPosition(0); sal_Int32 nEndPosition(0); - sal_Bool bPosition(false); + bool bPosition(false); sal_Int16 nAttrCount(xAttrList.is() ? xAttrList->getLength() : 0); for( sal_Int16 i=0; i < nAttrCount; ++i ) { @@ -1593,7 +1593,7 @@ ScXMLMovementCutOffContext::ScXMLMovementCutOffContext( ScXMLImport& rImport, } else if (IsXMLToken(aLocalName, XML_POSITION)) { - bPosition = sal_True; + bPosition = true; ::sax::Converter::convertNumber(nPosition, sValue); } else if (IsXMLToken(aLocalName, XML_START_POSITION)) diff --git a/sc/source/filter/xml/xmlcvali.cxx b/sc/source/filter/xml/xmlcvali.cxx index 972ed3314f58..1bd823c108a9 100644 --- a/sc/source/filter/xml/xmlcvali.cxx +++ b/sc/source/filter/xml/xmlcvali.cxx @@ -45,9 +45,9 @@ class ScXMLContentValidationContext : public SvXMLImportContext OUString sBaseCellAddress; OUString sCondition; sal_Int16 nShowList; - sal_Bool bAllowEmptyCell; - sal_Bool bDisplayHelp; - sal_Bool bDisplayError; + bool bAllowEmptyCell; + bool bDisplayHelp; + bool bDisplayError; SvXMLImportContextRef xEventContext; @@ -75,9 +75,9 @@ public: virtual void EndElement() SAL_OVERRIDE; - void SetHelpMessage(const OUString& sTitle, const OUString& sMessage, const sal_Bool bDisplay); - void SetErrorMessage(const OUString& sTitle, const OUString& sMessage, const OUString& sMessageType, const sal_Bool bDisplay); - void SetErrorMacro(const sal_Bool bExecute); + void SetHelpMessage(const OUString& sTitle, const OUString& sMessage, const bool bDisplay); + void SetErrorMessage(const OUString& sTitle, const OUString& sMessage, const OUString& sMessageType, const bool bDisplay); + void SetErrorMacro(const bool bExecute); }; class ScXMLHelpMessageContext : public SvXMLImportContext @@ -85,7 +85,7 @@ class ScXMLHelpMessageContext : public SvXMLImportContext OUString sTitle; OUStringBuffer sMessage; sal_Int32 nParagraphCount; - sal_Bool bDisplay; + bool bDisplay; ScXMLContentValidationContext* pValidationContext; @@ -115,7 +115,7 @@ class ScXMLErrorMessageContext : public SvXMLImportContext OUStringBuffer sMessage; OUString sMessageType; sal_Int32 nParagraphCount; - sal_Bool bDisplay; + bool bDisplay; ScXMLContentValidationContext* pValidationContext; @@ -142,7 +142,7 @@ public: class ScXMLErrorMacroContext : public SvXMLImportContext { OUString sName; - sal_Bool bExecute; + bool bExecute; ScXMLContentValidationContext* pValidationContext; @@ -453,7 +453,7 @@ void ScXMLContentValidationContext::EndElement() GetScImport().AddValidation(aValidation); } -void ScXMLContentValidationContext::SetHelpMessage(const OUString& sTitle, const OUString& sMessage, const sal_Bool bDisplay) +void ScXMLContentValidationContext::SetHelpMessage(const OUString& sTitle, const OUString& sMessage, const bool bDisplay) { sHelpTitle = sTitle; sHelpMessage = sMessage; @@ -461,7 +461,7 @@ void ScXMLContentValidationContext::SetHelpMessage(const OUString& sTitle, const } void ScXMLContentValidationContext::SetErrorMessage(const OUString& sTitle, const OUString& sMessage, - const OUString& sMessageType, const sal_Bool bDisplay) + const OUString& sMessageType, const bool bDisplay) { sErrorTitle = sTitle; sErrorMessage = sMessage; @@ -469,7 +469,7 @@ void ScXMLContentValidationContext::SetErrorMessage(const OUString& sTitle, cons bDisplayError = bDisplay; } -void ScXMLContentValidationContext::SetErrorMacro(const sal_Bool bExecute) +void ScXMLContentValidationContext::SetErrorMacro(const bool bExecute) { sErrorMessageType = "macro"; bDisplayError = bExecute; diff --git a/sc/source/filter/xml/xmldpimp.cxx b/sc/source/filter/xml/xmldpimp.cxx index ee4b038402bc..a7d8c16f5bd1 100644 --- a/sc/source/filter/xml/xmldpimp.cxx +++ b/sc/source/filter/xml/xmldpimp.cxx @@ -1717,9 +1717,9 @@ ScXMLDataPilotGroupsContext::ScXMLDataPilotGroupsContext( ScXMLImport& rImport, double fEnd(0.0); double fStep(0.0); sal_Int32 nGroupPart(0); - sal_Bool bDateValue(false); - sal_Bool bAutoStart(sal_True); - sal_Bool bAutoEnd(sal_True); + bool bDateValue(false); + bool bAutoStart(true); + bool bAutoEnd(true); sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for( sal_Int16 i=0; i < nAttrCount; i++ ) @@ -1736,9 +1736,9 @@ ScXMLDataPilotGroupsContext::ScXMLDataPilotGroupsContext( ScXMLImport& rImport, sGroupSource = sValue; else if (IsXMLToken(aLocalName, XML_DATE_START)) { - bDateValue = sal_True; + bDateValue = true; if (IsXMLToken(sValue, XML_AUTO)) - bAutoStart = sal_True; + bAutoStart = true; else { GetScImport().GetMM100UnitConverter().convertDateTime(fStart, sValue); @@ -1747,9 +1747,9 @@ ScXMLDataPilotGroupsContext::ScXMLDataPilotGroupsContext( ScXMLImport& rImport, } else if (IsXMLToken(aLocalName, XML_DATE_END)) { - bDateValue = sal_True; + bDateValue = true; if (IsXMLToken(sValue, XML_AUTO)) - bAutoEnd = sal_True; + bAutoEnd = true; else { GetScImport().GetMM100UnitConverter().convertDateTime(fEnd, sValue); @@ -1759,7 +1759,7 @@ ScXMLDataPilotGroupsContext::ScXMLDataPilotGroupsContext( ScXMLImport& rImport, else if (IsXMLToken(aLocalName, XML_START)) { if (IsXMLToken(sValue, XML_AUTO)) - bAutoStart = sal_True; + bAutoStart = true; else { ::sax::Converter::convertDouble(fStart, sValue); @@ -1769,7 +1769,7 @@ ScXMLDataPilotGroupsContext::ScXMLDataPilotGroupsContext( ScXMLImport& rImport, else if (IsXMLToken(aLocalName, XML_END)) { if (IsXMLToken(sValue, XML_AUTO)) - bAutoEnd = sal_True; + bAutoEnd = true; else { ::sax::Converter::convertDouble(fEnd, sValue); diff --git a/sc/source/filter/xml/xmlfonte.cxx b/sc/source/filter/xml/xmlfonte.cxx index 50296ba99bd8..3ae2821b3c61 100644 --- a/sc/source/filter/xml/xmlfonte.cxx +++ b/sc/source/filter/xml/xmlfonte.cxx @@ -36,14 +36,14 @@ private: // #i120077# remember owned pool SfxItemPool* mpEditEnginePool; - void AddFontItems(sal_uInt16* pWhichIds, sal_uInt8 nIdCount, const SfxItemPool* pItemPool, const sal_Bool bExportDefaults); + void AddFontItems(sal_uInt16* pWhichIds, sal_uInt8 nIdCount, const SfxItemPool* pItemPool, const bool bExportDefaults); public: ScXMLFontAutoStylePool_Impl( ScXMLExport& rExport, bool bBlockFontEmbedding ); virtual ~ScXMLFontAutoStylePool_Impl(); }; -void ScXMLFontAutoStylePool_Impl::AddFontItems(sal_uInt16* pWhichIds, sal_uInt8 nIdCount, const SfxItemPool* pItemPool, const sal_Bool bExportDefaults) +void ScXMLFontAutoStylePool_Impl::AddFontItems(sal_uInt16* pWhichIds, sal_uInt8 nIdCount, const SfxItemPool* pItemPool, const bool bExportDefaults) { const SfxPoolItem* pItem; for( sal_uInt16 i=0; i < nIdCount; ++i ) @@ -82,7 +82,7 @@ ScXMLFontAutoStylePool_Impl::ScXMLFontAutoStylePool_Impl(ScXMLExport& rExportP, ATTR_PAGE_HEADERRIGHT, ATTR_PAGE_FOOTERRIGHT }; const SfxItemPool* pItemPool(rExportP.GetDocument() ? rExportP.GetDocument()->GetPool() : NULL); - AddFontItems(aWhichIds, 3, pItemPool, sal_True); + AddFontItems(aWhichIds, 3, pItemPool, true); const SfxItemPool* pEditPool(rExportP.GetDocument()->GetEditPool()); AddFontItems(aEditWhichIds, 3, pEditPool, false); diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx index 13fd4a6a9601..a98671ba685c 100644 --- a/sc/source/filter/xml/xmlimprt.cxx +++ b/sc/source/filter/xml/xmlimprt.cxx @@ -3009,7 +3009,7 @@ throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeE "OrganizerMode"); if (xPropertySetInfo->hasPropertyByName(sOrganizerMode)) { - sal_Bool bStyleOnly(sal_False); + bool bStyleOnly(false); if (xImportInfo->getPropertyValue(sOrganizerMode) >>= bStyleOnly) { bLoadDoc = !bStyleOnly; diff --git a/sc/source/filter/xml/xmlstyle.cxx b/sc/source/filter/xml/xmlstyle.cxx index 7011ed90f700..b73cddab22de 100644 --- a/sc/source/filter/xml/xmlstyle.cxx +++ b/sc/source/filter/xml/xmlstyle.cxx @@ -1796,7 +1796,7 @@ bool XmlScPropHdl_BreakBefore::equals( const ::com::sun::star::uno::Any& r1, const ::com::sun::star::uno::Any& r2 ) const { - sal_Bool aBreak1 = 0, aBreak2 = 0; + bool aBreak1 = false, aBreak2 = false; if((r1 >>= aBreak1) && (r2 >>= aBreak2)) return (aBreak1 == aBreak2); diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx index 866f53d18bb4..e4f9f4b9fc48 100644 --- a/sc/source/filter/xml/xmlwrap.cxx +++ b/sc/source/filter/xml/xmlwrap.cxx @@ -109,7 +109,7 @@ sal_uInt32 ScXMLImportWrapper::ImportFromComponent(const uno::Reference<uno::XCo if ( !xStorage.is() && pMedium ) xStorage = pMedium->GetStorage(); - sal_Bool bEncrypted = false; + bool bEncrypted = false; OUString sStream(sDocName); if( xStorage.is() ) { @@ -188,7 +188,7 @@ sal_uInt32 ScXMLImportWrapper::ImportFromComponent(const uno::Reference<uno::XCo // sax parser sends wrapped exceptions, // try to find the original one xml::sax::SAXException aSaxEx = *(xml::sax::SAXException*)(&r); - sal_Bool bTryChild = sal_True; + bool bTryChild = true; while( bTryChild ) { @@ -409,7 +409,7 @@ bool ScXMLImportWrapper::Import(bool bStylesOnly, ErrCode& nError) xInfoSet->setPropertyValue( "SourceStorage", uno::Any( xStorage ) ); - sal_Bool bOasis = ( SotStorage::GetVersion( xStorage ) > SOFFICE_FILEFORMAT_60 ); + bool bOasis = ( SotStorage::GetVersion( xStorage ) > SOFFICE_FILEFORMAT_60 ); if (!bStylesOnly && bOasis) { @@ -804,7 +804,7 @@ bool ScXMLImportWrapper::Export(bool bStylesOnly) xInfoSet->setPropertyValue("ProgressRange", uno::makeAny(nProgressRange)); SvtSaveOptions aSaveOpt; - sal_Bool bUsePrettyPrinting(aSaveOpt.IsPrettyPrinting()); + bool bUsePrettyPrinting(aSaveOpt.IsPrettyPrinting()); xInfoSet->setPropertyValue("UsePrettyPrinting", uno::makeAny(bUsePrettyPrinting)); const OUString sTargetStorage("TargetStorage"); @@ -840,7 +840,7 @@ bool ScXMLImportWrapper::Export(bool bStylesOnly) bool bSettingsRet(false); ScMySharedData* pSharedData = NULL; - sal_Bool bOasis = ( SotStorage::GetVersion( xStorage ) > SOFFICE_FILEFORMAT_60 ); + bool bOasis = ( SotStorage::GetVersion( xStorage ) > SOFFICE_FILEFORMAT_60 ); // RDF metadata: ODF >= 1.2 if ( !bStylesOnly && bOasis ) diff --git a/sc/source/ui/Accessibility/AccessibleCell.cxx b/sc/source/ui/Accessibility/AccessibleCell.cxx index 38a437c7e2c9..fdfb27a4b89a 100644 --- a/sc/source/ui/Accessibility/AccessibleCell.cxx +++ b/sc/source/ui/Accessibility/AccessibleCell.cxx @@ -604,13 +604,13 @@ bool ScAccessibleCell::IsDropdown() mpDoc->MarkScenario( i, nTab, aMarks, false, SC_SCENARIO_SHOWFRAME ); ScRangeList aRanges; aMarks.FillRangeListWithMarks( &aRanges, false ); - sal_Bool bHasScenario; + bool bHasScenario; SCTAB nRangeCount = aRanges.size(); for (i=0; i<nRangeCount; i++) { ScRange aRange = *aRanges[i]; mpDoc->ExtendTotalMerge( aRange ); - sal_Bool bTextBelow = ( aRange.aStart.Row() == 0 ); + bool bTextBelow = ( aRange.aStart.Row() == 0 ); // MT IA2: Not used: sal_Bool bIsInScen = sal_False; if ( bTextBelow ) { diff --git a/sc/source/ui/Accessibility/AccessibleCellBase.cxx b/sc/source/ui/Accessibility/AccessibleCellBase.cxx index 9d8cf37ccc87..4295f68398b2 100644 --- a/sc/source/ui/Accessibility/AccessibleCellBase.cxx +++ b/sc/source/ui/Accessibility/AccessibleCellBase.cxx @@ -70,13 +70,13 @@ ScAccessibleCellBase::~ScAccessibleCellBase() //===== XAccessibleComponent ============================================ -sal_Bool SAL_CALL ScAccessibleCellBase::isVisible() +bool SAL_CALL ScAccessibleCellBase::isVisible() throw (uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; IsObjectValid(); // test whether the cell is hidden (column/row - hidden/filtered) - sal_Bool bVisible(sal_True); + bool bVisible(true); if (mpDoc) { bool bColHidden = mpDoc->ColHidden(maCellAddress.Col(), maCellAddress.Tab()); @@ -437,7 +437,7 @@ OUString SAL_CALL ScAccessibleCellBase::getShadowAttrs(void) sShadowAttrs += OUString::number( (sal_Int32)aShadowFmt.ShadowWidth ) ; sShadowAttrs += sInnerSplit; sShadowAttrs += "IsTransparent="; - sShadowAttrs += OUString::number( (sal_Bool)aShadowFmt.IsTransparent ) ; + sShadowAttrs += OUString::number( (int)aShadowFmt.IsTransparent ) ; sShadowAttrs += sInnerSplit; sShadowAttrs += "Color="; sShadowAttrs += OUString::number( (sal_Int32)aShadowFmt.Color ); @@ -495,7 +495,7 @@ OUString SAL_CALL ScAccessibleCellBase::getBorderAttrs(void) } Color aColor; - sal_Bool bIn = mpDoc ? mpDoc->IsCellInChangeTrack(maCellAddress,&aColor) : sal_False; + bool bIn = mpDoc && mpDoc->IsCellInChangeTrack(maCellAddress,&aColor); if (bIn) { aTopBorder.Color = aColor.GetColor(); @@ -604,7 +604,7 @@ OUString SAL_CALL ScAccessibleCellBase::GetAllDisplayNote(void) OUString strTrackText; if (mpDoc) { - sal_Bool bLeftedge=sal_False; + bool bLeftedge = false; mpDoc->GetCellChangeTrackNote(maCellAddress,strTrackText,bLeftedge); } if (!strTrackText.isEmpty()) diff --git a/sc/source/ui/Accessibility/AccessibleContextBase.cxx b/sc/source/ui/Accessibility/AccessibleContextBase.cxx index f521e7a811d8..b8f90b2adb51 100644 --- a/sc/source/ui/Accessibility/AccessibleContextBase.cxx +++ b/sc/source/ui/Accessibility/AccessibleContextBase.cxx @@ -198,12 +198,12 @@ awt::Size SAL_CALL ScAccessibleContextBase::getSize( ) return AWTSize(GetBoundingBox().GetSize()); } -sal_Bool SAL_CALL ScAccessibleContextBase::isShowing( ) +bool SAL_CALL ScAccessibleContextBase::isShowing( ) throw (uno::RuntimeException) { SolarMutexGuard aGuard; IsObjectValid(); - sal_Bool bShowing(false); + bool bShowing(false); if (mxParent.is()) { uno::Reference<XAccessibleComponent> xParentComponent (mxParent->getAccessibleContext(), uno::UNO_QUERY); @@ -217,10 +217,10 @@ sal_Bool SAL_CALL ScAccessibleContextBase::isShowing( ) return bShowing; } -sal_Bool SAL_CALL ScAccessibleContextBase::isVisible() +bool SAL_CALL ScAccessibleContextBase::isVisible() throw (uno::RuntimeException, std::exception) { - return sal_True; + return true; } void SAL_CALL ScAccessibleContextBase::grabFocus( ) diff --git a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx index 5fd7c97fbd5e..d3fb0eda2f2d 100644 --- a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx +++ b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx @@ -108,7 +108,7 @@ Reference< XAccessible > SAL_CALL ScAccessibleCsvControl::getAccessibleAtPoint( return NULL; } -sal_Bool SAL_CALL ScAccessibleCsvControl::isVisible() throw( RuntimeException, std::exception ) +bool SAL_CALL ScAccessibleCsvControl::isVisible() throw( RuntimeException, std::exception ) { SolarMutexGuard aGuard; ensureAlive(); diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx index 7ab94a0245d6..ae2b32d28fce 100644 --- a/sc/source/ui/Accessibility/AccessibleDocument.cxx +++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx @@ -106,13 +106,13 @@ using ::std::for_each; struct ScAccessibleShapeData { - ScAccessibleShapeData() : pAccShape(NULL), pRelationCell(NULL), bSelected(false), bSelectable(sal_True) {} + ScAccessibleShapeData() : pAccShape(NULL), pRelationCell(NULL), bSelected(false), bSelectable(true) {} ~ScAccessibleShapeData(); mutable ::accessibility::AccessibleShape* pAccShape; mutable ScAddress* pRelationCell; // if it is NULL this shape is anchored on the table com::sun::star::uno::Reference< com::sun::star::drawing::XShape > xShape; - mutable sal_Bool bSelected; - sal_Bool bSelectable; + mutable bool bSelected; + bool bSelectable; }; ScAccessibleShapeData::~ScAccessibleShapeData() @@ -151,9 +151,9 @@ struct ScShapeDataLess break; } } - sal_Bool LessThanSheet(const ScAccessibleShapeData* pData) const + bool LessThanSheet(const ScAccessibleShapeData* pData) const { - sal_Bool bResult(false); + bool bResult(false); uno::Reference< beans::XPropertySet> xProps(pData->xShape, uno::UNO_QUERY); if (xProps.is()) { @@ -162,14 +162,14 @@ struct ScShapeDataLess if( (aPropAny >>= nLayerID) ) { if (nLayerID == SC_LAYER_BACK) - bResult = sal_True; + bResult = true; } } return bResult; } - sal_Bool operator()(const ScAccessibleShapeData* pData1, const ScAccessibleShapeData* pData2) const + bool operator()(const ScAccessibleShapeData* pData1, const ScAccessibleShapeData* pData2) const { - sal_Bool bResult(false); + bool bResult(false); if (pData1 && pData2) { uno::Reference< beans::XPropertySet> xProps1(pData1->xShape, uno::UNO_QUERY); @@ -231,7 +231,7 @@ struct SelectShape { if (pAccShapeData && pAccShapeData->bSelectable) { - pAccShapeData->bSelected = sal_True; + pAccShapeData->bSelected = true; if (pAccShapeData->pAccShape) pAccShapeData->pAccShape->SetState(AccessibleStateType::SELECTED); if (xShapes.is()) @@ -287,16 +287,16 @@ public: // gets the index of the shape starting on 0 (without the index of the table) // returns the selected shape - sal_Bool IsSelected(sal_Int32 nIndex, + bool IsSelected(sal_Int32 nIndex, com::sun::star::uno::Reference<com::sun::star::drawing::XShape>& rShape) const; - sal_Bool SelectionChanged(); + bool SelectionChanged(); void Select(sal_Int32 nIndex); void DeselectAll(); // deselect also the table void SelectAll(); sal_Int32 GetSelectedCount() const; - uno::Reference< XAccessible > GetSelected(sal_Int32 nSelectedChildIndex, sal_Bool bTabSelected) const; + uno::Reference< XAccessible > GetSelected(sal_Int32 nSelectedChildIndex, bool bTabSelected) const; void Deselect(sal_Int32 nChildIndex); SdrPage* GetDrawPage() const; @@ -318,17 +318,17 @@ private: ScSplitPos meSplitPos; void FillShapes(std::vector < uno::Reference < drawing::XShape > >& rShapes) const; - sal_Bool FindSelectedShapesChanges(const com::sun::star::uno::Reference<com::sun::star::drawing::XShapes>& xShapes, sal_Bool bCommitChange) const; + bool FindSelectedShapesChanges(const com::sun::star::uno::Reference<com::sun::star::drawing::XShapes>& xShapes, bool bCommitChange) const; void FillSelectionSupplier() const; ScAddress* GetAnchor(const uno::Reference<drawing::XShape>& xShape) const; uno::Reference<XAccessibleRelationSet> GetRelationSet(const ScAccessibleShapeData* pData) const; void CheckWhetherAnchorChanged(const uno::Reference<drawing::XShape>& xShape) const; void SetAnchor(const uno::Reference<drawing::XShape>& xShape, ScAccessibleShapeData* pData) const; - void AddShape(const uno::Reference<drawing::XShape>& xShape, sal_Bool bCommitChange) const; + void AddShape(const uno::Reference<drawing::XShape>& xShape, bool bCommitChange) const; void RemoveShape(const uno::Reference<drawing::XShape>& xShape) const; - sal_Bool FindShape(const uno::Reference<drawing::XShape>& xShape, SortedShapes::iterator& rItr) const; + bool FindShape(const uno::Reference<drawing::XShape>& xShape, SortedShapes::iterator& rItr) const; sal_Int8 Compare(const ScAccessibleShapeData* pData1, const ScAccessibleShapeData* pData2) const; @@ -432,7 +432,7 @@ void ScChildrenShapes::Notify(SfxBroadcaster&, const SfxHint& rHint) { uno::Reference<drawing::XShape> xShape (pObj->getUnoShape(), uno::UNO_QUERY); if (xShape.is()) - AddShape(xShape, sal_True); + AddShape(xShape, true); } break; case HINT_OBJREMOVED : // Zeichenobjekt aus Liste entfernt @@ -600,7 +600,7 @@ uno::Reference< XAccessible > ScChildrenShapes::GetAt(const awt::Point& rPoint) if(mpViewShell) { sal_Int32 i(maZOrderedShapes.size() - 1); - sal_Bool bFound(false); + bool bFound(false); while (!bFound && i >= 0) { ScAccessibleShapeData* pShape = maZOrderedShapes[i]; @@ -616,7 +616,7 @@ uno::Reference< XAccessible > ScChildrenShapes::GetAt(const awt::Point& rPoint) if (pShape->pAccShape->containsPoint(AWTPoint(aPoint))) { xAccessible = pShape->pAccShape; - bFound = sal_True; + bFound = true; } } else @@ -625,7 +625,7 @@ uno::Reference< XAccessible > ScChildrenShapes::GetAt(const awt::Point& rPoint) } } else - bFound = sal_True; // this is the sheet and it lies before the rest of the shapes which are background shapes + bFound = true; // this is the sheet and it lies before the rest of the shapes which are background shapes --i; } @@ -633,10 +633,10 @@ uno::Reference< XAccessible > ScChildrenShapes::GetAt(const awt::Point& rPoint) return xAccessible; } -sal_Bool ScChildrenShapes::IsSelected(sal_Int32 nIndex, +bool ScChildrenShapes::IsSelected(sal_Int32 nIndex, uno::Reference<drawing::XShape>& rShape) const { - sal_Bool bResult (false); + bool bResult (false); if (maZOrderedShapes.size() <= 1) GetCount(); // fill list with filtered shapes (no internal shapes) @@ -651,7 +651,7 @@ sal_Bool ScChildrenShapes::IsSelected(sal_Int32 nIndex, #if OSL_DEBUG_LEVEL > 0 // test whether it is truly selected by a slower method uno::Reference< drawing::XShape > xReturnShape; - sal_Bool bDebugResult(false); + bool bDebugResult(false); uno::Reference<container::XIndexAccess> xIndexAccess; xSelectionSupplier->getSelection() >>= xIndexAccess; @@ -668,7 +668,7 @@ sal_Bool ScChildrenShapes::IsSelected(sal_Int32 nIndex, xIndexAccess->getByIndex(i) >>= xShape; if (xShape.is() && (xIndexShape.get() == xShape.get())) { - bDebugResult = sal_True; + bDebugResult = true; xReturnShape = xShape; } else @@ -682,15 +682,15 @@ sal_Bool ScChildrenShapes::IsSelected(sal_Int32 nIndex, return bResult; } -sal_Bool ScChildrenShapes::SelectionChanged() +bool ScChildrenShapes::SelectionChanged() { - sal_Bool bResult(false); + bool bResult(false); if (!xSelectionSupplier.is()) throw uno::RuntimeException(); uno::Reference<drawing::XShapes> xShapes(xSelectionSupplier->getSelection(), uno::UNO_QUERY); - bResult = FindSelectedShapesChanges(xShapes, sal_True); + bResult = FindSelectedShapesChanges(xShapes, true); return bResult; } @@ -721,7 +721,7 @@ void ScChildrenShapes::Select(sal_Int32 nIndex) try { xSelectionSupplier->select(uno::makeAny(xShapes)); - maZOrderedShapes[nIndex]->bSelected = sal_True; + maZOrderedShapes[nIndex]->bSelected = true; if (maZOrderedShapes[nIndex]->pAccShape) maZOrderedShapes[nIndex]->pAccShape->SetState(AccessibleStateType::SELECTED); } @@ -736,7 +736,7 @@ void ScChildrenShapes::DeselectAll() if (!xSelectionSupplier.is()) throw uno::RuntimeException(); - sal_Bool bSomethingSelected(sal_True); + bool bSomethingSelected(true); try { xSelectionSupplier->select(uno::Any()); //deselects all @@ -805,7 +805,7 @@ sal_Int32 ScChildrenShapes::GetSelectedCount() const return aShapes.size(); } -uno::Reference< XAccessible > ScChildrenShapes::GetSelected(sal_Int32 nSelectedChildIndex, sal_Bool bTabSelected) const +uno::Reference< XAccessible > ScChildrenShapes::GetSelected(sal_Int32 nSelectedChildIndex, bool bTabSelected) const { uno::Reference< XAccessible > xAccessible; @@ -827,7 +827,7 @@ uno::Reference< XAccessible > ScChildrenShapes::GetSelected(sal_Int32 nSelectedC { SortedShapes::iterator aItr = maZOrderedShapes.begin(); SortedShapes::iterator aEndItr = maZOrderedShapes.end(); - sal_Bool bFound(false); + bool bFound(false); while(!bFound && aItr != aEndItr) { if (*aItr) @@ -835,7 +835,7 @@ uno::Reference< XAccessible > ScChildrenShapes::GetSelected(sal_Int32 nSelectedC if ((*aItr)->bSelected) { if (nSelectedChildIndex == 0) - bFound = sal_True; + bFound = true; else --nSelectedChildIndex; } @@ -843,7 +843,7 @@ uno::Reference< XAccessible > ScChildrenShapes::GetSelected(sal_Int32 nSelectedC else { if (nSelectedChildIndex == 0) - bFound = sal_True; + bFound = true; else --nSelectedChildIndex; } @@ -942,9 +942,9 @@ utl::AccessibleRelationSetHelper* ScChildrenShapes::GetRelationSet(const ScAddre return aSetRelation.mpRelationSet; } -sal_Bool ScChildrenShapes::FindSelectedShapesChanges(const uno::Reference<drawing::XShapes>& xShapes, sal_Bool /* bCommitChange */) const +bool ScChildrenShapes::FindSelectedShapesChanges(const uno::Reference<drawing::XShapes>& xShapes, bool /* bCommitChange */) const { - sal_Bool bResult(false); + bool bResult(false); SortedShapes aShapesList; uno::Reference<container::XIndexAccess> xIndexAcc(xShapes, uno::UNO_QUERY); if (xIndexAcc.is()) @@ -973,7 +973,7 @@ sal_Bool ScChildrenShapes::FindSelectedShapesChanges(const uno::Reference<drawin std::sort(aShapesList.begin(), aShapesList.end(), aLess); SortedShapes vecSelectedShapeAdd; SortedShapes vecSelectedShapeRemove; - sal_Bool bHasSelect=sal_False; + bool bHasSelect=false; SortedShapes::iterator aXShapesItr(aShapesList.begin()); SortedShapes::const_iterator aXShapesEndItr(aShapesList.end()); SortedShapes::iterator aDataItr(maZOrderedShapes.begin()); @@ -992,19 +992,19 @@ sal_Bool ScChildrenShapes::FindSelectedShapesChanges(const uno::Reference<drawin { if (!(*aDataItr)->bSelected) { - (*aDataItr)->bSelected = sal_True; + (*aDataItr)->bSelected = true; if ((*aDataItr)->pAccShape) { (*aDataItr)->pAccShape->SetState(AccessibleStateType::SELECTED); (*aDataItr)->pAccShape->ResetState(AccessibleStateType::FOCUSED); - bResult = sal_True; + bResult = true; vecSelectedShapeAdd.push_back((*aDataItr)); } aFocusedItr = aDataItr; } else { - bHasSelect = sal_True; + bHasSelect = true; } ++aDataItr; ++aXShapesItr; @@ -1018,7 +1018,7 @@ sal_Bool ScChildrenShapes::FindSelectedShapesChanges(const uno::Reference<drawin { (*aDataItr)->pAccShape->ResetState(AccessibleStateType::SELECTED); (*aDataItr)->pAccShape->ResetState(AccessibleStateType::FOCUSED); - bResult = sal_True; + bResult = true; vecSelectedShapeRemove.push_back(*aDataItr); } } @@ -1046,7 +1046,7 @@ sal_Bool ScChildrenShapes::FindSelectedShapesChanges(const uno::Reference<drawin const SdrMarkList* pMarkList = NULL; SdrObject* pMarkedObj = NULL; SdrObject* pUpObj = NULL; - sal_Bool bIsFocuseMarked = sal_True; + bool bIsFocuseMarked = true; if( mpViewShell && mnShapesSelected == 1 && bWinFocus) { ScViewData *pViewData = mpViewShell->GetViewData(); @@ -1062,7 +1062,7 @@ sal_Bool ScChildrenShapes::FindSelectedShapesChanges(const uno::Reference<drawin (*aFocusedItr)->xShape.is() && xMarkedXShape.is() && (*aFocusedItr)->xShape != xMarkedXShape ) - bIsFocuseMarked = sal_False; + bIsFocuseMarked = false; } } } @@ -1246,7 +1246,7 @@ void ScChildrenShapes::SetAnchor(const uno::Reference<drawing::XShape>& xShape, } } -void ScChildrenShapes::AddShape(const uno::Reference<drawing::XShape>& xShape, sal_Bool bCommitChange) const +void ScChildrenShapes::AddShape(const uno::Reference<drawing::XShape>& xShape, bool bCommitChange) const { SortedShapes::iterator aFindItr; if (!FindShape(xShape, aFindItr)) @@ -1266,7 +1266,7 @@ void ScChildrenShapes::AddShape(const uno::Reference<drawing::XShape>& xShape, s if( (nLayerID == SC_LAYER_INTERN) || (nLayerID == SC_LAYER_HIDDEN) ) pShape->bSelectable = false; else - pShape->bSelectable = sal_True; + pShape->bSelectable = true; } } @@ -1281,14 +1281,14 @@ void ScChildrenShapes::AddShape(const uno::Reference<drawing::XShape>& xShape, s if (xEnum.is()) { uno::Reference<drawing::XShape> xSelectedShape; - sal_Bool bFound(false); + bool bFound(false); while (!bFound && xEnum->hasMoreElements()) { xEnum->nextElement() >>= xSelectedShape; if (xShape.is() && (xShape.get() == xSelectedShape.get())) { - pShape->bSelected = sal_True; - bFound = sal_True; + pShape->bSelected = true; + bFound = true; } } } @@ -1340,28 +1340,28 @@ void ScChildrenShapes::RemoveShape(const uno::Reference<drawing::XShape>& xShape } } -sal_Bool ScChildrenShapes::FindShape(const uno::Reference<drawing::XShape>& xShape, ScChildrenShapes::SortedShapes::iterator& rItr) const +bool ScChildrenShapes::FindShape(const uno::Reference<drawing::XShape>& xShape, ScChildrenShapes::SortedShapes::iterator& rItr) const { - sal_Bool bResult(false); + bool bResult(false); ScAccessibleShapeData aShape; aShape.xShape = xShape; ScShapeDataLess aLess; rItr = std::lower_bound(maZOrderedShapes.begin(), maZOrderedShapes.end(), &aShape, aLess); if ((rItr != maZOrderedShapes.end()) && (*rItr != NULL) && ((*rItr)->xShape.get() == xShape.get())) - bResult = sal_True; // if the shape is found + bResult = true; // if the shape is found #if OSL_DEBUG_LEVEL > 0 // test whether it finds truly the correct shape (perhaps it is not really sorted) SortedShapes::iterator aDebugItr = maZOrderedShapes.begin(); SortedShapes::iterator aEndItr = maZOrderedShapes.end(); - sal_Bool bFound(false); + bool bFound(false); while (!bFound && aDebugItr != aEndItr) { if (*aDebugItr && ((*aDebugItr)->xShape.get() == xShape.get())) - bFound = sal_True; + bFound = true; else ++aDebugItr; } - sal_Bool bResult2 = (aDebugItr != maZOrderedShapes.end()); + bool bResult2 = (aDebugItr != maZOrderedShapes.end()); OSL_ENSURE((bResult == bResult2) && ((bResult && (rItr == aDebugItr)) || !bResult), "wrong Shape found"); #endif return bResult; @@ -1372,8 +1372,8 @@ sal_Int8 ScChildrenShapes::Compare(const ScAccessibleShapeData* pData1, { ScShapeDataLess aLess; - sal_Bool bResult1(aLess(pData1, pData2)); - sal_Bool bResult2(aLess(pData2, pData1)); + bool bResult1(aLess(pData1, pData2)); + bool bResult2(aLess(pData2, pData1)); sal_Int8 nResult(0); if (!bResult1 && bResult2) @@ -1541,7 +1541,7 @@ void ScAccessibleDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) uno::Reference<XAccessible> xAccessible; if (mpChildrenShapes) { - sal_Bool bTabMarked(IsTableSelected()); + bool bTabMarked(IsTableSelected()); xAccessible = mpChildrenShapes->GetSelected(0, bTabMarked); } if( xAccessible.is() ) @@ -1672,7 +1672,7 @@ void ScAccessibleDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) void SAL_CALL ScAccessibleDocument::selectionChanged( const lang::EventObject& /* aEvent */ ) throw (uno::RuntimeException, std::exception) { - sal_Bool bSelectionChanged(false); + bool bSelectionChanged(false); if (mpAccessibleSpreadsheet) { bool bOldSelected(mbCompleteSheetSelected); @@ -1680,12 +1680,12 @@ void SAL_CALL ScAccessibleDocument::selectionChanged( const lang::EventObject& / if (bOldSelected != mbCompleteSheetSelected) { mpAccessibleSpreadsheet->CompleteSelectionChanged(mbCompleteSheetSelected); - bSelectionChanged = sal_True; + bSelectionChanged = true; } } if (mpChildrenShapes && mpChildrenShapes->SelectionChanged()) - bSelectionChanged = sal_True; + bSelectionChanged = true; if (bSelectionChanged) { @@ -1919,7 +1919,7 @@ void SAL_CALL uno::Reference < XAccessible > xAccessible = mpChildrenShapes->Get(nChildIndex); if (xAccessible.is()) { - sal_Bool bWasTableSelected(IsTableSelected()); + bool bWasTableSelected(IsTableSelected()); if (mpChildrenShapes) mpChildrenShapes->Select(nChildIndex); // throws no lang::IndexOutOfBoundsException if Index is to high @@ -1941,7 +1941,7 @@ sal_Bool SAL_CALL { SolarMutexGuard aGuard; IsObjectValid(); - sal_Bool bResult(false); + bool bResult(false); if (mpChildrenShapes) { @@ -1960,7 +1960,7 @@ sal_Bool SAL_CALL else { if (mxTempAcc.is() && nChildIndex == nCount) - bResult = sal_True; + bResult = true; else bResult = IsTableSelected(); } @@ -2029,7 +2029,7 @@ uno::Reference<XAccessible > SAL_CALL if (nSelectedChildIndex < 0 || nSelectedChildIndex >= nCount) throw lang::IndexOutOfBoundsException(); - sal_Bool bTabMarked(IsTableSelected()); + bool bTabMarked(IsTableSelected()); if (mpChildrenShapes) xAccessible = mpChildrenShapes->GetSelected(nSelectedChildIndex, bTabMarked); // throws no lang::IndexOutOfBoundsException if Index is to high @@ -2059,7 +2059,7 @@ void SAL_CALL if (nChildIndex < 0 || nChildIndex >= nCount) throw lang::IndexOutOfBoundsException(); - sal_Bool bTabMarked(IsTableSelected()); + bool bTabMarked(IsTableSelected()); uno::Reference < XAccessible > xAccessible = mpChildrenShapes->Get(nChildIndex); if (xAccessible.is()) @@ -2534,7 +2534,7 @@ com::sun::star::uno::Sequence< com::sun::star::uno::Any > ScAccessibleDocument:: } else if ( nType == FINDREPLACEFLOWTO ) { - sal_Bool bSuccess(sal_False); + bool bSuccess(false); rAny >>= bSuccess; if ( bSuccess ) { diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx index ffdff742aed3..a881971f8856 100644 --- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx +++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx @@ -72,7 +72,7 @@ struct ScAccNote ScAddress maNoteCell; ::accessibility::AccessibleTextHelper* mpTextHelper; sal_Int32 mnParaCount; - sal_Bool mbMarkNote; + bool mbMarkNote; ScAccNote() : mpTextHelper(NULL) @@ -104,13 +104,13 @@ private: sal_Int32 mnParagraphs; sal_Int32 mnOffset; - ::accessibility::AccessibleTextHelper* CreateTextHelper(const OUString& rString, const Rectangle& rVisRect, const ScAddress& aCellPos, sal_Bool bMarkNote, sal_Int32 nChildOffset) const; - sal_Int32 AddNotes(const ScPreviewLocationData& rData, const Rectangle& rVisRect, sal_Bool bMark, ScAccNotes& rNotes); + ::accessibility::AccessibleTextHelper* CreateTextHelper(const OUString& rString, const Rectangle& rVisRect, const ScAddress& aCellPos, bool bMarkNote, sal_Int32 nChildOffset) const; + sal_Int32 AddNotes(const ScPreviewLocationData& rData, const Rectangle& rVisRect, bool bMark, ScAccNotes& rNotes); sal_Int8 CompareCell(const ScAddress& aCell1, const ScAddress& aCell2); void CollectChildren(const ScAccNote& rNote, ScXAccList& rList); sal_Int32 CheckChanges(const ScPreviewLocationData& rData, const Rectangle& rVisRect, - sal_Bool bMark, ScAccNotes& rOldNotes, ScAccNotes& rNewNotes, + bool bMark, ScAccNotes& rOldNotes, ScAccNotes& rNewNotes, ScXAccList& rOldParas, ScXAccList& rNewParas); inline ScDocument* GetDocument() const; @@ -139,7 +139,7 @@ ScNotesChildren::~ScNotesChildren() std::for_each(maMarks.begin(), maMarks.end(), DeleteAccNote()); } -::accessibility::AccessibleTextHelper* ScNotesChildren::CreateTextHelper(const OUString& rString, const Rectangle& rVisRect, const ScAddress& aCellPos, sal_Bool bMarkNote, sal_Int32 nChildOffset) const +::accessibility::AccessibleTextHelper* ScNotesChildren::CreateTextHelper(const OUString& rString, const Rectangle& rVisRect, const ScAddress& aCellPos, bool bMarkNote, sal_Int32 nChildOffset) const { ::accessibility::AccessibleTextHelper* pTextHelper = NULL; @@ -161,7 +161,7 @@ ScNotesChildren::~ScNotesChildren() return pTextHelper; } -sal_Int32 ScNotesChildren::AddNotes(const ScPreviewLocationData& rData, const Rectangle& rVisRect, sal_Bool bMark, ScAccNotes& rNotes) +sal_Int32 ScNotesChildren::AddNotes(const ScPreviewLocationData& rData, const Rectangle& rVisRect, bool bMark, ScAccNotes& rNotes) { sal_Int32 nCount = rData.GetNoteCountInRange(rVisRect, bMark); @@ -208,7 +208,7 @@ void ScNotesChildren::Init(const Rectangle& rVisRect, sal_Int32 nOffset) const ScPreviewLocationData& rData = mpViewShell->GetLocationData(); mnParagraphs = AddNotes(rData, rVisRect, false, maMarks); - mnParagraphs += AddNotes(rData, rVisRect, sal_True, maNotes); + mnParagraphs += AddNotes(rData, rVisRect, true, maNotes); } } @@ -221,11 +221,11 @@ struct ScParaFound { sal_Int32 mnIndex; ScParaFound(sal_Int32 nIndex) : mnIndex(nIndex) {} - sal_Bool operator() (const ScAccNote& rNote) + bool operator() (const ScAccNote& rNote) { - sal_Bool bResult(false); + bool bResult(false); if (rNote.mnParaCount > mnIndex) - bResult = sal_True; + bResult = true; else mnIndex -= rNote.mnParaCount; return bResult; @@ -278,11 +278,11 @@ struct ScPointFound Rectangle maPoint; sal_Int32 mnParagraphs; ScPointFound(const Point& rPoint) : maPoint(rPoint, Size(0, 0)), mnParagraphs(0) {} - sal_Bool operator() (const ScAccNote& rNote) + bool operator() (const ScAccNote& rNote) { - sal_Bool bResult(false); + bool bResult(false); if (maPoint.IsInside(rNote.maRect)) - bResult = sal_True; + bResult = true; else mnParagraphs += rNote.mnParaCount; return bResult; @@ -334,7 +334,7 @@ void ScNotesChildren::CollectChildren(const ScAccNote& rNote, ScXAccList& rList) } sal_Int32 ScNotesChildren::CheckChanges(const ScPreviewLocationData& rData, - const Rectangle& rVisRect, sal_Bool bMark, ScAccNotes& rOldNotes, + const Rectangle& rVisRect, bool bMark, ScAccNotes& rOldNotes, ScAccNotes& rNewNotes, ScXAccList& rOldParas, ScXAccList& rNewParas) { sal_Int32 nCount = rData.GetNoteCountInRange(rVisRect, bMark); @@ -351,7 +351,7 @@ sal_Int32 ScNotesChildren::CheckChanges(const ScPreviewLocationData& rData, aNote.mnParaCount = 1; ScAccNotes::iterator aItr = rOldNotes.begin(); ScAccNotes::iterator aEndItr = rOldNotes.end(); - sal_Bool bAddNote(false); + bool bAddNote(false); for (sal_Int32 nIndex = 0; nIndex < nCount; ++nIndex) { if (rData.GetNoteInRange(rVisRect, nIndex, bMark, aNote.maNoteCell, aNote.maRect)) @@ -394,7 +394,7 @@ sal_Int32 ScNotesChildren::CheckChanges(const ScPreviewLocationData& rData, // collect new children CollectChildren(aNote, rNewParas); } - bAddNote = sal_True; + bAddNote = true; // not necessary, because this branch should not be reached if it is the end //if (aItr != aEndItr) ++aItr; @@ -406,7 +406,7 @@ sal_Int32 ScNotesChildren::CheckChanges(const ScPreviewLocationData& rData, aNote.mnParaCount = aNote.mpTextHelper->GetChildCount(); // collect new children CollectChildren(aNote, rNewParas); - bAddNote = sal_True; + bAddNote = true; } else { @@ -474,7 +474,7 @@ void ScNotesChildren::DataChanged(const Rectangle& rVisRect) ScXAccList aNewParas; ScXAccList aOldParas; ScAccNotes aNewMarks; - mnParagraphs = CheckChanges(mpViewShell->GetLocationData(), rVisRect, sal_True, maMarks, aNewMarks, aOldParas, aNewParas); + mnParagraphs = CheckChanges(mpViewShell->GetLocationData(), rVisRect, true, maMarks, aNewMarks, aOldParas, aNewParas); maMarks = aNewMarks; ScAccNotes aNewNotes; mnParagraphs += CheckChanges(mpViewShell->GetLocationData(), rVisRect, false, maNotes, aNewNotes, aOldParas, aNewParas); @@ -515,7 +515,7 @@ private: ScPreviewShell* mpViewShell; ScAccessibleDocumentPagePreview* mpAccDoc; MapMode maMapMode; - sal_Bool mbValid; + bool mbValid; }; ScIAccessibleViewForwarder::ScIAccessibleViewForwarder() @@ -529,7 +529,7 @@ ScIAccessibleViewForwarder::ScIAccessibleViewForwarder(ScPreviewShell* pViewShel : mpViewShell(pViewShell), mpAccDoc(pAccDoc), maMapMode(aMapMode), - mbValid(sal_True) + mbValid(true) { } @@ -643,9 +643,9 @@ ScShapeChild::~ScShapeChild() struct ScShapeChildLess { - sal_Bool operator()(const ScShapeChild& rChild1, const ScShapeChild& rChild2) const + bool operator()(const ScShapeChild& rChild1, const ScShapeChild& rChild2) const { - sal_Bool bResult(false); + bool bResult(false); if (rChild1.mxShape.is() && rChild2.mxShape.is()) bResult = (rChild1.mxShape.get() < rChild2.mxShape.get()); return bResult; @@ -1007,11 +1007,11 @@ struct ScShapePointFound { Point maPoint; ScShapePointFound(const awt::Point& rPoint) : maPoint(VCLPoint(rPoint)) {} - sal_Bool operator() (const ScShapeChild& rShape) + bool operator() (const ScShapeChild& rShape) { - sal_Bool bResult(false); + bool bResult(false); if ((VCLRectangle(rShape.mpAccShape->getBounds())).IsInside(maPoint)) - bResult = sal_True; + bResult = true; return bResult; } }; @@ -1095,9 +1095,9 @@ void ScShapeChildren::FillShapes(const Rectangle& aPixelPaintRect, const MapMode Window* pWin = mpViewShell->GetWindow(); if (pPage && pWin) { - sal_Bool bForeAdded(false); - sal_Bool bBackAdded(false); - sal_Bool bControlAdded(false); + bool bForeAdded(false); + bool bBackAdded(false); + bool bControlAdded(false); Rectangle aClippedPixelPaintRect(aPixelPaintRect); if (mpAccDoc) { @@ -1129,19 +1129,19 @@ void ScShapeChildren::FillShapes(const Rectangle& aPixelPaintRect, const MapMode case SC_LAYER_FRONT: { maShapeRanges[nRangeId].maForeShapes.push_back(aShape); - bForeAdded = sal_True; + bForeAdded = true; } break; case SC_LAYER_BACK: { maShapeRanges[nRangeId].maBackShapes.push_back(aShape); - bBackAdded = sal_True; + bBackAdded = true; } break; case SC_LAYER_CONTROLS: { maShapeRanges[nRangeId].maControls.push_back(aShape); - bControlAdded = sal_True; + bControlAdded = true; } break; default: diff --git a/sc/source/ui/Accessibility/AccessibleFilterMenu.cxx b/sc/source/ui/Accessibility/AccessibleFilterMenu.cxx index f35e70f9f9f2..5c95acb629ca 100644 --- a/sc/source/ui/Accessibility/AccessibleFilterMenu.cxx +++ b/sc/source/ui/Accessibility/AccessibleFilterMenu.cxx @@ -101,7 +101,7 @@ Reference<XAccessible> ScAccessibleFilterMenu::getAccessibleAtPoint( const ::com return this; } -sal_Bool ScAccessibleFilterMenu::isVisible() throw (RuntimeException, std::exception) +bool ScAccessibleFilterMenu::isVisible() throw (RuntimeException, std::exception) { return mpWindow->IsVisible(); } diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx index cc34fe4e19d6..bdc9b1dbf1e5 100644 --- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx +++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx @@ -455,18 +455,18 @@ void ScAccessibleSpreadsheet::Notify( SfxBroadcaster& rBC, const SfxHint& rHint pAccDoc->CommitChange(aEvent); } } - sal_Bool bNewPosCell = (aNewCell != maActiveCell) || mpViewShell->GetForceFocusOnCurCell(); // #i123629# - sal_Bool bNewPosCellFocus=sal_False; + bool bNewPosCell = (aNewCell != maActiveCell) || mpViewShell->GetForceFocusOnCurCell(); // #i123629# + bool bNewPosCellFocus=false; if ( bNewPosCell && IsFocused() && aNewCell.Tab() == maActiveCell.Tab() ) {//single Focus - bNewPosCellFocus=sal_True; + bNewPosCellFocus=true; } ScMarkData &refScMarkData = pViewData->GetMarkData(); // MT IA2: Not used // int nSelCount = refScMarkData.GetSelectCount(); - sal_Bool bIsMark =refScMarkData.IsMarked(); - sal_Bool bIsMultMark = refScMarkData.IsMultiMarked(); - sal_Bool bNewMarked = refScMarkData.GetTableSelect(aNewCell.Tab()) && ( bIsMark || bIsMultMark ); + bool bIsMark =refScMarkData.IsMarked(); + bool bIsMultMark = refScMarkData.IsMultiMarked(); + bool bNewMarked = refScMarkData.GetTableSelect(aNewCell.Tab()) && ( bIsMark || bIsMultMark ); // sal_Bool bNewCellSelected = isAccessibleSelected(aNewCell.Row(), aNewCell.Col()); sal_uInt16 nTab = pViewData->GetTabNo(); ScRange aMarkRange; @@ -489,8 +489,8 @@ void ScAccessibleSpreadsheet::Notify( SfxBroadcaster& rBC, const SfxHint& rHint refScMarkData.FillRangeListWithMarks(mpMarkedRanges, true); //For Whole Col Row - sal_Bool bWholeRow = ::labs(aMarkRange.aStart.Row() - aMarkRange.aEnd.Row()) == MAXROW ; - sal_Bool bWholeCol = ::abs(aMarkRange.aStart.Col() - aMarkRange.aEnd.Col()) == MAXCOL ; + bool bWholeRow = ::labs(aMarkRange.aStart.Row() - aMarkRange.aEnd.Row()) == MAXROW ; + bool bWholeCol = ::abs(aMarkRange.aStart.Col() - aMarkRange.aEnd.Col()) == MAXCOL ; if ((bNewMarked || bIsMark || bIsMultMark ) && (bWholeCol || bWholeRow)) { if ( aMarkRange != m_aLastWithInMarkRange ) @@ -500,10 +500,10 @@ void ScAccessibleSpreadsheet::Notify( SfxBroadcaster& rBC, const SfxHint& rHint { CommitFocusCell(aNewCell); } - sal_Bool bLastIsWholeColRow = + bool bLastIsWholeColRow = (::labs(m_aLastWithInMarkRange.aStart.Row() - m_aLastWithInMarkRange.aEnd.Row()) == MAXROW && bWholeRow) || (::abs(m_aLastWithInMarkRange.aStart.Col() - m_aLastWithInMarkRange.aEnd.Col()) == MAXCOL && bWholeCol); - sal_Bool bSelSmaller= + bool bSelSmaller= bLastIsWholeColRow && !aMarkRange.In(m_aLastWithInMarkRange) && aMarkRange.Intersects(m_aLastWithInMarkRange); @@ -519,7 +519,7 @@ void ScAccessibleSpreadsheet::Notify( SfxBroadcaster& rBC, const SfxHint& rHint } m_aLastWithInMarkRange = aMarkRange; int nNewMarkCount = mpMarkedRanges->GetCellCount(); - sal_Bool bSendSingle= (0 == nNewMarkCount) && bNewPosCell; + bool bSendSingle= (0 == nNewMarkCount) && bNewPosCell; if (bSendSingle) { RemoveSelection(refScMarkData); @@ -553,7 +553,7 @@ void ScAccessibleSpreadsheet::Notify( SfxBroadcaster& rBC, const SfxHint& rHint else { ScRange aDelRange; - sal_Bool bIsDel = pViewData->GetDelMark( aDelRange ); + bool bIsDel = pViewData->GetDelMark( aDelRange ); if ( (!bIsDel || (bIsDel && aMarkRange != aDelRange)) && bNewMarked && nNewMarkCount > 0 && @@ -886,7 +886,7 @@ sal_Bool SAL_CALL ScAccessibleSpreadsheet::isAccessibleRowSelected( sal_Int32 nR if ((nRow > (maRange.aEnd.Row() - maRange.aStart.Row())) || (nRow < 0)) throw lang::IndexOutOfBoundsException(); - sal_Bool bResult(false); + bool bResult(false); if (mpViewShell && mpViewShell->GetViewData()) { const ScMarkData& rMarkdata = mpViewShell->GetViewData()->GetMarkData(); @@ -908,7 +908,7 @@ sal_Bool SAL_CALL ScAccessibleSpreadsheet::isAccessibleColumnSelected( sal_Int32 if ((nColumn > (maRange.aEnd.Col() - maRange.aStart.Col())) || (nColumn < 0)) throw lang::IndexOutOfBoundsException(); - sal_Bool bResult(false); + bool bResult(false); if (mpViewShell && mpViewShell->GetViewData()) { const ScMarkData& rMarkdata = mpViewShell->GetViewData()->GetMarkData(); @@ -974,7 +974,7 @@ sal_Bool SAL_CALL ScAccessibleSpreadsheet::isAccessibleSelected( sal_Int32 nRow, (nRow > (maRange.aEnd.Row() - maRange.aStart.Row())) || (nRow < 0)) throw lang::IndexOutOfBoundsException(); - sal_Bool bResult(false); + bool bResult(false); if (mpViewShell) { const ScMarkData& rMarkdata = mpViewShell->GetViewData()->GetMarkData(); @@ -1388,7 +1388,7 @@ bool ScAccessibleSpreadsheet::IsEditable( { return false; } - sal_Bool bProtected(false); + bool bProtected(false); if (mpDoc && mpDoc->IsTabProtected(maRange.aStart.Tab())) bProtected = true; return !bProtected; diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx index f6be4b81d227..00bb8646f5c9 100644 --- a/sc/source/ui/Accessibility/AccessibleText.cxx +++ b/sc/source/ui/Accessibility/AccessibleText.cxx @@ -377,15 +377,15 @@ Rectangle ScPreviewViewForwarder::CorrectVisArea(const Rectangle& rVisArea) cons class ScPreviewHeaderFooterViewForwarder : public ScPreviewViewForwarder { - sal_Bool mbHeader; + bool mbHeader; public: - ScPreviewHeaderFooterViewForwarder(ScPreviewShell* pViewShell, sal_Bool bHeader); + ScPreviewHeaderFooterViewForwarder(ScPreviewShell* pViewShell, bool bHeader); virtual ~ScPreviewHeaderFooterViewForwarder(); virtual Rectangle GetVisArea() const SAL_OVERRIDE; }; -ScPreviewHeaderFooterViewForwarder::ScPreviewHeaderFooterViewForwarder(ScPreviewShell* pViewShell, sal_Bool bHeader) +ScPreviewHeaderFooterViewForwarder::ScPreviewHeaderFooterViewForwarder(ScPreviewShell* pViewShell, bool bHeader) : ScPreviewViewForwarder(pViewShell), mbHeader(bHeader) @@ -459,11 +459,11 @@ Rectangle ScPreviewCellViewForwarder::GetVisArea() const class ScPreviewHeaderCellViewForwarder : public ScPreviewViewForwarder { ScAddress maCellPos; - sal_Bool mbColHeader; + bool mbColHeader; public: ScPreviewHeaderCellViewForwarder(ScPreviewShell* pViewShell, ScAddress aCellPos, - sal_Bool bColHeader); + bool bColHeader); virtual ~ScPreviewHeaderCellViewForwarder(); virtual Rectangle GetVisArea() const SAL_OVERRIDE; @@ -471,7 +471,7 @@ public: ScPreviewHeaderCellViewForwarder::ScPreviewHeaderCellViewForwarder(ScPreviewShell* pViewShell, ScAddress aCellPos, - sal_Bool bColHeader) + bool bColHeader) : ScPreviewViewForwarder(pViewShell), maCellPos(aCellPos), @@ -503,11 +503,11 @@ Rectangle ScPreviewHeaderCellViewForwarder::GetVisArea() const class ScPreviewNoteViewForwarder : public ScPreviewViewForwarder { ScAddress maCellPos; - sal_Bool mbNoteMark; + bool mbNoteMark; public: ScPreviewNoteViewForwarder(ScPreviewShell* pViewShell, ScAddress aCellPos, - sal_Bool bNoteMark); + bool bNoteMark); virtual ~ScPreviewNoteViewForwarder(); virtual Rectangle GetVisArea() const SAL_OVERRIDE; @@ -515,7 +515,7 @@ public: ScPreviewNoteViewForwarder::ScPreviewNoteViewForwarder(ScPreviewShell* pViewShell, ScAddress aCellPos, - sal_Bool bNoteMark) + bool bNoteMark) : ScPreviewViewForwarder(pViewShell), maCellPos(aCellPos), @@ -1281,7 +1281,7 @@ ScAccessibleTextData* ScAccessiblePreviewCellTextData::Clone() const SvxTextForwarder* ScAccessiblePreviewCellTextData::GetTextForwarder() { - sal_Bool bEditEngineBefore(pEditEngine != NULL); + bool bEditEngineBefore(pEditEngine != NULL); ScCellTextData::GetTextForwarder(); // creates Forwarder and EditEngine diff --git a/sc/source/ui/app/drwtrans.cxx b/sc/source/ui/app/drwtrans.cxx index f33845f9a466..a28d4b915ddf 100644 --- a/sc/source/ui/app/drwtrans.cxx +++ b/sc/source/ui/app/drwtrans.cxx @@ -268,9 +268,9 @@ ScDrawTransferObj* ScDrawTransferObj::GetOwnClipboard( Window* ) return pObj; } -static sal_Bool lcl_HasOnlyControls( SdrModel* pModel ) +static bool lcl_HasOnlyControls( SdrModel* pModel ) { - sal_Bool bOnlyControls = false; // default if there are no objects + bool bOnlyControls = false; // default if there are no objects if ( pModel ) { @@ -281,7 +281,7 @@ static sal_Bool lcl_HasOnlyControls( SdrModel* pModel ) SdrObject* pObj = aIter.Next(); if ( pObj ) { - bOnlyControls = sal_True; // only set if there are any objects at all + bOnlyControls = true; // only set if there are any objects at all while ( pObj ) { if (!pObj->ISA(SdrUnoObj)) diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 700f2b399c31..78481fa0ab73 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -3319,7 +3319,7 @@ bool ScInputHandler::KeyInput( const KeyEvent& rKEvt, bool bStartEdit /* = false } // #i114511# don't count cursor keys as modification - sal_Bool bSetModified = !bCursorKey; + bool bSetModified = !bCursorKey; DataChanged(false, bSetModified); // also calls UpdateParenthesis() InvalidateAttribs(); //! in DataChanged ? } diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index 3b91d53b1567..c4418de8b331 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -268,7 +268,7 @@ ScInputWindow::ScInputWindow( Window* pParent, SfxBindings* pBind ) : ScInputWindow::~ScInputWindow() { - sal_Bool bDown = ( ScGlobal::pSysLocale == NULL ); // after Clear? + bool bDown = ( ScGlobal::pSysLocale == NULL ); // after Clear? // if any view's input handler has a pointer to this input window, reset it // (may be several ones, #74522#) @@ -431,18 +431,18 @@ void ScInputWindow::Select() if ( bEmpty ) { ScRangeList aRangeList; - const sal_Bool bDataFound = pViewSh->GetAutoSumArea( aRangeList ); + const bool bDataFound = pViewSh->GetAutoSumArea( aRangeList ); if ( bDataFound ) { ScAddress aAddr = aRangeList.back()->aEnd; aAddr.IncRow(); - const sal_Bool bSubTotal( UseSubTotal( &aRangeList ) ); + const bool bSubTotal( UseSubTotal( &aRangeList ) ); pViewSh->EnterAutoSum( aRangeList, bSubTotal, aAddr ); } } else { - const sal_Bool bSubTotal( UseSubTotal( &aMarkRangeList ) ); + const bool bSubTotal( UseSubTotal( &aMarkRangeList ) ); for ( size_t i = 0; i < nCount; ++i ) { const ScRange aRange( *aMarkRangeList[i] ); @@ -466,8 +466,8 @@ void ScInputWindow::Select() else // nur in Eingabezeile einfuegen { ScRangeList aRangeList; - const sal_Bool bDataFound = pViewSh->GetAutoSumArea( aRangeList ); - const sal_Bool bSubTotal( UseSubTotal( &aRangeList ) ); + const bool bDataFound = pViewSh->GetAutoSumArea( aRangeList ); + const bool bSubTotal( UseSubTotal( &aRangeList ) ); ScAddress aAddr = pViewSh->GetViewData()->GetCurPos(); const OUString aFormula = pViewSh->GetAutoSumFormula( aRangeList, bSubTotal, aAddr ); SetFuncString( aFormula ); @@ -1390,7 +1390,7 @@ void ScMultiTextWnd::InitEditEngine() // Wenn in der Zelle URL-Felder enthalten sind, muessen die auch in // die Eingabezeile uebernommen werden, weil sonst die Positionen nicht stimmen. - sal_Bool bFilled = false; + bool bFilled = false; ScInputHandler* pHdl = SC_MOD()->GetInputHdl(); if ( pHdl ) //! Testen, ob's der richtige InputHdl ist? bFilled = pHdl->GetTextAndFields( *pEditEngine ); @@ -1669,7 +1669,7 @@ void ScTextWnd::KeyInput(const KeyEvent& rKEvt) bInputMode = true; if (!SC_MOD()->InputKeyEvent( rKEvt )) { - sal_Bool bUsed = false; + bool bUsed = false; ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell(); if ( pViewSh ) bUsed = pViewSh->SfxKeyInput(rKEvt); // nur Acceleratoren, keine Eingabe @@ -1771,7 +1771,7 @@ void ScTextWnd::StartEditEngine() // Wenn in der Zelle URL-Felder enthalten sind, muessen die auch in // die Eingabezeile uebernommen werden, weil sonst die Positionen nicht stimmen. - sal_Bool bFilled = false; + bool bFilled = false; ScInputHandler* pHdl = SC_MOD()->GetInputHdl(); if ( pHdl ) //! Testen, ob's der richtige InputHdl ist? bFilled = pHdl->GetTextAndFields( *pEditEngine ); @@ -1851,7 +1851,7 @@ void ScTextWnd::StopEditEngine( bool bAll ) pScMod->InputSelection( pEditView ); aString = pEditEngine->GetText(); bIsInsertMode = pEditView->IsInsertMode(); - sal_Bool bSelection = pEditView->HasSelection(); + bool bSelection = pEditView->HasSelection(); pEditEngine->SetModifyHdl(Link()); DELETEZ(pEditView); DELETEZ(pEditEngine); @@ -1897,9 +1897,9 @@ void ScTextWnd::SetTextString( const OUString& rNewString ) if (!pEditEngine) { - sal_Bool bPaintAll; + bool bPaintAll; if ( bIsRTL ) - bPaintAll = sal_True; + bPaintAll = true; else { // test if CTL script type is involved diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx index 246130f45102..ec2ce296e670 100644 --- a/sc/source/ui/app/scmod.cxx +++ b/sc/source/ui/app/scmod.cxx @@ -217,10 +217,10 @@ void ScModule::ConfigurationChanged( utl::ConfigurationBroadcaster* p, sal_uInt3 if ( ScDetectiveFunc::IsColorsInitialized() ) { const svtools::ColorConfig& rColors = GetColorConfig(); - sal_Bool bArrows = + bool bArrows = ( ScDetectiveFunc::GetArrowColor() != (ColorData)rColors.GetColorValue(svtools::CALCDETECTIVE).nColor || ScDetectiveFunc::GetErrorColor() != (ColorData)rColors.GetColorValue(svtools::CALCDETECTIVEERROR).nColor ); - sal_Bool bComments = + bool bComments = ( ScDetectiveFunc::GetCommentColor() != (ColorData)rColors.GetColorValue(svtools::CALCNOTESBACKGROUND).nColor ); if ( bArrows || bComments ) { @@ -393,7 +393,7 @@ void ScModule::Execute( SfxRequest& rReq ) break; case SID_AUTOSPELL_CHECK: { - sal_Bool bSet; + bool bSet; const SfxPoolItem* pItem; if ( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( nSlot, true, &pItem ) ) bSet = ((const SfxBoolItem*)pItem)->GetValue(); @@ -765,12 +765,12 @@ void ScModule::InsertEntryToLRUList(sal_uInt16 nFIndex) sal_uInt16 aIdxList[LRU_MAX]; sal_uInt16 n = 0; - sal_Bool bFound = false; + bool bFound = false; while ((n < LRU_MAX) && n<nLRUFuncCount) // alte Liste abklappern { if (!bFound && (pLRUListIds[n]== nFIndex)) - bFound = sal_True; // erster! Treffer + bFound = true; // erster! Treffer else if (bFound) aIdxList[n ] = pLRUListIds[n]; // hinter Treffer kopieren else if ((n+1) < LRU_MAX) @@ -1084,7 +1084,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet ) ScViewData* pViewData = pViewSh->GetViewData(); const ScViewOptions& rOldOpt = pViewData->GetOptions(); - sal_Bool bAnchorList = ( rOldOpt.GetOption( VOPT_ANCHOR ) != + bool bAnchorList = ( rOldOpt.GetOption( VOPT_ANCHOR ) != rNewOpt.GetOption( VOPT_ANCHOR ) ); if ( rOldOpt != rNewOpt ) @@ -1266,8 +1266,8 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet ) } if ( rOptSet.HasItem(SID_SC_INPUT_TEXTWYSIWYG,&pItem) ) { - sal_Bool bNew = ((const SfxBoolItem*)pItem)->GetValue(); - if ( bNew != ( pInputCfg->GetTextWysiwyg() ? 1 : 0 ) ) + bool bNew = ((const SfxBoolItem*)pItem)->GetValue(); + if ( bNew != pInputCfg->GetTextWysiwyg() ) { pInputCfg->SetTextWysiwyg( bNew ); bSaveInputOptions = true; @@ -1943,7 +1943,7 @@ IMPL_LINK_NOARG(ScModule, IdleHandler) sc::DocumentLinkManager& rLinkMgr = pDoc->GetDocLinkManager(); bool bLinks = rLinkMgr.idleCheckLinks(); - sal_Bool bWidth = pDoc->IdleCalcTextWidth(); + bool bWidth = pDoc->IdleCalcTextWidth(); bMore = bLinks || bWidth; // ueberhaupt noch was? diff --git a/sc/source/ui/app/seltrans.cxx b/sc/source/ui/app/seltrans.cxx index f7e5b73704ed..d3e9fae9901c 100644 --- a/sc/source/ui/app/seltrans.cxx +++ b/sc/source/ui/app/seltrans.cxx @@ -39,9 +39,9 @@ using namespace com::sun::star; -static sal_Bool lcl_IsURLButton( SdrObject* pObject ) +static bool lcl_IsURLButton( SdrObject* pObject ) { - sal_Bool bRet = false; + bool bRet = false; SdrUnoObj* pUnoCtrl = PTR_CAST(SdrUnoObj, pObject); if (pUnoCtrl && FmFormInventor == pUnoCtrl->GetObjInventor()) @@ -59,7 +59,7 @@ static sal_Bool lcl_IsURLButton( SdrObject* pObject ) uno::Any aAny = xPropSet->getPropertyValue( sPropButtonType ); form::FormButtonType eTmp; if ( (aAny >>= eTmp) && eTmp == form::FormButtonType_URL ) - bRet = sal_True; + bRet = true; } } } @@ -292,7 +292,7 @@ void ScSelectionTransferObj::CreateCellData() // bApi = sal_True -> no error messages // #i18364# bStopEdit = sal_False -> don't end edit mode // (this may be called from pasting into the edit line) - sal_Bool bCopied = pViewData->GetView()->CopyToClip( pClipDoc, false, true, true, false ); + bool bCopied = pViewData->GetView()->CopyToClip( pClipDoc, false, true, true, false ); ScDrawLayer::SetGlobalDrawPersist(NULL); diff --git a/sc/source/ui/app/uiitems.cxx b/sc/source/ui/app/uiitems.cxx index 0c87ab51bf68..777989994d30 100644 --- a/sc/source/ui/app/uiitems.cxx +++ b/sc/source/ui/app/uiitems.cxx @@ -388,7 +388,7 @@ bool ScUserListItem::operator==( const SfxPoolItem& rItem ) const OSL_ENSURE( SfxPoolItem::operator==( rItem ), "unequal Which or Type" ); const ScUserListItem& r = (const ScUserListItem&)rItem; - sal_Bool bEqual = false; + bool bEqual = false; if ( !pUserList || !(r.pUserList) ) bEqual = ( !pUserList && !(r.pUserList) ); diff --git a/sc/source/ui/attrdlg/tabpages.cxx b/sc/source/ui/attrdlg/tabpages.cxx index 0b20eee29e08..07a137bfc639 100644 --- a/sc/source/ui/attrdlg/tabpages.cxx +++ b/sc/source/ui/attrdlg/tabpages.cxx @@ -118,7 +118,7 @@ void ScTabPageProtection::Reset( const SfxItemSet& rCoreAttrs ) bool ScTabPageProtection::FillItemSet( SfxItemSet& rCoreAttrs ) { - sal_Bool bAttrsChanged = false; + bool bAttrsChanged = false; sal_uInt16 nWhich = GetWhich( SID_SCATTR_PROTECTION ); const SfxPoolItem* pOldItem = GetOldItem( rCoreAttrs, SID_SCATTR_PROTECTION ); const SfxItemSet& rOldSet = GetItemSet(); @@ -133,7 +133,7 @@ bool ScTabPageProtection::FillItemSet( SfxItemSet& rCoreAttrs ) aProtAttr.SetHidePrint( bHidePrint ); if ( bTriEnabled ) - bAttrsChanged = sal_True; // DontCare -> properly value + bAttrsChanged = true; // DontCare -> properly value else bAttrsChanged = !pOldItem || !( aProtAttr == *(const ScProtectionAttr*)pOldItem ); } @@ -162,7 +162,7 @@ IMPL_LINK( ScTabPageProtection, ButtonClickHdl, TriStateBox*, pBox ) else { bDontCare = false; // DontCare from everywhere - sal_Bool bOn = ( eState == TRISTATE_TRUE ); // from a selected value + bool bOn = ( eState == TRISTATE_TRUE ); // from a selected value if ( pBox == m_pBtnProtect ) bProtect = bOn; @@ -200,7 +200,7 @@ void ScTabPageProtection::UpdateButtons() m_pBtnHidePrint->SetState( bHidePrint ? TRISTATE_TRUE : TRISTATE_FALSE ); } - sal_Bool bEnable = ( m_pBtnHideCell->GetState() != TRISTATE_TRUE ); + bool bEnable = ( m_pBtnHideCell->GetState() != TRISTATE_TRUE ); { m_pBtnProtect->Enable( bEnable ); m_pBtnHideFormula->Enable( bEnable ); diff --git a/sc/source/ui/cctrl/cbuttonw.cxx b/sc/source/ui/cctrl/cbuttonw.cxx index d73d64aeaa8d..6fa60e56684b 100644 --- a/sc/source/ui/cctrl/cbuttonw.cxx +++ b/sc/source/ui/cctrl/cbuttonw.cxx @@ -60,11 +60,11 @@ void ScDDComboBoxButton::Draw( const Point& rAt, return; // #i43092# rectangle with size 0 would have RECT_EMPTY as end position // save old state - sal_Bool bHadFill = pOut->IsFillColor(); + bool bHadFill = pOut->IsFillColor(); Color aOldFill = pOut->GetFillColor(); - sal_Bool bHadLine = pOut->IsLineColor(); + bool bHadLine = pOut->IsLineColor(); Color aOldLine = pOut->GetLineColor(); - sal_Bool bOldEnable = pOut->IsMapModeEnabled(); + bool bOldEnable = pOut->IsMapModeEnabled(); Rectangle aBtnRect( rAt, rSize ); Rectangle aInnerRect = aBtnRect; diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx index 35af1f7d90ae..dfcbb4bc7971 100644 --- a/sc/source/ui/condformat/condformatdlgentry.cxx +++ b/sc/source/ui/condformat/condformatdlgentry.cxx @@ -490,7 +490,7 @@ void StyleSelect( ListBox& rLbStyle, ScDocument* pDoc, SvxFontPrevWindow& rWdPre // (SetDispatcherLock would affect all Calc documents) ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); SfxDispatcher* pDisp = pViewShell->GetDispatcher(); - sal_Bool bLocked = pDisp->IsLocked(); + bool bLocked = pDisp->IsLocked(); if (bLocked) pDisp->Lock(false); diff --git a/sc/source/ui/dbgui/consdlg.cxx b/sc/source/ui/dbgui/consdlg.cxx index 56169a25af03..8b9e99b0caf0 100644 --- a/sc/source/ui/dbgui/consdlg.cxx +++ b/sc/source/ui/dbgui/consdlg.cxx @@ -49,7 +49,7 @@ public: ~ScAreaData() {} - void Set( const OUString& rName, const OUString& rArea, sal_Bool bDb ) + void Set( const OUString& rName, const OUString& rArea, bool bDb ) { aStrName = rName; aStrArea = rArea; @@ -58,7 +58,7 @@ public: OUString aStrName; OUString aStrArea; - sal_Bool bIsDbArea; + bool bIsDbArea; }; diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx index c8b43853da29..f4c0eb05c2ba 100644 --- a/sc/source/ui/dbgui/dbnamdlg.cxx +++ b/sc/source/ui/dbgui/dbnamdlg.cxx @@ -78,11 +78,11 @@ private: ScRange& rCurArea; OUString aStr; ScRange aArea; - sal_Bool bHeader:1; - sal_Bool bSize:1; - sal_Bool bFormat:1; - sal_Bool bStrip:1; - sal_Bool bDirty:1; + bool bHeader:1; + bool bSize:1; + bool bFormat:1; + bool bStrip:1; + bool bDirty:1; }; @@ -95,7 +95,7 @@ void DBSaveData::Save() bSize = rBtnSize.IsChecked(); bFormat = rBtnFormat.IsChecked(); bStrip = rBtnStrip.IsChecked(); - bDirty = sal_True; + bDirty = true; } @@ -551,7 +551,7 @@ IMPL_LINK_NOARG(ScDbNameDlg, RemoveBtnHdl) IMPL_LINK_NOARG(ScDbNameDlg, NameModifyHdl) { OUString theName = m_pEdName->GetText(); - sal_Bool bNameFound = (COMBOBOX_ENTRY_NOTFOUND + bool bNameFound = (COMBOBOX_ENTRY_NOTFOUND != m_pEdName->GetEntryPos( theName )); if ( theName.isEmpty() ) diff --git a/sc/source/ui/dbgui/foptmgr.cxx b/sc/source/ui/dbgui/foptmgr.cxx index e17538145153..3035cd8632c8 100644 --- a/sc/source/ui/dbgui/foptmgr.cxx +++ b/sc/source/ui/dbgui/foptmgr.cxx @@ -243,7 +243,7 @@ IMPL_LINK( ScFilterOptionsMgr, EdAreaModifyHdl, Edit*, pEd ) if ( SCA_VALID == (nResult & SCA_VALID) ) { OUString* pStr = NULL; - sal_Bool bFound = false; + bool bFound = false; sal_uInt16 i = 0; sal_uInt16 nCount = pLbCopyArea->GetEntryCount(); diff --git a/sc/source/ui/dbgui/pfiltdlg.cxx b/sc/source/ui/dbgui/pfiltdlg.cxx index 04680f162804..8a097f202500 100644 --- a/sc/source/ui/dbgui/pfiltdlg.cxx +++ b/sc/source/ui/dbgui/pfiltdlg.cxx @@ -350,7 +350,7 @@ const ScQueryItem& ScPivotFilterDlg::GetOutputItem() sal_uInt16 nField = aFieldLbArr[i]->GetSelectEntryPos(); ScQueryOp eOp = (ScQueryOp)aCondLbArr[i]->GetSelectEntryPos(); - sal_Bool bDoThis = (aFieldLbArr[i]->GetSelectEntryPos() != 0); + bool bDoThis = (aFieldLbArr[i]->GetSelectEntryPos() != 0); theParam.GetEntry(i).bDoQuery = bDoThis; if ( bDoThis ) diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx b/sc/source/ui/dbgui/scuiasciiopt.cxx index 95355a15c5b2..9d6cb86a753e 100644 --- a/sc/source/ui/dbgui/scuiasciiopt.cxx +++ b/sc/source/ui/dbgui/scuiasciiopt.cxx @@ -223,8 +223,8 @@ static void save_Separators( { pProperties[4] <<= nFromRow; pProperties[5] <<= nCharSet; - pProperties[6] <<= static_cast<sal_Bool>(bQuotedAsText); - pProperties[7] <<= static_cast<sal_Bool>(bDetectSpecialNum); + pProperties[6] <<= bQuotedAsText; + pProperties[7] <<= bDetectSpecialNum; pProperties[8] <<= nLanguage; } @@ -604,7 +604,7 @@ OUString ScImportAsciiDlg::GetSeparators() const void ScImportAsciiDlg::SetupSeparatorCtrls() { - sal_Bool bEnable = pRbSeparated->IsChecked(); + bool bEnable = pRbSeparated->IsChecked(); pCkbTab->Enable( bEnable ); pCkbSemicolon->Enable( bEnable ); pCkbComma->Enable( bEnable ); diff --git a/sc/source/ui/dbgui/scuiimoptdlg.cxx b/sc/source/ui/dbgui/scuiimoptdlg.cxx index 6b0d32278741..3eda96fc61f7 100644 --- a/sc/source/ui/dbgui/scuiimoptdlg.cxx +++ b/sc/source/ui/dbgui/scuiimoptdlg.cxx @@ -294,7 +294,7 @@ IMPL_LINK( ScImportOptionsDlg, FixedWidthHdl, CheckBox*, pCheckBox ) { if (pCheckBox == m_pCbFixed) { - sal_Bool bEnable = !m_pCbFixed->IsChecked(); + bool bEnable = !m_pCbFixed->IsChecked(); m_pFtFieldSep->Enable( bEnable ); m_pEdFieldSep->Enable( bEnable ); m_pFtTextSep->Enable( bEnable ); diff --git a/sc/source/ui/dbgui/sfiltdlg.cxx b/sc/source/ui/dbgui/sfiltdlg.cxx index e217a4cebfb7..98aa0b8f6733 100644 --- a/sc/source/ui/dbgui/sfiltdlg.cxx +++ b/sc/source/ui/dbgui/sfiltdlg.cxx @@ -279,8 +279,8 @@ IMPL_LINK( ScSpecialFilterDlg, EndDlgHdl, Button*, pBtn ) OUString theAreaStr( pEdFilterArea->GetText() ); ScQueryParam theOutParam( theQueryData ); ScAddress theAdrCopy; - sal_Bool bEditInputOk = true; - sal_Bool bQueryOk = false; + bool bEditInputOk = true; + bool bQueryOk = false; ScRange theFilterArea; const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention(); @@ -444,7 +444,7 @@ IMPL_LINK( ScSpecialFilterDlg, FilterAreaModHdl, formula::RefEdit*, pEd ) if ( SCA_VALID == (nResult & SCA_VALID) ) { OUString* pStr = NULL; - sal_Bool bFound = false; + bool bFound = false; sal_uInt16 i = 0; sal_uInt16 nCount = pLbFilterArea->GetEntryCount(); diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx index 63eff99e4da3..a9a793c2e238 100644 --- a/sc/source/ui/dbgui/tpsort.cxx +++ b/sc/source/ui/dbgui/tpsort.cxx @@ -400,14 +400,14 @@ void ScTabPageSortFields::FillFieldLists( sal_uInt16 nStartField ) sal_uInt16 ScTabPageSortFields::GetFieldSelPos( SCCOLROW nField ) { sal_uInt16 nFieldPos = 0; - sal_Bool bFound = false; + bool bFound = false; for ( sal_uInt16 n=1; n<nFieldCount && !bFound; n++ ) { if ( nFieldArr[n] == nField ) { nFieldPos = n; - bFound = sal_True; + bFound = true; } } @@ -761,7 +761,7 @@ void ScTabPageSortOptions::ActivatePage( const SfxItemSet& rSet ) int ScTabPageSortOptions::DeactivatePage( SfxItemSet* pSetP ) { - sal_Bool bPosInputOk = sal_True; + bool bPosInputOk = true; if ( m_pBtnCopyResult->IsChecked() ) { @@ -895,7 +895,7 @@ void ScTabPageSortOptions::EdOutPosModHdl( Edit* pEd ) if ( SCA_VALID == (nResult & SCA_VALID) ) { OUString* pStr = NULL; - sal_Bool bFound = false; + bool bFound = false; sal_uInt16 i = 0; sal_uInt16 nCount = m_pLbOutPos->GetEntryCount(); diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx index 344e183ea599..6efd5a53c095 100644 --- a/sc/source/ui/dbgui/validate.cxx +++ b/sc/source/ui/dbgui/validate.cxx @@ -401,7 +401,7 @@ void ScTPValidationValue::Reset( const SfxItemSet& rArgSet ) m_pLbValue->SelectEntryPos( nLbPos ); // *** check boxes *** - sal_Bool bCheck = sal_True; + bool bCheck = true; if( rArgSet.GetItemState( FID_VALID_BLANK, true, &pItem ) == SFX_ITEM_SET ) bCheck = static_cast< const SfxBoolItem* >( pItem )->GetValue(); m_pCbAllow->Check( bCheck ); @@ -786,7 +786,7 @@ bool ScTPValidationError::FillItemSet( SfxItemSet& rArgSet ) IMPL_LINK_NOARG(ScTPValidationError, SelectActionHdl) { ScValidErrorStyle eStyle = (ScValidErrorStyle) m_pLbAction->GetSelectEntryPos(); - sal_Bool bMacro = ( eStyle == SC_VALERR_MACRO ); + bool bMacro = ( eStyle == SC_VALERR_MACRO ); m_pBtnSearch->Enable( bMacro ); m_pFtError->Enable( !bMacro ); diff --git a/sc/source/ui/docshell/arealink.cxx b/sc/source/ui/docshell/arealink.cxx index d74983558519..cb7344e411b7 100644 --- a/sc/source/ui/docshell/arealink.cxx +++ b/sc/source/ui/docshell/arealink.cxx @@ -144,7 +144,7 @@ void ScAreaLink::Closed() // Verknuepfung loeschen: Undo ScDocument* pDoc = pImpl->m_pDocSh->GetDocument(); - sal_Bool bUndo (pDoc->IsUndoEnabled()); + bool bUndo (pDoc->IsUndoEnabled()); if (bAddUndo && bUndo) { pImpl->m_pDocSh->GetUndoManager()->AddUndoAction( new ScUndoRemoveAreaLink( pImpl->m_pDocSh, @@ -236,7 +236,7 @@ bool ScAreaLink::Refresh( const OUString& rNewFile, const OUString& rNewFilter, return false; OUString aNewUrl( ScGlobal::GetAbsDocName( rNewFile, pImpl->m_pDocSh ) ); - sal_Bool bNewUrlName = (aNewUrl != aFileName); + bool bNewUrlName = (aNewUrl != aFileName); const SfxFilter* pFilter = pImpl->m_pDocSh->GetFactory().GetFilterContainer()->GetFilter4FilterName(rNewFilter); if (!pFilter) @@ -244,7 +244,7 @@ bool ScAreaLink::Refresh( const OUString& rNewFile, const OUString& rNewFilter, ScDocument* pDoc = pImpl->m_pDocSh->GetDocument(); - sal_Bool bUndo (pDoc->IsUndoEnabled()); + bool bUndo (pDoc->IsUndoEnabled()); pDoc->SetInLinkUpdate( true ); // wenn neuer Filter ausgewaehlt wurde, Optionen vergessen diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx index 364f9bb2aae5..605ba472d91c 100644 --- a/sc/source/ui/docshell/dbdocfun.cxx +++ b/sc/source/ui/docshell/dbdocfun.cxx @@ -60,7 +60,7 @@ bool ScDBDocFunc::AddDBRange( const OUString& rName, const ScRange& rRange, bool ScDocument* pDoc = rDocShell.GetDocument(); ScDBCollection* pDocColl = pDoc->GetDBCollection(); - sal_Bool bUndo (pDoc->IsUndoEnabled()); + bool bUndo (pDoc->IsUndoEnabled()); ScDBCollection* pUndoColl = NULL; if (bUndo) @@ -264,19 +264,19 @@ bool ScDBDocFunc::RepeatDB( const OUString& rDBName, bool bRecord, bool bApi, bo { ScQueryParam aQueryParam; pDBData->GetQueryParam( aQueryParam ); - sal_Bool bQuery = aQueryParam.GetEntry(0).bDoQuery; + bool bQuery = aQueryParam.GetEntry(0).bDoQuery; ScSortParam aSortParam; pDBData->GetSortParam( aSortParam ); - sal_Bool bSort = aSortParam.maKeyState[0].bDoSort; + bool bSort = aSortParam.maKeyState[0].bDoSort; ScSubTotalParam aSubTotalParam; pDBData->GetSubTotalParam( aSubTotalParam ); - sal_Bool bSubTotal = aSubTotalParam.bGroupActive[0] && !aSubTotalParam.bRemoveOnly; + bool bSubTotal = aSubTotalParam.bGroupActive[0] && !aSubTotalParam.bRemoveOnly; if ( bQuery || bSort || bSubTotal ) { - sal_Bool bQuerySize = false; + bool bQuerySize = false; ScRange aOldQuery; ScRange aNewQuery; if (bQuery && !aQueryParam.bInplace) @@ -286,7 +286,7 @@ bool ScDBDocFunc::RepeatDB( const OUString& rDBName, bool bRecord, bool bApi, bo if (pDest && pDest->IsDoSize()) { pDest->GetArea( aOldQuery ); - bQuerySize = sal_True; + bQuerySize = true; } } @@ -443,7 +443,7 @@ bool ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam, ScDBData* pDestData = NULL; ScRange aOldDest; - sal_Bool bCopy = !rSortParam.bInplace; + bool bCopy = !rSortParam.bInplace; if ( bCopy && rSortParam.nDestCol == rSortParam.nCol1 && rSortParam.nDestRow == rSortParam.nRow1 && rSortParam.nDestTab == nTab ) bCopy = false; @@ -490,11 +490,11 @@ bool ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam, WaitObject aWait( rDocShell.GetActiveDialogParent() ); - sal_Bool bRepeatQuery = false; // bestehenden Filter wiederholen? + bool bRepeatQuery = false; // bestehenden Filter wiederholen? ScQueryParam aQueryParam; pDBData->GetQueryParam( aQueryParam ); if ( aQueryParam.GetEntry(0).bDoQuery ) - bRepeatQuery = sal_True; + bRepeatQuery = true; if (bRepeatQuery && bCopy) { @@ -699,11 +699,11 @@ bool ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam, } ScQueryParam aLocalParam( rQueryParam ); // fuer Paint / Zielbereich - sal_Bool bCopy = !rQueryParam.bInplace; // kopiert wird in Table::Query + bool bCopy = !rQueryParam.bInplace; // kopiert wird in Table::Query ScDBData* pDestData = NULL; // Bereich, in den kopiert wird - sal_Bool bDoSize = false; // Zielgroesse anpassen (einf./loeschen) + bool bDoSize = false; // Zielgroesse anpassen (einf./loeschen) SCCOL nFormulaCols = 0; // nur bei bDoSize - sal_Bool bKeepFmt = false; + bool bKeepFmt = false; ScRange aOldDest; ScRange aDestTotal; if ( bCopy && rQueryParam.nDestCol == rQueryParam.nCol1 && @@ -768,14 +768,14 @@ bool ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam, WaitObject aWait( rDocShell.GetActiveDialogParent() ); - sal_Bool bKeepSub = false; // bestehende Teilergebnisse wiederholen? + bool bKeepSub = false; // bestehende Teilergebnisse wiederholen? ScSubTotalParam aSubTotalParam; if (rQueryParam.GetEntry(0).bDoQuery) // nicht beim Aufheben { pDBData->GetSubTotalParam( aSubTotalParam ); // Teilergebnisse vorhanden? if ( aSubTotalParam.bGroupActive[0] && !aSubTotalParam.bRemoveOnly ) - bKeepSub = sal_True; + bKeepSub = true; } ScDocument* pUndoDoc = NULL; @@ -1010,8 +1010,8 @@ bool ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam, // - neuen Bereich (aus DBData) markieren // - SelectionChanged (?) - sal_Bool bDo = !rParam.bRemoveOnly; // sal_False = nur loeschen - sal_Bool bRet = false; + bool bDo = !rParam.bRemoveOnly; // sal_False = nur loeschen + bool bRet = false; ScDocument* pDoc = rDocShell.GetDocument(); if (bRecord && !pDoc->IsUndoEnabled()) @@ -1040,7 +1040,7 @@ bool ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam, return false; } - sal_Bool bOk = true; + bool bOk = true; if (rParam.bReplace) if (pDoc->TestRemoveSubTotals( nTab, rParam )) { @@ -1064,7 +1064,7 @@ bool ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam, if (bRecord) // alte Daten sichern { - sal_Bool bOldFilter = bDo && rParam.bDoSort; + bool bOldFilter = bDo && rParam.bDoSort; SCTAB nTabCount = pDoc->GetTableCount(); pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); @@ -1110,7 +1110,7 @@ bool ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam, if (rParam.bReplace) pDoc->RemoveSubTotals( nTab, aNewParam ); - sal_Bool bSuccess = sal_True; + bool bSuccess = true; if (bDo) { // Sortieren diff --git a/sc/source/ui/docshell/dbdocimp.cxx b/sc/source/ui/docshell/dbdocimp.cxx index 270cad2bdf8e..6f7d16161c78 100644 --- a/sc/source/ui/docshell/dbdocimp.cxx +++ b/sc/source/ui/docshell/dbdocimp.cxx @@ -143,9 +143,9 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, pWaitWin->EnterWait(); ScDocShellModificator aModificator( rDocShell ); - sal_Bool bSuccess = false; - sal_Bool bApi = false; //! pass as argument - sal_Bool bTruncated = false; // for warning + bool bSuccess = false; + bool bApi = false; //! pass as argument + bool bTruncated = false; // for warning sal_uInt16 nErrStringId = 0; OUString aErrorMessage; @@ -155,9 +155,9 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, SCROW nEndRow = nRow; long i; - sal_Bool bDoSelection = false; - sal_Bool bRealSelection = false; // sal_True if not everything is selected - sal_Bool bBookmarkSelection = sal_False; + bool bDoSelection = false; + bool bRealSelection = false; // sal_True if not everything is selected + bool bBookmarkSelection = false; sal_Int32 nListPos = 0; sal_Int32 nRowsRead = 0; sal_Int32 nListCount = 0; @@ -201,10 +201,10 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, uno::Reference<sdbc::XRowSet> xRowSet = uno::Reference<sdbc::XRowSet>( xResultSet, uno::UNO_QUERY ); - sal_Bool bDispose = false; + bool bDispose = false; if ( !xRowSet.is() ) { - bDispose = sal_True; + bDispose = true; xRowSet = uno::Reference<sdbc::XRowSet>( comphelper::getProcessServiceFactory()->createInstance( OUString( SC_SERVICE_ROWSET ) ), @@ -273,7 +273,7 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, if ( !xLocate.is() ) { SAL_WARN( "sc.ui","can't get XRowLocate"); - bDoSelection = bRealSelection = bBookmarkSelection = sal_False; + bDoSelection = bRealSelection = bBookmarkSelection = false; } } @@ -304,7 +304,7 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, ++nRow; } - sal_Bool bEnd = false; + bool bEnd = false; if ( !bDoSelection ) xRowSet->beforeFirst(); sal_uInt16 nInserted = 0; @@ -368,7 +368,7 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, if (!aProgress.SetStateText( 0, aText )) // stopped by user? { - bEnd = sal_True; + bEnd = true; bSuccess = false; nErrStringId = STR_DATABASE_ABORTED; } @@ -376,13 +376,13 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, } else // past the end of the spreadsheet { - bEnd = sal_True; // don't continue - bTruncated = sal_True; // warning flag + bEnd = true; // don't continue + bTruncated = true; // warning flag } } } - bSuccess = sal_True; + bSuccess = true; } if ( bDispose ) @@ -402,8 +402,8 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, // test for cell protection - sal_Bool bKeepFormat = !bAddrInsert && pDBData->IsKeepFmt(); - sal_Bool bMoveCells = !bAddrInsert && pDBData->IsDoSize(); + bool bKeepFormat = !bAddrInsert && pDBData->IsKeepFmt(); + bool bMoveCells = !bAddrInsert && pDBData->IsDoSize(); SCCOL nFormulaCols = 0; // columns to be filled with formulas if (bMoveCells && nEndCol == rParam.nCol2) { @@ -553,7 +553,7 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, pDoc->DeleteAreaTab( rParam.nCol1, rParam.nRow1, nEndCol, nEndRow, nTab, IDF_CONTENTS & ~IDF_NOTE ); // remove each column from ImportDoc after copying to reduce memory usage - sal_Bool bOldAutoCalc = pDoc->GetAutoCalc(); + bool bOldAutoCalc = pDoc->GetAutoCalc(); pDoc->SetAutoCalc( false ); // outside of the loop for (SCCOL nCopyCol = rParam.nCol1; nCopyCol <= nEndCol; nCopyCol++) { diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index e08aa62d0de3..871adbe8bcc3 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -304,7 +304,7 @@ void ScDocShell::AfterXMLLoading(bool bRet) ScGlobal::UnicodeStrChr( pNameBuffer, SC_COMPILER_FILE_TAB_SEP ) ) { OUStringBuffer aDocURLBuffer; - sal_Bool bQuote = sal_True; // Document name is always quoted + bool bQuote = true; // Document name is always quoted ++pNameBuffer; while ( bQuote && *pNameBuffer ) { @@ -446,7 +446,7 @@ bool ScDocShell::LoadXML( SfxMedium* pLoadMedium, const ::com::sun::star::uno::R ScXMLImportWrapper aImport( aDocument, pLoadMedium, xStor ); - sal_Bool bRet(false); + bool bRet(false); ErrCode nError = ERRCODE_NONE; aDocument.EnableAdjustHeight(false); if (GetCreateMode() != SFX_CREATE_MODE_ORGANIZER) @@ -520,7 +520,7 @@ bool ScDocShell::SaveXML( SfxMedium* pSaveMedium, const ::com::sun::star::uno::R aDocument.EnableIdle(false); ScXMLImportWrapper aImport( aDocument, pSaveMedium, xStor ); - sal_Bool bRet(false); + bool bRet(false); if (GetCreateMode() != SFX_CREATE_MODE_ORGANIZER) bRet = aImport.Export(false); else @@ -697,7 +697,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) ScGlobal::GetRscString( STR_SHARED_DOC_WARNING ) ); aBox.SetDefaultCheckBoxText(); aBox.Execute(); - sal_Bool bChecked = aBox.GetCheckBoxState(); + bool bChecked = aBox.GetCheckBoxState(); if ( bChecked ) { aAppOptions.SetShowSharedDocumentWarning( !bChecked ); @@ -1065,8 +1065,8 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) { OUString aFltName = pFilter->GetFilterName(); - sal_Bool bCalc3 = ( aFltName.equalsAscii(pFilterSc30) ); - sal_Bool bCalc4 = ( aFltName.equalsAscii(pFilterSc40) ); + bool bCalc3 = ( aFltName.equalsAscii(pFilterSc30) ); + bool bCalc4 = ( aFltName.equalsAscii(pFilterSc40) ); if (!bCalc3 && !bCalc4) aDocument.SetInsertingFromOtherDoc( true ); @@ -1163,13 +1163,13 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) SfxItemSet* pSet = rMedium.GetItemSet(); const SfxPoolItem* pItem; ScAsciiOptions aOptions; - sal_Bool bOptInit = false; + bool bOptInit = false; if ( pSet && SFX_ITEM_SET == pSet->GetItemState( SID_FILE_FILTEROPTIONS, true, &pItem ) ) { aOptions.ReadFromString( ((const SfxStringItem*)pItem)->GetValue() ); - bOptInit = sal_True; + bOptInit = true; } if ( !bOptInit ) @@ -1392,7 +1392,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) else if (aFltName.equalsAscii(pFilterHtml) || aFltName.equalsAscii(pFilterHtmlWebQ)) { FltError eError = SCERR_IMPORT_UNKNOWN; - sal_Bool bWebQuery = aFltName.equalsAscii(pFilterHtmlWebQ); + bool bWebQuery = aFltName.equalsAscii(pFilterHtmlWebQ); if( !rMedium.IsStorage() ) { SvStream* pInStream = rMedium.GetInStream(); @@ -1725,7 +1725,7 @@ sal_Int32 lcl_ScDocShell_GetColWidthInChars( sal_uInt16 nWidth ) void lcl_ScDocShell_GetFixedWidthString( OUString& rStr, const ScDocument& rDoc, - SCTAB nTab, SCCOL nCol, sal_Bool bValue, SvxCellHorJustify eHorJust ) + SCTAB nTab, SCCOL nCol, bool bValue, SvxCellHorJustify eHorJust ) { OUString aString = rStr; sal_Int32 nLen = lcl_ScDocShell_GetColWidthInChars( diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx index 4d9580dea59e..645333f7da16 100644 --- a/sc/source/ui/docshell/docsh3.cxx +++ b/sc/source/ui/docshell/docsh3.cxx @@ -348,7 +348,7 @@ void ScDocShell::CalcOutputFactor() return; } - sal_Bool bTextWysiwyg = SC_MOD()->GetInputOptions().GetTextWysiwyg(); + bool bTextWysiwyg = SC_MOD()->GetInputOptions().GetTextWysiwyg(); if (bTextWysiwyg) { nPrtToScreenFactor = 1.0; @@ -528,8 +528,8 @@ sal_uInt16 ScDocShell::SetPrinter( SfxPrinter* pNewPrinter, sal_uInt16 nDiffFlag if (nDiffFlags & SFX_PRINTER_CHG_ORIENTATION) { const SvxPageItem& rOldItem = (const SvxPageItem&)rSet.Get(ATTR_PAGE); - sal_Bool bWasLand = rOldItem.IsLandscape(); - sal_Bool bNewLand = ( pNewPrinter->GetOrientation() == ORIENTATION_LANDSCAPE ); + bool bWasLand = rOldItem.IsLandscape(); + bool bNewLand = ( pNewPrinter->GetOrientation() == ORIENTATION_LANDSCAPE ); if (bNewLand != bWasLand) { SvxPageItem aNewItem( rOldItem ); @@ -685,7 +685,7 @@ void ScDocShell::CompareDocument( ScDocument& rOtherDoc ) if (pOtherMed) aOtherFile = pOtherMed->GetName(); } - sal_Bool bSameDoc = ( aThisFile == aOtherFile && !aThisFile.isEmpty() ); + bool bSameDoc = ( aThisFile == aOtherFile && !aThisFile.isEmpty() ); if ( !bSameDoc ) { // create change actions from comparing with the name of the user @@ -717,7 +717,7 @@ void ScDocShell::CompareDocument( ScDocument& rOtherDoc ) // Merge (Aenderungen zusammenfuehren) -static inline sal_Bool lcl_Equal( const ScChangeAction* pA, const ScChangeAction* pB, sal_Bool bIgnore100Sec ) +static inline bool lcl_Equal( const ScChangeAction* pA, const ScChangeAction* pB, bool bIgnore100Sec ) { return pA && pB && pA->GetActionNumber() == pB->GetActionNumber() && @@ -729,7 +729,7 @@ static inline sal_Bool lcl_Equal( const ScChangeAction* pA, const ScChangeAction // State nicht vergleichen, falls eine alte Aenderung akzeptiert wurde } -static bool lcl_FindAction( ScDocument* pDoc, const ScChangeAction* pAction, ScDocument* pSearchDoc, const ScChangeAction* pFirstSearchAction, const ScChangeAction* pLastSearchAction, sal_Bool bIgnore100Sec ) +static bool lcl_FindAction( ScDocument* pDoc, const ScChangeAction* pAction, ScDocument* pSearchDoc, const ScChangeAction* pFirstSearchAction, const ScChangeAction* pLastSearchAction, bool bIgnore100Sec ) { if ( !pDoc || !pAction || !pSearchDoc || !pFirstSearchAction || !pLastSearchAction ) { @@ -789,7 +789,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck } // include Nano seconds in compare? - sal_Bool bIgnore100Sec = !pSourceTrack->IsTimeNanoSeconds() || + bool bIgnore100Sec = !pSourceTrack->IsTimeNanoSeconds() || !pThisTrack->IsTimeNanoSeconds(); // gemeinsame Ausgangsposition suchen @@ -882,7 +882,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck LockPaint(); // #i73877# no repainting after each action // MergeChangeData in das aktuelle Dokument uebernehmen - sal_Bool bHasRejected = false; + bool bHasRejected = false; OUString aOldUser = pThisTrack->GetUser(); pThisTrack->SetUseFixDateTime( true ); ScMarkData& rMarkData = pViewSh->GetViewData()->GetMarkData(); @@ -950,7 +950,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck if ( pOldAction && pOldAction->IsVirgin() ) { pThisTrack->Reject( pOldAction ); - bHasRejected = sal_True; + bHasRejected = true; bExecute = false; } } @@ -965,7 +965,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck //! oder Reject-Aenderung normal ausfuehren pThisTrack->Reject(pOldAction); - bHasRejected = sal_True; // fuer Paint + bHasRejected = true; // fuer Paint } bExecute = false; } @@ -1170,7 +1170,7 @@ bool ScDocShell::MergeSharedDocument( ScDocShell* pSharedDocShell ) aDocument.SetChangeViewSettings( aChangeViewSet ); // find first merge action in this document - sal_Bool bIgnore100Sec = !pThisTrack->IsTimeNanoSeconds() || !pSharedTrack->IsTimeNanoSeconds(); + bool bIgnore100Sec = !pThisTrack->IsTimeNanoSeconds() || !pSharedTrack->IsTimeNanoSeconds(); ScChangeAction* pThisAction = pThisTrack->GetFirst(); ScChangeAction* pSharedAction = pSharedTrack->GetFirst(); while ( lcl_Equal( pThisAction, pSharedAction, bIgnore100Sec ) ) diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index c993c1127d1e..321269465497 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -120,7 +120,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) const SfxItemSet* pReqArgs = rReq.GetArgs(); SfxBindings* pBindings = GetViewBindings(); - sal_Bool bUndo (aDocument.IsUndoEnabled()); + bool bUndo (aDocument.IsUndoEnabled()); sal_uInt16 nSlot = rReq.GetSlot(); switch ( nSlot ) @@ -188,7 +188,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) if ( pReqArgs->GetItemState( FN_PARAM_1, true, &pItem ) == SFX_ITEM_SET ) sTarget = ((const SfxStringItem*)pItem)->GetValue(); - sal_Bool bIsNewArea = sal_True; // Default sal_True (keine Nachfrage) + bool bIsNewArea = true; // Default sal_True (keine Nachfrage) if ( pReqArgs->GetItemState( FN_PARAM_2, true, &pItem ) == SFX_ITEM_SET ) bIsNewArea = ((const SfxBoolItem*)pItem)->GetValue(); @@ -259,13 +259,13 @@ void ScDocShell::Execute( SfxRequest& rReq ) ScRange aSingleRange; ScRangeListRef aRangeListRef; - sal_Bool bMultiRange = false; + bool bMultiRange = false; - sal_Bool bColHeaders = sal_True; - sal_Bool bRowHeaders = sal_True; - sal_Bool bColInit = false; - sal_Bool bRowInit = false; - sal_Bool bAddRange = (nSlot == SID_CHART_ADDSOURCE); + bool bColHeaders = true; + bool bRowHeaders = true; + bool bColInit = false; + bool bRowInit = false; + bool bAddRange = (nSlot == SID_CHART_ADDSOURCE); if( pReqArgs->HasItem( SID_CHART_NAME, &pItem ) ) aChartName = ((const SfxStringItem*)pItem)->GetValue(); @@ -276,16 +276,16 @@ void ScDocShell::Execute( SfxRequest& rReq ) if( pReqArgs->HasItem( FN_PARAM_1, &pItem ) ) { bColHeaders = ((const SfxBoolItem*)pItem)->GetValue(); - bColInit = sal_True; + bColInit = true; } if( pReqArgs->HasItem( FN_PARAM_2, &pItem ) ) { bRowHeaders = ((const SfxBoolItem*)pItem)->GetValue(); - bRowInit = sal_True; + bRowInit = true; } ScAddress::Details aDetails(pDoc->GetAddressConvention(), 0, 0); - sal_Bool bValid = ( aSingleRange.ParseAny( aRangeName, pDoc, aDetails ) & SCA_VALID ) != 0; + bool bValid = ( aSingleRange.ParseAny( aRangeName, pDoc, aDetails ) & SCA_VALID ) != 0; if (!bValid) { aRangeListRef = new ScRangeList; @@ -316,7 +316,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) aDocument.LimitChartArea( nTab, nCol1,nRow1, nCol2,nRow2 ); // Dialog fuer Spalten/Zeilenkoepfe - sal_Bool bOk = sal_True; + bool bOk = true; if ( !bAddRange && ( !bColInit || !bRowInit ) ) { ScChartPositioner aChartPositioner( &aDocument, nTab, nCol1,nRow1, nCol2,nRow2 ); @@ -384,7 +384,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) case FID_AUTO_CALC: { - sal_Bool bNewVal; + bool bNewVal; const SfxPoolItem* pItem; if ( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( nSlot, true, &pItem ) ) bNewVal = ((const SfxBoolItem*)pItem)->GetValue(); @@ -469,7 +469,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) // wird nach dem Laden aufgerufen, wenn DB-Bereiche mit // weggelassenen Daten enthalten sind - sal_Bool bDone = false; + bool bDone = false; ScDBCollection* pDBColl = aDocument.GetDBCollection(); if ((nCanUpdate != com::sun::star::document::UpdateDocMode::NO_UPDATE) && @@ -562,7 +562,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) { // get argument (recorded macro) SFX_REQUEST_ARG( rReq, pItem, SfxBoolItem, FID_CHG_RECORD, false ); - sal_Bool bDo = sal_True; + bool bDo = true; // xmlsec05/06: // getting real parent window when called from Security-Options TP @@ -573,7 +573,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) // desired state ScChangeTrack* pChangeTrack = pDoc->GetChangeTrack(); - sal_Bool bActivateTracking = (pChangeTrack == 0); // toggle + bool bActivateTracking = (pChangeTrack == 0); // toggle if ( pItem ) bActivateTracking = pItem->GetValue(); // from argument @@ -643,7 +643,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) case SID_DOCUMENT_MERGE: case SID_DOCUMENT_COMPARE: { - sal_Bool bDo = sal_True; + bool bDo = true; ScChangeTrack* pChangeTrack = aDocument.GetChangeTrack(); if ( pChangeTrack && !pImpl->bIgnoreLostRedliningWarning ) { @@ -737,7 +737,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) if ( !pOtherDocSh->GetError() ) // nur Errors { - sal_Bool bHadTrack = ( aDocument.GetChangeTrack() != NULL ); + bool bHadTrack = ( aDocument.GetChangeTrack() != NULL ); #if HAVE_FEATURE_MULTIUSER_ENVIRONMENT sal_uLong nStart = 0; if ( nSlot == SID_DOCUMENT_MERGE && pChangeTrack ) @@ -860,7 +860,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) nActualTab--; } while(aDocument.IsScenario(nActualTab)); - sal_Bool bSheetProtected = aDocument.IsTabProtected(nActualTab); + bool bSheetProtected = aDocument.IsTabProtected(nActualTab); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); @@ -1300,7 +1300,7 @@ void ScDocShell::NotifyStyle( const SfxStyleSheetHint& rHint ) OUString aNewName = pStyle->GetName(); OUString aOldName = aNewName; - sal_Bool bExtended = rHint.ISA(SfxStyleSheetHintExtended); // Name geaendert? + bool bExtended = rHint.ISA(SfxStyleSheetHintExtended); // Name geaendert? if (bExtended) aOldName = ((SfxStyleSheetHintExtended&)rHint).GetOldName(); @@ -1338,7 +1338,7 @@ void ScDocShell::NotifyStyle( const SfxStyleSheetHint& rHint ) { OUString aNewName = pStyle->GetName(); OUString aOldName = aNewName; - sal_Bool bExtended = rHint.ISA(SfxStyleSheetHintExtended); + bool bExtended = rHint.ISA(SfxStyleSheetHintExtended); if (bExtended) aOldName = ((SfxStyleSheetHintExtended&)rHint).GetOldName(); if ( aNewName != aOldName ) @@ -1361,7 +1361,7 @@ void ScDocShell::NotifyStyle( const SfxStyleSheetHint& rHint ) void ScDocShell::SetPrintZoom( SCTAB nTab, sal_uInt16 nScale, sal_uInt16 nPages ) { - sal_Bool bUndo(aDocument.IsUndoEnabled()); + bool bUndo(aDocument.IsUndoEnabled()); OUString aStyleName = aDocument.GetPageStyle( nTab ); ScStyleSheetPool* pStylePool = aDocument.GetStyleSheetPool(); SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aStyleName, SFX_STYLE_FAMILY_PAGE ); @@ -1404,7 +1404,7 @@ bool ScDocShell::AdjustPrintZoom( const ScRange& rRange ) if ( pStyleSheet ) { SfxItemSet& rSet = pStyleSheet->GetItemSet(); - sal_Bool bHeaders = ((const SfxBoolItem&)rSet.Get(ATTR_PAGE_HEADERS)).GetValue(); + bool bHeaders = ((const SfxBoolItem&)rSet.Get(ATTR_PAGE_HEADERS)).GetValue(); sal_uInt16 nOldScale = ((const SfxUInt16Item&)rSet.Get(ATTR_PAGE_SCALE)).GetValue(); sal_uInt16 nOldPages = ((const SfxUInt16Item&)rSet.Get(ATTR_PAGE_SCALETOPAGES)).GetValue(); const ScRange* pRepeatCol = aDocument.GetRepeatColRange( nTab ); @@ -1475,7 +1475,7 @@ void ScDocShell::PageStyleModified( const OUString& rStyleName, bool bApi ) { ScDocShellModificator aModificator( *this ); - sal_Bool bWarn = false; + bool bWarn = false; SCTAB nTabCount = aDocument.GetTableCount(); SCTAB nUseTab = MAXTAB+1; @@ -1489,7 +1489,7 @@ void ScDocShell::PageStyleModified( const OUString& rStyleName, bool bApi ) { ScPrintFunc aPrintFunc( this, GetPrinter(), nUseTab ); //! ohne CountPages auskommen if (!aPrintFunc.UpdatePages()) // setzt Umbrueche auf allen Tabs - bWarn = sal_True; + bWarn = true; if (bWarn && !bApi) { @@ -1527,7 +1527,7 @@ void ScDocShell::ExecutePageStyle( SfxViewShell& rCaller, } else if ( pReqArgs == NULL ) { - sal_Bool bUndo(aDocument.IsUndoEnabled()); + bool bUndo(aDocument.IsUndoEnabled()); OUString aOldName = aDocument.GetPageStyle( nCurTab ); ScStyleSheetPool* pStylePool = aDocument.GetStyleSheetPool(); SfxStyleSheetBase* pStyleSheet @@ -1619,8 +1619,8 @@ void ScDocShell::ExecutePageStyle( SfxViewShell& rCaller, SvxPageUsage( ((const SvxPageItem&) rStyleSet.Get( ATTR_PAGE )). GetPageUsage() ); - sal_Bool bShareHeader = IS_SHARE_HEADER(rStyleSet); - sal_Bool bShareFooter = IS_SHARE_FOOTER(rStyleSet); + bool bShareHeader = IS_SHARE_HEADER(rStyleSet); + bool bShareFooter = IS_SHARE_FOOTER(rStyleSet); sal_uInt16 nResId = 0; switch ( eUsage ) @@ -1909,7 +1909,7 @@ Rectangle ScDocShell::GetVisArea( sal_uInt16 nAspect ) const if( nAspect == ASPECT_THUMBNAIL ) { Rectangle aArea( 0,0, SC_PREVIEW_SIZE_X,SC_PREVIEW_SIZE_Y ); - sal_Bool bNegativePage = aDocument.IsNegativePage( aDocument.GetVisibleTab() ); + bool bNegativePage = aDocument.IsNegativePage( aDocument.GetVisibleTab() ); if ( bNegativePage ) ScDrawLayer::MirrorRectRTL( aArea ); SnapVisArea( aArea ); diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx index a743c3def4ad..c52e287efd37 100644 --- a/sc/source/ui/docshell/docsh5.cxx +++ b/sc/source/ui/docshell/docsh5.cxx @@ -76,7 +76,7 @@ void ScDocShell::ErrorMessage( sal_uInt16 nGlobStrId ) Window* pParent = GetActiveDialogParent(); ScWaitCursorOff aWaitOff( pParent ); - sal_Bool bFocus = pParent && pParent->HasFocus(); + bool bFocus = pParent && pParent->HasFocus(); if(nGlobStrId==STR_PROTECTIONERR) { @@ -130,11 +130,11 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe if (!pData && pColl) pData = pColl->GetDBNearCursor(nCol, nRow, nTab ); - sal_Bool bSelected = ( eSel == SC_DBSEL_FORCE_MARK || + bool bSelected = ( eSel == SC_DBSEL_FORCE_MARK || (rMarked.aStart != rMarked.aEnd && eSel != SC_DBSEL_ROW_DOWN) ); bool bOnlyDown = (!bSelected && eSel == SC_DBSEL_ROW_DOWN && rMarked.aStart.Row() == rMarked.aEnd.Row()); - sal_Bool bUseThis = false; + bool bUseThis = false; if (pData) { // Bereich nehmen, wenn nichts anderes markiert @@ -145,11 +145,11 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe SCCOL nOldCol2; SCROW nOldRow2; pData->GetArea( nDummy, nOldCol1,nOldRow1, nOldCol2,nOldRow2 ); - sal_Bool bIsNoName = ( pData->GetName() == STR_DB_LOCAL_NONAME ); + bool bIsNoName = ( pData->GetName() == STR_DB_LOCAL_NONAME ); if (!bSelected) { - bUseThis = sal_True; + bUseThis = true; if ( bIsNoName && eMode == SC_DB_MAKE ) { // If nothing marked or only one row marked, adapt @@ -180,7 +180,7 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe { if ( nOldCol1 == nStartCol && nOldRow1 == nStartRow && nOldCol2 == nEndCol && nOldRow2 == nEndRow ) // genau markiert? - bUseThis = sal_True; + bUseThis = true; else bUseThis = false; // immer Markierung nehmen (Bug 11964) } @@ -222,7 +222,7 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe aDocument.GetDataArea( nTab, nStartCol, nStartRow, nEndCol, nEndRow, false, bOnlyDown ); } - sal_Bool bHasHeader = aDocument.HasColHeader( nStartCol,nStartRow, nEndCol,nEndRow, nTab ); + bool bHasHeader = aDocument.HasColHeader( nStartCol,nStartRow, nEndCol,nEndRow, nTab ); ScDBData* pNoNameData = aDocument.GetAnonymousDBData(nTab); if ( eMode != SC_DB_IMPORT && pNoNameData) @@ -396,7 +396,7 @@ void ScDocShell::UpdateAllRowHeights( const ScMarkData* pTabMark ) void ScDocShell::UpdatePendingRowHeights( SCTAB nUpdateTab, bool bBefore ) { - sal_Bool bIsUndoEnabled = aDocument.IsUndoEnabled(); + bool bIsUndoEnabled = aDocument.IsUndoEnabled(); aDocument.EnableUndo( false ); aDocument.LockStreamValid( true ); // ignore draw page size (but not formula results) if ( bBefore ) // check all sheets up to nUpdateTab @@ -456,13 +456,13 @@ void ScDocShell::RefreshPivotTables( const ScRange& rSource ) static OUString lcl_GetAreaName( ScDocument* pDoc, ScArea* pArea ) { OUString aName; - sal_Bool bOk = false; + bool bOk = false; ScDBData* pData = pDoc->GetDBAtArea( pArea->nTab, pArea->nColStart, pArea->nRowStart, pArea->nColEnd, pArea->nRowEnd ); if (pData) { aName = pData->GetName(); - bOk = sal_True; + bOk = true; } if (!bOk) @@ -478,7 +478,7 @@ void ScDocShell::DoConsolidate( const ScConsolidateParam& rParam, bool bRecord ) sal_uInt16 nPos; SCCOL nColSize = 0; SCROW nRowSize = 0; - sal_Bool bErr = false; + bool bErr = false; for (nPos=0; nPos<rParam.nDataAreaCount; nPos++) { ScArea* pArea = rParam.ppDataAreas[nPos]; @@ -488,7 +488,7 @@ void ScDocShell::DoConsolidate( const ScConsolidateParam& rParam, bool bRecord ) // Test, ob Quelldaten verschoben wuerden if (rParam.bReferenceData) if (pArea->nTab == rParam.nTab && pArea->nRowEnd >= rParam.nRow) - bErr = sal_True; + bErr = true; } if (bErr) @@ -676,7 +676,7 @@ void ScDocShell::UseScenario( SCTAB nTab, const OUString& rName, bool bRecord ) sal_uInt16 nScenFlags; aDocument.GetScenarioData( i, aComment, aColor, nScenFlags ); pUndoDoc->SetScenarioData( i, aComment, aColor, nScenFlags ); - sal_Bool bActive = aDocument.IsActiveScenario( i ); + bool bActive = aDocument.IsActiveScenario( i ); pUndoDoc->SetActiveScenario( i, bActive ); // Bei Zurueckkopier-Szenarios auch Inhalte if ( nScenFlags & SC_SCENARIO_TWOWAY ) @@ -762,7 +762,7 @@ SCTAB ScDocShell::MakeScenario( SCTAB nTab, const OUString& rName, const OUStrin while (aDocument.IsScenario(nNewTab)) ++nNewTab; - sal_Bool bCopyAll = ( (nFlags & SC_SCENARIO_COPYALL) != 0 ); + bool bCopyAll = ( (nFlags & SC_SCENARIO_COPYALL) != 0 ); const ScMarkData* pCopyMark = NULL; if (!bCopyAll) pCopyMark = &rMark; @@ -846,10 +846,10 @@ sal_uLong ScDocShell::TransferTab( ScDocShell& rSrcDocShell, SCTAB nSrcPos, pSrcDoc->GetScenarioData( nSrcPos, aComment,aColor, nFlags); aDocument.SetScenario(nDestPos,true); aDocument.SetScenarioData(nDestPos,aComment,aColor,nFlags); - sal_Bool bActive = pSrcDoc->IsActiveScenario(nSrcPos); + bool bActive = pSrcDoc->IsActiveScenario(nSrcPos); aDocument.SetActiveScenario(nDestPos, bActive ); - sal_Bool bVisible=pSrcDoc->IsVisible(nSrcPos); + bool bVisible=pSrcDoc->IsVisible(nSrcPos); aDocument.SetVisible(nDestPos,bVisible ); } @@ -905,7 +905,7 @@ bool ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, bool bCopy, bool bRec new ScUndoCopyTab(this, pSrcList.release(), pDestList.release())); } - sal_Bool bVbaEnabled = aDocument.IsInVBAMode(); + bool bVbaEnabled = aDocument.IsInVBAMode(); if ( bVbaEnabled ) { OUString aLibName( "Standard" ); diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx index 6853ff2ea99e..87404c7457c7 100644 --- a/sc/source/ui/docshell/docsh6.cxx +++ b/sc/source/ui/docshell/docsh6.cxx @@ -87,7 +87,7 @@ static void lcl_SetTopRight( Rectangle& rRect, const Point& rPos ) void ScDocShell::SetVisAreaOrSize( const Rectangle& rVisArea, bool bModifyStart ) { - sal_Bool bNegativePage = aDocument.IsNegativePage( aDocument.GetVisibleTab() ); + bool bNegativePage = aDocument.IsNegativePage( aDocument.GetVisibleTab() ); Rectangle aArea = rVisArea; if (bModifyStart) @@ -188,7 +188,7 @@ void ScDocShell::UpdateOle( const ScViewData* pViewData, bool bSnapSize ) Rectangle aOldArea = SfxObjectShell::GetVisArea(); Rectangle aNewArea = aOldArea; - sal_Bool bEmbedded = aDocument.IsEmbedded(); + bool bEmbedded = aDocument.IsEmbedded(); if (bEmbedded) aNewArea = aDocument.GetEmbeddedRect(); else @@ -197,7 +197,7 @@ void ScDocShell::UpdateOle( const ScViewData* pViewData, bool bSnapSize ) if ( nTab != aDocument.GetVisibleTab() ) aDocument.SetVisibleTab( nTab ); - sal_Bool bNegativePage = aDocument.IsNegativePage( nTab ); + bool bNegativePage = aDocument.IsNegativePage( nTab ); SCCOL nX = pViewData->GetPosX(SC_SPLIT_LEFT); SCROW nY = pViewData->GetPosY(SC_SPLIT_BOTTOM); Rectangle aMMRect = aDocument.GetMMRect( nX,nY, nX,nY, nTab ); diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx index 0aefb22e2ee8..995121d74e58 100644 --- a/sc/source/ui/docshell/docsh8.cxx +++ b/sc/source/ui/docshell/docsh8.cxx @@ -414,7 +414,7 @@ sal_uLong ScDocShell::DBaseImport( const OUString& rFullFileName, rtl_TextEncodi lcl_setScalesToColumns(aDocument, aScales); SCROW nRow = 1; // 0 is column titles - sal_Bool bEnd = false; + bool bEnd = false; while ( !bEnd && xRowSet->next() ) { if ( nRow <= MAXROW ) @@ -448,7 +448,7 @@ sal_uLong ScDocShell::DBaseImport( const OUString& rFullFileName, rtl_TextEncodi } else // past the end of the spreadsheet { - bEnd = sal_True; // don't continue + bEnd = true; // don't continue nErr = SCWARN_IMPORT_RANGE_OVERFLOW; // warning message } } @@ -806,7 +806,7 @@ sal_uLong ScDocShell::DBaseExport( const OUString& rFullFileName, rtl_TextEncodi nLastRow - nFirstRow ); SvNumberFormatter* pNumFmt = aDocument.GetFormatTable(); - sal_Bool bHasFieldNames = sal_True; + bool bHasFieldNames = true; for ( SCCOL nDocCol = nFirstCol; nDocCol <= nLastCol && bHasFieldNames; nDocCol++ ) { // nur Strings in erster Zeile => sind Feldnamen if ( !aDocument.HasStringData( nDocCol, nFirstRow, nTab ) ) @@ -993,7 +993,7 @@ sal_uLong ScDocShell::DBaseExport( const OUString& rFullFileName, rtl_TextEncodi { aDocument.GetValue( nDocCol, nDocRow, nTab, fVal ); // zwischen 0 Wert und 0 kein Wert unterscheiden - sal_Bool bIsNull = (fVal == 0.0); + bool bIsNull = (fVal == 0.0); if ( bIsNull ) bIsNull = !aDocument.HasValueData( nDocCol, nDocRow, nTab ); if ( bIsNull ) diff --git a/sc/source/ui/docshell/olinefun.cxx b/sc/source/ui/docshell/olinefun.cxx index 240b1ad7b71c..57656d4f7bdc 100644 --- a/sc/source/ui/docshell/olinefun.cxx +++ b/sc/source/ui/docshell/olinefun.cxx @@ -44,7 +44,7 @@ static void lcl_InvalidateOutliner( SfxBindings* pBindings ) //! PaintWidthHeight zur DocShell verschieben? static void lcl_PaintWidthHeight( ScDocShell& rDocShell, SCTAB nTab, - sal_Bool bColumns, SCCOLROW nStart, SCCOLROW nEnd ) + bool bColumns, SCCOLROW nStart, SCCOLROW nEnd ) { ScDocument* pDoc = rDocShell.GetDocument(); @@ -208,7 +208,7 @@ bool ScOutlineDocFunc::RemoveOutline( const ScRange& rRange, bool bColumns, bool bool ScOutlineDocFunc::RemoveAllOutlines( SCTAB nTab, bool bRecord ) { - sal_Bool bSuccess = false; + bool bSuccess = false; ScDocument* pDoc = rDocShell.GetDocument(); if (bRecord && !pDoc->IsUndoEnabled()) @@ -253,7 +253,7 @@ bool ScOutlineDocFunc::RemoveAllOutlines( SCTAB nTab, bool bRecord ) PAINT_GRID | PAINT_LEFT | PAINT_TOP | PAINT_SIZE ); rDocShell.SetDocumentModified(); lcl_InvalidateOutliner( rDocShell.GetViewBindings() ); - bSuccess = sal_True; + bSuccess = true; } return bSuccess; @@ -369,7 +369,7 @@ bool ScOutlineDocFunc::SelectLevel( SCTAB nTab, bool bColumns, sal_uInt16 nLevel while ((pEntry=aIter.GetNext()) != NULL) { sal_uInt16 nThisLevel = aIter.LastLevel(); - sal_Bool bShow = (nThisLevel < nLevel); + bool bShow = (nThisLevel < nLevel); if (bShow) // einblenden { pEntry->SetHidden( false ); diff --git a/sc/source/ui/docshell/sizedev.cxx b/sc/source/ui/docshell/sizedev.cxx index 1a9da440b651..e0ff33c205c1 100644 --- a/sc/source/ui/docshell/sizedev.cxx +++ b/sc/source/ui/docshell/sizedev.cxx @@ -27,7 +27,7 @@ ScSizeDeviceProvider::ScSizeDeviceProvider( ScDocShell* pDocSh ) { - sal_Bool bTextWysiwyg = SC_MOD()->GetInputOptions().GetTextWysiwyg(); + bool bTextWysiwyg = SC_MOD()->GetInputOptions().GetTextWysiwyg(); if ( bTextWysiwyg ) { pDevice = pDocSh->GetPrinter(); diff --git a/sc/source/ui/docshell/tablink.cxx b/sc/source/ui/docshell/tablink.cxx index cf28198beffb..e3c36033a1bc 100644 --- a/sc/source/ui/docshell/tablink.cxx +++ b/sc/source/ui/docshell/tablink.cxx @@ -143,7 +143,7 @@ void ScTableLink::Closed() { // Verknuepfung loeschen: Undo ScDocument* pDoc = pImpl->m_pDocSh->GetDocument(); - sal_Bool bUndo (pDoc->IsUndoEnabled()); + bool bUndo (pDoc->IsUndoEnabled()); if (bAddUndo && bUndo) { @@ -181,7 +181,7 @@ bool ScTableLink::Refresh(const OUString& rNewFile, const OUString& rNewFilter, ScDocument* pDoc = pImpl->m_pDocSh->GetDocument(); pDoc->SetInLinkUpdate( true ); - sal_Bool bUndo(pDoc->IsUndoEnabled()); + bool bUndo(pDoc->IsUndoEnabled()); // wenn neuer Filter ausgewaehlt wurde, Optionen vergessen if (!aFilterName.equals(rNewFilter)) @@ -212,7 +212,7 @@ bool ScTableLink::Refresh(const OUString& rNewFile, const OUString& rNewFilter, // Undo... ScDocument* pUndoDoc = NULL; - sal_Bool bFirst = true; + bool bFirst = true; if (bAddUndo && bUndo) pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); @@ -220,12 +220,12 @@ bool ScTableLink::Refresh(const OUString& rNewFile, const OUString& rNewFilter, ScDocShellModificator aModificator( *pImpl->m_pDocSh ); - sal_Bool bNotFound = false; + bool bNotFound = false; ScDocument* pSrcDoc = pSrcShell->GetDocument(); // from text filters that don't set the table name, // use the one table regardless of link table name - sal_Bool bAutoTab = (pSrcDoc->GetTableCount() == 1) && + bool bAutoTab = (pSrcDoc->GetTableCount() == 1) && ScDocShell::HasAutomaticTableName( rNewFilter ); SCTAB nCount = pDoc->GetTableCount(); @@ -482,7 +482,7 @@ bool ScDocumentLoader::GetFilterName( const OUString& rFileName, aMatcher.GuessFilterIgnoringContent( *pMedium, &pSfxFilter ); } - sal_Bool bOK = false; + bool bOK = false; if ( pMedium->GetError() == ERRCODE_NONE ) { if ( pSfxFilter ) diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx index 8a082c06aaef..6e4f62ee8326 100644 --- a/sc/source/ui/drawfunc/drawsh.cxx +++ b/sc/source/ui/drawfunc/drawsh.cxx @@ -378,7 +378,7 @@ void ScDrawShell::ExecuteMacroAssign( SdrObject* pObj, Window* pWin ) void ScDrawShell::ExecuteLineDlg( SfxRequest& rReq, sal_uInt16 nTabPage ) { ScDrawView* pView = pViewData->GetScDrawView(); - sal_Bool bHasMarked = pView->AreObjectsMarked(); + bool bHasMarked = pView->AreObjectsMarked(); const SdrObject* pObj = NULL; const SdrMarkList& rMarkList = pView->GetMarkedObjectList(); @@ -417,7 +417,7 @@ void ScDrawShell::ExecuteLineDlg( SfxRequest& rReq, sal_uInt16 nTabPage ) void ScDrawShell::ExecuteAreaDlg( SfxRequest& rReq, sal_uInt16 nTabPage ) { ScDrawView* pView = pViewData->GetScDrawView(); - sal_Bool bHasMarked = pView->AreObjectsMarked(); + bool bHasMarked = pView->AreObjectsMarked(); SfxItemSet aNewAttr( pView->GetDefaultAttr() ); if( bHasMarked ) @@ -449,7 +449,7 @@ void ScDrawShell::ExecuteAreaDlg( SfxRequest& rReq, sal_uInt16 nTabPage ) void ScDrawShell::ExecuteTextAttrDlg( SfxRequest& rReq, sal_uInt16 /* nTabPage */ ) { ScDrawView* pView = pViewData->GetScDrawView(); - sal_Bool bHasMarked = pView->AreObjectsMarked(); + bool bHasMarked = pView->AreObjectsMarked(); SfxItemSet aNewAttr ( pView->GetDefaultAttr() ); if( bHasMarked ) diff --git a/sc/source/ui/drawfunc/drawsh2.cxx b/sc/source/ui/drawfunc/drawsh2.cxx index 29872c588e37..f436fe2cc717 100644 --- a/sc/source/ui/drawfunc/drawsh2.cxx +++ b/sc/source/ui/drawfunc/drawsh2.cxx @@ -196,7 +196,7 @@ void ScDrawShell::GetDrawFuncState( SfxItemSet& rSet ) // Funktionen disabl } } - sal_Bool bCanRename = false; + bool bCanRename = false; if ( nMarkCount > 1 ) { // no hypelink options for a selected group @@ -215,7 +215,7 @@ void ScDrawShell::GetDrawFuncState( SfxItemSet& rSet ) // Funktionen disabl } SdrLayerID nLayerID = pObj->GetLayer(); if ( nLayerID != SC_LAYER_INTERN ) - bCanRename = sal_True; // #i51351# anything except internal objects can be renamed + bCanRename = true; // #i51351# anything except internal objects can be renamed // #91929#; don't show original size entry if not possible sal_uInt16 nObjType = pObj->GetObjIdentifier(); @@ -271,7 +271,7 @@ void ScDrawShell::GetDrawFuncState( SfxItemSet& rSet ) // Funktionen disabl pView->GetAttributes( aAttrs ); if( aAttrs.GetItemState( EE_PARA_HYPHENATE ) >= SFX_ITEM_AVAILABLE ) { - sal_Bool bValue = ( (const SfxBoolItem&) aAttrs.Get( EE_PARA_HYPHENATE ) ).GetValue(); + bool bValue = ( (const SfxBoolItem&) aAttrs.Get( EE_PARA_HYPHENATE ) ).GetValue(); rSet.Put( SfxBoolItem( SID_ENABLE_HYPHENATION, bValue ) ); } } @@ -290,7 +290,7 @@ void ScDrawShell::GetDrawAttrState( SfxItemSet& rSet ) Window* pWindow = pViewData->GetActiveWin(); ScDrawView* pDrView = pViewData->GetScDrawView(); Point aPos = pWindow->PixelToLogic(aMousePos); - sal_Bool bHasMarked = pDrView->AreObjectsMarked(); + bool bHasMarked = pDrView->AreObjectsMarked(); if( bHasMarked ) { @@ -312,7 +312,7 @@ void ScDrawShell::GetDrawAttrState( SfxItemSet& rSet ) // #i34458# The SvxSizeItem in SID_TABLE_CELL is no longer needed by // SvxPosSizeStatusBarControl, it's enough to have it in SID_ATTR_SIZE. - sal_Bool bActionItem = false; + bool bActionItem = false; if ( pDrView->IsAction() ) // action rectangle { Rectangle aRect; @@ -323,7 +323,7 @@ void ScDrawShell::GetDrawAttrState( SfxItemSet& rSet ) rSet.Put( SfxPointItem( SID_ATTR_POSITION, aRect.TopLeft() ) ); Size aSize( aRect.Right() - aRect.Left(), aRect.Bottom() - aRect.Top() ); rSet.Put( SvxSizeItem( SID_ATTR_SIZE, aSize ) ); - bActionItem = sal_True; + bActionItem = true; } } if ( !bActionItem ) @@ -364,9 +364,9 @@ void ScDrawShell::GetAttrFuncState(SfxItemSet &rSet) rSet.DisableItem( SID_ATTRIBUTES_AREA ); } -sal_Bool ScDrawShell::AreAllObjectsOnLayer(sal_uInt16 nLayerNo,const SdrMarkList& rMark) +bool ScDrawShell::AreAllObjectsOnLayer(sal_uInt16 nLayerNo,const SdrMarkList& rMark) { - sal_Bool bResult=sal_True; + bool bResult=true; sal_uLong nCount = rMark.GetMarkCount(); for (sal_uLong i=0; i<nCount; i++) { diff --git a/sc/source/ui/drawfunc/drawsh5.cxx b/sc/source/ui/drawfunc/drawsh5.cxx index d6e0366a2305..f1786bd44b4e 100644 --- a/sc/source/ui/drawfunc/drawsh5.cxx +++ b/sc/source/ui/drawfunc/drawsh5.cxx @@ -157,7 +157,7 @@ void ScDrawShell::ExecuteHLink( SfxRequest& rReq ) const OUString& rTarget = pHyper->GetTargetFrame(); SvxLinkInsertMode eMode = pHyper->GetInsertMode(); - sal_Bool bDone = false; + bool bDone = false; if ( eMode == HLINK_FIELD || eMode == HLINK_BUTTON ) { ScDrawView* pView = pViewData->GetScDrawView(); @@ -214,13 +214,13 @@ void ScDrawShell::ExecuteHLink( SfxRequest& rReq ) //! Undo ??? pViewData->GetDocShell()->SetDocumentModified(); - bDone = sal_True; + bDone = true; } } else { SetHlinkForObject( pObj, rURL ); - bDone = sal_True; + bDone = true; } } } @@ -428,7 +428,7 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq ) break; case SID_BEZIER_EDIT: { - sal_Bool bOld = pView->IsFrameDragSingles(); + bool bOld = pView->IsFrameDragSingles(); pView->SetFrameDragSingles( !bOld ); rBindings.Invalidate( SID_BEZIER_EDIT ); if (bOld && pView->GetDragMode() != SDRDRAG_MOVE) @@ -468,7 +468,7 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq ) if( pItem ) { SfxItemSet aSet( GetPool(), EE_PARA_HYPHENATE, EE_PARA_HYPHENATE ); - sal_Bool bValue = ( (const SfxBoolItem*) pItem)->GetValue(); + bool bValue = ( (const SfxBoolItem*) pItem)->GetValue(); aSet.Put( SfxBoolItem( EE_PARA_HYPHENATE, bValue ) ); pView->SetAttributes( aSet ); } @@ -671,7 +671,7 @@ void ScDrawShell::ExecFormatPaintbrush( SfxRequest& rReq ) } else { - sal_Bool bLock = false; + bool bLock = false; const SfxItemSet *pArgs = rReq.GetArgs(); if( pArgs && pArgs->Count() >= 1 ) bLock = static_cast<const SfxBoolItem&>(pArgs->Get(SID_FORMATPAINTBRUSH)).GetValue(); @@ -679,7 +679,7 @@ void ScDrawShell::ExecFormatPaintbrush( SfxRequest& rReq ) ScDrawView* pDrawView = pViewData->GetScDrawView(); if ( pDrawView && pDrawView->AreObjectsMarked() ) { - sal_Bool bOnlyHardAttr = sal_True; + bool bOnlyHardAttr = true; SfxItemSet* pItemSet = new SfxItemSet( pDrawView->GetAttrFromMarked(bOnlyHardAttr) ); pView->SetDrawBrushSet( pItemSet, bLock ); } @@ -689,8 +689,8 @@ void ScDrawShell::ExecFormatPaintbrush( SfxRequest& rReq ) void ScDrawShell::StateFormatPaintbrush( SfxItemSet& rSet ) { ScDrawView* pDrawView = pViewData->GetScDrawView(); - sal_Bool bSelection = pDrawView && pDrawView->AreObjectsMarked(); - sal_Bool bHasPaintBrush = pViewData->GetView()->HasPaintBrush(); + bool bSelection = pDrawView && pDrawView->AreObjectsMarked(); + bool bHasPaintBrush = pViewData->GetView()->HasPaintBrush(); if ( !bHasPaintBrush && !bSelection ) rSet.DisableItem( SID_FORMATPAINTBRUSH ); diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx index 9101591b3ef5..38ce5bef4883 100644 --- a/sc/source/ui/drawfunc/drtxtob.cxx +++ b/sc/source/ui/drawfunc/drtxtob.cxx @@ -262,7 +262,7 @@ void ScDrawTextObjectBar::Execute( SfxRequest &rReq ) const OUString& rTarget = pHyper->GetTargetFrame(); SvxLinkInsertMode eMode = pHyper->GetInsertMode(); - sal_Bool bDone = false; + bool bDone = false; if ( pOutView && ( eMode == HLINK_DEFAULT || eMode == HLINK_FIELD ) ) { const SvxFieldItem* pFieldItem = pOutView->GetFieldAtSelection(); @@ -299,7 +299,7 @@ void ScDrawTextObjectBar::Execute( SfxRequest &rReq ) pOutView->SetSelection( aSel ); } - bDone = sal_True; + bDone = true; } if (!bDone) @@ -360,13 +360,13 @@ void ScDrawTextObjectBar::Execute( SfxRequest &rReq ) void ScDrawTextObjectBar::GetState( SfxItemSet& rSet ) { SfxViewFrame* pViewFrm = pViewData->GetViewShell()->GetViewFrame(); - sal_Bool bHasFontWork = pViewFrm->HasChildWindow(SID_FONTWORK); - sal_Bool bDisableFontWork = false; + bool bHasFontWork = pViewFrm->HasChildWindow(SID_FONTWORK); + bool bDisableFontWork = false; if (IsNoteEdit()) { // #i21255# notes now support rich text formatting (#i74140# but not fontwork) - bDisableFontWork = sal_True; + bDisableFontWork = true; } if ( bDisableFontWork ) @@ -381,7 +381,7 @@ void ScDrawTextObjectBar::GetState( SfxItemSet& rSet ) OutlinerView* pOutView = pView->GetTextEditOutlinerView(); if ( pOutView ) { - sal_Bool bField = false; + bool bField = false; const SvxFieldItem* pFieldItem = pOutView->GetFieldAtSelection(); if (pFieldItem) { @@ -392,7 +392,7 @@ void ScDrawTextObjectBar::GetState( SfxItemSet& rSet ) aHLinkItem.SetName( pURLField->GetRepresentation() ); aHLinkItem.SetURL( pURLField->GetURL() ); aHLinkItem.SetTargetFrame( pURLField->GetTargetFrame() ); - bField = sal_True; + bField = true; } } if (!bField) @@ -441,7 +441,7 @@ void ScDrawTextObjectBar::GetState( SfxItemSet& rSet ) pView->GetAttributes( aAttrs ); if( aAttrs.GetItemState( EE_PARA_HYPHENATE ) >= SFX_ITEM_AVAILABLE ) { - sal_Bool bValue = ( (const SfxBoolItem&) aAttrs.Get( EE_PARA_HYPHENATE ) ).GetValue(); + bool bValue = ( (const SfxBoolItem&) aAttrs.Get( EE_PARA_HYPHENATE ) ).GetValue(); rSet.Put( SfxBoolItem( SID_ENABLE_HYPHENATION, bValue ) ); } } @@ -463,7 +463,7 @@ void ScDrawTextObjectBar::GetState( SfxItemSet& rSet ) rSet.Put( SfxStringItem( SID_THES, aStatusVal ) ); // disable thesaurus main menu and context menu entry if there is nothing to look up - sal_Bool bCanDoThesaurus = ScModule::HasThesaurusLanguage( nLang ); + bool bCanDoThesaurus = ScModule::HasThesaurusLanguage( nLang ); if (!bIsLookUpWord || !bCanDoThesaurus) rSet.DisableItem( SID_THES ); if (!bCanDoThesaurus) @@ -595,8 +595,8 @@ static void lcl_RemoveFields( OutlinerView& rOutView ) aSel.Adjust(); sal_Int32 nNewEnd = aSel.nEndPos; - sal_Bool bUpdate = pOutliner->GetUpdateMode(); - sal_Bool bChanged = false; + bool bUpdate = pOutliner->GetUpdateMode(); + bool bChanged = false; //! GetPortions and GetAttribs should be const! EditEngine& rEditEng = (EditEngine&)pOutliner->GetEditEngine(); @@ -628,7 +628,7 @@ static void lcl_RemoveFields( OutlinerView& rOutView ) pOutliner->SetUpdateMode( false ); OUString aName = ScGlobal::GetRscString( STR_UNDO_DELETECONTENTS ); pOutliner->GetUndoManager().EnterListAction( aName, aName ); - bChanged = sal_True; + bChanged = true; } OUString aFieldText = rEditEng.GetText( aFieldSel ); @@ -924,8 +924,8 @@ void ScDrawTextObjectBar::GetAttrState( SfxItemSet& rDestSet ) } SvtLanguageOptions aLangOpt; - sal_Bool bDisableCTLFont = !aLangOpt.IsCTLFontEnabled(); - sal_Bool bDisableVerticalText = !aLangOpt.IsVerticalTextEnabled(); + bool bDisableCTLFont = !aLangOpt.IsCTLFontEnabled(); + bool bDisableVerticalText = !aLangOpt.IsVerticalTextEnabled(); SdrView* pView = pViewData->GetScDrawView(); SfxItemSet aAttrSet(pView->GetModel()->GetItemPool()); @@ -1079,7 +1079,7 @@ void ScDrawTextObjectBar::GetAttrState( SfxItemSet& rDestSet ) // horizontal / vertical - sal_Bool bLeftToRight = sal_True; + bool bLeftToRight = true; SdrOutliner* pOutl = pView->GetTextEditOutliner(); if( pOutl ) @@ -1171,7 +1171,7 @@ void ScDrawTextObjectBar::GetStatePropPanelAttr(SfxItemSet &rSet) case SID_TABLE_VERT_NONE: case SID_TABLE_VERT_CENTER: case SID_TABLE_VERT_BOTTOM: - sal_Bool bContour = sal_False; + bool bContour = false; SfxItemState eConState = aEditAttr.GetItemState( SDRATTR_TEXT_CONTOURFRAME ); if( eConState != SFX_ITEM_DONTCARE ) { @@ -1186,7 +1186,7 @@ void ScDrawTextObjectBar::GetStatePropPanelAttr(SfxItemSet &rSet) if(SFX_ITEM_DONTCARE != eVState) { SdrTextVertAdjust eTVA = (SdrTextVertAdjust)((const SdrTextVertAdjustItem&)aEditAttr.Get(SDRATTR_TEXT_VERTADJUST)).GetValue(); - sal_Bool bSet = (nSlotId == SID_TABLE_VERT_NONE && eTVA == SDRTEXTVERTADJUST_TOP) || + bool bSet = (nSlotId == SID_TABLE_VERT_NONE && eTVA == SDRTEXTVERTADJUST_TOP) || (nSlotId == SID_TABLE_VERT_CENTER && eTVA == SDRTEXTVERTADJUST_CENTER) || (nSlotId == SID_TABLE_VERT_BOTTOM && eTVA == SDRTEXTVERTADJUST_BOTTOM); rSet.Put(SfxBoolItem(nSlotId, bSet)); diff --git a/sc/source/ui/drawfunc/drtxtob2.cxx b/sc/source/ui/drawfunc/drtxtob2.cxx index 9e5dbb736a0d..dc9d1ba1179e 100644 --- a/sc/source/ui/drawfunc/drtxtob2.cxx +++ b/sc/source/ui/drawfunc/drtxtob2.cxx @@ -109,7 +109,7 @@ void ScDrawTextObjectBar::ExecuteGlobal( SfxRequest &rReq ) if( pItem ) { SfxItemSet aSet( GetPool(), EE_PARA_HYPHENATE, EE_PARA_HYPHENATE ); - sal_Bool bValue = ( (const SfxBoolItem*) pItem)->GetValue(); + bool bValue = ( (const SfxBoolItem*) pItem)->GetValue(); aSet.Put( SfxBoolItem( EE_PARA_HYPHENATE, bValue ) ); pView->SetAttributes( aSet ); } @@ -167,7 +167,7 @@ void ScDrawTextObjectBar::ExecuteExtra( SfxRequest &rReq ) EE_PARA_WRITINGDIR, EE_PARA_WRITINGDIR, EE_PARA_JUST, EE_PARA_JUST, 0 ); - sal_Bool bLeft = ( nSlot == SID_ATTR_PARA_LEFT_TO_RIGHT ); + bool bLeft = ( nSlot == SID_ATTR_PARA_LEFT_TO_RIGHT ); aAttr.Put( SvxFrameDirectionItem( bLeft ? FRMDIR_HORI_LEFT_TOP : FRMDIR_HORI_RIGHT_TOP, EE_PARA_WRITINGDIR ) ); diff --git a/sc/source/ui/drawfunc/fuconcustomshape.cxx b/sc/source/ui/drawfunc/fuconcustomshape.cxx index ab6ca7ea287b..8be1cc551d81 100644 --- a/sc/source/ui/drawfunc/fuconcustomshape.cxx +++ b/sc/source/ui/drawfunc/fuconcustomshape.cxx @@ -85,9 +85,9 @@ bool FuConstCustomShape::MouseButtonDown(const MouseEvent& rMEvt) if ( pObj ) { SetAttributes( pObj ); - sal_Bool bForceNoFillStyle = false; + bool bForceNoFillStyle = false; if ( ((SdrObjCustomShape*)pObj)->UseNoFillStyle() ) - bForceNoFillStyle = sal_True; + bForceNoFillStyle = true; if ( bForceNoFillStyle ) pObj->SetMergedItem( XFillStyleItem( XFILL_NONE ) ); pObj->SetGridOffset( aGridOff ); @@ -207,7 +207,7 @@ SdrObject* FuConstCustomShape::CreateDefaultObject(const sal_uInt16 /* nID */, c void FuConstCustomShape::SetAttributes( SdrObject* pObj ) { - sal_Bool bAttributesAppliedFromGallery = false; + bool bAttributesAppliedFromGallery = false; if ( GalleryExplorer::GetSdrObjCount( GALLERY_THEME_POWERPOINT ) ) { @@ -250,7 +250,7 @@ void FuConstCustomShape::SetAttributes( SdrObject* pObj ) double a = nAngle * F_PI18000; pObj->NbcRotate( pObj->GetSnapRect().Center(), nAngle, sin( a ), cos( a ) ); } - bAttributesAppliedFromGallery = sal_True; + bAttributesAppliedFromGallery = true; } } break; diff --git a/sc/source/ui/drawfunc/fuconrec.cxx b/sc/source/ui/drawfunc/fuconrec.cxx index 23591c7b74d0..0ece581285ef 100644 --- a/sc/source/ui/drawfunc/fuconrec.cxx +++ b/sc/source/ui/drawfunc/fuconrec.cxx @@ -254,7 +254,7 @@ SdrObject* FuConstRectangle::CreateDefaultObject(const sal_uInt16 nID, const Rec { if(pObj->ISA(SdrCaptionObj)) { - sal_Bool bIsVertical(SID_DRAW_CAPTION_VERTICAL == nID); + bool bIsVertical(SID_DRAW_CAPTION_VERTICAL == nID); ((SdrTextObj*)pObj)->SetVerticalWriting(bIsVertical); diff --git a/sc/source/ui/drawfunc/fuconstr.cxx b/sc/source/ui/drawfunc/fuconstr.cxx index 09c368ef6a42..bcb26657dd24 100644 --- a/sc/source/ui/drawfunc/fuconstr.cxx +++ b/sc/source/ui/drawfunc/fuconstr.cxx @@ -79,7 +79,7 @@ Point FuConstruct::CurrentGridSyncOffsetAndPos( Point& rInOutPos ) // involved. Lets calculate where aPos would be at 100% zoom // that's the actual correct position for the object ( when you // restore the zoom. - sal_Bool bNegative = pDoc->IsNegativePage(pView->GetTab()); + bool bNegative = pDoc->IsNegativePage(pView->GetTab()); Rectangle aObjRect( rInOutPos, rInOutPos ); ScRange aRange = pDoc->GetRange( pView->GetTab(), aObjRect ); ScAddress aOldStt = aRange.aStart; @@ -234,7 +234,7 @@ bool FuConstruct::MouseButtonUp(const MouseEvent& rMEvt) if ( pObj->ISA(SdrTextObj) && !pObj->ISA(SdrUnoObj) ) { OutlinerParaObject* pOPO = pObj->GetOutlinerParaObject(); - sal_Bool bVertical = ( pOPO && pOPO->IsVertical() ); + bool bVertical = ( pOPO && pOPO->IsVertical() ); sal_uInt16 nTextSlotId = bVertical ? SID_DRAW_TEXT_VERTICAL : SID_DRAW_TEXT; pViewShell->GetViewData()->GetDispatcher(). diff --git a/sc/source/ui/drawfunc/fudraw.cxx b/sc/source/ui/drawfunc/fudraw.cxx index 6d7df46c5a07..b2fd676e703c 100644 --- a/sc/source/ui/drawfunc/fudraw.cxx +++ b/sc/source/ui/drawfunc/fudraw.cxx @@ -77,8 +77,8 @@ void FuDraw::DoModifiers(const MouseEvent& rMEvt) // Control = Snap (Toggle) // Alt = zentrisch - sal_Bool bShift = rMEvt.IsShift(); - sal_Bool bAlt = rMEvt.IsMod2(); + bool bShift = rMEvt.IsShift(); + bool bAlt = rMEvt.IsMod2(); bool bOrtho = bShift; bool bAngleSnap = bShift; @@ -180,16 +180,16 @@ bool FuDraw::MouseButtonUp(const MouseEvent& rMEvt) |* \************************************************************************/ -static sal_Bool lcl_KeyEditMode( SdrObject* pObj, ScTabViewShell* pViewShell, const KeyEvent* pInitialKey ) +static bool lcl_KeyEditMode( SdrObject* pObj, ScTabViewShell* pViewShell, const KeyEvent* pInitialKey ) { - sal_Bool bReturn = false; + bool bReturn = false; if ( pObj && pObj->ISA(SdrTextObj) && !pObj->ISA(SdrUnoObj) ) { // start text edit - like FuSelection::MouseButtonUp, // but with bCursorToEnd instead of mouse position OutlinerParaObject* pOPO = pObj->GetOutlinerParaObject(); - sal_Bool bVertical = ( pOPO && pOPO->IsVertical() ); + bool bVertical = ( pOPO && pOPO->IsVertical() ); sal_uInt16 nTextSlotId = bVertical ? SID_DRAW_TEXT_VERTICAL : SID_DRAW_TEXT; // don't switch shells if text shell is already active @@ -208,7 +208,7 @@ static sal_Bool lcl_KeyEditMode( SdrObject* pObj, ScTabViewShell* pViewShell, co pText->SetInEditMode( pObj, NULL, true, pInitialKey ); //! set cursor to end of text } - bReturn = sal_True; + bReturn = true; } return bReturn; } @@ -264,7 +264,7 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt) const SdrMarkList& rMarkList = pView->GetMarkedObjectList(); if( !pView->IsTextEdit() && 1 == rMarkList.GetMarkCount() ) { - sal_Bool bOle = pViewShell->GetViewFrame()->GetFrame().IsInPlace(); + bool bOle = pViewShell->GetViewFrame()->GetFrame().IsInPlace(); SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj(); if( pObj && pObj->ISA( SdrOle2Obj ) && !bOle ) { @@ -333,7 +333,7 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt) { // II do something with a selected handle? const SdrHdlList& rHdlList = pView->GetHdlList(); - sal_Bool bForward(!rKEvt.GetKeyCode().IsShift()); + bool bForward(!rKEvt.GetKeyCode().IsShift()); ((SdrHdlList&)rHdlList).TravelFocusHdl(bForward); @@ -454,7 +454,7 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt) nY = 0; } - sal_Bool bReadOnly = rViewData.GetDocShell()->IsReadOnly(); + bool bReadOnly = rViewData.GetDocShell()->IsReadOnly(); if(!rKEvt.GetKeyCode().IsMod1() && !bReadOnly) { @@ -546,7 +546,7 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt) if(pView->IsDragObj()) { bool bWasNoSnap = rDragStat.IsNoSnap(); - sal_Bool bWasSnapEnabled = pView->IsSnapEnabled(); + bool bWasSnapEnabled = pView->IsSnapEnabled(); // switch snapping off if(!bWasNoSnap) @@ -701,7 +701,7 @@ void FuDraw::Deactivate() |* \************************************************************************/ -static sal_Bool lcl_UrlHit( SdrView* pView, const Point& rPosPixel, Window* pWindow ) +static bool lcl_UrlHit( SdrView* pView, const Point& rPosPixel, Window* pWindow ) { SdrViewEvent aVEvt; MouseEvent aMEvt( rPosPixel, 1, 0, MOUSE_LEFT ); @@ -711,10 +711,10 @@ static sal_Bool lcl_UrlHit( SdrView* pView, const Point& rPosPixel, Window* pWin { if ( ScDrawLayer::GetIMapInfo( aVEvt.pObj ) && ScDrawLayer::GetHitIMapObject( aVEvt.pObj, pWindow->PixelToLogic(rPosPixel), *pWindow ) ) - return sal_True; + return true; if ( aVEvt.eEvent == SDREVENT_EXECUTEURL ) - return sal_True; + return true; } return false; @@ -725,7 +725,7 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt) if ( !pView->IsAction() ) { Point aPosPixel = pWindow->GetPointerPosPixel(); - sal_Bool bAlt = pMEvt && pMEvt->IsMod2(); + bool bAlt = pMEvt && pMEvt->IsMod2(); Point aPnt = pWindow->PixelToLogic( aPosPixel ); SdrHdl* pHdl = pView->PickHandle(aPnt); SdrObject* pObj; diff --git a/sc/source/ui/drawfunc/fuins1.cxx b/sc/source/ui/drawfunc/fuins1.cxx index 57c75dfd8890..096219e379e3 100644 --- a/sc/source/ui/drawfunc/fuins1.cxx +++ b/sc/source/ui/drawfunc/fuins1.cxx @@ -51,7 +51,7 @@ void SC_DLLPUBLIC ScLimitSizeOnDrawPage( Size& rSize, Point& rPos, const Size& r return; Size aPageSize = rPage; - sal_Bool bNegative = aPageSize.Width() < 0; + bool bNegative = aPageSize.Width() < 0; if ( bNegative ) { // make everything positive temporarily @@ -91,7 +91,7 @@ void SC_DLLPUBLIC ScLimitSizeOnDrawPage( Size& rSize, Point& rPos, const Size& r } static void lcl_InsertGraphic( const Graphic& rGraphic, - const OUString& rFileName, const OUString& rFilterName, sal_Bool bAsLink, sal_Bool bApi, + const OUString& rFileName, const OUString& rFilterName, bool bAsLink, bool bApi, ScTabViewShell* pViewSh, Window* pWindow, SdrView* pView ) { ScDrawView* pDrawView = pViewSh->GetScDrawView(); @@ -245,7 +245,7 @@ FuInsertGraphic::FuInsertGraphic( ScTabViewShell* pViewSh, if ( pReqArgs->GetItemState( FN_PARAM_FILTER, true, &pItem ) == SFX_ITEM_SET ) aFilterName = ((const SfxStringItem*)pItem)->GetValue(); - sal_Bool bAsLink = false; + bool bAsLink = false; if ( pReqArgs->GetItemState( FN_PARAM_1, true, &pItem ) == SFX_ITEM_SET ) bAsLink = ((const SfxBoolItem*)pItem)->GetValue(); @@ -253,7 +253,7 @@ FuInsertGraphic::FuInsertGraphic( ScTabViewShell* pViewSh, int nError = GraphicFilter::LoadGraphic( aFileName, aFilterName, aGraphic, &GraphicFilter::GetGraphicFilter() ); if ( nError == GRFILTER_OK ) { - lcl_InsertGraphic( aGraphic, aFileName, aFilterName, bAsLink, sal_True, pViewSh, pWindow, pView ); + lcl_InsertGraphic( aGraphic, aFileName, aFilterName, bAsLink, true, pViewSh, pWindow, pView ); } } else @@ -268,7 +268,7 @@ FuInsertGraphic::FuInsertGraphic( ScTabViewShell* pViewSh, { OUString aFileName = aDlg.GetPath(); OUString aFilterName = aDlg.GetCurrentFilter(); - sal_Bool bAsLink = aDlg.IsAsLink(); + bool bAsLink = aDlg.IsAsLink(); // really store as link only? if( bAsLink && SvtMiscOptions().ShowLinkWarningDialog() ) diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx index 75ab416983e9..183740dc03d2 100644 --- a/sc/source/ui/drawfunc/fuins2.cxx +++ b/sc/source/ui/drawfunc/fuins2.cxx @@ -204,7 +204,7 @@ FuInsertOLE::FuInsertOLE(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pVie uno::Reference < embed::XEmbeddedObject > xObj; uno::Reference < embed::XStorage > xStorage = comphelper::OStorageHelper::GetTemporaryStorage(); - sal_Bool bIsFromFile = false; + bool bIsFromFile = false; OUString aName; sal_Int64 nAspect = embed::Aspects::MSOLE_CONTENT; @@ -508,7 +508,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* ScRangeListRef aDummy; Rectangle aMarkDest; SCTAB nMarkTab; - sal_Bool bDrawRect = pViewShell->GetChartArea( aDummy, aMarkDest, nMarkTab ); + bool bDrawRect = pViewShell->GetChartArea( aDummy, aMarkDest, nMarkTab ); // Objekt-Groesse awt::Size aSz = xObj->getVisualAreaSize( nAspect ); @@ -516,17 +516,17 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* MapUnit aMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( nAspect ) ); - sal_Bool bSizeCh = false; + bool bSizeCh = false; if (bDrawRect && !aMarkDest.IsEmpty()) { aSize = aMarkDest.GetSize(); - bSizeCh = sal_True; + bSizeCh = true; } if (aSize.Height() <= 0 || aSize.Width() <= 0) { aSize.Width() = 5000; aSize.Height() = 5000; - bSizeCh = sal_True; + bSizeCh = true; } if (bSizeCh) { @@ -539,7 +539,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* ScViewData* pData = pViewSh->GetViewData(); ScDocShell* pScDocSh = pData->GetDocShell(); ScDocument* pScDoc = pScDocSh->GetDocument(); - sal_Bool bUndo (pScDoc->IsUndoEnabled()); + bool bUndo (pScDoc->IsUndoEnabled()); if( pReqArgs ) { @@ -579,7 +579,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* if ( pScDoc->InsertTab( nNewTab, aTabName ) ) { - sal_Bool bAppend = sal_True; + bool bAppend = true; if (bUndo) { diff --git a/sc/source/ui/drawfunc/fusel.cxx b/sc/source/ui/drawfunc/fusel.cxx index 85fae0274822..8d1a7ff001a3 100644 --- a/sc/source/ui/drawfunc/fusel.cxx +++ b/sc/source/ui/drawfunc/fusel.cxx @@ -150,7 +150,7 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) { SdrObject* pObj; SdrPageView* pPV; - sal_Bool bAlt = rMEvt.IsMod2(); + bool bAlt = rMEvt.IsMod2(); if ( !bAlt && pView->PickObj(aMDPos, pView->getHitTolLog(), pObj, pPV, SDRSEARCH_PICKMACRO) ) { pView->BegMacroObj(aMDPos, pObj, pPV, pWindow); @@ -542,7 +542,7 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt) else if ( pObj->ISA(SdrTextObj) && !pObj->ISA(SdrUnoObj) && !pObj->ISA(SdrMediaObj) ) { OutlinerParaObject* pOPO = pObj->GetOutlinerParaObject(); - sal_Bool bVertical = ( pOPO && pOPO->IsVertical() ); + bool bVertical = ( pOPO && pOPO->IsVertical() ); sal_uInt16 nTextSlotId = bVertical ? SID_DRAW_TEXT_VERTICAL : SID_DRAW_TEXT; pViewShell->GetViewData()->GetDispatcher(). diff --git a/sc/source/ui/drawfunc/fusel2.cxx b/sc/source/ui/drawfunc/fusel2.cxx index 8f753aae6d3d..6b3a5157804e 100644 --- a/sc/source/ui/drawfunc/fusel2.cxx +++ b/sc/source/ui/drawfunc/fusel2.cxx @@ -76,11 +76,11 @@ bool FuSelection::TestDetective( SdrPageView* pPV, const Point& rPos ) pViewData->GetPosFromPixel( aPixel.X(), aPixel.Y(), ePos, nEndCol, nEndRow ); SCsCOL nCurX = (SCsCOL) pViewData->GetCurX(); SCsROW nCurY = (SCsROW) pViewData->GetCurY(); - sal_Bool bStart = ( Diff( rPos,aLineStart ) > Diff( rPos,aLineEnd ) ); + bool bStart = ( Diff( rPos,aLineStart ) > Diff( rPos,aLineEnd ) ); if ( nCurX == nStartCol && nCurY == nStartRow ) bStart = false; else if ( nCurX == nEndCol && nCurY == nEndRow ) - bStart = sal_True; + bStart = true; SCsCOL nDifX; SCsROW nDifY; diff --git a/sc/source/ui/drawfunc/futext.cxx b/sc/source/ui/drawfunc/futext.cxx index c3409a4daef9..c898580b8c2e 100644 --- a/sc/source/ui/drawfunc/futext.cxx +++ b/sc/source/ui/drawfunc/futext.cxx @@ -171,7 +171,7 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt) { if (pView->HasMarkablePoints() && pView->IsPointMarkable(*pHdl)) { - sal_Bool bPointMarked=pView->IsPointMarked(*pHdl); + bool bPointMarked=pView->IsPointMarked(*pHdl); if ( rMEvt.IsShift() ) { @@ -212,7 +212,7 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt) // deduced from slot ids only if text object has no content sal_uInt16 nSlotID = aSfxRequest.GetSlot(); - sal_Bool bVertical = ( nSlotID == SID_DRAW_TEXT_VERTICAL ); + bool bVertical = ( nSlotID == SID_DRAW_TEXT_VERTICAL ); OutlinerParaObject* pOPO = pObj->GetOutlinerParaObject(); if ( pOPO ) bVertical = pOPO->IsVertical(); // content wins @@ -257,7 +257,7 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt) } else { - sal_Bool bMacro = false; + bool bMacro = false; // if (bMacro && pView->TakeMacroObject(aMDPos,pObj,pPV)) if (bMacro && pView->PickObj(aMDPos, pView->getHitTolLog(), pObj, pPV, SDRSEARCH_PICKMACRO) ) @@ -269,7 +269,7 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt) { if (pView->IsEditMode()) { - sal_Bool bPointMode=pView->HasMarkablePoints(); + bool bPointMode=pView->HasMarkablePoints(); if (!rMEvt.IsShift()) { @@ -490,7 +490,7 @@ bool FuText::MouseButtonUp(const MouseEvent& rMEvt) // init object different when vertical writing sal_uInt16 nSlotID(aSfxRequest.GetSlot()); - sal_Bool bVertical = (SID_DRAW_TEXT_VERTICAL == nSlotID); + bool bVertical = (SID_DRAW_TEXT_VERTICAL == nSlotID); if(bVertical) { const SdrMarkList& rMarkList = pView->GetMarkedObjectList(); @@ -741,7 +741,7 @@ void FuText::SetInEditMode(SdrObject* pObj, const Point* pMousePixel, // deduced from slot ids only if text object has no content sal_uInt16 nSlotID = aSfxRequest.GetSlot(); - sal_Bool bVertical = ( nSlotID == SID_DRAW_TEXT_VERTICAL ); + bool bVertical = ( nSlotID == SID_DRAW_TEXT_VERTICAL ); OutlinerParaObject* pOPO = pObj->GetOutlinerParaObject(); if ( pOPO ) bVertical = pOPO->IsVertical(); // content wins @@ -808,8 +808,8 @@ SdrObject* FuText::CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rR // String aText(ScResId(STR_CAPTION_DEFAULT_TEXT)); // pText->SetText(aText); - sal_Bool bVertical = (SID_DRAW_TEXT_VERTICAL == nID); - sal_Bool bMarquee = (SID_DRAW_TEXT_MARQUEE == nID); + bool bVertical = (SID_DRAW_TEXT_VERTICAL == nID); + bool bMarquee = (SID_DRAW_TEXT_MARQUEE == nID); pText->SetVerticalWriting(bVertical); diff --git a/sc/source/ui/drawfunc/graphsh.cxx b/sc/source/ui/drawfunc/graphsh.cxx index 6f48256a79e5..67e3ca4f33e6 100644 --- a/sc/source/ui/drawfunc/graphsh.cxx +++ b/sc/source/ui/drawfunc/graphsh.cxx @@ -111,14 +111,14 @@ void ScGraphicShell::GetFilterState( SfxItemSet& rSet ) { ScDrawView* pView = GetViewData()->GetScDrawView(); const SdrMarkList& rMarkList = pView->GetMarkedObjectList(); - sal_Bool bEnable = false; + bool bEnable = false; if( rMarkList.GetMarkCount() == 1 ) { SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj(); if( pObj && pObj->ISA( SdrGrafObj ) && ( ( (SdrGrafObj*) pObj )->GetGraphicType() == GRAPHIC_BITMAP ) ) - bEnable = sal_True; + bEnable = true; } if( !bEnable ) diff --git a/sc/source/ui/formdlg/formula.cxx b/sc/source/ui/formdlg/formula.cxx index c2bcb3ed2564..621edbab326a 100644 --- a/sc/source/ui/formdlg/formula.cxx +++ b/sc/source/ui/formdlg/formula.cxx @@ -142,8 +142,8 @@ ScFormulaDlg::ScFormulaDlg( SfxBindings* pB, SfxChildWindow* pCW, OUString aFormula; pDoc->GetFormula( nCol, nRow, nTab, aFormula ); - sal_Bool bEdit = ( aFormula.getLength() > 1 ); - sal_Bool bMatrix = false; + bool bEdit = ( aFormula.getLength() > 1 ); + bool bMatrix = false; if ( bEdit ) { bMatrix = CheckMatrix(aFormula); @@ -314,7 +314,7 @@ bool ScFormulaDlg::calculateValue( const OUString& rStrExp, OUString& rStrResult // wenn ein Name eigentlich als Bereich in die Gesamt-Formel // eingefuegt wird, bei der Einzeldarstellung aber als // single-Zellbezug interpretiert wird - sal_Bool bColRowName = pFCell->HasColRowName(); + bool bColRowName = pFCell->HasColRowName(); if ( bColRowName ) { // ColRowName im RPN-Code? @@ -384,7 +384,7 @@ void ScFormulaDlg::SetReference( const ScRange& rRef, ScDocument* pRefDoc ) if ( pFunc && pFunc->getSuppressedArgumentCount() > 0 ) { Selection theSel; - sal_Bool bRefNull = UpdateParaWin(theSel); + bool bRefNull = UpdateParaWin(theSel); if ( rRef.aStart != rRef.aEnd && bRefNull ) { @@ -392,7 +392,7 @@ void ScFormulaDlg::SetReference( const ScRange& rRef, ScDocument* pRefDoc ) } OUString aRefStr; - sal_Bool bOtherDoc = ( pRefDoc != pDoc && pRefDoc->GetDocumentShell()->HasName() ); + bool bOtherDoc = ( pRefDoc != pDoc && pRefDoc->GetDocumentShell()->HasName() ); if ( bOtherDoc ) { // Referenz auf anderes Dokument - wie inputhdl.cxx diff --git a/sc/source/ui/inc/AccessibleCellBase.hxx b/sc/source/ui/inc/AccessibleCellBase.hxx index a2af98ca822f..8445a52ea116 100644 --- a/sc/source/ui/inc/AccessibleCellBase.hxx +++ b/sc/source/ui/inc/AccessibleCellBase.hxx @@ -46,6 +46,9 @@ protected: virtual ~ScAccessibleCellBase(); public: + virtual bool SAL_CALL isVisible() + throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + ///===== XInterface ===================================================== virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( @@ -58,9 +61,6 @@ public: ///===== XAccessibleComponent ============================================ - virtual sal_Bool SAL_CALL isVisible() - throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual sal_Int32 SAL_CALL getForeground( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; diff --git a/sc/source/ui/inc/AccessibleContextBase.hxx b/sc/source/ui/inc/AccessibleContextBase.hxx index f780fef556e5..8fa0a696525b 100644 --- a/sc/source/ui/inc/AccessibleContextBase.hxx +++ b/sc/source/ui/inc/AccessibleContextBase.hxx @@ -80,6 +80,13 @@ public: protected: virtual ~ScAccessibleContextBase(void); public: + + virtual bool SAL_CALL isShowing( ) + throw (::com::sun::star::uno::RuntimeException); + + virtual bool SAL_CALL isVisible() + throw (::com::sun::star::uno::RuntimeException, std::exception); + ///===== SfxListener ===================================================== virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE; @@ -123,12 +130,6 @@ public: virtual ::com::sun::star::awt::Size SAL_CALL getSize( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL isShowing( ) - throw (::com::sun::star::uno::RuntimeException); - - virtual sal_Bool SAL_CALL isVisible() - throw (::com::sun::star::uno::RuntimeException, std::exception); - virtual void SAL_CALL grabFocus( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; diff --git a/sc/source/ui/inc/AccessibleCsvControl.hxx b/sc/source/ui/inc/AccessibleCsvControl.hxx index 2d35ffa4400f..1c95dfbf2155 100644 --- a/sc/source/ui/inc/AccessibleCsvControl.hxx +++ b/sc/source/ui/inc/AccessibleCsvControl.hxx @@ -63,15 +63,15 @@ public: using ScAccessibleContextBase::disposing; virtual void SAL_CALL disposing() SAL_OVERRIDE; + /** Returns true, if the control is visible. */ + virtual bool SAL_CALL isVisible() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + // XAccessibleComponent --------------------------------------------------- /** Returns the child at the specified point (cell returns NULL). */ virtual XAccessibleRef SAL_CALL getAccessibleAtPoint( const AwtPoint& rPoint ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE; - /** Returns true, if the control is visible. */ - virtual sal_Bool SAL_CALL isVisible() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE; - /** Sets the focus to this control. */ virtual void SAL_CALL grabFocus() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE; diff --git a/sc/source/ui/inc/drawsh.hxx b/sc/source/ui/inc/drawsh.hxx index 2643ff09ee54..61eb936cafb5 100644 --- a/sc/source/ui/inc/drawsh.hxx +++ b/sc/source/ui/inc/drawsh.hxx @@ -85,7 +85,7 @@ public: ScDrawView* GetDrawView(); - sal_Bool AreAllObjectsOnLayer(sal_uInt16 nLayerNo,const SdrMarkList& rMark); + bool AreAllObjectsOnLayer(sal_uInt16 nLayerNo,const SdrMarkList& rMark); void GetDrawAttrStateForIFBX( SfxItemSet& rSet ); ::rtl::OUString GetSidebarContextName (void); diff --git a/sc/source/ui/inc/inscldlg.hxx b/sc/source/ui/inc/inscldlg.hxx index 39b4d3fab705..cd7a4b59b549 100644 --- a/sc/source/ui/inc/inscldlg.hxx +++ b/sc/source/ui/inc/inscldlg.hxx @@ -36,7 +36,7 @@ private: RadioButton* m_pBtnInsCol; public: - ScInsertCellDlg( Window* pParent,sal_Bool bDisallowCellMove = false ); + ScInsertCellDlg( Window* pParent,bool bDisallowCellMove = false ); virtual ~ScInsertCellDlg(); InsCellCmd GetInsCellCmd() const; diff --git a/sc/source/ui/inc/instbdlg.hxx b/sc/source/ui/inc/instbdlg.hxx index 2e6842d691a5..d247b356214f 100644 --- a/sc/source/ui/inc/instbdlg.hxx +++ b/sc/source/ui/inc/instbdlg.hxx @@ -47,13 +47,13 @@ public: virtual short Execute() SAL_OVERRIDE; // overloaded to set parent dialog - sal_Bool GetTablesFromFile() const { return m_pBtnFromFile->IsChecked(); } - sal_Bool GetTablesAsLink() const { return m_pBtnLink->IsChecked(); } + bool GetTablesFromFile() const { return m_pBtnFromFile->IsChecked(); } + bool GetTablesAsLink() const { return m_pBtnLink->IsChecked(); } const OUString* GetFirstTable( sal_uInt16* pN = NULL ); const OUString* GetNextTable( sal_uInt16* pN = NULL ); ScDocShell* GetDocShellTables() { return pDocShTables; } - sal_Bool IsTableBefore() const { return m_pBtnBefore->IsChecked(); } + bool IsTableBefore() const { return m_pBtnBefore->IsChecked(); } SCTAB GetTableCount() const { return nTableCount;} private: diff --git a/sc/source/ui/miscdlgs/autofmt.cxx b/sc/source/ui/miscdlgs/autofmt.cxx index 67920b735475..239efd81f79d 100644 --- a/sc/source/ui/miscdlgs/autofmt.cxx +++ b/sc/source/ui/miscdlgs/autofmt.cxx @@ -189,7 +189,7 @@ void ScAutoFmtPreview::DrawString( size_t nCol, size_t nRow ) OUString cellString; - sal_Bool bNumFormat = pCurData->GetIncludeValueFormat(); + bool bNumFormat = pCurData->GetIncludeValueFormat(); sal_uLong nNum; double nVal; Color* pDummy = NULL; @@ -248,7 +248,7 @@ void ScAutoFmtPreview::DrawString( size_t nCol, size_t nRow ) Rectangle cellRect = maArray.GetCellRect( nCol, nRow ); Point aPos = cellRect.TopLeft(); sal_uInt16 nRightX = 0; - sal_Bool bJustify = pCurData->GetIncludeJustify(); + bool bJustify = pCurData->GetIncludeJustify(); SvxHorJustifyItem aHorJustifyItem( SVX_HOR_JUSTIFY_STANDARD, ATTR_HOR_JUSTIFY ); SvxCellHorJustify eJustification; diff --git a/sc/source/ui/miscdlgs/conflictsdlg.cxx b/sc/source/ui/miscdlgs/conflictsdlg.cxx index 3d0024219fda..82aa38f88b1a 100644 --- a/sc/source/ui/miscdlgs/conflictsdlg.cxx +++ b/sc/source/ui/miscdlgs/conflictsdlg.cxx @@ -575,7 +575,7 @@ IMPL_LINK_NOARG(ScConflictsDlg, UpdateSelectionHdl) ScTabView* pTabView = mpViewData->GetView(); pTabView->DoneBlockMode(); - sal_Bool bContMark = false; + bool bContMark = false; SvTreeListEntry* pEntry = maLbConflicts.FirstSelected(); while ( pEntry ) { @@ -591,9 +591,9 @@ IMPL_LINK_NOARG(ScConflictsDlg, UpdateSelectionHdl) const ScBigRange& rBigRange = ( static_cast< const ScChangeAction* >( pAction ) )->GetBigRange(); if ( rBigRange.IsValid( mpOwnDoc ) ) { - sal_Bool bSetCursor = !maLbConflicts.NextSelected( pEntry ); + bool bSetCursor = !maLbConflicts.NextSelected( pEntry ); pTabView->MarkRange( rBigRange.MakeRange(), bSetCursor, bContMark ); - bContMark = sal_True; + bContMark = true; } } } diff --git a/sc/source/ui/miscdlgs/crnrdlg.cxx b/sc/source/ui/miscdlgs/crnrdlg.cxx index aea36217f07f..7c01a7059225 100644 --- a/sc/source/ui/miscdlgs/crnrdlg.cxx +++ b/sc/source/ui/miscdlgs/crnrdlg.cxx @@ -211,7 +211,7 @@ void ScColRowNameRangesDlg::Init() void ScColRowNameRangesDlg::SetColRowData( const ScRange& rLabelRange, bool bRef) { theCurData = theCurArea = rLabelRange; - sal_Bool bValid = sal_True; + bool bValid = true; SCCOL nCol1 = theCurArea.aStart.Col(); SCCOL nCol2 = theCurArea.aEnd.Col(); SCROW nRow1 = theCurArea.aStart.Row(); @@ -608,11 +608,11 @@ void ScColRowNameRangesDlg::UpdateNames() void ScColRowNameRangesDlg::UpdateRangeData( const ScRange& rRange, bool bColName ) { ScRangePair* pPair = NULL; - sal_Bool bFound = false; + bool bFound = false; if ( bColName && (pPair = xColNameRanges->Find( rRange )) != NULL ) - bFound = sal_True; + bFound = true; else if ( !bColName && (pPair = xRowNameRanges->Find( rRange )) != NULL ) - bFound = sal_True; + bFound = true; if ( bFound ) { @@ -745,7 +745,7 @@ IMPL_LINK_NOARG(ScColRowNameRangesDlg, AddBtnHdl) { const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention(); ScRange aRange1, aRange2; - sal_Bool bOk1; + bool bOk1; if ( (bOk1 = ((aRange1.ParseAny( aNewArea, pDoc, eConv ) & SCA_VALID) == SCA_VALID)) && ((aRange2.ParseAny( aNewData, pDoc, eConv ) & SCA_VALID) == SCA_VALID) ) { @@ -812,7 +812,7 @@ IMPL_LINK_NOARG(ScColRowNameRangesDlg, RemoveBtnHdl) { OUString aRangeStr = pLbRange->GetSelectEntry(); sal_uInt16 nSelectPos = pLbRange->GetSelectEntryPos(); - sal_Bool bColName = + bool bColName = ((sal_uLong)pLbRange->GetEntryData( nSelectPos ) == nEntryDataCol); NameRangeMap::const_iterator itr = aRangeMap.find(aRangeStr); if (itr == aRangeMap.end()) @@ -820,11 +820,11 @@ IMPL_LINK_NOARG(ScColRowNameRangesDlg, RemoveBtnHdl) const ScRange& rRange = itr->second; ScRangePair* pPair = NULL; - sal_Bool bFound = false; + bool bFound = false; if ( bColName && (pPair = xColNameRanges->Find( rRange )) != NULL ) - bFound = sal_True; + bFound = true; else if ( !bColName && (pPair = xRowNameRanges->Find( rRange )) != NULL ) - bFound = sal_True; + bFound = true; if ( bFound ) { OUString aStrDelMsg = ScGlobal::GetRscString( STR_QUERY_DELENTRY ); @@ -918,7 +918,7 @@ IMPL_LINK_NOARG(ScColRowNameRangesDlg, Range1SelectHdl) NameRangeMap::const_iterator itr = aRangeMap.find(aRangeStr); if ( itr != aRangeMap.end() ) { - sal_Bool bColName = + bool bColName = ((sal_uLong)pLbRange->GetEntryData( nSelectPos ) == nEntryDataCol); UpdateRangeData( itr->second, bColName ); pBtnAdd->Disable(); @@ -974,14 +974,14 @@ IMPL_LINK_NOARG(ScColRowNameRangesDlg, Range1SelectHdl) IMPL_LINK_NOARG(ScColRowNameRangesDlg, Range1DataModifyHdl) { OUString aNewArea( pEdAssign->GetText() ); - sal_Bool bValid = false; + bool bValid = false; if (!aNewArea.isEmpty() && pDoc) { ScRange aRange; if ( (aRange.ParseAny( aNewArea, pDoc, pDoc->GetAddressConvention() ) & SCA_VALID) == SCA_VALID ) { SetColRowData( aRange ); - bValid = sal_True; + bValid = true; } } if ( bValid ) diff --git a/sc/source/ui/miscdlgs/filldlg.cxx b/sc/source/ui/miscdlgs/filldlg.cxx index 92240884d089..aa654deb2978 100644 --- a/sc/source/ui/miscdlgs/filldlg.cxx +++ b/sc/source/ui/miscdlgs/filldlg.cxx @@ -291,7 +291,7 @@ IMPL_LINK_NOARG(ScFillSeriesDlg, OKHdl) else if ( m_pBtnMonth->IsChecked() ) theFillDateCmd = FILL_MONTH; else if ( m_pBtnYear->IsChecked() ) theFillDateCmd = FILL_YEAR; - sal_Bool bAllOk = true; + bool bAllOk = true; Edit* pEdWrong = NULL; if ( !CheckStartVal() ) { diff --git a/sc/source/ui/miscdlgs/inscldlg.cxx b/sc/source/ui/miscdlgs/inscldlg.cxx index 37e864c38ab1..3a44f7b264af 100644 --- a/sc/source/ui/miscdlgs/inscldlg.cxx +++ b/sc/source/ui/miscdlgs/inscldlg.cxx @@ -29,7 +29,7 @@ static sal_uInt8 nInsItemChecked=0; -ScInsertCellDlg::ScInsertCellDlg( Window* pParent,sal_Bool bDisallowCellMove) : +ScInsertCellDlg::ScInsertCellDlg( Window* pParent,bool bDisallowCellMove) : ModalDialog ( pParent, "InsertCellsDialog", "modules/scalc/ui/insertcells.ui") { get(m_pBtnCellsDown, "down"); diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx index 3423988e890c..a72a0fe6bf5b 100644 --- a/sc/source/ui/miscdlgs/optsolver.cxx +++ b/sc/source/ui/miscdlgs/optsolver.cxx @@ -599,7 +599,7 @@ IMPL_LINK( ScOptSolverDlg, DelBtnHdl, PushButton*, pBtn ) for ( sal_uInt16 nRow = 0; nRow < EDIT_ROW_COUNT; ++nRow ) if( pBtn == mpDelButton[nRow] ) { - sal_Bool bHadFocus = pBtn->HasFocus(); + bool bHadFocus = pBtn->HasFocus(); ReadConditions(); long nVecPos = nScrollPos + nRow; @@ -893,7 +893,7 @@ bool ScOptSolverDlg::CallSolver() // return true -> close dialog after cal } } - sal_Bool bMaximize = m_pRbMax->IsChecked(); + bool bMaximize = m_pRbMax->IsChecked(); if ( m_pRbValue->IsChecked() ) { // handle "value of" with an additional constraint (and then minimize) @@ -969,7 +969,7 @@ bool ScOptSolverDlg::CallSolver() // return true -> close dialog after cal } xSolver->solve(); - sal_Bool bSuccess = xSolver->getSuccess(); + bool bSuccess = xSolver->getSuccess(); aProgress.Hide(); bool bClose = false; diff --git a/sc/source/ui/miscdlgs/redcom.cxx b/sc/source/ui/miscdlgs/redcom.cxx index 50c8d0e57c68..4f5034b48617 100644 --- a/sc/source/ui/miscdlgs/redcom.cxx +++ b/sc/source/ui/miscdlgs/redcom.cxx @@ -106,8 +106,8 @@ void ScRedComDialog::ReInit(ScChangeAction *pAction) pDlg->SetText(aTitle); aComment=pChangeAction->GetComment(); - sal_Bool bNext=FindNext(pChangeAction)!=NULL; - sal_Bool bPrev=FindPrev(pChangeAction)!=NULL; + bool bNext=FindNext(pChangeAction)!=NULL; + bool bPrev=FindPrev(pChangeAction)!=NULL; pDlg->EnableTravel(bNext,bPrev); OUString aAuthor = pChangeAction->GetUser(); diff --git a/sc/source/ui/miscdlgs/scuiautofmt.cxx b/sc/source/ui/miscdlgs/scuiautofmt.cxx index 83c97b4c3d05..8618f7aac695 100644 --- a/sc/source/ui/miscdlgs/scuiautofmt.cxx +++ b/sc/source/ui/miscdlgs/scuiautofmt.cxx @@ -309,7 +309,7 @@ IMPL_LINK_NOARG(ScAutoFormatDlg, RemoveHdl) IMPL_LINK_NOARG(ScAutoFormatDlg, RenameHdl) { - sal_Bool bOk = false; + bool bOk = false; while( !bOk ) { diff --git a/sc/source/ui/miscdlgs/solveroptions.cxx b/sc/source/ui/miscdlgs/solveroptions.cxx index d31634370481..ca7f83ff05b1 100644 --- a/sc/source/ui/miscdlgs/solveroptions.cxx +++ b/sc/source/ui/miscdlgs/solveroptions.cxx @@ -370,7 +370,7 @@ IMPL_LINK_NOARG(ScSolverOptionsDialog, EngineSelectHdl) IMPL_LINK_NOARG(ScSolverOptionsDialog, SettingsSelHdl) { - sal_Bool bCheckbox = false; + bool bCheckbox = false; SvTreeListEntry* pEntry = m_pLbSettings->GetCurEntry(); if (pEntry) diff --git a/sc/source/ui/miscdlgs/tabopdlg.cxx b/sc/source/ui/miscdlgs/tabopdlg.cxx index 5d6c82ad1986..cd1b77c19953 100644 --- a/sc/source/ui/miscdlgs/tabopdlg.cxx +++ b/sc/source/ui/miscdlgs/tabopdlg.cxx @@ -209,10 +209,10 @@ void ScTabOpDlg::RaiseError( ScTabOpErr eError ) pEd->GrabFocus(); } -static sal_Bool lcl_Parse( const OUString& rString, ScDocument* pDoc, SCTAB nCurTab, +static bool lcl_Parse( const OUString& rString, ScDocument* pDoc, SCTAB nCurTab, ScRefAddress& rStart, ScRefAddress& rEnd ) { - sal_Bool bRet = false; + bool bRet = false; const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention(); if ( rString.indexOf(':') != -1 ) bRet = ConvertDoubleRef( pDoc, rString, nCurTab, rStart, rEnd, eConv ); diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx index caa8a54eb61b..ed7336adb394 100644 --- a/sc/source/ui/navipi/content.cxx +++ b/sc/source/ui/navipi/content.cxx @@ -238,7 +238,7 @@ void ScContentTree::ClearAll() //In SvTreeList::Clear(), Broadcast( LISTACTION_CLEARED ) will be called and finally, it will be trapped into the event yield() loop. And //the InitRoot() method won't be called. Then if a user click or press key to update the navigator tree, crash happens. //So the solution is to disable the UpdateMode of Control, then call Clear(), then recover the update mode - sal_Bool bOldUpdate = Control::IsUpdateMode(); + bool bOldUpdate = Control::IsUpdateMode(); Control::SetUpdateMode(false); Clear(); Control::SetUpdateMode(bOldUpdate); @@ -497,7 +497,7 @@ void ScContentTree::KeyInput( const KeyEvent& rKEvt ) if(pScDrawView!=NULL) { pScDrawView->SelectCurrentViewObject(aText ); - sal_Bool bHasMakredObject = sal_False; + bool bHasMakredObject = false; SvTreeListEntry* pParent = pRootNodes[nType]; SvTreeListEntry* pBeginEntry = NULL; if( pParent ) @@ -507,7 +507,7 @@ void ScContentTree::KeyInput( const KeyEvent& rKEvt ) OUString aTempText( GetEntryText( pBeginEntry ) ); if( pScDrawView->GetObjectIsMarked( pScDrawView->GetObjectByName( aTempText ) ) ) { - bHasMakredObject = sal_True; + bHasMakredObject = true; break; } pBeginEntry = Next( pBeginEntry ); @@ -982,7 +982,7 @@ void ScContentTree::GetDrawNames( sal_uInt16 nType ) pScDrawView =pScTabViewShell->GetViewData()->GetScDrawView(); if(pScDrawView!=NULL) { - sal_Bool bMarked =pScDrawView->GetObjectIsMarked(pObject); + bool bMarked =pScDrawView->GetObjectIsMarked(pObject); pChild->SetMarked( bMarked ); } }//end if parent @@ -1659,7 +1659,7 @@ void ScContentTree::StoreSettings() const { for( sal_uInt16 nEntry = 1; nEntry < SC_CONTENT_COUNT; ++nEntry ) { - sal_Bool bExp = pRootNodes[ nEntry ] && IsExpanded( pRootNodes[ nEntry ] ); + bool bExp = pRootNodes[ nEntry ] && IsExpanded( pRootNodes[ nEntry ] ); pSettings->SetExpanded( nEntry, bExp ); } sal_uInt16 nRoot; diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx index 20b88d024166..cf3cdc8ac163 100644 --- a/sc/source/ui/navipi/navipi.cxx +++ b/sc/source/ui/navipi/navipi.cxx @@ -437,7 +437,7 @@ void CommandToolBox::UpdateButtons() else { EnableItem( IID_CHANGEROOT, true ); - sal_Bool bRootSet = rDlg.aLbEntries.GetRootType() != SC_CONTENT_ROOT; + bool bRootSet = rDlg.aLbEntries.GetRootType() != SC_CONTENT_ROOT; CheckItem( IID_CHANGEROOT, bRootSet ); } @@ -517,7 +517,7 @@ ScNavigatorDialogWrapper::ScNavigatorDialogWrapper( // deshalb muessen in Abhaengigkeit von der momentanen Groesse die // Inhalte eingeblendet werden oder nicht - sal_Bool bSmall = ( aInfoSize.Height() <= pNavigator->aInitSize.Height() + SCNAV_MINTOL ); + bool bSmall = ( aInfoSize.Height() <= pNavigator->aInitSize.Height() + SCNAV_MINTOL ); NavListMode eNavMode = NAV_LMODE_NONE; if (!bSmall) { @@ -775,7 +775,7 @@ void ScNavigatorDlg::DoResize() // bei angedocktem Navigator wird das Fenster evtl. erst klein erzeugt, // dann kommt ein Resize auf die wirkliche Groesse -> dann Inhalte einschalten - sal_Bool bSmall = ( nTotalHeight <= aInitSize.Height() + SCNAV_MINTOL ); + bool bSmall = ( nTotalHeight <= aInitSize.Height() + SCNAV_MINTOL ); if ( !bSmall && bFirstBig ) { // Inhalte laut Config wieder einschalten @@ -815,7 +815,7 @@ void ScNavigatorDlg::DoResize() aWndScenarios.SetSizePixel( aNewSize ); aLbDocuments.SetSizePixel( aDocSize ); - sal_Bool bListMode = (eListMode != NAV_LMODE_NONE); + bool bListMode = (eListMode != NAV_LMODE_NONE); if (pContextWin != NULL) { FloatingWindow* pFloat = pContextWin->GetFloatingWindow(); @@ -932,7 +932,7 @@ void ScNavigatorDlg::SetCurrentCell( SCCOL nColNo, SCROW nRowNo ) ScAddress aScAddress( nColNo, nRowNo, 0 ); OUString aAddr(aScAddress.Format(SCA_ABS)); - sal_Bool bUnmark = false; + bool bUnmark = false; if ( GetViewData() ) bUnmark = !pViewData->GetMarkData().IsCellMarked( nColNo, nRowNo ); diff --git a/sc/source/ui/optdlg/tpdefaults.cxx b/sc/source/ui/optdlg/tpdefaults.cxx index 44a1c34cb751..ecd3faf4a8d8 100644 --- a/sc/source/ui/optdlg/tpdefaults.cxx +++ b/sc/source/ui/optdlg/tpdefaults.cxx @@ -41,7 +41,7 @@ SfxTabPage* ScTpDefaultsOptions::Create(Window *pParent, const SfxItemSet &rCore bool ScTpDefaultsOptions::FillItemSet(SfxItemSet &rCoreSet) { - sal_Bool bRet = false; + bool bRet = false; ScDefaultsOptions aOpt; SCTAB nTabCount = static_cast<SCTAB>(m_pEdNSheets->GetValue()); diff --git a/sc/source/ui/optdlg/tpformula.cxx b/sc/source/ui/optdlg/tpformula.cxx index ddb30b19a239..cfb96f69be8a 100644 --- a/sc/source/ui/optdlg/tpformula.cxx +++ b/sc/source/ui/optdlg/tpformula.cxx @@ -229,7 +229,7 @@ bool ScTpFormulaOptions::FillItemSet(SfxItemSet& rCoreSet) { bool bRet = false; ScFormulaOptions aOpt; - sal_Bool bEnglishFuncName = mpCbEnglishFuncName->IsChecked(); + bool bEnglishFuncName = mpCbEnglishFuncName->IsChecked(); sal_Int16 aSyntaxPos = mpLbFormulaSyntax->GetSelectEntryPos(); OUString aSep = mpEdSepFuncArg->GetText(); OUString aSepArrayCol = mpEdSepArrayCol->GetText(); @@ -244,7 +244,7 @@ bool ScTpFormulaOptions::FillItemSet(SfxItemSet& rCoreSet) } if ( mpLbFormulaSyntax->GetSavedValue() != aSyntaxPos - || mpCbEnglishFuncName->GetSavedValue() != bEnglishFuncName + || mpCbEnglishFuncName->GetSavedValue() != (bEnglishFuncName ? 1 : 0) || static_cast<OUString>(mpEdSepFuncArg->GetSavedValue()) != aSep || static_cast<OUString>(mpEdSepArrayCol->GetSavedValue()) != aSepArrayCol || static_cast<OUString>(mpEdSepArrayRow->GetSavedValue()) != aSepArrayRow diff --git a/sc/source/ui/optdlg/tpprint.cxx b/sc/source/ui/optdlg/tpprint.cxx index 8ad010113e14..76358d62cbad 100644 --- a/sc/source/ui/optdlg/tpprint.cxx +++ b/sc/source/ui/optdlg/tpprint.cxx @@ -72,7 +72,7 @@ void ScTpPrintOptions::Reset( const SfxItemSet& rCoreSet ) if ( SFX_ITEM_SET == rCoreSet.GetItemState( SID_PRINT_SELECTEDSHEET, false , &pItem ) ) { - sal_Bool bChecked = ( (const SfxBoolItem*)pItem )->GetValue(); + bool bChecked = ( (const SfxBoolItem*)pItem )->GetValue(); m_pSelectedSheetsCB->Check( bChecked ); } else diff --git a/sc/source/ui/optdlg/tpusrlst.cxx b/sc/source/ui/optdlg/tpusrlst.cxx index cd254750d459..47d7fb73acf2 100644 --- a/sc/source/ui/optdlg/tpusrlst.cxx +++ b/sc/source/ui/optdlg/tpusrlst.cxx @@ -208,7 +208,7 @@ bool ScTpUserLists::FillItemSet( SfxItemSet& rCoreAttrs ) GetItemSet().Get( nWhichUserLists ); ScUserList* pCoreList = rUserListItem.GetUserList(); - sal_Bool bDataModified = false; + bool bDataModified = false; if ( (pUserLists == NULL) && (pCoreList == NULL) ) { @@ -219,7 +219,7 @@ bool ScTpUserLists::FillItemSet( SfxItemSet& rCoreAttrs ) if ( pCoreList != NULL ) bDataModified = (*pUserLists != *pCoreList); else - bDataModified = sal_True; + bDataModified = true; } if ( bDataModified ) @@ -346,7 +346,7 @@ void ScTpUserLists::CopyListFromArea( const ScRefAddress& rStartPos, SCCOL nEndCol = rEndPos.Col(); SCROW nEndRow = rEndPos.Row(); sal_uInt16 nCellDir = SCRET_COLS; - sal_Bool bValueIgnored = false; + bool bValueIgnored = false; if ( (nStartCol != nEndCol) && (nStartRow != nEndRow) ) { @@ -379,7 +379,7 @@ void ScTpUserLists::CopyListFromArea( const ScRefAddress& rStartPos, } } else - bValueIgnored = sal_True; + bValueIgnored = true; } if ( !aStrList.isEmpty() ) AddNewList( aStrList ); @@ -403,7 +403,7 @@ void ScTpUserLists::CopyListFromArea( const ScRefAddress& rStartPos, } } else - bValueIgnored = sal_True; + bValueIgnored = true; } if ( !aStrList.isEmpty() ) AddNewList( aStrList ); @@ -656,7 +656,7 @@ IMPL_LINK( ScTpUserLists, BtnClickHdl, PushButton*, pBtn ) ScRefAddress theStartPos; ScRefAddress theEndPos; OUString theAreaStr( mpEdCopyFrom->GetText() ); - sal_Bool bAreaOk = false; + bool bAreaOk = false; if ( !theAreaStr.isEmpty() ) { diff --git a/sc/source/ui/optdlg/tpview.cxx b/sc/source/ui/optdlg/tpview.cxx index e0f54d9c9186..4a2f758fa4aa 100644 --- a/sc/source/ui/optdlg/tpview.cxx +++ b/sc/source/ui/optdlg/tpview.cxx @@ -108,7 +108,7 @@ SfxTabPage* ScTpContentOptions::Create( Window* pParent, bool ScTpContentOptions::FillItemSet( SfxItemSet& rCoreSet ) { - sal_Bool bRet = false; + bool bRet = false; if( pFormulaCB ->GetSavedValue() != TriState(pFormulaCB ->IsChecked()) || pNilCB ->GetSavedValue() != TriState(pNilCB ->IsChecked()) || pAnnotCB ->GetSavedValue() != TriState(pAnnotCB ->IsChecked()) || @@ -131,17 +131,17 @@ bool ScTpContentOptions::FillItemSet( SfxItemSet& rCoreSet ) pLocalOptions->SetGridColor( pColorLB->GetSelectEntryColor(), pColorLB->GetSelectEntry() ); rCoreSet.Put(ScTpViewItem(SID_SCVIEWOPTIONS, *pLocalOptions)); - bRet = sal_True; + bRet = true; } if(pRangeFindCB->GetSavedValue() != TriState(pRangeFindCB->IsChecked())) { rCoreSet.Put(SfxBoolItem(SID_SC_INPUT_RANGEFINDER, pRangeFindCB->IsChecked())); - bRet = sal_True; + bRet = true; } if(pSyncZoomCB->GetSavedValue() != TriState(pSyncZoomCB->IsChecked())) { rCoreSet.Put(SfxBoolItem(SID_SC_OPT_SYNCZOOM, pSyncZoomCB->IsChecked())); - bRet = sal_True; + bRet = true; } @@ -239,7 +239,7 @@ IMPL_LINK( ScTpContentOptions, SelLbObjHdl, ListBox*, pLb ) IMPL_LINK( ScTpContentOptions, CBHdl, CheckBox*, pBtn ) { ScViewOption eOption = VOPT_FORMULAS; - sal_Bool bChecked = pBtn->IsChecked(); + bool bChecked = pBtn->IsChecked(); if ( pFormulaCB == pBtn ) eOption = VOPT_FORMULAS; else if ( pNilCB == pBtn ) eOption = VOPT_NULLVALS; @@ -263,8 +263,8 @@ IMPL_LINK( ScTpContentOptions, CBHdl, CheckBox*, pBtn ) void ScTpContentOptions::InitGridOpt() { - sal_Bool bGrid = pLocalOptions->GetOption( VOPT_GRID ); - sal_Bool bGridOnTop = pLocalOptions->GetOption( VOPT_GRID_ONTOP ); + bool bGrid = pLocalOptions->GetOption( VOPT_GRID ); + bool bGridOnTop = pLocalOptions->GetOption( VOPT_GRID_ONTOP ); sal_Int32 nSelPos = 0; if ( bGrid || bGridOnTop ) @@ -340,8 +340,8 @@ void ScTpContentOptions::InitGridOpt() IMPL_LINK( ScTpContentOptions, GridHdl, ListBox*, pLb ) { sal_Int32 nSelPos = pLb->GetSelectEntryPos(); - sal_Bool bGrid = ( nSelPos <= 1 ); - sal_Bool bGridOnTop = ( nSelPos == 1 ); + bool bGrid = ( nSelPos <= 1 ); + bool bGridOnTop = ( nSelPos == 1 ); pColorFT->Enable(bGrid); pColorLB->Enable(bGrid); @@ -425,21 +425,21 @@ SfxTabPage* ScTpLayoutOptions::Create( Window* pParent, bool ScTpLayoutOptions::FillItemSet( SfxItemSet& rCoreSet ) { - sal_Bool bRet = sal_True; + bool bRet = true; const sal_Int32 nMPos = m_pUnitLB->GetSelectEntryPos(); if ( nMPos != m_pUnitLB->GetSavedValue() ) { sal_uInt16 nFieldUnit = (sal_uInt16)(sal_IntPtr)m_pUnitLB->GetEntryData( nMPos ); rCoreSet.Put( SfxUInt16Item( SID_ATTR_METRIC, (sal_uInt16)nFieldUnit ) ); - bRet = sal_True; + bRet = true; } if(m_pTabMF->GetText() != m_pTabMF->GetSavedValue()) { rCoreSet.Put(SfxUInt16Item(SID_ATTR_DEFTABSTOP, sal::static_int_cast<sal_uInt16>( m_pTabMF->Denormalize(m_pTabMF->GetValue(FUNIT_TWIP)) ))); - bRet = sal_True; + bRet = true; } ScLkUpdMode nSet=LM_ALWAYS; @@ -461,61 +461,61 @@ bool ScTpLayoutOptions::FillItemSet( SfxItemSet& rCoreSet ) ScAppOptions aAppOptions=SC_MOD()->GetAppOptions(); aAppOptions.SetLinkMode(nSet ); SC_MOD()->SetAppOptions(aAppOptions); - bRet = sal_True; + bRet = true; } if(m_pAlignCB->GetSavedValue() != TriState(m_pAlignCB->IsChecked())) { rCoreSet.Put(SfxBoolItem(SID_SC_INPUT_SELECTION, m_pAlignCB->IsChecked())); - bRet = sal_True; + bRet = true; } if(m_pAlignLB->GetSavedValue() != m_pAlignLB->GetSelectEntryPos()) { rCoreSet.Put(SfxUInt16Item(SID_SC_INPUT_SELECTIONPOS, m_pAlignLB->GetSelectEntryPos())); - bRet = sal_True; + bRet = true; } if(m_pEditModeCB->GetSavedValue() != TriState(m_pEditModeCB->IsChecked())) { rCoreSet.Put(SfxBoolItem(SID_SC_INPUT_EDITMODE, m_pEditModeCB->IsChecked())); - bRet = sal_True; + bRet = true; } if(m_pFormatCB->GetSavedValue() != TriState(m_pFormatCB->IsChecked())) { rCoreSet.Put(SfxBoolItem(SID_SC_INPUT_FMT_EXPAND, m_pFormatCB->IsChecked())); - bRet = sal_True; + bRet = true; } if(m_pExpRefCB->GetSavedValue() != TriState(m_pExpRefCB->IsChecked())) { rCoreSet.Put(SfxBoolItem(SID_SC_INPUT_REF_EXPAND, m_pExpRefCB->IsChecked())); - bRet = sal_True; + bRet = true; } if(m_pMarkHdrCB->GetSavedValue() != TriState(m_pMarkHdrCB->IsChecked())) { rCoreSet.Put(SfxBoolItem(SID_SC_INPUT_MARK_HEADER, m_pMarkHdrCB->IsChecked())); - bRet = sal_True; + bRet = true; } if(m_pTextFmtCB->GetSavedValue() != TriState(m_pTextFmtCB->IsChecked())) { rCoreSet.Put(SfxBoolItem(SID_SC_INPUT_TEXTWYSIWYG, m_pTextFmtCB->IsChecked())); - bRet = sal_True; + bRet = true; } if( m_pReplWarnCB->GetSavedValue() != TriState(m_pReplWarnCB->IsChecked()) ) { rCoreSet.Put( SfxBoolItem( SID_SC_INPUT_REPLCELLSWARN, m_pReplWarnCB->IsChecked() ) ); - bRet = sal_True; + bRet = true; } if( m_pLegacyCellSelectionCB->GetSavedValue() != TriState(m_pLegacyCellSelectionCB->IsChecked()) ) { rCoreSet.Put( SfxBoolItem( SID_SC_INPUT_LEGACY_CELL_SELECTION, m_pLegacyCellSelectionCB->IsChecked() ) ); - bRet = sal_True; + bRet = true; } return bRet; diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx index f53d2a3a3ffe..a34adf63637e 100644 --- a/sc/source/ui/pagedlg/areasdlg.cxx +++ b/sc/source/ui/pagedlg/areasdlg.cxx @@ -193,7 +193,7 @@ void ScPrintAreasDlg::SetReference( const ScRange& rRef, ScDocument* /* pDoc */ } else { - sal_Bool bRow = ( pEdRepeatRow == pRefInputEdit ); + bool bRow = ( pEdRepeatRow == pRefInputEdit ); lcl_GetRepeatRangeString(&rRef, pDoc, bRow, aStr); pRefInputEdit->SetRefString( aStr ); } @@ -401,7 +401,7 @@ void ScPrintAreasDlg::Impl_FillLists() ScRange aRange; OUString aStrRange; - sal_Bool bSimple = sal_True; + bool bSimple = true; if ( pViewData ) bSimple = (pViewData->GetSimpleArea( aRange ) == SC_MARK_SIMPLE); @@ -615,7 +615,7 @@ IMPL_LINK( ScPrintAreasDlg, Impl_ModifyHdl, formula::RefEdit*, pEd ) if ( (nEntryCount > nFirstCustomPos) && !aStrEd.isEmpty() ) { - sal_Bool bFound = false; + bool bFound = false; OUString* pSymbol = NULL; sal_uInt16 i; @@ -646,7 +646,7 @@ static bool lcl_CheckOne_OOO( const OUString& rStr, bool bIsRow, SCCOLROW& rVal OUString aStr = rStr; sal_Int32 nLen = aStr.getLength(); SCCOLROW nNum = 0; - sal_Bool bStrOk = ( nLen > 0 ) && ( bIsRow ? ( nLen < 6 ) : ( nLen < 4 ) ); + bool bStrOk = ( nLen > 0 ) && ( bIsRow ? ( nLen < 6 ) : ( nLen < 4 ) ); if ( bStrOk ) { diff --git a/sc/source/ui/pagedlg/hfedtdlg.cxx b/sc/source/ui/pagedlg/hfedtdlg.cxx index a1a7a7aea816..567f7e1435ad 100644 --- a/sc/source/ui/pagedlg/hfedtdlg.cxx +++ b/sc/source/ui/pagedlg/hfedtdlg.cxx @@ -171,7 +171,7 @@ ScHFEditActiveDlg::ScHFEditActiveDlg( SfxViewFrame* pFrameP, rCoreSet.Get( rCoreSet.GetPool()->GetWhich(SID_ATTR_PAGE) ); - sal_Bool bRightPage = ( SVX_PAGE_LEFT != + bool bRightPage = ( SVX_PAGE_LEFT != SvxPageUsage(rPageItem.GetPageUsage()) ); if ( bRightPage ) @@ -183,13 +183,13 @@ ScHFEditActiveDlg::ScHFEditActiveDlg( SfxViewFrame* pFrameP, { // #69193a# respect "shared" setting - sal_Bool bShareHeader = IS_SHARE_HEADER(rCoreSet); + bool bShareHeader = IS_SHARE_HEADER(rCoreSet); if ( bShareHeader ) AddTabPage( "header", ScRightHeaderEditPage::Create, NULL ); else AddTabPage( "header", ScLeftHeaderEditPage::Create, NULL ); - sal_Bool bShareFooter = IS_SHARE_FOOTER(rCoreSet); + bool bShareFooter = IS_SHARE_FOOTER(rCoreSet); if ( bShareFooter ) AddTabPage( "footer", ScRightFooterEditPage::Create, NULL ); else diff --git a/sc/source/ui/pagedlg/tphf.cxx b/sc/source/ui/pagedlg/tphf.cxx index c382b413ec77..ed0ca2143076 100644 --- a/sc/source/ui/pagedlg/tphf.cxx +++ b/sc/source/ui/pagedlg/tphf.cxx @@ -94,7 +94,7 @@ void ScHFPage::Reset( const SfxItemSet& rSet ) bool ScHFPage::FillItemSet( SfxItemSet& rOutSet ) { - sal_Bool bResult = SvxHFPage::FillItemSet( rOutSet ); + bool bResult = SvxHFPage::FillItemSet( rOutSet ); if ( nId == SID_ATTR_PAGE_HEADERSET ) { @@ -207,7 +207,7 @@ IMPL_LINK_NOARG(ScHFPage, HFEditHdl) OUString aText; SfxSingleTabDialog* pDlg = new SfxSingleTabDialog(this, aDataSet); const int nSettingsId = 42; - sal_Bool bRightPage = m_pCntSharedBox->IsChecked() + bool bRightPage = m_pCntSharedBox->IsChecked() || ( SVX_PAGE_LEFT != SvxPageUsage(nPageUsage) ); if ( nId == SID_ATTR_PAGE_HEADERSET ) diff --git a/sc/source/ui/pagedlg/tptable.cxx b/sc/source/ui/pagedlg/tptable.cxx index 581d23719196..c00dffb0d9cc 100644 --- a/sc/source/ui/pagedlg/tptable.cxx +++ b/sc/source/ui/pagedlg/tptable.cxx @@ -39,12 +39,12 @@ static sal_uInt16 pPageTableRanges[] = 0 }; -static sal_Bool lcl_PutVObjModeItem( sal_uInt16 nWhich, +static bool lcl_PutVObjModeItem( sal_uInt16 nWhich, SfxItemSet& rCoreSet, const SfxItemSet& rOldSet, const CheckBox& rBtn ); -static sal_Bool lcl_PutScaleItem( sal_uInt16 nWhich, +static bool lcl_PutScaleItem( sal_uInt16 nWhich, SfxItemSet& rCoreSet, const SfxItemSet& rOldSet, const ListBox& rListBox, @@ -52,7 +52,7 @@ static sal_Bool lcl_PutScaleItem( sal_uInt16 nWhich, const SpinField& rEd, sal_uInt16 nValue ); -static sal_Bool lcl_PutScaleItem2( sal_uInt16 nWhich, +static bool lcl_PutScaleItem2( sal_uInt16 nWhich, SfxItemSet& rCoreSet, const SfxItemSet& rOldSet, const ListBox& rListBox, @@ -60,11 +60,11 @@ static sal_Bool lcl_PutScaleItem2( sal_uInt16 nWhich, const NumericField& rEd1, const NumericField& rEd2 ); -static sal_Bool lcl_PutBoolItem( sal_uInt16 nWhich, +static bool lcl_PutBoolItem( sal_uInt16 nWhich, SfxItemSet& rCoreSet, const SfxItemSet& rOldSet, - sal_Bool bIsChecked, - sal_Bool bSavedValue ); + bool bIsChecked, + bool bSavedValue ); #define PAGENO_HDL LINK(this,ScTablePage,PageNoHdl) @@ -142,7 +142,7 @@ SfxTabPage* ScTablePage::Create( Window* pParent, const SfxItemSet& rCoreSet ) void ScTablePage::Reset( const SfxItemSet& rCoreSet ) { - sal_Bool bTopDown = GET_BOOL( SID_SCATTR_PAGE_TOPDOWN, rCoreSet ); + bool bTopDown = GET_BOOL( SID_SCATTR_PAGE_TOPDOWN, rCoreSet ); sal_uInt16 nWhich = 0; // sal_Bool flags @@ -235,7 +235,7 @@ bool ScTablePage::FillItemSet( SfxItemSet& rCoreSet ) { const SfxItemSet& rOldSet = GetItemSet(); sal_uInt16 nWhichPageNo = GetWhich(SID_SCATTR_PAGE_FIRSTPAGENO); - sal_Bool bDataChanged = false; + bool bDataChanged = false; // sal_Bool flags bDataChanged |= lcl_PutBoolItem( GetWhich(SID_SCATTR_PAGE_NOTES), @@ -269,11 +269,11 @@ bool ScTablePage::FillItemSet( SfxItemSet& rCoreSet ) m_pBtnNullVals->GetSavedValue() != TRISTATE_FALSE ); // first printed page: - sal_Bool bUseValue = m_pBtnPageNo->IsChecked(); + bool bUseValue = m_pBtnPageNo->IsChecked(); if ( WAS_DEFAULT(nWhichPageNo,rOldSet) - && ( (!bUseValue && bUseValue == m_pBtnPageNo->GetSavedValue()) - || ( bUseValue && bUseValue == m_pBtnPageNo->GetSavedValue() + && ( (!bUseValue && (bUseValue ? 1 : 0) == m_pBtnPageNo->GetSavedValue()) + || ( bUseValue && (bUseValue ? 1 : 0) == m_pBtnPageNo->GetSavedValue() && m_pEdPageNo->GetText() == m_pEdPageNo->GetSavedValue() ) ) ) { rCoreSet.ClearItem( nWhichPageNo ); @@ -285,7 +285,7 @@ bool ScTablePage::FillItemSet( SfxItemSet& rCoreSet ) : 0 ); rCoreSet.Put( SfxUInt16Item( nWhichPageNo, nPage ) ); - bDataChanged = sal_True; + bDataChanged = true; } // object representation: @@ -376,13 +376,13 @@ IMPL_LINK_NOARG(ScTablePage, ScaleHdl) // Helper functions for FillItemSet: -static sal_Bool lcl_PutBoolItem( sal_uInt16 nWhich, +static bool lcl_PutBoolItem( sal_uInt16 nWhich, SfxItemSet& rCoreSet, const SfxItemSet& rOldSet, - sal_Bool bIsChecked, - sal_Bool bSavedValue ) + bool bIsChecked, + bool bSavedValue ) { - sal_Bool bDataChanged = ( bSavedValue == bIsChecked + bool bDataChanged = ( bSavedValue == bIsChecked && WAS_DEFAULT(nWhich,rOldSet) ); if ( bDataChanged ) @@ -393,14 +393,14 @@ static sal_Bool lcl_PutBoolItem( sal_uInt16 nWhich, return bDataChanged; } -static sal_Bool lcl_PutVObjModeItem( sal_uInt16 nWhich, +static bool lcl_PutVObjModeItem( sal_uInt16 nWhich, SfxItemSet& rCoreSet, const SfxItemSet& rOldSet, const CheckBox& rBtn ) { - sal_Bool bIsChecked = rBtn.IsChecked(); - sal_Bool bDataChanged = ( rBtn.GetSavedValue() == bIsChecked - && WAS_DEFAULT(nWhich,rOldSet) ); + bool bIsChecked = rBtn.IsChecked(); + bool bDataChanged = rBtn.GetSavedValue() == (bIsChecked ? 1 : 0) + && WAS_DEFAULT(nWhich,rOldSet); if ( bDataChanged ) rCoreSet.ClearItem( nWhich ); @@ -412,7 +412,7 @@ static sal_Bool lcl_PutVObjModeItem( sal_uInt16 nWhich, return bDataChanged; } -static sal_Bool lcl_PutScaleItem( sal_uInt16 nWhich, +static bool lcl_PutScaleItem( sal_uInt16 nWhich, SfxItemSet& rCoreSet, const SfxItemSet& rOldSet, const ListBox& rListBox, @@ -420,8 +420,8 @@ static sal_Bool lcl_PutScaleItem( sal_uInt16 nWhich, const SpinField& rEd, sal_uInt16 nValue ) { - sal_Bool bIsSel = (rListBox.GetSelectEntryPos() == nLBEntry); - sal_Bool bDataChanged = (rListBox.GetSavedValue() != nLBEntry) || + bool bIsSel = (rListBox.GetSelectEntryPos() == nLBEntry); + bool bDataChanged = (rListBox.GetSavedValue() != nLBEntry) || (rEd.GetSavedValue() != rEd.GetText()) || !WAS_DEFAULT( nWhich, rOldSet ); @@ -434,7 +434,7 @@ static sal_Bool lcl_PutScaleItem( sal_uInt16 nWhich, } -static sal_Bool lcl_PutScaleItem2( sal_uInt16 nWhich, +static bool lcl_PutScaleItem2( sal_uInt16 nWhich, SfxItemSet& rCoreSet, const SfxItemSet& rOldSet, const ListBox& rListBox, @@ -444,8 +444,8 @@ static sal_Bool lcl_PutScaleItem2( sal_uInt16 nWhich, { sal_uInt16 nValue1 = (sal_uInt16)rEd1.GetValue(); sal_uInt16 nValue2 = (sal_uInt16)rEd2.GetValue(); - sal_Bool bIsSel = (rListBox.GetSelectEntryPos() == nLBEntry); - sal_Bool bDataChanged = (rListBox.GetSavedValue() != nLBEntry) || + bool bIsSel = (rListBox.GetSelectEntryPos() == nLBEntry); + bool bDataChanged = (rListBox.GetSavedValue() != nLBEntry) || (rEd1.GetSavedValue() != rEd1.GetText()) || (rEd2.GetSavedValue() != rEd2.GetText()) || !WAS_DEFAULT( nWhich, rOldSet ); diff --git a/sc/source/ui/undo/undoblk2.cxx b/sc/source/ui/undo/undoblk2.cxx index 4815ed3a2e9c..674f9bb62f23 100644 --- a/sc/source/ui/undo/undoblk2.cxx +++ b/sc/source/ui/undo/undoblk2.cxx @@ -135,11 +135,11 @@ void ScUndoWidthOrHeight::Redo() { BeginRedo(); - sal_Bool bPaintAll = false; + bool bPaintAll = false; if (eMode==SC_SIZE_OPTIMAL) { if ( SetViewMarkData( aMarkData ) ) - bPaintAll = sal_True; // paint all, because of changed selection + bPaintAll = true; // paint all, because of changed selection } ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); diff --git a/sc/source/ui/undo/undostyl.cxx b/sc/source/ui/undo/undostyl.cxx index 811e85e54596..b0e240fcd321 100644 --- a/sc/source/ui/undo/undostyl.cxx +++ b/sc/source/ui/undo/undostyl.cxx @@ -103,7 +103,7 @@ OUString ScUndoModifyStyle::GetComment() const return ScGlobal::GetRscString( nId ); } -static void lcl_DocStyleChanged( ScDocument* pDoc, SfxStyleSheetBase* pStyle, sal_Bool bRemoved ) +static void lcl_DocStyleChanged( ScDocument* pDoc, SfxStyleSheetBase* pStyle, bool bRemoved ) { //! move to document or docshell @@ -125,8 +125,8 @@ void ScUndoModifyStyle::DoChange( ScDocShell* pDocSh, const OUString& rName, ScDocument* pDoc = pDocSh->GetDocument(); ScStyleSheetPool* pStlPool = pDoc->GetStyleSheetPool(); OUString aNewName = rData.GetName(); - sal_Bool bDelete = aNewName.isEmpty(); // no new name -> delete style - sal_Bool bNew = ( rName.isEmpty() && !bDelete ); // creating new style + bool bDelete = aNewName.isEmpty(); // no new name -> delete style + bool bNew = ( rName.isEmpty() && !bDelete ); // creating new style SfxStyleSheetBase* pStyle = NULL; if ( !rName.isEmpty() ) @@ -155,7 +155,7 @@ void ScUndoModifyStyle::DoChange( ScDocShell* pDocSh, const OUString& rName, if ( bDelete ) { if ( eStyleFamily == SFX_STYLE_FAMILY_PARA ) - lcl_DocStyleChanged( pDoc, pStyle, sal_True ); // TRUE: remove usage of style + lcl_DocStyleChanged( pDoc, pStyle, true ); // TRUE: remove usage of style else pDoc->RemovePageStyleInUse( rName ); diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx index 6c9403ec23fa..f46a034b805f 100644 --- a/sc/source/ui/undo/undotab.cxx +++ b/sc/source/ui/undo/undotab.cxx @@ -49,7 +49,7 @@ #include <vector> -extern sal_Bool bDrawIsInUndo; // somewhere as member! +extern bool bDrawIsInUndo; // somewhere as member! using namespace com::sun::star; using ::com::sun::star::uno::Sequence; @@ -119,7 +119,7 @@ void ScUndoInsertTab::Undo() pViewShell->SetTabNo(nTab); pDocShell->SetInUndo( true ); //! BeginUndo - bDrawIsInUndo = sal_True; + bDrawIsInUndo = true; pViewShell->DeleteTable( nTab, false ); bDrawIsInUndo = false; pDocShell->SetInUndo( false ); //! EndUndo @@ -141,7 +141,7 @@ void ScUndoInsertTab::Redo() RedoSdrUndoAction( pDrawUndo ); // Draw Redo first pDocShell->SetInUndo( true ); //! BeginRedo - bDrawIsInUndo = sal_True; + bDrawIsInUndo = true; if (bAppend) pViewShell->AppendTable( sNewName, false ); else @@ -216,7 +216,7 @@ void ScUndoInsertTables::Undo() pViewShell->SetTabNo(nTab); pDocShell->SetInUndo( true ); //! BeginUndo - bDrawIsInUndo = sal_True; + bDrawIsInUndo = true; pViewShell->DeleteTables( nTab, static_cast<SCTAB>(aNameList.size()) ); @@ -240,7 +240,7 @@ void ScUndoInsertTables::Redo() RedoSdrUndoAction( pDrawUndo ); // Draw Redo first pDocShell->SetInUndo( true ); //! BeginRedo - bDrawIsInUndo = sal_True; + bDrawIsInUndo = true; pViewShell->SetTabNo(nTab); pViewShell->InsertTables( aNameList, nTab, static_cast<SCTAB>(aNameList.size()),false ); @@ -349,7 +349,7 @@ void ScUndoDeleteTab::Undo() sal_uInt16 nScenFlags; pRefUndoDoc->GetScenarioData( nTab, aComment, aColor, nScenFlags ); pDoc->SetScenarioData( nTab, aComment, aColor, nScenFlags ); - sal_Bool bActive = pRefUndoDoc->IsActiveScenario( nTab ); + bool bActive = pRefUndoDoc->IsActiveScenario( nTab ); pDoc->SetActiveScenario( nTab, bActive ); } pDoc->SetVisible( nTab, pRefUndoDoc->IsVisible( nTab ) ); @@ -397,7 +397,7 @@ void ScUndoDeleteTab::Redo() RedoSdrUndoAction( pDrawUndo ); // Draw Redo first pDocShell->SetInUndo( true ); //! BeginRedo - bDrawIsInUndo = sal_True; + bDrawIsInUndo = true; pViewShell->DeleteTables( theTabs, false ); bDrawIsInUndo = false; pDocShell->SetInUndo( true ); //! EndRedo @@ -638,7 +638,7 @@ void ScUndoCopyTab::Undo() if (nDestTab > MAXTAB) // append? nDestTab = pDoc->GetTableCount() - 1; - bDrawIsInUndo = sal_True; + bDrawIsInUndo = true; pDoc->DeleteTab(nDestTab); bDrawIsInUndo = false; } @@ -672,7 +672,7 @@ void ScUndoCopyTab::Redo() if (nDestTab > MAXTAB) // appended ? nDestTab = pDoc->GetTableCount() - 1; - bDrawIsInUndo = sal_True; + bDrawIsInUndo = true; pDoc->CopyTab( nOldTab, nNewTab ); bDrawIsInUndo = false; @@ -690,9 +690,9 @@ void ScUndoCopyTab::Redo() sal_uInt16 nScenFlags; pDoc->GetScenarioData(nAdjSource, aComment, aColor, nScenFlags ); pDoc->SetScenarioData(nNewTab, aComment, aColor, nScenFlags ); - sal_Bool bActive = pDoc->IsActiveScenario(nAdjSource); + bool bActive = pDoc->IsActiveScenario(nAdjSource); pDoc->SetActiveScenario(nNewTab, bActive ); - sal_Bool bVisible=pDoc->IsVisible(nAdjSource); + bool bVisible=pDoc->IsVisible(nAdjSource); pDoc->SetVisible(nNewTab,bVisible ); } @@ -826,7 +826,7 @@ void ScUndoMakeScenario::Undo() ScDocument* pDoc = pDocShell->GetDocument(); pDocShell->SetInUndo( true ); - bDrawIsInUndo = sal_True; + bDrawIsInUndo = true; pDoc->DeleteTab( nDestTab ); bDrawIsInUndo = false; pDocShell->SetInUndo( false ); @@ -853,7 +853,7 @@ void ScUndoMakeScenario::Redo() RedoSdrUndoAction( pDrawUndo ); // Draw Redo first pDocShell->SetInUndo( true ); - bDrawIsInUndo = sal_True; + bDrawIsInUndo = true; pDocShell->MakeScenario( nSrcTab, aName, aComment, aColor, nFlags, *mpMarkData, false ); @@ -930,7 +930,7 @@ void ScUndoImportTab::Undo() SCTAB i; ScDocument* pDoc = pDocShell->GetDocument(); - sal_Bool bMakeRedo = !pRedoDoc; + bool bMakeRedo = !pRedoDoc; if (bMakeRedo) { pRedoDoc = new ScDocument( SCDOCMODE_UNDO ); @@ -954,9 +954,9 @@ void ScUndoImportTab::Undo() sal_uInt16 nScenFlags; pDoc->GetScenarioData(nTabPos, aComment, aColor, nScenFlags ); pRedoDoc->SetScenarioData(nTabPos, aComment, aColor, nScenFlags ); - sal_Bool bActive = pDoc->IsActiveScenario(nTabPos); + bool bActive = pDoc->IsActiveScenario(nTabPos); pRedoDoc->SetActiveScenario(nTabPos, bActive ); - sal_Bool bVisible=pDoc->IsVisible(nTabPos); + bool bVisible=pDoc->IsVisible(nTabPos); pRedoDoc->SetVisible(nTabPos,bVisible ); } @@ -968,7 +968,7 @@ void ScUndoImportTab::Undo() DoSdrUndoAction( pDrawUndo, pDoc ); // before the sheets are deleted - bDrawIsInUndo = sal_True; + bDrawIsInUndo = true; for (i=0; i<nCount; i++) pDoc->DeleteTab( nTab ); bDrawIsInUndo = false; @@ -991,7 +991,7 @@ void ScUndoImportTab::Redo() { SCTAB nTabPos=nTab+i; pRedoDoc->GetName(nTabPos,aName); - bDrawIsInUndo = sal_True; + bDrawIsInUndo = true; pDoc->InsertTab(nTabPos,aName); bDrawIsInUndo = false; } @@ -1009,9 +1009,9 @@ void ScUndoImportTab::Redo() sal_uInt16 nScenFlags; pRedoDoc->GetScenarioData(nTabPos, aComment, aColor, nScenFlags ); pDoc->SetScenarioData(nTabPos, aComment, aColor, nScenFlags ); - sal_Bool bActive = pRedoDoc->IsActiveScenario(nTabPos); + bool bActive = pRedoDoc->IsActiveScenario(nTabPos); pDoc->SetActiveScenario(nTabPos, bActive ); - sal_Bool bVisible=pRedoDoc->IsVisible(nTabPos); + bool bVisible=pRedoDoc->IsVisible(nTabPos); pDoc->SetVisible(nTabPos,bVisible ); } diff --git a/sc/source/ui/unoobj/afmtuno.cxx b/sc/source/ui/unoobj/afmtuno.cxx index 9193aa148bb7..690b070a7d38 100644 --- a/sc/source/ui/unoobj/afmtuno.cxx +++ b/sc/source/ui/unoobj/afmtuno.cxx @@ -224,7 +224,7 @@ void SAL_CALL ScAutoFormatsObj::insertByName( const OUString& aName, const uno:: std::exception) { SolarMutexGuard aGuard; - sal_Bool bDone = false; + bool bDone = false; // Reflection muss nicht uno::XInterface sein, kann auch irgendein Interface sein... uno::Reference< uno::XInterface > xInterface(aElement, uno::UNO_QUERY); if ( xInterface.is() ) @@ -250,7 +250,7 @@ void SAL_CALL ScAutoFormatsObj::insertByName( const OUString& aName, const uno:: if (lcl_FindAutoFormatIndex( *pFormats, aNameStr, nNewIndex )) { pFormatObj->InitFormat( nNewIndex ); // kann jetzt benutzt werden - bDone = sal_True; + bDone = true; } } else @@ -584,7 +584,7 @@ void SAL_CALL ScAutoFormatObj::setPropertyValue( OSL_ENSURE(pData,"AutoFormat Daten nicht da"); OUString aPropString(aPropertyName); - sal_Bool bBool = sal_Bool(); + bool bBool; if (aPropString.equalsAscii( SC_UNONAME_INCBACK ) && (aValue >>= bBool)) pData->SetIncludeBackground( bBool ); else if (aPropString.equalsAscii( SC_UNONAME_INCBORD ) && (aValue >>= bBool)) @@ -618,8 +618,8 @@ uno::Any SAL_CALL ScAutoFormatObj::getPropertyValue( const OUString& aPropertyNa ScAutoFormatData* pData = pFormats->findByIndex(nFormatIndex); OSL_ENSURE(pData,"AutoFormat Daten nicht da"); - sal_Bool bValue; - sal_Bool bError = false; + bool bValue; + bool bError = false; if (aPropertyName.equalsAscii( SC_UNONAME_INCBACK )) bValue = pData->GetIncludeBackground(); @@ -634,7 +634,7 @@ uno::Any SAL_CALL ScAutoFormatObj::getPropertyValue( const OUString& aPropertyNa else if (aPropertyName.equalsAscii( SC_UNONAME_INCWIDTH )) bValue = pData->GetIncludeWidthHeight(); else - bError = sal_True; // unbekannte Property + bError = true; // unbekannte Property if (!bError) aAny <<= bValue; @@ -691,7 +691,7 @@ void SAL_CALL ScAutoFormatFieldObj::setPropertyValue( { if( const SfxPoolItem* pItem = pData->GetItem( nFieldIndex, pEntry->nWID ) ) { - sal_Bool bDone = false; + bool bDone = false; switch( pEntry->nWID ) { @@ -721,7 +721,7 @@ void SAL_CALL ScAutoFormatFieldObj::setPropertyValue( // added to avoid warnings } } - bDone = sal_True; + bDone = true; } } break; @@ -802,7 +802,7 @@ uno::Any SAL_CALL ScAutoFormatFieldObj::getPropertyValue( const OUString& aPrope { const SfxInt32Item* pRotItem = (const SfxInt32Item*)pData->GetItem( nFieldIndex, ATTR_ROTATE_VALUE ); sal_Int32 nRot = pRotItem ? pRotItem->GetValue() : 0; - sal_Bool bStacked = ((const SfxBoolItem*)pItem)->GetValue(); + bool bStacked = ((const SfxBoolItem*)pItem)->GetValue(); SvxOrientationItem( nRot, bStacked, 0 ).QueryValue( aVal ); } break; diff --git a/sc/source/ui/unoobj/appluno.cxx b/sc/source/ui/unoobj/appluno.cxx index 1e5ce98ca677..2878fedd8cbe 100644 --- a/sc/source/ui/unoobj/appluno.cxx +++ b/sc/source/ui/unoobj/appluno.cxx @@ -330,10 +330,10 @@ uno::Sequence<OUString> ScSpreadsheetSettings::getSupportedServiceNames_Static() return aRet; } -sal_Bool ScSpreadsheetSettings::getPropertyBool(const OUString& aPropertyName) throw (css::uno::RuntimeException) +bool ScSpreadsheetSettings::getPropertyBool(const OUString& aPropertyName) throw (css::uno::RuntimeException) { uno::Any any = getPropertyValue(aPropertyName); - sal_Bool b = sal_False; + bool b = false; any >>= b; return b; } @@ -369,74 +369,74 @@ void SAL_CALL ScSpreadsheetSettings::setPropertyValue( ScModule* pScMod = SC_MOD(); ScAppOptions aAppOpt(pScMod->GetAppOptions()); ScInputOptions aInpOpt(pScMod->GetInputOptions()); - sal_Bool bSaveApp = false; - sal_Bool bSaveInp = false; + bool bSaveApp = false; + bool bSaveInp = false; // print options aren't loaded until needed if (aString.equalsAscii( SC_UNONAME_DOAUTOCP )) { aAppOpt.SetAutoComplete( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); - bSaveApp = sal_True; + bSaveApp = true; } else if (aString.equalsAscii( SC_UNONAME_ENTERED )) { aInpOpt.SetEnterEdit( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); - bSaveInp = sal_True; + bSaveInp = true; } else if (aString.equalsAscii( SC_UNONAME_EXPREF )) { aInpOpt.SetExpandRefs( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); - bSaveInp = sal_True; + bSaveInp = true; } else if (aString.equalsAscii( SC_UNONAME_EXTFMT )) { aInpOpt.SetExtendFormat( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); - bSaveInp = sal_True; + bSaveInp = true; } else if (aString.equalsAscii( SC_UNONAME_LINKUPD )) { aAppOpt.SetLinkMode( (ScLkUpdMode) ScUnoHelpFunctions::GetInt16FromAny( aValue ) ); - bSaveApp = sal_True; + bSaveApp = true; } else if (aString.equalsAscii( SC_UNONAME_MARKHDR )) { aInpOpt.SetMarkHeader( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); - bSaveInp = sal_True; + bSaveInp = true; } else if (aString.equalsAscii( SC_UNONAME_MOVESEL )) { aInpOpt.SetMoveSelection( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); - bSaveInp = sal_True; + bSaveInp = true; } else if (aString.equalsAscii( SC_UNONAME_RANGEFIN )) { aInpOpt.SetRangeFinder( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); - bSaveInp = sal_True; + bSaveInp = true; } else if (aString.equalsAscii( SC_UNONAME_USETABCOL )) { aInpOpt.SetUseTabCol( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); - bSaveInp = sal_True; + bSaveInp = true; } else if (aString.equalsAscii( SC_UNONAME_PRMETRICS )) { aInpOpt.SetTextWysiwyg( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); - bSaveInp = sal_True; + bSaveInp = true; } else if (aString.equalsAscii( SC_UNONAME_REPLWARN )) { aInpOpt.SetReplaceCellsWarn( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); - bSaveInp = sal_True; + bSaveInp = true; } else if (aString.equalsAscii( SC_UNONAME_METRIC )) { aAppOpt.SetAppMetric( (FieldUnit) ScUnoHelpFunctions::GetInt16FromAny( aValue ) ); - bSaveApp = sal_True; + bSaveApp = true; } else if (aString.equalsAscii( SC_UNONAME_MOVEDIR )) { aInpOpt.SetMoveDir( ScUnoHelpFunctions::GetInt16FromAny( aValue ) ); - bSaveInp = sal_True; + bSaveInp = true; } else if (aString.equalsAscii( SC_UNONAME_SCALE )) { @@ -457,12 +457,12 @@ void SAL_CALL ScSpreadsheetSettings::setPropertyValue( aAppOpt.SetZoom( nVal ); aAppOpt.SetZoomType( SVX_ZOOM_PERCENT ); } - bSaveApp = sal_True; + bSaveApp = true; } else if (aString.equalsAscii( SC_UNONAME_STBFUNC )) { aAppOpt.SetStatusFunc( ScUnoHelpFunctions::GetInt16FromAny( aValue ) ); - bSaveApp = sal_True; + bSaveApp = true; } else if (aString.equalsAscii( SC_UNONAME_ULISTS )) { @@ -482,7 +482,7 @@ void SAL_CALL ScSpreadsheetSettings::setPropertyValue( ScUserListData* pData = new ScUserListData(aEntry); pUserList->push_back(pData); } - bSaveApp = sal_True; // Liste wird mit den App-Optionen gespeichert + bSaveApp = true; // Liste wird mit den App-Optionen gespeichert } } else if (aString.equalsAscii( SC_UNONAME_PRALLSH )) diff --git a/sc/source/ui/unoobj/celllistsource.cxx b/sc/source/ui/unoobj/celllistsource.cxx index 51aa0a826742..917167e67157 100644 --- a/sc/source/ui/unoobj/celllistsource.cxx +++ b/sc/source/ui/unoobj/celllistsource.cxx @@ -322,7 +322,7 @@ namespace calc // get the cell address CellRangeAddress aRangeAddress; - sal_Bool bFoundAddress = false; + bool bFoundAddress = false; const Any* pLoop = _rArguments.getConstArray(); const Any* pLoopEnd = _rArguments.getConstArray() + _rArguments.getLength(); @@ -334,7 +334,7 @@ namespace calc if ( aValue.Name == "CellRange" ) { if ( aValue.Value >>= aRangeAddress ) - bFoundAddress = sal_True; + bFoundAddress = true; } } } diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index 1e2a1dcd2d84..9a1302566057 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -912,14 +912,14 @@ static SCTAB lcl_FirstTab( const ScRangeList& rRanges ) return 0; // soll nicht sein } -static sal_Bool lcl_WholeSheet( const ScRangeList& rRanges ) +static bool lcl_WholeSheet( const ScRangeList& rRanges ) { if ( rRanges.size() == 1 ) { const ScRange* pRange = rRanges[0]; if ( pRange && pRange->aStart.Col() == 0 && pRange->aEnd.Col() == MAXCOL && pRange->aStart.Row() == 0 && pRange->aEnd.Row() == MAXROW ) - return sal_True; + return true; } return false; } @@ -1045,7 +1045,7 @@ void ScHelperFunctions::ApplyBorder( ScDocShell* pDocShell, const ScRangeList& r const SvxBoxItem& rOuter, const SvxBoxInfoItem& rInner ) { ScDocument* pDoc = pDocShell->GetDocument(); - sal_Bool bUndo(pDoc->IsUndoEnabled()); + bool bUndo(pDoc->IsUndoEnabled()); ScDocument* pUndoDoc = NULL; if (bUndo) pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); @@ -1087,7 +1087,7 @@ void ScHelperFunctions::ApplyBorder( ScDocShell* pDocShell, const ScRangeList& r //! move lcl_PutDataArray to docfunc? //! merge loop with ScFunctionAccess::callFunction -static sal_Bool lcl_PutDataArray( ScDocShell& rDocShell, const ScRange& rRange, +static bool lcl_PutDataArray( ScDocShell& rDocShell, const ScRange& rRange, const uno::Sequence< uno::Sequence<uno::Any> >& aData ) { ScDocument* pDoc = rDocShell.GetDocument(); @@ -1096,7 +1096,7 @@ static sal_Bool lcl_PutDataArray( ScDocShell& rDocShell, const ScRange& rRange, SCROW nStartRow = rRange.aStart.Row(); SCCOL nEndCol = rRange.aEnd.Col(); SCROW nEndRow = rRange.aEnd.Row(); - sal_Bool bUndo(pDoc->IsUndoEnabled()); + bool bUndo(pDoc->IsUndoEnabled()); if ( !pDoc->IsBlockEditable( nTab, nStartCol,nStartRow, nEndCol,nEndRow ) ) { @@ -1126,7 +1126,7 @@ static sal_Bool lcl_PutDataArray( ScDocShell& rDocShell, const ScRange& rRange, pDoc->DeleteAreaTab( nStartCol, nStartRow, nEndCol, nEndRow, nTab, IDF_CONTENTS ); - sal_Bool bError = false; + bool bError = false; SCROW nDocRow = nStartRow; for (long nRow=0; nRow<nRows; nRow++) { @@ -1200,12 +1200,12 @@ static sal_Bool lcl_PutDataArray( ScDocShell& rDocShell, const ScRange& rRange, } } else - bError = sal_True; // wrong size + bError = true; // wrong size ++nDocRow; } - sal_Bool bHeight = rDocShell.AdjustRowHeight( nStartRow, nEndRow, nTab ); + bool bHeight = rDocShell.AdjustRowHeight( nStartRow, nEndRow, nTab ); if ( pUndoDoc ) { @@ -1225,7 +1225,7 @@ static sal_Bool lcl_PutDataArray( ScDocShell& rDocShell, const ScRange& rRange, return !bError; } -static sal_Bool lcl_PutFormulaArray( ScDocShell& rDocShell, const ScRange& rRange, +static bool lcl_PutFormulaArray( ScDocShell& rDocShell, const ScRange& rRange, const uno::Sequence< uno::Sequence<OUString> >& aData, const formula::FormulaGrammar::Grammar eGrammar ) { @@ -1235,7 +1235,7 @@ static sal_Bool lcl_PutFormulaArray( ScDocShell& rDocShell, const ScRange& rRang SCROW nStartRow = rRange.aStart.Row(); SCCOL nEndCol = rRange.aEnd.Col(); SCROW nEndRow = rRange.aEnd.Row(); - sal_Bool bUndo(pDoc->IsUndoEnabled()); + bool bUndo(pDoc->IsUndoEnabled()); if ( !pDoc->IsBlockEditable( nTab, nStartCol,nStartRow, nEndCol,nEndRow ) ) { @@ -1306,7 +1306,7 @@ static sal_Bool lcl_PutFormulaArray( ScDocShell& rDocShell, const ScRange& rRang ++nDocRow; } - sal_Bool bHeight = rDocShell.AdjustRowHeight( nStartRow, nEndRow, nTab ); + bool bHeight = rDocShell.AdjustRowHeight( nStartRow, nEndRow, nTab ); if ( pUndoDoc ) { @@ -1327,7 +1327,7 @@ static sal_Bool lcl_PutFormulaArray( ScDocShell& rDocShell, const ScRange& rRang } // used in ScCellRangeObj::getFormulaArray and ScCellObj::GetInputString_Impl -static OUString lcl_GetInputString( ScDocument* pDoc, const ScAddress& rPos, sal_Bool bEnglish ) +static OUString lcl_GetInputString( ScDocument* pDoc, const ScAddress& rPos, bool bEnglish ) { if (!pDoc) return EMPTY_OUSTRING; @@ -1374,7 +1374,7 @@ static OUString lcl_GetInputString( ScDocument* pDoc, const ScAddress& rPos, sal { double fDummy; OUString aTempString = aVal; - sal_Bool bIsNumberFormat(pFormatter->IsNumberFormat(aTempString, nNumFmt, fDummy)); + bool bIsNumberFormat(pFormatter->IsNumberFormat(aTempString, nNumFmt, fDummy)); if ( bIsNumberFormat ) aTempString = "'" + aTempString; else if ( aTempString.startsWith("'") ) @@ -2065,8 +2065,8 @@ uno::Any SAL_CALL ScCellRangesBase::getPropertyDefault( const OUString& aPropert case SC_WID_UNO_CONDLOC: case SC_WID_UNO_CONDXML: { - sal_Bool bEnglish = ( pEntry->nWID != SC_WID_UNO_CONDLOC ); - sal_Bool bXML = ( pEntry->nWID == SC_WID_UNO_CONDXML ); + bool bEnglish = ( pEntry->nWID != SC_WID_UNO_CONDLOC ); + bool bXML = ( pEntry->nWID == SC_WID_UNO_CONDXML ); formula::FormulaGrammar::Grammar eGrammar = (bXML ? pDoc->GetStorageGrammar() : formula::FormulaGrammar::mapAPItoGrammar( bEnglish, bXML)); @@ -2079,8 +2079,8 @@ uno::Any SAL_CALL ScCellRangesBase::getPropertyDefault( const OUString& aPropert case SC_WID_UNO_VALILOC: case SC_WID_UNO_VALIXML: { - sal_Bool bEnglish = ( pEntry->nWID != SC_WID_UNO_VALILOC ); - sal_Bool bXML = ( pEntry->nWID == SC_WID_UNO_VALIXML ); + bool bEnglish = ( pEntry->nWID != SC_WID_UNO_VALILOC ); + bool bXML = ( pEntry->nWID == SC_WID_UNO_VALIXML ); formula::FormulaGrammar::Grammar eGrammar = (bXML ? pDoc->GetStorageGrammar() : formula::FormulaGrammar::mapAPItoGrammar( bEnglish, bXML)); @@ -2370,8 +2370,8 @@ void ScCellRangesBase::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pE if (pFormat) { ScDocument* pDoc = pDocShell->GetDocument(); - sal_Bool bEnglish = ( pEntry->nWID != SC_WID_UNO_CONDLOC ); - sal_Bool bXML = ( pEntry->nWID == SC_WID_UNO_CONDXML ); + bool bEnglish = ( pEntry->nWID != SC_WID_UNO_CONDLOC ); + bool bXML = ( pEntry->nWID == SC_WID_UNO_CONDXML ); formula::FormulaGrammar::Grammar eGrammar = (bXML ? formula::FormulaGrammar::GRAM_UNSPECIFIED : formula::FormulaGrammar::mapAPItoGrammar( bEnglish, bXML)); @@ -2397,8 +2397,8 @@ void ScCellRangesBase::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pE if (pValidObj) { ScDocument* pDoc = pDocShell->GetDocument(); - sal_Bool bEnglish = ( pEntry->nWID != SC_WID_UNO_VALILOC ); - sal_Bool bXML = ( pEntry->nWID == SC_WID_UNO_VALIXML ); + bool bEnglish = ( pEntry->nWID != SC_WID_UNO_VALILOC ); + bool bXML = ( pEntry->nWID == SC_WID_UNO_VALIXML ); formula::FormulaGrammar::Grammar eGrammar = (bXML ? formula::FormulaGrammar::GRAM_UNSPECIFIED : formula::FormulaGrammar::mapAPItoGrammar( bEnglish, bXML)); @@ -2471,7 +2471,7 @@ void ScCellRangesBase::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pE case ATTR_STACKED: { sal_Int32 nRot = ((const SfxInt32Item&)pDataSet->Get(ATTR_ROTATE_VALUE)).GetValue(); - sal_Bool bStacked = ((const SfxBoolItem&)pDataSet->Get(pEntry->nWID)).GetValue(); + bool bStacked = ((const SfxBoolItem&)pDataSet->Get(pEntry->nWID)).GetValue(); SvxOrientationItem( nRot, bStacked, 0 ).QueryValue( rAny ); } break; @@ -2530,8 +2530,8 @@ void ScCellRangesBase::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pE if ( pPattern ) { ScDocument* pDoc = pDocShell->GetDocument(); - sal_Bool bEnglish = ( pEntry->nWID != SC_WID_UNO_CONDLOC ); - sal_Bool bXML = ( pEntry->nWID == SC_WID_UNO_CONDXML ); + bool bEnglish = ( pEntry->nWID != SC_WID_UNO_CONDLOC ); + bool bXML = ( pEntry->nWID == SC_WID_UNO_CONDXML ); formula::FormulaGrammar::Grammar eGrammar = (bXML ? pDoc->GetStorageGrammar() : formula::FormulaGrammar::mapAPItoGrammar( bEnglish, bXML)); @@ -2553,8 +2553,8 @@ void ScCellRangesBase::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pE if ( pPattern ) { ScDocument* pDoc = pDocShell->GetDocument(); - sal_Bool bEnglish = ( pEntry->nWID != SC_WID_UNO_VALILOC ); - sal_Bool bXML = ( pEntry->nWID == SC_WID_UNO_VALIXML ); + bool bEnglish = ( pEntry->nWID != SC_WID_UNO_VALILOC ); + bool bXML = ( pEntry->nWID == SC_WID_UNO_VALIXML ); formula::FormulaGrammar::Grammar eGrammar = (bXML ? pDoc->GetStorageGrammar() : formula::FormulaGrammar::mapAPItoGrammar( bEnglish, bXML)); @@ -3105,7 +3105,7 @@ void SAL_CALL ScCellRangesBase::setData( const uno::Sequence< uno::Sequence<doub throw(uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - sal_Bool bDone = false; + bool bDone = false; long nRowCount = aData.getLength(); long nColCount = nRowCount ? aData[0].getLength() : 0; ScRangeListRef xChartRanges = GetLimitedChartRanges_Impl( nColCount, nRowCount ); @@ -3145,7 +3145,7 @@ void SAL_CALL ScCellRangesBase::setData( const uno::Sequence< uno::Sequence<doub PaintRanges_Impl( PAINT_GRID ); pDocShell->SetDocumentModified(); ForceChartListener_Impl(); // call listeners for this object synchronously - bDone = sal_True; + bDone = true; } } } @@ -3178,7 +3178,7 @@ void SAL_CALL ScCellRangesBase::setRowDescriptions( throw(uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - sal_Bool bDone = false; + bool bDone = false; if ( bChartColAsHdr ) { long nRowCount = aRowDescriptions.getLength(); @@ -3216,7 +3216,7 @@ void SAL_CALL ScCellRangesBase::setRowDescriptions( PaintRanges_Impl( PAINT_GRID ); pDocShell->SetDocumentModified(); ForceChartListener_Impl(); // call listeners for this object synchronously - bDone = sal_True; + bDone = true; } } } @@ -3250,7 +3250,7 @@ void SAL_CALL ScCellRangesBase::setColumnDescriptions( throw(uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - sal_Bool bDone = false; + bool bDone = false; if ( bChartRowAsHdr ) { long nColCount = aColumnDescriptions.getLength(); @@ -3288,7 +3288,7 @@ void SAL_CALL ScCellRangesBase::setColumnDescriptions( PaintRanges_Impl( PAINT_GRID ); pDocShell->SetDocumentModified(); ForceChartListener_Impl(); // call listeners for this object synchronously - bDone = sal_True; + bDone = true; } } } @@ -3642,7 +3642,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryFormulaC } uno::Reference<sheet::XSheetCellRanges> ScCellRangesBase::QueryDifferences_Impl( - const table::CellAddress& aCompare, sal_Bool bColumnDiff) + const table::CellAddress& aCompare, bool bColumnDiff) { if (pDocShell) { @@ -3773,7 +3773,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryPreceden ScDocument* pDoc = pDocShell->GetDocument(); ScRangeList aNewRanges(aRanges); - sal_Bool bFound; + bool bFound; do { bFound = false; @@ -3822,7 +3822,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryDependen ScDocument* pDoc = pDocShell->GetDocument(); ScRangeList aNewRanges(aRanges); - sal_Bool bFound; + bool bFound; do { bFound = false; @@ -4022,7 +4022,7 @@ sal_Int32 SAL_CALL ScCellRangesBase::replaceAll( const uno::Reference<util::XSea if (pSearchItem) { ScDocument* pDoc = pDocShell->GetDocument(); - sal_Bool bUndo(pDoc->IsUndoEnabled()); + bool bUndo(pDoc->IsUndoEnabled()); pSearchItem->SetCommand( SVX_SEARCHCMD_REPLACE_ALL ); // immer nur innerhalb dieses Objekts pSearchItem->SetSelection( !lcl_WholeSheet(aRanges) ); @@ -4396,7 +4396,7 @@ void SAL_CALL ScCellRangesObj::insertByName( const OUString& aName, const uno::A { SolarMutexGuard aGuard; ScDocShell* pDocSh = GetDocShell(); - sal_Bool bDone = false; + bool bDone = false; //! Type of aElement can be some specific interface instead of XInterface @@ -4425,7 +4425,7 @@ void SAL_CALL ScCellRangesObj::insertByName( const OUString& aName, const uno::A for ( size_t i = 0; i < nAddCount; i++ ) aNew.Join( *rAddRanges[ i ] ); SetNewRanges(aNew); - bDone = sal_True; + bDone = true; if ( !aName.isEmpty() && nAddCount == 1 ) { @@ -4446,7 +4446,7 @@ void SAL_CALL ScCellRangesObj::insertByName( const OUString& aName, const uno::A } } -static sal_Bool lcl_FindRangeByName( const ScRangeList& rRanges, ScDocShell* pDocSh, +static bool lcl_FindRangeByName( const ScRangeList& rRanges, ScDocShell* pDocSh, const OUString& rName, size_t& rIndex ) { if (pDocSh) @@ -4459,14 +4459,14 @@ static sal_Bool lcl_FindRangeByName( const ScRangeList& rRanges, ScDocShell* pDo if ( aRangeStr == rName ) { rIndex = i; - return sal_True; + return true; } } } return false; // nicht gefunden } -static sal_Bool lcl_FindRangeOrEntry( const ScNamedEntryArr_Impl& rNamedEntries, +static bool lcl_FindRangeOrEntry( const ScNamedEntryArr_Impl& rNamedEntries, const ScRangeList& rRanges, ScDocShell* pDocSh, const OUString& rName, ScRange& rFound ) { @@ -4491,7 +4491,7 @@ static sal_Bool lcl_FindRangeOrEntry( const ScNamedEntryArr_Impl& rNamedEntries, if ( aMarkData.IsAllMarked( aCellRange ) ) { rFound = aCellRange; - return sal_True; + return true; } } @@ -4511,7 +4511,7 @@ static sal_Bool lcl_FindRangeOrEntry( const ScNamedEntryArr_Impl& rNamedEntries, if ( aMarkData.IsAllMarked( rComp ) ) { rFound = rComp; - return sal_True; + return true; } } } @@ -4524,7 +4524,7 @@ void SAL_CALL ScCellRangesObj::removeByName( const OUString& aName ) lang::WrappedTargetException, uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - sal_Bool bDone = false; + bool bDone = false; OUString aNameStr(aName); ScDocShell* pDocSh = GetDocShell(); const ScRangeList& rRanges = GetRangeList(); @@ -4537,13 +4537,13 @@ void SAL_CALL ScCellRangesObj::removeByName( const OUString& aName ) if (i != nIndex) aNew.Append( *rRanges[ i ] ); SetNewRanges(aNew); - bDone = sal_True; + bDone = true; } else if (pDocSh) { // deselect any ranges (parsed or named entry) ScRangeList aDiff; - sal_Bool bValid = ( aDiff.Parse( aNameStr, pDocSh->GetDocument() ) & SCA_VALID ) != 0; + bool bValid = ( aDiff.Parse( aNameStr, pDocSh->GetDocument() ) & SCA_VALID ) != 0; if (!bValid && !m_pImpl->m_aNamedEntries.empty()) { sal_uInt16 nCount = m_pImpl->m_aNamedEntries.size(); @@ -4552,7 +4552,7 @@ void SAL_CALL ScCellRangesObj::removeByName( const OUString& aName ) { aDiff.RemoveAll(); aDiff.Append(m_pImpl->m_aNamedEntries[n].GetRange()); - bValid = sal_True; + bValid = true; } } if ( bValid ) @@ -4571,7 +4571,7 @@ void SAL_CALL ScCellRangesObj::removeByName( const OUString& aName ) aMarkData.FillRangeListWithMarks( &aNew, false ); SetNewRanges(aNew); - bDone = sal_True; //! error if range was not selected before? + bDone = true; //! error if range was not selected before? } } @@ -4622,7 +4622,7 @@ uno::Any SAL_CALL ScCellRangesObj::getByName( const OUString& aName ) return aRet; } -static sal_Bool lcl_FindEntryName( const ScNamedEntryArr_Impl& rNamedEntries, +static bool lcl_FindEntryName( const ScNamedEntryArr_Impl& rNamedEntries, const ScRange& rRange, OUString& rName ) { sal_uInt16 nCount = rNamedEntries.size(); @@ -4630,7 +4630,7 @@ static sal_Bool lcl_FindEntryName( const ScNamedEntryArr_Impl& rNamedEntries, if (rNamedEntries[i].GetRange() == rRange) { rName = rNamedEntries[i].GetName(); - return sal_True; + return true; } return false; } @@ -4942,7 +4942,7 @@ uno::Reference<table::XCellRange> ScCellRangeObj::getCellRangeByName( SCTAB nTab = aRange.aStart.Tab(); ScRange aCellRange; - sal_Bool bFound = false; + bool bFound = false; OUString aString(aName); sal_uInt16 nParse = aCellRange.ParseAny( aString, pDoc, rDetails ); if ( nParse & SCA_VALID ) @@ -4952,14 +4952,14 @@ uno::Reference<table::XCellRange> ScCellRangeObj::getCellRangeByName( aCellRange.aStart.SetTab(nTab); aCellRange.aEnd.SetTab(nTab); } - bFound = sal_True; + bFound = true; } else { ScRangeUtil aRangeUtil; if ( aRangeUtil.MakeRangeFromName( aString, pDoc, nTab, aCellRange, RUTL_NAMES ) || aRangeUtil.MakeRangeFromName( aString, pDoc, nTab, aCellRange, RUTL_DBASE ) ) - bFound = sal_True; + bFound = true; } if (bFound) // valid only if within this object's range @@ -5215,7 +5215,7 @@ void SAL_CALL ScCellRangeObj::setDataArray( { SolarMutexGuard aGuard; - sal_Bool bDone = false; + bool bDone = false; ScDocShell* pDocSh = GetDocShell(); if (pDocSh) { @@ -5259,7 +5259,7 @@ uno::Sequence< uno::Sequence<OUString> > SAL_CALL ScCellRangeObj::getFormulaArra OUString* pColAry = aColSeq.getArray(); for (SCCOL nColIndex = 0; nColIndex < nColCount; nColIndex++) pColAry[nColIndex] = lcl_GetInputString( pDocSh->GetDocument(), - ScAddress( nStartCol+nColIndex, nStartRow+nRowIndex, nTab ), sal_True ); + ScAddress( nStartCol+nColIndex, nStartRow+nRowIndex, nTab ), true ); pRowAry[nRowIndex] = aColSeq; } @@ -5276,7 +5276,7 @@ void SAL_CALL ScCellRangeObj::setFormulaArray( { SolarMutexGuard aGuard; - sal_Bool bDone = false; + bool bDone = false; ScDocShell* pDocSh = GetDocShell(); if (pDocSh) { @@ -5375,7 +5375,7 @@ void SAL_CALL ScCellRangeObj::fillSeries( sheet::FillDirection nFillDirection, ScDocShell* pDocSh = GetDocShell(); if ( pDocSh ) { - sal_Bool bError = false; + bool bError = false; FillDir eDir = FILL_TO_BOTTOM; switch (nFillDirection) @@ -5393,7 +5393,7 @@ void SAL_CALL ScCellRangeObj::fillSeries( sheet::FillDirection nFillDirection, eDir = FILL_TO_LEFT; break; default: - bError = sal_True; + bError = true; } FillCmd eCmd = FILL_SIMPLE; @@ -5415,7 +5415,7 @@ void SAL_CALL ScCellRangeObj::fillSeries( sheet::FillDirection nFillDirection, eCmd = FILL_AUTO; break; default: - bError = sal_True; + bError = true; } FillDateCmd eDateCmd = FILL_DAY; @@ -5434,7 +5434,7 @@ void SAL_CALL ScCellRangeObj::fillSeries( sheet::FillDirection nFillDirection, eDateCmd = FILL_YEAR; break; default: - bError = sal_True; + bError = true; } if (!bError) @@ -5453,7 +5453,7 @@ void SAL_CALL ScCellRangeObj::fillAuto( sheet::FillDirection nFillDirection, ScRange aSourceRange(aRange); SCsCOLROW nCount = 0; // "Dest-Count" FillDir eDir = FILL_TO_BOTTOM; - sal_Bool bError = false; + bool bError = false; switch (nFillDirection) { case sheet::FillDirection_TO_BOTTOM: @@ -5477,10 +5477,10 @@ void SAL_CALL ScCellRangeObj::fillAuto( sheet::FillDirection nFillDirection, eDir = FILL_TO_LEFT; break; default: - bError = sal_True; + bError = true; } if (nCount < 0 || nCount > MAXROW) // overflow - bError = sal_True; + bError = true; if (!bError) pDocSh->GetDocFunc().FillAuto( aSourceRange, NULL, eDir, nCount, true, true ); @@ -5730,7 +5730,7 @@ uno::Reference<sheet::XSheetFilterDescriptor> SAL_CALL ScCellRangeObj::createFil aParam.nTab = aDataAddress.Sheet; ScDocument* pDoc = pDocSh->GetDocument(); - sal_Bool bOk = pDoc->CreateQueryParam( + bool bOk = pDoc->CreateQueryParam( aRange.aStart.Col(), aRange.aStart.Row(), aRange.aEnd.Col(), aRange.aEnd.Row(), aRange.aStart.Tab(), aParam ); @@ -7104,7 +7104,7 @@ void SAL_CALL ScTableSheetObj::removeAllManualPageBreaks() throw(uno::RuntimeExc //! docfunc Funktion, auch fuer ScViewFunc::RemoveManualBreaks ScDocument* pDoc = pDocSh->GetDocument(); - sal_Bool bUndo (pDoc->IsUndoEnabled()); + bool bUndo (pDoc->IsUndoEnabled()); SCTAB nTab = GetTab_Impl(); if (bUndo) @@ -7182,7 +7182,7 @@ void SAL_CALL ScTableSheetObj::insertCells( const table::CellRangeAddress& rRang ScDocShell* pDocSh = GetDocShell(); if ( pDocSh ) { - sal_Bool bDo = sal_True; + bool bDo = true; InsCellCmd eCmd = INS_NONE; switch (nMode) { @@ -7213,7 +7213,7 @@ void SAL_CALL ScTableSheetObj::removeRange( const table::CellRangeAddress& rRang ScDocShell* pDocSh = GetDocShell(); if ( pDocSh ) { - sal_Bool bDo = sal_True; + bool bDo = true; DelCellCmd eCmd = DEL_NONE; switch (nMode) { @@ -7785,7 +7785,7 @@ void SAL_CALL ScTableSheetObj::group( const table::CellRangeAddress& rGroupRange ScDocShell* pDocSh = GetDocShell(); if ( pDocSh ) { - sal_Bool bColumns = ( nOrientation == table::TableOrientation_COLUMNS ); + bool bColumns = ( nOrientation == table::TableOrientation_COLUMNS ); ScRange aGroupRange; ScUnoConversion::FillScRange( aGroupRange, rGroupRange ); ScOutlineDocFunc aFunc(*pDocSh); @@ -7802,7 +7802,7 @@ void SAL_CALL ScTableSheetObj::ungroup( const table::CellRangeAddress& rGroupRan ScDocShell* pDocSh = GetDocShell(); if ( pDocSh ) { - sal_Bool bColumns = ( nOrientation == table::TableOrientation_COLUMNS ); + bool bColumns = ( nOrientation == table::TableOrientation_COLUMNS ); ScRange aGroupRange; ScUnoConversion::FillScRange( aGroupRange, rGroupRange ); ScOutlineDocFunc aFunc(*pDocSh); @@ -7872,7 +7872,7 @@ void SAL_CALL ScTableSheetObj::showLevel( sal_Int16 nLevel, table::TableOrientat ScDocShell* pDocSh = GetDocShell(); if ( pDocSh ) { - sal_Bool bColumns = ( nOrientation == table::TableOrientation_COLUMNS ); + bool bColumns = ( nOrientation == table::TableOrientation_COLUMNS ); SCTAB nTab = GetTab_Impl(); ScOutlineDocFunc aFunc(*pDocSh); aFunc.SelectLevel( nTab, bColumns, nLevel, true, true ); @@ -7902,7 +7902,7 @@ void SAL_CALL ScTableSheetObj::unprotect( const OUString& aPassword ) if ( pDocSh ) { OUString aString(aPassword); - sal_Bool bDone = pDocSh->GetDocFunc().Unprotect( GetTab_Impl(), aString, true ); + bool bDone = pDocSh->GetDocFunc().Unprotect( GetTab_Impl(), aString, true ); if (!bDone) throw lang::IllegalArgumentException(); } @@ -8161,7 +8161,7 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn } else if ( pEntry->nWID == SC_WID_UNO_CELLVIS ) { - sal_Bool bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue ); + bool bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue ); rFunc.SetTableVisible( nTab, bVis, true ); } else if ( pEntry->nWID == SC_WID_UNO_ISACTIVE ) @@ -8199,14 +8199,14 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn sal_uInt16 nFlags; pDoc->GetName( nTab, aName ); pDoc->GetScenarioData( nTab, aComment, aColor, nFlags ); - sal_Bool bModify(false); + bool bModify(false); if (ScUnoHelpFunctions::GetBoolFromAny( aValue )) { if (!(nFlags & SC_SCENARIO_PROTECT)) { nFlags |= SC_SCENARIO_PROTECT; - bModify = sal_True; + bModify = true; } } else @@ -8214,7 +8214,7 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn if (nFlags & SC_SCENARIO_PROTECT) { nFlags -= SC_SCENARIO_PROTECT; - bModify = sal_True; + bModify = true; } } @@ -8232,14 +8232,14 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn sal_uInt16 nFlags; pDoc->GetName( nTab, aName ); pDoc->GetScenarioData( nTab, aComment, aColor, nFlags ); - sal_Bool bModify(false); + bool bModify(false); if (ScUnoHelpFunctions::GetBoolFromAny( aValue )) { if (!(nFlags & SC_SCENARIO_SHOWFRAME)) { nFlags |= SC_SCENARIO_SHOWFRAME; - bModify = sal_True; + bModify = true; } } else @@ -8247,7 +8247,7 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn if (nFlags & SC_SCENARIO_SHOWFRAME) { nFlags -= SC_SCENARIO_SHOWFRAME; - bModify = sal_True; + bModify = true; } } @@ -8265,14 +8265,14 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn sal_uInt16 nFlags; pDoc->GetName( nTab, aName ); pDoc->GetScenarioData( nTab, aComment, aColor, nFlags ); - sal_Bool bModify(false); + bool bModify(false); if (ScUnoHelpFunctions::GetBoolFromAny( aValue )) { if (!(nFlags & SC_SCENARIO_PRINTFRAME)) { nFlags |= SC_SCENARIO_PRINTFRAME; - bModify = sal_True; + bModify = true; } } else @@ -8280,7 +8280,7 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn if (nFlags & SC_SCENARIO_PRINTFRAME) { nFlags -= SC_SCENARIO_PRINTFRAME; - bModify = sal_True; + bModify = true; } } @@ -8298,14 +8298,14 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn sal_uInt16 nFlags; pDoc->GetName( nTab, aName ); pDoc->GetScenarioData( nTab, aComment, aColor, nFlags ); - sal_Bool bModify(false); + bool bModify(false); if (ScUnoHelpFunctions::GetBoolFromAny( aValue )) { if (!(nFlags & SC_SCENARIO_TWOWAY)) { nFlags |= SC_SCENARIO_TWOWAY; - bModify = sal_True; + bModify = true; } } else @@ -8313,7 +8313,7 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn if (nFlags & SC_SCENARIO_TWOWAY) { nFlags -= SC_SCENARIO_TWOWAY; - bModify = sal_True; + bModify = true; } } @@ -8331,14 +8331,14 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn sal_uInt16 nFlags; pDoc->GetName( nTab, aName ); pDoc->GetScenarioData( nTab, aComment, aColor, nFlags ); - sal_Bool bModify(false); + bool bModify(false); if (ScUnoHelpFunctions::GetBoolFromAny( aValue )) { if (!(nFlags & SC_SCENARIO_ATTRIB)) { nFlags |= SC_SCENARIO_ATTRIB; - bModify = sal_True; + bModify = true; } } else @@ -8346,7 +8346,7 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn if (nFlags & SC_SCENARIO_ATTRIB) { nFlags -= SC_SCENARIO_ATTRIB; - bModify = sal_True; + bModify = true; } } @@ -8364,14 +8364,14 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn sal_uInt16 nFlags; pDoc->GetName( nTab, aName ); pDoc->GetScenarioData( nTab, aComment, aColor, nFlags ); - sal_Bool bModify(false); + bool bModify(false); if (ScUnoHelpFunctions::GetBoolFromAny( aValue )) { if (nFlags & SC_SCENARIO_VALUE) { nFlags -= SC_SCENARIO_VALUE; - bModify = sal_True; + bModify = true; } } else @@ -8379,7 +8379,7 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn if (!(nFlags & SC_SCENARIO_VALUE)) { nFlags |= SC_SCENARIO_VALUE; - bModify = sal_True; + bModify = true; } } @@ -8400,7 +8400,7 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn } else if ( pEntry->nWID == SC_WID_UNO_AUTOPRINT ) { - sal_Bool bAutoPrint = ScUnoHelpFunctions::GetBoolFromAny( aValue ); + bool bAutoPrint = ScUnoHelpFunctions::GetBoolFromAny( aValue ); if (bAutoPrint) pDoc->SetPrintEntireSheet( nTab ); // clears all print ranges else @@ -8456,7 +8456,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn } else if ( pEntry->nWID == SC_WID_UNO_CELLVIS ) { - sal_Bool bVis = pDoc->IsVisible( nTab ); + bool bVis = pDoc->IsVisible( nTab ); ScUnoHelpFunctions::SetBoolInAny( rAny, bVis ); } else if ( pEntry->nWID == SC_WID_UNO_LINKDISPBIT ) @@ -8567,7 +8567,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn } else if ( pEntry->nWID == SC_WID_UNO_AUTOPRINT ) { - sal_Bool bAutoPrint = pDoc->IsPrintEntireSheet( nTab ); + bool bAutoPrint = pDoc->IsPrintEntireSheet( nTab ); ScUnoHelpFunctions::SetBoolInAny( rAny, bAutoPrint ); } else if ( pEntry->nWID == SC_WID_UNO_TABCOLOR ) @@ -8774,14 +8774,14 @@ void ScTableColumnObj::SetOnePropertyValue(const SfxItemPropertySimpleEntry* pEn } else if ( pEntry->nWID == SC_WID_UNO_CELLVIS ) { - sal_Bool bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue ); + bool bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue ); ScSizeMode eMode = bVis ? SC_SIZE_SHOW : SC_SIZE_DIRECT; rFunc.SetWidthOrHeight(true, aColArr, nTab, eMode, 0, true, true); // SC_SIZE_DIRECT mit Groesse 0 blendet aus } else if ( pEntry->nWID == SC_WID_UNO_OWIDTH ) { - sal_Bool bOpt = ScUnoHelpFunctions::GetBoolFromAny( aValue ); + bool bOpt = ScUnoHelpFunctions::GetBoolFromAny( aValue ); if (bOpt) rFunc.SetWidthOrHeight( true, aColArr, nTab, SC_SIZE_OPTIMAL, STD_EXTRA_WIDTH, true, true); @@ -8789,7 +8789,7 @@ void ScTableColumnObj::SetOnePropertyValue(const SfxItemPropertySimpleEntry* pEn } else if ( pEntry->nWID == SC_WID_UNO_NEWPAGE || pEntry->nWID == SC_WID_UNO_MANPAGE ) { - sal_Bool bSet = ScUnoHelpFunctions::GetBoolFromAny( aValue ); + bool bSet = ScUnoHelpFunctions::GetBoolFromAny( aValue ); if (bSet) rFunc.InsertPageBreak( true, rRange.aStart, true, true, true ); else @@ -8831,7 +8831,7 @@ void ScTableColumnObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pE else if ( pEntry->nWID == SC_WID_UNO_OWIDTH ) { //! momentan immer gesetzt ??!?! - sal_Bool bOpt = !(pDoc->GetColFlags( nCol, nTab ) & CR_MANUALSIZE); + bool bOpt = !(pDoc->GetColFlags( nCol, nTab ) & CR_MANUALSIZE); ScUnoHelpFunctions::SetBoolInAny( rAny, bOpt ); } else if ( pEntry->nWID == SC_WID_UNO_NEWPAGE ) @@ -8914,20 +8914,20 @@ void ScTableRowObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntr } else if ( pEntry->nWID == SC_WID_UNO_CELLVIS ) { - sal_Bool bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue ); + bool bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue ); ScSizeMode eMode = bVis ? SC_SIZE_SHOW : SC_SIZE_DIRECT; rFunc.SetWidthOrHeight(false, aRowArr, nTab, eMode, 0, true, true); // SC_SIZE_DIRECT mit Groesse 0 blendet aus } else if ( pEntry->nWID == SC_WID_UNO_CELLFILT ) { - sal_Bool bFil = ScUnoHelpFunctions::GetBoolFromAny( aValue ); + bool bFil = ScUnoHelpFunctions::GetBoolFromAny( aValue ); // SC_SIZE_DIRECT mit Groesse 0 blendet aus pDoc->SetRowFiltered(nRow, nRow, nTab, bFil); } else if ( pEntry->nWID == SC_WID_UNO_OHEIGHT ) { - sal_Bool bOpt = ScUnoHelpFunctions::GetBoolFromAny( aValue ); + bool bOpt = ScUnoHelpFunctions::GetBoolFromAny( aValue ); if (bOpt) rFunc.SetWidthOrHeight(false, aRowArr, nTab, SC_SIZE_OPTIMAL, 0, true, true); else @@ -8939,7 +8939,7 @@ void ScTableRowObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntr } else if ( pEntry->nWID == SC_WID_UNO_NEWPAGE || pEntry->nWID == SC_WID_UNO_MANPAGE ) { - sal_Bool bSet = ScUnoHelpFunctions::GetBoolFromAny( aValue ); + bool bSet = ScUnoHelpFunctions::GetBoolFromAny( aValue ); if (bSet) rFunc.InsertPageBreak( false, rRange.aStart, true, true, true ); else @@ -8984,7 +8984,7 @@ void ScTableRowObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntr } else if ( pEntry->nWID == SC_WID_UNO_OHEIGHT ) { - sal_Bool bOpt = !(pDoc->GetRowFlags( nRow, nTab ) & CR_MANUALSIZE); + bool bOpt = !(pDoc->GetRowFlags( nRow, nTab ) & CR_MANUALSIZE); ScUnoHelpFunctions::SetBoolInAny( rAny, bOpt ); } else if ( pEntry->nWID == SC_WID_UNO_NEWPAGE ) @@ -9055,7 +9055,7 @@ uno::Type SAL_CALL ScCellsObj::getElementType() throw(uno::RuntimeException, std sal_Bool SAL_CALL ScCellsObj::hasElements() throw(uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - sal_Bool bHas = false; + bool bHas = false; if ( pDocShell ) { //! schneller selber testen? @@ -9131,7 +9131,7 @@ void ScCellsEnumeration::Advance_Impl() SCCOL nCol = aPos.Col(); SCROW nRow = aPos.Row(); SCTAB nTab = aPos.Tab(); - sal_Bool bFound = pDocShell->GetDocument()->GetNextMarkedCell( nCol, nRow, nTab, *pMark ); + bool bFound = pDocShell->GetDocument()->GetNextMarkedCell( nCol, nRow, nTab, *pMark ); if (bFound) aPos.Set( nCol, nRow, nTab ); else diff --git a/sc/source/ui/unoobj/cellvaluebinding.cxx b/sc/source/ui/unoobj/cellvaluebinding.cxx index a6c1958e21b0..21ad8622bc1a 100644 --- a/sc/source/ui/unoobj/cellvaluebinding.cxx +++ b/sc/source/ui/unoobj/cellvaluebinding.cxx @@ -226,10 +226,10 @@ namespace calc { // check if the cell has a numeric value (this might go into a helper function): - sal_Bool bHasValue = false; + bool bHasValue = false; CellContentType eCellType = m_xCell->getType(); if ( eCellType == CellContentType_VALUE ) - bHasValue = sal_True; + bHasValue = true; else if ( eCellType == CellContentType_FORMULA ) { // check if the formula result is a value @@ -240,7 +240,7 @@ namespace calc { CellContentType eResultType; if ( (xProp->getPropertyValue("FormulaResultType") >>= eResultType) && eResultType == CellContentType_VALUE ) - bHasValue = sal_True; + bHasValue = true; } } } @@ -249,7 +249,7 @@ namespace calc { // 0 is "unchecked", any other value is "checked", regardless of number format double nCellValue = m_xCell->getValue(); - sal_Bool bBoolValue = ( nCellValue != 0.0 ); + bool bBoolValue = ( nCellValue != 0.0 ); aReturn <<= bBoolValue; } // empty cells, text cells and text or error formula results: leave return value empty @@ -316,7 +316,7 @@ namespace calc // boolean is stored as values 0 or 1 // TODO: set the number format to boolean if no format is set? - sal_Bool bValue( false ); + bool bValue( false ); aValue >>= bValue; double nCellValue = bValue ? 1.0 : 0.0; @@ -386,7 +386,7 @@ namespace calc if ( xTypes.is() ) { Locale aLocale; - sal_Bool bWasBoolean = false; + bool bWasBoolean = false; sal_Int32 nOldIndex = ::comphelper::getINT32( xCellProp->getPropertyValue( sPropName ) ); Reference<XPropertySet> xOldFormat; @@ -406,7 +406,7 @@ namespace calc sal_Int16 nOldType = ::comphelper::getINT16( xOldFormat->getPropertyValue("Type") ); if ( nOldType & NumberFormat::LOGICAL ) - bWasBoolean = sal_True; + bWasBoolean = true; } if ( !bWasBoolean ) @@ -534,7 +534,7 @@ namespace calc // get the cell address CellAddress aAddress; - sal_Bool bFoundAddress = false; + bool bFoundAddress = false; const Any* pLoop = _rArguments.getConstArray(); const Any* pLoopEnd = _rArguments.getConstArray() + _rArguments.getLength(); @@ -546,7 +546,7 @@ namespace calc if ( aValue.Name == "BoundCell" ) { if ( aValue.Value >>= aAddress ) - bFoundAddress = sal_True; + bFoundAddress = true; } } } diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx index 348c86d380ec..62d1573877d7 100644 --- a/sc/source/ui/unoobj/chart2uno.cxx +++ b/sc/source/ui/unoobj/chart2uno.cxx @@ -1442,7 +1442,7 @@ ScChart2DataProvider::createDataSource( bool bOrientCol = true; OUString aRangeRepresentation; uno::Sequence< sal_Int32 > aSequenceMapping; - sal_Bool bTimeBased = false; + bool bTimeBased = false; for(sal_Int32 i = 0; i < aArguments.getLength(); ++i) { if ( aArguments[i].Name == "DataRowSource" ) @@ -2354,7 +2354,7 @@ uno::Any SAL_CALL ScChart2DataProvider::getPropertyValue( else if (rPropertyName == SC_UNONAME_USE_INTERNAL_DATA_PROVIDER) { // This is a read-only property. - aRet <<= static_cast<sal_Bool>(m_pDocument->PastingDrawFromOtherDoc()); + aRet <<= m_pDocument->PastingDrawFromOtherDoc(); } else throw beans::UnknownPropertyException(); @@ -3502,7 +3502,7 @@ void SAL_CALL ScChart2DataSequence::setPropertyValue( } else if( rPropertyName == "TimeBased" ) { - sal_Bool bTimeBased = mbTimeBased; + bool bTimeBased = mbTimeBased; rValue>>= bTimeBased; mbTimeBased = bTimeBased; } diff --git a/sc/source/ui/unoobj/chartuno.cxx b/sc/source/ui/unoobj/chartuno.cxx index 2560d5c075e0..57539f006da2 100644 --- a/sc/source/ui/unoobj/chartuno.cxx +++ b/sc/source/ui/unoobj/chartuno.cxx @@ -534,7 +534,7 @@ void ScChartObj::Update_Impl( const ScRangeListRef& rRanges, bool bColHeaders, b if (pDocShell) { ScDocument* pDoc = pDocShell->GetDocument(); - sal_Bool bUndo(pDoc->IsUndoEnabled()); + bool bUndo(pDoc->IsUndoEnabled()); if (bUndo) { diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx index 717ff353358f..2c64691dbc84 100644 --- a/sc/source/ui/unoobj/confuno.cxx +++ b/sc/source/ui/unoobj/confuno.cxx @@ -129,7 +129,7 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue( ScDocument* pDoc = pDocShell->GetDocument(); if (pDoc) { - sal_Bool bUpdateHeights = false; + bool bUpdateHeights = false; ScViewOptions aViewOpt(pDoc->GetViewOptions()); @@ -216,7 +216,7 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue( } else if ( aPropertyName.equalsAscii( SC_UNO_APPLYDOCINF ) ) { - sal_Bool bTmp=sal_True; + bool bTmp=true; if ( aValue >>= bTmp ) pDocShell->SetUseUserData( bTmp ); } @@ -229,35 +229,35 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue( // Int16 contains CharacterCompressionType values sal_Int16 nUno = ScUnoHelpFunctions::GetInt16FromAny( aValue ); pDoc->SetAsianCompression( (sal_uInt8) nUno ); - bUpdateHeights = sal_True; + bUpdateHeights = true; } else if ( aPropertyName.equalsAscii( SC_UNO_ASIANKERN ) ) { pDoc->SetAsianKerning( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); - bUpdateHeights = sal_True; + bUpdateHeights = true; } else if ( aPropertyName.equalsAscii( SCSAVEVERSION ) ) { - sal_Bool bTmp=false; + bool bTmp=false; if ( aValue >>= bTmp ) pDocShell->SetSaveVersionOnClose( bTmp ); } else if ( aPropertyName.equalsAscii( SC_UNO_UPDTEMPL ) ) { - sal_Bool bTmp=sal_True; + bool bTmp=true; if ( aValue >>= bTmp ) pDocShell->SetQueryLoadTemplate( bTmp ); } else if ( aPropertyName.equalsAscii( SC_UNO_LOADREADONLY ) ) { - sal_Bool bTmp=false; + bool bTmp=false; if ( aValue >>= bTmp ) pDocShell->SetLoadReadonly( bTmp ); } else if ( aPropertyName.equalsAscii( SC_UNO_SHAREDOC ) ) { #if HAVE_FEATURE_MULTIUSER_ENVIRONMENT - sal_Bool bDocShared = false; + bool bDocShared = false; if ( aValue >>= bDocShared ) { pDocShell->SetSharedXMLFlag( bDocShared ); @@ -280,7 +280,7 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue( } else if ( aPropertyName.equalsAscii( SC_UNO_EMBED_FONTS ) ) { - sal_Bool bVal = sal_False; + bool bVal = false; if ( aValue >>=bVal ) { pDoc->SetIsUsingEmbededFonts(bVal); diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx index 567439f7549a..63de04dd19c5 100644 --- a/sc/source/ui/unoobj/dapiuno.cxx +++ b/sc/source/ui/unoobj/dapiuno.cxx @@ -146,7 +146,7 @@ const SfxItemPropertyMapEntry* lcl_GetDataPilotItemMap() return aDataPilotItemMap_Impl; } -inline bool lclCheckValidDouble( double fValue, sal_Bool bAuto ) +inline bool lclCheckValidDouble( double fValue, bool bAuto ) { return bAuto || ::rtl::math::isFinite( fValue ); } @@ -400,7 +400,7 @@ void SAL_CALL ScDataPilotTablesObj::insertNewByName( const OUString& aNewName, if ( !aNewName.isEmpty() && hasByName( aNewName ) ) throw RuntimeException(); // no other exceptions specified - sal_Bool bDone = false; + bool bDone = false; ScDataPilotDescriptorBase* pImp = ScDataPilotDescriptorBase::getImplementation( xDescriptor ); if ( pDocShell && pImp ) { @@ -1579,13 +1579,13 @@ static sal_Int32 lcl_GetFieldCount( const Reference<XDimensionsSupplier>& rSourc return nRet; } -static sal_Bool lcl_GetFieldDataByIndex( const Reference<XDimensionsSupplier>& rSource, +static bool lcl_GetFieldDataByIndex( const Reference<XDimensionsSupplier>& rSource, const Any& rOrient, SCSIZE nIndex, ScFieldIdentifier& rFieldId ) { if (!rSource.is()) throw RuntimeException(); - sal_Bool bOk = false; + bool bOk = false; SCSIZE nPos = 0; sal_Int32 nDimIndex = 0; @@ -1603,7 +1603,7 @@ static sal_Bool lcl_GetFieldDataByIndex( const Reference<XDimensionsSupplier>& r { if (nPos == nIndex) { - bOk = sal_True; + bOk = true; nDimIndex = i; } else @@ -1622,7 +1622,7 @@ static sal_Bool lcl_GetFieldDataByIndex( const Reference<XDimensionsSupplier>& r { if (nPos == nIndex) { - bOk = sal_True; + bOk = true; nDimIndex = i; } else @@ -1666,7 +1666,7 @@ static sal_Bool lcl_GetFieldDataByIndex( const Reference<XDimensionsSupplier>& r return bOk; } -static sal_Bool lcl_GetFieldDataByName( ScDPObject* pDPObj, const OUString& rFieldName, ScFieldIdentifier& rFieldId ) +static bool lcl_GetFieldDataByName( ScDPObject* pDPObj, const OUString& rFieldName, ScFieldIdentifier& rFieldId ) { // "By name" is always the first match. // The name "Data" always refers to the data layout field. @@ -3263,7 +3263,7 @@ sal_Bool SAL_CALL ScDataPilotItemsObj::hasByName( const OUString& aName ) throw(RuntimeException, std::exception) { SolarMutexGuard aGuard; - sal_Bool bFound = false; + bool bFound = false; Reference<XNameAccess> xMembers = GetMembers(); if (xMembers.is()) { @@ -3274,7 +3274,7 @@ sal_Bool SAL_CALL ScDataPilotItemsObj::hasByName( const OUString& aName ) { Reference<XNamed> xMember(xMembersIndex->getByIndex(nItem), UNO_QUERY); if (xMember.is() && aName == xMember->getName()) - bFound = sal_True; + bFound = true; else nItem++; } diff --git a/sc/source/ui/unoobj/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx index 13e41ea20b36..8fefadc250b1 100644 --- a/sc/source/ui/unoobj/datauno.cxx +++ b/sc/source/ui/unoobj/datauno.cxx @@ -1714,7 +1714,7 @@ void SAL_CALL ScDatabaseRangeObj::setName( const OUString& aNewName ) { ScDBDocFunc aFunc(*pDocShell); OUString aNewStr(aNewName); - sal_Bool bOk = aFunc.RenameDBRange( aName, aNewStr ); + bool bOk = aFunc.RenameDBRange( aName, aNewStr ); if (bOk) aName = aNewStr; } @@ -1920,7 +1920,7 @@ void SAL_CALL ScDatabaseRangeObj::refresh() throw(uno::RuntimeException, std::ex ScDBDocFunc aFunc(*pDocShell); // Import zu wiederholen? - sal_Bool bContinue = sal_True; + bool bContinue = true; ScImportParam aImportParam; pData->GetImportParam( aImportParam ); if (aImportParam.bImport && !pData->HasImportSelection()) @@ -2022,7 +2022,7 @@ void SAL_CALL ScDatabaseRangeObj::setPropertyValue( if ( pDocShell && pData ) { ScDBData aNewData( *pData ); - sal_Bool bDo = sal_True; + bool bDo = true; OUString aString(aPropertyName); if ( aString.equalsAscii( SC_UNONAME_KEEPFORM ) ) @@ -2033,7 +2033,7 @@ void SAL_CALL ScDatabaseRangeObj::setPropertyValue( aNewData.SetStripData( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); else if (aString.equalsAscii( SC_UNONAME_AUTOFLT )) { - sal_Bool bAutoFilter(ScUnoHelpFunctions::GetBoolFromAny( aValue )); + bool bAutoFilter(ScUnoHelpFunctions::GetBoolFromAny( aValue )); aNewData.SetAutoFilter(bAutoFilter); ScRange aRange; aNewData.GetArea(aRange); @@ -2135,14 +2135,14 @@ uno::Any SAL_CALL ScDatabaseRangeObj::getPropertyValue( const OUString& aPropert aRet <<= OUString( aName ); else if (aString.equalsAscii( SC_UNONAME_AUTOFLT )) { - sal_Bool bAutoFilter(GetDBData_Impl()->HasAutoFilter()); + bool bAutoFilter(GetDBData_Impl()->HasAutoFilter()); ScUnoHelpFunctions::SetBoolInAny( aRet, bAutoFilter ); } else if (aString.equalsAscii( SC_UNONAME_USEFLTCRT )) { ScRange aRange; - sal_Bool bIsAdvancedSource(GetDBData_Impl()->GetAdvancedQuerySource(aRange)); + bool bIsAdvancedSource(GetDBData_Impl()->GetAdvancedQuerySource(aRange)); ScUnoHelpFunctions::SetBoolInAny( aRet, bIsAdvancedSource ); } @@ -2259,7 +2259,7 @@ void SAL_CALL ScDatabaseRangesObj::addNewByName( const OUString& aName, throw(uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - sal_Bool bDone = false; + bool bDone = false; if (pDocShell) { ScDBDocFunc aFunc(*pDocShell); @@ -2277,7 +2277,7 @@ void SAL_CALL ScDatabaseRangesObj::removeByName( const OUString& aName ) throw(uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - sal_Bool bDone = false; + bool bDone = false; if (pDocShell) { ScDBDocFunc aFunc(*pDocShell); diff --git a/sc/source/ui/unoobj/dispuno.cxx b/sc/source/ui/unoobj/dispuno.cxx index 242361618c77..b9f085a27706 100644 --- a/sc/source/ui/unoobj/dispuno.cxx +++ b/sc/source/ui/unoobj/dispuno.cxx @@ -224,7 +224,7 @@ void SAL_CALL ScDispatch::dispatch( const util::URL& aURL, { SolarMutexGuard aGuard; - sal_Bool bDone = false; + bool bDone = false; if ( pViewShell && aURL.Complete.equalsAscii(cURLInsertColumns) ) { ScViewData* pViewData = pViewShell->GetViewData(); diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index be5e7db7f6f0..fa4cbb2e30ba 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -216,7 +216,7 @@ ScPrintUIOptions::ScPrintUIOptions() { const ScPrintOptions& rPrintOpt = SC_MOD()->GetPrintOptions(); sal_Int32 nContent = rPrintOpt.GetAllSheets() ? 0 : 1; - sal_Bool bSuppress = rPrintOpt.GetSkipEmpty(); + bool bSuppress = rPrintOpt.GetSkipEmpty(); ResStringArray aStrings( ScResId( SCSTR_PRINT_OPTIONS ) ); OSL_ENSURE( aStrings.Count() >= 10, "resource incomplete" ); @@ -305,7 +305,7 @@ void ScPrintUIOptions::SetDefaults() const ScPrintOptions& rPrintOpt = SC_MOD()->GetPrintOptions(); sal_Int32 nContent = rPrintOpt.GetAllSheets() ? 0 : 1; - sal_Bool bSuppress = rPrintOpt.GetSkipEmpty(); + bool bSuppress = rPrintOpt.GetSkipEmpty(); for (sal_Int32 nUIPos=0; nUIPos<m_aUIProperties.getLength(); ++nUIPos) { @@ -765,8 +765,8 @@ bool ScModelObj::FillRenderMarkData( const uno::Any& aSelection, uno::Reference<frame::XController> xView; // defaults when no options are passed: all sheets, include empty pages - sal_Bool bSelectedSheetsOnly = false; - sal_Bool bIncludeEmptyPages = true; + bool bSelectedSheetsOnly = false; + bool bIncludeEmptyPages = true; bool bHasPrintContent = false; sal_Int32 nPrintContent = 0; // all sheets / selected sheets / selected cells @@ -1056,7 +1056,7 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScModelObj::getRenderer( sal_Int32 (void)aFunc.DoPrint( aPage, nTabStart, nDisplayStart, false, NULL ); ScRange aCellRange; - sal_Bool bWasCellRange = aFunc.GetLastSourceRange( aCellRange ); + bool bWasCellRange = aFunc.GetLastSourceRange( aCellRange ); Size aTwips = aFunc.GetPageSize(); awt::Size aPageSize( TwipsToHMM( aTwips.Width() ), TwipsToHMM( aTwips.Height() ) ); @@ -1299,7 +1299,7 @@ uno::Reference<container::XNameAccess> SAL_CALL ScModelObj::getLinks() throw(uno sal_Bool SAL_CALL ScModelObj::isActionLocked() throw(uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - sal_Bool bLocked = false; + bool bLocked = false; if (pDocShell) bLocked = ( pDocShell->GetLockCount() != 0 ); return bLocked; @@ -1431,7 +1431,7 @@ void SAL_CALL ScModelObj::unprotect( const OUString& aPassword ) if (pDocShell) { OUString aString(aPassword); - sal_Bool bDone = pDocShell->GetDocFunc().Unprotect( TABLEID_DOC, aString, true ); + bool bDone = pDocShell->GetDocFunc().Unprotect( TABLEID_DOC, aString, true ); if (!bDone) throw lang::IllegalArgumentException(); } @@ -1477,7 +1477,7 @@ sheet::GoalResult SAL_CALL ScModelObj::seekGoal( OUString aGoalString(aGoalValue); ScDocument* pDoc = pDocShell->GetDocument(); double fValue = 0.0; - sal_Bool bFound = pDoc->Solver( + bool bFound = pDoc->Solver( (SCCOL)aFormulaPosition.Column, (SCROW)aFormulaPosition.Row, aFormulaPosition.Sheet, (SCCOL)aVariablePosition.Column, (SCROW)aVariablePosition.Row, aVariablePosition.Sheet, aGoalString, fValue ); @@ -1598,7 +1598,7 @@ void SAL_CALL ScModelObj::setPropertyValue( // Recalculation after loading is handled separately. bool bHardRecalc = !pDoc->IsImportingXML(); - sal_Bool bOpt = ScDocOptionsHelper::setPropertyValue( aNewOpt, aPropSet.getPropertyMap(), aPropertyName, aValue ); + bool bOpt = ScDocOptionsHelper::setPropertyValue( aNewOpt, aPropSet.getPropertyMap(), aPropertyName, aValue ); if (bOpt) { // done... @@ -1672,7 +1672,7 @@ void SAL_CALL ScModelObj::setPropertyValue( } else if ( aString.equalsAscii( SC_UNO_ISUNDOENABLED ) ) { - sal_Bool bUndoEnabled = ScUnoHelpFunctions::GetBoolFromAny( aValue ); + bool bUndoEnabled = ScUnoHelpFunctions::GetBoolFromAny( aValue ); pDoc->EnableUndo( bUndoEnabled ); pDocShell->GetUndoManager()->SetMaxUndoActionCount( bUndoEnabled @@ -1810,14 +1810,14 @@ uno::Any SAL_CALL ScModelObj::getPropertyValue( const OUString& aPropertyName ) { // default for no model is TRUE ScDrawLayer* pModel = pDoc->GetDrawLayer(); - sal_Bool bOpenInDesign = pModel ? pModel->GetOpenInDesignMode() : sal_True; + bool bOpenInDesign = pModel ? pModel->GetOpenInDesignMode() : sal_True; ScUnoHelpFunctions::SetBoolInAny( aRet, bOpenInDesign ); } else if ( aString.equalsAscii( SC_UNO_AUTOCONTFOC ) ) { // default for no model is FALSE ScDrawLayer* pModel = pDoc->GetDrawLayer(); - sal_Bool bAutoControlFocus = pModel ? pModel->GetAutoControlFocus() : false; + bool bAutoControlFocus = pModel ? pModel->GetAutoControlFocus() : false; ScUnoHelpFunctions::SetBoolInAny( aRet, bAutoControlFocus ); } else if ( aString.equalsAscii( SC_UNO_FORBIDDEN ) ) @@ -2535,7 +2535,7 @@ void SAL_CALL ScTableSheetsObj::insertNewByName( const OUString& aName, sal_Int1 throw(uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - sal_Bool bDone = false; + bool bDone = false; if (pDocShell) { OUString aNamStr(aName); @@ -2549,7 +2549,7 @@ void SAL_CALL ScTableSheetsObj::moveByName( const OUString& aName, sal_Int16 nDe throw(uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - sal_Bool bDone = false; + bool bDone = false; if (pDocShell) { SCTAB nSource; @@ -2565,7 +2565,7 @@ void SAL_CALL ScTableSheetsObj::copyByName( const OUString& aName, throw(uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - sal_Bool bDone = false; + bool bDone = false; if (pDocShell) { OUString aNewStr(aCopy); @@ -2595,8 +2595,8 @@ void SAL_CALL ScTableSheetsObj::insertByName( const OUString& aName, const uno:: lang::WrappedTargetException, uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - sal_Bool bDone = false; - sal_Bool bIllArg = false; + bool bDone = false; + bool bIllArg = false; //! Type of aElement can be some specific interface instead of XInterface @@ -2627,10 +2627,10 @@ void SAL_CALL ScTableSheetsObj::insertByName( const OUString& aName, const uno:: } } else - bIllArg = sal_True; + bIllArg = true; } else - bIllArg = sal_True; + bIllArg = true; } if (!bDone) @@ -2647,8 +2647,8 @@ void SAL_CALL ScTableSheetsObj::replaceByName( const OUString& aName, const uno: lang::WrappedTargetException, uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - sal_Bool bDone = false; - sal_Bool bIllArg = false; + bool bDone = false; + bool bIllArg = false; //! Type of aElement can be some specific interface instead of XInterface @@ -2679,10 +2679,10 @@ void SAL_CALL ScTableSheetsObj::replaceByName( const OUString& aName, const uno: } } else - bIllArg = sal_True; + bIllArg = true; } else - bIllArg = sal_True; + bIllArg = true; } if (!bDone) @@ -2699,7 +2699,7 @@ void SAL_CALL ScTableSheetsObj::removeByName( const OUString& aName ) lang::WrappedTargetException, uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - sal_Bool bDone = false; + bool bDone = false; if (pDocShell) { SCTAB nIndex; @@ -2946,7 +2946,7 @@ void SAL_CALL ScTableColumnsObj::insertByIndex( sal_Int32 nPosition, sal_Int32 n throw(uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - sal_Bool bDone = false; + bool bDone = false; if ( pDocShell && nCount > 0 && nPosition >= 0 && nStartCol+nPosition <= nEndCol && nStartCol+nPosition+nCount-1 <= MAXCOL ) { @@ -2962,7 +2962,7 @@ void SAL_CALL ScTableColumnsObj::removeByIndex( sal_Int32 nIndex, sal_Int32 nCou throw(uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - sal_Bool bDone = false; + bool bDone = false; // Der zu loeschende Bereich muss innerhalb des Objekts liegen if ( pDocShell && nCount > 0 && nIndex >= 0 && nStartCol+nIndex+nCount-1 <= nEndCol ) { @@ -3087,14 +3087,14 @@ void SAL_CALL ScTableColumnsObj::setPropertyValue( } else if ( aNameString.equalsAscii( SC_UNONAME_CELLVIS ) ) { - sal_Bool bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue ); + bool bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue ); ScSizeMode eMode = bVis ? SC_SIZE_SHOW : SC_SIZE_DIRECT; rFunc.SetWidthOrHeight(true, aColArr, nTab, eMode, 0, true, true); // SC_SIZE_DIRECT with size 0: hide } else if ( aNameString.equalsAscii( SC_UNONAME_OWIDTH ) ) { - sal_Bool bOpt = ScUnoHelpFunctions::GetBoolFromAny( aValue ); + bool bOpt = ScUnoHelpFunctions::GetBoolFromAny( aValue ); if (bOpt) rFunc.SetWidthOrHeight( true, aColArr, nTab, SC_SIZE_OPTIMAL, STD_EXTRA_WIDTH, true, true); @@ -3103,7 +3103,7 @@ void SAL_CALL ScTableColumnsObj::setPropertyValue( else if ( aNameString.equalsAscii( SC_UNONAME_NEWPAGE ) || aNameString.equalsAscii( SC_UNONAME_MANPAGE ) ) { //! single function to set/remove all breaks? - sal_Bool bSet = ScUnoHelpFunctions::GetBoolFromAny( aValue ); + bool bSet = ScUnoHelpFunctions::GetBoolFromAny( aValue ); for (SCCOL nCol=nStartCol; nCol<=nEndCol; nCol++) if (bSet) rFunc.InsertPageBreak( true, ScAddress(nCol,0,nTab), true, true, true ); @@ -3139,7 +3139,7 @@ uno::Any SAL_CALL ScTableColumnsObj::getPropertyValue( const OUString& aProperty } else if ( aNameString.equalsAscii( SC_UNONAME_OWIDTH ) ) { - sal_Bool bOpt = !(pDoc->GetColFlags( nStartCol, nTab ) & CR_MANUALSIZE); + bool bOpt = !(pDoc->GetColFlags( nStartCol, nTab ) & CR_MANUALSIZE); ScUnoHelpFunctions::SetBoolInAny( aAny, bOpt ); } else if ( aNameString.equalsAscii( SC_UNONAME_NEWPAGE ) ) @@ -3201,7 +3201,7 @@ void SAL_CALL ScTableRowsObj::insertByIndex( sal_Int32 nPosition, sal_Int32 nCou throw(uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - sal_Bool bDone = false; + bool bDone = false; if ( pDocShell && nCount > 0 && nPosition >= 0 && nStartRow+nPosition <= nEndRow && nStartRow+nPosition+nCount-1 <= MAXROW ) { @@ -3217,7 +3217,7 @@ void SAL_CALL ScTableRowsObj::removeByIndex( sal_Int32 nIndex, sal_Int32 nCount throw(uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - sal_Bool bDone = false; + bool bDone = false; // Der zu loeschende Bereich muss innerhalb des Objekts liegen if ( pDocShell && nCount > 0 && nIndex >= 0 && nStartRow+nIndex+nCount-1 <= nEndRow ) { @@ -3309,7 +3309,7 @@ void SAL_CALL ScTableRowsObj::setPropertyValue( } else { - sal_Bool bOpt = ScUnoHelpFunctions::GetBoolFromAny( aValue ); + bool bOpt = ScUnoHelpFunctions::GetBoolFromAny( aValue ); if (bOpt) rFunc.SetWidthOrHeight(false, aRowArr, nTab, SC_SIZE_OPTIMAL, 0, true, true); else @@ -3338,7 +3338,7 @@ void SAL_CALL ScTableRowsObj::setPropertyValue( } else if ( aNameString.equalsAscii( SC_UNONAME_CELLVIS ) ) { - sal_Bool bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue ); + bool bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue ); ScSizeMode eMode = bVis ? SC_SIZE_SHOW : SC_SIZE_DIRECT; rFunc.SetWidthOrHeight(false, aRowArr, nTab, eMode, 0, true, true); // SC_SIZE_DIRECT with size 0: hide @@ -3360,7 +3360,7 @@ void SAL_CALL ScTableRowsObj::setPropertyValue( else if ( aNameString.equalsAscii( SC_UNONAME_NEWPAGE) || aNameString.equalsAscii( SC_UNONAME_MANPAGE) ) { //! single function to set/remove all breaks? - sal_Bool bSet = ScUnoHelpFunctions::GetBoolFromAny( aValue ); + bool bSet = ScUnoHelpFunctions::GetBoolFromAny( aValue ); for (SCROW nRow=nStartRow; nRow<=nEndRow; nRow++) if (bSet) rFunc.InsertPageBreak( false, ScAddress(0,nRow,nTab), true, true, true ); @@ -3414,7 +3414,7 @@ uno::Any SAL_CALL ScTableRowsObj::getPropertyValue( const OUString& aPropertyNam } else if ( aNameString.equalsAscii( SC_UNONAME_OHEIGHT ) ) { - sal_Bool bOpt = !(pDoc->GetRowFlags( nStartRow, nTab ) & CR_MANUALSIZE); + bool bOpt = !(pDoc->GetRowFlags( nStartRow, nTab ) & CR_MANUALSIZE); ScUnoHelpFunctions::SetBoolInAny( aAny, bOpt ); } else if ( aNameString.equalsAscii( SC_UNONAME_NEWPAGE ) ) diff --git a/sc/source/ui/unoobj/filtuno.cxx b/sc/source/ui/unoobj/filtuno.cxx index 68fb7d7a02c0..6418d606a8f9 100644 --- a/sc/source/ui/unoobj/filtuno.cxx +++ b/sc/source/ui/unoobj/filtuno.cxx @@ -236,9 +236,9 @@ sal_Int16 SAL_CALL ScFilterOptionsObj::execute() throw(uno::RuntimeException, st } else { - sal_Bool bMultiByte = sal_True; - sal_Bool bDBEnc = false; - sal_Bool bAscii = false; + bool bMultiByte = true; + bool bDBEnc = false; + bool bAscii = false; sal_Unicode cStrDel = '"'; sal_Unicode cAsciiDel = ';'; @@ -258,7 +258,7 @@ sal_Int16 SAL_CALL ScFilterOptionsObj::execute() throw(uno::RuntimeException, st cAsciiDel = '\t'; aTitle = ScGlobal::GetRscString( STR_EXPORT_ASCII ); - bAscii = sal_True; + bAscii = true; } else if ( aFilterString == ScDocShell::GetLotusFilterName() ) { @@ -281,7 +281,7 @@ sal_Int16 SAL_CALL ScFilterOptionsObj::execute() throw(uno::RuntimeException, st aTitle = ScGlobal::GetRscString( STR_IMPORT_DBF ); } load_CharSet( eEncoding, bExport ); - bDBEnc = sal_True; + bDBEnc = true; } else if ( aFilterString == ScDocShell::GetDifFilterName() ) { diff --git a/sc/source/ui/unoobj/funcuno.cxx b/sc/source/ui/unoobj/funcuno.cxx index 2c84f30e9a5e..19d41cad279a 100644 --- a/sc/source/ui/unoobj/funcuno.cxx +++ b/sc/source/ui/unoobj/funcuno.cxx @@ -137,7 +137,7 @@ void ScTempDocCache::Clear() //! merge this with ScAreaLink::Refresh //! copy directly without a clipboard document? -static sal_Bool lcl_CopyData( ScDocument* pSrcDoc, const ScRange& rSrcRange, +static bool lcl_CopyData( ScDocument* pSrcDoc, const ScRange& rSrcRange, ScDocument* pDestDoc, const ScAddress& rDestPos ) { SCTAB nSrcTab = rSrcRange.aStart.Tab(); @@ -170,7 +170,7 @@ static sal_Bool lcl_CopyData( ScDocument* pSrcDoc, const ScRange& rSrcRange, pDestDoc->CopyFromClip( aNewRange, aDestMark, IDF_ALL & ~IDF_FORMULA, NULL, pClipDoc, false ); delete pClipDoc; - return sal_True; + return true; } ScFunctionAccess::ScFunctionAccess() : @@ -275,7 +275,7 @@ void SAL_CALL ScFunctionAccess::setPropertyValue( // options aren't initialized from configuration - always get the same default behaviour - sal_Bool bDone = ScDocOptionsHelper::setPropertyValue( *pOptions, aPropertyMap, aPropertyName, aValue ); + bool bDone = ScDocOptionsHelper::setPropertyValue( *pOptions, aPropertyMap, aPropertyName, aValue ); if (!bDone) throw beans::UnknownPropertyException(); } @@ -302,7 +302,7 @@ SC_IMPL_DUMMY_PROPERTY_LISTENER( ScFunctionAccess ) // XFunctionAccess -static sal_Bool lcl_AddFunctionToken( ScTokenArray& rArray, const OUString& rName,const ScCompiler& rCompiler ) +static bool lcl_AddFunctionToken( ScTokenArray& rArray, const OUString& rName,const ScCompiler& rCompiler ) { // function names are always case-insensitive OUString aUpper = ScGlobal::pCharClass->uppercase(rName); @@ -464,7 +464,7 @@ class ArrayOfArrayProc { public: static void processSequences( ScDocument* pDoc, const uno::Any& rArg, ScTokenArray& rTokenArr, - long& rDocRow, sal_Bool& rArgErr, sal_Bool& rOverflow ) + long& rDocRow, bool& rArgErr, bool& rOverflow ) { SequencesContainer< T > aContainer( rArg, rTokenArr, rDocRow, pDoc ); aContainer.process(); @@ -520,8 +520,8 @@ uno::Any SAL_CALL ScFunctionAccess::callFunction( const OUString& aName, // add arguments to token array - sal_Bool bArgErr = false; - sal_Bool bOverflow = false; + bool bArgErr = false; + bool bOverflow = false; long nDocRow = 0; long nArgCount = aArguments.getLength(); const uno::Any* pArgArr = aArguments.getConstArray(); @@ -597,12 +597,12 @@ uno::Any SAL_CALL ScFunctionAccess::callFunction( const OUString& aName, long nRowCount = aSrcRange.aEnd.Row() - aSrcRange.aStart.Row() + 1; if ( nStartRow + nRowCount > MAXROWCOUNT ) - bOverflow = sal_True; + bOverflow = true; else { // copy data if ( !lcl_CopyData( pSrcDoc, aSrcRange, pDoc, ScAddress( 0, (SCROW)nDocRow, 0 ) ) ) - bOverflow = sal_True; + bOverflow = true; } nDocRow += nRowCount; @@ -610,13 +610,13 @@ uno::Any SAL_CALL ScFunctionAccess::callFunction( const OUString& aName, lcl_AddRef( aTokenArr, nStartRow, nColCount, nRowCount ); } else - bArgErr = sal_True; + bArgErr = true; } else - bArgErr = sal_True; + bArgErr = true; } else - bArgErr = sal_True; // invalid type + bArgErr = true; // invalid type } aTokenArr.AddOpCode(ocClose); aTokenArr.AddOpCode(ocStop); @@ -667,7 +667,7 @@ uno::Any SAL_CALL ScFunctionAccess::callFunction( const OUString& aName, else { // any other error: IllegalArgumentException - bArgErr = sal_True; + bArgErr = true; } pDoc->DeleteAreaTab( 0, 0, MAXCOL, MAXROW, 0, IDF_ALL ); diff --git a/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx index bf1bf8f455ed..4f0cd871eaed 100644 --- a/sc/source/ui/unoobj/linkuno.cxx +++ b/sc/source/ui/unoobj/linkuno.cxx @@ -656,7 +656,7 @@ void ScAreaLinkObj::Modify_Impl( const OUString* pNewFile, const OUString* pNewF pLinkManager->Remove( pLink ); pLink = NULL; // bei Remove geloescht - sal_Bool bFitBlock = sal_True; // verschieben, wenn durch Update Groesse geaendert + bool bFitBlock = true; // verschieben, wenn durch Update Groesse geaendert if (pNewFile) { aFile = *pNewFile; diff --git a/sc/source/ui/unoobj/nameuno.cxx b/sc/source/ui/unoobj/nameuno.cxx index 9386c11292be..9a8c52e7ea0c 100644 --- a/sc/source/ui/unoobj/nameuno.cxx +++ b/sc/source/ui/unoobj/nameuno.cxx @@ -512,7 +512,7 @@ void SAL_CALL ScNamedRangesObj::addNewByName( const OUString& aName, if ( nUnoType & sheet::NamedRangeFlag::COLUMN_HEADER ) nNewType |= RT_COLHEADER; if ( nUnoType & sheet::NamedRangeFlag::ROW_HEADER ) nNewType |= RT_ROWHEADER; - sal_Bool bDone = false; + bool bDone = false; if (pDocShell) { ScDocument* pDoc = pDocShell->GetDocument(); @@ -546,10 +546,10 @@ void SAL_CALL ScNamedRangesObj::addNewFromTitles( const table::CellRangeAddress& SolarMutexGuard aGuard; //! this cannot be an enum, because multiple bits can be set !!! - sal_Bool bTop = ( aBorder == sheet::Border_TOP ); - sal_Bool bLeft = ( aBorder == sheet::Border_LEFT ); - sal_Bool bBottom = ( aBorder == sheet::Border_BOTTOM ); - sal_Bool bRight = ( aBorder == sheet::Border_RIGHT ); + bool bTop = ( aBorder == sheet::Border_TOP ); + bool bLeft = ( aBorder == sheet::Border_LEFT ); + bool bBottom = ( aBorder == sheet::Border_BOTTOM ); + bool bRight = ( aBorder == sheet::Border_RIGHT ); ScRange aRange; ScUnoConversion::FillScRange( aRange, aSource ); @@ -1131,7 +1131,7 @@ void SAL_CALL ScLabelRangesObj::removeByIndex( sal_Int32 nIndex ) throw(uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - sal_Bool bDone = false; + bool bDone = false; if (pDocShell) { ScDocument* pDoc = pDocShell->GetDocument(); @@ -1155,7 +1155,7 @@ void SAL_CALL ScLabelRangesObj::removeByIndex( sal_Int32 nIndex ) pDoc->CompileColRowNameFormula(); pDocShell->PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_GRID ); pDocShell->SetDocumentModified(); - bDone = sal_True; + bDone = true; //! Undo ?!?! (here and from dialog) } diff --git a/sc/source/ui/unoobj/optuno.cxx b/sc/source/ui/unoobj/optuno.cxx index 9c9730494a6c..e272ab60478b 100644 --- a/sc/source/ui/unoobj/optuno.cxx +++ b/sc/source/ui/unoobj/optuno.cxx @@ -197,7 +197,7 @@ void SAL_CALL ScDocOptionsObj::setPropertyValue( { SolarMutexGuard aGuard; - sal_Bool bDone = ScDocOptionsHelper::setPropertyValue( aOptions, GetPropertySet().getPropertyMap(), aPropertyName, aValue ); + bool bDone = ScDocOptionsHelper::setPropertyValue( aOptions, GetPropertySet().getPropertyMap(), aPropertyName, aValue ); if (!bDone) ScModelObj::setPropertyValue( aPropertyName, aValue ); diff --git a/sc/source/ui/unoobj/scdetect.cxx b/sc/source/ui/unoobj/scdetect.cxx index 877925be2052..74bfe81b3a4f 100644 --- a/sc/source/ui/unoobj/scdetect.cxx +++ b/sc/source/ui/unoobj/scdetect.cxx @@ -231,7 +231,7 @@ static sal_Bool lcl_MayBeAscii( SvStream& rStream ) } #endif -static sal_Bool lcl_MayBeDBase( SvStream& rStream ) +static bool lcl_MayBeDBase( SvStream& rStream ) { // Look for dbf marker, see connectivity/source/inc/dbase/DTable.hxx // DBFType for values. @@ -298,11 +298,11 @@ OUString SAL_CALL ScFilterDetect::detect( uno::Sequence<beans::PropertyValue>& l // opening as template is done when a parameter tells to do so and a template filter can be detected // (otherwise no valid filter would be found) or if the detected filter is a template filter and // there is no parameter that forbids to open as template - sal_Bool bOpenAsTemplate = false; - sal_Bool bWasReadOnly = false, bReadOnly = false; + bool bOpenAsTemplate = false; + bool bWasReadOnly = false, bReadOnly = false; - sal_Bool bRepairPackage = false; - sal_Bool bRepairAllowed = false; + bool bRepairPackage = false; + bool bRepairAllowed = false; bool bDeepDetection = false; // now some parameters that can already be in the array, but may be overwritten or new inserted here @@ -394,7 +394,7 @@ OUString SAL_CALL ScFilterDetect::detect( uno::Sequence<beans::PropertyValue>& l SfxMedium aMedium( aURL, bWasReadOnly ? STREAM_STD_READ : STREAM_STD_READWRITE, NULL, pSet ); aMedium.UseInteractionHandler( true ); - sal_Bool bIsStorage = aMedium.IsStorage(); + bool bIsStorage = aMedium.IsStorage(); if ( aMedium.GetErrorCode() == ERRCODE_NONE ) { // remember input stream and content and put them into the descriptor later @@ -593,7 +593,7 @@ OUString SAL_CALL ScFilterDetect::detect( uno::Sequence<beans::PropertyValue>& l lDescriptor[nPropertyCount].Value <<= bRepairAllowed; nPropertyCount++; - bOpenAsTemplate = sal_True; + bOpenAsTemplate = true; // TODO/LATER: set progress bar that should be used } diff --git a/sc/source/ui/unoobj/servuno.cxx b/sc/source/ui/unoobj/servuno.cxx index ea7f9f7695a5..f5eeccee27e5 100644 --- a/sc/source/ui/unoobj/servuno.cxx +++ b/sc/source/ui/unoobj/servuno.cxx @@ -561,7 +561,7 @@ uno::Reference<uno::XInterface> ScServiceProvider::MakeInstance( case SC_SERVICE_LISTCELLBIND: if (pDocShell) { - sal_Bool bListPos = ( nType == SC_SERVICE_LISTCELLBIND ); + bool bListPos = ( nType == SC_SERVICE_LISTCELLBIND ); uno::Reference<sheet::XSpreadsheetDocument> xDoc( pDocShell->GetBaseModel(), uno::UNO_QUERY ); xRet.set(*new calc::OCellValueBinding( xDoc, bListPos )); } diff --git a/sc/source/ui/unoobj/shapeuno.cxx b/sc/source/ui/unoobj/shapeuno.cxx index bc470f6b0862..abe40834926e 100644 --- a/sc/source/ui/unoobj/shapeuno.cxx +++ b/sc/source/ui/unoobj/shapeuno.cxx @@ -72,7 +72,7 @@ const SvEventDescription* ScShapeObj::GetSupportedMacroItems() return aMacroDescriptionsImpl; } // #i66550 HLINK_FOR_SHAPES -ScMacroInfo* ScShapeObj_getShapeHyperMacroInfo( ScShapeObj* pShape, sal_Bool bCreate = false ) +ScMacroInfo* ScShapeObj_getShapeHyperMacroInfo( ScShapeObj* pShape, bool bCreate = false ) { if( pShape ) if( SdrObject* pObj = pShape->GetSdrObject() ) @@ -244,31 +244,31 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScShapeObj::getPropertySetInfo( return mxPropSetInfo; } -static sal_Bool lcl_GetPageNum( SdrPage* pPage, SdrModel& rModel, SCTAB& rNum ) +static bool lcl_GetPageNum( SdrPage* pPage, SdrModel& rModel, SCTAB& rNum ) { sal_uInt16 nCount = rModel.GetPageCount(); for (sal_uInt16 i=0; i<nCount; i++) if ( rModel.GetPage(i) == pPage ) { rNum = static_cast<SCTAB>(i); - return sal_True; + return true; } return false; } -static sal_Bool lcl_GetCaptionPoint( uno::Reference< drawing::XShape >& xShape, awt::Point& rCaptionPoint ) +static bool lcl_GetCaptionPoint( uno::Reference< drawing::XShape >& xShape, awt::Point& rCaptionPoint ) { - sal_Bool bReturn = false; + bool bReturn = false; OUString sType(xShape->getShapeType()); - sal_Bool bCaptionShape( sType == "com.sun.star.drawing.CaptionShape" ); + bool bCaptionShape( sType == "com.sun.star.drawing.CaptionShape" ); if (bCaptionShape) { uno::Reference < beans::XPropertySet > xShapeProp (xShape, uno::UNO_QUERY); if (xShapeProp.is()) { xShapeProp->getPropertyValue("CaptionPoint") >>= rCaptionPoint; - bReturn = sal_True; + bReturn = true; } } return bReturn; @@ -279,7 +279,7 @@ static ScRange lcl_GetAnchorCell( uno::Reference< drawing::XShape >& xShape, ScD { ScRange aReturn; rUnoPoint = xShape->getPosition(); - sal_Bool bCaptionShape(lcl_GetCaptionPoint(xShape, rCaptionPoint)); + bool bCaptionShape(lcl_GetCaptionPoint(xShape, rCaptionPoint)); if (pDoc->IsNegativePage(nTab)) { rUnoSize = xShape->getSize(); @@ -639,7 +639,7 @@ void SAL_CALL ScShapeObj::setPropertyValue(const OUString& aPropertyName, const { if( SdrObject* pObj = this->GetSdrObject() ) { - sal_Bool aProt = false; + bool aProt = false; if( aValue >>= aProt ) pObj->SetMoveProtect( aProt ); } @@ -822,7 +822,7 @@ uno::Any SAL_CALL ScShapeObj::getPropertyValue( const OUString& aPropertyName ) } else if ( aNameString.equalsAscii( SC_UNONAME_MOVEPROTECT ) ) { - sal_Bool aProt = false; + bool aProt = false; if ( SdrObject* pObj = this->GetSdrObject() ) aProt = pObj->IsMoveProtect(); aAny <<= aProt; @@ -1367,7 +1367,7 @@ class ShapeUnoEventAccessImpl : public ShapeUnoEventAcess_BASE private: ScShapeObj* mpShape; - ScMacroInfo* getInfo( sal_Bool bCreate = false ) + ScMacroInfo* getInfo( bool bCreate = false ) { return ScShapeObj_getShapeHyperMacroInfo( mpShape, bCreate ); } @@ -1403,7 +1403,7 @@ public: OUString sValue; if ( pProperties->Value >>= sValue ) { - ScMacroInfo* pInfo = getInfo( sal_True ); + ScMacroInfo* pInfo = getInfo( true ); OSL_ENSURE( pInfo, "shape macro info could not be created!" ); if ( !pInfo ) break; diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx index 579e6a776f67..dedc580da577 100644 --- a/sc/source/ui/unoobj/styleuno.cxx +++ b/sc/source/ui/unoobj/styleuno.cxx @@ -540,9 +540,9 @@ void SAL_CALL ScStyleFamiliesObj::loadStylesFromURL( const OUString& aURL, { // collect options - sal_Bool bLoadReplace = sal_True; // defaults - sal_Bool bLoadCellStyles = sal_True; - sal_Bool bLoadPageStyles = sal_True; + bool bLoadReplace = true; // defaults + bool bLoadCellStyles = true; + bool bLoadPageStyles = true; const beans::PropertyValue* pPropArray = aOptions.getConstArray(); long nPropCount = aOptions.getLength(); @@ -1055,7 +1055,7 @@ void SAL_CALL ScStyleObj::setParentStyle( const OUString& rParentStyle ) //! Undo ????????????? OUString aString(ScStyleNameConversion::ProgrammaticToDisplayName( rParentStyle, sal::static_int_cast<sal_uInt16>(eFamily) )); - sal_Bool bOk = pStyle->SetParent( aString ); + bool bOk = pStyle->SetParent( aString ); if (bOk) { // wie bei setPropertyValue @@ -1111,7 +1111,7 @@ void SAL_CALL ScStyleObj::setName( const OUString& aNewName ) //! Undo ????????????? OUString aString(aNewName); - sal_Bool bOk = pStyle->SetName( aString ); + bool bOk = pStyle->SetName( aString ); if (bOk) { aStyleName = aString; //! notify other objects for this style? @@ -1294,8 +1294,7 @@ uno::Any SAL_CALL ScStyleObj::getPropertyDefault( const OUString& aPropertyName case ATTR_PAGE_OBJECTS: case ATTR_PAGE_DRAWINGS: //! sal_Bool-MID fuer ScViewObjectModeItem definieren? - aAny <<= sal_Bool( ((const ScViewObjectModeItem&)pItemSet->Get(nWhich)). - GetValue() == VOBJ_MODE_SHOW ); + aAny <<= ((const ScViewObjectModeItem&)pItemSet->Get(nWhich)).GetValue() == VOBJ_MODE_SHOW; break; case ATTR_PAGE_SCALETO: { @@ -1670,7 +1669,7 @@ void ScStyleObj::SetOnePropertyValue( const OUString& rPropertyName, const SfxIt case ATTR_PAGE_OBJECTS: case ATTR_PAGE_DRAWINGS: { - sal_Bool bBool = false; + bool bBool = false; *pValue >>= bBool; //! sal_Bool-MID fuer ScViewObjectModeItem definieren? rSet.Put( ScViewObjectModeItem( pEntry->nWID, @@ -1727,7 +1726,7 @@ void ScStyleObj::SetOnePropertyValue( const OUString& rPropertyName, const SfxIt break; case ATTR_HIDDEN: { - sal_Bool bHidden = sal_False; + bool bHidden = false; if ( *pValue >>= bHidden ) pStyle->SetHidden( bHidden ); } @@ -1874,7 +1873,7 @@ uno::Any SAL_CALL ScStyleObj::getPropertyValue( const OUString& aPropertyName ) case ATTR_STACKED: { sal_Int32 nRot = ((const SfxInt32Item&)pItemSet->Get(ATTR_ROTATE_VALUE)).GetValue(); - sal_Bool bStacked = ((const SfxBoolItem&)pItemSet->Get(nWhich)).GetValue(); + bool bStacked = ((const SfxBoolItem&)pItemSet->Get(nWhich)).GetValue(); SvxOrientationItem( nRot, bStacked, 0 ).QueryValue( aAny ); } break; @@ -1887,8 +1886,7 @@ uno::Any SAL_CALL ScStyleObj::getPropertyValue( const OUString& aPropertyName ) case ATTR_PAGE_OBJECTS: case ATTR_PAGE_DRAWINGS: //! sal_Bool-MID fuer ScViewObjectModeItem definieren? - aAny <<= sal_Bool( ((const ScViewObjectModeItem&)pItemSet-> - Get(nWhich)).GetValue() == VOBJ_MODE_SHOW ); + aAny <<= ((const ScViewObjectModeItem&)pItemSet->Get(nWhich)).GetValue() == VOBJ_MODE_SHOW; break; case ATTR_PAGE_PAPERBIN: { @@ -1918,7 +1916,7 @@ uno::Any SAL_CALL ScStyleObj::getPropertyValue( const OUString& aPropertyName ) break; case ATTR_HIDDEN: { - sal_Bool bHidden = sal_False; + bool bHidden = false; SfxStyleSheetBase* pStyle = GetStyle_Impl(); if ( pStyle ) bHidden = pStyle->IsHidden(); diff --git a/sc/source/ui/unoobj/textuno.cxx b/sc/source/ui/unoobj/textuno.cxx index ee57462ebc2c..3211f4508e34 100644 --- a/sc/source/ui/unoobj/textuno.cxx +++ b/sc/source/ui/unoobj/textuno.cxx @@ -59,7 +59,7 @@ static const SvxItemPropertySet * lcl_GetHdFtPropertySet() SVX_UNOEDIT_NUMBERING_PROPERTIE, // for completeness of service ParagraphProperties { OUString(), 0, css::uno::Type(), 0, 0 } }; - static sal_Bool bTwipsSet = false; + static bool bTwipsSet = false; if (!bTwipsSet) { @@ -79,7 +79,7 @@ static const SvxItemPropertySet * lcl_GetHdFtPropertySet() ++pEntry; } - bTwipsSet = sal_True; + bTwipsSet = true; } static SvxItemPropertySet aHdFtPropertySet_Impl( aHdFtPropertyMap_Impl, SdrObject::GetGlobalDrawObjectItemPool() ); return &aHdFtPropertySet_Impl; diff --git a/sc/source/ui/unoobj/tokenuno.cxx b/sc/source/ui/unoobj/tokenuno.cxx index 59bd144380ac..1bde19267e81 100644 --- a/sc/source/ui/unoobj/tokenuno.cxx +++ b/sc/source/ui/unoobj/tokenuno.cxx @@ -422,7 +422,7 @@ bool ScTokenConversion::ConvertToTokenSequence( const ScDocument& rDoc, { sheet::NameToken aNameToken; aNameToken.Index = static_cast<sal_Int32>( rToken.GetIndex() ); - aNameToken.Global = static_cast<sal_Bool>( rToken.IsGlobal() ); + aNameToken.Global = rToken.IsGlobal(); rAPI.Data <<= aNameToken; } break; diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx index d7935889c76c..c8d47d8d83ac 100644 --- a/sc/source/ui/unoobj/viewuno.cxx +++ b/sc/source/ui/unoobj/viewuno.cxx @@ -337,7 +337,7 @@ sal_Bool SAL_CALL ScViewPaneBase::isFormDesignMode( ) throw (uno::RuntimeExcept { SolarMutexGuard aGuard; - sal_Bool bIsFormDesignMode( sal_True ); + bool bIsFormDesignMode( true ); FmFormShell* pFormShell( pViewShell ? pViewShell->GetFormShell() : NULL ); if ( pFormShell ) @@ -632,20 +632,20 @@ uno::Sequence<sal_Int8> SAL_CALL ScTabViewObj::getImplementationId() // XDocumentView -static sal_Bool lcl_TabInRanges( SCTAB nTab, const ScRangeList& rRanges ) +static bool lcl_TabInRanges( SCTAB nTab, const ScRangeList& rRanges ) { for (size_t i = 0, nCount = rRanges.size(); i < nCount; ++i) { const ScRange* pRange = rRanges[ i ]; if ( nTab >= pRange->aStart.Tab() && nTab <= pRange->aEnd.Tab() ) - return sal_True; + return true; } return false; } static void lcl_ShowObject( ScTabViewShell& rViewSh, ScDrawView& rDrawView, SdrObject* pSelObj ) { - sal_Bool bFound = false; + bool bFound = false; SCTAB nObjectTab = 0; SdrModel* pModel = rDrawView.GetModel(); @@ -661,7 +661,7 @@ static void lcl_ShowObject( ScTabViewShell& rViewSh, ScDrawView& rDrawView, SdrO { if ( pObject == pSelObj ) { - bFound = sal_True; + bFound = true; nObjectTab = static_cast<SCTAB>(i); } pObject = aIter.Next(); @@ -688,7 +688,7 @@ sal_Bool SAL_CALL ScTabViewObj::select( const uno::Any& aSelection ) //! Type of aSelection can be some specific interface instead of XInterface - sal_Bool bRet = false; + bool bRet = false; uno::Reference<uno::XInterface> xInterface(aSelection, uno::UNO_QUERY); if ( !xInterface.is() ) //clear all selections { @@ -700,7 +700,7 @@ sal_Bool SAL_CALL ScTabViewObj::select( const uno::Any& aSelection ) } else //#102232#; if there is no DrawView remove range selection pViewSh->Unmark(); - bRet = sal_True; + bRet = true; } if (bDrawSelModeSet) // remove DrawSelMode if set by API; if necessary it will be set again later @@ -774,7 +774,7 @@ sal_Bool SAL_CALL ScTabViewObj::select( const uno::Any& aSelection ) //! Methode an der View, um RangeList zu selektieren } - bRet = sal_True; + bRet = true; } } else if ( pShapeImp || xShapeColl.is() ) // Drawing-Layer @@ -795,7 +795,7 @@ sal_Bool SAL_CALL ScTabViewObj::select( const uno::Any& aSelection ) if ( pPV && pObj->GetPage() == pPV->GetPage() ) { pDrawView->MarkObj( pObj, pPV ); - bRet = sal_True; + bRet = true; } } } @@ -809,7 +809,7 @@ sal_Bool SAL_CALL ScTabViewObj::select( const uno::Any& aSelection ) if (nCount) { SdrPageView* pPV = NULL; - sal_Bool bAllMarked(sal_True); + bool bAllMarked(true); for ( long i = 0; i < nCount; i++ ) { uno::Reference<drawing::XShape> xShapeInt(xShapeColl->getByIndex(i), uno::UNO_QUERY); @@ -844,10 +844,10 @@ sal_Bool SAL_CALL ScTabViewObj::select( const uno::Any& aSelection ) } } if (bAllMarked) - bRet = sal_True; + bRet = true; } else - bRet = sal_True; // empty XShapes (all shapes are deselected) + bRet = true; // empty XShapes (all shapes are deselected) } if (bRet) @@ -1033,22 +1033,22 @@ ScViewPaneObj* ScTabViewObj::GetObjectByIndex_Impl(sal_uInt16 nIndex) const if (pViewSh) { ScSplitPos eWhich = SC_SPLIT_BOTTOMLEFT; // default Position - sal_Bool bError = false; + bool bError = false; ScViewData* pViewData = pViewSh->GetViewData(); - sal_Bool bHor = ( pViewData->GetHSplitMode() != SC_SPLIT_NONE ); - sal_Bool bVer = ( pViewData->GetVSplitMode() != SC_SPLIT_NONE ); + bool bHor = ( pViewData->GetHSplitMode() != SC_SPLIT_NONE ); + bool bVer = ( pViewData->GetVSplitMode() != SC_SPLIT_NONE ); if ( bHor && bVer ) { // links oben, links unten, rechts oben, rechts unten - wie in Excel if ( nIndex < 4 ) eWhich = ePosHV[nIndex]; else - bError = sal_True; + bError = true; } else if ( bHor ) { if ( nIndex > 1 ) - bError = sal_True; + bError = true; else if ( nIndex == 1 ) eWhich = SC_SPLIT_BOTTOMRIGHT; // sonst SC_SPLIT_BOTTOMLEFT @@ -1056,13 +1056,13 @@ ScViewPaneObj* ScTabViewObj::GetObjectByIndex_Impl(sal_uInt16 nIndex) const else if ( bVer ) { if ( nIndex > 1 ) - bError = sal_True; + bError = true; else if ( nIndex == 0 ) eWhich = SC_SPLIT_TOPLEFT; // sonst SC_SPLIT_BOTTOMLEFT } else if ( nIndex > 0 ) - bError = sal_True; // nicht geteilt: nur 0 gueltig + bError = true; // nicht geteilt: nur 0 gueltig if (!bError) return new ScViewPaneObj( pViewSh, sal::static_int_cast<sal_uInt16>(eWhich) ); @@ -1146,7 +1146,7 @@ uno::Reference< uno::XInterface > ScTabViewObj::GetClickedObject(const Point& rP Size(pDrawView->GetHitTolerancePixel(),0)).Width(); sal_uInt32 nCount(pDrawPage->GetObjCount()); - sal_Bool bFound(false); + bool bFound(false); sal_uInt32 i(0); while (i < nCount && !bFound) { @@ -1154,7 +1154,7 @@ uno::Reference< uno::XInterface > ScTabViewObj::GetClickedObject(const Point& rP if (pObj && SdrObjectPrimitiveHit(*pObj, aPos, nHitLog, *pDrawView->GetSdrPageView(), 0, false)) { xTarget.set(pObj->getUnoShape(), uno::UNO_QUERY); - bFound = sal_True; + bFound = true; } ++i; } @@ -1244,7 +1244,7 @@ bool ScTabViewObj::MousePressed( const awt::MouseEvent& e ) /*ErrCode eRet =*/ pDocSh->CallXScript( *pScript, aParams, aRet, aOutArgsIndex, aOutArgs ); // look for a boolean return value of true - sal_Bool bRetValue = false; + bool bRetValue = false; if (aRet >>= bRetValue) { if (bRetValue) @@ -2056,9 +2056,9 @@ void SAL_CALL ScTabViewObj::startRangeSelection( if (pViewSh) { OUString aInitVal, aTitle; - sal_Bool bCloseOnButtonUp = false; - sal_Bool bSingleCell = false; - sal_Bool bMultiSelection = false; + bool bCloseOnButtonUp = false; + bool bSingleCell = false; + bool bMultiSelection = false; OUString aStrVal; const beans::PropertyValue* pPropArray = aArguments.getConstArray(); diff --git a/sc/source/ui/vba/excelvbahelper.cxx b/sc/source/ui/vba/excelvbahelper.cxx index 8bf4ba9e19a1..3b654bf7c46e 100644 --- a/sc/source/ui/vba/excelvbahelper.cxx +++ b/sc/source/ui/vba/excelvbahelper.cxx @@ -64,7 +64,7 @@ GetAutoFiltRange( ScDocShell* pShell, sal_Int16 nSheet ) throw ( uno::RuntimeExc if (xUnnamedDBRanges->hasByTable( nSheet ) ) { uno::Reference< sheet::XDatabaseRange > xDBRange( xUnnamedDBRanges->getByTable( nSheet ) , uno::UNO_QUERY_THROW ); - sal_Bool bHasAuto = false; + bool bHasAuto = false; uno::Reference< beans::XPropertySet > xProps( xDBRange, uno::UNO_QUERY_THROW ); xProps->getPropertyValue("AutoFilter") >>= bHasAuto; if ( bHasAuto ) @@ -115,8 +115,7 @@ private: bool getReplaceCellsWarning() throw ( uno::RuntimeException ) { - sal_Bool res = getGlobalSheetSettings()->getReplaceCellsWarning(); - return ( res == sal_True ); + return getGlobalSheetSettings()->getReplaceCellsWarning(); } void setReplaceCellsWarning( bool bState ) throw ( uno::RuntimeException ) diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx index 1953f704fb85..aed59b724ec1 100644 --- a/sc/source/ui/vba/vbaapplication.cxx +++ b/sc/source/ui/vba/vbaapplication.cxx @@ -104,23 +104,23 @@ using ::com::sun::star::uno::UNO_QUERY; struct ScVbaAppSettings { sal_Int32 mnCalculation; - sal_Bool mbDisplayAlerts; - sal_Bool mbEnableEvents; - sal_Bool mbExcel4Menus; - sal_Bool mbDisplayNoteIndicator; - sal_Bool mbShowWindowsInTaskbar; - sal_Bool mbEnableCancelKey; + bool mbDisplayAlerts; + bool mbEnableEvents; + bool mbExcel4Menus; + bool mbDisplayNoteIndicator; + bool mbShowWindowsInTaskbar; + bool mbEnableCancelKey; explicit ScVbaAppSettings(); }; ScVbaAppSettings::ScVbaAppSettings() : mnCalculation( excel::XlCalculation::xlCalculationAutomatic ), - mbDisplayAlerts( sal_True ), - mbEnableEvents( sal_True ), - mbExcel4Menus( sal_False ), - mbDisplayNoteIndicator( sal_True ), - mbShowWindowsInTaskbar( sal_True ), - mbEnableCancelKey( sal_False ) + mbDisplayAlerts( true ), + mbEnableEvents( true ), + mbExcel4Menus( false ), + mbDisplayNoteIndicator( true ), + mbShowWindowsInTaskbar( true ), + mbEnableCancelKey( false ) { } @@ -405,7 +405,7 @@ void SAL_CALL ScVbaApplication::setStatusBar( const uno::Any& _statusbar ) throw (uno::RuntimeException, std::exception) { OUString sText; - sal_Bool bDefault = false; + bool bDefault = false; uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW ); uno::Reference< task::XStatusIndicatorSupplier > xStatusIndicatorSupplier( xModel->getCurrentController(), uno::UNO_QUERY_THROW ); uno::Reference< task::XStatusIndicator > xStatusIndicator( xStatusIndicatorSupplier->getStatusIndicator(), uno::UNO_QUERY_THROW ); @@ -548,12 +548,12 @@ void SAL_CALL ScVbaApplication::GoTo( const uno::Any& Reference, const uno::Any& Scroll ) throw (uno::RuntimeException, std::exception) { //test Scroll is a boolean - sal_Bool bScroll = false; + bool bScroll = false; //R1C1-style string or a string of procedure name. if( Scroll.hasValue() ) { - sal_Bool aScroll = false; + bool aScroll = false; if( Scroll >>= aScroll ) { bScroll = aScroll; @@ -1226,7 +1226,7 @@ ScVbaApplication::InchesToPoints( double Inches ) throw (uno::RuntimeException, void ScVbaApplication::Volatile( const uno::Any& aVolatile ) throw ( uno::RuntimeException, std::exception ) { - sal_Bool bVolatile = sal_True; + bool bVolatile = true; aVolatile >>= bVolatile; SbMethod* pMeth = StarBASIC::GetActiveMethod(); if ( pMeth ) @@ -1245,7 +1245,7 @@ sal_Bool SAL_CALL ScVbaApplication::getDisplayFormulaBar() throw (css::uno::RuntimeException, std::exception) { - sal_Bool bRes = false; + bool bRes = false; ScTabViewShell* pViewShell = excel::getCurrentBestViewShell( mxContext ); if ( pViewShell ) { diff --git a/sc/source/ui/vba/vbaaxes.cxx b/sc/source/ui/vba/vbaaxes.cxx index e4cf5ba85d72..e99db4336a75 100644 --- a/sc/source/ui/vba/vbaaxes.cxx +++ b/sc/source/ui/vba/vbaaxes.cxx @@ -94,7 +94,7 @@ public: { ScVbaChart* pChart = static_cast< ScVbaChart* >( mxChart.get() ); // primary - sal_Bool bBool = false; + bool bBool = false; uno::Reference< beans::XPropertySet > xDiagramPropertySet( pChart->xDiagramPropertySet() ); if ( ( xDiagramPropertySet->getPropertyValue("HasXAxis") >>= bBool ) && bBool ) mCoordinates.push_back( AxesCoordinate( xlPrimary, xlCategory ) ); diff --git a/sc/source/ui/vba/vbaaxis.cxx b/sc/source/ui/vba/vbaaxis.cxx index 938dfd242453..1dc45d1c09d7 100644 --- a/sc/source/ui/vba/vbaaxis.cxx +++ b/sc/source/ui/vba/vbaaxis.cxx @@ -152,7 +152,7 @@ ScVbaAxis::getCrosses( ) throw (script::BasicErrorException, uno::RuntimeExcept sal_Int32 nCrosses = xlAxisCrossesCustom; try { - sal_Bool bisAutoOrigin = false; + bool bisAutoOrigin = false; mxPropertySet->getPropertyValue(AUTOORIGIN) >>= bisAutoOrigin; if (bisAutoOrigin) nCrosses = xlAxisCrossesAutomatic; @@ -251,7 +251,7 @@ ScVbaAxis::setHasTitle( sal_Bool _bHasTitle ) throw (script::BasicErrorException sal_Bool SAL_CALL ScVbaAxis::getHasTitle( ) throw (script::BasicErrorException, uno::RuntimeException, std::exception) { - sal_Bool bHasTitle = false; + bool bHasTitle = false; try { ScVbaChart* pChart = getChartPtr(); @@ -322,7 +322,7 @@ ScVbaAxis::setMinorUnitIsAuto( sal_Bool _bMinorUnitIsAuto ) throw (script::Basic sal_Bool SAL_CALL ScVbaAxis::getMinorUnitIsAuto( ) throw (script::BasicErrorException, uno::RuntimeException, std::exception) { - sal_Bool bIsAuto = false; + bool bIsAuto = false; try { if (isValueAxis()) @@ -401,7 +401,7 @@ ScVbaAxis::setMajorUnitIsAuto( sal_Bool _bMajorUnitIsAuto ) throw (script::Basic sal_Bool SAL_CALL ScVbaAxis::getMajorUnitIsAuto( ) throw (script::BasicErrorException, uno::RuntimeException, std::exception) { - sal_Bool bIsAuto = false; + bool bIsAuto = false; try { if (isValueAxis()) @@ -470,7 +470,7 @@ ScVbaAxis::setMaximumScaleIsAuto( sal_Bool _bMaximumScaleIsAuto ) throw (script: sal_Bool SAL_CALL ScVbaAxis::getMaximumScaleIsAuto( ) throw (script::BasicErrorException, uno::RuntimeException, std::exception) { - sal_Bool bIsAuto = false; + bool bIsAuto = false; try { if (isValueAxis()) @@ -532,7 +532,7 @@ ScVbaAxis::setMinimumScaleIsAuto( sal_Bool _bMinimumScaleIsAuto ) throw (script: sal_Bool SAL_CALL ScVbaAxis::getMinimumScaleIsAuto( ) throw (script::BasicErrorException, uno::RuntimeException, std::exception) { - sal_Bool bIsAuto = false; + bool bIsAuto = false; try { if (isValueAxis()) @@ -588,7 +588,7 @@ ScVbaAxis::getScaleType( ) throw (script::BasicErrorException, uno::RuntimeExce { if (isValueAxis()) { - sal_Bool bisLogarithmic = false; + bool bisLogarithmic = false; mxPropertySet->getPropertyValue( OUString( OUString("Logarithmic")) ) >>= bisLogarithmic; if (bisLogarithmic) nScaleType = xlScaleLogarithmic; diff --git a/sc/source/ui/vba/vbachart.cxx b/sc/source/ui/vba/vbachart.cxx index 7bf8a65226a9..b659d6408c43 100644 --- a/sc/source/ui/vba/vbachart.cxx +++ b/sc/source/ui/vba/vbachart.cxx @@ -156,7 +156,7 @@ ScVbaChart::getChartType() throw ( uno::RuntimeException, script::BasicErrorExce } else if ( sDiagramType == "com.sun.star.chart.StockDiagram" ) { - sal_Bool bVolume = false; + bool bVolume = false; mxDiagramPropertySet->getPropertyValue(VOLUME) >>= bVolume; if (bVolume) { @@ -169,7 +169,7 @@ ScVbaChart::getChartType() throw ( uno::RuntimeException, script::BasicErrorExce } else if ( sDiagramType == "com.sun.star.chart.XYDiagram" ) { - sal_Bool bHasLines = false; + bool bHasLines = false; mxDiagramPropertySet->getPropertyValue(LINES) >>= bHasLines; sal_Int32 nSplineType = 0; mxDiagramPropertySet->getPropertyValue(SPLINETYPE) >>= nSplineType; @@ -290,8 +290,8 @@ try case xlStockVHLC: case xlStockVOHLC: setDiagram( OUString("com.sun.star.chart.StockDiagram")); - mxDiagramPropertySet->setPropertyValue( UPDOWN, uno::makeAny(sal_Bool((_nChartType == xlStockOHLC) || (_nChartType == xlStockVOHLC)))); - mxDiagramPropertySet->setPropertyValue(VOLUME, uno::makeAny(sal_Bool((_nChartType == xlStockVHLC) || (_nChartType == xlStockVOHLC)))); + mxDiagramPropertySet->setPropertyValue( UPDOWN, uno::makeAny((_nChartType == xlStockOHLC) || (_nChartType == xlStockVOHLC))); + mxDiagramPropertySet->setPropertyValue( VOLUME, uno::makeAny((_nChartType == xlStockVHLC) || (_nChartType == xlStockVOHLC))); break; case xlPieOfPie: // not possible @@ -573,8 +573,8 @@ ScVbaChart::setSourceData( const css::uno::Reference< ::ooo::vba::excel::XRange mxTableChart->setRanges(mRangeAddresses); - sal_Bool bsetRowHeaders = false; - sal_Bool bsetColumnHeaders = false; + bool bsetRowHeaders = false; + bool bsetColumnHeaders = false; ScVbaRange* pRange = static_cast< ScVbaRange* >( _xCalcRange.get() ); if ( pRange ) @@ -812,7 +812,7 @@ ScVbaChart::setLocation( ::sal_Int32 /*where*/, const css::uno::Any& /*Name*/ ) sal_Bool SAL_CALL ScVbaChart::getHasTitle( ) throw (script::BasicErrorException, uno::RuntimeException, std::exception) { - sal_Bool bHasTitle = false; + bool bHasTitle = false; try { mxChartPropertySet->getPropertyValue(HASMAINTITLE) >>= bHasTitle; @@ -841,7 +841,7 @@ ScVbaChart::setHasTitle( sal_Bool bTitle ) throw (script::BasicErrorException, u sal_Bool SAL_CALL ScVbaChart::getHasLegend( ) throw (script::BasicErrorException, uno::RuntimeException, std::exception) { - sal_Bool bHasLegend = false; + bool bHasLegend = false; try { mxChartPropertySet->getPropertyValue(HASLEGEND) >>= bHasLegend; @@ -887,7 +887,7 @@ bool ScVbaChart::is3D() throw ( uno::RuntimeException ) { // #TODO perhaps provide limited Debughelper functionality - sal_Bool is3d = false; + bool is3d = false; mxDiagramPropertySet->getPropertyValue(DIM3D) >>= is3d; return is3d; } @@ -911,7 +911,7 @@ bool ScVbaChart::isStacked() throw ( uno::RuntimeException ) { // #TODO perhaps provide limited Debughelper functionality - sal_Bool bStacked = false; + bool bStacked = false; mxDiagramPropertySet->getPropertyValue(STACKED) >>= bStacked; return bStacked; } @@ -920,7 +920,7 @@ bool ScVbaChart::is100PercentStacked() throw ( uno::RuntimeException ) { // #TODO perhaps provide limited Debughelper functionality - sal_Bool b100Percent = false; + bool b100Percent = false; mxDiagramPropertySet->getPropertyValue(PERCENT) >>= b100Percent; return b100Percent; } @@ -928,11 +928,11 @@ ScVbaChart::is100PercentStacked() throw ( uno::RuntimeException ) sal_Int32 ScVbaChart::getSolidType(sal_Int32 _nDeep, sal_Int32 _nVertiStacked, sal_Int32 _nVerti100PercentStacked, sal_Int32 _nVertiUnStacked, sal_Int32 _nHoriStacked, sal_Int32 _nHori100PercentStacked, sal_Int32 _nHoriUnStacked) throw ( script::BasicErrorException ) { - sal_Bool bIsVertical = true; + bool bIsVertical = true; try { mxDiagramPropertySet->getPropertyValue(VERTICAL) >>= bIsVertical; - sal_Bool bIsDeep = false; + bool bIsDeep = false; mxDiagramPropertySet->getPropertyValue(DEEP) >>= bIsDeep; if (bIsDeep) @@ -961,7 +961,7 @@ ScVbaChart::getSolidType(sal_Int32 _nDeep, sal_Int32 _nVertiStacked, sal_Int32 _ sal_Int32 ScVbaChart::getStockUpDownValue(sal_Int32 _nUpDown, sal_Int32 _nNotUpDown) throw (script::BasicErrorException) { - sal_Bool bUpDown = false; + bool bUpDown = false; try { mxDiagramPropertySet->getPropertyValue(UPDOWN) >>= bUpDown; diff --git a/sc/source/ui/vba/vbacomment.cxx b/sc/source/ui/vba/vbacomment.cxx index ca42af0fa852..b44fa29d3c07 100644 --- a/sc/source/ui/vba/vbacomment.cxx +++ b/sc/source/ui/vba/vbacomment.cxx @@ -175,7 +175,7 @@ ScVbaComment::Text( const uno::Any& aText, const uno::Any& aStart, const uno::An if ( aStart.hasValue() ) { sal_Int16 nStart = 0; - sal_Bool bOverwrite = sal_True; + bool bOverwrite = true; Overwrite >>= bOverwrite; if ( aStart >>= nStart ) diff --git a/sc/source/ui/vba/vbafont.cxx b/sc/source/ui/vba/vbafont.cxx index 0634dff631ef..3b97f85cf9ad 100644 --- a/sc/source/ui/vba/vbafont.cxx +++ b/sc/source/ui/vba/vbafont.cxx @@ -95,7 +95,7 @@ ScVbaFont::setSuperscript( const uno::Any& aValue ) throw ( uno::RuntimeExceptio xCell.set( xCellRange->getCellByPosition( 0,0 ) ); uno::Reference< beans::XPropertySet > xProps = lcl_TextProperties( xCell ); - sal_Bool bValue = false; + bool bValue = false; aValue >>= bValue; sal_Int16 nValue = NORMAL; sal_Int8 nValue2 = NORMALHEIGHT; @@ -167,7 +167,7 @@ ScVbaFont::setSubscript( const uno::Any& aValue ) throw ( uno::RuntimeException, xCell.set( xCellRange->getCellByPosition( 0,0 ) ); uno::Reference< beans::XPropertySet > xProps = lcl_TextProperties( xCell ); - sal_Bool bValue = false; + bool bValue = false; aValue >>= bValue; sal_Int16 nValue = NORMAL; sal_Int8 nValue2 = NORMALHEIGHT; @@ -295,8 +295,8 @@ ScVbaFont::getStandardFont() throw ( uno::RuntimeException, std::exception ) void SAL_CALL ScVbaFont::setFontStyle( const uno::Any& aValue ) throw( uno::RuntimeException, std::exception ) { - sal_Bool bBold = false; - sal_Bool bItalic = false; + bool bBold = false; + bool bItalic = false; OUString aStyles; aValue >>= aStyles; @@ -313,10 +313,10 @@ ScVbaFont::setFontStyle( const uno::Any& aValue ) throw( uno::RuntimeException, for( it = aTokens.begin(); it != aTokens.end(); ++it ) { if( (*it).equalsIgnoreAsciiCase("Bold") ) - bBold = sal_True; + bBold = true; if( (*it).equalsIgnoreAsciiCase("Italic") ) - bItalic = sal_True; + bItalic = true; } setBold( uno::makeAny( bBold ) ); @@ -328,7 +328,7 @@ uno::Any SAL_CALL ScVbaFont::getFontStyle() throw ( uno::RuntimeException, std::exception ) { OUStringBuffer aStyles; - sal_Bool bValue = false; + bool bValue = false; getBold() >>= bValue; if( bValue ) aStyles.appendAscii("Bold"); diff --git a/sc/source/ui/vba/vbaformat.cxx b/sc/source/ui/vba/vbaformat.cxx index 62f528168470..3f56aac5d665 100644 --- a/sc/source/ui/vba/vbaformat.cxx +++ b/sc/source/ui/vba/vbaformat.cxx @@ -505,7 +505,7 @@ ScVbaFormat<Ifc1>::setLocked( const uno::Any& _aLocked ) throw (script::BasicErr { try { - sal_Bool bIsLocked = false; + bool bIsLocked = false; if ( !( _aLocked >>= bIsLocked ) ) throw uno::RuntimeException(); util::CellProtection aCellProtection; @@ -526,7 +526,7 @@ ScVbaFormat<Ifc1>::setFormulaHidden( const uno::Any& FormulaHidden ) throw (scri { try { - sal_Bool bIsFormulaHidden = false; + bool bIsFormulaHidden = false; FormulaHidden >>= bIsFormulaHidden; util::CellProtection aCellProtection; OUString sCellProt( SC_UNONAME_CELLPRO ); diff --git a/sc/source/ui/vba/vbaformatcondition.cxx b/sc/source/ui/vba/vbaformatcondition.cxx index 37a39084a82d..160e25549ab6 100644 --- a/sc/source/ui/vba/vbaformatcondition.cxx +++ b/sc/source/ui/vba/vbaformatcondition.cxx @@ -44,7 +44,7 @@ void SAL_CALL ScVbaFormatCondition::Delete( ) throw (script::BasicErrorException, uno::RuntimeException, std::exception) { ScVbaFormatConditions* pFormatConditions = lcl_getScVbaFormatConditionsPtr( moFormatConditions ); - pFormatConditions->removeFormatCondition(msStyleName, sal_True); + pFormatConditions->removeFormatCondition(msStyleName, true); notifyRange(); } diff --git a/sc/source/ui/vba/vbaformatconditions.cxx b/sc/source/ui/vba/vbaformatconditions.cxx index e0707786db2b..9cef9c75e4fb 100644 --- a/sc/source/ui/vba/vbaformatconditions.cxx +++ b/sc/source/ui/vba/vbaformatconditions.cxx @@ -232,7 +232,7 @@ ScVbaFormatConditions::getStyleName() } void -ScVbaFormatConditions::removeFormatCondition( const OUString& _sStyleName, sal_Bool _bRemoveStyle) throw ( script::BasicErrorException ) +ScVbaFormatConditions::removeFormatCondition( const OUString& _sStyleName, bool _bRemoveStyle) throw ( script::BasicErrorException ) { try { diff --git a/sc/source/ui/vba/vbaformatconditions.hxx b/sc/source/ui/vba/vbaformatconditions.hxx index ce894f87df1f..4e0c433b8469 100644 --- a/sc/source/ui/vba/vbaformatconditions.hxx +++ b/sc/source/ui/vba/vbaformatconditions.hxx @@ -54,7 +54,7 @@ public: virtual css::uno::Reference< ov::excel::XFormatCondition > Add( ::sal_Int32 Type, const css::uno::Any& Operator, const css::uno::Any& Formula1, const css::uno::Any& Formula2, const css::uno::Reference< ov::excel::XStyle >& _xCalcStyle ) throw (css::script::BasicErrorException, css::uno::RuntimeException); OUString getA1Formula(const css::uno::Any& _aFormula) throw ( css::script::BasicErrorException ); OUString getStyleName(); - void removeFormatCondition( const OUString& _sStyleName, sal_Bool _bRemoveStyle) throw ( css::script::BasicErrorException ); + void removeFormatCondition( const OUString& _sStyleName, bool _bRemoveStyle) throw ( css::script::BasicErrorException ); css::uno::Reference< css::sheet::XSheetConditionalEntries > getSheetConditionalEntries() const { return mxSheetConditionalEntries; } // XFormatConditions virtual void SAL_CALL Delete( ) throw (css::script::BasicErrorException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE; diff --git a/sc/source/ui/vba/vbapagebreak.cxx b/sc/source/ui/vba/vbapagebreak.cxx index 8a639878e7ed..d2bc61bc2e6a 100644 --- a/sc/source/ui/vba/vbapagebreak.cxx +++ b/sc/source/ui/vba/vbapagebreak.cxx @@ -37,7 +37,7 @@ template< typename Ifc1 > sal_Int32 ScVbaPageBreak<Ifc1>::getType() throw (uno::RuntimeException) { uno::Any aValue = mxRowColPropertySet->getPropertyValue("IsStartOfNewPage"); - sal_Bool hasPageBreak = false; + bool hasPageBreak = false; aValue >>= hasPageBreak; if( !hasPageBreak ) diff --git a/sc/source/ui/vba/vbapagebreaks.cxx b/sc/source/ui/vba/vbapagebreaks.cxx index 4626bd651a12..a06161684547 100644 --- a/sc/source/ui/vba/vbapagebreaks.cxx +++ b/sc/source/ui/vba/vbapagebreaks.cxx @@ -29,13 +29,13 @@ private: uno::Reference< XHelperInterface > mxParent; uno::Reference< uno::XComponentContext > mxContext; uno::Reference< sheet::XSheetPageBreak > mxSheetPageBreak; - sal_Bool m_bColumn; + bool m_bColumn; public: RangePageBreaks( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, uno::Reference< sheet::XSheetPageBreak >& xSheetPageBreak, - sal_Bool bColumn ) : mxParent( xParent ), mxContext( xContext ), mxSheetPageBreak( xSheetPageBreak ), m_bColumn( bColumn ) + bool bColumn ) : mxParent( xParent ), mxContext( xContext ), mxSheetPageBreak( xSheetPageBreak ), m_bColumn( bColumn ) { } @@ -257,7 +257,7 @@ ScVbaHPageBreaks::getServiceNames() ScVbaVPageBreaks::ScVbaVPageBreaks( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, uno::Reference< sheet::XSheetPageBreak >& xSheetPageBreak ) throw ( uno::RuntimeException ) -: ScVbaVPageBreaks_BASE( xParent, xContext, new RangePageBreaks( xParent, xContext, xSheetPageBreak, sal_True ) ), +: ScVbaVPageBreaks_BASE( xParent, xContext, new RangePageBreaks( xParent, xContext, xSheetPageBreak, true ) ), mxSheetPageBreak( xSheetPageBreak ) { } diff --git a/sc/source/ui/vba/vbapagesetup.cxx b/sc/source/ui/vba/vbapagesetup.cxx index 835afa67cddd..f422778ccb0b 100644 --- a/sc/source/ui/vba/vbapagesetup.cxx +++ b/sc/source/ui/vba/vbapagesetup.cxx @@ -148,7 +148,7 @@ void SAL_CALL ScVbaPageSetup::setFitToPagesTall( const uno::Any& fitToPagesTall) sal_uInt16 scaleToPageY = 0; try { - sal_Bool aValue; + bool aValue; if( fitToPagesTall.getValueTypeClass() != uno::TypeClass_BOOLEAN || (fitToPagesTall >>= aValue)) { fitToPagesTall >>= scaleToPageY; @@ -171,7 +171,7 @@ void SAL_CALL ScVbaPageSetup::setFitToPagesWide( const uno::Any& fitToPagesWide) sal_uInt16 scaleToPageX = 0; try { - sal_Bool aValue = false; + bool aValue = false; if( fitToPagesWide.getValueTypeClass() != uno::TypeClass_BOOLEAN || (fitToPagesWide >>= aValue)) { fitToPagesWide >>= scaleToPageX; @@ -196,7 +196,7 @@ void SAL_CALL ScVbaPageSetup::setZoom( const uno::Any& zoom) throw (css::uno::Ru { if( zoom.getValueTypeClass() == uno::TypeClass_BOOLEAN ) { - sal_Bool aValue = false; + bool aValue = false; zoom >>= aValue; if( aValue ) { @@ -455,7 +455,7 @@ sal_Int32 SAL_CALL ScVbaPageSetup::getOrder() throw (css::uno::RuntimeException, try { uno::Any aValue = mxPageProps->getPropertyValue("PrintDownFirst"); - sal_Bool bPrintDownFirst = false; + bool bPrintDownFirst = false; aValue >>= bPrintDownFirst; if( !bPrintDownFirst ) order = excel::XlOrder::xlOverThenDown; @@ -469,7 +469,7 @@ sal_Int32 SAL_CALL ScVbaPageSetup::getOrder() throw (css::uno::RuntimeException, void SAL_CALL ScVbaPageSetup::setOrder( sal_Int32 order) throw (css::uno::RuntimeException, std::exception) { - sal_Bool bOrder = sal_True; + bool bOrder = true; switch( order ) { case excel::XlOrder::xlDownThenOver: @@ -528,7 +528,7 @@ void SAL_CALL ScVbaPageSetup::setFirstPageNumber( sal_Int32 firstPageNumber) thr sal_Bool SAL_CALL ScVbaPageSetup::getCenterVertically() throw (css::uno::RuntimeException, std::exception) { - sal_Bool centerVertically = false; + bool centerVertically = false; try { uno::Any aValue = mxPageProps->getPropertyValue("CenterVertically"); @@ -553,7 +553,7 @@ void SAL_CALL ScVbaPageSetup::setCenterVertically( sal_Bool centerVertically) th sal_Bool SAL_CALL ScVbaPageSetup::getCenterHorizontally() throw (css::uno::RuntimeException, std::exception) { - sal_Bool centerHorizontally = false; + bool centerHorizontally = false; try { uno::Any aValue = mxPageProps->getPropertyValue("CenterHorizontally"); @@ -578,7 +578,7 @@ void SAL_CALL ScVbaPageSetup::setCenterHorizontally( sal_Bool centerHorizontally sal_Bool SAL_CALL ScVbaPageSetup::getPrintHeadings() throw (css::uno::RuntimeException, std::exception) { - sal_Bool printHeadings = false; + bool printHeadings = false; try { uno::Any aValue = mxPageProps->getPropertyValue("PrintHeaders"); diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index dba86f109afe..257c0119036b 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -737,7 +737,7 @@ CellValueSetter::processValue( const uno::Any& aValue, const uno::Reference< tab { case uno::TypeClass_BOOLEAN: { - sal_Bool bState = false; + bool bState = false; if ( aValue >>= bState ) { uno::Reference< table::XCellRange > xRange( xCell, uno::UNO_QUERY_THROW ); @@ -1880,8 +1880,8 @@ ScVbaRange::Offset( const ::uno::Any &nRowOff, const uno::Any &nColOff ) throw ( { SCROW nRowOffset = 0; SCCOL nColOffset = 0; - sal_Bool bIsRowOffset = ( nRowOff >>= nRowOffset ); - sal_Bool bIsColumnOffset = ( nColOff >>= nColOffset ); + bool bIsRowOffset = ( nRowOff >>= nRowOffset ); + bool bIsColumnOffset = ( nColOff >>= nColOffset ); ScCellRangesBase* pUnoRangesBase = getCellRangesBase(); ScRangeList aCellRanges = pUnoRangesBase->GetRangeList(); @@ -2099,19 +2099,19 @@ ScVbaRange::Address( const uno::Any& RowAbsolute, const uno::Any& ColumnAbsolut nFlags |= ( SCA_TAB_ABSOLUTE | SCA_COL_ABSOLUTE | SCA_ROW_ABSOLUTE | SCA_TAB2_ABSOLUTE | SCA_COL2_ABSOLUTE | SCA_ROW2_ABSOLUTE ); if ( RowAbsolute.hasValue() ) { - sal_Bool bVal = sal_True; + bool bVal = true; RowAbsolute >>= bVal; if ( !bVal ) nFlags &= ~ROW_ABSOLUTE; } if ( ColumnAbsolute.hasValue() ) { - sal_Bool bVal = sal_True; + bool bVal = true; ColumnAbsolute >>= bVal; if ( !bVal ) nFlags &= ~COL_ABSOLUTE; } - sal_Bool bLocal = false; + bool bLocal = false; if ( External.hasValue() ) { External >>= bLocal; @@ -2179,8 +2179,8 @@ ScVbaRange::CellsHelper( const uno::Reference< ov::XHelperInterface >& xParent, { sal_Int32 nRow = 0, nColumn = 0; - sal_Bool bIsIndex = nRowIndex.hasValue(); - sal_Bool bIsColumnIndex = nColumnIndex.hasValue(); + bool bIsIndex = nRowIndex.hasValue(); + bool bIsColumnIndex = nColumnIndex.hasValue(); // Sometimes we might get a float or a double or whatever // set in the Any, we should convert as appropriate @@ -2619,7 +2619,7 @@ uno::Reference< excel::XRange > ScVbaRange::Resize( const uno::Any &RowSize, const uno::Any &ColumnSize ) throw (uno::RuntimeException, std::exception) { long nRowSize = 0, nColumnSize = 0; - sal_Bool bIsRowChanged = ( RowSize >>= nRowSize ), bIsColumnChanged = ( ColumnSize >>= nColumnSize ); + bool bIsRowChanged = ( RowSize >>= nRowSize ), bIsColumnChanged = ( ColumnSize >>= nColumnSize ); uno::Reference< table::XColumnRowRange > xColumnRowRange(mxRange, ::uno::UNO_QUERY_THROW); uno::Reference< sheet::XSheetCellRange > xSheetRange(mxRange, ::uno::UNO_QUERY_THROW); uno::Reference< sheet::XSheetCellCursor > xCursor( xSheetRange->getSpreadsheet()->createCursorByRange(xSheetRange), ::uno::UNO_QUERY_THROW ); @@ -2884,8 +2884,8 @@ ScVbaRange::PasteSpecial( const uno::Any& Paste, const uno::Any& Operation, cons // set up defaults sal_Int32 nPaste = excel::XlPasteType::xlPasteAll; sal_Int32 nOperation = excel::XlPasteSpecialOperation::xlPasteSpecialOperationNone; - sal_Bool bTranspose = false; - sal_Bool bSkipBlanks = false; + bool bTranspose = false; + bool bSkipBlanks = false; if ( Paste.hasValue() ) Paste >>= nPaste; @@ -3067,7 +3067,7 @@ ScVbaRange::Replace( const OUString& What, const OUString& Replacement, const un sal_Int16 nLook = globalSearchOptions.GetWordOnly() ? excel::XlLookAt::xlPart : excel::XlLookAt::xlWhole; sal_Int16 nSearchOrder = globalSearchOptions.GetRowDirection() ? excel::XlSearchOrder::xlByRows : excel::XlSearchOrder::xlByColumns; - sal_Bool bMatchCase = false; + bool bMatchCase = false; uno::Reference< util::XReplaceable > xReplace( mxRange, uno::UNO_QUERY ); if ( xReplace.is() ) { @@ -3081,11 +3081,11 @@ ScVbaRange::Replace( const OUString& What, const OUString& Replacement, const un { // sets SearchWords ( true is Cell match ) nLook = ::comphelper::getINT16( LookAt ); - sal_Bool bSearchWords = false; + bool bSearchWords = false; if ( nLook == excel::XlLookAt::xlPart ) bSearchWords = false; else if ( nLook == excel::XlLookAt::xlWhole ) - bSearchWords = sal_True; + bSearchWords = true; else throw uno::RuntimeException("Range::Replace, illegal value for LookAt", uno::Reference< uno::XInterface >() ); // set global search props ( affects the find dialog @@ -3097,11 +3097,11 @@ ScVbaRange::Replace( const OUString& What, const OUString& Replacement, const un if ( SearchOrder.hasValue() ) { nSearchOrder = ::comphelper::getINT16( SearchOrder ); - sal_Bool bSearchByRow = false; + bool bSearchByRow = false; if ( nSearchOrder == excel::XlSearchOrder::xlByColumns ) bSearchByRow = false; else if ( nSearchOrder == excel::XlSearchOrder::xlByRows ) - bSearchByRow = sal_True; + bSearchByRow = true; else throw uno::RuntimeException("Range::Replace, illegal value for SearchOrder", uno::Reference< uno::XInterface >() ); @@ -3229,11 +3229,11 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L if ( LookAt.hasValue() ) { nLookAt = ::comphelper::getINT16( LookAt ); - sal_Bool bSearchWords = false; + bool bSearchWords = false; if ( nLookAt == excel::XlLookAt::xlPart ) bSearchWords = false; else if ( nLookAt == excel::XlLookAt::xlWhole ) - bSearchWords = sal_True; + bSearchWords = true; else throw uno::RuntimeException("Range::Replace, illegal value for LookAt", uno::Reference< uno::XInterface >() ); newOptions.SetWordOnly( bSearchWords ); @@ -3244,11 +3244,11 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L if ( SearchOrder.hasValue() ) { nSearchOrder = ::comphelper::getINT16( SearchOrder ); - sal_Bool bSearchByRow = false; + bool bSearchByRow = false; if ( nSearchOrder == excel::XlSearchOrder::xlByColumns ) bSearchByRow = false; else if ( nSearchOrder == excel::XlSearchOrder::xlByRows ) - bSearchByRow = sal_True; + bSearchByRow = true; else throw uno::RuntimeException("Range::Replace, illegal value for SearchOrder", uno::Reference< uno::XInterface >() ); @@ -3262,11 +3262,11 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L sal_Int32 nSearchDirection = 0; if( SearchDirection >>= nSearchDirection ) { - sal_Bool bSearchBackwards = false; + bool bSearchBackwards = false; if ( nSearchDirection == excel::XlSearchDirection::xlNext ) bSearchBackwards = false; else if( nSearchDirection == excel::XlSearchDirection::xlPrevious ) - bSearchBackwards = sal_True; + bSearchBackwards = true; else throw uno::RuntimeException("Range::Replace, illegal value for SearchDirection", uno::Reference< uno::XInterface >() ); newOptions.SetBackward( bSearchBackwards ); @@ -3275,7 +3275,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L } // MatchCase - sal_Bool bMatchCase = false; + bool bMatchCase = false; if ( MatchCase.hasValue() ) { // SearchCaseSensitive @@ -3356,7 +3356,7 @@ const OUString& sPropName ) throw( uno::RuntimeException ) // helper method for Sort void updateTableSortField( const uno::Reference< table::XCellRange >& xParentRange, const uno::Reference< table::XCellRange >& xColRowKey, sal_Int16 nOrder, - table::TableSortField& aTableField, sal_Bool bIsSortColumn, sal_Bool bMatchCase ) throw ( uno::RuntimeException ) + table::TableSortField& aTableField, bool bIsSortColumn, bool bMatchCase ) throw ( uno::RuntimeException ) { RangeHelper parentRange( xParentRange ); RangeHelper colRowRange( xColRowKey ); @@ -3430,7 +3430,7 @@ ScVbaRange::Sort( const uno::Any& Key1, const uno::Any& Order1, const uno::Any& sal_Int16 nCustom = aSortParam.nUserIndex; sal_Int16 nSortMethod = excel::XlSortMethod::xlPinYin; - sal_Bool bMatchCase = aSortParam.bCaseSens; + bool bMatchCase = aSortParam.bCaseSens; // seems to work opposite to expected, see below sal_Int16 nOrientation = aSortParam.bByRow ? excel::XlSortOrientation::xlSortColumns : excel::XlSortOrientation::xlSortRows; @@ -3449,13 +3449,13 @@ ScVbaRange::Sort( const uno::Any& Key1, const uno::Any& Order1, const uno::Any& } - sal_Bool bIsSortColumns=false; // sort by row + bool bIsSortColumns=false; // sort by row if ( nOrientation == excel::XlSortOrientation::xlSortRows ) - bIsSortColumns = sal_True; + bIsSortColumns = true; sal_Int16 nHeader = 0; nHeader = aSortParam.nCompatHeader; - sal_Bool bContainsHeader = false; + bool bContainsHeader = false; if ( Header.hasValue() ) { @@ -3475,7 +3475,7 @@ ScVbaRange::Sort( const uno::Any& Key1, const uno::Any& Order1, const uno::Any& } if ( nHeader == excel::XlYesNoGuess::xlYes ) - bContainsHeader = sal_True; + bContainsHeader = true; if ( SortMethod.hasValue() ) { @@ -4030,7 +4030,7 @@ ScVbaRange::getPageBreak() throw (uno::RuntimeException, std::exception) { RangeHelper thisRange( mxRange ); table::CellRangeAddress thisAddress = thisRange.getCellRangeAddressable()->getRangeAddress(); - sal_Bool bColumn = false; + bool bColumn = false; if (thisAddress.StartRow==0) bColumn = true; @@ -4070,7 +4070,7 @@ ScVbaRange::setPageBreak( const uno::Any& _pagebreak) throw (uno::RuntimeExcepti table::CellRangeAddress thisAddress = thisRange.getCellRangeAddressable()->getRangeAddress(); if ((thisAddress.StartColumn==0) && (thisAddress.StartRow==0)) return; - sal_Bool bColumn = false; + bool bColumn = false; if (thisAddress.StartRow==0) bColumn = true; @@ -4409,7 +4409,7 @@ ScVbaRange::AutoFilter( const uno::Any& aField, const uno::Any& Criteria1, const table::CellRangeAddress thisAddress = thisRange.getCellRangeAddressable()->getRangeAddress(); sal_Int16 nSheet = thisAddress.Sheet; ScDocShell* pShell = getScDocShell(); - sal_Bool bHasAuto = false; + bool bHasAuto = false; uno::Reference< sheet::XDatabaseRange > xDataBaseRange = excel::GetAutoFiltRange( pShell, nSheet ); if ( xDataBaseRange.is() ) bHasAuto = true; @@ -4473,7 +4473,7 @@ ScVbaRange::AutoFilter( const uno::Any& aField, const uno::Any& Criteria1, const xDBRangeProps->setPropertyValue( "AutoFilter", uno::Any(sal_True) ); // set header (autofilter always need column headers) uno::Reference< beans::XPropertySet > xFiltProps( xDataBaseRange->getFilterDescriptor(), uno::UNO_QUERY_THROW ); - sal_Bool bHasColHeader = false; + bool bHasColHeader = false; ScDocument* pDoc = pShell ? pShell->GetDocument() : NULL; if (pDoc) { @@ -4487,7 +4487,7 @@ ScVbaRange::AutoFilter( const uno::Any& aField, const uno::Any& Criteria1, const OUString sCriteria1; sal_Int32 nOperator = excel::XlAutoFilterOperator::xlAnd; - sal_Bool bVisible = sal_True; + bool bVisible = true; VisibleDropDown >>= bVisible; if ( bVisible == bHasAuto ) // dropdown is displayed/notdisplayed as required @@ -4868,7 +4868,7 @@ uno::Any ScVbaRange::getShowDetail() throw ( css::uno::RuntimeException, std::ex if( m_Areas->getCount() > 1 ) throw uno::RuntimeException("Can not get Range.ShowDetail attribute ", uno::Reference< uno::XInterface >() ); - sal_Bool bShowDetail = false; + bool bShowDetail = false; RangeHelper helper( mxRange ); uno::Reference< sheet::XSheetCellCursor > xSheetCellCursor = helper.getSheetCellCursor(); @@ -4881,7 +4881,7 @@ uno::Any ScVbaRange::getShowDetail() throw ( css::uno::RuntimeException, std::ex if( (thisAddress.StartRow == thisAddress.EndRow && thisAddress.EndRow == aOutlineAddress.EndRow ) || (thisAddress.StartColumn == thisAddress.EndColumn && thisAddress.EndColumn == aOutlineAddress.EndColumn )) { - sal_Bool bColumn =thisAddress.StartRow == thisAddress.EndRow ? false:sal_True; + bool bColumn =thisAddress.StartRow == thisAddress.EndRow ? false:sal_True; ScDocument* pDoc = getDocumentFromRange( mxRange ); ScOutlineTable* pOutlineTable = pDoc->GetOutlineTable(static_cast<SCTAB>(thisAddress.Sheet), true); const ScOutlineArray* pOutlineArray = bColumn ? pOutlineTable->GetColArray(): pOutlineTable->GetRowArray(); @@ -5120,7 +5120,7 @@ sal_Bool SAL_CALL ScVbaRange::GoalSeek( const uno::Any& Goal, const uno::Reference< excel::XRange >& ChangingCell ) throw (uno::RuntimeException, std::exception) { ScDocShell* pDocShell = getScDocShell(); - sal_Bool bRes = sal_True; + bool bRes = true; ScVbaRange* pRange = static_cast< ScVbaRange* >( ChangingCell.get() ); if ( pDocShell && pRange ) { @@ -5239,7 +5239,7 @@ ScVbaRange::Ungroup( ) throw (script::BasicErrorException, uno::RuntimeExceptio groupUnGroup(true); } -static void lcl_mergeCellsOfRange( const uno::Reference< table::XCellRange >& xCellRange, sal_Bool _bMerge = sal_True ) throw ( uno::RuntimeException ) +static void lcl_mergeCellsOfRange( const uno::Reference< table::XCellRange >& xCellRange, bool _bMerge = true ) throw ( uno::RuntimeException ) { uno::Reference< util::XMergeable > xMergeable( xCellRange, uno::UNO_QUERY_THROW ); xMergeable->merge(_bMerge); @@ -5258,7 +5258,7 @@ ScVbaRange::Merge( const uno::Any& Across ) throw (script::BasicErrorException, return; } uno::Reference< table::XCellRange > oCellRange; - sal_Bool bAcross = false; + bool bAcross = false; Across >>= bAcross; if ( !bAcross ) lcl_mergeCellsOfRange( mxRange ); @@ -5546,9 +5546,9 @@ ScVbaRange::Subtotal( ::sal_Int32 _nGroupBy, ::sal_Int32 _nFunction, const uno:: { try { - sal_Bool bDoReplace = false; + bool bDoReplace = false; aReplace >>= bDoReplace; - sal_Bool bAddPageBreaks = false; + bool bAddPageBreaks = false; PageBreaks >>= bAddPageBreaks; uno::Reference< sheet::XSubTotalCalculatable> xSub(mxRange, uno::UNO_QUERY_THROW ); diff --git a/sc/source/ui/vba/vbavalidation.cxx b/sc/source/ui/vba/vbavalidation.cxx index ad967dc372b1..6bb090f7c31d 100644 --- a/sc/source/ui/vba/vbavalidation.cxx +++ b/sc/source/ui/vba/vbavalidation.cxx @@ -67,7 +67,7 @@ sal_Bool SAL_CALL ScVbaValidation::getIgnoreBlank() throw (uno::RuntimeException, std::exception) { uno::Reference< beans::XPropertySet > xProps( lcl_getValidationProps( m_xRange ) ); - sal_Bool bBlank = false; + bool bBlank = false; xProps->getPropertyValue( IGNOREBLANK ) >>= bBlank; return bBlank; } @@ -104,7 +104,7 @@ sal_Bool SAL_CALL ScVbaValidation::getShowInput() throw (uno::RuntimeException, std::exception) { uno::Reference< beans::XPropertySet > xProps = lcl_getValidationProps( m_xRange ); - sal_Bool bShowInput = false; + bool bShowInput = false; xProps->getPropertyValue( SHOWINPUT ) >>= bShowInput; return bShowInput; } @@ -121,7 +121,7 @@ sal_Bool SAL_CALL ScVbaValidation::getShowError() throw (uno::RuntimeException, std::exception) { uno::Reference< beans::XPropertySet > xProps = lcl_getValidationProps( m_xRange ); - sal_Bool bShowError = false; + bool bShowError = false; xProps->getPropertyValue( SHOWERROR ) >>= bShowError; return bShowError; } diff --git a/sc/source/ui/vba/vbawindow.cxx b/sc/source/ui/vba/vbawindow.cxx index 15270ebb5511..c7e196af3e66 100644 --- a/sc/source/ui/vba/vbawindow.cxx +++ b/sc/source/ui/vba/vbawindow.cxx @@ -495,7 +495,7 @@ sal_Bool SAL_CALL ScVbaWindow::getDisplayGridlines() throw (uno::RuntimeException, std::exception) { OUString sName( SC_UNO_SHOWGRID ); - sal_Bool bGrid = sal_True; + bool bGrid = true; getControllerProps()->getPropertyValue( sName ) >>= bGrid; return bGrid; } @@ -512,7 +512,7 @@ sal_Bool SAL_CALL ScVbaWindow::getDisplayHeadings() throw (uno::RuntimeException, std::exception) { OUString sName( SC_UNO_COLROWHDR ); - sal_Bool bHeading = sal_True; + bool bHeading = true; getControllerProps()->getPropertyValue( sName ) >>= bHeading; return bHeading; } @@ -528,7 +528,7 @@ sal_Bool SAL_CALL ScVbaWindow::getDisplayHorizontalScrollBar() throw (uno::RuntimeException, std::exception) { OUString sName( SC_UNO_HORSCROLL ); - sal_Bool bHorizontalScrollBar = sal_True; + bool bHorizontalScrollBar = true; getControllerProps()->getPropertyValue( sName ) >>= bHorizontalScrollBar; return bHorizontalScrollBar; } @@ -544,7 +544,7 @@ sal_Bool SAL_CALL ScVbaWindow::getDisplayOutline() throw (uno::RuntimeException, std::exception) { OUString sName( SC_UNO_OUTLSYMB ); - sal_Bool bOutline = sal_True; + bool bOutline = true; getControllerProps()->getPropertyValue( sName ) >>= bOutline; return bOutline; } @@ -560,7 +560,7 @@ sal_Bool SAL_CALL ScVbaWindow::getDisplayVerticalScrollBar() throw (uno::RuntimeException, std::exception) { OUString sName( SC_UNO_VERTSCROLL ); - sal_Bool bVerticalScrollBar = sal_True; + bool bVerticalScrollBar = true; getControllerProps()->getPropertyValue( sName ) >>= bVerticalScrollBar; return bVerticalScrollBar; } @@ -576,7 +576,7 @@ sal_Bool SAL_CALL ScVbaWindow::getDisplayWorkbookTabs() throw (uno::RuntimeException, std::exception) { OUString sName( SC_UNO_SHEETTABS ); - sal_Bool bWorkbookTabs = sal_True; + bool bWorkbookTabs = true; getControllerProps()->getPropertyValue( sName ) >>= bWorkbookTabs; return bWorkbookTabs; } @@ -789,7 +789,7 @@ ScVbaWindow::ActiveSheet( ) throw (script::BasicErrorException, uno::RuntimeExc uno::Any SAL_CALL ScVbaWindow::getView() throw (uno::RuntimeException, std::exception) { - sal_Bool bPageBreak = sal_False; + bool bPageBreak = false; sal_Int32 nWindowView = excel::XlWindowView::xlNormalView; ScTabViewShell* pViewShell = excel::getBestViewShell( m_xModel ); diff --git a/sc/source/ui/vba/vbaworksheet.cxx b/sc/source/ui/vba/vbaworksheet.cxx index 1b29a98b45e8..1e2fabc6c4c0 100644 --- a/sc/source/ui/vba/vbaworksheet.cxx +++ b/sc/source/ui/vba/vbaworksheet.cxx @@ -346,8 +346,8 @@ ScVbaWorksheet::getEnableSelection() throw (uno::RuntimeException, std::exceptio uno::Reference< frame::XModel > xModel( getModel(), uno::UNO_QUERY_THROW ); ScDocument* pDoc = excel::getDocShell( xModel )->GetDocument(); ScTableProtection* pProtect = pDoc->GetTabProtection(nTab); - sal_Bool bLockedCells = false; - sal_Bool bUnlockedCells = false; + bool bLockedCells = false; + bool bUnlockedCells = false; if( pProtect ) { bLockedCells = pProtect->isOptionEnabled(ScTableProtection::SELECT_LOCKED_CELLS); @@ -383,16 +383,16 @@ ScVbaWorksheet::setEnableSelection( sal_Int32 nSelection ) throw (uno::RuntimeEx ScDocument* pDoc = excel::getDocShell( xModel )->GetDocument(); ScTableProtection* pProtect = pDoc->GetTabProtection(nTab); // default is xlNoSelection - sal_Bool bLockedCells = false; - sal_Bool bUnlockedCells = false; + bool bLockedCells = false; + bool bUnlockedCells = false; if( nSelection == excel::XlEnableSelection::xlNoRestrictions ) { - bLockedCells = sal_True; - bUnlockedCells = sal_True; + bLockedCells = true; + bUnlockedCells = true; } else if( nSelection == excel::XlEnableSelection::xlUnlockedCells ) { - bUnlockedCells = sal_True; + bUnlockedCells = true; } if( pProtect ) { @@ -578,7 +578,7 @@ ScVbaWorksheet::Move( const uno::Any& Before, const uno::Any& After ) throw (uno SCTAB nDest = 0; if ( ScVbaWorksheets::nameExists (xSpreadDoc, xSheet->getName(), nDest) ) { - sal_Bool bAfter = After.hasValue(); + bool bAfter = After.hasValue(); if (bAfter) nDest++; uno::Reference<sheet::XSpreadsheets> xSheets = xSpreadDoc->getSheets(); @@ -1076,9 +1076,9 @@ ScVbaWorksheet::PrintOut( const uno::Any& From, const uno::Any& To, const uno::A sal_Int32 nTo = 0; sal_Int32 nFrom = 0; sal_Int16 nCopies = 1; - sal_Bool bCollate = false; - sal_Bool bSelection = false; - sal_Bool bIgnorePrintAreas = false; + bool bCollate = false; + bool bSelection = false; + bool bIgnorePrintAreas = false; From >>= nFrom; To >>= nTo; Copies >>= nCopies; @@ -1087,7 +1087,7 @@ ScVbaWorksheet::PrintOut( const uno::Any& From, const uno::Any& To, const uno::A Collate >>= bCollate; if ( !( nFrom || nTo ) ) - bSelection = sal_True; + bSelection = true; uno::Reference< frame::XModel > xModel( getModel(), uno::UNO_QUERY_THROW ); PrintOutHelper( excel::getBestViewShell( xModel ), From, To, Copies, Preview, ActivePrinter, PrintToFile, Collate, PrToFileName, bSelection ); diff --git a/sc/source/ui/vba/vbaworksheets.cxx b/sc/source/ui/vba/vbaworksheets.cxx index 542f4507d113..71598bbee9cc 100644 --- a/sc/source/ui/vba/vbaworksheets.cxx +++ b/sc/source/ui/vba/vbaworksheets.cxx @@ -221,7 +221,7 @@ ScVbaWorksheets::Add( const uno::Any& Before, const uno::Any& After, return uno::Any(); // or should we throw? OUString aStringSheet; - sal_Bool bBefore(sal_True); + bool bBefore(true); SCTAB nSheetIndex = 0; SCTAB nNewSheets = 1, nType = 0; Count >>= nNewSheets; @@ -250,7 +250,7 @@ ScVbaWorksheets::Add( const uno::Any& Before, const uno::Any& After, { uno::Reference< excel::XApplication > xApplication( Application(), uno::UNO_QUERY_THROW ); aStringSheet = xApplication->getActiveWorkbook()->getActiveSheet()->getName(); - bBefore = sal_True; + bBefore = true; } nCount = static_cast< SCTAB >( m_xIndexAccess->getCount() ); for (SCTAB i=0; i < nCount; i++) @@ -314,8 +314,8 @@ ScVbaWorksheets::PrintOut( const uno::Any& From, const uno::Any& To, const uno:: sal_Int32 nTo = 0; sal_Int32 nFrom = 0; sal_Int16 nCopies = 1; - sal_Bool bCollate = false; - sal_Bool bSelection = false; + bool bCollate = false; + bool bSelection = false; From >>= nFrom; To >>= nTo; Copies >>= nCopies; @@ -324,7 +324,7 @@ ScVbaWorksheets::PrintOut( const uno::Any& From, const uno::Any& To, const uno:: if ( !( nFrom || nTo ) ) if ( isSelectedSheets() ) - bSelection = sal_True; + bSelection = true; PrintOutHelper( excel::getBestViewShell( mxModel ), From, To, Copies, Preview, ActivePrinter, PrintToFile, Collate, PrToFileName, bSelection ); } @@ -332,7 +332,7 @@ ScVbaWorksheets::PrintOut( const uno::Any& From, const uno::Any& To, const uno:: uno::Any SAL_CALL ScVbaWorksheets::getVisible() throw (uno::RuntimeException, std::exception) { - sal_Bool bVisible = sal_True; + bool bVisible = true; uno::Reference< container::XEnumeration > xEnum( createEnumeration(), uno::UNO_QUERY_THROW ); while ( xEnum->hasMoreElements() ) { @@ -349,14 +349,14 @@ ScVbaWorksheets::getVisible() throw (uno::RuntimeException, std::exception) void SAL_CALL ScVbaWorksheets::setVisible( const uno::Any& _visible ) throw (uno::RuntimeException, std::exception) { - sal_Bool bState = false; + bool bState = false; if ( _visible >>= bState ) { uno::Reference< container::XEnumeration > xEnum( createEnumeration(), uno::UNO_QUERY_THROW ); while ( xEnum->hasMoreElements() ) { uno::Reference< excel::XWorksheet > xSheet( xEnum->nextElement(), uno::UNO_QUERY_THROW ); - xSheet->setVisible( bState ); + xSheet->setVisible( bState ? 1 : 0 ); } } else @@ -371,7 +371,7 @@ ScVbaWorksheets::Select( const uno::Any& Replace ) throw (uno::RuntimeException, throw uno::RuntimeException("Cannot obtain view shell", uno::Reference< uno::XInterface >() ); ScMarkData& rMarkData = pViewShell->GetViewData()->GetMarkData(); - sal_Bool bReplace = sal_True; + bool bReplace = true; Replace >>= bReplace; // Replace is defaulted to True, meanining this current collection // becomes the Selection, if it were false then the current selection would diff --git a/sc/source/ui/vba/vbawsfunction.cxx b/sc/source/ui/vba/vbawsfunction.cxx index 04fd2b5bd29c..c3f066c4f70f 100644 --- a/sc/source/ui/vba/vbawsfunction.cxx +++ b/sc/source/ui/vba/vbawsfunction.cxx @@ -54,7 +54,7 @@ void lclConvertDoubleToBoolean( uno::Any& rAny ) void lclConvertBooleanToDouble( uno::Any& rAny ) { - sal_Bool bValue( false ); + bool bValue( false ); if ( rAny >>= bValue ) { if ( bValue ) @@ -259,7 +259,7 @@ ScVbaWSFunction::getValue(const OUString& /*PropertyName*/) throw(beans::Unknown sal_Bool SAL_CALL ScVbaWSFunction::hasMethod(const OUString& Name) throw(uno::RuntimeException, std::exception) { - sal_Bool bIsFound = false; + bool bIsFound = false; try { // the function name contained in the com.sun.star.sheet.FunctionDescription service is alwayse localized. @@ -267,7 +267,7 @@ ScVbaWSFunction::hasMethod(const OUString& Name) throw(uno::RuntimeException, s // So m_xNameAccess->hasByName( Name ) may fail to find name when a function name has a localized name. ScCompiler aCompiler( NULL, ScAddress() ); if( aCompiler.IsEnglishSymbol( Name ) ) - bIsFound = sal_True; + bIsFound = true; } catch( uno::Exception& /*e*/ ) { diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx index 79da4a4ed08a..498d17387541 100644 --- a/sc/source/ui/view/cellsh.cxx +++ b/sc/source/ui/view/cellsh.cxx @@ -282,8 +282,8 @@ void ScCellShell::GetCellState( SfxItemSet& rSet ) sal_uInt16 nWhich = aIter.FirstWhich(); while ( nWhich ) { - sal_Bool bDisable = false; - sal_Bool bNeedEdit = sal_True; // need cursor position be editable? + bool bDisable = false; + bool bNeedEdit = true; // need cursor position be editable? switch ( nWhich ) { case SID_THESAURUS: @@ -309,7 +309,7 @@ void ScCellShell::GetCellState( SfxItemSet& rSet ) if (!pDoc->IsBlockEditable( aCursor.Tab(), aRange.aStart.Col(),aRange.aStart.Row(), aRange.aEnd.Col(),aRange.aEnd.Row() )) { - bDisable = sal_True; + bDisable = true; } bNeedEdit=false; } @@ -320,7 +320,7 @@ void ScCellShell::GetCellState( SfxItemSet& rSet ) { if ( pDocShell && pDocShell->IsDocShared() ) { - bDisable = sal_True; + bDisable = true; } } break; @@ -328,14 +328,14 @@ void ScCellShell::GetCellState( SfxItemSet& rSet ) if (!bDisable && bNeedEdit) if (!pDoc->IsBlockEditable( aCursor.Tab(), aCursor.Col(),aCursor.Row(), aCursor.Col(),aCursor.Row() )) - bDisable = sal_True; + bDisable = true; if (bDisable) rSet.DisableItem(nWhich); nWhich = aIter.NextWhich(); } } -static sal_Bool lcl_TestFormat( SvxClipboardFmtItem& rFormats, const TransferableDataHelper& rDataHelper, +static bool lcl_TestFormat( SvxClipboardFmtItem& rFormats, const TransferableDataHelper& rDataHelper, SotFormatStringId nFormatId ) { if ( rDataHelper.HasFormat( nFormatId ) ) @@ -363,7 +363,7 @@ static sal_Bool lcl_TestFormat( SvxClipboardFmtItem& rFormats, const Transferabl else rFormats.AddClipbrdFormat( nFormatId ); - return sal_True; + return true; } return false; @@ -372,7 +372,7 @@ static sal_Bool lcl_TestFormat( SvxClipboardFmtItem& rFormats, const Transferabl void ScCellShell::GetPossibleClipboardFormats( SvxClipboardFmtItem& rFormats ) { Window* pWin = GetViewData()->GetActiveWin(); - sal_Bool bDraw = ( ScDrawTransferObj::GetOwnClipboard( pWin ) != NULL ); + bool bDraw = ( ScDrawTransferObj::GetOwnClipboard( pWin ) != NULL ); TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( pWin ) ); @@ -401,11 +401,11 @@ void ScCellShell::GetPossibleClipboardFormats( SvxClipboardFmtItem& rFormats ) // insert, insert contents -static sal_Bool lcl_IsCellPastePossible( const TransferableDataHelper& rData ) +static bool lcl_IsCellPastePossible( const TransferableDataHelper& rData ) { - sal_Bool bPossible = false; + bool bPossible = false; if ( ScTransferObj::GetOwnClipboard( NULL ) || ScDrawTransferObj::GetOwnClipboard( NULL ) ) - bPossible = sal_True; + bPossible = true; else { if ( rData.HasFormat( SOT_FORMATSTR_ID_PNG ) || @@ -426,7 +426,7 @@ static sal_Bool lcl_IsCellPastePossible( const TransferableDataHelper& rData ) rData.HasFormat( SOT_FORMATSTR_ID_HTML_SIMPLE ) || rData.HasFormat( SOT_FORMATSTR_ID_DIF ) ) { - bPossible = sal_True; + bPossible = true; } } return bPossible; diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx index eb8440680ae6..c485a99e1d89 100644 --- a/sc/source/ui/view/cellsh1.cxx +++ b/sc/source/ui/view/cellsh1.cxx @@ -196,7 +196,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) else { ScDocument* pDoc = GetViewData()->GetDocument(); - sal_Bool bTheFlag=(pDoc->GetChangeTrack()!=NULL); + bool bTheFlag=(pDoc->GetChangeTrack()!=NULL); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); @@ -331,7 +331,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) aFlags = ((const SfxStringItem*)pItem)->GetValue(); aFlags = aFlags.toAsciiUpperCase(); - sal_Bool bCont = sal_True; + bool bCont = true; for (sal_Int32 i=0 ; bCont && i<aFlags.getLength(); ++i) { @@ -433,8 +433,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) { sal_uInt16 nFlags = IDF_NONE; sal_uInt16 nFunction = PASTE_NOFUNC; - sal_Bool bSkipEmpty = false; - sal_Bool bAsLink = false; + bool bSkipEmpty = false; + bool bAsLink = false; if ( pReqArgs!=NULL && pTabViewShell->SelectionEditable() ) { @@ -445,7 +445,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) aFlags = ((const SfxStringItem*)pItem)->GetValue(); aFlags = aFlags.toAsciiUpperCase(); - sal_Bool bCont = sal_True; + bool bCont = true; for (sal_Int32 i=0; bCont && i < aFlags.getLength(); ++i) { @@ -530,7 +530,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) double fStartVal = MAXDOUBLE; double fIncVal = 1; double fMaxVal = MAXDOUBLE; - sal_Bool bDoIt = false; + bool bDoIt = false; GetViewData()->GetSimpleArea( nStartCol, nStartRow, nStartTab, nEndCol, nEndRow, nEndTab ); @@ -613,7 +613,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) if( pFormatter->IsNumberFormat( aFillMax, nKey, fTmpVal )) fMaxVal = fTmpVal; - bDoIt = sal_True; + bDoIt = true; } else // (pReqArgs == NULL) => raise Dialog @@ -729,7 +729,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) fStartVal = pDlg->GetStart(); fIncVal = pDlg->GetStep(); fMaxVal = pDlg->GetMax(); - bDoIt = sal_True; + bDoIt = true; } delete pDlg; } @@ -1037,8 +1037,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) case SID_OUTLINE_MAKE: { - sal_Bool bColumns = false; - sal_Bool bOk = sal_True; + bool bColumns = false; + bool bOk = true; if ( GetViewData()->GetDocument()->GetDPAtCursor( GetViewData()->GetCurX(), GetViewData()->GetCurY(), GetViewData()->GetTabNo() ) ) @@ -1098,7 +1098,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) else // Dialog, when not whole rows/columns are marked { if ( GetViewData()->SimpleColMarked() && !GetViewData()->SimpleRowMarked() ) - bColumns = sal_True; + bColumns = true; else if ( !GetViewData()->SimpleColMarked() && GetViewData()->SimpleRowMarked() ) bColumns = false; else @@ -1131,8 +1131,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) case SID_OUTLINE_REMOVE: { - sal_Bool bColumns = false; - sal_Bool bOk = sal_True; + bool bColumns = false; + bool bOk = true; if ( GetViewData()->GetDocument()->GetDPAtCursor( GetViewData()->GetCurX(), GetViewData()->GetCurY(), GetViewData()->GetTabNo() ) ) @@ -1175,7 +1175,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) delete pDlg; } else if ( bColPoss ) - bColumns = sal_True; + bColumns = true; else if ( bRowPoss ) bColumns = false; else @@ -1243,9 +1243,9 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) if ( nFormat ) { Window* pWin = GetViewData()->GetActiveWin(); - sal_Bool bCells = ( ScTransferObj::GetOwnClipboard( pWin ) != NULL ); - sal_Bool bDraw = ( ScDrawTransferObj::GetOwnClipboard( pWin ) != NULL ); - sal_Bool bOle = ( nFormat == SOT_FORMATSTR_ID_EMBED_SOURCE ); + bool bCells = ( ScTransferObj::GetOwnClipboard( pWin ) != NULL ); + bool bDraw = ( ScDrawTransferObj::GetOwnClipboard( pWin ) != NULL ); + bool bOle = ( nFormat == SOT_FORMATSTR_ID_EMBED_SOURCE ); if ( bCells && bOle ) pTabViewShell->PasteFromSystem(); @@ -1266,14 +1266,14 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) { sal_uInt16 nFlags = IDF_NONE; sal_uInt16 nFunction = PASTE_NOFUNC; - sal_Bool bSkipEmpty = false; - sal_Bool bTranspose = false; - sal_Bool bAsLink = false; + bool bSkipEmpty = false; + bool bTranspose = false; + bool bAsLink = false; InsCellCmd eMoveMode = INS_NONE; Window* pWin = GetViewData()->GetActiveWin(); ScDocument* pDoc = GetViewData()->GetDocument(); - sal_Bool bOtherDoc = !pDoc->IsClipboardSource(); + bool bOtherDoc = !pDoc->IsClipboardSource(); ScTransferObj* pOwnClip = ScTransferObj::GetOwnClipboard( pWin ); if ( pOwnClip ) { @@ -1288,7 +1288,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) aFlags = ((const SfxStringItem*)pItem)->GetValue(); aFlags = aFlags.toAsciiUpperCase(); - sal_Bool bCont = sal_True; + bool bCont = true; for (sal_Int32 i=0 ; bCont && i<aFlags.getLength(); ++i) { @@ -1493,10 +1493,10 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) pItem->ISA(SfxUInt32Item) ) { sal_uLong nFormat = ((const SfxUInt32Item*)pItem)->GetValue(); - sal_Bool bRet=sal_True; + bool bRet=true; { WaitObject aWait( GetViewData()->GetDialogParent() ); - sal_Bool bDraw = ( ScDrawTransferObj::GetOwnClipboard( pWin ) != NULL ); + bool bDraw = ( ScDrawTransferObj::GetOwnClipboard( pWin ) != NULL ); if ( bDraw && nFormat == SOT_FORMATSTR_ID_EMBED_SOURCE ) pTabViewShell->PasteDraw(); else @@ -1505,7 +1505,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) if ( bRet ) { - rReq.SetReturnValue(SfxInt16Item(nSlot, bRet)); // 1 = success, 0 = fail + rReq.SetReturnValue(SfxInt16Item(nSlot, bRet ? 1 : 0)); // 1 = success, 0 = fail rReq.Done(); } else @@ -1523,7 +1523,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) } else // draw objects or external data { - sal_Bool bDraw = ( ScDrawTransferObj::GetOwnClipboard( pWin ) != NULL ); + bool bDraw = ( ScDrawTransferObj::GetOwnClipboard( pWin ) != NULL ); SvxClipboardFmtItem aFormats( SID_CLIPBOARD_FORMAT_ITEMS ); GetPossibleClipboardFormats( aFormats ); @@ -1703,9 +1703,9 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) if( RET_OK == nDialogRet ) { //get some parameters from the dialog - sal_Bool bToSimplified = sal_True; - sal_Bool bUseVariants = sal_True; - sal_Bool bCommonTerms = sal_True; + bool bToSimplified = true; + bool bUseVariants = true; + bool bCommonTerms = true; Reference< beans::XPropertySet > xProp( xDialog, UNO_QUERY ); if( xProp.is() ) { @@ -2020,7 +2020,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) case SID_UPDATECHART: { - sal_Bool bAll = false; + bool bAll = false; if( pReqArgs ) { @@ -2444,7 +2444,7 @@ void ScCellShell::ExecuteExternalSource( if ( !_rFile.isEmpty() && !_rSource.isEmpty() ) // filter may be empty { ScRange aLinkRange; - sal_Bool bMove = false; + bool bMove = false; ScViewData* pData = GetViewData(); ScMarkData& rMark = pData->GetMarkData(); @@ -2452,7 +2452,7 @@ void ScCellShell::ExecuteExternalSource( if ( rMark.IsMarked() ) { rMark.GetMarkArea( aLinkRange ); - bMove = sal_True; // insert/delete cells to fit range + bMove = true; // insert/delete cells to fit range } else aLinkRange = ScRange( pData->GetCurX(), pData->GetCurY(), pData->GetTabNo() ); diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx index 44fdbed9e6fb..42b6316ad0ce 100644 --- a/sc/source/ui/view/cellsh2.cxx +++ b/sc/source/ui/view/cellsh2.cxx @@ -106,14 +106,14 @@ static bool lcl_GetTextToColumnsRange( const ScViewData* pData, ScRange& rRange return bRet; } -static sal_Bool lcl_GetSortParam( const ScViewData* pData, ScSortParam& rSortParam ) +static bool lcl_GetSortParam( const ScViewData* pData, ScSortParam& rSortParam ) { ScTabViewShell* pTabViewShell = pData->GetViewShell(); ScDBData* pDBData = pTabViewShell->GetDBData(); ScDocument* pDoc = pData->GetDocument(); SCTAB nTab = pData->GetTabNo(); ScDirection eFillDir = DIR_TOP; - sal_Bool bSort = sal_True; + bool bSort = true; ScRange aExternalRange; if( rSortParam.nCol1 != rSortParam.nCol2 ) @@ -213,14 +213,14 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) // check if database beamer is open SfxViewFrame* pViewFrame = pTabViewShell->GetViewFrame(); - sal_Bool bWasOpen = false; + bool bWasOpen = false; { uno::Reference<frame::XFrame> xFrame = pViewFrame->GetFrame().GetFrameInterface(); uno::Reference<frame::XFrame> xBeamerFrame = xFrame->findFrame( OUString("_beamer"), frame::FrameSearchFlag::CHILDREN); if ( xBeamerFrame.is() ) - bWasOpen = sal_True; + bWasOpen = true; } if ( bWasOpen ) @@ -250,7 +250,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) case SID_REIMPORT_DATA: { - sal_Bool bOk = false; + bool bOk = false; ScDBData* pDBData = pTabViewShell->GetDBData(true,SC_DB_OLD); if (pDBData) { @@ -260,7 +260,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) { pTabViewShell->ImportData( aImportParam ); pDBData->SetImportParam( aImportParam ); //! Undo ?? - bOk = sal_True; + bOk = true; } } @@ -279,7 +279,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) { // repeat import like SID_REIMPORT_DATA - sal_Bool bContinue = sal_True; + bool bContinue = true; ScImportParam aImportParam; pDBData->GetImportParam( aImportParam ); if (aImportParam.bImport && !pDBData->HasImportSelection()) @@ -356,7 +356,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) ScDocument* pDoc = GetViewData()->GetDocument(); pDBData->GetSortParam( aSortParam ); - sal_Bool bHasHeader = pDoc->HasColHeader( aSortParam.nCol1, aSortParam.nRow1, aSortParam.nCol2, aSortParam.nRow2, nTab ); + bool bHasHeader = pDoc->HasColHeader( aSortParam.nCol1, aSortParam.nRow1, aSortParam.nCol2, aSortParam.nRow2, nTab ); if( nCol < aSortParam.nCol1 ) nCol = aSortParam.nCol1; @@ -405,7 +405,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) ScDocument* pDoc = GetViewData()->GetDocument(); pDBData->GetSortParam( aSortParam ); - sal_Bool bHasHeader = pDoc->HasColHeader( aSortParam.nCol1, aSortParam.nRow1, aSortParam.nCol2, aSortParam.nRow2, pData->GetTabNo() ); + bool bHasHeader = pDoc->HasColHeader( aSortParam.nCol1, aSortParam.nRow1, aSortParam.nCol2, aSortParam.nRow2, pData->GetTabNo() ); if( bHasHeader ) aSortParam.bHasHeader = bHasHeader; @@ -472,7 +472,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) SfxItemSet aArgSet( GetPool(), SCITEM_SORTDATA, SCITEM_SORTDATA ); pDBData->GetSortParam( aSortParam ); - sal_Bool bHasHeader = pDoc->HasColHeader( aSortParam.nCol1, aSortParam.nRow1, aSortParam.nCol2, aSortParam.nRow2, pData->GetTabNo() ); + bool bHasHeader = pDoc->HasColHeader( aSortParam.nCol1, aSortParam.nRow1, aSortParam.nCol2, aSortParam.nRow2, pData->GetTabNo() ); if( bHasHeader ) aSortParam.bHasHeader = bHasHeader; @@ -792,11 +792,11 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) ScValidationMode eMode = SC_VALID_ANY; ScConditionMode eOper = SC_COND_EQUAL; OUString aExpr1, aExpr2; - sal_Bool bBlank = sal_True; + bool bBlank = true; sal_Int16 nListType = ValidListType::UNSORTED; - sal_Bool bShowHelp = false; + bool bShowHelp = false; OUString aHelpTitle, aHelpText; - sal_Bool bShowError = false; + bool bShowError = false; ScValidErrorStyle eErrStyle = SC_VALERR_STOP; OUString aErrTitle, aErrText; @@ -1004,8 +1004,8 @@ void ScCellShell::GetDBState( SfxItemSet& rSet ) SCROW nPosY = pData->GetCurY(); SCTAB nTab = pData->GetTabNo(); - sal_Bool bAutoFilter = false; - sal_Bool bAutoFilterTested = false; + bool bAutoFilter = false; + bool bAutoFilterTested = false; SfxWhichIter aIter(rSet); sal_uInt16 nWhich = aIter.FirstWhich(); @@ -1017,7 +1017,7 @@ void ScCellShell::GetDBState( SfxItemSet& rSet ) { // imported data without selection // or filter,sort,subtotal (also without import) - sal_Bool bOk = false; + bool bOk = false; ScDBData* pDBData = pTabViewShell->GetDBData(false,SC_DB_OLD); if (pDBData && pDoc->GetChangeTrack() == NULL) { @@ -1090,7 +1090,7 @@ void ScCellShell::GetDBState( SfxItemSet& rSet ) { // SBA wants a sal_Bool-item, enabled - sal_Bool bEnable = sal_True; + bool bEnable = true; rSet.Put(SfxBoolItem(nWhich, bEnable)); } break; @@ -1101,7 +1101,7 @@ void ScCellShell::GetDBState( SfxItemSet& rSet ) if (!bAutoFilterTested) { bAutoFilter = pDoc->HasAutoFilter( nPosX, nPosY, nTab ); - bAutoFilterTested = sal_True; + bAutoFilterTested = true; } if ( nWhich == SID_AUTO_FILTER ) { @@ -1129,9 +1129,9 @@ void ScCellShell::GetDBState( SfxItemSet& rSet ) SCCOL nStartCol, nEndCol; SCROW nStartRow, nEndRow; SCTAB nStartTab, nEndTab; - sal_Bool bAnyQuery = false; + bool bAnyQuery = false; - sal_Bool bSelected = (GetViewData()->GetSimpleArea( + bool bSelected = (GetViewData()->GetSimpleArea( nStartCol, nStartRow, nStartTab, nEndCol, nEndRow, nEndTab ) == SC_MARK_SIMPLE); @@ -1156,7 +1156,7 @@ void ScCellShell::GetDBState( SfxItemSet& rSet ) ScQueryParam aParam; pDBData->GetQueryParam( aParam ); if ( aParam.GetEntry(0).bDoQuery ) - bAnyQuery = sal_True; + bAnyQuery = true; } if ( !bAnyQuery ) diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx index 36025b4119df..69c6d29cc9a4 100644 --- a/sc/source/ui/view/cellsh3.cxx +++ b/sc/source/ui/view/cellsh3.cxx @@ -449,13 +449,13 @@ void ScCellShell::Execute( SfxRequest& rReq ) // first test, if the prefix is recognised as valid, // else avoid only doubles - sal_Bool bPrefix = pDoc->ValidTabName( aBaseName ); + bool bPrefix = pDoc->ValidTabName( aBaseName ); OSL_ENSURE(bPrefix, "ungueltiger Tabellenname"); while ( pDoc->IsScenario(nTab+i) ) i++; - sal_Bool bValid; + bool bValid; SCTAB nDummy; do { @@ -487,7 +487,7 @@ void ScCellShell::Execute( SfxRequest& rReq ) } else { - sal_Bool bSheetProtected = pDoc->IsTabProtected(nTab); + bool bSheetProtected = pDoc->IsTabProtected(nTab); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); @@ -726,7 +726,7 @@ void ScCellShell::Execute( SfxRequest& rReq ) { // test whether to merge or to split bool bMerge = false; - sal_Bool bCenter = false; + bool bCenter = false; switch( nSlot ) { case FID_MERGE_ON: @@ -751,7 +751,7 @@ void ScCellShell::Execute( SfxRequest& rReq ) { // merge - check if to move contents of covered cells bool bMoveContents = false; - sal_Bool bApi = rReq.IsAPI(); + bool bApi = rReq.IsAPI(); const SfxPoolItem* pItem; if ( pReqArgs && pReqArgs->GetItemState(nSlot, true, &pItem) == SFX_ITEM_SET ) @@ -874,7 +874,7 @@ void ScCellShell::Execute( SfxRequest& rReq ) case SID_DETECTIVE_FILLMODE: { - sal_Bool bOldMode = pTabViewShell->IsAuditShell(); + bool bOldMode = pTabViewShell->IsAuditShell(); pTabViewShell->SetAuditShell( !bOldMode ); pTabViewShell->Invalidate( nSlot ); } diff --git a/sc/source/ui/view/cellsh4.cxx b/sc/source/ui/view/cellsh4.cxx index 3d4fc2fa4e9f..3396ae5de477 100644 --- a/sc/source/ui/view/cellsh4.cxx +++ b/sc/source/ui/view/cellsh4.cxx @@ -37,8 +37,8 @@ void ScCellShell::ExecuteCursor( SfxRequest& rReq ) const SfxItemSet* pReqArgs = rReq.GetArgs(); sal_uInt16 nSlotId = rReq.GetSlot(); SCsCOLROW nRepeat = 1; - sal_Bool bSel = false; - sal_Bool bKeep = false; + bool bSel = false; + bool bKeep = false; if ( pReqArgs != NULL ) { @@ -54,7 +54,7 @@ void ScCellShell::ExecuteCursor( SfxRequest& rReq ) sal_uInt16 nLocked = pTabViewShell->GetLockedModifiers(); if ( nLocked & KEY_SHIFT ) - bSel = sal_True; // EXT + bSel = true; // EXT else if ( nLocked & KEY_MOD1 ) { // ADD mode: keep the selection, start a new block when marking with shift again @@ -393,8 +393,8 @@ void ScCellShell::ExecutePage( SfxRequest& rReq ) ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell(); const SfxItemSet* pReqArgs = rReq.GetArgs(); sal_uInt16 nSlotId = rReq.GetSlot(); - sal_Bool bSel = false; - sal_Bool bKeep = false; + bool bSel = false; + bool bKeep = false; if ( pReqArgs != NULL ) { @@ -408,7 +408,7 @@ void ScCellShell::ExecutePage( SfxRequest& rReq ) sal_uInt16 nLocked = pTabViewShell->GetLockedModifiers(); if ( nLocked & KEY_SHIFT ) - bSel = sal_True; // EXT + bSel = true; // EXT else if ( nLocked & KEY_MOD1 ) { // ADD mode: keep the selection, start a new block when marking with shift again diff --git a/sc/source/ui/view/cliputil.cxx b/sc/source/ui/view/cliputil.cxx index 4beee59dc28b..242a5751dd3b 100644 --- a/sc/source/ui/view/cliputil.cxx +++ b/sc/source/ui/view/cliputil.cxx @@ -45,7 +45,7 @@ void ScClipUtil::PasteFromClipboard( ScViewData* pViewData, ScTabViewShell* pTab nClipEndY = nClipEndY + nClipStartY; // GetClipArea returns the difference ScRange aSource( nClipStartX, nClipStartY, nSourceTab, nClipEndX, nClipEndY, nSourceTab ); - sal_Bool bDone = pTabViewShell->DataPilotMove( aSource, pViewData->GetCurPos() ); + bool bDone = pTabViewShell->DataPilotMove( aSource, pViewData->GetCurPos() ); if ( !bDone ) pTabViewShell->ErrorMessage( STR_ERR_DATAPILOT_INPUT ); } diff --git a/sc/source/ui/view/dbfunc.cxx b/sc/source/ui/view/dbfunc.cxx index 82a4743a2594..704fda74ce72 100644 --- a/sc/source/ui/view/dbfunc.cxx +++ b/sc/source/ui/view/dbfunc.cxx @@ -203,7 +203,7 @@ void ScDBFunc::NotifyCloseDbNameDlg( const ScDBCollection& rNewColl, const std:: ScDocument* pDoc = pDocShell->GetDocument(); ScDBCollection* pOldColl = pDoc->GetDBCollection(); ScDBCollection* pUndoColl = NULL; - const sal_Bool bRecord (pDoc->IsUndoEnabled()); + const bool bRecord (pDoc->IsUndoEnabled()); std::vector<ScRange>::const_iterator iter; for (iter = rDelAreaList.begin(); iter != rDelAreaList.end(); ++iter) @@ -276,7 +276,7 @@ void ScDBFunc::Sort( const ScSortParam& rSortParam, bool bRecord, bool bPaint ) ScDocShell* pDocSh = GetViewData()->GetDocShell(); SCTAB nTab = GetViewData()->GetTabNo(); ScDBDocFunc aDBDocFunc( *pDocSh ); - sal_Bool bSuccess = aDBDocFunc.Sort( nTab, rSortParam, bRecord, bPaint, false ); + bool bSuccess = aDBDocFunc.Sort( nTab, rSortParam, bRecord, bPaint, false ); if ( bSuccess && !rSortParam.bInplace ) { // mark target @@ -297,11 +297,11 @@ void ScDBFunc::Query( const ScQueryParam& rQueryParam, const ScRange* pAdvSource ScDocShell* pDocSh = GetViewData()->GetDocShell(); SCTAB nTab = GetViewData()->GetTabNo(); ScDBDocFunc aDBDocFunc( *pDocSh ); - sal_Bool bSuccess = aDBDocFunc.Query( nTab, rQueryParam, pAdvSource, bRecord, false ); + bool bSuccess = aDBDocFunc.Query( nTab, rQueryParam, pAdvSource, bRecord, false ); if (bSuccess) { - sal_Bool bCopy = !rQueryParam.bInplace; + bool bCopy = !rQueryParam.bInplace; if (bCopy) { // mark target range (data base range has been set up if applicable) @@ -346,9 +346,9 @@ void ScDBFunc::ToggleAutoFilter() SCROW nRow = aParam.nRow1; SCTAB nTab = GetViewData()->GetTabNo(); sal_Int16 nFlag; - sal_Bool bHasAuto = sal_True; - sal_Bool bHeader = pDBData->HasHeader(); - sal_Bool bPaint = false; + bool bHasAuto = true; + bool bHeader = pDBData->HasHeader(); + bool bPaint = false; //! instead retrieve from DB-range? @@ -394,7 +394,7 @@ void ScDBFunc::ToggleAutoFilter() pDocSh->GetUndoManager()->LeaveListAction(); - bPaint = sal_True; + bPaint = true; } else // show filter buttons { @@ -410,7 +410,7 @@ void ScDBFunc::ToggleAutoFilter() ).Execute() == RET_YES ) { pDBData->SetHeader( true ); //! Undo ?? - bHeader = sal_True; + bHeader = true; } } @@ -429,7 +429,7 @@ void ScDBFunc::ToggleAutoFilter() } pDocSh->PostPaint(ScRange(aParam.nCol1, nRow, nTab, aParam.nCol2, nRow, nTab), PAINT_GRID); - bPaint = sal_True; + bPaint = true; } else { diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx index f3d3671b2f59..b975edf6924e 100644 --- a/sc/source/ui/view/dbfunc3.cxx +++ b/sc/source/ui/view/dbfunc3.cxx @@ -336,7 +336,7 @@ void ScDBFunc::ShowMarkedOutlines( bool bRecord ) { ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScOutlineDocFunc aFunc(*pDocSh); - sal_Bool bDone = aFunc.ShowMarkedOutlines( aRange, bRecord ); + bool bDone = aFunc.ShowMarkedOutlines( aRange, bRecord ); if (bDone) UpdateScrollBars(); } @@ -368,7 +368,7 @@ void ScDBFunc::HideMarkedOutlines( bool bRecord ) void ScDBFunc::DoSubTotals( const ScSubTotalParam& rParam, bool bRecord, const ScSortParam* pForceNewSort ) { - sal_Bool bDo = !rParam.bRemoveOnly; // sal_False = nur loeschen + bool bDo = !rParam.bRemoveOnly; // sal_False = nur loeschen ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDocument* pDoc = pDocSh->GetDocument(); @@ -400,7 +400,7 @@ void ScDBFunc::DoSubTotals( const ScSubTotalParam& rParam, bool bRecord, } WaitObject aWait( GetViewData()->GetDialogParent() ); - sal_Bool bOk = true; + bool bOk = true; if (rParam.bReplace) if (pDoc->TestRemoveSubTotals( nTab, rParam )) { @@ -423,7 +423,7 @@ void ScDBFunc::DoSubTotals( const ScSubTotalParam& rParam, bool bRecord, if (bRecord) // alte Daten sichern { - sal_Bool bOldFilter = bDo && rParam.bDoSort; + bool bOldFilter = bDo && rParam.bDoSort; SCTAB nTabCount = pDoc->GetTableCount(); pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); ScOutlineTable* pTable = pDoc->GetOutlineTable( nTab ); @@ -477,7 +477,7 @@ void ScDBFunc::DoSubTotals( const ScSubTotalParam& rParam, bool bRecord, if (rParam.bReplace) pDoc->RemoveSubTotals( nTab, aNewParam ); - sal_Bool bSuccess = sal_True; + bool bSuccess = true; if (bDo) { // Sortieren @@ -695,7 +695,7 @@ void ScDBFunc::GetSelectedMemberList(ScDPUniqueStringSet& rEntries, long& rDimen ScRangeListRef xRanges; GetViewData()->GetMultiArea( xRanges ); // incl. cursor if nothing is selected size_t nRangeCount = xRanges->size(); - sal_Bool bContinue = true; + bool bContinue = true; for (size_t nRangePos=0; nRangePos < nRangeCount && bContinue; nRangePos++) { @@ -767,8 +767,8 @@ bool ScDBFunc::HasSelectionForDateGroup( ScDPNumGroupInfo& rOldInfo, sal_Int32& OUString aDimName = pDPObj->GetDimName( nSelectDimension, bIsDataLayout ); OUString aBaseDimName( aDimName ); - sal_Bool bInGroupDim = false; - sal_Bool bFoundParts = false; + bool bInGroupDim = false; + bool bFoundParts = false; ScDPDimensionSaveData* pDimData = const_cast<ScDPDimensionSaveData*>( pDPObj->GetSaveData()->GetExistingDimensionData() ); @@ -795,10 +795,10 @@ bool ScDBFunc::HasSelectionForDateGroup( ScDPNumGroupInfo& rOldInfo, sal_Int32& rOldInfo = pNumGroupDim->GetInfo(); rParts = com::sun::star::sheet::DataPilotFieldGroupBy::DAYS; // not found in CollectDateParts - bFoundParts = sal_True; + bFoundParts = true; bFound = true; } - bInGroupDim = sal_True; + bInGroupDim = true; } else if ( pGroupDim ) { @@ -813,7 +813,7 @@ bool ScDBFunc::HasSelectionForDateGroup( ScDPNumGroupInfo& rOldInfo, sal_Int32& aBaseDimName = pGroupDim->GetSourceDimName(); bFound = true; } - bInGroupDim = sal_True; + bInGroupDim = true; } } if ( bFound && !bFoundParts ) @@ -879,7 +879,7 @@ bool ScDBFunc::HasSelectionForNumGroup( ScDPNumGroupInfo& rOldInfo ) bool bIsDataLayout; OUString aDimName = pDPObj->GetDimName( nSelectDimension, bIsDataLayout ); - sal_Bool bInGroupDim = false; + bool bInGroupDim = false; ScDPDimensionSaveData* pDimData = const_cast<ScDPDimensionSaveData*>( pDPObj->GetSaveData()->GetExistingDimensionData() ); @@ -895,7 +895,7 @@ bool ScDBFunc::HasSelectionForNumGroup( ScDPNumGroupInfo& rOldInfo ) bFound = true; } else if ( pDimData->GetNamedGroupDim( aDimName ) ) - bInGroupDim = sal_True; // in a group dimension + bInGroupDim = true; // in a group dimension } if ( !bFound && !bInGroupDim ) { @@ -2086,19 +2086,19 @@ void ScDBFunc::RepeatDB( bool bRecord ) ScQueryParam aQueryParam; pDBData->GetQueryParam( aQueryParam ); - sal_Bool bQuery = aQueryParam.GetEntry(0).bDoQuery; + bool bQuery = aQueryParam.GetEntry(0).bDoQuery; ScSortParam aSortParam; pDBData->GetSortParam( aSortParam ); - sal_Bool bSort = aSortParam.maKeyState[0].bDoSort; + bool bSort = aSortParam.maKeyState[0].bDoSort; ScSubTotalParam aSubTotalParam; pDBData->GetSubTotalParam( aSubTotalParam ); - sal_Bool bSubTotal = aSubTotalParam.bGroupActive[0] && !aSubTotalParam.bRemoveOnly; + bool bSubTotal = aSubTotalParam.bGroupActive[0] && !aSubTotalParam.bRemoveOnly; if ( bQuery || bSort || bSubTotal ) { - sal_Bool bQuerySize = false; + bool bQuerySize = false; ScRange aOldQuery; ScRange aNewQuery; if (bQuery && !aQueryParam.bInplace) @@ -2108,7 +2108,7 @@ void ScDBFunc::RepeatDB( bool bRecord ) if (pDest && pDest->IsDoSize()) { pDest->GetArea( aOldQuery ); - bQuerySize = sal_True; + bQuerySize = true; } } diff --git a/sc/source/ui/view/drawvie3.cxx b/sc/source/ui/view/drawvie3.cxx index d3f127cf98ae..abbb48c92bd2 100644 --- a/sc/source/ui/view/drawvie3.cxx +++ b/sc/source/ui/view/drawvie3.cxx @@ -101,8 +101,8 @@ void ScDrawView::SetCellAnchored() ScAnchorType ScDrawView::GetAnchorType() const { - sal_Bool bPage = false; - sal_Bool bCell = false; + bool bPage = false; + bool bCell = false; if( AreObjectsMarked() ) { const SdrMarkList* pMark = &GetMarkedObjectList(); @@ -114,7 +114,7 @@ ScAnchorType ScDrawView::GetAnchorType() const if( ScDrawLayer::GetAnchorType( *pObj ) == SCA_CELL ) bCell =true; else - bPage = sal_True; + bPage = true; } } if( bPage && !bCell ) diff --git a/sc/source/ui/view/drawvie4.cxx b/sc/source/ui/view/drawvie4.cxx index 138b94842984..ad38c2cbaebc 100644 --- a/sc/source/ui/view/drawvie4.cxx +++ b/sc/source/ui/view/drawvie4.cxx @@ -469,7 +469,7 @@ void ScDrawView::SetMarkedOriginalSize() { SdrObject* pObj = rMarkList.GetMark(i)->GetMarkedSdrObj(); sal_uInt16 nIdent = pObj->GetObjIdentifier(); - sal_Bool bDo = false; + bool bDo = false; Size aOriginalSize; if (nIdent == OBJ_OLE2) { @@ -483,7 +483,7 @@ void ScDrawView::SetMarkedOriginalSize() { MapMode aMapMode( MAP_100TH_MM ); aOriginalSize = ((SdrOle2Obj*)pObj)->GetOrigObjSize( &aMapMode ); - bDo = sal_True; + bDo = true; } else { @@ -495,7 +495,7 @@ void ScDrawView::SetMarkedOriginalSize() aOriginalSize = OutputDevice::LogicToLogic( Size( aSz.Width, aSz.Height ), aUnit, MAP_100TH_MM ); - bDo = sal_True; + bDo = true; } catch( embed::NoVisualAreaSizeException& ) { OSL_ENSURE( false, "Can't get the original size of the object!" ); @@ -525,7 +525,7 @@ void ScDrawView::SetMarkedOriginalSize() { aOriginalSize = pActWin->LogicToLogic( rGraphic.GetPrefSize(), &aSourceMap, &aDestMap ); - bDo = sal_True; + bDo = true; } } } diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx index 022cc3f92a93..63048af413b4 100644 --- a/sc/source/ui/view/drawview.cxx +++ b/sc/source/ui/view/drawview.cxx @@ -76,8 +76,8 @@ void ScDrawView::Construct() SCTAB nViewTab = pViewData->GetTabNo(); ShowSdrPage(GetModel()->GetPage(nViewTab)); - sal_Bool bEx = pViewData->GetViewShell()->IsDrawSelMode(); - sal_Bool bProt = pDoc->IsTabProtected( nViewTab ) || + bool bEx = pViewData->GetViewShell()->IsDrawSelMode(); + bool bProt = pDoc->IsTabProtected( nViewTab ) || pViewData->GetSfxDocShell()->IsReadOnly(); SdrLayer* pLayer; @@ -392,7 +392,7 @@ void ScDrawView::MarkListHasChanged() LockInternalLayer(); } - sal_Bool bSubShellSet = false; + bool bSubShellSet = false; if (nMarkCount == 1) { SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); @@ -403,13 +403,13 @@ void ScDrawView::MarkListHasChanged() pViewSh->SetOleObjectShell(true); else pViewSh->SetChartShell(true); - bSubShellSet = sal_True; + bSubShellSet = true; } else if (pObj->GetObjIdentifier() == OBJ_GRAF) { pGrafObj = (SdrGrafObj*) pObj; pViewSh->SetGraphicShell(true); - bSubShellSet = sal_True; + bSubShellSet = true; } else if (pObj->GetObjIdentifier() == OBJ_MEDIA) { @@ -425,8 +425,8 @@ void ScDrawView::MarkListHasChanged() if ( nMarkCount && !bSubShellSet ) { - sal_Bool bOnlyControls = sal_True; - sal_Bool bOnlyGraf = sal_True; + bool bOnlyControls = true; + bool bOnlyGraf = true; for (sal_uLong i=0; i<nMarkCount; i++) { SdrObject* pObj = rMarkList.GetMark(i)->GetMarkedSdrObj(); @@ -481,7 +481,7 @@ void ScDrawView::MarkListHasChanged() // Verben anpassen SfxViewFrame* pViewFrame = pViewSh->GetViewFrame(); - sal_Bool bOle = pViewSh->GetViewFrame()->GetFrame().IsInPlace(); + bool bOle = pViewSh->GetViewFrame()->GetFrame().IsInPlace(); uno::Sequence< embed::VerbDescriptor > aVerbs; if ( pOle2Obj && !bOle ) { @@ -545,7 +545,7 @@ bool ScDrawView::SdrBeginTextEdit( bool bOnlyOneView, bool bGrabFocus ) { - const sal_Bool bRet = FmFormView::SdrBeginTextEdit( + const bool bRet = FmFormView::SdrBeginTextEdit( pObj, pPV, pWinL, bIsNewObj, pGivenOutliner, pGivenOutlinerView, bDontDeleteOutliner, bOnlyOneView, bGrabFocus ); @@ -869,7 +869,7 @@ void ScDrawView::DeleteMarked() SdrEndTextEditKind ScDrawView::ScEndTextEdit() { - sal_Bool bIsTextEdit = IsTextEdit(); + bool bIsTextEdit = IsTextEdit(); SdrEndTextEditKind eKind = SdrEndTextEdit(); if ( bIsTextEdit && pViewData ) diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx index 14bfab8e2737..542e6cad9e6d 100644 --- a/sc/source/ui/view/editsh.cxx +++ b/sc/source/ui/view/editsh.cxx @@ -132,7 +132,7 @@ static void lcl_RemoveAttribs( EditView& rEditView ) { ScEditEngineDefaulter* pEngine = static_cast<ScEditEngineDefaulter*>(rEditView.GetEditEngine()); - sal_Bool bOld = pEngine->GetUpdateMode(); + bool bOld = pEngine->GetUpdateMode(); pEngine->SetUpdateMode(false); OUString aName = ScGlobal::GetRscString( STR_UNDO_DELETECONTENTS ); @@ -180,7 +180,7 @@ void ScEditShell::Execute( SfxRequest& rReq ) EditEngine* pEngine = pTableView->GetEditEngine(); pHdl->DataChanging(); - sal_Bool bSetSelIsRef = false; + bool bSetSelIsRef = false; bool bSetModified = true; switch ( nSlot ) @@ -507,7 +507,7 @@ void ScEditShell::Execute( SfxRequest& rReq ) } // Referenz wird selektiert -> beim Tippen nicht ueberschreiben - bSetSelIsRef = sal_True; + bSetSelIsRef = true; } } } @@ -525,7 +525,7 @@ void ScEditShell::Execute( SfxRequest& rReq ) const OUString& rTarget = pHyper->GetTargetFrame(); SvxLinkInsertMode eMode = pHyper->GetInsertMode(); - sal_Bool bDone = false; + bool bDone = false; if ( eMode == HLINK_DEFAULT || eMode == HLINK_FIELD ) { const SvxURLField* pURLField = GetURLField(); @@ -559,7 +559,7 @@ void ScEditShell::Execute( SfxRequest& rReq ) pTopView->SetSelection( aSel ); // select inserted field } - bDone = sal_True; + bDone = true; } } @@ -733,7 +733,7 @@ void ScEditShell::GetState( SfxItemSet& rSet ) rSet.Put( SfxStringItem( SID_THES, aStatusVal ) ); // disable thesaurus context menu entry if there is nothing to look up - sal_Bool bCanDoThesaurus = ScModule::HasThesaurusLanguage( nLang ); + bool bCanDoThesaurus = ScModule::HasThesaurusLanguage( nLang ); if (!bIsLookUpWord || !bCanDoThesaurus) rSet.DisableItem( SID_THES ); } @@ -888,12 +888,12 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq) SfxItemPool& rPool = GetPool(); - sal_Bool bOld = false; + bool bOld = false; SvxScriptSetItem aOldSetItem( nSlot, rPool ); aOldSetItem.GetItemSet().Put( pEditView->GetAttribs(), false ); const SfxPoolItem* pCore = aOldSetItem.GetItemOfScript( nScript ); if ( pCore && ((const SvxWeightItem*)pCore)->GetWeight() > WEIGHT_NORMAL ) - bOld = sal_True; + bOld = true; SvxScriptSetItem aSetItem( nSlot, rPool ); aSetItem.PutItemForScriptType( nScript, @@ -911,12 +911,12 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq) SfxItemPool& rPool = GetPool(); - sal_Bool bOld = false; + bool bOld = false; SvxScriptSetItem aOldSetItem( nSlot, rPool ); aOldSetItem.GetItemSet().Put( pEditView->GetAttribs(), false ); const SfxPoolItem* pCore = aOldSetItem.GetItemOfScript( nScript ); if ( pCore && ((const SvxPostureItem*)pCore)->GetValue() != ITALIC_NONE ) - bOld = sal_True; + bOld = true; SvxScriptSetItem aSetItem( nSlot, rPool ); aSetItem.PutItemForScriptType( nScript, @@ -980,7 +980,7 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq) case SID_ATTR_CHAR_STRIKEOUT: { - sal_Bool bOld = ((const SvxCrossedOutItem&)pEditView->GetAttribs(). + bool bOld = ((const SvxCrossedOutItem&)pEditView->GetAttribs(). Get(EE_CHAR_STRIKEOUT)).GetValue() != STRIKEOUT_NONE; aSet.Put( SvxCrossedOutItem( bOld ? STRIKEOUT_NONE : STRIKEOUT_SINGLE, EE_CHAR_STRIKEOUT ) ); rBindings.Invalidate( nSlot ); @@ -989,7 +989,7 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq) case SID_ATTR_CHAR_SHADOWED: { - sal_Bool bOld = ((const SvxShadowedItem&)pEditView->GetAttribs(). + bool bOld = ((const SvxShadowedItem&)pEditView->GetAttribs(). Get(EE_CHAR_SHADOW)).GetValue(); aSet.Put( SvxShadowedItem( !bOld, EE_CHAR_SHADOW ) ); rBindings.Invalidate( nSlot ); @@ -998,7 +998,7 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq) case SID_ATTR_CHAR_CONTOUR: { - sal_Bool bOld = ((const SvxContourItem&)pEditView->GetAttribs(). + bool bOld = ((const SvxContourItem&)pEditView->GetAttribs(). Get(EE_CHAR_OUTLINE)).GetValue(); aSet.Put( SvxContourItem( !bOld, EE_CHAR_OUTLINE ) ); rBindings.Invalidate( nSlot ); @@ -1041,7 +1041,7 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq) EditEngine* pEngine = pEditView->GetEditEngine(); - sal_Bool bOld = pEngine->GetUpdateMode(); + bool bOld = pEngine->GetUpdateMode(); pEngine->SetUpdateMode(false); pEditView->SetAttribs( aSet ); @@ -1187,7 +1187,7 @@ void ScEditShell::ExecuteUndo(SfxRequest& rReq) case SID_UNDO: case SID_REDO: { - sal_Bool bIsUndo = ( nSlot == SID_UNDO ); + bool bIsUndo = ( nSlot == SID_UNDO ); sal_uInt16 nCount = 1; const SfxPoolItem* pItem; diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx index a0e7e55c5c59..429bc2175302 100644 --- a/sc/source/ui/view/formatsh.cxx +++ b/sc/source/ui/view/formatsh.cxx @@ -1156,8 +1156,8 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq ) break; } - const sal_Bool bThousand = (sal_Bool)sFormat[0].toInt32(); - const sal_Bool bNegRed = (sal_Bool)sFormat[1].toInt32(); + const bool bThousand = (bool)sFormat[0].toInt32(); + const bool bNegRed = (bool)sFormat[1].toInt32(); const sal_uInt16 nPrecision = (sal_uInt16)sFormat[2].toInt32(); const sal_uInt16 nLeadZeroes = (sal_uInt16)sFormat[3].toInt32(); @@ -2578,7 +2578,7 @@ void ScFormatShell::ExecuteTextDirection( SfxRequest& rReq ) case SID_TEXTDIRECTION_LEFT_TO_RIGHT: case SID_TEXTDIRECTION_TOP_TO_BOTTOM: { - sal_Bool bVert = (nSlot == SID_TEXTDIRECTION_TOP_TO_BOTTOM); + bool bVert = (nSlot == SID_TEXTDIRECTION_TOP_TO_BOTTOM); ScPatternAttr aAttr( GetViewData()->GetDocument()->GetPool() ); SfxItemSet& rItemSet = aAttr.GetItemSet(); rItemSet.Put( SfxBoolItem( ATTR_STACKED, bVert ) ); @@ -2606,15 +2606,15 @@ void ScFormatShell::GetTextDirectionState( SfxItemSet& rSet ) ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell(); const SfxItemSet& rAttrSet = pTabViewShell->GetSelectionPattern()->GetItemSet(); - sal_Bool bVertDontCare = + bool bVertDontCare = (rAttrSet.GetItemState( ATTR_VERTICAL_ASIAN ) == SFX_ITEM_DONTCARE) || (rAttrSet.GetItemState( ATTR_STACKED ) == SFX_ITEM_DONTCARE); - sal_Bool bLeftRight = !bVertDontCare && + bool bLeftRight = !bVertDontCare && !((const SfxBoolItem&) rAttrSet.Get( ATTR_STACKED )).GetValue(); - sal_Bool bTopBottom = !bVertDontCare && !bLeftRight && + bool bTopBottom = !bVertDontCare && !bLeftRight && ((const SfxBoolItem&) rAttrSet.Get( ATTR_VERTICAL_ASIAN )).GetValue(); - sal_Bool bBidiDontCare = (rAttrSet.GetItemState( ATTR_WRITINGDIR ) == SFX_ITEM_DONTCARE); + bool bBidiDontCare = (rAttrSet.GetItemState( ATTR_WRITINGDIR ) == SFX_ITEM_DONTCARE); EEHorizontalTextDirection eBidiDir = EE_HTEXTDIR_DEFAULT; if ( !bBidiDontCare ) { @@ -2630,8 +2630,8 @@ void ScFormatShell::GetTextDirectionState( SfxItemSet& rSet ) } SvtLanguageOptions aLangOpt; - sal_Bool bDisableCTLFont = !aLangOpt.IsCTLFontEnabled(); - sal_Bool bDisableVerticalText = !aLangOpt.IsVerticalTextEnabled(); + bool bDisableCTLFont = !aLangOpt.IsCTLFontEnabled(); + bool bDisableVerticalText = !aLangOpt.IsVerticalTextEnabled(); SfxWhichIter aIter( rSet ); sal_uInt16 nWhich = aIter.FirstWhich(); @@ -2684,7 +2684,7 @@ void ScFormatShell::ExecFormatPaintbrush( SfxRequest& rReq ) } else { - sal_Bool bLock = false; + bool bLock = false; const SfxItemSet *pArgs = rReq.GetArgs(); if( pArgs && pArgs->Count() >= 1 ) bLock = static_cast<const SfxBoolItem&>(pArgs->Get(SID_FORMATPAINTBRUSH)).GetValue(); diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 06b54bb8dff5..69202b56d800 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -202,10 +202,10 @@ private: ScGridWindow* pGridWin; SCCOL nCol; SCROW nRow; - sal_Bool bButtonDown; - sal_Bool bInit; - sal_Bool bCancelled; - sal_Bool bInSelect; + bool bButtonDown; + bool bInit; + bool bCancelled; + bool bInSelect; bool mbListHasDates; sal_uLong nSel; ScFilterBoxMode eMode; @@ -226,9 +226,9 @@ public: SCROW GetRow() const { return nRow; } ScFilterBoxMode GetMode() const { return eMode; } void EndInit(); - sal_Bool IsInInit() const { return bInit; } - void SetCancelled() { bCancelled = sal_True; } - sal_Bool IsInSelect() const { return bInSelect; } + bool IsInInit() const { return bInit; } + void SetCancelled() { bCancelled = true; } + bool IsInSelect() const { return bInSelect; } void SetListHasDates(bool b) { mbListHasDates = b; } bool HasDates() const { return mbListHasDates; } }; @@ -241,7 +241,7 @@ ScFilterListBox::ScFilterListBox( Window* pParent, ScGridWindow* pGrid, nCol( nNewCol ), nRow( nNewRow ), bButtonDown( false ), - bInit( sal_True ), + bInit( true ), bCancelled( false ), bInSelect( false ), mbListHasDates(false), @@ -317,7 +317,7 @@ void ScFilterListBox::SelectHdl() if (!bButtonDown) { // #i81298# set bInSelect flag, so the box isn't deleted from modifications within FilterSelect - bInSelect = sal_True; + bInSelect = true; pGridWin->FilterSelect( nSel ); bInSelect = false; } @@ -350,7 +350,7 @@ Window* ScFilterFloatingWindow::GetPreferredKeyInputWindow() return GetWindow(WINDOW_FIRSTCHILD) ? GetWindow(WINDOW_FIRSTCHILD)->GetPreferredKeyInputWindow() : NULL; // will be the FilterBox } -static sal_Bool lcl_IsEditableMatrix( ScDocument* pDoc, const ScRange& rRange ) +static bool lcl_IsEditableMatrix( ScDocument* pDoc, const ScRange& rRange ) { // wenn es ein editierbarer Bereich ist, und rechts unten eine Matrix-Zelle // mit Origin links oben liegt, enthaelt der Bereich genau die Matrix. @@ -944,7 +944,7 @@ void ScGridWindow::DoScenarioMenu( const ScRange& rScenRange ) ScDocument* pDoc = pViewData->GetDocument(); SCTAB nTab = pViewData->GetTabNo(); - sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); long nSizeX = 0; long nSizeY = 0; @@ -1210,7 +1210,7 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow, bool bDataSelec ScQueryParam aParam; pDBData->GetQueryParam( aParam ); // kann nur MAXQUERY Eintraege ergeben - sal_Bool bValid = sal_True; + bool bValid = true; SCSIZE nCount = aParam.GetEntryCount(); for (SCSIZE j = 0; j < nCount && bValid; ++j) // bisherige Filter-Einstellungen if (aParam.GetEntry(j).bDoQuery) @@ -1396,13 +1396,13 @@ void ScGridWindow::ExecFilter( sal_uLong nSel, } else { - sal_Bool bDeleteOld = false; + bool bDeleteOld = false; SCSIZE nQueryPos = 0; - sal_Bool bFound = false; + bool bFound = false; if (!aParam.bInplace) - bDeleteOld = sal_True; + bDeleteOld = true; if (aParam.bRegExp) - bDeleteOld = sal_True; + bDeleteOld = true; SCSIZE nCount = aParam.GetEntryCount(); for (SCSIZE i = 0; i < nCount && !bDeleteOld; ++i) // bisherige Filter-Einstellungen if (aParam.GetEntry(i).bDoQuery) @@ -1412,14 +1412,14 @@ void ScGridWindow::ExecFilter( sal_uLong nSel, ScQueryEntry& rEntry = aParam.GetEntry(i); if (i>0) if (rEntry.eConnect != SC_AND) - bDeleteOld = sal_True; + bDeleteOld = true; if (rEntry.nField == nCol) { if (bFound) // diese Spalte zweimal? - bDeleteOld = sal_True; + bDeleteOld = true; nQueryPos = i; - bFound = sal_True; + bFound = true; } if (!bFound) nQueryPos = i + 1; @@ -1680,11 +1680,11 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt, MouseEventSta pScActiveViewShell = pViewData->GetViewShell(); // falls auf Link geklickt wird nScClickMouseModifier = rMEvt.GetModifier(); // um Control-Klick immer zu erkennen - sal_Bool bDetective = pViewData->GetViewShell()->IsAuditShell(); - sal_Bool bRefMode = pViewData->IsRefMode(); // Referenz angefangen - sal_Bool bFormulaMode = pScMod->IsFormulaMode(); // naechster Klick -> Referenz - sal_Bool bEditMode = pViewData->HasEditView(eWhich); // auch bei Mode==SC_INPUT_TYPE - sal_Bool bDouble = (rMEvt.GetClicks() == 2); + bool bDetective = pViewData->GetViewShell()->IsAuditShell(); + bool bRefMode = pViewData->IsRefMode(); // Referenz angefangen + bool bFormulaMode = pScMod->IsFormulaMode(); // naechster Klick -> Referenz + bool bEditMode = pViewData->HasEditView(eWhich); // auch bei Mode==SC_INPUT_TYPE + bool bDouble = (rMEvt.GetClicks() == 2); // DeactivateIP passiert nur noch bei MarkListHasChanged @@ -1794,7 +1794,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt, MouseEventSta return; } - sal_Bool bCrossPointer = TestMouse( rMEvt, true ); + bool bCrossPointer = TestMouse( rMEvt, true ); if ( bCrossPointer ) { if ( bDouble ) @@ -1917,7 +1917,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt, MouseEventSta // Links in Edit-Zellen - sal_Bool bAlt = rMEvt.IsMod2(); + bool bAlt = rMEvt.IsMod2(); if ( !bAlt && rMEvt.IsLeft() && GetEditUrl(rMEvt.GetPosPixel()) ) // Klick auf Link: Cursor nicht bewegen { @@ -2084,7 +2084,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt ) SCROW nEndRow; pViewData->GetFillData( nStartCol, nStartRow, nEndCol, nEndRow ); ScRange aDelRange; - sal_Bool bIsDel = pViewData->GetDelMark( aDelRange ); + bool bIsDel = pViewData->GetDelMark( aDelRange ); ScViewFunc* pView = pViewData->GetView(); pView->StopRefMode(); @@ -2143,7 +2143,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt ) pViewData->GetDocShell()->UpdateOle(pViewData); } - sal_Bool bRefMode = pViewData->IsRefMode(); + bool bRefMode = pViewData->IsRefMode(); if (bRefMode) pScMod->EndReference(); @@ -2205,7 +2205,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt ) // double click (only left button) - sal_Bool bDouble = ( rMEvt.GetClicks() == 2 && rMEvt.IsLeft() ); + bool bDouble = ( rMEvt.GetClicks() == 2 && rMEvt.IsLeft() ); if ( bDouble && !bRefMode && nMouseStatus == SC_GM_DBLDOWN && !pScMod->IsRefDialogOpen() ) { // data pilot table @@ -2290,7 +2290,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt ) // Links in edit cells - sal_Bool bAlt = rMEvt.IsMod2(); + bool bAlt = rMEvt.IsMod2(); if ( !bAlt && !bRefMode && !bDouble && nMouseStatus == SC_GM_URLDOWN ) { // beim ButtonUp nur ausfuehren, wenn ButtonDown auch ueber einer URL war @@ -2383,7 +2383,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt ) pViewData->GetView()->SelectionChanged(); SfxDispatcher* pDisp = pViewData->GetViewShell()->GetDispatcher(); - sal_Bool bFormulaMode = pScMod->IsFormulaMode(); + bool bFormulaMode = pScMod->IsFormulaMode(); OSL_ENSURE( pDisp || bFormulaMode, "Cursor auf nicht aktiver View bewegen ?" ); // #i14927# execute SID_CURRENTCELL (for macro recording) only if there is no @@ -2485,7 +2485,7 @@ void ScGridWindow::MouseMove( const MouseEvent& rMEvt ) } } - sal_Bool bFormulaMode = pScMod->IsFormulaMode(); // naechster Klick -> Referenz + bool bFormulaMode = pScMod->IsFormulaMode(); // naechster Klick -> Referenz if (bEEMouse && pViewData->HasEditView( eWhich )) { @@ -2517,7 +2517,7 @@ void ScGridWindow::MouseMove( const MouseEvent& rMEvt ) // anderen Mauszeiger anzeigen? - sal_Bool bEditMode = pViewData->HasEditView(eWhich); + bool bEditMode = pViewData->HasEditView(eWhich); //! Testen ob RefMode-Dragging !!! if ( bEditMode && (pViewData->GetRefTabNo() == pViewData->GetTabNo()) ) @@ -2538,7 +2538,7 @@ void ScGridWindow::MouseMove( const MouseEvent& rMEvt ) nPosY >= (SCsROW) nEditRow && nPosY <= (SCsROW) nEndRow ) { // Field can only be URL field - sal_Bool bAlt = rMEvt.IsMod2(); + bool bAlt = rMEvt.IsMod2(); if ( !bAlt && !nButtonDown && pEditView && pEditView->GetFieldUnderMousePointer() ) SetPointer( Pointer( POINTER_REFHAND ) ); else if ( pEditView && pEditView->GetEditEngine()->IsVertical() ) @@ -2549,13 +2549,13 @@ void ScGridWindow::MouseMove( const MouseEvent& rMEvt ) } } - sal_Bool bWater = SC_MOD()->GetIsWaterCan() || pViewData->GetView()->HasPaintBrush(); + bool bWater = SC_MOD()->GetIsWaterCan() || pViewData->GetView()->HasPaintBrush(); if (bWater) SetPointer( Pointer(POINTER_FILL) ); if (!bWater) { - sal_Bool bCross = false; + bool bCross = false; // Range-Finder @@ -2566,7 +2566,7 @@ void ScGridWindow::MouseMove( const MouseEvent& rMEvt ) SetPointer( Pointer( POINTER_CROSS ) ); else SetPointer( Pointer( POINTER_HAND ) ); - bCross = sal_True; + bCross = true; } // Page-Break-Modus @@ -2598,25 +2598,25 @@ void ScGridWindow::MouseMove( const MouseEvent& rMEvt ) break; } SetPointer( Pointer( eNew ) ); - bCross = sal_True; + bCross = true; } // Fill-Cursor anzeigen ? if ( !bFormulaMode && !nButtonDown ) if (TestMouse( rMEvt, false )) - bCross = sal_True; + bCross = true; if ( nButtonDown && pViewData->IsAnyFillMode() ) { SetPointer( Pointer( POINTER_CROSS ) ); - bCross = sal_True; + bCross = true; nScFillModeMouseModifier = rMEvt.GetModifier(); // ausgewertet bei AutoFill und Matrix } if (!bCross) { - sal_Bool bAlt = rMEvt.IsMod2(); + bool bAlt = rMEvt.IsMod2(); if (bEditMode) // Edit-Mode muss zuerst kommen! SetPointer( Pointer( POINTER_ARROW ) ); @@ -2746,7 +2746,7 @@ void ScGridWindow::Tracking( const TrackingEvent& rTEvt ) StopMarking(); MouseButtonUp( rMEvt ); // mit Status SC_GM_IGNORE aus StopMarking - sal_Bool bRefMode = pViewData->IsRefMode(); + bool bRefMode = pViewData->IsRefMode(); if (bRefMode) SC_MOD()->EndReference(); // Dialog nicht verkleinert lassen } @@ -2843,7 +2843,7 @@ void ScGridWindow::Command( const CommandEvent& rCEvt ) nCmd == COMMAND_CURSORPOS || nCmd == COMMAND_QUERYCHARPOSITION ) { - sal_Bool bEditView = pViewData->HasEditView( eWhich ); + bool bEditView = pViewData->HasEditView( eWhich ); if (!bEditView) { // only if no cell editview is active, look at drawview @@ -2908,20 +2908,20 @@ void ScGridWindow::Command( const CommandEvent& rCEvt ) if ( nCmd == COMMAND_WHEEL || nCmd == COMMAND_STARTAUTOSCROLL || nCmd == COMMAND_AUTOSCROLL ) { - sal_Bool bDone = pViewData->GetView()->ScrollCommand( rCEvt, eWhich ); + bool bDone = pViewData->GetView()->ScrollCommand( rCEvt, eWhich ); if (!bDone) Window::Command(rCEvt); return; } // #i7560# FormulaMode check is below scrolling - scrolling is allowed during formula input - sal_Bool bDisable = pScMod->IsFormulaMode() || + bool bDisable = pScMod->IsFormulaMode() || pScMod->IsModalMode(pViewData->GetSfxDocShell()); if (bDisable) return; if ( nCmd == COMMAND_CONTEXTMENU && !SC_MOD()->GetIsWaterCan() ) { - sal_Bool bMouse = rCEvt.IsMouseEvent(); + bool bMouse = rCEvt.IsMouseEvent(); if ( bMouse && nMouseStatus == SC_GM_IGNORE ) return; @@ -3057,7 +3057,7 @@ void ScGridWindow::Command( const CommandEvent& rCEvt ) // non-edit menu by keyboard -> use lower right of cell cursor position ScDocument* aDoc = pViewData->GetDocument(); SCTAB nTabNo = pViewData->GetTabNo(); - sal_Bool bLayoutIsRTL = aDoc->IsLayoutRTL(nTabNo); + bool bLayoutIsRTL = aDoc->IsLayoutRTL(nTabNo); SCCOL nCurX = pViewData->GetCurX(); SCROW nCurY = pViewData->GetCurY(); @@ -3207,24 +3207,24 @@ void ScGridWindow::SelectForContextMenu( const Point& rPosPixel, SCsCOL nCellX, // look for existing selection - sal_Bool bHitSelected = false; + bool bHitSelected = false; if ( pDrawView && pDrawView->IsMarkedObjHit( aLogicPos ) ) { // clicked on selected object -> don't change anything - bHitSelected = sal_True; + bHitSelected = true; } else if ( pViewData->GetMarkData().IsCellMarked(nCellX, nCellY) ) { // clicked on selected cell -> don't change anything - bHitSelected = sal_True; + bHitSelected = true; } // select drawing object or move cell cursor if ( !bHitSelected ) { - sal_Bool bWasDraw = ( pDrawView && pDrawView->AreObjectsMarked() ); - sal_Bool bHitDraw = false; + bool bWasDraw = ( pDrawView && pDrawView->AreObjectsMarked() ); + bool bHitDraw = false; if ( pDrawView ) { pDrawView->UnmarkAllObj(); @@ -3296,7 +3296,7 @@ void ScGridWindow::KeyInput(const KeyEvent& rKEvt) } // query for existing note marker before calling ViewShell's keyboard handling // which may remove the marker - sal_Bool bHadKeyMarker = ( pNoteMarker && pNoteMarker->IsByKeyboard() ); + bool bHadKeyMarker = ( pNoteMarker && pNoteMarker->IsByKeyboard() ); ScTabViewShell* pViewSh = pViewData->GetViewShell(); if (pViewData->GetDocShell()->GetProgress()) @@ -3376,7 +3376,7 @@ void ScGridWindow::StopMarking() void ScGridWindow::UpdateInputContext() { - sal_Bool bReadOnly = pViewData->GetDocShell()->IsReadOnly(); + bool bReadOnly = pViewData->GetDocShell()->IsReadOnly(); sal_uLong nOptions = bReadOnly ? 0 : ( INPUTCONTEXT_TEXT | INPUTCONTEXT_EXTTEXTINPUT ); // when font from InputContext is used, @@ -3424,12 +3424,12 @@ bool ScGridWindow::DropScroll( const Point& rMousePos ) return false; } -static sal_Bool lcl_TestScenarioRedliningDrop( ScDocument* pDoc, const ScRange& aDragRange) +static bool lcl_TestScenarioRedliningDrop( ScDocument* pDoc, const ScRange& aDragRange) { // Testet, ob bei eingeschalteten RedLining, // bei einem Drop ein Scenario betroffen ist. - sal_Bool bReturn = false; + bool bReturn = false; SCTAB nTab = aDragRange.aStart.Tab(); SCTAB nTabCount = pDoc->GetTableCount(); @@ -3437,7 +3437,7 @@ static sal_Bool lcl_TestScenarioRedliningDrop( ScDocument* pDoc, const ScRange& { if( pDoc->IsScenario(nTab) && pDoc->HasScenarioRange(nTab, aDragRange)) { - bReturn = sal_True; + bReturn = true; } else { @@ -3445,7 +3445,7 @@ static sal_Bool lcl_TestScenarioRedliningDrop( ScDocument* pDoc, const ScRange& { if(pDoc->HasScenarioRange(i, aDragRange)) { - bReturn = sal_True; + bReturn = true; break; } } @@ -3524,7 +3524,7 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt ) if ( rData.pCellTransfer->GetDragSourceFlags() & SC_DROP_TABLE ) // whole sheet? { - sal_Bool bOk = pThisDoc->IsDocEditable(); + bool bOk = pThisDoc->IsDocEditable(); return bOk ? rEvt.mnAction : 0; // don't draw selection frame } @@ -3781,7 +3781,7 @@ sal_Int8 ScGridWindow::AcceptDrop( const AcceptDropEvent& rEvt ) case DND_ACTION_MOVE: case DND_ACTION_COPYMOVE: { - sal_Bool bMove = ( nMyAction == DND_ACTION_MOVE ); + bool bMove = ( nMyAction == DND_ACTION_MOVE ); if ( IsDropFormatSupported( SOT_FORMATSTR_ID_EMBED_SOURCE ) || IsDropFormatSupported( SOT_FORMATSTR_ID_LINK_SOURCE ) || IsDropFormatSupported( SOT_FORMATSTR_ID_EMBED_SOURCE_OLE ) || @@ -3886,7 +3886,7 @@ static sal_uLong lcl_GetDropFormatId( const uno::Reference<datatransfer::XTransf { // If it's a Writer object, insert RTF instead of OLE - sal_Bool bDoRtf = false; + bool bDoRtf = false; SotStorageStreamRef xStm; TransferableObjectDescriptor aObjDesc; if( aDataHelper.GetTransferableObjectDescriptor( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR, aObjDesc ) && @@ -4000,8 +4000,8 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos SCTAB nThisTab = pViewData->GetTabNo(); sal_uInt16 nFlags = pTransObj->GetDragSourceFlags(); - sal_Bool bIsNavi = ( nFlags & SC_DROP_NAVIGATOR ) != 0; - sal_Bool bIsMove = ( nDndAction == DND_ACTION_MOVE && !bIsNavi ); + bool bIsNavi = ( nFlags & SC_DROP_NAVIGATOR ) != 0; + bool bIsMove = ( nDndAction == DND_ACTION_MOVE && !bIsNavi ); // workaround for wrong nDndAction on Windows when pressing solely // the Alt key during drag and drop; @@ -4011,7 +4011,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos bIsMove = ( nDndAction & DND_ACTION_MOVE && !bIsNavi ); } - sal_Bool bIsLink = ( nDndAction == DND_ACTION_LINK ); + bool bIsLink = ( nDndAction == DND_ACTION_LINK ); ScRange aSource = pTransObj->GetRange(); @@ -4052,7 +4052,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos bFiltered = ScViewUtil::HasFiltered( aDest, pThisDoc); } - sal_Bool bDone = false; + bool bDone = false; if (!bFiltered && pSourceDoc == pThisDoc) { @@ -4063,7 +4063,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos SCTAB nSrcTab = aSource.aStart.Tab(); pViewData->GetDocShell()->MoveTable( nSrcTab, nThisTab, !bIsMove, true ); // with Undo pView->SetTabNo( nThisTab, true ); - bDone = sal_True; + bDone = true; } } else // move/copy block @@ -4077,7 +4077,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos sal_uInt16 nId = bIsMove ? SID_CHART_SOURCE : SID_CHART_ADDSOURCE; pViewData->GetDispatcher().Execute( nId, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD, &aRangeItem, &aNameItem, (void*) NULL ); - bDone = sal_True; + bDone = true; } else if ( pThisDoc->GetDPAtCursor( nDestPosX, nDestPosY, nThisTab ) ) { @@ -4087,7 +4087,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos if ( aDestPos != aSource.aStart ) bDone = pViewData->GetView()->DataPilotMove( aSource, aDestPos ); else - bDone = sal_True; // same position: nothing + bDone = true; // same position: nothing } else if ( nDestPosX != aSource.aStart.Col() || nDestPosY != aSource.aStart.Row() || nSourceTab != nThisTab ) @@ -4098,7 +4098,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos SCsCOL nCorrectCursorPosCol = 0; SCsROW nCorrectCursorPosRow = 0; - bDone = sal_True; + bDone = true; if ( meDragInsertMode != INS_NONE ) { // call with bApi = sal_True to avoid error messages in drop handler @@ -4185,7 +4185,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos } else - bDone = sal_True; // nothing to do + bDone = true; // nothing to do } if (bDone) @@ -4222,7 +4222,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos } pView->ImportTables( pSrcShell,static_cast<SCTAB>(nTabs.size()), &nTabs[0], bIsLink, nThisTab ); - bDone = sal_True; + bDone = true; } } else if ( bIsLink ) @@ -4237,7 +4237,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos OUString aUndo = ScGlobal::GetRscString( STR_UNDO_COPY ); pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo ); - bDone = sal_True; + bDone = true; if ( meDragInsertMode != INS_NONE ) { // call with bApi = sal_True to avoid error messages in drop handler @@ -4297,7 +4297,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos OUString aUndo = ScGlobal::GetRscString( bIsMove ? STR_UNDO_MOVE : STR_UNDO_COPY ); pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo ); - bDone = sal_True; + bDone = true; if ( meDragInsertMode != INS_NONE ) { // call with bApi = sal_True to avoid error messages in drop handler @@ -4382,14 +4382,14 @@ sal_Int8 ScGridWindow::ExecuteDrop( const ExecuteDropEvent& rEvt ) } Point aLogicPos = PixelToLogic(aPos); - sal_Bool bIsLink = ( rEvt.mnAction == DND_ACTION_LINK ); + bool bIsLink = ( rEvt.mnAction == DND_ACTION_LINK ); if (!bIsLink && rData.pDrawTransfer) { sal_uInt16 nFlags = rData.pDrawTransfer->GetDragSourceFlags(); - sal_Bool bIsNavi = ( nFlags & SC_DROP_NAVIGATOR ) != 0; - sal_Bool bIsMove = ( rEvt.mnAction == DND_ACTION_MOVE && !bIsNavi ); + bool bIsNavi = ( nFlags & SC_DROP_NAVIGATOR ) != 0; + bool bIsMove = ( rEvt.mnAction == DND_ACTION_MOVE && !bIsNavi ); bPasteIsMove = bIsMove; @@ -4430,7 +4430,7 @@ sal_Int8 ScGridWindow::ExecuteDrop( const ExecuteDropEvent& rEvt ) return rEvt.mnAction; } - sal_Bool bDone = false; + bool bDone = false; sal_uLong nFormatId = bIsLink ? lcl_GetDropLinkId( rEvt.maDropEvent.Transferable ) : @@ -4533,10 +4533,10 @@ void ScGridWindow::UpdateEditViewPos() // hide EditView? - sal_Bool bHide = ( nEndCol<pViewData->GetPosX(eHWhich) || nEndRow<pViewData->GetPosY(eVWhich) ); + bool bHide = ( nEndCol<pViewData->GetPosX(eHWhich) || nEndRow<pViewData->GetPosY(eVWhich) ); if ( SC_MOD()->IsFormulaMode() ) if ( pViewData->GetTabNo() != pViewData->GetRefTabNo() ) - bHide = sal_True; + bHide = true; if (bHide) { @@ -4618,7 +4618,7 @@ void ScGridWindow::UpdateFormulas() Point aScrPos = pViewData->GetScrPos( nX1, nY1, eWhich ); long nMirrorWidth = GetSizePixel().Width(); - sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); if ( bLayoutRTL ) { long nEndPixel = pViewData->GetScrPos( nX2+1, nPosY, eWhich ).X(); @@ -4752,7 +4752,7 @@ bool ScGridWindow::HitRangeFinder( const Point& rMouse, RfCorner& rCorner, { ScDocument* pDoc = pViewData->GetDocument(); SCTAB nTab = pViewData->GetTabNo(); - sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); long nLayoutSign = bLayoutRTL ? -1 : 1; SCsCOL nPosX; @@ -4853,19 +4853,19 @@ static void lcl_PaintOneRange( ScDocShell* pDocSh, const ScRange& rRange, sal_uI SCCOL nCol2 = rRange.aEnd.Col(); SCROW nRow2 = rRange.aEnd.Row(); SCTAB nTab2 = rRange.aEnd.Tab(); - sal_Bool bHiddenEdge = false; + bool bHiddenEdge = false; SCROW nTmp; ScDocument* pDoc = pDocSh->GetDocument(); while ( nCol1 > 0 && pDoc->ColHidden(nCol1, nTab1) ) { --nCol1; - bHiddenEdge = sal_True; + bHiddenEdge = true; } while ( nCol2 < MAXCOL && pDoc->ColHidden(nCol2, nTab1) ) { ++nCol2; - bHiddenEdge = sal_True; + bHiddenEdge = true; } nTmp = pDoc->FirstVisibleRow(0, nRow1, nTab1); if (!ValidRow(nTmp)) @@ -4873,7 +4873,7 @@ static void lcl_PaintOneRange( ScDocShell* pDocSh, const ScRange& rRange, sal_uI if (nTmp < nRow1) { nRow1 = nTmp; - bHiddenEdge = sal_True; + bHiddenEdge = true; } nTmp = pDoc->FirstVisibleRow(nRow2, MAXROW, nTab1); if (!ValidRow(nTmp)) @@ -4881,7 +4881,7 @@ static void lcl_PaintOneRange( ScDocShell* pDocSh, const ScRange& rRange, sal_uI if (nTmp > nRow2) { nRow2 = nTmp; - bHiddenEdge = sal_True; + bHiddenEdge = true; } if ( nCol2 > nCol1 + 1 && nRow2 > nRow1 + 1 && !bHiddenEdge ) @@ -4996,7 +4996,7 @@ void ScGridWindow::RFMouseMove( const MouseEvent& rMEvt, bool bUp ) // Scrolling - sal_Bool bTimer = false; + bool bTimer = false; Point aPos = rMEvt.GetPosPixel(); SCsCOL nDx = 0; SCsROW nDy = 0; @@ -5011,7 +5011,7 @@ void ScGridWindow::RFMouseMove( const MouseEvent& rMEvt, bool bUp ) { if ( nDx != 0) pViewData->GetView()->ScrollX( nDx, WhichH(eWhich) ); if ( nDy != 0 ) pViewData->GetView()->ScrollY( nDy, WhichV(eWhich) ); - bTimer = sal_True; + bTimer = true; } // Umschalten bei Fixierung (damit Scrolling funktioniert) @@ -5196,7 +5196,7 @@ bool ScGridWindow::GetEditUrl( const Point& rPos, if (pPattern->GetCellOrientation() != SVX_ORIENTATION_STANDARD) return false; - sal_Bool bBreak = ((SfxBoolItem&)pPattern->GetItem(ATTR_LINEBREAK)).GetValue() || + bool bBreak = ((SfxBoolItem&)pPattern->GetItem(ATTR_LINEBREAK)).GetValue() || ((SvxCellHorJustify)((const SvxHorJustifyItem&)pPattern-> GetItem( ATTR_HOR_JUSTIFY )).GetValue() == SVX_HOR_JUSTIFY_BLOCK); SvxCellHorJustify eHorJust = (SvxCellHorJustify)((SvxHorJustifyItem&)pPattern-> @@ -5276,7 +5276,7 @@ bool ScGridWindow::GetEditUrl( const Point& rPos, EditView aTempView(pEngine.get(), this); aTempView.SetOutputArea( aLogicEdit ); - sal_Bool bRet = false; + bool bRet = false; MapMode aOld = GetMapMode(); SetMapMode(aEditMode); // kein return mehr @@ -5296,7 +5296,7 @@ bool ScGridWindow::GetEditUrl( const Point& rPos, if (pTarget) *pTarget = pURLField->GetTargetFrame(); } - bRet = sal_True; + bRet = true; } } @@ -5758,11 +5758,11 @@ void ScGridWindow::UpdateCursorOverlay() ScDocument* pDoc = pViewData->GetDocument(); const ScPatternAttr* pPattern = pDoc->GetPattern(nX,nY,nTab); const ScMergeFlagAttr& rMergeFlag = (const ScMergeFlagAttr&) pPattern->GetItem(ATTR_MERGE_FLAG); - sal_Bool bOverlapped = rMergeFlag.IsOverlapped(); + bool bOverlapped = rMergeFlag.IsOverlapped(); // left or above of the screen? - sal_Bool bVis = ( nX>=pViewData->GetPosX(eHWhich) && nY>=pViewData->GetPosY(eVWhich) ); + bool bVis = ( nX>=pViewData->GetPosX(eHWhich) && nY>=pViewData->GetPosY(eVWhich) ); if (!bVis) { SCCOL nEndX = nX; @@ -5778,11 +5778,11 @@ void ScGridWindow::UpdateCursorOverlay() if ( bVis && !bOverlapped && !pViewData->HasEditView(eWhich) && pViewData->IsActive() ) { Point aScrPos = pViewData->GetScrPos( nX, nY, eWhich, true ); - sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); // completely right of/below the screen? // (test with logical start position in aScrPos) - sal_Bool bMaybeVisible; + bool bMaybeVisible; if ( bLayoutRTL ) bMaybeVisible = ( aScrPos.X() >= -2 && aScrPos.Y() >= -2 ); else @@ -5935,7 +5935,7 @@ void ScGridWindow::UpdateAutoFillOverlay() SCTAB nTab = pViewData->GetTabNo(); ScDocument* pDoc = pViewData->GetDocument(); - sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); Point aFillPos = pViewData->GetScrPos( nX, nY, eWhich, true ); long nSizeXPix; @@ -6027,7 +6027,7 @@ void ScGridWindow::UpdateDragRectOverlay() double nPPTY = pViewData->GetPPTY(); SCCOLROW i; - sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); long nLayoutSign = bLayoutRTL ? -1 : 1; if (ValidCol(nX2) && nX2>=nX1) diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx index a07f268c2f69..6ea8c8906977 100644 --- a/sc/source/ui/view/gridwin2.cxx +++ b/sc/source/ui/view/gridwin2.cxx @@ -117,7 +117,7 @@ bool ScGridWindow::DoAutoFilterButton( SCCOL nCol, SCROW nRow, const MouseEvent& Point aDiffPix = rMEvt.GetPosPixel(); aDiffPix -= aScrPos; - sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); if ( bLayoutRTL ) aDiffPix.X() = -aDiffPix.X(); @@ -247,7 +247,7 @@ void ScGridWindow::DPTestMouse( const MouseEvent& rMEvt, bool bMove ) // scroll window if at edges //! move this to separate method - sal_Bool bTimer = false; + bool bTimer = false; Point aPixel = rMEvt.GetPosPixel(); SCsCOL nDx = 0; @@ -270,7 +270,7 @@ void ScGridWindow::DPTestMouse( const MouseEvent& rMEvt, bool bMove ) if ( nDy != 0 ) pViewData->GetView()->ScrollY( nDy, WhichV(eWhich) ); - bTimer = sal_True; + bTimer = true; } SCsCOL nPosX; @@ -285,7 +285,7 @@ void ScGridWindow::DPTestMouse( const MouseEvent& rMEvt, bool bMove ) Rectangle aPosRect; sal_uInt16 nOrient; long nDimPos; - sal_Bool bHasRange = pDragDPObj->GetHeaderDrag( aPos, bMouseLeft, bMouseTop, nDPField, + bool bHasRange = pDragDPObj->GetHeaderDrag( aPos, bMouseLeft, bMouseTop, nDPField, aPosRect, nOrient, nDimPos ); UpdateDragRect( bHasRange && bMove, aPosRect ); @@ -352,7 +352,7 @@ void ScGridWindow::DPTestMouse( const MouseEvent& rMEvt, bool bMove ) bool ScGridWindow::DPTestFieldPopupArrow( const MouseEvent& rMEvt, const ScAddress& rPos, const ScAddress& rDimPos, ScDPObject* pDPObj) { - sal_Bool bLayoutRTL = pViewData->GetDocument()->IsLayoutRTL( pViewData->GetTabNo() ); + bool bLayoutRTL = pViewData->GetDocument()->IsLayoutRTL( pViewData->GetTabNo() ); // Get the geometry of the cell. Point aScrPos = pViewData->GetScrPos(rPos.Col(), rPos.Row(), eWhich); @@ -660,8 +660,8 @@ sal_uInt16 ScGridWindow::HitPageBreak( const Point& rMouse, ScRange* pSource, ScPageBreakData* pPageData = pViewData->GetView()->GetPageBreakData(); if ( pPageData ) { - sal_Bool bHori = false; - sal_Bool bVert = false; + bool bHori = false; + bool bVert = false; SCCOL nHitX = 0; SCROW nHitY = 0; @@ -676,22 +676,22 @@ sal_uInt16 ScGridWindow::HitPageBreak( const Point& rMouse, ScRange* pSource, // Horizontal mehr Toleranz als vertikal, weil mehr Platz ist if ( nMouseX <= aTL.X() + 4 ) { - bHori = sal_True; + bHori = true; nHitX = nPosX; } else if ( nMouseX >= aBR.X() - 6 ) { - bHori = sal_True; + bHori = true; nHitX = nPosX+1; // linker Rand der naechsten Zelle } if ( nMouseY <= aTL.Y() + 2 ) { - bVert = sal_True; + bVert = true; nHitY = nPosY; } else if ( nMouseY >= aBR.Y() - 4 ) { - bVert = sal_True; + bVert = true; nHitY = nPosY+1; // oberer Rand der naechsten Zelle } @@ -702,12 +702,12 @@ sal_uInt16 ScGridWindow::HitPageBreak( const Point& rMouse, ScRange* pSource, { ScPrintRangeData& rData = pPageData->GetData(nPos); ScRange aRange = rData.GetPrintRange(); - sal_Bool bLHit = ( bHori && nHitX == aRange.aStart.Col() ); - sal_Bool bRHit = ( bHori && nHitX == aRange.aEnd.Col() + 1 ); - sal_Bool bTHit = ( bVert && nHitY == aRange.aStart.Row() ); - sal_Bool bBHit = ( bVert && nHitY == aRange.aEnd.Row() + 1 ); - sal_Bool bInsideH = ( nPosX >= aRange.aStart.Col() && nPosX <= aRange.aEnd.Col() ); - sal_Bool bInsideV = ( nPosY >= aRange.aStart.Row() && nPosY <= aRange.aEnd.Row() ); + bool bLHit = ( bHori && nHitX == aRange.aStart.Col() ); + bool bRHit = ( bHori && nHitX == aRange.aEnd.Col() + 1 ); + bool bTHit = ( bVert && nHitY == aRange.aStart.Row() ); + bool bBHit = ( bVert && nHitY == aRange.aEnd.Row() + 1 ); + bool bInsideH = ( nPosX >= aRange.aStart.Col() && nPosX <= aRange.aEnd.Col() ); + bool bInsideV = ( nPosY >= aRange.aStart.Row() && nPosY <= aRange.aEnd.Row() ); if ( bLHit ) { @@ -788,7 +788,7 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, bool bUp ) // Scrolling - sal_Bool bTimer = false; + bool bTimer = false; Point aPos = rMEvt.GetPosPixel(); SCsCOL nDx = 0; SCsROW nDy = 0; @@ -809,7 +809,7 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, bool bUp ) if ( nDx != 0 ) pViewData->GetView()->ScrollX( nDx, WhichH(eWhich) ); if ( nDy != 0 ) pViewData->GetView()->ScrollY( nDy, WhichV(eWhich) ); - bTimer = sal_True; + bTimer = true; } // Umschalten bei Fixierung (damit Scrolling funktioniert) @@ -846,9 +846,9 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, bool bUp ) if ( !bLeft ) ++nPosX; if ( !bTop ) ++nPosY; - sal_Bool bBreak = ( nPagebreakMouse == SC_PD_BREAK_H || nPagebreakMouse == SC_PD_BREAK_V ); - sal_Bool bHide = false; - sal_Bool bToEnd = false; + bool bBreak = ( nPagebreakMouse == SC_PD_BREAK_H || nPagebreakMouse == SC_PD_BREAK_V ); + bool bHide = false; + bool bToEnd = false; ScRange aDrawRange = aPagebreakSource; if ( bBreak ) { @@ -862,7 +862,7 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, bool bUp ) aDrawRange.aEnd.SetCol( nPosX - 1 ); } else - bHide = sal_True; + bHide = true; } else { @@ -874,7 +874,7 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, bool bUp ) aDrawRange.aEnd.SetRow( nPosY - 1 ); } else - bHide = sal_True; + bHide = true; } } else @@ -888,18 +888,18 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, bool bUp ) if ( nPosX > 0 ) aDrawRange.aEnd.SetCol( nPosX-1 ); else - bHide = sal_True; + bHide = true; } if ( nPagebreakMouse & SC_PD_RANGE_B ) { if ( nPosY > 0 ) aDrawRange.aEnd.SetRow( nPosY-1 ); else - bHide = sal_True; + bHide = true; } if ( aDrawRange.aStart.Col() > aDrawRange.aEnd.Col() || aDrawRange.aStart.Row() > aDrawRange.aEnd.Row() ) - bHide = sal_True; + bHide = true; } if ( !bPagebreakDrawn || bUp || aDrawRange != aPagebreakDrag ) @@ -928,11 +928,11 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, bool bUp ) ScDocShell* pDocSh = pViewData->GetDocShell(); ScDocument* pDoc = pDocSh->GetDocument(); SCTAB nTab = pViewData->GetTabNo(); - sal_Bool bUndo (pDoc->IsUndoEnabled()); + bool bUndo (pDoc->IsUndoEnabled()); if ( bBreak ) { - sal_Bool bColumn = ( nPagebreakMouse == SC_PD_BREAK_H ); + bool bColumn = ( nPagebreakMouse == SC_PD_BREAK_H ); SCCOLROW nNew = bColumn ? static_cast<SCCOLROW>(nPosX) : static_cast<SCCOLROW>(nPosY); if ( nNew != nPagebreakBreak ) { @@ -942,7 +942,7 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, bool bUp ) pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo ); } - sal_Bool bGrow = !bHide && nNew > nPagebreakBreak; + bool bGrow = !bHide && nNew > nPagebreakBreak; if ( bColumn ) { if (pDoc->HasColBreak(static_cast<SCCOL>(nPagebreakBreak), nTab) & BREAK_MANUAL) diff --git a/sc/source/ui/view/gridwin3.cxx b/sc/source/ui/view/gridwin3.cxx index 5a7f6662fc40..3dd7df2ca2b6 100644 --- a/sc/source/ui/view/gridwin3.cxx +++ b/sc/source/ui/view/gridwin3.cxx @@ -242,7 +242,7 @@ MapMode ScGridWindow::GetDrawMapMode( bool bForce ) { ScDocument* pDoc = pViewData->GetDocument(); SCTAB nTab = pViewData->GetTabNo(); - sal_Bool bNegativePage = pDoc->IsNegativePage( nTab ); + bool bNegativePage = pDoc->IsNegativePage( nTab ); MapMode aDrawMode = pViewData->GetLogicMode(); @@ -301,7 +301,7 @@ void ScGridWindow::CreateAnchorHandle(SdrHdlList& rHdl, const ScAddress& rAddres const ScViewOptions& rOpts = pViewData->GetOptions(); if(rOpts.GetOption( VOPT_ANCHOR )) { - sal_Bool bNegativePage = pViewData->GetDocument()->IsNegativePage( pViewData->GetTabNo() ); + bool bNegativePage = pViewData->GetDocument()->IsNegativePage( pViewData->GetTabNo() ); Point aPos = pViewData->GetScrPos( rAddress.Col(), rAddress.Row(), eWhich, true ); aPos = PixelToLogic(aPos); rHdl.AddHdl(new SdrHdl(aPos, bNegativePage ? HDL_ANCHOR_TR : HDL_ANCHOR)); @@ -339,7 +339,7 @@ void ScGridWindow::UpdateStatusPosSize() // position and size of selected object(s) if something is selected, // mouse position otherwise - sal_Bool bActionItem = false; + bool bActionItem = false; if ( pDrView->IsAction() ) // action rectangle { Rectangle aRect; @@ -354,7 +354,7 @@ void ScGridWindow::UpdateStatusPosSize() aSet.Put( SfxPointItem( SID_ATTR_POSITION, aRect.TopLeft() ) ); aSet.Put( SvxSizeItem( SID_ATTR_SIZE, Size( aRect.Right() - aRect.Left(), aRect.Bottom() - aRect.Top() ) ) ); - bActionItem = sal_True; + bActionItem = true; } } if ( !bActionItem ) diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index b965c573a0fe..5405b898023e 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -76,9 +76,9 @@ static void lcl_LimitRect( Rectangle& rRect, const Rectangle& rVisible ) } static void lcl_DrawOneFrame( OutputDevice* pDev, const Rectangle& rInnerPixel, - const OUString& rTitle, const Color& rColor, sal_Bool bTextBelow, + const OUString& rTitle, const Color& rColor, bool bTextBelow, double nPPTX, double nPPTY, const Fraction& rZoomY, - ScDocument* pDoc, ScViewData* pButtonViewData, sal_Bool bLayoutRTL ) + ScDocument* pDoc, ScViewData* pButtonViewData, bool bLayoutRTL ) { // pButtonViewData wird nur benutzt, um die Button-Groesse zu setzen, // darf ansonsten NULL sein! @@ -143,14 +143,14 @@ static void lcl_DrawOneFrame( OutputDevice* pDev, const Rectangle& rInnerPixel, long nTextStart = bLayoutRTL ? aInner.Right() - aTextSize.Width() + 1 : aInner.Left(); - sal_Bool bWasClip = false; + bool bWasClip = false; Region aOldClip; - sal_Bool bClip = ( aTextSize.Width() > aOuter.Right() - nBWidth - aInner.Left() ); + bool bClip = ( aTextSize.Width() > aOuter.Right() - nBWidth - aInner.Left() ); if ( bClip ) { if (pDev->IsClipRegion()) { - bWasClip = sal_True; + bWasClip = true; aOldClip = pDev->GetActiveClipRegion(); } long nClipStartX = bLayoutRTL ? aOuter.Left() + nBWidth : aInner.Left(); @@ -199,7 +199,7 @@ static void lcl_DrawScenarioFrames( OutputDevice* pDev, ScViewData* pViewData, S ScRangeListRef xRanges = new ScRangeList; aMarks.FillRangeListWithMarks( xRanges, false ); - sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); long nLayoutSign = bLayoutRTL ? -1 : 1; for (size_t j = 0, n = xRanges->size(); j < n; ++j) @@ -223,7 +223,7 @@ static void lcl_DrawScenarioFrames( OutputDevice* pDev, ScViewData* pViewData, S aEndPos.X() -= nLayoutSign; aEndPos.Y() -= 1; - sal_Bool bTextBelow = ( aRange.aStart.Row() == 0 ); + bool bTextBelow = ( aRange.aStart.Row() == 0 ); OUString aCurrent; Color aColor( COL_LIGHTGRAY ); @@ -382,7 +382,7 @@ void ScGridWindow::Paint( const Rectangle& rRect ) void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMode eMode ) { ScModule* pScMod = SC_MOD(); - sal_Bool bTextWysiwyg = pScMod->GetInputOptions().GetTextWysiwyg(); + bool bTextWysiwyg = pScMod->GetInputOptions().GetTextWysiwyg(); if (pViewData->IsMinimized()) return; @@ -423,7 +423,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod Point aScrPos = pViewData->GetScrPos( nX1, nY1, eWhich ); long nMirrorWidth = GetSizePixel().Width(); - sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); long nLayoutSign = bLayoutRTL ? -1 : 1; if ( bLayoutRTL ) { @@ -440,7 +440,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod SCCOL nCurEndX = nCurX; SCROW nCurEndY = nCurY; pDoc->ExtendMerge( nCurX, nCurY, nCurEndX, nCurEndY, nTab ); - sal_Bool bCurVis = nCursorHideCount==0 && + bool bCurVis = nCursorHideCount==0 && ( nCurEndX+1 >= nX1 && nCurX <= nX2+1 && nCurEndY+1 >= nY1 && nCurY <= nY2+1 ); // AutoFill-Anfasser @@ -460,8 +460,8 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod double nPPTY = pViewData->GetPPTY(); const ScViewOptions& rOpts = pViewData->GetOptions(); - sal_Bool bFormulaMode = rOpts.GetOption( VOPT_FORMULAS ); - sal_Bool bMarkClipped = rOpts.GetOption( VOPT_CLIPMARKS ); + bool bFormulaMode = rOpts.GetOption( VOPT_FORMULAS ); + bool bMarkClipped = rOpts.GetOption( VOPT_CLIPMARKS ); // Datenblock @@ -480,7 +480,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod aOutputData.SetSpellCheckContext(mpSpellCheckCxt.get()); boost::scoped_ptr< VirtualDevice > xFmtVirtDev; - sal_Bool bLogicText = bTextWysiwyg; // call DrawStrings in logic MapMode? + bool bLogicText = bTextWysiwyg; // call DrawStrings in logic MapMode? if ( bTextWysiwyg ) { @@ -499,7 +499,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod xFmtVirtDev->SetMapMode( MAP_100TH_MM ); aOutputData.SetFmtDevice( xFmtVirtDev.get() ); - bLogicText = sal_True; // use logic MapMode + bLogicText = true; // use logic MapMode } const svtools::ColorConfig& rColorCfg = pScMod->GetColorConfig(); @@ -522,10 +522,10 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod aOutputData.SetEditObject( GetEditObject() ); aOutputData.SetViewShell( pViewData->GetViewShell() ); - sal_Bool bGrid = rOpts.GetOption( VOPT_GRID ) && pViewData->GetShowGrid(); - sal_Bool bGridFirst = !rOpts.GetOption( VOPT_GRID_ONTOP ); + bool bGrid = rOpts.GetOption( VOPT_GRID ) && pViewData->GetShowGrid(); + bool bGridFirst = !rOpts.GetOption( VOPT_GRID_ONTOP ); - sal_Bool bPage = rOpts.GetOption( VOPT_PAGEBREAKS ); + bool bPage = rOpts.GetOption( VOPT_PAGEBREAKS ); if ( eMode == SC_UPDATE_CHANGED ) { @@ -533,7 +533,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod aOutputData.SetSingleGrid(true); } - sal_Bool bPageMode = pViewData->IsPagebreakMode(); + bool bPageMode = pViewData->IsPagebreakMode(); if (bPageMode) // nach FindChanged { // SetPagebreakMode initialisiert auch bPrinted Flags @@ -541,7 +541,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod } EditView* pEditView = NULL; - sal_Bool bEditMode = pViewData->HasEditView(eWhich); + bool bEditMode = pViewData->HasEditView(eWhich); if ( bEditMode && pViewData->GetRefTabNo() == nTab ) { SCCOL nEditCol; @@ -723,15 +723,15 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod SCTAB nTabCount = pDoc->GetTableCount(); const std::vector<ScHighlightEntry> &rHigh = pViewData->GetView()->GetHighlightRanges(); - sal_Bool bHasScenario = ( nTab+1<nTabCount && pDoc->IsScenario(nTab+1) && !pDoc->IsScenario(nTab) ); - sal_Bool bHasChange = ( pDoc->GetChangeTrack() != NULL ); + bool bHasScenario = ( nTab+1<nTabCount && pDoc->IsScenario(nTab+1) && !pDoc->IsScenario(nTab) ); + bool bHasChange = ( pDoc->GetChangeTrack() != NULL ); if ( bHasChange || bHasScenario || !rHigh.empty() ) { //! SetChangedClip() mit DrawMarks() zusammenfassen?? (anderer MapMode!) - sal_Bool bAny = sal_True; + bool bAny = true; if (eMode == SC_UPDATE_CHANGED) bAny = aOutputData.SetChangedClip(); if (bAny) @@ -1116,7 +1116,7 @@ void ScGridWindow::DrawButtons( SCCOL nX1, SCCOL nX2, ScTableInfo& rTabInfo, Out RowInfo* pRowInfo = rTabInfo.mpRowInfo; sal_uInt16 nArrCount = rTabInfo.mnArrCount; - sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); Point aOldPos = aComboButton.GetPosPixel(); // Zustand fuer MouseDown/Up Size aOldSize = aComboButton.GetSizePixel(); // merken @@ -1140,7 +1140,7 @@ void ScGridWindow::DrawButtons( SCCOL nX1, SCCOL nX2, ScTableInfo& rTabInfo, Out if (!pQueryParam) pQueryParam = new ScQueryParam; - sal_Bool bNewData = sal_True; + bool bNewData = true; if (pDBData) { SCCOL nStartCol; @@ -1167,8 +1167,8 @@ void ScGridWindow::DrawButtons( SCCOL nX1, SCCOL nX2, ScTableInfo& rTabInfo, Out // pQueryParam kann nur MAXQUERY Eintraege enthalten - sal_Bool bSimpleQuery = sal_True; - sal_Bool bColumnFound = false; + bool bSimpleQuery = true; + bool bColumnFound = false; if (!pQueryParam->bInplace) bSimpleQuery = false; SCSIZE nCount = pQueryParam->GetEntryCount(); @@ -1179,7 +1179,7 @@ void ScGridWindow::DrawButtons( SCCOL nX1, SCCOL nX2, ScTableInfo& rTabInfo, Out // (auch bei ">1" soll der Spaltenkopf blau werden) if (pQueryParam->GetEntry(nQuery).nField == nCol) - bColumnFound = sal_True; + bColumnFound = true; if (nQuery > 0) if (pQueryParam->GetEntry(nQuery).eConnect != SC_AND) bSimpleQuery = false; @@ -1257,7 +1257,7 @@ Rectangle ScGridWindow::GetListValButtonRect( const ScAddress& rButtonPos ) { ScDocument* pDoc = pViewData->GetDocument(); SCTAB nTab = pViewData->GetTabNo(); - sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); long nLayoutSign = bLayoutRTL ? -1 : 1; ScDDComboBoxButton aButton( this ); // for optimal size @@ -1281,7 +1281,7 @@ Rectangle ScGridWindow::GetListValButtonRect( const ScAddress& rButtonPos ) nNextCol = nCol + pMerge->GetColMerge(); // next cell after the merged area while ( nNextCol <= MAXCOL && pDoc->ColHidden(nNextCol, nTab) ) ++nNextCol; - sal_Bool bNextCell = ( nNextCol <= MAXCOL ); + bool bNextCell = ( nNextCol <= MAXCOL ); if ( bNextCell ) nAvailable = ScViewData::ToPixel( pDoc->GetColWidth( nNextCol, nTab ), pViewData->GetPPTX() ); @@ -1348,7 +1348,7 @@ void ScGridWindow::GetSelectionRects( ::std::vector< Rectangle >& rPixelRects ) ScDocument* pDoc = pViewData->GetDocument(); SCTAB nTab = pViewData->GetTabNo(); - sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); long nLayoutSign = bLayoutRTL ? -1 : 1; if ( !aMultiMark.IsMultiMarked() ) return; @@ -1362,7 +1362,7 @@ void ScGridWindow::GetSelectionRects( ::std::vector< Rectangle >& rPixelRects ) PutInOrder( nX1, nX2 ); PutInOrder( nY1, nY2 ); - sal_Bool bTestMerge = sal_True; + bool bTestMerge = true; bool bRepeat = true; SCCOL nTestX2 = nX2; @@ -1397,30 +1397,30 @@ void ScGridWindow::GetSelectionRects( ::std::vector< Rectangle >& rPixelRects ) Point aScrPos = pViewData->GetScrPos( nX1, nY1, eWhich ); long nScrY = aScrPos.Y(); - sal_Bool bWasHidden = false; + bool bWasHidden = false; for (SCROW nY=nY1; nY<=nY2; nY++) { - sal_Bool bFirstRow = ( nY == nPosY ); // first visible row? - sal_Bool bDoHidden = false; // versteckte nachholen ? + bool bFirstRow = ( nY == nPosY ); // first visible row? + bool bDoHidden = false; // versteckte nachholen ? sal_uInt16 nHeightTwips = pDoc->GetRowHeight( nY,nTab ); - sal_Bool bDoRow = ( nHeightTwips != 0 ); + bool bDoRow = ( nHeightTwips != 0 ); if (bDoRow) { if (bTestMerge) if (bWasHidden) // auf versteckte zusammengefasste testen { - bDoHidden = sal_True; - bDoRow = sal_True; + bDoHidden = true; + bDoRow = true; } bWasHidden = false; } else { - bWasHidden = sal_True; + bWasHidden = true; if (bTestMerge) if (nY==nY2) - bDoRow = sal_True; // letzte Zeile aus Block + bDoRow = true; // letzte Zeile aus Block } if ( bDoRow ) diff --git a/sc/source/ui/view/gridwin5.cxx b/sc/source/ui/view/gridwin5.cxx index fba79cc17e2a..404ca59652d8 100644 --- a/sc/source/ui/view/gridwin5.cxx +++ b/sc/source/ui/view/gridwin5.cxx @@ -247,10 +247,10 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt) OUString aCtrlClickHlinkStr = ScGlobal::GetRscString( STR_CTRLCLICKHYPERLINK ); //Global string STR_CLICKHYPERLINK i.e, "click to open hyperlink" OUString aClickHlinkStr = ScGlobal::GetRscString( STR_CLICKHYPERLINK ); - sal_Bool bDone = false; - sal_Bool bHelpEnabled = ( rHEvt.GetMode() & ( HELPMODE_BALLOON | HELPMODE_QUICK ) ) != 0; + bool bDone = false; + bool bHelpEnabled = ( rHEvt.GetMode() & ( HELPMODE_BALLOON | HELPMODE_QUICK ) ) != 0; SdrView* pDrView = pViewData->GetScDrawView(); - sal_Bool bDrawTextEdit = false; + bool bDrawTextEdit = false; if (pDrView) bDrawTextEdit = pDrView->IsTextEdit(); // notes or change tracking @@ -264,7 +264,7 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt) if ( ShowNoteMarker( nPosX, nPosY, false ) ) { Window::RequestHelp( rHEvt ); // alte Tip/Balloon ausschalten - bDone = sal_True; + bDone = true; } } @@ -406,7 +406,7 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt) else if ( rHEvt.GetMode() & HELPMODE_QUICK ) Help::ShowQuickHelp(this,aScreenRect, aHelpText); - bDone = sal_True; + bDone = true; } } @@ -424,7 +424,7 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt) if ( nMouseStatus == SC_GM_TABDOWN && pViewData->GetRefType() == SC_REFTYPE_FILL && Help::IsQuickHelpEnabled() ) - bDone = sal_True; + bDone = true; if (!bDone) Window::RequestHelp( rHEvt ); diff --git a/sc/source/ui/view/invmerge.cxx b/sc/source/ui/view/invmerge.cxx index 432c2382fbfe..01f960010ac2 100644 --- a/sc/source/ui/view/invmerge.cxx +++ b/sc/source/ui/view/invmerge.cxx @@ -137,7 +137,7 @@ void ScInvertMerger::AddRect( const Rectangle& rRect ) } else { - sal_Bool bDone = false; + bool bDone = false; if ( aJustified.Top() == aLineRect.Top() && aJustified.Bottom() == aLineRect.Bottom() ) { @@ -145,12 +145,12 @@ void ScInvertMerger::AddRect( const Rectangle& rRect ) if ( aJustified.Left() == aLineRect.Right() + 1 ) { aLineRect.Right() = aJustified.Right(); - bDone = sal_True; + bDone = true; } else if ( aJustified.Right() + 1 == aLineRect.Left() ) // for RTL layout { aLineRect.Left() = aJustified.Left(); - bDone = sal_True; + bDone = true; } } if (!bDone) diff --git a/sc/source/ui/view/olinewin.cxx b/sc/source/ui/view/olinewin.cxx index d65234babe83..162271b7d738 100644 --- a/sc/source/ui/view/olinewin.cxx +++ b/sc/source/ui/view/olinewin.cxx @@ -79,7 +79,7 @@ ScOutlineWindow::~ScOutlineWindow() void ScOutlineWindow::SetHeaderSize( long nNewSize ) { - sal_Bool bLayoutRTL = GetDoc().IsLayoutRTL( GetTab() ); + bool bLayoutRTL = GetDoc().IsLayoutRTL( GetTab() ); mbMirrorEntries = bLayoutRTL && mbHoriz; mbMirrorLevels = bLayoutRTL && !mbHoriz; diff --git a/sc/source/ui/view/output3.cxx b/sc/source/ui/view/output3.cxx index 67ce197b3eb2..f949c9dd90c1 100644 --- a/sc/source/ui/view/output3.cxx +++ b/sc/source/ui/view/output3.cxx @@ -223,7 +223,7 @@ void ScOutputData::DrawSelectiveObjects(const sal_uInt16 nLayer) // #109985# void ScOutputData::DrawingSingle(const sal_uInt16 nLayer) { - sal_Bool bHad = false; + bool bHad = false; SCSIZE nArrY; for (nArrY=1; nArrY+1<nArrCount; nArrY++) { @@ -233,7 +233,7 @@ void ScOutputData::DrawingSingle(const sal_uInt16 nLayer) { if (!bHad) { - bHad = sal_True; + bHad = true; } } else if (bHad) diff --git a/sc/source/ui/view/pivotsh.cxx b/sc/source/ui/view/pivotsh.cxx index a094cffe620b..ee9fede3da41 100644 --- a/sc/source/ui/view/pivotsh.cxx +++ b/sc/source/ui/view/pivotsh.cxx @@ -137,7 +137,7 @@ void ScPivotShell::GetState( SfxItemSet& rSet ) { ScDocShell* pDocSh = pViewShell->GetViewData()->GetDocShell(); ScDocument* pDoc = pDocSh->GetDocument(); - sal_Bool bDisable = pDocSh->IsReadOnly() || pDoc->GetChangeTrack(); + bool bDisable = pDocSh->IsReadOnly() || pDoc->GetChangeTrack(); SfxWhichIter aIter(rSet); sal_uInt16 nWhich = aIter.FirstWhich(); diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx index e1a83495b307..64af102876be 100644 --- a/sc/source/ui/view/prevwsh.cxx +++ b/sc/source/ui/view/prevwsh.cxx @@ -420,7 +420,7 @@ IMPL_LINK (ScPreviewShell,ScrollHandler, ScrollBar* ,pScroll ) long nTotalPages = pPreview->GetTotalPages(); long nPageNo = 0; long nPerPageLength = 0; - sal_Bool bIsDivide = sal_True; + bool bIsDivide = true; if( nTotalPages ) nPerPageLength = nMaxRange / nTotalPages; @@ -435,7 +435,7 @@ IMPL_LINK (ScPreviewShell,ScrollHandler, ScrollBar* ,pScroll ) } } - sal_Bool bHoriz = ( pScroll == pHorScroll ); + bool bHoriz = ( pScroll == pHorScroll ); if( bHoriz ) pPreview->SetXOffset( nPos ); @@ -464,7 +464,7 @@ IMPL_LINK (ScPreviewShell,ScrollHandler, ScrollBar* ,pScroll ) } else if( nDelta > 0 ) { - sal_Bool bAllTested = pPreview->AllTested(); + bool bAllTested = pPreview->AllTested(); if ( nTotalPages && ( nPageNo < nTotalPages || !bAllTested ) ) pPreview->SetPageNo( nPageNo ); @@ -597,7 +597,7 @@ void ScPreviewShell::Execute( SfxRequest& rReq ) case SID_NEXT_TABLE: // Accelerator case SID_PREVIEW_NEXT: { - sal_Bool bAllTested = pPreview->AllTested(); + bool bAllTested = pPreview->AllTested(); long nPage = pPreview->GetPageNo(); long nTotal = pPreview->GetTotalPages(); if (nTotal && (nPage+1 < nTotal || !bAllTested)) @@ -629,7 +629,7 @@ void ScPreviewShell::Execute( SfxRequest& rReq ) case FID_SCALE: { sal_uInt16 nZoom = 100; - sal_Bool bCancel = false; + bool bCancel = false; eZoom = SVX_ZOOM_PERCENT; @@ -713,7 +713,7 @@ void ScPreviewShell::Execute( SfxRequest& rReq ) break; case SID_PREVIEW_MARGIN: { - sal_Bool bMargin = pPreview->GetPageMargins(); + bool bMargin = pPreview->GetPageMargins(); pPreview->SetPageMargins( !bMargin ); pPreview->Invalidate(); rReq.Done(); @@ -791,7 +791,7 @@ void ScPreviewShell::GetState( SfxItemSet& rSet ) long nPage = pPreview->GetPageNo(); long nTotal = pPreview->GetTotalPages(); sal_uInt16 nZoom = pPreview->GetZoom(); - sal_Bool bAllTested = pPreview->AllTested(); + bool bAllTested = pPreview->AllTested(); SfxWhichIter aIter(rSet); sal_uInt16 nWhich = aIter.FirstWhich(); @@ -913,7 +913,7 @@ void ScPreviewShell::FillFieldData( ScHeaderFieldData& rData ) rData.aShortDocName = rData.aLongDocName = rData.aTitle; rData.nPageNo = pPreview->GetPageNo() + 1; - sal_Bool bAllTested = pPreview->AllTested(); + bool bAllTested = pPreview->AllTested(); if (bAllTested) rData.nTotalPages = pPreview->GetTotalPages(); else diff --git a/sc/source/ui/view/prevwsh2.cxx b/sc/source/ui/view/prevwsh2.cxx index 5478ec25bfb6..bc8b5f2fc43b 100644 --- a/sc/source/ui/view/prevwsh2.cxx +++ b/sc/source/ui/view/prevwsh2.cxx @@ -30,7 +30,7 @@ void ScPreviewShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) { - sal_Bool bDataChanged = false; + bool bDataChanged = false; if (rHint.ISA(SfxSimpleHint)) { @@ -39,7 +39,7 @@ void ScPreviewShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) { case FID_DATACHANGED: case SID_SCPRINTOPTIONS: - bDataChanged = sal_True; + bDataChanged = true; break; case SC_HINT_DRWLAYER_NEW: { @@ -56,14 +56,14 @@ void ScPreviewShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) { sal_uInt16 nParts = ((const ScPaintHint&)rHint).GetParts(); if (nParts & ( PAINT_GRID | PAINT_LEFT | PAINT_TOP | PAINT_SIZE )) - bDataChanged = sal_True; + bDataChanged = true; } } else if (rHint.ISA(SdrHint)) { // SdrHints are no longer used for invalidating, thus react on objectchange instead if(HINT_OBJCHG == ((const SdrHint&)rHint).GetKind()) - bDataChanged = sal_True; + bDataChanged = true; } if (bDataChanged) diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx index 8875b360a452..b02984496df5 100644 --- a/sc/source/ui/view/tabcont.cxx +++ b/sc/source/ui/view/tabcont.cxx @@ -265,7 +265,7 @@ void ScTabControl::Select() // InputEnterHandler nur wenn nicht Referenzeingabe - sal_Bool bRefMode = pScMod->IsFormulaMode(); + bool bRefMode = pScMod->IsFormulaMode(); if (!bRefMode) pScMod->InputEnterHandler(); @@ -326,7 +326,7 @@ void ScTabControl::UpdateStatus() { ScDocument* pDoc = pViewData->GetDocument(); ScMarkData& rMark = pViewData->GetMarkData(); - sal_Bool bActive = pViewData->IsActive(); + bool bActive = pViewData->IsActive(); SCTAB nCount = pDoc->GetTableCount(); SCTAB i; @@ -334,7 +334,7 @@ void ScTabControl::UpdateStatus() SCTAB nMaxCnt = std::max( nCount, static_cast<SCTAB>(GetMaxId()) ); Color aTabBgColor; - sal_Bool bModified = false; // Tabellen-Namen + bool bModified = false; // Tabellen-Namen for (i=0; i<nMaxCnt && !bModified; i++) { if (pDoc->IsVisible(i)) @@ -348,7 +348,7 @@ void ScTabControl::UpdateStatus() } if ( !aString.equals(GetPageText(static_cast<sal_uInt16>(i)+1)) || (GetTabBgColor(static_cast<sal_uInt16>(i)+1) != aTabBgColor) ) - bModified = sal_True; + bModified = true; } if (bModified) @@ -380,7 +380,7 @@ void ScTabControl::UpdateStatus() bModified = false; // Selektion for (i=0; i<nMaxCnt && !bModified; i++) if ( rMark.GetTableSelect(i) != (bool) IsPageSelected(static_cast<sal_uInt16>(i)+1) ) - bModified = sal_True; + bModified = true; // #i99576# the following loop is mis-optimized on unxsoli4 and the reason // why this file is in NOOPTFILES. @@ -403,7 +403,7 @@ void ScTabControl::SwitchToPageId(sal_uInt16 nId) { if (nId) { - sal_Bool bAlreadySelected = IsPageSelected( nId ); + bool bAlreadySelected = IsPageSelected( nId ); //make the clicked page the current one SetCurPageId( nId ); //change the selection when the current one is not already @@ -423,7 +423,7 @@ void ScTabControl::Command( const CommandEvent& rCEvt ) { ScModule* pScMod = SC_MOD(); ScTabViewShell* pViewSh = pViewData->GetViewShell(); - sal_Bool bDisable = pScMod->IsFormulaMode() || pScMod->IsModalMode(); + bool bDisable = pScMod->IsFormulaMode() || pScMod->IsModalMode(); // ViewFrame erstmal aktivieren (Bug 19493): pViewSh->SetActive(); @@ -452,7 +452,7 @@ void ScTabControl::Command( const CommandEvent& rCEvt ) void ScTabControl::StartDrag( sal_Int8 /* nAction */, const Point& rPosPixel ) { ScModule* pScMod = SC_MOD(); - sal_Bool bDisable = pScMod->IsFormulaMode() || pScMod->IsModalMode(); + bool bDisable = pScMod->IsFormulaMode() || pScMod->IsModalMode(); if (!bDisable) { @@ -598,7 +598,7 @@ long ScTabControl::AllowRenaming() { SCTAB nTab = nId - 1; OUString aNewName = GetEditText(); - sal_Bool bDone = pViewSh->RenameTable( aNewName, nTab ); + bool bDone = pViewSh->RenameTable( aNewName, nTab ); if ( bDone ) nRet = TABBAR_RENAMING_YES; else if ( bErrorShown ) diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx index 578d859dd0a3..0541d05e46e0 100644 --- a/sc/source/ui/view/tabview.cxx +++ b/sc/source/ui/view/tabview.cxx @@ -764,12 +764,12 @@ void ScTabView::RepeatResize( bool bUpdateFix ) void ScTabView::GetBorderSize( SvBorder& rBorder, const Size& /* rSize */ ) { - sal_Bool bScrollBars = aViewData.IsVScrollMode(); - sal_Bool bHeaders = aViewData.IsHeaderMode(); - sal_Bool bOutlMode = aViewData.IsOutlineMode(); - sal_Bool bHOutline = bOutlMode && lcl_HasColOutline(aViewData); - sal_Bool bVOutline = bOutlMode && lcl_HasRowOutline(aViewData); - sal_Bool bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() ); + bool bScrollBars = aViewData.IsVScrollMode(); + bool bHeaders = aViewData.IsHeaderMode(); + bool bOutlMode = aViewData.IsOutlineMode(); + bool bHOutline = bOutlMode && lcl_HasColOutline(aViewData); + bool bVOutline = bOutlMode && lcl_HasRowOutline(aViewData); + bool bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() ); rBorder = SvBorder(); @@ -907,10 +907,10 @@ Point ScTabView::GetGridOffset() const // Groessen hier wie in DoResize - sal_Bool bHeaders = aViewData.IsHeaderMode(); - sal_Bool bOutlMode = aViewData.IsOutlineMode(); - sal_Bool bHOutline = bOutlMode && lcl_HasColOutline(aViewData); - sal_Bool bVOutline = bOutlMode && lcl_HasRowOutline(aViewData); + bool bHeaders = aViewData.IsHeaderMode(); + bool bOutlMode = aViewData.IsOutlineMode(); + bool bHOutline = bOutlMode && lcl_HasColOutline(aViewData); + bool bVOutline = bOutlMode && lcl_HasRowOutline(aViewData); // Outline-Controls if (bVOutline && pRowOutline[SC_SPLIT_BOTTOM]) @@ -1135,7 +1135,7 @@ IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll ) if (nDelta) { - sal_Bool bUpdate = ( eType != SCROLL_DRAG ); // bei Drag die Ranges nicht aendern + bool bUpdate = ( eType != SCROLL_DRAG ); // bei Drag die Ranges nicht aendern if ( bHoriz ) ScrollX( nDelta, (pScroll == &aHScrollLeft) ? SC_SPLIT_LEFT : SC_SPLIT_RIGHT, bUpdate ); else @@ -1403,7 +1403,7 @@ void ScTabView::UpdateHeaderWidth( const ScVSplitPos* pWhich, const SCROW* pPosY } } -inline void ShowHide( Window* pWin, sal_Bool bShow ) +inline void ShowHide( Window* pWin, bool bShow ) { OSL_ENSURE(pWin || !bShow, "Fenster ist nicht da"); if (pWin) @@ -1412,16 +1412,16 @@ inline void ShowHide( Window* pWin, sal_Bool bShow ) void ScTabView::UpdateShow() { - sal_Bool bHScrollMode = aViewData.IsHScrollMode(); - sal_Bool bVScrollMode = aViewData.IsVScrollMode(); - sal_Bool bTabMode = aViewData.IsTabMode(); - sal_Bool bOutlMode = aViewData.IsOutlineMode(); - sal_Bool bHOutline = bOutlMode && lcl_HasColOutline(aViewData); - sal_Bool bVOutline = bOutlMode && lcl_HasRowOutline(aViewData); - sal_Bool bHeader = aViewData.IsHeaderMode(); + bool bHScrollMode = aViewData.IsHScrollMode(); + bool bVScrollMode = aViewData.IsVScrollMode(); + bool bTabMode = aViewData.IsTabMode(); + bool bOutlMode = aViewData.IsOutlineMode(); + bool bHOutline = bOutlMode && lcl_HasColOutline(aViewData); + bool bVOutline = bOutlMode && lcl_HasRowOutline(aViewData); + bool bHeader = aViewData.IsHeaderMode(); - sal_Bool bShowH = ( aViewData.GetHSplitMode() != SC_SPLIT_NONE ); - sal_Bool bShowV = ( aViewData.GetVSplitMode() != SC_SPLIT_NONE ); + bool bShowH = ( aViewData.GetHSplitMode() != SC_SPLIT_NONE ); + bool bShowV = ( aViewData.GetVSplitMode() != SC_SPLIT_NONE ); if ( aViewData.GetDocShell()->IsPreview() ) bHScrollMode = bVScrollMode = bTabMode = bHeader = bOutlMode = bHOutline = bVOutline = false; @@ -1533,7 +1533,7 @@ void ScTabView::DoHSplit(long nSplitPos) // nSplitPos is the real pixel position on the frame window, // mirroring for RTL has to be done here. - sal_Bool bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() ); + bool bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() ); if ( bLayoutRTL ) nSplitPos = pFrameWin->GetOutputSizePixel().Width() - nSplitPos - 1; @@ -1715,7 +1715,7 @@ Point ScTabView::GetChartInsertPos( const Size& rSize, const ScRange& rCellRange ScDocument* pDoc = aViewData.GetDocument(); SCTAB nTab = aViewData.GetTabNo(); - sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); long nLayoutSign = bLayoutRTL ? -1 : 1; long nDocX = (long)( (double) pDoc->GetColOffset( MAXCOL + 1, nTab ) * HMM_PER_TWIPS ) * nLayoutSign; @@ -1833,7 +1833,7 @@ Point ScTabView::GetChartDialogPos( const Size& rDialogSize, const Rectangle& rL ScDocument* pDoc = aViewData.GetDocument(); SCTAB nTab = aViewData.GetTabNo(); - sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); bool bCenterHor = false; @@ -1914,7 +1914,7 @@ Point ScTabView::GetMousePosPixel() return aPos; } -static sal_Bool lcl_MouseIsOverWin( const Point& rScreenPosPixel, Window* pWin ) +static bool lcl_MouseIsOverWin( const Point& rScreenPosPixel, Window* pWin ) { if (pWin) { @@ -1925,18 +1925,18 @@ static sal_Bool lcl_MouseIsOverWin( const Point& rScreenPosPixel, Window* pWin ) Size aWinSize = pWin->GetOutputSizePixel(); if ( aRel.X() >= 0 && aRel.X() < aWinSize.Width() + SPLIT_HANDLE_SIZE && aRel.Y() >= 0 && aRel.Y() < aWinSize.Height() + SPLIT_HANDLE_SIZE ) - return sal_True; + return true; } return false; } void ScTabView::SnapSplitPos( Point& rScreenPosPixel ) { - sal_Bool bOverWin = false; + bool bOverWin = false; sal_uInt16 i; for (i=0; i<4; i++) if (lcl_MouseIsOverWin(rScreenPosPixel,pGridWin[i])) - bOverWin = sal_True; + bOverWin = true; if (!bOverWin) return; diff --git a/sc/source/ui/view/tabview4.cxx b/sc/source/ui/view/tabview4.cxx index 4f1ae9f74dbf..e5370806c354 100644 --- a/sc/source/ui/view/tabview4.cxx +++ b/sc/source/ui/view/tabview4.cxx @@ -48,7 +48,7 @@ void ScTabView::HideTip() void ScTabView::ShowRefTip() { - sal_Bool bDone = false; + bool bDone = false; if ( aViewData.GetRefType() == SC_REFTYPE_REF && Help::IsQuickHelpEnabled() ) { SCCOL nStartX = aViewData.GetRefStartX(); @@ -57,8 +57,8 @@ void ScTabView::ShowRefTip() SCROW nEndY = aViewData.GetRefEndY(); if ( nEndX != nStartX || nEndY != nStartY ) // nicht fuer einzelne Zelle { - sal_Bool bLeft = ( nEndX < nStartX ); - sal_Bool bTop = ( nEndY < nStartY ); + bool bLeft = ( nEndX < nStartX ); + bool bTop = ( nEndY < nStartY ); PutInOrder( nStartX, nEndX ); PutInOrder( nStartY, nEndY ); SCCOL nCols = nEndX+1-nStartX; @@ -95,7 +95,7 @@ void ScTabView::ShowRefTip() HideTip(); nTipVisible = Help::ShowTip( pWin, aRect, aHelp, nFlags ); - bDone = sal_True; + bDone = true; } } } @@ -156,7 +156,7 @@ void ScTabView::DoneRefMode( bool bContinue ) if ( aViewData.GetRefType() == SC_REFTYPE_REF && bContinue ) SC_MOD()->AddRefEntry(); - sal_Bool bWasRef = aViewData.IsRefMode(); + bool bWasRef = aViewData.IsRefMode(); aViewData.SetRefMode( false, SC_REFTYPE_NONE ); HideTip(); @@ -361,8 +361,8 @@ static long lcl_GetScrollRange( SCCOLROW nDocEnd, SCCOLROW nPos, SCCOLROW nVis, void ScTabView::UpdateScrollBars() { long nDiff; - sal_Bool bTop = ( aViewData.GetVSplitMode() != SC_SPLIT_NONE ); - sal_Bool bRight = ( aViewData.GetHSplitMode() != SC_SPLIT_NONE ); + bool bTop = ( aViewData.GetVSplitMode() != SC_SPLIT_NONE ); + bool bRight = ( aViewData.GetHSplitMode() != SC_SPLIT_NONE ); ScDocument* pDoc = aViewData.GetDocument(); SCTAB nTab = aViewData.GetTabNo(); bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); diff --git a/sc/source/ui/view/tabview5.cxx b/sc/source/ui/view/tabview5.cxx index 551497636af7..4fea5a32da98 100644 --- a/sc/source/ui/view/tabview5.cxx +++ b/sc/source/ui/view/tabview5.cxx @@ -304,10 +304,10 @@ void ScTabView::UpdateLayerLocks() if (pDrawView) { SCTAB nTab = aViewData.GetTabNo(); - sal_Bool bEx = aViewData.GetViewShell()->IsDrawSelMode(); - sal_Bool bProt = aViewData.GetDocument()->IsTabProtected( nTab ) || + bool bEx = aViewData.GetViewShell()->IsDrawSelMode(); + bool bProt = aViewData.GetDocument()->IsTabProtected( nTab ) || aViewData.GetSfxDocShell()->IsReadOnly(); - sal_Bool bShared = aViewData.GetDocShell()->IsDocShared(); + bool bShared = aViewData.GetDocShell()->IsDocShared(); SdrLayer* pLayer; SdrLayerAdmin& rAdmin = pDrawView->GetModel()->GetLayerAdmin(); @@ -462,9 +462,9 @@ void ScTabView::DrawMarkRect( const Rectangle& rRect ) if ( pGridWin[i] && pGridWin[i]->IsVisible() ) { RasterOp aROp = pGridWin[i]->GetRasterOp(); - sal_Bool bHasLine = pGridWin[i]->IsLineColor(); + bool bHasLine = pGridWin[i]->IsLineColor(); Color aLine = pGridWin[i]->GetLineColor(); - sal_Bool bHasFill = pGridWin[i]->IsFillColor(); + bool bHasFill = pGridWin[i]->IsFillColor(); Color aFill = pGridWin[i]->GetFillColor(); pGridWin[i]->SetRasterOp( ROP_INVERT ); diff --git a/sc/source/ui/view/tabvwsh9.cxx b/sc/source/ui/view/tabvwsh9.cxx index 0718edd0f795..712520ff0360 100644 --- a/sc/source/ui/view/tabvwsh9.cxx +++ b/sc/source/ui/view/tabvwsh9.cxx @@ -179,15 +179,15 @@ void ScTabViewShell::GetImageMapState( SfxItemSet& rSet ) { // Disabled wird nicht mehr... - sal_Bool bThere = false; + bool bThere = false; SfxViewFrame* pThisFrame = GetViewFrame(); sal_uInt16 nId = ScIMapChildWindowId(); if ( pThisFrame->KnowsChildWindow(nId) ) if ( pThisFrame->HasChildWindow(nId) ) - bThere = sal_True; + bThere = true; ObjectSelectionType eType=GetCurObjectSelectionType(); - sal_Bool bEnable=(eType==OST_OleObject) ||(eType==OST_Graphic); + bool bEnable=(eType==OST_OleObject) ||(eType==OST_Graphic); if(!bThere && !bEnable) { rSet.DisableItem( nWhich ); @@ -201,7 +201,7 @@ void ScTabViewShell::GetImageMapState( SfxItemSet& rSet ) case SID_IMAP_EXEC: { - sal_Bool bDisable = sal_True; + bool bDisable = true; SdrView* pDrView = GetSdrView(); if ( pDrView ) diff --git a/sc/source/ui/view/tabvwshe.cxx b/sc/source/ui/view/tabvwshe.cxx index 7072292e1142..545db9f8d965 100644 --- a/sc/source/ui/view/tabvwshe.cxx +++ b/sc/source/ui/view/tabvwshe.cxx @@ -120,7 +120,7 @@ void ScTabViewShell::InsertURL( const OUString& rName, const OUString& rURL, con sal_uInt16 nMode ) { SvxLinkInsertMode eMode = (SvxLinkInsertMode) nMode; - sal_Bool bAsText = ( eMode != HLINK_BUTTON ); // Default ist jetzt Text + bool bAsText = ( eMode != HLINK_BUTTON ); // Default ist jetzt Text if ( bAsText ) { @@ -171,7 +171,7 @@ void ScTabViewShell::InsertURLField( const OUString& rName, const OUString& rURL ScModule* pScMod = SC_MOD(); ScInputHandler* pHdl = pScMod->GetInputHdl( pViewData->GetViewShell() ); - sal_Bool bSelectFirst = false; + bool bSelectFirst = false; if ( !pScMod->IsEditMode() ) { if ( !SelectionEditable() ) diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx index 84c77e5c4af8..bf9de042ca02 100644 --- a/sc/source/ui/view/tabvwshf.cxx +++ b/sc/source/ui/view/tabvwshf.cxx @@ -74,7 +74,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) OUString aName; pDoc->GetName( nCurrentTab, aName ); - sal_Bool bVisible=sal_True; + bool bVisible=true; if( pReqArgs != NULL ) { const SfxPoolItem* pItem; @@ -135,7 +135,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) OSL_ENSURE(pDlg, "Dialog create fail!"); OUString aTabName; - sal_Bool bFirst = sal_True; + bool bFirst = true; for ( SCTAB i=0; i != nTabCount; i++ ) { if (!pDoc->IsVisible(i)) @@ -175,7 +175,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) if ( pReqArgs != NULL ) // von Basic { - sal_Bool bOk = false; + bool bOk = false; const SfxPoolItem* pTabItem; const SfxPoolItem* pNameItem; OUString aName; @@ -215,7 +215,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) nTabs.push_back( static_cast<SCTAB>(n) ); pStr = pDlg->GetNextTable( &n ); } - sal_Bool bLink = pDlg->GetTablesAsLink(); + bool bLink = pDlg->GetTablesAsLink(); if (!nTabs.empty()) { if(pDlg->IsTableBefore()) @@ -322,7 +322,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) if( pReqArgs != NULL ) { - sal_Bool bDone = false; + bool bDone = false; const SfxPoolItem* pItem; OUString aName; @@ -350,7 +350,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) else { sal_uInt16 nRet = RET_OK; - sal_Bool bDone = false; + bool bDone = false; OUString aErrMsg ( ScGlobal::GetRscString( STR_INVALIDTABNAME ) ); OUString aName; OUString aDlgTitle; @@ -433,10 +433,10 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) if ( pDoc->GetChangeTrack() != NULL ) break; // bei aktiviertem ChangeTracking kein TabMove - sal_Bool bDoIt = false; + bool bDoIt = false; sal_uInt16 nDoc = 0; SCTAB nTab = pViewData->GetTabNo(); - sal_Bool bCpy = false; + bool bCpy = false; OUString aDocName; OUString aTabName; @@ -488,7 +488,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) else // Kein Dokumentname -> neues Dokument { nDoc = SC_DOC_NEW; - bDoIt = sal_True; + bDoIt = true; } if ( bDoIt && nTab >= nTableCount ) // ggf. anhaengen @@ -569,7 +569,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) { // Parameter war ueberfluessig, weil die Methode an der Table haengt - sal_Bool bDoIt = rReq.IsAPI(); + bool bDoIt = rReq.IsAPI(); if( !bDoIt ) { // wenn's nicht von Basic kommt, nochmal nachfragen: @@ -611,7 +611,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) { ScDocShell* pDocSh = pViewData->GetDocShell(); ScDocFunc &rFunc = pDocSh->GetDocFunc(); - sal_Bool bSet = !pDoc->IsLayoutRTL( nCurrentTab ); + bool bSet = !pDoc->IsLayoutRTL( nCurrentTab ); const ScMarkData& rMark = pViewData->GetMarkData(); if ( rMark.GetSelectCount() != 0 ) @@ -660,7 +660,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) if( pReqArgs != NULL ) { - sal_Bool bDone = false; + bool bDone = false; const SfxPoolItem* pItem; Color aColor; if( pReqArgs->HasItem( FN_PARAM_1, &pItem ) ) @@ -697,7 +697,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) else { sal_uInt16 nRet = RET_OK; /// temp - sal_Bool bDone = false; /// temp + bool bDone = false; /// temp Color aTabBgColor; aTabBgColor = pDoc->GetTabBgColor( nCurrentTab ); @@ -818,10 +818,10 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) case FID_TABLE_SHOW: { - sal_Bool bHasHidden = false; + bool bHasHidden = false; for ( SCTAB i=0; i < nTabCount && !bHasHidden; i++ ) if (!pDoc->IsVisible(i)) - bHasHidden = sal_True; + bHasHidden = true; if ( !bHasHidden || pDoc->IsDocProtected() || nTabSelCount > 1 ) rSet.DisableItem( nWhich ); } diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx index dbb9bc2c800d..7df4869a0f2a 100644 --- a/sc/source/ui/view/viewdata.cxx +++ b/sc/source/ui/view/viewdata.cxx @@ -153,7 +153,7 @@ void ScViewDataTable::WriteUserDataSequence(uno::Sequence <beans::PropertyValue> pSettings[SC_TABLE_PAGE_VIEW_ZOOM_VALUE].Value <<= nPageZoomValue; pSettings[SC_TABLE_SHOWGRID].Name = OUString(SC_UNO_SHOWGRID); - pSettings[SC_TABLE_SHOWGRID].Value <<= static_cast<sal_Bool>(bShowGrid); + pSettings[SC_TABLE_SHOWGRID].Value <<= bShowGrid; } } diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx index 41a2109d328e..b1c3fc408217 100644 --- a/sc/source/ui/view/viewfunc.cxx +++ b/sc/source/ui/view/viewfunc.cxx @@ -264,7 +264,7 @@ bool ScViewFunc::SelectionEditable( bool* pOnlyNotBecauseOfMatrix /* = NULL */ ) #define LRU_MAX 10 #endif -static sal_Bool lcl_FunctionKnown( sal_uInt16 nOpCode ) +static bool lcl_FunctionKnown( sal_uInt16 nOpCode ) { const ScFunctionList* pFuncList = ScGlobal::GetStarCalcFunctionList(); if ( pFuncList ) @@ -272,12 +272,12 @@ static sal_Bool lcl_FunctionKnown( sal_uInt16 nOpCode ) sal_uLong nCount = pFuncList->GetCount(); for (sal_uLong i=0; i<nCount; i++) if ( pFuncList->GetFunction(i)->nFIndex == nOpCode ) - return sal_True; + return true; } return false; } -static sal_Bool lcl_AddFunction( ScAppOptions& rAppOpt, sal_uInt16 nOpCode ) +static bool lcl_AddFunction( ScAppOptions& rAppOpt, sal_uInt16 nOpCode ) { sal_uInt16 nOldCount = rAppOpt.GetLRUFuncListCount(); sal_uInt16* pOldList = rAppOpt.GetLRUFuncList(); @@ -294,7 +294,7 @@ static sal_Bool lcl_AddFunction( ScAppOptions& rAppOpt, sal_uInt16 nOpCode ) pOldList[nCopy] = pOldList[nCopy-1]; pOldList[0] = nOpCode; - return sal_True; // list has changed + return true; // list has changed } if ( !lcl_FunctionKnown( nOpCode ) ) @@ -307,7 +307,7 @@ static sal_Bool lcl_AddFunction( ScAppOptions& rAppOpt, sal_uInt16 nOpCode ) nNewList[nPos] = pOldList[nPos-1]; rAppOpt.SetLRUFuncList( nNewList, nNewCount ); - return sal_True; // list has changed + return true; // list has changed } namespace HelperNotifyChanges |