diff options
author | Alex Ivan <alexnivan@yahoo.com> | 2013-07-29 13:57:47 +0300 |
---|---|---|
committer | Alex Ivan <alexnivan@yahoo.com> | 2013-07-29 13:57:47 +0300 |
commit | 1658441f88b267f6e2ba0344066bbddca444ecc4 (patch) | |
tree | 14ec543844cbe10dc0eb921121f580c1a6a4ae2d /sw/source/core/doc/swtblfmt.cxx | |
parent | 5d8b4793247eedb5d02c52356d0dcc37d45290a1 (diff) |
Fix RepeatHeading storage in SwTableFmt
Fixed an issue where improper storage of the RepeatHeading value
in SwTableFmt would cause a crash upon attempting to retrieve
the value.
Change-Id: I655d4f1f9760bc9e95c53c8fe292ea761e25fefd
Diffstat (limited to 'sw/source/core/doc/swtblfmt.cxx')
-rw-r--r-- | sw/source/core/doc/swtblfmt.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sw/source/core/doc/swtblfmt.cxx b/sw/source/core/doc/swtblfmt.cxx index 15c63c7bfe1b..db24264196e3 100644 --- a/sw/source/core/doc/swtblfmt.cxx +++ b/sw/source/core/doc/swtblfmt.cxx @@ -238,7 +238,12 @@ sal_Bool SwTableFmt::GetRowSplit() const sal_uInt16 SwTableFmt::GetRepeatHeading() const { - return (static_cast<const SfxUInt16Item&>( GetFmtAttr( FN_PARAM_TABLE_HEADLINE ) )).GetValue(); + const SfxPoolItem* pItem; + + if( SFX_ITEM_SET == GetItemState( FN_PARAM_TABLE_HEADLINE, sal_False, &pItem ) ) + return ((const SfxUInt16Item*)pItem)->GetValue(); + + return 0; } void SwTableFmt::RestoreTableProperties( SwTableFmt* pSrcFmt, SwTable &table ) |