summaryrefslogtreecommitdiff
path: root/sfx2/source/view/lokhelper.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/view/lokhelper.cxx')
-rw-r--r--sfx2/source/view/lokhelper.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx
index 513e9e2270b7..6f7f9ee60dd2 100644
--- a/sfx2/source/view/lokhelper.cxx
+++ b/sfx2/source/view/lokhelper.cxx
@@ -18,6 +18,7 @@
#include <com/sun/star/ui/ContextChangeEventObject.hpp>
#include <comphelper/processfactory.hxx>
+#include <o3tl/string_view.hxx>
#include <rtl/strbuf.hxx>
#include <vcl/lok.hxx>
#include <vcl/svapp.hxx>
@@ -408,8 +409,7 @@ static OString lcl_generateJSON(const SfxViewShell* pView, const boost::property
aMessageProps.put("mode", pView->getEditMode());
std::stringstream aStream;
boost::property_tree::write_json(aStream, aMessageProps, false /* pretty */);
- const std::string aString = aStream.str();
- return OString(aString.c_str(), aString.size()).trim();
+ return OString(o3tl::trim(aStream.str()));
}
static inline OString lcl_generateJSON(const SfxViewShell* pView, int nViewId, std::string_view rKey,
@@ -552,7 +552,7 @@ void SfxLokHelper::sendUnoStatus(const SfxViewShell* pShell, const SfxPoolItem*
std::stringstream aStream;
boost::property_tree::write_json(aStream, aItem);
- pShell->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED, aStream.str().c_str());
+ pShell->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED, OString(aStream.str()));
}
}
@@ -969,7 +969,7 @@ void SfxLokHelper::notifyMediaUpdate(boost::property_tree::ptree& json)
boost::property_tree::write_json(aStream, json, /*pretty=*/ false);
const std::string str = aStream.str();
- SfxLokHelper::notifyAllViews(LOK_CALLBACK_MEDIA_SHAPE, str.c_str());
+ SfxLokHelper::notifyAllViews(LOK_CALLBACK_MEDIA_SHAPE, OString(str));
}
bool SfxLokHelper::testInPlaceComponentMouseEventHit(SfxViewShell* pViewShell, int nType, int nX,