Kaydet (Commit) 5e354b17 authored tarafından Caolán McNamara's avatar Caolán McNamara Kaydeden (comit) Andras Timar

Related: rhbz#1255200 apparent missing stylesheet

Change-Id: Ice9a860ca839d37308b5c2f2eb639852fefe1d15
(cherry picked from commit dcb0738b)
Reviewed-on: https://gerrit.libreoffice.org/18240Reviewed-by: 's avatarJan Holesovsky <kendy@collabora.com>
Tested-by: 's avatarJan Holesovsky <kendy@collabora.com>
üst 3b450b17
...@@ -1081,14 +1081,19 @@ void SvxTableController::SetTableStyle( const SfxItemSet* pArgs ) ...@@ -1081,14 +1081,19 @@ void SvxTableController::SetTableStyle( const SfxItemSet* pArgs )
{ {
SfxItemSet aSet( xCell->GetItemSet() ); SfxItemSet aSet( xCell->GetItemSet() );
bool bChanges = false; bool bChanges = false;
const SfxItemSet& rStyleAttribs = xCell->GetStyleSheet()->GetItemSet(); SfxStyleSheet *pStyleSheet = xCell->GetStyleSheet();
SAL_WARN_IF(!pStyleSheet, "svx", "no stylesheet for table cell?");
for ( sal_uInt16 nWhich = SDRATTR_START; nWhich <= SDRATTR_TABLE_LAST; nWhich++ ) 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 ); if( (rStyleAttribs.GetItemState( nWhich ) == SfxItemState::SET) && (aSet.GetItemState( nWhich ) == SfxItemState::SET) )
bChanges = true; {
aSet.ClearItem( nWhich );
bChanges = true;
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment