diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-11-11 13:49:53 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-11-11 20:11:23 +0100 |
commit | 69089f1737a825c81d958785972bf15e9c340d91 (patch) | |
tree | 3fed73b30e4ab4cb27ec8169e37e35217a710180 /libreofficekit/source | |
parent | 9ce6abe3d47d7992145e7950b719af8c7eb3b2df (diff) |
loplugin:reftotemp in libreofficekit..oox
Change-Id: I62d868f70e33850fa933c8f413f824a523422499
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176400
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Diffstat (limited to 'libreofficekit/source')
-rw-r--r-- | libreofficekit/source/gtk/lokdocview.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx index bf2af004fe41..0c2784537032 100644 --- a/libreofficekit/source/gtk/lokdocview.cxx +++ b/libreofficekit/source/gtk/lokdocview.cxx @@ -1130,7 +1130,7 @@ callback (gpointer pData) std::stringstream aStream(pCallback->m_aPayload); boost::property_tree::ptree aTree; boost::property_tree::read_json(aStream, aTree); - const std::string& rRectangle = aTree.get<std::string>("rectangle"); + const std::string rRectangle = aTree.get<std::string>("rectangle"); int nViewId = aTree.get<int>("viewId"); priv->m_aVisibleCursor = payloadToRectangle(pDocView, rRectangle.c_str()); @@ -1211,7 +1211,7 @@ callback (gpointer pData) boost::property_tree::read_json(aStream, aTree); int nViewId = aTree.get<int>("viewId"); int nPart = aTree.get<int>("part"); - const std::string& rRectangle = aTree.get<std::string>("selection"); + const std::string rRectangle = aTree.get<std::string>("selection"); if (rRectangle != "EMPTY") priv->m_aGraphicViewSelections[nViewId] = ViewRectangle(nPart, payloadToRectangle(pDocView, rRectangle.c_str())); else @@ -1295,7 +1295,7 @@ callback (gpointer pData) boost::property_tree::read_json(aStream, aTree); int nViewId = aTree.get<int>("viewId"); int nPart = aTree.get<int>("part"); - const std::string& rRectangle = aTree.get<std::string>("rectangle"); + const std::string rRectangle = aTree.get<std::string>("rectangle"); priv->m_aViewCursors[nViewId] = ViewRectangle(nPart, payloadToRectangle(pDocView, rRectangle.c_str())); gtk_widget_queue_draw(GTK_WIDGET(pDocView)); break; @@ -1307,7 +1307,7 @@ callback (gpointer pData) boost::property_tree::read_json(aStream, aTree); int nViewId = aTree.get<int>("viewId"); int nPart = aTree.get<int>("part"); - const std::string& rSelection = aTree.get<std::string>("selection"); + const std::string rSelection = aTree.get<std::string>("selection"); priv->m_aTextViewSelectionRectangles[nViewId] = ViewRectangles(nPart, payloadToRectangles(pDocView, rSelection.c_str())); gtk_widget_queue_draw(GTK_WIDGET(pDocView)); break; @@ -1318,7 +1318,7 @@ callback (gpointer pData) boost::property_tree::ptree aTree; boost::property_tree::read_json(aStream, aTree); int nViewId = aTree.get<int>("viewId"); - const std::string& rVisible = aTree.get<std::string>("visible"); + const std::string rVisible = aTree.get<std::string>("visible"); priv->m_aViewCursorVisibilities[nViewId] = rVisible == "true"; gtk_widget_queue_draw(GTK_WIDGET(pDocView)); break; @@ -1331,7 +1331,7 @@ callback (gpointer pData) boost::property_tree::read_json(aStream, aTree); int nViewId = aTree.get<int>("viewId"); int nPart = aTree.get<int>("part"); - const std::string& rRectangle = aTree.get<std::string>("rectangle"); + const std::string rRectangle = aTree.get<std::string>("rectangle"); if (rRectangle != "EMPTY") priv->m_aCellViewCursors[nViewId] = ViewRectangle(nPart, payloadToRectangle(pDocView, rRectangle.c_str())); else @@ -1350,7 +1350,7 @@ callback (gpointer pData) boost::property_tree::read_json(aStream, aTree); int nViewId = aTree.get<int>("viewId"); int nPart = aTree.get<int>("part"); - const std::string& rRectangle = aTree.get<std::string>("rectangle"); + const std::string rRectangle = aTree.get<std::string>("rectangle"); if (rRectangle != "EMPTY") priv->m_aViewLockRectangles[nViewId] = ViewRectangle(nPart, payloadToRectangle(pDocView, rRectangle.c_str())); else @@ -1762,7 +1762,7 @@ static const GdkRGBA& getDarkColor(int nViewId, LOKDocViewPrivate& priv) boost::property_tree::read_json(aStream, aTree); for (const auto& rValue : aTree.get_child("authors")) { - const std::string& rName = rValue.second.get<std::string>("name"); + const std::string rName = rValue.second.get<std::string>("name"); guint32 nColor = rValue.second.get<guint32>("color"); GdkRGBA aColor{static_cast<double>(static_cast<guint8>(nColor>>16))/255, static_cast<double>(static_cast<guint8>(static_cast<guint16>(nColor) >> 8))/255, static_cast<double>(static_cast<guint8>(nColor))/255, 0}; auto itAuthorViews = g_aAuthorViews.find(rName); |