summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-12-18 13:39:25 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-12-18 14:12:38 +0100
commit56d479f5405cf018bf233879387dbad851d279f2 (patch)
treec6b2ae67ad666eaab625e1066eb144892ba1a8b8
parentbb80b9e6cda268bb57481e7835ac6e4009174053 (diff)
vcl: Use appropriate OUString functions on string constants
Change-Id: I010146e9b7181d0cc704a26ae1d373794cf6facb
-rw-r--r--vcl/osx/printaccessoryview.mm2
-rw-r--r--vcl/osx/salframe.cxx30
-rw-r--r--vcl/source/app/svapp.cxx2
-rw-r--r--vcl/source/control/edit.cxx4
-rw-r--r--vcl/source/control/quickselectionengine.cxx2
-rw-r--r--vcl/source/font/PhysicalFontCollection.cxx2
-rw-r--r--vcl/source/gdi/gfxlink.cxx2
-rw-r--r--vcl/source/opengl/OpenGLContext.cxx2
-rw-r--r--vcl/source/outdev/font.cxx2
-rw-r--r--vcl/source/window/layout.cxx2
-rw-r--r--vcl/source/window/status.cxx2
11 files changed, 26 insertions, 26 deletions
diff --git a/vcl/osx/printaccessoryview.mm b/vcl/osx/printaccessoryview.mm
index e2db4c3fe443..81b3194a1072 100644
--- a/vcl/osx/printaccessoryview.mm
+++ b/vcl/osx/printaccessoryview.mm
@@ -1251,7 +1251,7 @@ static void addEdit( NSView* pCurParent, long& rCurX, long& rCurY, long nAttachO
// new tab item
if( ! aText.getLength() )
- aText = OUString( "OOo" );
+ aText = "OOo";
NSString* pLabel = CreateNSString( aGroupTitle );
NSTabViewItem* pItem = [[NSTabViewItem alloc] initWithIdentifier: pLabel ];
[pItem setLabel: pLabel];
diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx
index 7591c692856c..2dead3748219 100644
--- a/vcl/osx/salframe.cxx
+++ b/vcl/osx/salframe.cxx
@@ -961,26 +961,26 @@ OUString AquaSalFrame::GetKeyName( sal_uInt16 nKeyCode )
aKeyMap[ KEY_PAGEUP ] = OUString( sal_Unicode( 0x21de ) );
aKeyMap[ KEY_PAGEDOWN ] = OUString( sal_Unicode( 0x21df ) );
aKeyMap[ KEY_RETURN ] = OUString( sal_Unicode( 0x21a9 ) );
- aKeyMap[ KEY_ESCAPE ] = OUString( "esc" );
+ aKeyMap[ KEY_ESCAPE ] = "esc";
aKeyMap[ KEY_TAB ] = OUString( sal_Unicode( 0x21e5 ) );
aKeyMap[ KEY_BACKSPACE ]= OUString( sal_Unicode( 0x232b ) );
aKeyMap[ KEY_SPACE ] = OUString( sal_Unicode( 0x2423 ) );
aKeyMap[ KEY_DELETE ] = OUString( sal_Unicode( 0x2326 ) );
- aKeyMap[ KEY_ADD ] = OUString( '+' );
- aKeyMap[ KEY_SUBTRACT ] = OUString( '-' );
- aKeyMap[ KEY_DIVIDE ] = OUString( '/' );
- aKeyMap[ KEY_MULTIPLY ] = OUString( '*' );
- aKeyMap[ KEY_POINT ] = OUString( '.' );
- aKeyMap[ KEY_COMMA ] = OUString( ',' );
- aKeyMap[ KEY_LESS ] = OUString( '<' );
- aKeyMap[ KEY_GREATER ] = OUString( '>' );
- aKeyMap[ KEY_EQUAL ] = OUString( '=' );
+ aKeyMap[ KEY_ADD ] = "+";
+ aKeyMap[ KEY_SUBTRACT ] = "-";
+ aKeyMap[ KEY_DIVIDE ] = "/";
+ aKeyMap[ KEY_MULTIPLY ] = "*";
+ aKeyMap[ KEY_POINT ] = ".";
+ aKeyMap[ KEY_COMMA ] = ",";
+ aKeyMap[ KEY_LESS ] = "<";
+ aKeyMap[ KEY_GREATER ] = ">";
+ aKeyMap[ KEY_EQUAL ] = "=";
aKeyMap[ KEY_OPEN ] = OUString( sal_Unicode( 0x23cf ) );
- aKeyMap[ KEY_TILDE ] = OUString( '~' );
- aKeyMap[ KEY_BRACKETLEFT ] = OUString( '[' );
- aKeyMap[ KEY_BRACKETRIGHT ] = OUString( ']' );
- aKeyMap[ KEY_SEMICOLON ] = OUString( ';' );
- aKeyMap[ KEY_QUOTERIGHT ] = OUString( '\'' );
+ aKeyMap[ KEY_TILDE ] = "~";
+ aKeyMap[ KEY_BRACKETLEFT ] = "[";
+ aKeyMap[ KEY_BRACKETRIGHT ] = "]";
+ aKeyMap[ KEY_SEMICOLON ] = ";";
+ aKeyMap[ KEY_QUOTERIGHT ] = "'";
/* yet unmapped KEYCODES:
aKeyMap[ KEY_INSERT ] = OUString( sal_Unicode( ) );
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index eb3c00bad43f..da30524932c3 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -312,7 +312,7 @@ void Application::Abort( const OUString& rErrorText )
bool dumpCore = false;
sal_uInt16 n = GetCommandLineParamCount();
for (sal_uInt16 i = 0; i != n; ++i) {
- if (GetCommandLineParam(i).equals("--norestore")) {
+ if (GetCommandLineParam(i) == "--norestore") {
dumpCore = true;
break;
}
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 76775af1df76..821d535ad397 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -875,13 +875,13 @@ void Edit::ImplInsertText( const OUString& rStr, const Selection* pNewSel, bool
aSelection.Min() = nChgPos; // position for new text to be inserted
}
else
- aNewText = "";
+ aNewText.clear();
}
else
{
// should the character be ignored (i.e. not get inserted) ?
if (!xISC->checkInputSequence( aOldText, nTmpPos - 1, cChar, nCheckMode ))
- aNewText = "";
+ aNewText.clear();
}
}
diff --git a/vcl/source/control/quickselectionengine.cxx b/vcl/source/control/quickselectionengine.cxx
index 25d136a0218e..2e055c959690 100644
--- a/vcl/source/control/quickselectionengine.cxx
+++ b/vcl/source/control/quickselectionengine.cxx
@@ -58,7 +58,7 @@ namespace vcl
{
static void lcl_reset( QuickSelectionEngine_Data& _data )
{
- _data.sCurrentSearchString = "";
+ _data.sCurrentSearchString.clear();
_data.aSingleSearchChar.reset();
_data.aSearchTimeout.Stop();
}
diff --git a/vcl/source/font/PhysicalFontCollection.cxx b/vcl/source/font/PhysicalFontCollection.cxx
index 4eee2251d464..6754e1bbfdf5 100644
--- a/vcl/source/font/PhysicalFontCollection.cxx
+++ b/vcl/source/font/PhysicalFontCollection.cxx
@@ -264,7 +264,7 @@ PhysicalFontFamily* PhysicalFontCollection::GetGlyphFallbackFont( FontSelectPatt
// apply outdev3.cxx specific fontname normalization
rFontSelData.maSearchName = GetEnglishSearchFontName( rFontSelData.maSearchName );
else
- rFontSelData.maSearchName = "";
+ rFontSelData.maSearchName.clear();
// See fdo#32665 for an example. FreeSerif that has glyphs in normal
// font, but not in the italic or bold version
diff --git a/vcl/source/gdi/gfxlink.cxx b/vcl/source/gdi/gfxlink.cxx
index 03de2ed86374..575a28488644 100644
--- a/vcl/source/gdi/gfxlink.cxx
+++ b/vcl/source/gdi/gfxlink.cxx
@@ -332,7 +332,7 @@ ImpSwap::ImpSwap( sal_uInt8* pData, sal_uLong nDataSize ) :
if( bError )
{
osl_removeFile( maURL.pData );
- maURL = "";
+ maURL.clear();
}
}
}
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index 5e9e942cb0f8..04e19ba592dd 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -1008,7 +1008,7 @@ void OpenGLContext::renderToFile()
int iWidth = m_aGLWin.Width;
int iHeight = m_aGLWin.Height;
static int nIdx = 0;
- OUString aName = OUString( "file:///home/moggi/Documents/work/output" ) + OUString::number( nIdx++ ) + ".png";
+ OUString aName = "file:///home/moggi/Documents/work/output" + OUString::number( nIdx++ ) + ".png";
OpenGLHelper::renderToFile(iWidth, iHeight, aName);
}
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index 7d142e048277..414b2e85cdd0 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -1352,7 +1352,7 @@ ImplFontEntry* ImplFontCache::GetGlyphFallbackFont( PhysicalFontCollection* pFon
// override the font name
rFontSelData.SetFamilyName( pFallbackData->GetFamilyName() );
// clear the cached normalized name
- rFontSelData.maSearchName = "";
+ rFontSelData.maSearchName.clear();
}
ImplFontEntry* pFallbackFont = GetFontEntry( pFontCollection, rFontSelData );
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 1fc5e1fb8379..5495e7c048e8 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -2281,7 +2281,7 @@ void MessageDialog::set_secondary_text(const OUString &rSecondaryString)
m_sSecondaryString = rSecondaryString;
if (m_pSecondaryMessage)
{
- m_pSecondaryMessage->SetText(OUString("\n") + m_sSecondaryString);
+ m_pSecondaryMessage->SetText("\n" + m_sSecondaryString);
m_pSecondaryMessage->Show(!m_sSecondaryString.isEmpty());
}
}
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index acde64a85e67..8583e5fbf971 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -1361,7 +1361,7 @@ void StatusBar::EndProgressMode()
DBG_ASSERT( mbProgressMode, "StatusBar::EndProgressMode(): no progress mode" );
mbProgressMode = false;
- maPrgsTxt = "";
+ maPrgsTxt.clear();
// re-trigger Paint to recreate StatusBar
SetFillColor( GetSettings().GetStyleSettings().GetFaceColor() );