Fix VBA Table's *Padding properties type

In VBA, it is Single, not Double. See VBA documentation:
https://learn.microsoft.com/en-us/office/vba/api/word.table.bottompadding
https://learn.microsoft.com/en-us/office/vba/api/word.table.leftpadding
https://learn.microsoft.com/en-us/office/vba/api/word.table.rightpadding
https://learn.microsoft.com/en-us/office/vba/api/word.table.toppadding

Change-Id: I9262462424fc11b5c062a61754ab0fab9103f549
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169763
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
This commit is contained in:
Mike Kaganski 2024-06-29 23:01:21 +05:00
parent 203bd3f674
commit eb56caec68
3 changed files with 20 additions and 20 deletions

View file

@ -55,10 +55,10 @@ interface XTable
any Rows([in] any aIndex ); any Rows([in] any aIndex );
any Columns([in] any aIndex ); any Columns([in] any aIndex );
[attribute] double BottomPadding; [attribute] float BottomPadding;
[attribute] double LeftPadding; [attribute] float LeftPadding;
[attribute] double RightPadding; [attribute] float RightPadding;
[attribute] double TopPadding; [attribute] float TopPadding;
}; };
}; }; }; }; }; };

View file

@ -95,7 +95,7 @@ SwVbaTable::Borders( const uno::Any& index )
return uno::Any( xCol ); return uno::Any( xCol );
} }
double SAL_CALL float SAL_CALL
SwVbaTable::getBottomPadding() SwVbaTable::getBottomPadding()
{ {
uno::Reference< beans::XPropertySet > xPropertySet( mxTextTable, uno::UNO_QUERY_THROW); uno::Reference< beans::XPropertySet > xPropertySet( mxTextTable, uno::UNO_QUERY_THROW);
@ -105,7 +105,7 @@ SwVbaTable::getBottomPadding()
} }
void SAL_CALL void SAL_CALL
SwVbaTable::setBottomPadding( double fValue ) SwVbaTable::setBottomPadding( float fValue )
{ {
uno::Reference< beans::XPropertySet > xPropertySet( mxTextTable, uno::UNO_QUERY_THROW); uno::Reference< beans::XPropertySet > xPropertySet( mxTextTable, uno::UNO_QUERY_THROW);
table::TableBorderDistances aTableBorderDistances; table::TableBorderDistances aTableBorderDistances;
@ -114,7 +114,7 @@ SwVbaTable::setBottomPadding( double fValue )
xPropertySet->setPropertyValue( u"TableBorderDistances"_ustr, uno::Any( aTableBorderDistances ) ); xPropertySet->setPropertyValue( u"TableBorderDistances"_ustr, uno::Any( aTableBorderDistances ) );
} }
double SAL_CALL float SAL_CALL
SwVbaTable::getLeftPadding() SwVbaTable::getLeftPadding()
{ {
uno::Reference< beans::XPropertySet > xPropertySet( mxTextTable, uno::UNO_QUERY_THROW); uno::Reference< beans::XPropertySet > xPropertySet( mxTextTable, uno::UNO_QUERY_THROW);
@ -124,7 +124,7 @@ SwVbaTable::getLeftPadding()
} }
void SAL_CALL void SAL_CALL
SwVbaTable::setLeftPadding( double fValue ) SwVbaTable::setLeftPadding( float fValue )
{ {
uno::Reference< beans::XPropertySet > xPropertySet( mxTextTable, uno::UNO_QUERY_THROW); uno::Reference< beans::XPropertySet > xPropertySet( mxTextTable, uno::UNO_QUERY_THROW);
table::TableBorderDistances aTableBorderDistances; table::TableBorderDistances aTableBorderDistances;
@ -133,7 +133,7 @@ SwVbaTable::setLeftPadding( double fValue )
xPropertySet->setPropertyValue( u"TableBorderDistances"_ustr, uno::Any( aTableBorderDistances ) ); xPropertySet->setPropertyValue( u"TableBorderDistances"_ustr, uno::Any( aTableBorderDistances ) );
} }
double SAL_CALL float SAL_CALL
SwVbaTable::getRightPadding() SwVbaTable::getRightPadding()
{ {
uno::Reference< beans::XPropertySet > xPropertySet( mxTextTable, uno::UNO_QUERY_THROW); uno::Reference< beans::XPropertySet > xPropertySet( mxTextTable, uno::UNO_QUERY_THROW);
@ -143,7 +143,7 @@ SwVbaTable::getRightPadding()
} }
void SAL_CALL void SAL_CALL
SwVbaTable::setRightPadding( double fValue ) SwVbaTable::setRightPadding( float fValue )
{ {
uno::Reference< beans::XPropertySet > xPropertySet( mxTextTable, uno::UNO_QUERY_THROW); uno::Reference< beans::XPropertySet > xPropertySet( mxTextTable, uno::UNO_QUERY_THROW);
table::TableBorderDistances aTableBorderDistances; table::TableBorderDistances aTableBorderDistances;
@ -152,7 +152,7 @@ SwVbaTable::setRightPadding( double fValue )
xPropertySet->setPropertyValue( u"TableBorderDistances"_ustr, uno::Any( aTableBorderDistances ) ); xPropertySet->setPropertyValue( u"TableBorderDistances"_ustr, uno::Any( aTableBorderDistances ) );
} }
double SAL_CALL float SAL_CALL
SwVbaTable::getTopPadding() SwVbaTable::getTopPadding()
{ {
uno::Reference< beans::XPropertySet > xPropertySet( mxTextTable, uno::UNO_QUERY_THROW); uno::Reference< beans::XPropertySet > xPropertySet( mxTextTable, uno::UNO_QUERY_THROW);
@ -162,7 +162,7 @@ SwVbaTable::getTopPadding()
} }
void SAL_CALL void SAL_CALL
SwVbaTable::setTopPadding( double fValue ) SwVbaTable::setTopPadding( float fValue )
{ {
uno::Reference< beans::XPropertySet > xPropertySet( mxTextTable, uno::UNO_QUERY_THROW); uno::Reference< beans::XPropertySet > xPropertySet( mxTextTable, uno::UNO_QUERY_THROW);
table::TableBorderDistances aTableBorderDistances; table::TableBorderDistances aTableBorderDistances;

View file

@ -39,14 +39,14 @@ public:
virtual void SAL_CALL Delete( ) override; virtual void SAL_CALL Delete( ) override;
virtual OUString SAL_CALL getName( ) override; virtual OUString SAL_CALL getName( ) override;
virtual css::uno::Any SAL_CALL Borders( const css::uno::Any& aIndex ) override; virtual css::uno::Any SAL_CALL Borders( const css::uno::Any& aIndex ) override;
virtual double SAL_CALL getBottomPadding( ) override; virtual float SAL_CALL getBottomPadding( ) override;
virtual void SAL_CALL setBottomPadding( double fValue ) override; virtual void SAL_CALL setBottomPadding( float fValue ) override;
virtual double SAL_CALL getLeftPadding( ) override; virtual float SAL_CALL getLeftPadding( ) override;
virtual void SAL_CALL setLeftPadding( double fValue ) override; virtual void SAL_CALL setLeftPadding( float fValue ) override;
virtual double SAL_CALL getRightPadding( ) override; virtual float SAL_CALL getRightPadding( ) override;
virtual void SAL_CALL setRightPadding( double fValue ) override; virtual void SAL_CALL setRightPadding( float fValue ) override;
virtual double SAL_CALL getTopPadding( ) override; virtual float SAL_CALL getTopPadding( ) override;
virtual void SAL_CALL setTopPadding( double fValue ) override; virtual void SAL_CALL setTopPadding( float fValue ) override;
virtual css::uno::Any SAL_CALL Rows( const css::uno::Any& aIndex ) override; virtual css::uno::Any SAL_CALL Rows( const css::uno::Any& aIndex ) override;
virtual css::uno::Any SAL_CALL Columns( const css::uno::Any& aIndex ) override; virtual css::uno::Any SAL_CALL Columns( const css::uno::Any& aIndex ) override;