summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-09-01 12:45:03 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-09-01 12:48:26 +0100
commitdcb0738b631c61999364bd8500f401f93bbfb84e (patch)
treeac0ae2bd1cdd8722374092e87b87cfcc5279fc2a /svx
parent8002f0ddc805251e6f0f550bf8526aab8603c5df (diff)
Related: rhbz#1255200 apparent missing stylesheet
Change-Id: Ice9a860ca839d37308b5c2f2eb639852fefe1d15
Diffstat (limited to 'svx')
-rw-r--r--svx/source/table/tablecontroller.cxx17
1 files changed, 11 insertions, 6 deletions
diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx
index 8b4bd29c776a..2fbb606c4c7a 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;
+ }
}
}