summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell
diff options
context:
space:
mode:
authorJochen Nitschke <j.nitschke+logerrit@ok.de>2016-07-25 14:53:18 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-07-26 08:15:21 +0000
commit60f36bb7cd5956fa30b3f7ebe8a1489ed0f98685 (patch)
treedce874ec32705c11a470ca7ff887b6ca6686912d /sc/source/ui/docshell
parent00a58dfead6e05724b252f74e24f9f6c89a68d76 (diff)
sc: convert SC_SCENARIO_.. defines typed flags ..
ScScenarioFlags add ScScenarioFlags::NONE for 0. replace uses of '-= flag' with '&= ~flag'. Change-Id: I003c0ca1f59b060f52935fec8bb6282fd9981805 Reviewed-on: https://gerrit.libreoffice.org/27464 Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sc/source/ui/docshell')
-rw-r--r--sc/source/ui/docshell/docfunc.cxx2
-rw-r--r--sc/source/ui/docshell/docsh4.cxx2
-rw-r--r--sc/source/ui/docshell/docsh5.cxx20
3 files changed, 12 insertions, 12 deletions
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 6f923ba54515..97ab8fe7aa1d 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -3095,7 +3095,7 @@ bool ScDocFunc::DeleteTable( SCTAB nTab, bool bRecord, bool /* bApi */ )
pUndoDoc->SetScenario( nTab, true );
OUString aComment;
Color aColor;
- sal_uInt16 nScenFlags;
+ ScScenarioFlags nScenFlags;
rDoc.GetScenarioData( nTab, aComment, aColor, nScenFlags );
pUndoDoc->SetScenarioData( nTab, aComment, aColor, nScenFlags );
bool bActive = rDoc.IsActiveScenario( nTab );
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index cc1e338562ab..0b611f9316c2 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -844,7 +844,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
{
OUString aComment;
Color aColor;
- sal_uInt16 nFlags;
+ ScScenarioFlags nFlags;
aDocument.GetScenarioData( nTab, aComment, aColor, nFlags );
// Determine if the Sheet that the Scenario was created on
diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index 84760f55f6e5..a438bda934dd 100644
--- a/sc/source/ui/docshell/docsh5.cxx
+++ b/sc/source/ui/docshell/docsh5.cxx
@@ -686,13 +686,13 @@ void ScDocShell::UseScenario( SCTAB nTab, const OUString& rName, bool bRecord )
pUndoDoc->SetScenario( i, true );
OUString aComment;
Color aColor;
- sal_uInt16 nScenFlags;
+ ScScenarioFlags nScenFlags;
aDocument.GetScenarioData( i, aComment, aColor, nScenFlags );
pUndoDoc->SetScenarioData( i, aComment, aColor, nScenFlags );
bool bActive = aDocument.IsActiveScenario( i );
pUndoDoc->SetActiveScenario( i, bActive );
// Bei Zurueckkopier-Szenarios auch Inhalte
- if ( nScenFlags & SC_SCENARIO_TWOWAY )
+ if ( nScenFlags & ScScenarioFlags::TwoWay )
aDocument.CopyToDocument( 0,0,i, MAXCOL,MAXROW,i,
InsertDeleteFlags::ALL,false, pUndoDoc );
}
@@ -735,19 +735,19 @@ void ScDocShell::UseScenario( SCTAB nTab, const OUString& rName, bool bRecord )
}
void ScDocShell::ModifyScenario( SCTAB nTab, const OUString& rName, const OUString& rComment,
- const Color& rColor, sal_uInt16 nFlags )
+ const Color& rColor, ScScenarioFlags nFlags )
{
// Undo
OUString aOldName;
aDocument.GetName( nTab, aOldName );
OUString aOldComment;
Color aOldColor;
- sal_uInt16 nOldFlags;
+ ScScenarioFlags nOldFlags;
aDocument.GetScenarioData( nTab, aOldComment, aOldColor, nOldFlags );
GetUndoManager()->AddUndoAction(
- new ScUndoScenarioFlags( this, nTab,
+ new ScUndoScenarioFlags(this, nTab,
aOldName, rName, aOldComment, rComment,
- aOldColor, rColor, nOldFlags, nFlags ) );
+ aOldColor, rColor, nOldFlags, nFlags) );
// ausfuehren
ScDocShellModificator aModificator( *this );
@@ -765,7 +765,7 @@ void ScDocShell::ModifyScenario( SCTAB nTab, const OUString& rName, const OUStri
}
SCTAB ScDocShell::MakeScenario( SCTAB nTab, const OUString& rName, const OUString& rComment,
- const Color& rColor, sal_uInt16 nFlags,
+ const Color& rColor, ScScenarioFlags nFlags,
ScMarkData& rMark, bool bRecord )
{
rMark.MarkToMulti();
@@ -775,7 +775,7 @@ SCTAB ScDocShell::MakeScenario( SCTAB nTab, const OUString& rName, const OUStrin
while (aDocument.IsScenario(nNewTab))
++nNewTab;
- bool bCopyAll = ( (nFlags & SC_SCENARIO_COPYALL) != 0 );
+ bool bCopyAll = ( (nFlags & ScScenarioFlags::CopyAll) != ScScenarioFlags::NONE );
const ScMarkData* pCopyMark = nullptr;
if (!bCopyAll)
pCopyMark = &rMark;
@@ -818,7 +818,7 @@ SCTAB ScDocShell::MakeScenario( SCTAB nTab, const OUString& rName, const OUStrin
// dies ist dann das aktive Szenario
aDocument.CopyScenario( nNewTab, nTab, true ); // sal_True - nicht aus Szenario kopieren
- if (nFlags & SC_SCENARIO_SHOWFRAME)
+ if (nFlags & ScScenarioFlags::ShowFrame)
PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID ); // Rahmen painten
PostPaintExtras(); // Tabellenreiter
aModificator.SetDocumentModified();
@@ -854,7 +854,7 @@ sal_uLong ScDocShell::TransferTab( ScDocShell& rSrcDocShell, SCTAB nSrcPos,
{
OUString aComment;
Color aColor;
- sal_uInt16 nFlags;
+ ScScenarioFlags nFlags;
rSrcDoc.GetScenarioData( nSrcPos, aComment,aColor, nFlags);
aDocument.SetScenario(nDestPos,true);