summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2023-11-19 23:24:16 +0100
committerStephan Bergmann <sbergman@redhat.com>2023-11-20 07:26:01 +0100
commitb5da85150d0b4ab693616b0f6af613842b7acde3 (patch)
tree6533e1608be8a2386009f1163d36bc1d527f39b2 /desktop
parenta5f5eb28d0dcb66d5d947db7087f501ec73e00d7 (diff)
Extended loplugin:ostr: desktop
Change-Id: I0c86c1207f906e19c770b71ae1c5daec1c912845 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159717 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/inc/lib/init.hxx4
-rw-r--r--desktop/qa/desktop_lib/test_desktop_lib.cxx178
-rw-r--r--desktop/source/app/dispatchwatcher.cxx2
-rw-r--r--desktop/source/app/lockfile2.cxx8
-rw-r--r--desktop/source/app/officeipcthread.cxx2
-rw-r--r--desktop/source/deployment/manager/dp_extensionmanager.cxx2
-rw-r--r--desktop/source/deployment/manager/dp_manager.cxx2
-rw-r--r--desktop/source/deployment/misc/lockfile.cxx24
-rw-r--r--desktop/source/deployment/registry/component/dp_component.cxx8
-rw-r--r--desktop/source/deployment/registry/package/dp_package.cxx4
10 files changed, 117 insertions, 117 deletions
diff --git a/desktop/inc/lib/init.hxx b/desktop/inc/lib/init.hxx
index edc1b12a0c71..323a508098f5 100644
--- a/desktop/inc/lib/init.hxx
+++ b/desktop/inc/lib/init.hxx
@@ -66,10 +66,10 @@ namespace desktop {
OString toString() const
{
if (m_nPart >= -1)
- return (isInfinite() ? "EMPTY" : m_aRectangle.toString())
+ return (isInfinite() ? "EMPTY"_ostr : m_aRectangle.toString())
+ ", " + OString::number(m_nPart) + ", " + OString::number(m_nMode);
else
- return (isInfinite() ? "EMPTY" : m_aRectangle.toString());
+ return (isInfinite() ? "EMPTY"_ostr : m_aRectangle.toString());
}
/// Infinite Rectangle is both sides are
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index c245d6b50c94..d33ffb95e13f 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -461,7 +461,7 @@ void DesktopLOKTest::callbackImpl(int nType, const char* pPayload)
case LOK_CALLBACK_STATE_CHANGED:
{
OString aPayload(pPayload);
- OString aPrefix(".uno:ModifiedStatus=");
+ OString aPrefix(".uno:ModifiedStatus="_ostr);
if (aPayload.startsWith(aPrefix))
{
m_bModified = aPayload.copy(aPrefix.getLength()).toBoolean();
@@ -687,7 +687,7 @@ void DesktopLOKTest::testSaveAsJsonOptions()
LibLODocument_Impl* pDocument = loadDoc("3page.odg");
// When exporting that document to PDF, skipping the first page:
- OString aOptions("{\"PageRange\":{\"type\":\"string\",\"value\":\"2-\"}}");
+ OString aOptions("{\"PageRange\":{\"type\":\"string\",\"value\":\"2-\"}}"_ostr);
CPPUNIT_ASSERT(pDocument->pClass->saveAs(pDocument, maTempFile.GetURL().toUtf8().getStr(), "pdf", aOptions.getStr()));
std::shared_ptr<vcl::pdf::PDFium> pPDFium = vcl::pdf::PDFiumLibrary::get();
@@ -713,14 +713,14 @@ void DesktopLOKTest::testSaveAsCalc()
void DesktopLOKTest::testPasteWriter()
{
LibLODocument_Impl* pDocument = loadDoc("blank_text.odt");
- OString aText("hello");
+ OString aText("hello"_ostr);
CPPUNIT_ASSERT(pDocument->pClass->paste(pDocument, "text/plain;charset=utf-8", aText.getStr(), aText.getLength()));
pDocument->pClass->postUnoCommand(pDocument, ".uno:SelectAll", nullptr, false);
Scheduler::ProcessEventsToIdle();
char* pText = pDocument->pClass->getTextSelection(pDocument, "text/plain;charset=utf-8", nullptr);
- CPPUNIT_ASSERT_EQUAL(OString("hello"), OString(pText));
+ CPPUNIT_ASSERT_EQUAL("hello"_ostr, OString(pText));
free(pText);
// textt/plain should be rejected.
@@ -731,7 +731,7 @@ void DesktopLOKTest::testPasteWriter()
// Overwrite doc contents with a HTML paste.
pDocument->pClass->postUnoCommand(pDocument, ".uno:SelectAll", nullptr, false);
Scheduler::ProcessEventsToIdle();
- OString aComment("foo <!-- bar --> baz");
+ OString aComment("foo <!-- bar --> baz"_ostr);
CPPUNIT_ASSERT(pDocument->pClass->paste(pDocument, "text/html", aComment.getStr(), aComment.getLength()));
// Check if we have a comment.
@@ -862,7 +862,7 @@ void DesktopLOKTest::testRowColumnHeaders()
if (bFirstHeader)
{
CPPUNIT_ASSERT(nSize <= nY);
- CPPUNIT_ASSERT_EQUAL(OString("10"), aText);
+ CPPUNIT_ASSERT_EQUAL("10"_ostr, aText);
bFirstHeader = false;
}
else
@@ -890,7 +890,7 @@ void DesktopLOKTest::testRowColumnHeaders()
if (bFirstHeader)
{
CPPUNIT_ASSERT(nSize <= nX);
- CPPUNIT_ASSERT_EQUAL(OString("3"), aText);
+ CPPUNIT_ASSERT_EQUAL("3"_ostr, aText);
bFirstHeader = false;
}
else
@@ -962,7 +962,7 @@ void DesktopLOKTest::testCellCursor()
OString aRectangle(aTree.get<std::string>("commandValues"));
// cell cursor geometry + col + row
- CPPUNIT_ASSERT_EQUAL(OString("0, 0, 1274, 254, 0, 0"), aRectangle);
+ CPPUNIT_ASSERT_EQUAL("0, 0, 1274, 254, 0, 0"_ostr, aRectangle);
}
void DesktopLOKTest::testCommandResult()
@@ -1081,7 +1081,7 @@ void DesktopLOKTest::testSheetOperations()
Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(6, pDocument->pClass->getParts(pDocument));
- std::vector<OString> aExpected = { "FirstSheet", "Renamed", "Sheet3", "Sheet4", "Sheet5", "LastSheet" };
+ std::vector<OString> aExpected = { "FirstSheet"_ostr, "Renamed"_ostr, "Sheet3"_ostr, "Sheet4"_ostr, "Sheet5"_ostr, "LastSheet"_ostr };
for (int i = 0; i < 6; ++i)
{
char* pPartName = pDocument->pClass->getPartName(pDocument, i);
@@ -1686,37 +1686,37 @@ void DesktopLOKTest::testNotificationCompression()
std::unique_ptr<CallbackFlushHandler> handler(new CallbackFlushHandler(pDocument, callbackCompressionTest, &notifs));
handler->setViewId(SfxLokHelper::getView());
- handler->queue(LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR, ""); // 0
- handler->queue(LOK_CALLBACK_TEXT_SELECTION, "15, 25, 15, 10"); // Superseded.
- handler->queue(LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR, ""); // Should be dropped.
- handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "15, 25, 15, 10"); // 1
- handler->queue(LOK_CALLBACK_TEXT_SELECTION, "15, 25, 15, 10"); // Should be dropped.
- handler->queue(LOK_CALLBACK_TEXT_SELECTION, ""); // Superseded.
- handler->queue(LOK_CALLBACK_STATE_CHANGED, ""); // 2
- handler->queue(LOK_CALLBACK_STATE_CHANGED, ".uno:Bold"); // 3
- handler->queue(LOK_CALLBACK_STATE_CHANGED, ""); // 4
- handler->queue(LOK_CALLBACK_MOUSE_POINTER, "text"); // 5
- handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "15, 25, 15, 10"); // Should be dropped.
- handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "15, 25, 15, 10"); // Should be dropped.
- handler->queue(LOK_CALLBACK_MOUSE_POINTER, "text"); // Should be dropped.
- handler->queue(LOK_CALLBACK_TEXT_SELECTION_START, "15, 25, 15, 10"); // Superseded.
- handler->queue(LOK_CALLBACK_TEXT_SELECTION_END, "15, 25, 15, 10"); // Superseded.
- handler->queue(LOK_CALLBACK_TEXT_SELECTION, "15, 25, 15, 10"); // Superseded.
- handler->queue(LOK_CALLBACK_TEXT_SELECTION_START, "15, 25, 15, 10"); // Should be dropped.
- handler->queue(LOK_CALLBACK_TEXT_SELECTION_END, "15, 25, 15, 10"); // Should be dropped.
- handler->queue(LOK_CALLBACK_TEXT_SELECTION, ""); // 7
- handler->queue(LOK_CALLBACK_TEXT_SELECTION_START, "15, 25, 15, 10"); // 8
- handler->queue(LOK_CALLBACK_TEXT_SELECTION_END, "15, 25, 15, 10"); // 9
- handler->queue(LOK_CALLBACK_CELL_CURSOR, "15, 25, 15, 10"); // 10
- handler->queue(LOK_CALLBACK_CURSOR_VISIBLE, ""); // 11
- handler->queue(LOK_CALLBACK_CELL_CURSOR, "15, 25, 15, 10"); // Should be dropped.
- handler->queue(LOK_CALLBACK_CELL_FORMULA, "blah"); // 12
- handler->queue(LOK_CALLBACK_SET_PART, "1"); // 13
- handler->queue(LOK_CALLBACK_STATE_CHANGED, ".uno:AssignLayout=20"); // Superseded
- handler->queue(LOK_CALLBACK_CURSOR_VISIBLE, ""); // Should be dropped.
- handler->queue(LOK_CALLBACK_CELL_FORMULA, "blah"); // Should be dropped.
- handler->queue(LOK_CALLBACK_SET_PART, "1"); // Should be dropped.
- handler->queue(LOK_CALLBACK_STATE_CHANGED, ".uno:AssignLayout=1"); // 14
+ handler->queue(LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR, ""_ostr); // 0
+ handler->queue(LOK_CALLBACK_TEXT_SELECTION, "15, 25, 15, 10"_ostr); // Superseded.
+ handler->queue(LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR, ""_ostr); // Should be dropped.
+ handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "15, 25, 15, 10"_ostr); // 1
+ handler->queue(LOK_CALLBACK_TEXT_SELECTION, "15, 25, 15, 10"_ostr); // Should be dropped.
+ handler->queue(LOK_CALLBACK_TEXT_SELECTION, ""_ostr); // Superseded.
+ handler->queue(LOK_CALLBACK_STATE_CHANGED, ""_ostr); // 2
+ handler->queue(LOK_CALLBACK_STATE_CHANGED, ".uno:Bold"_ostr); // 3
+ handler->queue(LOK_CALLBACK_STATE_CHANGED, ""_ostr); // 4
+ handler->queue(LOK_CALLBACK_MOUSE_POINTER, "text"_ostr); // 5
+ handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "15, 25, 15, 10"_ostr); // Should be dropped.
+ handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "15, 25, 15, 10"_ostr); // Should be dropped.
+ handler->queue(LOK_CALLBACK_MOUSE_POINTER, "text"_ostr); // Should be dropped.
+ handler->queue(LOK_CALLBACK_TEXT_SELECTION_START, "15, 25, 15, 10"_ostr); // Superseded.
+ handler->queue(LOK_CALLBACK_TEXT_SELECTION_END, "15, 25, 15, 10"_ostr); // Superseded.
+ handler->queue(LOK_CALLBACK_TEXT_SELECTION, "15, 25, 15, 10"_ostr); // Superseded.
+ handler->queue(LOK_CALLBACK_TEXT_SELECTION_START, "15, 25, 15, 10"_ostr); // Should be dropped.
+ handler->queue(LOK_CALLBACK_TEXT_SELECTION_END, "15, 25, 15, 10"_ostr); // Should be dropped.
+ handler->queue(LOK_CALLBACK_TEXT_SELECTION, ""_ostr); // 7
+ handler->queue(LOK_CALLBACK_TEXT_SELECTION_START, "15, 25, 15, 10"_ostr); // 8
+ handler->queue(LOK_CALLBACK_TEXT_SELECTION_END, "15, 25, 15, 10"_ostr); // 9
+ handler->queue(LOK_CALLBACK_CELL_CURSOR, "15, 25, 15, 10"_ostr); // 10
+ handler->queue(LOK_CALLBACK_CURSOR_VISIBLE, ""_ostr); // 11
+ handler->queue(LOK_CALLBACK_CELL_CURSOR, "15, 25, 15, 10"_ostr); // Should be dropped.
+ handler->queue(LOK_CALLBACK_CELL_FORMULA, "blah"_ostr); // 12
+ handler->queue(LOK_CALLBACK_SET_PART, "1"_ostr); // 13
+ handler->queue(LOK_CALLBACK_STATE_CHANGED, ".uno:AssignLayout=20"_ostr); // Superseded
+ handler->queue(LOK_CALLBACK_CURSOR_VISIBLE, ""_ostr); // Should be dropped.
+ handler->queue(LOK_CALLBACK_CELL_FORMULA, "blah"_ostr); // Should be dropped.
+ handler->queue(LOK_CALLBACK_SET_PART, "1"_ostr); // Should be dropped.
+ handler->queue(LOK_CALLBACK_STATE_CHANGED, ".uno:AssignLayout=1"_ostr); // 14
Scheduler::ProcessEventsToIdle();
@@ -1782,11 +1782,11 @@ void DesktopLOKTest::testTileInvalidationCompression()
std::unique_ptr<CallbackFlushHandler> handler(new CallbackFlushHandler(pDocument, callbackCompressionTest, &notifs));
handler->setViewId(SfxLokHelper::getView());
- handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, 239, 239, 0, 0");
- handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, 239, 239, 0, 0");
- handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "-100, -50, 500, 650, 0, 0");
- handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, -32767, -32767, 0, 0");
- handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "100, 100, 200, 200, 0, 0");
+ handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, 239, 239, 0, 0"_ostr);
+ handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, 239, 239, 0, 0"_ostr);
+ handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "-100, -50, 500, 650, 0, 0"_ostr);
+ handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, -32767, -32767, 0, 0"_ostr);
+ handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "100, 100, 200, 200, 0, 0"_ostr);
Scheduler::ProcessEventsToIdle();
@@ -1803,11 +1803,11 @@ void DesktopLOKTest::testTileInvalidationCompression()
std::unique_ptr<CallbackFlushHandler> handler(new CallbackFlushHandler(pDocument, callbackCompressionTest, &notifs));
handler->setViewId(SfxLokHelper::getView());
- handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, 239, 239, 0, 0");
- handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, 200, 200, 1, 0"); // Different part
- handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, 0, 0, 2, 0"); // Invalid
- handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "-121, -121, 200, 200, 0, 0"); // Inside first
- handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, -32767, -32767, 1, 0"); // Invalid
+ handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, 239, 239, 0, 0"_ostr);
+ handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, 200, 200, 1, 0"_ostr); // Different part
+ handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, 0, 0, 2, 0"_ostr); // Invalid
+ handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "-121, -121, 200, 200, 0, 0"_ostr); // Inside first
+ handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, -32767, -32767, 1, 0"_ostr); // Invalid
Scheduler::ProcessEventsToIdle();
@@ -1827,14 +1827,14 @@ void DesktopLOKTest::testTileInvalidationCompression()
std::unique_ptr<CallbackFlushHandler> handler(new CallbackFlushHandler(pDocument, callbackCompressionTest, &notifs));
handler->setViewId(SfxLokHelper::getView());
- handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, 239, 239, 0, 0"); // 0
- handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, 200, 200, 1, 0"); // 1: Different part
- handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, 0, 0, -1, 0"); // Invalid
- handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "-121, -121, 200, 200, -1, 0"); // 0: All parts
- handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, -32767, -32767, -1, 0"); // Invalid
- handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "-100, -100, 1200, 1200, -1, 0"); // 0: All parts
- handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, 239, 239, 3, 0"); // Overlapped
- handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "1000, 1000, 1239, 1239, 2, 0"); // 1: Unique region
+ handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, 239, 239, 0, 0"_ostr); // 0
+ handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, 200, 200, 1, 0"_ostr); // 1: Different part
+ handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, 0, 0, -1, 0"_ostr); // Invalid
+ handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "-121, -121, 200, 200, -1, 0"_ostr); // 0: All parts
+ handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, -32767, -32767, -1, 0"_ostr); // Invalid
+ handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "-100, -100, 1200, 1200, -1, 0"_ostr); // 0: All parts
+ handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, 239, 239, 3, 0"_ostr); // Overlapped
+ handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "1000, 1000, 1239, 1239, 2, 0"_ostr); // 1: Unique region
Scheduler::ProcessEventsToIdle();
@@ -1854,14 +1854,14 @@ void DesktopLOKTest::testTileInvalidationCompression()
std::unique_ptr<CallbackFlushHandler> handler(new CallbackFlushHandler(pDocument, callbackCompressionTest, &notifs));
handler->setViewId(SfxLokHelper::getView());
- handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, 200, 200, 0, 0"); // 0
- handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, 100, 100, 1, 0"); // 1: Different part
- handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, 0, 0, -1, 0"); // Invalid
- handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "150, 150, 50, 50, -1, 0"); // 2: All-parts
- handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, -32767, -32767, -1, 0"); // Invalid
- handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "150, 150, 40, 40, 3, 0"); // Overlapped w/ 2
- handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, 200, 200, 4, 0"); // 3: Unique
- handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "1000, 1000, 1239, 1239, 1, 0"); // 4: Unique
+ handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, 200, 200, 0, 0"_ostr); // 0
+ handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, 100, 100, 1, 0"_ostr); // 1: Different part
+ handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, 0, 0, -1, 0"_ostr); // Invalid
+ handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "150, 150, 50, 50, -1, 0"_ostr); // 2: All-parts
+ handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, -32767, -32767, -1, 0"_ostr); // Invalid
+ handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "150, 150, 40, 40, 3, 0"_ostr); // Overlapped w/ 2
+ handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, 200, 200, 4, 0"_ostr); // 3: Unique
+ handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "1000, 1000, 1239, 1239, 1, 0"_ostr); // 4: Unique
Scheduler::ProcessEventsToIdle();
@@ -1890,11 +1890,11 @@ void DesktopLOKTest::testTileInvalidationCompression()
std::unique_ptr<CallbackFlushHandler> handler(new CallbackFlushHandler(pDocument, callbackCompressionTest, &notifs));
handler->setViewId(SfxLokHelper::getView());
- handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, 239, 239, 0, 0");
- handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "EMPTY, 0, 0");
- handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, 239, 240, 0, 0");
- handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "-121, -121, 300, 300, 0, 0");
- handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, -32767, -32767, 0, 0");
+ handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, 239, 239, 0, 0"_ostr);
+ handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "EMPTY, 0, 0"_ostr);
+ handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, 239, 240, 0, 0"_ostr);
+ handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "-121, -121, 300, 300, 0, 0"_ostr);
+ handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, -32767, -32767, 0, 0"_ostr);
Scheduler::ProcessEventsToIdle();
@@ -1915,8 +1915,8 @@ void DesktopLOKTest::testPartInInvalidation()
std::unique_ptr<CallbackFlushHandler> handler(new CallbackFlushHandler(pDocument, callbackCompressionTest, &notifs));
handler->setViewId(SfxLokHelper::getView());
- handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "10, 10, 20, 10");
- handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "20, 10, 20, 10");
+ handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "10, 10, 20, 10"_ostr);
+ handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "20, 10, 20, 10"_ostr);
Scheduler::ProcessEventsToIdle();
@@ -1931,8 +1931,8 @@ void DesktopLOKTest::testPartInInvalidation()
std::unique_ptr<CallbackFlushHandler> handler(new CallbackFlushHandler(pDocument, callbackCompressionTest, &notifs));
handler->setViewId(SfxLokHelper::getView());
- handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "10, 10, 20, 10");
- handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "40, 10, 20, 10");
+ handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "10, 10, 20, 10"_ostr);
+ handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "40, 10, 20, 10"_ostr);
Scheduler::ProcessEventsToIdle();
@@ -1951,8 +1951,8 @@ void DesktopLOKTest::testPartInInvalidation()
std::unique_ptr<CallbackFlushHandler> handler(new CallbackFlushHandler(pDocument, callbackCompressionTest, &notifs));
handler->setViewId(SfxLokHelper::getView());
- handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "10, 10, 20, 10, 0, 0");
- handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "20, 10, 20, 10, 0, 0");
+ handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "10, 10, 20, 10, 0, 0"_ostr);
+ handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "20, 10, 20, 10, 0, 0"_ostr);
Scheduler::ProcessEventsToIdle();
@@ -1970,8 +1970,8 @@ void DesktopLOKTest::testPartInInvalidation()
std::unique_ptr<CallbackFlushHandler> handler(new CallbackFlushHandler(pDocument, callbackCompressionTest, &notifs));
handler->setViewId(SfxLokHelper::getView());
- handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "10, 10, 20, 10, 0, 0");
- handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "20, 10, 20, 10, 1, 0");
+ handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "10, 10, 20, 10, 0, 0"_ostr);
+ handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "20, 10, 20, 10, 1, 0"_ostr);
Scheduler::ProcessEventsToIdle();
@@ -2067,7 +2067,7 @@ void DesktopLOKTest::testInput()
Scheduler::ProcessEventsToIdle();
char* pText = pDocument->pClass->getTextSelection(pDocument, "text/plain;charset=utf-8", nullptr);
CPPUNIT_ASSERT(pText != nullptr);
- CPPUNIT_ASSERT_EQUAL(OString("far beyond lovely "), OString(pText));
+ CPPUNIT_ASSERT_EQUAL("far beyond lovely "_ostr, OString(pText));
free(pText);
}
@@ -2533,7 +2533,7 @@ void DesktopLOKTest::testCommentsCallbacksWriter()
ViewCallback aView2(pDocument);
// Add a new comment
- OString aCommandArgs("{ \"Text\": { \"type\": \"string\", \"value\": \"Additional comment\" }, \"Author\": { \"type\": \"string\", \"value\": \"LOK User1\" } }");
+ OString aCommandArgs("{ \"Text\": { \"type\": \"string\", \"value\": \"Additional comment\" }, \"Author\": { \"type\": \"string\", \"value\": \"LOK User1\" } }"_ostr);
pDocument->pClass->postUnoCommand(pDocument, ".uno:InsertAnnotation", aCommandArgs.getStr(), false);
Scheduler::ProcessEventsToIdle();
@@ -2980,7 +2980,7 @@ void DesktopLOKTest::testTextSelectionHandles()
LibLODocument_Impl* pDocument = loadDoc("blank_text.odt");
pDocument->pClass->registerCallback(pDocument, &DesktopLOKTest::callback, this);
- OString aText("hello");
+ OString aText("hello"_ostr);
CPPUNIT_ASSERT(pDocument->pClass->paste(pDocument, "text/plain;charset=utf-8", aText.getStr(), aText.getLength()));
// select the inserted text
@@ -2989,8 +2989,8 @@ void DesktopLOKTest::testTextSelectionHandles()
char* pText = pDocument->pClass->getTextSelection(pDocument, "text/plain;charset=utf-8", nullptr);
CPPUNIT_ASSERT_EQUAL(aText, OString(pText));
free(pText);
- CPPUNIT_ASSERT_EQUAL(OString("1418, 1418, 0, 275"), m_aTextSelectionStart);
- CPPUNIT_ASSERT_EQUAL(OString("1898, 1418, 0, 275"), m_aTextSelectionEnd);
+ CPPUNIT_ASSERT_EQUAL("1418, 1418, 0, 275"_ostr, m_aTextSelectionStart);
+ CPPUNIT_ASSERT_EQUAL("1898, 1418, 0, 275"_ostr, m_aTextSelectionEnd);
// deselect & check
m_aTextSelectionStart = "";
@@ -3010,8 +3010,8 @@ void DesktopLOKTest::testTextSelectionHandles()
pText = pDocument->pClass->getTextSelection(pDocument, "text/plain;charset=utf-8", nullptr);
CPPUNIT_ASSERT_EQUAL(aText, OString(pText));
free(pText);
- CPPUNIT_ASSERT_EQUAL(OString("1418, 1418, 0, 275"), m_aTextSelectionStart);
- CPPUNIT_ASSERT_EQUAL(OString("1898, 1418, 0, 275"), m_aTextSelectionEnd);
+ CPPUNIT_ASSERT_EQUAL("1418, 1418, 0, 275"_ostr, m_aTextSelectionStart);
+ CPPUNIT_ASSERT_EQUAL("1898, 1418, 0, 275"_ostr, m_aTextSelectionEnd);
}
void DesktopLOKTest::testDialogPaste()
@@ -3122,7 +3122,7 @@ void DesktopLOKTest::testCalcSaveAs()
pDocument->pClass->postKeyEvent(pDocument, LOK_KEYEVENT_KEYUP, 0, KEY_LEFT);
Scheduler::ProcessEventsToIdle();
- CPPUNIT_ASSERT_EQUAL(OString("X"), aView.m_aCellFormula);
+ CPPUNIT_ASSERT_EQUAL("X"_ostr, aView.m_aCellFormula);
}
void DesktopLOKTest::testSpellcheckerMultiView()
@@ -3367,7 +3367,7 @@ void DesktopLOKTest::testRenderSearchResult_WriterNode()
OString aPayload =
"<indexing>"
"<paragraph node_type=\"writer\" index=\"19\">ABC</paragraph>"
- "</indexing>";
+ "</indexing>"_ostr;
int nWidth = 0;
int nHeight = 0;
@@ -3412,7 +3412,7 @@ void DesktopLOKTest::testRenderSearchResult_CommonNode()
OString aPayload =
"<indexing>"
"<paragraph node_type=\"common\" index=\"0\" object_name=\"Shape 1\" />"
- "</indexing>";
+ "</indexing>"_ostr;
int nWidth = 0;
int nHeight = 0;
diff --git a/desktop/source/app/dispatchwatcher.cxx b/desktop/source/app/dispatchwatcher.cxx
index b00cff042b7e..863d246951e9 100644
--- a/desktop/source/app/dispatchwatcher.cxx
+++ b/desktop/source/app/dispatchwatcher.cxx
@@ -267,7 +267,7 @@ void batchPrint( std::u16string_view rPrinterName, const Reference< XPrintable >
OString aTargetURL8 = OUStringToOString(aTempName, osl_getThreadTextEncoding() );
std::cout << "print " << aSource8 << " -> " << aTargetURL8;
- std::cout << " using " << (aPrinterName.isEmpty() ? "<default_printer>" : OUStringToOString( aPrinterName, osl_getThreadTextEncoding() ));
+ std::cout << " using " << (aPrinterName.isEmpty() ? "<default_printer>"_ostr : OUStringToOString( aPrinterName, osl_getThreadTextEncoding() ));
std::cout << std::endl;
// create the custom printer, if given
diff --git a/desktop/source/app/lockfile2.cxx b/desktop/source/app/lockfile2.cxx
index 44447927f63b..98c2903f9403 100644
--- a/desktop/source/app/lockfile2.cxx
+++ b/desktop/source/app/lockfile2.cxx
@@ -31,10 +31,10 @@ bool Lockfile_execWarning( Lockfile const * that )
// read information from lock
OUString aLockname = that->m_aLockname;
Config aConfig(aLockname);
- aConfig.SetGroup( LOCKFILE_GROUP );
- OString aHost = aConfig.ReadKey( LOCKFILE_HOSTKEY );
- OString aUser = aConfig.ReadKey( LOCKFILE_USERKEY );
- OString aTime = aConfig.ReadKey( LOCKFILE_TIMEKEY );
+ aConfig.SetGroup( LOCKFILE_GROUP ""_ostr );
+ OString aHost = aConfig.ReadKey( LOCKFILE_HOSTKEY ""_ostr );
+ OString aUser = aConfig.ReadKey( LOCKFILE_USERKEY ""_ostr );
+ OString aTime = aConfig.ReadKey( LOCKFILE_TIMEKEY ""_ostr );
// display warning and return response
std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(nullptr,
diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx
index 9b77da1a9037..9d342bf35a84 100644
--- a/desktop/source/app/officeipcthread.cxx
+++ b/desktop/source/app/officeipcthread.cxx
@@ -76,7 +76,7 @@ OString readStringFromPipe(osl::StreamPipe const & pipe) {
sal_Int32 n = pipe.recv(buf, std::size(buf));
if (n <= 0) {
SAL_INFO("desktop.app", "read empty string");
- return "";
+ return ""_ostr;
}
bool end = false;
if (buf[n - 1] == '\0') {
diff --git a/desktop/source/deployment/manager/dp_extensionmanager.cxx b/desktop/source/deployment/manager/dp_extensionmanager.cxx
index b51f4c77b47b..f393a30c9489 100644
--- a/desktop/source/deployment/manager/dp_extensionmanager.cxx
+++ b/desktop/source/deployment/manager/dp_extensionmanager.cxx
@@ -104,7 +104,7 @@ void writeLastModified(OUString & url, Reference<ucb::XCommandEnvironment> const
::rtl::Bootstrap::expandMacros(url);
::ucbhelper::Content ucbStamp(url, xCmdEnv, xContext);
dp_misc::erase_path( url, xCmdEnv );
- OString stamp("1" );
+ OString stamp("1"_ostr );
Reference<css::io::XInputStream> xData(
::xmlscript::createInputStream(
reinterpret_cast<sal_Int8 const *>(stamp.getStr()),
diff --git a/desktop/source/deployment/manager/dp_manager.cxx b/desktop/source/deployment/manager/dp_manager.cxx
index 206b44d85bd6..d882b77bafa3 100644
--- a/desktop/source/deployment/manager/dp_manager.cxx
+++ b/desktop/source/deployment/manager/dp_manager.cxx
@@ -981,7 +981,7 @@ Reference<deployment::XPackage> PackageManagerImpl::getDeployedPackage_(
INetContentTypeParameterList params;
if (INetContentTypes::parse( data.mediaType, type, subType, &params ))
{
- auto const iter = params.find(OString("platform"));
+ auto const iter = params.find("platform"_ostr);
if (iter != params.end() && !platform_fits(iter->second.m_sValue))
throw lang::IllegalArgumentException(
DpResId(RID_STR_NO_SUCH_PACKAGE) + id,
diff --git a/desktop/source/deployment/misc/lockfile.cxx b/desktop/source/deployment/misc/lockfile.cxx
index a46eedc62a3a..1a87e8bc0f6f 100644
--- a/desktop/source/deployment/misc/lockfile.cxx
+++ b/desktop/source/deployment/misc/lockfile.cxx
@@ -67,7 +67,7 @@ static OString impl_getHostname()
aHost = OString( pHostName );
}
else
- aHost = OString("UNKNOWN");
+ aHost = "UNKNOWN"_ostr;
#endif
return aHost;
@@ -153,13 +153,13 @@ namespace desktop {
// to assume that it is a stale lockfile which can be overwritten
OUString aLockname = m_aLockname;
Config aConfig(aLockname);
- aConfig.SetGroup(LOCKFILE_GROUP);
- OString aIPCserver = aConfig.ReadKey( LOCKFILE_IPCKEY );
+ aConfig.SetGroup(LOCKFILE_GROUP ""_ostr);
+ OString aIPCserver = aConfig.ReadKey( LOCKFILE_IPCKEY ""_ostr );
if (!aIPCserver.equalsIgnoreAsciiCase("true"))
return false;
- OString aHost = aConfig.ReadKey( LOCKFILE_HOSTKEY );
- OString aUser = aConfig.ReadKey( LOCKFILE_USERKEY );
+ OString aHost = aConfig.ReadKey( LOCKFILE_HOSTKEY ""_ostr );
+ OString aUser = aConfig.ReadKey( LOCKFILE_USERKEY ""_ostr );
// lockfile from same host?
OString myHost( impl_getHostname() );
@@ -179,7 +179,7 @@ namespace desktop {
{
OUString aLockname = m_aLockname;
Config aConfig(aLockname);
- aConfig.SetGroup(LOCKFILE_GROUP);
+ aConfig.SetGroup(LOCKFILE_GROUP ""_ostr);
// get information
OString aHost( impl_getHostname() );
@@ -191,13 +191,13 @@ namespace desktop {
OString aStamp = OUStringToOString( m_aId, RTL_TEXTENCODING_ASCII_US );
// write information
- aConfig.WriteKey( LOCKFILE_USERKEY, aUser );
- aConfig.WriteKey( LOCKFILE_HOSTKEY, aHost );
- aConfig.WriteKey( LOCKFILE_STAMPKEY, aStamp );
- aConfig.WriteKey( LOCKFILE_TIMEKEY, aTime );
+ aConfig.WriteKey( LOCKFILE_USERKEY ""_ostr, aUser );
+ aConfig.WriteKey( LOCKFILE_HOSTKEY ""_ostr, aHost );
+ aConfig.WriteKey( LOCKFILE_STAMPKEY ""_ostr, aStamp );
+ aConfig.WriteKey( LOCKFILE_TIMEKEY ""_ostr, aTime );
aConfig.WriteKey(
- LOCKFILE_IPCKEY,
- m_bIPCserver ? OString("true") : OString("false") );
+ LOCKFILE_IPCKEY ""_ostr,
+ m_bIPCserver ? "true"_ostr : "false"_ostr );
aConfig.Flush( );
}
diff --git a/desktop/source/deployment/registry/component/dp_component.cxx b/desktop/source/deployment/registry/component/dp_component.cxx
index 849a4784168b..7a692ec8c6c5 100644
--- a/desktop/source/deployment/registry/component/dp_component.cxx
+++ b/desktop/source/deployment/registry/component/dp_component.cxx
@@ -654,7 +654,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
{
// xxx todo: probe and evaluate component xml description
- auto const iter = params.find(OString("platform"));
+ auto const iter = params.find("platform"_ostr);
bool bPlatformFits(iter == params.end());
OUString aPlatform;
if (!bPlatformFits) // platform is specified, we have to check
@@ -665,7 +665,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
// If the package is being removed, do not care whether
// platform fits. We won't be using it anyway.
if (bPlatformFits || bRemoved) {
- auto const iterType = params.find(OString("type"));
+ auto const iterType = params.find("type"_ostr);
if (iterType != params.end())
{
OUString const & value = iterType->second.m_sValue;
@@ -697,7 +697,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
}
else if (subType.equalsIgnoreAsciiCase("vnd.sun.star.uno-components"))
{
- auto const iter = params.find(OString("platform"));
+ auto const iter = params.find("platform"_ostr);
if (iter == params.end() || platform_fits(iter->second.m_sValue)) {
return new BackendImpl::ComponentsPackageImpl(
this, url, name, m_xComponentsTypeInfo, bRemoved,
@@ -706,7 +706,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
}
else if (subType.equalsIgnoreAsciiCase( "vnd.sun.star.uno-typelibrary"))
{
- auto const iter = params.find(OString("type"));
+ auto const iter = params.find("type"_ostr);
if (iter != params.end()) {
OUString const & value = iter->second.m_sValue;
if (value.equalsIgnoreAsciiCase("RDB"))
diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx
index 3a6c466a1813..6af2fb5515f5 100644
--- a/desktop/source/deployment/registry/package/dp_package.cxx
+++ b/desktop/source/deployment/registry/package/dp_package.cxx
@@ -1383,7 +1383,7 @@ void BackendImpl::PackageImpl::scanBundle(
continue;
{
- auto const iter = params.find("platform");
+ auto const iter = params.find("platform"_ostr);
if (iter != params.end() && !platform_fits(iter->second.m_sValue))
continue;
}
@@ -1394,7 +1394,7 @@ void BackendImpl::PackageImpl::scanBundle(
subType.equalsIgnoreAsciiCase( "vnd.sun.star.package-bundle-description"))
{
// check locale:
- auto const iter = params.find("locale");
+ auto const iter = params.find("locale"_ostr);
if (iter == params.end())
{
if (descrFile.isEmpty())