summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-04-01 08:40:44 +0300
committerTor Lillqvist <tml@collabora.com>2014-04-01 12:14:45 +0300
commitb6dbe2be875d181d4d926ba95e52820d7d0d6240 (patch)
tree134e4d88cd1a1645342ebd261fc22487477da5f2
parent5ce92b73ce06c805c66e53c48aa2c70c722aaf60 (diff)
Bin pointless INET_PATH_TOKEN
There is nothing mnemonic in the name 'INET_PATH_TOKEN' that would tell the code reader that it simply means '/'. Change-Id: I89ce72e8be5cf0ef2c66b23ad6e721ad49105648
-rw-r--r--fpicker/source/office/iodlg.cxx4
-rw-r--r--include/tools/urlobj.hxx1
-rw-r--r--svtools/source/misc/imagemgr.cxx8
-rw-r--r--sw/source/core/doc/tblafmt.cxx2
-rw-r--r--sw/source/core/uibase/config/uinums.cxx4
-rw-r--r--sw/source/core/uibase/misc/glosdoc.cxx2
-rw-r--r--sw/source/core/uibase/uno/unomailmerge.cxx2
-rw-r--r--sw/source/core/uibase/utlui/gloslst.cxx2
-rw-r--r--sw/source/ui/envelp/mailmrge.cxx5
-rw-r--r--sw/source/ui/misc/glosbib.cxx2
-rw-r--r--sw/source/ui/misc/glossary.cxx2
11 files changed, 15 insertions, 19 deletions
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index 7e3184fc3a1a..dbd0e6a80c98 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -2165,7 +2165,7 @@ short SvtFileDialog::PrepareExecute()
OUString aFileName( aFolderURL.getName( INetURLObject::LAST_SEGMENT, false ) );
sal_Int32 nFileNameLen = aFileName.getLength();
bool bFileToSelect = nFileNameLen != 0;
- if ( bFileToSelect && aFileName[ nFileNameLen - 1 ] != INET_PATH_TOKEN )
+ if ( bFileToSelect && aFileName[ nFileNameLen - 1 ] != '/' )
{
_pImp->_pEdFileName->SetText( GET_DECODED_NAME( aFolderURL ) );
aFolderURL.removeSegment();
@@ -2507,7 +2507,7 @@ sal_Bool SvtFileDialog::IsolateFilterFromPath_Impl( OUString& rPath, OUString& r
if ( nWildCardPos != -1 )
{
- sal_Int32 nPathTokenPos = aReversePath.indexOf( INET_PATH_TOKEN );
+ sal_Int32 nPathTokenPos = aReversePath.indexOf( '/' );
if ( nPathTokenPos == -1 )
{
diff --git a/include/tools/urlobj.hxx b/include/tools/urlobj.hxx
index 88b8ecd20caa..0902372d6f9b 100644
--- a/include/tools/urlobj.hxx
+++ b/include/tools/urlobj.hxx
@@ -31,7 +31,6 @@ namespace com { namespace sun { namespace star { namespace util {
} } } }
// Special tokens:
-#define INET_PATH_TOKEN '/'
#define INET_MARK_TOKEN '#'
#define INET_HEX_ESCAPE '%'
diff --git a/svtools/source/misc/imagemgr.cxx b/svtools/source/misc/imagemgr.cxx
index 3e01565a92aa..06c78f557962 100644
--- a/svtools/source/misc/imagemgr.cxx
+++ b/svtools/source/misc/imagemgr.cxx
@@ -359,7 +359,7 @@ static sal_uInt16 GetImageId_Impl( const INetURLObject& rObject, bool bDetectFol
if ( rObject.GetProtocol() == INET_PROT_PRIVATE )
{
OUString aURLPath = sURL.copy( URL_PREFIX_PRIV_SOFFICE_LEN );
- OUString aType = aURLPath.getToken( 0, INET_PATH_TOKEN );
+ OUString aType = aURLPath.getToken( 0, '/' );
if ( aType == "factory" )
{
// detect an image id for our "private:factory" urls
@@ -369,7 +369,7 @@ static sal_uInt16 GetImageId_Impl( const INetURLObject& rObject, bool bDetectFol
return nImage;
}
else if ( aType == "image" )
- nImage = (sal_uInt16)aURLPath.getToken( 1, INET_PATH_TOKEN ).toInt32();
+ nImage = (sal_uInt16)aURLPath.getToken( 1, '/' ).toInt32();
}
else
{
@@ -530,10 +530,10 @@ OUString SvFileInformationManager::GetDescription_Impl( const INetURLObject& rOb
if ( rObject.GetProtocol() == INET_PROT_PRIVATE )
{
OUString aURLPath = sURL.copy( URL_PREFIX_PRIV_SOFFICE_LEN );
- OUString aType = aURLPath.getToken( 0, INET_PATH_TOKEN );
+ OUString aType = aURLPath.getToken( 0, '/' );
if ( aType == "factory" )
{
- sDescription = GetDescriptionByFactory_Impl( aURLPath.copy( aURLPath.indexOf( INET_PATH_TOKEN ) + 1 ) );
+ sDescription = GetDescriptionByFactory_Impl( aURLPath.copy( aURLPath.indexOf( '/' ) + 1 ) );
bDetected = true;
}
}
diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx
index be9b1f1ee9d2..0dedd8b1eece 100644
--- a/sw/source/core/doc/tblafmt.cxx
+++ b/sw/source/core/doc/tblafmt.cxx
@@ -1118,7 +1118,7 @@ sal_Bool SwTableAutoFmtTbl::Load()
sal_Bool SwTableAutoFmtTbl::Save() const
{
SvtPathOptions aPathOpt;
- const OUString sNm( aPathOpt.GetUserConfigPath() + OUString(INET_PATH_TOKEN) + AUTOTABLE_FORMAT_NAME );
+ const OUString sNm( aPathOpt.GetUserConfigPath() + "/" + AUTOTABLE_FORMAT_NAME );
SfxMedium aStream(sNm, STREAM_STD_WRITE );
return Save( *aStream.GetOutStream() ) && aStream.Commit();
}
diff --git a/sw/source/core/uibase/config/uinums.cxx b/sw/source/core/uibase/config/uinums.cxx
index 8871d2b15bc7..c2157f672c68 100644
--- a/sw/source/core/uibase/config/uinums.cxx
+++ b/sw/source/core/uibase/config/uinums.cxx
@@ -70,9 +70,7 @@ SwBaseNumRules::~SwBaseNumRules()
if( bModified )
{
SvtPathOptions aPathOpt;
- OUString sNm( aPathOpt.GetUserConfigPath() );
- sNm += OUString(INET_PATH_TOKEN);
- sNm += sFileName;
+ OUString sNm( aPathOpt.GetUserConfigPath() + "/" + sFileName );
INetURLObject aTempObj(sNm);
sNm = aTempObj.GetFull();
SfxMedium aStrm( sNm, STREAM_WRITE | STREAM_TRUNC |
diff --git a/sw/source/core/uibase/misc/glosdoc.cxx b/sw/source/core/uibase/misc/glosdoc.cxx
index 575e17a9a1ce..66d019846420 100644
--- a/sw/source/core/uibase/misc/glosdoc.cxx
+++ b/sw/source/core/uibase/misc/glosdoc.cxx
@@ -52,7 +52,7 @@ namespace
inline OUString lcl_FullPathName(const OUString& sPath, const OUString& sName)
{
- return sPath + OUString(INET_PATH_TOKEN) + sName + SwGlossaries::GetExtension();
+ return sPath + "/" + sName + SwGlossaries::GetExtension();
}
OUString lcl_CheckFileName( const OUString& rNewFilePath,
diff --git a/sw/source/core/uibase/uno/unomailmerge.cxx b/sw/source/core/uibase/uno/unomailmerge.cxx
index cc4923d2f8d9..b51659449cb5 100644
--- a/sw/source/core/uibase/uno/unomailmerge.cxx
+++ b/sw/source/core/uibase/uno/unomailmerge.cxx
@@ -723,7 +723,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
aURLObj.SetSmartURL( aCurOutputURL );
OUString aPath = aURLObj.GetMainURL( INetURLObject::DECODE_TO_IURI );
- const OUString aDelim = OUString(INET_PATH_TOKEN);
+ const OUString aDelim( "/" );
if (!aPath.isEmpty() && !aPath.endsWith(aDelim))
aPath += aDelim;
if (bCurFileNameFromColumn)
diff --git a/sw/source/core/uibase/utlui/gloslst.cxx b/sw/source/core/uibase/utlui/gloslst.cxx
index 518a1ed02b5d..0e54a573e8c0 100644
--- a/sw/source/core/uibase/utlui/gloslst.cxx
+++ b/sw/source/core/uibase/utlui/gloslst.cxx
@@ -261,7 +261,7 @@ void SwGlossaryList::Update()
pGroup->sName = sGrpName;
FillGroup(pGroup, pGlossaries);
- OUString sName = rPathArr[nPath] + OUString(INET_PATH_TOKEN) +
+ OUString sName = rPathArr[nPath] + "/" +
pGroup->sName.getToken(0, GLOS_DELIM) + sExt;
FStatHelper::GetModifiedDateTimeOfFile( sName,
&pGroup->aDateModified,
diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx
index 8f9be8ac2067..5fa938f1bc1c 100644
--- a/sw/source/ui/envelp/mailmrge.cxx
+++ b/sw/source/ui/envelp/mailmrge.cxx
@@ -664,9 +664,8 @@ bool SwMailMergeDlg::ExecQryShell()
aAbs, aPathED.GetText(), URIHelper::GetMaybeFileHdl()));
pModOpt->SetMailingPath(sPath);
- const OUString sDelim(INET_PATH_TOKEN);
- if (!sPath.endsWith(sDelim))
- sPath += sDelim;
+ if (!sPath.endsWith("/"))
+ sPath += "/";
pModOpt->SetIsNameFromColumn(aGenerateFromDataBaseCB.IsChecked());
diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx
index 216d33519e26..6015164d6daa 100644
--- a/sw/source/ui/misc/glosbib.cxx
+++ b/sw/source/ui/misc/glosbib.cxx
@@ -419,7 +419,7 @@ void SwGlossaryGroupTLB::RequestHelp( const HelpEvent& rHEvt )
aPos = OutputToScreenPixel(aPos);
Rectangle aItemRect( aPos, aSize );
GlosBibUserData* pData = (GlosBibUserData*)pEntry->GetUserData();
- const OUString sMsg = pData->sPath + OUString(INET_PATH_TOKEN)
+ const OUString sMsg = pData->sPath + "/"
+ pData->sGroupName.getToken(0, GLOS_DELIM)
+ SwGlossaries::GetExtension();
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index eedcf5118dc0..098983600a5c 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -878,7 +878,7 @@ void SwGlTreeListBox::RequestHelp( const HelpEvent& rHEvt )
if( !rPathArr.empty() )
{
INetURLObject aTmp(rPathArr[pData->nPathIdx]
- + OUString(INET_PATH_TOKEN)
+ + "/"
+ pData->sGroupName
+ SwGlossaries::GetExtension());
sMsg = aTmp.GetPath();