loplugin:ostr in sccomp

Change-Id: I45243c0616a70d140293619f57221a609bf473f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167577
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2024-05-13 09:51:48 +02:00
parent 5c76b36437
commit 3c76913a5a
6 changed files with 19 additions and 19 deletions

View File

@@ -30,7 +30,7 @@ class SwarmSolverTest : public UnoApiTest
public: public:
SwarmSolverTest() SwarmSolverTest()
: UnoApiTest("sccomp/qa/unit/data") : UnoApiTest(u"sccomp/qa/unit/data"_ustr)
{ {
} }
@@ -54,7 +54,7 @@ void SwarmSolverTest::testUnconstrained()
uno::Reference<sheet::XSolver> xSolver; uno::Reference<sheet::XSolver> xSolver;
xSolver.set(m_xContext->getServiceManager()->createInstanceWithContext( xSolver.set(m_xContext->getServiceManager()->createInstanceWithContext(
"com.sun.star.comp.Calc.SwarmSolver", m_xContext), u"com.sun.star.comp.Calc.SwarmSolver"_ustr, m_xContext),
uno::UNO_QUERY_THROW); uno::UNO_QUERY_THROW);
table::CellAddress aObjective(0, 1, 1); table::CellAddress aObjective(0, 1, 1);
@@ -97,7 +97,7 @@ void SwarmSolverTest::testVariableBounded()
uno::Reference<sheet::XSolver> xSolver; uno::Reference<sheet::XSolver> xSolver;
xSolver.set(m_xContext->getServiceManager()->createInstanceWithContext( xSolver.set(m_xContext->getServiceManager()->createInstanceWithContext(
"com.sun.star.comp.Calc.SwarmSolver", m_xContext), u"com.sun.star.comp.Calc.SwarmSolver"_ustr, m_xContext),
uno::UNO_QUERY_THROW); uno::UNO_QUERY_THROW);
table::CellAddress aObjective(0, 1, 1); table::CellAddress aObjective(0, 1, 1);
@@ -142,7 +142,7 @@ void SwarmSolverTest::testVariableConstrained()
uno::Reference<sheet::XSolver> xSolver; uno::Reference<sheet::XSolver> xSolver;
xSolver.set(m_xContext->getServiceManager()->createInstanceWithContext( xSolver.set(m_xContext->getServiceManager()->createInstanceWithContext(
"com.sun.star.comp.Calc.SwarmSolver", m_xContext), u"com.sun.star.comp.Calc.SwarmSolver"_ustr, m_xContext),
uno::UNO_QUERY_THROW); uno::UNO_QUERY_THROW);
table::CellAddress aObjective(0, 1, 1); table::CellAddress aObjective(0, 1, 1);
@@ -190,7 +190,7 @@ void SwarmSolverTest::testTwoVariables()
uno::Reference<sheet::XSolver> xSolver; uno::Reference<sheet::XSolver> xSolver;
xSolver.set(m_xContext->getServiceManager()->createInstanceWithContext( xSolver.set(m_xContext->getServiceManager()->createInstanceWithContext(
"com.sun.star.comp.Calc.SwarmSolver", m_xContext), u"com.sun.star.comp.Calc.SwarmSolver"_ustr, m_xContext),
uno::UNO_QUERY_THROW); uno::UNO_QUERY_THROW);
table::CellAddress aObjective(0, 1, 5); table::CellAddress aObjective(0, 1, 5);
@@ -242,11 +242,11 @@ void SwarmSolverTest::testMultipleVariables()
uno::Reference<sheet::XSolver> xSolver; uno::Reference<sheet::XSolver> xSolver;
xSolver.set(m_xContext->getServiceManager()->createInstanceWithContext( xSolver.set(m_xContext->getServiceManager()->createInstanceWithContext(
"com.sun.star.comp.Calc.SwarmSolver", m_xContext), u"com.sun.star.comp.Calc.SwarmSolver"_ustr, m_xContext),
uno::UNO_QUERY_THROW); uno::UNO_QUERY_THROW);
uno::Reference<beans::XPropertySet> xPropSet(xSolver, uno::UNO_QUERY_THROW); uno::Reference<beans::XPropertySet> xPropSet(xSolver, uno::UNO_QUERY_THROW);
xPropSet->setPropertyValue("Integer", uno::Any(true)); xPropSet->setPropertyValue(u"Integer"_ustr, uno::Any(true));
table::CellAddress aObjective(0, 5, 7); table::CellAddress aObjective(0, 5, 7);

View File

@@ -52,7 +52,7 @@ void LpSolverTest::setUp()
test::BootstrapFixture::setUp(); test::BootstrapFixture::setUp();
uno::Reference<frame::XDesktop2> xComponentLoader = frame::Desktop::create(m_xContext); uno::Reference<frame::XDesktop2> xComponentLoader = frame::Desktop::create(m_xContext);
uno::Reference<lang::XComponent> xComponent(xComponentLoader->loadComponentFromURL( uno::Reference<lang::XComponent> xComponent(xComponentLoader->loadComponentFromURL(
"private:factory/scalc", "_blank", 0, u"private:factory/scalc"_ustr, u"_blank"_ustr, 0,
uno::Sequence < css::beans::PropertyValue >())); uno::Sequence < css::beans::PropertyValue >()));
m_xDocument.set(xComponent, uno::UNO_QUERY_THROW); m_xDocument.set(xComponent, uno::UNO_QUERY_THROW);
} }
@@ -67,14 +67,14 @@ void LpSolverTest::tearDown()
#ifdef ENABLE_LPSOLVE #ifdef ENABLE_LPSOLVE
void LpSolverTest::testLpSolver() void LpSolverTest::testLpSolver()
{ {
testSolver("com.sun.star.comp.Calc.LpsolveSolver"); testSolver(u"com.sun.star.comp.Calc.LpsolveSolver"_ustr);
} }
#endif #endif
#ifdef ENABLE_COINMP #ifdef ENABLE_COINMP
void LpSolverTest::testCoinMPSolver() void LpSolverTest::testCoinMPSolver()
{ {
testSolver("com.sun.star.comp.Calc.CoinMPSolver"); testSolver(u"com.sun.star.comp.Calc.CoinMPSolver"_ustr);
} }
#endif #endif

View File

@@ -46,7 +46,7 @@ private:
virtual void SAL_CALL solve() override; virtual void SAL_CALL solve() override;
virtual OUString SAL_CALL getImplementationName() override virtual OUString SAL_CALL getImplementationName() override
{ {
return "com.sun.star.comp.Calc.CoinMPSolver"; return u"com.sun.star.comp.Calc.CoinMPSolver"_ustr;
} }
virtual OUString SAL_CALL getComponentDescription() override virtual OUString SAL_CALL getComponentDescription() override
{ {

View File

@@ -76,7 +76,7 @@ private:
virtual void SAL_CALL solve() override; virtual void SAL_CALL solve() override;
virtual OUString SAL_CALL getImplementationName() override virtual OUString SAL_CALL getImplementationName() override
{ {
return "com.sun.star.comp.Calc.LpsolveSolver"; return u"com.sun.star.comp.Calc.LpsolveSolver"_ustr;
} }
virtual OUString SAL_CALL getComponentDescription() override virtual OUString SAL_CALL getComponentDescription() override
{ {

View File

@@ -247,7 +247,7 @@ sal_Bool SAL_CALL SolverComponent::supportsService( const OUString& rServiceName
uno::Sequence<OUString> SAL_CALL SolverComponent::getSupportedServiceNames() uno::Sequence<OUString> SAL_CALL SolverComponent::getSupportedServiceNames()
{ {
return { "com.sun.star.sheet.Solver" }; return { u"com.sun.star.sheet.Solver"_ustr };
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@@ -145,13 +145,13 @@ public:
, mbSuccess(false) , mbSuccess(false)
, mfResultValue(0.0) , mfResultValue(0.0)
{ {
registerProperty("NonNegative", PROP_NONNEGATIVE, 0, &mbNonNegative, registerProperty(u"NonNegative"_ustr, PROP_NONNEGATIVE, 0, &mbNonNegative,
cppu::UnoType<decltype(mbNonNegative)>::get()); cppu::UnoType<decltype(mbNonNegative)>::get());
registerProperty("Integer", PROP_INTEGER, 0, &mbInteger, registerProperty(u"Integer"_ustr, PROP_INTEGER, 0, &mbInteger,
cppu::UnoType<decltype(mbInteger)>::get()); cppu::UnoType<decltype(mbInteger)>::get());
registerProperty("Timeout", PROP_TIMEOUT, 0, &mnTimeout, registerProperty(u"Timeout"_ustr, PROP_TIMEOUT, 0, &mnTimeout,
cppu::UnoType<decltype(mnTimeout)>::get()); cppu::UnoType<decltype(mnTimeout)>::get());
registerProperty("Algorithm", PROP_ALGORITHM, 0, &mnAlgorithm, registerProperty(u"Algorithm"_ustr, PROP_ALGORITHM, 0, &mnAlgorithm,
cppu::UnoType<decltype(mnAlgorithm)>::get()); cppu::UnoType<decltype(mnAlgorithm)>::get());
} }
@@ -252,7 +252,7 @@ public:
// XServiceInfo // XServiceInfo
virtual OUString SAL_CALL getImplementationName() override virtual OUString SAL_CALL getImplementationName() override
{ {
return "com.sun.star.comp.Calc.SwarmSolver"; return u"com.sun.star.comp.Calc.SwarmSolver"_ustr;
} }
sal_Bool SAL_CALL supportsService(const OUString& rServiceName) override sal_Bool SAL_CALL supportsService(const OUString& rServiceName) override
@@ -262,7 +262,7 @@ public:
uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override
{ {
return { "com.sun.star.sheet.Solver" }; return { u"com.sun.star.sheet.Solver"_ustr };
} }
private: private: