summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-11-11 07:52:45 +0200
committerNoel Grandin <noel@peralex.com>2014-11-12 09:33:45 +0200
commit750cb51aaa02092f076c6a60732ec0f7374f2d63 (patch)
tree0f87b14d06422890866f6ae34b66994f1f32fc53 /sd
parentbf9435bce063da95deb8a52371bce04e7435c966 (diff)
loplugin: cstylecast
Change-Id: Ieffa7ae199b42545d307fba661ce205573cf4b41
Diffstat (limited to 'sd')
-rw-r--r--sd/source/core/PageListWatcher.cxx4
-rw-r--r--sd/source/core/drawdoc.cxx36
-rw-r--r--sd/source/core/drawdoc2.cxx58
-rw-r--r--sd/source/core/drawdoc3.cxx64
-rw-r--r--sd/source/core/drawdoc4.cxx26
-rw-r--r--sd/source/core/pglink.cxx2
-rw-r--r--sd/source/core/sdattr.cxx2
-rw-r--r--sd/source/core/sdpage.cxx94
-rw-r--r--sd/source/core/sdpage2.cxx10
-rw-r--r--sd/source/core/stlpool.cxx20
-rw-r--r--sd/source/core/stlsheet.cxx22
-rw-r--r--sd/source/core/undo/undoobjects.cxx2
-rw-r--r--sd/source/filter/html/htmlex.cxx44
-rw-r--r--sd/source/filter/html/sdhtmlfilter.cxx2
-rw-r--r--sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx4
15 files changed, 195 insertions, 195 deletions
diff --git a/sd/source/core/PageListWatcher.cxx b/sd/source/core/PageListWatcher.cxx
index 77b7da9448c1..f86b586248d9 100644
--- a/sd/source/core/PageListWatcher.cxx
+++ b/sd/source/core/PageListWatcher.cxx
@@ -182,7 +182,7 @@ sal_uInt32 ImpDrawPageListWatcher::ImpGetPageCount() const
SdPage* ImpDrawPageListWatcher::ImpGetPage(sal_uInt32 nIndex) const
{
- return (SdPage*)mrModel.GetPage((sal_uInt16)nIndex);
+ return const_cast<SdPage*>(static_cast<const SdPage*>(mrModel.GetPage((sal_uInt16)nIndex)));
}
ImpDrawPageListWatcher::ImpDrawPageListWatcher(const SdrModel& rModel)
@@ -201,7 +201,7 @@ sal_uInt32 ImpMasterPageListWatcher::ImpGetPageCount() const
SdPage* ImpMasterPageListWatcher::ImpGetPage(sal_uInt32 nIndex) const
{
- return (SdPage*)mrModel.GetMasterPage((sal_uInt16)nIndex);
+ return const_cast<SdPage*>(static_cast<const SdPage*>(mrModel.GetMasterPage((sal_uInt16)nIndex)));
}
ImpMasterPageListWatcher::ImpMasterPageListWatcher(const SdrModel& rModel)
diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx
index 772364fdb345..8b47fe751ac1 100644
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -211,7 +211,7 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh)
// The link to the StyleRequest handler of the document is set later, in
// NewOrLoadCompleted, because only then do all the templates exist.
SdrOutliner& rOutliner = GetDrawOutliner();
- rOutliner.SetStyleSheetPool((SfxStyleSheetPool*)GetStyleSheetPool());
+ rOutliner.SetStyleSheetPool(static_cast<SfxStyleSheetPool*>(GetStyleSheetPool()));
SetCalcFieldValueHdl( &rOutliner );
// set linguistic options
@@ -303,7 +303,7 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh)
// The link to the StyleRequest handler of the document is set later, in
// NewOrLoadCompleted, because only then do all the templates exist.
SfxItemSet aSet2( pHitTestOutliner->GetEmptyItemSet() );
- pHitTestOutliner->SetStyleSheetPool( (SfxStyleSheetPool*)GetStyleSheetPool() );
+ pHitTestOutliner->SetStyleSheetPool( static_cast<SfxStyleSheetPool*>(GetStyleSheetPool()) );
SetCalcFieldValueHdl( pHitTestOutliner );
@@ -461,8 +461,8 @@ SdDrawDocument* SdDrawDocument::AllocSdDrawDocument() const
// Only necessary for clipboard -
// for drag & drop this is handled by DragServer
- SdStyleSheetPool* pOldStylePool = (SdStyleSheetPool*) GetStyleSheetPool();
- SdStyleSheetPool* pNewStylePool = (SdStyleSheetPool*) pNewModel->GetStyleSheetPool();
+ SdStyleSheetPool* pOldStylePool = static_cast<SdStyleSheetPool*>( GetStyleSheetPool() );
+ SdStyleSheetPool* pNewStylePool = static_cast<SdStyleSheetPool*>( pNewModel->GetStyleSheetPool() );
pNewStylePool->CopyGraphicSheets(*pOldStylePool);
pNewStylePool->CopyCellSheets(*pOldStylePool);
@@ -564,11 +564,11 @@ void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode)
for ( sal_uInt16 i = 0; i < GetPageCount(); i++ )
{
// Check for correct layout names
- SdPage* pPage = (SdPage*) GetPage( i );
+ SdPage* pPage = static_cast<SdPage*>( GetPage( i ) );
if(pPage->TRG_HasMasterPage())
{
- SdPage& rMaster = (SdPage&)pPage->TRG_GetMasterPage();
+ SdPage& rMaster = static_cast<SdPage&>(pPage->TRG_GetMasterPage() );
if(rMaster.GetLayoutName() != pPage->GetLayoutName())
{
@@ -580,7 +580,7 @@ void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode)
for ( sal_uInt16 nPage = 0; nPage < GetMasterPageCount(); nPage++)
{
// LayoutName and PageName must be the same
- SdPage* pPage = (SdPage*) GetMasterPage( nPage );
+ SdPage* pPage = static_cast<SdPage*>( GetMasterPage( nPage ) );
OUString aName( pPage->GetLayoutName() );
aName = aName.copy( 0, aName.indexOf( SD_LT_SEPARATOR ) );
@@ -610,7 +610,7 @@ void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode)
// global outliner, as it is not document specific like StyleSheetPool and
// StyleRequestHandler are.
::Outliner& rDrawOutliner = GetDrawOutliner();
- rDrawOutliner.SetStyleSheetPool((SfxStyleSheetPool*)GetStyleSheetPool());
+ rDrawOutliner.SetStyleSheetPool(static_cast<SfxStyleSheetPool*>(GetStyleSheetPool()));
sal_uLong nCntrl = rDrawOutliner.GetControlWord();
if (mbOnlineSpell)
nCntrl |= EE_CNTRL_ONLINESPELLING;
@@ -621,21 +621,21 @@ void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode)
// Initialize HitTestOutliner and DocumentOutliner, but don't initialize the
// global outliner, as it is not document specific like StyleSheetPool and
// StyleRequestHandler are.
- pHitTestOutliner->SetStyleSheetPool((SfxStyleSheetPool*)GetStyleSheetPool());
+ pHitTestOutliner->SetStyleSheetPool(static_cast<SfxStyleSheetPool*>(GetStyleSheetPool()));
if(mpOutliner)
{
- mpOutliner->SetStyleSheetPool((SfxStyleSheetPool*)GetStyleSheetPool());
+ mpOutliner->SetStyleSheetPool(static_cast<SfxStyleSheetPool*>(GetStyleSheetPool()));
}
if(mpInternalOutliner)
{
- mpInternalOutliner->SetStyleSheetPool((SfxStyleSheetPool*)GetStyleSheetPool());
+ mpInternalOutliner->SetStyleSheetPool(static_cast<SfxStyleSheetPool*>(GetStyleSheetPool()));
}
if ( eMode == DOC_LOADED )
{
// Make presentation objects listeners of the appropriate styles
- SdStyleSheetPool* pSPool = (SdStyleSheetPool*) GetStyleSheetPool();
+ SdStyleSheetPool* pSPool = static_cast<SdStyleSheetPool*>( GetStyleSheetPool() );
sal_uInt16 nPage, nPageCount;
// create missing layout style sheets for broken documents
@@ -650,14 +650,14 @@ void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode)
// Default and notes pages:
for (nPage = 0; nPage < GetPageCount(); nPage++)
{
- SdPage* pPage = (SdPage*)GetPage(nPage);
+ SdPage* pPage = static_cast<SdPage*>(GetPage(nPage));
NewOrLoadCompleted( pPage, pSPool );
}
// Master pages:
for (nPage = 0; nPage < GetMasterPageCount(); nPage++)
{
- SdPage* pPage = (SdPage*)GetMasterPage(nPage);
+ SdPage* pPage = static_cast<SdPage*>(GetMasterPage(nPage));
NewOrLoadCompleted( pPage, pSPool );
}
@@ -713,7 +713,7 @@ void SdDrawDocument::NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool
std::vector<SfxStyleSheetBase*> aOutlineList;
pSPool->CreateOutlineSheetList(aName,aOutlineList);
- SfxStyleSheet* pTitleSheet = (SfxStyleSheet*)pSPool->GetTitleSheet(aName);
+ SfxStyleSheet* pTitleSheet = static_cast<SfxStyleSheet*>(pSPool->GetTitleSheet(aName));
SdrObject* pObj = 0;
rPresentationShapes.seekShape(0);
@@ -765,7 +765,7 @@ void SdDrawDocument::NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool
if (!aString.isEmpty())
{
sd::Outliner* pInternalOutl = GetInternalOutliner(true);
- pPage->SetObjText( (SdrTextObj*) pObj, pInternalOutl, ePresObjKind, aString );
+ pPage->SetObjText( static_cast<SdrTextObj*>(pObj), pInternalOutl, ePresObjKind, aString );
pObj->NbcSetStyleSheet( pPage->GetStyleSheetForPresObj( ePresObjKind ), true );
pInternalOutl->Clear();
}
@@ -787,7 +787,7 @@ void SdDrawDocument::NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool
mpOutliner->SetRefDevice( SD_MOD()->GetRefDevice( *mpDocSh ) );
mpOutliner->SetDefTab( nDefaultTabulator );
- mpOutliner->SetStyleSheetPool((SfxStyleSheetPool*)GetStyleSheetPool());
+ mpOutliner->SetStyleSheetPool(static_cast<SfxStyleSheetPool*>(GetStyleSheetPool()));
}
return(mpOutliner);
@@ -811,7 +811,7 @@ void SdDrawDocument::NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool
mpInternalOutliner->SetRefDevice( SD_MOD()->GetRefDevice( *mpDocSh ) );
mpInternalOutliner->SetDefTab( nDefaultTabulator );
- mpInternalOutliner->SetStyleSheetPool((SfxStyleSheetPool*)GetStyleSheetPool());
+ mpInternalOutliner->SetStyleSheetPool(static_cast<SfxStyleSheetPool*>(GetStyleSheetPool()));
}
DBG_ASSERT( !mpInternalOutliner || ( ! mpInternalOutliner->GetUpdateMode() ) , "InternalOutliner: UpdateMode = sal_True !" );
diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx
index d81be4c9d650..7d56290d9ba0 100644
--- a/sd/source/core/drawdoc2.cxx
+++ b/sd/source/core/drawdoc2.cxx
@@ -80,7 +80,7 @@ SdrObject* SdDrawDocument::GetObj(const OUString& rObjName) const
{
SdrObject* pObj = NULL;
SdrObject* pObjFound = NULL;
- SdPage* pPage = NULL;
+ const SdPage* pPage = NULL;
// First search in all pages
sal_uInt16 nPage = 0;
@@ -88,7 +88,7 @@ SdrObject* SdDrawDocument::GetObj(const OUString& rObjName) const
while (nPage < nMaxPages && !pObjFound)
{
- pPage = (SdPage*) GetPage(nPage);
+ pPage = static_cast<const SdPage*>( GetPage(nPage) );
SdrObjListIter aIter(*pPage, IM_DEEPWITHGROUPS);
while (aIter.IsMore() && !pObjFound)
@@ -113,7 +113,7 @@ SdrObject* SdDrawDocument::GetObj(const OUString& rObjName) const
while (nPage < nMaxMasterPages && !pObjFound)
{
- pPage = (SdPage*) GetMasterPage(nPage);
+ pPage = static_cast<const SdPage*>( GetMasterPage(nPage) );
SdrObjListIter aIter(*pPage, IM_DEEPWITHGROUPS);
while (aIter.IsMore() && !pObjFound)
@@ -217,7 +217,7 @@ void SdDrawDocument::UpdatePageObjectsInNotes(sal_uInt16 nStartPos)
for (sal_uInt16 nPage = nStartPos; nPage < nPageCount; nPage++)
{
- pPage = (SdPage*)GetPage(nPage);
+ pPage = static_cast<SdPage*>( GetPage(nPage) );
// If this is a notes page, find its page object and correct the page
// number
@@ -237,7 +237,7 @@ void SdDrawDocument::UpdatePageObjectsInNotes(sal_uInt16 nStartPos)
DBG_ASSERTWARNING(nPage > 1, "Page object must not be a handout.");
if (nStartPos > 0 && nPage > 1)
- ((SdrPageObj*)pObj)->SetReferencedPage(GetPage(nPage - 1));
+ static_cast<SdrPageObj*>(pObj)->SetReferencedPage(GetPage(nPage - 1));
}
}
}
@@ -368,7 +368,7 @@ void SdDrawDocument::InsertPage(SdrPage* pPage, sal_uInt16 nPos)
FmFormModel::InsertPage(pPage, nPos);
- ((SdPage*)pPage)->ConnectLink();
+ static_cast<SdPage*>(pPage)->ConnectLink();
UpdatePageObjectsInNotes(nPos);
@@ -392,12 +392,12 @@ SdrPage* SdDrawDocument::RemovePage(sal_uInt16 nPgNum)
bool bLast = ((nPgNum+1)/2 == (GetPageCount()+1)/2);
- ((SdPage*)pPage)->DisconnectLink();
+ static_cast<SdPage*>(pPage)->DisconnectLink();
ReplacePageInCustomShows( dynamic_cast< SdPage* >( pPage ), 0 );
UpdatePageObjectsInNotes(nPgNum);
if (!bLast)
- UpdatePageRelativeURLs((SdPage*)pPage, nPgNum, -1);
+ UpdatePageRelativeURLs(static_cast<SdPage*>(pPage), nPgNum, -1);
return pPage;
}
@@ -410,7 +410,7 @@ void SdDrawDocument::InsertMasterPage(SdrPage* pPage, sal_uInt16 nPos )
if( pPage->IsMasterPage() && (static_cast<SdPage*>(pPage)->GetPageKind() == PK_STANDARD) )
{
// new master page created, add its style family
- SdStyleSheetPool* pStylePool = (SdStyleSheetPool*) GetStyleSheetPool();
+ SdStyleSheetPool* pStylePool = static_cast<SdStyleSheetPool*>( GetStyleSheetPool() );
if( pStylePool )
pStylePool->AddStyleFamily( static_cast<SdPage*>(pPage) );
}
@@ -422,7 +422,7 @@ SdrPage* SdDrawDocument::RemoveMasterPage(sal_uInt16 nPgNum)
if( pPage && pPage->IsMasterPage() && (pPage->GetPageKind() == PK_STANDARD) )
{
// master page removed, remove its style family
- SdStyleSheetPool* pStylePool = (SdStyleSheetPool*) GetStyleSheetPool();
+ SdStyleSheetPool* pStylePool = static_cast<SdStyleSheetPool*>( GetStyleSheetPool() );
if( pStylePool )
pStylePool->RemoveStyleFamily( pPage );
}
@@ -444,7 +444,7 @@ void SdDrawDocument::SetSelected(SdPage* pPage, bool bSelect)
if(nDestPageNum < GetPageCount())
{
- pNotesPage = (SdPage*)GetPage(nDestPageNum);
+ pNotesPage = static_cast<SdPage*>(GetPage(nDestPageNum));
}
if (pNotesPage && pNotesPage->GetPageKind() == PK_NOTES)
@@ -455,7 +455,7 @@ void SdDrawDocument::SetSelected(SdPage* pPage, bool bSelect)
else if (ePageKind == PK_NOTES)
{
pPage->SetSelected(bSelect);
- SdPage* pStandardPage = (SdPage*) GetPage( pPage->GetPageNum() - 1 );
+ SdPage* pStandardPage = static_cast<SdPage*>( GetPage( pPage->GetPageNum() - 1 ) );
if (pStandardPage && pStandardPage->GetPageKind() == PK_STANDARD)
pStandardPage->SetSelected(bSelect);
@@ -568,7 +568,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ )
else
{
bClipboard = true;
- pPage = (SdPage*) GetPage(1);
+ pPage = static_cast<SdPage*>( GetPage(1) );
}
// Insert master page, then register this with the page
@@ -649,16 +649,16 @@ bool SdDrawDocument::CreateMissingNotesAndHandoutPages()
if (nPageCount != 0)
{
// Set PageKind
- SdPage* pHandoutMPage = (SdPage*) GetMasterPage(0);
+ SdPage* pHandoutMPage = static_cast<SdPage*>( GetMasterPage(0) );
pHandoutMPage->SetPageKind(PK_HANDOUT);
- SdPage* pHandoutPage = (SdPage*) GetPage(0);
+ SdPage* pHandoutPage = static_cast<SdPage*>( GetPage(0) );
pHandoutPage->SetPageKind(PK_HANDOUT);
pHandoutPage->TRG_SetMasterPage( *pHandoutMPage );
for (sal_uInt16 i = 1; i < nPageCount; i = i + 2)
{
- SdPage* pPage = (SdPage*) GetPage(i);
+ SdPage* pPage = static_cast<SdPage*>( GetPage(i) );
if(!pPage->TRG_HasMasterPage())
{
@@ -667,7 +667,7 @@ bool SdDrawDocument::CreateMissingNotesAndHandoutPages()
pPage->TRG_SetMasterPage(*GetMasterPage(1));
}
- SdPage* pNotesPage = (SdPage*) GetPage(i+1);
+ SdPage* pNotesPage = static_cast<SdPage*>( GetPage(i+1) );
pNotesPage->SetPageKind(PK_NOTES);
// Set notes master page
@@ -960,7 +960,7 @@ SdIMapInfo* SdDrawDocument::GetIMapInfo( SdrObject* pObject ) const
pUserData = pObject->GetUserData( i );
if ( ( pUserData->GetInventor() == SdUDInventor ) && ( pUserData->GetId() == SD_IMAPINFO_ID ) )
- pIMapInfo = (SdIMapInfo*) pUserData;
+ pIMapInfo = static_cast<SdIMapInfo*>(pUserData);
}
return pIMapInfo;
@@ -985,9 +985,9 @@ IMapObject* SdDrawDocument::GetHitIMapObject( SdrObject* pObj,
// execute HitTest
if ( pObj->ISA( SdrGrafObj ) ) // simple graphics object
{
- const SdrGrafObj* pGrafObj = (const SdrGrafObj*) pObj;
+ const SdrGrafObj* pGrafObj = static_cast<const SdrGrafObj*>(pObj);
const GeoStat& rGeo = pGrafObj->GetGeoStat();
- SdrGrafObjGeoData* pGeoData = (SdrGrafObjGeoData*) pGrafObj->GetGeoData();
+ SdrGrafObjGeoData* pGeoData = static_cast<SdrGrafObjGeoData*>( pGrafObj->GetGeoData() );
// Undo rotation
if ( rGeo.nRotationAngle )
@@ -1012,7 +1012,7 @@ IMapObject* SdDrawDocument::GetHitIMapObject( SdrObject* pObj,
}
else if ( pObj->ISA( SdrOle2Obj ) ) // OLE object
{
- aGraphSize = ( (SdrOle2Obj*) pObj )->GetOrigObjSize();
+ aGraphSize = static_cast<SdrOle2Obj*>( pObj )->GetOrigObjSize();
bObjSupported = true;
}
@@ -1206,14 +1206,14 @@ sal_uInt16 SdDrawDocument::CreatePage (
{
pPreviousNotesPage = pActualPage;
sal_uInt16 nNotesPageNum = pPreviousNotesPage->GetPageNum() + 2;
- pPreviousStandardPage = (SdPage*) GetPage(nNotesPageNum - 3);
+ pPreviousStandardPage = static_cast<SdPage*>( GetPage(nNotesPageNum - 3) );
eStandardLayout = pPreviousStandardPage->GetAutoLayout();
}
else
{
pPreviousStandardPage = pActualPage;
sal_uInt16 nStandardPageNum = pPreviousStandardPage->GetPageNum() + 2;
- pPreviousNotesPage = (SdPage*) GetPage(nStandardPageNum - 1);
+ pPreviousNotesPage = static_cast<SdPage*>( GetPage(nStandardPageNum - 1) );
eNotesLayout = pPreviousNotesPage->GetAutoLayout();
}
@@ -1312,18 +1312,18 @@ sal_uInt16 SdDrawDocument::DuplicatePage (
{
pPreviousNotesPage = pActualPage;
sal_uInt16 nNotesPageNum = pPreviousNotesPage->GetPageNum() + 2;
- pPreviousStandardPage = (SdPage*) GetPage(nNotesPageNum - 3);
+ pPreviousStandardPage = static_cast<SdPage*>( GetPage(nNotesPageNum - 3) );
}
else
{
pPreviousStandardPage = pActualPage;
sal_uInt16 nStandardPageNum = pPreviousStandardPage->GetPageNum() + 2;
- pPreviousNotesPage = (SdPage*) GetPage(nStandardPageNum - 1);
+ pPreviousNotesPage = static_cast<SdPage*>( GetPage(nStandardPageNum - 1) );
}
// Create duplicates of a standard page and the associated notes page
- pStandardPage = (SdPage*) pPreviousStandardPage->Clone();
- pNotesPage = (SdPage*) pPreviousNotesPage->Clone();
+ pStandardPage = static_cast<SdPage*>( pPreviousStandardPage->Clone() );
+ pNotesPage = static_cast<SdPage*>( pPreviousNotesPage->Clone() );
return InsertPageSet (
pActualPage,
@@ -1362,14 +1362,14 @@ sal_uInt16 SdDrawDocument::InsertPageSet (
{
pPreviousNotesPage = pActualPage;
nNotesPageNum = pPreviousNotesPage->GetPageNum() + 2;
- pPreviousStandardPage = (SdPage*) GetPage(nNotesPageNum - 3);
+ pPreviousStandardPage = static_cast<SdPage*>( GetPage(nNotesPageNum - 3) );
nStandardPageNum = nNotesPageNum - 1;
}
else
{
pPreviousStandardPage = pActualPage;
nStandardPageNum = pPreviousStandardPage->GetPageNum() + 2;
- pPreviousNotesPage = (SdPage*) GetPage(nStandardPageNum - 1);
+ pPreviousNotesPage = static_cast<SdPage*>( GetPage(nStandardPageNum - 1) );
nNotesPageNum = nStandardPageNum + 1;
aNotesPageName = aStandardPageName;
}
diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx
index d3e92f950e67..f1470d4178e5 100644
--- a/sd/source/core/drawdoc3.cxx
+++ b/sd/source/core/drawdoc3.cxx
@@ -98,7 +98,7 @@ void InsertBookmarkAsPage_FindDuplicateLayouts::operator()( SdDrawDocument& rDoc
for (sal_uInt16 nMPage = 0; nMPage < nMPageCount && !bFound; nMPage++)
{
// Do the layouts already exist within the document?
- SdPage* pTestPage = (SdPage*) rDoc.GetMasterPage(nMPage);
+ SdPage* pTestPage = static_cast<SdPage*>( rDoc.GetMasterPage(nMPage) );
OUString aFullTest(pTestPage->GetLayoutName());
sal_Int32 nIndex2 = aFullTest.indexOf( SD_LT_SEPARATOR );
if( nIndex2 != -1 )
@@ -158,7 +158,7 @@ static void lcl_IterateBookmarkPages( SdDrawDocument &rDoc, SdDrawDocument* pBoo
if( rBookmarkList.empty() )
{
// simply take master page of nPos'th page in source document
- pBMMPage = (SdPage*)(&(pBookmarkDoc->GetSdPage((sal_uInt16)nPos, PK_STANDARD)->TRG_GetMasterPage()));
+ pBMMPage = static_cast<SdPage*>(&(pBookmarkDoc->GetSdPage((sal_uInt16)nPos, PK_STANDARD)->TRG_GetMasterPage()));
}
else
{
@@ -170,7 +170,7 @@ static void lcl_IterateBookmarkPages( SdDrawDocument &rDoc, SdDrawDocument* pBoo
if (nBMPage != SDRPAGE_NOTFOUND)
{
- pBMPage = (SdPage*) pBookmarkDoc->GetPage(nBMPage);
+ pBMPage = static_cast<SdPage*>( pBookmarkDoc->GetPage(nBMPage) );
}
else
{
@@ -181,7 +181,7 @@ static void lcl_IterateBookmarkPages( SdDrawDocument &rDoc, SdDrawDocument* pBoo
if (pBMPage && pBMPage->GetPageKind()==PK_STANDARD && !pBMPage->IsMasterPage())
{
const sal_uInt16 nBMSdPage = (nBMPage - 1) / 2;
- pBMMPage = (SdPage*) (&(pBookmarkDoc->GetSdPage(nBMSdPage, PK_STANDARD)->TRG_GetMasterPage()));
+ pBMMPage = static_cast<SdPage*> (&(pBookmarkDoc->GetSdPage(nBMSdPage, PK_STANDARD)->TRG_GetMasterPage()));
}
}
@@ -583,8 +583,8 @@ bool SdDrawDocument::InsertBookmarkAsPage(
for (nBMSdPage=0; nBMSdPage < nBMSdPageCount; nBMSdPage++)
{
- SdPage* pPage = (SdPage*) GetPage(nActualInsertPos);
- SdPage* pNotesPage = (SdPage*) GetPage(nActualInsertPos+1);
+ SdPage* pPage = static_cast<SdPage*>( GetPage(nActualInsertPos) );
+ SdPage* pNotesPage = static_cast<SdPage*>( GetPage(nActualInsertPos+1) );
// delay renaming *after* pages are copied (might destroy source otherwise)
if( aRenameSet.find(nBMSdPage) != aRenameSet.end() )
@@ -688,15 +688,15 @@ bool SdDrawDocument::InsertBookmarkAsPage(
{
// Page name already in use -> use default name for default and
// notes page
- SdPage* pPage = (SdPage*) GetPage(nActualInsertPos);
+ SdPage* pPage = static_cast<SdPage*>( GetPage(nActualInsertPos) );
pPage->SetName(OUString());
- SdPage* pNotesPage = (SdPage*) GetPage(nActualInsertPos+1);
+ SdPage* pNotesPage = static_cast<SdPage*>( GetPage(nActualInsertPos+1) );
pNotesPage->SetName(OUString());
}
if (bLink)
{
- SdPage* pPage = (SdPage*) GetPage(nActualInsertPos);
+ SdPage* pPage = static_cast<SdPage*>( GetPage(nActualInsertPos) );
pPage->SetFileName(aBookmarkName);
pPage->SetBookmarkName(aPgName);
pPage->SetModel(this);
@@ -710,7 +710,7 @@ bool SdDrawDocument::InsertBookmarkAsPage(
if(nDestPageNum < GetPageCount())
{
- pStandardPage = (SdPage*)GetPage(nDestPageNum);
+ pStandardPage = static_cast<SdPage*>(GetPage(nDestPageNum));
}
if (pStandardPage)
@@ -718,7 +718,7 @@ bool SdDrawDocument::InsertBookmarkAsPage(
if( bPreservePageNames )
{
// Take old slide names for inserted pages
- SdPage* pPage = (SdPage*) GetPage(nActualInsertPos);
+ SdPage* pPage = static_cast<SdPage*>( GetPage(nActualInsertPos) );
pPage->SetName( pStandardPage->GetRealName() );
}
@@ -735,7 +735,7 @@ bool SdDrawDocument::InsertBookmarkAsPage(
if(nDestPageNum < GetPageCount())
{
- pNotesPage = (SdPage*)GetPage(nDestPageNum);
+ pNotesPage = static_cast<SdPage*>(GetPage(nDestPageNum));
}
if (pNotesPage)
@@ -743,7 +743,7 @@ bool SdDrawDocument::InsertBookmarkAsPage(
if( bPreservePageNames )
{
// Take old slide names for inserted pages
- SdPage* pNewNotesPage = (SdPage*) GetPage(nActualInsertPos+1);
+ SdPage* pNewNotesPage = static_cast<SdPage*>( GetPage(nActualInsertPos+1));
if( pNewNotesPage )
pNewNotesPage->SetName( pStandardPage->GetRealName() );
}
@@ -772,14 +772,14 @@ bool SdDrawDocument::InsertBookmarkAsPage(
// Go backwards, so the numbers don't become messed up
for (sal_uInt16 nPage = nNewMPageCount - 1; nPage >= nMPageCount; nPage--)
{
- pRefPage = (SdPage*) GetMasterPage(nPage);
+ pRefPage = static_cast<SdPage*>( GetMasterPage(nPage) );
OUString aMPLayout(pRefPage->GetLayoutName());
PageKind eKind = pRefPage->GetPageKind();
// Does this already exist?
for (sal_uInt16 nTest = 0; nTest < nMPageCount; nTest++)
{
- SdPage* pTest = (SdPage*) GetMasterPage(nTest);
+ SdPage* pTest = static_cast<SdPage*>( GetMasterPage(nTest) );
OUString aTest(pTest->GetLayoutName());
// nInsertPos > 2 is always true when inserting into non-empty models
@@ -889,7 +889,7 @@ bool SdDrawDocument::InsertBookmarkAsPage(
for (sal_uInt16 nPage = nMPageCount; nPage < nNewMPageCount; nPage++)
{
- pRefPage = (SdPage*) GetMasterPage(nPage);
+ pRefPage = static_cast<SdPage*>( GetMasterPage(nPage) );
if (pRefPage->GetPageKind() == PK_STANDARD)
{
if (bScaleObjects)
@@ -928,7 +928,7 @@ bool SdDrawDocument::InsertBookmarkAsPage(
{
for(sal_uInt32 p = nInsertPos; p < (nInsertPos + nBMSdPageCount); p++)
{
- SdPage *pPg = (SdPage *) GetPage(p);
+ SdPage *pPg = static_cast<SdPage *>( GetPage(p) );
for(size_t i = 0; i < pPg->GetObjCount(); ++i)
{
if(pPg->GetObj(i)->GetStyleSheet())
@@ -1097,7 +1097,7 @@ bool SdDrawDocument::InsertBookmarkAsObject(
if (bOLEObjFound)
pBMView->GetDoc().SetAllocDocSh(true);
- SdDrawDocument* pTmpDoc = (SdDrawDocument*) pBMView->GetMarkedObjModel();
+ SdDrawDocument* pTmpDoc = static_cast<SdDrawDocument*>( pBMView->GetMarkedObjModel() );
bOK = pView->Paste(*pTmpDoc, aObjPos, pPage, 0, OUString(), OUString());
if (bOLEObjFound)
@@ -1213,7 +1213,7 @@ void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, bool bOnl
{
if ( pMaster == GetMasterPage( nMPg ) )
{
- pNotesMaster = (SdPage*) GetMasterPage( ++nMPg );
+ pNotesMaster = static_cast<SdPage*>( GetMasterPage( ++nMPg ) );
break;
}
}
@@ -1290,7 +1290,7 @@ void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, bool bOnl
nMPg < GetMasterPageCount() && bDeleteOldStyleSheets;
nMPg++ )
{
- SdPage* pMPg = (SdPage*) GetMasterPage(nMPg);
+ SdPage* pMPg = static_cast<SdPage*>( GetMasterPage(nMPg) );
if (pMPg->GetLayoutName() == aLayoutName)
{
bDeleteOldStyleSheets = false;
@@ -1412,9 +1412,9 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
}
SdPage* pSelectedPage = GetSdPage(nSdPageNum, PK_STANDARD);
- SdPage* pNotes = (SdPage*) GetPage(pSelectedPage->GetPageNum()+1);
- SdPage& rOldMaster = (SdPage&)pSelectedPage->TRG_GetMasterPage();
- SdPage& rOldNotesMaster = (SdPage&)pNotes->TRG_GetMasterPage();
+ SdPage* pNotes = static_cast<SdPage*>( GetPage(pSelectedPage->GetPageNum()+1) );
+ SdPage& rOldMaster = static_cast<SdPage&>(pSelectedPage->TRG_GetMasterPage());
+ SdPage& rOldNotesMaster = static_cast<SdPage&>(pNotes->TRG_GetMasterPage());
SdPage* pMaster = NULL;
SdPage* pNotesMaster = NULL;
OUString aOldPageLayoutName(pSelectedPage->GetLayoutName());
@@ -1443,7 +1443,7 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
for (sal_uInt16 nMP = 0; nMP < pSourceDoc->GetMasterPageCount(); ++nMP)
{
- SdPage* pMP = (SdPage*) pSourceDoc->GetMasterPage(nMP);
+ SdPage* pMP = static_cast<SdPage*>( pSourceDoc->GetMasterPage(nMP) );
if (pMP->GetLayoutName() == aSearchFor)
{
@@ -1462,8 +1462,8 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
if( (pMaster == NULL) || (pNotesMaster == NULL) )
{
// so take the first MasterPage
- pMaster = (SdPage*) pSourceDoc->GetMasterSdPage(0, PK_STANDARD);
- pNotesMaster = (SdPage*) pSourceDoc->GetMasterSdPage(0, PK_NOTES);
+ pMaster = static_cast<SdPage*>( pSourceDoc->GetMasterSdPage(0, PK_STANDARD) );
+ pNotesMaster = static_cast<SdPage*>( pSourceDoc->GetMasterSdPage(0, PK_NOTES) );
}
}
@@ -1528,7 +1528,7 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
const sal_uInt16 nMasterPageCount = GetMasterPageCount();
for ( sal_uInt16 nMPage = 0; nMPage < nMasterPageCount; nMPage++ )
{
- SdPage* pCheckMaster = (SdPage*)GetMasterPage(nMPage);
+ SdPage* pCheckMaster = static_cast<SdPage*>(GetMasterPage(nMPage));
if( pCheckMaster->GetName() == aTargetNewLayoutName )
{
bLayoutReloaded = true;
@@ -1539,7 +1539,7 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
// Correct or create presentation templates --
// only worry about presentation templates
OUString aName;
- SdStyleSheetPool* pSourceStyleSheetPool = (SdStyleSheetPool*) pSourceDoc->GetStyleSheetPool();
+ SdStyleSheetPool* pSourceStyleSheetPool = static_cast<SdStyleSheetPool*>( pSourceDoc->GetStyleSheetPool() );
pSourceStyleSheetPool->SetSearchMask(SD_STYLE_FAMILY_MASTERPAGE);
static_cast<SdStyleSheetPool*>( mxStyleSheetPool.get())->SetSearchMask(SD_STYLE_FAMILY_MASTERPAGE);
@@ -1608,7 +1608,7 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
aReplList.push_back(aReplData);
}
- pHisSheet = (SfxStyleSheet*) pSourceStyleSheetPool->Next();
+ pHisSheet = static_cast<SfxStyleSheet*>( pSourceStyleSheetPool->Next() );
}
// If new styles were created: re-create parent chaining of the item
@@ -1717,7 +1717,7 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
{
for (sal_uInt16 nPage = 1; nPage < GetPageCount(); nPage++)
{
- SdPage* pPage = (SdPage*) GetPage(nPage);
+ SdPage* pPage = static_cast<SdPage*>( GetPage(nPage) );
OUString aTest = pPage->GetLayoutName();
if (aTest == aOldPageLayoutName)
{
@@ -1851,7 +1851,7 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
{
for (sal_uInt16 nPage = 1; nPage < GetPageCount(); nPage++)
{
- SdPage* pPage = (SdPage*) GetPage(nPage);
+ SdPage* pPage = static_cast<SdPage*>( GetPage(nPage) );
if (pPage->GetLayoutName() == aOldPageLayoutName)
{
aPageList.push_back(pPage);
@@ -1922,7 +1922,7 @@ void SdDrawDocument::Merge(SdrModel& rSourceModel,
if( pPage && pPage->IsMasterPage() && (pPage->GetPageKind() == PK_STANDARD) )
{
// new master page created, add its style family
- SdStyleSheetPool* pStylePool = (SdStyleSheetPool*) GetStyleSheetPool();
+ SdStyleSheetPool* pStylePool = static_cast<SdStyleSheetPool*>( GetStyleSheetPool() );
if( pStylePool )
pStylePool->AddStyleFamily( pPage );
}
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index a081fa036c77..b39b3438c6d9 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -125,7 +125,7 @@ using namespace ::sd;
// We can remove this behavior once the pool saves styleheets even without an ItemSet
void SdDrawDocument::CreateLayoutTemplates()
{
- SdStyleSheetPool* pSSPool = (SdStyleSheetPool*)GetStyleSheetPool();
+ SdStyleSheetPool* pSSPool = static_cast<SdStyleSheetPool*>(GetStyleSheetPool());
SfxStyleSheetBase* pSheet = NULL;
OUString aHelpFile;
OUString aStdName(SD_RESSTR(STR_STANDARD_STYLESHEET_NAME));
@@ -762,13 +762,13 @@ void SdDrawDocument::StartOnlineSpelling(bool bForceSpelling)
for ( nPage = 0; nPage < GetPageCount(); nPage++ )
{
// Search in all pages
- FillOnlineSpellingList((SdPage*) GetPage(nPage));
+ FillOnlineSpellingList(static_cast<SdPage*>(GetPage(nPage)));
}
for (nPage = 0; nPage < GetMasterPageCount(); nPage++)
{
// Search all master pages
- FillOnlineSpellingList((SdPage*) GetMasterPage(nPage));
+ FillOnlineSpellingList(static_cast<SdPage*>( GetMasterPage(nPage) ));
}
mpOnlineSpellingList->seekShape(0);
@@ -800,7 +800,7 @@ void SdDrawDocument::FillOnlineSpellingList(SdPage* pPage)
else if (pObj->GetObjIdentifier() == OBJ_GRUP)
{
// Found a group object
- SdrObjListIter aGroupIter(*((SdrObjGroup*)pObj)->GetSubList(),
+ SdrObjListIter aGroupIter(*static_cast<SdrObjGroup*>(pObj)->GetSubList(),
IM_DEEPNOGROUPS);
bool bSubTextObjFound = false;
@@ -836,12 +836,12 @@ IMPL_LINK_NOARG(SdDrawDocument, OnlineSpellingHdl)
if (pObj->GetOutlinerParaObject() && pObj->ISA(SdrTextObj))
{
// Spell text object
- SpellObject((SdrTextObj*) pObj);
+ SpellObject(static_cast<SdrTextObj*>(pObj));
}
else if (pObj->GetObjIdentifier() == OBJ_GRUP)
{
// Found a group object
- SdrObjListIter aGroupIter(*((SdrObjGroup*)pObj)->GetSubList(),
+ SdrObjListIter aGroupIter(*static_cast<SdrObjGroup*>(pObj)->GetSubList(),
IM_DEEPNOGROUPS);
SdrObject* pSubObj = NULL;
@@ -853,7 +853,7 @@ IMPL_LINK_NOARG(SdDrawDocument, OnlineSpellingHdl)
if (pSubObj->GetOutlinerParaObject() && pSubObj->ISA(SdrTextObj))
{
// Found a text object in a group object
- SpellObject((SdrTextObj*) pSubObj);
+ SpellObject(static_cast<SdrTextObj*>(pSubObj));
}
}
}
@@ -983,7 +983,7 @@ void SdDrawDocument::ImpOnlineSpellCallback(SpellCallbackInfo* pInfo, SdrObject*
if(pObj && pOutl && pObj->ISA(SdrTextObj))
{
bool bModified(IsChanged());
- ((SdrTextObj*)pObj)->SetOutlinerParaObject(pOutl->CreateParaObject());
+ static_cast<SdrTextObj*>(pObj)->SetOutlinerParaObject(pOutl->CreateParaObject());
SetChanged(bModified);
pObj->BroadcastObjectChange();
}
@@ -1117,7 +1117,7 @@ void SdDrawDocument::RenameLayoutTemplate(const OUString& rOldLayoutName, const
sal_uInt16 nPage;
for (nPage = 0; nPage < GetPageCount(); nPage++)
{
- SdPage* pPage = (SdPage*) GetPage(nPage);
+ SdPage* pPage = static_cast<SdPage*>(GetPage(nPage));
OUString aTemp(pPage->GetLayoutName());
if (aTemp == rOldLayoutName)
@@ -1136,7 +1136,7 @@ void SdDrawDocument::RenameLayoutTemplate(const OUString& rOldLayoutName, const
case OBJ_OUTLINETEXT:
case OBJ_TITLETEXT:
{
- OutlinerParaObject* pOPO = ((SdrTextObj*) pObj)->GetOutlinerParaObject();
+ OutlinerParaObject* pOPO = static_cast<SdrTextObj*>(pObj)->GetOutlinerParaObject();
if (pOPO)
{
@@ -1159,7 +1159,7 @@ void SdDrawDocument::RenameLayoutTemplate(const OUString& rOldLayoutName, const
// The affected master pages get the name of the layout as their page name.
for (nPage = 0; nPage < GetMasterPageCount(); nPage++)
{
- SdPage* pPage = (SdPage*) GetMasterPage(nPage);
+ SdPage* pPage = static_cast<SdPage*>( GetMasterPage(nPage) );
OUString aTemp(pPage->GetLayoutName());
if (aTemp == rOldLayoutName)
@@ -1179,7 +1179,7 @@ void SdDrawDocument::RenameLayoutTemplate(const OUString& rOldLayoutName, const
case OBJ_OUTLINETEXT:
case OBJ_TITLETEXT:
{
- OutlinerParaObject* pOPO = ((SdrTextObj*)pObj)->GetOutlinerParaObject();
+ OutlinerParaObject* pOPO = static_cast<SdrTextObj*>(pObj)->GetOutlinerParaObject();
if (pOPO)
{
@@ -1247,7 +1247,7 @@ void SdDrawDocument::SetTextDefaults() const
if( pItem )
{
- switch( ( (SvxFrameDirectionItem&)( *pItem ) ).GetValue() )
+ switch( static_cast<const SvxFrameDirectionItem&>( *pItem ).GetValue() )
{
case( FRMDIR_HORI_LEFT_TOP ): eRet = ::com::sun::star::text::WritingMode_LR_TB; break;
case( FRMDIR_HORI_RIGHT_TOP ): eRet = ::com::sun::star::text::WritingMode_RL_TB; break;
diff --git a/sd/source/core/pglink.cxx b/sd/source/core/pglink.cxx
index 6f32923daaa9..8e22aa118f03 100644
--- a/sd/source/core/pglink.cxx
+++ b/sd/source/core/pglink.cxx
@@ -57,7 +57,7 @@ SdPageLink::~SdPageLink()
::sfx2::SvBaseLink::UpdateResult SdPageLink::DataChanged(
const OUString&, const ::com::sun::star::uno::Any& )
{
- SdDrawDocument* pDoc = (SdDrawDocument*) pPage->GetModel();
+ SdDrawDocument* pDoc = static_cast<SdDrawDocument*>( pPage->GetModel() );
sfx2::LinkManager* pLinkManager = pDoc!=NULL ? pDoc->GetLinkManager() : NULL;
if (pLinkManager)
diff --git a/sd/source/core/sdattr.cxx b/sd/source/core/sdattr.cxx
index 1a0a7547d76b..ce394fc167b1 100644
--- a/sd/source/core/sdattr.cxx
+++ b/sd/source/core/sdattr.cxx
@@ -121,7 +121,7 @@ SfxPoolItem* DiaTimeItem::Clone( SfxItemPool* ) const
bool DiaTimeItem::operator==( const SfxPoolItem& rItem ) const
{
- return( ( (DiaTimeItem&) rItem ).GetValue() == GetValue() );
+ return static_cast<const DiaTimeItem&>( rItem ).GetValue() == GetValue();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 355400b1eb90..899017d73b46 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -319,27 +319,27 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const Rec
pSdrObj = new SdrOle2Obj();
BitmapEx aBmpEx( SdResId( BMP_PRESOBJ_OBJECT ) );
Graphic aGraphic( aBmpEx );
- ( (SdrOle2Obj*) pSdrObj)->SetGraphic(&aGraphic);
+ static_cast<SdrOle2Obj*>(pSdrObj)->SetGraphic(&aGraphic);
}
break;
case PRESOBJ_CHART:
{
pSdrObj = new SdrOle2Obj();
- ( (SdrOle2Obj*) pSdrObj)->SetProgName( OUString( "StarChart" ) );
+ static_cast<SdrOle2Obj*>(pSdrObj)->SetProgName( OUString( "StarChart" ) );
BitmapEx aBmpEx( SdResId( BMP_PRESOBJ_CHART ) );
Graphic aGraphic( aBmpEx );
- ( (SdrOle2Obj*) pSdrObj)->SetGraphic(&aGraphic);
+ static_cast<SdrOle2Obj*>(pSdrObj)->SetGraphic(&aGraphic);
}
break;
case PRESOBJ_ORGCHART:
{
pSdrObj = new SdrOle2Obj();
- ( (SdrOle2Obj*) pSdrObj)->SetProgName( OUString( "StarOrg" ) );
+ static_cast<SdrOle2Obj*>(pSdrObj)->SetProgName( OUString( "StarOrg" ) );
BitmapEx aBmpEx( SdResId( BMP_PRESOBJ_ORGCHART ) );
Graphic aGraphic( aBmpEx );
- ( (SdrOle2Obj*) pSdrObj)->SetGraphic(&aGraphic);
+ static_cast<SdrOle2Obj*>(pSdrObj)->SetGraphic(&aGraphic);
}
break;
@@ -347,10 +347,10 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const Rec
case PRESOBJ_CALC:
{
pSdrObj = new SdrOle2Obj();
- ( (SdrOle2Obj*) pSdrObj)->SetProgName( OUString( "StarCalc" ) );
+ static_cast<SdrOle2Obj*>(pSdrObj)->SetProgName( OUString( "StarCalc" ) );
BitmapEx aBmpEx( SdResId( BMP_PRESOBJ_TABLE ) );
Graphic aGraphic( aBmpEx );
- ( (SdrOle2Obj*) pSdrObj)->SetGraphic(&aGraphic);
+ static_cast<SdrOle2Obj*>(pSdrObj)->SetGraphic(&aGraphic);
}
break;
@@ -413,9 +413,9 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const Rec
// Tell the object EARLY that it is vertical to have the
// defaults for AutoGrowWidth/Height reversed
if(bVertical)
- ((SdrTextObj*)pSdrObj)->SetVerticalWriting(true);
+ static_cast<SdrTextObj*>(pSdrObj)->SetVerticalWriting(true);
- SfxItemSet aTempAttr( ((SdDrawDocument*) pModel)->GetPool() );
+ SfxItemSet aTempAttr( static_cast<SdDrawDocument*>(pModel)->GetPool() );
if( bVertical )
aTempAttr.Put( makeSdrTextMinFrameWidthItem( rRect.GetSize().Width() ) );
else
@@ -457,14 +457,14 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const Rec
OUString aString = GetPresObjText(eObjKind);
if( (!aString.isEmpty() || bForceText) && pSdrObj->ISA(SdrTextObj) )
{
- SdrOutliner* pOutliner = ( (SdDrawDocument*) GetModel() )->GetInternalOutliner();
+ SdrOutliner* pOutliner = static_cast<SdDrawDocument*>( GetModel() )->GetInternalOutliner();
sal_uInt16 nOutlMode = pOutliner->GetMode();
pOutliner->Init( OUTLINERMODE_TEXTOBJECT );
pOutliner->SetStyleSheet( 0, NULL );
pOutliner->SetVertical( bVertical );
- SetObjText( (SdrTextObj*) pSdrObj, (SdrOutliner*)pOutliner, eObjKind, aString );
+ SetObjText( static_cast<SdrTextObj*>(pSdrObj), static_cast<SdrOutliner*>(pOutliner), eObjKind, aString );
pOutliner->Init( nOutlMode );
pOutliner->SetStyleSheet( 0, NULL );
@@ -472,7 +472,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const Rec
if( (eObjKind == PRESOBJ_HEADER) || (eObjKind == PRESOBJ_FOOTER) || (eObjKind == PRESOBJ_SLIDENUMBER) || (eObjKind == PRESOBJ_DATETIME) )
{
- SfxItemSet aTempAttr( ((SdDrawDocument*) pModel)->GetPool() );
+ SfxItemSet aTempAttr( static_cast<SdDrawDocument*>(pModel)->GetPool() );
aTempAttr.Put( SvxFontHeightItem( 493, 100, EE_CHAR_FONTHEIGHT ) );
aTempAttr.Put( SvxFontHeightItem( 493, 100, EE_CHAR_FONTHEIGHT_CTL ) );
aTempAttr.Put( SvxFontHeightItem( 493, 100, EE_CHAR_FONTHEIGHT_CJK ) );
@@ -521,7 +521,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const Rec
for (sal_uInt16 nLevel = 1; nLevel < 10; nLevel++)
{
OUString aName( maLayoutName + " " + OUString::number( nLevel ) );
- SfxStyleSheet* pSheet = (SfxStyleSheet*)pModel->GetStyleSheetPool()->Find(aName, SD_STYLE_FAMILY_MASTERPAGE);
+ SfxStyleSheet* pSheet = static_cast<SfxStyleSheet*>(pModel->GetStyleSheetPool()->Find(aName, SD_STYLE_FAMILY_MASTERPAGE));
DBG_ASSERT(pSheet, "StyleSheet for outline object not found");
if (pSheet)
pSdrObj->StartListening(*pSheet);
@@ -534,7 +534,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const Rec
eObjKind == PRESOBJ_CALC ||
eObjKind == PRESOBJ_GRAPHIC )
{
- SfxItemSet aSet( ((SdDrawDocument*) pModel)->GetPool() );
+ SfxItemSet aSet( static_cast<SdDrawDocument*>(pModel)->GetPool() );
aSet.Put( makeSdrTextContourFrameItem( true ) );
aSet.Put( SvxAdjustItem( SVX_ADJUST_CENTER, EE_PARA_JUST ) );
@@ -584,7 +584,7 @@ SfxStyleSheet* SdPage::GetStyleSheetForMasterPageBackground() const
SfxStyleSheetBasePool* pStShPool = pModel->GetStyleSheetPool();
SfxStyleSheetBase* pResult = pStShPool->Find(aName, SD_STYLE_FAMILY_MASTERPAGE);
- return (SfxStyleSheet*)pResult;
+ return static_cast<SfxStyleSheet*>(pResult);
}
SfxStyleSheet* SdPage::GetStyleSheetForPresObj(PresObjKind eObjKind) const
@@ -631,7 +631,7 @@ SfxStyleSheet* SdPage::GetStyleSheetForPresObj(PresObjKind eObjKind) const
SfxStyleSheetBasePool* pStShPool = pModel->GetStyleSheetPool();
SfxStyleSheetBase* pResult = pStShPool->Find(aName, SD_STYLE_FAMILY_MASTERPAGE);
- return (SfxStyleSheet*)pResult;
+ return static_cast<SfxStyleSheet*>(pResult);
}
/** returns the presentation style with the given helpid from this masterpage or this
@@ -720,11 +720,11 @@ void SdPage::Changed(const SdrObject& rObj, SdrUserCallType eType, const Rectang
{
// Object of the master page changed, therefore adjust
// object on all pages
- sal_uInt16 nPageCount = ((SdDrawDocument*) pModel)->GetSdPageCount(mePageKind);
+ sal_uInt16 nPageCount = static_cast<SdDrawDocument*>(pModel)->GetSdPageCount(mePageKind);
for (sal_uInt16 i = 0; i < nPageCount; i++)
{
- SdPage* pLoopPage = ((SdDrawDocument*) pModel)->GetSdPage(i, mePageKind);
+ SdPage* pLoopPage = static_cast<SdDrawDocument*>(pModel)->GetSdPage(i, mePageKind);
if (pLoopPage && this == &(pLoopPage->TRG_GetMasterPage()))
{
@@ -761,7 +761,7 @@ void SdPage::CreateTitleAndLayout(bool bInit, bool bCreate )
if (!mbMaster)
{
- pMasterPage = (SdPage*)(&(TRG_GetMasterPage()));
+ pMasterPage = static_cast<SdPage*>(&(TRG_GetMasterPage()));
}
if (!pMasterPage)
@@ -777,7 +777,7 @@ void SdPage::CreateTitleAndLayout(bool bInit, bool bCreate )
pMasterPage->EnsureMasterPageDefaultBackground();
}
- if( ( (SdDrawDocument*) GetModel() )->GetDocumentType() == DOCUMENT_TYPE_IMPRESS )
+ if( static_cast<SdDrawDocument*>( GetModel() )->GetDocumentType() == DOCUMENT_TYPE_IMPRESS )
{
if( mePageKind == PK_HANDOUT && bInit )
{
@@ -1648,7 +1648,7 @@ void SdPage::NbcInsertObject(SdrObject* pObj, size_t nPos, const SdrInsertReason
{
FmFormPage::NbcInsertObject(pObj, nPos, pReason);
- ((SdDrawDocument*) pModel)->InsertObject(pObj, this);
+ static_cast<SdDrawDocument*>(pModel)->InsertObject(pObj, this);
SdrLayerID nId = pObj->GetLayer();
if( mbMaster )
@@ -1919,23 +1919,23 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR
{
SfxItemSet& rSet = pTitleSheet->GetItemSet();
- SvxFontHeightItem& rOldHgt = (SvxFontHeightItem&) rSet.Get(EE_CHAR_FONTHEIGHT);
+ const SvxFontHeightItem& rOldHgt = static_cast<const SvxFontHeightItem&>( rSet.Get(EE_CHAR_FONTHEIGHT) );
sal_uLong nFontHeight = rOldHgt.GetHeight();
nFontHeight = long(nFontHeight * (double) aFractY);
rSet.Put(SvxFontHeightItem(nFontHeight, 100, EE_CHAR_FONTHEIGHT));
if( SfxItemState::DEFAULT == rSet.GetItemState( EE_CHAR_FONTHEIGHT_CJK ) )
{
- rOldHgt = (SvxFontHeightItem&) rSet.Get(EE_CHAR_FONTHEIGHT_CJK);
- nFontHeight = rOldHgt.GetHeight();
+ const SvxFontHeightItem& rOldHgt2 = static_cast<const SvxFontHeightItem&>( rSet.Get(EE_CHAR_FONTHEIGHT_CJK) );
+ nFontHeight = rOldHgt2.GetHeight();
nFontHeight = long(nFontHeight * (double) aFractY);
rSet.Put(SvxFontHeightItem(nFontHeight, 100, EE_CHAR_FONTHEIGHT_CJK));
}
if( SfxItemState::DEFAULT == rSet.GetItemState( EE_CHAR_FONTHEIGHT_CTL ) )
{
- rOldHgt = (SvxFontHeightItem&) rSet.Get(EE_CHAR_FONTHEIGHT_CTL);
- nFontHeight = rOldHgt.GetHeight();
+ const SvxFontHeightItem& rOldHgt2 = static_cast<const SvxFontHeightItem&>( rSet.Get(EE_CHAR_FONTHEIGHT_CTL) );
+ nFontHeight = rOldHgt2.GetHeight();
nFontHeight = long(nFontHeight * (double) aFractY);
rSet.Put(SvxFontHeightItem(nFontHeight, 100, EE_CHAR_FONTHEIGHT_CTL));
}
@@ -1951,36 +1951,36 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR
for (sal_Int32 i=1; i<=9; i++)
{
OUString sLayoutName( aName + OUString::number( i ) );
- SfxStyleSheet* pOutlineSheet = (SfxStyleSheet*)((SdDrawDocument*) pModel)->GetStyleSheetPool()->Find(sLayoutName, SD_STYLE_FAMILY_MASTERPAGE);
+ SfxStyleSheet* pOutlineSheet = static_cast<SfxStyleSheet*>(static_cast<SdDrawDocument*>(pModel)->GetStyleSheetPool()->Find(sLayoutName, SD_STYLE_FAMILY_MASTERPAGE));
if (pOutlineSheet)
{
// Calculate new font height
SfxItemSet aTempSet(pOutlineSheet->GetItemSet());
- SvxFontHeightItem& rOldHgt = (SvxFontHeightItem&) aTempSet.Get(EE_CHAR_FONTHEIGHT);
+ const SvxFontHeightItem& rOldHgt = static_cast<const SvxFontHeightItem&>( aTempSet.Get(EE_CHAR_FONTHEIGHT) );
sal_uLong nFontHeight = rOldHgt.GetHeight();
nFontHeight = long(nFontHeight * (double) aFractY);
aTempSet.Put(SvxFontHeightItem(nFontHeight, 100, EE_CHAR_FONTHEIGHT));
if( SfxItemState::DEFAULT == aTempSet.GetItemState( EE_CHAR_FONTHEIGHT_CJK ) )
{
- rOldHgt = (SvxFontHeightItem&) aTempSet.Get(EE_CHAR_FONTHEIGHT_CJK);
- nFontHeight = rOldHgt.GetHeight();
+ const SvxFontHeightItem& rOldHgt2 = static_cast<const SvxFontHeightItem&>( aTempSet.Get(EE_CHAR_FONTHEIGHT_CJK) );
+ nFontHeight = rOldHgt2.GetHeight();
nFontHeight = long(nFontHeight * (double) aFractY);
aTempSet.Put(SvxFontHeightItem(nFontHeight, 100, EE_CHAR_FONTHEIGHT_CJK));
}
if( SfxItemState::DEFAULT == aTempSet.GetItemState( EE_CHAR_FONTHEIGHT_CTL ) )
{
- rOldHgt = (SvxFontHeightItem&) aTempSet.Get(EE_CHAR_FONTHEIGHT_CTL);
- nFontHeight = rOldHgt.GetHeight();
+ const SvxFontHeightItem& rOldHgt2 = static_cast<const SvxFontHeightItem&>( aTempSet.Get(EE_CHAR_FONTHEIGHT_CTL) );
+ nFontHeight = rOldHgt2.GetHeight();
nFontHeight = long(nFontHeight * (double) aFractY);
aTempSet.Put(SvxFontHeightItem(nFontHeight, 100, EE_CHAR_FONTHEIGHT_CTL));
}
// adjust bullet
- ((SdStyleSheet*) pOutlineSheet)->AdjustToFontHeight(aTempSet, false);
+ static_cast<SdStyleSheet*>(pOutlineSheet)->AdjustToFontHeight(aTempSet, false);
// Special treatment: reset the INVALIDS to
// NULL pointer (otherwise we have INVALID's
@@ -1993,8 +1993,8 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR
// of the BulletItems
if (aTempSet.GetItemState(EE_PARA_BULLET) == SfxItemState::DEFAULT)
{
- SvxBulletItem aOldBulItem((SvxBulletItem&) pOutlineSheet->GetItemSet().Get(EE_PARA_BULLET));
- SvxBulletItem& rNewBulItem = (SvxBulletItem&) aTempSet.Get(EE_PARA_BULLET);
+ SvxBulletItem aOldBulItem(static_cast<const SvxBulletItem&>( pOutlineSheet->GetItemSet().Get(EE_PARA_BULLET) ));
+ const SvxBulletItem& rNewBulItem = static_cast<const SvxBulletItem&>( aTempSet.Get(EE_PARA_BULLET) );
aOldBulItem.CopyValidProperties(rNewBulItem);
aTempSet.Put(aOldBulItem);
}
@@ -2036,7 +2036,7 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR
nWhich = EE_CHAR_FONTHEIGHT_CTL;
// use more modern method to scale the text height
- sal_uInt32 nFontHeight = ((SvxFontHeightItem&)pObj->GetMergedItem(nWhich)).GetHeight();
+ sal_uInt32 nFontHeight = static_cast<const SvxFontHeightItem&>(pObj->GetMergedItem(nWhich)).GetHeight();
sal_uInt32 nNewFontHeight = sal_uInt32((double)nFontHeight * (double)aFractY);
pObj->SetMergedItem(SvxFontHeightItem(nNewFontHeight, 100, nWhich));
@@ -2162,7 +2162,7 @@ SdrObject* convertPresentationObjectImpl( SdPage& rPage, SdrObject* pSourceObj,
aSet.Put(pNewObj->GetMergedItemSet());
- const SvxLRSpaceItem& rLRItem = (const SvxLRSpaceItem&) aSet.Get(EE_PARA_LRSPACE);
+ const SvxLRSpaceItem& rLRItem = static_cast<const SvxLRSpaceItem&>( aSet.Get(EE_PARA_LRSPACE) );
SvxLRSpaceItem aNewLRItem(rLRItem);
aNewLRItem.SetTxtLeft(0);
aSet.Put(aNewLRItem);
@@ -2257,7 +2257,7 @@ SdrObject* SdPage::InsertAutoLayoutShape( SdrObject* pObj, PresObjKind eObjKind,
if ( pTextObject->IsAutoGrowHeight() )
{
// switch off AutoGrowHeight, set new MinHeight
- SfxItemSet aTempAttr( ((SdDrawDocument*) pModel)->GetPool() );
+ SfxItemSet aTempAttr( static_cast<SdDrawDocument*>(pModel)->GetPool() );
SdrMetricItem aMinHeight( makeSdrTextMinFrameHeightItem(aRect.GetSize().Height()) );
aTempAttr.Put( aMinHeight );
aTempAttr.Put( makeSdrTextAutoGrowHeightItem(false) );
@@ -2265,7 +2265,7 @@ SdrObject* SdPage::InsertAutoLayoutShape( SdrObject* pObj, PresObjKind eObjKind,
pTextObject->SetLogicRect(aRect);
// switch on AutoGrowHeight
- SfxItemSet aAttr( ((SdDrawDocument*) pModel)->GetPool() );
+ SfxItemSet aAttr( static_cast<SdDrawDocument*>(pModel)->GetPool() );
aAttr.Put( makeSdrTextAutoGrowHeightItem(true) );
pTextObject->SetMergedItemSet(aAttr);
@@ -2274,7 +2274,7 @@ SdrObject* SdPage::InsertAutoLayoutShape( SdrObject* pObj, PresObjKind eObjKind,
if ( pTextObject->IsAutoGrowWidth() )
{
// switch off AutoGrowWidth , set new MinWidth
- SfxItemSet aTempAttr( ((SdDrawDocument*) pModel)->GetPool() );
+ SfxItemSet aTempAttr( static_cast<SdDrawDocument*>(pModel)->GetPool() );
SdrMetricItem aMinWidth( makeSdrTextMinFrameWidthItem(aRect.GetSize().Width()) );
aTempAttr.Put( aMinWidth );
aTempAttr.Put( makeSdrTextAutoGrowWidthItem(false) );
@@ -2282,7 +2282,7 @@ SdrObject* SdPage::InsertAutoLayoutShape( SdrObject* pObj, PresObjKind eObjKind,
pTextObject->SetLogicRect(aRect);
// switch on AutoGrowWidth
- SfxItemSet aAttr( ((SdDrawDocument*) pModel)->GetPool() );
+ SfxItemSet aAttr( static_cast<SdDrawDocument*>(pModel)->GetPool() );
aAttr.Put( makeSdrTextAutoGrowWidthItem(true) );
pTextObject->SetMergedItemSet(aAttr);
}
@@ -2384,11 +2384,11 @@ void SdPage::SetObjText(SdrTextObj* pObj, SdrOutliner* pOutliner, PresObjKind eO
if (!pOutliner)
{
- SfxItemPool* pPool = ((SdDrawDocument*) GetModel())->GetDrawOutliner().GetEmptyItemSet().GetPool();
+ SfxItemPool* pPool = static_cast<SdDrawDocument*>(GetModel())->GetDrawOutliner().GetEmptyItemSet().GetPool();
pOutl = new ::Outliner( pPool, OUTLINERMODE_OUTLINEOBJECT );
- pOutl->SetRefDevice( SD_MOD()->GetRefDevice( *( (SdDrawDocument*) GetModel() )->GetDocSh() ) );
+ pOutl->SetRefDevice( SD_MOD()->GetRefDevice( *static_cast<SdDrawDocument*>( GetModel() )->GetDocSh() ) );
pOutl->SetEditTextObjectPool(pPool);
- pOutl->SetStyleSheetPool((SfxStyleSheetPool*)GetModel()->GetStyleSheetPool());
+ pOutl->SetStyleSheetPool(static_cast<SfxStyleSheetPool*>(GetModel()->GetStyleSheetPool()));
pOutl->EnableUndo(false);
pOutl->SetUpdateMode( false );
}
@@ -2554,7 +2554,7 @@ const OUString& SdPage::GetName() const
}
else
{
- aCreatedPageName += ((SdDrawDocument*) GetModel())->CreatePageNumValue(nNum);
+ aCreatedPageName += static_cast<SdDrawDocument*>(GetModel())->CreatePageNumValue(nNum);
}
}
else
@@ -2712,7 +2712,7 @@ const HeaderFooterSettings& SdPage::getHeaderFooterSettings() const
{
if( mePageKind == PK_HANDOUT && !mbMaster )
{
- return (((SdPage&)TRG_GetMasterPage()).maHeaderFooterSettings);
+ return static_cast<SdPage&>(TRG_GetMasterPage()).maHeaderFooterSettings;
}
else
{
@@ -2724,7 +2724,7 @@ void SdPage::setHeaderFooterSettings( const sd::HeaderFooterSettings& rNewSettin
{
if( mePageKind == PK_HANDOUT && !mbMaster )
{
- (((SdPage&)TRG_GetMasterPage()).maHeaderFooterSettings) = rNewSettings;
+ static_cast<SdPage&>(TRG_GetMasterPage()).maHeaderFooterSettings = rNewSettings;
}
else
{
diff --git a/sd/source/core/sdpage2.cxx b/sd/source/core/sdpage2.cxx
index 07983588f9a9..450c646f5cbe 100644
--- a/sd/source/core/sdpage2.cxx
+++ b/sd/source/core/sdpage2.cxx
@@ -147,7 +147,7 @@ void SdPage::SetPresentationLayout(const OUString& rLayoutName,
for (size_t nObj = 0; nObj < nObjCount; ++nObj)
{
- SdrTextObj* pObj = (SdrTextObj*) GetObj(nObj);
+ SdrTextObj* pObj = static_cast<SdrTextObj*>( GetObj(nObj) );
if (pObj->GetObjInventor() == SdrInventor &&
pObj->GetObjIdentifier() == OBJ_OUTLINETEXT)
@@ -263,7 +263,7 @@ void SdPage::EndListenOutlineText()
if (pOutlineTextObj)
{
- SdStyleSheetPool* pSPool = (SdStyleSheetPool*)pModel->GetStyleSheetPool();
+ SdStyleSheetPool* pSPool = static_cast<SdStyleSheetPool*>(pModel->GetStyleSheetPool());
DBG_ASSERT(pSPool, "StyleSheetPool missing");
OUString aTrueLayoutName(maLayoutName);
sal_Int32 nIndex = aTrueLayoutName.indexOf( SD_LT_SEPARATOR );
@@ -322,13 +322,13 @@ void SdPage::ConnectLink()
if (pLinkManager && !mpPageLink && !maFileName.isEmpty() && !maBookmarkName.isEmpty() &&
mePageKind==PK_STANDARD && !IsMasterPage() &&
- ( (SdDrawDocument*) pModel)->IsNewOrLoadCompleted())
+ static_cast<SdDrawDocument*>(pModel)->IsNewOrLoadCompleted())
{
/**********************************************************************
* Connect
* Only standard pages are allowed to be linked
**********************************************************************/
- ::sd::DrawDocShell* pDocSh = ((SdDrawDocument*) pModel)->GetDocSh();
+ ::sd::DrawDocShell* pDocSh = static_cast<SdDrawDocument*>(pModel)->GetDocSh();
if (!pDocSh || !pDocSh->GetMedium()->GetOrigURL().equals(maFileName))
{
@@ -502,7 +502,7 @@ void SdPage::getAlienAttributes( com::sun::star::uno::Any& rAttributes )
}
else
{
- ((SvXMLAttrContainerItem*)pItem)->QueryValue( rAttributes, 0 );
+ static_cast<const SvXMLAttrContainerItem*>(pItem)->QueryValue( rAttributes, 0 );
}
}
diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index cdd1aee7ad6f..5e4b30f7a754 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -859,7 +859,7 @@ void SdStyleSheetPool::CreatePseudosIfNecessary()
{
pSheet = &Make(aName, SD_STYLE_FAMILY_PSEUDO, nUsedMask);
pSheet->SetParent( OUString() );
- ((SfxStyleSheet*)pSheet)->StartListening(*this);
+ static_cast<SfxStyleSheet*>(pSheet)->StartListening(*this);
}
pSheet->SetHelpId( aHelpFile, HID_PSEUDOSHEET_TITLE );
@@ -868,7 +868,7 @@ void SdStyleSheetPool::CreatePseudosIfNecessary()
{
pSheet = &Make(aName, SD_STYLE_FAMILY_PSEUDO, nUsedMask);
pSheet->SetParent( OUString() );
- ((SfxStyleSheet*)pSheet)->StartListening(*this);
+ static_cast<SfxStyleSheet*>(pSheet)->StartListening(*this);
}
pSheet->SetHelpId( aHelpFile, HID_PSEUDOSHEET_SUBTITLE );
@@ -877,7 +877,7 @@ void SdStyleSheetPool::CreatePseudosIfNecessary()
{
pSheet = &Make(aName, SD_STYLE_FAMILY_PSEUDO, nUsedMask);
pSheet->SetParent( OUString() );
- ((SfxStyleSheet*)pSheet)->StartListening(*this);
+ static_cast<SfxStyleSheet*>(pSheet)->StartListening(*this);
}
pSheet->SetHelpId( aHelpFile, HID_PSEUDOSHEET_BACKGROUNDOBJECTS );
@@ -886,7 +886,7 @@ void SdStyleSheetPool::CreatePseudosIfNecessary()
{
pSheet = &Make(aName, SD_STYLE_FAMILY_PSEUDO, nUsedMask);
pSheet->SetParent( OUString() );
- ((SfxStyleSheet*)pSheet)->StartListening(*this);
+ static_cast<SfxStyleSheet*>(pSheet)->StartListening(*this);
}
pSheet->SetHelpId( aHelpFile, HID_PSEUDOSHEET_BACKGROUND );
@@ -895,7 +895,7 @@ void SdStyleSheetPool::CreatePseudosIfNecessary()
{
pSheet = &Make(aName, SD_STYLE_FAMILY_PSEUDO, nUsedMask);
pSheet->SetParent( OUString() );
- ((SfxStyleSheet*)pSheet)->StartListening(*this);
+ static_cast<SfxStyleSheet*>(pSheet)->StartListening(*this);
}
pSheet->SetHelpId( aHelpFile, HID_PSEUDOSHEET_NOTES );
@@ -915,7 +915,7 @@ void SdStyleSheetPool::CreatePseudosIfNecessary()
if (pParent)
pSheet->SetParent(pParent->GetName());
pParent = pSheet;
- ((SfxStyleSheet*)pSheet)->StartListening(*this);
+ static_cast<SfxStyleSheet*>(pSheet)->StartListening(*this);
}
}
pSheet->SetHelpId( aHelpFile, HID_PSEUDOSHEET_OUTLINE + nLevel );
@@ -1119,7 +1119,7 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet,
}
rSet.Put( SvxNumBulletItem( aNumRule, EE_PARA_NUMBULLET ) );
- ((SfxStyleSheet*)pSheet)->Broadcast(SfxSimpleHint( SFX_HINT_DATACHANGED ) );
+ static_cast<SfxStyleSheet*>(pSheet)->Broadcast(SfxSimpleHint( SFX_HINT_DATACHANGED ) );
}
break;
@@ -1128,7 +1128,7 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet,
case HID_PSEUDOSHEET_SUBTITLE :
{
// Subtitle template
- SvxNumRule* pDefaultRule = ((SvxNumBulletItem*) rSet.GetPool()->GetSecondaryPool()->GetPoolDefaultItem(EE_PARA_NUMBULLET))->GetNumRule();
+ SvxNumRule* pDefaultRule = static_cast<const SvxNumBulletItem*>( rSet.GetPool()->GetSecondaryPool()->GetPoolDefaultItem(EE_PARA_NUMBULLET))->GetNumRule();
DBG_ASSERT( pDefaultRule, "Where is my default template? [CL]" );
if(pDefaultRule)
@@ -1149,7 +1149,7 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet,
}
rSet.Put( SvxNumBulletItem( aNumRule, EE_PARA_NUMBULLET ) );
- ((SfxStyleSheet*)pSheet)->Broadcast(SfxSimpleHint( SFX_HINT_DATACHANGED ) );
+ static_cast<SfxStyleSheet*>(pSheet)->Broadcast(SfxSimpleHint( SFX_HINT_DATACHANGED ) );
}
}
break;
@@ -1203,7 +1203,7 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet,
}
rSet.Put( SvxNumBulletItem( aNumRule, EE_PARA_NUMBULLET ) );
- ((SfxStyleSheet*)pSheet)->Broadcast(SfxSimpleHint( SFX_HINT_DATACHANGED ) );
+ static_cast<SfxStyleSheet*>(pSheet)->Broadcast(SfxSimpleHint( SFX_HINT_DATACHANGED ) );
}
break;
}
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index 2bfd87017624..9884a0825a0b 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -367,7 +367,7 @@ SdStyleSheet* SdStyleSheet::GetRealStyleSheet() const
OUString aRealStyle;
OUString aSep( SD_LT_SEPARATOR );
SdStyleSheet* pRealStyle = NULL;
- SdDrawDocument* pDoc = ((SdStyleSheetPool*)pPool)->GetDoc();
+ SdDrawDocument* pDoc = static_cast<SdStyleSheetPool*>(pPool)->GetDoc();
::sd::DrawViewShell* pDrawViewShell = 0;
@@ -561,12 +561,12 @@ void SdStyleSheet::AdjustToFontHeight(SfxItemSet& rSet, bool bOnlyMissingItems)
rSet.GetItemState(EE_CHAR_FONTHEIGHT) == SfxItemState::SET)
{
const SfxItemSet* pCurSet = &GetItemSet();
- sal_uInt32 nNewHeight = ((SvxFontHeightItem&)rSet.Get(EE_CHAR_FONTHEIGHT)).GetHeight();
- sal_uInt32 nOldHeight = ((SvxFontHeightItem&)pCurSet->Get(EE_CHAR_FONTHEIGHT)).GetHeight();
+ sal_uInt32 nNewHeight = static_cast<const SvxFontHeightItem&>(rSet.Get(EE_CHAR_FONTHEIGHT)).GetHeight();
+ sal_uInt32 nOldHeight = static_cast<const SvxFontHeightItem&>(pCurSet->Get(EE_CHAR_FONTHEIGHT)).GetHeight();
if (rSet.GetItemState(EE_PARA_BULLET) != SfxItemState::SET || !bOnlyMissingItems)
{
- const SvxBulletItem& rBItem = (const SvxBulletItem&)pCurSet->Get(EE_PARA_BULLET);
+ const SvxBulletItem& rBItem = static_cast<const SvxBulletItem&>(pCurSet->Get(EE_PARA_BULLET));
double fBulletFraction = double(rBItem.GetWidth()) / nOldHeight;
SvxBulletItem aNewBItem(rBItem);
aNewBItem.SetWidth((sal_uInt32)(fBulletFraction * nNewHeight));
@@ -575,7 +575,7 @@ void SdStyleSheet::AdjustToFontHeight(SfxItemSet& rSet, bool bOnlyMissingItems)
if (rSet.GetItemState(EE_PARA_LRSPACE) != SfxItemState::SET || !bOnlyMissingItems)
{
- const SvxLRSpaceItem& rLRItem = (const SvxLRSpaceItem&)pCurSet->Get(EE_PARA_LRSPACE);
+ const SvxLRSpaceItem& rLRItem = static_cast<const SvxLRSpaceItem&>(pCurSet->Get(EE_PARA_LRSPACE));
double fIndentFraction = double(rLRItem.GetTxtLeft()) / nOldHeight;
SvxLRSpaceItem aNewLRItem(rLRItem);
aNewLRItem.SetTxtLeft(fIndentFraction * nNewHeight);
@@ -586,7 +586,7 @@ void SdStyleSheet::AdjustToFontHeight(SfxItemSet& rSet, bool bOnlyMissingItems)
if (rSet.GetItemState(EE_PARA_ULSPACE) != SfxItemState::SET || !bOnlyMissingItems)
{
- const SvxULSpaceItem& rULItem = (const SvxULSpaceItem&)pCurSet->Get(EE_PARA_ULSPACE);
+ const SvxULSpaceItem& rULItem = static_cast<const SvxULSpaceItem&>(pCurSet->Get(EE_PARA_ULSPACE));
SvxULSpaceItem aNewULItem(rULItem);
double fLowerFraction = double(rULItem.GetLower()) / nOldHeight;
aNewULItem.SetLower((sal_uInt16)(fLowerFraction * nNewHeight));
@@ -1086,8 +1086,8 @@ Any SAL_CALL SdStyleSheet::getPropertyValue( const OUString& PropertyName ) thro
{
SfxItemSet &rStyleSet = GetItemSet();
- XFillBmpStretchItem* pStretchItem = (XFillBmpStretchItem*)rStyleSet.GetItem(XATTR_FILLBMP_STRETCH);
- XFillBmpTileItem* pTileItem = (XFillBmpTileItem*)rStyleSet.GetItem(XATTR_FILLBMP_TILE);
+ const XFillBmpStretchItem* pStretchItem = static_cast<const XFillBmpStretchItem*>(rStyleSet.GetItem(XATTR_FILLBMP_STRETCH));
+ const XFillBmpTileItem* pTileItem = static_cast<const XFillBmpTileItem*>(rStyleSet.GetItem(XATTR_FILLBMP_TILE));
if( pStretchItem && pTileItem )
{
@@ -1215,7 +1215,7 @@ PropertyState SAL_CALL SdStyleSheet::getPropertyState( const OUString& PropertyN
case XATTR_LINESTART:
case XATTR_LINEDASH:
{
- NameOrIndex* pItem = (NameOrIndex*)rStyleSet.GetItem((sal_uInt16)pEntry->nWID);
+ const NameOrIndex* pItem = static_cast<const NameOrIndex*>(rStyleSet.GetItem((sal_uInt16)pEntry->nWID));
if( ( pItem == NULL ) || pItem->GetName().isEmpty() )
eState = PropertyState_DEFAULT_VALUE;
}
@@ -1312,7 +1312,7 @@ const SfxItemPropertySimpleEntry* SdStyleSheet::getPropertyMapEntry( const OUStr
void SdStyleSheet::BroadcastSdStyleSheetChange(SfxStyleSheetBase* pStyleSheet,
PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool)
{
- SdStyleSheet* pRealSheet =((SdStyleSheet*)pStyleSheet)->GetRealStyleSheet();
+ SdStyleSheet* pRealSheet = static_cast<SdStyleSheet*>(pStyleSheet)->GetRealStyleSheet();
pRealSheet->Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED));
if( (ePO >= PO_OUTLINE_1) && (ePO <= PO_OUTLINE_8) )
@@ -1327,7 +1327,7 @@ void SdStyleSheet::BroadcastSdStyleSheetChange(SfxStyleSheetBase* pStyleSheet,
if(pSheet)
{
- SdStyleSheet* pRealStyleSheet = ((SdStyleSheet*)pSheet)->GetRealStyleSheet();
+ SdStyleSheet* pRealStyleSheet = static_cast<SdStyleSheet*>(pSheet)->GetRealStyleSheet();
pRealStyleSheet->Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED));
}
}
diff --git a/sd/source/core/undo/undoobjects.cxx b/sd/source/core/undo/undoobjects.cxx
index d18b8706ca5f..fe4ff3b40f65 100644
--- a/sd/source/core/undo/undoobjects.cxx
+++ b/sd/source/core/undo/undoobjects.cxx
@@ -206,7 +206,7 @@ void UndoObjectSetText::Redo()
UndoObjectUserCall::UndoObjectUserCall(SdrObject& rObject)
: SdrUndoObj(rObject)
-, mpOldUserCall((SdPage*)rObject.GetUserCall())
+, mpOldUserCall(static_cast<SdPage*>(rObject.GetUserCall()))
, mpNewUserCall(0)
, mxSdrObject( &rObject )
{
diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index 897f26851024..0de1d81d2ed9 100644
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -832,7 +832,7 @@ void HtmlExport::SetDocColors( SdPage* pPage )
{
SfxItemSet& rSet = pSheet->GetItemSet();
if(rSet.GetItemState(EE_CHAR_COLOR,true) == SfxItemState::SET)
- maTextColor = ((SvxColorItem*)rSet.GetItem(EE_CHAR_COLOR,true))->GetValue();
+ maTextColor = static_cast<const SvxColorItem*>(rSet.GetItem(EE_CHAR_COLOR,true))->GetValue();
}
// default background from the background of the master page of the first page
@@ -1044,7 +1044,7 @@ SdrTextObj* HtmlExport::GetLayoutTextObject(SdrPage* pPage)
if (pObject->GetObjInventor() == SdrInventor &&
pObject->GetObjIdentifier() == OBJ_OUTLINETEXT)
{
- pResult = (SdrTextObj*)pObject;
+ pResult = static_cast<SdrTextObj*>(pObject);
break;
}
}
@@ -1187,7 +1187,7 @@ bool HtmlExport::WriteHtml( const OUString& rFileName, bool bAddExtension, const
*/
OUString HtmlExport::CreateTextForTitle( SdrOutliner* pOutliner, SdPage* pPage, const Color& rBackgroundColor )
{
- SdrTextObj* pTO = (SdrTextObj*)pPage->GetPresObj(PRESOBJ_TITLE);
+ SdrTextObj* pTO = static_cast<SdrTextObj*>(pPage->GetPresObj(PRESOBJ_TITLE));
if(!pTO)
pTO = GetLayoutTextObject(pPage);
@@ -1222,12 +1222,12 @@ OUString HtmlExport::CreateTextForPage(SdrOutliner* pOutliner, SdPage* pPage,
{
if (pObject->GetObjIdentifier() == OBJ_GRUP)
{
- SdrObjGroup* pObjectGroup = (SdrObjGroup*) pObject;
+ SdrObjGroup* pObjectGroup = static_cast<SdrObjGroup*>(pObject);
WriteObjectGroup(aStr, pObjectGroup, pOutliner, rBackgroundColor, false);
}
else if (pObject->GetObjIdentifier() == OBJ_TABLE)
{
- SdrTableObj* pTableObject = (SdrTableObj*) pObject;
+ SdrTableObj* pTableObject = static_cast<SdrTableObj*>(pObject);
WriteTable(aStr, pTableObject, pOutliner, rBackgroundColor);
}
else
@@ -1242,7 +1242,7 @@ OUString HtmlExport::CreateTextForPage(SdrOutliner* pOutliner, SdPage* pPage,
case PRESOBJ_TABLE:
{
- SdrTableObj* pTableObject = (SdrTableObj*) pObject;
+ SdrTableObj* pTableObject = static_cast<SdrTableObj*>(pObject);
WriteTable(aStr, pTableObject, pOutliner, rBackgroundColor);
}
break;
@@ -1250,7 +1250,7 @@ OUString HtmlExport::CreateTextForPage(SdrOutliner* pOutliner, SdPage* pPage,
case PRESOBJ_TEXT:
case PRESOBJ_OUTLINE:
{
- SdrTextObj* pTextObject = (SdrTextObj*) pObject;
+ SdrTextObj* pTextObject = static_cast<SdrTextObj*>(pObject);
if (pTextObject->IsEmptyPresObj())
continue;
WriteOutlinerParagraph(aStr, pOutliner, pTextObject->GetOutlinerParaObject(), rBackgroundColor, bHeadLine);
@@ -1301,7 +1301,7 @@ void HtmlExport::WriteObjectGroup(OUStringBuffer& aStr, SdrObjGroup* pObjectGrou
SdrObject* pCurrentObject = aGroupIterator.Next();
if (pCurrentObject->GetObjIdentifier() == OBJ_GRUP)
{
- SdrObjGroup* pCurrentGroupObject = (SdrObjGroup*) pCurrentObject;
+ SdrObjGroup* pCurrentGroupObject = static_cast<SdrObjGroup*>(pCurrentObject);
WriteObjectGroup(aStr, pCurrentGroupObject, pOutliner, rBackgroundColor, bHeadLine);
}
else
@@ -1383,7 +1383,7 @@ OUString HtmlExport::CreateTextForNotesPage( SdrOutliner* pOutliner,
{
OUStringBuffer aStr;
- SdrTextObj* pTO = (SdrTextObj*)pPage->GetPresObj(PRESOBJ_NOTES);
+ SdrTextObj* pTO = static_cast<SdrTextObj*>(pPage->GetPresObj(PRESOBJ_NOTES));
if (pTO && !pTO->IsEmptyPresObj())
{
@@ -1462,7 +1462,7 @@ OUString HtmlExport::TextAttribToHTMLString( SfxItemSet* pSet, HtmlState* pState
OUString aLink, aTarget;
if ( pSet->GetItemState( EE_FEATURE_FIELD ) == SfxItemState::SET )
{
- SvxFieldItem* pItem = (SvxFieldItem*)pSet->GetItem( EE_FEATURE_FIELD );
+ const SvxFieldItem* pItem = static_cast<const SvxFieldItem*>(pSet->GetItem( EE_FEATURE_FIELD ));
if(pItem)
{
const SvxURLField* pURL = PTR_CAST(SvxURLField, pItem->GetField());
@@ -1479,7 +1479,7 @@ OUString HtmlExport::TextAttribToHTMLString( SfxItemSet* pSet, HtmlState* pState
if ( pSet->GetItemState( EE_CHAR_WEIGHT ) == SfxItemState::SET )
{
- bTemp = ((const SvxWeightItem&)pSet->Get( EE_CHAR_WEIGHT )).GetWeight() == WEIGHT_BOLD;
+ bTemp = static_cast<const SvxWeightItem&>(pSet->Get( EE_CHAR_WEIGHT )).GetWeight() == WEIGHT_BOLD;
aTemp = pState->SetWeight( bTemp );
if( bTemp )
aStr.insert(0, aTemp);
@@ -1489,7 +1489,7 @@ OUString HtmlExport::TextAttribToHTMLString( SfxItemSet* pSet, HtmlState* pState
if ( pSet->GetItemState( EE_CHAR_UNDERLINE ) == SfxItemState::SET )
{
- bTemp = ((const SvxUnderlineItem&)pSet->Get( EE_CHAR_UNDERLINE )).GetLineStyle() != UNDERLINE_NONE;
+ bTemp = static_cast<const SvxUnderlineItem&>(pSet->Get( EE_CHAR_UNDERLINE )).GetLineStyle() != UNDERLINE_NONE;
aTemp = pState->SetUnderline( bTemp );
if( bTemp )
aStr.insert(0, aTemp);
@@ -1499,7 +1499,7 @@ OUString HtmlExport::TextAttribToHTMLString( SfxItemSet* pSet, HtmlState* pState
if ( pSet->GetItemState( EE_CHAR_STRIKEOUT ) == SfxItemState::SET )
{
- bTemp = ((const SvxCrossedOutItem&)pSet->Get( EE_CHAR_STRIKEOUT )).GetStrikeout() != STRIKEOUT_NONE;
+ bTemp = static_cast<const SvxCrossedOutItem&>(pSet->Get( EE_CHAR_STRIKEOUT )).GetStrikeout() != STRIKEOUT_NONE;
aTemp = pState->SetStrikeout( bTemp );
if( bTemp )
aStr.insert(0, aTemp);
@@ -1509,7 +1509,7 @@ OUString HtmlExport::TextAttribToHTMLString( SfxItemSet* pSet, HtmlState* pState
if ( pSet->GetItemState( EE_CHAR_ITALIC ) == SfxItemState::SET )
{
- bTemp = ((const SvxPostureItem&)pSet->Get( EE_CHAR_ITALIC )).GetPosture() != ITALIC_NONE;
+ bTemp = static_cast<const SvxPostureItem&>(pSet->Get( EE_CHAR_ITALIC )).GetPosture() != ITALIC_NONE;
aTemp = pState->SetItalic( bTemp );
if( bTemp )
aStr.insert(0, aTemp);
@@ -1521,7 +1521,7 @@ OUString HtmlExport::TextAttribToHTMLString( SfxItemSet* pSet, HtmlState* pState
{
if ( pSet->GetItemState( EE_CHAR_COLOR ) == SfxItemState::SET )
{
- Color aTextColor = ((const SvxColorItem&) pSet->Get( EE_CHAR_COLOR )).GetValue();
+ Color aTextColor = static_cast<const SvxColorItem&>(pSet->Get( EE_CHAR_COLOR )).GetValue();
if( aTextColor == COL_AUTO )
{
if( !rBackgroundColor.IsDark() )
@@ -1587,7 +1587,7 @@ bool HtmlExport::CreateHtmlForPresPages()
}
// now to the master page or finishing
if (!pPage->IsMasterPage())
- pPage = (SdPage*)(&(pPage->TRG_GetMasterPage()));
+ pPage = static_cast<SdPage*>(&(pPage->TRG_GetMasterPage()));
else
bMasterDone = true;
}
@@ -1743,7 +1743,7 @@ bool HtmlExport::CreateHtmlForPresPages()
{
case IMAP_OBJ_RECTANGLE:
{
- Rectangle aArea(((IMapRectangleObject*)pArea)->
+ Rectangle aArea(static_cast<IMapRectangleObject*>(pArea)->
GetRectangle(false));
// conversion into pixel coordinates
@@ -1760,15 +1760,15 @@ bool HtmlExport::CreateHtmlForPresPages()
case IMAP_OBJ_CIRCLE:
{
- Point aCenter(((IMapCircleObject*)pArea)->
+ Point aCenter(static_cast<IMapCircleObject*>(pArea)->
GetCenter(false));
aCenter += Point(aLogPos.X() - pPage->GetLftBorder(),
aLogPos.Y() - pPage->GetUppBorder());
aCenter.X() = (long)(aCenter.X() * fLogicToPixel);
aCenter.Y() = (long)(aCenter.Y() * fLogicToPixel);
- sal_uLong nCircleRadius = (((IMapCircleObject*)pArea)->
- GetRadius(false));
+ sal_uLong nCircleRadius = static_cast<IMapCircleObject*>(pArea)->
+ GetRadius(false);
nCircleRadius = (sal_uLong)(nCircleRadius * fLogicToPixel);
aStr.append(CreateHTMLCircleArea(nCircleRadius,
aCenter.X(), aCenter.Y(),
@@ -1778,7 +1778,7 @@ bool HtmlExport::CreateHtmlForPresPages()
case IMAP_OBJ_POLYGON:
{
- Polygon aArea(((IMapPolygonObject*)pArea)->GetPolygon(false));
+ Polygon aArea(static_cast<IMapPolygonObject*>(pArea)->GetPolygon(false));
aStr.append(CreateHTMLPolygonArea(::basegfx::B2DPolyPolygon(aArea.getB2DPolygon()), Size(aLogPos.X() - pPage->GetLftBorder(), aLogPos.Y() - pPage->GetUppBorder()), fLogicToPixel, aURL));
}
break;
@@ -1882,7 +1882,7 @@ bool HtmlExport::CreateHtmlForPresPages()
pObject->GetObjIdentifier() == OBJ_PLIN ||
pObject->GetObjIdentifier() == OBJ_POLY))
{
- aStr.append(CreateHTMLPolygonArea(((SdrPathObj*)pObject)->GetPathPoly(), Size(-pPage->GetLftBorder(), -pPage->GetUppBorder()), fLogicToPixel, aHRef));
+ aStr.append(CreateHTMLPolygonArea(static_cast<SdrPathObj*>(pObject)->GetPathPoly(), Size(-pPage->GetLftBorder(), -pPage->GetUppBorder()), fLogicToPixel, aHRef));
}
// something completely different: use the BoundRect
else
diff --git a/sd/source/filter/html/sdhtmlfilter.cxx b/sd/source/filter/html/sdhtmlfilter.cxx
index aab3d6341fea..f562d6bf41c4 100644
--- a/sd/source/filter/html/sdhtmlfilter.cxx
+++ b/sd/source/filter/html/sdhtmlfilter.cxx
@@ -61,7 +61,7 @@ bool SdHTMLFilter::Export()
const SfxPoolItem* pItem;
if ( pSet->GetItemState( SID_FILTER_DATA, false, &pItem ) == SfxItemState::SET )
- ((SfxUnoAnyItem*)pItem)->GetValue() >>= aParams;
+ static_cast<const SfxUnoAnyItem*>(pItem)->GetValue() >>= aParams;
HtmlExport aExport(mrMedium.GetName(), aParams, &mrDocument, &mrDocShell);
diff --git a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
index 6de8d0cbe3e0..ce6392f8785f 100644
--- a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
+++ b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
@@ -745,7 +745,7 @@ uno::Any SAL_CALL AccessibleDocumentViewBase::getExtendedAttributes()
OUString sValue;
if (mpViewShell && mpViewShell->ISA(::sd::DrawViewShell))
{
- ::sd::DrawViewShell* pDrViewSh = (::sd::DrawViewShell*) mpViewShell;
+ ::sd::DrawViewShell* pDrViewSh = static_cast<::sd::DrawViewShell*>(mpViewShell);
OUString sDisplay;
OUString sName = "page-name:";
// MT IA2: Not used...
@@ -802,7 +802,7 @@ uno::Any SAL_CALL AccessibleDocumentViewBase::getExtendedAttributes()
}
if (mpViewShell && mpViewShell->ISA(::sd::PresentationViewShell))
{
- ::sd::PresentationViewShell* pPresViewSh = (::sd::PresentationViewShell*) mpViewShell;
+ ::sd::PresentationViewShell* pPresViewSh = static_cast<::sd::PresentationViewShell*>(mpViewShell);
SdPage* pCurrPge = pPresViewSh->getCurrentPage();
SdDrawDocument* pDoc = pPresViewSh->GetDoc();
SdPage* pNotesPge = (SdPage*)pDoc->GetSdPage((pCurrPge->GetPageNum()-1)>>1, PK_NOTES);