summaryrefslogtreecommitdiff
path: root/vbahelper
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2012-07-14 18:00:06 +0200
committerMichael Meeks <michael.meeks@suse.com>2012-07-16 11:33:05 +0100
commitdf645a2bd8a9b5463c74f261268f0d2de7245ccc (patch)
tree25d5df125c50111828d1e1f62edd47b716c11489 /vbahelper
parent0dde6d4a2d14dcb09187d476c4fbb80b6e008315 (diff)
There is not need to allocate memory just for getting the 'indexOf'
a literal within a OUString. Change-Id: I01ca30c68228f81b3d313dfca5b975448f3c4fc7
Diffstat (limited to 'vbahelper')
-rw-r--r--vbahelper/source/vbahelper/vbacommandbarhelper.cxx2
-rw-r--r--vbahelper/source/vbahelper/vbacommandbars.cxx4
-rw-r--r--vbahelper/source/vbahelper/vbalineformat.cxx2
3 files changed, 4 insertions, 4 deletions
diff --git a/vbahelper/source/vbahelper/vbacommandbarhelper.cxx b/vbahelper/source/vbahelper/vbacommandbarhelper.cxx
index 75251e366919..05772c178c18 100644
--- a/vbahelper/source/vbahelper/vbacommandbarhelper.cxx
+++ b/vbahelper/source/vbahelper/vbacommandbarhelper.cxx
@@ -207,7 +207,7 @@ rtl::OUString VbaCommandBarHelper::findToolbarByName( const css::uno::Reference<
for( sal_Int32 i = 0; i < allNames.getLength(); i++ )
{
sResourceUrl = allNames[i];
- if(sResourceUrl.indexOf( rtl::OUString( ITEM_TOOLBAR_URL ) ) == 0 )
+ if(sResourceUrl.indexOf( ITEM_TOOLBAR_URL ) == 0 )
{
if( hasToolbar( sResourceUrl, sName ) )
return sResourceUrl;
diff --git a/vbahelper/source/vbahelper/vbacommandbars.cxx b/vbahelper/source/vbahelper/vbacommandbars.cxx
index 10ba77115d36..051b5aa3d1ed 100644
--- a/vbahelper/source/vbahelper/vbacommandbars.cxx
+++ b/vbahelper/source/vbahelper/vbacommandbars.cxx
@@ -59,7 +59,7 @@ public:
if( hasMoreElements() )
{
rtl::OUString sResourceUrl( m_sNames[ m_nCurrentPosition++ ] );
- if( sResourceUrl.indexOf( rtl::OUString("private:resource/toolbar/") ) != -1 )
+ if( sResourceUrl.indexOf( "private:resource/toolbar/" ) != -1 )
{
uno::Reference< container::XIndexAccess > xCBarSetting = m_pCBarHelper->getSettings( sResourceUrl );
uno::Reference< XCommandBar > xCommandBar( new ScVbaCommandBar( m_xParent, m_xContext, m_pCBarHelper, xCBarSetting, sResourceUrl, sal_False, sal_False ) );
@@ -194,7 +194,7 @@ ScVbaCommandBars::getCount() throw(css::uno::RuntimeException)
uno::Sequence< ::rtl::OUString > allNames = m_xNameAccess->getElementNames();
for( sal_Int32 i = 0; i < allNames.getLength(); i++ )
{
- if(allNames[i].indexOf( rtl::OUString("private:resource/toolbar/") ) != -1 )
+ if(allNames[i].indexOf( "private:resource/toolbar/" ) != -1 )
{
nCount++;
}
diff --git a/vbahelper/source/vbahelper/vbalineformat.cxx b/vbahelper/source/vbahelper/vbalineformat.cxx
index 68e203913730..4a84e38179cd 100644
--- a/vbahelper/source/vbahelper/vbalineformat.cxx
+++ b/vbahelper/source/vbahelper/vbalineformat.cxx
@@ -102,7 +102,7 @@ ScVbaLineFormat::getBeginArrowheadStyle() throw (uno::RuntimeException)
sal_Int32 nLineType = office::MsoArrowheadStyle::msoArrowheadNone;
rtl::OUString sLineName;
m_xPropertySet->getPropertyValue( rtl::OUString("LineStartName") ) >>= sLineName;
- if( ( sLineName.getLength() > 7 ) && ( sLineName.indexOf( rtl::OUString("msArray") ) ) != -1 )
+ if( ( sLineName.getLength() > 7 ) && ( sLineName.indexOf( "msArray" ) ) != -1 )
{
sal_Int32 nIndex = sLineName.indexOf( ' ' );
rtl::OUString sName = sLineName.copy( 0, nIndex );