summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrisztian Pinter <pin.terminator@gmail.com>2014-06-19 18:26:54 +0200
committerKrisztian Pinter <pin.terminator@gmail.com>2014-07-25 17:14:10 +0200
commit966473d87b6dae1f32b039fe38e4c0fec1f82702 (patch)
tree7d545c7b2cfda3995f4dc08f591f51befdee574d
parentd26944b588d6411b300e36c918726ac9ec2f2438 (diff)
Get more color attributes for document colors in Writer
Change-Id: I2005b434f20a56417105c7b26ce09155a7023023
-rw-r--r--sw/source/core/doc/docfmt.cxx17
1 files changed, 11 insertions, 6 deletions
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index 89d720cec1df..15086c1af823 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -1906,14 +1906,19 @@ std::vector<Color> SwDoc::GetDocColors()
while( nWhich )
{
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET == pItemSet->GetItemState( nWhich, false, &pItem ) &&
- RES_CHRATR_COLOR == pItem->Which() )
+ if( SFX_ITEM_SET == pItemSet->GetItemState( nWhich, false, &pItem ) )
{
- Color aColor( ((SvxColorItem*)pItem)->GetValue() );
- if( COL_AUTO != aColor.GetColor() &&
- std::find(docColors.begin(), docColors.end(), aColor) == docColors.end() )
+ sal_uInt16 aWhich = pItem->Which();
+ if( RES_CHRATR_COLOR == aWhich ||
+ RES_CHRATR_HIGHLIGHT == aWhich ||
+ RES_BACKGROUND == aWhich )
{
- docColors.push_back( aColor );
+ Color aColor( ((SvxColorItem*)pItem)->GetValue() );
+ if( COL_AUTO != aColor.GetColor() &&
+ std::find(docColors.begin(), docColors.end(), aColor) == docColors.end() )
+ {
+ docColors.push_back( aColor );
+ }
}
}