summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/inc/scabstdlg.hxx2
-rw-r--r--sc/source/ui/attrdlg/scdlgfact.cxx4
-rw-r--r--sc/source/ui/attrdlg/scdlgfact.hxx2
-rw-r--r--sc/source/ui/drawfunc/drtxtob1.cxx2
-rw-r--r--sc/source/ui/inc/textdlgs.hxx2
-rw-r--r--sc/source/ui/miscdlgs/textdlgs.cxx12
-rw-r--r--sc/source/ui/pagedlg/tphfedit.cxx2
-rw-r--r--sc/source/ui/view/editsh.cxx2
-rw-r--r--sc/uiconfig/scalc/ui/chardialog.ui47
9 files changed, 66 insertions, 9 deletions
diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index 16690afefcc0..a4282b7a7bda 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -532,7 +532,7 @@ public:
const SfxItemSet* pArgSet) = 0;
virtual VclPtr<SfxAbstractTabDialog> CreateScCharDlg(weld::Window* pParent,
- const SfxItemSet* pAttr, const SfxObjectShell* pDocShell) = 0;
+ const SfxItemSet* pAttr, const SfxObjectShell* pDocShell, bool bDrawText) = 0;
virtual VclPtr<SfxAbstractTabDialog> CreateScParagraphDlg(weld::Window* pParent,
const SfxItemSet* pAttr) = 0;
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index af0bcfdef27e..71ec37385c0d 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -1225,9 +1225,9 @@ VclPtr<SfxAbstractTabDialog> ScAbstractDialogFactory_Impl::CreateScSubTotalDlg(w
}
VclPtr<SfxAbstractTabDialog> ScAbstractDialogFactory_Impl::CreateScCharDlg(
- weld::Window* pParent, const SfxItemSet* pAttr, const SfxObjectShell* pDocShell)
+ weld::Window* pParent, const SfxItemSet* pAttr, const SfxObjectShell* pDocShell, bool bDrawText)
{
- return VclPtr<ScAbstractTabController_Impl>::Create(std::make_unique<ScCharDlg>(pParent, pAttr, pDocShell));
+ return VclPtr<ScAbstractTabController_Impl>::Create(std::make_unique<ScCharDlg>(pParent, pAttr, pDocShell, bDrawText));
}
VclPtr<SfxAbstractTabDialog> ScAbstractDialogFactory_Impl::CreateScParagraphDlg(
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx
index 60e5a6bc35d8..1c5b0cbe8da3 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -796,7 +796,7 @@ public:
virtual VclPtr<SfxAbstractTabDialog> CreateScSubTotalDlg(weld::Window* pParent,
const SfxItemSet* pArgSet) override;
virtual VclPtr<SfxAbstractTabDialog> CreateScCharDlg(weld::Window* pParent,
- const SfxItemSet* pAttr, const SfxObjectShell* pDocShell) override;
+ const SfxItemSet* pAttr, const SfxObjectShell* pDocShell, bool bDrawText) override;
virtual VclPtr<SfxAbstractTabDialog> CreateScParagraphDlg(weld::Window* pParent,
const SfxItemSet* pAttr) override;
diff --git a/sc/source/ui/drawfunc/drtxtob1.cxx b/sc/source/ui/drawfunc/drtxtob1.cxx
index 1b092128afe3..76964b6ebdeb 100644
--- a/sc/source/ui/drawfunc/drtxtob1.cxx
+++ b/sc/source/ui/drawfunc/drtxtob1.cxx
@@ -43,7 +43,7 @@ bool ScDrawTextObjectBar::ExecuteCharDlg( const SfxItemSet& rArgs,
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateScCharDlg(
pViewData->GetDialogParent(), &rArgs,
- pViewData->GetSfxDocShell()));
+ pViewData->GetSfxDocShell(), true));
if (nSlot == SID_CHAR_DLG_EFFECT)
{
pDlg->SetCurPageId("fonteffects");
diff --git a/sc/source/ui/inc/textdlgs.hxx b/sc/source/ui/inc/textdlgs.hxx
index b9b06002aebf..f9d3a6dba615 100644
--- a/sc/source/ui/inc/textdlgs.hxx
+++ b/sc/source/ui/inc/textdlgs.hxx
@@ -31,7 +31,7 @@ private:
virtual void PageCreated(const OString& rId, SfxTabPage &rPage) override;
public:
- ScCharDlg(weld::Window* pParent, const SfxItemSet* pAttr, const SfxObjectShell* pDocShell);
+ ScCharDlg(weld::Window* pParent, const SfxItemSet* pAttr, const SfxObjectShell* pDocShell, bool bDrawText);
};
class ScParagraphDlg : public SfxTabDialogController
diff --git a/sc/source/ui/miscdlgs/textdlgs.cxx b/sc/source/ui/miscdlgs/textdlgs.cxx
index 1cbd139a24f2..08251008255d 100644
--- a/sc/source/ui/miscdlgs/textdlgs.cxx
+++ b/sc/source/ui/miscdlgs/textdlgs.cxx
@@ -30,13 +30,18 @@
#include <svl/intitem.hxx>
#include <svx/flagsdef.hxx>
-ScCharDlg::ScCharDlg(weld::Window* pParent, const SfxItemSet* pAttr, const SfxObjectShell* pDocShell)
+ScCharDlg::ScCharDlg(weld::Window* pParent, const SfxItemSet* pAttr, const SfxObjectShell* pDocShell, bool bDrawText)
: SfxTabDialogController(pParent, "modules/scalc/ui/chardialog.ui", "CharDialog", pAttr)
, rDocShell(*pDocShell)
{
AddTabPage("font", RID_SVXPAGE_CHAR_NAME);
AddTabPage("fonteffects", RID_SVXPAGE_CHAR_EFFECTS);
AddTabPage("position", RID_SVXPAGE_CHAR_POSITION);
+
+ if (bDrawText)
+ AddTabPage("background", RID_SVXPAGE_BKG);
+ else
+ RemoveTabPage("background");
}
void ScCharDlg::PageCreated(const OString& rId, SfxTabPage &rPage)
@@ -55,6 +60,11 @@ void ScCharDlg::PageCreated(const OString& rId, SfxTabPage &rPage)
aSet.Put (SfxUInt16Item(SID_DISABLE_CTL,DISABLE_CASEMAP));
rPage.PageCreated(aSet);
}
+ else if (rId == "background")
+ {
+ aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, static_cast<sal_uInt32>(SvxBackgroundTabFlags::SHOW_CHAR_BKGCOLOR)));
+ rPage.PageCreated(aSet);
+ }
}
ScParagraphDlg::ScParagraphDlg(weld::Window* pParent, const SfxItemSet* pAttr)
diff --git a/sc/source/ui/pagedlg/tphfedit.cxx b/sc/source/ui/pagedlg/tphfedit.cxx
index 16954e793fbc..db2a91e5e3eb 100644
--- a/sc/source/ui/pagedlg/tphfedit.cxx
+++ b/sc/source/ui/pagedlg/tphfedit.cxx
@@ -188,7 +188,7 @@ void ScEditWindow::SetCharAttributes()
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateScCharDlg(
- mpDialog, &aSet, pDocSh));
+ mpDialog, &aSet, pDocSh, false));
pDlg->SetText( ScResId( STR_TEXTATTRS ) );
if ( pDlg->Execute() == RET_OK )
{
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index c5d94206969d..bf2ebc3d75cf 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -507,7 +507,7 @@ void ScEditShell::Execute( SfxRequest& rReq )
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateScCharDlg(
- pViewData->GetDialogParent(), &aAttrs, pObjSh));
+ pViewData->GetDialogParent(), &aAttrs, pObjSh, false));
if (nSlot == SID_CHAR_DLG_EFFECT)
{
pDlg->SetCurPageId("fonteffects");
diff --git a/sc/uiconfig/scalc/ui/chardialog.ui b/sc/uiconfig/scalc/ui/chardialog.ui
index 2a68ca6e4a2a..89d2417a0180 100644
--- a/sc/uiconfig/scalc/ui/chardialog.ui
+++ b/sc/uiconfig/scalc/ui/chardialog.ui
@@ -232,6 +232,53 @@
<property name="tab_fill">False</property>
</packing>
</child>
+ <child>
+ <object class="GtkGrid">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="position">3</property>
+ </packing>
+ </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="chardialog|background">Highlighting</property>
+ </object>
+ <packing>
+ <property name="position">3</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">False</property>