From fb847101519ad74c02183672c04ebf1d700aae83 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 10 Dec 2013 08:31:13 +0200 Subject: simplify - use OUString::startsWith where possible Convert code like if( !aStr.isEmpty() && aStr[0] == 'x' ) to if( aStr.startsWith("x") ) Change-Id: Iabc3a44ed3be2d29eed876e0eeef212ccd271edf --- sd/source/ui/docshell/docshel4.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sd/source/ui/docshell') diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx index eeae1004450b..5304db5940ae 100644 --- a/sd/source/ui/docshell/docshel4.cxx +++ b/sd/source/ui/docshell/docshel4.cxx @@ -873,7 +873,7 @@ sal_Bool DrawDocShell::GetObjectIsmarked(const OUString& rBookmark) OUString aBookmark( rBookmark ); - if( !rBookmark.isEmpty() && rBookmark[0] == sal_Unicode('#') ) + if( rBookmark.startsWith("#") ) aBookmark = rBookmark.copy( 1 ); // Ist das Bookmark eine Seite? @@ -979,7 +979,7 @@ sal_Bool DrawDocShell::GotoTreeBookmark(const OUString& rBookmark) OUString aBookmark( rBookmark ); - if( !rBookmark.isEmpty() && rBookmark[0] == sal_Unicode('#') ) + if( rBookmark.startsWith("#") ) aBookmark = rBookmark.copy( 1 ); // Ist das Bookmark eine Seite? -- cgit