summaryrefslogtreecommitdiff
path: root/svx/source/table
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-10-29 09:08:21 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-10-29 10:40:08 +0000
commit836023dedc36cbfe946c42d629ece34174c6bd2b (patch)
tree4348c53ae2e8e3af5cc3f50264ecad1703bbb1ad /svx/source/table
parent9b8f91d348a51b0f0cd1bedb5168c2ca0888505a (diff)
coverity#1242433 SdrMakeOutliner alway derefs pMod
so change from a pointer to a reference Change-Id: I81eb2c9e4df8353fbbdad7058c6ca7ea22286e62
Diffstat (limited to 'svx/source/table')
-rw-r--r--svx/source/table/tablecontroller.cxx6
-rw-r--r--svx/source/table/tablertfimporter.cxx2
2 files changed, 4 insertions, 4 deletions
diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx
index 13699d485483..3ef0370b00ef 100644
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -1825,11 +1825,11 @@ void SvxTableController::EditCell( const CellPos& rPos, vcl::Window* pWindow, co
pTableObj->setActiveCell( aPos );
// create new outliner, owner will be the SdrObjEditView
- SdrOutliner* pOutl = SdrMakeOutliner( OUTLINERMODE_OUTLINEOBJECT, mpModel );
- if( pTableObj->IsVerticalWriting() )
+ SdrOutliner* pOutl = mpModel ? SdrMakeOutliner(OUTLINERMODE_OUTLINEOBJECT, *mpModel) : NULL;
+ if (pOutl && pTableObj->IsVerticalWriting())
pOutl->SetVertical( true );
- if(mpView->SdrBeginTextEdit(pTableObj, pPV, pWindow, true, pOutl))
+ if (mpView->SdrBeginTextEdit(pTableObj, pPV, pWindow, true, pOutl))
{
maCursorLastPos = maCursorFirstPos = rPos;
diff --git a/svx/source/table/tablertfimporter.cxx b/svx/source/table/tablertfimporter.cxx
index fe7bf94abb25..caf0570e2306 100644
--- a/svx/source/table/tablertfimporter.cxx
+++ b/svx/source/table/tablertfimporter.cxx
@@ -127,7 +127,7 @@ private:
SdrTableRTFParser::SdrTableRTFParser( SdrTableObj& rTableObj )
: mrTableObj( rTableObj )
-, mpOutliner( SdrMakeOutliner( OUTLINERMODE_TEXTOBJECT, rTableObj.GetModel() ) )
+, mpOutliner( SdrMakeOutliner( OUTLINERMODE_TEXTOBJECT, *rTableObj.GetModel() ) )
, mrItemPool( rTableObj.GetModel()->GetItemPool() )
, mnLastToken( 0 )
, mbNewDef( false )