diff options
author | Noel Grandin <noel@peralex.com> | 2014-02-17 10:44:41 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-02-18 10:07:58 +0200 |
commit | d5cca704f55e3e02147171e645af215e4edb22d4 (patch) | |
tree | e4f6c02901b4661f17ce39627f71118dab4eee31 /sc/source/ui | |
parent | 766b50d25355cdb535144b88144bba51219f4214 (diff) |
sal_Bool->bool, and remove some virtual modifiers
none of these methods are being override anywhere, so remove
the virtual modifiers.
Change-Id: I84fa4211418b7eae38b60964b076ecd73013513a
Diffstat (limited to 'sc/source/ui')
-rw-r--r-- | sc/source/ui/docshell/dbdocfun.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/docshell/docfunc.cxx | 276 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh3.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/inc/docfunc.hxx | 183 | ||||
-rw-r--r-- | sc/source/ui/unoobj/cellsuno.cxx | 78 | ||||
-rw-r--r-- | sc/source/ui/unoobj/docuno.cxx | 48 | ||||
-rw-r--r-- | sc/source/ui/unoobj/linkuno.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/unoobj/nameuno.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/vba/vbarange.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/view/viewfun2.cxx | 4 |
11 files changed, 307 insertions, 304 deletions
diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx index bc29e598a222..e5ed5d433360 100644 --- a/sc/source/ui/docshell/dbdocfun.cxx +++ b/sc/source/ui/docshell/dbdocfun.cxx @@ -568,7 +568,7 @@ bool ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam, rSortParam.nCol2,rSortParam.nRow2,nSrcTab ); ScAddress aDest( rSortParam.nDestCol, rSortParam.nDestRow, rSortParam.nDestTab ); - rDocShell.GetDocFunc().MoveBlock( aSource, aDest, false, false, false, sal_True ); + rDocShell.GetDocFunc().MoveBlock( aSource, aDest, false, false, false, true ); } // don't call ScDocument::Sort with an empty SortParam (may be empty here if bCopy is set) diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index aa17b2bb98f8..c5daaeedd114 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -137,7 +137,7 @@ static void lcl_PaintAbove( ScDocShell& rDocShell, const ScRange& rRange ) //------------------------------------------------------------------------ -sal_Bool ScDocFunc::AdjustRowHeight( const ScRange& rRange, sal_Bool bPaint ) +bool ScDocFunc::AdjustRowHeight( const ScRange& rRange, bool bPaint ) { ScDocument* pDoc = rDocShell.GetDocument(); if ( pDoc->IsImportingXML() ) @@ -170,7 +170,7 @@ sal_Bool ScDocFunc::AdjustRowHeight( const ScRange& rRange, sal_Bool bPaint ) //------------------------------------------------------------------------ -sal_Bool ScDocFunc::DetectiveAddPred(const ScAddress& rPos) +bool ScDocFunc::DetectiveAddPred(const ScAddress& rPos) { ScDocShellModificator aModificator( rDocShell ); @@ -208,7 +208,7 @@ sal_Bool ScDocFunc::DetectiveAddPred(const ScAddress& rPos) return bDone; } -sal_Bool ScDocFunc::DetectiveDelPred(const ScAddress& rPos) +bool ScDocFunc::DetectiveDelPred(const ScAddress& rPos) { ScDocument* pDoc = rDocShell.GetDocument(); @@ -249,7 +249,7 @@ sal_Bool ScDocFunc::DetectiveDelPred(const ScAddress& rPos) return bDone; } -sal_Bool ScDocFunc::DetectiveAddSucc(const ScAddress& rPos) +bool ScDocFunc::DetectiveAddSucc(const ScAddress& rPos) { ScDocShellModificator aModificator( rDocShell ); @@ -288,7 +288,7 @@ sal_Bool ScDocFunc::DetectiveAddSucc(const ScAddress& rPos) return bDone; } -sal_Bool ScDocFunc::DetectiveDelSucc(const ScAddress& rPos) +bool ScDocFunc::DetectiveDelSucc(const ScAddress& rPos) { ScDocument* pDoc = rDocShell.GetDocument(); @@ -329,7 +329,7 @@ sal_Bool ScDocFunc::DetectiveDelSucc(const ScAddress& rPos) return bDone; } -sal_Bool ScDocFunc::DetectiveAddError(const ScAddress& rPos) +bool ScDocFunc::DetectiveAddError(const ScAddress& rPos) { ScDocShellModificator aModificator( rDocShell ); @@ -368,7 +368,7 @@ sal_Bool ScDocFunc::DetectiveAddError(const ScAddress& rPos) return bDone; } -sal_Bool ScDocFunc::DetectiveMarkInvalid(SCTAB nTab) +bool ScDocFunc::DetectiveMarkInvalid(SCTAB nTab) { ScDocShellModificator aModificator( rDocShell ); @@ -410,7 +410,7 @@ sal_Bool ScDocFunc::DetectiveMarkInvalid(SCTAB nTab) return bDone; } -sal_Bool ScDocFunc::DetectiveDelAll(SCTAB nTab) +bool ScDocFunc::DetectiveDelAll(SCTAB nTab) { ScDocument* pDoc = rDocShell.GetDocument(); @@ -452,9 +452,9 @@ sal_Bool ScDocFunc::DetectiveDelAll(SCTAB nTab) return bDone; } -sal_Bool ScDocFunc::DetectiveRefresh( sal_Bool bAutomatic ) +bool ScDocFunc::DetectiveRefresh( bool bAutomatic ) { - sal_Bool bDone = false; + bool bDone = false; ScDocument* pDoc = rDocShell.GetDocument(); bool bUndo (pDoc->IsUndoEnabled()); @@ -520,7 +520,7 @@ sal_Bool ScDocFunc::DetectiveRefresh( sal_Bool bAutomatic ) } } rDocShell.SetDrawModified(); - bDone = sal_True; + bDone = true; } return bDone; } @@ -566,8 +566,8 @@ void ScDocFunc::DetectiveCollectAllSuccs(const ScRangeList& rSrcRanges, vector<S //------------------------------------------------------------------------ -sal_Bool ScDocFunc::DeleteContents( const ScMarkData& rMark, sal_uInt16 nFlags, - sal_Bool bRecord, sal_Bool bApi ) +bool ScDocFunc::DeleteContents( const ScMarkData& rMark, sal_uInt16 nFlags, + bool bRecord, bool bApi ) { ScDocShellModificator aModificator( rDocShell ); @@ -591,13 +591,13 @@ sal_Bool ScDocFunc::DeleteContents( const ScMarkData& rMark, sal_uInt16 nFlags, } ScRange aMarkRange; - sal_Bool bSimple = false; + bool bSimple = false; ScMarkData aMultiMark = rMark; aMultiMark.SetMarking(false); // fuer MarkToMulti ScDocument* pUndoDoc = NULL; - sal_Bool bMulti = !bSimple && aMultiMark.IsMultiMarked(); + bool bMulti = !bSimple && aMultiMark.IsMultiMarked(); if (!bSimple) { aMultiMark.MarkToMulti(); @@ -611,10 +611,10 @@ sal_Bool ScDocFunc::DeleteContents( const ScMarkData& rMark, sal_uInt16 nFlags, } // keine Objekte auf geschuetzten Tabellen - sal_Bool bObjects = false; + bool bObjects = false; if ( nFlags & IDF_OBJECTS ) { - bObjects = sal_True; + bObjects = true; SCTAB nTabCount = pDoc->GetTableCount(); ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end(); for (; itr != itrEnd && *itr < nTabCount; ++itr) @@ -688,13 +688,13 @@ sal_Bool ScDocFunc::DeleteContents( const ScMarkData& rMark, sal_uInt16 nFlags, aModificator.SetDocumentModified(); - return sal_True; + return true; } //------------------------------------------------------------------------ -sal_Bool ScDocFunc::TransliterateText( const ScMarkData& rMark, sal_Int32 nType, - sal_Bool bRecord, sal_Bool bApi ) +bool ScDocFunc::TransliterateText( const ScMarkData& rMark, sal_Int32 nType, + bool bRecord, bool bApi ) { ScDocShellModificator aModificator( rDocShell ); @@ -744,12 +744,12 @@ sal_Bool ScDocFunc::TransliterateText( const ScMarkData& rMark, sal_Int32 nType, aModificator.SetDocumentModified(); - return sal_True; + return true; } //------------------------------------------------------------------------ -sal_Bool ScDocFunc::SetNormalString( bool& o_rbNumFmtSet, const ScAddress& rPos, const OUString& rText, sal_Bool bApi ) +bool ScDocFunc::SetNormalString( bool& o_rbNumFmtSet, const ScAddress& rPos, const OUString& rText, bool bApi ) { ScDocShellModificator aModificator( rDocShell ); ScDocument* pDoc = rDocShell.GetDocument(); @@ -806,7 +806,7 @@ sal_Bool ScDocFunc::SetNormalString( bool& o_rbNumFmtSet, const ScAddress& rPos, if (bApi) NotifyInputHandler( rPos ); - return sal_True; + return true; } bool ScDocFunc::SetValueCell( const ScAddress& rPos, double fVal, bool bInteraction ) @@ -1025,7 +1025,7 @@ void ScDocFunc::NotifyInputHandler( const ScAddress& rPos ) ScInputHandler* pInputHdl = SC_MOD()->GetInputHdl(); if ( pInputHdl && pInputHdl->GetCursorPos() == rPos ) { - sal_Bool bIsEditMode(pInputHdl->IsEditMode()); + bool bIsEditMode(pInputHdl->IsEditMode()); // set modified if in editmode, because so the string is not set in the InputWindow like in the cell // (the cell shows the same like the InputWindow) @@ -1051,18 +1051,18 @@ bool ScDocFunc::PutData( const ScAddress& rPos, ScEditEngineDefaulter& rEngine, { // PutData ruft PutCell oder SetNormalString - sal_Bool bRet = false; + bool bRet = false; ScDocument* pDoc = rDocShell.GetDocument(); ScEditAttrTester aTester( &rEngine ); - sal_Bool bEditCell = aTester.NeedsObject(); + bool bEditCell = aTester.NeedsObject(); if ( bEditCell ) { // #i61702# With bLoseContent set, the content of rEngine isn't restored // (used in loading XML, where after the removeActionLock call the API object's // EditEngine isn't accessed again. - sal_Bool bLoseContent = pDoc->IsImportingXML(); + bool bLoseContent = pDoc->IsImportingXML(); - sal_Bool bUpdateMode(rEngine.GetUpdateMode()); + bool bUpdateMode(rEngine.GetUpdateMode()); if (bUpdateMode) rEngine.SetUpdateMode(false); @@ -1133,7 +1133,7 @@ bool ScDocFunc::PutData( const ScAddress& rPos, ScEditEngineDefaulter& rEngine, ScMarkData aMark; aMark.SelectTable( rPos.Tab(), true ); aMark.SetMarkArea( ScRange( rPos ) ); - ApplyAttributes( aMark, aPattern, sal_True, bApi ); + ApplyAttributes( aMark, aPattern, true, bApi ); } } @@ -1221,7 +1221,7 @@ bool ScDocFunc::ShowNote( const ScAddress& rPos, bool bShow ) //------------------------------------------------------------------------ -bool ScDocFunc::SetNoteText( const ScAddress& rPos, const OUString& rText, sal_Bool bApi ) +bool ScDocFunc::SetNoteText( const ScAddress& rPos, const OUString& rText, bool bApi ) { ScDocShellModificator aModificator( rDocShell ); @@ -1252,7 +1252,7 @@ bool ScDocFunc::SetNoteText( const ScAddress& rPos, const OUString& rText, sal_B //------------------------------------------------------------------------ -bool ScDocFunc::ReplaceNote( const ScAddress& rPos, const OUString& rNoteText, const OUString* pAuthor, const OUString* pDate, sal_Bool bApi ) +bool ScDocFunc::ReplaceNote( const ScAddress& rPos, const OUString& rNoteText, const OUString* pAuthor, const OUString* pDate, bool bApi ) { bool bDone = false; @@ -1314,8 +1314,8 @@ bool ScDocFunc::ReplaceNote( const ScAddress& rPos, const OUString& rNoteText, c //------------------------------------------------------------------------ -sal_Bool ScDocFunc::ApplyAttributes( const ScMarkData& rMark, const ScPatternAttr& rPattern, - sal_Bool bRecord, sal_Bool bApi ) +bool ScDocFunc::ApplyAttributes( const ScMarkData& rMark, const ScPatternAttr& rPattern, + bool bRecord, bool bApi ) { ScDocument* pDoc = rDocShell.GetDocument(); if ( bRecord && !pDoc->IsUndoEnabled() ) @@ -1338,7 +1338,7 @@ sal_Bool ScDocFunc::ApplyAttributes( const ScMarkData& rMark, const ScPatternAtt //! Umrandung ScRange aMultiRange; - sal_Bool bMulti = rMark.IsMultiMarked(); + bool bMulti = rMark.IsMultiMarked(); if ( bMulti ) rMark.GetMultiMarkArea( aMultiRange ); else @@ -1373,12 +1373,12 @@ sal_Bool ScDocFunc::ApplyAttributes( const ScMarkData& rMark, const ScPatternAtt aModificator.SetDocumentModified(); - return sal_True; + return true; } -sal_Bool ScDocFunc::ApplyStyle( const ScMarkData& rMark, const OUString& rStyleName, - sal_Bool bRecord, sal_Bool bApi ) +bool ScDocFunc::ApplyStyle( const ScMarkData& rMark, const OUString& rStyleName, + bool bRecord, bool bApi ) { ScDocument* pDoc = rDocShell.GetDocument(); if ( bRecord && !pDoc->IsUndoEnabled() ) @@ -1404,7 +1404,7 @@ sal_Bool ScDocFunc::ApplyStyle( const ScMarkData& rMark, const OUString& rStyleN ScDocShellModificator aModificator( rDocShell ); ScRange aMultiRange; - sal_Bool bMulti = rMark.IsMultiMarked(); + bool bMulti = rMark.IsMultiMarked(); if ( bMulti ) rMark.GetMultiMarkArea( aMultiRange ); else @@ -1442,7 +1442,7 @@ sal_Bool ScDocFunc::ApplyStyle( const ScMarkData& rMark, const OUString& rStyleN aModificator.SetDocumentModified(); - return sal_True; + return true; } namespace { @@ -2542,8 +2542,8 @@ bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, return true; } -sal_Bool ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos, - sal_Bool bCut, sal_Bool bRecord, sal_Bool bPaint, sal_Bool bApi ) +bool ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos, + bool bCut, bool bRecord, bool bPaint, bool bApi ) { ScDocShellModificator aModificator( rDocShell ); @@ -2564,7 +2564,7 @@ sal_Bool ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos } // zugehoerige Szenarien auch anpassen - nur wenn innerhalb einer Tabelle verschoben wird! - sal_Bool bScenariosAdded = false; + bool bScenariosAdded = false; ScDocument* pDoc = rDocShell.GetDocument(); if (bRecord && !pDoc->IsUndoEnabled()) bRecord = false; @@ -2574,7 +2574,7 @@ sal_Bool ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos while ( nEndTab+1 < nTabCount && pDoc->IsScenario(nEndTab+1) ) { ++nEndTab; - bScenariosAdded = sal_True; + bScenariosAdded = true; } SCTAB nSrcTabCount = nEndTab-nStartTab+1; @@ -2603,13 +2603,13 @@ sal_Bool ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos SCCOL nOldEndCol = nEndCol; SCROW nOldEndRow = nEndRow; - sal_Bool bClipOver = false; + bool bClipOver = false; for (nTab=nStartTab; nTab<=nEndTab; nTab++) { SCCOL nTmpEndCol = nOldEndCol; SCROW nTmpEndRow = nOldEndRow; if (pDoc->ExtendMerge( nStartCol, nStartRow, nTmpEndCol, nTmpEndRow, nTab )) - bClipOver = sal_True; + bClipOver = true; if ( nTmpEndCol > nEndCol ) nEndCol = nTmpEndCol; if ( nTmpEndRow > nEndRow ) nEndRow = nTmpEndRow; } @@ -2620,7 +2620,7 @@ sal_Bool ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos SCCOL nUndoEndCol = nDestCol + ( nEndCol-nStartCol ); // erweitert im Zielblock SCROW nUndoEndRow = nDestRow + ( nEndRow-nStartRow ); - sal_Bool bIncludeFiltered = bCut; + bool bIncludeFiltered = bCut; if ( !bIncludeFiltered ) { // adjust sizes to include only non-filtered rows @@ -2686,8 +2686,8 @@ sal_Bool ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos ScRefUndoData* pUndoData = NULL; if (bRecord) { - sal_Bool bWholeCols = ( nStartRow == 0 && nEndRow == MAXROW ); - sal_Bool bWholeRows = ( nStartCol == 0 && nEndCol == MAXCOL ); + bool bWholeCols = ( nStartRow == 0 && nEndRow == MAXROW ); + bool bWholeRows = ( nStartCol == 0 && nEndCol == MAXCOL ); sal_uInt16 nUndoFlags = (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS; pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); @@ -2712,7 +2712,7 @@ sal_Bool ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos pDoc->BeginDrawUndo(); } - sal_Bool bSourceHeight = false; // Hoehen angepasst? + bool bSourceHeight = false; // Hoehen angepasst? if (bCut) { ScMarkData aDelMark; // only for tables @@ -2772,7 +2772,7 @@ sal_Bool ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos UnmergeCells( aPasteDest, false ); VirtualDevice aVirtDev; - sal_Bool bDestHeight = AdjustRowHeight( + bool bDestHeight = AdjustRowHeight( ScRange( 0,nDestRow,nDestTab, MAXCOL,nDestEndRow,nDestEndTab ), false ); @@ -2890,7 +2890,7 @@ sal_Bool ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); delete pClipDoc; - return sal_True; + return true; } //------------------------------------------------------------------------ @@ -2993,9 +2993,9 @@ void VBA_DeleteModule( ScDocShell& rDocSh, const OUString& sModuleName ) } -sal_Bool ScDocFunc::InsertTable( SCTAB nTab, const OUString& rName, sal_Bool bRecord, sal_Bool bApi ) +bool ScDocFunc::InsertTable( SCTAB nTab, const OUString& rName, bool bRecord, bool bApi ) { - sal_Bool bSuccess = false; + bool bSuccess = false; WaitObject aWait( rDocShell.GetActiveDialogParent() ); ScDocShellModificator aModificator( rDocShell ); @@ -3005,7 +3005,7 @@ sal_Bool ScDocFunc::InsertTable( SCTAB nTab, const OUString& rName, sal_Bool bRe // Strange loop, also basic is loaded too early ( InsertTable ) // is called via the xml import for sheets in described in ODF - sal_Bool bInsertDocModule = false; + bool bInsertDocModule = false; if( !rDocShell.GetDocument()->IsImportingXML() ) { @@ -3018,7 +3018,7 @@ sal_Bool ScDocFunc::InsertTable( SCTAB nTab, const OUString& rName, sal_Bool bRe pDoc->BeginDrawUndo(); // InsertTab erzeugt ein SdrUndoNewPage SCTAB nTabCount = pDoc->GetTableCount(); - sal_Bool bAppend = ( nTab >= nTabCount ); + bool bAppend = ( nTab >= nTabCount ); if ( bAppend ) nTab = nTabCount; // wichtig fuer Undo @@ -3039,7 +3039,7 @@ sal_Bool ScDocFunc::InsertTable( SCTAB nTab, const OUString& rName, sal_Bool bRe rDocShell.PostPaintExtras(); aModificator.SetDocumentModified(); SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); - bSuccess = sal_True; + bSuccess = true; } else if (!bApi) rDocShell.ErrorMessage(STR_TABINSERT_ERROR); @@ -3047,20 +3047,20 @@ sal_Bool ScDocFunc::InsertTable( SCTAB nTab, const OUString& rName, sal_Bool bRe return bSuccess; } -sal_Bool ScDocFunc::DeleteTable( SCTAB nTab, sal_Bool bRecord, sal_Bool /* bApi */ ) +bool ScDocFunc::DeleteTable( SCTAB nTab, bool bRecord, bool /* bApi */ ) { WaitObject aWait( rDocShell.GetActiveDialogParent() ); ScDocShellModificator aModificator( rDocShell ); - sal_Bool bSuccess = false; + bool bSuccess = false; ScDocument* pDoc = rDocShell.GetDocument(); - sal_Bool bVbaEnabled = pDoc ? pDoc->IsInVBAMode() : false; + bool bVbaEnabled = pDoc ? pDoc->IsInVBAMode() : false; if (bRecord && !pDoc->IsUndoEnabled()) bRecord = false; if ( bVbaEnabled ) bRecord = false; - sal_Bool bWasLinked = pDoc->IsLinked(nTab); + bool bWasLinked = pDoc->IsLinked(nTab); ScDocument* pUndoDoc = NULL; ScRefUndoData* pUndoData = NULL; if (bRecord) @@ -3089,7 +3089,7 @@ sal_Bool ScDocFunc::DeleteTable( SCTAB nTab, sal_Bool bRecord, sal_Bool /* bApi sal_uInt16 nScenFlags; pDoc->GetScenarioData( nTab, aComment, aColor, nScenFlags ); pUndoDoc->SetScenarioData( nTab, aComment, aColor, nScenFlags ); - sal_Bool bActive = pDoc->IsActiveScenario( nTab ); + bool bActive = pDoc->IsActiveScenario( nTab ); pUndoDoc->SetActiveScenario( nTab, bActive ); } pUndoDoc->SetVisible( nTab, pDoc->IsVisible( nTab ) ); @@ -3138,7 +3138,7 @@ sal_Bool ScDocFunc::DeleteTable( SCTAB nTab, sal_Bool bRecord, sal_Bool /* bApi pSfxApp->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) ); pSfxApp->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); - bSuccess = sal_True; + bSuccess = true; } else { @@ -3148,12 +3148,12 @@ sal_Bool ScDocFunc::DeleteTable( SCTAB nTab, sal_Bool bRecord, sal_Bool /* bApi return bSuccess; } -sal_Bool ScDocFunc::SetTableVisible( SCTAB nTab, bool bVisible, sal_Bool bApi ) +bool ScDocFunc::SetTableVisible( SCTAB nTab, bool bVisible, bool bApi ) { ScDocument* pDoc = rDocShell.GetDocument(); bool bUndo(pDoc->IsUndoEnabled()); if ( pDoc->IsVisible( nTab ) == bVisible ) - return sal_True; // nichts zu tun - ok + return true; // nichts zu tun - ok if ( !pDoc->IsDocEditable() ) { @@ -3198,15 +3198,15 @@ sal_Bool ScDocFunc::SetTableVisible( SCTAB nTab, bool bVisible, sal_Bool bApi ) rDocShell.PostPaint(0,0,0,MAXCOL,MAXROW,MAXTAB, PAINT_EXTRAS); aModificator.SetDocumentModified(); - return sal_True; + return true; } -sal_Bool ScDocFunc::SetLayoutRTL( SCTAB nTab, bool bRTL, sal_Bool /* bApi */ ) +bool ScDocFunc::SetLayoutRTL( SCTAB nTab, bool bRTL, bool /* bApi */ ) { ScDocument* pDoc = rDocShell.GetDocument(); bool bUndo(pDoc->IsUndoEnabled()); if ( pDoc->IsLayoutRTL( nTab ) == bRTL ) - return sal_True; // nothing to do - ok + return true; // nothing to do - ok //! protection (sheet or document?) @@ -3229,10 +3229,10 @@ sal_Bool ScDocFunc::SetLayoutRTL( SCTAB nTab, bool bRTL, sal_Bool /* bApi */ ) pBindings->Invalidate( SID_ATTR_SIZE ); } - return sal_True; + return true; } -sal_Bool ScDocFunc::RenameTable( SCTAB nTab, const OUString& rName, sal_Bool bRecord, sal_Bool bApi ) +bool ScDocFunc::RenameTable( SCTAB nTab, const OUString& rName, bool bRecord, bool bApi ) { ScDocument* pDoc = rDocShell.GetDocument(); if (bRecord && !pDoc->IsUndoEnabled()) @@ -3246,7 +3246,7 @@ sal_Bool ScDocFunc::RenameTable( SCTAB nTab, const OUString& rName, sal_Bool bRe ScDocShellModificator aModificator( rDocShell ); - sal_Bool bSuccess = false; + bool bSuccess = false; OUString sOldName; pDoc->GetName(nTab, sOldName); if (pDoc->RenameTab( nTab, rName )) @@ -3260,7 +3260,7 @@ sal_Bool ScDocFunc::RenameTable( SCTAB nTab, const OUString& rName, sal_Bool bRe aModificator.SetDocumentModified(); SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); - bSuccess = sal_True; + bSuccess = true; } return bSuccess; } @@ -3370,7 +3370,7 @@ bool ScDocFunc::SetTabBgColor( //! - Optimale Hoehe fuer Edit-Zellen ist unterschiedlich zwischen Drucker und Bildschirm //! - Optimale Breite braucht Selektion, um evtl. nur selektierte Zellen zu beruecksichtigen -static sal_uInt16 lcl_GetOptimalColWidth( ScDocShell& rDocShell, SCCOL nCol, SCTAB nTab, sal_Bool bFormula ) +static sal_uInt16 lcl_GetOptimalColWidth( ScDocShell& rDocShell, SCCOL nCol, SCTAB nTab, bool bFormula ) { ScSizeDeviceProvider aProv(&rDocShell); OutputDevice* pDev = aProv.GetDevice(); // has pixel MapMode @@ -3385,14 +3385,14 @@ static sal_uInt16 lcl_GetOptimalColWidth( ScDocShell& rDocShell, SCCOL nCol, SCT return nTwips; } -sal_Bool ScDocFunc::SetWidthOrHeight( sal_Bool bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRanges, SCTAB nTab, +bool ScDocFunc::SetWidthOrHeight( bool bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRanges, SCTAB nTab, ScSizeMode eMode, sal_uInt16 nSizeTwips, - sal_Bool bRecord, sal_Bool bApi ) + bool bRecord, bool bApi ) { ScDocShellModificator aModificator( rDocShell ); if (!nRangeCnt) - return sal_True; + return true; ScDocument* pDoc = rDocShell.GetDocument(); if ( bRecord && !pDoc->IsUndoEnabled() ) @@ -3406,11 +3406,11 @@ sal_Bool ScDocFunc::SetWidthOrHeight( sal_Bool bWidth, SCCOLROW nRangeCnt, SCCOL return false; } - sal_Bool bSuccess = false; + bool bSuccess = false; SCCOLROW nStart = pRanges[0]; SCCOLROW nEnd = pRanges[2*nRangeCnt-1]; - sal_Bool bFormula = false; + bool bFormula = false; if ( eMode == SC_SIZE_OPTIMAL ) { //! Option "Formeln anzeigen" - woher nehmen? @@ -3444,8 +3444,8 @@ sal_Bool ScDocFunc::SetWidthOrHeight( sal_Bool bWidth, SCCOLROW nRangeCnt, SCCOL pUndoTab = new ScOutlineTable( *pTable ); } - sal_Bool bShow = nSizeTwips > 0 || eMode != SC_SIZE_DIRECT; - sal_Bool bOutline = false; + bool bShow = nSizeTwips > 0 || eMode != SC_SIZE_DIRECT; + bool bOutline = false; for (SCCOLROW nRangeNo=0; nRangeNo<nRangeCnt; nRangeNo++) { @@ -3456,7 +3456,7 @@ sal_Bool ScDocFunc::SetWidthOrHeight( sal_Bool bWidth, SCCOLROW nRangeCnt, SCCOL { if ( eMode==SC_SIZE_OPTIMAL || eMode==SC_SIZE_VISOPT ) { - sal_Bool bAll = ( eMode==SC_SIZE_OPTIMAL ); + bool bAll = ( eMode==SC_SIZE_OPTIMAL ); if (!bAll) { // fuer alle eingeblendeten CR_MANUALSIZE loeschen, @@ -3557,8 +3557,8 @@ sal_Bool ScDocFunc::SetWidthOrHeight( sal_Bool bWidth, SCCOLROW nRangeCnt, SCCOL } -sal_Bool ScDocFunc::InsertPageBreak( sal_Bool bColumn, const ScAddress& rPos, - sal_Bool bRecord, sal_Bool bSetModified, sal_Bool /* bApi */ ) +bool ScDocFunc::InsertPageBreak( bool bColumn, const ScAddress& rPos, + bool bRecord, bool bSetModified, bool /* bApi */ ) { ScDocShellModificator aModificator( rDocShell ); @@ -3618,11 +3618,11 @@ sal_Bool ScDocFunc::InsertPageBreak( sal_Bool bColumn, const ScAddress& rPos, if (bSetModified) aModificator.SetDocumentModified(); - return sal_True; + return true; } -sal_Bool ScDocFunc::RemovePageBreak( sal_Bool bColumn, const ScAddress& rPos, - sal_Bool bRecord, sal_Bool bSetModified, sal_Bool /* bApi */ ) +bool ScDocFunc::RemovePageBreak( bool bColumn, const ScAddress& rPos, + bool bRecord, bool bSetModified, bool /* bApi */ ) { ScDocShellModificator aModificator( rDocShell ); @@ -3682,7 +3682,7 @@ sal_Bool ScDocFunc::RemovePageBreak( sal_Bool bColumn, const ScAddress& rPos, if (bSetModified) aModificator.SetDocumentModified(); - return sal_True; + return true; } //------------------------------------------------------------------------ @@ -3714,7 +3714,7 @@ void ScDocFunc::ProtectSheet( SCTAB nTab, const ScTableProtection& rProtect ) aModificator.SetDocumentModified(); } -sal_Bool ScDocFunc::Protect( SCTAB nTab, const OUString& rPassword, sal_Bool /*bApi*/ ) +bool ScDocFunc::Protect( SCTAB nTab, const OUString& rPassword, bool /*bApi*/ ) { ScDocument* pDoc = rDocShell.GetDocument(); if (nTab == TABLEID_DOC) @@ -3772,7 +3772,7 @@ sal_Bool ScDocFunc::Protect( SCTAB nTab, const OUString& rPassword, sal_Bool /*b return true; } -sal_Bool ScDocFunc::Unprotect( SCTAB nTab, const OUString& rPassword, sal_Bool bApi ) +bool ScDocFunc::Unprotect( SCTAB nTab, const OUString& rPassword, bool bApi ) { ScDocument* pDoc = rDocShell.GetDocument(); @@ -3851,7 +3851,7 @@ sal_Bool ScDocFunc::Unprotect( SCTAB nTab, const OUString& rPassword, sal_Bool b //------------------------------------------------------------------------ -sal_Bool ScDocFunc::ClearItems( const ScMarkData& rMark, const sal_uInt16* pWhich, sal_Bool bApi ) +bool ScDocFunc::ClearItems( const ScMarkData& rMark, const sal_uInt16* pWhich, bool bApi ) { ScDocShellModificator aModificator( rDocShell ); @@ -3895,10 +3895,10 @@ sal_Bool ScDocFunc::ClearItems( const ScMarkData& rMark, const sal_uInt16* pWhic //! Bindings-Invalidate etc.? - return sal_True; + return true; } -sal_Bool ScDocFunc::ChangeIndent( const ScMarkData& rMark, sal_Bool bIncrement, sal_Bool bApi ) +bool ScDocFunc::ChangeIndent( const ScMarkData& rMark, bool bIncrement, bool bApi ) { ScDocShellModificator aModificator( rDocShell ); @@ -3961,7 +3961,7 @@ sal_Bool ScDocFunc::ChangeIndent( const ScMarkData& rMark, sal_Bool bIncrement, pBindings->Invalidate( SID_ALIGN_ANY_JUSTIFIED ); } - return sal_True; + return true; } bool ScDocFunc::AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark, @@ -3969,7 +3969,7 @@ bool ScDocFunc::AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark, { ScDocShellModificator aModificator( rDocShell ); - sal_Bool bSuccess = false; + bool bSuccess = false; ScDocument* pDoc = rDocShell.GetDocument(); SCCOL nStartCol = rRange.aStart.Col(); SCROW nStartRow = rRange.aStart.Row(); @@ -4032,8 +4032,8 @@ bool ScDocFunc::AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark, ScMarkData::iterator itr = aMark.begin(), itrEnd = aMark.end(); for (; itr != itrEnd && *itr < nTabCount; ++itr) { - SetWidthOrHeight( sal_True, 1,nCols, *itr, SC_SIZE_VISOPT, STD_EXTRA_WIDTH, false, sal_True); - SetWidthOrHeight( false,1,nRows, *itr, SC_SIZE_VISOPT, 0, false, false); + SetWidthOrHeight( true, 1, nCols, *itr, SC_SIZE_VISOPT, STD_EXTRA_WIDTH, false, true); + SetWidthOrHeight( false, 1, nRows, *itr, SC_SIZE_VISOPT, 0, false, false); rDocShell.PostPaint( 0,0,*itr, MAXCOL,MAXROW,*itr, PAINT_GRID | PAINT_LEFT | PAINT_TOP ); } @@ -4043,7 +4043,7 @@ bool ScDocFunc::AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark, ScMarkData::iterator itr = aMark.begin(), itrEnd = aMark.end(); for (; itr != itrEnd && *itr < nTabCount; ++itr) { - sal_Bool bAdj = AdjustRowHeight( ScRange(nStartCol, nStartRow, *itr, + bool bAdj = AdjustRowHeight( ScRange(nStartCol, nStartRow, *itr, nEndCol, nEndRow, *itr), false ); if (bAdj) rDocShell.PostPaint( 0,nStartRow,*itr, MAXCOL,MAXROW,*itr, @@ -4070,13 +4070,13 @@ bool ScDocFunc::AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark, //------------------------------------------------------------------------ -sal_Bool ScDocFunc::EnterMatrix( const ScRange& rRange, const ScMarkData* pTabMark, - const ScTokenArray* pTokenArray, const OUString& rString, sal_Bool bApi, sal_Bool bEnglish, +bool ScDocFunc::EnterMatrix( const ScRange& rRange, const ScMarkData* pTabMark, + const ScTokenArray* pTokenArray, const OUString& rString, bool bApi, bool bEnglish, const OUString& rFormulaNmsp, const formula::FormulaGrammar::Grammar eGrammar ) { ScDocShellModificator aModificator( rDocShell ); - sal_Bool bSuccess = false; + bool bSuccess = false; ScDocument* pDoc = rDocShell.GetDocument(); SCCOL nStartCol = rRange.aStart.Col(); SCROW nStartRow = rRange.aStart.Row(); @@ -4149,7 +4149,7 @@ sal_Bool ScDocFunc::EnterMatrix( const ScRange& rRange, const ScMarkData* pTabMa rDocShell.PostPaint( nStartCol,nStartRow,nStartTab,nEndCol,nEndRow,nEndTab, PAINT_GRID ); aModificator.SetDocumentModified(); - bSuccess = sal_True; + bSuccess = true; } else if (!bApi) rDocShell.ErrorMessage(aTester.GetMessageId()); @@ -4159,12 +4159,12 @@ sal_Bool ScDocFunc::EnterMatrix( const ScRange& rRange, const ScMarkData* pTabMa //------------------------------------------------------------------------ -sal_Bool ScDocFunc::TabOp( const ScRange& rRange, const ScMarkData* pTabMark, - const ScTabOpParam& rParam, sal_Bool bRecord, sal_Bool bApi ) +bool ScDocFunc::TabOp( const ScRange& rRange, const ScMarkData* pTabMark, + const ScTabOpParam& rParam, bool bRecord, bool bApi ) { ScDocShellModificator aModificator( rDocShell ); - sal_Bool bSuccess = false; + bool bSuccess = false; ScDocument* pDoc = rDocShell.GetDocument(); SCCOL nStartCol = rRange.aStart.Col(); SCROW nStartRow = rRange.aStart.Row(); @@ -4210,7 +4210,7 @@ sal_Bool ScDocFunc::TabOp( const ScRange& rRange, const ScMarkData* pTabMark, pDoc->InsertTableOp(rParam, nStartCol, nStartRow, nEndCol, nEndRow, aMark); rDocShell.PostPaintGridAll(); aModificator.SetDocumentModified(); - bSuccess = sal_True; + bSuccess = true; } else if (!bApi) rDocShell.ErrorMessage(aTester.GetMessageId()); @@ -4410,14 +4410,14 @@ bool ScDocFunc::FillSimple( const ScRange& rRange, const ScMarkData* pTabMark, return bSuccess; } -sal_Bool ScDocFunc::FillSeries( const ScRange& rRange, const ScMarkData* pTabMark, +bool ScDocFunc::FillSeries( const ScRange& rRange, const ScMarkData* pTabMark, FillDir eDir, FillCmd eCmd, FillDateCmd eDateCmd, double fStart, double fStep, double fMax, - sal_Bool bRecord, sal_Bool bApi ) + bool bRecord, bool bApi ) { ScDocShellModificator aModificator( rDocShell ); - sal_Bool bSuccess = false; + bool bSuccess = false; ScDocument* pDoc = rDocShell.GetDocument(); SCCOL nStartCol = rRange.aStart.Col(); SCROW nStartRow = rRange.aStart.Row(); @@ -4529,7 +4529,7 @@ sal_Bool ScDocFunc::FillSeries( const ScRange& rRange, const ScMarkData* pTabMar eDir, eCmd, eDateCmd, fStart, fStep, fMax) ); } - bSuccess = sal_True; + bSuccess = true; } else if (!bApi) rDocShell.ErrorMessage(aTester.GetMessageId()); @@ -4537,15 +4537,15 @@ sal_Bool ScDocFunc::FillSeries( const ScRange& rRange, const ScMarkData* pTabMar return bSuccess; } -sal_Bool ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, - FillDir eDir, sal_uLong nCount, sal_Bool bRecord, sal_Bool bApi ) +bool ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, + FillDir eDir, sal_uLong nCount, bool bRecord, bool bApi ) { double fStep = 1.0; double fMax = MAXDOUBLE; return FillAuto( rRange, pTabMark, eDir, FILL_AUTO, FILL_DAY, nCount, fStep, fMax, bRecord, bApi ); } -sal_Bool ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillDir eDir, FillCmd eCmd, FillDateCmd eDateCmd, sal_uLong nCount, double fStep, double fMax, sal_Bool bRecord, sal_Bool bApi ) +bool ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillDir eDir, FillCmd eCmd, FillDateCmd eDateCmd, sal_uLong nCount, double fStep, double fMax, bool bRecord, bool bApi ) { ScDocShellModificator aModificator( rDocShell ); @@ -4670,12 +4670,12 @@ sal_Bool ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillD aModificator.SetDocumentModified(); rRange = aDestArea; // Zielbereich zurueckgeben (zum Markieren) - return sal_True; + return true; } //------------------------------------------------------------------------ -sal_Bool ScDocFunc::MergeCells( const ScCellMergeOption& rOption, sal_Bool bContents, sal_Bool bRecord, sal_Bool bApi ) +bool ScDocFunc::MergeCells( const ScCellMergeOption& rOption, bool bContents, bool bRecord, bool bApi ) { using ::std::set; @@ -4786,10 +4786,10 @@ sal_Bool ScDocFunc::MergeCells( const ScCellMergeOption& rOption, sal_Bool bCont pBindings->Invalidate( FID_MERGE_TOGGLE ); } - return sal_True; + return true; } -sal_Bool ScDocFunc::UnmergeCells( const ScRange& rRange, sal_Bool bRecord ) +bool ScDocFunc::UnmergeCells( const ScRange& rRange, bool bRecord ) { ScCellMergeOption aOption(rRange.aStart.Col(), rRange.aStart.Row(), rRange.aEnd.Col(), rRange.aEnd.Row()); SCTAB nTab1 = rRange.aStart.Tab(), nTab2 = rRange.aEnd.Tab(); @@ -4799,7 +4799,7 @@ sal_Bool ScDocFunc::UnmergeCells( const ScRange& rRange, sal_Bool bRecord ) return UnmergeCells(aOption, bRecord); } -bool ScDocFunc::UnmergeCells( const ScCellMergeOption& rOption, sal_Bool bRecord ) +bool ScDocFunc::UnmergeCells( const ScCellMergeOption& rOption, bool bRecord ) { using ::std::set; @@ -4899,7 +4899,7 @@ bool ScDocFunc::SetNewRangeNames( ScRangeName* pNewRanges, bool bModifyDoc, SCTA // #i55926# While loading XML, formula cells only have a single string token, // so CompileNameFormula would never find any name (index) tokens, and would // unnecessarily loop through all cells. - sal_Bool bCompile = ( !pDoc->IsImportingXML() && pDoc->GetNamedRangesLockCount() == 0 ); + bool bCompile = ( !pDoc->IsImportingXML() && pDoc->GetNamedRangesLockCount() == 0 ); if ( bCompile ) pDoc->CompileNameFormula( true ); // CreateFormulaString @@ -4948,7 +4948,7 @@ void ScDocFunc::ModifyAllRangeNames( const boost::ptr_map<OUString, ScRangeName> void ScDocFunc::CreateOneName( ScRangeName& rList, SCCOL nPosX, SCROW nPosY, SCTAB nTab, SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, - sal_Bool& rCancel, sal_Bool bApi ) + bool& rCancel, bool bApi ) { if (rCancel) return; @@ -4989,7 +4989,7 @@ void ScDocFunc::CreateOneName( ScRangeName& rList, bInsert = true; } else if ( nResult == RET_CANCEL ) - rCancel = sal_True; + rCancel = true; } } } @@ -5009,14 +5009,14 @@ void ScDocFunc::CreateOneName( ScRangeName& rList, } } -sal_Bool ScDocFunc::CreateNames( const ScRange& rRange, sal_uInt16 nFlags, sal_Bool bApi, SCTAB aTab ) +bool ScDocFunc::CreateNames( const ScRange& rRange, sal_uInt16 nFlags, bool bApi, SCTAB aTab ) { if (!nFlags) return false; // war nix ScDocShellModificator aModificator( rDocShell ); - sal_Bool bDone = false; + bool bDone = false; SCCOL nStartCol = rRange.aStart.Col(); SCROW nStartRow = rRange.aStart.Row(); SCCOL nEndCol = rRange.aEnd.Col(); @@ -5024,7 +5024,7 @@ sal_Bool ScDocFunc::CreateNames( const ScRange& rRange, sal_uInt16 nFlags, sal_B SCTAB nTab = rRange.aStart.Tab(); OSL_ENSURE(rRange.aEnd.Tab() == nTab, "CreateNames: mehrere Tabellen geht nicht"); - sal_Bool bValid = sal_True; + bool bValid = true; if ( nFlags & ( NAME_TOP | NAME_BOTTOM ) ) if ( nStartRow == nEndRow ) bValid = false; @@ -5045,10 +5045,10 @@ sal_Bool ScDocFunc::CreateNames( const ScRange& rRange, sal_uInt16 nFlags, sal_B return false; // soll nicht sein ScRangeName aNewRanges( *pNames ); - sal_Bool bTop = ( ( nFlags & NAME_TOP ) != 0 ); - sal_Bool bLeft = ( ( nFlags & NAME_LEFT ) != 0 ); - sal_Bool bBottom = ( ( nFlags & NAME_BOTTOM ) != 0 ); - sal_Bool bRight = ( ( nFlags & NAME_RIGHT ) != 0 ); + bool bTop = ( ( nFlags & NAME_TOP ) != 0 ); + bool bLeft = ( ( nFlags & NAME_LEFT ) != 0 ); + bool bBottom = ( ( nFlags & NAME_BOTTOM ) != 0 ); + bool bRight = ( ( nFlags & NAME_RIGHT ) != 0 ); SCCOL nContX1 = nStartCol; SCROW nContY1 = nStartRow; @@ -5064,7 +5064,7 @@ sal_Bool ScDocFunc::CreateNames( const ScRange& rRange, sal_uInt16 nFlags, sal_B if ( bRight ) --nContX2; - sal_Bool bCancel = false; + bool bCancel = false; SCCOL i; SCROW j; @@ -5101,11 +5101,11 @@ sal_Bool ScDocFunc::CreateNames( const ScRange& rRange, sal_uInt16 nFlags, sal_B //------------------------------------------------------------------------ -sal_Bool ScDocFunc::InsertNameList( const ScAddress& rStartPos, sal_Bool bApi ) +bool ScDocFunc::InsertNameList( const ScAddress& rStartPos, bool bApi ) { ScDocShellModificator aModificator( rDocShell ); - sal_Bool bDone = false; + bool bDone = false; ScDocument* pDoc = rDocShell.GetDocument(); const bool bRecord = pDoc->IsUndoEnabled(); SCTAB nTab = rStartPos.Tab(); @@ -5203,7 +5203,7 @@ sal_Bool ScDocFunc::InsertNameList( const ScAddress& rStartPos, sal_Bool bApi ) rDocShell.PostPaint( nStartCol,nStartRow,nTab, nEndCol,nEndRow,nTab, PAINT_GRID ); aModificator.SetDocumentModified(); - bDone = sal_True; + bDone = true; } else if (!bApi) rDocShell.ErrorMessage(aTester.GetMessageId()); @@ -5213,7 +5213,7 @@ sal_Bool ScDocFunc::InsertNameList( const ScAddress& rStartPos, sal_Bool bApi ) //------------------------------------------------------------------------ -sal_Bool ScDocFunc::ResizeMatrix( const ScRange& rOldRange, const ScAddress& rNewEnd, sal_Bool bApi ) +bool ScDocFunc::ResizeMatrix( const ScRange& rOldRange, const ScAddress& rNewEnd, bool bApi ) { ScDocument* pDoc = rDocShell.GetDocument(); SCCOL nStartCol = rOldRange.aStart.Col(); @@ -5222,7 +5222,7 @@ sal_Bool ScDocFunc::ResizeMatrix( const ScRange& rOldRange, const ScAddress& rNe bool bUndo(pDoc->IsUndoEnabled()); - sal_Bool bRet = false; + bool bRet = false; OUString aFormula; pDoc->GetFormula( nStartCol, nStartRow, nTab, aFormula ); @@ -5239,7 +5239,7 @@ sal_Bool ScDocFunc::ResizeMatrix( const ScRange& rOldRange, const ScAddress& rNe aMark.SelectTable( nTab, true ); ScRange aNewRange( rOldRange.aStart, rNewEnd ); - if ( DeleteContents( aMark, IDF_CONTENTS, sal_True, bApi ) ) + if ( DeleteContents( aMark, IDF_CONTENTS, true, bApi ) ) { // GRAM_PODF_A1 for API compatibility. bRet = EnterMatrix( aNewRange, &aMark, NULL, aFormula, bApi, false, EMPTY_OUSTRING, formula::FormulaGrammar::GRAM_PODF_A1 ); @@ -5259,13 +5259,13 @@ sal_Bool ScDocFunc::ResizeMatrix( const ScRange& rOldRange, const ScAddress& rNe //------------------------------------------------------------------------ -sal_Bool ScDocFunc::InsertAreaLink( const OUString& rFile, const OUString& rFilter, +bool ScDocFunc::InsertAreaLink( const OUString& rFile, const OUString& rFilter, const OUString& rOptions, const OUString& rSource, const ScRange& rDestRange, sal_uLong nRefresh, - sal_Bool bFitBlock, sal_Bool bApi ) + bool bFitBlock, bool bApi ) { ScDocument* pDoc = rDocShell.GetDocument(); - sal_Bool bUndo (pDoc->IsUndoEnabled()); + bool bUndo (pDoc->IsUndoEnabled()); sfx2::LinkManager* pLinkManager = pDoc->GetLinkManager(); @@ -5336,7 +5336,7 @@ sal_Bool ScDocFunc::InsertAreaLink( const OUString& rFile, const OUString& rFilt pLink->SetDoInsert(bFitBlock); // beim ersten Update ggf. nichts einfuegen pLink->Update(); // kein SetInCreate -> Update ausfuehren } - pLink->SetDoInsert(true); // Default = sal_True + pLink->SetDoInsert(true); // Default = true SfxBindings* pBindings = rDocShell.GetViewBindings(); if (pBindings) @@ -5344,7 +5344,7 @@ sal_Bool ScDocFunc::InsertAreaLink( const OUString& rFile, const OUString& rFilt SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); // Navigator - return sal_True; + return true; } namespace { diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index 962c53759141..4f43cbe03991 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -2822,7 +2822,7 @@ void ScDocShell::SetDocumentModified( sal_Bool bIsModified /* = sal_True */ ) if ( pList && ( aDocument.IsDetectiveDirty() || pList->HasAddError() ) && pList->Count() && !IsInUndo() && SC_MOD()->GetAppOptions().GetDetectiveAuto() ) { - GetDocFunc().DetectiveRefresh(sal_True); // sal_True = caused by automatic update + GetDocFunc().DetectiveRefresh(true); // sal_True = caused by automatic update } aDocument.SetDetectiveDirty(false); // always reset, also if not refreshed } diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx index 125ac0f523dd..b12516eefd07 100644 --- a/sc/source/ui/docshell/docsh3.cxx +++ b/sc/source/ui/docshell/docsh3.cxx @@ -1044,7 +1044,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck { OUString aName; aDocument.CreateValidTabName( aName ); - GetDocFunc().InsertTable( aSourceRange.aStart.Tab(), aName, sal_True, false ); + GetDocFunc().InsertTable( aSourceRange.aStart.Tab(), aName, true, false ); } break; case SC_CAT_INSERT_ROWS: @@ -1054,7 +1054,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck GetDocFunc().InsertCells( aSourceRange, NULL, INS_INSCOLS, true, false ); break; case SC_CAT_DELETE_TABS : - GetDocFunc().DeleteTable( aSourceRange.aStart.Tab(), sal_True, false ); + GetDocFunc().DeleteTable( aSourceRange.aStart.Tab(), true, false ); break; case SC_CAT_DELETE_ROWS: { @@ -1091,7 +1091,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck const ScChangeActionMove* pMove = (const ScChangeActionMove*) pSourceAction; ScRange aFromRange( pMove->GetFromRange().MakeRange() ); GetDocFunc().MoveBlock( aFromRange, - aSourceRange.aStart, sal_True, sal_True, false, false ); + aSourceRange.aStart, true, true, false, false ); } break; default: diff --git a/sc/source/ui/inc/docfunc.hxx b/sc/source/ui/inc/docfunc.hxx index 75442fdf3086..d40c794bb248 100644 --- a/sc/source/ui/inc/docfunc.hxx +++ b/sc/source/ui/inc/docfunc.hxx @@ -51,47 +51,48 @@ class ScConditionalFormatList; class ScDocFunc { protected: - ScDocShell& rDocShell; + ScDocShell& rDocShell; - sal_Bool AdjustRowHeight( const ScRange& rRange, sal_Bool bPaint = true ); + bool AdjustRowHeight( const ScRange& rRange, bool bPaint = true ); void CreateOneName( ScRangeName& rList, SCCOL nPosX, SCROW nPosY, SCTAB nTab, SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, - sal_Bool& rCancel, sal_Bool bApi ); + bool& rCancel, bool bApi ); void NotifyInputHandler( const ScAddress& rPos ); - ScDocFunc( ScDocShell& rDocSh ): rDocShell(rDocSh) {} + ScDocFunc( ScDocShell& rDocSh ): rDocShell(rDocSh) {} public: - virtual ~ScDocFunc() {} + virtual ~ScDocFunc() {} DECL_LINK( NotifyDrawUndo, SdrUndoAction* ); // for grouping multiple operations into one with a new name - virtual void EnterListAction( sal_uInt16 nNameResId ); - virtual void EndListAction(); - - virtual sal_Bool DetectiveAddPred(const ScAddress& rPos); - virtual sal_Bool DetectiveDelPred(const ScAddress& rPos); - virtual sal_Bool DetectiveAddSucc(const ScAddress& rPos); - virtual sal_Bool DetectiveDelSucc(const ScAddress& rPos); - virtual sal_Bool DetectiveAddError(const ScAddress& rPos); - virtual sal_Bool DetectiveMarkInvalid(SCTAB nTab); - virtual sal_Bool DetectiveDelAll(SCTAB nTab); - virtual sal_Bool DetectiveRefresh(sal_Bool bAutomatic = false); - virtual void DetectiveCollectAllPreds(const ScRangeList& rSrcRanges, ::std::vector<ScTokenRef>& rRefTokens); - virtual void DetectiveCollectAllSuccs(const ScRangeList& rSrcRanges, ::std::vector<ScTokenRef>& rRefTokens); - - virtual sal_Bool DeleteContents( const ScMarkData& rMark, sal_uInt16 nFlags, - sal_Bool bRecord, sal_Bool bApi ); - - virtual sal_Bool TransliterateText( const ScMarkData& rMark, sal_Int32 nType, - sal_Bool bRecord, sal_Bool bApi ); - - virtual sal_Bool SetNormalString( bool& o_rbNumFmtSet, const ScAddress& rPos, const OUString& rText, sal_Bool bApi ); - virtual bool SetValueCell( const ScAddress& rPos, double fVal, bool bInteraction ); - virtual bool SetValueCells( const ScAddress& rPos, const std::vector<double>& aVals, bool bInteraction ); - virtual bool SetStringCell( const ScAddress& rPos, const OUString& rStr, bool bInteraction ); - virtual bool SetEditCell( const ScAddress& rPos, const EditTextObject& rStr, bool bInteraction ); + void EnterListAction( sal_uInt16 nNameResId ); + void EndListAction(); + + bool DetectiveAddPred(const ScAddress& rPos); + bool DetectiveDelPred(const ScAddress& rPos); + bool DetectiveAddSucc(const ScAddress& rPos); + bool DetectiveDelSucc(const ScAddress& rPos); + bool DetectiveAddError(const ScAddress& rPos); + bool DetectiveMarkInvalid(SCTAB nTab); + bool DetectiveDelAll(SCTAB nTab); + bool DetectiveRefresh(bool bAutomatic = false); + void DetectiveCollectAllPreds(const ScRangeList& rSrcRanges, ::std::vector<ScTokenRef>& rRefTokens); + void DetectiveCollectAllSuccs(const ScRangeList& rSrcRanges, ::std::vector<ScTokenRef>& rRefTokens); + + SC_DLLPUBLIC bool + DeleteContents( const ScMarkData& rMark, sal_uInt16 nFlags, + bool bRecord, bool bApi ); + + bool TransliterateText( const ScMarkData& rMark, sal_Int32 nType, + bool bRecord, bool bApi ); + + bool SetNormalString( bool& o_rbNumFmtSet, const ScAddress& rPos, const OUString& rText, bool bApi ); + bool SetValueCell( const ScAddress& rPos, double fVal, bool bInteraction ); + bool SetValueCells( const ScAddress& rPos, const std::vector<double>& aVals, bool bInteraction ); + bool SetStringCell( const ScAddress& rPos, const OUString& rStr, bool bInteraction ); + bool SetEditCell( const ScAddress& rPos, const EditTextObject& rStr, bool bInteraction ); bool SetStringOrEditCell( const ScAddress& rPos, const OUString& rStr, bool bInteraction ); @@ -99,115 +100,117 @@ public: * This method takes ownership of the formula cell instance. The caller * must not delete it after passing it to this call. */ - virtual bool SetFormulaCell( const ScAddress& rPos, ScFormulaCell* pCell, bool bInteraction ); - virtual bool PutData( const ScAddress& rPos, ScEditEngineDefaulter& rEngine, bool bApi ); - virtual bool SetCellText( + bool SetFormulaCell( const ScAddress& rPos, ScFormulaCell* pCell, bool bInteraction ); + bool PutData( const ScAddress& rPos, ScEditEngineDefaulter& rEngine, bool bApi ); + bool SetCellText( const ScAddress& rPos, const OUString& rText, bool bInterpret, bool bEnglish, bool bApi, const formula::FormulaGrammar::Grammar eGrammar ); - virtual bool ShowNote( const ScAddress& rPos, bool bShow = true ); - inline bool HideNote( const ScAddress& rPos ) { return ShowNote( rPos, false ); } + bool ShowNote( const ScAddress& rPos, bool bShow = true ); + inline bool HideNote( const ScAddress& rPos ) { return ShowNote( rPos, false ); } - virtual bool SetNoteText( const ScAddress& rPos, const OUString& rNoteText, sal_Bool bApi ); - virtual bool ReplaceNote( const ScAddress& rPos, const OUString& rNoteText, const OUString* pAuthor, const OUString* pDate, sal_Bool bApi ); + bool SetNoteText( const ScAddress& rPos, const OUString& rNoteText, bool bApi ); + bool ReplaceNote( const ScAddress& rPos, const OUString& rNoteText, const OUString* pAuthor, const OUString* pDate, bool bApi ); - virtual sal_Bool ApplyAttributes( const ScMarkData& rMark, const ScPatternAttr& rPattern, - sal_Bool bRecord, sal_Bool bApi ); - virtual sal_Bool ApplyStyle( const ScMarkData& rMark, const OUString& rStyleName, - sal_Bool bRecord, sal_Bool bApi ); + bool ApplyAttributes( const ScMarkData& rMark, const ScPatternAttr& rPattern, + bool bRecord, bool bApi ); + bool ApplyStyle( const ScMarkData& rMark, const OUString& rStyleName, + bool bRecord, bool bApi ); - virtual bool InsertCells( const ScRange& rRange,const ScMarkData* pTabMark, + bool InsertCells( const ScRange& rRange,const ScMarkData* pTabMark, InsCellCmd eCmd, bool bRecord, bool bApi, bool bPartOfPaste = false ); - virtual bool DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, + bool DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, DelCellCmd eCmd, bool bRecord, bool bApi ); - virtual sal_Bool MoveBlock( const ScRange& rSource, const ScAddress& rDestPos, - sal_Bool bCut, sal_Bool bRecord, sal_Bool bPaint, sal_Bool bApi ); + bool MoveBlock( const ScRange& rSource, const ScAddress& rDestPos, + bool bCut, bool bRecord, bool bPaint, bool bApi ); - virtual sal_Bool InsertTable( SCTAB nTab, const OUString& rName, sal_Bool bRecord, sal_Bool bApi ); - virtual sal_Bool RenameTable( SCTAB nTab, const OUString& rName, sal_Bool bRecord, sal_Bool bApi ); - virtual sal_Bool DeleteTable( SCTAB nTab, sal_Bool bRecord, sal_Bool bApi ); + bool InsertTable( SCTAB nTab, const OUString& rName, bool bRecord, bool bApi ); + bool RenameTable( SCTAB nTab, const OUString& rName, bool bRecord, bool bApi ); + bool DeleteTable( SCTAB nTab, bool bRecord, bool bApi ); - virtual bool SetTabBgColor( SCTAB nTab, const Color& rColor, bool bRecord, bool bApi ); - virtual bool SetTabBgColor( ScUndoTabColorInfo::List& rUndoTabColorList, bool bRecord, bool bApi ); + bool SetTabBgColor( SCTAB nTab, const Color& rColor, bool bRecord, bool bApi ); + bool SetTabBgColor( ScUndoTabColorInfo::List& rUndoTabColorList, bool bRecord, bool bApi ); - virtual sal_Bool SetTableVisible( SCTAB nTab, bool bVisible, sal_Bool bApi ); + bool SetTableVisible( SCTAB nTab, bool bVisible, bool bApi ); - virtual sal_Bool SetLayoutRTL( SCTAB nTab, bool bRTL, sal_Bool bApi ); + bool SetLayoutRTL( SCTAB nTab, bool bRTL, bool bApi ); - virtual SC_DLLPUBLIC sal_Bool - SetWidthOrHeight( sal_Bool bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRanges, + SC_DLLPUBLIC bool + SetWidthOrHeight( bool bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRanges, SCTAB nTab, ScSizeMode eMode, sal_uInt16 nSizeTwips, - sal_Bool bRecord, sal_Bool bApi ); + bool bRecord, bool bApi ); - virtual sal_Bool InsertPageBreak( sal_Bool bColumn, const ScAddress& rPos, - sal_Bool bRecord, sal_Bool bSetModified, sal_Bool bApi ); - virtual sal_Bool RemovePageBreak( sal_Bool bColumn, const ScAddress& rPos, - sal_Bool bRecord, sal_Bool bSetModified, sal_Bool bApi ); + bool InsertPageBreak( bool bColumn, const ScAddress& rPos, + bool bRecord, bool bSetModified, bool bApi ); + bool RemovePageBreak( bool bColumn, const ScAddress& rPos, + bool bRecord, bool bSetModified, bool bApi ); - virtual void ProtectSheet( SCTAB nTab, const ScTableProtection& rProtect ); + void ProtectSheet( SCTAB nTab, const ScTableProtection& rProtect ); - virtual sal_Bool Protect( SCTAB nTab, const OUString& rPassword, sal_Bool bApi ); - virtual sal_Bool Unprotect( SCTAB nTab, const OUString& rPassword, sal_Bool bApi ); + bool Protect( SCTAB nTab, const OUString& rPassword, bool bApi ); + bool Unprotect( SCTAB nTab, const OUString& rPassword, bool bApi ); - virtual sal_Bool ClearItems( const ScMarkData& rMark, const sal_uInt16* pWhich, sal_Bool bApi ); - virtual sal_Bool ChangeIndent( const ScMarkData& rMark, sal_Bool bIncrement, sal_Bool bApi ); - virtual bool AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark, + bool ClearItems( const ScMarkData& rMark, const sal_uInt16* pWhich, bool bApi ); + bool ChangeIndent( const ScMarkData& rMark, bool bIncrement, bool bApi ); + bool AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark, sal_uInt16 nFormatNo, bool bRecord, bool bApi ); - virtual sal_Bool EnterMatrix( const ScRange& rRange, const ScMarkData* pTabMark, + SC_DLLPUBLIC bool + EnterMatrix( const ScRange& rRange, const ScMarkData* pTabMark, const ScTokenArray* pTokenArray, - const OUString& rString, sal_Bool bApi, sal_Bool bEnglish, + const OUString& rString, bool bApi, bool bEnglish, const OUString& rFormulaNmsp, const formula::FormulaGrammar::Grammar ); - virtual sal_Bool TabOp( const ScRange& rRange, const ScMarkData* pTabMark, - const ScTabOpParam& rParam, sal_Bool bRecord, sal_Bool bApi ); + bool TabOp( const ScRange& rRange, const ScMarkData* pTabMark, + const ScTabOpParam& rParam, bool bRecord, bool bApi ); - virtual bool FillSimple( const ScRange& rRange, const ScMarkData* pTabMark, + bool FillSimple( const ScRange& rRange, const ScMarkData* pTabMark, FillDir eDir, bool bRecord, bool bApi ); - virtual sal_Bool FillSeries( const ScRange& rRange, const ScMarkData* pTabMark, + bool FillSeries( const ScRange& rRange, const ScMarkData* pTabMark, FillDir eDir, FillCmd eCmd, FillDateCmd eDateCmd, double fStart, double fStep, double fMax, - sal_Bool bRecord, sal_Bool bApi ); + bool bRecord, bool bApi ); // FillAuto: rRange wird von Source-Range auf Dest-Range angepasst - SC_DLLPUBLIC virtual sal_Bool FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillDir eDir, FillCmd eCmd, FillDateCmd eDateCmd, sal_uLong nCount, double fStep, double fMax, sal_Bool bRecord, sal_Bool bApi ); + SC_DLLPUBLIC bool + FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillDir eDir, FillCmd eCmd, FillDateCmd eDateCmd, sal_uLong nCount, double fStep, double fMax, bool bRecord, bool bApi ); - virtual sal_Bool FillAuto( ScRange& rRange, const ScMarkData* pTabMark, - FillDir eDir, sal_uLong nCount, sal_Bool bRecord, sal_Bool bApi ); + bool FillAuto( ScRange& rRange, const ScMarkData* pTabMark, + FillDir eDir, sal_uLong nCount, bool bRecord, bool bApi ); - virtual sal_Bool ResizeMatrix( const ScRange& rOldRange, const ScAddress& rNewEnd, sal_Bool bApi ); + bool ResizeMatrix( const ScRange& rOldRange, const ScAddress& rNewEnd, bool bApi ); - virtual sal_Bool MergeCells( const ScCellMergeOption& rOption, sal_Bool bContents, - sal_Bool bRecord, sal_Bool bApi ); - sal_Bool UnmergeCells( const ScRange& rRange, sal_Bool bRecord ); - bool UnmergeCells( const ScCellMergeOption& rOption, sal_Bool bRecord ); + bool MergeCells( const ScCellMergeOption& rOption, bool bContents, + bool bRecord, bool bApi ); + bool UnmergeCells( const ScRange& rRange, bool bRecord ); + bool UnmergeCells( const ScCellMergeOption& rOption, bool bRecord ); - virtual bool SetNewRangeNames( ScRangeName* pNewRanges, bool bModifyDoc = true, SCTAB nTab = -1 ); // takes ownership of pNewRanges //nTab = -1 for local range names - virtual bool ModifyRangeNames( const ScRangeName& rNewRanges, SCTAB nTab = -1 ); + bool SetNewRangeNames( ScRangeName* pNewRanges, bool bModifyDoc = true, SCTAB nTab = -1 ); // takes ownership of pNewRanges //nTab = -1 for local range names + bool ModifyRangeNames( const ScRangeName& rNewRanges, SCTAB nTab = -1 ); /** * Modify all range names, global scope names as well as sheet local ones, * in one go. Note that this method will <b>not</b> destroy the instances * passed as arguments (it creates copies); the caller is responsible for * destroying them. */ - virtual void ModifyAllRangeNames( const boost::ptr_map<OUString, ScRangeName>& rRangeMap ); + void ModifyAllRangeNames( const boost::ptr_map<OUString, ScRangeName>& rRangeMap ); - virtual sal_Bool CreateNames( const ScRange& rRange, sal_uInt16 nFlags, sal_Bool bApi, SCTAB nTab = -1 ); // -1 for global range names - virtual sal_Bool InsertNameList( const ScAddress& rStartPos, sal_Bool bApi ); + bool CreateNames( const ScRange& rRange, sal_uInt16 nFlags, bool bApi, SCTAB nTab = -1 ); // -1 for global range names + bool InsertNameList( const ScAddress& rStartPos, bool bApi ); - sal_Bool InsertAreaLink( const OUString& rFile, const OUString& rFilter, + bool InsertAreaLink( const OUString& rFile, const OUString& rFilter, const OUString& rOptions, const OUString& rSource, const ScRange& rDestRange, sal_uLong nRefresh, - sal_Bool bFitBlock, sal_Bool bApi ); + bool bFitBlock, bool bApi ); /** * @param nOldIndex If 0 don't delete an old format * @param pFormat if NULL only delete an old format */ - virtual void ReplaceConditionalFormat( sal_uLong nOldIndex, ScConditionalFormat* pFormat, SCTAB nTab, const ScRangeList& rRanges ); + void ReplaceConditionalFormat( sal_uLong nOldIndex, ScConditionalFormat* pFormat, SCTAB nTab, const ScRangeList& rRanges ); /** * Sets or replaces the conditional format list of a table @@ -215,13 +218,13 @@ public: * @param pList the new ScConditionalFormatList, method takes ownership * @param nTab the tab to which the conditional format list belongs */ - virtual void SetConditionalFormatList( ScConditionalFormatList* pList, SCTAB nTab ); + void SetConditionalFormatList( ScConditionalFormatList* pList, SCTAB nTab ); }; class ScDocFuncDirect : public ScDocFunc { public: - ScDocFuncDirect( ScDocShell& rDocSh ) : ScDocFunc( rDocSh ) {} + ScDocFuncDirect( ScDocShell& rDocSh ) : ScDocFunc( rDocSh ) {} virtual ~ScDocFuncDirect() {} }; diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index b51961b4327b..d033f9073611 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -1848,7 +1848,7 @@ void SAL_CALL ScCellRangesBase::clearContents( sal_Int32 nContentFlags ) throw(u if ( ( nContentFlags & IDF_EDITATTR ) && ( nContentFlags & IDF_CONTENTS ) == 0 ) nDelFlags |= IDF_EDITATTR; - pDocShell->GetDocFunc().DeleteContents( *GetMarkData(), nDelFlags, sal_True, sal_True ); + pDocShell->GetDocFunc().DeleteContents( *GetMarkData(), nDelFlags, true, true ); } // sonst ist nichts zu tun } @@ -2000,7 +2000,7 @@ void SAL_CALL ScCellRangesBase::setPropertyToDefault( const OUString& aPropertyN } else aWIDs[1] = 0; - pDocShell->GetDocFunc().ClearItems( *GetMarkData(), aWIDs, sal_True ); + pDocShell->GetDocFunc().ClearItems( *GetMarkData(), aWIDs, true ); } } else if ( pEntry ) @@ -2012,7 +2012,7 @@ void SAL_CALL ScCellRangesBase::setPropertyToDefault( const OUString& aPropertyN else if ( pEntry->nWID == SC_WID_UNO_CELLSTYL ) { OUString aStyleName( ScGlobal::GetRscString( STR_STYLENAME_STANDARD ) ); - pDocShell->GetDocFunc().ApplyStyle( *GetMarkData(), aStyleName, sal_True, sal_True ); + pDocShell->GetDocFunc().ApplyStyle( *GetMarkData(), aStyleName, true, true ); } } } @@ -2293,7 +2293,7 @@ void ScCellRangesBase::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pE if ( nWhich != nFirstItem && nWhich != nSecondItem ) rSet.ClearItem(nWhich); - pDocShell->GetDocFunc().ApplyAttributes( *GetMarkData(), aPattern, sal_True, sal_True ); + pDocShell->GetDocFunc().ApplyAttributes( *GetMarkData(), aPattern, true, true ); } } else // implemented here @@ -2352,7 +2352,7 @@ void ScCellRangesBase::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pE aValue >>= aStrVal; OUString aString(ScStyleNameConversion::ProgrammaticToDisplayName( aStrVal, SFX_STYLE_FAMILY_PARA )); - pDocShell->GetDocFunc().ApplyStyle( *GetMarkData(), aString, sal_True, sal_True ); + pDocShell->GetDocFunc().ApplyStyle( *GetMarkData(), aString, true, true ); } break; case SC_WID_UNO_TBLBORD: @@ -2433,7 +2433,7 @@ void ScCellRangesBase::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pE ScPatternAttr aPattern( pDoc->GetPool() ); aPattern.GetItemSet().Put( SfxUInt32Item( ATTR_VALIDDATA, nIndex ) ); - pDocShell->GetDocFunc().ApplyAttributes( *GetMarkData(), aPattern, sal_True, sal_True ); + pDocShell->GetDocFunc().ApplyAttributes( *GetMarkData(), aPattern, true, true ); } } } @@ -2732,7 +2732,7 @@ void SAL_CALL ScCellRangesBase::setPropertyValues( const uno::Sequence< OUString } if ( pNewPattern && !aRanges.empty() ) - pDocShell->GetDocFunc().ApplyAttributes( *GetMarkData(), *pNewPattern, sal_True, sal_True ); + pDocShell->GetDocFunc().ApplyAttributes( *GetMarkData(), *pNewPattern, true, true ); delete pNewPattern; delete pOldPattern; @@ -2904,7 +2904,7 @@ uno::Sequence< beans::SetPropertyTolerantFailed > SAL_CALL ScCellRangesBase::set } if ( pNewPattern && !aRanges.empty() ) - pDocShell->GetDocFunc().ApplyAttributes( *GetMarkData(), *pNewPattern, sal_True, sal_True ); + pDocShell->GetDocFunc().ApplyAttributes( *GetMarkData(), *pNewPattern, true, true ); delete pNewPattern; delete pOldPattern; @@ -2995,7 +2995,7 @@ void SAL_CALL ScCellRangesBase::decrementIndent() throw(::com::sun::star::uno::R //#97041#; put only MultiMarked ScMarkData in ChangeIndent ScMarkData aMarkData(*GetMarkData()); aMarkData.MarkToMulti(); - pDocShell->GetDocFunc().ChangeIndent( aMarkData, false, sal_True ); + pDocShell->GetDocFunc().ChangeIndent( aMarkData, false, true ); } } @@ -3007,7 +3007,7 @@ void SAL_CALL ScCellRangesBase::incrementIndent() throw(::com::sun::star::uno::R //#97041#; put only MultiMarked ScMarkData in ChangeIndent ScMarkData aMarkData(*GetMarkData()); aMarkData.MarkToMulti(); - pDocShell->GetDocFunc().ChangeIndent( aMarkData, sal_True, sal_True ); + pDocShell->GetDocFunc().ChangeIndent( aMarkData, true, true ); } } @@ -5116,7 +5116,7 @@ void ScCellRangeObj::SetArrayFormula_Impl( const OUString& rFormula, throw uno::RuntimeException(); } - pDocSh->GetDocFunc().EnterMatrix( aRange, NULL, NULL, rFormula, sal_True, sal_True, rFormulaNmsp, eGrammar ); + pDocSh->GetDocFunc().EnterMatrix( aRange, NULL, NULL, rFormula, true, true, rFormulaNmsp, eGrammar ); } else { @@ -5124,7 +5124,7 @@ void ScCellRangeObj::SetArrayFormula_Impl( const OUString& rFormula, ScMarkData aMark; aMark.SetMarkArea( aRange ); aMark.SelectTable( aRange.aStart.Tab(), true ); - pDocSh->GetDocFunc().DeleteContents( aMark, IDF_CONTENTS, sal_True, sal_True ); + pDocSh->GetDocFunc().DeleteContents( aMark, IDF_CONTENTS, true, true ); } } } @@ -5202,7 +5202,7 @@ void SAL_CALL ScCellRangeObj::setArrayTokens( const uno::Sequence<sheet::Formula // Actually GRAM_PODF_A1 is a don't-care here because of the token // array being set, it fits with other API compatibility grammars // though. - pDocSh->GetDocFunc().EnterMatrix( aRange, NULL, &aTokenArray, EMPTY_OUSTRING, sal_True, sal_True, EMPTY_OUSTRING, formula::FormulaGrammar::GRAM_PODF_A1 ); + pDocSh->GetDocFunc().EnterMatrix( aRange, NULL, &aTokenArray, EMPTY_OUSTRING, true, true, EMPTY_OUSTRING, formula::FormulaGrammar::GRAM_PODF_A1 ); } else { @@ -5210,7 +5210,7 @@ void SAL_CALL ScCellRangeObj::setArrayTokens( const uno::Sequence<sheet::Formula ScMarkData aMark; aMark.SetMarkArea( aRange ); aMark.SelectTable( aRange.aStart.Tab(), true ); - pDocSh->GetDocFunc().DeleteContents( aMark, IDF_CONTENTS, sal_True, sal_True ); + pDocSh->GetDocFunc().DeleteContents( aMark, IDF_CONTENTS, true, true ); } } } @@ -5368,7 +5368,7 @@ void SAL_CALL ScCellRangeObj::setTableOperation( const table::CellRangeAddress& } if (!bError) - pDocSh->GetDocFunc().TabOp( aRange, NULL, aParam, sal_True, sal_True ); + pDocSh->GetDocFunc().TabOp( aRange, NULL, aParam, true, true ); } } @@ -5474,7 +5474,7 @@ void SAL_CALL ScCellRangeObj::fillSeries( sheet::FillDirection nFillDirection, if (!bError) pDocSh->GetDocFunc().FillSeries( aRange, NULL, eDir, eCmd, eDateCmd, - MAXDOUBLE, fStep, fEndValue, sal_True, sal_True ); + MAXDOUBLE, fStep, fEndValue, true, true ); } } @@ -5518,7 +5518,7 @@ void SAL_CALL ScCellRangeObj::fillAuto( sheet::FillDirection nFillDirection, bError = sal_True; if (!bError) - pDocSh->GetDocFunc().FillAuto( aSourceRange, NULL, eDir, nCount, sal_True, sal_True ); + pDocSh->GetDocFunc().FillAuto( aSourceRange, NULL, eDir, nCount, true, true ); } } @@ -7221,7 +7221,7 @@ void SAL_CALL ScTableSheetObj::setName( const OUString& aNewName ) if ( pDocSh ) { OUString aString(aNewName); - pDocSh->GetDocFunc().RenameTable( GetTab_Impl(), aString, sal_True, sal_True ); + pDocSh->GetDocFunc().RenameTable( GetTab_Impl(), aString, true, true ); } } @@ -7325,7 +7325,7 @@ void SAL_CALL ScTableSheetObj::moveRange( const table::CellAddress& aDestination ScRange aSourceRange; ScUnoConversion::FillScRange( aSourceRange, aSource ); ScAddress aDestPos( (SCCOL)aDestination.Column, (SCROW)aDestination.Row, aDestination.Sheet ); - pDocSh->GetDocFunc().MoveBlock( aSourceRange, aDestPos, sal_True, sal_True, sal_True, sal_True ); + pDocSh->GetDocFunc().MoveBlock( aSourceRange, aDestPos, true, true, true, true ); } } @@ -7341,7 +7341,7 @@ void SAL_CALL ScTableSheetObj::copyRange( const table::CellAddress& aDestination ScRange aSourceRange; ScUnoConversion::FillScRange( aSourceRange, aSource ); ScAddress aDestPos( (SCCOL)aDestination.Column, (SCROW)aDestination.Row, aDestination.Sheet ); - pDocSh->GetDocFunc().MoveBlock( aSourceRange, aDestPos, false, sal_True, sal_True, sal_True ); + pDocSh->GetDocFunc().MoveBlock( aSourceRange, aDestPos, false, true, true, true ); } } @@ -7964,7 +7964,7 @@ void SAL_CALL ScTableSheetObj::protect( const OUString& aPassword ) if ( pDocSh && !pDocSh->GetDocument()->IsTabProtected( GetTab_Impl() ) ) { OUString aString(aPassword); - pDocSh->GetDocFunc().Protect( GetTab_Impl(), aString, sal_True ); + pDocSh->GetDocFunc().Protect( GetTab_Impl(), aString, true ); } } @@ -7976,7 +7976,7 @@ void SAL_CALL ScTableSheetObj::unprotect( const OUString& aPassword ) if ( pDocSh ) { OUString aString(aPassword); - sal_Bool bDone = pDocSh->GetDocFunc().Unprotect( GetTab_Impl(), aString, sal_True ); + sal_Bool bDone = pDocSh->GetDocFunc().Unprotect( GetTab_Impl(), aString, true ); if (!bDone) throw lang::IllegalArgumentException(); } @@ -8076,7 +8076,7 @@ void SAL_CALL ScTableSheetObj::addRanges( const uno::Sequence<table::CellRangeAd ScPatternAttr aPattern( pDoc->GetPool() ); aPattern.GetItemSet().Put( ScMergeFlagAttr( SC_MF_SCENARIO ) ); aPattern.GetItemSet().Put( ScProtectionAttr( true ) ); - pDocSh->GetDocFunc().ApplyAttributes( aMarkData, aPattern, sal_True, sal_True ); + pDocSh->GetDocFunc().ApplyAttributes( aMarkData, aPattern, true, true ); } } } @@ -8236,7 +8236,7 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn else if ( pEntry->nWID == SC_WID_UNO_CELLVIS ) { sal_Bool bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue ); - rFunc.SetTableVisible( nTab, bVis, sal_True ); + rFunc.SetTableVisible( nTab, bVis, true ); } else if ( pEntry->nWID == SC_WID_UNO_ISACTIVE ) { @@ -8467,9 +8467,9 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn if (aValue >>= nValue) { if (nValue == com::sun::star::text::WritingMode2::RL_TB) - rFunc.SetLayoutRTL(nTab, true, sal_True); + rFunc.SetLayoutRTL(nTab, true, true); else - rFunc.SetLayoutRTL(nTab, false, sal_True); + rFunc.SetLayoutRTL(nTab, false, true); } } else if ( pEntry->nWID == SC_WID_UNO_AUTOPRINT ) @@ -8850,32 +8850,32 @@ void ScTableColumnObj::SetOnePropertyValue(const SfxItemPropertySimpleEntry* pEn { // property is 1/100mm, column width is twips nNewWidth = HMMToTwips(nNewWidth); - rFunc.SetWidthOrHeight( sal_True, 1, nColArr, nTab, SC_SIZE_ORIGINAL, - (sal_uInt16)nNewWidth, sal_True, sal_True ); + rFunc.SetWidthOrHeight( true, 1, nColArr, nTab, SC_SIZE_ORIGINAL, + (sal_uInt16)nNewWidth, true, true ); } } else if ( pEntry->nWID == SC_WID_UNO_CELLVIS ) { sal_Bool bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue ); ScSizeMode eMode = bVis ? SC_SIZE_SHOW : SC_SIZE_DIRECT; - rFunc.SetWidthOrHeight( sal_True, 1, nColArr, nTab, eMode, 0, sal_True, sal_True ); + rFunc.SetWidthOrHeight( true, 1, nColArr, nTab, eMode, 0, true, true ); // SC_SIZE_DIRECT mit Groesse 0 blendet aus } else if ( pEntry->nWID == SC_WID_UNO_OWIDTH ) { sal_Bool bOpt = ScUnoHelpFunctions::GetBoolFromAny( aValue ); if (bOpt) - rFunc.SetWidthOrHeight( sal_True, 1, nColArr, nTab, - SC_SIZE_OPTIMAL, STD_EXTRA_WIDTH, sal_True, sal_True ); + rFunc.SetWidthOrHeight( true, 1, nColArr, nTab, + SC_SIZE_OPTIMAL, STD_EXTRA_WIDTH, true, true ); // sal_False bei Spalten momentan ohne Auswirkung } else if ( pEntry->nWID == SC_WID_UNO_NEWPAGE || pEntry->nWID == SC_WID_UNO_MANPAGE ) { sal_Bool bSet = ScUnoHelpFunctions::GetBoolFromAny( aValue ); if (bSet) - rFunc.InsertPageBreak( sal_True, rRange.aStart, sal_True, sal_True, sal_True ); + rFunc.InsertPageBreak( true, rRange.aStart, true, true, true ); else - rFunc.RemovePageBreak( sal_True, rRange.aStart, sal_True, sal_True, sal_True ); + rFunc.RemovePageBreak( true, rRange.aStart, true, true, true ); } else ScCellRangeObj::SetOnePropertyValue(pEntry, aValue); // base class, no Item WID @@ -8994,14 +8994,14 @@ void ScTableRowObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntr // property is 1/100mm, row height is twips nNewHeight = HMMToTwips(nNewHeight); rFunc.SetWidthOrHeight( false, 1, nRowArr, nTab, SC_SIZE_ORIGINAL, - (sal_uInt16)nNewHeight, sal_True, sal_True ); + (sal_uInt16)nNewHeight, true, true ); } } else if ( pEntry->nWID == SC_WID_UNO_CELLVIS ) { sal_Bool bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue ); ScSizeMode eMode = bVis ? SC_SIZE_SHOW : SC_SIZE_DIRECT; - rFunc.SetWidthOrHeight( false, 1, nRowArr, nTab, eMode, 0, sal_True, sal_True ); + rFunc.SetWidthOrHeight( false, 1, nRowArr, nTab, eMode, 0, true, true ); // SC_SIZE_DIRECT mit Groesse 0 blendet aus } else if ( pEntry->nWID == SC_WID_UNO_CELLFILT ) @@ -9014,21 +9014,21 @@ void ScTableRowObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntr { sal_Bool bOpt = ScUnoHelpFunctions::GetBoolFromAny( aValue ); if (bOpt) - rFunc.SetWidthOrHeight( false, 1, nRowArr, nTab, SC_SIZE_OPTIMAL, 0, sal_True, sal_True ); + rFunc.SetWidthOrHeight( false, 1, nRowArr, nTab, SC_SIZE_OPTIMAL, 0, true, true ); else { // set current height again manually sal_uInt16 nHeight = pDoc->GetOriginalHeight( nRow, nTab ); - rFunc.SetWidthOrHeight( false, 1, nRowArr, nTab, SC_SIZE_ORIGINAL, nHeight, sal_True, sal_True ); + rFunc.SetWidthOrHeight( false, 1, nRowArr, nTab, SC_SIZE_ORIGINAL, nHeight, true, true ); } } else if ( pEntry->nWID == SC_WID_UNO_NEWPAGE || pEntry->nWID == SC_WID_UNO_MANPAGE ) { sal_Bool bSet = ScUnoHelpFunctions::GetBoolFromAny( aValue ); if (bSet) - rFunc.InsertPageBreak( false, rRange.aStart, sal_True, sal_True, sal_True ); + rFunc.InsertPageBreak( false, rRange.aStart, true, true, true ); else - rFunc.RemovePageBreak( false, rRange.aStart, sal_True, sal_True, sal_True ); + rFunc.RemovePageBreak( false, rRange.aStart, true, true, true ); } else ScCellRangeObj::SetOnePropertyValue(pEntry, aValue); // base class, no Item WID diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 8109919d469a..336ca88d402f 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -1428,7 +1428,7 @@ void SAL_CALL ScModelObj::protect( const OUString& aPassword ) throw(uno::Runtim if ( pDocShell && !pDocShell->GetDocument()->IsDocProtected() ) { OUString aString(aPassword); - pDocShell->GetDocFunc().Protect( TABLEID_DOC, aString, sal_True ); + pDocShell->GetDocFunc().Protect( TABLEID_DOC, aString, true ); } } @@ -1439,7 +1439,7 @@ void SAL_CALL ScModelObj::unprotect( const OUString& aPassword ) if (pDocShell) { OUString aString(aPassword); - sal_Bool bDone = pDocShell->GetDocFunc().Unprotect( TABLEID_DOC, aString, sal_True ); + sal_Bool bDone = pDocShell->GetDocFunc().Unprotect( TABLEID_DOC, aString, true ); if (!bDone) throw lang::IllegalArgumentException(); } @@ -2457,7 +2457,7 @@ void SAL_CALL ScDrawPagesObj::remove( const uno::Reference<drawing::XDrawPage>& if (pPage) { SCTAB nPageNum = static_cast<SCTAB>(pPage->GetPageNum()); - pDocShell->GetDocFunc().DeleteTable( nPageNum, sal_True, sal_True ); + pDocShell->GetDocFunc().DeleteTable( nPageNum, true, true ); } } } @@ -2550,7 +2550,7 @@ void SAL_CALL ScTableSheetsObj::insertNewByName( const OUString& aName, sal_Int1 if (pDocShell) { OUString aNamStr(aName); - bDone = pDocShell->GetDocFunc().InsertTable( nPosition, aNamStr, sal_True, sal_True ); + bDone = pDocShell->GetDocFunc().InsertTable( nPosition, aNamStr, true, true ); } if (!bDone) throw uno::RuntimeException(); // no other exceptions specified @@ -2593,7 +2593,7 @@ void SAL_CALL ScTableSheetsObj::copyByName( const OUString& aName, nResultTab = nTabCount - 1; bDone = pDocShell->GetDocFunc().RenameTable( nResultTab, aNewStr, - sal_True, sal_True ); + true, true ); } } } @@ -2631,7 +2631,7 @@ void SAL_CALL ScTableSheetsObj::insertByName( const OUString& aName, const uno:: { SCTAB nPosition = pDoc->GetTableCount(); bDone = pDocShell->GetDocFunc().InsertTable( nPosition, aNamStr, - sal_True, sal_True ); + true, true ); if (bDone) pSheetObj->InitInsertSheet( pDocShell, nPosition ); // Dokument und neuen Range am Objekt setzen @@ -2674,11 +2674,11 @@ void SAL_CALL ScTableSheetsObj::replaceByName( const OUString& aName, const uno: SCTAB nPosition; if ( pDocShell->GetDocument()->GetTable( aName, nPosition ) ) { - if ( pDocShell->GetDocFunc().DeleteTable( nPosition, sal_True, sal_True ) ) + if ( pDocShell->GetDocFunc().DeleteTable( nPosition, true, true ) ) { // InsertTable kann jetzt eigentlich nicht schiefgehen... OUString aNamStr(aName); - bDone = pDocShell->GetDocFunc().InsertTable( nPosition, aNamStr, sal_True, sal_True ); + bDone = pDocShell->GetDocFunc().InsertTable( nPosition, aNamStr, true, true ); if (bDone) pSheetObj->InitInsertSheet( pDocShell, nPosition ); } @@ -2715,7 +2715,7 @@ void SAL_CALL ScTableSheetsObj::removeByName( const OUString& aName ) { SCTAB nIndex; if ( pDocShell->GetDocument()->GetTable( aName, nIndex ) ) - bDone = pDocShell->GetDocFunc().DeleteTable( nIndex, sal_True, sal_True ); + bDone = pDocShell->GetDocFunc().DeleteTable( nIndex, true, true ); else // not found throw container::NoSuchElementException(); } @@ -3097,22 +3097,22 @@ void SAL_CALL ScTableColumnsObj::setPropertyValue( { sal_Int32 nNewWidth = 0; if ( aValue >>= nNewWidth ) - rFunc.SetWidthOrHeight( sal_True, 1, nColArr, nTab, SC_SIZE_ORIGINAL, - (sal_uInt16)HMMToTwips(nNewWidth), sal_True, sal_True ); + rFunc.SetWidthOrHeight( true, 1, nColArr, nTab, SC_SIZE_ORIGINAL, + (sal_uInt16)HMMToTwips(nNewWidth), true, true ); } else if ( aNameString.equalsAscii( SC_UNONAME_CELLVIS ) ) { sal_Bool bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue ); ScSizeMode eMode = bVis ? SC_SIZE_SHOW : SC_SIZE_DIRECT; - rFunc.SetWidthOrHeight( sal_True, 1, nColArr, nTab, eMode, 0, sal_True, sal_True ); + rFunc.SetWidthOrHeight( true, 1, nColArr, nTab, eMode, 0, true, true ); // SC_SIZE_DIRECT with size 0: hide } else if ( aNameString.equalsAscii( SC_UNONAME_OWIDTH ) ) { sal_Bool bOpt = ScUnoHelpFunctions::GetBoolFromAny( aValue ); if (bOpt) - rFunc.SetWidthOrHeight( sal_True, 1, nColArr, nTab, - SC_SIZE_OPTIMAL, STD_EXTRA_WIDTH, sal_True, sal_True ); + rFunc.SetWidthOrHeight( true, 1, nColArr, nTab, + SC_SIZE_OPTIMAL, STD_EXTRA_WIDTH, true, true ); // sal_False for columns currently has no effect } else if ( aNameString.equalsAscii( SC_UNONAME_NEWPAGE ) || aNameString.equalsAscii( SC_UNONAME_MANPAGE ) ) @@ -3121,9 +3121,9 @@ void SAL_CALL ScTableColumnsObj::setPropertyValue( sal_Bool bSet = ScUnoHelpFunctions::GetBoolFromAny( aValue ); for (SCCOL nCol=nStartCol; nCol<=nEndCol; nCol++) if (bSet) - rFunc.InsertPageBreak( sal_True, ScAddress(nCol,0,nTab), sal_True, sal_True, sal_True ); + rFunc.InsertPageBreak( true, ScAddress(nCol,0,nTab), true, true, true ); else - rFunc.RemovePageBreak( sal_True, ScAddress(nCol,0,nTab), sal_True, sal_True, sal_True ); + rFunc.RemovePageBreak( true, ScAddress(nCol,0,nTab), true, true, true ); } } @@ -3330,7 +3330,7 @@ void SAL_CALL ScTableRowsObj::setPropertyValue( { sal_Bool bOpt = ScUnoHelpFunctions::GetBoolFromAny( aValue ); if (bOpt) - rFunc.SetWidthOrHeight( false, 1, nRowArr, nTab, SC_SIZE_OPTIMAL, 0, sal_True, sal_True ); + rFunc.SetWidthOrHeight( false, 1, nRowArr, nTab, SC_SIZE_OPTIMAL, 0, true, true ); else { //! manually set old heights again? @@ -3352,14 +3352,14 @@ void SAL_CALL ScTableRowsObj::setPropertyValue( } else rFunc.SetWidthOrHeight( false, 1, nRowArr, nTab, SC_SIZE_ORIGINAL, - (sal_uInt16)HMMToTwips(nNewHeight), sal_True, sal_True ); + (sal_uInt16)HMMToTwips(nNewHeight), true, true ); } } else if ( aNameString.equalsAscii( SC_UNONAME_CELLVIS ) ) { sal_Bool bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue ); ScSizeMode eMode = bVis ? SC_SIZE_SHOW : SC_SIZE_DIRECT; - rFunc.SetWidthOrHeight( false, 1, nRowArr, nTab, eMode, 0, sal_True, sal_True ); + rFunc.SetWidthOrHeight( false, 1, nRowArr, nTab, eMode, 0, true, true ); // SC_SIZE_DIRECT with size 0: hide } else if ( aNameString.equalsAscii( SC_UNONAME_VISFLAG ) ) @@ -3382,9 +3382,9 @@ void SAL_CALL ScTableRowsObj::setPropertyValue( sal_Bool bSet = ScUnoHelpFunctions::GetBoolFromAny( aValue ); for (SCROW nRow=nStartRow; nRow<=nEndRow; nRow++) if (bSet) - rFunc.InsertPageBreak( false, ScAddress(0,nRow,nTab), sal_True, sal_True, sal_True ); + rFunc.InsertPageBreak( false, ScAddress(0,nRow,nTab), true, true, true ); else - rFunc.RemovePageBreak( false, ScAddress(0,nRow,nTab), sal_True, sal_True, sal_True ); + rFunc.RemovePageBreak( false, ScAddress(0,nRow,nTab), true, true, true ); } else if ( aNameString.equalsAscii( SC_UNONAME_CELLBACK ) || aNameString.equalsAscii( SC_UNONAME_CELLTRAN ) ) { @@ -3566,7 +3566,7 @@ void SAL_CALL ScAnnotationsObj::insertNew( { OSL_ENSURE( aPosition.Sheet == nTab, "addAnnotation mit falschem Sheet" ); ScAddress aPos( (SCCOL)aPosition.Column, (SCROW)aPosition.Row, nTab ); - pDocShell->GetDocFunc().ReplaceNote( aPos, rText, 0, 0, sal_True ); + pDocShell->GetDocFunc().ReplaceNote( aPos, rText, 0, 0, true ); } } @@ -3582,7 +3582,7 @@ void SAL_CALL ScAnnotationsObj::removeByIndex( sal_Int32 nIndex ) throw(uno::Run aMarkData.SelectTable( aPos.Tab(), true ); aMarkData.SetMultiMarkArea( ScRange(aPos) ); - pDocShell->GetDocFunc().DeleteContents( aMarkData, IDF_NOTE, sal_True, sal_True ); + pDocShell->GetDocFunc().DeleteContents( aMarkData, IDF_NOTE, true, true ); } } } @@ -3750,7 +3750,7 @@ void SAL_CALL ScScenariosObj::removeByName( const OUString& aName ) SolarMutexGuard aGuard; SCTAB nIndex; if ( pDocShell && GetScenarioIndex_Impl( aName, nIndex ) ) - pDocShell->GetDocFunc().DeleteTable( nTab+nIndex+1, sal_True, sal_True ); + pDocShell->GetDocFunc().DeleteTable( nTab+nIndex+1, true, true ); } // XEnumerationAccess diff --git a/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx index a4f75d255bb7..1eb1529ada05 100644 --- a/sc/source/ui/unoobj/linkuno.cxx +++ b/sc/source/ui/unoobj/linkuno.cxx @@ -682,7 +682,7 @@ void ScAreaLinkObj::Modify_Impl( const OUString* pNewFile, const OUString* pNewF bFitBlock = false; // neuer Bereich angegeben -> keine Inhalte verschieben } pDocShell->GetDocFunc().InsertAreaLink( aFile, aFilter, aOptions, aSource, - aDest, nRefresh, bFitBlock, sal_True ); + aDest, nRefresh, bFitBlock, true ); } } @@ -975,7 +975,7 @@ void SAL_CALL ScAreaLinksObj::insertAtPosition( const table::CellAddress& aDestP aFileStr = ScGlobal::GetAbsDocName( aFileStr, pDocShell ); //! in InsertAreaLink ??? pDocShell->GetDocFunc().InsertAreaLink( aFileStr, aFilterStr, aOptionStr, aSourceStr, ScRange(aDestAddr), - 0, false, sal_True ); // don't move contents + 0, false, true ); // don't move contents } } diff --git a/sc/source/ui/unoobj/nameuno.cxx b/sc/source/ui/unoobj/nameuno.cxx index 2bb365efa2b6..55b6d434d5fc 100644 --- a/sc/source/ui/unoobj/nameuno.cxx +++ b/sc/source/ui/unoobj/nameuno.cxx @@ -563,7 +563,7 @@ void SAL_CALL ScNamedRangesObj::addNewFromTitles( const table::CellRangeAddress& if (bRight) nFlags |= NAME_RIGHT; if (nFlags) - pDocShell->GetDocFunc().CreateNames( aRange, nFlags, sal_True, GetTab_Impl() ); + pDocShell->GetDocFunc().CreateNames( aRange, nFlags, true, GetTab_Impl() ); } void SAL_CALL ScNamedRangesObj::removeByName( const OUString& aName ) @@ -597,7 +597,7 @@ void SAL_CALL ScNamedRangesObj::outputList( const table::CellAddress& aOutputPos SolarMutexGuard aGuard; ScAddress aPos( (SCCOL)aOutputPosition.Column, (SCROW)aOutputPosition.Row, aOutputPosition.Sheet ); if (pDocShell) - pDocShell->GetDocFunc().InsertNameList( aPos, sal_True ); + pDocShell->GetDocFunc().InsertNameList( aPos, true ); } // container::XEnumerationAccess diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index 26b88434c3c4..ab0c63e6d304 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -2034,7 +2034,7 @@ ScVbaRange::setFormulaArray(const uno::Any& rFormula) throw (uno::RuntimeExcepti ScTokenArray aTokenArray; (void)ScTokenConversion::ConvertToTokenArray( *getScDocument(), aTokenArray, aTokens ); - getScDocShell()->GetDocFunc().EnterMatrix( *getScRangeList()[0], NULL, &aTokenArray, OUString(), sal_True, sal_True, EMPTY_OUSTRING, formula::FormulaGrammar::GRAM_PODF_A1 ); + getScDocShell()->GetDocFunc().EnterMatrix( *getScRangeList()[0], NULL, &aTokenArray, OUString(), true, true, EMPTY_OUSTRING, formula::FormulaGrammar::GRAM_PODF_A1 ); } OUString @@ -5127,7 +5127,7 @@ ScVbaRange::AutoFill( const uno::Reference< excel::XRange >& Destination, const double fEndValue = MAXDOUBLE; ScDocShell* pDocSh = getDocShellFromRange( mxRange ); pDocSh->GetDocFunc().FillAuto( aSourceRange, NULL, eDir, eCmd, eDateCmd, - nCount, fStep, fEndValue, sal_True, sal_True ); + nCount, fStep, fEndValue, true, true ); } sal_Bool SAL_CALL ScVbaRange::GoalSeek( const uno::Any& Goal, const uno::Reference< excel::XRange >& ChangingCell ) throw (uno::RuntimeException) diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index 8d320611e5d3..84bbb9a99475 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -1495,8 +1495,8 @@ void ScViewFunc::TransliterateText( sal_Int32 nType ) aFuncMark.SetMarkArea( ScRange( aCursor ) ); } - sal_Bool bSuccess = GetViewData()->GetDocShell()->GetDocFunc(). - TransliterateText( aFuncMark, nType, sal_True, false ); + bool bSuccess = GetViewData()->GetDocShell()->GetDocFunc(). + TransliterateText( aFuncMark, nType, true, false ); if (bSuccess) { GetViewData()->GetViewShell()->UpdateInputHandler(); |