summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2023-12-15 16:03:38 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2023-12-15 15:02:30 +0100
commit80b67e776ae26d60e0935fcc57a8ff6c983bdd15 (patch)
tree12b3c6ee160db368ee307f2344971af728fd00dc
parent8a645c192fc7356729ac74006a701c425781847f (diff)
tdf#157569: FormulaImExportBase::getFormulaSize should return mm/100
Similar to commit 798d21e2a1b8bc48b6bb5e1b3cf0cba0e5882a59 (tdf#157965: UNO methods are expected to return sizes in mm/100, 2023-10-29); this was an omission from commit 9e92a17cb6e03beedeeca40bfc8524c2623d31eb (starmath: Improve glyph positioning, 2023-09-19). The method is called in DomainMapper_Impl::appendStarMath(), and the returned value is used to define object size using UNO methods. Change-Id: I37cc4d5dd18641915495b97f0d99fa10a805e18c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160827 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r--include/oox/mathml/imexport.hxx2
-rw-r--r--starmath/source/unomodel.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/oox/mathml/imexport.hxx b/include/oox/mathml/imexport.hxx
index 2a8306c52963..c77689166d75 100644
--- a/include/oox/mathml/imexport.hxx
+++ b/include/oox/mathml/imexport.hxx
@@ -35,7 +35,7 @@ class OOX_DLLPUBLIC SAL_LOPLUGIN_ANNOTATE("crosscast") FormulaImExportBase
{
public:
virtual void readFormulaOoxml( oox::formulaimport::XmlStream& stream ) = 0;
- virtual Size getFormulaSize() const = 0;
+ virtual Size getFormulaSize() const = 0; // Unit is mm100
virtual void writeFormulaOoxml(::sax_fastparser::FSHelperPtr pSerializer,
oox::core::OoxmlVersion version,
diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx
index ea1d55793e5b..ea12928d3dbc 100644
--- a/starmath/source/unomodel.cxx
+++ b/starmath/source/unomodel.cxx
@@ -1103,7 +1103,7 @@ void SmModel::readFormulaOoxml( oox::formulaimport::XmlStream& stream )
Size SmModel::getFormulaSize() const
{
- return static_cast< SmDocShell* >( GetObjectShell())->GetSize();
+ return o3tl::convert(static_cast< SmDocShell* >( GetObjectShell())->GetSize(), SmO3tlLengthUnit(), o3tl::Length::mm100);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */