diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-04-12 18:39:22 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-04-15 08:37:54 +0200 |
commit | b52f309f2b9037ee53ab8ac2d66967c012ba82f1 (patch) | |
tree | 4a4ace081c742af0cef50909e06394d9aef80345 /sd | |
parent | 897493fbd34a1bd10320767b48cbf04d422f89b3 (diff) |
improve loplugin simplifyconstruct
to find stuff like
OUString s = OUString("xxx")
Change-Id: Ie7ed074c1ae012734c67a2a89c564c1900a4ab04
Reviewed-on: https://gerrit.libreoffice.org/70697
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/export-tests-ooxml2.cxx | 2 | ||||
-rw-r--r-- | sd/source/filter/ppt/pptin.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/animations/CustomAnimationDialog.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/dlg/PhotoAlbumDialog.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/view/SlsTheme.cxx | 4 |
5 files changed, 6 insertions, 6 deletions
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx index 5b8f77f9a744..7c27e0a315cc 100644 --- a/sd/qa/unit/export-tests-ooxml2.cxx +++ b/sd/qa/unit/export-tests-ooxml2.cxx @@ -669,7 +669,7 @@ void SdOOXMLExportTest2::testPresetShapesExport() size_t i = 0; while(i < SAL_N_ELEMENTS( sShapeTypeAndValues )) { - OString sType = OString( sShapeTypeAndValues[ i++ ] ); + OString sType( sShapeTypeAndValues[ i++ ] ); for ( size_t j = 1 ; i < SAL_N_ELEMENTS( sShapeTypeAndValues ) && OString(sShapeTypeAndValues[i]).startsWith("adj") ; ++j ) { OString sXPath= sPattern.replaceFirst( sT, sType).replaceFirst( sN, OString::number(j) ); assertXPath(pXmlDocCT, sXPath, sPropertyName , OUString::createFromAscii(sShapeTypeAndValues[ i++ ]) ); diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx index 057e15e1908f..0c60e860bcfa 100644 --- a/sd/source/filter/ppt/pptin.cxx +++ b/sd/source/filter/ppt/pptin.cxx @@ -2745,7 +2745,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool TestImportPPT(SvStream &rStream) bool bRet = false; try { - tools::SvRef<SotStorage> xStorage = tools::SvRef<SotStorage>(new SotStorage(rStream)); + tools::SvRef<SotStorage> xStorage(new SotStorage(rStream)); if (xStorage->GetError()) return false; diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx index 12bb79851bea..6f0a3efbd62e 100644 --- a/sd/source/ui/animations/CustomAnimationDialog.cxx +++ b/sd/source/ui/animations/CustomAnimationDialog.cxx @@ -1859,7 +1859,7 @@ CustomAnimationEffectTabPage::CustomAnimationEffectTabPage(weld::Container* pPar { sal_Int32 nColor = 0; aDimColor >>= nColor; - Color aColor = Color(nColor); + Color aColor(nColor); mxCLBDimColor->SelectEntry(aColor); } else diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx index 186c407e0095..3f9b7cef8378 100644 --- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx +++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx @@ -532,7 +532,7 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, FileHdl, weld::Button&, void) for ( sal_Int32 i = 0; i < aFilesArr.getLength(); i++ ) { // Store full path, show filename only. Use INetURLObject to display spaces in filename correctly - INetURLObject aUrl = INetURLObject(aFilesArr[i]); + INetURLObject aUrl(aFilesArr[i]); m_xImagesLst->append(aUrl.GetMainURL(INetURLObject::DecodeMechanism::NONE), aUrl.GetLastName(INetURLObject::DecodeMechanism::WithCharset), ""); } } diff --git a/sd/source/ui/slidesorter/view/SlsTheme.cxx b/sd/source/ui/slidesorter/view/SlsTheme.cxx index b7976d9c55ca..f495ef6a4810 100644 --- a/sd/source/ui/slidesorter/view/SlsTheme.cxx +++ b/sd/source/ui/slidesorter/view/SlsTheme.cxx @@ -31,8 +31,8 @@ namespace sd { namespace slidesorter { namespace view { -const static Color Black = Color(0x000000); -const static Color White = Color(0xffffff); +const static Color Black(0x000000); +const static Color White(0xffffff); static Color ChangeLuminance (Color aColor, const int nValue) { |