diff options
author | Noel Grandin <noel@peralex.com> | 2016-09-23 15:30:33 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-09-26 08:29:38 +0200 |
commit | 606077ed58dfbc133d99a6a38a8aabf552a687bb (patch) | |
tree | 96dbb8dd1450ca40a65726e3f4f5df4f3bb7ad21 /sc/source/ui | |
parent | 5d944079fa264777293a869e38e38424edceedfa (diff) |
convert HASATTR constants to typed_flags_set
Remove unused constant RTL.
Inline PAINTEXT constant since it is only used in one place.
Change-Id: I7b2c15e7579fc5bc475d00fe714f17592bd5e2a1
Diffstat (limited to 'sc/source/ui')
-rw-r--r-- | sc/source/ui/docshell/arealink.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/docshell/dbdocfun.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/docshell/docfunc.cxx | 34 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh3.cxx | 7 | ||||
-rw-r--r-- | sc/source/ui/docshell/olinefun.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/undo/undoblk.cxx | 8 | ||||
-rw-r--r-- | sc/source/ui/undo/undoblk3.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/unoobj/cellsuno.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/unoobj/funcuno.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/vba/vbarange.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/dbfunc3.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/gridwin.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/view/hdrcont.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/view/output2.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/view/printfun.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/view/select.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/tabview2.cxx | 10 | ||||
-rw-r--r-- | sc/source/ui/view/viewfun2.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/view/viewfun3.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/view/viewfunc.cxx | 8 |
20 files changed, 58 insertions, 57 deletions
diff --git a/sc/source/ui/docshell/arealink.cxx b/sc/source/ui/docshell/arealink.cxx index 5329d7cfac52..006cac20e167 100644 --- a/sc/source/ui/docshell/arealink.cxx +++ b/sc/source/ui/docshell/arealink.cxx @@ -372,7 +372,7 @@ bool ScAreaLink::Refresh( const OUString& rNewFile, const OUString& rNewFilter, rSrcDoc.CopyToClip(aClipParam, &aClipDoc, &aSourceMark, false, false); if ( aClipDoc.HasAttrib( 0,0,nSrcTab, MAXCOL,MAXROW,nSrcTab, - HASATTR_MERGED | HASATTR_OVERLAPPED ) ) + HasAttrFlags::Merged | HasAttrFlags::Overlapped ) ) { //! ResetAttrib am Dokument !!! diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx index 413762501e57..ee3f8e6a3676 100644 --- a/sc/source/ui/docshell/dbdocfun.cxx +++ b/sc/source/ui/docshell/dbdocfun.cxx @@ -522,7 +522,7 @@ bool ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam, if ( aLocalParam.bIncludePattern && rDoc.HasAttrib( aLocalParam.nCol1, nStartRow , nTab, aLocalParam.nCol2, aLocalParam.nRow2, nTab, - HASATTR_MERGED | HASATTR_OVERLAPPED ) ) + HasAttrFlags::Merged | HasAttrFlags::Overlapped ) ) { // Merge-Attribute wuerden beim Sortieren durcheinanderkommen if (!bApi) @@ -979,7 +979,7 @@ void ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam, } if (rDoc.HasAttrib( rParam.nCol1, rParam.nRow1+1, nTab, - rParam.nCol2, rParam.nRow2, nTab, HASATTR_MERGED | HASATTR_OVERLAPPED )) + rParam.nCol2, rParam.nRow2, nTab, HasAttrFlags::Merged | HasAttrFlags::Overlapped )) { if (!bApi) rDocShell.ErrorMessage(STR_MSSG_INSERTCELLS_0); // nicht in zusammengefasste einfuegen diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index ef5430a2eaac..85714d49e82c 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -812,7 +812,7 @@ bool ScDocFunc::SetNormalString( bool& o_rbNumFmtSet, const ScAddress& rPos, con new ScUndoEnterData(&rDocShell, rPos, aOldValues, rText, nullptr)); } - if ( bEditDeleted || rDoc.HasAttrib( ScRange(rPos), HASATTR_NEEDHEIGHT ) ) + if ( bEditDeleted || rDoc.HasAttrib( ScRange(rPos), HasAttrFlags::NeedHeight ) ) AdjustRowHeight( ScRange(rPos) ); rDocShell.PostPaintCell( rPos ); @@ -831,7 +831,7 @@ bool ScDocFunc::SetValueCell( const ScAddress& rPos, double fVal, bool bInteract ScDocument& rDoc = rDocShell.GetDocument(); bool bUndo = rDoc.IsUndoEnabled(); - bool bHeight = rDoc.HasAttrib(rPos, HASATTR_NEEDHEIGHT); + bool bHeight = rDoc.HasAttrib(rPos, HasAttrFlags::NeedHeight); ScCellValue aOldVal; if (bUndo) @@ -899,7 +899,7 @@ bool ScDocFunc::SetStringCell( const ScAddress& rPos, const OUString& rStr, bool ScDocument& rDoc = rDocShell.GetDocument(); bool bUndo = rDoc.IsUndoEnabled(); - bool bHeight = rDoc.HasAttrib(rPos, HASATTR_NEEDHEIGHT); + bool bHeight = rDoc.HasAttrib(rPos, HasAttrFlags::NeedHeight); ScCellValue aOldVal; if (bUndo) @@ -936,7 +936,7 @@ bool ScDocFunc::SetEditCell( const ScAddress& rPos, const EditTextObject& rStr, ScDocument& rDoc = rDocShell.GetDocument(); bool bUndo = rDoc.IsUndoEnabled(); - bool bHeight = rDoc.HasAttrib(rPos, HASATTR_NEEDHEIGHT); + bool bHeight = rDoc.HasAttrib(rPos, HasAttrFlags::NeedHeight); ScCellValue aOldVal; if (bUndo) @@ -988,7 +988,7 @@ bool ScDocFunc::SetFormulaCell( const ScAddress& rPos, ScFormulaCell* pCell, boo ScDocument& rDoc = rDocShell.GetDocument(); bool bUndo = rDoc.IsUndoEnabled(); - bool bHeight = rDoc.HasAttrib(rPos, HASATTR_NEEDHEIGHT); + bool bHeight = rDoc.HasAttrib(rPos, HasAttrFlags::NeedHeight); ScCellValue aOldVal; if (bUndo) @@ -1722,7 +1722,7 @@ bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, ScRange aExtendMergeRange( aTargetRange ); - if( aTargetRange.aStart == aTargetRange.aEnd && rDoc.HasAttrib(aTargetRange, HASATTR_MERGED) ) + if( aTargetRange.aStart == aTargetRange.aEnd && rDoc.HasAttrib(aTargetRange, HasAttrFlags::Merged) ) { rDoc.ExtendMerge( aExtendMergeRange ); rDoc.ExtendOverlapped( aExtendMergeRange ); @@ -1800,7 +1800,7 @@ bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, for (; itr != itrEnd && nTabCount; ++itr) { i = *itr; - if( rDoc.HasAttrib( nMergeTestStartCol, nMergeTestStartRow, i, nMergeTestEndCol, nMergeTestEndRow, i, HASATTR_MERGED | HASATTR_OVERLAPPED ) ) + if( rDoc.HasAttrib( nMergeTestStartCol, nMergeTestStartRow, i, nMergeTestEndCol, nMergeTestEndRow, i, HasAttrFlags::Merged | HasAttrFlags::Overlapped ) ) { if (eCmd==INS_CELLSRIGHT) bNeedRefresh = true; @@ -1905,7 +1905,7 @@ bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, for( ::std::vector<ScRange>::const_iterator iIter( qIncreaseRange.begin()); iIter != qIncreaseRange.end(); ++iIter ) { ScRange aRange( *iIter ); - if( rDoc.HasAttrib( aRange, HASATTR_OVERLAPPED | HASATTR_MERGED ) ) + if( rDoc.HasAttrib( aRange, HasAttrFlags::Overlapped | HasAttrFlags::Merged ) ) { UnmergeCells( aRange, true ); } @@ -1991,7 +1991,7 @@ bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, while( !qIncreaseRange.empty() ) { ScRange aRange = qIncreaseRange.back(); - if( !rDoc.HasAttrib( aRange, HASATTR_OVERLAPPED | HASATTR_MERGED ) ) + if( !rDoc.HasAttrib( aRange, HasAttrFlags::Overlapped | HasAttrFlags::Merged ) ) { switch (eCmd) { @@ -2166,7 +2166,7 @@ bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, ScRange aExtendMergeRange( rRange ); - if( rRange.aStart == rRange.aEnd && rDoc.HasAttrib(rRange, HASATTR_MERGED) ) + if( rRange.aStart == rRange.aEnd && rDoc.HasAttrib(rRange, HasAttrFlags::Merged) ) { rDoc.ExtendMerge( aExtendMergeRange ); rDoc.ExtendOverlapped( aExtendMergeRange ); @@ -2233,7 +2233,7 @@ bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, for (; itr != itrEnd && *itr < nTabCount; ++itr) { SCTAB i = *itr; - if ( rDoc.HasAttrib( nUndoStartCol, nUndoStartRow, i, nMergeTestEndCol, nMergeTestEndRow, i, HASATTR_MERGED | HASATTR_OVERLAPPED )) + if ( rDoc.HasAttrib( nUndoStartCol, nUndoStartRow, i, nMergeTestEndCol, nMergeTestEndRow, i, HasAttrFlags::Merged | HasAttrFlags::Overlapped )) { SCCOL nMergeStartCol = nUndoStartCol; SCROW nMergeStartRow = nUndoStartRow; @@ -2340,7 +2340,7 @@ bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, for( ::std::vector<ScRange>::const_iterator iIter( qDecreaseRange.begin()); iIter != qDecreaseRange.end(); ++iIter ) { ScRange aRange( *iIter ); - if( rDoc.HasAttrib( aRange, HASATTR_OVERLAPPED | HASATTR_MERGED ) ) + if( rDoc.HasAttrib( aRange, HasAttrFlags::Overlapped | HasAttrFlags::Merged ) ) { UnmergeCells( aRange, true ); } @@ -2513,7 +2513,7 @@ bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, break; } - if( !rDoc.HasAttrib( aRange, HASATTR_OVERLAPPED | HASATTR_MERGED ) ) + if( !rDoc.HasAttrib( aRange, HasAttrFlags::Overlapped | HasAttrFlags::Merged ) ) { ScCellMergeOption aMergeOption(aRange); MergeCells( aMergeOption, false, true, true ); @@ -2708,7 +2708,7 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos, if (bClipOver && !bCut) if (rDoc.HasAttrib( nDestCol,nDestRow,nDestTab, nUndoEndCol,nUndoEndRow,nDestEndTab, - HASATTR_MERGED | HASATTR_OVERLAPPED )) + HasAttrFlags::Merged | HasAttrFlags::Overlapped )) { // "Zusammenfassen nicht verschachteln !" if (!bApi) rDocShell.ErrorMessage(STR_MSSG_MOVEBLOCKTO_0); @@ -2766,7 +2766,7 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos, if (bClipOver) if (rDoc.HasAttrib( nDestCol,nDestRow,nDestTab, nUndoEndCol,nUndoEndRow,nDestEndTab, - HASATTR_MERGED | HASATTR_OVERLAPPED )) + HasAttrFlags::Merged | HasAttrFlags::Overlapped )) { rDoc.CopyFromClip( rSource, aSourceMark, InsertDeleteFlags::ALL, nullptr, pClipDoc ); for (nTab=nStartTab; nTab<=nEndTab; nTab++) @@ -4707,7 +4707,7 @@ bool ScDocFunc::MergeCells( const ScCellMergeOption& rOption, bool bContents, bo } if ( rDoc.HasAttrib( nStartCol, nStartRow, *itr, nEndCol, nEndRow, *itr, - HASATTR_MERGED | HASATTR_OVERLAPPED ) ) + HasAttrFlags::Merged | HasAttrFlags::Overlapped ) ) { // "Zusammenfassen nicht verschachteln !" if (!bApi) @@ -4822,7 +4822,7 @@ bool ScDocFunc::UnmergeCells( const ScCellMergeOption& rOption, bool bRecord ) { SCTAB nTab = *itr; ScRange aRange = rOption.getSingleRange(nTab); - if ( !rDoc.HasAttrib(aRange, HASATTR_MERGED) ) + if ( !rDoc.HasAttrib(aRange, HasAttrFlags::Merged) ) continue; ScRange aExtended = aRange; diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx index e23662089d02..13fb41483d53 100644 --- a/sc/source/ui/docshell/docsh3.cxx +++ b/sc/source/ui/docshell/docsh3.cxx @@ -152,7 +152,7 @@ void ScDocShell::PostPaint( const ScRangeList& rRanges, sal_uInt16 nPart, sal_uI if ( ( nExtFlags & SC_PF_WHOLEROWS ) || aDocument.HasAttrib( nCol1,nRow1,nTab1, - MAXCOL,nRow2,nTab2, HASATTR_ROTATE | HASATTR_RIGHTORCENTER ) ) + MAXCOL,nRow2,nTab2, HasAttrFlags::Rotate | HasAttrFlags::RightOrCenter ) ) { nCol1 = 0; nCol2 = MAXCOL; @@ -198,7 +198,8 @@ void ScDocShell::PostPaintExtras() void ScDocShell::UpdatePaintExt( sal_uInt16& rExtFlags, const ScRange& rRange ) { - if ( ( rExtFlags & SC_PF_LINES ) == 0 && aDocument.HasAttrib( rRange, HASATTR_PAINTEXT ) ) + if ( ( rExtFlags & SC_PF_LINES ) == 0 && + aDocument.HasAttrib( rRange, HasAttrFlags::Lines | HasAttrFlags::Shadow | HasAttrFlags::Conditional ) ) { // If the range contains lines, shadow or conditional formats, // set SC_PF_LINES to include one extra cell in all directions. @@ -208,7 +209,7 @@ void ScDocShell::UpdatePaintExt( sal_uInt16& rExtFlags, const ScRange& rRange ) if ( ( rExtFlags & SC_PF_WHOLEROWS ) == 0 && ( rRange.aStart.Col() != 0 || rRange.aEnd.Col() != MAXCOL ) && - aDocument.HasAttrib( rRange, HASATTR_ROTATE | HASATTR_RIGHTORCENTER ) ) + aDocument.HasAttrib( rRange, HasAttrFlags::Rotate | HasAttrFlags::RightOrCenter ) ) { // If the range contains (logically) right- or center-aligned cells, // or rotated cells, set SC_PF_WHOLEROWS to paint the whole rows. diff --git a/sc/source/ui/docshell/olinefun.cxx b/sc/source/ui/docshell/olinefun.cxx index ce3410e56709..8c8643ef0b50 100644 --- a/sc/source/ui/docshell/olinefun.cxx +++ b/sc/source/ui/docshell/olinefun.cxx @@ -65,7 +65,7 @@ static void lcl_PaintWidthHeight( ScDocShell& rDocShell, SCTAB nTab, nEndRow = nEnd; } if (rDoc.HasAttrib( nStartCol,nStartRow,nTab, nEndCol,nEndRow,nTab, - HASATTR_MERGED | HASATTR_OVERLAPPED )) + HasAttrFlags::Merged | HasAttrFlags::Overlapped )) { nStartCol = 0; nStartRow = 0; diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx index c7bd62961c90..2d7c7b26423d 100644 --- a/sc/source/ui/undo/undoblk.cxx +++ b/sc/source/ui/undo/undoblk.cxx @@ -197,7 +197,7 @@ void ScUndoInsertCells::DoChange( const bool bUndo ) for( i=0; i<nCount; i++ ) { if ( rDoc.HasAttrib( aWorkRange.aStart.Col(), aWorkRange.aStart.Row(), pTabs[i], - aWorkRange.aEnd.Col(), aWorkRange.aEnd.Row(), pTabs[i], HASATTR_MERGED ) ) + aWorkRange.aEnd.Col(), aWorkRange.aEnd.Row(), pTabs[i], HasAttrFlags::Merged ) ) { SCCOL nEndCol = aWorkRange.aEnd.Col(); SCROW nEndRow = aWorkRange.aEnd.Row(); @@ -417,7 +417,7 @@ void ScUndoDeleteCells::DoChange( const bool bUndo ) for( i=0; i<nCount; i++ ) { if ( rDoc.HasAttrib( aWorkRange.aStart.Col(), aWorkRange.aStart.Row(), pTabs[i], - aWorkRange.aEnd.Col(), aWorkRange.aEnd.Row(), pTabs[i], HASATTR_MERGED | HASATTR_OVERLAPPED ) ) + aWorkRange.aEnd.Col(), aWorkRange.aEnd.Row(), pTabs[i], HasAttrFlags::Merged | HasAttrFlags::Overlapped ) ) { // #i51445# old merge flag attributes must be deleted also for single cells, // not only for whole columns/rows @@ -1235,7 +1235,7 @@ void ScUndoDragDrop::DoUndo( ScRange aRange ) rDoc.DeleteAreaTab( aRange, nDelFlags ); pRefUndoDoc->CopyToDocument(aRange, nUndoFlags, false, rDoc); - if ( rDoc.HasAttrib( aRange, HASATTR_MERGED ) ) + if ( rDoc.HasAttrib( aRange, HasAttrFlags::Merged ) ) rDoc.ExtendMerge( aRange, true ); aPaintRange.aEnd.SetCol( std::max( aPaintRange.aEnd.Col(), aRange.aEnd.Col() ) ); @@ -1691,7 +1691,7 @@ void ScUndoSelectionStyle::DoChange( const bool bUndo ) SetViewMarkData( aMarkData ); ScRange aWorkRange( aRange ); - if ( rDoc.HasAttrib( aWorkRange, HASATTR_MERGED ) ) // Merged cells? + if ( rDoc.HasAttrib( aWorkRange, HasAttrFlags::Merged ) ) // Merged cells? rDoc.ExtendMerge( aWorkRange, true ); sal_uInt16 nExtFlags = 0; diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx index 6f5260386d0b..9c0e21a39cd9 100644 --- a/sc/source/ui/undo/undoblk3.cxx +++ b/sc/source/ui/undo/undoblk3.cxx @@ -392,7 +392,7 @@ void ScUndoSelectionAttr::DoChange( const bool bUndo ) SetViewMarkData( aMarkData ); ScRange aEffRange( aRangeCover ); - if ( rDoc.HasAttrib( aEffRange, HASATTR_MERGED ) ) // merged cells? + if ( rDoc.HasAttrib( aEffRange, HasAttrFlags::Merged ) ) // merged cells? rDoc.ExtendMerge( aEffRange ); sal_uInt16 nExtFlags = 0; diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index 722de400ea90..c57892869e70 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -5379,7 +5379,7 @@ sal_Bool SAL_CALL ScCellRangeObj::getIsMerged() throw(uno::RuntimeException, std { SolarMutexGuard aGuard; ScDocShell* pDocSh = GetDocShell(); - return pDocSh && pDocSh->GetDocument().HasAttrib( aRange, HASATTR_MERGED ); + return pDocSh && pDocSh->GetDocument().HasAttrib( aRange, HasAttrFlags::Merged ); } // XCellSeries diff --git a/sc/source/ui/unoobj/funcuno.cxx b/sc/source/ui/unoobj/funcuno.cxx index afbe7098dfcb..31f2e1eacb7b 100644 --- a/sc/source/ui/unoobj/funcuno.cxx +++ b/sc/source/ui/unoobj/funcuno.cxx @@ -157,7 +157,7 @@ static bool lcl_CopyData( ScDocument* pSrcDoc, const ScRange& rSrcRange, pSrcDoc->CopyToClip(aClipParam, pClipDoc.get(), &aSourceMark, false, false); if ( pClipDoc->HasAttrib( 0,0,nSrcTab, MAXCOL,MAXROW,nSrcTab, - HASATTR_MERGED | HASATTR_OVERLAPPED ) ) + HasAttrFlags::Merged | HasAttrFlags::Overlapped ) ) { ScPatternAttr aPattern( pSrcDoc->GetPool() ); aPattern.GetItemSet().Put( ScMergeAttr() ); // Defaults diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index 72bc3ffdab5e..70f0f9b4d7dd 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -1348,7 +1348,7 @@ util::TriState lclGetMergedState( const uno::Reference< table::XCellRange >& rxC of a merged range is part of this range are not covered. */ ScRange aScRange; ScUnoConversion::FillScRange( aScRange, aRangeAddr ); - bool bHasMerged = getDocumentFromRange( rxCellRange ).HasAttrib( aScRange, HASATTR_MERGED | HASATTR_OVERLAPPED ); + bool bHasMerged = getDocumentFromRange( rxCellRange ).HasAttrib( aScRange, HasAttrFlags::Merged | HasAttrFlags::Overlapped ); return bHasMerged ? util::TriState_INDETERMINATE : util::TriState_NO; } diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx index c1042038ad32..bb8dd9da835c 100644 --- a/sc/source/ui/view/dbfunc3.cxx +++ b/sc/source/ui/view/dbfunc3.cxx @@ -385,7 +385,7 @@ void ScDBFunc::DoSubTotals( const ScSubTotalParam& rParam, bool bRecord, } if (rDoc.HasAttrib( rParam.nCol1, rParam.nRow1+1, nTab, - rParam.nCol2, rParam.nRow2, nTab, HASATTR_MERGED | HASATTR_OVERLAPPED )) + rParam.nCol2, rParam.nRow2, nTab, HasAttrFlags::Merged | HasAttrFlags::Overlapped )) { ErrorMessage(STR_MSSG_INSERTCELLS_0); // do not insert into merged return; diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index b36b3af592c3..2f4776b9a1fa 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -1567,7 +1567,7 @@ bool ScGridWindow::IsCellCoveredByText(SCsCOL nPosX, SCsROW nPosY, SCTAB nTab, S // to the left, there is no cell that would contain (potentially // overrunning) text - if (nNonEmptyX < 0 || pDoc->HasAttrib(nNonEmptyX, nPosY, nTab, nPosX, nPosY, nTab, HASATTR_MERGED | HASATTR_OVERLAPPED)) + if (nNonEmptyX < 0 || pDoc->HasAttrib(nNonEmptyX, nPosY, nTab, nPosX, nPosY, nTab, HasAttrFlags::Merged | HasAttrFlags::Overlapped)) return false; double nPPTX = pViewData->GetPPTX(); @@ -2257,7 +2257,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt ) bool bEditAllowed = true; if ( pProtect && pProtect->isProtected() ) { - bool bCellProtected = pDoc->HasAttrib(nPosX, nPosY, nTab, nPosX, nPosY, nTab, HASATTR_PROTECTED); + bool bCellProtected = pDoc->HasAttrib(nPosX, nPosY, nTab, nPosX, nPosY, nTab, HasAttrFlags::Protected); bool bSkipProtected = !pProtect->isOptionEnabled(ScTableProtection::SELECT_LOCKED_CELLS); bool bSkipUnprotected = !pProtect->isOptionEnabled(ScTableProtection::SELECT_UNLOCKED_CELLS); @@ -2963,7 +2963,7 @@ void ScGridWindow::Command( const CommandEvent& rCEvt ) if ( pProtect && pProtect->isProtected() ) { // This sheet is protected. Check if a context menu is allowed on this cell. - bool bCellProtected = pDoc->HasAttrib(nCellX, nCellY, nTab, nCellX, nCellY, nTab, HASATTR_PROTECTED); + bool bCellProtected = pDoc->HasAttrib(nCellX, nCellY, nTab, nCellX, nCellY, nTab, HasAttrFlags::Protected); bool bSelProtected = pProtect->isOptionEnabled(ScTableProtection::SELECT_LOCKED_CELLS); bool bSelUnprotected = pProtect->isOptionEnabled(ScTableProtection::SELECT_UNLOCKED_CELLS); diff --git a/sc/source/ui/view/hdrcont.cxx b/sc/source/ui/view/hdrcont.cxx index 2e60997c74ae..2fd99256b093 100644 --- a/sc/source/ui/view/hdrcont.cxx +++ b/sc/source/ui/view/hdrcont.cxx @@ -626,13 +626,13 @@ bool ScHeaderControl::IsSelectionAllowed(SCCOLROW nPos) const { // row header SCROW nRPos = static_cast<SCROW>(nPos); - bCellsProtected = pDoc->HasAttrib(0, nRPos, nTab, MAXCOL, nRPos, nTab, HASATTR_PROTECTED); + bCellsProtected = pDoc->HasAttrib(0, nRPos, nTab, MAXCOL, nRPos, nTab, HasAttrFlags::Protected); } else { // column header SCCOL nCPos = static_cast<SCCOL>(nPos); - bCellsProtected = pDoc->HasAttrib(nCPos, 0, nTab, nCPos, MAXROW, nTab, HASATTR_PROTECTED); + bCellsProtected = pDoc->HasAttrib(nCPos, 0, nTab, nCPos, MAXROW, nTab, HasAttrFlags::Protected); } bool bSelProtected = pProtect->isOptionEnabled(ScTableProtection::SELECT_LOCKED_CELLS); diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx index c981c631c41a..069f7e439bba 100644 --- a/sc/source/ui/view/output2.cxx +++ b/sc/source/ui/view/output2.cxx @@ -1537,7 +1537,7 @@ Rectangle ScOutputData::LayoutStrings(bool bPixelToLogic, bool bPaint, const ScA if ( nTempX < nX1 && !IsEmptyCellText( pThisRowInfo, nTempX, nY ) && - !mpDoc->HasAttrib( nTempX,nY,nTab, nX1,nY,nTab, HASATTR_MERGED | HASATTR_OVERLAPPED ) ) + !mpDoc->HasAttrib( nTempX,nY,nTab, nX1,nY,nTab, HasAttrFlags::Merged | HasAttrFlags::Overlapped ) ) { nCellX = nTempX; bDoCell = true; @@ -1556,7 +1556,7 @@ Rectangle ScOutputData::LayoutStrings(bool bPixelToLogic, bool bPaint, const ScA if ( nTempX > nX && !IsEmptyCellText( pThisRowInfo, nTempX, nY ) && - !mpDoc->HasAttrib( nTempX,nY,nTab, nX,nY,nTab, HASATTR_MERGED | HASATTR_OVERLAPPED ) ) + !mpDoc->HasAttrib( nTempX,nY,nTab, nX,nY,nTab, HasAttrFlags::Merged | HasAttrFlags::Overlapped ) ) { nCellX = nTempX; bDoCell = true; @@ -4530,7 +4530,7 @@ void ScOutputData::DrawEdit(bool bPixelToLogic) if ( nTempX > nX && !IsEmptyCellText( pThisRowInfo, nTempX, nY ) && - !mpDoc->HasAttrib( nTempX,nY,nTab, nX,nY,nTab, HASATTR_MERGED | HASATTR_OVERLAPPED ) ) + !mpDoc->HasAttrib( nTempX,nY,nTab, nX,nY,nTab, HasAttrFlags::Merged | HasAttrFlags::Overlapped ) ) { nCellX = nTempX; bDoCell = true; diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx index cd8e05ab16ec..a23fba02d732 100644 --- a/sc/source/ui/view/printfun.cxx +++ b/sc/source/ui/view/printfun.cxx @@ -721,10 +721,10 @@ bool ScPrintFunc::AdjustPrintArea( bool bNew ) } if ( nEndCol < MAXCOL && pDoc->HasAttrib( - nEndCol,nStartRow,nPrintTab, nEndCol,nEndRow,nPrintTab, HASATTR_SHADOW_RIGHT ) ) + nEndCol,nStartRow,nPrintTab, nEndCol,nEndRow,nPrintTab, HasAttrFlags::ShadowRight ) ) ++nEndCol; if ( nEndRow < MAXROW && pDoc->HasAttrib( - nStartCol,nEndRow,nPrintTab, nEndCol,nEndRow,nPrintTab, HASATTR_SHADOW_DOWN ) ) + nStartCol,nEndRow,nPrintTab, nEndCol,nEndRow,nPrintTab, HasAttrFlags::ShadowDown ) ) ++nEndRow; if (!bChangeCol) nEndCol = nOldEndCol; diff --git a/sc/source/ui/view/select.cxx b/sc/source/ui/view/select.cxx index e81a27545051..8f1f92d5fdb1 100644 --- a/sc/source/ui/view/select.cxx +++ b/sc/source/ui/view/select.cxx @@ -427,7 +427,7 @@ bool ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, bool bScrol if ( bSkipProtected && bSkipUnprotected ) return false; - bool bCellProtected = pDoc->HasAttrib(nPosX, nPosY, nTab, nPosX, nPosY, nTab, HASATTR_PROTECTED); + bool bCellProtected = pDoc->HasAttrib(nPosX, nPosY, nTab, nPosX, nPosY, nTab, HasAttrFlags::Protected); if ( (bCellProtected && bSkipProtected) || (!bCellProtected && bSkipUnprotected) ) // Don't select this cell! return false; diff --git a/sc/source/ui/view/tabview2.cxx b/sc/source/ui/view/tabview2.cxx index 42b843cdd59a..275002ca920e 100644 --- a/sc/source/ui/view/tabview2.cxx +++ b/sc/source/ui/view/tabview2.cxx @@ -51,7 +51,7 @@ namespace { bool isCellQualified(ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab, bool bSelectLocked, bool bSelectUnlocked) { bool bCellProtected = pDoc->HasAttrib( - nCol, nRow, nTab, nCol, nRow, nTab, HASATTR_PROTECTED); + nCol, nRow, nTab, nCol, nRow, nTab, HasAttrFlags::Protected); if (bCellProtected && !bSelectLocked) return false; @@ -744,9 +744,9 @@ void ScTabView::SkipCursorHorizontal(SCsCOL& rCurX, SCsROW& rCurY, SCsCOL nOldX, { bSkipCell = pDoc->ColHidden(rCurX, nTab) || pDoc->IsHorOverlapped(rCurX, rCurY, nTab); if (bSkipProtected && !bSkipCell) - bSkipCell = pDoc->HasAttrib(rCurX, rCurY, nTab, rCurX, rCurY, nTab, HASATTR_PROTECTED); + bSkipCell = pDoc->HasAttrib(rCurX, rCurY, nTab, rCurX, rCurY, nTab, HasAttrFlags::Protected); if (bSkipUnprotected && !bSkipCell) - bSkipCell = !pDoc->HasAttrib(rCurX, rCurY, nTab, rCurX, rCurY, nTab, HASATTR_PROTECTED); + bSkipCell = !pDoc->HasAttrib(rCurX, rCurY, nTab, rCurX, rCurY, nTab, HasAttrFlags::Protected); if (bSkipCell) { @@ -804,9 +804,9 @@ void ScTabView::SkipCursorVertical(SCsCOL& rCurX, SCsROW& rCurY, SCsROW nOldY, S SCROW nLastRow = -1; bSkipCell = pDoc->RowHidden(rCurY, nTab, nullptr, &nLastRow) || pDoc->IsVerOverlapped( rCurX, rCurY, nTab ); if (bSkipProtected && !bSkipCell) - bSkipCell = pDoc->HasAttrib(rCurX, rCurY, nTab, rCurX, rCurY, nTab, HASATTR_PROTECTED); + bSkipCell = pDoc->HasAttrib(rCurX, rCurY, nTab, rCurX, rCurY, nTab, HasAttrFlags::Protected); if (bSkipUnprotected && !bSkipCell) - bSkipCell = !pDoc->HasAttrib(rCurX, rCurY, nTab, rCurX, rCurY, nTab, HASATTR_PROTECTED); + bSkipCell = !pDoc->HasAttrib(rCurX, rCurY, nTab, rCurX, rCurY, nTab, HasAttrFlags::Protected); if (bSkipCell) { diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index 234299997bcf..630dbadef968 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -1055,7 +1055,7 @@ bool ScViewFunc::MergeCells( bool bApi, bool& rDoContents, bool bCenter ) } if ( rDoc.HasAttrib( nStartCol, nStartRow, nStartTab, nEndCol, nEndRow, nEndTab, - HASATTR_MERGED | HASATTR_OVERLAPPED ) ) + HasAttrFlags::Merged | HasAttrFlags::Overlapped ) ) { // "Don't nest merging !" ErrorMessage(STR_MSSG_MERGECELLS_0); return false; @@ -1138,7 +1138,7 @@ bool ScViewFunc::TestRemoveMerge() if (GetViewData().GetSimpleArea( aRange ) == SC_MARK_SIMPLE) { ScDocument* pDoc = GetViewData().GetDocument(); - if ( pDoc->HasAttrib( aRange, HASATTR_MERGED ) ) + if ( pDoc->HasAttrib( aRange, HasAttrFlags::Merged ) ) bMerged = true; } return bMerged; diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx index 88d1f14e071b..6ef87ad6ee9a 100644 --- a/sc/source/ui/view/viewfun3.cxx +++ b/sc/source/ui/view/viewfun3.cxx @@ -802,7 +802,7 @@ bool ScViewFunc::PasteOnDrawObjectLinked( } static bool lcl_SelHasAttrib( ScDocument* pDoc, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, - const ScMarkData& rTabSelection, sal_uInt16 nMask ) + const ScMarkData& rTabSelection, HasAttrFlags nMask ) { ScMarkData::const_iterator itr = rTabSelection.begin(), itrEnd = rTabSelection.end(); for (; itr != itrEnd; ++itr) @@ -1185,7 +1185,7 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc, } if (bClipOver) - if (lcl_SelHasAttrib( pDoc, nStartCol,nStartRow, nUndoEndCol,nUndoEndRow, aFilteredMark, HASATTR_OVERLAPPED )) + if (lcl_SelHasAttrib( pDoc, nStartCol,nStartRow, nUndoEndCol,nUndoEndRow, aFilteredMark, HasAttrFlags::Overlapped )) { // "Cell merge not possible if cells already merged" ScDocAttrIterator aIter( pDoc, nStartTab, nStartCol, nStartRow, nUndoEndCol, nUndoEndRow ); const ScPatternAttr* pPattern = nullptr; diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx index e43ef8aa896f..5b5c3ca5b49b 100644 --- a/sc/source/ui/view/viewfunc.cxx +++ b/sc/source/ui/view/viewfunc.cxx @@ -1773,7 +1773,7 @@ void ScViewFunc::DeleteContents( InsertDeleteFlags nFlags ) aMarkRange.aStart.SetRow(GetViewData().GetCurY()); aMarkRange.aStart.SetTab(GetViewData().GetTabNo()); aMarkRange.aEnd = aMarkRange.aStart; - if ( pDoc->HasAttrib( aMarkRange, HASATTR_MERGED ) ) + if ( pDoc->HasAttrib( aMarkRange, HasAttrFlags::Merged ) ) { aFuncMark.SetMarkArea( aMarkRange ); } @@ -2061,7 +2061,7 @@ void ScViewFunc::SetWidthOrHeight( { if (rDoc.HasAttrib( static_cast<SCCOL>(nStart),0,nTab, static_cast<SCCOL>(nEnd),MAXROW,nTab, - HASATTR_MERGED | HASATTR_OVERLAPPED )) + HasAttrFlags::Merged | HasAttrFlags::Overlapped )) nStart = 0; if (nStart > 0) // go upwards because of Lines and cursor --nStart; @@ -2070,7 +2070,7 @@ void ScViewFunc::SetWidthOrHeight( } else { - if (rDoc.HasAttrib( 0,nStart,nTab, MAXCOL,nEnd,nTab, HASATTR_MERGED | HASATTR_OVERLAPPED )) + if (rDoc.HasAttrib( 0,nStart,nTab, MAXCOL,nEnd,nTab, HasAttrFlags::Merged | HasAttrFlags::Overlapped )) nStart = 0; if (nStart != 0) --nStart; @@ -2265,7 +2265,7 @@ void ScViewFunc::ModifyCellSize( ScDirection eDir, bool bOptimal ) if ( bAnyEdit ) { UpdateEditView(); - if ( rDoc.HasAttrib( nCol, nRow, nTab, nCol, nRow, nTab, HASATTR_NEEDHEIGHT ) ) + if ( rDoc.HasAttrib( nCol, nRow, nTab, nCol, nRow, nTab, HasAttrFlags::NeedHeight ) ) { ScInputHandler* pHdl = pScMod->GetInputHdl( GetViewData().GetViewShell() ); if (pHdl) |