From 5285beeaa49f6678b471d472868c305c7d9da5f9 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 25 Oct 2013 17:35:42 +0200 Subject: remove redundant calls to OUString constructor in if expression Convert code like: if( aStr == OUString("xxxx") ) to this: if( aStr == "xxxx" ) Change-Id: I8d201f048477731eff590fb988259ef0935c080c --- vcl/source/app/settings.cxx | 20 ++++++++++---------- vcl/source/window/window.cxx | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'vcl') diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx index 92d28162e354..a5dfdce11d69 100644 --- a/vcl/source/app/settings.cxx +++ b/vcl/source/app/settings.cxx @@ -562,25 +562,25 @@ OUString StyleSettings::ImplSymbolsStyleToName( sal_uLong nStyle ) const sal_uLong StyleSettings::ImplNameToSymbolsStyle( const OUString &rName ) const { - if ( rName == OUString("default") ) + if ( rName == "default" ) return STYLE_SYMBOLS_DEFAULT; - else if ( rName == OUString("hicontrast") ) + else if ( rName == "hicontrast" ) return STYLE_SYMBOLS_HICONTRAST; - else if ( rName == OUString("industrial") ) + else if ( rName == "industrial" ) return STYLE_SYMBOLS_TANGO; // industrial is dead - else if ( rName == OUString("crystal") ) + else if ( rName == "crystal" ) return STYLE_SYMBOLS_CRYSTAL; - else if ( rName == OUString("tango") ) + else if ( rName == "tango" ) return STYLE_SYMBOLS_TANGO; - else if ( rName == OUString("oxygen") ) + else if ( rName == "oxygen" ) return STYLE_SYMBOLS_OXYGEN; - else if ( rName == OUString("classic") ) + else if ( rName == "classic" ) return STYLE_SYMBOLS_CLASSIC; - else if ( rName == OUString("human") ) + else if ( rName == "human" ) return STYLE_SYMBOLS_HUMAN; - else if ( rName == OUString("sifr") ) + else if ( rName == "sifr" ) return STYLE_SYMBOLS_SIFR; - else if ( rName == OUString("tango_testing") ) + else if ( rName == "tango_testing" ) return STYLE_SYMBOLS_TANGO_TESTING; return STYLE_SYMBOLS_AUTO; diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 27df84f358c3..91d790650c55 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -7909,7 +7909,7 @@ void Window::SetCursor( Cursor* pCursor ) void Window::SetText( const OUString& rStr ) { - if (rStr == OUString(mpWindowImpl->maText)) + if (rStr == mpWindowImpl->maText) return; DBG_CHKTHIS( Window, ImplDbgCheckWindow ); -- cgit