Bin pointless INET_MARK_TOKEN

Change-Id: Id95a2bd8ba08e06284709a4c7fa2582382f8aeae
This commit is contained in:
Tor Lillqvist
2014-04-01 08:42:50 +03:00
parent b6dbe2be87
commit a401d9356e
5 changed files with 5 additions and 6 deletions

View File

@@ -31,7 +31,6 @@ namespace com { namespace sun { namespace star { namespace util {
} } } }
// Special tokens:
#define INET_MARK_TOKEN '#'
#define INET_HEX_ESCAPE '%'
// Common URL prefixes for various schemes:

View File

@@ -52,7 +52,7 @@ void SwURLStateChanged::Notify( SfxBroadcaster& , const SfxHint& rHint )
if( pDoc->GetDocShell() && pDoc->GetDocShell()->GetMedium() &&
// If this is our Doc, we can also have local jumps!
pDoc->GetDocShell()->GetMedium()->GetName().equals(sURL) )
sBkmk = OUString(INET_MARK_TOKEN) + pIURL->GetMark();
sBkmk = "#" + pIURL->GetMark();
bool bAction = false, bUnLockView = false;
sal_uInt32 nMaxItems = pDoc->GetAttrPool().GetItemCount2( RES_TXTATR_INETFMT );

View File

@@ -830,7 +830,7 @@ bool AttributeOutputBase::AnalyzeURL( const OUString& rUrl, const OUString& /*rT
OUString sMark;
OUString sURL;
if ( rUrl.getLength() > 1 && rUrl[0] == INET_MARK_TOKEN )
if ( rUrl.getLength() > 1 && rUrl[0] == '#' )
{
sMark = BookmarkToWriter( rUrl.copy(1) );

View File

@@ -2852,7 +2852,7 @@ void WW8Export::StoreDoc1()
void MSWordExportBase::AddLinkTarget(const OUString& rURL)
{
if( rURL.isEmpty() || rURL[0] != INET_MARK_TOKEN )
if( rURL.isEmpty() || rURL[0] != '#' )
return;
OUString aURL( BookmarkToWriter( rURL.copy( 1 ) ) );

View File

@@ -2059,7 +2059,7 @@ eF_ResT SwWW8ImplReader::Read_F_PgRef( WW8FieldDesc*, OUString& rStr )
{
sBookmarkName = sName;
}
OUString sURL = OUString(INET_MARK_TOKEN) + sBookmarkName;
OUString sURL = "#" + sBookmarkName;
const OUString sTarget;
SwFmtINetFmt aURL( sURL, sTarget );
const OUString sLinkStyle("Index Link");
@@ -3422,7 +3422,7 @@ eF_ResT SwWW8ImplReader::Read_F_Hyperlink( WW8FieldDesc* /*pF*/, OUString& rStr
OSL_ENSURE(!sURL.isEmpty() || !sMark.isEmpty(), "WW8: Empty URL");
if( !sMark.isEmpty() )
( sURL += OUString(INET_MARK_TOKEN) ) += sMark;
( sURL += "#" ) += sMark;
SwFmtINetFmt aURL( sURL, sTarget );
// If on loading TOC field, change the default style into the "index link"