Kaydet (Commit) 241454c4 authored tarafından Laurent Balland-Poirier's avatar Laurent Balland-Poirier Kaydeden (comit) Caolán McNamara

Change sal_Bool to bool in viewfunc.cxx (Calc)

Change-Id: Ia65cffbf49929f44607c227a5c6167f4ca581e8a
Reviewed-on: https://gerrit.libreoffice.org/6203Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 086c52d2
...@@ -157,59 +157,59 @@ public: ...@@ -157,59 +157,59 @@ public:
void CreateNames( sal_uInt16 nFlags ); void CreateNames( sal_uInt16 nFlags );
sal_uInt16 GetCreateNameFlags(); sal_uInt16 GetCreateNameFlags();
void InsertNameList(); void InsertNameList();
sal_Bool InsertName( const OUString& rName, const OUString& rSymbol, bool InsertName( const OUString& rName, const OUString& rSymbol,
const OUString& rType ); const OUString& rType );
void ApplyAttributes( const SfxItemSet* pDialogSet, const SfxItemSet* pOldSet, void ApplyAttributes( const SfxItemSet* pDialogSet, const SfxItemSet* pOldSet,
sal_Bool bRecord = sal_True ); bool bRecord = true );
void ApplyAttr( const SfxPoolItem& rAttrItem ); void ApplyAttr( const SfxPoolItem& rAttrItem );
void ApplySelectionPattern( const ScPatternAttr& rAttr, void ApplySelectionPattern( const ScPatternAttr& rAttr,
sal_Bool bRecord = sal_True, bool bRecord = true,
sal_Bool bCursorOnly = false ); bool bCursorOnly = false );
void ApplyPatternLines( const ScPatternAttr& rAttr, void ApplyPatternLines( const ScPatternAttr& rAttr,
const SvxBoxItem* pNewOuter, const SvxBoxItem* pNewOuter,
const SvxBoxInfoItem* pNewInner, sal_Bool bRecord = sal_True ); const SvxBoxInfoItem* pNewInner, bool bRecord = true );
void ApplyUserItemSet( const SfxItemSet& rItemSet ); void ApplyUserItemSet( const SfxItemSet& rItemSet );
const SfxStyleSheet* GetStyleSheetFromMarked(); const SfxStyleSheet* GetStyleSheetFromMarked();
void SetStyleSheetToMarked( SfxStyleSheet* pStyleSheet, void SetStyleSheetToMarked( SfxStyleSheet* pStyleSheet,
sal_Bool bRecord = sal_True ); bool bRecord = true );
void RemoveStyleSheetInUse( const SfxStyleSheetBase* pStyleSheet ); void RemoveStyleSheetInUse( const SfxStyleSheetBase* pStyleSheet );
void UpdateStyleSheetInUse( const SfxStyleSheetBase* pStyleSheet ); void UpdateStyleSheetInUse( const SfxStyleSheetBase* pStyleSheet );
void SetNumberFormat( short nFormatType, sal_uLong nAdd = 0 ); void SetNumberFormat( short nFormatType, sal_uLong nAdd = 0 );
void SetNumFmtByStr( const OUString& rCode ); void SetNumFmtByStr( const OUString& rCode );
void ChangeNumFmtDecimals( sal_Bool bIncrement ); void ChangeNumFmtDecimals( bool bIncrement );
void SetValidation( const ScValidationData& rNew ); void SetValidation( const ScValidationData& rNew );
void ChangeIndent( sal_Bool bIncrement ); void ChangeIndent( bool bIncrement );
void ProtectSheet( SCTAB nTab, const ScTableProtection& rProtect ); void ProtectSheet( SCTAB nTab, const ScTableProtection& rProtect );
void Protect( SCTAB nTab, const OUString& rPassword ); void Protect( SCTAB nTab, const OUString& rPassword );
sal_Bool Unprotect( SCTAB nTab, const OUString& rPassword ); bool Unprotect( SCTAB nTab, const OUString& rPassword );
void DeleteCells( DelCellCmd eCmd, sal_Bool bRecord = sal_True ); void DeleteCells( DelCellCmd eCmd, bool bRecord = true );
sal_Bool InsertCells( InsCellCmd eCmd, sal_Bool bRecord = sal_True, sal_Bool bPartOfPaste = false ); bool InsertCells( InsCellCmd eCmd, bool bRecord = true, bool bPartOfPaste = false );
void DeleteMulti( sal_Bool bRows, sal_Bool bRecord = sal_True ); void DeleteMulti( bool bRows, bool bRecord = true );
void DeleteContents( sal_uInt16 nFlags, sal_Bool bRecord = sal_True ); void DeleteContents( sal_uInt16 nFlags, bool bRecord = true );
void SetWidthOrHeight( sal_Bool bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRanges, void SetWidthOrHeight( bool bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRanges,
ScSizeMode eMode, sal_uInt16 nSizeTwips, ScSizeMode eMode, sal_uInt16 nSizeTwips,
sal_Bool bRecord = sal_True, sal_Bool bPaint = sal_True, bool bRecord = true, bool bPaint = true,
ScMarkData* pMarkData = NULL ); ScMarkData* pMarkData = NULL );
void SetMarkedWidthOrHeight( sal_Bool bWidth, ScSizeMode eMode, sal_uInt16 nSizeTwips, void SetMarkedWidthOrHeight( bool bWidth, ScSizeMode eMode, sal_uInt16 nSizeTwips,
sal_Bool bRecord = sal_True, sal_Bool bPaint = sal_True ); bool bRecord = true, bool bPaint = true );
void ShowMarkedColumns( sal_Bool bShow, sal_Bool bRecord = sal_True ); void ShowMarkedColumns( sal_Bool bShow, sal_Bool bRecord = sal_True );
void ShowMarkedRows( sal_Bool bShow, sal_Bool bRecord = sal_True ); void ShowMarkedRows( sal_Bool bShow, sal_Bool bRecord = sal_True );
sal_Bool AdjustBlockHeight( sal_Bool bPaint = sal_True, ScMarkData* pMarkData = NULL ); sal_Bool AdjustBlockHeight( sal_Bool bPaint = sal_True, ScMarkData* pMarkData = NULL );
sal_Bool AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, sal_Bool bPaint = sal_True ); sal_Bool AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, sal_Bool bPaint = sal_True );
void ModifyCellSize( ScDirection eDir, sal_Bool bOptimal ); void ModifyCellSize( ScDirection eDir, bool bOptimal );
SC_DLLPUBLIC void InsertPageBreak( sal_Bool bColumn, sal_Bool bRecord = sal_True, SC_DLLPUBLIC void InsertPageBreak( sal_Bool bColumn, sal_Bool bRecord = sal_True,
const ScAddress* pPos = NULL, const ScAddress* pPos = NULL,
...@@ -324,7 +324,7 @@ public: ...@@ -324,7 +324,7 @@ public:
void EditNote(); void EditNote();
void ForgetFormatArea() { bFormatValid = false; } void ForgetFormatArea() { bFormatValid = false; }
sal_Bool SelectionEditable( bool* pOnlyNotBecauseOfMatrix = NULL ); bool SelectionEditable( bool* pOnlyNotBecauseOfMatrix = NULL );
SC_DLLPUBLIC void DataFormPutData( SCROW nCurrentRow , SC_DLLPUBLIC void DataFormPutData( SCROW nCurrentRow ,
SCROW nStartRow , SCCOL nStartCol , SCROW nStartRow , SCCOL nStartCol ,
...@@ -355,12 +355,12 @@ private: ...@@ -355,12 +355,12 @@ private:
void PostPasteFromClip(const ScRangeList& rPasteRanges, const ScMarkData& rMark); void PostPasteFromClip(const ScRangeList& rPasteRanges, const ScMarkData& rMark);
sal_uInt16 GetOptimalColWidth( SCCOL nCol, SCTAB nTab, sal_Bool bFormula ); sal_uInt16 GetOptimalColWidth( SCCOL nCol, SCTAB nTab, bool bFormula );
void StartFormatArea(); void StartFormatArea();
sal_Bool TestFormatArea( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_Bool bAttrChanged ); bool TestFormatArea( SCCOL nCol, SCROW nRow, SCTAB nTab, bool bAttrChanged );
void DoAutoAttributes( SCCOL nCol, SCROW nRow, SCTAB nTab, void DoAutoAttributes( SCCOL nCol, SCROW nRow, SCTAB nTab,
sal_Bool bAttrChanged, sal_Bool bAddUndo ); bool bAttrChanged, bool bAddUndo );
void MarkAndJumpToRanges(const ScRangeList& rRanges); void MarkAndJumpToRanges(const ScRangeList& rRanges);
}; };
......
...@@ -112,13 +112,13 @@ void ScViewFunc::StartFormatArea() ...@@ -112,13 +112,13 @@ void ScViewFunc::StartFormatArea()
// start only with single cell (marked or cursor position) // start only with single cell (marked or cursor position)
ScRange aMarkRange; ScRange aMarkRange;
sal_Bool bOk = (GetViewData()->GetSimpleArea( aMarkRange ) == SC_MARK_SIMPLE); bool bOk = (GetViewData()->GetSimpleArea( aMarkRange ) == SC_MARK_SIMPLE);
if ( bOk && aMarkRange.aStart != aMarkRange.aEnd ) if ( bOk && aMarkRange.aStart != aMarkRange.aEnd )
bOk = false; bOk = false;
if (bOk) if (bOk)
{ {
bFormatValid = sal_True; bFormatValid = true;
aFormatSource = aMarkRange.aStart; aFormatSource = aMarkRange.aStart;
aFormatArea = ScRange( aFormatSource ); aFormatArea = ScRange( aFormatSource );
} }
...@@ -126,7 +126,7 @@ void ScViewFunc::StartFormatArea() ...@@ -126,7 +126,7 @@ void ScViewFunc::StartFormatArea()
bFormatValid = false; // discard old range bFormatValid = false; // discard old range
} }
sal_Bool ScViewFunc::TestFormatArea( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_Bool bAttrChanged ) bool ScViewFunc::TestFormatArea( SCCOL nCol, SCROW nRow, SCTAB nTab, bool bAttrChanged )
{ {
// anything to do? // anything to do?
if ( !SC_MOD()->GetInputOptions().GetExtendFormat() ) if ( !SC_MOD()->GetInputOptions().GetExtendFormat() )
...@@ -142,7 +142,7 @@ sal_Bool ScViewFunc::TestFormatArea( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_Boo ...@@ -142,7 +142,7 @@ sal_Bool ScViewFunc::TestFormatArea( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_Boo
//! Test if cell empty ??? //! Test if cell empty ???
sal_Bool bFound = false; bool bFound = false;
ScRange aNewRange = aFormatArea; ScRange aNewRange = aFormatArea;
if ( bFormatValid && nTab == aFormatSource.Tab() ) if ( bFormatValid && nTab == aFormatSource.Tab() )
{ {
...@@ -151,18 +151,18 @@ sal_Bool ScViewFunc::TestFormatArea( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_Boo ...@@ -151,18 +151,18 @@ sal_Bool ScViewFunc::TestFormatArea( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_Boo
// within range? // within range?
if ( nCol >= aFormatArea.aStart.Col() && nCol <= aFormatArea.aEnd.Col() ) if ( nCol >= aFormatArea.aStart.Col() && nCol <= aFormatArea.aEnd.Col() )
{ {
bFound = sal_True; // do not change range bFound = true; // do not change range
} }
// left ? // left ?
if ( nCol+1 == aFormatArea.aStart.Col() ) if ( nCol+1 == aFormatArea.aStart.Col() )
{ {
bFound = sal_True; bFound = true;
aNewRange.aStart.SetCol( nCol ); aNewRange.aStart.SetCol( nCol );
} }
// right ? // right ?
if ( nCol == aFormatArea.aEnd.Col()+1 ) if ( nCol == aFormatArea.aEnd.Col()+1 )
{ {
bFound = sal_True; bFound = true;
aNewRange.aEnd.SetCol( nCol ); aNewRange.aEnd.SetCol( nCol );
} }
} }
...@@ -171,13 +171,13 @@ sal_Bool ScViewFunc::TestFormatArea( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_Boo ...@@ -171,13 +171,13 @@ sal_Bool ScViewFunc::TestFormatArea( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_Boo
// top ? // top ?
if ( nRow+1 == aFormatArea.aStart.Row() ) if ( nRow+1 == aFormatArea.aStart.Row() )
{ {
bFound = sal_True; bFound = true;
aNewRange.aStart.SetRow( nRow ); aNewRange.aStart.SetRow( nRow );
} }
// bottom ? // bottom ?
if ( nRow == aFormatArea.aEnd.Row()+1 ) if ( nRow == aFormatArea.aEnd.Row()+1 )
{ {
bFound = sal_True; bFound = true;
aNewRange.aEnd.SetRow( nRow ); aNewRange.aEnd.SetRow( nRow );
} }
} }
...@@ -196,7 +196,7 @@ sal_Bool ScViewFunc::TestFormatArea( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_Boo ...@@ -196,7 +196,7 @@ sal_Bool ScViewFunc::TestFormatArea( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_Boo
} }
void ScViewFunc::DoAutoAttributes( SCCOL nCol, SCROW nRow, SCTAB nTab, void ScViewFunc::DoAutoAttributes( SCCOL nCol, SCROW nRow, SCTAB nTab,
sal_Bool bAttrChanged, sal_Bool bAddUndo ) bool bAttrChanged, bool bAddUndo )
{ {
ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument(); ScDocument* pDoc = pDocSh->GetDocument();
...@@ -217,9 +217,9 @@ void ScViewFunc::DoAutoAttributes( SCCOL nCol, SCROW nRow, SCTAB nTab, ...@@ -217,9 +217,9 @@ void ScViewFunc::DoAutoAttributes( SCCOL nCol, SCROW nRow, SCTAB nTab,
const ScPatternAttr* pOldPattern = pDoc->GetPattern( nCol, nRow, nTab ); const ScPatternAttr* pOldPattern = pDoc->GetPattern( nCol, nRow, nTab );
const ScStyleSheet* pSrcStyle = pSource->GetStyleSheet(); const ScStyleSheet* pSrcStyle = pSource->GetStyleSheet();
if ( pSrcStyle && pSrcStyle != pOldPattern->GetStyleSheet() ) if ( pSrcStyle && pSrcStyle != pOldPattern->GetStyleSheet() )
rFunc.ApplyStyle( aMark, pSrcStyle->GetName(), sal_True, sal_False ); rFunc.ApplyStyle( aMark, pSrcStyle->GetName(), true, false );
rFunc.ApplyAttributes( aMark, *pSource, sal_True, sal_False ); rFunc.ApplyAttributes( aMark, *pSource, true, false );
} }
if ( bAttrChanged ) // value entered with number format? if ( bAttrChanged ) // value entered with number format?
...@@ -230,7 +230,7 @@ void ScViewFunc::DoAutoAttributes( SCCOL nCol, SCROW nRow, SCTAB nTab, ...@@ -230,7 +230,7 @@ void ScViewFunc::DoAutoAttributes( SCCOL nCol, SCROW nRow, SCTAB nTab,
// additional routines // additional routines
sal_uInt16 ScViewFunc::GetOptimalColWidth( SCCOL nCol, SCTAB nTab, sal_Bool bFormula ) sal_uInt16 ScViewFunc::GetOptimalColWidth( SCCOL nCol, SCTAB nTab, bool bFormula )
{ {
ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument(); ScDocument* pDoc = pDocSh->GetDocument();
...@@ -254,7 +254,7 @@ sal_uInt16 ScViewFunc::GetOptimalColWidth( SCCOL nCol, SCTAB nTab, sal_Bool bFor ...@@ -254,7 +254,7 @@ sal_uInt16 ScViewFunc::GetOptimalColWidth( SCCOL nCol, SCTAB nTab, sal_Bool bFor
return nTwips; return nTwips;
} }
sal_Bool ScViewFunc::SelectionEditable( bool* pOnlyNotBecauseOfMatrix /* = NULL */ ) bool ScViewFunc::SelectionEditable( bool* pOnlyNotBecauseOfMatrix /* = NULL */ )
{ {
bool bRet; bool bRet;
ScDocument* pDoc = GetViewData()->GetDocument(); ScDocument* pDoc = GetViewData()->GetDocument();
...@@ -383,7 +383,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, ...@@ -383,7 +383,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab,
} }
} }
sal_Bool bNumFmtChanged = false; bool bNumFmtChanged = false;
if ( bFormula ) if ( bFormula )
{ // formula, compile with autoCorrection { // formula, compile with autoCorrection
i = rMark.GetFirstSelected(); i = rMark.GetFirstSelected();
...@@ -391,14 +391,14 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, ...@@ -391,14 +391,14 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab,
ScCompiler aComp( pDoc, aPos); ScCompiler aComp( pDoc, aPos);
aComp.SetGrammar(pDoc->GetGrammar()); aComp.SetGrammar(pDoc->GetGrammar());
//2do: enable/disable autoCorrection via calcoptions //2do: enable/disable autoCorrection via calcoptions
aComp.SetAutoCorrection( sal_True ); aComp.SetAutoCorrection( true );
if ( rString[0] == '+' || rString[0] == '-' ) if ( rString[0] == '+' || rString[0] == '-' )
{ {
aComp.SetExtendedErrorDetection( ScCompiler::EXTENDED_ERROR_DETECTION_NAME_BREAK ); aComp.SetExtendedErrorDetection( ScCompiler::EXTENDED_ERROR_DETECTION_NAME_BREAK );
} }
OUString aFormula( rString ); OUString aFormula( rString );
ScTokenArray* pArr; ScTokenArray* pArr;
sal_Bool bAgain; bool bAgain;
do do
{ {
bAgain = false; bAgain = false;
...@@ -440,7 +440,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, ...@@ -440,7 +440,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab,
aFormula = aCorrectedFormula; aFormula = aCorrectedFormula;
if ( pArr != pArrFirst ) if ( pArr != pArrFirst )
delete pArrFirst; delete pArrFirst;
bAgain = sal_True; bAgain = true;
} }
else else
{ {
...@@ -467,7 +467,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, ...@@ -467,7 +467,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab,
ScModule* pScMod = SC_MOD(); ScModule* pScMod = SC_MOD();
ScAppOptions aAppOpt = pScMod->GetAppOptions(); ScAppOptions aAppOpt = pScMod->GetAppOptions();
sal_Bool bOptChanged = false; bool bOptChanged = false;
formula::FormulaToken** ppToken = pArr->GetArray(); formula::FormulaToken** ppToken = pArr->GetArray();
sal_uInt16 nTokens = pArr->GetLen(); sal_uInt16 nTokens = pArr->GetLen();
...@@ -482,7 +482,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, ...@@ -482,7 +482,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab,
--nLevel; --nLevel;
if ( nLevel == 0 && pTok->IsFunction() && if ( nLevel == 0 && pTok->IsFunction() &&
lcl_AddFunction( aAppOpt, sal::static_int_cast<sal_uInt16>( eOp ) ) ) lcl_AddFunction( aAppOpt, sal::static_int_cast<sal_uInt16>( eOp ) ) )
bOptChanged = sal_True; bOptChanged = true;
} }
if ( bOptChanged ) if ( bOptChanged )
...@@ -534,7 +534,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, ...@@ -534,7 +534,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab,
for ( ; itr != itrEnd; ++itr ) for ( ; itr != itrEnd; ++itr )
{ {
bool bNumFmtSet = false; bool bNumFmtSet = false;
rFunc.SetNormalString( bNumFmtSet, ScAddress( nCol, nRow, *itr ), rString, sal_False ); rFunc.SetNormalString( bNumFmtSet, ScAddress( nCol, nRow, *itr ), rString, false );
if (bNumFmtSet) if (bNumFmtSet)
{ {
/* FIXME: if set on any sheet results in changed only on /* FIXME: if set on any sheet results in changed only on
...@@ -544,7 +544,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, ...@@ -544,7 +544,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab,
} }
} }
sal_Bool bAutoFormat = TestFormatArea(nCol, nRow, nTab, bNumFmtChanged); bool bAutoFormat = TestFormatArea(nCol, nRow, nTab, bNumFmtChanged);
if (bAutoFormat) if (bAutoFormat)
DoAutoAttributes(nCol, nRow, nTab, bNumFmtChanged, bRecord); DoAutoAttributes(nCol, nRow, nTab, bNumFmtChanged, bRecord);
...@@ -585,7 +585,7 @@ void ScViewFunc::EnterValue( SCCOL nCol, SCROW nRow, SCTAB nTab, const double& r ...@@ -585,7 +585,7 @@ void ScViewFunc::EnterValue( SCCOL nCol, SCROW nRow, SCTAB nTab, const double& r
if ( pDoc && pDocSh ) if ( pDoc && pDocSh )
{ {
sal_Bool bUndo(pDoc->IsUndoEnabled()); bool bUndo(pDoc->IsUndoEnabled());
ScDocShellModificator aModificator( *pDocSh ); ScDocShellModificator aModificator( *pDocSh );
ScEditableTester aTester( pDoc, nTab, nCol,nRow, nCol,nRow ); ScEditableTester aTester( pDoc, nTab, nCol,nRow, nCol,nRow );
...@@ -630,8 +630,8 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, ...@@ -630,8 +630,8 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab,
// //
// test for attribute // test for attribute
// //
sal_Bool bSimple = false; bool bSimple = false;
sal_Bool bCommon = false; bool bCommon = false;
ScPatternAttr* pCellAttrs = NULL; ScPatternAttr* pCellAttrs = NULL;
OUString aString; OUString aString;
...@@ -884,7 +884,7 @@ void ScViewFunc::GetSelectionFrame( SvxBoxItem& rLineOuter, ...@@ -884,7 +884,7 @@ void ScViewFunc::GetSelectionFrame( SvxBoxItem& rLineOuter,
rLineOuter = (const SvxBoxItem&) (pAttrs->GetItem( ATTR_BORDER )); rLineOuter = (const SvxBoxItem&) (pAttrs->GetItem( ATTR_BORDER ));
rLineInner = (const SvxBoxInfoItem&)(pAttrs->GetItem( ATTR_BORDER_INNER )); rLineInner = (const SvxBoxInfoItem&)(pAttrs->GetItem( ATTR_BORDER_INNER ));
rLineInner.SetTable(false); rLineInner.SetTable(false);
rLineInner.SetDist(sal_True); rLineInner.SetDist(true);
rLineInner.SetMinDist(false); rLineInner.SetMinDist(false);
} }
} }
...@@ -897,7 +897,7 @@ void ScViewFunc::GetSelectionFrame( SvxBoxItem& rLineOuter, ...@@ -897,7 +897,7 @@ void ScViewFunc::GetSelectionFrame( SvxBoxItem& rLineOuter,
void ScViewFunc::ApplyAttributes( const SfxItemSet* pDialogSet, void ScViewFunc::ApplyAttributes( const SfxItemSet* pDialogSet,
const SfxItemSet* pOldSet, const SfxItemSet* pOldSet,
sal_Bool bRecord ) bool bRecord )
{ {
// not editable because of matrix only? attribute OK nonetheless // not editable because of matrix only? attribute OK nonetheless
bool bOnlyNotBecauseOfMatrix; bool bOnlyNotBecauseOfMatrix;
...@@ -960,7 +960,7 @@ void ScViewFunc::ApplyAttributes( const SfxItemSet* pDialogSet, ...@@ -960,7 +960,7 @@ void ScViewFunc::ApplyAttributes( const SfxItemSet* pDialogSet,
* *
*/ */
sal_Bool bFrame = (pDialogSet->GetItemState( ATTR_BORDER ) != SFX_ITEM_DEFAULT) bool bFrame = (pDialogSet->GetItemState( ATTR_BORDER ) != SFX_ITEM_DEFAULT)
|| (pDialogSet->GetItemState( ATTR_BORDER_INNER ) != SFX_ITEM_DEFAULT); || (pDialogSet->GetItemState( ATTR_BORDER_INNER ) != SFX_ITEM_DEFAULT);
if ( pNewOuter==pOldOuter && pNewInner==pOldInner ) if ( pNewOuter==pOldOuter && pNewInner==pOldInner )
...@@ -991,8 +991,8 @@ void ScViewFunc::ApplyAttributes( const SfxItemSet* pDialogSet, ...@@ -991,8 +991,8 @@ void ScViewFunc::ApplyAttributes( const SfxItemSet* pDialogSet,
{ {
// if new items are default-items, overwrite the old items: // if new items are default-items, overwrite the old items:
sal_Bool bDefNewOuter = ( SFX_ITEMS_STATICDEFAULT == pNewOuter->GetKind() ); bool bDefNewOuter = ( SFX_ITEMS_STATICDEFAULT == pNewOuter->GetKind() );
sal_Bool bDefNewInner = ( SFX_ITEMS_STATICDEFAULT == pNewInner->GetKind() ); bool bDefNewInner = ( SFX_ITEMS_STATICDEFAULT == pNewInner->GetKind() );
ApplyPatternLines( aNewAttrs, ApplyPatternLines( aNewAttrs,
bDefNewOuter ? pOldOuter : pNewOuter, bDefNewOuter ? pOldOuter : pNewOuter,
...@@ -1037,7 +1037,7 @@ void ScViewFunc::ApplyAttr( const SfxPoolItem& rAttrItem ) ...@@ -1037,7 +1037,7 @@ void ScViewFunc::ApplyAttr( const SfxPoolItem& rAttrItem )
// patterns and borders // patterns and borders
void ScViewFunc::ApplyPatternLines( const ScPatternAttr& rAttr, const SvxBoxItem* pNewOuter, void ScViewFunc::ApplyPatternLines( const ScPatternAttr& rAttr, const SvxBoxItem* pNewOuter,
const SvxBoxInfoItem* pNewInner, sal_Bool bRecord ) const SvxBoxInfoItem* pNewInner, bool bRecord )
{ {
ScDocument* pDoc = GetViewData()->GetDocument(); ScDocument* pDoc = GetViewData()->GetDocument();
ScMarkData aFuncMark( GetViewData()->GetMarkData() ); // local copy for UnmarkFiltered ScMarkData aFuncMark( GetViewData()->GetMarkData() ); // local copy for UnmarkFiltered
...@@ -1047,7 +1047,7 @@ void ScViewFunc::ApplyPatternLines( const ScPatternAttr& rAttr, const SvxBoxItem ...@@ -1047,7 +1047,7 @@ void ScViewFunc::ApplyPatternLines( const ScPatternAttr& rAttr, const SvxBoxItem
ScRange aMarkRange; ScRange aMarkRange;
aFuncMark.MarkToSimple(); aFuncMark.MarkToSimple();
sal_Bool bMulti = aFuncMark.IsMultiMarked(); bool bMulti = aFuncMark.IsMultiMarked();
if (bMulti) if (bMulti)
aFuncMark.GetMultiMarkArea( aMarkRange ); aFuncMark.GetMultiMarkArea( aMarkRange );
else if (aFuncMark.IsMarked()) else if (aFuncMark.IsMarked())
...@@ -1111,7 +1111,7 @@ void ScViewFunc::ApplyPatternLines( const ScPatternAttr& rAttr, const SvxBoxItem ...@@ -1111,7 +1111,7 @@ void ScViewFunc::ApplyPatternLines( const ScPatternAttr& rAttr, const SvxBoxItem
// pattern only // pattern only
void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr, void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr,
sal_Bool bRecord, sal_Bool bCursorOnly ) bool bRecord, bool bCursorOnly )
{ {
ScViewData* pViewData = GetViewData(); ScViewData* pViewData = GetViewData();
ScDocShell* pDocSh = pViewData->GetDocShell(); ScDocShell* pDocSh = pViewData->GetDocShell();
...@@ -1127,9 +1127,9 @@ void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr, ...@@ -1127,9 +1127,9 @@ void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr,
// New alignment is checked (check in PostPaint isn't enough) in case a right // New alignment is checked (check in PostPaint isn't enough) in case a right
// alignment is changed to left. // alignment is changed to left.
const SfxItemSet& rNewSet = rAttr.GetItemSet(); const SfxItemSet& rNewSet = rAttr.GetItemSet();
sal_Bool bSetLines = rNewSet.GetItemState( ATTR_BORDER, sal_True ) == SFX_ITEM_SET || bool bSetLines = rNewSet.GetItemState( ATTR_BORDER, true ) == SFX_ITEM_SET ||
rNewSet.GetItemState( ATTR_SHADOW, sal_True ) == SFX_ITEM_SET; rNewSet.GetItemState( ATTR_SHADOW, true ) == SFX_ITEM_SET;
sal_Bool bSetAlign = rNewSet.GetItemState( ATTR_HOR_JUSTIFY, sal_True ) == SFX_ITEM_SET; bool bSetAlign = rNewSet.GetItemState( ATTR_HOR_JUSTIFY, true ) == SFX_ITEM_SET;
sal_uInt16 nExtFlags = 0; sal_uInt16 nExtFlags = 0;
if ( bSetLines ) if ( bSetLines )
...@@ -1139,9 +1139,9 @@ void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr, ...@@ -1139,9 +1139,9 @@ void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr,
ScDocShellModificator aModificator( *pDocSh ); ScDocShellModificator aModificator( *pDocSh );
sal_Bool bMulti = aFuncMark.IsMultiMarked(); bool bMulti = aFuncMark.IsMultiMarked();
aFuncMark.MarkToMulti(); aFuncMark.MarkToMulti();
sal_Bool bOnlyTab = (!aFuncMark.IsMultiMarked() && !bCursorOnly && aFuncMark.GetSelectCount() > 1); bool bOnlyTab = (!aFuncMark.IsMultiMarked() && !bCursorOnly && aFuncMark.GetSelectCount() > 1);
if (bOnlyTab) if (bOnlyTab)
{ {
SCCOL nCol = pViewData->GetCurX(); SCCOL nCol = pViewData->GetCurX();
...@@ -1257,7 +1257,7 @@ void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr, ...@@ -1257,7 +1257,7 @@ void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr,
for ( sal_uInt16 nWhich = ATTR_PATTERN_START; nWhich <= ATTR_PATTERN_END; ++nWhich ) for ( sal_uInt16 nWhich = ATTR_PATTERN_START; nWhich <= ATTR_PATTERN_END; ++nWhich )
{ {
const SfxPoolItem* pItem = 0; const SfxPoolItem* pItem = 0;
if ( rNewSet.GetItemState( nWhich, sal_True, &pItem ) == SFX_ITEM_SET && pItem ) if ( rNewSet.GetItemState( nWhich, true, &pItem ) == SFX_ITEM_SET && pItem )
{ {
PropertyEntryVector_t::const_iterator aIt = aPropVector.begin(); PropertyEntryVector_t::const_iterator aIt = aPropVector.begin();
while ( aIt != aPropVector.end()) while ( aIt != aPropVector.end())
...@@ -1320,7 +1320,7 @@ const SfxStyleSheet* ScViewFunc::GetStyleSheetFromMarked() ...@@ -1320,7 +1320,7 @@ const SfxStyleSheet* ScViewFunc::GetStyleSheetFromMarked()
return pSheet; return pSheet;
} }
void ScViewFunc::SetStyleSheetToMarked( SfxStyleSheet* pStyleSheet, sal_Bool bRecord ) void ScViewFunc::SetStyleSheetToMarked( SfxStyleSheet* pStyleSheet, bool bRecord )
{ {
// not editable because of matrix only? attribute OK nonetheless // not editable because of matrix only? attribute OK nonetheless
bool bOnlyNotBecauseOfMatrix; bool bOnlyNotBecauseOfMatrix;
...@@ -1363,7 +1363,7 @@ void ScViewFunc::SetStyleSheetToMarked( SfxStyleSheet* pStyleSheet, sal_Bool bRe ...@@ -1363,7 +1363,7 @@ void ScViewFunc::SetStyleSheetToMarked( SfxStyleSheet* pStyleSheet, sal_Bool bRe
ScRange aCopyRange = aMarkRange; ScRange aCopyRange = aMarkRange;
aCopyRange.aStart.SetTab(0); aCopyRange.aStart.SetTab(0);
aCopyRange.aEnd.SetTab(nTabCount-1); aCopyRange.aEnd.SetTab(nTabCount-1);
pDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, sal_True, pUndoDoc, &aFuncMark ); pDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, true, pUndoDoc, &aFuncMark );
aFuncMark.MarkToMulti(); aFuncMark.MarkToMulti();
OUString aName = pStyleSheet->GetName(); OUString aName = pStyleSheet->GetName();
...@@ -1433,7 +1433,7 @@ void ScViewFunc::RemoveStyleSheetInUse( const SfxStyleSheetBase* pStyleSheet ) ...@@ -1433,7 +1433,7 @@ void ScViewFunc::RemoveStyleSheetInUse( const SfxStyleSheetBase* pStyleSheet )
VirtualDevice aVirtDev; VirtualDevice aVirtDev;
aVirtDev.SetMapMode(MAP_PIXEL); aVirtDev.SetMapMode(MAP_PIXEL);
pDoc->StyleSheetChanged( pStyleSheet, sal_True, &aVirtDev, pDoc->StyleSheetChanged( pStyleSheet, true, &aVirtDev,
pViewData->GetPPTX(), pViewData->GetPPTX(),
pViewData->GetPPTY(), pViewData->GetPPTY(),
pViewData->GetZoomX(), pViewData->GetZoomX(),
...@@ -1476,14 +1476,14 @@ void ScViewFunc::UpdateStyleSheetInUse( const SfxStyleSheetBase* pStyleSheet ) ...@@ -1476,14 +1476,14 @@ void ScViewFunc::UpdateStyleSheetInUse( const SfxStyleSheetBase* pStyleSheet )
// insert cells - undo OK // insert cells - undo OK
sal_Bool ScViewFunc::InsertCells( InsCellCmd eCmd, sal_Bool bRecord, sal_Bool bPartOfPaste ) bool ScViewFunc::InsertCells( InsCellCmd eCmd, bool bRecord, bool bPartOfPaste )
{ {
ScRange aRange; ScRange aRange;
if (GetViewData()->GetSimpleArea(aRange) == SC_MARK_SIMPLE) if (GetViewData()->GetSimpleArea(aRange) == SC_MARK_SIMPLE)
{ {
ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDocShell* pDocSh = GetViewData()->GetDocShell();
const ScMarkData& rMark = GetViewData()->GetMarkData(); const ScMarkData& rMark = GetViewData()->GetMarkData();
sal_Bool bSuccess = pDocSh->GetDocFunc().InsertCells( aRange, &rMark, eCmd, bRecord, false, bPartOfPaste ); bool bSuccess = pDocSh->GetDocFunc().InsertCells( aRange, &rMark, eCmd, bRecord, false, bPartOfPaste );
if (bSuccess) if (bSuccess)
{ {
pDocSh->UpdateOle(GetViewData()); pDocSh->UpdateOle(GetViewData());
...@@ -1516,7 +1516,7 @@ sal_Bool ScViewFunc::InsertCells( InsCellCmd eCmd, sal_Bool bRecord, sal_Bool bP ...@@ -1516,7 +1516,7 @@ sal_Bool ScViewFunc::InsertCells( InsCellCmd eCmd, sal_Bool bRecord, sal_Bool bP
// delete cells - undo OK // delete cells - undo OK
void ScViewFunc::DeleteCells( DelCellCmd eCmd, sal_Bool bRecord ) void ScViewFunc::DeleteCells( DelCellCmd eCmd, bool bRecord )
{ {
ScRange aRange; ScRange aRange;
if ( GetViewData()->GetSimpleArea( aRange ) == SC_MARK_SIMPLE ) if ( GetViewData()->GetSimpleArea( aRange ) == SC_MARK_SIMPLE )
...@@ -1583,7 +1583,7 @@ void ScViewFunc::DeleteCells( DelCellCmd eCmd, sal_Bool bRecord ) ...@@ -1583,7 +1583,7 @@ void ScViewFunc::DeleteCells( DelCellCmd eCmd, sal_Bool bRecord )
if (eCmd == DEL_DELCOLS) if (eCmd == DEL_DELCOLS)
DeleteMulti( false, bRecord ); DeleteMulti( false, bRecord );
else if (eCmd == DEL_DELROWS) else if (eCmd == DEL_DELROWS)
DeleteMulti( sal_True, bRecord ); DeleteMulti( true, bRecord );
else else
ErrorMessage(STR_NOMULTISELECT); ErrorMessage(STR_NOMULTISELECT);
} }
...@@ -1591,7 +1591,7 @@ void ScViewFunc::DeleteCells( DelCellCmd eCmd, sal_Bool bRecord ) ...@@ -1591,7 +1591,7 @@ void ScViewFunc::DeleteCells( DelCellCmd eCmd, sal_Bool bRecord )
Unmark(); Unmark();
} }
void ScViewFunc::DeleteMulti( sal_Bool bRows, sal_Bool bRecord ) void ScViewFunc::DeleteMulti( bool bRows, bool bRecord )
{ {
ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocShellModificator aModificator( *pDocSh ); ScDocShellModificator aModificator( *pDocSh );
...@@ -1615,7 +1615,7 @@ void ScViewFunc::DeleteMulti( sal_Bool bRows, sal_Bool bRecord ) ...@@ -1615,7 +1615,7 @@ void ScViewFunc::DeleteMulti( sal_Bool bRows, sal_Bool bRecord )
SCCOLROW* pOneRange = pRanges; SCCOLROW* pOneRange = pRanges;
sal_uInt16 nErrorId = 0; sal_uInt16 nErrorId = 0;
sal_Bool bNeedRefresh = false; bool bNeedRefresh = false;
SCCOLROW nRangeNo; SCCOLROW nRangeNo;
for (nRangeNo=0; nRangeNo<nRangeCnt && !nErrorId; nRangeNo++) for (nRangeNo=0; nRangeNo<nRangeCnt && !nErrorId; nRangeNo++)
{ {
...@@ -1667,7 +1667,7 @@ void ScViewFunc::DeleteMulti( sal_Bool bRows, sal_Bool bRecord ) ...@@ -1667,7 +1667,7 @@ void ScViewFunc::DeleteMulti( sal_Bool bRows, sal_Bool bRecord )
{ {
// detect if the start of a merged cell is deleted, so the merge flags can be refreshed // detect if the start of a merged cell is deleted, so the merge flags can be refreshed
bNeedRefresh = sal_True; bNeedRefresh = true;
} }
} }
...@@ -1733,7 +1733,7 @@ void ScViewFunc::DeleteMulti( sal_Bool bRows, sal_Bool bRecord ) ...@@ -1733,7 +1733,7 @@ void ScViewFunc::DeleteMulti( sal_Bool bRows, sal_Bool bRecord )
SCROW nEndRow = MAXROW; SCROW nEndRow = MAXROW;
pDoc->RemoveFlagsTab( nStartCol, nStartRow, nEndCol, nEndRow, nTab, SC_MF_HOR | SC_MF_VER ); pDoc->RemoveFlagsTab( nStartCol, nStartRow, nEndCol, nEndRow, nTab, SC_MF_HOR | SC_MF_VER );
pDoc->ExtendMerge( nStartCol, nStartRow, nEndCol, nEndRow, nTab, sal_True ); pDoc->ExtendMerge( nStartCol, nStartRow, nEndCol, nEndRow, nTab, true );
} }
if (bRecord) if (bRecord)
...@@ -1773,7 +1773,7 @@ void ScViewFunc::DeleteMulti( sal_Bool bRows, sal_Bool bRecord ) ...@@ -1773,7 +1773,7 @@ void ScViewFunc::DeleteMulti( sal_Bool bRows, sal_Bool bRecord )
// delete contents // delete contents
void ScViewFunc::DeleteContents( sal_uInt16 nFlags, sal_Bool bRecord ) void ScViewFunc::DeleteContents( sal_uInt16 nFlags, bool bRecord )
{ {
ScViewData* pViewData = GetViewData(); ScViewData* pViewData = GetViewData();
pViewData->SetPasteMode( SC_PASTE_NONE ); pViewData->SetPasteMode( SC_PASTE_NONE );
...@@ -1781,7 +1781,7 @@ void ScViewFunc::DeleteContents( sal_uInt16 nFlags, sal_Bool bRecord ) ...@@ -1781,7 +1781,7 @@ void ScViewFunc::DeleteContents( sal_uInt16 nFlags, sal_Bool bRecord )
// not editable because of matrix only? attribute OK nonetheless // not editable because of matrix only? attribute OK nonetheless
bool bOnlyNotBecauseOfMatrix; bool bOnlyNotBecauseOfMatrix;
sal_Bool bEditable = SelectionEditable( &bOnlyNotBecauseOfMatrix ); bool bEditable = SelectionEditable( &bOnlyNotBecauseOfMatrix );
if ( !bEditable ) if ( !bEditable )
{ {
if ( !(bOnlyNotBecauseOfMatrix && if ( !(bOnlyNotBecauseOfMatrix &&
...@@ -1793,7 +1793,7 @@ void ScViewFunc::DeleteContents( sal_uInt16 nFlags, sal_Bool bRecord ) ...@@ -1793,7 +1793,7 @@ void ScViewFunc::DeleteContents( sal_uInt16 nFlags, sal_Bool bRecord )
} }
ScRange aMarkRange; ScRange aMarkRange;
sal_Bool bSimple = false; bool bSimple = false;
ScDocument* pDoc = GetViewData()->GetDocument(); ScDocument* pDoc = GetViewData()->GetDocument();
ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDocShell* pDocSh = GetViewData()->GetDocShell();
...@@ -1816,7 +1816,7 @@ void ScViewFunc::DeleteContents( sal_uInt16 nFlags, sal_Bool bRecord ) ...@@ -1816,7 +1816,7 @@ void ScViewFunc::DeleteContents( sal_uInt16 nFlags, sal_Bool bRecord )
aFuncMark.SetMarkArea( aMarkRange ); aFuncMark.SetMarkArea( aMarkRange );
} }
else else
bSimple = sal_True; bSimple = true;
} }
aFuncMark.SetMarking(false); // for MarkToMulti aFuncMark.SetMarking(false); // for MarkToMulti
...@@ -1825,7 +1825,7 @@ void ScViewFunc::DeleteContents( sal_uInt16 nFlags, sal_Bool bRecord ) ...@@ -1825,7 +1825,7 @@ void ScViewFunc::DeleteContents( sal_uInt16 nFlags, sal_Bool bRecord )
OSL_ENSURE( aFuncMark.IsMarked() || aFuncMark.IsMultiMarked() || bSimple, "delete what?" ); OSL_ENSURE( aFuncMark.IsMarked() || aFuncMark.IsMultiMarked() || bSimple, "delete what?" );
ScDocument* pUndoDoc = NULL; ScDocument* pUndoDoc = NULL;
sal_Bool bMulti = !bSimple && aFuncMark.IsMultiMarked(); bool bMulti = !bSimple && aFuncMark.IsMultiMarked();
if (!bSimple) if (!bSimple)
{ {
aFuncMark.MarkToMulti(); aFuncMark.MarkToMulti();
...@@ -1834,15 +1834,15 @@ void ScViewFunc::DeleteContents( sal_uInt16 nFlags, sal_Bool bRecord ) ...@@ -1834,15 +1834,15 @@ void ScViewFunc::DeleteContents( sal_uInt16 nFlags, sal_Bool bRecord )
ScRange aExtendedRange(aMarkRange); ScRange aExtendedRange(aMarkRange);
if (!bSimple) if (!bSimple)
{ {
if ( pDoc->ExtendMerge( aExtendedRange, sal_True ) ) if ( pDoc->ExtendMerge( aExtendedRange, true ) )
bMulti = false; bMulti = false;
} }
// no objects on protected tabs // no objects on protected tabs
sal_Bool bObjects = false; bool bObjects = false;
if ( nFlags & IDF_OBJECTS ) if ( nFlags & IDF_OBJECTS )
{ {
bObjects = sal_True; bObjects = true;
ScMarkData::iterator itr = aFuncMark.begin(), itrEnd = aFuncMark.end(); ScMarkData::iterator itr = aFuncMark.begin(), itrEnd = aFuncMark.end();
for (; itr != itrEnd; ++itr) for (; itr != itrEnd; ++itr)
if (pDoc->IsTabProtected(*itr)) if (pDoc->IsTabProtected(*itr))
...@@ -1860,7 +1860,7 @@ void ScViewFunc::DeleteContents( sal_uInt16 nFlags, sal_Bool bRecord ) ...@@ -1860,7 +1860,7 @@ void ScViewFunc::DeleteContents( sal_uInt16 nFlags, sal_Bool bRecord )
// 4) delete contents // 4) delete contents
// 5) add undo-action // 5) add undo-action
sal_Bool bDrawUndo = bObjects || ( nFlags & IDF_NOTE ); // needed for shown notes bool bDrawUndo = bObjects || ( nFlags & IDF_NOTE ); // needed for shown notes
if ( bDrawUndo && bRecord ) if ( bDrawUndo && bRecord )
pDoc->BeginDrawUndo(); pDoc->BeginDrawUndo();
...@@ -1955,9 +1955,9 @@ void ScViewFunc::DeleteContents( sal_uInt16 nFlags, sal_Bool bRecord ) ...@@ -1955,9 +1955,9 @@ void ScViewFunc::DeleteContents( sal_uInt16 nFlags, sal_Bool bRecord )
// column width/row height (via header) - undo OK // column width/row height (via header) - undo OK
void ScViewFunc::SetWidthOrHeight( sal_Bool bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRanges, void ScViewFunc::SetWidthOrHeight( bool bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRanges,
ScSizeMode eMode, sal_uInt16 nSizeTwips, ScSizeMode eMode, sal_uInt16 nSizeTwips,
sal_Bool bRecord, sal_Bool bPaint, ScMarkData* pMarkData ) bool bRecord, bool bPaint, ScMarkData* pMarkData )
{ {
if (nRangeCnt == 0) if (nRangeCnt == 0)
return; return;
...@@ -2004,7 +2004,7 @@ void ScViewFunc::SetWidthOrHeight( sal_Bool bWidth, SCCOLROW nRangeCnt, SCCOLROW ...@@ -2004,7 +2004,7 @@ void ScViewFunc::SetWidthOrHeight( sal_Bool bWidth, SCCOLROW nRangeCnt, SCCOLROW
SCCOLROW nStart = pRanges[0]; SCCOLROW nStart = pRanges[0];
SCCOLROW nEnd = pRanges[2*nRangeCnt-1]; SCCOLROW nEnd = pRanges[2*nRangeCnt-1];
sal_Bool bFormula = false; bool bFormula = false;
if ( eMode == SC_SIZE_OPTIMAL ) if ( eMode == SC_SIZE_OPTIMAL )
{ {
const ScViewOptions& rOpts = GetViewData()->GetOptions(); const ScViewOptions& rOpts = GetViewData()->GetOptions();
...@@ -2055,8 +2055,8 @@ void ScViewFunc::SetWidthOrHeight( sal_Bool bWidth, SCCOLROW nRangeCnt, SCCOLROW ...@@ -2055,8 +2055,8 @@ void ScViewFunc::SetWidthOrHeight( sal_Bool bWidth, SCCOLROW nRangeCnt, SCCOLROW
if ( eMode==SC_SIZE_OPTIMAL || eMode==SC_SIZE_VISOPT ) if ( eMode==SC_SIZE_OPTIMAL || eMode==SC_SIZE_VISOPT )
pMarkData->MarkToMulti(); pMarkData->MarkToMulti();
sal_Bool bShow = nSizeTwips > 0 || eMode != SC_SIZE_DIRECT; bool bShow = nSizeTwips > 0 || eMode != SC_SIZE_DIRECT;
sal_Bool bOutline = false; bool bOutline = false;
itr = pMarkData->begin(); itr = pMarkData->begin();
for (; itr != itrEnd; ++itr) for (; itr != itrEnd; ++itr)
...@@ -2074,7 +2074,7 @@ void ScViewFunc::SetWidthOrHeight( sal_Bool bWidth, SCCOLROW nRangeCnt, SCCOLROW ...@@ -2074,7 +2074,7 @@ void ScViewFunc::SetWidthOrHeight( sal_Bool bWidth, SCCOLROW nRangeCnt, SCCOLROW
{ {
if ( eMode==SC_SIZE_OPTIMAL || eMode==SC_SIZE_VISOPT ) if ( eMode==SC_SIZE_OPTIMAL || eMode==SC_SIZE_VISOPT )
{ {
sal_Bool bAll = ( eMode==SC_SIZE_OPTIMAL ); bool bAll = ( eMode==SC_SIZE_OPTIMAL );
if (!bAll) if (!bAll)
{ {
// delete CR_MANUALSIZE for all in range, // delete CR_MANUALSIZE for all in range,
...@@ -2110,7 +2110,7 @@ void ScViewFunc::SetWidthOrHeight( sal_Bool bWidth, SCCOLROW nRangeCnt, SCCOLROW ...@@ -2110,7 +2110,7 @@ void ScViewFunc::SetWidthOrHeight( sal_Bool bWidth, SCCOLROW nRangeCnt, SCCOLROW
pDoc->SetOptimalHeight( nStartNo, nEndNo, nTab, nSizeTwips, aProv.GetDevice(), pDoc->SetOptimalHeight( nStartNo, nEndNo, nTab, nSizeTwips, aProv.GetDevice(),
nPPTX, nPPTY, aZoomX, aZoomY, bAll ); nPPTX, nPPTY, aZoomX, aZoomY, bAll );
if (bAll) if (bAll)
pDoc->ShowRows( nStartNo, nEndNo, nTab, sal_True ); pDoc->ShowRows( nStartNo, nEndNo, nTab, true );
// Manual-Flag already (re)set in SetOptimalHeight in case of bAll=sal_True // Manual-Flag already (re)set in SetOptimalHeight in case of bAll=sal_True
// (set for Extra-Height, else reset). // (set for Extra-Height, else reset).
...@@ -2120,13 +2120,13 @@ void ScViewFunc::SetWidthOrHeight( sal_Bool bWidth, SCCOLROW nRangeCnt, SCCOLROW ...@@ -2120,13 +2120,13 @@ void ScViewFunc::SetWidthOrHeight( sal_Bool bWidth, SCCOLROW nRangeCnt, SCCOLROW
if (nSizeTwips) if (nSizeTwips)
{ {
pDoc->SetRowHeightRange( nStartNo, nEndNo, nTab, nSizeTwips ); pDoc->SetRowHeightRange( nStartNo, nEndNo, nTab, nSizeTwips );
pDoc->SetManualHeight( nStartNo, nEndNo, nTab, sal_True ); // height was set manually pDoc->SetManualHeight( nStartNo, nEndNo, nTab, true ); // height was set manually
} }
pDoc->ShowRows( nStartNo, nEndNo, nTab, nSizeTwips != 0 ); pDoc->ShowRows( nStartNo, nEndNo, nTab, nSizeTwips != 0 );
} }
else if ( eMode==SC_SIZE_SHOW ) else if ( eMode==SC_SIZE_SHOW )
{ {
pDoc->ShowRows( nStartNo, nEndNo, nTab, sal_True ); pDoc->ShowRows( nStartNo, nEndNo, nTab, true );
} }
} }
else // column width else // column width
...@@ -2153,12 +2153,12 @@ void ScViewFunc::SetWidthOrHeight( sal_Bool bWidth, SCCOLROW nRangeCnt, SCCOLROW ...@@ -2153,12 +2153,12 @@ void ScViewFunc::SetWidthOrHeight( sal_Bool bWidth, SCCOLROW nRangeCnt, SCCOLROW
{ {
if ( pDoc->UpdateOutlineCol( static_cast<SCCOL>(nStartNo), if ( pDoc->UpdateOutlineCol( static_cast<SCCOL>(nStartNo),
static_cast<SCCOL>(nEndNo), nTab, bShow ) ) static_cast<SCCOL>(nEndNo), nTab, bShow ) )
bOutline = sal_True; bOutline = true;
} }
else else
{ {
if ( pDoc->UpdateOutlineRow( nStartNo, nEndNo, nTab, bShow ) ) if ( pDoc->UpdateOutlineRow( nStartNo, nEndNo, nTab, bShow ) )
bOutline = sal_True; bOutline = true;
} }
} }
pDoc->SetDrawPageSize(nTab); pDoc->SetDrawPageSize(nTab);
...@@ -2248,8 +2248,8 @@ void ScViewFunc::SetWidthOrHeight( sal_Bool bWidth, SCCOLROW nRangeCnt, SCCOLROW ...@@ -2248,8 +2248,8 @@ void ScViewFunc::SetWidthOrHeight( sal_Bool bWidth, SCCOLROW nRangeCnt, SCCOLROW
// column width/row height (via marked range) // column width/row height (via marked range)
void ScViewFunc::SetMarkedWidthOrHeight( sal_Bool bWidth, ScSizeMode eMode, sal_uInt16 nSizeTwips, void ScViewFunc::SetMarkedWidthOrHeight( bool bWidth, ScSizeMode eMode, sal_uInt16 nSizeTwips,
sal_Bool bRecord, sal_Bool bPaint ) bool bRecord, bool bPaint )
{ {
ScMarkData& rMark = GetViewData()->GetMarkData(); ScMarkData& rMark = GetViewData()->GetMarkData();
...@@ -2261,7 +2261,7 @@ void ScViewFunc::SetMarkedWidthOrHeight( sal_Bool bWidth, ScSizeMode eMode, sal_ ...@@ -2261,7 +2261,7 @@ void ScViewFunc::SetMarkedWidthOrHeight( sal_Bool bWidth, ScSizeMode eMode, sal_
SCTAB nTab = GetViewData()->GetTabNo(); SCTAB nTab = GetViewData()->GetTabNo();
DoneBlockMode(); DoneBlockMode();
InitOwnBlockMode(); InitOwnBlockMode();
rMark.SetMultiMarkArea( ScRange( nCol,nRow,nTab ), sal_True ); rMark.SetMultiMarkArea( ScRange( nCol,nRow,nTab ), true );
MarkDataChanged(); MarkDataChanged();
} }
...@@ -2279,7 +2279,7 @@ void ScViewFunc::SetMarkedWidthOrHeight( sal_Bool bWidth, ScSizeMode eMode, sal_ ...@@ -2279,7 +2279,7 @@ void ScViewFunc::SetMarkedWidthOrHeight( sal_Bool bWidth, ScSizeMode eMode, sal_
rMark.MarkToSimple(); rMark.MarkToSimple();
} }
void ScViewFunc::ModifyCellSize( ScDirection eDir, sal_Bool bOptimal ) void ScViewFunc::ModifyCellSize( ScDirection eDir, bool bOptimal )
{ {
//! step size adjustable //! step size adjustable
// step size is also minumum // step size is also minumum
...@@ -2287,7 +2287,7 @@ void ScViewFunc::ModifyCellSize( ScDirection eDir, sal_Bool bOptimal ) ...@@ -2287,7 +2287,7 @@ void ScViewFunc::ModifyCellSize( ScDirection eDir, sal_Bool bOptimal )
sal_uInt16 nStepY = ScGlobal::nStdRowHeight; sal_uInt16 nStepY = ScGlobal::nStdRowHeight;
ScModule* pScMod = SC_MOD(); ScModule* pScMod = SC_MOD();
sal_Bool bAnyEdit = pScMod->IsInputMode(); bool bAnyEdit = pScMod->IsInputMode();
SCCOL nCol = GetViewData()->GetCurX(); SCCOL nCol = GetViewData()->GetCurX();
SCROW nRow = GetViewData()->GetCurY(); SCROW nRow = GetViewData()->GetCurY();
SCTAB nTab = GetViewData()->GetTabNo(); SCTAB nTab = GetViewData()->GetTabNo();
...@@ -2351,7 +2351,7 @@ void ScViewFunc::ModifyCellSize( ScDirection eDir, sal_Bool bOptimal ) ...@@ -2351,7 +2351,7 @@ void ScViewFunc::ModifyCellSize( ScDirection eDir, sal_Bool bOptimal )
} }
long nPixel = pDoc->GetNeededSize( nCol, nRow, nTab, aProv.GetDevice(), long nPixel = pDoc->GetNeededSize( nCol, nRow, nTab, aProv.GetDevice(),
nPPTX, nPPTY, aZoomX, aZoomY, sal_True ); nPPTX, nPPTY, aZoomX, aZoomY, true );
sal_uInt16 nTwips = (sal_uInt16)( nPixel / nPPTX ); sal_uInt16 nTwips = (sal_uInt16)( nPixel / nPPTX );
if (nTwips != 0) if (nTwips != 0)
nWidth = nTwips + STD_EXTRA_WIDTH; nWidth = nTwips + STD_EXTRA_WIDTH;
...@@ -2369,14 +2369,14 @@ void ScViewFunc::ModifyCellSize( ScDirection eDir, sal_Bool bOptimal ) ...@@ -2369,14 +2369,14 @@ void ScViewFunc::ModifyCellSize( ScDirection eDir, sal_Bool bOptimal )
if ( nWidth > MAX_COL_WIDTH ) nWidth = MAX_COL_WIDTH; if ( nWidth > MAX_COL_WIDTH ) nWidth = MAX_COL_WIDTH;
} }
nRange[0] = nRange[1] = nCol; nRange[0] = nRange[1] = nCol;
SetWidthOrHeight( sal_True, 1, nRange, SC_SIZE_DIRECT, nWidth ); SetWidthOrHeight( true, 1, nRange, SC_SIZE_DIRECT, nWidth );
// adjust height of this row if width demands/allows this // adjust height of this row if width demands/allows this
if (!bAnyEdit) if (!bAnyEdit)
{ {
const ScPatternAttr* pPattern = pDoc->GetPattern( nCol, nRow, nTab ); const ScPatternAttr* pPattern = pDoc->GetPattern( nCol, nRow, nTab );
sal_Bool bNeedHeight = bool bNeedHeight =
((const SfxBoolItem&)pPattern->GetItem( ATTR_LINEBREAK )).GetValue() || ((const SfxBoolItem&)pPattern->GetItem( ATTR_LINEBREAK )).GetValue() ||
((const SvxHorJustifyItem&)pPattern-> ((const SvxHorJustifyItem&)pPattern->
GetItem( ATTR_HOR_JUSTIFY )).GetValue() == SVX_HOR_JUSTIFY_BLOCK; GetItem( ATTR_HOR_JUSTIFY )).GetValue() == SVX_HOR_JUSTIFY_BLOCK;
...@@ -2455,7 +2455,7 @@ void ScViewFunc::Protect( SCTAB nTab, const OUString& rPassword ) ...@@ -2455,7 +2455,7 @@ void ScViewFunc::Protect( SCTAB nTab, const OUString& rPassword )
ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument(); ScDocument* pDoc = pDocSh->GetDocument();
ScDocFunc &rFunc = pDocSh->GetDocFunc(); ScDocFunc &rFunc = pDocSh->GetDocFunc();
sal_Bool bUndo(pDoc->IsUndoEnabled()); bool bUndo(pDoc->IsUndoEnabled());
if ( nTab == TABLEID_DOC || rMark.GetSelectCount() <= 1 ) if ( nTab == TABLEID_DOC || rMark.GetSelectCount() <= 1 )
rFunc.Protect( nTab, rPassword, false ); rFunc.Protect( nTab, rPassword, false );
...@@ -2480,14 +2480,14 @@ void ScViewFunc::Protect( SCTAB nTab, const OUString& rPassword ) ...@@ -2480,14 +2480,14 @@ void ScViewFunc::Protect( SCTAB nTab, const OUString& rPassword )
UpdateLayerLocks(); //! broadcast to all views UpdateLayerLocks(); //! broadcast to all views
} }
sal_Bool ScViewFunc::Unprotect( SCTAB nTab, const OUString& rPassword ) bool ScViewFunc::Unprotect( SCTAB nTab, const OUString& rPassword )
{ {
ScMarkData& rMark = GetViewData()->GetMarkData(); ScMarkData& rMark = GetViewData()->GetMarkData();
ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument(); ScDocument* pDoc = pDocSh->GetDocument();
ScDocFunc &rFunc = pDocSh->GetDocFunc(); ScDocFunc &rFunc = pDocSh->GetDocFunc();
sal_Bool bChanged = false; bool bChanged = false;
sal_Bool bUndo (pDoc->IsUndoEnabled()); bool bUndo (pDoc->IsUndoEnabled());
if ( nTab == TABLEID_DOC || rMark.GetSelectCount() <= 1 ) if ( nTab == TABLEID_DOC || rMark.GetSelectCount() <= 1 )
bChanged = rFunc.Unprotect( nTab, rPassword, false ); bChanged = rFunc.Unprotect( nTab, rPassword, false );
...@@ -2504,7 +2504,7 @@ sal_Bool ScViewFunc::Unprotect( SCTAB nTab, const OUString& rPassword ) ...@@ -2504,7 +2504,7 @@ sal_Bool ScViewFunc::Unprotect( SCTAB nTab, const OUString& rPassword )
ScMarkData::iterator itr = rMark.begin(), itrEnd = rMark.end(); ScMarkData::iterator itr = rMark.begin(), itrEnd = rMark.end();
for (; itr != itrEnd; ++itr) for (; itr != itrEnd; ++itr)
if ( rFunc.Unprotect( *itr, rPassword, false ) ) if ( rFunc.Unprotect( *itr, rPassword, false ) )
bChanged = sal_True; bChanged = true;
if (bUndo) if (bUndo)
pDocSh->GetUndoManager()->LeaveListAction(); pDocSh->GetUndoManager()->LeaveListAction();
...@@ -2559,7 +2559,7 @@ void ScViewFunc::SetNumberFormat( short nFormatType, sal_uLong nAdd ) ...@@ -2559,7 +2559,7 @@ void ScViewFunc::SetNumberFormat( short nFormatType, sal_uLong nAdd )
SfxItemSet& rSet = aNewAttrs.GetItemSet(); SfxItemSet& rSet = aNewAttrs.GetItemSet();
rSet.Put( SfxUInt32Item( ATTR_VALUE_FORMAT, nNumberFormat ) ); rSet.Put( SfxUInt32Item( ATTR_VALUE_FORMAT, nNumberFormat ) );
// ATTR_LANGUAGE_FORMAT not // ATTR_LANGUAGE_FORMAT not
ApplySelectionPattern( aNewAttrs, sal_True ); ApplySelectionPattern( aNewAttrs, true );
} }
void ScViewFunc::SetNumFmtByStr( const OUString& rCode ) void ScViewFunc::SetNumFmtByStr( const OUString& rCode )
...@@ -2586,7 +2586,7 @@ void ScViewFunc::SetNumFmtByStr( const OUString& rCode ) ...@@ -2586,7 +2586,7 @@ void ScViewFunc::SetNumFmtByStr( const OUString& rCode )
// determine index for String // determine index for String
sal_Bool bOk = sal_True; bool bOk = true;
sal_uInt32 nNumberFormat = pFormatter->GetEntryKey( rCode, eLanguage ); sal_uInt32 nNumberFormat = pFormatter->GetEntryKey( rCode, eLanguage );
if ( nNumberFormat == NUMBERFORMAT_ENTRY_NOT_FOUND ) if ( nNumberFormat == NUMBERFORMAT_ENTRY_NOT_FOUND )
{ {
...@@ -2604,13 +2604,13 @@ void ScViewFunc::SetNumFmtByStr( const OUString& rCode ) ...@@ -2604,13 +2604,13 @@ void ScViewFunc::SetNumFmtByStr( const OUString& rCode )
SfxItemSet& rSet = aNewAttrs.GetItemSet(); SfxItemSet& rSet = aNewAttrs.GetItemSet();
rSet.Put( SfxUInt32Item( ATTR_VALUE_FORMAT, nNumberFormat ) ); rSet.Put( SfxUInt32Item( ATTR_VALUE_FORMAT, nNumberFormat ) );
rSet.Put( SvxLanguageItem( eLanguage, ATTR_LANGUAGE_FORMAT ) ); rSet.Put( SvxLanguageItem( eLanguage, ATTR_LANGUAGE_FORMAT ) );
ApplySelectionPattern( aNewAttrs, sal_True ); ApplySelectionPattern( aNewAttrs, true );
} }
//! else return error / issue warning ??? //! else return error / issue warning ???
} }
void ScViewFunc::ChangeNumFmtDecimals( sal_Bool bIncrement ) void ScViewFunc::ChangeNumFmtDecimals( bool bIncrement )
{ {
// not editable because of matrix only? attribute OK nonetheless // not editable because of matrix only? attribute OK nonetheless
bool bOnlyNotBecauseOfMatrix; bool bOnlyNotBecauseOfMatrix;
...@@ -2639,7 +2639,7 @@ void ScViewFunc::ChangeNumFmtDecimals( sal_Bool bIncrement ) ...@@ -2639,7 +2639,7 @@ void ScViewFunc::ChangeNumFmtDecimals( sal_Bool bIncrement )
// what have we got here? // what have we got here?
sal_uInt32 nNewFormat = nOldFormat; sal_uInt32 nNewFormat = nOldFormat;
sal_Bool bError = false; bool bError = false;
LanguageType eLanguage = pOldEntry->GetLanguage(); LanguageType eLanguage = pOldEntry->GetLanguage();
bool bThousand, bNegRed; bool bThousand, bNegRed;
...@@ -2652,11 +2652,11 @@ void ScViewFunc::ChangeNumFmtDecimals( sal_Bool bIncrement ) ...@@ -2652,11 +2652,11 @@ void ScViewFunc::ChangeNumFmtDecimals( sal_Bool bIncrement )
{ {
// date, time, fraction, logical, text can not be changed // date, time, fraction, logical, text can not be changed
//! in case of scientific the Numberformatter also can't //! in case of scientific the Numberformatter also can't
bError = sal_True; bError = true;
} }
//! SvNumberformat has a Member bStandard, but doesn't disclose it //! SvNumberformat has a Member bStandard, but doesn't disclose it
sal_Bool bWasStandard = ( nOldFormat == pFormatter->GetStandardIndex( eLanguage ) ); bool bWasStandard = ( nOldFormat == pFormatter->GetStandardIndex( eLanguage ) );
if (bWasStandard) if (bWasStandard)
{ {
// with "Standard" the decimal places depend on cell content // with "Standard" the decimal places depend on cell content
...@@ -2671,7 +2671,7 @@ void ScViewFunc::ChangeNumFmtDecimals( sal_Bool bIncrement ) ...@@ -2671,7 +2671,7 @@ void ScViewFunc::ChangeNumFmtDecimals( sal_Bool bIncrement )
nPrecision = 0; nPrecision = 0;
// 'E' for exponential is fixed in Numberformatter // 'E' for exponential is fixed in Numberformatter
if ( aOut.indexOf((sal_Unicode)'E') >= 0 ) if ( aOut.indexOf((sal_Unicode)'E') >= 0 )
bError = sal_True; // exponential not changed bError = true; // exponential not changed
else else
{ {
OUString aDecSep( pFormatter->GetFormatDecimalSep( nOldFormat ) ); OUString aDecSep( pFormatter->GetFormatDecimalSep( nOldFormat ) );
...@@ -2689,14 +2689,14 @@ void ScViewFunc::ChangeNumFmtDecimals( sal_Bool bIncrement ) ...@@ -2689,14 +2689,14 @@ void ScViewFunc::ChangeNumFmtDecimals( sal_Bool bIncrement )
if (nPrecision<20) if (nPrecision<20)
++nPrecision; // increment ++nPrecision; // increment
else else
bError = sal_True; // 20 is maximum bError = true; // 20 is maximum
} }
else else
{ {
if (nPrecision) if (nPrecision)
--nPrecision; // decrement --nPrecision; // decrement
else else
bError = sal_True; // 0 is minumum bError = true; // 0 is minumum
} }
} }
...@@ -2711,11 +2711,11 @@ void ScViewFunc::ChangeNumFmtDecimals( sal_Bool bIncrement ) ...@@ -2711,11 +2711,11 @@ void ScViewFunc::ChangeNumFmtDecimals( sal_Bool bIncrement )
{ {
sal_Int32 nErrPos = 0; sal_Int32 nErrPos = 0;
short nNewType = 0; short nNewType = 0;
sal_Bool bOk = pFormatter->PutEntry( aNewPicture, nErrPos, bool bOk = pFormatter->PutEntry( aNewPicture, nErrPos,
nNewType, nNewFormat, eLanguage ); nNewType, nNewFormat, eLanguage );
OSL_ENSURE( bOk, "incorrect numberformat generated" ); OSL_ENSURE( bOk, "incorrect numberformat generated" );
if (!bOk) if (!bOk)
bError = sal_True; bError = true;
} }
} }
...@@ -2725,11 +2725,11 @@ void ScViewFunc::ChangeNumFmtDecimals( sal_Bool bIncrement ) ...@@ -2725,11 +2725,11 @@ void ScViewFunc::ChangeNumFmtDecimals( sal_Bool bIncrement )
SfxItemSet& rSet = aNewAttrs.GetItemSet(); SfxItemSet& rSet = aNewAttrs.GetItemSet();
rSet.Put( SfxUInt32Item( ATTR_VALUE_FORMAT, nNewFormat ) ); rSet.Put( SfxUInt32Item( ATTR_VALUE_FORMAT, nNewFormat ) );
// ATTR_LANGUAGE_FORMAT not // ATTR_LANGUAGE_FORMAT not
ApplySelectionPattern( aNewAttrs, sal_True ); ApplySelectionPattern( aNewAttrs, true );
} }
} }
void ScViewFunc::ChangeIndent( sal_Bool bIncrement ) void ScViewFunc::ChangeIndent( bool bIncrement )
{ {
ScViewData* pViewData = GetViewData(); ScViewData* pViewData = GetViewData();
ScDocShell* pDocSh = pViewData->GetDocShell(); ScDocShell* pDocSh = pViewData->GetDocShell();
...@@ -2746,7 +2746,7 @@ void ScViewFunc::ChangeIndent( sal_Bool bIncrement ) ...@@ -2746,7 +2746,7 @@ void ScViewFunc::ChangeIndent( sal_Bool bIncrement )
aWorkMark.SetMultiMarkArea( ScRange(nCol,nRow,nTab) ); aWorkMark.SetMultiMarkArea( ScRange(nCol,nRow,nTab) );
} }
sal_Bool bSuccess = pDocSh->GetDocFunc().ChangeIndent( aWorkMark, bIncrement, false ); bool bSuccess = pDocSh->GetDocFunc().ChangeIndent( aWorkMark, bIncrement, false );
if (bSuccess) if (bSuccess)
{ {
pDocSh->UpdateOle(pViewData); pDocSh->UpdateOle(pViewData);
...@@ -2759,13 +2759,13 @@ void ScViewFunc::ChangeIndent( sal_Bool bIncrement ) ...@@ -2759,13 +2759,13 @@ void ScViewFunc::ChangeIndent( sal_Bool bIncrement )
} }
} }
sal_Bool ScViewFunc::InsertName( const OUString& rName, const OUString& rSymbol, bool ScViewFunc::InsertName( const OUString& rName, const OUString& rSymbol,
const OUString& rType ) const OUString& rType )
{ {
// Type = P,R,C,F (and combinations) // Type = P,R,C,F (and combinations)
//! undo... //! undo...
sal_Bool bOk = false; bool bOk = false;
ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument(); ScDocument* pDoc = pDocSh->GetDocument();
SCTAB nTab = GetViewData()->GetTabNo(); SCTAB nTab = GetViewData()->GetTabNo();
...@@ -2790,7 +2790,7 @@ sal_Bool ScViewFunc::InsertName( const OUString& rName, const OUString& rSymbol, ...@@ -2790,7 +2790,7 @@ sal_Bool ScViewFunc::InsertName( const OUString& rName, const OUString& rSymbol,
{ {
ScDocShellModificator aModificator( *pDocSh ); ScDocShellModificator aModificator( *pDocSh );
pDoc->CompileNameFormula( sal_True ); // CreateFormulaString pDoc->CompileNameFormula( true ); // CreateFormulaString
// input available yet? Then remove beforehand (=change) // input available yet? Then remove beforehand (=change)
ScRangeData* pData = pList->findByUpperName(ScGlobal::pCharClass->uppercase(rName)); ScRangeData* pData = pList->findByUpperName(ScGlobal::pCharClass->uppercase(rName));
...@@ -2801,7 +2801,7 @@ sal_Bool ScViewFunc::InsertName( const OUString& rName, const OUString& rSymbol, ...@@ -2801,7 +2801,7 @@ sal_Bool ScViewFunc::InsertName( const OUString& rName, const OUString& rSymbol,
} }
if ( pList->insert( pNewEntry ) ) if ( pList->insert( pNewEntry ) )
bOk = sal_True; bOk = true;
pNewEntry = NULL; // never delete, insert took ownership pNewEntry = NULL; // never delete, insert took ownership
pDoc->CompileNameFormula( false ); // CompileFormulaString pDoc->CompileNameFormula( false ); // CompileFormulaString
...@@ -2815,7 +2815,7 @@ sal_Bool ScViewFunc::InsertName( const OUString& rName, const OUString& rSymbol, ...@@ -2815,7 +2815,7 @@ sal_Bool ScViewFunc::InsertName( const OUString& rName, const OUString& rSymbol,
void ScViewFunc::CreateNames( sal_uInt16 nFlags ) void ScViewFunc::CreateNames( sal_uInt16 nFlags )
{ {
sal_Bool bDone = false; bool bDone = false;
ScRange aRange; ScRange aRange;
if ( GetViewData()->GetSimpleArea(aRange) == SC_MARK_SIMPLE ) if ( GetViewData()->GetSimpleArea(aRange) == SC_MARK_SIMPLE )
bDone = GetViewData()->GetDocShell()->GetDocFunc().CreateNames( aRange, nFlags, false ); bDone = GetViewData()->GetDocShell()->GetDocFunc().CreateNames( aRange, nFlags, false );
...@@ -2835,11 +2835,11 @@ sal_uInt16 ScViewFunc::GetCreateNameFlags() ...@@ -2835,11 +2835,11 @@ sal_uInt16 ScViewFunc::GetCreateNameFlags()
{ {
ScDocument* pDoc = GetViewData()->GetDocument(); ScDocument* pDoc = GetViewData()->GetDocument();
SCTAB nTab = GetViewData()->GetTabNo(); SCTAB nTab = GetViewData()->GetTabNo();
sal_Bool bOk; bool bOk;
SCCOL i; SCCOL i;
SCROW j; SCROW j;
bOk = sal_True; bOk = true;
SCCOL nFirstCol = nStartCol; SCCOL nFirstCol = nStartCol;
SCCOL nLastCol = nEndCol; SCCOL nLastCol = nEndCol;
if (nStartCol+1 < nEndCol) { ++nFirstCol; --nLastCol; } if (nStartCol+1 < nEndCol) { ++nFirstCol; --nLastCol; }
...@@ -2850,7 +2850,7 @@ sal_uInt16 ScViewFunc::GetCreateNameFlags() ...@@ -2850,7 +2850,7 @@ sal_uInt16 ScViewFunc::GetCreateNameFlags()
nFlags |= NAME_TOP; nFlags |= NAME_TOP;
else // Bottom only if not Top else // Bottom only if not Top
{ {
bOk = sal_True; bOk = true;
for (i=nFirstCol; i<=nLastCol && bOk; i++) for (i=nFirstCol; i<=nLastCol && bOk; i++)
if (!pDoc->HasStringData( i,nEndRow,nTab )) if (!pDoc->HasStringData( i,nEndRow,nTab ))
bOk = false; bOk = false;
...@@ -2858,7 +2858,7 @@ sal_uInt16 ScViewFunc::GetCreateNameFlags() ...@@ -2858,7 +2858,7 @@ sal_uInt16 ScViewFunc::GetCreateNameFlags()
nFlags |= NAME_BOTTOM; nFlags |= NAME_BOTTOM;
} }
bOk = sal_True; bOk = true;
SCROW nFirstRow = nStartRow; SCROW nFirstRow = nStartRow;
SCROW nLastRow = nEndRow; SCROW nLastRow = nEndRow;
if (nStartRow+1 < nEndRow) { ++nFirstRow; --nLastRow; } if (nStartRow+1 < nEndRow) { ++nFirstRow; --nLastRow; }
...@@ -2869,7 +2869,7 @@ sal_uInt16 ScViewFunc::GetCreateNameFlags() ...@@ -2869,7 +2869,7 @@ sal_uInt16 ScViewFunc::GetCreateNameFlags()
nFlags |= NAME_LEFT; nFlags |= NAME_LEFT;
else // Right only if not Left else // Right only if not Left
{ {
bOk = sal_True; bOk = true;
for (j=nFirstRow; j<=nLastRow && bOk; j++) for (j=nFirstRow; j<=nLastRow && bOk; j++)
if (!pDoc->HasStringData( nEndCol,j,nTab )) if (!pDoc->HasStringData( nEndCol,j,nTab ))
bOk = false; bOk = false;
...@@ -2903,14 +2903,14 @@ void ScViewFunc::UpdateSelectionArea( const ScMarkData& rSel, ScPatternAttr* pAt ...@@ -2903,14 +2903,14 @@ void ScViewFunc::UpdateSelectionArea( const ScMarkData& rSel, ScPatternAttr* pAt
else else
rSel.GetMarkArea( aMarkRange ); rSel.GetMarkArea( aMarkRange );
sal_Bool bSetLines = false; bool bSetLines = false;
sal_Bool bSetAlign = false; bool bSetAlign = false;
if ( pAttr ) if ( pAttr )
{ {
const SfxItemSet& rNewSet = pAttr->GetItemSet(); const SfxItemSet& rNewSet = pAttr->GetItemSet();
bSetLines = rNewSet.GetItemState( ATTR_BORDER, sal_True ) == SFX_ITEM_SET || bSetLines = rNewSet.GetItemState( ATTR_BORDER, true ) == SFX_ITEM_SET ||
rNewSet.GetItemState( ATTR_SHADOW, sal_True ) == SFX_ITEM_SET; rNewSet.GetItemState( ATTR_SHADOW, true ) == SFX_ITEM_SET;
bSetAlign = rNewSet.GetItemState( ATTR_HOR_JUSTIFY, sal_True ) == SFX_ITEM_SET; bSetAlign = rNewSet.GetItemState( ATTR_HOR_JUSTIFY, true ) == SFX_ITEM_SET;
} }
sal_uInt16 nExtFlags = 0; sal_uInt16 nExtFlags = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment