[Libreoffice-commits] core.git: sc/inc sc/source sc/uiconfig

Maxim Monastirsky (via logerrit) logerrit at kemper.freedesktop.org
Fri Feb 7 09:49:38 UTC 2020


 sc/inc/scabstdlg.hxx               |    2 -
 sc/source/ui/attrdlg/scdlgfact.cxx |    4 +--
 sc/source/ui/attrdlg/scdlgfact.hxx |    2 -
 sc/source/ui/drawfunc/drtxtob1.cxx |    2 -
 sc/source/ui/inc/textdlgs.hxx      |    2 -
 sc/source/ui/miscdlgs/textdlgs.cxx |   12 ++++++++-
 sc/source/ui/pagedlg/tphfedit.cxx  |    2 -
 sc/source/ui/view/editsh.cxx       |    2 -
 sc/uiconfig/scalc/ui/chardialog.ui |   47 +++++++++++++++++++++++++++++++++++++
 9 files changed, 66 insertions(+), 9 deletions(-)

New commits:
commit 01bc1dfde8ba8d374698085fabe8b67d4d52c69a
Author:     Maxim Monastirsky <momonasmon at gmail.com>
AuthorDate: Thu Feb 6 01:46:53 2020 +0200
Commit:     Maxim Monastirsky <momonasmon at gmail.com>
CommitDate: Fri Feb 7 10:49:04 2020 +0100

    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 at gmail.com>

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>


More information about the Libreoffice-commits mailing list