diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-12-08 10:26:01 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-12-08 12:35:09 +0000 |
commit | a66731982e93cdcc5beaa5b0586a7f12a7fc0ef6 (patch) | |
tree | 19064090be4d97781c16aa6e79a4f7a09d561ae9 /sc/source/ui/undo/undotab.cxx | |
parent | 20475c78db5c62f2c8711e59753476bd9b4e2f1c (diff) |
convert SFX_HINT to scoped enum
Notes
(*) In SC, BULK_DATACHANGED was or'ed into the hint id. Replaced with a
dynamic_cast check.
(*) In SC, removed the hint id field from ScIndexHint, no point in
storing the hint id twice
(*) Fold the SfxStyleSheetHintId enum into the new SfxHintId enum, no
point in storing two different hint ids
(*) In some cases, multiple #define's used to map to the same SFX_HINT
value (notably the SFX_HINT_USER* values). I made all of those separate
values.
Change-Id: I990e2fb587335ebc51c9005588c6a44f768d9de5
Reviewed-on: https://gerrit.libreoffice.org/31751
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/undo/undotab.cxx')
-rw-r--r-- | sc/source/ui/undo/undotab.cxx | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx index 7245cc99a1f6..5ace37ef7dff 100644 --- a/sc/source/ui/undo/undotab.cxx +++ b/sc/source/ui/undo/undotab.cxx @@ -116,7 +116,7 @@ void ScUndoInsertTab::Undo() pChangeTrack->Undo( nEndChangeAction, nEndChangeAction ); // SetTabNo(...,sal_True) for all views to sync with drawing layer pages - pDocShell->Broadcast( SfxHint( SC_HINT_FORCESETTAB ) ); + pDocShell->Broadcast( SfxHint( SfxHintId::ScForceSetTab ) ); } void ScUndoInsertTab::Redo() @@ -215,7 +215,7 @@ void ScUndoInsertTables::Undo() pChangeTrack->Undo( nStartChangeAction, nEndChangeAction ); // SetTabNo(...,sal_True) for all views to sync with drawing layer pages - pDocShell->Broadcast( SfxHint( SC_HINT_FORCESETTAB ) ); + pDocShell->Broadcast( SfxHint( SfxHintId::ScForceSetTab ) ); } void ScUndoInsertTables::Redo() @@ -362,9 +362,9 @@ void ScUndoDeleteTab::Undo() pDocShell->Broadcast( ScTablesHint( SC_TAB_INSERTED, theTabs[i]) ); } SfxApplication* pSfxApp = SfxGetpApp(); // Navigator - pSfxApp->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) ); - pSfxApp->Broadcast( SfxHint( SC_HINT_DBAREAS_CHANGED ) ); - pSfxApp->Broadcast( SfxHint( SC_HINT_AREALINKS_CHANGED ) ); + pSfxApp->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) ); + pSfxApp->Broadcast( SfxHint( SfxHintId::ScDbAreasChanged ) ); + pSfxApp->Broadcast( SfxHint( SfxHintId::ScAreaLinksChanged ) ); pDocShell->PostPaint(0,0,0, MAXCOL,MAXROW,MAXTAB, PaintPartFlags::All ); // incl. extras @@ -390,7 +390,7 @@ void ScUndoDeleteTab::Redo() SetChangeTrack(); // SetTabNo(...,sal_True) for all views to sync with drawing layer pages - pDocShell->Broadcast( SfxHint( SC_HINT_FORCESETTAB ) ); + pDocShell->Broadcast( SfxHint( SfxHintId::ScForceSetTab ) ); } void ScUndoDeleteTab::Repeat(SfxRepeatTarget& rTarget) @@ -432,7 +432,7 @@ void ScUndoRenameTab::DoChange( SCTAB nTabP, const OUString& rName ) const ScDocument& rDoc = pDocShell->GetDocument(); rDoc.RenameTab( nTabP, rName ); - SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) ); // Navigator + SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) ); // Navigator pDocShell->PostPaintGridAll(); pDocShell->PostPaintExtras(); @@ -540,7 +540,7 @@ void ScUndoMoveTab::DoChange( bool bUndo ) const } } - SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) ); // Navigator + SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) ); // Navigator pDocShell->PostPaintGridAll(); pDocShell->PostPaintExtras(); @@ -601,7 +601,7 @@ void ScUndoCopyTab::DoChange() const if (pViewShell) pViewShell->SetTabNo((*mpOldTabs)[0],true); - SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) ); // Navigator + SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) ); // Navigator pDocShell->PostPaintGridAll(); pDocShell->PostPaintExtras(); @@ -820,10 +820,10 @@ void ScUndoMakeScenario::Undo() if (pViewShell) pViewShell->SetTabNo( nSrcTab, true ); - SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) ); // SetTabNo(...,sal_True) for all views to sync with drawing layer pages - pDocShell->Broadcast( SfxHint( SC_HINT_FORCESETTAB ) ); + pDocShell->Broadcast( SfxHint( SfxHintId::ScForceSetTab ) ); } void ScUndoMakeScenario::Redo() @@ -844,7 +844,7 @@ void ScUndoMakeScenario::Redo() if (pViewShell) pViewShell->SetTabNo( nDestTab, true ); - SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) ); } void ScUndoMakeScenario::Repeat(SfxRepeatTarget& rTarget) @@ -899,7 +899,7 @@ void ScUndoImportTab::DoChange() const } } - SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) ); // Navigator + SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) ); // Navigator pDocShell->PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PaintPartFlags::Grid | PaintPartFlags::Top | PaintPartFlags::Left | PaintPartFlags::Extras ); } @@ -1123,7 +1123,7 @@ void ScUndoShowHideTab::DoChange( bool bShowP ) const pViewShell->SetTabNo(nTab,true); } - SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) ); pDocShell->SetDocumentModified(); } @@ -1400,7 +1400,7 @@ void ScUndoScenarioFlags::Undo() pViewShell->UpdateInputHandler(); if ( aOldName != aNewName ) - SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) ); } void ScUndoScenarioFlags::Redo() @@ -1417,7 +1417,7 @@ void ScUndoScenarioFlags::Redo() pViewShell->UpdateInputHandler(); if ( aOldName != aNewName ) - SfxGetpApp()->Broadcast( SfxHint( SC_HINT_TABLES_CHANGED ) ); + SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) ); } void ScUndoScenarioFlags::Repeat(SfxRepeatTarget& /* rTarget */) |