diff options
Diffstat (limited to 'sc')
27 files changed, 751 insertions, 751 deletions
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index 0d28935dd6d8..785a24665fcb 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -342,64 +342,64 @@ private: ScLkUpdMode eLinkMode; - sal_Bool bAutoCalc; // calculate automatically - sal_Bool bAutoCalcShellDisabled; // in/from/for ScDocShell disabled + bool bAutoCalc; // calculate automatically + bool bAutoCalcShellDisabled; // in/from/for ScDocShell disabled // are there ForcedFormulas which have to be calculated // in interaction with ScDocShell SetDocumentModified, // AutoCalcShellDisabled and TrackFormulas - sal_Bool bForcedFormulaPending; - sal_Bool bCalculatingFormulaTree; - sal_Bool bIsClip; - sal_Bool bIsUndo; - sal_Bool bIsVisible; // set from view ctor + bool bForcedFormulaPending; + bool bCalculatingFormulaTree; + bool bIsClip; + bool bIsUndo; + bool bIsVisible; // set from view ctor - sal_Bool bIsEmbedded; // display/adjust Embedded area? + bool bIsEmbedded; // display/adjust Embedded area? // no SetDirty for ScFormulaCell::CompileTokenArray but at the end of // ScDocument::CompileAll[WithFormats], CopyScenario, CopyBlockFromClip - sal_Bool bNoSetDirty; + bool bNoSetDirty; // no broadcast, construct no listener during insert from a different // Doc (per filter or the like ), not until CompileAll / CalcAfterLoad - sal_Bool bInsertingFromOtherDoc; + bool bInsertingFromOtherDoc; bool bLoadingMedium; bool bImportingXML; // special handling of formula text - sal_Bool bXMLFromWrapper; // distinguish ScXMLImportWrapper from external component - sal_Bool bCalcingAfterLoad; // in CalcAfterLoad TRUE + bool bXMLFromWrapper; // distinguish ScXMLImportWrapper from external component + bool bCalcingAfterLoad; // in CalcAfterLoad TRUE // don't construct/destruct listeners temporarily - sal_Bool bNoListening; - sal_Bool bIdleDisabled; - sal_Bool bInLinkUpdate; // TableLink or AreaLink - sal_Bool bChartListenerCollectionNeedsUpdate; + bool bNoListening; + bool bIdleDisabled; + bool bInLinkUpdate; // TableLink or AreaLink + bool bChartListenerCollectionNeedsUpdate; // are/were there RC_FORCED formula cells in the document (if set once to TRUE then set forever) - sal_Bool bHasForcedFormulas; + bool bHasForcedFormulas; // is the Doc being destroyed? (no Notify-Tracking etc. needed anymore) - sal_Bool bInDtorClear; + bool bInDtorClear; // expand reference if insert column/row takes place at the border // of a reference // is fetched in each UpdateReference from InputOptions, // assigned, and restored at the end of UpdateReference - sal_Bool bExpandRefs; + bool bExpandRefs; // for detective update, is set for each change of a formula - sal_Bool bDetectiveDirty; + bool bDetectiveDirty; sal_uInt8 nMacroCallMode; // Macros per warning dialog disabled? - sal_Bool bHasMacroFunc; // valid only after loading + bool bHasMacroFunc; // valid only after loading sal_uInt8 nVisSpellState; sal_uInt8 nAsianCompression; sal_uInt8 nAsianKerning; - sal_Bool bSetDrawDefaults; + bool bSetDrawDefaults; - sal_Bool bPastingDrawFromOtherDoc; + bool bPastingDrawFromOtherDoc; sal_uInt8 nInDdeLinkUpdate; // originating DDE links (stacked bool) - sal_Bool bInUnoBroadcast; - sal_Bool bInUnoListenerCall; + bool bInUnoBroadcast; + bool bInUnoListenerCall; formula::FormulaGrammar::Grammar eGrammar; - mutable sal_Bool bStyleSheetUsageInvalid; + mutable bool bStyleSheetUsageInvalid; bool mbUndoEnabled; bool mbAdjustHeightEnabled; @@ -455,7 +455,7 @@ public: void SetConsolidateDlgData( const ScConsolidateParam* pData ); const ScConsolidateParam* GetConsolidateDlgData() const { return pConsolidateDlgData; } - void Clear( sal_Bool bFromDestructor = false ); + void Clear( bool bFromDestructor = false ); ScFieldEditEngine* CreateFieldEditEngine(); void DisposeFieldEditEngine(ScFieldEditEngine*& rpEditEngine); @@ -481,7 +481,7 @@ public: SC_DLLPUBLIC ScDBCollection* GetDBCollection() const; void SetDBCollection( ScDBCollection* pNewDBCollection, - sal_Bool bRemoveAutoFilter = false ); + bool bRemoveAutoFilter = false ); const ScDBData* GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, bool bStartOnly = false) const; ScDBData* GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, bool bStartOnly = false); const ScDBData* GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const; @@ -502,19 +502,19 @@ public: void EnsureGraphicNames(); SdrObject* GetObjectAtPoint( SCTAB nTab, const Point& rPos ); - sal_Bool HasChartAtPoint( SCTAB nTab, const Point& rPos, String* pName = NULL ); + bool HasChartAtPoint( SCTAB nTab, const Point& rPos, String* pName = NULL ); ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument > GetChartByName( const String& rChartName ); SC_DLLPUBLIC void GetChartRanges( const String& rChartName, ::std::vector< ScRangeList >& rRanges, ScDocument* pSheetNameDoc ); void SetChartRanges( const String& rChartName, const ::std::vector< ScRangeList >& rRanges ); void UpdateChartArea( const String& rChartName, const ScRange& rNewArea, - sal_Bool bColHeaders, sal_Bool bRowHeaders, sal_Bool bAdd ); + bool bColHeaders, bool bRowHeaders, bool bAdd ); void UpdateChartArea( const String& rChartName, const ScRangeListRef& rNewList, - sal_Bool bColHeaders, sal_Bool bRowHeaders, sal_Bool bAdd ); + bool bColHeaders, bool bRowHeaders, bool bAdd ); void GetOldChartParameters( const String& rName, - ScRangeList& rRanges, sal_Bool& rColHeaders, sal_Bool& rRowHeaders ); + ScRangeList& rRanges, bool& rColHeaders, bool& rRowHeaders ); ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedObject > FindOleObjectByName( const String& rName ); @@ -524,23 +524,23 @@ public: SCTAB GetVisibleTab() const { return nVisibleTab; } SC_DLLPUBLIC void SetVisibleTab(SCTAB nTab) { nVisibleTab = nTab; } - SC_DLLPUBLIC sal_Bool HasTable( SCTAB nTab ) const; + SC_DLLPUBLIC bool HasTable( SCTAB nTab ) const; SC_DLLPUBLIC bool GetName( SCTAB nTab, rtl::OUString& rName ) const; SC_DLLPUBLIC bool GetCodeName( SCTAB nTab, rtl::OUString& rName ) const; SC_DLLPUBLIC bool SetCodeName( SCTAB nTab, const rtl::OUString& rName ); SC_DLLPUBLIC bool GetTable( const rtl::OUString& rName, SCTAB& rTab ) const; - SC_DLLPUBLIC void SetAnonymousDBData(SCTAB nTab, ScDBData* pDBData); - SC_DLLPUBLIC ScDBData* GetAnonymousDBData(SCTAB nTab); + SC_DLLPUBLIC void SetAnonymousDBData(SCTAB nTab, ScDBData* pDBData); + SC_DLLPUBLIC ScDBData* GetAnonymousDBData(SCTAB nTab); SC_DLLPUBLIC inline SCTAB GetTableCount() const { return static_cast<SCTAB>(maTabs.size()); } SvNumberFormatterIndexTable* GetFormatExchangeList() const { return pFormatExchangeList; } SC_DLLPUBLIC ScDocProtection* GetDocProtection() const; - SC_DLLPUBLIC void SetDocProtection(const ScDocProtection* pProtect); - SC_DLLPUBLIC sal_Bool IsDocProtected() const; - sal_Bool IsDocEditable() const; - SC_DLLPUBLIC sal_Bool IsTabProtected( SCTAB nTab ) const; + SC_DLLPUBLIC void SetDocProtection(const ScDocProtection* pProtect); + SC_DLLPUBLIC bool IsDocProtected() const; + bool IsDocEditable() const; + SC_DLLPUBLIC bool IsTabProtected( SCTAB nTab ) const; SC_DLLPUBLIC ScTableProtection* GetTabProtection( SCTAB nTab ) const; SC_DLLPUBLIC void SetTabProtection(SCTAB nTab, const ScTableProtection* pProtect); void CopyTabProtection(SCTAB nTabSrc, SCTAB nTabDest); @@ -548,19 +548,19 @@ public: void LockTable(SCTAB nTab); void UnlockTable(SCTAB nTab); - sal_Bool IsBlockEditable( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, + bool IsBlockEditable( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, bool* pOnlyNotBecauseOfMatrix = NULL ) const; - sal_Bool IsSelectionEditable( const ScMarkData& rMark, + bool IsSelectionEditable( const ScMarkData& rMark, bool* pOnlyNotBecauseOfMatrix = NULL ) const; - sal_Bool HasSelectedBlockMatrixFragment( SCCOL nStartCol, SCROW nStartRow, + bool HasSelectedBlockMatrixFragment( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, const ScMarkData& rMark ) const; - sal_Bool HasSelectedBlockMatrixFragment( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTAB ) const; + bool HasSelectedBlockMatrixFragment( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTAB ) const; - sal_Bool GetMatrixFormulaRange( const ScAddress& rCellPos, ScRange& rMatrix ); + bool GetMatrixFormulaRange( const ScAddress& rCellPos, ScRange& rMatrix ); - sal_Bool IsEmbedded() const; + bool IsEmbedded() const; void GetEmbedded( ScRange& rRange ) const; void SetEmbedded( const ScRange& rRange ); void ResetEmbedded(); @@ -570,7 +570,7 @@ public: static SC_DLLPUBLIC bool ValidTabName( const String& rName ); - SC_DLLPUBLIC sal_Bool ValidNewTabName( const String& rName ) const; + SC_DLLPUBLIC bool ValidNewTabName( const String& rName ) const; SC_DLLPUBLIC bool ValidNewTabName( const std::vector<String>& rName ) const; SC_DLLPUBLIC void CreateValidTabName(String& rName) const; SC_DLLPUBLIC void CreateValidTabName(rtl::OUString& rName) const; @@ -578,35 +578,35 @@ public: void AppendTabOnLoad(const rtl::OUString& rName); - SC_DLLPUBLIC sal_Bool InsertTab( SCTAB nPos, const String& rName, - sal_Bool bExternalDocument = false ); + SC_DLLPUBLIC bool InsertTab( SCTAB nPos, const String& rName, + bool bExternalDocument = false ); SC_DLLPUBLIC bool InsertTabs( SCTAB nPos, const std::vector<rtl::OUString>& rNames, bool bExternalDocument = false, bool bNamesValid = false ); SC_DLLPUBLIC bool DeleteTabs( SCTAB nTab, SCTAB nSheets, ScDocument* pRefUndoDoc = NULL ); - SC_DLLPUBLIC sal_Bool DeleteTab( SCTAB nTab, ScDocument* pRefUndoDoc = NULL ); - SC_DLLPUBLIC sal_Bool RenameTab( SCTAB nTab, const String& rName, - sal_Bool bUpdateRef = sal_True, - sal_Bool bExternalDocument = false ); - sal_Bool MoveTab( SCTAB nOldPos, SCTAB nNewPos, ScProgress* pProgress = NULL ); - sal_Bool CopyTab( SCTAB nOldPos, SCTAB nNewPos, + SC_DLLPUBLIC bool DeleteTab( SCTAB nTab, ScDocument* pRefUndoDoc = NULL ); + SC_DLLPUBLIC bool RenameTab( SCTAB nTab, const String& rName, + bool bUpdateRef = true, + bool bExternalDocument = false ); + bool MoveTab( SCTAB nOldPos, SCTAB nNewPos, ScProgress* pProgress = NULL ); + bool CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pOnlyMarked = NULL ); SC_DLLPUBLIC sal_uLong TransferTab(ScDocument* pSrcDoc, SCTAB nSrcPos, SCTAB nDestPos, - sal_Bool bInsertNew = sal_True, - sal_Bool bResultsOnly = false ); + bool bInsertNew = true, + bool bResultsOnly = false ); SC_DLLPUBLIC void TransferDrawPage(ScDocument* pSrcDoc, SCTAB nSrcPos, SCTAB nDestPos); - SC_DLLPUBLIC void SetVisible( SCTAB nTab, sal_Bool bVisible ); - SC_DLLPUBLIC sal_Bool IsVisible( SCTAB nTab ) const; - sal_Bool IsStreamValid( SCTAB nTab ) const; - void SetStreamValid( SCTAB nTab, sal_Bool bSet, sal_Bool bIgnoreLock = false ); + SC_DLLPUBLIC void SetVisible( SCTAB nTab, bool bVisible ); + SC_DLLPUBLIC bool IsVisible( SCTAB nTab ) const; + bool IsStreamValid( SCTAB nTab ) const; + void SetStreamValid( SCTAB nTab, bool bSet, bool bIgnoreLock = false ); void LockStreamValid( bool bLock ); bool IsStreamValidLocked() const { return mbStreamValidLocked; } - sal_Bool IsPendingRowHeights( SCTAB nTab ) const; - void SetPendingRowHeights( SCTAB nTab, sal_Bool bSet ); - SC_DLLPUBLIC void SetLayoutRTL( SCTAB nTab, sal_Bool bRTL ); - SC_DLLPUBLIC sal_Bool IsLayoutRTL( SCTAB nTab ) const; - sal_Bool IsNegativePage( SCTAB nTab ) const; - SC_DLLPUBLIC void SetScenario( SCTAB nTab, sal_Bool bFlag ); - SC_DLLPUBLIC sal_Bool IsScenario( SCTAB nTab ) const; + bool IsPendingRowHeights( SCTAB nTab ) const; + void SetPendingRowHeights( SCTAB nTab, bool bSet ); + SC_DLLPUBLIC void SetLayoutRTL( SCTAB nTab, bool bRTL ); + SC_DLLPUBLIC bool IsLayoutRTL( SCTAB nTab ) const; + bool IsNegativePage( SCTAB nTab ) const; + SC_DLLPUBLIC void SetScenario( SCTAB nTab, bool bFlag ); + SC_DLLPUBLIC bool IsScenario( SCTAB nTab ) const; SC_DLLPUBLIC void GetScenarioData( SCTAB nTab, rtl::OUString& rComment, Color& rColor, sal_uInt16& rFlags ) const; SC_DLLPUBLIC void SetScenarioData( SCTAB nTab, const String& rComment, @@ -615,13 +615,13 @@ public: SC_DLLPUBLIC void SetTabBgColor( SCTAB nTab, const Color& rColor ); SC_DLLPUBLIC bool IsDefaultTabBgColor( SCTAB nTab ) const; void GetScenarioFlags( SCTAB nTab, sal_uInt16& rFlags ) const; - SC_DLLPUBLIC sal_Bool IsActiveScenario( SCTAB nTab ) const; - SC_DLLPUBLIC void SetActiveScenario( SCTAB nTab, sal_Bool bActive ); // only for Undo etc. + SC_DLLPUBLIC bool IsActiveScenario( SCTAB nTab ) const; + SC_DLLPUBLIC void SetActiveScenario( SCTAB nTab, bool bActive ); // only for Undo etc. SC_DLLPUBLIC formula::FormulaGrammar::AddressConvention GetAddressConvention() const; SC_DLLPUBLIC formula::FormulaGrammar::Grammar GetGrammar() const; void SetGrammar( formula::FormulaGrammar::Grammar eGram ); SC_DLLPUBLIC sal_uInt8 GetLinkMode( SCTAB nTab ) const; - sal_Bool IsLinked( SCTAB nTab ) const; + bool IsLinked( SCTAB nTab ) const; SC_DLLPUBLIC const String& GetLinkDoc( SCTAB nTab ) const; const String& GetLinkFlt( SCTAB nTab ) const; const String& GetLinkOpt( SCTAB nTab ) const; @@ -630,9 +630,9 @@ public: void SetLink( SCTAB nTab, sal_uInt8 nMode, const String& rDoc, const String& rFilter, const String& rOptions, const String& rTabName, sal_uLong nRefreshDelay ); - sal_Bool HasLink( const String& rDoc, + bool HasLink( const String& rDoc, const String& rFilter, const String& rOptions ) const; - SC_DLLPUBLIC sal_Bool LinkExternalTab( SCTAB& nTab, const String& aDocTab, + SC_DLLPUBLIC bool LinkExternalTab( SCTAB& nTab, const String& aDocTab, const String& aFileName, const String& aTabName ); @@ -655,14 +655,14 @@ public: // originating DDE links void IncInDdeLinkUpdate() { if ( nInDdeLinkUpdate < 255 ) ++nInDdeLinkUpdate; } void DecInDdeLinkUpdate() { if ( nInDdeLinkUpdate ) --nInDdeLinkUpdate; } - sal_Bool IsInDdeLinkUpdate() const { return nInDdeLinkUpdate != 0; } + bool IsInDdeLinkUpdate() const { return nInDdeLinkUpdate != 0; } SC_DLLPUBLIC void CopyDdeLinks( ScDocument* pDestDoc ) const; void DisconnectDdeLinks(); // for StarOne Api: sal_uInt16 GetDdeLinkCount() const; - sal_Bool UpdateDdeLink( const String& rAppl, const String& rTopic, const String& rItem ); + bool UpdateDdeLink( const String& rAppl, const String& rTopic, const String& rItem ); /** Tries to find a DDE link with the specified connection data. @param rnDdePos (out-param) Returns the index of the DDE link (does not include other links from link manager). @@ -709,7 +709,7 @@ public: sal_Int64 GetNewUnoId(); void AddUnoRefChange( sal_Int64 nId, const ScRangeList& rOldRanges ); - sal_Bool IsChart( const SdrObject* pObject ); + bool IsChart( const SdrObject* pObject ); SC_DLLPUBLIC void UpdateAllCharts(); void UpdateChartRef( UpdateRefMode eUpdateRefMode, @@ -722,8 +722,8 @@ public: void StartAnimations( SCTAB nTab, Window* pWin ); - sal_Bool HasBackgroundDraw( SCTAB nTab, const Rectangle& rMMRect ) const; - sal_Bool HasAnyDraw( SCTAB nTab, const Rectangle& rMMRect ) const; + bool HasBackgroundDraw( SCTAB nTab, const Rectangle& rMMRect ) const; + bool HasAnyDraw( SCTAB nTab, const Rectangle& rMMRect ) const; const ScSheetEvents* GetSheetEvents( SCTAB nTab ) const; void SetSheetEvents( SCTAB nTab, const ScSheetEvents* pNew ); @@ -731,28 +731,28 @@ public: bool HasAnySheetEventScript( sal_Int32 nEvent, bool bWithVbaEvents = false ) const; // on any sheet bool HasAnyCalcNotification() const; - sal_Bool HasCalcNotification( SCTAB nTab ) const; + bool HasCalcNotification( SCTAB nTab ) const; void SetCalcNotification( SCTAB nTab ); void ResetCalcNotifications(); - SC_DLLPUBLIC ScOutlineTable* GetOutlineTable( SCTAB nTab, sal_Bool bCreate = false ); - sal_Bool SetOutlineTable( SCTAB nTab, const ScOutlineTable* pNewOutline ); + SC_DLLPUBLIC ScOutlineTable* GetOutlineTable( SCTAB nTab, bool bCreate = false ); + bool SetOutlineTable( SCTAB nTab, const ScOutlineTable* pNewOutline ); void DoAutoOutline( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab ); - sal_Bool DoSubTotals( SCTAB nTab, ScSubTotalParam& rParam ); + bool DoSubTotals( SCTAB nTab, ScSubTotalParam& rParam ); void RemoveSubTotals( SCTAB nTab, ScSubTotalParam& rParam ); - sal_Bool TestRemoveSubTotals( SCTAB nTab, const ScSubTotalParam& rParam ); - sal_Bool HasSubTotalCells( const ScRange& rRange ); + bool TestRemoveSubTotals( SCTAB nTab, const ScSubTotalParam& rParam ); + bool HasSubTotalCells( const ScRange& rRange ); - SC_DLLPUBLIC void PutCell( const ScAddress&, ScBaseCell* pCell, sal_Bool bForceTab = false ); + SC_DLLPUBLIC void PutCell( const ScAddress&, ScBaseCell* pCell, bool bForceTab = false ); SC_DLLPUBLIC void PutCell( SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell* pCell, - sal_Bool bForceTab = false ); + bool bForceTab = false ); SC_DLLPUBLIC void PutCell(SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell* pCell, - sal_uLong nFormatIndex, sal_Bool bForceTab = false); + sal_uLong nFormatIndex, bool bForceTab = false); // return TRUE = number format is set - SC_DLLPUBLIC sal_Bool SetString( + SC_DLLPUBLIC bool SetString( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rString, ScSetStringParam* pParam = NULL ); SC_DLLPUBLIC void SetValue( SCCOL nCol, SCROW nRow, SCTAB nTab, const double& rVal ); @@ -794,13 +794,13 @@ public: SC_DLLPUBLIC void GetCell( SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell*& rpCell ) const; SC_DLLPUBLIC ScBaseCell* GetCell( const ScAddress& rPos ) const; - SC_DLLPUBLIC sal_Bool HasData( SCCOL nCol, SCROW nRow, SCTAB nTab ); - SC_DLLPUBLIC sal_Bool HasStringData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const; - SC_DLLPUBLIC sal_Bool HasValueData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const; - sal_Bool HasStringCells( const ScRange& rRange ) const; + SC_DLLPUBLIC bool HasData( SCCOL nCol, SCROW nRow, SCTAB nTab ); + SC_DLLPUBLIC bool HasStringData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const; + SC_DLLPUBLIC bool HasValueData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const; + bool HasStringCells( const ScRange& rRange ) const; /** Returns true, if there is any data to create a selection list for rPos. */ - sal_Bool HasSelectionData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const; + bool HasSelectionData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const; /** Returns the pointer to a cell note object at the passed cell address. */ SC_DLLPUBLIC ScPostIt* GetNote( const ScAddress& rPos ); @@ -821,19 +821,19 @@ public: void SetDrawPageSize(SCTAB nTab); - sal_Bool ExtendMergeSel( SCCOL nStartCol, SCROW nStartRow, + bool ExtendMergeSel( SCCOL nStartCol, SCROW nStartRow, SCCOL& rEndCol, SCROW& rEndRow, const ScMarkData& rMark, - sal_Bool bRefresh = false ); - SC_DLLPUBLIC sal_Bool ExtendMerge( SCCOL nStartCol, SCROW nStartRow, + bool bRefresh = false ); + SC_DLLPUBLIC bool ExtendMerge( SCCOL nStartCol, SCROW nStartRow, SCCOL& rEndCol, SCROW& rEndRow, SCTAB nTab, - sal_Bool bRefresh = false ); - sal_Bool ExtendMerge( ScRange& rRange, sal_Bool bRefresh = false ); - sal_Bool ExtendTotalMerge( ScRange& rRange ) const; - SC_DLLPUBLIC sal_Bool ExtendOverlapped( SCCOL& rStartCol, SCROW& rStartRow, - SCCOL nEndCol, SCROW nEndRow, SCTAB nTab ) const; - SC_DLLPUBLIC sal_Bool ExtendOverlapped( ScRange& rRange ) const; - - sal_Bool RefreshAutoFilter( SCCOL nStartCol, SCROW nStartRow, + bool bRefresh = false ); + bool ExtendMerge( ScRange& rRange, bool bRefresh = false ); + bool ExtendTotalMerge( ScRange& rRange ) const; + SC_DLLPUBLIC bool ExtendOverlapped( SCCOL& rStartCol, SCROW& rStartRow, + SCCOL nEndCol, SCROW nEndRow, SCTAB nTab ); + SC_DLLPUBLIC bool ExtendOverlapped( ScRange& rRange ) const; + + bool RefreshAutoFilter( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab ); SC_DLLPUBLIC void DoMergeContents( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, @@ -843,17 +843,17 @@ public: SCCOL nEndCol, SCROW nEndRow, bool bDeleteCaptions = true ); void RemoveMerge( SCCOL nCol, SCROW nRow, SCTAB nTab ); - sal_Bool IsBlockEmpty( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, + bool IsBlockEmpty( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, bool bIgnoreNotes = false ) const; - sal_Bool IsPrintEmpty( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, + bool IsPrintEmpty( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, - sal_Bool bLeftIsEmpty = false, + bool bLeftIsEmpty = false, ScRange* pLastRange = NULL, Rectangle* pLastMM = NULL ) const; void SkipOverlapped( SCCOL& rCol, SCROW& rRow, SCTAB nTab ) const; - sal_Bool IsHorOverlapped( SCCOL nCol, SCROW nRow, SCTAB nTab ) const; - sal_Bool IsVerOverlapped( SCCOL nCol, SCROW nRow, SCTAB nTab ) const; + bool IsHorOverlapped( SCCOL nCol, SCROW nRow, SCTAB nTab ) const; + bool IsVerOverlapped( SCCOL nCol, SCROW nRow, SCTAB nTab ) const; SC_DLLPUBLIC bool HasAttrib( SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, sal_uInt16 nMask ) const; @@ -891,16 +891,16 @@ public: void ClearLookupCaches(); // calculate automatically - void SetAutoCalc( sal_Bool bNewAutoCalc ); - sal_Bool GetAutoCalc() const { return bAutoCalc; } + void SetAutoCalc( bool bNewAutoCalc ); + bool GetAutoCalc() const { return bAutoCalc; } // calculate automatically in/from/for ScDocShell disabled - void SetAutoCalcShellDisabled( sal_Bool bNew ) { bAutoCalcShellDisabled = bNew; } - sal_Bool IsAutoCalcShellDisabled() const { return bAutoCalcShellDisabled; } + void SetAutoCalcShellDisabled( bool bNew ) { bAutoCalcShellDisabled = bNew; } + bool IsAutoCalcShellDisabled() const { return bAutoCalcShellDisabled; } // ForcedFormulas are to be calculated - void SetForcedFormulaPending( sal_Bool bNew ) { bForcedFormulaPending = bNew; } - sal_Bool IsForcedFormulaPending() const { return bForcedFormulaPending; } + void SetForcedFormulaPending( bool bNew ) { bForcedFormulaPending = bNew; } + bool IsForcedFormulaPending() const { return bForcedFormulaPending; } // if CalcFormulaTree() is currently running - sal_Bool IsCalculatingFormulaTree() { return bCalculatingFormulaTree; } + bool IsCalculatingFormulaTree() { return bCalculatingFormulaTree; } sal_uInt16 GetErrCode( const ScAddress& ) const; @@ -921,28 +921,28 @@ public: /** Shrink a range to only include used data area. @param o_bShrunk - Out parameter, sal_True if area was shrunk, sal_False if not. + Out parameter, true if area was shrunk, false if not. - @returns sal_True if there is any data, sal_False if not. + @returns true if there is any data, false if not. */ bool ShrinkToUsedDataArea( bool& o_bShrunk, SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, SCROW& rEndRow, bool bColumnsOnly ) const; SC_DLLPUBLIC void GetDataArea( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow, - SCCOL& rEndCol, SCROW& rEndRow, sal_Bool bIncludeOld, bool bOnlyDown ) const; - SC_DLLPUBLIC sal_Bool GetCellArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) const; - SC_DLLPUBLIC sal_Bool GetTableArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) const; - SC_DLLPUBLIC sal_Bool GetPrintArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow, - sal_Bool bNotes = sal_True ) const; - SC_DLLPUBLIC sal_Bool GetPrintAreaHor( SCTAB nTab, SCROW nStartRow, SCROW nEndRow, - SCCOL& rEndCol, sal_Bool bNotes = sal_True ) const; - SC_DLLPUBLIC sal_Bool GetPrintAreaVer( SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol, - SCROW& rEndRow, sal_Bool bNotes = sal_True ) const; + SCCOL& rEndCol, SCROW& rEndRow, bool bIncludeOld, bool bOnlyDown ) const; + SC_DLLPUBLIC bool GetCellArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) const; + SC_DLLPUBLIC bool GetTableArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) const; + SC_DLLPUBLIC bool GetPrintArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow, + bool bNotes = true ) const; + SC_DLLPUBLIC bool GetPrintAreaHor( SCTAB nTab, SCROW nStartRow, SCROW nEndRow, + SCCOL& rEndCol, bool bNotes = true ) const; + SC_DLLPUBLIC bool GetPrintAreaVer( SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol, + SCROW& rEndRow, bool bNotes = true ) const; void InvalidateTableArea(); - SC_DLLPUBLIC sal_Bool GetDataStart( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow ) const; + SC_DLLPUBLIC bool GetDataStart( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow ) const; /** * Find the maximum column position that contains printable data for the @@ -958,20 +958,20 @@ public: SC_DLLPUBLIC void FindAreaPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, SCsCOL nMovX, SCsROW nMovY ); SC_DLLPUBLIC void GetNextPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, SCsCOL nMovX, SCsROW nMovY, - sal_Bool bMarked, sal_Bool bUnprotected, const ScMarkData& rMark ); + bool bMarked, bool bUnprotected, const ScMarkData& rMark ); - sal_Bool GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, SCTAB nTab, + bool GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, SCTAB nTab, const ScMarkData& rMark ); void LimitChartArea( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, SCROW& rEndRow ); void LimitChartIfAll( ScRangeListRef& rRangeList ); - sal_Bool InsertRow( SCCOL nStartCol, SCTAB nStartTab, + bool InsertRow( SCCOL nStartCol, SCTAB nStartTab, SCCOL nEndCol, SCTAB nEndTab, SCROW nStartRow, SCSIZE nSize, ScDocument* pRefUndoDoc = NULL, const ScMarkData* pTabMark = NULL ); - SC_DLLPUBLIC sal_Bool InsertRow( const ScRange& rRange, ScDocument* pRefUndoDoc = NULL ); + SC_DLLPUBLIC bool InsertRow( const ScRange& rRange, ScDocument* pRefUndoDoc = NULL ); void DeleteRow( SCCOL nStartCol, SCTAB nStartTab, SCCOL nEndCol, SCTAB nEndTab, SCROW nStartRow, SCSIZE nSize, @@ -979,11 +979,11 @@ public: const ScMarkData* pTabMark = NULL ); SC_DLLPUBLIC void DeleteRow( const ScRange& rRange, ScDocument* pRefUndoDoc = NULL, bool* pUndoOutline = NULL ); - sal_Bool InsertCol( SCROW nStartRow, SCTAB nStartTab, + bool InsertCol( SCROW nStartRow, SCTAB nStartTab, SCROW nEndRow, SCTAB nEndTab, SCCOL nStartCol, SCSIZE nSize, ScDocument* pRefUndoDoc = NULL, const ScMarkData* pTabMark = NULL ); - SC_DLLPUBLIC sal_Bool InsertCol( const ScRange& rRange, ScDocument* pRefUndoDoc = NULL ); + SC_DLLPUBLIC bool InsertCol( const ScRange& rRange, ScDocument* pRefUndoDoc = NULL ); void DeleteCol( SCROW nStartRow, SCTAB nStartTab, SCROW nEndRow, SCTAB nEndTab, SCCOL nStartCol, SCSIZE nSize, @@ -992,15 +992,15 @@ public: void DeleteCol( const ScRange& rRange, ScDocument* pRefUndoDoc = NULL, bool* pUndoOutline = NULL ); - sal_Bool CanInsertRow( const ScRange& rRange ) const; - sal_Bool CanInsertCol( const ScRange& rRange ) const; + bool CanInsertRow( const ScRange& rRange ) const; + bool CanInsertCol( const ScRange& rRange ) const; - void FitBlock( const ScRange& rOld, const ScRange& rNew, sal_Bool bClear = sal_True ); - sal_Bool CanFitBlock( const ScRange& rOld, const ScRange& rNew ); + void FitBlock( const ScRange& rOld, const ScRange& rNew, bool bClear = true ); + bool CanFitBlock( const ScRange& rOld, const ScRange& rNew ); - sal_Bool IsClipOrUndo() const { return bIsClip || bIsUndo; } - sal_Bool IsUndo() const { return bIsUndo; } - sal_Bool IsClipboard() const { return bIsClip; } + bool IsClipOrUndo() const { return bIsClip || bIsUndo; } + bool IsUndo() const { return bIsUndo; } + bool IsClipboard() const { return bIsClip; } bool IsUndoEnabled() const { return mbUndoEnabled; } void EnableUndo( bool bVal ); @@ -1014,14 +1014,14 @@ public: void SetNamedRangesLockCount( sal_Int16 nCount ) { mnNamedRangesLockCount = nCount; } SC_DLLPUBLIC void ResetClip( ScDocument* pSourceDoc, const ScMarkData* pMarks ); SC_DLLPUBLIC void ResetClip( ScDocument* pSourceDoc, SCTAB nTab ); - void SetCutMode( sal_Bool bCut ); - SC_DLLPUBLIC sal_Bool IsCutMode(); - void SetClipArea( const ScRange& rArea, sal_Bool bCut = false ); + void SetCutMode( bool bCut ); + SC_DLLPUBLIC bool IsCutMode(); + void SetClipArea( const ScRange& rArea, bool bCut = false ); - SC_DLLPUBLIC sal_Bool IsDocVisible() const { return bIsVisible; } - void SetDocVisible( sal_Bool bSet ); + SC_DLLPUBLIC bool IsDocVisible() const { return bIsVisible; } + void SetDocVisible( bool bSet ); - sal_Bool HasOLEObjectsInArea( const ScRange& rRange, const ScMarkData* pTabMark = NULL ); + bool HasOLEObjectsInArea( const ScRange& rRange, const ScMarkData* pTabMark = NULL ); void DeleteObjectsInArea( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData& rMark ); @@ -1058,10 +1058,10 @@ public: sal_uInt16 nInsFlag, ScDocument* pRefUndoDoc = NULL, ScDocument* pClipDoc = NULL, - sal_Bool bResetCut = sal_True, - sal_Bool bAsLink = false, - sal_Bool bIncludeFiltered = sal_True, - sal_Bool bSkipAttrForEmpty = false, + bool bResetCut = true, + bool bAsLink = false, + bool bIncludeFiltered = true, + bool bSkipAttrForEmpty = false, const ScRangeList * pDestRanges = NULL ); void CopyMultiRangeFromClip(const ScAddress& rDestPos, const ScMarkData& rMark, @@ -1070,60 +1070,60 @@ public: bool bIncludeFiltered = true, bool bSkipAttrForEmpty = false); - void GetClipArea(SCCOL& nClipX, SCROW& nClipY, sal_Bool bIncludeFiltered); + void GetClipArea(SCCOL& nClipX, SCROW& nClipY, bool bIncludeFiltered); void GetClipStart(SCCOL& nClipX, SCROW& nClipY); - sal_Bool HasClipFilteredRows(); + bool HasClipFilteredRows(); - sal_Bool IsClipboardSource() const; + bool IsClipboardSource() const; - SC_DLLPUBLIC void TransposeClip( ScDocument* pTransClip, sal_uInt16 nFlags, sal_Bool bAsLink ); + SC_DLLPUBLIC void TransposeClip( ScDocument* pTransClip, sal_uInt16 nFlags, bool bAsLink ); ScClipParam& GetClipParam(); void SetClipParam(const ScClipParam& rParam); - void MixDocument( const ScRange& rRange, sal_uInt16 nFunction, sal_Bool bSkipEmpty, + void MixDocument( const ScRange& rRange, sal_uInt16 nFunction, bool bSkipEmpty, ScDocument* pSrcDoc ); void FillTab( const ScRange& rSrcArea, const ScMarkData& rMark, sal_uInt16 nFlags, sal_uInt16 nFunction, - sal_Bool bSkipEmpty, sal_Bool bAsLink ); + bool bSkipEmpty, bool bAsLink ); void FillTabMarked( SCTAB nSrcTab, const ScMarkData& rMark, sal_uInt16 nFlags, sal_uInt16 nFunction, - sal_Bool bSkipEmpty, sal_Bool bAsLink ); + bool bSkipEmpty, bool bAsLink ); void TransliterateText( const ScMarkData& rMultiMark, sal_Int32 nType ); SC_DLLPUBLIC void InitUndo( ScDocument* pSrcDoc, SCTAB nTab1, SCTAB nTab2, - sal_Bool bColInfo = false, sal_Bool bRowInfo = false ); + bool bColInfo = false, bool bRowInfo = false ); void AddUndoTab( SCTAB nTab1, SCTAB nTab2, - sal_Bool bColInfo = false, sal_Bool bRowInfo = false ); + bool bColInfo = false, bool bRowInfo = false ); SC_DLLPUBLIC void InitUndoSelected( ScDocument* pSrcDoc, const ScMarkData& rTabSelection, - sal_Bool bColInfo = false, sal_Bool bRowInfo = false ); + bool bColInfo = false, bool bRowInfo = false ); // don't use anymore: void CopyToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, - sal_uInt16 nFlags, sal_Bool bMarked, ScDocument* pDestDoc, - const ScMarkData* pMarks = NULL, sal_Bool bColRowFlags = sal_True); + sal_uInt16 nFlags, bool bMarked, ScDocument* pDestDoc, + const ScMarkData* pMarks = NULL, bool bColRowFlags = true); void UndoToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, - sal_uInt16 nFlags, sal_Bool bMarked, ScDocument* pDestDoc, + sal_uInt16 nFlags, bool bMarked, ScDocument* pDestDoc, const ScMarkData* pMarks = NULL); void CopyToDocument(const ScRange& rRange, - sal_uInt16 nFlags, sal_Bool bMarked, ScDocument* pDestDoc, - const ScMarkData* pMarks = NULL, sal_Bool bColRowFlags = sal_True); + sal_uInt16 nFlags, bool bMarked, ScDocument* pDestDoc, + const ScMarkData* pMarks = NULL, bool bColRowFlags = true); void UndoToDocument(const ScRange& rRange, - sal_uInt16 nFlags, sal_Bool bMarked, ScDocument* pDestDoc, + sal_uInt16 nFlags, bool bMarked, ScDocument* pDestDoc, const ScMarkData* pMarks = NULL); - void CopyScenario( SCTAB nSrcTab, SCTAB nDestTab, sal_Bool bNewScenario = false ); - sal_Bool TestCopyScenario( SCTAB nSrcTab, SCTAB nDestTab ) const; + void CopyScenario( SCTAB nSrcTab, SCTAB nDestTab, bool bNewScenario = false ); + bool TestCopyScenario( SCTAB nSrcTab, SCTAB nDestTab ) const; void MarkScenario( SCTAB nSrcTab, SCTAB nDestTab, - ScMarkData& rDestMark, sal_Bool bResetMark = sal_True, + ScMarkData& rDestMark, bool bResetMark = true, sal_uInt16 nNeededBits = 0 ) const; - sal_Bool HasScenarioRange( SCTAB nTab, const ScRange& rRange ) const; + bool HasScenarioRange( SCTAB nTab, const ScRange& rRange ) const; SC_DLLPUBLIC const ScRangeList* GetScenarioRanges( SCTAB nTab ) const; SC_DLLPUBLIC void CopyUpdated( ScDocument* pPosDoc, ScDocument* pDestDoc ); @@ -1131,7 +1131,7 @@ public: void UpdateReference( UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, SCsCOL nDx, SCsROW nDy, SCsTAB nDz, - ScDocument* pUndoDoc = NULL, sal_Bool bIncludeDraw = sal_True, + ScDocument* pUndoDoc = NULL, bool bIncludeDraw = true, bool bUpdateNoteCaptionPos = true ); SC_DLLPUBLIC void UpdateTranspose( const ScAddress& rDestPos, ScDocument* pClipDoc, @@ -1146,33 +1146,33 @@ public: double nStepValue = 1.0, double nMaxValue = 1E307); String GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW nEndY ); - sal_Bool GetSelectionFunction( ScSubTotalFunc eFunc, + bool GetSelectionFunction( ScSubTotalFunc eFunc, const ScAddress& rCursor, const ScMarkData& rMark, double& rResult ); SC_DLLPUBLIC const SfxPoolItem* GetAttr( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich ) const; SC_DLLPUBLIC const ScPatternAttr* GetPattern( SCCOL nCol, SCROW nRow, SCTAB nTab ) const; SC_DLLPUBLIC const ScPatternAttr* GetMostUsedPattern( SCCOL nCol, SCROW nStartRow, SCROW nEndRow, SCTAB nTab ) const; - const ScPatternAttr* GetSelectionPattern( const ScMarkData& rMark, sal_Bool bDeep = sal_True ); - ScPatternAttr* CreateSelectionPattern( const ScMarkData& rMark, sal_Bool bDeep = sal_True ); + const ScPatternAttr* GetSelectionPattern( const ScMarkData& rMark, bool bDeep = true ); + ScPatternAttr* CreateSelectionPattern( const ScMarkData& rMark, bool bDeep = true ); const ScConditionalFormat* GetCondFormat( SCCOL nCol, SCROW nRow, SCTAB nTab ) const; SC_DLLPUBLIC const SfxItemSet* GetCondResult( SCCOL nCol, SCROW nRow, SCTAB nTab ) const; const SfxPoolItem* GetEffItem( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich ) const; SC_DLLPUBLIC const ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator >& GetBreakIterator(); - sal_Bool HasStringWeakCharacters( const String& rString ); + bool HasStringWeakCharacters( const String& rString ); SC_DLLPUBLIC sal_uInt8 GetStringScriptType( const String& rString ); SC_DLLPUBLIC sal_uInt8 GetCellScriptType( ScBaseCell* pCell, sal_uLong nNumberFormat ); SC_DLLPUBLIC sal_uInt8 GetScriptType( SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell* pCell = NULL ); - sal_Bool HasDetectiveOperations() const; + bool HasDetectiveOperations() const; void AddDetectiveOperation( const ScDetOpData& rData ); void ClearDetectiveOperations(); ScDetOpList* GetDetOpList() const { return pDetOpList; } void SetDetOpList(ScDetOpList* pNew); - sal_Bool HasDetectiveObjects(SCTAB nTab) const; + bool HasDetectiveObjects(SCTAB nTab) const; void GetSelectionFrame( const ScMarkData& rMark, SvxBoxItem& rLineOuter, @@ -1185,7 +1185,7 @@ public: const SvxBoxInfoItem* pLineInner ); void ClearSelectionItems( const sal_uInt16* pWhich, const ScMarkData& rMark ); - void ChangeSelectionIndent( sal_Bool bIncrement, const ScMarkData& rMark ); + void ChangeSelectionIndent( bool bIncrement, const ScMarkData& rMark ); SC_DLLPUBLIC sal_uLong AddCondFormat( const ScConditionalFormat& rNew ); SC_DLLPUBLIC void FindConditionalFormat( sal_uLong nKey, ScRangeList& rRanges ); @@ -1232,29 +1232,29 @@ public: void ApplySelectionStyle( const ScStyleSheet& rStyle, const ScMarkData& rMark ); void ApplySelectionLineStyle( const ScMarkData& rMark, - const ::editeng::SvxBorderLine* pLine, sal_Bool bColorOnly ); + const ::editeng::SvxBorderLine* pLine, bool bColorOnly ); const ScStyleSheet* GetStyle( SCCOL nCol, SCROW nRow, SCTAB nTab ) const; const ScStyleSheet* GetSelectionStyle( const ScMarkData& rMark ) const; - void StyleSheetChanged( const SfxStyleSheetBase* pStyleSheet, sal_Bool bRemoved, + void StyleSheetChanged( const SfxStyleSheetBase* pStyleSheet, bool bRemoved, OutputDevice* pDev, double nPPTX, double nPPTY, const Fraction& rZoomX, const Fraction& rZoomY ); - sal_Bool IsStyleSheetUsed( const ScStyleSheet& rStyle, sal_Bool bGatherAllStyles ) const; + bool IsStyleSheetUsed( const ScStyleSheet& rStyle, bool bGatherAllStyles ) const; - SC_DLLPUBLIC sal_Bool ApplyFlagsTab( SCCOL nStartCol, SCROW nStartRow, + SC_DLLPUBLIC bool ApplyFlagsTab( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, sal_Int16 nFlags ); - SC_DLLPUBLIC sal_Bool RemoveFlagsTab( SCCOL nStartCol, SCROW nStartRow, + SC_DLLPUBLIC bool RemoveFlagsTab( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, sal_Int16 nFlags ); SC_DLLPUBLIC void SetPattern( const ScAddress&, const ScPatternAttr& rAttr, - sal_Bool bPutToPool = false ); + bool bPutToPool = false ); SC_DLLPUBLIC void SetPattern( SCCOL nCol, SCROW nRow, SCTAB nTab, const ScPatternAttr& rAttr, - sal_Bool bPutToPool = false ); + bool bPutToPool = false ); void DeleteNumberFormat( const sal_uInt32* pDelKeys, sal_uInt32 nCount ); void AutoFormat( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, @@ -1272,7 +1272,7 @@ public: static void GetSearchAndReplaceStart( const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow ); - sal_Bool Solver(SCCOL nFCol, SCROW nFRow, SCTAB nFTab, + bool Solver(SCCOL nFCol, SCROW nFRow, SCTAB nFTab, SCCOL nVCol, SCROW nVRow, SCTAB nVTab, const String& sValStr, double& nX); @@ -1289,7 +1289,7 @@ public: SC_DLLPUBLIC void SetRowHeightOnly( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, sal_uInt16 nNewHeight ); - SC_DLLPUBLIC void SetManualHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, sal_Bool bManual ); + SC_DLLPUBLIC void SetManualHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bManual ); SC_DLLPUBLIC sal_uInt16 GetColWidth( SCCOL nCol, SCTAB nTab ) const; SC_DLLPUBLIC sal_uInt16 GetRowHeight( SCROW nRow, SCTAB nTab, bool bHiddenAsZero = true ) const; @@ -1310,14 +1310,14 @@ public: sal_uInt16 GetOptimalColWidth( SCCOL nCol, SCTAB nTab, OutputDevice* pDev, double nPPTX, double nPPTY, const Fraction& rZoomX, const Fraction& rZoomY, - sal_Bool bFormula, + bool bFormula, const ScMarkData* pMarkData = NULL, const ScColWidthParam* pParam = NULL ); - SC_DLLPUBLIC sal_Bool SetOptimalHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, sal_uInt16 nExtra, + SC_DLLPUBLIC bool SetOptimalHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, sal_uInt16 nExtra, OutputDevice* pDev, double nPPTX, double nPPTY, const Fraction& rZoomX, const Fraction& rZoomY, - sal_Bool bShrink ); + bool bShrink ); void UpdateAllRowHeights( OutputDevice* pDev, double nPPTX, double nPPTY, const Fraction& rZoomX, const Fraction& rZoomY, @@ -1326,11 +1326,11 @@ public: OutputDevice* pDev, double nPPTX, double nPPTY, const Fraction& rZoomX, const Fraction& rZoomY, - sal_Bool bWidth, sal_Bool bTotalSize = false ); + bool bWidth, bool bTotalSize = false ); - SC_DLLPUBLIC void ShowCol(SCCOL nCol, SCTAB nTab, sal_Bool bShow); - SC_DLLPUBLIC void ShowRow(SCROW nRow, SCTAB nTab, sal_Bool bShow); - SC_DLLPUBLIC void ShowRows(SCROW nRow1, SCROW nRow2, SCTAB nTab, sal_Bool bShow); + SC_DLLPUBLIC void ShowCol(SCCOL nCol, SCTAB nTab, bool bShow); + SC_DLLPUBLIC void ShowRow(SCROW nRow, SCTAB nTab, bool bShow); + SC_DLLPUBLIC void ShowRows(SCROW nRow1, SCROW nRow2, SCTAB nTab, bool bShow); SC_DLLPUBLIC void SetRowFlags( SCROW nRow, SCTAB nTab, sal_uInt8 nNewFlags ); SC_DLLPUBLIC void SetRowFlags( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, sal_uInt8 nNewFlags ); @@ -1393,11 +1393,11 @@ public: // returns whether to export a Default style for this col/row or not // nDefault is setted to one possition in the current row/col where the Default style is - sal_Bool GetColDefault( SCTAB nTab, SCCOL nCol, SCROW nLastRow, SCROW& nDefault); - sal_Bool GetRowDefault( SCTAB nTab, SCROW nRow, SCCOL nLastCol, SCCOL& nDefault); + bool GetColDefault( SCTAB nTab, SCCOL nCol, SCROW nLastRow, SCROW& nDefault); + bool GetRowDefault( SCTAB nTab, SCROW nRow, SCCOL nLastCol, SCCOL& nDefault); - sal_Bool UpdateOutlineCol( SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, sal_Bool bShow ); - sal_Bool UpdateOutlineRow( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, sal_Bool bShow ); + bool UpdateOutlineCol( SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, bool bShow ); + bool UpdateOutlineRow( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bShow ); void StripHidden( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2, SCTAB nTab ); void ExtendHidden( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2, SCTAB nTab ); @@ -1415,26 +1415,26 @@ public: void InvalidatePageBreaks(SCTAB nTab); void UpdatePageBreaks( SCTAB nTab, const ScRange* pUserArea = NULL ); void RemoveManualBreaks( SCTAB nTab ); - sal_Bool HasManualBreaks( SCTAB nTab ) const; + bool HasManualBreaks( SCTAB nTab ) const; - sal_Bool IsPageStyleInUse( const String& rStrPageStyle, SCTAB* pInTab = NULL ); - sal_Bool RemovePageStyleInUse( const String& rStrPageStyle ); - sal_Bool RenamePageStyleInUse( const String& rOld, const String& rNew ); + bool IsPageStyleInUse( const String& rStrPageStyle, SCTAB* pInTab = NULL ); + bool RemovePageStyleInUse( const String& rStrPageStyle ); + bool RenamePageStyleInUse( const String& rOld, const String& rNew ); void ModifyStyleSheet( SfxStyleSheetBase& rPageStyle, const SfxItemSet& rChanges ); void PageStyleModified( SCTAB nTab, const String& rNewName ); - SC_DLLPUBLIC sal_Bool NeedPageResetAfterTab( SCTAB nTab ) const; + SC_DLLPUBLIC bool NeedPageResetAfterTab( SCTAB nTab ) const; // Was stored in PageStyle previously. Now it exists for every table: - SC_DLLPUBLIC sal_Bool HasPrintRange(); + SC_DLLPUBLIC bool HasPrintRange(); SC_DLLPUBLIC sal_uInt16 GetPrintRangeCount( SCTAB nTab ); SC_DLLPUBLIC const ScRange* GetPrintRange( SCTAB nTab, sal_uInt16 nPos ); SC_DLLPUBLIC const ScRange* GetRepeatColRange( SCTAB nTab ); SC_DLLPUBLIC const ScRange* GetRepeatRowRange( SCTAB nTab ); /** Returns true, if the specified sheet is always printed. */ - sal_Bool IsPrintEntireSheet( SCTAB nTab ) const; + bool IsPrintEntireSheet( SCTAB nTab ) const; /** Removes all print ranges. */ SC_DLLPUBLIC void ClearPrintRanges( SCTAB nTab ); @@ -1465,105 +1465,105 @@ public: void FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, SCTAB nTab, double nScaleX, double nScaleY, - sal_Bool bPageMode, sal_Bool bFormulaMode, + bool bPageMode, bool bFormulaMode, const ScMarkData* pMarkData = NULL ); SC_DLLPUBLIC SvNumberFormatter* GetFormatTable() const; - void Sort( SCTAB nTab, const ScSortParam& rSortParam, sal_Bool bKeepQuery ); - SCSIZE Query( SCTAB nTab, const ScQueryParam& rQueryParam, sal_Bool bKeepSub ); - SC_DLLPUBLIC sal_Bool CreateQueryParam( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, + void Sort( SCTAB nTab, const ScSortParam& rSortParam, bool bKeepQuery ); + SCSIZE Query( SCTAB nTab, const ScQueryParam& rQueryParam, bool bKeepSub ); + SC_DLLPUBLIC bool CreateQueryParam( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, SCTAB nTab, ScQueryParam& rQueryParam ); void GetUpperCellString(SCCOL nCol, SCROW nRow, SCTAB nTab, String& rStr); - sal_Bool GetFilterEntries( SCCOL nCol, SCROW nRow, SCTAB nTab, + bool GetFilterEntries( SCCOL nCol, SCROW nRow, SCTAB nTab, bool bFilter, TypedScStrCollection& rStrings, bool& rHasDates); - SC_DLLPUBLIC sal_Bool GetFilterEntriesArea( SCCOL nCol, SCROW nStartRow, SCROW nEndRow, + SC_DLLPUBLIC bool GetFilterEntriesArea( SCCOL nCol, SCROW nStartRow, SCROW nEndRow, SCTAB nTab, TypedScStrCollection& rStrings, bool& rHasDates ); - sal_Bool GetDataEntries( SCCOL nCol, SCROW nRow, SCTAB nTab, - TypedScStrCollection& rStrings, sal_Bool bLimit = false ); - sal_Bool GetFormulaEntries( TypedScStrCollection& rStrings ); + bool GetDataEntries( SCCOL nCol, SCROW nRow, SCTAB nTab, + TypedScStrCollection& rStrings, bool bLimit = false ); + bool GetFormulaEntries( TypedScStrCollection& rStrings ); bool HasAutoFilter( SCCOL nCol, SCROW nRow, SCTAB nTab ); - SC_DLLPUBLIC sal_Bool HasColHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, + SC_DLLPUBLIC bool HasColHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab ); - SC_DLLPUBLIC sal_Bool HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, + SC_DLLPUBLIC bool HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab ); - SfxPrinter* GetPrinter( sal_Bool bCreateIfNotExist = sal_True ); + SfxPrinter* GetPrinter( bool bCreateIfNotExist = true ); void SetPrinter( SfxPrinter* pNewPrinter ); VirtualDevice* GetVirtualDevice_100th_mm(); SC_DLLPUBLIC OutputDevice* GetRefDevice(); // WYSIWYG: Printer, otherwise VirtualDevice... - sal_Bool GetNextSpellingCell(SCCOL& nCol, SCROW& nRow, SCTAB nTab, - sal_Bool bInSel, const ScMarkData& rMark) const; + bool GetNextSpellingCell(SCCOL& nCol, SCROW& nRow, SCTAB nTab, + bool bInSel, const ScMarkData& rMark) const; - sal_Bool ReplaceStyle(const SvxSearchItem& rSearchItem, + bool ReplaceStyle(const SvxSearchItem& rSearchItem, SCCOL nCol, SCROW nRow, SCTAB nTab, - ScMarkData& rMark, sal_Bool bIsUndo); + ScMarkData& rMark, bool bIsUndo); void DoColResize( SCTAB nTab, SCCOL nCol1, SCCOL nCol2, SCSIZE nAdd ); void InvalidateTextWidth( const String& rStyleName ); void InvalidateTextWidth( SCTAB nTab ); - void InvalidateTextWidth( const ScAddress* pAdrFrom, const ScAddress* pAdrTo, sal_Bool bNumFormatChanged ); + void InvalidateTextWidth( const ScAddress* pAdrFrom, const ScAddress* pAdrTo, bool bNumFormatChanged ); - sal_Bool IdleCalcTextWidth(); - sal_Bool IdleCheckLinks(); + bool IdleCalcTextWidth(); + bool IdleCheckLinks(); - sal_Bool ContinueOnlineSpelling(); // TRUE = found s.th. + bool ContinueOnlineSpelling(); // TRUE = found s.th. void RepaintRange( const ScRange& rRange ); - sal_Bool IsIdleDisabled() const { return bIdleDisabled; } - void DisableIdle(sal_Bool bDo) { bIdleDisabled = bDo; } + bool IsIdleDisabled() const { return bIdleDisabled; } + void DisableIdle(bool bDo) { bIdleDisabled = bDo; } - sal_Bool IsDetectiveDirty() const { return bDetectiveDirty; } - void SetDetectiveDirty(sal_Bool bSet) { bDetectiveDirty = bSet; } + bool IsDetectiveDirty() const { return bDetectiveDirty; } + void SetDetectiveDirty(bool bSet) { bDetectiveDirty = bSet; } void RemoveAutoSpellObj(); void SetOnlineSpellPos( const ScAddress& rPos ); - SC_DLLPUBLIC sal_Bool SetVisibleSpellRange( const ScRange& rRange ); // sal_True = changed + SC_DLLPUBLIC bool SetVisibleSpellRange( const ScRange& rRange ); // true = changed sal_uInt8 GetMacroCallMode() const { return nMacroCallMode; } void SetMacroCallMode(sal_uInt8 nNew) { nMacroCallMode = nNew; } - sal_Bool GetHasMacroFunc() const { return bHasMacroFunc; } - void SetHasMacroFunc(sal_Bool bSet) { bHasMacroFunc = bSet; } + bool GetHasMacroFunc() const { return bHasMacroFunc; } + void SetHasMacroFunc(bool bSet) { bHasMacroFunc = bSet; } - sal_Bool CheckMacroWarn(); + bool CheckMacroWarn(); void SetRangeOverflowType(sal_uInt32 nType) { nRangeOverflowType = nType; } - sal_Bool HasRangeOverflow() const { return nRangeOverflowType != 0; } + bool HasRangeOverflow() const { return nRangeOverflowType != 0; } SC_DLLPUBLIC sal_uInt32 GetRangeOverflowType() const { return nRangeOverflowType; } // for broadcasting/listening - void SetNoSetDirty( sal_Bool bVal ) { bNoSetDirty = bVal; } - sal_Bool GetNoSetDirty() const { return bNoSetDirty; } - void SetInsertingFromOtherDoc( sal_Bool bVal ) { bInsertingFromOtherDoc = bVal; } - sal_Bool IsInsertingFromOtherDoc() const { return bInsertingFromOtherDoc; } + void SetNoSetDirty( bool bVal ) { bNoSetDirty = bVal; } + bool GetNoSetDirty() const { return bNoSetDirty; } + void SetInsertingFromOtherDoc( bool bVal ) { bInsertingFromOtherDoc = bVal; } + bool IsInsertingFromOtherDoc() const { return bInsertingFromOtherDoc; } void SetLoadingMedium( bool bVal ); void SetImportingXML( bool bVal ); bool IsImportingXML() const { return bImportingXML; } - void SetXMLFromWrapper( sal_Bool bVal ); - sal_Bool IsXMLFromWrapper() const { return bXMLFromWrapper; } - void SetCalcingAfterLoad( sal_Bool bVal ) { bCalcingAfterLoad = bVal; } - sal_Bool IsCalcingAfterLoad() const { return bCalcingAfterLoad; } - void SetNoListening( sal_Bool bVal ) { bNoListening = bVal; } - sal_Bool GetNoListening() const { return bNoListening; } + void SetXMLFromWrapper( bool bVal ); + bool IsXMLFromWrapper() const { return bXMLFromWrapper; } + void SetCalcingAfterLoad( bool bVal ) { bCalcingAfterLoad = bVal; } + bool IsCalcingAfterLoad() const { return bCalcingAfterLoad; } + void SetNoListening( bool bVal ) { bNoListening = bVal; } + bool GetNoListening() const { return bNoListening; } ScBroadcastAreaSlotMachine* GetBASM() const { return pBASM; } ScChartListenerCollection* GetChartListenerCollection() const { return pChartListenerCollection; } void SetChartListenerCollection( ScChartListenerCollection*, - sal_Bool bSetChartRangeLists = false ); + bool bSetChartRangeLists = false ); void UpdateChart( const String& rName ); void RestoreChartListener( const String& rName ); SC_DLLPUBLIC void UpdateChartListenerCollection(); - sal_Bool IsChartListenerCollectionNeedsUpdate() const + bool IsChartListenerCollectionNeedsUpdate() const { return bChartListenerCollectionNeedsUpdate; } - void SetChartListenerCollectionNeedsUpdate( sal_Bool bFlg ) + void SetChartListenerCollectionNeedsUpdate( bool bFlg ) { bChartListenerCollectionNeedsUpdate = bFlg; } void AddOLEObjectToCollection(const String& rName); @@ -1574,12 +1574,12 @@ public: void SetForbiddenCharacters( const rtl::Reference<SvxForbiddenCharactersTable> xNew ); sal_uInt8 GetAsianCompression() const; // CharacterCompressionType values - sal_Bool IsValidAsianCompression() const; + bool IsValidAsianCompression() const; void SetAsianCompression(sal_uInt8 nNew); - sal_Bool GetAsianKerning() const; - sal_Bool IsValidAsianKerning() const; - void SetAsianKerning(sal_Bool bNew); + bool GetAsianKerning() const; + bool IsValidAsianKerning() const; + void SetAsianKerning(bool bNew); sal_uInt8 GetEditTextDirection(SCTAB nTab) const; // EEHorizontalTextDirection values @@ -1603,11 +1603,11 @@ private: SCCOL nOtherCol, SCTAB nOtherTab, SCROW nMaxRow, SCCOLROW* pOtherRows ); void FindOrder( SCCOLROW* pOtherRows, SCCOLROW nThisEndRow, SCCOLROW nOtherEndRow, - sal_Bool bColumns, + bool bColumns, ScDocument& rOtherDoc, SCTAB nThisTab, SCTAB nOtherTab, SCCOLROW nEndCol, SCCOLROW* pTranslate, ScProgress* pProgress, sal_uLong nProAdd ); - sal_Bool OnlineSpellInRange( const ScRange& rSpellRange, ScAddress& rSpellPos, + bool OnlineSpellInRange( const ScRange& rSpellRange, ScAddress& rSpellPos, sal_uInt16 nMaxTest ); DECL_LINK( TrackTimeHdl, Timer* ); @@ -1646,23 +1646,23 @@ public: SvtListener* pListener ); void PutInFormulaTree( ScFormulaCell* pCell ); void RemoveFromFormulaTree( ScFormulaCell* pCell ); - void CalcFormulaTree( sal_Bool bOnlyForced = false, - sal_Bool bNoProgressBar = false ); + void CalcFormulaTree( bool bOnlyForced = false, + bool bNoProgressBar = false ); void ClearFormulaTree(); void AppendToFormulaTrack( ScFormulaCell* pCell ); void RemoveFromFormulaTrack( ScFormulaCell* pCell ); void TrackFormulas( sal_uLong nHintId = SC_HINT_DATACHANGED ); sal_uInt16 GetFormulaTrackCount() const { return nFormulaTrackCount; } - sal_Bool IsInFormulaTree( ScFormulaCell* pCell ) const; - sal_Bool IsInFormulaTrack( ScFormulaCell* pCell ) const; + bool IsInFormulaTree( ScFormulaCell* pCell ) const; + bool IsInFormulaTrack( ScFormulaCell* pCell ) const; sal_uInt16 GetHardRecalcState() { return nHardRecalcState; } void SetHardRecalcState( sal_uInt16 nVal ) { nHardRecalcState = nVal; } void StartAllListeners(); const ScFormulaCell* GetFormulaTree() const { return pFormulaTree; } - sal_Bool HasForcedFormulas() const { return bHasForcedFormulas; } - void SetForcedFormulas( sal_Bool bVal ) { bHasForcedFormulas = bVal; } + bool HasForcedFormulas() const { return bHasForcedFormulas; } + void SetForcedFormulas( bool bVal ) { bHasForcedFormulas = bVal; } sal_uLong GetFormulaCodeInTree() const { return nFormulaCodeInTree; } - sal_Bool IsInInterpreter() const { return nInterpretLevel != 0; } + bool IsInInterpreter() const { return nInterpretLevel != 0; } sal_uInt16 GetInterpretLevel() { return nInterpretLevel; } void IncInterpretLevel() { @@ -1674,7 +1674,7 @@ public: if ( nInterpretLevel ) nInterpretLevel--; } - sal_Bool IsInMacroInterpreter() const { return nMacroInterpretLevel != 0; } + bool IsInMacroInterpreter() const { return nMacroInterpretLevel != 0; } sal_uInt16 GetMacroInterpretLevel() { return nMacroInterpretLevel; } void IncMacroInterpretLevel() { @@ -1686,7 +1686,7 @@ public: if ( nMacroInterpretLevel ) nMacroInterpretLevel--; } - sal_Bool IsInInterpreterTableOp() const { return nInterpreterTableOpLevel != 0; } + bool IsInInterpreterTableOp() const { return nInterpreterTableOpLevel != 0; } sal_uInt16 GetInterpreterTableOpLevel() { return nInterpreterTableOpLevel; } void IncInterpreterTableOpLevel() { @@ -1707,9 +1707,9 @@ public: pRecursionHelper = CreateRecursionHelperInstance(); return *pRecursionHelper; } - sal_Bool IsInDtorClear() const { return bInDtorClear; } - void SetExpandRefs( sal_Bool bVal ) { bExpandRefs = bVal; } - sal_Bool IsExpandRefs() { return bExpandRefs; } + bool IsInDtorClear() const { return bInDtorClear; } + void SetExpandRefs( bool bVal ) { bExpandRefs = bVal; } + bool IsExpandRefs() { return bExpandRefs; } SC_DLLPUBLIC void IncSizeRecalcLevel( SCTAB nTab ); SC_DLLPUBLIC void DecSizeRecalcLevel( SCTAB nTab, bool bUpdateNoteCaptionPos = true ); @@ -1731,8 +1731,8 @@ public: void StartTrackTimer(); void CompileDBFormula(); - void CompileDBFormula( sal_Bool bCreateFormulaString ); - void CompileNameFormula( sal_Bool bCreateFormulaString ); + void CompileDBFormula( bool bCreateFormulaString ); + void CompileNameFormula( bool bCreateFormulaString ); void CompileColRowNameFormula(); /** Maximum string length of a column, e.g. for dBase export. @@ -1769,8 +1769,8 @@ public: ::com::sun::star::util::XModifyListener >& rListener, const ::com::sun::star::lang::EventObject& rEvent ); - void SetInLinkUpdate(sal_Bool bSet); // TableLink or AreaLink - sal_Bool IsInLinkUpdate() const; // including DdeLink + void SetInLinkUpdate(bool bSet); // TableLink or AreaLink + bool IsInLinkUpdate() const; // including DdeLink SC_DLLPUBLIC SfxItemPool* GetEditPool() const; SC_DLLPUBLIC SfxItemPool* GetEnginePool() const; @@ -1782,16 +1782,16 @@ public: ScRefreshTimerControl * const * GetRefreshTimerControlAddress() const { return &pRefreshTimerControl; } - void SetPastingDrawFromOtherDoc( sal_Bool bVal ) + void SetPastingDrawFromOtherDoc( bool bVal ) { bPastingDrawFromOtherDoc = bVal; } - sal_Bool PastingDrawFromOtherDoc() const + bool PastingDrawFromOtherDoc() const { return bPastingDrawFromOtherDoc; } /// an ID unique to each document instance sal_uInt32 GetDocumentID() const; void InvalidateStyleSheetUsage() - { bStyleSheetUsageInvalid = sal_True; } + { bStyleSheetUsageInvalid = true; } void GetSortParam( ScSortParam& rParam, SCTAB nTab ); void SetSortParam( ScSortParam& rParam, SCTAB nTab ); @@ -1836,7 +1836,7 @@ private: // CLOOK-Impl-methods void ImplDeleteOptions(); void DeleteDrawLayer(); - SC_DLLPUBLIC sal_Bool DrawGetPrintArea( ScRange& rRange, sal_Bool bSetHor, sal_Bool bSetVer ) const; + SC_DLLPUBLIC bool DrawGetPrintArea( ScRange& rRange, bool bSetHor, bool bSetVer ) const; void DrawMovePage( sal_uInt16 nOldPos, sal_uInt16 nNewPos ); void DrawCopyPage( sal_uInt16 nOldPos, sal_uInt16 nNewPos ); @@ -1859,7 +1859,7 @@ private: // CLOOK-Impl-methods ScClipRangeNameData& rRangeNames, const ScRangeList& rDestRanges, const ScMarkData& rMark, SCCOL nXw, SCROW nYw); - sal_Bool HasPartOfMerged( const ScRange& rRange ); + bool HasPartOfMerged( const ScRange& rRange ); std::map< SCTAB, ScSortParam > mSheetSortParams; diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx index 78360b69cf1e..3487e4b3505b 100644 --- a/sc/inc/global.hxx +++ b/sc/inc/global.hxx @@ -615,7 +615,7 @@ public: static String GetLongErrorString(sal_uInt16 nErrNumber); static sal_Bool EETextObjEqual( const EditTextObject* pObj1, const EditTextObject* pObj2 ); - static sal_Bool CheckWidthInvalidate( sal_Bool& bNumFormatChanged, + static sal_Bool CheckWidthInvalidate( bool& bNumFormatChanged, const SfxItemSet& rNewAttrs, const SfxItemSet& rOldAttrs ); static sal_Bool HasAttrChanged( const SfxItemSet& rNewAttrs, diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx index d2a75b126b5a..794bc7d97dfc 100644 --- a/sc/source/core/data/attarray.cxx +++ b/sc/source/core/data/attarray.cxx @@ -141,7 +141,7 @@ void ScAttrArray::Reset( const ScPatternAttr* pPattern, sal_Bool bAlloc ) { // ensure that attributing changes text width of cell pOldPattern = pData[i].pPattern; - sal_Bool bNumFormatChanged; + bool bNumFormatChanged; if ( ScGlobal::CheckWidthInvalidate( bNumFormatChanged, pPattern->GetItemSet(), pOldPattern->GetItemSet() ) ) { @@ -367,7 +367,7 @@ void ScAttrArray::SetPatternArea(SCROW nStartRow, SCROW nEndRow, const ScPattern const SfxItemSet& rNewSet = pPattern->GetItemSet(); const SfxItemSet& rOldSet = pData[nx].pPattern->GetItemSet(); - sal_Bool bNumFormatChanged; + bool bNumFormatChanged; if ( ScGlobal::CheckWidthInvalidate( bNumFormatChanged, rNewSet, rOldSet ) ) { @@ -548,7 +548,7 @@ void ScAttrArray::ApplyStyleArea( SCROW nStartRow, SCROW nEndRow, ScStyleSheet* const SfxItemSet& rNewSet = pNewPattern->GetItemSet(); const SfxItemSet& rOldSet = pOldPattern->GetItemSet(); - sal_Bool bNumFormatChanged; + bool bNumFormatChanged; if ( ScGlobal::CheckWidthInvalidate( bNumFormatChanged, rNewSet, rOldSet ) ) { @@ -769,7 +769,7 @@ void ScAttrArray::ApplyCacheArea( SCROW nStartRow, SCROW nEndRow, SfxItemPoolCac const SfxItemSet& rNewSet = pNewPattern->GetItemSet(); const SfxItemSet& rOldSet = pOldPattern->GetItemSet(); - sal_Bool bNumFormatChanged; + bool bNumFormatChanged; if ( ScGlobal::CheckWidthInvalidate( bNumFormatChanged, rNewSet, rOldSet ) ) { diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx index 97d834455659..565e998739c9 100644 --- a/sc/source/core/data/documen2.cxx +++ b/sc/source/core/data/documen2.cxx @@ -215,7 +215,7 @@ ScDocument::ScDocument( ScDocumentMode eMode, bInUnoBroadcast( false ), bInUnoListenerCall( false ), eGrammar( formula::FormulaGrammar::GRAM_NATIVE ), - bStyleSheetUsageInvalid( sal_True ), + bStyleSheetUsageInvalid( true ), mbUndoEnabled( true ), mbAdjustHeightEnabled( true ), mbExecuteLinkEnabled( true ), @@ -286,7 +286,7 @@ void ScDocument::SetStorageGrammar( formula::FormulaGrammar::Grammar eGram ) } -void ScDocument::SetDocVisible( sal_Bool bSet ) +void ScDocument::SetDocVisible( bool bSet ) { // called from view ctor - only for a visible document, // each new sheet's RTL flag is initialized from the locale @@ -342,7 +342,7 @@ IMPL_LINK( ScDocument, TrackTimeHdl, Timer*, EMPTYARG ) if (!pShell->IsModified()) { - pShell->SetModified( sal_True ); + pShell->SetModified( true ); SfxBindings* pBindings = GetViewBindings(); if (pBindings) { @@ -365,7 +365,7 @@ ScDocument::~ScDocument() { OSL_PRECOND( !bInLinkUpdate, "bInLinkUpdate in dtor" ); - bInDtorClear = sal_True; + bInDtorClear = true; // first of all disable all refresh timers by deleting the control if ( pRefreshTimerControl ) @@ -410,7 +410,7 @@ ScDocument::~ScDocument() delete pUnoRefUndoList; delete pUnoListenerCalls; - Clear( sal_True ); // sal_True = from destructor (needed for SdrModel::ClearModel) + Clear( true ); // true = from destructor (needed for SdrModel::ClearModel) if (pCondFormList) { @@ -614,13 +614,13 @@ void ScDocument::DeleteNumberFormat( const sal_uInt32* /* pDelKeys */, sal_uInt3 } void ScDocument::PutCell( SCCOL nCol, SCROW nRow, SCTAB nTab, - ScBaseCell* pCell, sal_uLong nFormatIndex, sal_Bool bForceTab ) + ScBaseCell* pCell, sal_uLong nFormatIndex, bool bForceTab ) { if (VALIDTAB(nTab)) { if ( bForceTab && ( nTab >= static_cast<SCTAB>(maTabs.size()) || !maTabs[nTab] ) ) { - sal_Bool bExtras = !bIsUndo; // Spaltenbreiten, Zeilenhoehen, Flags + bool bExtras = !bIsUndo; // Spaltenbreiten, Zeilenhoehen, Flags if ( nTab >= static_cast<SCTAB>(maTabs.size()) ) { maTabs.resize( nTab + 1, NULL ); @@ -636,20 +636,20 @@ void ScDocument::PutCell( SCCOL nCol, SCROW nRow, SCTAB nTab, } -sal_Bool ScDocument::GetPrintArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow, - sal_Bool bNotes ) const +bool ScDocument::GetPrintArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow, + bool bNotes ) const { if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab]) { - sal_Bool bAny = maTabs[nTab]->GetPrintArea( rEndCol, rEndRow, bNotes ); + bool bAny = maTabs[nTab]->GetPrintArea( rEndCol, rEndRow, bNotes ); if (pDrawLayer) { ScRange aDrawRange(0,0,nTab, MAXCOL,MAXROW,nTab); - if (DrawGetPrintArea( aDrawRange, sal_True, sal_True )) + if (DrawGetPrintArea( aDrawRange, true, true )) { if (aDrawRange.aEnd.Col()>rEndCol) rEndCol=aDrawRange.aEnd.Col(); if (aDrawRange.aEnd.Row()>rEndRow) rEndRow=aDrawRange.aEnd.Row(); - bAny = sal_True; + bAny = true; } } return bAny; @@ -660,19 +660,19 @@ sal_Bool ScDocument::GetPrintArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow, return false; } -sal_Bool ScDocument::GetPrintAreaHor( SCTAB nTab, SCROW nStartRow, SCROW nEndRow, - SCCOL& rEndCol, sal_Bool bNotes ) const +bool ScDocument::GetPrintAreaHor( SCTAB nTab, SCROW nStartRow, SCROW nEndRow, + SCCOL& rEndCol, bool bNotes ) const { if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab]) { - sal_Bool bAny = maTabs[nTab]->GetPrintAreaHor( nStartRow, nEndRow, rEndCol, bNotes ); + bool bAny = maTabs[nTab]->GetPrintAreaHor( nStartRow, nEndRow, rEndCol, bNotes ); if (pDrawLayer) { ScRange aDrawRange(0,nStartRow,nTab, MAXCOL,nEndRow,nTab); - if (DrawGetPrintArea( aDrawRange, sal_True, false )) + if (DrawGetPrintArea( aDrawRange, true, false )) { if (aDrawRange.aEnd.Col()>rEndCol) rEndCol=aDrawRange.aEnd.Col(); - bAny = sal_True; + bAny = true; } } return bAny; @@ -682,19 +682,19 @@ sal_Bool ScDocument::GetPrintAreaHor( SCTAB nTab, SCROW nStartRow, SCROW nEndRow return false; } -sal_Bool ScDocument::GetPrintAreaVer( SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol, - SCROW& rEndRow, sal_Bool bNotes ) const +bool ScDocument::GetPrintAreaVer( SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol, + SCROW& rEndRow, bool bNotes ) const { if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab]) { - sal_Bool bAny = maTabs[nTab]->GetPrintAreaVer( nStartCol, nEndCol, rEndRow, bNotes ); + bool bAny = maTabs[nTab]->GetPrintAreaVer( nStartCol, nEndCol, rEndRow, bNotes ); if (pDrawLayer) { ScRange aDrawRange(nStartCol,0,nTab, nEndCol,MAXROW,nTab); - if (DrawGetPrintArea( aDrawRange, false, sal_True )) + if (DrawGetPrintArea( aDrawRange, false, true )) { if (aDrawRange.aEnd.Row()>rEndRow) rEndRow=aDrawRange.aEnd.Row(); - bAny = sal_True; + bAny = true; } } return bAny; @@ -704,19 +704,19 @@ sal_Bool ScDocument::GetPrintAreaVer( SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol return false; } -sal_Bool ScDocument::GetDataStart( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow ) const +bool ScDocument::GetDataStart( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow ) const { if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab]) { - sal_Bool bAny = maTabs[nTab]->GetDataStart( rStartCol, rStartRow ); + bool bAny = maTabs[nTab]->GetDataStart( rStartCol, rStartRow ); if (pDrawLayer) { ScRange aDrawRange(0,0,nTab, MAXCOL,MAXROW,nTab); - if (DrawGetPrintArea( aDrawRange, sal_True, sal_True )) + if (DrawGetPrintArea( aDrawRange, true, true )) { if (aDrawRange.aStart.Col()<rStartCol) rStartCol=aDrawRange.aStart.Col(); if (aDrawRange.aStart.Row()<rStartRow) rStartRow=aDrawRange.aStart.Row(); - bAny = sal_True; + bAny = true; } } return bAny; @@ -727,10 +727,10 @@ sal_Bool ScDocument::GetDataStart( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRo return false; } -sal_Bool ScDocument::MoveTab( SCTAB nOldPos, SCTAB nNewPos, ScProgress* pProgress ) +bool ScDocument::MoveTab( SCTAB nOldPos, SCTAB nNewPos, ScProgress* pProgress ) { if (nOldPos == nNewPos) return false; - sal_Bool bValid = false; + bool bValid = false; SCTAB nTabCount = static_cast<SCTAB>(maTabs.size()); if (VALIDTAB(nOldPos) && nOldPos < nTabCount ) { @@ -738,9 +738,9 @@ sal_Bool ScDocument::MoveTab( SCTAB nOldPos, SCTAB nNewPos, ScProgress* pProgres { if (nTabCount > 1) { - sal_Bool bOldAutoCalc = GetAutoCalc(); + bool bOldAutoCalc = GetAutoCalc(); SetAutoCalc( false ); // Mehrfachberechnungen vermeiden - SetNoListening( sal_True ); + SetNoListening( true ); if (nNewPos == SC_TAB_APPEND || nNewPos >= nTabCount) nNewPos = nTabCount-1; @@ -793,14 +793,14 @@ sal_Bool ScDocument::MoveTab( SCTAB nOldPos, SCTAB nNewPos, ScProgress* pProgres if (pDrawLayer) DrawMovePage( static_cast<sal_uInt16>(nOldPos), static_cast<sal_uInt16>(nNewPos) ); - bValid = sal_True; + bValid = true; } } } return bValid; } -sal_Bool ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pOnlyMarked ) +bool ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pOnlyMarked ) { if (SC_TAB_APPEND == nNewPos || nNewPos >= static_cast<SCTAB>(maTabs.size())) nNewPos = static_cast<SCTAB>(maTabs.size()); @@ -809,19 +809,19 @@ sal_Bool ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pO // vorneweg testen, ob der Prefix als gueltig erkannt wird // wenn nicht, nur doppelte vermeiden - sal_Bool bPrefix = ValidTabName( aName ); + bool bPrefix = ValidTabName( aName ); OSL_ENSURE(bPrefix, "ungueltiger Tabellenname"); SCTAB nDummy; CreateValidTabName(aName); - sal_Bool bValid; + bool bValid; if (bPrefix) bValid = ( ValidNewTabName(aName) ); else bValid = ( !GetTable( aName, nDummy ) ); - sal_Bool bOldAutoCalc = GetAutoCalc(); + bool bOldAutoCalc = GetAutoCalc(); SetAutoCalc( false ); // Mehrfachberechnungen vermeiden if (bValid) { @@ -833,7 +833,7 @@ sal_Bool ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pO { if (VALIDTAB(nNewPos) && (nNewPos < static_cast<SCTAB>(maTabs.size()))) { - SetNoListening( sal_True ); + SetNoListening( true ); ScRange aRange( 0,0,nNewPos, MAXCOL,MAXROW,MAXTAB ); xColNameRanges->UpdateReference( URM_INSDEL, this, aRange, 0,0,1 ); @@ -861,7 +861,7 @@ sal_Bool ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pO if (nNewPos <= nOldPos) nOldPos++; maTabs[nNewPos] = new ScTable(this, nNewPos, aName); - bValid = sal_True; + bValid = true; for (TableContainer::iterator it = maTabs.begin(); it != maTabs.end(); ++it) if (*it && it != maTabs.begin()+nOldPos && it != maTabs.begin() + nNewPos) (*it)->UpdateCompile(); @@ -884,7 +884,7 @@ sal_Bool ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pO } if (bValid) { - SetNoListening( sal_True ); // noch nicht bei CopyToTable/Insert + SetNoListening( true ); // noch nicht bei CopyToTable/Insert maTabs[nOldPos]->CopyToTable(0, 0, MAXCOL, MAXROW, IDF_ALL, (pOnlyMarked != NULL), maTabs[nNewPos], pOnlyMarked ); maTabs[nNewPos]->SetTabBgColor(maTabs[nOldPos]->GetTabBgColor()); @@ -922,13 +922,13 @@ sal_Bool ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pO void VBA_InsertModule( ScDocument& rDoc, SCTAB nTab, String& sModuleName, String& sModuleSource ); sal_uLong ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos, - SCTAB nDestPos, sal_Bool bInsertNew, - sal_Bool bResultsOnly ) + SCTAB nDestPos, bool bInsertNew, + bool bResultsOnly ) { sal_uLong nRetVal = 1; // 0 => Fehler 1 = ok // 2 => RefBox, 3 => NameBox // 4 => beides - sal_Bool bValid = sal_True; + bool bValid = true; if (bInsertNew) // neu einfuegen { rtl::OUString aName; @@ -948,14 +948,14 @@ sal_uLong ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos, if (bValid) { - sal_Bool bOldAutoCalcSrc = false; - sal_Bool bOldAutoCalc = GetAutoCalc(); + bool bOldAutoCalcSrc = false; + bool bOldAutoCalc = GetAutoCalc(); SetAutoCalc( false ); // Mehrfachberechnungen vermeiden - SetNoListening( sal_True ); + SetNoListening( true ); if ( bResultsOnly ) { bOldAutoCalcSrc = pSrcDoc->GetAutoCalc(); - pSrcDoc->SetAutoCalc( sal_True ); // falls was berechnet werden muss + pSrcDoc->SetAutoCalc( true ); // falls was berechnet werden muss } { @@ -1053,7 +1053,7 @@ sal_uLong ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos, MAXCOL, MAXROW, nDestPos, 0, 0, nDz, NULL); // Test for outside absolute references for info box - sal_Bool bIsAbsRef = pSrcDoc->maTabs[nSrcPos]->TestTabRefAbs(nSrcPos); + bool bIsAbsRef = pSrcDoc->maTabs[nSrcPos]->TestTabRefAbs(nSrcPos); // Readjust self-contained absolute references to this sheet maTabs[nDestPos]->TestTabRefAbs(nSrcPos); if (bIsAbsRef) @@ -1087,7 +1087,7 @@ sal_uLong ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos, } if (!bValid) nRetVal = 0; - sal_Bool bVbaEnabled = IsInVBAMode(); + bool bVbaEnabled = IsInVBAMode(); if ( bVbaEnabled ) { @@ -1170,9 +1170,9 @@ ScFieldEditEngine* ScDocument::CreateFieldEditEngine() if ( !bImportingXML ) { // #i66209# previous use might not have restored update mode, - // ensure same state as for a new EditEngine (UpdateMode = sal_True) + // ensure same state as for a new EditEngine (UpdateMode = true) if ( !pCacheFieldEditEngine->GetUpdateMode() ) - pCacheFieldEditEngine->SetUpdateMode(sal_True); + pCacheFieldEditEngine->SetUpdateMode(true); } pNewEditEngine = pCacheFieldEditEngine; diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx index e40bf2dd6043..280660363ee0 100644 --- a/sc/source/core/data/documen3.cxx +++ b/sc/source/core/data/documen3.cxx @@ -190,7 +190,7 @@ ScDBCollection* ScDocument::GetDBCollection() const return pDBCollection; } -void ScDocument::SetDBCollection( ScDBCollection* pNewDBCollection, sal_Bool bRemoveAutoFilter ) +void ScDocument::SetDBCollection( ScDBCollection* pNewDBCollection, bool bRemoveAutoFilter ) { if (pDBCollection && bRemoveAutoFilter) { @@ -330,7 +330,7 @@ void ScDocument::StopTemporaryChartLock() void ScDocument::SetChartListenerCollection( ScChartListenerCollection* pNewChartListenerCollection, - sal_Bool bSetChartRangeLists ) + bool bSetChartRangeLists ) { ScChartListenerCollection* pOld = pChartListenerCollection; pChartListenerCollection = pNewChartListenerCollection; @@ -343,13 +343,13 @@ void ScDocument::SetChartListenerCollection( delete pOld; } -void ScDocument::SetScenario( SCTAB nTab, sal_Bool bFlag ) +void ScDocument::SetScenario( SCTAB nTab, bool bFlag ) { if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab]) maTabs[nTab]->SetScenario(bFlag); } -sal_Bool ScDocument::IsScenario( SCTAB nTab ) const +bool ScDocument::IsScenario( SCTAB nTab ) const { return ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] &&maTabs[nTab]->IsScenario(); } @@ -402,13 +402,13 @@ void ScDocument::GetScenarioFlags( SCTAB nTab, sal_uInt16& rFlags ) const rFlags = maTabs[nTab]->GetScenarioFlags(); } -sal_Bool ScDocument::IsLinked( SCTAB nTab ) const +bool ScDocument::IsLinked( SCTAB nTab ) const { return ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] && maTabs[nTab]->IsLinked(); // euqivalent to //if (ValidTab(nTab) && pTab[nTab]) // return pTab[nTab]->IsLinked(); - //return sal_False; + //return false; } formula::FormulaGrammar::AddressConvention ScDocument::GetAddressConvention() const @@ -426,7 +426,7 @@ void ScDocument::SetGrammar( formula::FormulaGrammar::Grammar eGram ) eGrammar = eGram; } -sal_Bool ScDocument::GetLinkMode( SCTAB nTab ) const +sal_uInt8 ScDocument::GetLinkMode( SCTAB nTab ) const { if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab]) return maTabs[nTab]->GetLinkMode(); @@ -476,7 +476,7 @@ void ScDocument::SetLink( SCTAB nTab, sal_uInt8 nMode, const String& rDoc, maTabs[nTab]->SetLink( nMode, rDoc, rFilter, rOptions, rTabName, nRefreshDelay ); } -sal_Bool ScDocument::HasLink( const String& rDoc, +bool ScDocument::HasLink( const String& rDoc, const String& rFilter, const String& rOptions ) const { SCTAB nCount = static_cast<SCTAB>(maTabs.size()); @@ -485,12 +485,12 @@ sal_Bool ScDocument::HasLink( const String& rDoc, && maTabs[i]->GetLinkDoc() == rDoc && maTabs[i]->GetLinkFlt() == rFilter && maTabs[i]->GetLinkOpt() == rOptions) - return sal_True; + return true; return false; } -sal_Bool ScDocument::LinkExternalTab( SCTAB& rTab, const String& aDocTab, +bool ScDocument::LinkExternalTab( SCTAB& rTab, const String& aDocTab, const String& aFileName, const String& aTabName ) { if ( IsClipboard() ) @@ -511,26 +511,26 @@ sal_Bool ScDocument::LinkExternalTab( SCTAB& rTab, const String& aDocTab, SCTAB nSrcTab; if ( pSrcDoc->GetTable( aTabName, nSrcTab ) ) { - if ( !InsertTab( SC_TAB_APPEND, aDocTab, sal_True ) ) + if ( !InsertTab( SC_TAB_APPEND, aDocTab, true ) ) { OSL_FAIL("can't insert external document table"); return false; } rTab = GetTableCount() - 1; // nicht neu einfuegen, nur Ergebnisse - TransferTab( pSrcDoc, nSrcTab, rTab, false, sal_True ); + TransferTab( pSrcDoc, nSrcTab, rTab, false, true ); } else return false; sal_uLong nRefreshDelay = 0; - sal_Bool bWasThere = HasLink( aFileName, aFilterName, aOptions ); + bool bWasThere = HasLink( aFileName, aFilterName, aOptions ); SetLink( rTab, SC_LINK_VALUE, aFileName, aFilterName, aOptions, aTabName, nRefreshDelay ); if ( !bWasThere ) // Link pro Quelldokument nur einmal eintragen { ScTableLink* pLink = new ScTableLink( pShell, aFileName, aFilterName, aOptions, nRefreshDelay ); - pLink->SetInCreate( sal_True ); + pLink->SetInCreate( true ); GetLinkManager()->InsertFileLink( *pLink, OBJECT_CLIENT_FILE, aFileName, &aFilterName ); pLink->Update(); @@ -539,7 +539,7 @@ sal_Bool ScDocument::LinkExternalTab( SCTAB& rTab, const String& aDocTab, if (pBindings) pBindings->Invalidate( SID_LINKS ); } - return sal_True; + return true; } ScExternalRefManager* ScDocument::GetExternalRefManager() const @@ -631,7 +631,7 @@ bool ScDocument::HasAnyCalcNotification() const return false; } -sal_Bool ScDocument::HasCalcNotification( SCTAB nTab ) const +bool ScDocument::HasCalcNotification( SCTAB nTab ) const { if (VALIDTAB(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab]) return maTabs[nTab]->GetCalcNotification(); @@ -642,7 +642,7 @@ void ScDocument::SetCalcNotification( SCTAB nTab ) { // set only if not set before if (VALIDTAB(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] && !maTabs[nTab]->GetCalcNotification()) - maTabs[nTab]->SetCalcNotification(sal_True); + maTabs[nTab]->SetCalcNotification(true); } void ScDocument::ResetCalcNotifications() @@ -652,7 +652,7 @@ void ScDocument::ResetCalcNotifications() maTabs[nTab]->SetCalcNotification(false); } -ScOutlineTable* ScDocument::GetOutlineTable( SCTAB nTab, sal_Bool bCreate ) +ScOutlineTable* ScDocument::GetOutlineTable( SCTAB nTab, bool bCreate ) { ScOutlineTable* pVal = NULL; @@ -671,7 +671,7 @@ ScOutlineTable* ScDocument::GetOutlineTable( SCTAB nTab, sal_Bool bCreate ) return pVal; } -sal_Bool ScDocument::SetOutlineTable( SCTAB nTab, const ScOutlineTable* pNewOutline ) +bool ScDocument::SetOutlineTable( SCTAB nTab, const ScOutlineTable* pNewOutline ) { return VALIDTAB(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] && maTabs[nTab]->SetOutlineTable(pNewOutline); } @@ -683,7 +683,7 @@ void ScDocument::DoAutoOutline( SCCOL nStartCol, SCROW nStartRow, maTabs[nTab]->DoAutoOutline( nStartCol, nStartRow, nEndCol, nEndRow ); } -sal_Bool ScDocument::TestRemoveSubTotals( SCTAB nTab, const ScSubTotalParam& rParam ) +bool ScDocument::TestRemoveSubTotals( SCTAB nTab, const ScSubTotalParam& rParam ) { return VALIDTAB(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] && maTabs[nTab]->TestRemoveSubTotals( rParam ); } @@ -694,19 +694,19 @@ void ScDocument::RemoveSubTotals( SCTAB nTab, ScSubTotalParam& rParam ) maTabs[nTab]->RemoveSubTotals( rParam ); } -sal_Bool ScDocument::DoSubTotals( SCTAB nTab, ScSubTotalParam& rParam ) +bool ScDocument::DoSubTotals( SCTAB nTab, ScSubTotalParam& rParam ) { return VALIDTAB(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] && maTabs[nTab]->DoSubTotals( rParam ); } -sal_Bool ScDocument::HasSubTotalCells( const ScRange& rRange ) +bool ScDocument::HasSubTotalCells( const ScRange& rRange ) { ScCellIterator aIter( this, rRange ); ScBaseCell* pCell = aIter.GetFirst(); while (pCell) { if ( pCell->GetCellType() == CELLTYPE_FORMULA && ((ScFormulaCell*)pCell)->IsSubTotal() ) - return sal_True; + return true; pCell = aIter.GetNext(); } @@ -724,7 +724,7 @@ void ScDocument::CopyUpdated( ScDocument* pPosDoc, ScDocument* pDestDoc ) maTabs[nTab]->CopyUpdated( pPosDoc->maTabs[nTab], pDestDoc->maTabs[nTab] ); } -void ScDocument::CopyScenario( SCTAB nSrcTab, SCTAB nDestTab, sal_Bool bNewScenario ) +void ScDocument::CopyScenario( SCTAB nSrcTab, SCTAB nDestTab, bool bNewScenario ) { if (ValidTab(nSrcTab) && ValidTab(nDestTab) && nSrcTab < static_cast<SCTAB>(maTabs.size()) && nDestTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nSrcTab] && maTabs[nDestTab]) @@ -741,12 +741,12 @@ void ScDocument::CopyScenario( SCTAB nSrcTab, SCTAB nDestTab, sal_Bool bNewScena { if ( maTabs[nTab]->IsActiveScenario() ) // auch wenn's dasselbe Szenario ist { - sal_Bool bTouched = false; + bool bTouched = false; for ( size_t nR=0, nRangeCount = aRanges.size(); nR < nRangeCount && !bTouched; nR++ ) { const ScRange* pRange = aRanges[ nR ]; if ( maTabs[nTab]->HasScenarioRange( *pRange ) ) - bTouched = sal_True; + bTouched = true; } if (bTouched) { @@ -757,10 +757,10 @@ void ScDocument::CopyScenario( SCTAB nSrcTab, SCTAB nDestTab, sal_Bool bNewScena } } - maTabs[nSrcTab]->SetActiveScenario(sal_True); // da kommt's her... + maTabs[nSrcTab]->SetActiveScenario(true); // da kommt's her... if (!bNewScenario) // Daten aus dem ausgewaehlten Szenario kopieren { - sal_Bool bOldAutoCalc = GetAutoCalc(); + bool bOldAutoCalc = GetAutoCalc(); SetAutoCalc( false ); // Mehrfachberechnungen vermeiden maTabs[nSrcTab]->CopyScenarioTo( maTabs[nDestTab] ); SetDirty(); @@ -770,7 +770,7 @@ void ScDocument::CopyScenario( SCTAB nSrcTab, SCTAB nDestTab, sal_Bool bNewScena } void ScDocument::MarkScenario( SCTAB nSrcTab, SCTAB nDestTab, ScMarkData& rDestMark, - sal_Bool bResetMark, sal_uInt16 nNeededBits ) const + bool bResetMark, sal_uInt16 nNeededBits ) const { if (bResetMark) rDestMark.ResetMark(); @@ -781,7 +781,7 @@ void ScDocument::MarkScenario( SCTAB nSrcTab, SCTAB nDestTab, ScMarkData& rDestM rDestMark.SetAreaTab( nDestTab ); } -sal_Bool ScDocument::HasScenarioRange( SCTAB nTab, const ScRange& rRange ) const +bool ScDocument::HasScenarioRange( SCTAB nTab, const ScRange& rRange ) const { return ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] && maTabs[nTab]->HasScenarioRange( rRange ); } @@ -794,18 +794,18 @@ const ScRangeList* ScDocument::GetScenarioRanges( SCTAB nTab ) const return NULL; } -sal_Bool ScDocument::IsActiveScenario( SCTAB nTab ) const +bool ScDocument::IsActiveScenario( SCTAB nTab ) const { return ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] && maTabs[nTab]->IsActiveScenario( ); } -void ScDocument::SetActiveScenario( SCTAB nTab, sal_Bool bActive ) +void ScDocument::SetActiveScenario( SCTAB nTab, bool bActive ) { if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab]) maTabs[nTab]->SetActiveScenario( bActive ); } -sal_Bool ScDocument::TestCopyScenario( SCTAB nSrcTab, SCTAB nDestTab ) const +bool ScDocument::TestCopyScenario( SCTAB nSrcTab, SCTAB nDestTab ) const { if (ValidTab(nSrcTab) && nSrcTab < static_cast<SCTAB>(maTabs.size()) && nDestTab < static_cast<SCTAB>(maTabs.size())&& ValidTab(nDestTab)) @@ -871,7 +871,7 @@ void ScDocument::BroadcastUno( const SfxHint &rHint ) { if (pUnoBroadcaster) { - bInUnoBroadcast = sal_True; + bInUnoBroadcast = true; pUnoBroadcaster->Broadcast( rHint ); bInUnoBroadcast = false; @@ -888,7 +888,7 @@ void ScDocument::BroadcastUno( const SfxHint &rHint ) // outermost call executes them all. ScChartLockGuard aChartLockGuard(this); - bInUnoListenerCall = sal_True; + bInUnoListenerCall = true; pUnoListenerCalls->ExecuteAndClear(); bInUnoListenerCall = false; } @@ -935,7 +935,7 @@ void ScDocument::UpdateReference( UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, SCsCOL nDx, SCsROW nDy, SCsTAB nDz, - ScDocument* pUndoDoc, sal_Bool bIncludeDraw, + ScDocument* pUndoDoc, bool bIncludeDraw, bool bUpdateNoteCaptionPos ) { PutInOrder( nCol1, nCol2 ); @@ -943,7 +943,7 @@ void ScDocument::UpdateReference( UpdateRefMode eUpdateRefMode, PutInOrder( nTab1, nTab2 ); if (VALIDTAB(nTab1) && VALIDTAB(nTab2)) { - sal_Bool bExpandRefsOld = IsExpandRefs(); + bool bExpandRefsOld = IsExpandRefs(); if ( eUpdateRefMode == URM_INSDEL && (nDx > 0 || nDy > 0 || nDz > 0) ) SetExpandRefs( SC_MOD()->GetInputOptions().GetExpandRefs() ); SCTAB i; @@ -1113,7 +1113,7 @@ void ScDocument::GetSearchAndReplaceStart( const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow ) { sal_uInt16 nCommand = rSearchItem.GetCommand(); - sal_Bool bReplace = ( nCommand == SVX_SEARCHCMD_REPLACE || + bool bReplace = ( nCommand == SVX_SEARCHCMD_REPLACE || nCommand == SVX_SEARCHCMD_REPLACE_ALL ); if ( rSearchItem.GetBackward() ) { @@ -1280,7 +1280,7 @@ bool ScDocument::SearchAndReplace( // Outline anpassen -sal_Bool ScDocument::UpdateOutlineCol( SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, sal_Bool bShow ) +bool ScDocument::UpdateOutlineCol( SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, bool bShow ) { if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] ) return maTabs[nTab]->UpdateOutlineCol( nStartCol, nEndCol, bShow ); @@ -1289,7 +1289,7 @@ sal_Bool ScDocument::UpdateOutlineCol( SCCOL nStartCol, SCCOL nEndCol, SCTAB nTa return false; } -sal_Bool ScDocument::UpdateOutlineRow( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, sal_Bool bShow ) +bool ScDocument::UpdateOutlineRow( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bShow ) { if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] ) return maTabs[nTab]->UpdateOutlineRow( nStartRow, nEndRow, bShow ); @@ -1298,18 +1298,18 @@ sal_Bool ScDocument::UpdateOutlineRow( SCROW nStartRow, SCROW nEndRow, SCTAB nTa return false; } -void ScDocument::Sort(SCTAB nTab, const ScSortParam& rSortParam, sal_Bool bKeepQuery) +void ScDocument::Sort(SCTAB nTab, const ScSortParam& rSortParam, bool bKeepQuery) { if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] ) { - sal_Bool bOldDisableIdle = IsIdleDisabled(); - DisableIdle( sal_True ); + bool bOldDisableIdle = IsIdleDisabled(); + DisableIdle( true ); maTabs[nTab]->Sort(rSortParam, bKeepQuery); DisableIdle( bOldDisableIdle ); } } -SCSIZE ScDocument::Query(SCTAB nTab, const ScQueryParam& rQueryParam, sal_Bool bKeepSub) +SCSIZE ScDocument::Query(SCTAB nTab, const ScQueryParam& rQueryParam, bool bKeepSub) { if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] ) return maTabs[nTab]->Query((ScQueryParam&)rQueryParam, bKeepSub); @@ -1327,7 +1327,7 @@ void ScDocument::GetUpperCellString(SCCOL nCol, SCROW nRow, SCTAB nTab, String& rStr.Erase(); } -sal_Bool ScDocument::CreateQueryParam(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, SCTAB nTab, ScQueryParam& rQueryParam) +bool ScDocument::CreateQueryParam(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, SCTAB nTab, ScQueryParam& rQueryParam) { if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] ) return maTabs[nTab]->CreateQueryParam(nCol1, nRow1, nCol2, nRow2, rQueryParam); @@ -1370,13 +1370,13 @@ bool ScDocument::HasAutoFilter( SCCOL nCurCol, SCROW nCurRow, SCTAB nCurTab ) return bHasAutoFilter; } -sal_Bool ScDocument::HasColHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, +bool ScDocument::HasColHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab ) { return VALIDTAB(nTab) && maTabs[nTab] && maTabs[nTab]->HasColHeader( nStartCol, nStartRow, nEndCol, nEndRow ); } -sal_Bool ScDocument::HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, +bool ScDocument::HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab ) { return VALIDTAB(nTab) && maTabs[nTab] && maTabs[nTab]->HasRowHeader( nStartCol, nStartRow, nEndCol, nEndRow ); @@ -1386,7 +1386,7 @@ sal_Bool ScDocument::HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndC // GetFilterEntries - Eintraege fuer AutoFilter-Listbox // -sal_Bool ScDocument::GetFilterEntries( +bool ScDocument::GetFilterEntries( SCCOL nCol, SCROW nRow, SCTAB nTab, bool bFilter, TypedScStrCollection& rStrings, bool& rHasDates) { if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] && pDBCollection ) @@ -1433,7 +1433,7 @@ sal_Bool ScDocument::GetFilterEntries( maTabs[nTab]->GetFilterEntries( nCol, nStartRow, nEndRow, rStrings, rHasDates ); } - return sal_True; + return true; } } @@ -1444,13 +1444,13 @@ sal_Bool ScDocument::GetFilterEntries( // GetFilterEntriesArea - Eintraege fuer Filter-Dialog // -sal_Bool ScDocument::GetFilterEntriesArea( SCCOL nCol, SCROW nStartRow, SCROW nEndRow, +bool ScDocument::GetFilterEntriesArea( SCCOL nCol, SCROW nStartRow, SCROW nEndRow, SCTAB nTab, TypedScStrCollection& rStrings, bool& rHasDates ) { if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] ) { maTabs[nTab]->GetFilterEntries( nCol, nStartRow, nEndRow, rStrings, rHasDates ); - return sal_True; + return true; } return false; @@ -1460,20 +1460,20 @@ sal_Bool ScDocument::GetFilterEntriesArea( SCCOL nCol, SCROW nStartRow, SCROW nE // GetDataEntries - Eintraege fuer Auswahlliste-Listbox (keine Zahlen / Formeln) // -sal_Bool ScDocument::GetDataEntries( SCCOL nCol, SCROW nRow, SCTAB nTab, - TypedScStrCollection& rStrings, sal_Bool bLimit ) +bool ScDocument::GetDataEntries( SCCOL nCol, SCROW nRow, SCTAB nTab, + TypedScStrCollection& rStrings, bool bLimit ) { if( !bLimit ) { /* Try to generate the list from list validation. This part is skipped, - if bLimit==sal_True, because in that case this function is called to get + if bLimit==true, because in that case this function is called to get cell values for auto completion on input. */ sal_uInt32 nValidation = static_cast< const SfxUInt32Item* >( GetAttr( nCol, nRow, nTab, ATTR_VALIDDATA ) )->GetValue(); if( nValidation ) { const ScValidationData* pData = GetValidationEntry( nValidation ); if( pData && pData->FillSelectionList( rStrings, ScAddress( nCol, nRow, nTab ) ) ) - return sal_True; + return true; } } @@ -1489,7 +1489,7 @@ sal_Bool ScDocument::GetDataEntries( SCCOL nCol, SCROW nRow, SCTAB nTab, #define SC_STRTYPE_DBNAMES 3 #define SC_STRTYPE_HEADERS 4 -sal_Bool ScDocument::GetFormulaEntries( TypedScStrCollection& rStrings ) +bool ScDocument::GetFormulaEntries( TypedScStrCollection& rStrings ) { // // Bereichsnamen @@ -1549,11 +1549,11 @@ sal_Bool ScDocument::GetFormulaEntries( TypedScStrCollection& rStrings ) } } - return sal_True; + return true; } -sal_Bool ScDocument::IsEmbedded() const +bool ScDocument::IsEmbedded() const { return bIsEmbedded; } @@ -1598,7 +1598,7 @@ Rectangle ScDocument::GetEmbeddedRect() const // 1/100 mm void ScDocument::SetEmbedded( const ScRange& rRange ) { - bIsEmbedded = sal_True; + bIsEmbedded = true; aEmbedRange = rRange; } @@ -1611,7 +1611,7 @@ void ScDocument::ResetEmbedded() /** Similar to ScViewData::AddPixelsWhile(), but add height twips and only while result is less than nStopTwips. - @return sal_True if advanced at least one row. + @return true if advanced at least one row. */ bool lcl_AddTwipsWhile( long & rTwips, long nStopTwips, SCROW & rPosY, SCROW nEndRow, const ScTable * pTable ) { @@ -1676,7 +1676,7 @@ ScRange ScDocument::GetRange( SCTAB nTab, const Rectangle& rMMRect ) const long nSize; long nTwips; long nAdd; - sal_Bool bEnd; + bool bEnd; nSize = 0; nTwips = (long) (aPosRect.Left() / HMM_PER_TWIPS); @@ -1692,7 +1692,7 @@ ScRange ScDocument::GetRange( SCTAB nTab, const Rectangle& rMMRect ) const ++nX1; } else - bEnd = sal_True; + bEnd = true; } nTwips = (long) (aPosRect.Right() / HMM_PER_TWIPS); @@ -1708,7 +1708,7 @@ ScRange ScDocument::GetRange( SCTAB nTab, const Rectangle& rMMRect ) const ++nX2; } else - bEnd = sal_True; + bEnd = true; } @@ -1732,7 +1732,7 @@ ScRange ScDocument::GetRange( SCTAB nTab, const Rectangle& rMMRect ) const void ScDocument::SetEmbedded( const Rectangle& rRect ) // aus VisArea (1/100 mm) { - bIsEmbedded = sal_True; + bIsEmbedded = true; aEmbedRange = GetRange( nVisibleTab, rRect ); } @@ -1807,7 +1807,7 @@ void ScDocument::SnapVisArea( Rectangle& rRect ) const return; } - sal_Bool bNegativePage = IsNegativePage( nVisibleTab ); + bool bNegativePage = IsNegativePage( nVisibleTab ); if ( bNegativePage ) ScDrawLayer::MirrorRectRTL( rRect ); // calculate with positive (LTR) values @@ -1838,18 +1838,18 @@ void ScDocument::SetDocProtection(const ScDocProtection* pProtect) pDocProtection.reset(NULL); } -sal_Bool ScDocument::IsDocProtected() const +bool ScDocument::IsDocProtected() const { return pDocProtection.get() && pDocProtection->isProtected(); } -sal_Bool ScDocument::IsDocEditable() const +bool ScDocument::IsDocEditable() const { // import into read-only document is possible return !IsDocProtected() && ( bImportingXML || mbChangeReadOnlyEnabled || !pShell || !pShell->IsReadOnly() ); } -sal_Bool ScDocument::IsTabProtected( SCTAB nTab ) const +bool ScDocument::IsTabProtected( SCTAB nTab ) const { if (VALIDTAB(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab]) return maTabs[nTab]->IsProtected(); @@ -1960,7 +1960,7 @@ void ScDocument::SetLanguage( LanguageType eLatin, LanguageType eCjk, LanguageTy void ScDocument::SetDrawDefaults() { - bSetDrawDefaults = sal_True; + bSetDrawDefaults = true; UpdateDrawDefaults(); } diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx index f821ccfb2cbc..22bac02f7db5 100644 --- a/sc/source/core/data/documen4.cxx +++ b/sc/source/core/data/documen4.cxx @@ -62,11 +62,11 @@ using namespace formula; // ----------------------------------------------------------------------- // Nach der Regula Falsi Methode -sal_Bool ScDocument::Solver(SCCOL nFCol, SCROW nFRow, SCTAB nFTab, +bool ScDocument::Solver(SCCOL nFCol, SCROW nFRow, SCTAB nFTab, SCCOL nVCol, SCROW nVRow, SCTAB nVTab, const String& sValStr, double& nX) { - sal_Bool bRet = false; + bool bRet = false; nX = 0.0; if (ValidColRow(nFCol, nFRow) && ValidColRow(nVCol, nVRow) && VALIDTAB(nFTab) && VALIDTAB(nVTab) && @@ -116,7 +116,7 @@ sal_Bool ScDocument::Solver(SCCOL nFCol, SCROW nFRow, SCTAB nFTab, sal_uInt16 nErrCode = pCell->GetErrCode(); nX = pCell->GetValueAlways(); if (nErrCode == 0) // kein fehler beim Rechnen - bRet = sal_True; + bRet = true; delete pCell; } } @@ -181,9 +181,9 @@ void ScDocument::InsertMatrixFormula(SCCOL nCol1, SCROW nRow1, aRefData.nCol = nCol1; aRefData.nRow = nRow1; aRefData.nTab = nTab1; - aRefData.SetColRel( sal_True ); - aRefData.SetRowRel( sal_True ); - aRefData.SetTabRel( sal_True ); + aRefData.SetColRel( true ); + aRefData.SetRowRel( true ); + aRefData.SetTabRel( true ); aRefData.CalcRelFromAbs( ScAddress( nCol1, nRow1, nTab1 ) ); ScTokenArray aArr; @@ -258,12 +258,12 @@ void ScDocument::InsertTableOp(const ScTabOpParam& rParam, // Mehrfachopera const String& sSep = ScCompiler::GetNativeSymbol( ocSep); if (rParam.nMode == 0) // nur Spalte { - aRef.Set( rParam.aRefFormulaCell.GetAddress(), sal_True, false, false ); + aRef.Set( rParam.aRefFormulaCell.GetAddress(), true, false, false ); aForString += aRef.GetRefString(this, nTab1); aForString += sSep; aForString += rParam.aRefColCell.GetRefString(this, nTab1); aForString += sSep; - aRef.Set( nCol1, nRow1, nTab1, false, sal_True, sal_True ); + aRef.Set( nCol1, nRow1, nTab1, false, true, true ); aForString += aRef.GetRefString(this, nTab1); nCol1++; nCol2 = Min( nCol2, (SCCOL)(rParam.aRefFormulaEnd.Col() - @@ -271,12 +271,12 @@ void ScDocument::InsertTableOp(const ScTabOpParam& rParam, // Mehrfachopera } else if (rParam.nMode == 1) // nur zeilenweise { - aRef.Set( rParam.aRefFormulaCell.GetAddress(), false, sal_True, false ); + aRef.Set( rParam.aRefFormulaCell.GetAddress(), false, true, false ); aForString += aRef.GetRefString(this, nTab1); aForString += sSep; aForString += rParam.aRefRowCell.GetRefString(this, nTab1); aForString += sSep; - aRef.Set( nCol1, nRow1, nTab1, sal_True, false, sal_True ); + aRef.Set( nCol1, nRow1, nTab1, true, false, true ); aForString += aRef.GetRefString(this, nTab1); nRow1++; nRow2 = Min( nRow2, (SCROW)(rParam.aRefFormulaEnd.Row() - @@ -288,12 +288,12 @@ void ScDocument::InsertTableOp(const ScTabOpParam& rParam, // Mehrfachopera aForString += sSep; aForString += rParam.aRefColCell.GetRefString(this, nTab1); aForString += sSep; - aRef.Set( nCol1, nRow1 + 1, nTab1, false, sal_True, sal_True ); + aRef.Set( nCol1, nRow1 + 1, nTab1, false, true, true ); aForString += aRef.GetRefString(this, nTab1); aForString += sSep; aForString += rParam.aRefRowCell.GetRefString(this, nTab1); aForString += sSep; - aRef.Set( nCol1 + 1, nRow1, nTab1, sal_True, false, sal_True ); + aRef.Set( nCol1 + 1, nRow1, nTab1, true, false, true ); aForString += aRef.GetRefString(this, nTab1); nCol1++; nRow1++; } @@ -383,8 +383,8 @@ bool ScDocument::MarkUsedExternalReferences( ScTokenArray & rArr ) return bAllMarked; } -sal_Bool ScDocument::GetNextSpellingCell(SCCOL& nCol, SCROW& nRow, SCTAB nTab, - sal_Bool bInSel, const ScMarkData& rMark) const +bool ScDocument::GetNextSpellingCell(SCCOL& nCol, SCROW& nRow, SCTAB nTab, + bool bInSel, const ScMarkData& rMark) const { if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab]) return maTabs[nTab]->GetNextSpellingCell( nCol, nRow, bInSel, rMark ); @@ -392,7 +392,7 @@ sal_Bool ScDocument::GetNextSpellingCell(SCCOL& nCol, SCROW& nRow, SCTAB nTab, return false; } -sal_Bool ScDocument::GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, SCTAB nTab, +bool ScDocument::GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, SCTAB nTab, const ScMarkData& rMark ) { if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab]) @@ -401,10 +401,10 @@ sal_Bool ScDocument::GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, SCTAB nTab, return false; } -sal_Bool ScDocument::ReplaceStyle(const SvxSearchItem& rSearchItem, +bool ScDocument::ReplaceStyle(const SvxSearchItem& rSearchItem, SCCOL nCol, SCROW nRow, SCTAB nTab, ScMarkData& rMark, - sal_Bool bIsUndoP) + bool bIsUndoP) { if (nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab]) return maTabs[nTab]->ReplaceStyle(rSearchItem, nCol, nRow, rMark, bIsUndoP); @@ -422,7 +422,7 @@ void ScDocument::CompileDBFormula() } } -void ScDocument::CompileDBFormula( sal_Bool bCreateFormulaString ) +void ScDocument::CompileDBFormula( bool bCreateFormulaString ) { TableContainer::iterator it = maTabs.begin(); for (;it != maTabs.end(); ++it) @@ -432,7 +432,7 @@ void ScDocument::CompileDBFormula( sal_Bool bCreateFormulaString ) } } -void ScDocument::CompileNameFormula( sal_Bool bCreateFormulaString ) +void ScDocument::CompileNameFormula( bool bCreateFormulaString ) { if ( pCondFormList ) pCondFormList->CompileAll(); // nach ScNameDlg noetig @@ -496,7 +496,7 @@ xub_StrLen ScDocument::GetMaxNumberStringLen( sal_uInt16& nPrecision, SCTAB nTab return 0; } -sal_Bool ScDocument::GetSelectionFunction( ScSubTotalFunc eFunc, +bool ScDocument::GetSelectionFunction( ScSubTotalFunc eFunc, const ScAddress& rCursor, const ScMarkData& rMark, double& rResult ) { @@ -534,14 +534,14 @@ sal_Bool ScDocument::GetSelectionFunction( ScSubTotalFunc eFunc, if (aData.nCount) rResult = aData.nVal / (double) aData.nCount; else - aData.bError = sal_True; + aData.bError = true; break; case SUBTOTAL_FUNC_MAX: case SUBTOTAL_FUNC_MIN: if (aData.nCount) rResult = aData.nVal; else - aData.bError = sal_True; + aData.bError = true; break; default: { @@ -667,7 +667,7 @@ const SfxPoolItem* ScDocument::GetEffItem( { const SfxItemSet& rSet = pPattern->GetItemSet(); const SfxPoolItem* pItem; - if ( rSet.GetItemState( ATTR_CONDITIONAL, sal_True, &pItem ) == SFX_ITEM_SET ) + if ( rSet.GetItemState( ATTR_CONDITIONAL, true, &pItem ) == SFX_ITEM_SET ) { sal_uLong nIndex = ((const SfxUInt32Item*)pItem)->GetValue(); if (nIndex && pCondFormList) @@ -682,7 +682,7 @@ const SfxPoolItem* ScDocument::GetEffItem( SfxStyleSheetBase* pStyleSheet = xPoolHelper->GetStylePool()->Find( aStyle, SFX_STYLE_FAMILY_PARA ); if ( pStyleSheet && pStyleSheet->GetItemSet().GetItemState( - nWhich, sal_True, &pItem ) == SFX_ITEM_SET ) + nWhich, true, &pItem ) == SFX_ITEM_SET ) return pItem; } } @@ -772,7 +772,7 @@ void ScDocument::SetCondFormList(ScConditionalFormatList* pNew) //------------------------------------------------------------------------ -sal_Bool ScDocument::HasDetectiveOperations() const +bool ScDocument::HasDetectiveOperations() const { return pDetOpList && pDetOpList->Count(); } @@ -891,10 +891,10 @@ sal_uInt16 ScDocument::ColDifferences( SCCOL nThisCol, SCTAB nThisTab, } void ScDocument::FindOrder( SCCOLROW* pOtherRows, SCCOLROW nThisEndRow, SCCOLROW nOtherEndRow, - sal_Bool bColumns, ScDocument& rOtherDoc, SCTAB nThisTab, SCTAB nOtherTab, + bool bColumns, ScDocument& rOtherDoc, SCTAB nThisTab, SCTAB nOtherTab, SCCOLROW nEndCol, SCCOLROW* pTranslate, ScProgress* pProgress, sal_uLong nProAdd ) { - // bColumns=sal_True: Zeilen sind Spalten und umgekehrt + // bColumns=true: Zeilen sind Spalten und umgekehrt SCCOLROW nMaxCont; // wieviel weiter SCCOLROW nMinGood; // was ist ein Treffer (incl.) @@ -909,18 +909,18 @@ void ScDocument::FindOrder( SCCOLROW* pOtherRows, SCCOLROW nThisEndRow, SCCOLROW nMaxCont = SC_DOCCOMP_ROWS; // 100 Zeilen nMinGood = SC_DOCCOMP_MINGOOD; } - sal_Bool bUseTotal = bColumns && !pTranslate; // nur beim ersten Durchgang + bool bUseTotal = bColumns && !pTranslate; // nur beim ersten Durchgang SCCOLROW nOtherRow = 0; sal_uInt16 nComp; SCCOLROW nThisRow; - sal_Bool bTotal = false; // ueber verschiedene nThisRow beibehalten + bool bTotal = false; // ueber verschiedene nThisRow beibehalten SCCOLROW nUnknown = 0; for (nThisRow = 0; nThisRow <= nThisEndRow; nThisRow++) { SCCOLROW nTempOther = nOtherRow; - sal_Bool bFound = false; + bool bFound = false; sal_uInt16 nBest = SC_DOCCOMP_MAXDIFF; SCCOLROW nMax = Min( nOtherEndRow, static_cast<SCCOLROW>(( nTempOther + nMaxCont + nUnknown )) ); for (SCCOLROW i=nTempOther; i<=nMax && nBest>0; i++) // bei 0 abbrechen @@ -933,12 +933,12 @@ void ScDocument::FindOrder( SCCOLROW* pOtherRows, SCCOLROW nThisEndRow, SCCOLROW { nTempOther = i; nBest = nComp; - bFound = sal_True; + bFound = true; } if ( nComp < SC_DOCCOMP_MAXDIFF || bFound ) bTotal = false; else if ( i == nTempOther && bUseTotal ) - bTotal = sal_True; // nur ganz oben + bTotal = true; // nur ganz oben } if ( bFound ) { @@ -960,7 +960,7 @@ void ScDocument::FindOrder( SCCOLROW* pOtherRows, SCCOLROW nThisEndRow, SCCOLROW SCROW nFillStart = 0; SCROW nFillPos = 0; - sal_Bool bInFill = false; + bool bInFill = false; for (nThisRow = 0; nThisRow <= nThisEndRow+1; nThisRow++) { SCROW nThisOther = ( nThisRow <= nThisEndRow ) ? pOtherRows[nThisRow] : (nOtherEndRow+1); @@ -983,7 +983,7 @@ void ScDocument::FindOrder( SCCOLROW* pOtherRows, SCCOLROW nThisEndRow, SCCOLROW nFillPos = nThisRow + 1; } else - bInFill = sal_True; + bInFill = true; } } @@ -1019,7 +1019,7 @@ void ScDocument::CompareDocument( ScDocument& rOtherDoc ) // auffuellen, damit einzeln umbenannte Tabellen nicht wegfallen SCTAB nFillStart = 0; SCTAB nFillPos = 0; - sal_Bool bInFill = false; + bool bInFill = false; for (nThisTab = 0; nThisTab <= nThisCount; nThisTab++) { SCTAB nThisOther = ( nThisTab < nThisCount ) ? pOtherTabs[nThisTab] : nOtherCount; @@ -1043,7 +1043,7 @@ void ScDocument::CompareDocument( ScDocument& rOtherDoc ) nFillPos = nThisTab + 1; } else - bInFill = sal_True; + bInFill = true; } // @@ -1094,7 +1094,7 @@ void ScDocument::CompareDocument( ScDocument& rOtherDoc ) FindOrder( pTempRows, nThisEndRow, nOtherEndRow, false, rOtherDoc, nThisTab, nOtherTab, nEndCol, NULL, &aProgress, 0 ); // 2 - FindOrder( pOtherCols, nThisEndCol, nOtherEndCol, sal_True, + FindOrder( pOtherCols, nThisEndCol, nOtherEndCol, true, rOtherDoc, nThisTab, nOtherTab, nEndRow, NULL, NULL, 0 ); FindOrder( pOtherRows, nThisEndRow, nOtherEndRow, false, rOtherDoc, nThisTab, nOtherTab, nThisEndCol, diff --git a/sc/source/core/data/documen5.cxx b/sc/source/core/data/documen5.cxx index f89e62db0a41..1b755aad8e4d 100644 --- a/sc/source/core/data/documen5.cxx +++ b/sc/source/core/data/documen5.cxx @@ -203,7 +203,7 @@ void ScDocument::UpdateAllCharts() pChartCollection->clear(); } -sal_Bool ScDocument::HasChartAtPoint( SCTAB nTab, const Point& rPos, String* pName ) +bool ScDocument::HasChartAtPoint( SCTAB nTab, const Point& rPos, String* pName ) { if (pDrawLayer && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab]) { @@ -223,7 +223,7 @@ sal_Bool ScDocument::HasChartAtPoint( SCTAB nTab, const Point& rPos, String* pNa { if (pName) *pName = ((SdrOle2Obj*)pObject)->GetPersistName(); - return sal_True; + return true; } } pObject = aIter.Next(); @@ -236,8 +236,8 @@ sal_Bool ScDocument::HasChartAtPoint( SCTAB nTab, const Point& rPos, String* pNa } void ScDocument::UpdateChartArea( const String& rChartName, - const ScRange& rNewArea, sal_Bool bColHeaders, sal_Bool bRowHeaders, - sal_Bool bAdd ) + const ScRange& rNewArea, bool bColHeaders, bool bRowHeaders, + bool bAdd ) { ScRangeListRef aRLR( new ScRangeList ); aRLR->Append( rNewArea ); @@ -308,7 +308,7 @@ void ScDocument::SetChartRanges( const String& rChartName, const ::std::vector< } void ScDocument::GetOldChartParameters( const String& rName, - ScRangeList& rRanges, sal_Bool& rColHeaders, sal_Bool& rRowHeaders ) + ScRangeList& rRanges, bool& rColHeaders, bool& rRowHeaders ) { // used for undo of changing chart source area @@ -357,8 +357,8 @@ void ScDocument::GetOldChartParameters( const String& rName, } void ScDocument::UpdateChartArea( const String& rChartName, - const ScRangeListRef& rNewList, sal_Bool bColHeaders, sal_Bool bRowHeaders, - sal_Bool bAdd ) + const ScRangeListRef& rNewList, bool bColHeaders, bool bRowHeaders, + bool bAdd ) { if (!pDrawLayer) return; @@ -386,7 +386,7 @@ void ScDocument::UpdateChartArea( const String& rChartName, rtl::OUString aRangesStr; lcl_GetChartParameters( xChartDoc, aRangesStr, eDataRowSource, bHasCategories, bFirstCellAsLabel ); - sal_Bool bInternalData = xChartDoc->hasInternalDataProvider(); + bool bInternalData = xChartDoc->hasInternalDataProvider(); if ( bAdd && !bInternalData ) { @@ -452,7 +452,7 @@ void ScDocument::UpdateChart( const String& rChartName ) uno::Reference< util::XModifiable > xModif( xChartDoc, uno::UNO_QUERY_THROW ); if( apTemporaryChartLock.get() ) apTemporaryChartLock->AlsoLockThisChart( uno::Reference< frame::XModel >( xModif, uno::UNO_QUERY ) ); - xModif->setModified( sal_True ); + xModif->setModified( true ); } catch ( uno::Exception& ) { @@ -512,8 +512,8 @@ void ScDocument::UpdateChartRef( UpdateRefMode eUpdateRefMode, (ScChartListener*) (pChartListenerCollection->At(nIndex)); ScRangeListRef aRLR( pChartListener->GetRangeList() ); ScRangeListRef aNewRLR( new ScRangeList ); - sal_Bool bChanged = false; - sal_Bool bDataChanged = false; + bool bChanged = false; + bool bDataChanged = false; for ( size_t i = 0, nListSize = aRLR->size(); i < nListSize; ++i ) { ScRange* pR = (*aRLR)[i]; @@ -531,7 +531,7 @@ void ScDocument::UpdateChartRef( UpdateRefMode eUpdateRefMode, theCol2,theRow2,theTab2 ); if ( eRes != UR_NOTHING ) { - bChanged = sal_True; + bChanged = true; aNewRLR->Append( ScRange( theCol1, theRow1, theTab1, theCol2, theRow2, theTab2 )); @@ -545,7 +545,7 @@ void ScDocument::UpdateChartRef( UpdateRefMode eUpdateRefMode, || (pR->aEnd.Tab() - pR->aStart.Tab() != theTab2 - theTab1))) ) { - bDataChanged = sal_True; + bDataChanged = true; } } else @@ -636,7 +636,7 @@ void ScDocument::SetChartRangeList( const String& rChartName, } -sal_Bool ScDocument::HasData( SCCOL nCol, SCROW nRow, SCTAB nTab ) +bool ScDocument::HasData( SCCOL nCol, SCROW nRow, SCTAB nTab ) { if (nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab]) return maTabs[nTab]->HasData( nCol, nRow ); @@ -680,7 +680,7 @@ uno::Reference< embed::XEmbeddedObject > return uno::Reference< embed::XEmbeddedObject >(); } -sal_Bool lcl_StringInCollection( const ScStrCollection* pColl, const String& rStr ) +bool lcl_StringInCollection( const ScStrCollection* pColl, const String& rStr ) { if ( !pColl ) return false; @@ -722,7 +722,7 @@ void ScDocument::UpdateChartListenerCollection() if ( pChartListenerCollection->Search( &aCLSearcher, nIndex ) ) { ((ScChartListener*) (pChartListenerCollection-> - At( nIndex )))->SetUsed( sal_True ); + At( nIndex )))->SetUsed( true ); } else if ( lcl_StringInCollection( pOtherObjects, aObjName ) ) { diff --git a/sc/source/core/data/documen6.cxx b/sc/source/core/data/documen6.cxx index 089997ad6d14..a6dd7833a8e0 100644 --- a/sc/source/core/data/documen6.cxx +++ b/sc/source/core/data/documen6.cxx @@ -70,7 +70,7 @@ const uno::Reference< i18n::XBreakIterator >& ScDocument::GetBreakIterator() return pScriptTypeData->xBreakIter; } -sal_Bool ScDocument::HasStringWeakCharacters( const String& rString ) +bool ScDocument::HasStringWeakCharacters( const String& rString ) { if (rString.Len()) { @@ -85,7 +85,7 @@ sal_Bool ScDocument::HasStringWeakCharacters( const String& rString ) { sal_Int16 nType = xBreakIter->getScriptType( aText, nPos ); if ( nType == i18n::ScriptType::WEAK ) - return sal_True; // found + return true; // found nPos = xBreakIter->endOfScript( aText, nPos, nType ); } diff --git a/sc/source/core/data/documen7.cxx b/sc/source/core/data/documen7.cxx index 5a8b2798e083..9e9045d5f1ca 100644 --- a/sc/source/core/data/documen7.cxx +++ b/sc/source/core/data/documen7.cxx @@ -94,7 +94,7 @@ void ScDocument::Broadcast( const ScHint& rHint ) if ( !nHardRecalcState ) { ScBulkBroadcast aBulkBroadcast( pBASM); // scoped bulk broadcast - sal_Bool bIsBroadcasted = false; + bool bIsBroadcasted = false; ScBaseCell* pCell = rHint.GetCell(); if ( pCell ) { @@ -102,7 +102,7 @@ void ScDocument::Broadcast( const ScHint& rHint ) if ( pBC ) { pBC->Broadcast( rHint ); - bIsBroadcasted = sal_True; + bIsBroadcasted = true; } } if ( pBASM->AreaBroadcast( rHint ) || bIsBroadcasted ) @@ -258,27 +258,27 @@ void ScDocument::RemoveFromFormulaTree( ScFormulaCell* pCell ) } -sal_Bool ScDocument::IsInFormulaTree( ScFormulaCell* pCell ) const +bool ScDocument::IsInFormulaTree( ScFormulaCell* pCell ) const { return pCell->GetPrevious() || pFormulaTree == pCell; } -void ScDocument::CalcFormulaTree( sal_Bool bOnlyForced, sal_Bool bNoProgress ) +void ScDocument::CalcFormulaTree( bool bOnlyForced, bool bNoProgress ) { OSL_ENSURE( !IsCalculatingFormulaTree(), "CalcFormulaTree recursion" ); // never ever recurse into this, might end up lost in infinity if ( IsCalculatingFormulaTree() ) return ; - bCalculatingFormulaTree = sal_True; + bCalculatingFormulaTree = true; SetForcedFormulaPending( false ); - sal_Bool bOldIdleDisabled = IsIdleDisabled(); - DisableIdle( sal_True ); - sal_Bool bOldAutoCalc = GetAutoCalc(); - //! _nicht_ SetAutoCalc( sal_True ) weil das evtl. CalcFormulaTree( sal_True ) + bool bOldIdleDisabled = IsIdleDisabled(); + DisableIdle( true ); + bool bOldAutoCalc = GetAutoCalc(); + //! _nicht_ SetAutoCalc( true ) weil das evtl. CalcFormulaTree( true ) //! aufruft, wenn vorher disabled war und bHasForcedFormulas gesetzt ist - bAutoCalc = sal_True; + bAutoCalc = true; if ( nHardRecalcState ) CalcAll(); else @@ -306,9 +306,9 @@ void ScDocument::CalcFormulaTree( sal_Bool bOnlyForced, sal_Bool bNoProgress ) } } } - sal_Bool bProgress = !bOnlyForced && nFormulaCodeInTree && !bNoProgress; + bool bProgress = !bOnlyForced && nFormulaCodeInTree && !bNoProgress; if ( bProgress ) - ScProgress::CreateInterpretProgress( this, sal_True ); + ScProgress::CreateInterpretProgress( this, true ); pCell = pFormulaTree; ScFormulaCell* pLastNoGood = 0; @@ -424,7 +424,7 @@ void ScDocument::RemoveFromFormulaTrack( ScFormulaCell* pCell ) } -sal_Bool ScDocument::IsInFormulaTrack( ScFormulaCell* pCell ) const +bool ScDocument::IsInFormulaTrack( ScFormulaCell* pCell ) const { return pCell->GetPreviousTrack() || pFormulaTrack == pCell; } @@ -462,24 +462,24 @@ void ScDocument::TrackFormulas( sal_uLong nHintId ) pTrack = pTrack->GetNextTrack(); } while ( pTrack ); pTrack = pFormulaTrack; - sal_Bool bHaveForced = false; + bool bHaveForced = false; do { pNext = pTrack->GetNextTrack(); RemoveFromFormulaTrack( pTrack ); PutInFormulaTree( pTrack ); if ( pTrack->GetCode()->IsRecalcModeForced() ) - bHaveForced = sal_True; + bHaveForced = true; pTrack = pNext; } while ( pTrack ); if ( bHaveForced ) { - SetForcedFormulas( sal_True ); + SetForcedFormulas( true ); if ( bAutoCalc && !IsAutoCalcShellDisabled() && !IsInInterpreter() && !IsCalculatingFormulaTree() ) - CalcFormulaTree( sal_True ); + CalcFormulaTree( true ); else - SetForcedFormulaPending( sal_True ); + SetForcedFormulaPending( true ); } } OSL_ENSURE( nFormulaTrackCount==0, "TrackFormulas: nFormulaTrackCount!=0" ); @@ -497,7 +497,7 @@ void ScDocument::UpdateBroadcastAreas( UpdateRefMode eUpdateRefMode, const ScRange& rRange, SCsCOL nDx, SCsROW nDy, SCsTAB nDz ) { - sal_Bool bExpandRefsOld = IsExpandRefs(); + bool bExpandRefsOld = IsExpandRefs(); if ( eUpdateRefMode == URM_INSDEL && (nDx > 0 || nDy > 0 || nDz > 0) ) SetExpandRefs( SC_MOD()->GetInputOptions().GetExpandRefs() ); if ( pBASM ) @@ -505,16 +505,16 @@ void ScDocument::UpdateBroadcastAreas( UpdateRefMode eUpdateRefMode, SetExpandRefs( bExpandRefsOld ); } -void ScDocument::SetAutoCalc( sal_Bool bNewAutoCalc ) +void ScDocument::SetAutoCalc( bool bNewAutoCalc ) { - sal_Bool bOld = bAutoCalc; + bool bOld = bAutoCalc; bAutoCalc = bNewAutoCalc; if ( !bOld && bNewAutoCalc && bHasForcedFormulas ) { if ( IsAutoCalcShellDisabled() ) - SetForcedFormulaPending( sal_True ); + SetForcedFormulaPending( true ); else if ( !IsInInterpreter() ) - CalcFormulaTree( sal_True ); + CalcFormulaTree( true ); } } diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx index 61dc83799a09..d29a59cd5ebd 100644 --- a/sc/source/core/data/documen8.cxx +++ b/sc/source/core/data/documen8.cxx @@ -130,7 +130,7 @@ void ScDocument::ImplDeleteOptions() //------------------------------------------------------------------------ -SfxPrinter* ScDocument::GetPrinter(sal_Bool bCreateIfNotExist) +SfxPrinter* ScDocument::GetPrinter(bool bCreateIfNotExist) { if ( !pPrinter && bCreateIfNotExist ) { @@ -255,7 +255,7 @@ void ScDocument::ModifyStyleSheet( SfxStyleSheetBase& rStyleSheet, if( SvtLanguageOptions().IsCTLFontEnabled() ) { const SfxPoolItem *pItem = NULL; - if( rChanges.GetItemState(ATTR_WRITINGDIR, sal_True, &pItem ) == SFX_ITEM_SET ) + if( rChanges.GetItemState(ATTR_WRITINGDIR, true, &pItem ) == SFX_ITEM_SET ) ScChartHelper::DoUpdateAllCharts( this ); } } @@ -263,7 +263,7 @@ void ScDocument::ModifyStyleSheet( SfxStyleSheetBase& rStyleSheet, case SFX_STYLE_FAMILY_PARA: { - sal_Bool bNumFormatChanged; + bool bNumFormatChanged; if ( ScGlobal::CheckWidthInvalidate( bNumFormatChanged, rSet, rChanges ) ) InvalidateTextWidth( NULL, NULL, bNumFormatChanged ); @@ -345,9 +345,9 @@ void ScDocument::InvalidateTextWidth( SCTAB nTab ) //------------------------------------------------------------------------ -sal_Bool ScDocument::IsPageStyleInUse( const String& rStrPageStyle, SCTAB* pInTab ) +bool ScDocument::IsPageStyleInUse( const String& rStrPageStyle, SCTAB* pInTab ) { - sal_Bool bInUse = false; + bool bInUse = false; const SCTAB nCount = GetTableCount(); SCTAB i; @@ -362,30 +362,30 @@ sal_Bool ScDocument::IsPageStyleInUse( const String& rStrPageStyle, SCTAB* pInTa //------------------------------------------------------------------------ -sal_Bool ScDocument::RemovePageStyleInUse( const String& rStyle ) +bool ScDocument::RemovePageStyleInUse( const String& rStyle ) { - sal_Bool bWasInUse = false; + bool bWasInUse = false; const SCTAB nCount = GetTableCount(); for ( SCTAB i=0; i<nCount && maTabs[i]; i++ ) if ( maTabs[i]->GetPageStyle() == rStyle ) { - bWasInUse = sal_True; + bWasInUse = true; maTabs[i]->SetPageStyle( ScGlobal::GetRscString(STR_STYLENAME_STANDARD) ); } return bWasInUse; } -sal_Bool ScDocument::RenamePageStyleInUse( const String& rOld, const String& rNew ) +bool ScDocument::RenamePageStyleInUse( const String& rOld, const String& rNew ) { - sal_Bool bWasInUse = false; + bool bWasInUse = false; const SCTAB nCount = GetTableCount(); for ( SCTAB i=0; i<nCount && maTabs[i]; i++ ) if ( maTabs[i]->GetPageStyle() == rOld ) { - bWasInUse = sal_True; + bWasInUse = true; maTabs[i]->SetPageStyle( rNew ); } @@ -426,9 +426,9 @@ ScMacroManager* ScDocument::GetMacroManager() //------------------------------------------------------------------------ void ScDocument::InvalidateTextWidth( const ScAddress* pAdrFrom, const ScAddress* pAdrTo, - sal_Bool bNumFormatChanged ) + bool bNumFormatChanged ) { - sal_Bool bBroadcast = (bNumFormatChanged && GetDocOptions().IsCalcAsShown() && !IsImportingXML() && !IsClipboard()); + bool bBroadcast = (bNumFormatChanged && GetDocOptions().IsCalcAsShown() && !IsImportingXML() && !IsClipboard()); if ( pAdrFrom && !pAdrTo ) { const SCTAB nTab = pAdrFrom->Tab(); @@ -452,12 +452,12 @@ void ScDocument::InvalidateTextWidth( const ScAddress* pAdrFrom, const ScAddress #define CALCMAX 1000 // Berechnungen #define ABORT_EVENTS (VCL_INPUT_ANY & ~VCL_INPUT_TIMER & ~VCL_INPUT_OTHER) -sal_Bool ScDocument::IdleCalcTextWidth() // sal_True = demnaechst wieder versuchen +bool ScDocument::IdleCalcTextWidth() // true = demnaechst wieder versuchen { // #i75610# if a printer hasn't been set or created yet, don't create one for this if ( bIdleDisabled || IsInLinkUpdate() || GetPrinter(false) == NULL ) return false; - bIdleDisabled = sal_True; + bIdleDisabled = true; const sal_uLong nStart = Time::GetSystemTicks(); OutputDevice* pDev = NULL; @@ -470,7 +470,7 @@ sal_Bool ScDocument::IdleCalcTextWidth() // sal_True = demnaechst wie SCTAB nTab = aCurTextWidthCalcPos.Tab(); SCROW nRow = aCurTextWidthCalcPos.Row(); SCsCOL nCol = aCurTextWidthCalcPos.Col(); - sal_Bool bNeedMore= false; + bool bNeedMore= false; if ( !ValidRow(nRow) ) nRow = 0, nCol--; @@ -494,7 +494,7 @@ sal_Bool ScDocument::IdleCalcTextWidth() // sal_True = demnaechst wie OSL_ENSURE( pStyle, "Missing StyleSheet :-/" ); - sal_Bool bProgress = false; + bool bProgress = false; if ( pStyle && 0 == GET_SCALEVALUE(pStyle->GetItemSet(),ATTR_PAGE_SCALETOPAGES) ) { sal_uInt16 nRestart = 0; @@ -528,22 +528,22 @@ sal_Bool ScDocument::IdleCalcTextWidth() // sal_True = demnaechst wie && ((ScFormulaCell*)pCell)->GetDirty() ) { ScProgress::CreateInterpretProgress( this, false ); - bProgress = sal_True; + bProgress = true; } sal_uInt16 nNewWidth = (sal_uInt16)GetNeededSize( nCol, nRow, nTab, pDev, nPPTX, nPPTY, - aZoomFract,aZoomFract, sal_True, - sal_True ); // bTotalSize + aZoomFract,aZoomFract, true, + true ); // bTotalSize pCell->SetTextWidth( nNewWidth ); - bNeedMore = sal_True; + bNeedMore = true; } } else { - sal_Bool bNewTab = false; + bool bNewTab = false; nRow = 0; nCol--; @@ -552,14 +552,14 @@ sal_Bool ScDocument::IdleCalcTextWidth() // sal_True = demnaechst wie { nCol = MAXCOL; nTab++; - bNewTab = sal_True; + bNewTab = true; } if ( !ValidTab(nTab) || nTab >= static_cast<SCTAB>(maTabs.size()) || !maTabs[nTab] ) { nTab = 0; nRestart++; - bNewTab = sal_True; + bNewTab = true; } if ( nRestart < 2 ) @@ -634,7 +634,7 @@ sal_Bool ScDocument::IdleCalcTextWidth() // sal_True = demnaechst wie class ScSpellStatus { public: - sal_Bool bModified; + bool bModified; ScSpellStatus() : bModified(false) {}; @@ -645,7 +645,7 @@ IMPL_LINK( ScSpellStatus, EventHdl, EditStatus *, pStatus ) { sal_uLong nStatus = pStatus->GetStatusWord(); if ( nStatus & EE_STAT_WRONGWORDCHANGED ) - bModified = sal_True; + bModified = true; return 0; } @@ -661,7 +661,7 @@ IMPL_LINK( ScSpellStatus, EventHdl, EditStatus *, pStatus ) #define SPELL_MAXTEST_ALL 3 #define SPELL_MAXCELLS 256 -sal_Bool ScDocument::OnlineSpellInRange( const ScRange& rSpellRange, ScAddress& rSpellPos, +bool ScDocument::OnlineSpellInRange( const ScRange& rSpellRange, ScAddress& rSpellPos, sal_uInt16 nMaxTest ) { ScEditEngineDefaulter* pEngine = NULL; //! am Dokument speichern @@ -670,7 +670,7 @@ sal_Bool ScDocument::OnlineSpellInRange( const ScRange& rSpellRange, ScAddress& sal_uInt16 nCellCount = 0; // Zellen insgesamt sal_uInt16 nTestCount = 0; // Aufrufe Spelling - sal_Bool bChanged = false; // Aenderungen? + bool bChanged = false; // Aenderungen? SCCOL nCol = rSpellRange.aStart.Col(); // iterator always starts on the left edge SCROW nRow = rSpellPos.Row(); @@ -743,7 +743,7 @@ sal_Bool ScDocument::OnlineSpellInRange( const ScRange& rSpellRange, ScAddress& pEngine->CompleteOnlineSpelling(); if ( aStatus.bModified ) // Fehler dazu oder weggekommen? { - sal_Bool bNeedEdit = sal_True; // Test auf einfachen Text + bool bNeedEdit = true; // Test auf einfachen Text if ( !pEngine->HasOnlineSpellErrors() ) { ScEditAttrTester aTester( pEngine ); @@ -774,7 +774,7 @@ sal_Bool ScDocument::OnlineSpellInRange( const ScRange& rSpellRange, ScAddress& pShell->Broadcast( aHint ); } - bChanged = sal_True; + bChanged = true; } if ( ++nTestCount >= nMaxTest ) // checked enough text? @@ -816,24 +816,24 @@ sal_Bool ScDocument::OnlineSpellInRange( const ScRange& rSpellRange, ScAddress& } -sal_Bool ScDocument::ContinueOnlineSpelling() +bool ScDocument::ContinueOnlineSpelling() { if ( bIdleDisabled || !pDocOptions->IsAutoSpell() || (pShell && pShell->IsReadOnly()) ) return false; // #i48433# set bInsertingFromOtherDoc flag so there are no broadcasts when PutCell is called // (same behavior as in RemoveAutoSpellObj: just transfer the broadcaster) - sal_Bool bOldInserting = IsInsertingFromOtherDoc(); - SetInsertingFromOtherDoc( sal_True ); + bool bOldInserting = IsInsertingFromOtherDoc(); + SetInsertingFromOtherDoc( true ); //! use one EditEngine for both calls // first check visible range - sal_Bool bResult = OnlineSpellInRange( aVisSpellRange, aVisSpellPos, SPELL_MAXTEST_VIS ); + bool bResult = OnlineSpellInRange( aVisSpellRange, aVisSpellPos, SPELL_MAXTEST_VIS ); // during first pass through visible range, always continue if ( nVisSpellState == VSPL_START ) - bResult = sal_True; + bResult = true; if (bResult) { @@ -862,13 +862,13 @@ void ScDocument::SetOnlineSpellPos( const ScAddress& rPos ) aOnlineSpellPos = aVisSpellRange.aEnd; } -sal_Bool ScDocument::SetVisibleSpellRange( const ScRange& rNewRange ) +bool ScDocument::SetVisibleSpellRange( const ScRange& rNewRange ) { - sal_Bool bChange = ( aVisSpellRange != rNewRange ); + bool bChange = ( aVisSpellRange != rNewRange ); if (bChange) { // continue spelling through visible range when scrolling down - sal_Bool bContDown = ( nVisSpellState == VSPL_START && rNewRange.In( aVisSpellPos ) && + bool bContDown = ( nVisSpellState == VSPL_START && rNewRange.In( aVisSpellPos ) && rNewRange.aStart.Row() > aVisSpellRange.aStart.Row() && rNewRange.aStart.Col() == aVisSpellRange.aStart.Col() && rNewRange.aEnd.Col() == aVisSpellRange.aEnd.Col() ); @@ -908,9 +908,9 @@ void ScDocument::RepaintRange( const ScRange& rRange ) //------------------------------------------------------------------------ -sal_Bool ScDocument::IdleCheckLinks() // sal_True = demnaechst wieder versuchen +bool ScDocument::IdleCheckLinks() // true = demnaechst wieder versuchen { - sal_Bool bAnyLeft = false; + bool bAnyLeft = false; if (GetLinkManager()) { @@ -926,7 +926,7 @@ sal_Bool ScDocument::IdleCheckLinks() // sal_True = demnaechst wieder { pDdeLink->TryUpdate(); if (pDdeLink->NeedsUpdate()) // war nix? - bAnyLeft = sal_True; + bAnyLeft = true; } } } @@ -938,7 +938,7 @@ sal_Bool ScDocument::IdleCheckLinks() // sal_True = demnaechst wieder void ScDocument::SaveDdeLinks(SvStream& rStream) const { // bei 4.0-Export alle mit Modus != DEFAULT weglassen - sal_Bool bExport40 = ( rStream.GetVersion() <= SOFFICE_FILEFORMAT_40 ); + bool bExport40 = ( rStream.GetVersion() <= SOFFICE_FILEFORMAT_40 ); const ::sfx2::SvBaseLinks& rLinks = GetLinkManager()->GetLinks(); sal_uInt16 nCount = rLinks.Count(); @@ -1003,7 +1003,7 @@ bool ScDocument::HasDdeLinks() const return false; } -void ScDocument::SetInLinkUpdate(sal_Bool bSet) +void ScDocument::SetInLinkUpdate(bool bSet) { // called from TableLink and AreaLink @@ -1011,7 +1011,7 @@ void ScDocument::SetInLinkUpdate(sal_Bool bSet) bInLinkUpdate = bSet; } -sal_Bool ScDocument::IsInLinkUpdate() const +bool ScDocument::IsInLinkUpdate() const { return bInLinkUpdate || IsInDdeLinkUpdate(); } @@ -1061,7 +1061,7 @@ void ScDocument::UpdateExternalRefLinks(Window* pWin) // #i101960# set document modified, as in TrackTimeHdl for DDE links if (!pShell->IsModified()) { - pShell->SetModified( sal_True ); + pShell->SetModified( true ); SfxBindings* pBindings = GetViewBindings(); if (pBindings) { @@ -1127,13 +1127,13 @@ void ScDocument::UpdateDdeLinks(Window* pWin) } } -sal_Bool ScDocument::UpdateDdeLink( const String& rAppl, const String& rTopic, const String& rItem ) +bool ScDocument::UpdateDdeLink( const String& rAppl, const String& rTopic, const String& rItem ) { // fuer refresh() per StarOne Api // ResetValue() fuer einzelnen Link nicht noetig //! wenn's mal alles asynchron wird, aber auch hier - sal_Bool bFound = false; + bool bFound = false; if (GetLinkManager()) { const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks(); @@ -1149,7 +1149,7 @@ sal_Bool ScDocument::UpdateDdeLink( const String& rAppl, const String& rTopic, c pDdeLink->GetItem() == rItem ) { pDdeLink->TryUpdate(); - bFound = sal_True; // koennen theoretisch mehrere sein (Mode), darum weitersuchen + bFound = true; // koennen theoretisch mehrere sein (Mode), darum weitersuchen } } } @@ -1480,12 +1480,12 @@ void ScDocument::KeyInput( const KeyEvent& ) // ---------------------------------------------------------------------------- -sal_Bool ScDocument::CheckMacroWarn() +bool ScDocument::CheckMacroWarn() { // The check for macro configuration, macro warning and disabling is now handled // in SfxObjectShell::AdjustMacroMode, called by SfxObjectShell::CallBasic. - return sal_True; + return true; } //------------------------------------------------------------------------ @@ -1524,7 +1524,7 @@ void ScDocument::TransliterateText( const ScMarkData& rMultiMark, sal_Int32 nTyp OSL_ENSURE( rMultiMark.IsMultiMarked(), "TransliterateText: no selection" ); utl::TransliterationWrapper aTranslitarationWrapper( xServiceManager, nType ); - sal_Bool bConsiderLanguage = aTranslitarationWrapper.needLanguageForTheMode(); + bool bConsiderLanguage = aTranslitarationWrapper.needLanguageForTheMode(); sal_uInt16 nLanguage = LANGUAGE_SYSTEM; ScEditEngineDefaulter* pEngine = NULL; // not using pEditEngine member because of defaults @@ -1538,7 +1538,7 @@ void ScDocument::TransliterateText( const ScMarkData& rMultiMark, sal_Int32 nTyp SCCOL nCol = 0; SCROW nRow = 0; - sal_Bool bFound = rMultiMark.IsCellMarked( nCol, nRow ); + bool bFound = rMultiMark.IsCellMarked( nCol, nRow ); if (!bFound) bFound = GetNextMarkedCell( nCol, nRow, nTab, rMultiMark ); @@ -1560,7 +1560,7 @@ void ScDocument::TransliterateText( const ScMarkData& rMultiMark, sal_Int32 nTyp const ScPatternAttr* pPattern = GetPattern( nCol, nRow, nTab ); SfxItemSet* pDefaults = new SfxItemSet( pEngine->GetEmptyItemSet() ); pPattern->FillEditItemSet( pDefaults ); - pEngine->SetDefaults( pDefaults, sal_True ); + pEngine->SetDefaults( pDefaults, true ); if ( eType == CELLTYPE_STRING ) pEngine->SetText( static_cast<const ScStringCell*>(pCell)->GetString() ); @@ -1586,7 +1586,7 @@ void ScDocument::TransliterateText( const ScMarkData& rMultiMark, sal_Int32 nTyp { // remove defaults (paragraph attributes) before creating text object SfxItemSet* pEmpty = new SfxItemSet( pEngine->GetEmptyItemSet() ); - pEngine->SetDefaults( pEmpty, sal_True ); + pEngine->SetDefaults( pEmpty, true ); EditTextObject* pNewData = pEngine->CreateTextObject(); PutCell( nCol, nRow, nTab, diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx index 96c9a379d5e8..746cbfb689a6 100644 --- a/sc/source/core/data/documen9.cxx +++ b/sc/source/core/data/documen9.cxx @@ -199,7 +199,7 @@ void ScDocument::UpdateDrawDefaults() if ( pDrawLayer && bSetDrawDefaults ) { SfxItemPool& rDrawPool = pDrawLayer->GetItemPool(); - rDrawPool.SetPoolDefaultItem( SvxAutoKernItem( sal_True, EE_CHAR_PAIRKERNING ) ); + rDrawPool.SetPoolDefaultItem( SvxAutoKernItem( true, EE_CHAR_PAIRKERNING ) ); } } @@ -221,7 +221,7 @@ void ScDocument::SetDrawPageSize(SCTAB nTab) maTabs[nTab]->SetDrawPageSize(); } -sal_Bool ScDocument::IsChart( const SdrObject* pObject ) +bool ScDocument::IsChart( const SdrObject* pObject ) { // #109985# // IsChart() implementation moved to svx drawinglayer @@ -244,7 +244,7 @@ void ScDocument::DeleteDrawLayer() delete pDrawLayer; } -sal_Bool ScDocument::DrawGetPrintArea( ScRange& rRange, sal_Bool bSetHor, sal_Bool bSetVer ) const +bool ScDocument::DrawGetPrintArea( ScRange& rRange, bool bSetHor, bool bSetVer ) const { return pDrawLayer->GetPrintArea( rRange, bSetHor, bSetVer ); } @@ -281,7 +281,7 @@ void ScDocument::DeleteObjectsInSelection( const ScMarkData& rMark ) pDrawLayer->DeleteObjectsInSelection( rMark ); } -sal_Bool ScDocument::HasOLEObjectsInArea( const ScRange& rRange, const ScMarkData* pTabMark ) +bool ScDocument::HasOLEObjectsInArea( const ScRange& rRange, const ScMarkData* pTabMark ) { // pTabMark is used only for selected tables. If pTabMark is 0, all tables of rRange are used. @@ -313,7 +313,7 @@ sal_Bool ScDocument::HasOLEObjectsInArea( const ScRange& rRange, const ScMarkDat { if ( pObject->GetObjIdentifier() == OBJ_OLE2 && aMMRect.IsInside( pObject->GetCurrentBoundRect() ) ) - return sal_True; + return true; pObject = aIter.Next(); } @@ -352,7 +352,7 @@ void ScDocument::StartAnimations( SCTAB nTab, Window* pWin ) } -sal_Bool ScDocument::HasBackgroundDraw( SCTAB nTab, const Rectangle& rMMRect ) const +bool ScDocument::HasBackgroundDraw( SCTAB nTab, const Rectangle& rMMRect ) const { // Gibt es Objekte auf dem Hintergrund-Layer, die (teilweise) von rMMRect // betroffen sind? @@ -366,21 +366,21 @@ sal_Bool ScDocument::HasBackgroundDraw( SCTAB nTab, const Rectangle& rMMRect ) c if (!pPage) return false; - sal_Bool bFound = false; + bool bFound = false; SdrObjListIter aIter( *pPage, IM_FLAT ); SdrObject* pObject = aIter.Next(); while (pObject && !bFound) { if ( pObject->GetLayer() == SC_LAYER_BACK && pObject->GetCurrentBoundRect().IsOver( rMMRect ) ) - bFound = sal_True; + bFound = true; pObject = aIter.Next(); } return bFound; } -sal_Bool ScDocument::HasAnyDraw( SCTAB nTab, const Rectangle& rMMRect ) const +bool ScDocument::HasAnyDraw( SCTAB nTab, const Rectangle& rMMRect ) const { // Gibt es ueberhaupt Objekte, die (teilweise) von rMMRect // betroffen sind? @@ -393,14 +393,14 @@ sal_Bool ScDocument::HasAnyDraw( SCTAB nTab, const Rectangle& rMMRect ) const if (!pPage) return false; - sal_Bool bFound = false; + bool bFound = false; SdrObjListIter aIter( *pPage, IM_FLAT ); SdrObject* pObject = aIter.Next(); while (pObject && !bFound) { if ( pObject->GetCurrentBoundRect().IsOver( rMMRect ) ) - bFound = sal_True; + bFound = true; pObject = aIter.Next(); } @@ -452,8 +452,8 @@ SdrObject* ScDocument::GetObjectAtPoint( SCTAB nTab, const Point& rPos ) return pFound; } -sal_Bool ScDocument::IsPrintEmpty( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, - SCCOL nEndCol, SCROW nEndRow, sal_Bool bLeftIsEmpty, +bool ScDocument::IsPrintEmpty( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, + SCCOL nEndCol, SCROW nEndRow, bool bLeftIsEmpty, ScRange* pLastRange, Rectangle* pLastMM ) const { if (!IsBlockEmpty( nTab, nStartCol, nStartRow, nEndCol, nEndRow )) @@ -515,10 +515,10 @@ sal_Bool ScDocument::IsPrintEmpty( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, return false; } - return sal_True; + return true; } -void ScDocument::Clear( sal_Bool bFromDestructor ) +void ScDocument::Clear( bool bFromDestructor ) { TableContainer::iterator it = maTabs.begin(); for (;it != maTabs.end(); ++it) @@ -533,12 +533,12 @@ void ScDocument::Clear( sal_Bool bFromDestructor ) } } -sal_Bool ScDocument::HasDetectiveObjects(SCTAB nTab) const +bool ScDocument::HasDetectiveObjects(SCTAB nTab) const { // looks for detective objects, annotations don't count // (used to adjust scale so detective objects hit their cells better) - sal_Bool bFound = false; + bool bFound = false; if (pDrawLayer) { @@ -552,7 +552,7 @@ sal_Bool ScDocument::HasDetectiveObjects(SCTAB nTab) const { // anything on the internal layer except captions (annotations) if ( (pObject->GetLayer() == SC_LAYER_INTERN) && !ScDrawLayer::IsNoteCaption( pObject ) ) - bFound = sal_True; + bFound = true; pObject = aIter.Next(); } @@ -570,7 +570,7 @@ void ScDocument::UpdateFontCharSet() // Alles, was nicht SYMBOL ist, wird auf den System-CharSet umgesetzt. // Bei neuen Dokumenten (Version SC_FONTCHARSET) sollte der CharSet stimmen. - sal_Bool bUpdateOld = ( nSrcVer < SC_FONTCHARSET ); + bool bUpdateOld = ( nSrcVer < SC_FONTCHARSET ); CharSet eSysSet = gsl_getSystemTextEncoding(); if ( eSrcSet != eSysSet || bUpdateOld ) @@ -630,14 +630,14 @@ void ScDocument::SetImportingXML( bool bVal ) if ( maTabs[nTab]->IsLoadingRTL() ) { maTabs[nTab]->SetLoadingRTL( false ); - SetLayoutRTL( nTab, sal_True ); // includes mirroring; bImportingXML must be cleared first + SetLayoutRTL( nTab, true ); // includes mirroring; bImportingXML must be cleared first } } SetLoadingMedium(bVal); } -void ScDocument::SetXMLFromWrapper( sal_Bool bVal ) +void ScDocument::SetXMLFromWrapper( bool bVal ) { bXMLFromWrapper = bVal; } @@ -656,7 +656,7 @@ void ScDocument::SetForbiddenCharacters( const rtl::Reference<SvxForbiddenCharac pDrawLayer->SetForbiddenCharsTable( xForbiddenCharacters ); } -sal_Bool ScDocument::IsValidAsianCompression() const +bool ScDocument::IsValidAsianCompression() const { return ( nAsianCompression != SC_ASIANCOMPRESSION_INVALID ); } @@ -678,26 +678,26 @@ void ScDocument::SetAsianCompression(sal_uInt8 nNew) pDrawLayer->SetCharCompressType( nAsianCompression ); } -sal_Bool ScDocument::IsValidAsianKerning() const +bool ScDocument::IsValidAsianKerning() const { return ( nAsianKerning != SC_ASIANKERNING_INVALID ); } -sal_Bool ScDocument::GetAsianKerning() const +bool ScDocument::GetAsianKerning() const { if ( nAsianKerning == SC_ASIANKERNING_INVALID ) return false; else - return (sal_Bool)nAsianKerning; + return static_cast<bool>(nAsianKerning); } -void ScDocument::SetAsianKerning(sal_Bool bNew) +void ScDocument::SetAsianKerning(bool bNew) { nAsianKerning = (sal_uInt8)bNew; if ( pEditEngine ) - pEditEngine->SetKernAsianPunctuation( (sal_Bool)nAsianKerning ); + pEditEngine->SetKernAsianPunctuation( static_cast<bool>( nAsianKerning ) ); if ( pDrawLayer ) - pDrawLayer->SetKernAsianPunctuation( (sal_Bool)nAsianKerning ); + pDrawLayer->SetKernAsianPunctuation( static_cast<bool>( nAsianKerning ) ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index da3819bd3a8c..0f21bbfb888c 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -160,7 +160,7 @@ void ScDocument::MakeTable( SCTAB nTab,bool _bNeedsNameCheck ) } -sal_Bool ScDocument::HasTable( SCTAB nTab ) const +bool ScDocument::HasTable( SCTAB nTab ) const { if (VALIDTAB(nTab) && nTab < static_cast<SCTAB>(maTabs.size())) if (maTabs[nTab]) @@ -279,7 +279,7 @@ bool ScDocument::ValidTabName( const String& rName ) } -sal_Bool ScDocument::ValidNewTabName( const String& rName ) const +bool ScDocument::ValidNewTabName( const String& rName ) const { bool bValid = ValidTabName(rName); TableContainer::const_iterator it = maTabs.begin(); @@ -412,8 +412,8 @@ void ScDocument::AppendTabOnLoad(const rtl::OUString& rName) } -sal_Bool ScDocument::InsertTab( SCTAB nPos, const String& rName, - sal_Bool bExternalDocument ) +bool ScDocument::InsertTab( SCTAB nPos, const String& rName, + bool bExternalDocument ) { SCTAB nTabCount = static_cast<SCTAB>(maTabs.size()); bool bValid = ValidTab(nTabCount); @@ -584,7 +584,7 @@ bool ScDocument::InsertTabs( SCTAB nPos, const std::vector<rtl::OUString>& rName } -sal_Bool ScDocument::DeleteTab( SCTAB nTab, ScDocument* pRefUndoDoc ) +bool ScDocument::DeleteTab( SCTAB nTab, ScDocument* pRefUndoDoc ) { bool bValid = false; if (VALIDTAB(nTab) && nTab < static_cast<SCTAB>(maTabs.size())) @@ -756,8 +756,8 @@ bool ScDocument::DeleteTabs( SCTAB nTab, SCTAB nSheets, ScDocument* pRefUndoDoc } -sal_Bool ScDocument::RenameTab( SCTAB nTab, const String& rName, sal_Bool /* bUpdateRef */, - sal_Bool bExternalDocument ) +bool ScDocument::RenameTab( SCTAB nTab, const String& rName, bool /* bUpdateRef */, + bool bExternalDocument ) { bool bValid = false; SCTAB i; @@ -795,7 +795,7 @@ sal_Bool ScDocument::RenameTab( SCTAB nTab, const String& rName, sal_Bool /* bUp } -void ScDocument::SetVisible( SCTAB nTab, sal_Bool bVisible ) +void ScDocument::SetVisible( SCTAB nTab, bool bVisible ) { if (VALIDTAB(nTab) && nTab < static_cast<SCTAB> (maTabs.size())) if (maTabs[nTab]) @@ -803,7 +803,7 @@ void ScDocument::SetVisible( SCTAB nTab, sal_Bool bVisible ) } -sal_Bool ScDocument::IsVisible( SCTAB nTab ) const +bool ScDocument::IsVisible( SCTAB nTab ) const { if (VALIDTAB(nTab) && nTab < static_cast<SCTAB> (maTabs.size())) if (maTabs[nTab]) @@ -813,7 +813,7 @@ sal_Bool ScDocument::IsVisible( SCTAB nTab ) const } -sal_Bool ScDocument::IsStreamValid( SCTAB nTab ) const +bool ScDocument::IsStreamValid( SCTAB nTab ) const { if ( ValidTab(nTab) && nTab < static_cast<SCTAB> (maTabs.size()) && maTabs[nTab] ) return maTabs[nTab]->IsStreamValid(); @@ -822,7 +822,7 @@ sal_Bool ScDocument::IsStreamValid( SCTAB nTab ) const } -void ScDocument::SetStreamValid( SCTAB nTab, sal_Bool bSet, sal_Bool bIgnoreLock ) +void ScDocument::SetStreamValid( SCTAB nTab, bool bSet, bool bIgnoreLock ) { if ( ValidTab(nTab) && nTab < static_cast<SCTAB> (maTabs.size()) && maTabs[nTab] ) maTabs[nTab]->SetStreamValid( bSet, bIgnoreLock ); @@ -835,7 +835,7 @@ void ScDocument::LockStreamValid( bool bLock ) } -sal_Bool ScDocument::IsPendingRowHeights( SCTAB nTab ) const +bool ScDocument::IsPendingRowHeights( SCTAB nTab ) const { if ( ValidTab(nTab) && nTab < static_cast<SCTAB> (maTabs.size()) && maTabs[nTab] ) return maTabs[nTab]->IsPendingRowHeights(); @@ -844,14 +844,14 @@ sal_Bool ScDocument::IsPendingRowHeights( SCTAB nTab ) const } -void ScDocument::SetPendingRowHeights( SCTAB nTab, sal_Bool bSet ) +void ScDocument::SetPendingRowHeights( SCTAB nTab, bool bSet ) { if ( ValidTab(nTab) && nTab < static_cast<SCTAB> (maTabs.size()) && maTabs[nTab] ) maTabs[nTab]->SetPendingRowHeights( bSet ); } -void ScDocument::SetLayoutRTL( SCTAB nTab, sal_Bool bRTL ) +void ScDocument::SetLayoutRTL( SCTAB nTab, bool bRTL ) { if ( ValidTab(nTab) && nTab < static_cast<SCTAB> (maTabs.size()) && maTabs[nTab] ) { @@ -896,7 +896,7 @@ void ScDocument::SetLayoutRTL( SCTAB nTab, sal_Bool bRTL ) } -sal_Bool ScDocument::IsLayoutRTL( SCTAB nTab ) const +bool ScDocument::IsLayoutRTL( SCTAB nTab ) const { if ( ValidTab(nTab) && nTab < static_cast<SCTAB> (maTabs.size()) && maTabs[nTab] ) return maTabs[nTab]->IsLayoutRTL(); @@ -905,7 +905,7 @@ sal_Bool ScDocument::IsLayoutRTL( SCTAB nTab ) const } -sal_Bool ScDocument::IsNegativePage( SCTAB nTab ) const +bool ScDocument::IsNegativePage( SCTAB nTab ) const { // Negative page area is always used for RTL layout. // The separate method is used to find all RTL handling of drawing objects. @@ -923,7 +923,7 @@ sal_Bool ScDocument::IsNegativePage( SCTAB nTab ) const ---------------------------------------------------------------------------- */ -sal_Bool ScDocument::GetCellArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) const +bool ScDocument::GetCellArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) const { if (VALIDTAB(nTab) && nTab < static_cast<SCTAB> (maTabs.size())) if (maTabs[nTab]) @@ -935,7 +935,7 @@ sal_Bool ScDocument::GetCellArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) c } -sal_Bool ScDocument::GetTableArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) const +bool ScDocument::GetTableArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) const { if (VALIDTAB(nTab) && nTab < static_cast<SCTAB> (maTabs.size())) if (maTabs[nTab]) @@ -991,7 +991,7 @@ bool ScDocument::ShrinkToUsedDataArea( bool& o_bShrunk, SCTAB nTab, SCCOL& rStar // connected area void ScDocument::GetDataArea( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow, - SCCOL& rEndCol, SCROW& rEndRow, sal_Bool bIncludeOld, bool bOnlyDown ) const + SCCOL& rEndCol, SCROW& rEndRow, bool bIncludeOld, bool bOnlyDown ) const { if (ValidTab(nTab) && nTab < static_cast<SCTAB> (maTabs.size()) && maTabs[nTab]) maTabs[nTab]->GetDataArea( rStartCol, rStartRow, rEndCol, rEndRow, bIncludeOld, bOnlyDown ); @@ -1078,7 +1078,7 @@ bool lcl_GetNextTabRange( SCTAB& rTabRangeStart, SCTAB& rTabRangeEnd, const ScMa } -sal_Bool ScDocument::CanInsertRow( const ScRange& rRange ) const +bool ScDocument::CanInsertRow( const ScRange& rRange ) const { SCCOL nStartCol = rRange.aStart.Col(); SCROW nStartRow = rRange.aStart.Row(); @@ -1100,7 +1100,7 @@ sal_Bool ScDocument::CanInsertRow( const ScRange& rRange ) const } -sal_Bool ScDocument::InsertRow( SCCOL nStartCol, SCTAB nStartTab, +bool ScDocument::InsertRow( SCCOL nStartCol, SCTAB nStartTab, SCCOL nEndCol, SCTAB nEndTab, SCROW nStartRow, SCSIZE nSize, ScDocument* pRefUndoDoc, const ScMarkData* pTabMark ) @@ -1188,7 +1188,7 @@ sal_Bool ScDocument::InsertRow( SCCOL nStartCol, SCTAB nStartTab, } -sal_Bool ScDocument::InsertRow( const ScRange& rRange, ScDocument* pRefUndoDoc ) +bool ScDocument::InsertRow( const ScRange& rRange, ScDocument* pRefUndoDoc ) { return InsertRow( rRange.aStart.Col(), rRange.aStart.Tab(), rRange.aEnd.Col(), rRange.aEnd.Tab(), @@ -1285,7 +1285,7 @@ void ScDocument::DeleteRow( const ScRange& rRange, ScDocument* pRefUndoDoc, bool } -sal_Bool ScDocument::CanInsertCol( const ScRange& rRange ) const +bool ScDocument::CanInsertCol( const ScRange& rRange ) const { SCCOL nStartCol = rRange.aStart.Col(); SCROW nStartRow = rRange.aStart.Row(); @@ -1307,7 +1307,7 @@ sal_Bool ScDocument::CanInsertCol( const ScRange& rRange ) const } -sal_Bool ScDocument::InsertCol( SCROW nStartRow, SCTAB nStartTab, +bool ScDocument::InsertCol( SCROW nStartRow, SCTAB nStartTab, SCROW nEndRow, SCTAB nEndTab, SCCOL nStartCol, SCSIZE nSize, ScDocument* pRefUndoDoc, const ScMarkData* pTabMark ) @@ -1384,7 +1384,7 @@ sal_Bool ScDocument::InsertCol( SCROW nStartRow, SCTAB nStartTab, } -sal_Bool ScDocument::InsertCol( const ScRange& rRange, ScDocument* pRefUndoDoc ) +bool ScDocument::InsertCol( const ScRange& rRange, ScDocument* pRefUndoDoc ) { return InsertCol( rRange.aStart.Row(), rRange.aStart.Tab(), rRange.aEnd.Row(), rRange.aEnd.Tab(), @@ -1532,7 +1532,7 @@ void lcl_GetInsDelRanges( const ScRange& rOld, const ScRange& rNew, } -sal_Bool ScDocument::HasPartOfMerged( const ScRange& rRange ) +bool ScDocument::HasPartOfMerged( const ScRange& rRange ) { bool bPart = false; SCTAB nTab = rRange.aStart.Tab(); @@ -1555,7 +1555,7 @@ sal_Bool ScDocument::HasPartOfMerged( const ScRange& rRange ) } -sal_Bool ScDocument::CanFitBlock( const ScRange& rOld, const ScRange& rNew ) +bool ScDocument::CanFitBlock( const ScRange& rOld, const ScRange& rNew ) { if ( rOld == rNew ) return true; @@ -1587,7 +1587,7 @@ sal_Bool ScDocument::CanFitBlock( const ScRange& rOld, const ScRange& rNew ) } -void ScDocument::FitBlock( const ScRange& rOld, const ScRange& rNew, sal_Bool bClear ) +void ScDocument::FitBlock( const ScRange& rOld, const ScRange& rNew, bool bClear ) { if (bClear) DeleteAreaTab( rOld, IDF_ALL ); @@ -1662,7 +1662,7 @@ void ScDocument::DeleteAreaTab( const ScRange& rRange, sal_uInt16 nDelFlag ) void ScDocument::InitUndoSelected( ScDocument* pSrcDoc, const ScMarkData& rTabSelection, - sal_Bool bColInfo, sal_Bool bRowInfo ) + bool bColInfo, bool bRowInfo ) { if (bIsUndo) { @@ -1696,7 +1696,7 @@ void ScDocument::InitUndoSelected( ScDocument* pSrcDoc, const ScMarkData& rTabSe void ScDocument::InitUndo( ScDocument* pSrcDoc, SCTAB nTab1, SCTAB nTab2, - sal_Bool bColInfo, sal_Bool bRowInfo ) + bool bColInfo, bool bRowInfo ) { if (bIsUndo) { @@ -1720,7 +1720,7 @@ void ScDocument::InitUndo( ScDocument* pSrcDoc, SCTAB nTab1, SCTAB nTab2, } -void ScDocument::AddUndoTab( SCTAB nTab1, SCTAB nTab2, sal_Bool bColInfo, sal_Bool bRowInfo ) +void ScDocument::AddUndoTab( SCTAB nTab1, SCTAB nTab2, bool bColInfo, bool bRowInfo ) { if (bIsUndo) { @@ -1743,7 +1743,7 @@ void ScDocument::AddUndoTab( SCTAB nTab1, SCTAB nTab2, sal_Bool bColInfo, sal_Bo } -void ScDocument::SetCutMode( sal_Bool bVal ) +void ScDocument::SetCutMode( bool bVal ) { if (bIsClip) GetClipParam().mbCutMode = bVal; @@ -1754,7 +1754,7 @@ void ScDocument::SetCutMode( sal_Bool bVal ) } -sal_Bool ScDocument::IsCutMode() +bool ScDocument::IsCutMode() { if (bIsClip) return GetClipParam().mbCutMode; @@ -1768,8 +1768,8 @@ sal_Bool ScDocument::IsCutMode() void ScDocument::CopyToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, - sal_uInt16 nFlags, sal_Bool bOnlyMarked, ScDocument* pDestDoc, - const ScMarkData* pMarks, sal_Bool bColRowFlags ) + sal_uInt16 nFlags, bool bOnlyMarked, ScDocument* pDestDoc, + const ScMarkData* pMarks, bool bColRowFlags ) { PutInOrder( nCol1, nCol2 ); PutInOrder( nRow1, nRow2 ); @@ -1794,7 +1794,7 @@ void ScDocument::CopyToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, void ScDocument::UndoToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, - sal_uInt16 nFlags, sal_Bool bOnlyMarked, ScDocument* pDestDoc, + sal_uInt16 nFlags, bool bOnlyMarked, ScDocument* pDestDoc, const ScMarkData* pMarks) { PutInOrder( nCol1, nCol2 ); @@ -1823,8 +1823,8 @@ void ScDocument::UndoToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, void ScDocument::CopyToDocument(const ScRange& rRange, - sal_uInt16 nFlags, sal_Bool bOnlyMarked, ScDocument* pDestDoc, - const ScMarkData* pMarks, sal_Bool bColRowFlags) + sal_uInt16 nFlags, bool bOnlyMarked, ScDocument* pDestDoc, + const ScMarkData* pMarks, bool bColRowFlags) { ScRange aNewRange = rRange; aNewRange.Justify(); @@ -1844,7 +1844,7 @@ void ScDocument::CopyToDocument(const ScRange& rRange, void ScDocument::UndoToDocument(const ScRange& rRange, - sal_uInt16 nFlags, sal_Bool bOnlyMarked, ScDocument* pDestDoc, + sal_uInt16 nFlags, bool bOnlyMarked, ScDocument* pDestDoc, const ScMarkData* pMarks) { ScRange aNewRange = rRange; @@ -1961,7 +1961,7 @@ void ScDocument::CopyTabToClip(SCCOL nCol1, SCROW nRow1, } -void ScDocument::TransposeClip( ScDocument* pTransClip, sal_uInt16 nFlags, sal_Bool bAsLink ) +void ScDocument::TransposeClip( ScDocument* pTransClip, sal_uInt16 nFlags, bool bAsLink ) { OSL_ENSURE( bIsClip && pTransClip && pTransClip->bIsClip, "TransposeClip with wrong Document" ); @@ -2232,7 +2232,7 @@ void ScDocument::SetClipParam(const ScClipParam& rParam) mpClipParam.reset(new ScClipParam(rParam)); } -sal_Bool ScDocument::IsClipboardSource() const +bool ScDocument::IsClipboardSource() const { ScDocument* pClipDoc = SC_MOD()->GetClipDoc(); return pClipDoc && pClipDoc->xPoolHelper.is() && @@ -2405,8 +2405,8 @@ void ScDocument::CopyNonFilteredFromClip( SCCOL nCol1, SCROW nRow1, void ScDocument::CopyFromClip( const ScRange& rDestRange, const ScMarkData& rMark, sal_uInt16 nInsFlag, - ScDocument* pRefUndoDoc, ScDocument* pClipDoc, sal_Bool bResetCut, - sal_Bool bAsLink, sal_Bool bIncludeFiltered, sal_Bool bSkipAttrForEmpty, + ScDocument* pRefUndoDoc, ScDocument* pClipDoc, bool bResetCut, + bool bAsLink, bool bIncludeFiltered, bool bSkipAttrForEmpty, const ScRangeList * pDestRanges ) { if (!bIsClip) @@ -2739,7 +2739,7 @@ void ScDocument::CopyMultiRangeFromClip( SetAutoCalc( bOldAutoCalc ); } -void ScDocument::SetClipArea( const ScRange& rArea, sal_Bool bCut ) +void ScDocument::SetClipArea( const ScRange& rArea, bool bCut ) { if (bIsClip) { @@ -2755,7 +2755,7 @@ void ScDocument::SetClipArea( const ScRange& rArea, sal_Bool bCut ) } -void ScDocument::GetClipArea(SCCOL& nClipX, SCROW& nClipY, sal_Bool bIncludeFiltered) +void ScDocument::GetClipArea(SCCOL& nClipX, SCROW& nClipY, bool bIncludeFiltered) { if (!bIsClip) { @@ -2826,7 +2826,7 @@ void ScDocument::GetClipStart(SCCOL& nClipX, SCROW& nClipY) } -sal_Bool ScDocument::HasClipFilteredRows() +bool ScDocument::HasClipFilteredRows() { // count on first used table in clipboard SCTAB nCountTab = 0; @@ -2848,7 +2848,7 @@ sal_Bool ScDocument::HasClipFilteredRows() } -void ScDocument::MixDocument( const ScRange& rRange, sal_uInt16 nFunction, sal_Bool bSkipEmpty, +void ScDocument::MixDocument( const ScRange& rRange, sal_uInt16 nFunction, bool bSkipEmpty, ScDocument* pSrcDoc ) { SCTAB nTab1 = rRange.aStart.Tab(); @@ -2863,7 +2863,7 @@ void ScDocument::MixDocument( const ScRange& rRange, sal_uInt16 nFunction, sal_B void ScDocument::FillTab( const ScRange& rSrcArea, const ScMarkData& rMark, sal_uInt16 nFlags, sal_uInt16 nFunction, - sal_Bool bSkipEmpty, sal_Bool bAsLink ) + bool bSkipEmpty, bool bAsLink ) { sal_uInt16 nDelFlags = nFlags; if (nDelFlags & IDF_CONTENTS) @@ -2923,7 +2923,7 @@ void ScDocument::FillTab( const ScRange& rSrcArea, const ScMarkData& rMark, void ScDocument::FillTabMarked( SCTAB nSrcTab, const ScMarkData& rMark, sal_uInt16 nFlags, sal_uInt16 nFunction, - sal_Bool bSkipEmpty, sal_Bool bAsLink ) + bool bSkipEmpty, bool bAsLink ) { sal_uInt16 nDelFlags = nFlags; if (nDelFlags & IDF_CONTENTS) @@ -2982,7 +2982,7 @@ void ScDocument::FillTabMarked( SCTAB nSrcTab, const ScMarkData& rMark, } -void ScDocument::PutCell( SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell* pCell, sal_Bool bForceTab ) +void ScDocument::PutCell( SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell* pCell, bool bForceTab ) { if (VALIDTAB(nTab)) { @@ -3003,7 +3003,7 @@ void ScDocument::PutCell( SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell* pCell, } -void ScDocument::PutCell( const ScAddress& rPos, ScBaseCell* pCell, sal_Bool bForceTab ) +void ScDocument::PutCell( const ScAddress& rPos, ScBaseCell* pCell, bool bForceTab ) { SCTAB nTab = rPos.Tab(); if ( bForceTab && ( nTab >= static_cast<SCTAB>(maTabs.size()) || !maTabs[nTab]) ) @@ -3022,7 +3022,7 @@ void ScDocument::PutCell( const ScAddress& rPos, ScBaseCell* pCell, sal_Bool bFo } -sal_Bool ScDocument::SetString( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rString, +bool ScDocument::SetString( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rString, ScSetStringParam* pParam ) { if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] ) @@ -3217,7 +3217,7 @@ ScBaseCell* ScDocument::GetCell( const ScAddress& rPos ) const } -sal_Bool ScDocument::HasStringData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const +bool ScDocument::HasStringData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const { if ( VALIDTAB(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] ) return maTabs[nTab]->HasStringData( nCol, nRow ); @@ -3226,7 +3226,7 @@ sal_Bool ScDocument::HasStringData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const } -sal_Bool ScDocument::HasValueData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const +bool ScDocument::HasValueData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const { if ( VALIDTAB(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] ) return maTabs[nTab]->HasValueData( nCol, nRow ); @@ -3235,7 +3235,7 @@ sal_Bool ScDocument::HasValueData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const } -sal_Bool ScDocument::HasStringCells( const ScRange& rRange ) const +bool ScDocument::HasStringCells( const ScRange& rRange ) const { // true, wenn String- oder Editzellen im Bereich @@ -3254,7 +3254,7 @@ sal_Bool ScDocument::HasStringCells( const ScRange& rRange ) const } -sal_Bool ScDocument::HasSelectionData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const +bool ScDocument::HasSelectionData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const { sal_uInt32 nValidation = static_cast< const SfxUInt32Item* >( GetAttr( nCol, nRow, nTab, ATTR_VALIDDATA ) )->GetValue(); if( nValidation ) @@ -3561,7 +3561,7 @@ void ScDocument::SetRowHeightOnly( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, s maTabs[nTab]->SetRowHeightOnly( nStartRow, nEndRow, nNewHeight ); } -void ScDocument::SetManualHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, sal_Bool bManual ) +void ScDocument::SetManualHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bManual ) { if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] ) maTabs[nTab]->SetManualHeight( nStartRow, nEndRow, bManual ); @@ -3691,7 +3691,7 @@ sal_uLong ScDocument::GetRowOffset( SCROW nRow, SCTAB nTab ) const sal_uInt16 ScDocument::GetOptimalColWidth( SCCOL nCol, SCTAB nTab, OutputDevice* pDev, double nPPTX, double nPPTY, const Fraction& rZoomX, const Fraction& rZoomY, - sal_Bool bFormula, const ScMarkData* pMarkData, + bool bFormula, const ScMarkData* pMarkData, const ScColWidthParam* pParam ) { if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] ) @@ -3706,7 +3706,7 @@ long ScDocument::GetNeededSize( SCCOL nCol, SCROW nRow, SCTAB nTab, OutputDevice* pDev, double nPPTX, double nPPTY, const Fraction& rZoomX, const Fraction& rZoomY, - sal_Bool bWidth, sal_Bool bTotalSize ) + bool bWidth, bool bTotalSize ) { if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] ) return maTabs[nTab]->GetNeededSize @@ -3716,11 +3716,11 @@ long ScDocument::GetNeededSize( SCCOL nCol, SCROW nRow, SCTAB nTab, } -sal_Bool ScDocument::SetOptimalHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, sal_uInt16 nExtra, +bool ScDocument::SetOptimalHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, sal_uInt16 nExtra, OutputDevice* pDev, double nPPTX, double nPPTY, const Fraction& rZoomX, const Fraction& rZoomY, - sal_Bool bShrink ) + bool bShrink ) { //! MarkToMulti(); if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] ) @@ -3759,21 +3759,21 @@ void ScDocument::UpdateAllRowHeights( OutputDevice* pDev, double nPPTX, double n // Spalten-/Zeilen-Flags ---------------------------------------------- // -void ScDocument::ShowCol(SCCOL nCol, SCTAB nTab, sal_Bool bShow) +void ScDocument::ShowCol(SCCOL nCol, SCTAB nTab, bool bShow) { if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] ) maTabs[nTab]->ShowCol( nCol, bShow ); } -void ScDocument::ShowRow(SCROW nRow, SCTAB nTab, sal_Bool bShow) +void ScDocument::ShowRow(SCROW nRow, SCTAB nTab, bool bShow) { if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] ) maTabs[nTab]->ShowRow( nRow, bShow ); } -void ScDocument::ShowRows(SCROW nRow1, SCROW nRow2, SCTAB nTab, sal_Bool bShow) +void ScDocument::ShowRows(SCROW nRow1, SCROW nRow2, SCTAB nTab, bool bShow) { if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] ) maTabs[nTab]->ShowRows( nRow1, nRow2, bShow ); @@ -4143,7 +4143,7 @@ SCROW ScDocument::GetNextDifferentChangedRow( SCTAB nTab, SCROW nStart, bool bCa return MAXROW+1; } -sal_Bool ScDocument::GetColDefault( SCTAB nTab, SCCOL nCol, SCROW nLastRow, SCROW& nDefault) +bool ScDocument::GetColDefault( SCTAB nTab, SCCOL nCol, SCROW nLastRow, SCROW& nDefault) { bool bRet(false); nDefault = 0; @@ -4195,7 +4195,7 @@ sal_Bool ScDocument::GetColDefault( SCTAB nTab, SCCOL nCol, SCROW nLastRow, SCRO return bRet; } -sal_Bool ScDocument::GetRowDefault( SCTAB /* nTab */, SCROW /* nRow */, SCCOL /* nLastCol */, SCCOL& /* nDefault */ ) +bool ScDocument::GetRowDefault( SCTAB /* nTab */, SCROW /* nRow */, SCCOL /* nLastCol */, SCCOL& /* nDefault */ ) { return false; } @@ -4356,7 +4356,7 @@ void ScDocument::ApplySelectionStyle(const ScStyleSheet& rStyle, const ScMarkDat void ScDocument::ApplySelectionLineStyle( const ScMarkData& rMark, - const SvxBorderLine* pLine, sal_Bool bColorOnly ) + const SvxBorderLine* pLine, bool bColorOnly ) { if ( bColorOnly && !pLine ) return; @@ -4425,7 +4425,7 @@ const ScStyleSheet* ScDocument::GetSelectionStyle( const ScMarkData& rMark ) con } -void ScDocument::StyleSheetChanged( const SfxStyleSheetBase* pStyleSheet, sal_Bool bRemoved, +void ScDocument::StyleSheetChanged( const SfxStyleSheetBase* pStyleSheet, bool bRemoved, OutputDevice* pDev, double nPPTX, double nPPTY, const Fraction& rZoomX, const Fraction& rZoomY ) @@ -4444,7 +4444,7 @@ void ScDocument::StyleSheetChanged( const SfxStyleSheetBase* pStyleSheet, sal_Bo } -sal_Bool ScDocument::IsStyleSheetUsed( const ScStyleSheet& rStyle, sal_Bool bGatherAllStyles ) const +bool ScDocument::IsStyleSheetUsed( const ScStyleSheet& rStyle, bool bGatherAllStyles ) const { if ( bStyleSheetUsageInvalid || rStyle.GetUsage() == ScStyleSheet::UNKNOWN ) { @@ -4485,7 +4485,7 @@ sal_Bool ScDocument::IsStyleSheetUsed( const ScStyleSheet& rStyle, sal_Bool bGat } -sal_Bool ScDocument::ApplyFlagsTab( SCCOL nStartCol, SCROW nStartRow, +bool ScDocument::ApplyFlagsTab( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, sal_Int16 nFlags ) { if (VALIDTAB(nTab) && nTab < static_cast<SCTAB>(maTabs.size())) @@ -4497,7 +4497,7 @@ sal_Bool ScDocument::ApplyFlagsTab( SCCOL nStartCol, SCROW nStartRow, } -sal_Bool ScDocument::RemoveFlagsTab( SCCOL nStartCol, SCROW nStartRow, +bool ScDocument::RemoveFlagsTab( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, sal_Int16 nFlags ) { if (VALIDTAB(nTab) && nTab < static_cast<SCTAB>(maTabs.size())) @@ -4510,7 +4510,7 @@ sal_Bool ScDocument::RemoveFlagsTab( SCCOL nStartCol, SCROW nStartRow, void ScDocument::SetPattern( SCCOL nCol, SCROW nRow, SCTAB nTab, const ScPatternAttr& rAttr, - sal_Bool bPutToPool ) + bool bPutToPool ) { if (VALIDTAB(nTab) && nTab < static_cast<SCTAB>(maTabs.size())) if (maTabs[nTab]) @@ -4519,7 +4519,7 @@ void ScDocument::SetPattern( SCCOL nCol, SCROW nRow, SCTAB nTab, const ScPattern void ScDocument::SetPattern( const ScAddress& rPos, const ScPatternAttr& rAttr, - sal_Bool bPutToPool ) + bool bPutToPool ) { SCTAB nTab = rPos.Tab(); if ( nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab]) @@ -4527,7 +4527,7 @@ void ScDocument::SetPattern( const ScAddress& rPos, const ScPatternAttr& rAttr, } -ScPatternAttr* ScDocument::CreateSelectionPattern( const ScMarkData& rMark, sal_Bool bDeep ) +ScPatternAttr* ScDocument::CreateSelectionPattern( const ScMarkData& rMark, bool bDeep ) { ScMergePatternState aState; @@ -4560,7 +4560,7 @@ ScPatternAttr* ScDocument::CreateSelectionPattern( const ScMarkData& rMark, sal_ } -const ScPatternAttr* ScDocument::GetSelectionPattern( const ScMarkData& rMark, sal_Bool bDeep ) +const ScPatternAttr* ScDocument::GetSelectionPattern( const ScMarkData& rMark, bool bDeep ) { delete pSelectionAttr; pSelectionAttr = CreateSelectionPattern( rMark, bDeep ); @@ -4765,7 +4765,7 @@ void ScDocument::GetBorderLines( SCCOL nCol, SCROW nRow, SCTAB nTab, *ppBottom = pBottomLine; } -sal_Bool ScDocument::IsBlockEmpty( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, +bool ScDocument::IsBlockEmpty( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, bool bIgnoreNotes ) const { if (VALIDTAB(nTab) && nTab < static_cast<SCTAB>(maTabs.size())) @@ -4799,7 +4799,7 @@ void ScDocument::UnlockTable(SCTAB nTab) } -sal_Bool ScDocument::IsBlockEditable( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, +bool ScDocument::IsBlockEditable( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, bool* pOnlyNotBecauseOfMatrix /* = NULL */ ) const { @@ -4823,7 +4823,7 @@ sal_Bool ScDocument::IsBlockEditable( SCTAB nTab, SCCOL nStartCol, SCROW nStartR } -sal_Bool ScDocument::IsSelectionEditable( const ScMarkData& rMark, +bool ScDocument::IsSelectionEditable( const ScMarkData& rMark, bool* pOnlyNotBecauseOfMatrix /* = NULL */ ) const { // import into read-only document is possible @@ -4875,7 +4875,7 @@ sal_Bool ScDocument::IsSelectionEditable( const ScMarkData& rMark, } -sal_Bool ScDocument::HasSelectedBlockMatrixFragment( SCCOL nStartCol, SCROW nStartRow, +bool ScDocument::HasSelectedBlockMatrixFragment( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, const ScMarkData& rMark ) const { @@ -4890,7 +4890,7 @@ sal_Bool ScDocument::HasSelectedBlockMatrixFragment( SCCOL nStartCol, SCROW nSta return !bOk; } -sal_Bool ScDocument::HasSelectedBlockMatrixFragment( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab ) const +bool ScDocument::HasSelectedBlockMatrixFragment( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab ) const { bool bOk = true; if ( nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] && maTabs[nTab]->HasBlockMatrixFragment( nStartCol, nStartRow, nEndCol, nEndRow ) ) @@ -4900,7 +4900,7 @@ sal_Bool ScDocument::HasSelectedBlockMatrixFragment( SCCOL nStartCol, SCROW nSta return !bOk; } -sal_Bool ScDocument::GetMatrixFormulaRange( const ScAddress& rCellPos, ScRange& rMatrix ) +bool ScDocument::GetMatrixFormulaRange( const ScAddress& rCellPos, ScRange& rMatrix ) { // if rCell is part of a matrix formula, return its complete range @@ -4945,7 +4945,7 @@ sal_Bool ScDocument::GetMatrixFormulaRange( const ScAddress& rCellPos, ScRange& } -sal_Bool ScDocument::ExtendOverlapped( SCCOL& rStartCol, SCROW& rStartRow, +bool ScDocument::ExtendOverlapped( SCCOL& rStartCol, SCROW& rStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab ) const { bool bFound = false; @@ -5000,9 +5000,9 @@ sal_Bool ScDocument::ExtendOverlapped( SCCOL& rStartCol, SCROW& rStartRow, } -sal_Bool ScDocument::ExtendMergeSel( SCCOL nStartCol, SCROW nStartRow, +bool ScDocument::ExtendMergeSel( SCCOL nStartCol, SCROW nStartRow, SCCOL& rEndCol, SCROW& rEndRow, - const ScMarkData& rMark, sal_Bool bRefresh ) + const ScMarkData& rMark, bool bRefresh ) { // use all selected sheets from rMark @@ -5029,9 +5029,9 @@ sal_Bool ScDocument::ExtendMergeSel( SCCOL nStartCol, SCROW nStartRow, } -sal_Bool ScDocument::ExtendMerge( SCCOL nStartCol, SCROW nStartRow, +bool ScDocument::ExtendMerge( SCCOL nStartCol, SCROW nStartRow, SCCOL& rEndCol, SCROW& rEndRow, - SCTAB nTab, sal_Bool bRefresh ) + SCTAB nTab, bool bRefresh ) { bool bFound = false; if ( ValidColRow(nStartCol,nStartRow) && ValidColRow(rEndCol,rEndRow) && ValidTab(nTab) ) @@ -5051,7 +5051,7 @@ sal_Bool ScDocument::ExtendMerge( SCCOL nStartCol, SCROW nStartRow, } -sal_Bool ScDocument::ExtendMerge( ScRange& rRange, sal_Bool bRefresh ) +bool ScDocument::ExtendMerge( ScRange& rRange, bool bRefresh ) { bool bFound = false; SCTAB nStartTab = rRange.aStart.Tab(); @@ -5080,7 +5080,7 @@ sal_Bool ScDocument::ExtendMerge( ScRange& rRange, sal_Bool bRefresh ) return bFound; } -sal_Bool ScDocument::ExtendTotalMerge( ScRange& rRange ) const +bool ScDocument::ExtendTotalMerge( ScRange& rRange ) const { // Bereich genau dann auf zusammengefasste Zellen erweitern, wenn // dadurch keine neuen nicht-ueberdeckten Zellen getroffen werden @@ -5111,7 +5111,7 @@ sal_Bool ScDocument::ExtendTotalMerge( ScRange& rRange ) const return bRet; } -sal_Bool ScDocument::ExtendOverlapped( ScRange& rRange ) const +bool ScDocument::ExtendOverlapped( ScRange& rRange ) const { bool bFound = false; SCTAB nStartTab = rRange.aStart.Tab(); @@ -5144,7 +5144,7 @@ sal_Bool ScDocument::ExtendOverlapped( ScRange& rRange ) const return bFound; } -sal_Bool ScDocument::RefreshAutoFilter( SCCOL nStartCol, SCROW nStartRow, +bool ScDocument::RefreshAutoFilter( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab ) { SCTAB nDBTab; @@ -5206,7 +5206,7 @@ void ScDocument::SkipOverlapped( SCCOL& rCol, SCROW& rRow, SCTAB nTab ) const --rRow; } -sal_Bool ScDocument::IsHorOverlapped( SCCOL nCol, SCROW nRow, SCTAB nTab ) const +bool ScDocument::IsHorOverlapped( SCCOL nCol, SCROW nRow, SCTAB nTab ) const { const ScMergeFlagAttr* pAttr = (const ScMergeFlagAttr*) GetAttr( nCol, nRow, nTab, ATTR_MERGE_FLAG ); @@ -5220,7 +5220,7 @@ sal_Bool ScDocument::IsHorOverlapped( SCCOL nCol, SCROW nRow, SCTAB nTab ) const } -sal_Bool ScDocument::IsVerOverlapped( SCCOL nCol, SCROW nRow, SCTAB nTab ) const +bool ScDocument::IsVerOverlapped( SCCOL nCol, SCROW nRow, SCTAB nTab ) const { const ScMergeFlagAttr* pAttr = (const ScMergeFlagAttr*) GetAttr( nCol, nRow, nTab, ATTR_MERGE_FLAG ); @@ -5305,7 +5305,7 @@ void ScDocument::ApplySelectionPattern( const ScPatternAttr& rAttr, const ScMark } -void ScDocument::ChangeSelectionIndent( sal_Bool bIncrement, const ScMarkData& rMark ) +void ScDocument::ChangeSelectionIndent( bool bIncrement, const ScMarkData& rMark ) { SCTAB nMax = static_cast<SCTAB>(maTabs.size()); ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end(); @@ -5391,7 +5391,7 @@ void ScDocument::FindAreaPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, SCsCOL nMovX void ScDocument::GetNextPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, SCsCOL nMovX, SCsROW nMovY, - sal_Bool bMarked, sal_Bool bUnprotected, const ScMarkData& rMark ) + bool bMarked, bool bUnprotected, const ScMarkData& rMark ) { OSL_ENSURE( !nMovX || !nMovY, "GetNextPos: nur X oder Y" ); @@ -5540,7 +5540,7 @@ void ScDocument::RemoveManualBreaks( SCTAB nTab ) maTabs[nTab]->RemoveManualBreaks(); } -sal_Bool ScDocument::HasManualBreaks( SCTAB nTab ) const +bool ScDocument::HasManualBreaks( SCTAB nTab ) const { if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] ) return maTabs[nTab]->HasManualBreaks(); @@ -5558,7 +5558,7 @@ void ScDocument::GetDocStat( ScDocStat& rDocStat ) } -sal_Bool ScDocument::HasPrintRange() +bool ScDocument::HasPrintRange() { bool bResult = false; @@ -5571,7 +5571,7 @@ sal_Bool ScDocument::HasPrintRange() } -sal_Bool ScDocument::IsPrintEntireSheet( SCTAB nTab ) const +bool ScDocument::IsPrintEntireSheet( SCTAB nTab ) const { return (ValidTab(nTab) ) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] && maTabs[nTab]->IsPrintEntireSheet(); } @@ -5668,7 +5668,7 @@ void ScDocument::RestorePrintRanges( const ScPrintRangeSaver& rSaver ) } -sal_Bool ScDocument::NeedPageResetAfterTab( SCTAB nTab ) const +bool ScDocument::NeedPageResetAfterTab( SCTAB nTab ) const { // Die Seitennummern-Zaehlung faengt bei einer Tabelle neu an, wenn eine // andere Vorlage als bei der vorherigen gesetzt ist (nur Namen vergleichen) diff --git a/sc/source/core/data/fillinfo.cxx b/sc/source/core/data/fillinfo.cxx index 0d70c48bf568..e7dd2cdcd7da 100644 --- a/sc/source/core/data/fillinfo.cxx +++ b/sc/source/core/data/fillinfo.cxx @@ -95,8 +95,8 @@ void lcl_GetMergeRange( SCsCOL nX, SCsROW nY, SCSIZE nArrY, rStartX = nX; rStartY = nY; - sal_Bool bHOver = pInfo->bHOverlapped; - sal_Bool bVOver = pInfo->bVOverlapped; + bool bHOver = pInfo->bHOverlapped; + bool bVOver = pInfo->bVOverlapped; SCCOL nLastCol; SCROW nLastRow; @@ -161,11 +161,11 @@ void lcl_GetMergeRange( SCsCOL nX, SCsROW nY, SCSIZE nArrY, void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, SCTAB nTab, double nScaleX, double nScaleY, - sal_Bool bPageMode, sal_Bool bFormulaMode, const ScMarkData* pMarkData ) + bool bPageMode, bool bFormulaMode, const ScMarkData* pMarkData ) { OSL_ENSURE( maTabs[nTab], "Tabelle existiert nicht" ); - sal_Bool bLayoutRTL = IsLayoutRTL( nTab ); + bool bLayoutRTL = IsLayoutRTL( nTab ); ScDocumentPool* pPool = xPoolHelper->GetDocPool(); ScStyleSheetPool* pStlPool = xPoolHelper->GetStylePool(); @@ -186,16 +186,16 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX SCCOL nArrX; SCSIZE nArrY; SCSIZE nArrCount; - sal_Bool bAnyMerged = false; - sal_Bool bAnyShadow = false; - sal_Bool bAnyCondition = false; + bool bAnyMerged = false; + bool bAnyShadow = false; + bool bAnyCondition = false; - sal_Bool bTabProtect = IsTabProtected(nTab); + bool bTabProtect = IsTabProtected(nTab); // fuer Blockmarken von zusammengefassten Zellen mit // versteckter erster Zeile / Spalte - sal_Bool bPaintMarks = false; - sal_Bool bSkipMarks = false; + bool bPaintMarks = false; + bool bSkipMarks = false; SCCOL nBlockStartX = 0, nBlockEndX = 0; SCROW nBlockEndY = 0, nBlockStartY = 0; if (pMarkData && pMarkData->IsMarked()) @@ -210,9 +210,9 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX nBlockEndY = aTmpRange.aEnd.Row(); ExtendHidden( nBlockStartX, nBlockStartY, nBlockEndX, nBlockEndY, nTab ); //? noetig ? if (pMarkData->IsMarkNegative()) - bSkipMarks = sal_True; + bSkipMarks = true; else - bPaintMarks = sal_True; + bPaintMarks = true; } } @@ -248,9 +248,9 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX pThisRowInfo->nRowNo = nY; //! Fall < 0 ? pThisRowInfo->nHeight = nHeight; - pThisRowInfo->bEmptyBack = sal_True; - pThisRowInfo->bEmptyText = sal_True; - pThisRowInfo->bChanged = sal_True; + pThisRowInfo->bEmptyBack = true; + pThisRowInfo->bEmptyText = true; + pThisRowInfo->bChanged = true; pThisRowInfo->bAutoFilter = false; pThisRowInfo->bPushButton = false; pThisRowInfo->nRotMaxCol = SC_ROTMAX_NONE; @@ -272,12 +272,12 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX // rotierter Text... // Attribut im Dokument ueberhaupt verwendet? - sal_Bool bAnyItem = false; + bool bAnyItem = false; sal_uInt32 nRotCount = pPool->GetItemCount2( ATTR_ROTATE_VALUE ); for (sal_uInt32 nItem=0; nItem<nRotCount; nItem++) if (pPool->GetItem2( ATTR_ROTATE_VALUE, nItem )) { - bAnyItem = sal_True; + bAnyItem = true; break; } @@ -314,7 +314,7 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX nX = MAXCOL+1; // ungueltig CellInfo* pInfo = &pThisRowInfo->pCellInfo[nArrX]; - pInfo->bEmptyCellText = sal_True; + pInfo->bEmptyCellText = true; pInfo->pCell = NULL; if (bPaintMarks) pInfo->bMarked = ( nX >= nBlockStartX && nX <= nBlockEndX @@ -450,24 +450,24 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX const SvxShadowItem* pShadowAttr = (const SvxShadowItem*) &pPattern->GetItem(ATTR_SHADOW); if (pShadowAttr != pDefShadow) - bAnyShadow = sal_True; + bAnyShadow = true; const ScMergeAttr* pMergeAttr = (const ScMergeAttr*) &pPattern->GetItem(ATTR_MERGE); - sal_Bool bMerged = ( pMergeAttr != pDefMerge && *pMergeAttr != *pDefMerge ); + bool bMerged = ( pMergeAttr != pDefMerge && *pMergeAttr != *pDefMerge ); sal_uInt16 nOverlap = ((const ScMergeFlagAttr*) &pPattern->GetItemSet(). Get(ATTR_MERGE_FLAG))->GetValue(); - sal_Bool bHOverlapped = ((nOverlap & SC_MF_HOR) != 0); - sal_Bool bVOverlapped = ((nOverlap & SC_MF_VER) != 0); - sal_Bool bAutoFilter = ((nOverlap & SC_MF_AUTO) != 0); - sal_Bool bPushButton = ((nOverlap & SC_MF_BUTTON) != 0); - sal_Bool bScenario = ((nOverlap & SC_MF_SCENARIO) != 0); + bool bHOverlapped = ((nOverlap & SC_MF_HOR) != 0); + bool bVOverlapped = ((nOverlap & SC_MF_VER) != 0); + bool bAutoFilter = ((nOverlap & SC_MF_AUTO) != 0); + bool bPushButton = ((nOverlap & SC_MF_BUTTON) != 0); + bool bScenario = ((nOverlap & SC_MF_SCENARIO) != 0); bool bPopupButton = ((nOverlap & SC_MF_BUTTON_POPUP) != 0); bool bFilterActive = ((nOverlap & SC_MF_HIDDEN_MEMBER) != 0); if (bMerged||bHOverlapped||bVOverlapped) - bAnyMerged = sal_True; // intern + bAnyMerged = true; // intern - sal_Bool bHidden, bHideFormula; + bool bHidden, bHideFormula; if (bTabProtect) { const ScProtectionAttr& rProtAttr = (const ScProtectionAttr&) @@ -494,9 +494,9 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX if (pBackground != pDefBackground) // Spalten-HG == Standard ? pThisRowInfo->bEmptyBack = false; if (bAutoFilter) - pThisRowInfo->bAutoFilter = sal_True; + pThisRowInfo->bAutoFilter = true; if (bPushButton) - pThisRowInfo->bPushButton = sal_True; + pThisRowInfo->bPushButton = true; CellInfo* pInfo = &pThisRowInfo->pCellInfo[nArrX]; pInfo->pBackground = pBackground; @@ -514,7 +514,7 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX pInfo->pShadowAttr = pShadowAttr; // nWidth wird nicht mehr einzeln gesetzt - sal_Bool bEmbed = false; //bIsEmbedded && + bool bEmbed = false; //bIsEmbedded && nTab >= aEmbedRange.aStart.Tab() && nTab <= aEmbedRange.aEnd.Tab() && nX >= aEmbedRange.aStart.Col() && @@ -536,7 +536,7 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX if (bHidden || ( bFormulaMode && bHideFormula && pInfo->pCell && pInfo->pCell->GetCellType() == CELLTYPE_FORMULA )) - pInfo->bEmptyCellText = sal_True; + pInfo->bEmptyCellText = true; if ( pCondForm ) { @@ -550,7 +550,7 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX { //! Style-Sets cachen !!! pInfo->pConditionSet = &pStyleSheet->GetItemSet(); - bAnyCondition = sal_True; + bAnyCondition = true; } // if style is not there, treat like no condition } @@ -576,7 +576,7 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX { // Blockmarken const ScMarkArray* pThisMarkArr = pMarkData->GetArray()+nX; - sal_Bool bThisMarked; + bool bThisMarked; nArrY = 1; nCurRow = nY1; // einzelne Zeile nThisRow = nY1; // Ende des Bereichs @@ -594,7 +594,7 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX { if ( bThisMarked ) { - sal_Bool bSkip = bSkipMarks && + bool bSkip = bSkipMarks && nX >= nBlockStartX && nX <= nBlockEndX && nCurRow >= nBlockStartY && @@ -603,7 +603,7 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX { RowInfo* pThisRowInfo = &pRowInfo[nArrY]; CellInfo* pInfo = &pThisRowInfo->pCellInfo[nArrX]; - pInfo->bMarked = sal_True; + pInfo->bMarked = true; } } ++nArrY; @@ -650,26 +650,26 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX const SfxPoolItem* pItem; // Hintergrund - if ( pCondSet->GetItemState( ATTR_BACKGROUND, sal_True, &pItem ) == SFX_ITEM_SET ) + if ( pCondSet->GetItemState( ATTR_BACKGROUND, true, &pItem ) == SFX_ITEM_SET ) { pInfo->pBackground = (const SvxBrushItem*) pItem; pRowInfo[nArrY].bEmptyBack = false; } // Umrandung - if ( pCondSet->GetItemState( ATTR_BORDER, sal_True, &pItem ) == SFX_ITEM_SET ) + if ( pCondSet->GetItemState( ATTR_BORDER, true, &pItem ) == SFX_ITEM_SET ) pInfo->pLinesAttr = (const SvxBoxItem*) pItem; - if ( pCondSet->GetItemState( ATTR_BORDER_TLBR, sal_True, &pItem ) == SFX_ITEM_SET ) + if ( pCondSet->GetItemState( ATTR_BORDER_TLBR, true, &pItem ) == SFX_ITEM_SET ) pInfo->mpTLBRLine = static_cast< const SvxLineItem* >( pItem ); - if ( pCondSet->GetItemState( ATTR_BORDER_BLTR, sal_True, &pItem ) == SFX_ITEM_SET ) + if ( pCondSet->GetItemState( ATTR_BORDER_BLTR, true, &pItem ) == SFX_ITEM_SET ) pInfo->mpBLTRLine = static_cast< const SvxLineItem* >( pItem ); // Schatten - if ( pCondSet->GetItemState( ATTR_SHADOW, sal_True, &pItem ) == SFX_ITEM_SET ) + if ( pCondSet->GetItemState( ATTR_SHADOW, true, &pItem ) == SFX_ITEM_SET ) { pInfo->pShadowAttr = (const SvxShadowItem*) pItem; - bAnyShadow = sal_True; + bAnyShadow = true; } } } @@ -710,7 +710,7 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX // Hintergrund kopieren (oder in output.cxx) if ( !pStartCond || pStartCond-> - GetItemState(ATTR_BACKGROUND,sal_True,&pItem) != SFX_ITEM_SET ) + GetItemState(ATTR_BACKGROUND,true,&pItem) != SFX_ITEM_SET ) pItem = &pStartPattern->GetItem(ATTR_BACKGROUND); pInfo->pBackground = (const SvxBrushItem*) pItem; pRowInfo[nArrY].bEmptyBack = false; @@ -718,15 +718,15 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX // Schatten if ( !pStartCond || pStartCond-> - GetItemState(ATTR_SHADOW,sal_True,&pItem) != SFX_ITEM_SET ) + GetItemState(ATTR_SHADOW,true,&pItem) != SFX_ITEM_SET ) pItem = &pStartPattern->GetItem(ATTR_SHADOW); pInfo->pShadowAttr = (const SvxShadowItem*) pItem; if (pInfo->pShadowAttr != pDefShadow) - bAnyShadow = sal_True; + bAnyShadow = true; // Blockmarken - wieder mit Original-Merge-Werten - sal_Bool bCellMarked = false; + bool bCellMarked = false; if (bPaintMarks) bCellMarked = ( nStartX >= (SCsCOL) nBlockStartX && nStartX <= (SCsCOL) nBlockEndX @@ -750,13 +750,13 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX { for (nArrY=0; nArrY<nArrCount; nArrY++) { - sal_Bool bTop = ( nArrY == 0 ); - sal_Bool bBottom = ( nArrY+1 == nArrCount ); + bool bTop = ( nArrY == 0 ); + bool bBottom = ( nArrY+1 == nArrCount ); for (nArrX=nX1; nArrX<=nX2+2; nArrX++) // links und rechts einer mehr { - sal_Bool bLeft = ( nArrX == nX1 ); - sal_Bool bRight = ( nArrX == nX2+2 ); + bool bLeft = ( nArrX == nX1 ); + bool bRight = ( nArrX == nX2+2 ); CellInfo* pInfo = &pRowInfo[nArrY].pCellInfo[nArrX]; const SvxShadowItem* pThisAttr = pInfo->pShadowAttr; @@ -773,13 +773,13 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX while ( nArrX+nDxNeg > nX1 && pRowInfo[0].pCellInfo[nArrX+nDxNeg].nWidth == 0 ) --nDxNeg; - sal_Bool bLeftDiff = !bLeft && + bool bLeftDiff = !bLeft && CELLINFO(nDxNeg,0).pShadowAttr->GetLocation() == SVX_SHADOW_NONE; - sal_Bool bRightDiff = !bRight && + bool bRightDiff = !bRight && CELLINFO(nDxPos,0).pShadowAttr->GetLocation() == SVX_SHADOW_NONE; - sal_Bool bTopDiff = !bTop && + bool bTopDiff = !bTop && CELLINFO(0,-1).pShadowAttr->GetLocation() == SVX_SHADOW_NONE; - sal_Bool bBottomDiff = !bBottom && + bool bBottomDiff = !bBottom && CELLINFO(0,1).pShadowAttr->GetLocation() == SVX_SHADOW_NONE; if ( bLayoutRTL ) diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx index 26046dee4f9b..48e8f45a5d4f 100644 --- a/sc/source/core/data/global.cxx +++ b/sc/source/core/data/global.cxx @@ -234,7 +234,7 @@ SvNumberFormatter* ScGlobal::GetEnglishFormatter() //------------------------------------------------------------------------ -sal_Bool ScGlobal::CheckWidthInvalidate( sal_Bool& bNumFormatChanged, +sal_Bool ScGlobal::CheckWidthInvalidate( bool& bNumFormatChanged, const SfxItemSet& rNewAttrs, const SfxItemSet& rOldAttrs ) { diff --git a/sc/source/core/tool/charthelper.cxx b/sc/source/core/tool/charthelper.cxx index d4bfbc2eb05c..efc400c02cac 100644 --- a/sc/source/core/tool/charthelper.cxx +++ b/sc/source/core/tool/charthelper.cxx @@ -52,7 +52,7 @@ namespace { -sal_uInt16 lcl_DoUpdateCharts( const ScAddress& rPos, ScDocument* pDoc, sal_Bool bAllCharts ) +sal_uInt16 lcl_DoUpdateCharts( const ScAddress& rPos, ScDocument* pDoc, bool bAllCharts ) { ScDrawLayer* pModel = pDoc->GetDrawLayer(); if (!pModel) @@ -73,12 +73,12 @@ sal_uInt16 lcl_DoUpdateCharts( const ScAddress& rPos, ScDocument* pDoc, sal_Bool if ( pObject->GetObjIdentifier() == OBJ_OLE2 && pDoc->IsChart( pObject ) ) { String aName = ((SdrOle2Obj*)pObject)->GetPersistName(); - sal_Bool bHit = sal_True; + bool bHit = true; if ( !bAllCharts ) { ScRangeList aRanges; - sal_Bool bColHeaders = false; - sal_Bool bRowHeaders = false; + bool bColHeaders = false; + bool bRowHeaders = false; pDoc->GetOldChartParameters( aName, aRanges, bColHeaders, bRowHeaders ); bHit = aRanges.In( rPos ); } @@ -94,7 +94,7 @@ sal_uInt16 lcl_DoUpdateCharts( const ScAddress& rPos, ScDocument* pDoc, sal_Bool return nFound; } -sal_Bool lcl_AdjustRanges( ScRangeList& rRanges, SCTAB nSourceTab, SCTAB nDestTab, SCTAB nTabCount ) +bool lcl_AdjustRanges( ScRangeList& rRanges, SCTAB nSourceTab, SCTAB nDestTab, SCTAB nTabCount ) { //! if multiple sheets are copied, update references into the other copied sheets? diff --git a/sc/source/filter/dif/difimp.cxx b/sc/source/filter/dif/difimp.cxx index 8950a98516ee..b7fca05656cb 100644 --- a/sc/source/filter/dif/difimp.cxx +++ b/sc/source/filter/dif/difimp.cxx @@ -192,7 +192,7 @@ FltError ScFormatFilterPluginImpl::ScImportDif( SvStream& rIn, ScDocument* pDoc, pCell = new ScStringCell( aTmp ); } - pDoc->PutCell( nColCnt, nRowCnt, nBaseTab, pCell, ( sal_Bool ) sal_True ); + pDoc->PutCell( nColCnt, nRowCnt, nBaseTab, pCell, true ); } else bOverflowWarn = sal_True; @@ -208,7 +208,7 @@ FltError ScFormatFilterPluginImpl::ScImportDif( SvStream& rIn, ScDocument* pDoc, if( rData.Len() > 0 ) { pDoc->PutCell( nColCnt, nRowCnt, nBaseTab, - ScBaseCell::CreateTextCell( rData, pDoc ), ( sal_Bool ) sal_True ); + ScBaseCell::CreateTextCell( rData, pDoc ), true ); } } else diff --git a/sc/source/filter/excel/excform.cxx b/sc/source/filter/excel/excform.cxx index 4baf780a9ea6..d97ebd5add44 100644 --- a/sc/source/filter/excel/excform.cxx +++ b/sc/source/filter/excel/excform.cxx @@ -140,7 +140,7 @@ void ImportExcel::Formula( const XclAddress& rXclPos, if( pErgebnis ) { pZelle = new ScFormulaCell( pD, aScPos, pErgebnis ); - pD->PutCell( aScPos.Col(), aScPos.Row(), aScPos.Tab(), pZelle, (sal_Bool)sal_True ); + pD->PutCell( aScPos.Col(), aScPos.Row(), aScPos.Tab(), pZelle, true ); } else { diff --git a/sc/source/filter/lotus/lotimpop.cxx b/sc/source/filter/lotus/lotimpop.cxx index aa48933972c6..49f73eb53c0b 100644 --- a/sc/source/filter/lotus/lotimpop.cxx +++ b/sc/source/filter/lotus/lotimpop.cxx @@ -213,7 +213,7 @@ void ImportLotus::Errcell( void ) Read( aA ); - pD->PutCell( aA.Col(), aA.Row(), aA.Tab(), new ScStringCell( CREATE_STRING( "#ERR!" ) ), (sal_Bool)sal_True ); + pD->PutCell( aA.Col(), aA.Row(), aA.Tab(), new ScStringCell( CREATE_STRING( "#ERR!" ) ), true ); } @@ -223,7 +223,7 @@ void ImportLotus::Nacell( void ) Read( aA ); - pD->PutCell( aA.Col(), aA.Row(), aA.Tab(), new ScStringCell( CREATE_STRING( "#NA!" ) ), (sal_Bool)sal_True ); + pD->PutCell( aA.Col(), aA.Row(), aA.Tab(), new ScStringCell( CREATE_STRING( "#NA!" ) ), true ); } @@ -239,7 +239,7 @@ void ImportLotus::Labelcell( void ) // aLabel.Convert( pLotusRoot->eCharsetQ ); - pD->PutCell( aA.Col(), aA.Row(), aA.Tab(), new ScStringCell( aLabel ), (sal_Bool)sal_True ); + pD->PutCell( aA.Col(), aA.Row(), aA.Tab(), new ScStringCell( aLabel ), true ); } @@ -252,7 +252,7 @@ void ImportLotus::Numbercell( void ) Read( fVal ); pD->PutCell( aAddr.Col(), aAddr.Row(), aAddr.Tab(), - new ScValueCell( fVal ), (sal_Bool)sal_True ); + new ScValueCell( fVal ), true ); } @@ -265,7 +265,7 @@ void ImportLotus::Smallnumcell( void ) Read( nVal ); pD->PutCell( aAddr.Col(), aAddr.Row(), aAddr.Tab(), - new ScValueCell( SnumToDouble( nVal ) ), ( sal_Bool ) sal_True ); + new ScValueCell( SnumToDouble( nVal ) ), true ); } @@ -291,7 +291,7 @@ ScFormulaCell *ImportLotus::Formulacell( sal_uInt16 n ) pZelle->AddRecalcMode( RECALCMODE_ONLOAD_ONCE ); - pD->PutCell( aAddr.Col(), aAddr.Row(), aAddr.Tab(), pZelle, (sal_Bool)sal_True ); + pD->PutCell( aAddr.Col(), aAddr.Row(), aAddr.Tab(), pZelle, true ); return NULL; } diff --git a/sc/source/filter/lotus/op.cxx b/sc/source/filter/lotus/op.cxx index c9c6ae13ec38..48a0f7235f34 100644 --- a/sc/source/filter/lotus/op.cxx +++ b/sc/source/filter/lotus/op.cxx @@ -121,7 +121,7 @@ void OP_Integer( SvStream& r, sal_uInt16 /*n*/ ) r >> nFormat >> nCol >> nRow >> nValue; ScValueCell* pZelle = new ScValueCell( ( double ) nValue ); - pDoc->PutCell( static_cast<SCCOL> (nCol), static_cast<SCROW> (nRow), nTab, pZelle, ( sal_Bool ) sal_True ); + pDoc->PutCell( static_cast<SCCOL> (nCol), static_cast<SCROW> (nRow), nTab, pZelle, true ); // 0 Stellen nach'm Komma! SetFormat( static_cast<SCCOL> (nCol), static_cast<SCROW> (nRow), nTab, nFormat, 0 ); @@ -139,7 +139,7 @@ void OP_Number( SvStream& r, sal_uInt16 /*n*/ ) fValue = ::rtl::math::round( fValue, 15 ); ScValueCell* pZelle = new ScValueCell( fValue ); - pDoc->PutCell( static_cast<SCCOL> (nCol), static_cast<SCROW> (nRow), nTab, pZelle, ( sal_Bool ) sal_True ); + pDoc->PutCell( static_cast<SCCOL> (nCol), static_cast<SCROW> (nRow), nTab, pZelle, true ); SetFormat( static_cast<SCCOL> (nCol), static_cast<SCROW> (nRow), nTab, nFormat, nDezFloat ); } @@ -190,7 +190,7 @@ void OP_Formula( SvStream& r, sal_uInt16 /*n*/ ) pZelle->AddRecalcMode( RECALCMODE_ONLOAD_ONCE ); - pDoc->PutCell( static_cast<SCCOL> (nCol), static_cast<SCROW> (nRow), nTab, pZelle, ( sal_Bool ) sal_True ); + pDoc->PutCell( static_cast<SCCOL> (nCol), static_cast<SCROW> (nRow), nTab, pZelle, true ); // nFormat = Standard -> Nachkommastellen wie Float SetFormat( static_cast<SCCOL> (nCol), static_cast<SCROW> (nRow), nTab, nFormat, nDezFloat ); @@ -392,7 +392,7 @@ void OP_Number123( SvStream& r, sal_uInt16 /*n*/ ) double fValue = Snum32ToDouble( nValue ); ScValueCell *pCell = new ScValueCell( fValue ); - pDoc->PutCell( static_cast<SCCOL>(nCol), static_cast<SCROW>(nRow), static_cast<SCTAB>(nTab), pCell, (sal_Bool) sal_True ); + pDoc->PutCell( static_cast<SCCOL>(nCol), static_cast<SCROW>(nRow), static_cast<SCTAB>(nTab), pCell, true ); } void OP_Formula123( SvStream& r, sal_uInt16 n ) @@ -415,7 +415,7 @@ void OP_Formula123( SvStream& r, sal_uInt16 n ) pCell->AddRecalcMode( RECALCMODE_ONLOAD_ONCE ); - pDoc->PutCell( static_cast<SCCOL>(nCol), static_cast<SCROW>(nRow), static_cast<SCTAB>(nTab), pCell, (sal_Bool) sal_True ); + pDoc->PutCell( static_cast<SCCOL>(nCol), static_cast<SCROW>(nRow), static_cast<SCTAB>(nTab), pCell, true ); } void OP_IEEENumber123( SvStream& r, sal_uInt16 /*n*/ ) @@ -427,7 +427,7 @@ void OP_IEEENumber123( SvStream& r, sal_uInt16 /*n*/ ) r >> nRow >> nTab >> nCol >> dValue; ScValueCell *pCell = new ScValueCell(dValue); - pDoc->PutCell( static_cast<SCCOL>(nCol), static_cast<SCROW>(nRow), static_cast<SCTAB>(nTab), pCell, (sal_Bool) sal_True ); + pDoc->PutCell( static_cast<SCCOL>(nCol), static_cast<SCROW>(nRow), static_cast<SCTAB>(nTab), pCell, true ); } void OP_Note123( SvStream& r, sal_uInt16 n) diff --git a/sc/source/filter/lotus/tool.cxx b/sc/source/filter/lotus/tool.cxx index 5b433bda5d57..b9654ecc3084 100644 --- a/sc/source/filter/lotus/tool.cxx +++ b/sc/source/filter/lotus/tool.cxx @@ -123,7 +123,7 @@ void PutFormString( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_Char* pString ) { pDoc->ApplyAttr( nCol, nRow, nTab, *pJustify ); ScStringCell* pZelle = new ScStringCell( String( pString, pLotusRoot->eCharsetQ ) ); - pDoc->PutCell( nCol, nRow, nTab, pZelle, ( sal_Bool ) sal_True ); + pDoc->PutCell( nCol, nRow, nTab, pZelle, true ); } } diff --git a/sc/source/filter/qpro/qpro.cxx b/sc/source/filter/qpro/qpro.cxx index 9f170d1bf7ec..898c01904477 100644 --- a/sc/source/filter/qpro/qpro.cxx +++ b/sc/source/filter/qpro/qpro.cxx @@ -69,7 +69,7 @@ FltError ScQProReader::readSheet( SCTAB nTab, ScDocument* pDoc, ScQProStyle *pSt readString( aLabel, getLength() - 7 ); nStyle = nStyle >> 3; pStyle->SetFormat( pDoc, nCol, nRow, nTab, nStyle ); - pDoc->PutCell( nCol, nRow, nTab, ScBaseCell::CreateTextCell( aLabel, pDoc ), (sal_Bool) sal_True ); + pDoc->PutCell( nCol, nRow, nTab, ScBaseCell::CreateTextCell( aLabel, pDoc ), true ); } break; @@ -89,7 +89,7 @@ FltError ScQProReader::readSheet( SCTAB nTab, ScDocument* pDoc, ScQProStyle *pSt ScValueCell* pInteger = new ScValueCell( ( double ) nValue ); nStyle = nStyle >> 3; pStyle->SetFormat( pDoc, nCol, nRow, nTab, nStyle ); - pDoc->PutCell(nCol ,nRow, nTab ,pInteger,(sal_Bool) sal_True); + pDoc->PutCell(nCol ,nRow, nTab ,pInteger,true); } break; @@ -99,7 +99,7 @@ FltError ScQProReader::readSheet( SCTAB nTab, ScDocument* pDoc, ScQProStyle *pSt ScValueCell* pFloat = new ScValueCell( nValue ); nStyle = nStyle >> 3; pStyle->SetFormat( pDoc, nCol, nRow, nTab, nStyle ); - pDoc->PutCell( nCol, nRow, nTab, pFloat, (sal_Bool) sal_True ); + pDoc->PutCell( nCol, nRow, nTab, pFloat, true ); } break; @@ -118,7 +118,7 @@ FltError ScQProReader::readSheet( SCTAB nTab, ScDocument* pDoc, ScQProStyle *pSt nStyle = nStyle >> 3; pFormula->AddRecalcMode( RECALCMODE_ONLOAD_ONCE ); pStyle->SetFormat( pDoc, nCol, nRow, nTab, nStyle ); - pDoc->PutCell( nCol, nRow, nTab, pFormula, ( sal_Bool ) sal_True ); + pDoc->PutCell( nCol, nRow, nTab, pFormula, true ); } } break; diff --git a/sc/source/filter/starcalc/scflt.cxx b/sc/source/filter/starcalc/scflt.cxx index ccb7ee99c65f..745923d7f5ae 100644 --- a/sc/source/filter/starcalc/scflt.cxx +++ b/sc/source/filter/starcalc/scflt.cxx @@ -1650,7 +1650,7 @@ void Sc10Import::LoadCol(SCCOL Col, SCTAB Tab) s[Len + 1] = 0; ScFormulaCell* pCell = new ScFormulaCell( pDoc, ScAddress( Col, static_cast<SCROW> (Row), Tab ) ); pCell->SetHybridFormula( SC10TOSTRING( s ),formula::FormulaGrammar::GRAM_NATIVE ); - pDoc->PutCell( Col, static_cast<SCROW> (Row), Tab, pCell, (sal_Bool)sal_True ); + pDoc->PutCell( Col, static_cast<SCROW> (Row), Tab, pCell, true ); break; } case ctNote : diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index 830d832399c0..f8b0a9cf51b7 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -1630,7 +1630,7 @@ sal_Bool ScImportExport::Sylk2Doc( SvStream& rStrm ) { pDoc->PutCell( nCol, nRow, aRange.aStart.Tab(), ScBaseCell::CreateTextCell( aText, pDoc), - (sal_Bool) sal_True); + true); } else { diff --git a/sc/source/ui/inc/undodat.hxx b/sc/source/ui/inc/undodat.hxx index 64410c340a2c..3dee48fd6e38 100644 --- a/sc/source/ui/inc/undodat.hxx +++ b/sc/source/ui/inc/undodat.hxx @@ -470,10 +470,10 @@ public: TYPEINFO(); ScUndoChartData( ScDocShell* pNewDocShell, const String& rName, const ScRange& rNew, - sal_Bool bColHdr, sal_Bool bRowHdr, sal_Bool bAdd ); + bool bColHdr, bool bRowHdr, bool bAdd ); ScUndoChartData( ScDocShell* pNewDocShell, const String& rName, const ScRangeListRef& rNew, - sal_Bool bColHdr, sal_Bool bRowHdr, sal_Bool bAdd ); + bool bColHdr, bool bRowHdr, bool bAdd ); virtual ~ScUndoChartData(); virtual void Undo(); @@ -486,13 +486,13 @@ public: private: String aChartName; ScRangeListRef aOldRangeListRef; - sal_Bool bOldColHeaders; - sal_Bool bOldRowHeaders; + bool bOldColHeaders; + bool bOldRowHeaders; // ScRange aNewRange; ScRangeListRef aNewRangeListRef; - sal_Bool bNewColHeaders; - sal_Bool bNewRowHeaders; - sal_Bool bAddRange; + bool bNewColHeaders; + bool bNewRowHeaders; + bool bAddRange; void Init(); }; diff --git a/sc/source/ui/undo/undodat.cxx b/sc/source/ui/undo/undodat.cxx index 9295418a2f38..2f3edf7e927c 100644 --- a/sc/source/ui/undo/undodat.cxx +++ b/sc/source/ui/undo/undodat.cxx @@ -1954,8 +1954,8 @@ void ScUndoChartData::Init() } ScUndoChartData::ScUndoChartData( ScDocShell* pNewDocShell, const String& rName, - const ScRange& rNew, sal_Bool bColHdr, sal_Bool bRowHdr, - sal_Bool bAdd ) : + const ScRange& rNew, bool bColHdr, bool bRowHdr, + bool bAdd ) : ScSimpleUndo( pNewDocShell ), aChartName( rName ), bNewColHeaders( bColHdr ), @@ -1969,8 +1969,8 @@ ScUndoChartData::ScUndoChartData( ScDocShell* pNewDocShell, const String& rName, } ScUndoChartData::ScUndoChartData( ScDocShell* pNewDocShell, const String& rName, - const ScRangeListRef& rNew, sal_Bool bColHdr, sal_Bool bRowHdr, - sal_Bool bAdd ) : + const ScRangeListRef& rNew, bool bColHdr, bool bRowHdr, + bool bAdd ) : ScSimpleUndo( pNewDocShell ), aChartName( rName ), aNewRangeListRef( rNew ), diff --git a/sc/source/ui/view/dbfunc4.cxx b/sc/source/ui/view/dbfunc4.cxx index dd4ff54344d8..e57a372a543a 100644 --- a/sc/source/ui/view/dbfunc4.cxx +++ b/sc/source/ui/view/dbfunc4.cxx @@ -74,12 +74,12 @@ sal_uInt16 ScDBFunc::DoUpdateCharts( const ScAddress& rPos, ScDocument* pDoc, sa if ( pObject->GetObjIdentifier() == OBJ_OLE2 && pDoc->IsChart( pObject ) ) { String aName = ((SdrOle2Obj*)pObject)->GetPersistName(); - sal_Bool bHit = sal_True; + bool bHit = true; if ( !bAllCharts ) { ScRangeList aRanges; - sal_Bool bColHeaders = false; - sal_Bool bRowHeaders = false; + bool bColHeaders = false; + bool bRowHeaders = false; pDoc->GetOldChartParameters( aName, aRanges, bColHeaders, bRowHeaders ); bHit = aRanges.In( rPos ); } diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx index d4cc64f7af9a..a4193f9d1b25 100644 --- a/sc/source/ui/view/formatsh.cxx +++ b/sc/source/ui/view/formatsh.cxx @@ -808,7 +808,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq ) if ( SFX_STYLE_FAMILY_PARA == eFam ) { SfxItemSet& rNewSet = pStyleSheet->GetItemSet(); - sal_Bool bNumFormatChanged; + bool bNumFormatChanged; if ( ScGlobal::CheckWidthInvalidate( bNumFormatChanged, aOldSet, rNewSet ) ) pDoc->InvalidateTextWidth( NULL, NULL, bNumFormatChanged ); |