cui/source/options/optcolor.cxx                          |    1 
 cui/uiconfig/ui/colorconfigwin.ui                        |  130 ++++++---------
 include/svtools/colorcfg.hxx                             |    1 
 officecfg/registry/data/org/openoffice/Office/UI.xcu     |    8 
 officecfg/registry/schema/org/openoffice/Office/Calc.xcs |    8 
 officecfg/registry/schema/org/openoffice/Office/UI.xcs   |   16 +
 sc/inc/viewopti.hxx                                      |    3 
 sc/source/core/tool/viewopti.cxx                         |   15 -
 sc/source/ui/inc/tpview.hxx                              |    1 
 sc/source/ui/optdlg/tpview.cxx                           |    6 
 sc/source/ui/view/gridwin4.cxx                           |    2 
 sc/source/ui/view/output.cxx                             |   17 -
 sc/source/ui/view/tabview3.cxx                           |    2 
 sc/uiconfig/scalc/ui/tpviewpage.ui                       |   23 --
 svtools/source/config/colorcfg.cxx                       |    2 
 15 files changed, 104 insertions(+), 131 deletions(-)

New commits:
commit 11bb9c14da13507adeeea8dce863fb4b96a92870
Author:     Heiko Tietze <tietze.he...@gmail.com>
AuthorDate: Thu Apr 13 12:15:46 2023 +0200
Commit:     Heiko Tietze <heiko.tie...@documentfoundation.org>
CommitDate: Fri Apr 14 11:39:06 2023 +0200

    [API CHANGE] Related tdf#154080 - Allow customization of comment indicator 
color
    
    * Calc > View option replaced by a new application color
    * Border not only in highcontrast mode but always shown
    * Border color depending on cell/sheet background
    
    The previous option TextOverflow in Calc.xcs was replaced by
    CalcTextOverflow in UI.xcs in order to combine color and on/off
    with the accepted drawback of incompatibility.
    The alternative, keeping the color separate from the toggle, would
    separate the options and was rejected therefore.
    
    Change-Id: Ie3e469163485d8eb1cffc7022e1518ad20e8e54e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150340
    Tested-by: Heiko Tietze <heiko.tie...@documentfoundation.org>
    Reviewed-by: Heiko Tietze <heiko.tie...@documentfoundation.org>

diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx
index 335c517622b5..29d5c5b6d8c6 100644
--- a/cui/source/options/optcolor.cxx
+++ b/cui/source/options/optcolor.cxx
@@ -130,6 +130,7 @@ const vEntryInfo[] =
     { Group_Calc,    IDS(brkmanual) },
     { Group_Calc,    IDS(brkauto) },
     { Group_Calc,    IDS_CB(hiddencolrow) },
+    { Group_Calc,    IDS_CB(textoverflow) },
     { Group_Calc,    IDS(det) },
     { Group_Calc,    IDS(deterror) },
     { Group_Calc,    IDS(ref) },
diff --git a/cui/uiconfig/ui/colorconfigwin.ui 
b/cui/uiconfig/ui/colorconfigwin.ui
index 3094a66d0c59..8b778c236f3c 100644
--- a/cui/uiconfig/ui/colorconfigwin.ui
+++ b/cui/uiconfig/ui/colorconfigwin.ui
@@ -50,7 +50,6 @@
                 <property name="hexpand">True</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -86,7 +85,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -127,7 +125,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -163,7 +160,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -207,7 +203,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -248,7 +243,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -284,7 +278,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -328,7 +321,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -369,7 +361,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -402,7 +393,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -438,7 +428,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -514,7 +503,6 @@
                 <property name="hexpand">True</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -550,7 +538,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -594,7 +581,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -635,7 +621,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -671,7 +656,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -712,7 +696,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -745,7 +728,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -778,7 +760,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -811,7 +792,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -847,7 +827,7 @@
         <property name="label-xalign">0</property>
         <property name="shadow-type">none</property>
         <child>
-          <!-- n-columns=2 n-rows=13 -->
+          <!-- n-columns=2 n-rows=14 -->
           <object class="GtkGrid" id="gdCalc">
             <property name="visible">True</property>
             <property name="can-focus">False</property>
@@ -879,7 +859,6 @@
                 <property name="hexpand">True</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -912,7 +891,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -945,7 +923,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -978,7 +955,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -1000,7 +976,7 @@
               </object>
               <packing>
                 <property name="left-attach">0</property>
-                <property name="top-attach">5</property>
+                <property name="top-attach">6</property>
               </packing>
             </child>
             <child>
@@ -1011,14 +987,13 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
               </object>
               <packing>
                 <property name="left-attach">1</property>
-                <property name="top-attach">5</property>
+                <property name="top-attach">6</property>
               </packing>
             </child>
             <child>
@@ -1029,14 +1004,13 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
               </object>
               <packing>
                 <property name="left-attach">1</property>
-                <property name="top-attach">6</property>
+                <property name="top-attach">7</property>
               </packing>
             </child>
             <child>
@@ -1051,7 +1025,7 @@
               </object>
               <packing>
                 <property name="left-attach">0</property>
-                <property name="top-attach">6</property>
+                <property name="top-attach">7</property>
               </packing>
             </child>
             <child>
@@ -1062,14 +1036,13 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
               </object>
               <packing>
                 <property name="left-attach">1</property>
-                <property name="top-attach">7</property>
+                <property name="top-attach">8</property>
               </packing>
             </child>
             <child>
@@ -1084,7 +1057,7 @@
               </object>
               <packing>
                 <property name="left-attach">0</property>
-                <property name="top-attach">7</property>
+                <property name="top-attach">8</property>
               </packing>
             </child>
             <child>
@@ -1095,14 +1068,13 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
               </object>
               <packing>
                 <property name="left-attach">1</property>
-                <property name="top-attach">8</property>
+                <property name="top-attach">9</property>
               </packing>
             </child>
             <child>
@@ -1117,7 +1089,7 @@
               </object>
               <packing>
                 <property name="left-attach">0</property>
-                <property name="top-attach">8</property>
+                <property name="top-attach">9</property>
               </packing>
             </child>
             <child>
@@ -1128,14 +1100,13 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
               </object>
               <packing>
                 <property name="left-attach">1</property>
-                <property name="top-attach">9</property>
+                <property name="top-attach">10</property>
               </packing>
             </child>
             <child>
@@ -1150,7 +1121,7 @@
               </object>
               <packing>
                 <property name="left-attach">0</property>
-                <property name="top-attach">9</property>
+                <property name="top-attach">10</property>
               </packing>
             </child>
             <child>
@@ -1161,14 +1132,13 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
               </object>
               <packing>
                 <property name="left-attach">1</property>
-                <property name="top-attach">10</property>
+                <property name="top-attach">11</property>
               </packing>
             </child>
             <child>
@@ -1183,7 +1153,7 @@
               </object>
               <packing>
                 <property name="left-attach">0</property>
-                <property name="top-attach">10</property>
+                <property name="top-attach">11</property>
               </packing>
             </child>
             <child>
@@ -1194,14 +1164,13 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
               </object>
               <packing>
                 <property name="left-attach">1</property>
-                <property name="top-attach">11</property>
+                <property name="top-attach">12</property>
               </packing>
             </child>
             <child>
@@ -1216,7 +1185,7 @@
               </object>
               <packing>
                 <property name="left-attach">0</property>
-                <property name="top-attach">11</property>
+                <property name="top-attach">12</property>
               </packing>
             </child>
             <child>
@@ -1227,14 +1196,13 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
               </object>
               <packing>
                 <property name="left-attach">1</property>
-                <property name="top-attach">12</property>
+                <property name="top-attach">13</property>
               </packing>
             </child>
             <child>
@@ -1249,7 +1217,7 @@
               </object>
               <packing>
                 <property name="left-attach">0</property>
-                <property name="top-attach">12</property>
+                <property name="top-attach">13</property>
               </packing>
             </child>
             <child>
@@ -1278,7 +1246,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -1296,6 +1263,49 @@
                 <property name="top-attach">4</property>
               </packing>
             </child>
+            <child>
+              <object class="GtkCheckButton" id="textoverflow">
+                <property name="label" translatable="yes" 
context="colorconfigwin|textoverflow">Text overflow</property>
+                <property name="visible">True</property>
+                <property name="can-focus">True</property>
+                <property name="receives-default">False</property>
+                <property name="halign">start</property>
+                <property name="valign">center</property>
+                <property name="draw-indicator">True</property>
+                <accessibility>
+                  <relation type="label-for" target="textoverflow_lb"/>
+                </accessibility>
+              </object>
+              <packing>
+                <property name="left-attach">0</property>
+                <property name="top-attach">5</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkMenuButton" id="textoverflow_lb">
+                <property name="visible">True</property>
+                <property name="can-focus">True</property>
+                <property name="receives-default">False</property>
+                <property name="halign">end</property>
+                <property name="xalign">0</property>
+                <property name="draw-indicator">True</property>
+                <child>
+                  <placeholder/>
+                </child>
+                <accessibility>
+                  <relation type="labelled-by" target="textoverflow"/>
+                </accessibility>
+                <child internal-child="accessible">
+                  <object class="AtkObject" id="textoverflow_lb-atkobject">
+                    <property name="AtkObject::accessible-name" 
translatable="yes" context="colorconfigwin|textoverflow_lb">Text overflow 
color</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="left-attach">1</property>
+                <property name="top-attach">5</property>
+              </packing>
+            </child>
           </object>
         </child>
         <child type="label">
@@ -1339,7 +1349,6 @@
                 <property name="hexpand">True</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -1407,7 +1416,6 @@
                 <property name="hexpand">True</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -1440,7 +1448,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -1473,7 +1480,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -1506,7 +1512,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -1539,7 +1544,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -1572,7 +1576,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -1605,7 +1608,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -1638,7 +1640,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -1706,7 +1707,6 @@
                 <property name="hexpand">True</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -1739,7 +1739,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -1772,7 +1771,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -1805,7 +1803,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -1838,7 +1835,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -1871,7 +1867,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -1904,7 +1899,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -1972,7 +1966,6 @@
                 <property name="hexpand">True</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -2020,7 +2013,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -2053,7 +2045,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
@@ -2086,7 +2077,6 @@
                 <property name="halign">end</property>
                 <property name="xalign">0</property>
                 <property name="draw-indicator">True</property>
-                <property name="label" translatable="no"></property>
                 <child>
                   <placeholder/>
                 </child>
diff --git a/include/svtools/colorcfg.hxx b/include/svtools/colorcfg.hxx
index 8cf02dec72f8..1a6550767abb 100644
--- a/include/svtools/colorcfg.hxx
+++ b/include/svtools/colorcfg.hxx
@@ -58,6 +58,7 @@ enum ColorConfigEntry
     CALCPAGEBREAKMANUAL,
     CALCPAGEBREAKAUTOMATIC,
     CALCHIDDENROWCOL    ,
+    CALCTEXTOVERFLOW    ,
     CALCDETECTIVE       ,
     CALCDETECTIVEERROR       ,
     CALCREFERENCE       ,
diff --git a/officecfg/registry/data/org/openoffice/Office/UI.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI.xcu
index 30e1811960c1..d458ee3447a4 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI.xcu
@@ -316,6 +316,14 @@
             <value xsi:nil="true"/>
           </prop>
         </node>
+        <node oor:name="CalcTextOverflow">
+          <prop oor:name="IsVisible">
+            <value>true</value>
+          </prop>
+          <prop oor:name="Color">
+            <value xsi:nil="true"/>
+          </prop>
+        </node>
         <node oor:name="CalcDetective">
           <prop oor:name="Color">
             <value xsi:nil="true"/>
diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
index c4f78c7ecf9d..7a18fb3381d2 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
@@ -129,14 +129,6 @@
           </info>
           <value>true</value>
         </prop>
-        <prop oor:name="TextOverflow" oor:type="xs:boolean" 
oor:nillable="false">
-          <!-- UIHints: Tools - Options -Spreadsheets - Contents - [Section] 
Display -->
-          <info>
-            <desc>Indicates whether text overflow is marked via a small 
triangle.</desc>
-            <label>Text overflow</label>
-          </info>
-          <value>true</value>
-        </prop>
         <prop oor:name="ObjectGraphic" oor:type="xs:int" oor:nillable="false">
           <!-- UIHints: Tools - Options -Spreadsheets - Contents - [Section] 
Objects -->
           <info>
diff --git a/officecfg/registry/schema/org/openoffice/Office/UI.xcs 
b/officecfg/registry/schema/org/openoffice/Office/UI.xcs
index 303b99b666ef..d955e8993347 100644
--- a/officecfg/registry/schema/org/openoffice/Office/UI.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/UI.xcs
@@ -396,6 +396,22 @@
           </info>
         </prop>
       </group>
+      <group oor:name="CalcTextOverflow">
+        <info>
+          <desc>Specifies the settings used for the text overflow indicator in 
Calc.</desc>
+        </info>
+        <prop oor:name="IsVisible" oor:type="xs:boolean" oor:nillable="false">
+          <info>
+            <desc>Specifies the visibility of the text overflow indicator 
(true = visible).</desc>
+          </info>
+          <value>true</value>
+        </prop>
+        <prop oor:name="Color" oor:type="xs:int">
+          <info>
+            <desc>Specifies the color used for the text overflow 
indicator.</desc>
+          </info>
+        </prop>
+      </group>
       <group oor:name="CalcDetective">
         <info>
           <desc>Specifies the settings used for audition arrows in Calc.</desc>
diff --git a/sc/inc/viewopti.hxx b/sc/inc/viewopti.hxx
index b90e1b65f076..52b23c86b978 100644
--- a/sc/inc/viewopti.hxx
+++ b/sc/inc/viewopti.hxx
@@ -46,7 +46,6 @@ enum ScViewOption
     VOPT_PAGEBREAKS,
     VOPT_SUMMARY,
     VOPT_THEMEDCURSOR,
-    VOPT_CLIPMARKS,
 };
 
 enum ScVObjType
@@ -56,7 +55,7 @@ enum ScVObjType
     VOBJ_TYPE_DRAW
 };
 
-#define MAX_OPT             sal_uInt16(VOPT_CLIPMARKS)+1
+#define MAX_OPT             sal_uInt16(VOPT_THEMEDCURSOR)+1
 #define MAX_TYPE            sal_uInt16(VOBJ_TYPE_DRAW)+1
 
 // SvxGrid options with standard operators
diff --git a/sc/source/core/tool/viewopti.cxx b/sc/source/core/tool/viewopti.cxx
index f243289653cd..ad09d7ea70f4 100644
--- a/sc/source/core/tool/viewopti.cxx
+++ b/sc/source/core/tool/viewopti.cxx
@@ -105,7 +105,6 @@ void ScViewOptions::SetDefaults()
     aOptArr[ VOPT_GRID         ] = true;
     aOptArr[ VOPT_ANCHOR       ] = true;
     aOptArr[ VOPT_PAGEBREAKS   ] = true;
-    aOptArr[ VOPT_CLIPMARKS    ] = true;
     aOptArr[ VOPT_SUMMARY      ] = true;
     aOptArr[ VOPT_THEMEDCURSOR ] = false;
 
@@ -212,10 +211,9 @@ constexpr OUStringLiteral CFGPATH_DISPLAY = 
u"Office.Calc/Content/Display";
 #define SCDISPLAYOPT_FORMULAMARK    3
 #define SCDISPLAYOPT_VALUEHI        4
 #define SCDISPLAYOPT_ANCHOR         5
-#define SCDISPLAYOPT_TEXTOVER       6
-#define SCDISPLAYOPT_OBJECTGRA      7
-#define SCDISPLAYOPT_CHART          8
-#define SCDISPLAYOPT_DRAWING        9
+#define SCDISPLAYOPT_OBJECTGRA      6
+#define SCDISPLAYOPT_CHART          7
+#define SCDISPLAYOPT_DRAWING        8
 
 constexpr OUStringLiteral CFGPATH_GRID = u"Office.Calc/Grid";
 
@@ -254,7 +252,6 @@ Sequence<OUString> ScViewCfg::GetDisplayPropertyNames()
             "FormulaMark",              // SCDISPLAYOPT_FORMULAMARK
             "ValueHighlighting",        // SCDISPLAYOPT_VALUEHI
             "Anchor",                   // SCDISPLAYOPT_ANCHOR
-            "TextOverflow",             // SCDISPLAYOPT_TEXTOVER
             "ObjectGraphic",            // SCDISPLAYOPT_OBJECTGRA
             "Chart",                    // SCDISPLAYOPT_CHART
             "DrawingObject"};           // SCDISPLAYOPT_DRAWING;
@@ -379,9 +376,6 @@ ScViewCfg::ScViewCfg() :
                     case SCDISPLAYOPT_ANCHOR:
                         SetOption( VOPT_ANCHOR, 
ScUnoHelpFunctions::GetBoolFromAny( pValues[nProp] ) );
                         break;
-                    case SCDISPLAYOPT_TEXTOVER:
-                        SetOption( VOPT_CLIPMARKS, 
ScUnoHelpFunctions::GetBoolFromAny( pValues[nProp] ) );
-                        break;
                     case SCDISPLAYOPT_OBJECTGRA:
                         if ( pValues[nProp] >>= nIntVal )
                         {
@@ -547,9 +541,6 @@ IMPL_LINK_NOARG(ScViewCfg, DisplayCommitHdl, 
ScLinkConfigItem&, void)
             case SCDISPLAYOPT_ANCHOR:
                 pValues[nProp] <<= GetOption( VOPT_ANCHOR );
                 break;
-            case SCDISPLAYOPT_TEXTOVER:
-                pValues[nProp] <<= GetOption( VOPT_CLIPMARKS );
-                break;
             case SCDISPLAYOPT_OBJECTGRA:
                 pValues[nProp] <<= static_cast<sal_Int32>(GetObjMode( 
VOBJ_TYPE_OLE ));
                 break;
diff --git a/sc/source/ui/inc/tpview.hxx b/sc/source/ui/inc/tpview.hxx
index ad485b361580..bce6fc28b040 100644
--- a/sc/source/ui/inc/tpview.hxx
+++ b/sc/source/ui/inc/tpview.hxx
@@ -38,7 +38,6 @@ class ScTpContentOptions : public SfxTabPage
     std::unique_ptr<weld::CheckButton> m_xFormulaMarkCB;
     std::unique_ptr<weld::CheckButton> m_xValueCB;
     std::unique_ptr<weld::CheckButton> m_xAnchorCB;
-    std::unique_ptr<weld::CheckButton> m_xClipMarkCB;
     std::unique_ptr<weld::CheckButton> m_xRangeFindCB;
 
     std::unique_ptr<weld::ComboBox> m_xObjGrfLB;
diff --git a/sc/source/ui/optdlg/tpview.cxx b/sc/source/ui/optdlg/tpview.cxx
index f83ce9f033a5..982e9dc1c125 100644
--- a/sc/source/ui/optdlg/tpview.cxx
+++ b/sc/source/ui/optdlg/tpview.cxx
@@ -43,7 +43,6 @@ ScTpContentOptions::ScTpContentOptions(weld::Container* 
pPage, weld::DialogContr
     , m_xFormulaMarkCB(m_xBuilder->weld_check_button("formulamark"))
     , m_xValueCB(m_xBuilder->weld_check_button("value"))
     , m_xAnchorCB(m_xBuilder->weld_check_button("anchor"))
-    , m_xClipMarkCB(m_xBuilder->weld_check_button("clipmark"))
     , m_xRangeFindCB(m_xBuilder->weld_check_button("rangefind"))
     , m_xObjGrfLB(m_xBuilder->weld_combo_box("objgrf"))
     , m_xDiagramLB(m_xBuilder->weld_combo_box("diagram"))
@@ -73,7 +72,6 @@ ScTpContentOptions::ScTpContentOptions(weld::Container* 
pPage, weld::DialogContr
     m_xFormulaMarkCB->connect_toggled(aCBHdl);
     m_xValueCB->connect_toggled(aCBHdl);
     m_xAnchorCB->connect_toggled(aCBHdl);
-    m_xClipMarkCB->connect_toggled(aCBHdl);
 
     m_xVScrollCB->connect_toggled(aCBHdl);
     m_xHScrollCB->connect_toggled(aCBHdl);
@@ -105,7 +103,6 @@ bool    ScTpContentOptions::FillItemSet( SfxItemSet* 
rCoreSet )
         m_xFormulaMarkCB->get_state_changed_from_saved() ||
         m_xValueCB->get_state_changed_from_saved() ||
         m_xAnchorCB->get_state_changed_from_saved() ||
-        m_xClipMarkCB->get_state_changed_from_saved() ||
         m_xObjGrfLB->get_value_changed_from_saved() ||
         m_xDiagramLB->get_value_changed_from_saved() ||
         m_xDrawLB->get_value_changed_from_saved() ||
@@ -149,7 +146,6 @@ void    ScTpContentOptions::Reset( const SfxItemSet* 
rCoreSet )
     
m_xFormulaMarkCB->set_active(m_xLocalOptions->GetOption(VOPT_FORMULAS_MARKS));
     m_xValueCB   ->set_active(m_xLocalOptions->GetOption(VOPT_SYNTAX));
     m_xAnchorCB  ->set_active(m_xLocalOptions->GetOption(VOPT_ANCHOR));
-    m_xClipMarkCB->set_active(m_xLocalOptions->GetOption(VOPT_CLIPMARKS));
 
     m_xObjGrfLB  ->set_active( 
static_cast<sal_uInt16>(m_xLocalOptions->GetObjMode(VOBJ_TYPE_OLE)) );
     m_xDiagramLB ->set_active( 
static_cast<sal_uInt16>(m_xLocalOptions->GetObjMode(VOBJ_TYPE_CHART)) );
@@ -185,7 +181,6 @@ void    ScTpContentOptions::Reset( const SfxItemSet* 
rCoreSet )
     m_xFormulaMarkCB->save_state();
     m_xValueCB->save_state();
     m_xAnchorCB->save_state();
-    m_xClipMarkCB->save_state();
     m_xObjGrfLB->save_value();
     m_xDiagramLB->save_value();
     m_xDrawLB->save_value();
@@ -239,7 +234,6 @@ IMPL_LINK( ScTpContentOptions, CBHdl, weld::Toggleable&, 
rBtn, void )
     else if ( m_xFormulaMarkCB.get() == &rBtn )   eOption = 
VOPT_FORMULAS_MARKS;
     else if ( m_xValueCB.get() == &rBtn )   eOption = VOPT_SYNTAX;
     else if ( m_xAnchorCB.get() == &rBtn )   eOption = VOPT_ANCHOR;
-    else if ( m_xClipMarkCB.get() == &rBtn )   eOption = VOPT_CLIPMARKS;
     else if ( m_xVScrollCB.get()  == &rBtn )   eOption = VOPT_VSCROLL;
     else if ( m_xHScrollCB.get() == &rBtn )   eOption = VOPT_HSCROLL;
     else if ( m_xTblRegCB.get() == &rBtn )   eOption = VOPT_TABCONTROLS;
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index e4e8f1af3696..fa78ad78312e 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -703,7 +703,7 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const 
ScTableInfo& rTableI
     aOutputData.SetShowNullValues   ( rOpts.GetOption( VOPT_NULLVALS ) );
     aOutputData.SetShowFormulas     ( rOpts.GetOption( VOPT_FORMULAS ) );
     aOutputData.SetShowSpellErrors  ( rDoc.GetDocOptions().IsAutoSpell() );
-    aOutputData.SetMarkClipped      ( rOpts.GetOption( VOPT_CLIPMARKS ) );
+    aOutputData.SetMarkClipped      ( 
SC_MOD()->GetColorConfig().GetColorValue(svtools::CALCTEXTOVERFLOW).bIsVisible 
);
 
     aOutputData.SetUseStyleColor( true );       // always set in table view
 
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 14227020e70f..d00f222b0f75 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -2613,17 +2613,10 @@ void ScOutputData::DrawClipMarks()
     if (!bAnyClipped)
         return;
 
-    Color aArrowFillCol( COL_LIGHTRED );
+    Color aArrowFillCol( 
SC_MOD()->GetColorConfig().GetColorValue(svtools::CALCTEXTOVERFLOW).nColor );
+    const bool bIsDarkBackground = 
SC_MOD()->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor.IsDark();
 
     DrawModeFlags nOldDrawMode = mpDev->GetDrawMode();
-    const StyleSettings& rStyleSettings = 
Application::GetSettings().GetStyleSettings();
-    if ( mbUseStyleColor && rStyleSettings.GetHighContrastMode() )
-    {
-        //  use DrawMode to change the arrow's outline color
-        mpDev->SetDrawMode( nOldDrawMode | DrawModeFlags::SettingsLine );
-        //  use text color also for the fill color
-        aArrowFillCol = 
SC_MOD()->GetColorConfig().GetColorValue(svtools::FONTCOLOR).nColor;
-    }
 
     tools::Long nInitPosX = nScrX;
     if ( bLayoutRTL )
@@ -2716,6 +2709,12 @@ void ScOutputData::DrawClipMarks()
                     tools::Long nMarkPixel = static_cast<tools::Long>( 
SC_CLIPMARK_SIZE * mnPPTX );
                     Size aMarkSize( nMarkPixel, (nMarkPixel-1)*2 );
 
+                    const Color aColor = pInfo->pBackground->GetColor();
+                    if ( aColor == COL_AUTO ? bIsDarkBackground : 
aColor.IsDark() )
+                        mpDev->SetDrawMode( nOldDrawMode | 
DrawModeFlags::WhiteLine );
+                    else
+                        mpDev->SetDrawMode( nOldDrawMode | 
DrawModeFlags::BlackLine );
+
                     if (bVertical)
                     {
                         if (pInfo->nClipMark & (bLayoutRTL ? 
ScClipMark::Bottom : ScClipMark::Top))
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index dfcd059089e8..395d959839d3 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -2430,7 +2430,7 @@ void ScTabView::PaintArea( SCCOL nStartCol, SCROW 
nStartRow, SCCOL nEndCol, SCRO
         aStart.AdjustX( -nLayoutSign );      // include change marks
         aStart.AdjustY( -1 );
 
-        bool bMarkClipped = aViewData.GetOptions().GetOption( VOPT_CLIPMARKS );
+        bool bMarkClipped = 
SC_MOD()->GetColorConfig().GetColorValue(svtools::CALCTEXTOVERFLOW).bIsVisible;
         if (bMarkClipped)
         {
             // ScColumn::IsEmptyData has to be optimized for this
diff --git a/sc/uiconfig/scalc/ui/tpviewpage.ui 
b/sc/uiconfig/scalc/ui/tpviewpage.ui
index 4e3f9806956c..b96283d18b69 100644
--- a/sc/uiconfig/scalc/ui/tpviewpage.ui
+++ b/sc/uiconfig/scalc/ui/tpviewpage.ui
@@ -20,7 +20,7 @@
             <property name="label-xalign">0</property>
             <property name="shadow-type">none</property>
             <child>
-              <!-- n-columns=1 n-rows=8 -->
+              <!-- n-columns=1 n-rows=7 -->
               <object class="GtkGrid" id="grid6">
                 <property name="visible">True</property>
                 <property name="can-focus">False</property>
@@ -130,25 +130,6 @@
                     <property name="top-attach">5</property>
                   </packing>
                 </child>
-                <child>
-                  <object class="GtkCheckButton" id="clipmark">
-                    <property name="label" translatable="yes" 
context="tpviewpage|clipmark">Te_xt overflow</property>
-                    <property name="visible">True</property>
-                    <property name="can-focus">True</property>
-                    <property name="receives-default">False</property>
-                    <property name="use-underline">True</property>
-                    <property name="draw-indicator">True</property>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="clipmark-atkobject">
-                        <property name="AtkObject::accessible-description" 
translatable="yes" context="extended_tip|clipmark">If a cell contains text that 
is wider than the width of the cell, the text is displayed over empty 
neighboring cells in the same row. If there is no empty neighboring cell, a 
small triangle at the cell border indicates that the text continues.</property>
-                      </object>
-                    </child>
-                  </object>
-                  <packing>
-                    <property name="left-attach">0</property>
-                    <property name="top-attach">6</property>
-                  </packing>
-                </child>
                 <child>
                   <object class="GtkCheckButton" id="rangefind">
                     <property name="label" translatable="yes" 
context="tpviewpage|rangefind">_Show references in color</property>
@@ -165,7 +146,7 @@
                   </object>
                   <packing>
                     <property name="left-attach">0</property>
-                    <property name="top-attach">7</property>
+                    <property name="top-attach">6</property>
                   </packing>
                 </child>
               </object>
diff --git a/svtools/source/config/colorcfg.cxx 
b/svtools/source/config/colorcfg.cxx
index 8f8488feeefc..3fa88a3886cf 100644
--- a/svtools/source/config/colorcfg.cxx
+++ b/svtools/source/config/colorcfg.cxx
@@ -137,6 +137,7 @@ uno::Sequence< OUString> 
GetPropertyNames(std::u16string_view rScheme)
         { std::u16string_view(u"/CalcPageBreakManual"), false },
         { std::u16string_view(u"/CalcPageBreakAutomatic"), false },
         { std::u16string_view(u"/CalcHiddenColRow"), true },
+        { std::u16string_view(u"/CalcTextOverflow"), true },
         { std::u16string_view(u"/CalcDetective")   ,false },
         { std::u16string_view(u"/CalcDetectiveError")   ,false },
         { std::u16string_view(u"/CalcReference")   ,false },
@@ -398,6 +399,7 @@ Color ColorConfig::GetDefaultColor(ColorConfigEntry eEntry)
         { Color(0x2300dc),  Color(0x2300DC) }, // CALCPAGEBREAKMANUAL
         { COL_GRAY7,        COL_GRAY7       }, // CALCPAGEBREAKAUTOMATIC
         { Color(0x2300dc),  Color(0x2300DC) }, // CALCHIDDENCOLROW
+        { COL_LIGHTRED,     COL_LIGHTRED    }, // CALCTEXTOVERFLOW
         { COL_LIGHTBLUE,    Color(0x355269) }, // CALCDETECTIVE
         { COL_LIGHTRED,     Color(0xC9211E) }, // CALCDETECTIVEERROR
         { Color(0xef0fff),  Color(0x0D23D5) }, // CALCREFERENCE

Reply via email to