summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-12-18 13:33:54 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-12-18 14:12:34 +0100
commit7c6aa647e83b4989fcaecd4a4d81361c06a3f3d4 (patch)
tree374f4b5c873861ec11c33ca3e144eef36dff0932
parentf79c92198775cac688774ace792b296647448781 (diff)
svtools: Use appropriate OUString functions on string constants
Change-Id: Ifa7ea9bf840cacb701dd4b5fb0904870bc3cf407
-rw-r--r--svtools/source/config/menuoptions.cxx8
-rw-r--r--svtools/source/contnr/contentenumeration.cxx2
-rw-r--r--svtools/source/contnr/fileview.cxx2
-rw-r--r--svtools/source/control/calendar.cxx2
-rw-r--r--svtools/source/control/inettbc.cxx2
-rw-r--r--svtools/source/control/vclxaccessibleheaderbaritem.cxx2
-rw-r--r--svtools/source/dialogs/ServerDetailsControls.cxx4
-rw-r--r--svtools/source/dialogs/addresstemplate.cxx4
-rw-r--r--svtools/source/filter/SvFilterOptionsDialog.cxx2
-rw-r--r--svtools/source/graphic/graphicunofactory.cxx2
-rw-r--r--svtools/source/graphic/grfmgr.cxx6
-rw-r--r--svtools/source/misc/embedtransfer.cxx2
-rw-r--r--svtools/source/misc/imap.cxx2
-rw-r--r--svtools/source/svhtml/htmlsupp.cxx8
-rw-r--r--svtools/source/svhtml/parhtml.cxx25
-rw-r--r--svtools/source/svrtf/parrtf.cxx2
-rw-r--r--svtools/source/svrtf/svparser.cxx2
-rw-r--r--svtools/source/uno/fpicker.cxx6
-rw-r--r--svtools/source/urlobj/inetimg.cxx4
19 files changed, 42 insertions, 45 deletions
diff --git a/svtools/source/config/menuoptions.cxx b/svtools/source/config/menuoptions.cxx
index e3efb512dee5..b1055eb7bdf2 100644
--- a/svtools/source/config/menuoptions.cxx
+++ b/svtools/source/config/menuoptions.cxx
@@ -44,10 +44,10 @@ using namespace ::com::sun::star::uno ;
#define DEFAULT_FOLLOWMOUSE true
#define DEFAULT_MENUICONS TRISTATE_INDET
-#define PROPERTYNAME_DONTHIDEDISABLEDENTRIES OUString("DontHideDisabledEntry" )
-#define PROPERTYNAME_FOLLOWMOUSE OUString("FollowMouse" )
-#define PROPERTYNAME_SHOWICONSINMENUES OUString("ShowIconsInMenues" )
-#define PROPERTYNAME_SYSTEMICONSINMENUES OUString("IsSystemIconsInMenus" )
+#define PROPERTYNAME_DONTHIDEDISABLEDENTRIES "DontHideDisabledEntry"
+#define PROPERTYNAME_FOLLOWMOUSE "FollowMouse"
+#define PROPERTYNAME_SHOWICONSINMENUES "ShowIconsInMenues"
+#define PROPERTYNAME_SYSTEMICONSINMENUES "IsSystemIconsInMenus"
#define PROPERTYHANDLE_DONTHIDEDISABLEDENTRIES 0
#define PROPERTYHANDLE_FOLLOWMOUSE 1
diff --git a/svtools/source/contnr/contentenumeration.cxx b/svtools/source/contnr/contentenumeration.cxx
index db9b9c8de25a..c47d8bcddf49 100644
--- a/svtools/source/contnr/contentenumeration.cxx
+++ b/svtools/source/contnr/contentenumeration.cxx
@@ -104,7 +104,7 @@ namespace svt
m_pResultHandler = NULL;
m_pTranslator = NULL;
m_aFolder.aContent = ::ucbhelper::Content();
- m_aFolder.sURL = "";
+ m_aFolder.sURL.clear();
}
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx
index 974ac7a20079..019a832e4bb2 100644
--- a/svtools/source/contnr/fileview.cxx
+++ b/svtools/source/contnr/fileview.cxx
@@ -645,7 +645,7 @@ IMPL_LINK_NOARG(ViewTabListBox_Impl, ResetQuickSearch_Impl)
{
::osl::MutexGuard aGuard( maMutex );
- maQuickSearchText = "";
+ maQuickSearchText.clear();
mnSearchIndex = 0;
return 0;
diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx
index 5ab89ee57e6a..45bd8aafe5ad 100644
--- a/svtools/source/control/calendar.cxx
+++ b/svtools/source/control/calendar.cxx
@@ -398,7 +398,7 @@ void Calendar::ImplFormat()
SetFont( aOldFont );
// Calculate DayOfWeekText (gets displayed in a narrow font)
- maDayOfWeekText = "";
+ maDayOfWeekText.clear();
long nStartOffX = 0;
sal_Int16 nDay = maCalendarWrapper.getFirstDayOfWeek();
for ( sal_Int16 nDayOfWeek = 0; nDayOfWeek < 7; nDayOfWeek++ )
diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx
index d125f3eed4bd..1670aae75604 100644
--- a/svtools/source/control/inettbc.cxx
+++ b/svtools/source/control/inettbc.cxx
@@ -1363,7 +1363,7 @@ bool SvtURLBox_Impl::TildeParsing(
}
aText = aParseTilde;
- aBaseURL = ""; // tilde provide absolute path
+ aBaseURL.clear(); // tilde provide absolute path
}
#endif
diff --git a/svtools/source/control/vclxaccessibleheaderbaritem.cxx b/svtools/source/control/vclxaccessibleheaderbaritem.cxx
index ca84d79d265c..80c566687ce4 100644
--- a/svtools/source/control/vclxaccessibleheaderbaritem.cxx
+++ b/svtools/source/control/vclxaccessibleheaderbaritem.cxx
@@ -139,7 +139,7 @@ sal_Bool VCLXAccessibleHeaderBarItem::supportsService( const OUString& rServiceN
Sequence< OUString > VCLXAccessibleHeaderBarItem::getSupportedServiceNames() throw (RuntimeException, std::exception)
{
Sequence< OUString > aNames(1);
- aNames[0] = OUString( "com.sun.star.awt.AccessibleHeaderBarItem" );
+ aNames[0] = "com.sun.star.awt.AccessibleHeaderBarItem";
return aNames;
}
diff --git a/svtools/source/dialogs/ServerDetailsControls.cxx b/svtools/source/dialogs/ServerDetailsControls.cxx
index 1c723565b778..71cec8c7b3ff 100644
--- a/svtools/source/dialogs/ServerDetailsControls.cxx
+++ b/svtools/source/dialogs/ServerDetailsControls.cxx
@@ -155,12 +155,12 @@ void DavDetailsContainer::show( bool bShow )
bool DavDetailsContainer::verifyScheme( const OUString& rScheme )
{
bool bValid = false;
- if ( rScheme.equals( "http://" ) )
+ if ( rScheme == "http://" )
{
bValid = true;
m_pCBDavs->Check( false );
}
- else if ( rScheme.equals( "https://" ) )
+ else if ( rScheme == "https://" )
{
bValid = true;
m_pCBDavs->Check( true );
diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx
index 3742e5c5999a..98c9277444ba 100644
--- a/svtools/source/dialogs/addresstemplate.cxx
+++ b/svtools/source/dialogs/addresstemplate.cxx
@@ -968,7 +968,7 @@ void AssignmentPersistentData::Commit()
)
if (!aAdjust->isEmpty())
if (aColumnNameSet.end() == aColumnNameSet.find(*aAdjust))
- (*aAdjust) = "";
+ aAdjust->clear();
}
@@ -982,7 +982,7 @@ void AssignmentPersistentData::Commit()
// update the array where we remember the field selections
if (0 == _pListbox->GetSelectEntryPos())
// it's the "no field selection" entry
- m_pImpl->aFieldAssignments[m_pImpl->nFieldScrollPos * 2 + nListBoxIndex] = "";
+ m_pImpl->aFieldAssignments[m_pImpl->nFieldScrollPos * 2 + nListBoxIndex].clear();
else
// it's a regular field entry
m_pImpl->aFieldAssignments[m_pImpl->nFieldScrollPos * 2 + nListBoxIndex] = _pListbox->GetSelectEntry();
diff --git a/svtools/source/filter/SvFilterOptionsDialog.cxx b/svtools/source/filter/SvFilterOptionsDialog.cxx
index f3321aa72b97..4c3425de2818 100644
--- a/svtools/source/filter/SvFilterOptionsDialog.cxx
+++ b/svtools/source/filter/SvFilterOptionsDialog.cxx
@@ -164,7 +164,7 @@ uno::Sequence< OUString > SAL_CALL SvFilterOptionsDialog::getSupportedServiceNam
{
uno::Sequence< OUString > aRet(1);
OUString* pArray = aRet.getArray();
- pArray[0] = OUString("com.sun.star.ui.dialog.FilterOptionsDialog");
+ pArray[0] = "com.sun.star.ui.dialog.FilterOptionsDialog";
return aRet;
}
diff --git a/svtools/source/graphic/graphicunofactory.cxx b/svtools/source/graphic/graphicunofactory.cxx
index 8240b5574e6e..478ae4974034 100644
--- a/svtools/source/graphic/graphicunofactory.cxx
+++ b/svtools/source/graphic/graphicunofactory.cxx
@@ -63,7 +63,7 @@ public:
{
uno::Sequence< OUString > aRet(1);
OUString* pArray = aRet.getArray();
- pArray[0] = OUString("com.sun.star.graphic.GraphicObject");
+ pArray[0] = "com.sun.star.graphic.GraphicObject";
return aRet;
}
};
diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx
index ec3c59bf0a6b..f680b1146231 100644
--- a/svtools/source/graphic/grfmgr.cxx
+++ b/svtools/source/graphic/grfmgr.cxx
@@ -414,7 +414,7 @@ void GraphicObject::SetAttr( const GraphicAttr& rAttr )
void GraphicObject::SetLink()
{
- maLink = "";
+ maLink.clear();
}
void GraphicObject::SetLink( const OUString& rLink )
@@ -424,7 +424,7 @@ void GraphicObject::SetLink( const OUString& rLink )
void GraphicObject::SetUserData()
{
- maUserData = "";
+ maUserData.clear();
}
void GraphicObject::SetUserData( const OUString& rUserData )
@@ -704,7 +704,7 @@ void GraphicObject::SetGraphic( const Graphic& rGraphic, const GraphicObject* pC
maGraphic = rGraphic;
mbAutoSwapped = false;
ImplAssignGraphicData();
- maLink = "";
+ maLink.clear();
delete mpSimpleCache, mpSimpleCache = NULL;
mpMgr->ImplRegisterObj( *this, maGraphic, 0, pCopyObj);
diff --git a/svtools/source/misc/embedtransfer.cxx b/svtools/source/misc/embedtransfer.cxx
index 7c99085e3070..da622b09a1ad 100644
--- a/svtools/source/misc/embedtransfer.cxx
+++ b/svtools/source/misc/embedtransfer.cxx
@@ -254,7 +254,7 @@ void SvEmbedTransferHelper::FillTransferableObjectDescriptor( TransferableObject
rDesc.maSize = OutputDevice::LogicToLogic( aSize, aMapMode, MapMode( MAP_100TH_MM ) );
rDesc.maDragStartPos = Point();
- rDesc.maDisplayName = "";
+ rDesc.maDisplayName.clear();
rDesc.mbCanLink = false;
}
diff --git a/svtools/source/misc/imap.cxx b/svtools/source/misc/imap.cxx
index 7be622f93786..3f687c2a51e6 100644
--- a/svtools/source/misc/imap.cxx
+++ b/svtools/source/misc/imap.cxx
@@ -633,7 +633,7 @@ void ImageMap::ClearImageMap()
delete maList[ i ];
maList.clear();
- aName = "";
+ aName.clear();
}
diff --git a/svtools/source/svhtml/htmlsupp.cxx b/svtools/source/svhtml/htmlsupp.cxx
index 7069e4e2a07e..8c4324b6cc89 100644
--- a/svtools/source/svhtml/htmlsupp.cxx
+++ b/svtools/source/svhtml/htmlsupp.cxx
@@ -44,11 +44,11 @@ bool HTMLParser::ParseScriptOptions( OUString& rLangString, const OUString& rBas
{
const HTMLOptions& aScriptOptions = GetOptions();
- rLangString = "";
+ rLangString.clear();
rLang = HTML_SL_JAVASCRIPT;
- rSrc = "";
- rLibrary = "";
- rModule = "";
+ rSrc.clear();
+ rLibrary.clear();
+ rModule.clear();
for( size_t i = aScriptOptions.size(); i; )
{
diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx
index 14d5c741c57e..ce9ba50e44f1 100644
--- a/svtools/source/svhtml/parhtml.cxx
+++ b/svtools/source/svhtml/parhtml.cxx
@@ -830,7 +830,7 @@ int HTMLParser::_GetNextRawToken()
// thus we don't have to search it again.
bReadScript = false;
bReadStyle = false;
- aEndToken = "";
+ aEndToken.clear();
bEndTokenFound = false;
return 0;
@@ -895,7 +895,7 @@ int HTMLParser::_GetNextRawToken()
// ">" is optional for security reasons
bDone = bOffState &&
( bReadScript
- ? aTok.equals(OOO_STRING_SVTOOLS_HTML_script)
+ ? aTok == OOO_STRING_SVTOOLS_HTML_script
: aTok.equals(aEndToken) );
}
}
@@ -909,11 +909,10 @@ int HTMLParser::_GetNextRawToken()
{
// Style sheets can be closed by </STYLE>, </HEAD> or <BODY>
if( bOffState )
- bDone = aTok.equals(OOO_STRING_SVTOOLS_HTML_style) ||
- aTok.equals(OOO_STRING_SVTOOLS_HTML_head);
+ bDone = aTok == OOO_STRING_SVTOOLS_HTML_style ||
+ aTok == OOO_STRING_SVTOOLS_HTML_head;
else
- bDone =
- aTok.equals(OOO_STRING_SVTOOLS_HTML_body);
+ bDone = aTok == OOO_STRING_SVTOOLS_HTML_body;
}
if( bDone )
@@ -930,7 +929,7 @@ int HTMLParser::_GetNextRawToken()
// and parse the end token
bReadScript = false;
bReadStyle = false;
- aEndToken = "";
+ aEndToken.clear();
nToken = 0;
}
else
@@ -1010,7 +1009,7 @@ int HTMLParser::_GetNextRawToken()
{
bReadScript = false;
bReadStyle = false;
- aEndToken = "";
+ aEndToken.clear();
nToken = 0;
}
break;
@@ -1042,14 +1041,14 @@ int HTMLParser::_GetNextRawToken()
int HTMLParser::_GetNextToken()
{
int nRet = 0;
- sSaveToken = "";
+ sSaveToken.clear();
if (mnPendingOffToken)
{
// HTML_<TOKEN>_OFF generated for HTML_<TOKEN>_ON
nRet = mnPendingOffToken;
mnPendingOffToken = 0;
- aToken = "";
+ aToken.clear();
return nRet;
}
@@ -1189,7 +1188,7 @@ int HTMLParser::_GetNextToken()
else
{
// TokenString not needed anymore
- aToken = "";
+ aToken.clear();
}
// Read until closing '>'
@@ -1248,7 +1247,7 @@ int HTMLParser::_GetNextToken()
}
if( SVPAR_PENDING == eState )
bReadNextChar = bReadNextCharSave;
- aToken = "";
+ aToken.clear();
}
else if( '%' == nNextCh )
{
@@ -1281,7 +1280,7 @@ int HTMLParser::_GetNextToken()
if( IsParserWorking() )
{
sSaveToken = aToken;
- aToken = "";
+ aToken.clear();
}
}
else
diff --git a/svtools/source/svrtf/parrtf.cxx b/svtools/source/svrtf/parrtf.cxx
index 49a612eec01c..b15aca721ecf 100644
--- a/svtools/source/svrtf/parrtf.cxx
+++ b/svtools/source/svrtf/parrtf.cxx
@@ -163,7 +163,7 @@ int SvRTFParser::_GetNextToken()
aParserStates.top().
nUCharOverread = nUCharOverread;
}
- aToken = ""; // #i47831# erase token to prevent the token from being treated as text
+ aToken.clear(); // #i47831# erase token to prevent the token from being treated as text
// read next token
nRet = 0;
break;
diff --git a/svtools/source/svrtf/svparser.cxx b/svtools/source/svrtf/svparser.cxx
index d8c5aea9f27f..736e0ef8cf76 100644
--- a/svtools/source/svrtf/svparser.cxx
+++ b/svtools/source/svrtf/svparser.cxx
@@ -414,7 +414,7 @@ int SvParser::GetNextToken()
if( !nTokenStackPos )
{
- aToken = ""; // empty token buffer
+ aToken.clear(); // empty token buffer
nTokenValue = -1; // marker for no value read
bTokenHasValue = false;
diff --git a/svtools/source/uno/fpicker.cxx b/svtools/source/uno/fpicker.cxx
index 3dd1d8de0510..f31a060a9529 100644
--- a/svtools/source/uno/fpicker.cxx
+++ b/svtools/source/uno/fpicker.cxx
@@ -107,8 +107,7 @@ OUString SAL_CALL FilePicker_getImplementationName()
Sequence< OUString > FilePicker_getSupportedServiceNames()
{
Sequence< OUString > aServiceNames(1);
- aServiceNames.getArray()[0] =
- OUString( "com.sun.star.ui.dialogs.FilePicker");
+ aServiceNames.getArray()[0] = "com.sun.star.ui.dialogs.FilePicker";
return aServiceNames;
}
@@ -178,8 +177,7 @@ OUString SAL_CALL FolderPicker_getImplementationName()
Sequence< OUString > FolderPicker_getSupportedServiceNames()
{
Sequence< OUString > aServiceNames(1);
- aServiceNames.getArray()[0] =
- OUString( "com.sun.star.ui.dialogs.FolderPicker");
+ aServiceNames.getArray()[0] = "com.sun.star.ui.dialogs.FolderPicker";
return aServiceNames;
}
diff --git a/svtools/source/urlobj/inetimg.cxx b/svtools/source/urlobj/inetimg.cxx
index 582136bf1c85..0ed6198e5e60 100644
--- a/svtools/source/urlobj/inetimg.cxx
+++ b/svtools/source/urlobj/inetimg.cxx
@@ -117,7 +117,7 @@ bool INetImage::Read( SvStream& rIStm, sal_uLong nFormat )
aAlternateText = read_zeroTerminated_uInt8s_ToOUString(rIStm, eSysCSet);
}
else if( !aAlternateText.isEmpty() )
- aAlternateText = "";
+ aAlternateText.clear();
if( nAnchorOffset )
{
@@ -125,7 +125,7 @@ bool INetImage::Read( SvStream& rIStm, sal_uLong nFormat )
aTargetURL = read_zeroTerminated_uInt8s_ToOUString(rIStm, eSysCSet);
}
else if( !aTargetURL.isEmpty() )
- aTargetURL = "";
+ aTargetURL.clear();
bRet = 0 == rIStm.GetError();
}