summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-12-18 13:21:49 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-12-18 14:12:24 +0100
commit43e4b96e8ecab707803fa5083a53437d6f799444 (patch)
tree783455cb0ed0c01fece4d86d2f7f3b5f85a8c08a /cui
parentecf24f303217f55d1d2efdde7d58d0af083612d5 (diff)
cui: Use appropriate OUString functions on string constants
Change-Id: I126c587777b7183dfbd9c60cfb0a6a980332a295
Diffstat (limited to 'cui')
-rw-r--r--cui/source/customize/cfg.cxx11
-rw-r--r--cui/source/customize/macropg.cxx4
-rw-r--r--cui/source/dialogs/about.cxx5
-rw-r--r--cui/source/dialogs/cuigaldlg.cxx2
-rw-r--r--cui/source/dialogs/hangulhanjadlg.cxx4
-rw-r--r--cui/source/dialogs/hldoctp.cxx2
-rw-r--r--cui/source/dialogs/hltpbase.cxx10
-rw-r--r--cui/source/dialogs/showcols.cxx2
-rw-r--r--cui/source/options/optgdlg.cxx4
-rw-r--r--cui/source/options/optinet2.cxx2
-rw-r--r--cui/source/options/optopencl.cxx4
-rw-r--r--cui/source/options/optpath.cxx4
-rw-r--r--cui/source/options/optsave.cxx4
-rw-r--r--cui/source/options/personalization.cxx6
-rw-r--r--cui/source/options/personasdochandler.cxx2
-rw-r--r--cui/source/tabpages/autocdlg.cxx5
-rw-r--r--cui/source/tabpages/backgrnd.cxx10
-rw-r--r--cui/source/tabpages/chardlg.cxx2
-rw-r--r--cui/source/tabpages/tparea.cxx2
19 files changed, 39 insertions, 46 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 6c9b2de01927..328f8bf7207f 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -853,7 +853,7 @@ SaveInData::SaveInData(
m_xParentCfgMgr( xParentCfgMgr )
{
m_aSeparatorSeq.realloc( 1 );
- m_aSeparatorSeq[0].Name = OUString( ITEM_DESCRIPTOR_TYPE );
+ m_aSeparatorSeq[0].Name = ITEM_DESCRIPTOR_TYPE;
m_aSeparatorSeq[0].Value <<= css::ui::ItemType::SEPARATOR_LINE;
if ( bDocConfig )
@@ -1606,8 +1606,7 @@ void SvxConfigPage::Reset( const SfxItemSet* )
if ( pModuleData != NULL )
{
nPos = m_pSaveInListBox->InsertEntry(
- utl::ConfigManager::getProductName() +
- OUString( " " ) + aModuleName );
+ utl::ConfigManager::getProductName() + " " + aModuleName );
m_pSaveInListBox->SetEntryData( nPos, pModuleData );
}
@@ -1714,7 +1713,7 @@ void SvxConfigPage::Reset( const SfxItemSet* )
try{
aCheckId = xModuleManager->identify( xf );
} catch(const uno::Exception&)
- { aCheckId = ""; }
+ { aCheckId.clear(); }
if ( aModuleId.equals( aCheckId ) )
{
@@ -2899,7 +2898,7 @@ SvxToolbarConfigPage::SvxToolbarConfigPage(vcl::Window *pParent, const SfxItemSe
// default toolbar to select is standardbar unless a different one
// has been passed in
- m_aURLToSelect = OUString(ITEM_TOOLBAR_URL );
+ m_aURLToSelect = ITEM_TOOLBAR_URL;
m_aURLToSelect += "standardbar";
const SfxPoolItem* pItem =
@@ -3422,7 +3421,7 @@ void SvxToolbarConfigPage::Init()
}
// in future select the default toolbar: Standard
- m_aURLToSelect = OUString(ITEM_TOOLBAR_URL );
+ m_aURLToSelect = ITEM_TOOLBAR_URL;
m_aURLToSelect += "standardbar";
}
diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx
index 96e4acb1d650..00126b18baa7 100644
--- a/cui/source/customize/macropg.cxx
+++ b/cui/source/customize/macropg.cxx
@@ -629,7 +629,7 @@ long _SvxMacroTabPage::GenericHandler_Impl( _SvxMacroTabPage* pThis, PushButton*
{
// delete pressed
sEventType = "Script" ;
- sEventURL = "";
+ sEventURL.clear();
if(!pThis->bAppEvents)
pThis->bDocModified = true;
}
@@ -845,7 +845,7 @@ SvxMacroAssignDlg::SvxMacroAssignDlg( vcl::Window* pParent, const Reference< fra
IMPL_LINK_NOARG(AssignComponentDialog, ButtonHandler)
{
OUString aMethodName = mpMethodEdit->GetText();
- maURL = "";
+ maURL.clear();
if( !aMethodName.isEmpty() )
{
maURL = aVndSunStarUNO;
diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx
index b9e3306e2048..7e19f102a57d 100644
--- a/cui/source/dialogs/about.cxx
+++ b/cui/source/dialogs/about.cxx
@@ -269,8 +269,7 @@ OUString AboutDialog::GetVersionString()
if (strlen(EXTRA_BUILDID) > 0)
{
- sVersion += "\n";
- sVersion += EXTRA_BUILDID;
+ sVersion += "\n" EXTRA_BUILDID;
}
if (!pLocaleStr.trim().isEmpty())
@@ -295,7 +294,7 @@ OUString AboutDialog::GetCopyrightString()
aCopyrightString += m_aCopyrightTextStr;
aCopyrightString += "\n";
- if (utl::ConfigManager::getProductName().equals("LibreOffice"))
+ if (utl::ConfigManager::getProductName() == "LibreOffice")
aCopyrightString += m_aBasedTextStr;
else
aCopyrightString += m_aBasedDerivedTextStr;
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index 7bec1e299370..1cd56f2bcc49 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -1030,7 +1030,7 @@ IMPL_LINK_NOARG(TPGalleryThemeProperties, ClickPreviewHdl)
if ( bInputAllowed )
{
aPreviewTimer.Stop();
- aPreviewString = "";
+ aPreviewString.clear();
if( !m_pCbxPreview->IsChecked() )
{
diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx
index 4ad76f297298..0133f617ed3d 100644
--- a/cui/source/dialogs/hangulhanjadlg.cxx
+++ b/cui/source/dialogs/hangulhanjadlg.cxx
@@ -1571,7 +1571,7 @@ namespace svx
{
if( DeleteEntryFromDictionary( m_aOriginal, m_rDictList[ m_nCurrentDict ] ) )
{
- m_aOriginal = "";
+ m_aOriginal.clear();
m_bModifiedOriginal = true;
InitEditDictDialog( m_nCurrentDict );
}
@@ -1586,7 +1586,7 @@ namespace svx
if( m_nCurrentDict != _nSelDict )
{
m_nCurrentDict = _nSelDict;
- m_aOriginal = "";
+ m_aOriginal.clear();
m_bModifiedOriginal = true;
}
diff --git a/cui/source/dialogs/hldoctp.cxx b/cui/source/dialogs/hldoctp.cxx
index 3764ddc52d0d..086fd8d0d425 100644
--- a/cui/source/dialogs/hldoctp.cxx
+++ b/cui/source/dialogs/hldoctp.cxx
@@ -146,7 +146,7 @@ void SvxHyperlinkDocTp::GetCurentItemData ( OUString& rStrURL, OUString& aStrNam
rStrURL = GetCurrentURL();
if( rStrURL.equalsIgnoreAsciiCase( sFileScheme ) )
- rStrURL = "";
+ rStrURL.clear();
GetDataFromCommonFields( aStrName, aStrIntName, aStrFrame, eMode );
}
diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx
index 945c7b532b65..de10149a9e00 100644
--- a/cui/source/dialogs/hltpbase.cxx
+++ b/cui/source/dialogs/hltpbase.cxx
@@ -387,23 +387,23 @@ OUString SvxHyperlinkTabPageBase::GetSchemeFromURL( const OUString& rStrURL )
{
if ( rStrURL.startsWithIgnoreAsciiCase( INET_HTTP_SCHEME ) )
{
- aStrScheme = OUString( INET_HTTP_SCHEME );
+ aStrScheme = INET_HTTP_SCHEME;
}
else if ( rStrURL.startsWithIgnoreAsciiCase( INET_HTTPS_SCHEME ) )
{
- aStrScheme = OUString( INET_HTTPS_SCHEME );
+ aStrScheme = INET_HTTPS_SCHEME;
}
else if ( rStrURL.startsWithIgnoreAsciiCase( INET_FTP_SCHEME ) )
{
- aStrScheme = OUString( INET_FTP_SCHEME );
+ aStrScheme = INET_FTP_SCHEME;
}
else if ( rStrURL.startsWithIgnoreAsciiCase( INET_MAILTO_SCHEME ) )
{
- aStrScheme = OUString( INET_MAILTO_SCHEME );
+ aStrScheme = INET_MAILTO_SCHEME;
}
else if ( rStrURL.startsWithIgnoreAsciiCase( INET_NEWS_SCHEME ) )
{
- aStrScheme = OUString( INET_NEWS_SCHEME );
+ aStrScheme = INET_NEWS_SCHEME;
}
}
else
diff --git a/cui/source/dialogs/showcols.cxx b/cui/source/dialogs/showcols.cxx
index 1c87ff9609f5..94e286ecd92d 100644
--- a/cui/source/dialogs/showcols.cxx
+++ b/cui/source/dialogs/showcols.cxx
@@ -81,7 +81,7 @@ void FmShowColsDialog::SetColumns(const ::com::sun::star::uno::Reference< ::com:
OUString sCurName;
for (sal_uInt16 i=0; i<xCols->getCount(); ++i)
{
- sCurName = "";
+ sCurName.clear();
xCurCol.set(xCols->getByIndex(i), css::uno::UNO_QUERY);
bool bIsHidden = false;
try
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 28e0677ce7ac..39f5b24c9bb2 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -679,9 +679,9 @@ OfaViewTabPage::OfaViewTabPage(vcl::Window* pParent, const SfxItemSet& rSet)
OUString autoThemeId = aStyleSettings.GetAutomaticallyChosenIconTheme();
const vcl::IconThemeInfo& autoIconTheme = vcl::IconThemeInfo::FindIconThemeById(mInstalledIconThemes, autoThemeId);
- OUString entryForAuto = sAutoStr + OUString(" (") +
+ OUString entryForAuto = sAutoStr + " (" +
autoIconTheme.GetDisplayName() +
- OUString(")");
+ ")";
m_pIconStyleLB->InsertEntry(entryForAuto);
for (std::vector<vcl::IconThemeInfo>::const_iterator aI = mInstalledIconThemes.begin(); aI != mInstalledIconThemes.end(); ++aI) {
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index d1b3b5c3fb2c..e7cd019bc665 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -554,7 +554,7 @@ void SvxScriptExecListBox::RequestHelp( const HelpEvent& rHEvt )
if( nPos <= nTop+nCount-1 ) // if find the matching entry, get its content.
aHelpText = GetEntry(nPos);
if( aHelpText.getLength() && GetTextWidth(aHelpText)<GetOutputSizePixel().Width() )
- aHelpText = ""; // if the entry is quite short, clear the helping tip content.
+ aHelpText.clear(); // if the entry is quite short, clear the helping tip content.
aItemRect = Rectangle(Point(0,0),GetSizePixel());
aPt = Point(OutputToScreenPixel( aItemRect.TopLeft() ));
aItemRect.Left() = aPt.X();
diff --git a/cui/source/options/optopencl.cxx b/cui/source/options/optopencl.cxx
index 2c3e94ede87a..179edf85718f 100644
--- a/cui/source/options/optopencl.cxx
+++ b/cui/source/options/optopencl.cxx
@@ -164,7 +164,7 @@ ListEntryDialog::ListEntryDialog(vcl::Window* pParent, const OpenCLConfig::ImplM
get(mpDriverVersion, "driverversion");
// Hardcode knowledge that entry 0 is the "Any"
- if (maEntry.maOS == "")
+ if (maEntry.maOS.isEmpty())
{
mpOS->SelectEntryPos(0, false);
}
@@ -195,7 +195,7 @@ IMPL_LINK(ListEntryDialog, OSSelectHdl, ListBox*, pListBox)
if (pListBox == mpOS)
{
if (mpOS->GetSelectEntryPos() == 0)
- maEntry.maOS = "";
+ maEntry.maOS.clear();
else
maEntry.maOS = mpOS->GetEntry(mpOS->GetSelectEntryPos());
}
diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx
index c16535acd725..9ecb25296b31 100644
--- a/cui/source/options/optpath.cxx
+++ b/cui/source/options/optpath.cxx
@@ -567,8 +567,8 @@ IMPL_LINK_NOARG(SvxPathTabPage, PathHdl_Impl)
if ( pMultiDlg->Execute() == RET_OK && pEntry )
{
- sUser = "";
- sWritable = "";
+ sUser.clear();
+ sWritable.clear();
OUString sFullPath;
OUString sNewPath = pMultiDlg->GetPath();
char cDelim = MULTIPATH_DELIMITER;
diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index d5dc56120f18..3efe0099e5b8 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -449,9 +449,7 @@ void SfxSaveTabPage::Reset( const SfxItemSet* )
(void) e;
OSL_FAIL(
OUStringToOString(
- (OUString(
- "exception in FilterFactory access: ") +
- e.Message),
+ "exception in FilterFactory access: " + e.Message,
RTL_TEXTENCODING_UTF8).
getStr());
}
diff --git a/cui/source/options/personalization.cxx b/cui/source/options/personalization.cxx
index ff99b0f8a9d4..76f1e2a34343 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -250,7 +250,7 @@ void SelectPersonaDialog::AddPersonaSetting( OUString& rPersonaSetting )
void SelectPersonaDialog::ClearSearchResults()
{
m_vPersonaSettings.clear();
- m_aSelectedPersona = "";
+ m_aSelectedPersona.clear();
for( sal_Int32 nIndex = 0; nIndex < 9; nIndex++ )
{
m_vResultList[nIndex]->Disable();
@@ -321,7 +321,7 @@ bool SvxPersonalizationTabPage::FillItemSet( SfxItemSet * )
// write
boost::shared_ptr< comphelper::ConfigurationChanges > batch( comphelper::ConfigurationChanges::create() );
if( aPersona == "no" )
- m_aPersonaSettings = "";
+ m_aPersonaSettings.clear();
officecfg::Office::Common::Misc::Persona::set( aPersona, batch );
officecfg::Office::Common::Misc::PersonaSettings::set( m_aPersonaSettings, batch );
batch->commit();
@@ -638,7 +638,7 @@ void SearchAndParseThread::execute()
return;
SolarMutexGuard aGuard;
- sProgress = "";
+ sProgress.clear();
m_pPersonaDialog->SetProgress( sProgress );
m_pPersonaDialog->setOptimalLayoutSize();
}
diff --git a/cui/source/options/personasdochandler.cxx b/cui/source/options/personasdochandler.cxx
index 020b9fc170b3..9173aea8b550 100644
--- a/cui/source/options/personasdochandler.cxx
+++ b/cui/source/options/personasdochandler.cxx
@@ -62,7 +62,7 @@ PersonasDocHandler::startElement( const OUString& aName,
if( aName == "searchresults" )
{
OUString aTotalResults = xAttribs->getValueByName( "total_results" );
- if( !aTotalResults.equals( "0" ) )
+ if( aTotalResults != "0" )
m_hasResults = true;
}
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 8ad859529f54..c63dc2f35af0 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -2446,10 +2446,7 @@ void OfaSmartTagOptionsTabPage::FillListBox( const SmartTagMgr& rSmartTagMgr )
if ( aSmartTagCaption.isEmpty() )
aSmartTagCaption = aSmartTagType;
- const OUString aLBEntry = aSmartTagCaption +
- OUString(" (") +
- aName +
- OUString(")");
+ const OUString aLBEntry = aSmartTagCaption + " (" + aName + ")";
SvTreeListEntry* pEntry = m_pSmartTagTypesLB->SvTreeListBox::InsertEntry( aLBEntry );
if ( pEntry )
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 03fc1a7cc0a0..5c0c9ed7102c 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -1487,8 +1487,8 @@ IMPL_LINK( SvxBackgroundTabPage, LoadTimerHdl_Impl, Timer* , pTimer )
}
else
{
- aBgdGraphicFilter = "";
- aBgdGraphicPath = "";
+ aBgdGraphicFilter.clear();
+ aBgdGraphicPath.clear();
bIsGraphicValid = false;
}
}
@@ -1734,8 +1734,8 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr,
if ( m_pLbSelect->IsVisible() ) // initialize graphic part
{
- aBgdGraphicFilter = "";
- aBgdGraphicPath = "";
+ aBgdGraphicFilter.clear();
+ aBgdGraphicPath.clear();
if ( rUserData.isEmpty() )
m_pBtnPreview->Check( false );
@@ -1765,7 +1765,7 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr,
}
else
{
- aBgdGraphicPath = "";
+ aBgdGraphicPath.clear();
m_pBtnLink->Check( false );
m_pBtnLink->Disable();
}
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 61f8b3dd6ba6..bed3f4733d41 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -892,7 +892,7 @@ bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp
OUString aStyleBoxText =pStyleBox->GetText();
sal_Int32 nEntryPos = pStyleBox->GetEntryPos( aStyleBoxText );
if ( nEntryPos >= m_pImpl->m_nExtraEntryPos )
- aStyleBoxText = "";
+ aStyleBoxText.clear();
vcl::FontInfo aInfo( pFontList->Get( rFontName, aStyleBoxText ) );
SvxFontItem aFontItem( aInfo.GetFamily(), aInfo.GetName(), aInfo.GetStyleName(),
aInfo.GetPitch(), aInfo.GetCharSet(), nWhich );
diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index f129b4aba31c..efb9ec3c92b2 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -2077,7 +2077,7 @@ IMPL_LINK_NOARG(SvxAreaTabPage, ModifyBitmapHdl_Impl)
//UUUU
mbDirectGraphicSet = false;
maDirectGraphic.Clear();
- maDirectName = "";
+ maDirectName.clear();
const SfxPoolItem* pPoolItem = NULL;
sal_Int32 _nPos = m_pLbBitmap->GetSelectEntryPos();