summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-12-05 08:47:18 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-12-05 12:49:02 +0200
commitbfde4866e07746eafa2f0d6173c29d805cc35ad0 (patch)
treebe939a44eb70c7187fa5536089b782326b160013 /sw/source
parent803215142efa6437515348f63bd70ffdcf5d45f1 (diff)
convert DecodeMechanism to scoped enum
Change-Id: I5c56634b1bca8e37fa73d02d2428645301b6c547
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/doc/DocumentLinksAdministrationManager.cxx2
-rw-r--r--sw/source/core/doc/docglbl.cxx2
-rw-r--r--sw/source/core/doc/notxtfrm.cxx2
-rw-r--r--sw/source/core/doc/visiturl.cxx2
-rw-r--r--sw/source/core/draw/dpage.cxx4
-rw-r--r--sw/source/core/edit/edglss.cxx4
-rw-r--r--sw/source/core/fields/docufld.cxx8
-rw-r--r--sw/source/core/graphic/ndgrf.cxx2
-rw-r--r--sw/source/core/swg/SwXMLTextBlocks.cxx2
-rw-r--r--sw/source/core/swg/swblocks.cxx2
-rw-r--r--sw/source/core/text/EnhancedPDFExportHelper.cxx2
-rw-r--r--sw/source/core/unocore/swunohelper.cxx6
-rw-r--r--sw/source/filter/basflt/iodetect.cxx2
-rw-r--r--sw/source/filter/basflt/shellio.cxx4
-rw-r--r--sw/source/filter/html/SwAppletImpl.cxx2
-rw-r--r--sw/source/filter/html/htmlgrin.cxx2
-rw-r--r--sw/source/filter/html/htmlplug.cxx2
-rw-r--r--sw/source/filter/html/wrthtml.cxx2
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx2
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx6
-rw-r--r--sw/source/filter/ww8/ww8par.cxx6
-rw-r--r--sw/source/filter/xml/xmltexti.cxx4
-rw-r--r--sw/source/ui/chrdlg/chardlg.cxx2
-rw-r--r--sw/source/ui/dbui/addresslistdialog.cxx2
-rw-r--r--sw/source/ui/dbui/createaddresslistdialog.cxx2
-rw-r--r--sw/source/ui/dbui/mmresultdialogs.cxx6
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx12
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx4
-rw-r--r--sw/source/ui/index/cnttab.cxx2
-rw-r--r--sw/source/ui/misc/glosbib.cxx2
-rw-r--r--sw/source/ui/vba/vbatemplate.cxx2
-rw-r--r--sw/source/uibase/app/docsh.cxx2
-rw-r--r--sw/source/uibase/app/docsh2.cxx2
-rw-r--r--sw/source/uibase/config/uinums.cxx2
-rw-r--r--sw/source/uibase/dbui/dbmgr.cxx26
-rw-r--r--sw/source/uibase/dochdl/gloshdl.cxx2
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx10
-rw-r--r--sw/source/uibase/docvw/edtwin2.cxx2
-rw-r--r--sw/source/uibase/shells/grfsh.cxx2
-rw-r--r--sw/source/uibase/uiview/view2.cxx4
-rw-r--r--sw/source/uibase/uno/unoatxt.cxx2
-rw-r--r--sw/source/uibase/uno/unomailmerge.cxx4
-rw-r--r--sw/source/uibase/utlui/content.cxx4
-rw-r--r--sw/source/uibase/utlui/glbltree.cxx10
-rw-r--r--sw/source/uibase/utlui/navipi.cxx2
45 files changed, 89 insertions, 89 deletions
diff --git a/sw/source/core/doc/DocumentLinksAdministrationManager.cxx b/sw/source/core/doc/DocumentLinksAdministrationManager.cxx
index 1255eccc5433..ccbe757d2323 100644
--- a/sw/source/core/doc/DocumentLinksAdministrationManager.cxx
+++ b/sw/source/core/doc/DocumentLinksAdministrationManager.cxx
@@ -450,7 +450,7 @@ bool DocumentLinksAdministrationManager::SelectServerObj( const OUString& rStr,
rpRange = nullptr;
OUString sItem( INetURLObject::decode( rStr,
- INetURLObject::DECODE_WITH_CHARSET ));
+ INetURLObject::DecodeMechanism::WithCharset ));
sal_Int32 nPos = sItem.indexOf( cMarkSeparator );
diff --git a/sw/source/core/doc/docglbl.cxx b/sw/source/core/doc/docglbl.cxx
index 5cccd88b1c69..479a7611a172 100644
--- a/sw/source/core/doc/docglbl.cxx
+++ b/sw/source/core/doc/docglbl.cxx
@@ -234,7 +234,7 @@ bool SwDoc::SplitDoc( sal_uInt16 eDocType, const OUString& rPath, bool bOutline,
INetURLObject aEntry(rPath);
OUString sLeading(aEntry.GetBase());
aEntry.removeSegment();
- OUString sPath = aEntry.GetMainURL( INetURLObject::NO_DECODE );
+ OUString sPath = aEntry.GetMainURL( INetURLObject::DecodeMechanism::NONE );
utl::TempFile aTemp(sLeading, true, &sExt, &sPath);
aTemp.EnableKillingFile();
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index a03f36a93992..533ba658c4c0 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -86,7 +86,7 @@ inline bool GetRealURL( const SwGrfNode& rNd, OUString& rText )
bool bRet = rNd.GetFileFilterNms( &rText, nullptr );
if( bRet )
rText = URIHelper::removePassword( rText, INetURLObject::EncodeMechanism::WasEncoded,
- INetURLObject::DECODE_UNAMBIGUOUS);
+ INetURLObject::DecodeMechanism::Unambiguous);
if (rText.startsWith("data:image")) rText = "inline image";
return bRet;
diff --git a/sw/source/core/doc/visiturl.cxx b/sw/source/core/doc/visiturl.cxx
index 7555205b64c8..fad1ebc57a83 100644
--- a/sw/source/core/doc/visiturl.cxx
+++ b/sw/source/core/doc/visiturl.cxx
@@ -46,7 +46,7 @@ void SwURLStateChanged::Notify( SfxBroadcaster& , const SfxHint& rHint )
{
// This URL has been changed:
const INetURLObject* pIURL = static_cast<const INetURLHistoryHint&>(rHint).GetObject();
- OUString sURL( pIURL->GetMainURL( INetURLObject::NO_DECODE ) ), sBkmk;
+ OUString sURL( pIURL->GetMainURL( INetURLObject::DecodeMechanism::NONE ) ), sBkmk;
SwEditShell* pESh = pDoc->GetEditShell();
diff --git a/sw/source/core/draw/dpage.cxx b/sw/source/core/draw/dpage.cxx
index 08b039fc934e..bea0588ea495 100644
--- a/sw/source/core/draw/dpage.cxx
+++ b/sw/source/core/draw/dpage.cxx
@@ -199,14 +199,14 @@ bool SwDPage::RequestHelp( vcl::Window* pWindow, SdrView* pView,
if ( sText.isEmpty() )
sText = URIHelper::removePassword( pTmpObj->GetURL(),
INetURLObject::EncodeMechanism::WasEncoded,
- INetURLObject::DECODE_UNAMBIGUOUS);
+ INetURLObject::DecodeMechanism::Unambiguous);
}
}
else if ( !rURL.GetURL().isEmpty() )
{
sText = URIHelper::removePassword( rURL.GetURL(),
INetURLObject::EncodeMechanism::WasEncoded,
- INetURLObject::DECODE_UNAMBIGUOUS);
+ INetURLObject::DecodeMechanism::Unambiguous);
if( rURL.IsServerMap() )
{
diff --git a/sw/source/core/edit/edglss.cxx b/sw/source/core/edit/edglss.cxx
index e4ba47455677..48ee031537c8 100644
--- a/sw/source/core/edit/edglss.cxx
+++ b/sw/source/core/edit/edglss.cxx
@@ -53,7 +53,7 @@ sal_uInt16 SwEditShell::MakeGlossary( SwTextBlocks& rBlks, const OUString& rName
if(bSaveRelFile)
{
INetURLObject aURL( rBlks.GetFileName() );
- sBase = aURL.GetMainURL( INetURLObject::NO_DECODE );
+ sBase = aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
rBlks.SetBaseURL( sBase );
@@ -87,7 +87,7 @@ sal_uInt16 SwEditShell::SaveGlossaryDoc( SwTextBlocks& rBlock,
if(bSaveRelFile)
{
INetURLObject aURL( rBlock.GetFileName() );
- sBase = aURL.GetMainURL( INetURLObject::NO_DECODE );
+ sBase = aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
rBlock.SetBaseURL( sBase );
sal_uInt16 nRet = USHRT_MAX;
diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx
index fbefdc24719f..e8205534509a 100644
--- a/sw/source/core/fields/docufld.cxx
+++ b/sw/source/core/fields/docufld.cxx
@@ -90,7 +90,7 @@
#include <calbck.hxx>
#include <docary.hxx>
-#define URL_DECODE INetURLObject::DECODE_UNAMBIGUOUS
+#define URL_DECODE INetURLObject::DecodeMechanism::Unambiguous
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -424,7 +424,7 @@ OUString SwFileNameFieldType::Expand(sal_uLong nFormat) const
else
{
aRet = URIHelper::removePassword(
- rURLObj.GetMainURL( INetURLObject::NO_DECODE ),
+ rURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ),
INetURLObject::EncodeMechanism::WasEncoded, URL_DECODE );
const sal_Int32 nPos = aRet.indexOf(rURLObj.GetLastName( URL_DECODE ));
if (nPos>=0)
@@ -436,7 +436,7 @@ OUString SwFileNameFieldType::Expand(sal_uLong nFormat) const
break;
case FF_NAME:
- aRet = rURLObj.GetLastName( INetURLObject::DECODE_WITH_CHARSET );
+ aRet = rURLObj.GetLastName( INetURLObject::DecodeMechanism::WithCharset );
break;
case FF_NAME_NOEXT:
@@ -448,7 +448,7 @@ OUString SwFileNameFieldType::Expand(sal_uLong nFormat) const
aRet = rURLObj.GetFull();
else
aRet = URIHelper::removePassword(
- rURLObj.GetMainURL( INetURLObject::NO_DECODE ),
+ rURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ),
INetURLObject::EncodeMechanism::WasEncoded, URL_DECODE );
}
}
diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx
index 2326706345a3..94142cfa8a68 100644
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
@@ -126,7 +126,7 @@ SwGrfNode::SwGrfNode( const SwNodeIndex & rWhere,
{
INetURLObject aUrl( rGrfName );
if( INetProtocol::File == aUrl.GetProtocol() &&
- FStatHelper::IsDocument( aUrl.GetMainURL( INetURLObject::NO_DECODE ) ))
+ FStatHelper::IsDocument( aUrl.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ))
{
// file exists, so create connection without an update
static_cast<SwBaseLink*>( refLink.get() )->Connect();
diff --git a/sw/source/core/swg/SwXMLTextBlocks.cxx b/sw/source/core/swg/SwXMLTextBlocks.cxx
index 1c2ed672b181..cb4aee07af82 100644
--- a/sw/source/core/swg/SwXMLTextBlocks.cxx
+++ b/sw/source/core/swg/SwXMLTextBlocks.cxx
@@ -510,7 +510,7 @@ bool SwXMLTextBlocks::IsFileUCBStorage( const OUString & rFileName)
OUString aURL;
osl::FileBase::getFileURLFromSystemPath( aName, aURL );
aObj.SetURL( aURL );
- aName = aObj.GetMainURL( INetURLObject::NO_DECODE );
+ aName = aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
SvStream * pStm = ::utl::UcbStreamHelper::CreateStream( aName, StreamMode::STD_READ );
diff --git a/sw/source/core/swg/swblocks.cxx b/sw/source/core/swg/swblocks.cxx
index 9176f503cbbc..99f0751a41cb 100644
--- a/sw/source/core/swg/swblocks.cxx
+++ b/sw/source/core/swg/swblocks.cxx
@@ -236,7 +236,7 @@ SwTextBlocks::SwTextBlocks( const OUString& rFile )
: pImp( nullptr ), nErr( 0 )
{
INetURLObject aObj(rFile);
- const OUString sFileName = aObj.GetMainURL( INetURLObject::NO_DECODE );
+ const OUString sFileName = aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
switch( SwImpBlocks::GetFileType( rFile ) )
{
case SwImpBlocks::FileType::XML: pImp = new SwXMLTextBlocks( sFileName ); break;
diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx
index 77803217ca84..e729e2b659d9 100644
--- a/sw/source/core/text/EnhancedPDFExportHelper.cxx
+++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx
@@ -1647,7 +1647,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
// than one link to this destination:
OUString aURL( INetURLObject::decode(
p->rINetAttr.GetINetFormat().GetValue(),
- INetURLObject::DECODE_UNAMBIGUOUS ) );
+ INetURLObject::DecodeMechanism::Unambiguous ) );
// We have to distinguish between intern and real URLs
const bool bIntern = '#' == aURL[0];
diff --git a/sw/source/core/unocore/swunohelper.cxx b/sw/source/core/unocore/swunohelper.cxx
index 75d286148d5c..3e947d1cbde2 100644
--- a/sw/source/core/unocore/swunohelper.cxx
+++ b/sw/source/core/unocore/swunohelper.cxx
@@ -91,7 +91,7 @@ bool UCB_CopyFile( const OUString& rURL, const OUString& rNewURL, bool bCopyIsMo
INetURLObject aURL( rNewURL );
const OUString sName( aURL.GetName() );
aURL.removeSegment();
- const OUString sMainURL( aURL.GetMainURL(INetURLObject::NO_DECODE) );
+ const OUString sMainURL( aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE) );
ucbhelper::Content aTempContent( sMainURL,
css::uno::Reference< css::ucb::XCommandEnvironment >(),
@@ -120,11 +120,11 @@ bool UCB_IsCaseSensitiveFileName( const OUString& rURL )
INetURLObject aTempObj( rURL );
aTempObj.SetBase( aTempObj.GetBase().toAsciiLowerCase() );
css::uno::Reference< css::ucb::XContentIdentifier > xRef1 = new
- ucbhelper::ContentIdentifier( aTempObj.GetMainURL( INetURLObject::NO_DECODE ));
+ ucbhelper::ContentIdentifier( aTempObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ));
aTempObj.SetBase(aTempObj.GetBase().toAsciiUpperCase());
css::uno::Reference< css::ucb::XContentIdentifier > xRef2 = new
- ucbhelper::ContentIdentifier( aTempObj.GetMainURL( INetURLObject::NO_DECODE ));
+ ucbhelper::ContentIdentifier( aTempObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ));
css::uno::Reference< css::ucb::XUniversalContentBroker > xUcb =
css::ucb::UniversalContentBroker::create(comphelper::getProcessComponentContext());
diff --git a/sw/source/filter/basflt/iodetect.cxx b/sw/source/filter/basflt/iodetect.cxx
index 5b6e92ff8a91..4fc0635b3985 100644
--- a/sw/source/filter/basflt/iodetect.cxx
+++ b/sw/source/filter/basflt/iodetect.cxx
@@ -160,7 +160,7 @@ std::shared_ptr<const SfxFilter> SwIoSystem::GetFileFilter(const OUString& rFile
INetURLObject aObj;
aObj.SetSmartProtocol( INetProtocol::File );
aObj.SetSmartURL( rFileName );
- SfxMedium aMedium(aObj.GetMainURL(INetURLObject::NO_DECODE), StreamMode::STD_READ);
+ SfxMedium aMedium(aObj.GetMainURL(INetURLObject::DecodeMechanism::NONE), StreamMode::STD_READ);
// templates should not get precedence over "normal" filters (#i35508, #i33168)
std::shared_ptr<const SfxFilter> pTemplateFilter;
diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx
index c9f300379892..113fe38f8bd1 100644
--- a/sw/source/filter/basflt/shellio.cxx
+++ b/sw/source/filter/basflt/shellio.cxx
@@ -463,7 +463,7 @@ SwDoc* Reader::GetTemplateDoc()
else
{
INetURLObject aTDir( aTemplateNm );
- const OUString aFileName = aTDir.GetMainURL( INetURLObject::NO_DECODE );
+ const OUString aFileName = aTDir.GetMainURL( INetURLObject::DecodeMechanism::NONE );
OSL_ENSURE( !aTDir.HasError(), "No absolute path for template name!" );
DateTime aCurrDateTime( DateTime::SYSTEM );
bool bLoad = false;
@@ -474,7 +474,7 @@ SwDoc* Reader::GetTemplateDoc()
Date aTstDate( Date::EMPTY );
tools::Time aTstTime( tools::Time::EMPTY );
if( FStatHelper::GetModifiedDateTimeOfFile(
- aTDir.GetMainURL( INetURLObject::NO_DECODE ),
+ aTDir.GetMainURL( INetURLObject::DecodeMechanism::NONE ),
&aTstDate, &aTstTime ) &&
( !pTemplate || aDStamp != aTstDate || aTStamp != aTstTime ))
{
diff --git a/sw/source/filter/html/SwAppletImpl.cxx b/sw/source/filter/html/SwAppletImpl.cxx
index fc8fb9104366..11fba7e16641 100644
--- a/sw/source/filter/html/SwAppletImpl.cxx
+++ b/sw/source/filter/html/SwAppletImpl.cxx
@@ -124,7 +124,7 @@ void SwApplet_Impl::CreateApplet( const OUString& rCode, const OUString& rName,
INetURLObject aUrlBase(rDocumentBaseURL);
aUrlBase.removeSegment();
- OUString sDocBase = aUrlBase.GetMainURL(INetURLObject::NO_DECODE);
+ OUString sDocBase = aUrlBase.GetMainURL(INetURLObject::DecodeMechanism::NONE);
uno::Reference < beans::XPropertySet > xSet( xApplet->getComponent(), uno::UNO_QUERY );
if ( xSet.is() )
{
diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx
index 2485f1123c95..72078ba85754 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -1158,7 +1158,7 @@ ANCHOR_SETEVENT:
if( !aName.isEmpty() )
{
OUString sDecoded( INetURLObject::decode( aName,
- INetURLObject::DECODE_UNAMBIGUOUS ));
+ INetURLObject::DecodeMechanism::Unambiguous ));
sal_Int32 nPos = sDecoded.lastIndexOf( cMarkSeparator );
if( nPos != -1 )
{
diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx
index 1845d8aac3e1..ef67ba07632b 100644
--- a/sw/source/filter/html/htmlplug.cxx
+++ b/sw/source/filter/html/htmlplug.cxx
@@ -885,7 +885,7 @@ void SwHTMLParser::InsertFloatingFrame()
bool bHasBorder = aFrameDesc.HasFrameBorder();
Size aMargin = aFrameDesc.GetMargin();
- xSet->setPropertyValue("FrameURL", uno::makeAny( OUString( aFrameDesc.GetURL().GetMainURL( INetURLObject::NO_DECODE ) ) ) );
+ xSet->setPropertyValue("FrameURL", uno::makeAny( OUString( aFrameDesc.GetURL().GetMainURL( INetURLObject::DecodeMechanism::NONE ) ) ) );
xSet->setPropertyValue("FrameName", uno::makeAny( aName ) );
if ( eScroll == ScrollingAuto )
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index b3034c7f65b4..8cec822b9183 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -1201,7 +1201,7 @@ OUString SwHTMLWriter::convertHyperlinkHRefValue(const OUString& rURL)
{
// Link is not started from "#", so looks like external link. Encode this URL.
INetURLObject aURL(sURL);
- sURL = aURL.GetMainURL(INetURLObject::NO_DECODE);
+ sURL = aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE);
}
return URIHelper::simpleNormalizedMakeRelative( GetBaseURL(), sURL );
}
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index 46d42cb5835b..2f61d329b8dd 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -148,7 +148,7 @@ OUString SwBasicEscherEx::BuildFileName(sal_uInt16& rnLevel, bool& rbRel, const
// try to convert to relative file name
OUString aTmpName( aDosName );
aDosName = INetURLObject::GetRelURL( GetBasePath(), rUrl,
- INetURLObject::EncodeMechanism::WasEncoded, INetURLObject::DECODE_WITH_CHARSET );
+ INetURLObject::EncodeMechanism::WasEncoded, INetURLObject::DecodeMechanism::WithCharset );
if (aDosName.startsWith(INET_FILE_SCHEME))
{
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index b81b1097cab1..a173f1d0b4f9 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -928,8 +928,8 @@ bool AttributeOutputBase::AnalyzeURL( const OUString& rUrl, const OUString& /*rT
else
{
INetURLObject aURL( rUrl, INetProtocol::NotValid );
- sURL = aURL.GetURLNoMark( INetURLObject::DECODE_UNAMBIGUOUS );
- sMark = aURL.GetMark( INetURLObject::DECODE_UNAMBIGUOUS );
+ sURL = aURL.GetURLNoMark( INetURLObject::DecodeMechanism::Unambiguous );
+ sMark = aURL.GetMark( INetURLObject::DecodeMechanism::Unambiguous );
}
if ( !sMark.isEmpty() && sURL.isEmpty() )
@@ -1135,7 +1135,7 @@ OUString BookmarkToWord(const OUString &rBookmark)
OUString BookmarkToWriter(const OUString &rBookmark)
{
return INetURLObject::decode(rBookmark,
- INetURLObject::DECODE_UNAMBIGUOUS, RTL_TEXTENCODING_ASCII_US);
+ INetURLObject::DecodeMechanism::Unambiguous, RTL_TEXTENCODING_ASCII_US);
}
void SwWW8AttrIter::OutSwFormatRefMark(const SwFormatRefMark& rAttr, bool)
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index dffd69106798..e994e4f3ab9f 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -198,7 +198,7 @@ void lclGetAbsPath(OUString& rPath, sal_uInt16 nLevel, SwDocShell* pDocShell)
if (!aTmpStr.isEmpty())
{
bool bWasAbs = false;
- rPath = pDocShell->GetMedium()->GetURLObject().smartRel2Abs( aTmpStr, bWasAbs ).GetMainURL( INetURLObject::NO_DECODE );
+ rPath = pDocShell->GetMedium()->GetURLObject().smartRel2Abs( aTmpStr, bWasAbs ).GetMainURL( INetURLObject::DecodeMechanism::NONE );
// full path as stored in SvxURLField must be encoded
}
}
@@ -4744,7 +4744,7 @@ void SwWW8ImplReader::ReadDocInfo()
{
OUString aName = pMedium->GetName();
INetURLObject aURL( aName );
- sTemplateURL = aURL.GetMainURL(INetURLObject::DECODE_TO_IURI);
+ sTemplateURL = aURL.GetMainURL(INetURLObject::DecodeMechanism::ToIUri);
if ( !sTemplateURL.isEmpty() )
xDocProps->setTemplateURL( sTemplateURL );
}
@@ -5523,7 +5523,7 @@ namespace
{
::comphelper::DocPasswordRequest* pRequest = new ::comphelper::DocPasswordRequest(
::comphelper::DocPasswordRequestType::MS, task::PasswordRequestMode_PASSWORD_ENTER,
- INetURLObject( rMedium.GetOrigURL() ).GetName( INetURLObject::DECODE_WITH_CHARSET ) );
+ INetURLObject( rMedium.GetOrigURL() ).GetName( INetURLObject::DecodeMechanism::WithCharset ) );
uno::Reference< task::XInteractionRequest > xRequest( pRequest );
xHandler->handle( xRequest );
diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx
index 85d9af4cc312..73fb70565f42 100644
--- a/sw/source/filter/xml/xmltexti.cxx
+++ b/sw/source/filter/xml/xmltexti.cxx
@@ -572,7 +572,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOOoLink(
uno::Sequence< beans::PropertyValue > aMediaDescriptor( 1 );
aMediaDescriptor[0].Name = "URL";
- aMediaDescriptor[0].Value <<= OUString( aURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
+ aMediaDescriptor[0].Value <<= OUString( aURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
if ( pDoc->GetDocShell() && pDoc->GetDocShell()->GetMedium() )
{
uno::Reference< task::XInteractionHandler > xInteraction =
@@ -718,7 +718,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertPlugin(
{
if( bValidURL )
xSet->setPropertyValue("PluginURL",
- makeAny( OUString( aURLObj.GetMainURL( INetURLObject::NO_DECODE ) ) ) );
+ makeAny( OUString( aURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ) ) );
if( bValidMimeType )
xSet->setPropertyValue("PluginMimeType",
makeAny( OUString( rMimeType ) ) );
diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx
index 1211e6efb5f7..e1e6cefc0a76 100644
--- a/sw/source/ui/chrdlg/chardlg.cxx
+++ b/sw/source/ui/chrdlg/chardlg.cxx
@@ -211,7 +211,7 @@ void SwCharURLPage::Reset(const SfxItemSet* rSet)
{
const SwFormatINetFormat* pINetFormat = static_cast<const SwFormatINetFormat*>( pItem);
m_pURLED->SetText(INetURLObject::decode(pINetFormat->GetValue(),
- INetURLObject::DECODE_UNAMBIGUOUS));
+ INetURLObject::DecodeMechanism::Unambiguous));
m_pURLED->SaveValue();
m_pNameED->SetText(pINetFormat->GetName());
diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx
index 682e5b76035a..617957d5c7a6 100644
--- a/sw/source/ui/dbui/addresslistdialog.cxx
+++ b/sw/source/ui/dbui/addresslistdialog.cxx
@@ -385,7 +385,7 @@ IMPL_LINK(SwAddressListDialog, CreateHdl_Impl, Button*, pButton, void)
INetURLObject aTempURL(aURL);
aTempURL.removeSegment();
aTempURL.removeFinalSlash();
- const OUString sDBURL("sdbc:flat:" + aTempURL.GetMainURL(INetURLObject::NO_DECODE));
+ const OUString sDBURL("sdbc:flat:" + aTempURL.GetMainURL(INetURLObject::DecodeMechanism::NONE));
xDataProperties->setPropertyValue("URL", Any(sDBURL));
//set the filter to the file name without extension
uno::Sequence<OUString> aFilters { sNewName };
diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx
index 27086a9338f0..7c87d4875fd6 100644
--- a/sw/source/ui/dbui/createaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/createaddresslistdialog.cxx
@@ -636,7 +636,7 @@ IMPL_LINK_NOARG(SwCreateAddressListDialog, OkHdl_Impl, Button*, void)
m_sURL = xFP->getSelectedFiles().getConstArray()[0];
INetURLObject aResult( m_sURL );
aResult.setExtension("csv");
- m_sURL = aResult.GetMainURL(INetURLObject::NO_DECODE);
+ m_sURL = aResult.GetMainURL(INetURLObject::DecodeMechanism::NONE);
}
}
if(!m_sURL.isEmpty())
diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx b/sw/source/ui/dbui/mmresultdialogs.cxx
index 509f6bb329a7..78836ebaf028 100644
--- a/sw/source/ui/dbui/mmresultdialogs.cxx
+++ b/sw/source/ui/dbui/mmresultdialogs.cxx
@@ -165,7 +165,7 @@ SwSaveWarningBox_Impl::SwSaveWarningBox_Impl(vcl::Window* pParent, const OUStrin
INetURLObject aTmp(rFileName);
m_pPrimaryMessage->SetText(m_pPrimaryMessage->GetText().replaceAll("%1", aTmp.getName(
- INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET)));
+ INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset)));
ModifyHdl(*m_pEdit);
}
@@ -429,7 +429,7 @@ void SwMMResultEmailDialog::FillInEmailSettings()
{
INetURLObject aTmp(pDocShell->GetMedium()->GetName());
m_pAttachmentED->SetText(aTmp.getName(
- INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET ));
+ INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset ));
}
}
@@ -713,7 +713,7 @@ IMPL_LINK(SwMMResultSaveDialog, SaveOutputHdl_Impl, Button*, pButton, void)
documentStartPageNumber(xConfigItem.get(), nDoc), documentEndPageNumber(xConfigItem.get(), nDoc));
pTargetView->GetWrtShell().EndAction();
//then save it
- OUString sOutPath = aURL.GetMainURL(INetURLObject::DECODE_TO_IURI);
+ OUString sOutPath = aURL.GetMainURL(INetURLObject::DecodeMechanism::ToIUri);
OUString sCounter = "_" + OUString::number(nDoc);
sOutPath = sOutPath.replaceAt( sOutPath.getLength() - sExtension.getLength() - 1, 0, sCounter);
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index 496654aaeb76..722ec47ca64c 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -204,7 +204,7 @@ SectRepr::SectRepr( size_t nPos, SwSection& rSect )
void SectRepr::SetFile( const OUString& rFile )
{
OUString sNewFile( INetURLObject::decode( rFile,
- INetURLObject::DECODE_UNAMBIGUOUS ));
+ INetURLObject::DecodeMechanism::Unambiguous ));
const OUString sOldFileName( m_SectionData.GetLinkFileName() );
const OUString sSub( sOldFileName.getToken( 2, sfx2::cTokenSeparator ) );
@@ -289,7 +289,7 @@ OUString SectRepr::GetFile() const
.replaceFirst( OUStringLiteral1(sfx2::cTokenSeparator), " ", &n );
}
return INetURLObject::decode( sLinkFile.getToken( 0, sfx2::cTokenSeparator ),
- INetURLObject::DECODE_UNAMBIGUOUS );
+ INetURLObject::DecodeMechanism::Unambiguous );
}
OUString SectRepr::GetSubRegion() const
@@ -1319,7 +1319,7 @@ IMPL_LINK( SwEditRegionDlg, DlgClosedHdl, sfx2::FileDialogHelper *, _pFileDlg, v
std::unique_ptr<SfxMedium> pMedium(m_pDocInserter->CreateMedium("sglobal"));
if ( pMedium )
{
- sFileName = pMedium->GetURLObject().GetMainURL( INetURLObject::NO_DECODE );
+ sFileName = pMedium->GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE );
sFilterName = pMedium->GetFilter()->GetFilterName();
const SfxPoolItem* pItem;
if ( SfxItemState::SET == pMedium->GetItemSet()->GetItemState( SID_PASSWORD, false, &pItem ) )
@@ -1358,7 +1358,7 @@ IMPL_LINK( SwEditRegionDlg, SubRegionEventHdl, VclWindowEvent&, rEvent, void )
//load file and set the shell
SfxMedium aMedium( sFileName, StreamMode::STD_READ );
- sFileName = aMedium.GetURLObject().GetMainURL( INetURLObject::NO_DECODE );
+ sFileName = aMedium.GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE );
::lcl_ReadSections(aMedium, *m_pSubRegionED);
}
else
@@ -1786,13 +1786,13 @@ IMPL_LINK( SwInsertSectionTabPage, DlgClosedHdl, sfx2::FileDialogHelper *, _pFil
std::unique_ptr<SfxMedium> pMedium(m_pDocInserter->CreateMedium("sglobal"));
if ( pMedium )
{
- m_sFileName = pMedium->GetURLObject().GetMainURL( INetURLObject::NO_DECODE );
+ m_sFileName = pMedium->GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE );
m_sFilterName = pMedium->GetFilter()->GetFilterName();
const SfxPoolItem* pItem;
if ( SfxItemState::SET == pMedium->GetItemSet()->GetItemState( SID_PASSWORD, false, &pItem ) )
m_sFilePasswd = static_cast<const SfxStringItem*>(pItem)->GetValue();
m_pFileNameED->SetText( INetURLObject::decode(
- m_sFileName, INetURLObject::DECODE_UNAMBIGUOUS ) );
+ m_sFileName, INetURLObject::DecodeMechanism::Unambiguous ) );
::lcl_ReadSections(*pMedium, *m_pSubRegionED);
}
}
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index b9d850aed94a..9f40d88f5686 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -2586,7 +2586,7 @@ IMPL_LINK_NOARG(SwGrfExtPage, BrowseHdl, Button*, void)
{ // remember selected filter
aFilterName = pGrfDlg->GetCurrentFilter();
aNewGrfName = INetURLObject::decode( pGrfDlg->GetPath(),
- INetURLObject::DECODE_UNAMBIGUOUS );
+ INetURLObject::DecodeMechanism::Unambiguous );
m_pConnectED->SetModifyFlag();
m_pConnectED->SetText( aNewGrfName );
//reset mirrors because maybe a Bitmap was swapped with
@@ -2778,7 +2778,7 @@ void SwFrameURLPage::Reset( const SfxItemSet *rSet )
{
const SwFormatURL* pFormatURL = static_cast<const SwFormatURL*>(pItem);
pURLED->SetText( INetURLObject::decode( pFormatURL->GetURL(),
- INetURLObject::DECODE_UNAMBIGUOUS ));
+ INetURLObject::DecodeMechanism::Unambiguous ));
pNameED->SetText( pFormatURL->GetName());
pClientCB->Enable( pFormatURL->GetMap() != nullptr );
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index b565df9db20c..bb187b0db1d1 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -1264,7 +1264,7 @@ void SwTOXSelectTabPage::Reset( const SfxItemSet* )
m_pTypeLB->SelectEntryPos(m_pTypeLB->GetEntryPos(reinterpret_cast<void*>(nData)));
sAutoMarkURL = INetURLObject::decode( rSh.GetTOIAutoMarkURL(),
- INetURLObject::DECODE_UNAMBIGUOUS );
+ INetURLObject::DecodeMechanism::Unambiguous );
m_pFromFileCB->Check( !sAutoMarkURL.isEmpty() );
m_pCaptionSequenceLB->Clear();
diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx
index fa2804d0ffbf..85ec9bfdc5f9 100644
--- a/sw/source/ui/misc/glosbib.cxx
+++ b/sw/source/ui/misc/glosbib.cxx
@@ -79,7 +79,7 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(vcl::Window * pParent,
for (size_t i = 0; i < rPathArr.size(); ++i)
{
INetURLObject aTempURL(rPathArr[i]);
- const OUString sPath = aTempURL.GetMainURL(INetURLObject::DECODE_WITH_CHARSET );
+ const OUString sPath = aTempURL.GetMainURL(INetURLObject::DecodeMechanism::WithCharset );
m_pPathLB->InsertEntry(sPath);
sal_uLong nCaseReadonly = 0;
utl::TempFile aTempFile(&sPath);
diff --git a/sw/source/ui/vba/vbatemplate.cxx b/sw/source/ui/vba/vbatemplate.cxx
index 69ff6ee85fea..a23735a9c8ec 100644
--- a/sw/source/ui/vba/vbatemplate.cxx
+++ b/sw/source/ui/vba/vbatemplate.cxx
@@ -74,7 +74,7 @@ SwVbaTemplate::getPath() throw ( css::uno::RuntimeException, std::exception )
if( !msFullUrl.isEmpty() )
{
INetURLObject aURL( msFullUrl );
- OUString sURL( aURL.GetMainURL( INetURLObject::DECODE_TO_IURI ) );
+ OUString sURL( aURL.GetMainURL( INetURLObject::DecodeMechanism::ToIUri ) );
sURL = sURL.copy( 0, sURL.getLength() - aURL.GetLastName().getLength() - 1 );
::osl::File::getSystemPathFromFileURL( sURL, sPath );
}
diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx
index d425aa921aaf..8ebdc5483630 100644
--- a/sw/source/uibase/app/docsh.cxx
+++ b/sw/source/uibase/app/docsh.cxx
@@ -430,7 +430,7 @@ bool SwDocShell::SaveAs( SfxMedium& rMedium )
const INetURLObject& rOldURLObject = GetMedium()->GetURLObject();
OUString aURL = "vnd.sun.star.pkg://";
- aURL += INetURLObject::encode(rOldURLObject.GetMainURL(INetURLObject::DECODE_WITH_CHARSET), INetURLObject::PART_AUTHORITY, INetURLObject::EncodeMechanism::All);
+ aURL += INetURLObject::encode(rOldURLObject.GetMainURL(INetURLObject::DecodeMechanism::WithCharset), INetURLObject::PART_AUTHORITY, INetURLObject::EncodeMechanism::All);
aURL += "/" + INetURLObject::encode(m_pDoc->GetDBManager()->getEmbeddedName(), INetURLObject::PART_FPATH, INetURLObject::EncodeMechanism::All);
uno::Reference<sdb::XDocumentDataSource> xDataSource(xDatabaseContext->getByName(aURL), uno::UNO_QUERY);
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index 7c555b262c8e..899ee0ea20e7 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -1567,7 +1567,7 @@ int SwFindDocShell( SfxObjectShellRef& xDocSh,
// 2. Open the file ourselves
std::unique_ptr<SfxMedium> xMed(new SfxMedium( aTmpObj.GetMainURL(
- INetURLObject::NO_DECODE ), StreamMode::READ ));
+ INetURLObject::DecodeMechanism::NONE ), StreamMode::READ ));
if( INetProtocol::File == aTmpObj.GetProtocol() )
xMed->Download(); // Touch the medium (download it)
diff --git a/sw/source/uibase/config/uinums.cxx b/sw/source/uibase/config/uinums.cxx
index a3943a968111..9d2772a32998 100644
--- a/sw/source/uibase/config/uinums.cxx
+++ b/sw/source/uibase/config/uinums.cxx
@@ -58,7 +58,7 @@ void SwChapterNumRules::Save()
aURL.setFinalSlash();
aURL.Append(CHAPTER_FILENAME);
- SfxMedium aMedium( aURL.GetMainURL(INetURLObject::NO_DECODE), StreamMode::WRITE );
+ SfxMedium aMedium( aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE), StreamMode::WRITE );
SvStream* pStream = aMedium.GetOutStream();
bool bRet = (pStream && pStream->GetError() == 0);
if (bRet)
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index d822c00d7786..805b81f3d6c0 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -262,7 +262,7 @@ void SAL_CALL SwDataSourceRemovedListener::revokedDatabaseLocation(const sdb::Da
if (!pDocShell)
return;
- OUString aOwnURL = pDocShell->GetMedium()->GetURLObject().GetMainURL(INetURLObject::DECODE_WITH_CHARSET);
+ OUString aOwnURL = pDocShell->GetMedium()->GetURLObject().GetMainURL(INetURLObject::DecodeMechanism::WithCharset);
OUString sTmpName = "vnd.sun.star.pkg://";
sTmpName += INetURLObject::encode(aOwnURL, INetURLObject::PART_AUTHORITY, INetURLObject::EncodeMechanism::All);
sTmpName += "/" + m_pDBManager->getEmbeddedName();
@@ -853,7 +853,7 @@ static void lcl_SaveDebugDoc( SfxObjectShell *xTargetDocShell,
if( aTempDir.IsValid() )
{
INetURLObject aTempDirURL( aTempDir.GetURL() );
- sTempDirURL = aTempDirURL.GetMainURL( INetURLObject::NO_DECODE );
+ sTempDirURL = aTempDirURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
SAL_INFO( "sw.mailmerge", "Dump directory: " << sTempDirURL );
}
}
@@ -868,7 +868,7 @@ static void lcl_SaveDebugDoc( SfxObjectShell *xTargetDocShell,
utl::TempFile aTempFile( basename, true, &sExt, &sTempDirURL );
INetURLObject aTempFileURL( aTempFile.GetURL() );
SfxMedium* pDstMed = new SfxMedium(
- aTempFileURL.GetMainURL( INetURLObject::NO_DECODE ),
+ aTempFileURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ),
StreamMode::STD_READWRITE );
bool bAnyError = !xTargetDocShell->DoSaveAs( *pDstMed );
// xObjectShell->DoSaveCompleted crashes the mail merge unit tests, so skip it
@@ -890,7 +890,7 @@ static bool lcl_SaveDoc(
SwWrtShell& rWorkShell,
OUString * const decodedURL = nullptr )
{
- OUString url = pFileURL->GetMainURL( INetURLObject::NO_DECODE );
+ OUString url = pFileURL->GetMainURL( INetURLObject::DecodeMechanism::NONE );
if( decodedURL )
(*decodedURL) = url;
@@ -1167,7 +1167,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
// setup the output format
std::shared_ptr<const SfxFilter> pStoreToFilter = SwIoSystem::GetFileFilter(
- pSourceDocSh->GetMedium()->GetURLObject().GetMainURL(INetURLObject::NO_DECODE));
+ pSourceDocSh->GetMedium()->GetURLObject().GetMainURL(INetURLObject::DecodeMechanism::NONE));
SfxFilterContainer* pFilterContainer = SwDocShell::Factory().GetFilterContainer();
const OUString* pStoreToFilterOptions = nullptr;
@@ -1335,7 +1335,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
INetURLObject aEntry( sPrefix );
sLeading = aEntry.GetBase();
aEntry.removeSegment();
- sPrefix = aEntry.GetMainURL( INetURLObject::NO_DECODE );
+ sPrefix = aEntry.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
OUString sExt(comphelper::string::stripStart(pStoreToFilter->GetDefaultExtension(), '*'));
@@ -2574,7 +2574,7 @@ SwDBManager::DBConnURITypes SwDBManager::GetDBunoURI(const OUString &rURI, uno::
|| sExt.equalsIgnoreAsciiCase("xls"))
{
OUString sDBURL("sdbc:calc:");
- sDBURL += aURL.GetMainURL(INetURLObject::NO_DECODE);
+ sDBURL += aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE);
aURLAny <<= sDBURL;
type = DBCONN_CALC;
}
@@ -2583,7 +2583,7 @@ SwDBManager::DBConnURITypes SwDBManager::GetDBunoURI(const OUString &rURI, uno::
aURL.removeSegment();
aURL.removeFinalSlash();
OUString sDBURL("sdbc:dbase:");
- sDBURL += aURL.GetMainURL(INetURLObject::NO_DECODE);
+ sDBURL += aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE);
aURLAny <<= sDBURL;
type = DBCONN_DBASE;
}
@@ -2593,7 +2593,7 @@ SwDBManager::DBConnURITypes SwDBManager::GetDBunoURI(const OUString &rURI, uno::
aURL.removeFinalSlash();
OUString sDBURL("sdbc:flat:");
//only the 'path' has to be added
- sDBURL += aURL.GetMainURL(INetURLObject::NO_DECODE);
+ sDBURL += aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE);
aURLAny <<= sDBURL;
type = DBCONN_FLAT;
}
@@ -2625,7 +2625,7 @@ OUString lcl_getOwnURL(SwDocShell* pDocShell)
return aRet;
const INetURLObject& rURLObject = pDocShell->GetMedium()->GetURLObject();
- aRet = rURLObject.GetMainURL(INetURLObject::DECODE_WITH_CHARSET);
+ aRet = rURLObject.GetMainURL(INetURLObject::DecodeMechanism::WithCharset);
return aRet;
}
@@ -2666,7 +2666,7 @@ OUString SwDBManager::LoadAndRegisterDataSource(const DBConnURITypes type, const
uno::Reference<sdb::XDatabaseContext> xDBContext = sdb::DatabaseContext::create(xContext);
OUString sNewName = INetURLObject::decode( aURL.getName(),
- INetURLObject::DECODE_UNAMBIGUOUS );
+ INetURLObject::DecodeMechanism::Unambiguous );
sal_Int32 nExtLen = aURL.GetExtension().getLength();
sNewName = sNewName.replaceAt( sNewName.getLength() - nExtLen - 1, nExtLen + 1, "" );
if (pPrefix)
@@ -2685,7 +2685,7 @@ OUString SwDBManager::LoadAndRegisterDataSource(const DBConnURITypes type, const
if(!bStore)
{
//odb-file
- uno::Any aDataSource = xDBContext->getByName(aURL.GetMainURL(INetURLObject::NO_DECODE));
+ uno::Any aDataSource = xDBContext->getByName(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE));
aDataSource >>= xNewInstance;
}
else
@@ -2797,7 +2797,7 @@ void SwDBManager::LoadAndRegisterEmbeddedDataSource(const SwDBData& rData, const
// Encode the stream name and the real path into a single URL.
const INetURLObject& rURLObject = rDocShell.GetMedium()->GetURLObject();
OUString aURL = "vnd.sun.star.pkg://";
- aURL += INetURLObject::encode(rURLObject.GetMainURL(INetURLObject::DECODE_WITH_CHARSET), INetURLObject::PART_AUTHORITY, INetURLObject::EncodeMechanism::All);
+ aURL += INetURLObject::encode(rURLObject.GetMainURL(INetURLObject::DecodeMechanism::WithCharset), INetURLObject::PART_AUTHORITY, INetURLObject::EncodeMechanism::All);
aURL += "/" + INetURLObject::encode(m_sEmbeddedName, INetURLObject::PART_FPATH, INetURLObject::EncodeMechanism::All);
uno::Reference<uno::XInterface> xDataSource(xDatabaseContext->getByName(aURL), uno::UNO_QUERY);
diff --git a/sw/source/uibase/dochdl/gloshdl.cxx b/sw/source/uibase/dochdl/gloshdl.cxx
index 07b5a7a4e415..fe066e0ab13b 100644
--- a/sw/source/uibase/dochdl/gloshdl.cxx
+++ b/sw/source/uibase/dochdl/gloshdl.cxx
@@ -115,7 +115,7 @@ void SwGlossaryHdl::SetCurGroup(const OUString &rGrp, bool bApi, bool bAlwaysCre
INetURLObject aTemp( pCurGrp->GetFileName() );
const OUString sCurBase = aTemp.getBase();
aTemp.removeSegment();
- const OUString sCurEntryPath = aTemp.GetMainURL(INetURLObject::NO_DECODE);
+ const OUString sCurEntryPath = aTemp.GetMainURL(INetURLObject::DecodeMechanism::NONE);
const std::vector<OUString> & rPathArr = rStatGlossaries.GetPathArray();
sal_uInt16 nCurrentPath = USHRT_MAX;
for (size_t nPath = 0; nPath < rPathArr.size(); ++nPath)
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index 41d7a5bd63de..7566fb1a769a 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -224,9 +224,9 @@ SwTransferable::SwTransferable( SwWrtShell& rSh )
{
const INetURLObject& rURLObj = pDShell->GetMedium()->GetURLObject();
m_aObjDesc.maDisplayName = URIHelper::removePassword(
- rURLObj.GetMainURL( INetURLObject::NO_DECODE ),
+ rURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ),
INetURLObject::EncodeMechanism::WasEncoded,
- INetURLObject::DECODE_UNAMBIGUOUS );
+ INetURLObject::DecodeMechanism::Unambiguous );
}
PrepareOLE( m_aObjDesc );
@@ -2487,7 +2487,7 @@ bool SwTransferable::PasteAsHyperlink( TransferableDataHelper& rData,
INetURLObject aURL;
aURL.SetSmartProtocol( INetProtocol::File );
aURL.SetSmartURL( sFile );
- sFile = aURL.GetMainURL( INetURLObject::NO_DECODE );
+ sFile = aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
switch( rSh.GetObjCntTypeOfSelection() )
{
@@ -2537,7 +2537,7 @@ bool SwTransferable::PasteFileName( TransferableDataHelper& rData,
INetURLObject aMediaURL;
aMediaURL.SetSmartURL( sFile );
- const OUString aMediaURLStr( aMediaURL.GetMainURL( INetURLObject::NO_DECODE ) );
+ const OUString aMediaURLStr( aMediaURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
if( ::avmedia::MediaWindow::isMediaURL( aMediaURLStr, ""/*TODO?*/ ) )
{
@@ -2581,7 +2581,7 @@ bool SwTransferable::PasteFileName( TransferableDataHelper& rData,
INetURLObject aURL;
aURL.SetSmartProtocol( INetProtocol::File );
aURL.SetSmartURL( sFile );
- sFile = aURL.GetMainURL( INetURLObject::NO_DECODE );
+ sFile = aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
switch( rSh.GetObjCntTypeOfSelection() )
{
diff --git a/sw/source/uibase/docvw/edtwin2.cxx b/sw/source/uibase/docvw/edtwin2.cxx
index f0f65e1ae090..ea84cdd7fd8c 100644
--- a/sw/source/uibase/docvw/edtwin2.cxx
+++ b/sw/source/uibase/docvw/edtwin2.cxx
@@ -169,7 +169,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
sText = static_cast<const SfxStringItem*>(aContentAtPos.aFnd.pAttr)->GetValue();
sText = URIHelper::removePassword( sText,
INetURLObject::EncodeMechanism::WasEncoded,
- INetURLObject::DECODE_UNAMBIGUOUS);
+ INetURLObject::DecodeMechanism::Unambiguous);
//#i63832# remove the link target type
sal_Int32 nFound = sText.indexOf(cMarkSeparator);
if( nFound != -1 && (++nFound) < sText.getLength() )
diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx
index 7b51f393c291..7f2eea848106 100644
--- a/sw/source/uibase/shells/grfsh.cxx
+++ b/sw/source/uibase/shells/grfsh.cxx
@@ -309,7 +309,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
if( !sGrfNm.isEmpty() )
{
aSet.Put( SvxBrushItem( INetURLObject::decode( sGrfNm,
- INetURLObject::DECODE_UNAMBIGUOUS ),
+ INetURLObject::DecodeMechanism::Unambiguous ),
sFilterNm, GPOS_LT,
SID_ATTR_GRAF_GRAPHIC ));
}
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index e59d432c9007..28ec6d45194f 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -265,7 +265,7 @@ int SwView::InsertGraphic( const OUString &rPath, const OUString &rFilter,
SwDocShell* pDocSh = GetDocShell();
INetURLObject aTemp(
pDocSh->HasName() ?
- pDocSh->GetMedium()->GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) :
+ pDocSh->GetMedium()->GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE ) :
OUString());
OUString sURL = URIHelper::SmartRel2Abs(
@@ -1937,7 +1937,7 @@ bool SwView::JumpToSwMark( const OUString& rMark )
const SwFormatINetFormat* pINet;
OUString sCmp;
OUString sMark( INetURLObject::decode( rMark,
- INetURLObject::DECODE_WITH_CHARSET ));
+ INetURLObject::DecodeMechanism::WithCharset ));
sal_Int32 nLastPos, nPos = sMark.indexOf( cMarkSeparator );
if( -1 != nPos )
diff --git a/sw/source/uibase/uno/unoatxt.cxx b/sw/source/uibase/uno/unoatxt.cxx
index f92a35be225c..dbb2cb51550f 100644
--- a/sw/source/uibase/uno/unoatxt.cxx
+++ b/sw/source/uibase/uno/unoatxt.cxx
@@ -379,7 +379,7 @@ uno::Reference< text::XAutoTextEntry > SwXAutoTextGroup::insertNewByName(const
if(rCfg.IsSaveRelFile())
{
INetURLObject aTemp(pGlosGroup->GetFileName());
- pGlosGroup->SetBaseURL( aTemp.GetMainURL(INetURLObject::NO_DECODE));
+ pGlosGroup->SetBaseURL( aTemp.GetMainURL(INetURLObject::DecodeMechanism::NONE));
}
else
pGlosGroup->SetBaseURL( OUString() );
diff --git a/sw/source/uibase/uno/unomailmerge.cxx b/sw/source/uibase/uno/unomailmerge.cxx
index 32e2fd1f71af..357aca692551 100644
--- a/sw/source/uibase/uno/unomailmerge.cxx
+++ b/sw/source/uibase/uno/unomailmerge.cxx
@@ -716,7 +716,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
if (aCurOutputURL.isEmpty())
{
aURLObj.removeSegment();
- aCurOutputURL = aURLObj.GetMainURL( INetURLObject::DECODE_TO_IURI );
+ aCurOutputURL = aURLObj.GetMainURL( INetURLObject::DecodeMechanism::ToIUri );
}
}
else // default empty document without URL
@@ -726,7 +726,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
}
aURLObj.SetSmartURL( aCurOutputURL );
- OUString aPath = aURLObj.GetMainURL( INetURLObject::DECODE_TO_IURI );
+ OUString aPath = aURLObj.GetMainURL( INetURLObject::DecodeMechanism::ToIUri );
const OUString aDelim( "/" );
if (!aPath.isEmpty() && !aPath.endsWith(aDelim))
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 0d4e3b094c6e..512248bb3161 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -167,7 +167,7 @@ namespace
p->sText,
INetURLObject::decode(
p->rINetAttr.GetINetFormat().GetValue(),
- INetURLObject::DECODE_UNAMBIGUOUS ),
+ INetURLObject::DecodeMechanism::Unambiguous ),
&p->rINetAttr,
n );
pMember->insert( pCnt );
@@ -570,7 +570,7 @@ void SwContentType::FillMemberList(bool* pbLevelOrVisibilityChanged)
pWrtShell->GetGrfNms( &sLink, nullptr, static_cast<const SwFlyFrameFormat*>( pFrameFormat));
pCnt = new SwGraphicContent(this, sFrameName,
INetURLObject::decode( sLink,
- INetURLObject::DECODE_UNAMBIGUOUS ),
+ INetURLObject::DecodeMechanism::Unambiguous ),
pFrameFormat->FindLayoutRect(false, &aNullPt).Top());
}
else
diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx
index 649517dde047..038cf7d765f0 100644
--- a/sw/source/uibase/utlui/glbltree.cxx
+++ b/sw/source/uibase/utlui/glbltree.cxx
@@ -722,7 +722,7 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* pCont, const OUString*
aFileNames.realloc(1);
INetURLObject aFileName;
aFileName.SetSmartURL( *pFileName );
- aFileNames.getArray()[0] = aFileName.GetMainURL( INetURLObject::NO_DECODE );
+ aFileNames.getArray()[0] = aFileName.GetMainURL( INetURLObject::DecodeMechanism::NONE );
InsertRegion( pCont, aFileNames );
}
}
@@ -934,7 +934,7 @@ void SwGlobalTree::ExecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry )
SID_SAVEASDOC, SfxCallMode::SYNCHRON ));
SfxObjectShell& rObj = *pViewFrame->GetObjectShell();
const SfxMedium* pMedium = rObj.GetMedium();
- OUString sNewFile(pMedium->GetURLObject().GetMainURL(INetURLObject::DECODE_TO_IURI));
+ OUString sNewFile(pMedium->GetURLObject().GetMainURL(INetURLObject::DecodeMechanism::ToIUri));
// Insert the area with the Doc-Name
// Bring the own Doc in the foreground
if(aFrameListener.IsValid() && !sNewFile.isEmpty())
@@ -1160,7 +1160,7 @@ void SwGlobalTree::OpenDoc(const SwGlblDocContent* pCont)
while( !bFound && pCurr )
{
if(pCurr->GetMedium() &&
- pCurr->GetMedium()->GetURLObject().GetMainURL(INetURLObject::DECODE_TO_IURI) == sFileName)
+ pCurr->GetMedium()->GetURLObject().GetMainURL(INetURLObject::DecodeMechanism::ToIUri) == sFileName)
{
bFound = true;
SwGlobalTree::SetShowShell(pCurr);
@@ -1297,7 +1297,7 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* _pContent, const Sequen
INetURLObject aFileUrl;
aFileUrl.SetSmartURL( sFileName );
OUString sSectionName(aFileUrl.GetLastName(
- INetURLObject::DECODE_UNAMBIGUOUS).getToken(0, sfx2::cTokenSeparator));
+ INetURLObject::DecodeMechanism::Unambiguous).getToken(0, sfx2::cTokenSeparator));
sal_uInt16 nSectCount = rSh.GetSectionFormatCount();
OUString sTempSectionName(sSectionName);
sal_uInt16 nAddNumber = 0;
@@ -1355,7 +1355,7 @@ IMPL_LINK( SwGlobalTree, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg, vo
sal_Int32 nPos = 0;
for (SfxMedium* pMed : *pMedList)
{
- OUString sFileName = pMed->GetURLObject().GetMainURL( INetURLObject::NO_DECODE )
+ OUString sFileName = pMed->GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE )
+ OUStringLiteral1(sfx2::cTokenSeparator)
+ pMed->GetFilter()->GetFilterName()
+ OUStringLiteral1(sfx2::cTokenSeparator);
diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx
index 18aaeb73ac72..c6eeb706c437 100644
--- a/sw/source/uibase/utlui/navipi.cxx
+++ b/sw/source/uibase/utlui/navipi.cxx
@@ -1037,7 +1037,7 @@ OUString SwNavigationPI::CreateDropFileName( TransferableDataHelper& rData )
}
if( !sFileName.isEmpty() )
{
- sFileName = INetURLObject( sFileName ).GetMainURL( INetURLObject::NO_DECODE );
+ sFileName = INetURLObject( sFileName ).GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
return sFileName;
}