summaryrefslogtreecommitdiff
path: root/svx/source/table/tablerow.cxx
diff options
context:
space:
mode:
authorArmin Le Grand <Armin.Le.Grand@cib.de>2018-04-06 22:32:24 +0200
committerArmin Le Grand <Armin.Le.Grand@cib.de>2018-04-06 22:32:24 +0200
commiteba4d5b2b76cefde90cb3d6638c736f435023a45 (patch)
tree43befa620475c11f3dde00e5ea141e1efd95a334 /svx/source/table/tablerow.cxx
parent6c14c27c75a03e2363f2b363ddf0a6f2f46cfa91 (diff)
Revert "SOSAW080: Added first bunch of basic changes to helpers"
This reverts commit 6c14c27c75a03e2363f2b363ddf0a6f2f46cfa91.
Diffstat (limited to 'svx/source/table/tablerow.cxx')
-rw-r--r--svx/source/table/tablerow.cxx18
1 files changed, 8 insertions, 10 deletions
diff --git a/svx/source/table/tablerow.cxx b/svx/source/table/tablerow.cxx
index cf765b47830a..43010ad698fe 100644
--- a/svx/source/table/tablerow.cxx
+++ b/svx/source/table/tablerow.cxx
@@ -206,15 +206,14 @@ void SAL_CALL TableRow::setName( const OUString& aName )
void SAL_CALL TableRow::setFastPropertyValue( sal_Int32 nHandle, const Any& aValue )
{
- if(!mxTableModel.is() || nullptr == mxTableModel->getSdrTableObj())
- return;
+ bool bOk = false;
+ bool bChange = false;
- SdrTableObj& rTableObj(*mxTableModel->getSdrTableObj());
- SdrModel& rModel(rTableObj.getSdrModelFromSdrObject());
- bool bOk(false);
- bool bChange(false);
- TableRowUndo* pUndo(nullptr);
- const bool bUndo(rTableObj.IsInserted() && rModel.IsUndoEnabled());
+ TableRowUndo* pUndo = nullptr;
+
+ SdrModel* pModel = mxTableModel->getSdrTableObj()->GetModel();
+
+ const bool bUndo = mxTableModel.is() && mxTableModel->getSdrTableObj() && mxTableModel->getSdrTableObj()->IsInserted() && pModel && pModel->IsUndoEnabled();
if( bUndo )
{
@@ -277,7 +276,6 @@ void SAL_CALL TableRow::setFastPropertyValue( sal_Int32 nHandle, const Any& aVal
delete pUndo;
throw UnknownPropertyException( OUString::number(nHandle), static_cast<cppu::OWeakObject*>(this));
}
-
if( !bOk )
{
delete pUndo;
@@ -288,7 +286,7 @@ void SAL_CALL TableRow::setFastPropertyValue( sal_Int32 nHandle, const Any& aVal
{
if( pUndo )
{
- rModel.AddUndo( pUndo );
+ pModel->AddUndo( pUndo );
pUndo = nullptr;
}
mxTableModel->setModified(true);