diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2023-11-19 17:30:58 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2023-11-19 23:23:49 +0100 |
commit | baecfd21797310bb15ab98ca3962445d99e397db (patch) | |
tree | 28e46f4a3ea60e9c861898f85f3a1c4512f69588 | |
parent | 235ae98ae614315cfe3bb2baf52ca442bcc2f592 (diff) |
Extended loplugin:ostr: sfx2
Change-Id: I7b2988ed246a0b1b0af0721521ba738ba3de2f27
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159677
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r-- | include/sfx2/lokhelper.hxx | 2 | ||||
-rw-r--r-- | sfx2/qa/cppunit/doc.cxx | 2 | ||||
-rw-r--r-- | sfx2/qa/cppunit/test_misc.cxx | 10 | ||||
-rw-r--r-- | sfx2/source/doc/guisaveas.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/doc/sfxbasemodel.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/view/ipclient.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/view/lokhelper.cxx | 10 | ||||
-rw-r--r-- | sfx2/source/view/viewsh.cxx | 2 |
8 files changed, 17 insertions, 17 deletions
diff --git a/include/sfx2/lokhelper.hxx b/include/sfx2/lokhelper.hxx index f73312c56417..98eeccb74476 100644 --- a/include/sfx2/lokhelper.hxx +++ b/include/sfx2/lokhelper.hxx @@ -195,7 +195,7 @@ public: static OString makePayloadJSON(const SfxViewShell* pThisView, int nViewId, std::string_view rKey, const OString& rPayload); /// Makes a LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR payload, but tweaks it according to setOptionalFeatures() if needed. static OString makeVisCursorInvalidation(int nViewId, const OString& rRectangle, - bool bMispelledWord = false, const OString& rHyperlink = ""); + bool bMispelledWord = false, const OString& rHyperlink = ""_ostr); /// Helper for posting async key event static void postKeyEventAsync(const VclPtr<vcl::Window> &xWindow, diff --git a/sfx2/qa/cppunit/doc.cxx b/sfx2/qa/cppunit/doc.cxx index 902ac48646e5..9eea6d29390d 100644 --- a/sfx2/qa/cppunit/doc.cxx +++ b/sfx2/qa/cppunit/doc.cxx @@ -126,7 +126,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSetDocumentPropertiesUpdate) } } } -)json"); +)json"_ostr); uno::Sequence<beans::PropertyValue> aArgs = comphelper::containerToSequence(aArgsVec); dispatchCommand(mxComponent, ".uno:SetDocumentProperties", aArgs); diff --git a/sfx2/qa/cppunit/test_misc.cxx b/sfx2/qa/cppunit/test_misc.cxx index c93a3ad7335a..a59a1128e7df 100644 --- a/sfx2/qa/cppunit/test_misc.cxx +++ b/sfx2/qa/cppunit/test_misc.cxx @@ -76,11 +76,11 @@ CPPUNIT_TEST_FIXTURE(MiscTest, testODFCustomMetadata) // check that custom metadata is preserved xmlDocUniquePtr pXmlDoc = parseExport("meta.xml"); - assertXPathContent(pXmlDoc, "/office:document-meta/office:meta/bork", "bork"); - assertXPath(pXmlDoc, "/office:document-meta/office:meta/foo:bar", 1); - assertXPath(pXmlDoc, "/office:document-meta/office:meta/foo:bar/baz:foo", 1); - assertXPath(pXmlDoc, "/office:document-meta/office:meta/foo:bar/baz:foo[@baz:bar='foo']"); - assertXPathContent(pXmlDoc, "/office:document-meta/office:meta/foo:bar/foo:baz", "bar"); + assertXPathContent(pXmlDoc, "/office:document-meta/office:meta/bork"_ostr, "bork"); + assertXPath(pXmlDoc, "/office:document-meta/office:meta/foo:bar"_ostr, 1); + assertXPath(pXmlDoc, "/office:document-meta/office:meta/foo:bar/baz:foo"_ostr, 1); + assertXPath(pXmlDoc, "/office:document-meta/office:meta/foo:bar/baz:foo[@baz:bar='foo']"_ostr); + assertXPathContent(pXmlDoc, "/office:document-meta/office:meta/foo:bar/foo:baz"_ostr, "bar"); } CPPUNIT_TEST_FIXTURE(MiscTest, testNoThumbnail) diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index 1c013c4a382b..657d162ff732 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -677,7 +677,7 @@ IMPL_LINK( ModelData_Impl, OptionsDialogClosedHdl, css::ui::dialogs::DialogClose if (pEvt->DialogResult == RET_OK && m_xFilterProperties) { if ( comphelper::LibreOfficeKit::isActive() && SfxViewShell::Current() ) - SfxViewShell::Current()->libreOfficeKitViewCallback( LOK_CALLBACK_EXPORT_FILE, "PENDING" ); + SfxViewShell::Current()->libreOfficeKitViewCallback( LOK_CALLBACK_EXPORT_FILE, "PENDING"_ostr ); const uno::Sequence< beans::PropertyValue > aPropsFromDialog = m_xFilterProperties->getPropertyValues(); for ( const auto& rProp : aPropsFromDialog ) @@ -687,7 +687,7 @@ IMPL_LINK( ModelData_Impl, OptionsDialogClosedHdl, css::ui::dialogs::DialogClose } else if ( comphelper::LibreOfficeKit::isActive() && SfxViewShell::Current() ) { - SfxViewShell::Current()->libreOfficeKitViewCallback( LOK_CALLBACK_EXPORT_FILE, "ABORT" ); + SfxViewShell::Current()->libreOfficeKitViewCallback( LOK_CALLBACK_EXPORT_FILE, "ABORT"_ostr ); } } diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 860bea828122..985af531358d 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -3265,7 +3265,7 @@ void SfxBaseModel::impl_store( const OUString& sURL m_pData->m_pObjectShell.get() ) ); if ( comphelper::LibreOfficeKit::isActive() && SfxViewShell::Current() ) - SfxViewShell::Current()->libreOfficeKitViewCallback( LOK_CALLBACK_EXPORT_FILE, "ERROR" ); + SfxViewShell::Current()->libreOfficeKitViewCallback( LOK_CALLBACK_EXPORT_FILE, "ERROR"_ostr ); std::stringstream aErrCode; aErrCode << nErrCode; diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx index d8c27ea02558..e6b9beb364ba 100644 --- a/sfx2/source/view/ipclient.cxx +++ b/sfx2/source/view/ipclient.cxx @@ -384,7 +384,7 @@ void SAL_CALL SfxInPlaceClient_Impl::deactivatedInplace() if ( comphelper::LibreOfficeKit::isActive() ) { if ( SfxViewShell* pViewShell = m_pClient->GetViewShell() ) { - pViewShell->libreOfficeKitViewCallback( LOK_CALLBACK_GRAPHIC_SELECTION, "INPLACE EXIT" ); + pViewShell->libreOfficeKitViewCallback( LOK_CALLBACK_GRAPHIC_SELECTION, "INPLACE EXIT"_ostr ); } } } diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx index fa2a05c81cae..6ef68f2e42ec 100644 --- a/sfx2/source/view/lokhelper.cxx +++ b/sfx2/source/view/lokhelper.cxx @@ -604,8 +604,8 @@ void SfxLokHelper::notifyWindow(const SfxViewShell* pThisView, { if (!rItem.first.isEmpty() && !rItem.second.isEmpty()) { - auto aFirst = rItem.first.replaceAll("\"", "\\\""); - auto aSecond = rItem.second.replaceAll("\"", "\\\""); + auto aFirst = rItem.first.replaceAll("\""_ostr, "\\\""_ostr); + auto aSecond = rItem.second.replaceAll("\""_ostr, "\\\""_ostr); aPayload.append(", \"" + aFirst + "\": \"" + aSecond + "\""); } } @@ -665,7 +665,7 @@ void SfxLokHelper::notifyDocumentSizeChangedAllViews(vcl::ITiledRenderable* pDoc // or not? if (pCurrentViewShell == nullptr || pViewShell->GetDocId() == pCurrentViewShell-> GetDocId()) { - SfxLokHelper::notifyDocumentSizeChanged(pViewShell, "", pDoc, bInvalidateAll); + SfxLokHelper::notifyDocumentSizeChanged(pViewShell, ""_ostr, pDoc, bInvalidateAll); bInvalidateAll = false; // we direct invalidations to all views anyway. } pViewShell = SfxViewShell::GetNext(*pViewShell); @@ -681,7 +681,7 @@ void SfxLokHelper::notifyPartSizeChangedAllViews(vcl::ITiledRenderable* pDoc, in while (pViewShell) { if (pViewShell->getPart() == nPart) - SfxLokHelper::notifyDocumentSizeChanged(pViewShell, "", pDoc, false); + SfxLokHelper::notifyDocumentSizeChanged(pViewShell, ""_ostr, pDoc, false); pViewShell = SfxViewShell::GetNext(*pViewShell); } } @@ -691,7 +691,7 @@ OString SfxLokHelper::makeVisCursorInvalidation(int nViewId, const OString& rRec { if (comphelper::LibreOfficeKit::isViewIdForVisCursorInvalidation()) { - OString sHyperlink = rHyperlink.isEmpty() ? "{}" : rHyperlink; + OString sHyperlink = rHyperlink.isEmpty() ? "{}"_ostr : rHyperlink; return OString::Concat("{ \"viewId\": \"") + OString::number(nViewId) + "\", \"rectangle\": \"" + rRectangle + "\", \"mispelledWord\": \"" + OString::number(bMispelledWord ? 1 : 0) + diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 03ec646389d7..ce3b6c5dd694 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -190,7 +190,7 @@ void SfxClipboardChangeListener::ChangedContents() if (comphelper::LibreOfficeKit::isActive()) { // In the future we might send the payload as well. - SfxLokHelper::notifyAllViews(LOK_CALLBACK_CLIPBOARD_CHANGED, ""); + SfxLokHelper::notifyAllViews(LOK_CALLBACK_CLIPBOARD_CHANGED, ""_ostr); } } |