diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-03-25 13:54:13 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-03-25 17:03:49 +0000 |
commit | ca276d55ea0c4946d455ffa3ee8693cab1b17160 (patch) | |
tree | 8410c3567c870361e6cda9d83b4b37b0e38f3adf /sd | |
parent | 592f1387486eefa6d97858d538cde7ff085972e7 (diff) |
coverity#982466 Unchecked dynamic_cast
Change-Id: I6016ab4ffd2712d62cf3a8136a7d292f06abc8dd
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/core/drawdoc3.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx index 8e806bd9d15f..ca34cf1c33e0 100644 --- a/sd/source/core/drawdoc3.cxx +++ b/sd/source/core/drawdoc3.cxx @@ -486,8 +486,8 @@ sal_Bool SdDrawDocument::InsertBookmarkAsPage( lcl_IterateBookmarkPages( *this, pBookmarkDoc, rBookmarkList, nBMSdPageCount, aSearchFunctor, ( rBookmarkList.empty() && pBookmarkDoc != this ) ); // Copy the style that we actually need. - SdStyleSheetPool* pBookmarkStyleSheetPool = dynamic_cast<SdStyleSheetPool*>(pBookmarkDoc->GetStyleSheetPool()); - SdStyleSheetPool* pStyleSheetPool = dynamic_cast<SdStyleSheetPool*>(GetStyleSheetPool()); + SdStyleSheetPool& rBookmarkStyleSheetPool = dynamic_cast<SdStyleSheetPool&>(*pBookmarkDoc->GetStyleSheetPool()); + SdStyleSheetPool& rStyleSheetPool = dynamic_cast<SdStyleSheetPool&>(*GetStyleSheetPool()); // When copying styles, also copy the master pages! if( !aLayoutsToTransfer.empty() ) @@ -499,7 +499,7 @@ sal_Bool SdDrawDocument::InsertBookmarkAsPage( SdStyleSheetVector aCreatedStyles; OUString layoutName = *pIter; - pStyleSheetPool->CopyLayoutSheets(layoutName, *pBookmarkStyleSheetPool,aCreatedStyles); + rStyleSheetPool.CopyLayoutSheets(layoutName, rBookmarkStyleSheetPool,aCreatedStyles); if(!aCreatedStyles.empty()) { @@ -519,12 +519,12 @@ sal_Bool SdDrawDocument::InsertBookmarkAsPage( OUString aRenameStr; if(!bReplace && !bNoDialogs) aRenameStr = OUString("_"); - pStyleSheetPool->RenameAndCopyGraphicSheets(*pBookmarkStyleSheetPool, aNewGraphicStyles, aRenameStr); + rStyleSheetPool.RenameAndCopyGraphicSheets(rBookmarkStyleSheetPool, aNewGraphicStyles, aRenameStr); SdStyleSheetVector aNewCellStyles; - pStyleSheetPool->CopyCellSheets(*pBookmarkStyleSheetPool, aNewCellStyles); + rStyleSheetPool.CopyCellSheets(rBookmarkStyleSheetPool, aNewCellStyles); // TODO handle undo of table styles too - pStyleSheetPool->CopyTableStyles(*pBookmarkStyleSheetPool); + rStyleSheetPool.CopyTableStyles(rBookmarkStyleSheetPool); // Insert document |