diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-27 16:09:54 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-28 09:22:55 +0000 |
commit | f1d83ac45f08270f7f2dd7128056effd0251dc5e (patch) | |
tree | 55d924eaa7f55627039d44458d869ef65130fdf8 /reportdesign | |
parent | 53d3755972bfd3bd2cd650edf91f1483038028c8 (diff) |
loplugin:stringconstant check for unnecessary OUString constructor..
..calls when creating exceptions
Change-Id: I3bc58a5aa4dc6f0508ecb88b3a843b96b8c7ebfe
Reviewed-on: https://gerrit.libreoffice.org/33617
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'reportdesign')
-rw-r--r-- | reportdesign/source/core/api/ReportDefinition.cxx | 4 | ||||
-rw-r--r-- | reportdesign/source/ui/inspection/GeometryHandler.cxx | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx index 84fcc9fec93d..614f7e30f805 100644 --- a/reportdesign/source/core/api/ReportDefinition.cxx +++ b/reportdesign/source/core/api/ReportDefinition.cxx @@ -1616,7 +1616,7 @@ void SAL_CALL OReportDefinition::load( const uno::Sequence< beans::PropertyValue aStorageSource <<= sURL; else throw lang::IllegalArgumentException( - OUString( "No input source (URL or InputStream) found." ), + "No input source (URL or InputStream) found.", // TODO: resource *this, 1 @@ -1652,7 +1652,7 @@ void SAL_CALL OReportDefinition::load( const uno::Sequence< beans::PropertyValue { if ( i == nLastOpenMode ) throw lang::WrappedTargetException( - OUString( "An error occurred while creating the document storage." ), + "An error occurred while creating the document storage.", // TODO: resource *this, ::cppu::getCaughtException() diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx index 816d77cf14f5..64688e53a339 100644 --- a/reportdesign/source/ui/inspection/GeometryHandler.cxx +++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx @@ -1645,7 +1645,7 @@ void GeometryHandler::checkPosAndSize( const awt::Point& _aNewPos, ::Point aPos(VCLPoint(_aNewPos)); if ( aPos.X() < 0 || aPos.Y() < 0 ) // TODO: have to check size with pos aka || (aPos.X() + aAwtSize.Width) > m_xSection->getReportDefinition()-> - throw beans::PropertyVetoException(OUString(ModuleRes(RID_STR_ILLEGAL_POSITION)),xSourceReportComponent); + throw beans::PropertyVetoException(ModuleRes(RID_STR_ILLEGAL_POSITION),xSourceReportComponent); ::Rectangle aSourceRect(aPos,VCLSize(_aSize)); @@ -1658,7 +1658,7 @@ void GeometryHandler::checkPosAndSize( const awt::Point& _aNewPos, const ::Rectangle aBoundRect(VCLPoint(xReportComponent->getPosition()),VCLSize(xReportComponent->getSize())); const ::Rectangle aRect = aSourceRect.GetIntersection(aBoundRect); if ( !aRect.IsEmpty() && (aRect.Left() != aRect.Right() && aRect.Top() != aRect.Bottom() ) ) - throw beans::PropertyVetoException(OUString(ModuleRes( RID_STR_OVERLAP_OTHER_CONTROL)),xSourceReportComponent); + throw beans::PropertyVetoException(ModuleRes( RID_STR_OVERLAP_OTHER_CONTROL),xSourceReportComponent); } } } |