summaryrefslogtreecommitdiff
path: root/sw/source/uibase/app/apphdl.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-12-19 11:01:37 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-12-20 06:08:30 +0000
commited2b8ca92ae00ab96b0ea2b1c3fc9be4622b61ff (patch)
tree5fe7754d4aa1e93c6aa186ff74e6f96aaecdcd74 /sw/source/uibase/app/apphdl.cxx
parent9eb4b14ffa57cd7bbdf0fc43096f5f1e65c8e388 (diff)
convert SFX_EVENT constants to scoped enum
SFX_EVENT_CLOSEAPP and SFX_EVENT_TOGGLEFULLSCREENMODE are never generated, so remove them and delete the code that receives them Change-Id: I2d003ba73fff0b02120ba29ff58e1d2399dedf00 Reviewed-on: https://gerrit.libreoffice.org/32168 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase/app/apphdl.cxx')
-rw-r--r--sw/source/uibase/app/apphdl.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index 3948cf591b0b..816f0f276a53 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -813,16 +813,15 @@ void SwModule::ExecOther(SfxRequest& rReq)
// Catch hint for DocInfo
void SwModule::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
{
- if( dynamic_cast<const SfxEventHint*>(&rHint) )
+ if( const SfxEventHint* pEvHint = dynamic_cast<const SfxEventHint*>( &rHint) )
{
- const SfxEventHint& rEvHint = static_cast<const SfxEventHint&>( rHint);
- SwDocShell* pDocSh = dynamic_cast<SwDocShell*>( rEvHint.GetObjShell() );
+ SwDocShell* pDocSh = dynamic_cast<SwDocShell*>( pEvHint->GetObjShell() );
if( pDocSh )
{
SwWrtShell* pWrtSh = pDocSh->GetWrtShell();
- switch( rEvHint.GetEventId() )
+ switch( pEvHint->GetEventId() )
{
- case SFX_EVENT_LOADFINISHED:
+ case SfxEventHintId::LoadFinished:
OSL_ASSERT(!pWrtSh);
// if it is a new document created from a template,
// update fixed fields
@@ -835,7 +834,7 @@ void SwModule::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
}
}
break;
- case SFX_EVENT_CREATEDOC:
+ case SfxEventHintId::CreateDoc:
// Update all FIX-Date/Time fields
if( pWrtSh )
{
@@ -859,12 +858,13 @@ void SwModule::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
}
}
break;
+ default: break;
}
}
}
- else if(dynamic_cast<const SfxItemSetHint*>(&rHint))
+ else if(const SfxItemSetHint* pSfxItemSetHint = dynamic_cast<const SfxItemSetHint*>(&rHint))
{
- if( SfxItemState::SET == static_cast<const SfxItemSetHint&>(rHint).GetItemSet().GetItemState(SID_ATTR_PATHNAME))
+ if( SfxItemState::SET == pSfxItemSetHint->GetItemSet().GetItemState(SID_ATTR_PATHNAME))
{
::GetGlossaries()->UpdateGlosPath( false );
SwGlossaryList* pList = ::GetGlossaryList();