parent
00e2674654
commit
571f9872dc
@ -1,392 +0,0 @@
|
|||||||
From 79aa7096421965e6931a893186a64dee6d9c6400 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
|
|
||||||
Date: Fri, 11 Aug 2017 11:51:09 +0100
|
|
||||||
Subject: [PATCH] add char highlighting (background) tab to graphics styles
|
|
||||||
dialog
|
|
||||||
|
|
||||||
move the SvxBackgroundColorItem<->SvxBrushItem conversion
|
|
||||||
|
|
||||||
into the dialog itself
|
|
||||||
|
|
||||||
Change-Id: I83db9f02145a4927257dd5691f82dad1a11eaea6
|
|
||||||
|
|
||||||
improve scoping a little
|
|
||||||
|
|
||||||
Change-Id: Ie2e86852f7c4754070d3eb7e8981d674f04a6d80
|
|
||||||
(cherry picked from commit a162b21c2b393534a9f6433c9b2b674aaaecf1a7)
|
|
||||||
|
|
||||||
Change-Id: I2cf3872116ae59051847d73612a2f4f8385d34d8
|
|
||||||
---
|
|
||||||
cui/source/inc/backgrnd.hxx | 1 +
|
|
||||||
cui/source/tabpages/backgrnd.cxx | 104 +++++++++++++++++++++++-------
|
|
||||||
include/svx/flagsdef.hxx | 11 ++--
|
|
||||||
sd/source/ui/dlg/dlgchar.cxx | 2 +-
|
|
||||||
sd/source/ui/dlg/tabtempl.cxx | 7 ++
|
|
||||||
sd/source/ui/func/fuchar.cxx | 26 +-------
|
|
||||||
sd/source/ui/inc/tabtempl.hxx | 1 +
|
|
||||||
sd/uiconfig/simpress/ui/templatedialog.ui | 14 ++++
|
|
||||||
8 files changed, 113 insertions(+), 53 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/cui/source/inc/backgrnd.hxx b/cui/source/inc/backgrnd.hxx
|
|
||||||
index d95fe60..351477f 100644
|
|
||||||
--- a/cui/source/inc/backgrnd.hxx
|
|
||||||
+++ b/cui/source/inc/backgrnd.hxx
|
|
||||||
@@ -107,6 +107,7 @@ private:
|
|
||||||
bool bIsGraphicValid : 1;
|
|
||||||
bool bLinkOnly : 1;
|
|
||||||
bool bHighlighting : 1;
|
|
||||||
+ bool bCharBackColor : 1;
|
|
||||||
bool m_bColorSelected : 1;
|
|
||||||
Graphic aBgdGraphic;
|
|
||||||
OUString aBgdGraphicPath;
|
|
||||||
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
|
|
||||||
index d5acbd4..762edcf 100644
|
|
||||||
--- a/cui/source/tabpages/backgrnd.cxx
|
|
||||||
+++ b/cui/source/tabpages/backgrnd.cxx
|
|
||||||
@@ -39,6 +39,7 @@
|
|
||||||
#include <editeng/eerdll.hxx>
|
|
||||||
|
|
||||||
#include <editeng/brushitem.hxx>
|
|
||||||
+#include <editeng/colritem.hxx>
|
|
||||||
#include "backgrnd.hxx"
|
|
||||||
|
|
||||||
#include <svx/xtable.hxx>
|
|
||||||
@@ -331,6 +332,7 @@ SvxBackgroundTabPage::SvxBackgroundTabPage(vcl::Window* pParent, const SfxItemSe
|
|
||||||
, bIsGraphicValid(false)
|
|
||||||
, bLinkOnly(false)
|
|
||||||
, bHighlighting(false)
|
|
||||||
+ , bCharBackColor(false)
|
|
||||||
, m_bColorSelected(false)
|
|
||||||
, pPageImpl(new SvxBackgroundPage_Impl)
|
|
||||||
, pImportDlg(nullptr)
|
|
||||||
@@ -461,7 +463,7 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet* rSet )
|
|
||||||
|
|
||||||
|
|
||||||
// get and evaluate Input-BrushItem
|
|
||||||
- const SvxBrushItem* pBgdAttr = nullptr;
|
|
||||||
+ bool bBrushItemSet = false;
|
|
||||||
sal_uInt16 nSlot = SID_ATTR_BRUSH;
|
|
||||||
const SfxPoolItem* pItem;
|
|
||||||
sal_uInt16 nDestValue = USHRT_MAX;
|
|
||||||
@@ -489,20 +491,39 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet* rSet )
|
|
||||||
{
|
|
||||||
nSlot = SID_ATTR_BRUSH_CHAR;
|
|
||||||
}
|
|
||||||
+ else if( bCharBackColor )
|
|
||||||
+ {
|
|
||||||
+ nSlot = SID_ATTR_CHAR_BACK_COLOR;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
//#111173# the destination item is missing when the parent style has been changed
|
|
||||||
if(USHRT_MAX == nDestValue && m_pTblLBox->IsVisible())
|
|
||||||
nDestValue = 0;
|
|
||||||
- sal_uInt16 nWhich = GetWhich( nSlot );
|
|
||||||
+ sal_uInt16 nWhich = GetWhich(nSlot);
|
|
||||||
+ SvxBrushItem aBgdAttr(nWhich);
|
|
||||||
|
|
||||||
- if ( rSet->GetItemState( nWhich, false ) >= SfxItemState::DEFAULT )
|
|
||||||
- pBgdAttr = static_cast<const SvxBrushItem*>(&( rSet->Get( nWhich ) ));
|
|
||||||
+ if (rSet->GetItemState( nWhich, false ) >= SfxItemState::DEFAULT)
|
|
||||||
+ {
|
|
||||||
+ if (!bCharBackColor)
|
|
||||||
+ aBgdAttr = static_cast<const SvxBrushItem&>(rSet->Get(nWhich));
|
|
||||||
+ else
|
|
||||||
+ {
|
|
||||||
+ // EE_CHAR_BKGCOLOR is SvxBackgroundColorItem, but char background tabpage
|
|
||||||
+ // can only work with SvxBrushItems
|
|
||||||
+ // extract Color out of SvxBackColorItem
|
|
||||||
+ Color aBackColor = static_cast<const SvxBackgroundColorItem&>(rSet->Get(nWhich)).GetValue();
|
|
||||||
+ // make new SvxBrushItem with this Color
|
|
||||||
+ aBgdAttr = SvxBrushItem(aBackColor, SID_ATTR_BRUSH_CHAR);
|
|
||||||
+ }
|
|
||||||
+ bBrushItemSet = true;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
m_pBtnTile->Check();
|
|
||||||
|
|
||||||
- if ( pBgdAttr )
|
|
||||||
+ if (bBrushItemSet)
|
|
||||||
{
|
|
||||||
- FillControls_Impl(*pBgdAttr, aUserData);
|
|
||||||
- aBgdColor = const_cast<SvxBrushItem*>(pBgdAttr)->GetColor();
|
|
||||||
+ FillControls_Impl(aBgdAttr, aUserData);
|
|
||||||
+ aBgdColor = const_cast<SvxBrushItem&>(aBgdAttr).GetColor();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
@@ -537,22 +558,22 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet* rSet )
|
|
||||||
nWhich = GetWhich( SID_ATTR_BRUSH );
|
|
||||||
if ( rSet->GetItemState( nWhich, false ) >= SfxItemState::DEFAULT )
|
|
||||||
{
|
|
||||||
- pBgdAttr = static_cast<const SvxBrushItem*>(&( rSet->Get( nWhich ) ));
|
|
||||||
- pTableBck_Impl->pCellBrush = new SvxBrushItem(*pBgdAttr);
|
|
||||||
+ aBgdAttr = static_cast<const SvxBrushItem&>(rSet->Get(nWhich));
|
|
||||||
+ pTableBck_Impl->pCellBrush = new SvxBrushItem(aBgdAttr);
|
|
||||||
}
|
|
||||||
pTableBck_Impl->nCellWhich = nWhich;
|
|
||||||
|
|
||||||
if ( rSet->GetItemState( SID_ATTR_BRUSH_ROW, false ) >= SfxItemState::DEFAULT )
|
|
||||||
{
|
|
||||||
- pBgdAttr = static_cast<const SvxBrushItem*>(&( rSet->Get( SID_ATTR_BRUSH_ROW ) ));
|
|
||||||
- pTableBck_Impl->pRowBrush = new SvxBrushItem(*pBgdAttr);
|
|
||||||
+ aBgdAttr = static_cast<const SvxBrushItem&>(rSet->Get(SID_ATTR_BRUSH_ROW));
|
|
||||||
+ pTableBck_Impl->pRowBrush = new SvxBrushItem(aBgdAttr);
|
|
||||||
}
|
|
||||||
pTableBck_Impl->nRowWhich = SID_ATTR_BRUSH_ROW;
|
|
||||||
|
|
||||||
if ( rSet->GetItemState( SID_ATTR_BRUSH_TABLE, false ) >= SfxItemState::DEFAULT )
|
|
||||||
{
|
|
||||||
- pBgdAttr = static_cast<const SvxBrushItem*>(&( rSet->Get( SID_ATTR_BRUSH_TABLE ) ));
|
|
||||||
- pTableBck_Impl->pTableBrush = new SvxBrushItem(*pBgdAttr);
|
|
||||||
+ aBgdAttr = static_cast<const SvxBrushItem&>(rSet->Get(SID_ATTR_BRUSH_TABLE));
|
|
||||||
+ pTableBck_Impl->pTableBrush = new SvxBrushItem(aBgdAttr);
|
|
||||||
}
|
|
||||||
pTableBck_Impl->nTableWhich = SID_ATTR_BRUSH_TABLE;
|
|
||||||
|
|
||||||
@@ -564,8 +585,22 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet* rSet )
|
|
||||||
nWhich = GetWhich( SID_ATTR_BRUSH_CHAR );
|
|
||||||
if ( rSet->GetItemState( nWhich, false ) >= SfxItemState::DEFAULT )
|
|
||||||
{
|
|
||||||
- pBgdAttr = static_cast<const SvxBrushItem*>(&( rSet->Get( nWhich ) ));
|
|
||||||
- pHighlighting.reset(new SvxBrushItem(*pBgdAttr));
|
|
||||||
+ aBgdAttr = static_cast<const SvxBrushItem&>(rSet->Get(nWhich));
|
|
||||||
+ pHighlighting.reset(new SvxBrushItem(aBgdAttr));
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ else if( bCharBackColor )
|
|
||||||
+ {
|
|
||||||
+ nWhich = GetWhich(SID_ATTR_CHAR_BACK_COLOR);
|
|
||||||
+ if ( rSet->GetItemState( nWhich, false ) >= SfxItemState::DEFAULT )
|
|
||||||
+ {
|
|
||||||
+ // EE_CHAR_BKGCOLOR is SvxBackgroundColorItem, but char background tabpage
|
|
||||||
+ // can only work with SvxBrushItems
|
|
||||||
+ // extract Color out of SvxBackColorItem
|
|
||||||
+ Color aBackColor = static_cast<const SvxBackgroundColorItem&>(rSet->Get(nWhich)).GetValue();
|
|
||||||
+ // make new SvxBrushItem with this Color
|
|
||||||
+ aBgdAttr = SvxBrushItem(aBackColor, SID_ATTR_BRUSH_CHAR);
|
|
||||||
+ pHighlighting.reset(new SvxBrushItem(aBgdAttr));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -644,6 +679,7 @@ bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* rCoreSet )
|
|
||||||
return FillItemSetWithWallpaperItem( *rCoreSet, SID_VIEW_FLD_PIC );
|
|
||||||
|
|
||||||
bool bModified = false;
|
|
||||||
+ bool bCompareOldBrush = true;
|
|
||||||
sal_uInt16 nSlot = SID_ATTR_BRUSH;
|
|
||||||
|
|
||||||
if ( m_pTblLBox->IsVisible() )
|
|
||||||
@@ -665,15 +701,21 @@ bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* rCoreSet )
|
|
||||||
{
|
|
||||||
nSlot = SID_ATTR_BRUSH_CHAR;
|
|
||||||
}
|
|
||||||
- sal_uInt16 nWhich = GetWhich( nSlot );
|
|
||||||
+ else if( bCharBackColor )
|
|
||||||
+ {
|
|
||||||
+ nSlot = SID_ATTR_CHAR_BACK_COLOR;
|
|
||||||
+ bCompareOldBrush = false;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
- const SfxPoolItem* pOld = GetOldItem( *rCoreSet, nSlot );
|
|
||||||
- SfxItemState eOldItemState = rCoreSet->GetItemState(nSlot, false);
|
|
||||||
- const SfxItemSet& rOldSet = GetItemSet();
|
|
||||||
+ sal_uInt16 nWhich = GetWhich( nSlot );
|
|
||||||
|
|
||||||
- if ( pOld )
|
|
||||||
+ const SfxPoolItem* pOld = GetOldItem(*rCoreSet, nSlot);
|
|
||||||
+ if (pOld && bCompareOldBrush)
|
|
||||||
{
|
|
||||||
+ SfxItemState eOldItemState = rCoreSet->GetItemState(nSlot, false);
|
|
||||||
+ const SfxItemSet& rOldSet = GetItemSet();
|
|
||||||
const SvxBrushItem& rOldItem = static_cast<const SvxBrushItem&>(*pOld);
|
|
||||||
+
|
|
||||||
SvxGraphicPosition eOldPos = rOldItem.GetGraphicPos();
|
|
||||||
const bool bIsBrush = ( drawing::FillStyle_SOLID == lcl_getFillStyle(m_pLbSelect) );
|
|
||||||
|
|
||||||
@@ -774,6 +816,22 @@ bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* rCoreSet )
|
|
||||||
bModified = ( bIsBrush || m_pBtnLink->IsChecked() || bIsGraphicValid );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+ else if (pOld && SID_ATTR_CHAR_BACK_COLOR == nSlot)
|
|
||||||
+ {
|
|
||||||
+ SfxItemState eOldItemState = rCoreSet->GetItemState(nSlot, false);
|
|
||||||
+ const SfxItemSet& rOldSet = GetItemSet();
|
|
||||||
+ const SvxBackgroundColorItem& rOldItem = static_cast<const SvxBackgroundColorItem&>(*pOld);
|
|
||||||
+
|
|
||||||
+ // Brush-treatment:
|
|
||||||
+ if ( rOldItem.GetValue() != aBgdColor ||
|
|
||||||
+ (SfxItemState::DEFAULT >= eOldItemState && m_bColorSelected))
|
|
||||||
+ {
|
|
||||||
+ bModified = true;
|
|
||||||
+ rCoreSet->Put(SvxBackgroundColorItem(aBgdColor, nWhich));
|
|
||||||
+ }
|
|
||||||
+ else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) )
|
|
||||||
+ rCoreSet->ClearItem( nWhich );
|
|
||||||
+ }
|
|
||||||
else if ( SID_ATTR_BRUSH_CHAR == nSlot && aBgdColor != Color( COL_WHITE ) )
|
|
||||||
{
|
|
||||||
rCoreSet->Put( SvxBrushItem( aBgdColor, nWhich ) );
|
|
||||||
@@ -1526,10 +1584,12 @@ void SvxBackgroundTabPage::PageCreated(const SfxAllItemSet& aSet)
|
|
||||||
{
|
|
||||||
ShowSelector();
|
|
||||||
}
|
|
||||||
- if ( nFlags & SvxBackgroundTabFlags::SHOW_HIGHLIGHTING )
|
|
||||||
+ if ((nFlags & SvxBackgroundTabFlags::SHOW_HIGHLIGHTING) ||
|
|
||||||
+ (nFlags & SvxBackgroundTabFlags::SHOW_CHAR_BKGCOLOR))
|
|
||||||
{
|
|
||||||
m_pBackGroundColorLabelFT->SetText(CuiResId(RID_SVXSTR_CHARNAME_HIGHLIGHTING));
|
|
||||||
- bHighlighting = true;
|
|
||||||
+ bHighlighting = bool(nFlags & SvxBackgroundTabFlags::SHOW_HIGHLIGHTING);
|
|
||||||
+ bCharBackColor = bool(nFlags & SvxBackgroundTabFlags::SHOW_CHAR_BKGCOLOR);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
diff --git a/include/svx/flagsdef.hxx b/include/svx/flagsdef.hxx
|
|
||||||
index 0207a0e..30b1ff4 100644
|
|
||||||
--- a/include/svx/flagsdef.hxx
|
|
||||||
+++ b/include/svx/flagsdef.hxx
|
|
||||||
@@ -39,14 +39,15 @@ namespace o3tl
|
|
||||||
// flags for SvxBackgroundTabPage
|
|
||||||
enum class SvxBackgroundTabFlags
|
|
||||||
{
|
|
||||||
- NONE = 0x00,
|
|
||||||
- SHOW_SELECTOR = 0x01,
|
|
||||||
- SHOW_TBLCTL = 0x08,
|
|
||||||
- SHOW_HIGHLIGHTING = 0x10,
|
|
||||||
+ NONE = 0x00,
|
|
||||||
+ SHOW_SELECTOR = 0x01,
|
|
||||||
+ SHOW_TBLCTL = 0x08,
|
|
||||||
+ SHOW_HIGHLIGHTING = 0x10,
|
|
||||||
+ SHOW_CHAR_BKGCOLOR = 0x20,
|
|
||||||
};
|
|
||||||
namespace o3tl
|
|
||||||
{
|
|
||||||
- template<> struct typed_flags<SvxBackgroundTabFlags> : is_typed_flags<SvxBackgroundTabFlags, 0x19> {};
|
|
||||||
+ template<> struct typed_flags<SvxBackgroundTabFlags> : is_typed_flags<SvxBackgroundTabFlags, 0x39> {};
|
|
||||||
}
|
|
||||||
|
|
||||||
// flags for SvxBorderTabPage
|
|
||||||
diff --git a/sd/source/ui/dlg/dlgchar.cxx b/sd/source/ui/dlg/dlgchar.cxx
|
|
||||||
index bcf4437..cb37af4 100644
|
|
||||||
--- a/sd/source/ui/dlg/dlgchar.cxx
|
|
||||||
+++ b/sd/source/ui/dlg/dlgchar.cxx
|
|
||||||
@@ -65,7 +65,7 @@ void SdCharDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
|
|
||||||
}
|
|
||||||
else if (nId == mnCharBackground)
|
|
||||||
{
|
|
||||||
- aSet.Put(SfxUInt32Item(SID_FLAG_TYPE,static_cast<sal_uInt32>(SvxBackgroundTabFlags::SHOW_HIGHLIGHTING)));
|
|
||||||
+ aSet.Put(SfxUInt32Item(SID_FLAG_TYPE,static_cast<sal_uInt32>(SvxBackgroundTabFlags::SHOW_CHAR_BKGCOLOR)));
|
|
||||||
rPage.PageCreated(aSet);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
diff --git a/sd/source/ui/dlg/tabtempl.cxx b/sd/source/ui/dlg/tabtempl.cxx
|
|
||||||
index 17e962b..9042bf5 100644
|
|
||||||
--- a/sd/source/ui/dlg/tabtempl.cxx
|
|
||||||
+++ b/sd/source/ui/dlg/tabtempl.cxx
|
|
||||||
@@ -71,6 +71,7 @@ SdTabTemplateDlg::SdTabTemplateDlg( vcl::Window* pParent,
|
|
||||||
, m_nFontId(0)
|
|
||||||
, m_nFontEffectId(0)
|
|
||||||
, m_nIndentsId(0)
|
|
||||||
+ , m_nBackgroundId(0)
|
|
||||||
, m_nTextId(0)
|
|
||||||
, m_nAnimationId(0)
|
|
||||||
, m_nDimensionId(0)
|
|
||||||
@@ -88,6 +89,7 @@ SdTabTemplateDlg::SdTabTemplateDlg( vcl::Window* pParent,
|
|
||||||
m_nFontId = AddTabPage("font", RID_SVXPAGE_CHAR_NAME);
|
|
||||||
m_nFontEffectId = AddTabPage("fonteffect", RID_SVXPAGE_CHAR_EFFECTS);
|
|
||||||
m_nIndentsId = AddTabPage("indents", RID_SVXPAGE_STD_PARAGRAPH);
|
|
||||||
+ m_nBackgroundId = AddTabPage("background", RID_SVXPAGE_BACKGROUND);
|
|
||||||
m_nTextId = AddTabPage("text", RID_SVXPAGE_TEXTATTR);
|
|
||||||
m_nAnimationId = AddTabPage("animation", RID_SVXPAGE_TEXTANIMATION);
|
|
||||||
m_nDimensionId = AddTabPage("dimensioning", RID_SVXPAGE_MEASURE);
|
|
||||||
@@ -149,6 +151,11 @@ void SdTabTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
|
|
||||||
{
|
|
||||||
rPage.PageCreated(aSet);
|
|
||||||
}
|
|
||||||
+ else if (nId == m_nBackgroundId)
|
|
||||||
+ {
|
|
||||||
+ aSet.Put(SfxUInt32Item(SID_FLAG_TYPE,static_cast<sal_uInt32>(SvxBackgroundTabFlags::SHOW_CHAR_BKGCOLOR)));
|
|
||||||
+ rPage.PageCreated(aSet);
|
|
||||||
+ }
|
|
||||||
else if (nId == m_nTextId)
|
|
||||||
{
|
|
||||||
rPage.PageCreated(aSet);
|
|
||||||
diff --git a/sd/source/ui/func/fuchar.cxx b/sd/source/ui/func/fuchar.cxx
|
|
||||||
index 4a8aedd..1ffa757 100644
|
|
||||||
--- a/sd/source/ui/func/fuchar.cxx
|
|
||||||
+++ b/sd/source/ui/func/fuchar.cxx
|
|
||||||
@@ -68,33 +68,9 @@ void FuChar::DoExecute( SfxRequest& rReq )
|
|
||||||
SfxItemSet aEditAttr( mpDoc->GetPool() );
|
|
||||||
mpView->GetAttributes( aEditAttr );
|
|
||||||
|
|
||||||
- static const sal_uInt16 aRanges[] =
|
|
||||||
- {
|
|
||||||
- EE_ITEMS_START, EE_ITEMS_END,
|
|
||||||
- SID_ATTR_BRUSH_CHAR, SID_ATTR_BRUSH_CHAR,
|
|
||||||
- 0
|
|
||||||
- };
|
|
||||||
-
|
|
||||||
- SfxItemSet aNewAttr( mpViewShell->GetPool(),
|
|
||||||
- aRanges );
|
|
||||||
+ SfxItemSet aNewAttr(mpViewShell->GetPool(), EE_ITEMS_START, EE_ITEMS_END);
|
|
||||||
aNewAttr.Put( aEditAttr, false );
|
|
||||||
|
|
||||||
- // EE_CHAR_BKGCOLOR is SvxBackgroundColorItem, but char background tabpage
|
|
||||||
- // can only work with SvxBrushItems (it requires major undertaking to have
|
|
||||||
- // it support anything else). Do the following then:
|
|
||||||
- const SfxPoolItem* pItem;
|
|
||||||
- if ( aNewAttr.GetItemState( EE_CHAR_BKGCOLOR, true, &pItem ) == SfxItemState::SET )
|
|
||||||
- {
|
|
||||||
- // 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 );
|
|
||||||
-
|
|
||||||
- aNewAttr.ClearItem( EE_CHAR_BKGCOLOR );
|
|
||||||
- // and stick it into the set
|
|
||||||
- aNewAttr.Put( aBrushItem );
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
|
|
||||||
ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact ? pFact->CreateSdTabCharDialog(mpViewShell->GetActiveWindow(), &aNewAttr, mpDoc->GetDocSh() ) : nullptr);
|
|
||||||
sal_uInt16 nResult = RET_CANCEL;
|
|
||||||
diff --git a/sd/source/ui/inc/tabtempl.hxx b/sd/source/ui/inc/tabtempl.hxx
|
|
||||||
index d5c2f5e..bc00417 100644
|
|
||||||
--- a/sd/source/ui/inc/tabtempl.hxx
|
|
||||||
+++ b/sd/source/ui/inc/tabtempl.hxx
|
|
||||||
@@ -50,6 +50,7 @@ private:
|
|
||||||
sal_uInt16 m_nFontId;
|
|
||||||
sal_uInt16 m_nFontEffectId;
|
|
||||||
sal_uInt16 m_nIndentsId;
|
|
||||||
+ sal_uInt16 m_nBackgroundId;
|
|
||||||
sal_uInt16 m_nTextId;
|
|
||||||
sal_uInt16 m_nAnimationId;
|
|
||||||
sal_uInt16 m_nDimensionId;
|
|
||||||
diff --git a/sd/uiconfig/simpress/ui/templatedialog.ui b/sd/uiconfig/simpress/ui/templatedialog.ui
|
|
||||||
index 961a0bb..380f9f0 100644
|
|
||||||
--- a/sd/uiconfig/simpress/ui/templatedialog.ui
|
|
||||||
+++ b/sd/uiconfig/simpress/ui/templatedialog.ui
|
|
||||||
@@ -204,6 +204,20 @@
|
|
||||||
<placeholder/>
|
|
||||||
</child>
|
|
||||||
<child type="tab">
|
|
||||||
+ <object class="GtkLabel" id="background">
|
|
||||||
+ <property name="visible">True</property>
|
|
||||||
+ <property name="can_focus">False</property>
|
|
||||||
+ <property name="label" translatable="yes" context="templatedialog|background">Highlighting</property>
|
|
||||||
+ </object>
|
|
||||||
+ <packing>
|
|
||||||
+ <property name="position">6</property>
|
|
||||||
+ <property name="tab_fill">False</property>
|
|
||||||
+ </packing>
|
|
||||||
+ </child>
|
|
||||||
+ <child>
|
|
||||||
+ <placeholder/>
|
|
||||||
+ </child>
|
|
||||||
+ <child type="tab">
|
|
||||||
<object class="GtkLabel" id="indents">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
--
|
|
||||||
2.9.4
|
|
||||||
|
|
Loading…
Reference in new issue