[API CHANGE] Remove SnapGrid groups and SizeToGrid option
in Impress/Draw and Calc respectively. org.openoffice.Office.Calc/Grid/Option/SizeToGrid org.openoffice.Office.Draw/Grid/SnapGrid/Size org.openoffice.Office.Impress/Grid/SnapGrid/Size Seems like ever since "initial import" these were doing nothing useful. Change-Id: I5cf6bb7e4c4f91e57b6dba3c9ad7e7774f05e87b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191852 Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com> Tested-by: Jenkins
This commit is contained in:
@@ -38,7 +38,6 @@ protected:
|
||||
bool bUseGridsnap:1;
|
||||
bool bSynchronize:1;
|
||||
bool bGridVisible:1;
|
||||
bool bEqualGrid: 1;
|
||||
|
||||
public:
|
||||
SvxOptionsGrid();
|
||||
@@ -50,7 +49,6 @@ public:
|
||||
void SetUseGridSnap( bool bSet ) {bUseGridsnap = bSet;}
|
||||
void SetSynchronize( bool bSet ) {bSynchronize = bSet;}
|
||||
void SetGridVisible( bool bSet ) {bGridVisible = bSet;}
|
||||
void SetEqualGrid( bool bSet ) {bEqualGrid = bSet;}
|
||||
|
||||
sal_uInt32 GetFieldDrawX( ) const { return nFldDrawX; }
|
||||
sal_uInt32 GetFieldDivisionX() const { return nFldDivisionX;}
|
||||
@@ -59,7 +57,6 @@ public:
|
||||
bool GetUseGridSnap( ) const { return bUseGridsnap; }
|
||||
bool GetSynchronize( ) const { return bSynchronize; }
|
||||
bool GetGridVisible( ) const { return bGridVisible; }
|
||||
bool GetEqualGrid() const { return bEqualGrid; }
|
||||
};
|
||||
|
||||
class SVX_DLLPUBLIC SvxGridItem : public SvxOptionsGrid, public SfxPoolItem
|
||||
|
||||
@@ -809,14 +809,6 @@
|
||||
</info>
|
||||
<value>false</value>
|
||||
</prop>
|
||||
<prop oor:name="SizeToGrid" oor:type="xs:boolean" oor:nillable="false">
|
||||
<!-- UIHints: Tools Options Spreadsheet Grid - [Section] Snap grid -->
|
||||
<info>
|
||||
<desc>Specifies whether the snap grid is matched with the main grid.</desc>
|
||||
<label>Size to grid</label>
|
||||
</info>
|
||||
<value>true</value>
|
||||
</prop>
|
||||
<prop oor:name="VisibleGrid" oor:type="xs:boolean" oor:nillable="false">
|
||||
<!-- UIHints: Tools - Options Spreadsheet Grid - [Section] Options -->
|
||||
<info>
|
||||
|
||||
@@ -697,19 +697,6 @@
|
||||
<value>3</value>
|
||||
</prop>
|
||||
</group>
|
||||
<group oor:name="SnapGrid">
|
||||
<info>
|
||||
<desc>Specifies the snap grid.</desc>
|
||||
</info>
|
||||
<prop oor:name="Size" oor:type="xs:boolean" oor:nillable="false">
|
||||
<!-- UIHints: Tools - Options - Draw - Grid - [Section] Snap grid -->
|
||||
<info>
|
||||
<desc>Indicates whether to synchronize grid and snap-grid.</desc>
|
||||
<label>Size to grid</label>
|
||||
</info>
|
||||
<value>true</value>
|
||||
</prop>
|
||||
</group>
|
||||
</group>
|
||||
<group oor:name="Print">
|
||||
<info>
|
||||
|
||||
@@ -933,19 +933,6 @@
|
||||
<value>3</value>
|
||||
</prop>
|
||||
</group>
|
||||
<group oor:name="SnapGrid">
|
||||
<info>
|
||||
<desc>Contains the specifications of the snap grid.</desc>
|
||||
</info>
|
||||
<prop oor:name="Size" oor:type="xs:boolean" oor:nillable="false">
|
||||
<!-- UIHints: Tools - Options - Impress - Grid - [Section] Snap grid -->
|
||||
<info>
|
||||
<desc>Indicates whether to synchronize grid and snap-grid.</desc>
|
||||
<label>Size to grid</label>
|
||||
</info>
|
||||
<value>true</value>
|
||||
</prop>
|
||||
</group>
|
||||
</group>
|
||||
<group oor:name="Print">
|
||||
<info>
|
||||
|
||||
@@ -64,8 +64,7 @@ bool ScGridOptions::operator==( const ScGridOptions& rCpy ) const
|
||||
&& nFldDivisionY == rCpy.nFldDivisionY
|
||||
&& bUseGridsnap == rCpy.bUseGridsnap
|
||||
&& bSynchronize == rCpy.bSynchronize
|
||||
&& bGridVisible == rCpy.bGridVisible
|
||||
&& bEqualGrid == rCpy.bEqualGrid );
|
||||
&& bGridVisible == rCpy.bGridVisible );
|
||||
}
|
||||
|
||||
ScViewRenderingOptions::ScViewRenderingOptions()
|
||||
@@ -161,7 +160,6 @@ std::unique_ptr<SvxGridItem> ScViewOptions::CreateGridItem() const
|
||||
pItem->SetUseGridSnap ( aGridOpt.GetUseGridSnap() );
|
||||
pItem->SetSynchronize ( aGridOpt.GetSynchronize() );
|
||||
pItem->SetGridVisible ( aGridOpt.GetGridVisible() );
|
||||
pItem->SetEqualGrid ( aGridOpt.GetEqualGrid() );
|
||||
|
||||
return pItem;
|
||||
}
|
||||
@@ -231,7 +229,6 @@ constexpr OUStringLiteral CFGPATH_GRID = u"Office.Calc/Grid";
|
||||
#define SCGRIDOPT_SNAPTOGRID 4
|
||||
#define SCGRIDOPT_SYNCHRON 5
|
||||
#define SCGRIDOPT_VISIBLE 6
|
||||
#define SCGRIDOPT_SIZETOGRID 7
|
||||
|
||||
Sequence<OUString> ScViewCfg::GetLayoutPropertyNames()
|
||||
{
|
||||
@@ -275,8 +272,7 @@ Sequence<OUString> ScViewCfg::GetGridPropertyNames()
|
||||
u"Subdivision/YAxis"_ustr, // SCGRIDOPT_SUBDIV_Y
|
||||
u"Option/SnapToGrid"_ustr, // SCGRIDOPT_SNAPTOGRID
|
||||
u"Option/Synchronize"_ustr, // SCGRIDOPT_SYNCHRON
|
||||
u"Option/VisibleGrid"_ustr, // SCGRIDOPT_VISIBLE
|
||||
u"Option/SizeToGrid"_ustr}; // SCGRIDOPT_SIZETOGRID;
|
||||
u"Option/VisibleGrid"_ustr}; // SCGRIDOPT_VISIBLE
|
||||
}
|
||||
|
||||
ScViewCfg::ScViewCfg() :
|
||||
@@ -568,9 +564,6 @@ void ScViewCfg::ReadGridCfg()
|
||||
case SCGRIDOPT_VISIBLE:
|
||||
aGrid.SetGridVisible( ScUnoHelpFunctions::GetBoolFromAny( pValues[nProp] ) );
|
||||
break;
|
||||
case SCGRIDOPT_SIZETOGRID:
|
||||
aGrid.SetEqualGrid( ScUnoHelpFunctions::GetBoolFromAny( pValues[nProp] ) );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -616,9 +609,6 @@ IMPL_LINK_NOARG(ScViewCfg, GridCommitHdl, ScLinkConfigItem&, void)
|
||||
case SCGRIDOPT_VISIBLE:
|
||||
pValues[nProp] <<= rGrid.GetGridVisible();
|
||||
break;
|
||||
case SCGRIDOPT_SIZETOGRID:
|
||||
pValues[nProp] <<= rGrid.GetEqualGrid();
|
||||
break;
|
||||
}
|
||||
}
|
||||
aGridItem.PutProperties(aNames, aValues);
|
||||
|
||||
@@ -527,7 +527,6 @@ void SdOptionsGrid::SetDefaults()
|
||||
SetUseGridSnap( false );
|
||||
SetSynchronize( true );
|
||||
SetGridVisible( false );
|
||||
SetEqualGrid( true );
|
||||
}
|
||||
|
||||
void SdOptionsGrid::GetPropNameArray( const char* const*& ppNames, sal_uLong& rCount ) const
|
||||
@@ -590,7 +589,6 @@ bool SdOptionsGrid::ReadData( const Any* pValues )
|
||||
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;
|
||||
}
|
||||
@@ -604,7 +602,6 @@ bool SdOptionsGrid::WriteData( Any* pValues ) const
|
||||
pValues[ 4 ] <<= IsUseGridSnap();
|
||||
pValues[ 5 ] <<= IsSynchronize();
|
||||
pValues[ 6 ] <<= IsGridVisible();
|
||||
pValues[ 7 ] <<= IsEqualGrid();
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -619,7 +616,6 @@ SdOptionsGridItem::SdOptionsGridItem( SdOptions const * pOpts ) :
|
||||
SvxGridItem( SID_ATTR_GRID_OPTIONS )
|
||||
{
|
||||
SetSynchronize( pOpts->IsSynchronize() );
|
||||
SetEqualGrid( pOpts->IsEqualGrid() );
|
||||
|
||||
SetFieldDrawX( pOpts->GetFieldDrawX() );
|
||||
SetFieldDrawY( pOpts->GetFieldDrawY() );
|
||||
@@ -638,7 +634,6 @@ void SdOptionsGridItem::SetOptions( SdOptions* pOpts ) const
|
||||
pOpts->SetUseGridSnap( GetUseGridSnap() );
|
||||
pOpts->SetSynchronize( GetSynchronize() );
|
||||
pOpts->SetGridVisible( GetGridVisible() );
|
||||
pOpts->SetEqualGrid( GetEqualGrid() );
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|
||||
@@ -277,7 +277,6 @@ public:
|
||||
bool IsUseGridSnap() const { Init(); return SvxOptionsGrid::GetUseGridSnap(); }
|
||||
bool IsSynchronize() const { Init(); return SvxOptionsGrid::GetSynchronize(); }
|
||||
bool IsGridVisible() const { Init(); return SvxOptionsGrid::GetGridVisible(); }
|
||||
bool IsEqualGrid() const { Init(); return SvxOptionsGrid::GetEqualGrid(); }
|
||||
|
||||
void SetFieldDrawX( sal_uInt32 nSet ) { if( nSet != SvxOptionsGrid::GetFieldDrawX() ) { OptionsChanged(); SvxOptionsGrid::SetFieldDrawX( nSet ); } }
|
||||
void SetFieldDivisionX( sal_uInt32 nSet ) { if( nSet != SvxOptionsGrid::GetFieldDivisionX() ) { OptionsChanged(); SvxOptionsGrid::SetFieldDivisionX( nSet ); } }
|
||||
@@ -286,7 +285,6 @@ public:
|
||||
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 ); } }
|
||||
void SetEqualGrid( bool bSet ) { if( bSet != SvxOptionsGrid::GetEqualGrid() ) { OptionsChanged(); SvxOptionsGrid::SetEqualGrid( bSet ); } }
|
||||
};
|
||||
|
||||
class SdOptionsGridItem final : public SvxGridItem
|
||||
|
||||
@@ -61,8 +61,7 @@ SvxOptionsGrid::SvxOptionsGrid() :
|
||||
nFldDivisionY ( 0 ),
|
||||
bUseGridsnap ( false ),
|
||||
bSynchronize ( true ),
|
||||
bGridVisible ( false ),
|
||||
bEqualGrid ( true )
|
||||
bGridVisible ( false )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -80,7 +79,6 @@ bool SvxGridItem::operator==( const SfxPoolItem& rAttr ) const
|
||||
return ( bUseGridsnap == rItem.bUseGridsnap &&
|
||||
bSynchronize == rItem.bSynchronize &&
|
||||
bGridVisible == rItem.bGridVisible &&
|
||||
bEqualGrid == rItem.bEqualGrid &&
|
||||
nFldDrawX == rItem.nFldDrawX &&
|
||||
nFldDivisionX== rItem.nFldDivisionX&&
|
||||
nFldDrawY == rItem.nFldDrawY &&
|
||||
|
||||
Reference in New Issue
Block a user