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 +#include +#include + 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(); + + if (xServiceInfo.is() && xServiceInfo->supportsService("com.sun.star.text.TextEmbeddedObject")) + { + auto xUnoShapeProperties = xUnoShape.query(); + if (xUnoShapeProperties.is()) + { + auto xModelInfo = xUnoShapeProperties->getPropertyValue("Model").query(); + 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();