Blame SOURCES/0001-add-char-highlighting-background-tab-to-graphics-sty.patch

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