diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/unocore/unoframe.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index 1be52ee6113a..fd28f3bd2424 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -2262,8 +2262,9 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName) } else if(WID_LAYOUT_SIZE == pEntry->nWID) { - // format document completely in order to get correct value - pFormat->GetDoc()->GetEditShell()->CalcLayout(); + // format document completely in order to get correct value (no EditShell for ole embedded case) + if (SwEditShell* pEditShell = pFormat->GetDoc()->GetEditShell()) + pEditShell->CalcLayout(); SwFrame* pTmpFrame = SwIterator<SwFrame,SwFormat>( *pFormat ).First(); if ( pTmpFrame ) |