include/svx/optgrid.hxx                                     |    6 -
 officecfg/registry/schema/org/openoffice/Office/Draw.xcs    |   44 ------------
 officecfg/registry/schema/org/openoffice/Office/Impress.xcs |   44 ------------
 sd/source/ui/app/optsitem.cxx                               |   31 ++------
 sd/source/ui/inc/optsitem.hxx                               |    4 -
 svx/source/dialog/optgrid.cxx                               |    6 -
 6 files changed, 9 insertions(+), 126 deletions(-)

New commits:
commit 83cc8ef8f8a459ca7a793acb220f4496b6e6af1a
Author:     Gabor Kelemen <[email protected]>
AuthorDate: Fri Dec 1 00:22:30 2023 +0100
Commit:     Thorsten Behrens <[email protected]>
CommitDate: Thu Dec 7 16:53:24 2023 +0100

    [API CHANGE] Drop unused SnapGrid/[X,Y]Axis config groups
    
    from Impress/Draw
    
    last mention of them was removed in 2006 by:
    commit deef3fdfd9148ce1987b35a224998d63bb6b9d56
    
    removing a commented out caller
    that was already commented out by "initial import" time
    
    Change-Id: I50fefe42a92c752727dfbf3b9d7c645492d034da
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160190
    Tested-by: Jenkins
    Reviewed-by: Thorsten Behrens <[email protected]>

diff --git a/include/svx/optgrid.hxx b/include/svx/optgrid.hxx
index ed71e62cdb53..7cdcdf8399f3 100644
--- a/include/svx/optgrid.hxx
+++ b/include/svx/optgrid.hxx
@@ -36,8 +36,6 @@ protected:
     sal_uInt32  nFldDivisionX;
     sal_uInt32  nFldDrawY;
     sal_uInt32  nFldDivisionY;
-    sal_uInt32  nFldSnapX;
-    sal_uInt32  nFldSnapY;
     bool        bUseGridsnap:1;
     bool        bSynchronize:1;
     bool        bGridVisible:1;
@@ -50,8 +48,6 @@ public:
     void    SetFieldDivisionX(sal_uInt32 nSet){nFldDivisionX  = nSet;}
     void    SetFieldDrawY   ( sal_uInt32 nSet){nFldDrawY      = nSet;}
     void    SetFieldDivisionY(sal_uInt32 nSet){nFldDivisionY  = nSet;}
-    void    SetFieldSnapX(    sal_uInt32 nSet){nFldSnapX      = nSet;}
-    void    SetFieldSnapY   ( sal_uInt32 nSet){nFldSnapY      = nSet;}
     void    SetUseGridSnap( bool bSet ) {bUseGridsnap   = bSet;}
     void    SetSynchronize( bool bSet ) {bSynchronize   = bSet;}
     void    SetGridVisible( bool bSet ) {bGridVisible   = bSet;}
@@ -61,8 +57,6 @@ public:
     sal_uInt32  GetFieldDivisionX() const {  return nFldDivisionX;}
     sal_uInt32  GetFieldDrawY   ( ) const {  return nFldDrawY;    }
     sal_uInt32  GetFieldDivisionY() const {  return nFldDivisionY;}
-    sal_uInt32  GetFieldSnapX(    ) const {  return nFldSnapX;    }
-    sal_uInt32  GetFieldSnapY   ( ) const {  return nFldSnapY;    }
     bool        GetUseGridSnap( ) const {  return bUseGridsnap; }
     bool        GetSynchronize( ) const {  return bSynchronize; }
     bool        GetGridVisible( ) const {  return bGridVisible; }
diff --git a/officecfg/registry/schema/org/openoffice/Office/Draw.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Draw.xcs
index 069479636c8b..7fdbf9f05801 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Draw.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Draw.xcs
@@ -690,50 +690,6 @@
           </info>
           <value>true</value>
         </prop>
-        <group oor:name="XAxis">
-          <!-- UIHints: Tools - Options - Draw - Grid - [Section] Snap grid -->
-          <!-- Notice: Default-nonmetrical value: 1270 1/100 mm. -->
-          <info>
-            <desc>Defines the horizontal distance between adjacent points of 
the snap grid.</desc>
-            <label>X axis</label>
-          </info>
-          <prop oor:name="Metric" oor:type="xs:int" oor:nillable="false">
-            <info>
-              <desc>[UNIT=1/100 mm]</desc>
-              <label/>
-            </info>
-            <value>1000</value>
-          </prop>
-          <prop oor:name="NonMetric" oor:type="xs:int" oor:nillable="false">
-            <info>
-              <desc>[UNIT=1/100 mm]</desc>
-              <label/>
-            </info>
-            <value>1270</value>
-          </prop>
-        </group>
-        <group oor:name="YAxis">
-          <!-- UIHints: Tools - Options - Draw - Grid - [Section] Snap grid -->
-          <!-- Notice: Default-Default-nonmetrical value: 1270 1/100 mm. -->
-          <info>
-            <desc>Defines the vertical distance between adjacent points of the 
snap grid.</desc>
-            <label>Y axis</label>
-          </info>
-          <prop oor:name="Metric" oor:type="xs:int" oor:nillable="false">
-            <info>
-              <desc>[UNIT=1/100 mm]</desc>
-              <label/>
-            </info>
-            <value>1000</value>
-          </prop>
-          <prop oor:name="NonMetric" oor:type="xs:int" oor:nillable="false">
-            <info>
-              <desc>[UNIT=1/100 mm]</desc>
-              <label/>
-            </info>
-            <value>1270</value>
-          </prop>
-        </group>
       </group>
     </group>
     <group oor:name="Print">
diff --git a/officecfg/registry/schema/org/openoffice/Office/Impress.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Impress.xcs
index bf65b1b9e411..876780d1bd09 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Impress.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Impress.xcs
@@ -927,50 +927,6 @@
           </info>
           <value>true</value>
         </prop>
-        <group oor:name="XAxis">
-          <!-- UIHints: Tools - Options - Impress - Grid - [Section] Snap grid 
-->
-          <!-- Notice: Default-nonmetrical value: 1270 1/100 mm. -->
-          <info>
-            <desc>Defines the horizontal distance between adjacent points of 
the snap grid.</desc>
-            <label>X axis</label>
-          </info>
-          <prop oor:name="Metric" oor:type="xs:int" oor:nillable="false">
-            <info>
-              <desc>Defines the horizontal distance between adjacent points of 
the snap grid in 1/100 mm, used when the metric system is selected.</desc>
-              <label/>
-            </info>
-            <value>100</value>
-          </prop>
-          <prop oor:name="NonMetric" oor:type="xs:int" oor:nillable="false">
-            <info>
-              <desc>Defines the horizontal distance between adjacent points of 
the snap grid in 1/100 mm, used when the non-metric system is selected.</desc>
-              <label/>
-            </info>
-            <value>1270</value>
-          </prop>
-        </group>
-        <group oor:name="YAxis">
-          <!-- UIHints: Tools - Options - Impress - Grid - [Section] Snap grid 
-->
-          <!-- Notice: Default-Default-nonmetrical value: 1270 1/100 mm. -->
-          <info>
-            <desc>Defines the vertical distance between adjacent points of the 
snap grid.</desc>
-            <label>Y axis</label>
-          </info>
-          <prop oor:name="Metric" oor:type="xs:int" oor:nillable="false">
-            <info>
-              <desc>Defines the vertical distance between adjacent points of 
the snap grid in 1/100 mm, used when the metric system is selected.</desc>
-              <label/>
-            </info>
-            <value>100</value>
-          </prop>
-          <prop oor:name="NonMetric" oor:type="xs:int" oor:nillable="false">
-            <info>
-              <desc>Defines the vertical distance between adjacent points of 
the snap grid in 1/100 mm, used when the non-metric system is selected.</desc>
-              <label/>
-            </info>
-            <value>1270</value>
-          </prop>
-        </group>
       </group>
     </group>
     <group oor:name="Print">
diff --git a/sd/source/ui/app/optsitem.cxx b/sd/source/ui/app/optsitem.cxx
index 97a2f824af57..9fd8d453bbcd 100644
--- a/sd/source/ui/app/optsitem.cxx
+++ b/sd/source/ui/app/optsitem.cxx
@@ -970,8 +970,6 @@ void SdOptionsGrid::SetDefaults()
     SetFieldDivisionY( nVal );
     SetFieldDrawX( nVal );
     SetFieldDrawY( nVal );
-    SetFieldSnapX( nVal );
-    SetFieldSnapY( nVal );
     SetUseGridSnap( false );
     SetSynchronize( true );
     SetGridVisible( false );
@@ -988,8 +986,6 @@ void SdOptionsGrid::GetPropNameArray( const char**& 
ppNames, sal_uLong& rCount )
             "Resolution/YAxis/Metric",
             "Subdivision/XAxis",
             "Subdivision/YAxis",
-            "SnapGrid/XAxis/Metric",
-            "SnapGrid/YAxis/Metric",
             "Option/SnapToGrid",
             "Option/Synchronize",
             "Option/VisibleGrid",
@@ -1006,8 +1002,6 @@ void SdOptionsGrid::GetPropNameArray( const char**& 
ppNames, sal_uLong& rCount )
             "Resolution/YAxis/NonMetric",
             "Subdivision/XAxis",
             "Subdivision/YAxis",
-            "SnapGrid/XAxis/NonMetric",
-            "SnapGrid/YAxis/NonMetric",
             "Option/SnapToGrid",
             "Option/Synchronize",
             "Option/VisibleGrid",
@@ -1034,13 +1028,10 @@ bool SdOptionsGrid::ReadData( const Any* pValues )
         const sal_uInt32 nDivY = FRound( *o3tl::doAccess<double>(pValues[ 3 ]) 
);
         SetFieldDivisionY( SvxOptionsGrid::GetFieldDrawY() / ( nDivY + 1 ) );
     }
-
-    if( pValues[4].hasValue() ) SetFieldSnapX( 
*o3tl::doAccess<sal_Int32>(pValues[ 4 ]) );
-    if( pValues[5].hasValue() ) SetFieldSnapY( 
*o3tl::doAccess<sal_Int32>(pValues[ 5 ]) );
-    if( pValues[6].hasValue() ) SetUseGridSnap( *o3tl::doAccess<bool>(pValues[ 
6 ]) );
-    if( pValues[7].hasValue() ) SetSynchronize( *o3tl::doAccess<bool>(pValues[ 
7 ]) );
-    if( pValues[8].hasValue() ) SetGridVisible( *o3tl::doAccess<bool>(pValues[ 
8 ]) );
-    if( pValues[9].hasValue() ) SetEqualGrid( *o3tl::doAccess<bool>(pValues[ 9 
]) );
+    if( pValues[4].hasValue() ) SetUseGridSnap( *o3tl::doAccess<bool>(pValues[ 
4 ]) );
+    if( pValues[5].hasValue() ) SetSynchronize( *o3tl::doAccess<bool>(pValues[ 
5 ]) );
+    if( pValues[6].hasValue() ) SetGridVisible( *o3tl::doAccess<bool>(pValues[ 
6 ]) );
+    if( pValues[7].hasValue() ) SetEqualGrid( *o3tl::doAccess<bool>(pValues[ 7 
]) );
 
     return true;
 }
@@ -1051,12 +1042,10 @@ bool SdOptionsGrid::WriteData( Any* pValues ) const
     pValues[ 1 ] <<= static_cast<sal_Int32>(GetFieldDrawY());
     pValues[ 2 ] <<= ( GetFieldDivisionX() ? ( 
static_cast<double>(GetFieldDrawX()) / GetFieldDivisionX() - 1.0 ) : double(0) 
);
     pValues[ 3 ] <<= ( GetFieldDivisionY() ? ( 
static_cast<double>(GetFieldDrawY()) / GetFieldDivisionY() - 1.0 ) : double(0) 
);
-    pValues[ 4 ] <<= static_cast<sal_Int32>(GetFieldSnapX());
-    pValues[ 5 ] <<= static_cast<sal_Int32>(GetFieldSnapY());
-    pValues[ 6 ] <<= IsUseGridSnap();
-    pValues[ 7 ] <<= IsSynchronize();
-    pValues[ 8 ] <<= IsGridVisible();
-    pValues[ 9 ] <<= IsEqualGrid();
+    pValues[ 4 ] <<= IsUseGridSnap();
+    pValues[ 5 ] <<= IsSynchronize();
+    pValues[ 6 ] <<= IsGridVisible();
+    pValues[ 7 ] <<= IsEqualGrid();
 
     return true;
 }
@@ -1077,8 +1066,6 @@ SdOptionsGridItem::SdOptionsGridItem( SdOptions const * 
pOpts ) :
     SetFieldDrawY( pOpts->GetFieldDrawY() );
     SetFieldDivisionX( pOpts->GetFieldDivisionX() ? ( pOpts->GetFieldDrawX() / 
pOpts->GetFieldDivisionX() - 1 ) : 0 );
     SetFieldDivisionY( pOpts->GetFieldDivisionY() ? ( pOpts->GetFieldDrawY() / 
pOpts->GetFieldDivisionY() - 1 ) : 0 );
-    SetFieldSnapX( pOpts->GetFieldSnapX() );
-    SetFieldSnapY( pOpts->GetFieldSnapY() );
     SetUseGridSnap( pOpts->IsUseGridSnap() );
     SetGridVisible( pOpts->IsGridVisible() );
 }
@@ -1089,8 +1076,6 @@ void SdOptionsGridItem::SetOptions( SdOptions* pOpts ) 
const
     pOpts->SetFieldDivisionX( GetFieldDrawX() / ( GetFieldDivisionX() + 1 ) );
     pOpts->SetFieldDrawY( GetFieldDrawY() );
     pOpts->SetFieldDivisionY( GetFieldDrawY() / ( GetFieldDivisionY() + 1 ) );
-    pOpts->SetFieldSnapX( GetFieldSnapX() );
-    pOpts->SetFieldSnapY( GetFieldSnapY() );
     pOpts->SetUseGridSnap( GetUseGridSnap() );
     pOpts->SetSynchronize( GetSynchronize() );
     pOpts->SetGridVisible( GetGridVisible() );
diff --git a/sd/source/ui/inc/optsitem.hxx b/sd/source/ui/inc/optsitem.hxx
index 9ec3d4a1b58b..3a71f53186db 100644
--- a/sd/source/ui/inc/optsitem.hxx
+++ b/sd/source/ui/inc/optsitem.hxx
@@ -434,8 +434,6 @@ public:
     sal_uInt32  GetFieldDivisionX() const { Init(); return 
SvxOptionsGrid::GetFieldDivisionX(); }
     sal_uInt32  GetFieldDrawY() const { Init(); return 
SvxOptionsGrid::GetFieldDrawY(); }
     sal_uInt32  GetFieldDivisionY() const { Init(); return 
SvxOptionsGrid::GetFieldDivisionY(); }
-    sal_uInt32  GetFieldSnapX() const { Init(); return 
SvxOptionsGrid::GetFieldSnapX(); }
-    sal_uInt32  GetFieldSnapY() const { Init(); return 
SvxOptionsGrid::GetFieldSnapY(); }
     bool    IsUseGridSnap() const { Init(); return 
SvxOptionsGrid::GetUseGridSnap(); }
     bool    IsSynchronize() const { Init(); return 
SvxOptionsGrid::GetSynchronize(); }
     bool    IsGridVisible() const { Init(); return 
SvxOptionsGrid::GetGridVisible(); }
@@ -445,8 +443,6 @@ public:
     void    SetFieldDivisionX( sal_uInt32 nSet ) { if( nSet != 
SvxOptionsGrid::GetFieldDivisionX() ) { OptionsChanged(); 
SvxOptionsGrid::SetFieldDivisionX( nSet ); } }
     void    SetFieldDrawY( sal_uInt32 nSet ) { if( nSet != 
SvxOptionsGrid::GetFieldDrawY() ) { OptionsChanged(); 
SvxOptionsGrid::SetFieldDrawY( nSet ); } }
     void    SetFieldDivisionY( sal_uInt32 nSet ) { if( nSet != 
SvxOptionsGrid::GetFieldDivisionY() ) { OptionsChanged(); 
SvxOptionsGrid::SetFieldDivisionY( nSet ); } }
-    void    SetFieldSnapX( sal_uInt32 nSet ) { if( nSet != 
SvxOptionsGrid::GetFieldSnapX() ) { OptionsChanged(); 
SvxOptionsGrid::SetFieldSnapX( nSet ); } }
-    void    SetFieldSnapY( sal_uInt32 nSet ) { if( nSet != 
SvxOptionsGrid::GetFieldSnapY() ) { OptionsChanged(); 
SvxOptionsGrid::SetFieldSnapY( nSet ); } }
     void    SetUseGridSnap( bool bSet ) { if( bSet != 
SvxOptionsGrid::GetUseGridSnap() ) { OptionsChanged(); 
SvxOptionsGrid::SetUseGridSnap( bSet ); } }
     void    SetSynchronize( bool bSet ) { if( bSet != 
SvxOptionsGrid::GetSynchronize() ) { OptionsChanged(); 
SvxOptionsGrid::SetSynchronize( bSet ); } }
     void    SetGridVisible( bool bSet ) { if( bSet != 
SvxOptionsGrid::GetGridVisible() ) { OptionsChanged(); 
SvxOptionsGrid::SetGridVisible( bSet ); } }
diff --git a/svx/source/dialog/optgrid.cxx b/svx/source/dialog/optgrid.cxx
index c0e6f6ebe03b..2226eaa4e23c 100644
--- a/svx/source/dialog/optgrid.cxx
+++ b/svx/source/dialog/optgrid.cxx
@@ -58,8 +58,6 @@ SvxOptionsGrid::SvxOptionsGrid() :
     nFldDivisionX   ( 0 ),
     nFldDrawY       ( 100 ),
     nFldDivisionY   ( 0 ),
-    nFldSnapX       ( 100 ),
-    nFldSnapY       ( 100 ),
     bUseGridsnap    ( false ),
     bSynchronize    ( true ),
     bGridVisible    ( false ),
@@ -85,9 +83,7 @@ bool SvxGridItem::operator==( const SfxPoolItem& rAttr ) const
                 nFldDrawX    == rItem.nFldDrawX    &&
                 nFldDivisionX== rItem.nFldDivisionX&&
                 nFldDrawY    == rItem.nFldDrawY    &&
-                nFldDivisionY== rItem.nFldDivisionY&&
-                nFldSnapX    == rItem.nFldSnapX    &&
-                nFldSnapY    == rItem.nFldSnapY     );
+                nFldDivisionY== rItem.nFldDivisionY );
 }
 
 bool  SvxGridItem::GetPresentation

Reply via email to