diff options
author | Thomas Lange [tl] <tl@openoffice.org> | 2010-11-12 10:40:17 +0100 |
---|---|---|
committer | Thomas Lange [tl] <tl@openoffice.org> | 2010-11-12 10:40:17 +0100 |
commit | b86664061c2971a6f1d910301d1895b0f2043709 (patch) | |
tree | 6226fdea5f8c1bcfa0b6e2dcb0c2db376c511dd3 | |
parent | 4180a002a6668df0f6550c37f7d23b7253c46c85 (diff) |
cws tlmath01: #i972# insert frame crash fixed
-rw-r--r-- | sw/source/ui/frmdlg/frmpage.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index 384d3af40f..50e9754450 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -680,7 +680,7 @@ SwFrmPage::SwFrmPage ( Window *pParent, const SfxItemSet &rSet ) : pHMap( 0 ), m_bAllowVertPositioning( true ), m_bIsMathOLE( false ), - m_bIsMathBaselineAlignment( false ) + m_bIsMathBaselineAlignment( true ) { FreeResource(); SetExchangeSupport(); @@ -785,11 +785,14 @@ void SwFrmPage::Reset( const SfxItemSet &rSet ) SetMetric( aAtHorzPosED, aMetric ); SetMetric( aAtVertPosED, aMetric ); + const SfxPoolItem* pItem = NULL; const SwFmtAnchor& rAnchor = (const SwFmtAnchor&)rSet.Get(RES_ANCHOR); - m_bIsMathOLE = ((const SfxBoolItem&)rSet.Get( FN_OLE_IS_MATH )).GetValue(); - m_bIsMathBaselineAlignment = ((const SfxBoolItem&)rSet.Get( FN_MATH_BASELINE_ALIGNMENT )).GetValue(); + if (SFX_ITEM_SET == rSet.GetItemState(FN_OLE_IS_MATH, FALSE, &pItem)) + m_bIsMathOLE = ((const SfxBoolItem*)pItem)->GetValue(); + if (SFX_ITEM_SET == rSet.GetItemState(FN_MATH_BASELINE_ALIGNMENT, FALSE, &pItem)) + m_bIsMathBaselineAlignment = ((const SfxBoolItem*)pItem)->GetValue(); EnableVerticalPositioning( !(m_bIsMathOLE && m_bIsMathBaselineAlignment && FLY_AS_CHAR == rAnchor.GetAnchorId()) ); @@ -820,7 +823,6 @@ void SwFrmPage::Reset( const SfxItemSet &rSet ) if ( nDlgType == DLG_FRM_GRF || nDlgType == DLG_FRM_OLE ) { ASSERT(pSh , "shell not found"); - const SfxPoolItem* pItem; //OS: nur fuer die Variante Einfuegen/Grafik/Eigenschaften if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_GRF_REALSIZE, FALSE, &pItem)) aGrfSize = ((const SvxSizeItem*)pItem)->GetSize(); |