diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2024-06-29 22:37:09 +0500 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2024-06-29 22:47:33 +0200 |
commit | 203bd3f6744649638703d1b4f7f9d517226557ce (patch) | |
tree | 4133720eb20b4afec346e58004b76ced6902463f /sw/source/ui/vba | |
parent | c910d8cd67a042ce722c416f879f566bca5bdd81 (diff) |
Fix VBA get*Padding, which returns a floating-point value
Introduced in commit f3234f4f14702da71528561418f07ee6670a8c2a (VBA
Add Padding properties to XTable, 2022-08-05). The unit test is
edited to test that the value returned by the methods is equal to
the initially set value, with precision of 0.1 pt.
Change-Id: I24144cd0e3c1e72bd2664a2a052ac3c7006595ff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169762
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sw/source/ui/vba')
-rw-r--r-- | sw/source/ui/vba/vbatable.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/ui/vba/vbatable.cxx b/sw/source/ui/vba/vbatable.cxx index 0cec73e88975..599991a8564b 100644 --- a/sw/source/ui/vba/vbatable.cxx +++ b/sw/source/ui/vba/vbatable.cxx @@ -101,7 +101,7 @@ SwVbaTable::getBottomPadding() uno::Reference< beans::XPropertySet > xPropertySet( mxTextTable, uno::UNO_QUERY_THROW); table::TableBorderDistances aTableBorderDistances; xPropertySet->getPropertyValue(u"TableBorderDistances"_ustr) >>= aTableBorderDistances; - return convertMm100ToPoint(aTableBorderDistances.BottomDistance); + return convertMm100ToPoint<double>(aTableBorderDistances.BottomDistance); } void SAL_CALL @@ -120,7 +120,7 @@ SwVbaTable::getLeftPadding() uno::Reference< beans::XPropertySet > xPropertySet( mxTextTable, uno::UNO_QUERY_THROW); table::TableBorderDistances aTableBorderDistances; xPropertySet->getPropertyValue(u"TableBorderDistances"_ustr) >>= aTableBorderDistances; - return convertMm100ToPoint(aTableBorderDistances.LeftDistance); + return convertMm100ToPoint<double>(aTableBorderDistances.LeftDistance); } void SAL_CALL @@ -139,7 +139,7 @@ SwVbaTable::getRightPadding() uno::Reference< beans::XPropertySet > xPropertySet( mxTextTable, uno::UNO_QUERY_THROW); table::TableBorderDistances aTableBorderDistances; xPropertySet->getPropertyValue(u"TableBorderDistances"_ustr) >>= aTableBorderDistances; - return convertMm100ToPoint(aTableBorderDistances.RightDistance); + return convertMm100ToPoint<double>(aTableBorderDistances.RightDistance); } void SAL_CALL @@ -158,7 +158,7 @@ SwVbaTable::getTopPadding() uno::Reference< beans::XPropertySet > xPropertySet( mxTextTable, uno::UNO_QUERY_THROW); table::TableBorderDistances aTableBorderDistances; xPropertySet->getPropertyValue(u"TableBorderDistances"_ustr) >>= aTableBorderDistances; - return convertMm100ToPoint(aTableBorderDistances.TopDistance); + return convertMm100ToPoint<double>(aTableBorderDistances.TopDistance); } void SAL_CALL |