svx/source/svdraw/svdmrkv.cxx | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+)
New commits: commit 43207ba3aedfce87df480c36b27cc99377b9005e Author: Gökay Şatır <gokaysa...@gmail.com> AuthorDate: Wed Jun 18 15:38:28 2025 +0300 Commit: Gökay ŞATIR <gokaysa...@collabora.com> CommitDate: Mon Jun 23 12:13:01 2025 +0200 Online: Add isMathObject property when sending selected object info. We need to distinguish the math objects from others for better handling on the Online side. Signed-off-by: Gökay Şatır <gokaysa...@gmail.com> Change-Id: Ie065d9a229f037dfcaefcfe680683c69b16cb581 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186664 Reviewed-by: Szymon Kłos <szymon.k...@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186812 Reviewed-by: Gökay ŞATIR <gokaysa...@collabora.com> diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index 1a11512e7ab2..d3e61f9ce6c1 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -74,6 +74,9 @@ #include <boost/property_tree/json_parser.hpp> +#include <com/sun/star/lang/XServiceInfo.hpp> +#include <com/sun/star/text/XTextEmbeddedObjectsSupplier.hpp> + using namespace com::sun::star; // Migrate Marking of Objects, Points and GluePoints @@ -729,6 +732,30 @@ std::u16string_view lcl_getDragParameterString( std::u16string_view rCID ) } return aRet; } + +bool lcl_isStarMath(SdrObject* pO) +{ + auto xUnoShape = pO->getUnoShape(); + + if (xUnoShape.is()) + { + auto xServiceInfo = xUnoShape.query<lang::XServiceInfo>(); + + if (xServiceInfo.is() && xServiceInfo->supportsService("com.sun.star.text.TextEmbeddedObject")) + { + auto xUnoShapeProperties = xUnoShape.query<beans::XPropertySet>(); + if (xUnoShapeProperties.is()) + { + auto xModelInfo = xUnoShapeProperties->getPropertyValue("Model").query<lang::XServiceInfo>(); + if (xModelInfo.is()) + return xModelInfo->supportsService("com.sun.star.formula.FormulaProperties"); + } + } + } + + return false; +} + } // anonymous namespace bool SdrMarkView::dumpGluePointsToJSON(boost::property_tree::ptree& rTree) @@ -953,6 +980,8 @@ void SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle const & rRect, const S + ",\"OrdNum\":" + OString::number(pO->GetOrdNum()) ); + aExtraInfo.append(", \"isMathObject\": " + OString::boolean(lcl_isStarMath(pO))); + if (mpMarkedObj && !pOtherShell) { OString innerTextInfo = CreateInnerTextRectString();