diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-30 16:38:54 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-31 08:56:20 +0000 |
commit | 1c3e84d8192218befebcddae2ed9842d081dc6c7 (patch) | |
tree | f4fc5cddd181d6d49bf55f74e6d3d107b8ae8d18 /sc/qa/unit | |
parent | e1e6cdbb1e9ff37f0bb740a70045c66953bec50c (diff) |
teach lolugin:stringconstant about calling constructors
so we can remove unnecessary calls to the OUString(literal) constructor
when calling constructors like this:
Foo(OUString("xxx"), 1)
Change-Id: I1de60ef561437c86b27dc9cb095a5deb2e103b36
Reviewed-on: https://gerrit.libreoffice.org/33698
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/qa/unit')
-rw-r--r-- | sc/qa/unit/helper/qahelper.cxx | 6 | ||||
-rw-r--r-- | sc/qa/unit/subsequent_export-test.cxx | 2 | ||||
-rw-r--r-- | sc/qa/unit/subsequent_filters-test.cxx | 2 | ||||
-rw-r--r-- | sc/qa/unit/ucalc_pivottable.cxx | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx index 6599fe18d31a..439df8af4328 100644 --- a/sc/qa/unit/helper/qahelper.cxx +++ b/sc/qa/unit/helper/qahelper.cxx @@ -530,7 +530,7 @@ ScDocShellRef ScBootstrapFixture::load( bool bReadWrite, std::shared_ptr<const SfxFilter> pFilter(new SfxFilter( rFilter, OUString(), nFilterFlags, nClipboardID, rTypeName, 0, OUString(), - rUserData, OUString("private:factory/scalc"))); + rUserData, "private:factory/scalc")); const_cast<SfxFilter*>(pFilter.get())->SetVersion(nFilterVersion); ScDocShellRef xDocShRef = new ScDocShell; @@ -622,7 +622,7 @@ ScDocShellRef ScBootstrapFixture::saveAndReload( std::shared_ptr<const SfxFilter> pExportFilter(new SfxFilter( rFilter, OUString(), nFormatType, nExportFormat, rTypeName, 0, OUString(), - rUserData, OUString("private:factory/scalc*") )); + rUserData, "private:factory/scalc*" )); const_cast<SfxFilter*>(pExportFilter.get())->SetVersion(SOFFICE_FILEFORMAT_CURRENT); aStoreMedium.SetFilter(pExportFilter); pShell->DoSaveAs( aStoreMedium ); @@ -668,7 +668,7 @@ std::shared_ptr<utl::TempFile> ScBootstrapFixture::exportTo( ScDocShell* pShell, std::shared_ptr<SfxFilter> pExportFilter(new SfxFilter( aFilterName, OUString(), nFormatType, nExportFormat, aFilterType, 0, OUString(), - OUString(), OUString("private:factory/scalc*") )); + OUString(), "private:factory/scalc*" )); pExportFilter.get()->SetVersion(SOFFICE_FILEFORMAT_CURRENT); aStoreMedium.SetFilter(pExportFilter); pShell->DoSaveAs( aStoreMedium ); diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx index f448ee43fef7..b4cb9856eed7 100644 --- a/sc/qa/unit/subsequent_export-test.cxx +++ b/sc/qa/unit/subsequent_export-test.cxx @@ -329,7 +329,7 @@ ScDocShellRef ScExportTest::saveAndReloadPassword(ScDocShell* pShell, const OUSt std::shared_ptr<const SfxFilter> pExportFilter(new SfxFilter( rFilter, OUString(), nFormatType, nExportFormat, rTypeName, 0, OUString(), - rUserData, OUString("private:factory/scalc*") )); + rUserData, "private:factory/scalc*" )); const_cast<SfxFilter*>(pExportFilter.get())->SetVersion(SOFFICE_FILEFORMAT_CURRENT); aStoreMedium.SetFilter(pExportFilter); SfxItemSet* pExportSet = aStoreMedium.GetItemSet(); diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index 7306a4a9354e..e7b436d90bb1 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -1552,7 +1552,7 @@ void ScFiltersTest::testPassword_Impl(const OUString& aFileNameBase) std::shared_ptr<const SfxFilter> pFilter(new SfxFilter( aFilterName, OUString(), getFileFormats()[0].nFormatType, nFormat, aFilterType, 0, OUString(), - OUString(), OUString("private:factory/scalc*") )); + OUString(), "private:factory/scalc*" )); const_cast<SfxFilter*>(pFilter.get())->SetVersion(SOFFICE_FILEFORMAT_CURRENT); ScDocShellRef xDocSh = new ScDocShell; diff --git a/sc/qa/unit/ucalc_pivottable.cxx b/sc/qa/unit/ucalc_pivottable.cxx index 11c795e165a1..a7c503748f35 100644 --- a/sc/qa/unit/ucalc_pivottable.cxx +++ b/sc/qa/unit/ucalc_pivottable.cxx @@ -1251,7 +1251,7 @@ void Test::testPivotTableNumberGrouping() aInfo.mfStart = 30; aInfo.mfEnd = 60; aInfo.mfStep = 10; - ScDPSaveNumGroupDimension aGroup(OUString("Order"), aInfo); + ScDPSaveNumGroupDimension aGroup("Order", aInfo); pDimData->AddNumGroupDimension(aGroup); } |