summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/ww8atr.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/filter/ww8/ww8atr.cxx')
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx13
1 files changed, 11 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 41d0f2f3738c..8249c5d9b9c2 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -3757,8 +3757,17 @@ void WW8AttributeOutput::FormatTextGrid( const SwTextGridItem& rGrid )
UINT16 nHeight = rGrid.GetBaseHeight() + rGrid.GetRubyHeight();
m_rWW8Export.InsUInt16( NS_sprm::LN_SDyaLinePitch );
m_rWW8Export.InsUInt16( nHeight );
- sal_uInt32 nPageCharSize = ItemGet<SvxFontHeightItem>(*(m_rWW8Export.pStyles->GetSwFmt()),
- RES_CHRATR_CJK_FONTSIZE).GetHeight();
+
+ WW8WrtStyle * pStyles = rWrtWW8.pStyles;
+ SwFmt * pSwFmt = pStyles->GetSwFmt();
+
+ sal_uInt32 nPageCharSize = 0;
+
+ if (pSwFmt != NULL)
+ {
+ nPageCharSize = ItemGet<SvxFontHeightItem>
+ (*pSwFmt, RES_CHRATR_CJK_FONTSIZE).GetHeight();
+ }
INT32 nCharWidth = rGrid.GetBaseWidth() - nPageCharSize;
INT32 nFraction = 0;