|
|
6ac2ff1 |
From 33b00ec6736db24cac3571904df272a1df59578e Mon Sep 17 00:00:00 2001
|
|
|
6ac2ff1 |
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
|
|
|
6ac2ff1 |
Date: Tue, 1 Sep 2015 12:45:03 +0100
|
|
|
6ac2ff1 |
Subject: [PATCH] Related: rhbz#1255200 apparent missing stylesheet
|
|
|
6ac2ff1 |
|
|
|
6ac2ff1 |
(cherry picked from commit dcb0738b631c61999364bd8500f401f93bbfb84e)
|
|
|
6ac2ff1 |
|
|
|
6ac2ff1 |
Change-Id: Ice9a860ca839d37308b5c2f2eb639852fefe1d15
|
|
|
6ac2ff1 |
---
|
|
|
6ac2ff1 |
svx/source/table/tablecontroller.cxx | 17 +++++++++++------
|
|
|
6ac2ff1 |
1 file changed, 11 insertions(+), 6 deletions(-)
|
|
|
6ac2ff1 |
|
|
|
6ac2ff1 |
diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx
|
|
|
6ac2ff1 |
index f7a5468..ab121bc 100644
|
|
|
6ac2ff1 |
--- a/svx/source/table/tablecontroller.cxx
|
|
|
6ac2ff1 |
+++ b/svx/source/table/tablecontroller.cxx
|
|
|
6ac2ff1 |
@@ -1054,14 +1054,19 @@ void SvxTableController::SetTableStyle( const SfxItemSet* pArgs )
|
|
|
6ac2ff1 |
{
|
|
|
6ac2ff1 |
SfxItemSet aSet( xCell->GetItemSet() );
|
|
|
6ac2ff1 |
bool bChanges = false;
|
|
|
6ac2ff1 |
- const SfxItemSet& rStyleAttribs = xCell->GetStyleSheet()->GetItemSet();
|
|
|
6ac2ff1 |
-
|
|
|
6ac2ff1 |
- for ( sal_uInt16 nWhich = SDRATTR_START; nWhich <= SDRATTR_TABLE_LAST; nWhich++ )
|
|
|
6ac2ff1 |
+ SfxStyleSheet *pStyleSheet = xCell->GetStyleSheet();
|
|
|
6ac2ff1 |
+ SAL_WARN_IF(!pStyleSheet, "svx", "no stylesheet for table cell?");
|
|
|
6ac2ff1 |
+ if (pStyleSheet)
|
|
|
6ac2ff1 |
{
|
|
|
6ac2ff1 |
- if( (rStyleAttribs.GetItemState( nWhich ) == SFX_ITEM_ON) && (aSet.GetItemState( nWhich ) == SFX_ITEM_ON) )
|
|
|
6ac2ff1 |
+ const SfxItemSet& rStyleAttribs = pStyleSheet->GetItemSet();
|
|
|
6ac2ff1 |
+
|
|
|
6ac2ff1 |
+ for ( sal_uInt16 nWhich = SDRATTR_START; nWhich <= SDRATTR_TABLE_LAST; nWhich++ )
|
|
|
6ac2ff1 |
{
|
|
|
6ac2ff1 |
- aSet.ClearItem( nWhich );
|
|
|
6ac2ff1 |
- bChanges = true;
|
|
|
6ac2ff1 |
+ if( (rStyleAttribs.GetItemState( nWhich ) == SFX_ITEM_ON) && (aSet.GetItemState( nWhich ) == SFX_ITEM_ON) )
|
|
|
6ac2ff1 |
+ {
|
|
|
6ac2ff1 |
+ aSet.ClearItem( nWhich );
|
|
|
6ac2ff1 |
+ bChanges = true;
|
|
|
6ac2ff1 |
+ }
|
|
|
6ac2ff1 |
}
|
|
|
6ac2ff1 |
}
|
|
|
6ac2ff1 |
|
|
|
6ac2ff1 |
--
|
|
|
6ac2ff1 |
2.4.0
|
|
|
6ac2ff1 |
|