summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-10-28 14:57:38 +0200
committerNoel Grandin <noel@peralex.com>2014-11-10 15:22:16 +0200
commitbe36b1644dcf593b0a50d5a76a503bb0e6565a84 (patch)
tree73a09f8d15a1458f8c8c0d81803efa133412d07b /sd
parent52e3a0e04f4e3acad2b9355826f1fbd16112d93d (diff)
loplugin: cstylecast
Change-Id: Ic4eca519c5ba8662b29901f196ecfd6e0aa776e2
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/docshell/docshel4.cxx28
1 files changed, 14 insertions, 14 deletions
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index 57be8225948f..6286f942c505 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -193,7 +193,7 @@ void DrawDocShell::OnDocumentPrinterChanged(Printer* pNewPrinter)
// if (mpPrinter->IsA(SfxPrinter))
{
// Since we do not have RTTI we use a hard cast (...)
- SetPrinter((SfxPrinter*) pNewPrinter);
+ SetPrinter(static_cast<SfxPrinter*>(pNewPrinter));
// container owns printer
mbOwnPrinter = false;
@@ -274,13 +274,13 @@ bool DrawDocShell::Load( SfxMedium& rMedium )
if( pSet )
{
- if( ( SfxItemState::SET == pSet->GetItemState(SID_PREVIEW ) ) && ( (SfxBoolItem&) ( pSet->Get( SID_PREVIEW ) ) ).GetValue() )
+ if( ( SfxItemState::SET == pSet->GetItemState(SID_PREVIEW ) ) && static_cast<const SfxBoolItem&>( pSet->Get( SID_PREVIEW ) ).GetValue() )
{
mpDoc->SetStarDrawPreviewMode( true );
}
if( SfxItemState::SET == pSet->GetItemState(SID_DOC_STARTPRESENTATION)&&
- ( (SfxBoolItem&) ( pSet->Get( SID_DOC_STARTPRESENTATION ) ) ).GetValue() )
+ static_cast<const SfxBoolItem&>( pSet->Get( SID_DOC_STARTPRESENTATION ) ).GetValue() )
{
bStartPresentation = true;
mpDoc->SetStartWithPresentation( true );
@@ -402,7 +402,7 @@ bool DrawDocShell::ImportFrom(SfxMedium &rMedium,
if( pSet )
{
if( SfxItemState::SET == pSet->GetItemState(SID_DOC_STARTPRESENTATION)&&
- ( (SfxBoolItem&) ( pSet->Get( SID_DOC_STARTPRESENTATION ) ) ).GetValue() )
+ static_cast<const SfxBoolItem&>( pSet->Get( SID_DOC_STARTPRESENTATION ) ).GetValue() )
{
mpDoc->SetStartWithPresentation( true );
@@ -435,13 +435,13 @@ bool DrawDocShell::ConvertFrom( SfxMedium& rMedium )
SfxItemSet* pSet = rMedium.GetItemSet();
if( pSet )
{
- if( ( SfxItemState::SET == pSet->GetItemState(SID_PREVIEW ) ) && ( (SfxBoolItem&) ( pSet->Get( SID_PREVIEW ) ) ).GetValue() )
+ if( ( SfxItemState::SET == pSet->GetItemState(SID_PREVIEW ) ) && static_cast<const SfxBoolItem&>( pSet->Get( SID_PREVIEW ) ).GetValue() )
{
mpDoc->SetStarDrawPreviewMode( true );
}
if( SfxItemState::SET == pSet->GetItemState(SID_DOC_STARTPRESENTATION)&&
- ( (SfxBoolItem&) ( pSet->Get( SID_DOC_STARTPRESENTATION ) ) ).GetValue() )
+ static_cast<const SfxBoolItem&>( pSet->Get( SID_DOC_STARTPRESENTATION ) ).GetValue() )
{
bStartPresentation = true;
mpDoc->SetStartWithPresentation( true );
@@ -586,7 +586,7 @@ bool DrawDocShell::ConvertTo( SfxMedium& rMedium )
else if( aTypeName.indexOf( "MS_PowerPoint_97" ) >= 0 )
{
pFilter = new SdPPTFilter( rMedium, *this, true );
- ((SdPPTFilter*)pFilter)->PreSaveBasic();
+ static_cast<SdPPTFilter*>(pFilter)->PreSaveBasic();
}
else if ( aTypeName.indexOf( "CGM_Computer_Graphics_Metafile" ) >= 0 )
{
@@ -739,9 +739,9 @@ bool DrawDocShell::GotoBookmark(const OUString& rBookmark)
bFound = true;
SdPage* pPage;
if (bIsMasterPage)
- pPage = (SdPage*) mpDoc->GetMasterPage(nPageNumber);
+ pPage = static_cast<SdPage*>( mpDoc->GetMasterPage(nPageNumber) );
else
- pPage = (SdPage*) mpDoc->GetPage(nPageNumber);
+ pPage = static_cast<SdPage*>( mpDoc->GetPage(nPageNumber) );
// 1.) Change the view shell to the edit view, the notes view,
// or the handout view.
@@ -842,7 +842,7 @@ bool DrawDocShell::IsMarked( SdrObject* pObject )
if (mpViewShell && mpViewShell->ISA(DrawViewShell))
{
- DrawViewShell* pDrViewSh = (DrawViewShell*) mpViewShell;
+ DrawViewShell* pDrViewSh = static_cast<DrawViewShell*>( mpViewShell );
if (pObject )
{
bisMarked = pDrViewSh->GetView()->IsObjMarked(pObject);
@@ -860,7 +860,7 @@ bool DrawDocShell::GetObjectIsmarked(const OUString& rBookmark)
if (mpViewShell && mpViewShell->ISA(DrawViewShell))
{
- DrawViewShell* pDrViewSh = (DrawViewShell*) mpViewShell;
+ DrawViewShell* pDrViewSh = static_cast<DrawViewShell*>( mpViewShell );
OUString aBookmark( rBookmark );
@@ -888,7 +888,7 @@ bool DrawDocShell::GetObjectIsmarked(const OUString& rBookmark)
/********************
* Skip to the page *
********************/
- SdPage* pPage = (SdPage*) mpDoc->GetPage(nPgNum);
+ SdPage* pPage = static_cast<SdPage*>( mpDoc->GetPage(nPgNum) );
PageKind eNewPageKind = pPage->GetPageKind();
@@ -952,7 +952,7 @@ bool DrawDocShell::GotoTreeBookmark(const OUString& rBookmark)
if (mpViewShell && mpViewShell->ISA(DrawViewShell))
{
- DrawViewShell* pDrViewSh = (DrawViewShell*) mpViewShell;
+ DrawViewShell* pDrViewSh = static_cast<DrawViewShell*>( mpViewShell );
OUString aBookmark( rBookmark );
@@ -981,7 +981,7 @@ bool DrawDocShell::GotoTreeBookmark(const OUString& rBookmark)
* Skip to the page *
********************/
bFound = true;
- SdPage* pPage = (SdPage*) mpDoc->GetPage(nPgNum);
+ SdPage* pPage = static_cast<SdPage*>( mpDoc->GetPage(nPgNum) );
PageKind eNewPageKind = pPage->GetPageKind();