summaryrefslogtreecommitdiff
path: root/sd/source/ui/docshell
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-03-15 16:40:37 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-03-16 08:25:02 +0100
commitb8512a1cc771b0bce7305ed5930524e1527b1cc1 (patch)
tree5459737688a820bd2f15c01093c61e9823441876 /sd/source/ui/docshell
parenta47baea83f761937f5b8b5ed0ee142d3e04386d4 (diff)
use more TypedWhichId in sfxsids
Change-Id: I136427319ce2f1117501517efec2f03019bbf71e Reviewed-on: https://gerrit.libreoffice.org/51339 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/ui/docshell')
-rw-r--r--sd/source/ui/docshell/docshel3.cxx11
-rw-r--r--sd/source/ui/docshell/docshel4.cxx10
2 files changed, 10 insertions, 11 deletions
diff --git a/sd/source/ui/docshell/docshel3.cxx b/sd/source/ui/docshell/docshel3.cxx
index c49841bcb969..de61d9c25eb0 100644
--- a/sd/source/ui/docshell/docshel3.cxx
+++ b/sd/source/ui/docshell/docshel3.cxx
@@ -145,9 +145,9 @@ void DrawDocShell::Execute( SfxRequest& rReq )
if (pReqArgs)
{
- const SvxSearchItem* pSearchItem = static_cast<const SvxSearchItem*>( &pReqArgs->Get(SID_SEARCH_ITEM) );
+ const SvxSearchItem & rSearchItem = pReqArgs->Get(SID_SEARCH_ITEM);
- SD_MOD()->SetSearchItem(std::unique_ptr<SvxSearchItem>(static_cast<SvxSearchItem*>(pSearchItem->Clone())));
+ SD_MOD()->SetSearchItem(std::unique_ptr<SvxSearchItem>(static_cast<SvxSearchItem*>(rSearchItem.Clone())));
}
rReq.Done();
@@ -208,11 +208,10 @@ void DrawDocShell::Execute( SfxRequest& rReq )
if( xFuSearch.is() )
{
- const SvxSearchItem* pSearchItem =
- static_cast<const SvxSearchItem*>( &pReqArgs->Get(SID_SEARCH_ITEM) );
+ const SvxSearchItem& rSearchItem = pReqArgs->Get(SID_SEARCH_ITEM);
- SD_MOD()->SetSearchItem(std::unique_ptr<SvxSearchItem>(static_cast<SvxSearchItem*>( pSearchItem->Clone() )));
- xFuSearch->SearchAndReplace(pSearchItem);
+ SD_MOD()->SetSearchItem(std::unique_ptr<SvxSearchItem>(static_cast<SvxSearchItem*>( rSearchItem.Clone() )));
+ xFuSearch->SearchAndReplace(&rSearchItem);
}
}
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index 33d351e05d15..426b09b7e2d7 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -281,13 +281,13 @@ bool DrawDocShell::Load( SfxMedium& rMedium )
if( pSet )
{
- if( ( SfxItemState::SET == pSet->GetItemState(SID_PREVIEW ) ) && static_cast<const SfxBoolItem&>( pSet->Get( SID_PREVIEW ) ).GetValue() )
+ if( ( SfxItemState::SET == pSet->GetItemState(SID_PREVIEW ) ) && pSet->Get( SID_PREVIEW ).GetValue() )
{
mpDoc->SetStarDrawPreviewMode( true );
}
if( SfxItemState::SET == pSet->GetItemState(SID_DOC_STARTPRESENTATION)&&
- static_cast<const SfxBoolItem&>( pSet->Get( SID_DOC_STARTPRESENTATION ) ).GetValue() )
+ pSet->Get( SID_DOC_STARTPRESENTATION ).GetValue() )
{
bStartPresentation = true;
mpDoc->SetStartWithPresentation( true );
@@ -420,7 +420,7 @@ bool DrawDocShell::ImportFrom(SfxMedium &rMedium,
if( pSet )
{
if( SfxItemState::SET == pSet->GetItemState(SID_DOC_STARTPRESENTATION)&&
- static_cast<const SfxBoolItem&>( pSet->Get( SID_DOC_STARTPRESENTATION ) ).GetValue() )
+ pSet->Get( SID_DOC_STARTPRESENTATION ).GetValue() )
{
mpDoc->SetStartWithPresentation( true );
@@ -451,13 +451,13 @@ bool DrawDocShell::ConvertFrom( SfxMedium& rMedium )
SfxItemSet* pSet = rMedium.GetItemSet();
if( pSet )
{
- if( ( SfxItemState::SET == pSet->GetItemState(SID_PREVIEW ) ) && static_cast<const SfxBoolItem&>( pSet->Get( SID_PREVIEW ) ).GetValue() )
+ if( ( SfxItemState::SET == pSet->GetItemState(SID_PREVIEW ) ) && pSet->Get( SID_PREVIEW ).GetValue() )
{
mpDoc->SetStarDrawPreviewMode( true );
}
if( SfxItemState::SET == pSet->GetItemState(SID_DOC_STARTPRESENTATION)&&
- static_cast<const SfxBoolItem&>( pSet->Get( SID_DOC_STARTPRESENTATION ) ).GetValue() )
+ pSet->Get( SID_DOC_STARTPRESENTATION ).GetValue() )
{
bStartPresentation = true;
mpDoc->SetStartWithPresentation( true );