Kaydet (Commit) 4ef268d2 authored tarafından Krisztian Pinter's avatar Krisztian Pinter Kaydeden (comit) Tomaž Vajngerl

Get more color attributes for document colors in Writer

Change-Id: I2005b434f20a56417105c7b26ce09155a7023023
üst 9dbc4cc7
......@@ -1932,14 +1932,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 );
}
}
}
......
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