Rohan_Kanojia

Untitled

May 8th, 2017
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.34 KB | None | 0 0
  1.                     SfxItemSet& aEditAttr = pStyleSheet->GetItemSet();
  2.                     aEditAttr.SetRanges(aRanges);
  3.                     if ( aEditAttr.GetItemState( EE_CHAR_BKGCOLOR, true, &pItem ) == SfxItemState::SET )
  4.                     {
  5.                         // extract Color outta SvxBackColorItem
  6.                         Color aBackColor = static_cast<const SvxBackgroundColorItem*>(pItem)->GetValue();
  7.                         // make new SvxBrushItem with this Color
  8.                         SvxBrushItem aBrushItem( aBackColor, SID_ATTR_BRUSH_CHAR );
  9.                         aEditAttr.ClearItem(EE_CHAR_BKGCOLOR);
  10.                         aEditAttr.Put(aBrushItem);
  11.                     }
  12.  
  13.                     SdStyleSheet::BroadcastSdStyleSheetChange(pStyleSheet, ePO, pSSPool);
  14.                     SfxItemSet resulatantSet = pStyleSheet->GetItemSet();
  15.                     if( !bOldDocInOtherLanguage )
  16.                     {
  17.                         pPresDlg.disposeAndReset(pFact ? pFact->CreateSdPresLayoutTemplateDlg( mpDocSh,  mpViewShell->GetActiveWindow(), SdResId(nDlgId), *pStyleSheet, ePO, pSSPool ) : nullptr);
  18.                     }
  19.  
  20.  
  21. But when i receive output item set, i don't see the SvxBrushItem i attached:
  22. (gdb) print aTempSet
  23. $5 = SfxItemSet of pool 0x1a26300 with parent 0x0 and Which ranges: [(3994, 4048), (10591, 10591)] = {
  24.  3994 = {<SfxEnumItem<SvxFrameDirection>> = {<SfxEnumItemInterface> = {<SfxPoolItem> = {
  25.          _vptr.SfxPoolItem = 0x2aaaaec48a10 <vtable for SvxFrameDirectionItem+16>, m_nRefCount = 3, m_nWhich = 3994,
  26.          m_nKind = SfxItemKind::NONE}, <No data fields>}, m_nValue = SvxFrameDirection::Horizontal_LR_TB}, <No data fields>}, 3995 = 0x0,
  27.  3996 = 0x0, 3997 = 0x0, 3998 = 0x0, 3999 = 0x0, 4000 = 0x0, 4001 = 0x0, 4002 = 0x0, 4003 = 0x0, 4004 = 0x0, 4005 = 0x0, 4006 = 0x0, 4007 = 0x0,
  28.  4008 = 0x0, 4009 = 0x0, 4010 = 0x0, 4011 = 0x0, 4012 = 0x0, 4013 = 0x0, 4014 = 0x0, 4015 = 0x0, 4016 = 0x0, 4017 = 0x0, 4018 = 0x0, 4019 = 0x0,
  29.  4020 = 0x0, 4021 = 0x0, 4022 = 0x0, 4023 = 0x0, 4024 = 0x0, 4025 = 0x0, 4026 = 0x0, 4027 = 0x0, 4028 = 0x0, 4029 = 0x0, 4030 = 0x0, 4031 = 0x0,
  30.  4032 = 0x0, 4033 = 0x0, 4034 = 0x0, 4035 = 0x0, 4036 = 0x0, 4037 = 0x0, 4038 = 0x0, 4039 = 0x0, 4040 = 0x0, 4041 = 0x0, 4042 = 0x0, 4043 = 0x0,
  31.  4044 = 0x0, 4045 = 0x0, 4046 = 0x0, 4047 = 0x0, 4048 = 0x0, 10591 = 0x0}
Add Comment
Please, Sign In to add comment