diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-09-01 12:45:03 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-09-18 10:09:53 +0200 |
commit | 5e354b17a9d43aac72b64643a0211b01d2a5ff82 (patch) | |
tree | e5e60aea829dc2a4fa7092069d9ca49a7ccc9136 /svx | |
parent | 3b450b1723364f729b28d00adea66104f4353fad (diff) |
Related: rhbz#1255200 apparent missing stylesheet
Change-Id: Ice9a860ca839d37308b5c2f2eb639852fefe1d15
(cherry picked from commit dcb0738b631c61999364bd8500f401f93bbfb84e)
Reviewed-on: https://gerrit.libreoffice.org/18240
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/table/tablecontroller.cxx | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx index 38a41b5ae04f..64b40da926c2 100644 --- a/svx/source/table/tablecontroller.cxx +++ b/svx/source/table/tablecontroller.cxx @@ -1081,14 +1081,19 @@ void SvxTableController::SetTableStyle( const SfxItemSet* pArgs ) { SfxItemSet aSet( xCell->GetItemSet() ); bool bChanges = false; - const SfxItemSet& rStyleAttribs = xCell->GetStyleSheet()->GetItemSet(); - - for ( sal_uInt16 nWhich = SDRATTR_START; nWhich <= SDRATTR_TABLE_LAST; nWhich++ ) + SfxStyleSheet *pStyleSheet = xCell->GetStyleSheet(); + SAL_WARN_IF(!pStyleSheet, "svx", "no stylesheet for table cell?"); + if (pStyleSheet) { - if( (rStyleAttribs.GetItemState( nWhich ) == SfxItemState::SET) && (aSet.GetItemState( nWhich ) == SfxItemState::SET) ) + const SfxItemSet& rStyleAttribs = pStyleSheet->GetItemSet(); + + for ( sal_uInt16 nWhich = SDRATTR_START; nWhich <= SDRATTR_TABLE_LAST; nWhich++ ) { - aSet.ClearItem( nWhich ); - bChanges = true; + if( (rStyleAttribs.GetItemState( nWhich ) == SfxItemState::SET) && (aSet.GetItemState( nWhich ) == SfxItemState::SET) ) + { + aSet.ClearItem( nWhich ); + bChanges = true; + } } } |