officecfg/registry/schema/org/openoffice/Office/Calc.xcs |   44 ---------------
 sc/source/core/tool/viewopti.cxx                         |   34 +----------
 2 files changed, 4 insertions(+), 74 deletions(-)

New commits:
commit 464d5f1265bd3ed2eff0c809152b8ccb53b785df
Author:     Gabor Kelemen <gabor.kelemen.ext...@allotropia.de>
AuthorDate: Thu Nov 30 23:06:37 2023 +0100
Commit:     Gabor Kelemen <kelem...@ubuntu.com>
CommitDate: Tue Dec 5 12:41:09 2023 +0100

    [API CHANGE] Drop unused XAxis/YAxis config groups
    
    from Calc grid options. Spotted while researching for tdf#158473
    
    last mention of ther getters was commented out in 2001 by:
    commit a4e5d2cb47275e91834e41a9d51f1bf11ec409b1
    
    Change-Id: Iffc7b5c4fb50352ad7063fc911039707a20dca4d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160169
    Tested-by: Jenkins
    Reviewed-by: Gabor Kelemen <kelem...@ubuntu.com>

diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
index e1fe88dfa1d9..d54b092eca66 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
@@ -780,50 +780,6 @@
           </info>
           <value>true</value>
         </prop>
-        <group oor:name="XAxis">
-          <!-- UIHints: Tools  Options  Spreadsheet  Grid - [Section] Snap 
grid -->
-          <!-- Notice: Default-value in  (nonmetric: 1270 1/100 mm)-->
-          <info>
-            <desc>Defines the horizontal distance between the single grid 
points in 1/100th millimeters.</desc>
-            <label>X axis</label>
-          </info>
-          <prop oor:name="Metric" oor:type="xs:int" oor:nillable="false">
-            <info>
-              <desc>Specifies the distance that is used with locales that use 
the metric system.</desc>
-              <label/>
-            </info>
-            <value>1000</value>
-          </prop>
-          <prop oor:name="NonMetric" oor:type="xs:int" oor:nillable="false">
-            <info>
-              <desc>Specifies the distance that is used with locales that 
don't use the metric system.</desc>
-              <label/>
-            </info>
-            <value>1270</value>
-          </prop>
-        </group>
-        <group oor:name="YAxis">
-          <!-- UIHints: Tools  Options  Spreadsheet  Grid - [Section] Snap 
grid -->
-          <!-- Notice: Default-value in nonmetric: 1270 1/100 mm-->
-          <info>
-            <desc>Defines the vertical distance between the single grid points 
in 1/100th millimeters.</desc>
-            <label>Y axis</label>
-          </info>
-          <prop oor:name="Metric" oor:type="xs:int" oor:nillable="false">
-            <info>
-              <desc>Specifies the distance that is used with locales that use 
the metric system.</desc>
-              <label/>
-            </info>
-            <value>1000</value>
-          </prop>
-          <prop oor:name="NonMetric" oor:type="xs:int" oor:nillable="false">
-            <info>
-              <desc>Specifies the distance that is used with locales that 
don't use the metric system.</desc>
-              <label/>
-            </info>
-            <value>1270</value>
-          </prop>
-        </group>
       </group>
       <group oor:name="Resolution">
         <info>
diff --git a/sc/source/core/tool/viewopti.cxx b/sc/source/core/tool/viewopti.cxx
index 41394ded9a16..39e2e6e0e762 100644
--- a/sc/source/core/tool/viewopti.cxx
+++ b/sc/source/core/tool/viewopti.cxx
@@ -46,15 +46,11 @@ void ScGridOptions::SetDefaults()
     {
         nFldDrawX = 1000;   // 1cm
         nFldDrawY = 1000;
-        nFldSnapX = 1000;
-        nFldSnapY = 1000;
     }
     else
     {
         nFldDrawX = 1270;   // 0,5"
         nFldDrawY = 1270;
-        nFldSnapX = 1270;
-        nFldSnapY = 1270;
     }
     nFldDivisionX = 1;
     nFldDivisionY = 1;
@@ -66,8 +62,6 @@ bool ScGridOptions::operator==( const ScGridOptions& rCpy ) 
const
             && nFldDivisionX    == rCpy.nFldDivisionX
             && nFldDrawY        == rCpy.nFldDrawY
             && nFldDivisionY    == rCpy.nFldDivisionY
-            && nFldSnapX        == rCpy.nFldSnapX
-            && nFldSnapY        == rCpy.nFldSnapY
             && bUseGridsnap     == rCpy.bUseGridsnap
             && bSynchronize     == rCpy.bSynchronize
             && bGridVisible     == rCpy.bGridVisible
@@ -156,8 +150,6 @@ std::unique_ptr<SvxGridItem> 
ScViewOptions::CreateGridItem() const
     pItem->SetFieldDivisionX  ( aGridOpt.GetFieldDivisionX() );
     pItem->SetFieldDrawY      ( aGridOpt.GetFieldDrawY() );
     pItem->SetFieldDivisionY  ( aGridOpt.GetFieldDivisionY() );
-    pItem->SetFieldSnapX      ( aGridOpt.GetFieldSnapX() );
-    pItem->SetFieldSnapY      ( aGridOpt.GetFieldSnapY() );
     pItem->SetUseGridSnap   ( aGridOpt.GetUseGridSnap() );
     pItem->SetSynchronize   ( aGridOpt.GetSynchronize() );
     pItem->SetGridVisible   ( aGridOpt.GetGridVisible() );
@@ -227,12 +219,10 @@ constexpr OUStringLiteral CFGPATH_GRID = 
u"Office.Calc/Grid";
 #define SCGRIDOPT_RESOLU_Y          1
 #define SCGRIDOPT_SUBDIV_X          2
 #define SCGRIDOPT_SUBDIV_Y          3
-#define SCGRIDOPT_OPTION_X          4
-#define SCGRIDOPT_OPTION_Y          5
-#define SCGRIDOPT_SNAPTOGRID        6
-#define SCGRIDOPT_SYNCHRON          7
-#define SCGRIDOPT_VISIBLE           8
-#define SCGRIDOPT_SIZETOGRID        9
+#define SCGRIDOPT_SNAPTOGRID        4
+#define SCGRIDOPT_SYNCHRON          5
+#define SCGRIDOPT_VISIBLE           6
+#define SCGRIDOPT_SIZETOGRID        7
 
 Sequence<OUString> ScViewCfg::GetLayoutPropertyNames()
 {
@@ -273,10 +263,6 @@ Sequence<OUString> ScViewCfg::GetGridPropertyNames()
                        : OUString("Resolution/YAxis/NonMetric")),   // 
SCGRIDOPT_RESOLU_Y
              "Subdivision/XAxis",                                   // 
SCGRIDOPT_SUBDIV_X
              "Subdivision/YAxis",                                   // 
SCGRIDOPT_SUBDIV_Y
-            (bIsMetric ? OUString("Option/XAxis/Metric")
-                       : OUString("Option/XAxis/NonMetric")),       // 
SCGRIDOPT_OPTION_X
-            (bIsMetric ? OUString("Option/YAxis/Metric")
-                       : OUString("Option/YAxis/NonMetric")),       // 
SCGRIDOPT_OPTION_Y
              "Option/SnapToGrid",                                   // 
SCGRIDOPT_SNAPTOGRID
              "Option/Synchronize",                                  // 
SCGRIDOPT_SYNCHRON
              "Option/VisibleGrid",                                  // 
SCGRIDOPT_VISIBLE
@@ -442,12 +428,6 @@ ScViewCfg::ScViewCfg() :
                     case SCGRIDOPT_SUBDIV_Y:
                         if (pValues[nProp] >>= nIntVal) 
aGrid.SetFieldDivisionY( nIntVal );
                         break;
-                    case SCGRIDOPT_OPTION_X:
-                        if (pValues[nProp] >>= nIntVal) aGrid.SetFieldSnapX( 
nIntVal );
-                        break;
-                    case SCGRIDOPT_OPTION_Y:
-                        if (pValues[nProp] >>= nIntVal) aGrid.SetFieldSnapY( 
nIntVal );
-                        break;
                     case SCGRIDOPT_SNAPTOGRID:
                         aGrid.SetUseGridSnap( 
ScUnoHelpFunctions::GetBoolFromAny( pValues[nProp] ) );
                         break;
@@ -585,12 +565,6 @@ IMPL_LINK_NOARG(ScViewCfg, GridCommitHdl, 
ScLinkConfigItem&, void)
             case SCGRIDOPT_SUBDIV_Y:
                 pValues[nProp] <<= 
static_cast<sal_Int32>(rGrid.GetFieldDivisionY());
                 break;
-            case SCGRIDOPT_OPTION_X:
-                pValues[nProp] <<= 
static_cast<sal_Int32>(rGrid.GetFieldSnapX());
-                break;
-            case SCGRIDOPT_OPTION_Y:
-                pValues[nProp] <<= 
static_cast<sal_Int32>(rGrid.GetFieldSnapY());
-                break;
             case SCGRIDOPT_SNAPTOGRID:
                 pValues[nProp] <<= rGrid.GetUseGridSnap();
                 break;

Reply via email to