summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-04-01 08:48:58 +0300
committerTor Lillqvist <tml@collabora.com>2014-04-01 12:14:45 +0300
commitfe41e4ba11f66d247ca4b09563c3ea21728fa410 (patch)
tree6d99b24d8bb32e4924cf1889986c17552d629ba6
parenta401d9356e4ab3d8349b5a737a1f7e78f05f3f7e (diff)
Bin pointless INET_HEX_ESCAPE
Change-Id: I72238e511c2fca4a4aba0be60b0f2d3b1f46e5c2
-rw-r--r--cui/source/dialogs/linkdlg.cxx4
-rw-r--r--include/tools/urlobj.hxx3
-rw-r--r--sc/source/core/tool/compiler.cxx4
-rw-r--r--sc/source/ui/view/gridwin5.cxx2
-rw-r--r--sc/source/ui/view/tabvwsh3.cxx2
-rw-r--r--sfx2/source/appl/macroloader.cxx6
-rw-r--r--sfx2/source/doc/objmisc.cxx2
-rw-r--r--sfx2/source/notify/eventsupplier.cxx2
-rw-r--r--sw/source/core/doc/docdde.cxx2
-rw-r--r--sw/source/core/text/EnhancedPDFExportHelper.cxx2
-rw-r--r--sw/source/core/uibase/dbui/dbmgr.cxx2
-rw-r--r--sw/source/core/uibase/shells/grfsh.cxx2
-rw-r--r--sw/source/core/uibase/uiview/view2.cxx2
-rw-r--r--sw/source/core/uibase/utlui/content.cxx6
-rw-r--r--sw/source/filter/html/htmlgrin.cxx2
-rw-r--r--sw/source/ui/chrdlg/chardlg.cxx2
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx6
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx4
-rw-r--r--sw/source/ui/index/cnttab.cxx2
19 files changed, 27 insertions, 30 deletions
diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx
index fa7ecfe9ba4a..74ac8ecc56eb 100644
--- a/cui/source/dialogs/linkdlg.cxx
+++ b/cui/source/dialogs/linkdlg.cxx
@@ -225,7 +225,7 @@ IMPL_LINK( SvBaseLinksDlg, LinksSelectHdl, SvTabListBox *, pSvTabListBox )
OUString aFileName;
pLinkMgr->GetDisplayNames( pLink, &sType, &aFileName, pLinkNm, pFilter );
- aFileName = INetURLObject::decode(aFileName, INET_HEX_ESCAPE, INetURLObject::DECODE_UNAMBIGUOUS);
+ aFileName = INetURLObject::decode(aFileName, '%', INetURLObject::DECODE_UNAMBIGUOUS);
FileName().SetText( aFileName );
SourceName().SetText( sLink );
TypeName().SetText( sType );
@@ -640,7 +640,7 @@ void SvBaseLinksDlg::InsertEntry( const SvBaseLink& rLink, sal_uLong nPos, sal_B
OUString aTxt = Links().GetEllipsisString( sFileNm, nWidthPixel, TEXT_DRAW_PATHELLIPSIS );
INetURLObject aPath( sFileNm, INET_PROT_FILE );
OUString aFileName = aPath.getName();
- aFileName = INetURLObject::decode(aFileName, INET_HEX_ESCAPE, INetURLObject::DECODE_UNAMBIGUOUS);
+ aFileName = INetURLObject::decode(aFileName, '%', INetURLObject::DECODE_UNAMBIGUOUS);
if( aFileName.getLength() > aTxt.getLength() )
aTxt = aFileName;
diff --git a/include/tools/urlobj.hxx b/include/tools/urlobj.hxx
index d400d5182493..53027c880e6b 100644
--- a/include/tools/urlobj.hxx
+++ b/include/tools/urlobj.hxx
@@ -30,9 +30,6 @@ namespace com { namespace sun { namespace star { namespace util {
class XStringWidth;
} } } }
-// Special tokens:
-#define INET_HEX_ESCAPE '%'
-
// Common URL prefixes for various schemes:
#define INET_FTP_SCHEME "ftp://"
#define INET_HTTP_SCHEME "http://"
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 871d9c535414..5d13c4914195 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -839,7 +839,7 @@ struct ConventionOOO_A1 : public Convention_A1
if (bEncodeUrl)
aFile = rFileName;
else
- aFile = INetURLObject::decode(rFileName, INET_HEX_ESCAPE, INetURLObject::DECODE_UNAMBIGUOUS);
+ aFile = INetURLObject::decode(rFileName, '%', INetURLObject::DECODE_UNAMBIGUOUS);
rBuffer.append("'" + aFile.replaceAll("'", "''") + "'#");
@@ -1069,7 +1069,7 @@ struct ConventionXL
if (bEncodeUrl)
aFullName = rFullName;
else
- aFullName = INetURLObject::decode(rFullName, INET_HEX_ESCAPE, INetURLObject::DECODE_UNAMBIGUOUS);
+ aFullName = INetURLObject::decode(rFullName, '%', INetURLObject::DECODE_UNAMBIGUOUS);
const sal_Unicode* pBuf = aFullName.getStr();
sal_Int32 nLen = aFullName.getLength();
diff --git a/sc/source/ui/view/gridwin5.cxx b/sc/source/ui/view/gridwin5.cxx
index 905f5ea830df..b35783c0e397 100644
--- a/sc/source/ui/view/gridwin5.cxx
+++ b/sc/source/ui/view/gridwin5.cxx
@@ -371,7 +371,7 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt)
OUString aUrl;
if ( GetEditUrl( aPosPixel, NULL, &aUrl, NULL ) )
{
- aHelpText = INetURLObject::decode( aUrl, INET_HEX_ESCAPE,
+ aHelpText = INetURLObject::decode( aUrl, '%',
INetURLObject::DECODE_UNAMBIGUOUS );
if( bCtrlClickHlink )
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index d8d482738f3b..cabe51135f86 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -247,7 +247,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
if ( nSlot == SID_JUMPTOMARK )
{
// URL has to be decoded for escaped characters (%20)
- aAddress = INetURLObject::decode( aAddress, INET_HEX_ESCAPE,
+ aAddress = INetURLObject::decode( aAddress, '%',
INetURLObject::DECODE_WITH_CHARSET,
RTL_TEXTENCODING_UTF8 );
}
diff --git a/sfx2/source/appl/macroloader.cxx b/sfx2/source/appl/macroloader.cxx
index 81afe1f76407..3560779e0794 100644
--- a/sfx2/source/appl/macroloader.cxx
+++ b/sfx2/source/appl/macroloader.cxx
@@ -216,7 +216,7 @@ ErrCode SfxMacroLoader::loadMacro( const OUString& rURL, com::sun::star::uno::An
{
// find BasicManager
SfxObjectShell* pDoc = NULL;
- OUString aBasMgrName( INetURLObject::decode(aMacro.copy( 8, nHashPos-8 ), INET_HEX_ESCAPE, INetURLObject::DECODE_WITH_CHARSET) );
+ OUString aBasMgrName( INetURLObject::decode(aMacro.copy( 8, nHashPos-8 ), '%', INetURLObject::DECODE_WITH_CHARSET) );
if ( aBasMgrName.isEmpty() )
pBasMgr = pAppMgr;
else if ( aBasMgrName == "." )
@@ -253,7 +253,7 @@ ErrCode SfxMacroLoader::loadMacro( const OUString& rURL, com::sun::star::uno::An
}
// find BASIC method
- OUString aQualifiedMethod( INetURLObject::decode(aMacro.copy( nHashPos+1 ), INET_HEX_ESCAPE, INetURLObject::DECODE_WITH_CHARSET) );
+ OUString aQualifiedMethod( INetURLObject::decode(aMacro.copy( nHashPos+1 ), '%', INetURLObject::DECODE_WITH_CHARSET) );
OUString aArgs;
if ( -1 != nArgsPos )
{
@@ -316,7 +316,7 @@ ErrCode SfxMacroLoader::loadMacro( const OUString& rURL, com::sun::star::uno::An
{
// direct API call on a specified object
OUStringBuffer aCall;
- aCall.append('[').append(INetURLObject::decode(aMacro.copy(6), INET_HEX_ESCAPE,
+ aCall.append('[').append(INetURLObject::decode(aMacro.copy(6), '%',
INetURLObject::DECODE_WITH_CHARSET));
aCall.append(']');
pAppMgr->GetLib(0)->Execute(aCall.makeStringAndClear());
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index c33915591764..46f0c21a174f 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -919,7 +919,7 @@ OUString SfxObjectShell::GetTitle
else if ( nMaxLength == SFX_TITLE_FILENAME )
{
OUString aName( aURL.GetBase() );
- aName = INetURLObject::decode( aName, INET_HEX_ESCAPE, INetURLObject::DECODE_WITH_CHARSET );
+ aName = INetURLObject::decode( aName, '%', INetURLObject::DECODE_WITH_CHARSET );
if( aName.isEmpty() )
aName = aURL.GetURLNoPass();
return X(aName);
diff --git a/sfx2/source/notify/eventsupplier.cxx b/sfx2/source/notify/eventsupplier.cxx
index 7dbf539cea8b..6d92c0e3f231 100644
--- a/sfx2/source/notify/eventsupplier.cxx
+++ b/sfx2/source/notify/eventsupplier.cxx
@@ -444,7 +444,7 @@ void SfxEvents_Impl::NormalizeMacro( const ::comphelper::NamedValueCollection& i
sal_Int32 nArgsPos = aScript.indexOf( '(' );
if ( ( nHashPos != -1 ) && ( nArgsPos == -1 || nHashPos < nArgsPos ) )
{
- OUString aBasMgrName( INetURLObject::decode( aScript.copy( 8, nHashPos-8 ), INET_HEX_ESCAPE, INetURLObject::DECODE_WITH_CHARSET ) );
+ OUString aBasMgrName( INetURLObject::decode( aScript.copy( 8, nHashPos-8 ), '%', INetURLObject::DECODE_WITH_CHARSET ) );
if ( aBasMgrName == "." )
aLibrary = pDoc->GetTitle();
else
diff --git a/sw/source/core/doc/docdde.cxx b/sw/source/core/doc/docdde.cxx
index 927699ec55b9..05f40aee65d8 100644
--- a/sw/source/core/doc/docdde.cxx
+++ b/sw/source/core/doc/docdde.cxx
@@ -291,7 +291,7 @@ bool SwDoc::SelectServerObj( const OUString& rStr, SwPaM*& rpPam,
rpPam = 0;
rpRange = 0;
- OUString sItem( INetURLObject::decode( rStr, INET_HEX_ESCAPE,
+ OUString sItem( INetURLObject::decode( rStr, '%',
INetURLObject::DECODE_WITH_CHARSET,
RTL_TEXTENCODING_UTF8 ));
diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx
index bacbbd779071..57047c91ae7e 100644
--- a/sw/source/core/text/EnhancedPDFExportHelper.cxx
+++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx
@@ -1659,7 +1659,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
// than one link to this destination:
OUString aURL( INetURLObject::decode(
p->rINetAttr.GetINetFmt().GetValue(),
- INET_HEX_ESCAPE,
+ '%',
INetURLObject::DECODE_UNAMBIGUOUS,
RTL_TEXTENCODING_UTF8 ) );
diff --git a/sw/source/core/uibase/dbui/dbmgr.cxx b/sw/source/core/uibase/dbui/dbmgr.cxx
index 21eb9e2c1e69..057aeeb99633 100644
--- a/sw/source/core/uibase/dbui/dbmgr.cxx
+++ b/sw/source/core/uibase/dbui/dbmgr.cxx
@@ -2298,7 +2298,7 @@ OUString SwNewDBMgr::LoadAndRegisterDataSource()
Reference<XDatabaseContext> xDBContext = DatabaseContext::create(xContext);
OUString sNewName = INetURLObject::decode( aURL.getName(),
- INET_HEX_ESCAPE,
+ '%',
INetURLObject::DECODE_UNAMBIGUOUS,
RTL_TEXTENCODING_UTF8 );
sal_Int32 nExtLen = aURL.GetExtension().getLength();
diff --git a/sw/source/core/uibase/shells/grfsh.cxx b/sw/source/core/uibase/shells/grfsh.cxx
index eb5c5ca877d4..5538251c3fdd 100644
--- a/sw/source/core/uibase/shells/grfsh.cxx
+++ b/sw/source/core/uibase/shells/grfsh.cxx
@@ -271,7 +271,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
if( !sGrfNm.isEmpty() )
{
aSet.Put( SvxBrushItem( INetURLObject::decode( sGrfNm,
- INET_HEX_ESCAPE,
+ '%',
INetURLObject::DECODE_UNAMBIGUOUS,
RTL_TEXTENCODING_UTF8 ),
sFilterNm, GPOS_LT,
diff --git a/sw/source/core/uibase/uiview/view2.cxx b/sw/source/core/uibase/uiview/view2.cxx
index 1fcf58a21c77..ccfd4f7d7fbf 100644
--- a/sw/source/core/uibase/uiview/view2.cxx
+++ b/sw/source/core/uibase/uiview/view2.cxx
@@ -1918,7 +1918,7 @@ bool SwView::JumpToSwMark( const OUString& rMark )
const SwFmtINetFmt* pINet;
OUString sCmp;
- OUString sMark( INetURLObject::decode( rMark, INET_HEX_ESCAPE,
+ OUString sMark( INetURLObject::decode( rMark, '%',
INetURLObject::DECODE_WITH_CHARSET,
RTL_TEXTENCODING_UTF8 ));
diff --git a/sw/source/core/uibase/utlui/content.cxx b/sw/source/core/uibase/utlui/content.cxx
index c30f98789926..2fa15b568f90 100644
--- a/sw/source/core/uibase/utlui/content.cxx
+++ b/sw/source/core/uibase/utlui/content.cxx
@@ -363,7 +363,7 @@ void SwContentType::Init(sal_Bool* pbInvalidateWindow)
p->sText,
INetURLObject::decode(
p->rINetAttr.GetINetFmt().GetValue(),
- INET_HEX_ESCAPE,
+ '%',
INetURLObject::DECODE_UNAMBIGUOUS,
RTL_TEXTENCODING_UTF8 ),
&p->rINetAttr,
@@ -566,7 +566,7 @@ void SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibilityChanged)
OUString sLink;
pWrtShell->GetGrfNms( &sLink, 0, (SwFlyFrmFmt*) pFrmFmt);
pCnt = new SwGraphicContent(this, sFrmName,
- INetURLObject::decode( sLink, INET_HEX_ESCAPE,
+ INetURLObject::decode( sLink, '%',
INetURLObject::DECODE_UNAMBIGUOUS,
RTL_TEXTENCODING_UTF8 ),
pFrmFmt->FindLayoutRect(sal_False, &aNullPt).Top());
@@ -668,7 +668,7 @@ void SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibilityChanged)
p->sText,
INetURLObject::decode(
p->rINetAttr.GetINetFmt().GetValue(),
- INET_HEX_ESCAPE,
+ '%',
INetURLObject::DECODE_UNAMBIGUOUS,
RTL_TEXTENCODING_UTF8 ),
&p->rINetAttr,
diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx
index 4a3f1799fa1d..8dfb212dc982 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -1138,7 +1138,7 @@ ANCHOR_SETEVENT:
// wir hier ganz rigoros raus.
if( !aName.isEmpty() )
{
- OUString sDecoded( INetURLObject::decode( aName, INET_HEX_ESCAPE,
+ OUString sDecoded( INetURLObject::decode( aName, '%',
INetURLObject::DECODE_UNAMBIGUOUS,
RTL_TEXTENCODING_UTF8 ));
sal_Int32 nPos = sDecoded.lastIndexOf( cMarkSeparator );
diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx
index 50012a53572c..454440b40261 100644
--- a/sw/source/ui/chrdlg/chardlg.cxx
+++ b/sw/source/ui/chrdlg/chardlg.cxx
@@ -198,7 +198,7 @@ void SwCharURLPage::Reset(const SfxItemSet& rSet)
{
const SwFmtINetFmt* pINetFmt = (const SwFmtINetFmt*) pItem;
m_pURLED->SetText(INetURLObject::decode(pINetFmt->GetValue(),
- INET_HEX_ESCAPE, INetURLObject::DECODE_UNAMBIGUOUS,
+ '%', INetURLObject::DECODE_UNAMBIGUOUS,
RTL_TEXTENCODING_UTF8));
m_pURLED->SaveValue();
m_pURLED->SetText(pINetFmt->GetName());
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index 24e563093902..fc7af67f8f25 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -208,7 +208,7 @@ SectRepr::SectRepr( sal_uInt16 nPos, SwSection& rSect )
void SectRepr::SetFile( const OUString& rFile )
{
- OUString sNewFile( INetURLObject::decode( rFile, INET_HEX_ESCAPE,
+ OUString sNewFile( INetURLObject::decode( rFile, '%',
INetURLObject::DECODE_UNAMBIGUOUS,
RTL_TEXTENCODING_UTF8 ));
OUString sOldFileName( m_SectionData.GetLinkFileName() );
@@ -293,7 +293,7 @@ OUString SectRepr::GetFile() const
}
else
sLinkFile = INetURLObject::decode( sLinkFile.getToken( 0, sfx2::cTokenSeparator ),
- INET_HEX_ESCAPE,
+ '%',
INetURLObject::DECODE_UNAMBIGUOUS,
RTL_TEXTENCODING_UTF8 );
}
@@ -1821,7 +1821,7 @@ IMPL_LINK( SwInsertSectionTabPage, DlgClosedHdl, sfx2::FileDialogHelper *, _pFil
if ( SFX_ITEM_SET == pMedium->GetItemSet()->GetItemState( SID_PASSWORD, false, &pItem ) )
m_sFilePasswd = ( (SfxStringItem*)pItem )->GetValue();
m_pFileNameED->SetText( INetURLObject::decode(
- m_sFileName, INET_HEX_ESCAPE, INetURLObject::DECODE_UNAMBIGUOUS, RTL_TEXTENCODING_UTF8 ) );
+ m_sFileName, '%', INetURLObject::DECODE_UNAMBIGUOUS, RTL_TEXTENCODING_UTF8 ) );
::lcl_ReadSections(*pMedium, *m_pSubRegionED);
delete pMedium;
}
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index ffadcf88dbd9..5c168e450835 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -2574,7 +2574,7 @@ IMPL_LINK_NOARG(SwGrfExtPage, BrowseHdl)
{ // remember selected filter
aFilterName = pGrfDlg->GetCurrentFilter();
aNewGrfName = INetURLObject::decode( pGrfDlg->GetPath(),
- INET_HEX_ESCAPE,
+ '%',
INetURLObject::DECODE_UNAMBIGUOUS,
RTL_TEXTENCODING_UTF8 );
m_pConnectED->SetModifyFlag();
@@ -2761,7 +2761,7 @@ void SwFrmURLPage::Reset( const SfxItemSet &rSet )
{
const SwFmtURL* pFmtURL = (const SwFmtURL*)pItem;
pURLED->SetText( INetURLObject::decode( pFmtURL->GetURL(),
- INET_HEX_ESCAPE,
+ '%',
INetURLObject::DECODE_UNAMBIGUOUS,
RTL_TEXTENCODING_UTF8 ));
pNameED->SetText( pFmtURL->GetName());
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index b3041b8abb6e..b904bd846e73 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -1224,7 +1224,7 @@ void SwTOXSelectTabPage::Reset( const SfxItemSet& )
m_pTypeLB->SelectEntryPos(m_pTypeLB->GetEntryPos((void*)nData));
sAutoMarkURL = INetURLObject::decode( rSh.GetTOIAutoMarkURL(),
- INET_HEX_ESCAPE,
+ '%',
INetURLObject::DECODE_UNAMBIGUOUS,
RTL_TEXTENCODING_UTF8 );
m_pFromFileCB->Check( !sAutoMarkURL.isEmpty() );