tdf#99693 Add Highlighting tab for Calc
Works with shapes and comments. Change-Id: I2a91a6038ab618bf7e6fd4eb2d129a9485a47fef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88163 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
This commit is contained in:
@@ -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;
|
||||
|
@@ -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(
|
||||
|
@@ -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;
|
||||
|
@@ -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");
|
||||
|
@@ -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
|
||||
|
@@ -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)
|
||||
|
@@ -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 )
|
||||
{
|
||||
|
@@ -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");
|
||||
|
@@ -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>
|
||||
|
Reference in New Issue
Block a user