diff options
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/tabpages/align.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx index 1994a7e8699c..ead7d7d4f014 100644 --- a/cui/source/tabpages/align.cxx +++ b/cui/source/tabpages/align.cxx @@ -298,7 +298,12 @@ bool AlignmentTabPage::FillItemSet( SfxItemSet* rSet ) if (m_xBtnHyphen->get_state_changed_from_saved()) { - rSet->Put(SfxBoolItem(GetWhich(SID_ATTR_ALIGN_HYPHENATION), m_xBtnHyphen->get_active())); + const SfxBoolItem* pHyphItem = static_cast<const SfxBoolItem*>(GetOldItem( + *rSet, SID_ATTR_ALIGN_HYPHENATION)); + assert(pHyphItem); + std::unique_ptr<SfxBoolItem> pNewHyphItem(static_cast<SfxBoolItem*>(pHyphItem->Clone())); + pNewHyphItem->SetValue(m_xBtnHyphen->get_active()); + rSet->Put(*pNewHyphItem); bChanged = true; } |