summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/core/test_ToxWhitespaceStripper.cxx2
-rw-r--r--sw/qa/extras/htmlexport/htmlexport.cxx6
-rw-r--r--sw/qa/extras/odfexport/odfexport.cxx2
-rw-r--r--sw/qa/extras/odfexport/odfexport2.cxx2
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport20.cxx3
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport9.cxx2
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport2.cxx2
-rw-r--r--sw/qa/extras/uiwriter/uiwriter3.cxx6
-rw-r--r--sw/qa/extras/uiwriter/uiwriter4.cxx10
-rw-r--r--sw/qa/extras/uiwriter/uiwriter6.cxx2
-rw-r--r--sw/qa/extras/uiwriter/uiwriter7.cxx4
11 files changed, 21 insertions, 20 deletions
diff --git a/sw/qa/core/test_ToxWhitespaceStripper.cxx b/sw/qa/core/test_ToxWhitespaceStripper.cxx
index 9edef692cc9c..4d9881f25bf2 100644
--- a/sw/qa/core/test_ToxWhitespaceStripper.cxx
+++ b/sw/qa/core/test_ToxWhitespaceStripper.cxx
@@ -113,7 +113,7 @@ void ToxWhitespaceStripperTest::StrippingWhitespacesFromVariousStringsWorks()
void ToxWhitespaceStripperTest::PositionAfterStringCanBeRequested()
{
- OUString constexpr test(u"abc"_ustr);
+ static OUString constexpr test(u"abc"_ustr);
ToxWhitespaceStripper sut(test);
sal_Int32 expected = test.getLength();
CPPUNIT_ASSERT_EQUAL(expected, sut.GetPositionInStrippedString(test.getLength()));
diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx
index b1f11a2c4bca..7a6b4b15542c 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -1135,7 +1135,7 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testTdf126879)
{
createSwDoc("tdf126879.odt");
save(mpFilter);
- constexpr OString aExpected("<!DOCTYPE html>"_ostr);
+ static constexpr OString aExpected("<!DOCTYPE html>"_ostr);
SvStream* pStream = maTempFile.GetStream(StreamMode::READ);
CPPUNIT_ASSERT(pStream);
const OString aActual(read_uInt8s_ToOString(*pStream, aExpected.getLength()));
@@ -2749,7 +2749,7 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testHTML_PreserveSpaces)
// Given a document with leading, trailing, and repeating intermediate spaces:
createSwDoc();
SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell();
- constexpr OUString paraText = u"\t test \t more text \t"_ustr;
+ static constexpr OUString paraText = u"\t test \t more text \t"_ustr;
pWrtShell->Insert(paraText);
// When exporting to plain HTML, using PreserveSpaces:
@@ -2778,7 +2778,7 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testReqIF_PreserveSpaces)
// Given a document with leading, trailing, and repeating intermediate spaces:
createSwDoc();
SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell();
- constexpr OUString paraText = u"\t test \t more text \t"_ustr;
+ static constexpr OUString paraText = u"\t test \t more text \t"_ustr;
pWrtShell->Insert(paraText);
// When exporting to ReqIF, using PreserveSpaces:
diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx
index 09d4707a68ba..d6e4c323ba58 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -1198,7 +1198,7 @@ DECLARE_ODFEXPORT_TEST(testCharacterBorder, "charborder.odt")
CPPUNIT_TEST_FIXTURE(Test, testProtectionKey)
{
auto verify = [this]() {
- OUString constexpr password(u"1012345678901234567890123456789012345678901234567890"_ustr);
+ static OUString constexpr password(u"1012345678901234567890123456789012345678901234567890"_ustr);
// check 1 invalid OOo legacy password and 3 valid ODF 1.2 passwords
uno::Reference<text::XTextSectionsSupplier> xTextSectionsSupplier(mxComponent, uno::UNO_QUERY);
diff --git a/sw/qa/extras/odfexport/odfexport2.cxx b/sw/qa/extras/odfexport/odfexport2.cxx
index d0353009a224..a8cea9a6bbfb 100644
--- a/sw/qa/extras/odfexport/odfexport2.cxx
+++ b/sw/qa/extras/odfexport/odfexport2.cxx
@@ -1676,7 +1676,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTableInFrameAnchoredToPage)
const OUString styleName = getXPath(pXmlDoc, path, attr);
return "//office:automatic-styles/style:style[@style:name='" + styleName.toUtf8() + "']";
};
- constexpr OString xPathTextBox = "//office:body/office:text/draw:frame/draw:text-box"_ostr;
+ static constexpr OString xPathTextBox = "//office:body/office:text/draw:frame/draw:text-box"_ostr;
// Check also, that autostyles defined inside that frame are stored correctly. If not, then
// these paragraphs would refer to styles in <office::styles>, not in <office:automatic-styles>,
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport20.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport20.cxx
index bfb777448fc3..c418c1904197 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport20.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport20.cxx
@@ -1133,7 +1133,8 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf159110)
// Given a text with an URL with multiple spaces
loadAndReload("multi_space_url.fodt");
- constexpr OUString sExpectedURL = u"http://www.example.org/path%20%20with%20%20spaces"_ustr;
+ static constexpr OUString sExpectedURL
+ = u"http://www.example.org/path%20%20with%20%20spaces"_ustr;
// Without the fix, this would have failed with
// - Expected: http://www.example.org/path%20%20with%20%20spaces
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
index 4af3730aa9a2..bf12d0178b62 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
@@ -1387,7 +1387,7 @@ DECLARE_OOXMLEXPORT_TEST(testActiveXOptionButtonGroup, "activex_option_button_gr
{
// Optionbutton groups were not handled
// The two optionbutton should have the same group name
- constexpr OUString sGroupName = u"GroupX"_ustr;
+ static constexpr OUString sGroupName = u"GroupX"_ustr;
uno::Reference<drawing::XControlShape> xControlShape(getShape(1), uno::UNO_QUERY);
CPPUNIT_ASSERT(xControlShape.is());
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
index a8329de27e82..9e5daa6dab96 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
@@ -1121,7 +1121,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf154319)
// tdf#154360: check tab stops between the number and the entry text
// The last (10th) level does not correspond to any MS level (only 9 levels there)
- constexpr sal_Int32 levelTabStops[]
+ static constexpr sal_Int32 levelTabStops[]
= { 776, 1552, 2328, 3104, 3881, 4657, 5433, 6209, 6985, -1 };
//start with level 1, 0 is the header level
diff --git a/sw/qa/extras/uiwriter/uiwriter3.cxx b/sw/qa/extras/uiwriter/uiwriter3.cxx
index b43030a41d71..a030ad9c10f8 100644
--- a/sw/qa/extras/uiwriter/uiwriter3.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter3.cxx
@@ -1651,7 +1651,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testToxmarkLinks)
// click on the links...
{
- OUString constexpr tmp(u"Table of Contents"_ustr);
+ static OUString constexpr tmp(u"Table of Contents"_ustr);
pWrtShell->GotoNextTOXBase(&tmp);
}
@@ -1686,7 +1686,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testToxmarkLinks)
}
{
- OUString constexpr tmp(u"User-Defined1"_ustr);
+ static OUString constexpr tmp(u"User-Defined1"_ustr);
pWrtShell->GotoNextTOXBase(&tmp);
}
@@ -1738,7 +1738,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testToxmarkLinks)
}
{
- OUString constexpr tmp(u"NewUD!|1"_ustr);
+ static OUString constexpr tmp(u"NewUD!|1"_ustr);
pWrtShell->GotoNextTOXBase(&tmp);
}
diff --git a/sw/qa/extras/uiwriter/uiwriter4.cxx b/sw/qa/extras/uiwriter/uiwriter4.cxx
index a59491bf7491..7df258900c9f 100644
--- a/sw/qa/extras/uiwriter/uiwriter4.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter4.cxx
@@ -653,7 +653,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testBookmarkCollapsed)
// load only content.xml from the resaved document
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
- constexpr const char* aPath("/office:document-content/office:body/office:text/text:p");
+ const char* const aPath("/office:document-content/office:body/office:text/text:p");
const int pos1 = getXPathPosition(pXmlDoc, aPath, "bookmark");
CPPUNIT_ASSERT_EQUAL(0, pos1); // found, and it is first
@@ -824,7 +824,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testRemoveBookmarkTextAndAddNew)
// load only content.xml from the resaved document
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
- constexpr const char* aPath("/office:document-content/office:body/office:text/text:p");
+ const char* const aPath("/office:document-content/office:body/office:text/text:p");
CPPUNIT_ASSERT_ASSERTION_FAIL(getXPathPosition(pXmlDoc, aPath, "bookmark")); // not found
const int pos2 = getXPathPosition(pXmlDoc, aPath, "bookmark-start");
@@ -887,7 +887,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testRemoveBookmarkTextAndAddNewAfterReload
// load only content.xml from the resaved document
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
- constexpr const char* aPath("/office:document-content/office:body/office:text/text:p");
+ const char* const aPath("/office:document-content/office:body/office:text/text:p");
const int pos1 = getXPathPosition(pXmlDoc, aPath, "bookmark");
const int pos2 = getXPathPosition(pXmlDoc, aPath, "text");
@@ -1300,7 +1300,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testRedlineViewAuthor)
SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
pWrtShell->Insert(u"middle"_ustr);
SwView* pView = pDocShell->GetView();
- constexpr OUString aAuthor(u"A U. Thor"_ustr);
+ static constexpr OUString aAuthor(u"A U. Thor"_ustr);
pView->SetRedlineAuthor(aAuthor);
pDocShell->SetView(pView);
@@ -2203,7 +2203,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testCreateDocxAnnotation)
createSwDoc();
// insert an annotation with a text
- constexpr OUString aSomeText(u"some text"_ustr);
+ static constexpr OUString aSomeText(u"some text"_ustr);
uno::Sequence<beans::PropertyValue> aPropertyValues = comphelper::InitPropertySequence({
{ "Text", uno::Any(aSomeText) },
{ "Author", uno::Any(u"me"_ustr) },
diff --git a/sw/qa/extras/uiwriter/uiwriter6.cxx b/sw/qa/extras/uiwriter/uiwriter6.cxx
index fd09758324d7..7d5bc22b8fa6 100644
--- a/sw/qa/extras/uiwriter/uiwriter6.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter6.cxx
@@ -900,7 +900,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf113481)
CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf115013)
{
- constexpr OUString sColumnName(u"Name with spaces, \"quotes\" and \\backslashes"_ustr);
+ static constexpr OUString sColumnName(u"Name with spaces, \"quotes\" and \\backslashes"_ustr);
utl::TempFileNamed aTempDir(nullptr, true);
aTempDir.EnableKillingFile();
diff --git a/sw/qa/extras/uiwriter/uiwriter7.cxx b/sw/qa/extras/uiwriter/uiwriter7.cxx
index 964ccc0b4482..fdd09d358fa1 100644
--- a/sw/qa/extras/uiwriter/uiwriter7.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter7.cxx
@@ -2392,8 +2392,8 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testUnicodeNotationToggle)
sDocString = pWrtShell->GetCursor()->GetPointNode().GetTextNode()->GetText();
CPPUNIT_ASSERT_EQUAL(sOriginalDocString, sDocString);
- constexpr OUString sWithCombiningSMPName = u"xyzU+4faeU+e0101"_ustr;
- constexpr OUString sWithCombiningSMP = u"xyz\U00004fae\U000e0101"_ustr;
+ static constexpr OUString sWithCombiningSMPName = u"xyzU+4faeU+e0101"_ustr;
+ static constexpr OUString sWithCombiningSMP = u"xyz\U00004fae\U000e0101"_ustr;
pWrtShell->SplitNode();
pWrtShell->Insert2(sWithCombiningSMPName);
dispatchCommand(mxComponent, u".uno:UnicodeNotationToggle"_ustr, aPropertyValues);