diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-06-19 09:15:04 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-06-19 10:26:50 +0100 |
commit | 67820a90370513cd65cd7f042c1d0dea6fb0965f (patch) | |
tree | 7d53cf940b8e4457af578e25e7a4a6fb0b012bf7 /sw/source/core/doc/DocumentDrawModelManager.cxx | |
parent | 9191f44fed1e1ede6a5efcaac6bc92bbe74305ec (diff) |
coverity#705037 Unchecked dynamic_cast
Change-Id: I9f6c8ceafd09b4a5d4e951e01e1a06b2b5265181
Diffstat (limited to 'sw/source/core/doc/DocumentDrawModelManager.cxx')
-rw-r--r-- | sw/source/core/doc/DocumentDrawModelManager.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sw/source/core/doc/DocumentDrawModelManager.cxx b/sw/source/core/doc/DocumentDrawModelManager.cxx index e87ae39e9b23..7dc30f947837 100644 --- a/sw/source/core/doc/DocumentDrawModelManager.cxx +++ b/sw/source/core/doc/DocumentDrawModelManager.cxx @@ -98,7 +98,7 @@ void DocumentDrawModelManager::InitDrawModel() m_rSwdoc.GetAttrPool().SetPoolDefaultItem(SvxFontHeightItem( 240, 100, EE_CHAR_FONTHEIGHT )); SAL_INFO( "sw.doc", "before create DrawDocument" ); - // The document owns the SdrModel. We always have two layers and one page. + // The document owns the SwDrawDocument. We always have two layers and one page. mpDrawModel = new SwDrawDocument( &m_rSwdoc ); mpDrawModel->EnableUndo( m_rSwdoc.GetIDocumentUndoRedo().DoesUndo() ); @@ -196,17 +196,17 @@ void DocumentDrawModelManager::ReleaseDrawModel() -const SdrModel* DocumentDrawModelManager::GetDrawModel() const +const SwDrawDocument* DocumentDrawModelManager::GetDrawModel() const { return mpDrawModel; } -SdrModel* DocumentDrawModelManager::GetDrawModel() +SwDrawDocument* DocumentDrawModelManager::GetDrawModel() { return mpDrawModel; } -SdrModel* DocumentDrawModelManager::_MakeDrawModel() +SwDrawDocument* DocumentDrawModelManager::_MakeDrawModel() { OSL_ENSURE( !mpDrawModel, "_MakeDrawModel: Why?" ); InitDrawModel(); @@ -229,7 +229,7 @@ SdrModel* DocumentDrawModelManager::_MakeDrawModel() return mpDrawModel; } -SdrModel* DocumentDrawModelManager::GetOrCreateDrawModel() +SwDrawDocument* DocumentDrawModelManager::GetOrCreateDrawModel() { return GetDrawModel() ? GetDrawModel() : _MakeDrawModel(); } |