diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-06-21 12:14:08 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-06-25 13:53:21 +0200 |
commit | 4583911575edf98ccd5b15af8eafa6a3a7b64034 (patch) | |
tree | f3f33e53c45dd870f19e7e42db9bb5b4bf1f23bf /cui | |
parent | 1942182a3d1817bc539229d7fda3af69f7e295b8 (diff) |
improve loplugin:simplifyconstruct
Change-Id: If863d28c6db470faa0d22273020888d4219e069e
Reviewed-on: https://gerrit.libreoffice.org/74559
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/scriptdlg.cxx | 4 | ||||
-rw-r--r-- | cui/source/options/treeopt.cxx | 2 | ||||
-rw-r--r-- | cui/source/tabpages/autocdlg.cxx | 4 | ||||
-rw-r--r-- | cui/source/tabpages/numfmt.cxx | 2 |
4 files changed, 5 insertions, 7 deletions
diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx index 564dc5920466..32c7a4b2e605 100644 --- a/cui/source/dialogs/scriptdlg.cxx +++ b/cui/source/dialogs/scriptdlg.cxx @@ -435,9 +435,7 @@ short SvxScriptOrgDialog::run() // force load of MSPs for all documents while ( pDoc ) { - Reference< provider::XScriptProviderSupplier > xSPS = - Reference< provider::XScriptProviderSupplier > - ( pDoc->GetModel(), UNO_QUERY ); + Reference< provider::XScriptProviderSupplier > xSPS( pDoc->GetModel(), UNO_QUERY ); if ( xSPS.is() ) { xSPS->getScriptProvider(); diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index 31c5e0400615..83f3a37855dc 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -2154,7 +2154,7 @@ void ExtensionsTabPage::ActivatePage() if ( m_xPage.is() ) { - Point aPos = Point(); + Point aPos; Size aSize = GetParent()->get_preferred_size(); m_xPage->setPosSize( aPos.X() + 1, aPos.Y() + 1, aSize.Width() - 2, aSize.Height() - 2, awt::PosSize::POSSIZE ); diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index c47a0bcc66d1..2ed5e4ac7c0c 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -952,7 +952,7 @@ void OfaAutocorrReplacePage::NewEntry(const OUString& sShort, const OUString& sL } } - DoubleString aNewString = DoubleString(); + DoubleString aNewString; aNewString.sShort = sShort; aNewString.sLong = sLong; rNewArray.push_back(aNewString); @@ -982,7 +982,7 @@ void OfaAutocorrReplacePage::DeleteEntry(const OUString& sShort, const OUString& } } - DoubleString aDeletedString = DoubleString(); + DoubleString aDeletedString; aDeletedString.sShort = sShort; aDeletedString.sLong = sLong; rDeletedArray.push_back(aDeletedString); diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx index 282a50460693..499910f6d78b 100644 --- a/cui/source/tabpages/numfmt.cxx +++ b/cui/source/tabpages/numfmt.cxx @@ -174,7 +174,7 @@ void SvxNumberPreview::Paint(vcl::RenderContext& rRenderContext, const ::tools:: nX = nLeadSpace; } - Point aPosText = Point(nX, (aSzWnd.Height() - GetTextHeight()) / 2); + Point aPosText(nX, (aSzWnd.Height() - GetTextHeight()) / 2); rRenderContext.DrawText(aPosText, aTmpStr); rRenderContext.Pop(); } |