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

Szymon Kłos szymon.klos at collabora.com
Fri Mar 23 19:49:06 UTC 2018


 officecfg/registry/schema/org/openoffice/Office/Calc.xcs |   32 ---
 sc/inc/viewopti.hxx                                      |   12 -
 sc/source/core/tool/viewopti.cxx                         |   39 ----
 sc/source/ui/inc/tpview.hxx                              |    5 
 sc/source/ui/optdlg/tpview.cxx                           |   31 ---
 sc/source/ui/view/output.cxx                             |    8 
 sc/uiconfig/scalc/ui/tpviewpage.ui                       |  140 ---------------
 7 files changed, 7 insertions(+), 260 deletions(-)

New commits:
commit 154496aefe67b81f80d7c08d12bfb145eddb93ac
Author: Szymon Kłos <szymon.klos at collabora.com>
Date:   Fri Mar 23 18:17:31 2018 +0100

    Revert "tdf#116241 Customizing value highlighting colors"
    
    This reverts commit fb29b8262488d045a926504725669a362bacb5bb.
    
    Change-Id: I338af7c108bb6386193550ef0603b406c4f7bd99
    Reaseon: I will move this to more suitable place "application colors" and extend with protected cell backround.
    Reviewed-on: https://gerrit.libreoffice.org/51789
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>

diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
index 2fdd0caccd64..18b3612259e6 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
@@ -262,38 +262,6 @@
       <info>
         <desc>Contains settings that affect the window layout.</desc>
       </info>
-      <group oor:name="Highlighting">
-        <info>
-          <desc>Contains settings that control highlighting.</desc>
-        </info>
-        <prop oor:name="ValueColor" oor:type="xs:int" oor:nillable="false">
-          <!-- UIHints: Tools - Options - LibreOffice Calc - View - [Section] Highlighting -->
-          <!-- Default 255 = LightBlue -->
-          <info>
-            <desc>Specifies the color of highlighted values.</desc>
-            <label>Value Color</label>
-          </info>
-          <value>255</value>
-        </prop>
-        <prop oor:name="FormulaColor" oor:type="xs:int" oor:nillable="false">
-          <!-- UIHints: Tools - Options - LibreOffice Calc - View - [Section] Highlighting -->
-          <!-- Default 32768 = Green -->
-          <info>
-            <desc>Specifies the color of highlighted formulas.</desc>
-            <label>Formula Color</label>
-          </info>
-          <value>32768</value>
-        </prop>
-        <prop oor:name="TextColor" oor:type="xs:int" oor:nillable="false">
-          <!-- UIHints: Tools - Options - LibreOffice Calc - View - [Section] Highlighting -->
-          <!-- Default 0 = Black -->
-          <info>
-            <desc>Specifies the color of the highlighted text.</desc>
-            <label>Text Color</label>
-          </info>
-          <value>0</value>
-        </prop>
-      </group>
       <group oor:name="Line">
         <info>
           <desc>Contains settings that control visual aids.</desc>
diff --git a/sc/inc/viewopti.hxx b/sc/inc/viewopti.hxx
index 965d1ac73b69..8bc3d380b28a 100644
--- a/sc/inc/viewopti.hxx
+++ b/sc/inc/viewopti.hxx
@@ -94,15 +94,6 @@ public:
     void                    SetGridColor( const Color& rCol, const OUString& rName ) { aGridCol = rCol; aGridColName = rName;}
     Color const &           GetGridColor( OUString* pStrName = nullptr ) const;
 
-    void                    SetValueColor( const Color& rCol ) { aValueCol = rCol; }
-    Color const &           GetValueColor() const { return aValueCol; }
-
-    void                    SetFormulaColor(const Color& rCol) { aFormulaCol = rCol; }
-    Color const &           GetFormulaColor() const { return aFormulaCol; }
-
-    void                    SetTextColor(const Color& rCol) { aTextCol = rCol; }
-    Color const &           GetTextColor() const { return aTextCol; }
-
     const ScGridOptions&    GetGridOptions() const                      { return aGridOpt; }
     void                    SetGridOptions( const ScGridOptions& rNew ) { aGridOpt = rNew; }
     SvxGridItem*            CreateGridItem() const;
@@ -117,9 +108,6 @@ private:
     Color           aGridCol;
     OUString        aGridColName;
     ScGridOptions   aGridOpt;
-    Color           aValueCol;
-    Color           aFormulaCol;
-    Color           aTextCol;
 };
 
 // Item for the options dialog - View
diff --git a/sc/source/core/tool/viewopti.cxx b/sc/source/core/tool/viewopti.cxx
index eef9125424bb..d882e82e6fd2 100644
--- a/sc/source/core/tool/viewopti.cxx
+++ b/sc/source/core/tool/viewopti.cxx
@@ -132,10 +132,6 @@ void ScViewOptions::SetDefaults()
     aGridCol     = SC_STD_GRIDCOLOR;
     aGridColName = ScGlobal::GetRscString( STR_GRIDCOLOR );
 
-    aValueCol = COL_LIGHTBLUE;
-    aTextCol = COL_BLACK;
-    aFormulaCol = COL_GREEN;
-
     aGridOpt.SetDefaults();
 }
 
@@ -157,9 +153,6 @@ ScViewOptions& ScViewOptions::operator=( const ScViewOptions& rCpy )
     aGridCol        = rCpy.aGridCol;
     aGridColName    = rCpy.aGridColName;
     aGridOpt        = rCpy.aGridOpt;
-    aValueCol       = rCpy.aValueCol;
-    aTextCol        = rCpy.aTextCol;
-    aFormulaCol     = rCpy.aFormulaCol;
 
     return *this;
 }
@@ -175,9 +168,6 @@ bool ScViewOptions::operator==( const ScViewOptions& rOpt ) const
     bEqual = bEqual && (aGridCol       == rOpt.aGridCol);
     bEqual = bEqual && (aGridColName   == rOpt.aGridColName);
     bEqual = bEqual && (aGridOpt       == rOpt.aGridOpt);
-    bEqual = bEqual && (aValueCol      == rOpt.aValueCol);
-    bEqual = bEqual && (aTextCol       == rOpt.aTextCol);
-    bEqual = bEqual && (aFormulaCol    == rOpt.aFormulaCol);
 
     return bEqual;
 }
@@ -240,9 +230,6 @@ SfxPoolItem* ScTpViewItem::Clone( SfxItemPool * ) const
 #define SCLAYOUTOPT_SHEETTAB        7
 #define SCLAYOUTOPT_OUTLINE         8
 #define SCLAYOUTOPT_GRID_ONCOLOR    9
-#define SCLAYOUTOPT_VALUE_COLOR    10
-#define SCLAYOUTOPT_FORMULA_COLOR  11
-#define SCLAYOUTOPT_TEXT_COLOR     12
 
 #define CFGPATH_DISPLAY     "Office.Calc/Content/Display"
 
@@ -280,10 +267,7 @@ Sequence<OUString> ScViewCfg::GetLayoutPropertyNames()
             "Window/VerticalScroll",    // SCLAYOUTOPT_VERTSCROLL
             "Window/SheetTab",          // SCLAYOUTOPT_SHEETTAB
             "Window/OutlineSymbol",     // SCLAYOUTOPT_OUTLINE
-            "Line/GridOnColoredCells",  // SCLAYOUTOPT_GRID_ONCOLOR
-            "Highlighting/ValueColor",  // SCLAYOUTOPT_VALUE_COLOR
-            "Highlighting/FormulaColor",// SCLAYOUTOPT_FORMULA_COLOR
-            "Highlighting/TextColor"};  // SCLAYOUTOPT_TEXT_COLOR
+            "Line/GridOnColoredCells"}; // SCLAYOUTOPT_GRID_ONCOLOR;
 }
 
 Sequence<OUString> ScViewCfg::GetDisplayPropertyNames()
@@ -371,18 +355,6 @@ ScViewCfg::ScViewCfg() :
                     case SCLAYOUTOPT_OUTLINE:
                         SetOption( VOPT_OUTLINER, ScUnoHelpFunctions::GetBoolFromAny( pValues[nProp] ) );
                         break;
-                    case SCLAYOUTOPT_VALUE_COLOR:
-                        if (pValues[nProp] >>= nIntVal)
-                            SetValueColor(Color(nIntVal));
-                        break;
-                    case SCLAYOUTOPT_FORMULA_COLOR:
-                        if (pValues[nProp] >>= nIntVal)
-                            SetFormulaColor(Color(nIntVal));
-                        break;
-                    case SCLAYOUTOPT_TEXT_COLOR:
-                        if (pValues[nProp] >>= nIntVal)
-                            SetTextColor(Color(nIntVal));
-                        break;
                 }
             }
         }
@@ -547,15 +519,6 @@ IMPL_LINK_NOARG(ScViewCfg, LayoutCommitHdl, ScLinkConfigItem&, void)
             case SCLAYOUTOPT_OUTLINE:
                 pValues[nProp] <<= GetOption( VOPT_OUTLINER );
                 break;
-            case SCLAYOUTOPT_VALUE_COLOR:
-                pValues[nProp] <<= GetValueColor();
-                break;
-            case SCLAYOUTOPT_FORMULA_COLOR:
-                pValues[nProp] <<= GetFormulaColor();
-                break;
-            case SCLAYOUTOPT_TEXT_COLOR:
-                pValues[nProp] <<= GetTextColor();
-                break;
         }
     }
     aLayoutItem.PutProperties(aNames, aValues);
diff --git a/sc/source/ui/inc/tpview.hxx b/sc/source/ui/inc/tpview.hxx
index dd02675f078e..6ac52a2d1cd6 100644
--- a/sc/source/ui/inc/tpview.hxx
+++ b/sc/source/ui/inc/tpview.hxx
@@ -39,10 +39,6 @@ class ScTpContentOptions : public SfxTabPage
     VclPtr<CheckBox>        pBreakCB;
     VclPtr<CheckBox>        pGuideLineCB;
 
-    VclPtr<SvxColorListBox> pValueColorLB;
-    VclPtr<SvxColorListBox> pFormulaColorLB;
-    VclPtr<SvxColorListBox> pTextColorLB;
-
     VclPtr<CheckBox>        pFormulaCB;
     VclPtr<CheckBox>        pNilCB;
     VclPtr<CheckBox>        pAnnotCB;
@@ -66,7 +62,6 @@ class ScTpContentOptions : public SfxTabPage
     ScViewOptions*  pLocalOptions;
 
     void    InitGridOpt();
-    void    InitColors();
     DECL_LINK( GridHdl, ListBox&, void );
     DECL_LINK( SelLbObjHdl, ListBox&, void );
     DECL_LINK( CBHdl, Button*, void );
diff --git a/sc/source/ui/optdlg/tpview.cxx b/sc/source/ui/optdlg/tpview.cxx
index d1811ca6dec9..a7151bded5e7 100644
--- a/sc/source/ui/optdlg/tpview.cxx
+++ b/sc/source/ui/optdlg/tpview.cxx
@@ -49,10 +49,6 @@ ScTpContentOptions::ScTpContentOptions( vcl::Window*         pParent,
     get(pBreakCB,"break");
     get(pGuideLineCB,"guideline");
 
-    get(pValueColorLB, "value_color");
-    get(pFormulaColorLB, "formula_color");
-    get(pTextColorLB, "text_color");
-
     get(pFormulaCB,"formula");
     get(pNilCB,"nil");
     get(pAnnotCB,"annot");
@@ -111,9 +107,6 @@ void ScTpContentOptions::dispose()
     pColorLB.clear();
     pBreakCB.clear();
     pGuideLineCB.clear();
-    pValueColorLB.clear();
-    pFormulaColorLB.clear();
-    pTextColorLB.clear();
     pFormulaCB.clear();
     pNilCB.clear();
     pAnnotCB.clear();
@@ -159,16 +152,10 @@ bool    ScTpContentOptions::FillItemSet( SfxItemSet* rCoreSet )
         pOutlineCB     ->IsValueChangedFromSaved() ||
         pColorLB       ->IsValueChangedFromSaved() ||
         pBreakCB       ->IsValueChangedFromSaved() ||
-        pGuideLineCB   ->IsValueChangedFromSaved() ||
-        pValueColorLB  ->IsValueChangedFromSaved() ||
-        pFormulaColorLB->IsValueChangedFromSaved() ||
-        pTextColorLB   ->IsValueChangedFromSaved() )
+        pGuideLineCB   ->IsValueChangedFromSaved())
     {
         NamedColor aNamedColor = pColorLB->GetSelectedEntry();
         pLocalOptions->SetGridColor(aNamedColor.first, aNamedColor.second);
-        pLocalOptions->SetValueColor(pValueColorLB->GetSelectedEntry().first);
-        pLocalOptions->SetFormulaColor(pFormulaColorLB->GetSelectedEntry().first);
-        pLocalOptions->SetTextColor(pTextColorLB->GetSelectedEntry().first);
         rCoreSet->Put(ScTpViewItem(*pLocalOptions));
         bRet = true;
     }
@@ -212,7 +199,6 @@ void    ScTpContentOptions::Reset( const SfxItemSet* rCoreSet )
     pOutlineCB->Check( pLocalOptions->GetOption(VOPT_OUTLINER) );
 
     InitGridOpt();
-    InitColors();
 
     pBreakCB->Check( pLocalOptions->GetOption(VOPT_PAGEBREAKS) );
     pGuideLineCB->Check( pLocalOptions->GetOption(VOPT_HELPLINES) );
@@ -243,9 +229,6 @@ void    ScTpContentOptions::Reset( const SfxItemSet* rCoreSet )
     pColorLB->SaveValue();
     pBreakCB->SaveValue();
     pGuideLineCB->SaveValue();
-    pValueColorLB->SaveValue();
-    pFormulaColorLB->SaveValue();
-    pTextColorLB->SaveValue();
 }
 
 void ScTpContentOptions::ActivatePage( const SfxItemSet& rSet)
@@ -332,18 +315,6 @@ void ScTpContentOptions::InitGridOpt()
     pColorLB->SelectEntry(std::make_pair(aCol, aName));
 }
 
-void ScTpContentOptions::InitColors()
-{
-    Color aCol = pLocalOptions->GetValueColor();
-    pValueColorLB->SelectEntry(aCol);
-
-    aCol = pLocalOptions->GetFormulaColor();
-    pFormulaColorLB->SelectEntry(aCol);
-
-    aCol = pLocalOptions->GetTextColor();
-    pTextColorLB->SelectEntry(aCol);
-}
-
 IMPL_LINK( ScTpContentOptions, GridHdl, ListBox&, rLb, void )
 {
     sal_Int32   nSelPos = rLb.GetSelectedEntryPos();
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 0e322ceca8ab..a5bf884681ad 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -61,7 +61,6 @@
 #include <scmod.hxx>
 #include <appoptio.hxx>
 #include <postit.hxx>
-#include <viewopti.hxx>
 
 #include <scresid.hxx>
 #include <colorscale.hxx>
@@ -296,10 +295,9 @@ void ScOutputData::SetSyntaxMode( bool bNewMode )
     if (bNewMode)
         if (!pValueColor)
         {
-            const ScViewOptions& rOptions = mpDoc->GetViewOptions();
-            pValueColor = new Color(rOptions.GetValueColor());
-            pTextColor = new Color(rOptions.GetTextColor());
-            pFormulaColor = new Color(rOptions.GetFormulaColor());
+            pValueColor = new Color(COL_LIGHTBLUE);
+            pTextColor = new Color(COL_BLACK);
+            pFormulaColor = new Color(COL_GREEN);
         }
 }
 
diff --git a/sc/uiconfig/scalc/ui/tpviewpage.ui b/sc/uiconfig/scalc/ui/tpviewpage.ui
index ff3e855119f3..349a28a2d999 100644
--- a/sc/uiconfig/scalc/ui/tpviewpage.ui
+++ b/sc/uiconfig/scalc/ui/tpviewpage.ui
@@ -473,142 +473,6 @@
           </packing>
         </child>
         <child>
-          <object class="GtkFrame" id="frame6">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="label_xalign">0</property>
-            <property name="shadow_type">none</property>
-            <child>
-              <object class="GtkAlignment" id="alignment6">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="vexpand">True</property>
-                <property name="top_padding">6</property>
-                <property name="left_padding">12</property>
-                <child>
-                  <object class="GtkGrid" id="grid8">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="halign">start</property>
-                    <property name="hexpand">True</property>
-                    <property name="row_spacing">6</property>
-                    <property name="column_spacing">12</property>
-                    <child>
-                      <object class="svxcorelo-SvxColorListBox" id="value_color">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="hexpand">True</property>
-                      </object>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="top_attach">0</property>
-                        <property name="width">1</property>
-                        <property name="height">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="svxcorelo-SvxColorListBox" id="formula_color">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="hexpand">True</property>
-                      </object>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="top_attach">1</property>
-                        <property name="width">1</property>
-                        <property name="height">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="svxcorelo-SvxColorListBox" id="text_color">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="hexpand">True</property>
-                      </object>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="top_attach">2</property>
-                        <property name="width">1</property>
-                        <property name="height">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkLabel" id="value_color_label">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes" context="tpviewpage|value_color_label">Value color:</property>
-                        <property name="use_underline">True</property>
-                        <property name="mnemonic_widget">color</property>
-                      </object>
-                      <packing>
-                        <property name="left_attach">0</property>
-                        <property name="top_attach">0</property>
-                        <property name="width">1</property>
-                        <property name="height">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkLabel" id="formula_color_label">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes" context="tpviewpage|formula_color_label">Formula color:</property>
-                        <property name="use_underline">True</property>
-                        <property name="mnemonic_widget">color</property>
-                      </object>
-                      <packing>
-                        <property name="left_attach">0</property>
-                        <property name="top_attach">1</property>
-                        <property name="width">1</property>
-                        <property name="height">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkLabel" id="text_color_label">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes" context="tpviewpage|text_color_label">Text color:</property>
-                        <property name="use_underline">True</property>
-                        <property name="mnemonic_widget">color</property>
-                      </object>
-                      <packing>
-                        <property name="left_attach">0</property>
-                        <property name="top_attach">2</property>
-                        <property name="width">1</property>
-                        <property name="height">1</property>
-                      </packing>
-                    </child>
-                  </object>
-                    <packing>
-                    <property name="left_attach">0</property>
-                    <property name="top_attach">4</property>
-                    <property name="width">1</property>
-                    <property name="height">1</property>
-                  </packing>
-                </child>
-              </object>
-            </child>
-            <child type="label">
-              <object class="GtkLabel" id="label6">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label" translatable="yes" context="tpviewpage|label6">Highlighting</property>
-                <attributes>
-                  <attribute name="weight" value="bold"/>
-                </attributes>
-              </object>
-            </child>
-          </object>
-          <packing>
-            <property name="left_attach">0</property>
-            <property name="top_attach">1</property>
-            <property name="width">1</property>
-            <property name="height">1</property>
-          </packing>
-        </child>
-        <child>
           <object class="GtkFrame" id="frame2">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
@@ -741,7 +605,7 @@
           </object>
           <packing>
             <property name="left_attach">0</property>
-            <property name="top_attach">2</property>
+            <property name="top_attach">1</property>
             <property name="width">1</property>
             <property name="height">1</property>
           </packing>
@@ -786,7 +650,7 @@
           </object>
           <packing>
             <property name="left_attach">0</property>
-            <property name="top_attach">3</property>
+            <property name="top_attach">2</property>
             <property name="width">1</property>
             <property name="height">1</property>
           </packing>


More information about the Libreoffice-commits mailing list