summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-03-28 16:19:43 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-03-28 22:14:31 +0100
commita1eeefa5c173332122a67fdcc0be070fb8f888c1 (patch)
treeed744dc042480af64695ff8a5e5870c18c9675fb
parentc4fcf9100cc1a4ad2dfe7f83bb80b56ba070c0b4 (diff)
fail early, limit scope
Change-Id: I0acd496c6276c59c0c53b1ee9503897800771a44
-rw-r--r--sw/source/core/unocore/unotbl.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index b59aa178eecb..2342be79ec30 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -1754,14 +1754,16 @@ void SwXTextTableCursor::setPropertyValue(const OUString& rPropertyName, const u
SwUnoCrsr* pUnoCrsr = GetCrsr();
if(!pUnoCrsr)
return;
- auto pSttNode = pUnoCrsr->GetNode().StartOfSectionNode();
- const SwTableNode* pTblNode = pSttNode->FindTableNode();
- lcl_FormatTable(pTblNode->GetTable().GetFrmFmt());
auto pEntry(m_pPropSet->getPropertyMap().getByName(rPropertyName));
if(!pEntry)
throw beans::UnknownPropertyException("Unknown property: " + rPropertyName, static_cast<cppu::OWeakObject*>(this));
if(pEntry->nFlags & beans::PropertyAttribute::READONLY)
throw beans::PropertyVetoException("Property is read-only: " + rPropertyName, static_cast<cppu::OWeakObject*>(this));
+ {
+ auto pSttNode = pUnoCrsr->GetNode().StartOfSectionNode();
+ const SwTableNode* pTblNode = pSttNode->FindTableNode();
+ lcl_FormatTable(pTblNode->GetTable().GetFrmFmt());
+ }
auto& rTblCrsr = dynamic_cast<SwUnoTableCrsr&>(*pUnoCrsr);
rTblCrsr.MakeBoxSels();
SwDoc* pDoc = pUnoCrsr->GetDoc();