Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const SfxPoolItem *pItem = nullptr;
- SfxItemSet aTempItem(*pOrgSet);
- /*
- static const sal_uInt16 aRanges[] = {
- SDRATTR_START, SDRATTR_END,
- EE_ITEMS_START, EE_ITEMS_END,
- SID_ATTR_BRUSH_CHAR, SID_ATTR_BRUSH_CHAR, 0
- };
- */
- if( IS_OUTLINE(ePO))
- {
- // Unfortunately, the Itemsets of our style sheets are not discreet..
- const sal_uInt16* pPtr = pOrgSet->GetRanges();
- sal_uInt16 p1, p2;
- while( *pPtr )
- {
- p1 = pPtr[0];
- p2 = pPtr[1];
- // first, we make it discreet
- while(pPtr[2] && (pPtr[2] - p2 == 1))
- {
- p2 = pPtr[3];
- pPtr += 2;
- }
- aInputSet.MergeRange( p1, p2 );
- pPtr += 2;
- }
- aInputSet.Put( rStyleBase.GetItemSet() );
- // need parent-relationship
- const SfxItemSet* pParentItemSet = rStyleBase.GetItemSet().GetParent();
- if( pParentItemSet )
- aInputSet.SetParent( pParentItemSet );
- pOutSet = new SfxItemSet( rStyleBase.GetItemSet() );
- pOutSet->ClearItem();
- // If there is no bullet item in this stylesheet, we get it
- // from 'Outline 1' style sheet.
- if( SfxItemState::SET != aInputSet.GetItemState(EE_PARA_NUMBULLET, false, &pItem ))
- {
- OUString aStyleName(SD_RESSTR(STR_PSEUDOSHEET_OUTLINE) + " 1");
- SfxStyleSheetBase* pFirstStyleSheet = pSSPool->Find( aStyleName, SD_STYLE_FAMILY_PSEUDO);
- if(pFirstStyleSheet)
- if( SfxItemState::SET == pFirstStyleSheet->GetItemSet().GetItemState(EE_PARA_NUMBULLET, false, &pItem) )
- aInputSet.Put( *pItem );
- }
- // preselect selected layer in dialog
- aInputSet.Put( SfxUInt16Item( SID_PARAM_CUR_NUM_LEVEL, 1<<GetOutlineLevel()));
- SetInputSet( &aInputSet );
- }
- else
- SetInputSet( pOrgSet );
- /*
- * Adjusting item set since background tabpage can only work
- * with SvxBrushItems, EE_CHAR_BKGCOLOR is SvxBackgroundColorItem.
- */
- if ( pOrgSet->GetItemState( EE_CHAR_BKGCOLOR, true, &pItem ) == SfxItemState::SET )
- {
- aInputSet.SetRanges(pOrgSet->GetRanges());
- aInputSet.MergeRange(EE_ITEMS_START, EE_ITEMS_END);
- aInputSet.MergeRange(SID_ATTR_BRUSH_CHAR, SID_ATTR_BRUSH_CHAR+1);
- aInputSet.Put(rStyleBase.GetItemSet());
- /* extract Color outta SvxBackColorItem */
- Color aBackColor = static_cast<const SvxBackgroundColorItem*>(pItem)->GetValue();
- /* make new SvxBrushItem with this Color */
- SvxBrushItem aBrushItem( aBackColor, SID_ATTR_BRUSH_CHAR );
- aInputSet.ClearItem( EE_CHAR_BKGCOLOR);
- /* and stick it into the set */
- aInputSet.Put( aBrushItem );
- SetInputSet(&aInputSet);
- }
- SvxColorListItem aColorListItem(*static_cast<const SvxColorListItem*>( mpDocShell->GetItem( SID_COLOR_TABLE ) ) );
- SvxGradientListItem aGradientListItem(*static_cast<const SvxGradientListItem*>( mpDocShell->GetItem( SID_GRADIENT_LIST ) ) );
Add Comment
Please, Sign In to add comment