svx/source/svdraw/svdmrkv.cxx | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+)
New commits: commit 357290acc3cf29ca2fa01e4849b4bece8cafe86e Author: Gökay Şatır <gokaysa...@gmail.com> AuthorDate: Wed Jun 18 15:38:28 2025 +0300 Commit: Gökay ŞATIR <gokaysa...@gmail.com> CommitDate: Mon Jun 23 14:29:50 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/+/186813 Reviewed-by: Gökay ŞATIR <gokaysa...@collabora.com> Tested-by: Jenkins diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index fc5b6de517ff..add71f9c7284 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 @@ -732,6 +735,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) @@ -958,6 +985,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();