summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--avmedia/source/framework/modeltools.cxx2
-rw-r--r--avmedia/source/opengl/oglplayer.cxx2
-rw-r--r--connectivity/source/drivers/dbase/DTable.cxx2
-rw-r--r--cui/source/options/optjava.cxx16
-rw-r--r--cui/source/options/optpath.cxx2
-rw-r--r--cui/source/tabpages/backgrnd.cxx2
-rw-r--r--editeng/source/items/flditem.cxx4
-rw-r--r--fpicker/source/office/iodlg.cxx2
-rw-r--r--framework/source/services/autorecovery.cxx2
-rw-r--r--framework/source/uielement/recentfilesmenucontroller.cxx2
-rw-r--r--include/svl/urihelper.hxx2
-rw-r--r--include/tools/urlobj.hxx198
-rw-r--r--sc/source/filter/excel/xecontent.cxx4
-rw-r--r--sc/source/filter/excel/xehelper.cxx4
-rw-r--r--sc/source/filter/excel/xihelper.cxx2
-rw-r--r--sc/source/filter/orcus/orcusfiltersimpl.cxx4
-rw-r--r--sd/source/ui/dlg/tpaction.cxx2
-rw-r--r--sfx2/source/appl/shutdowniconaqua.mm2
-rw-r--r--sfx2/source/control/recentdocsviewitem.cxx2
-rw-r--r--sfx2/source/doc/guisaveas.cxx2
-rw-r--r--sfx2/source/view/viewfrm.cxx2
-rw-r--r--svl/source/misc/urihelper.cxx10
-rw-r--r--svtools/source/contnr/fileview.cxx2
-rw-r--r--svtools/source/control/inettbc.cxx2
-rw-r--r--svx/source/gallery2/galbrws2.cxx4
-rw-r--r--svx/source/gallery2/galmisc.cxx2
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx2
-rw-r--r--sw/source/ui/dbui/mmresultdialogs.cxx2
-rw-r--r--tools/qa/cppunit/test_urlobj.cxx8
-rw-r--r--tools/source/fsys/urlobj.cxx118
-rw-r--r--vcl/unx/generic/fontmanager/fontmanager.cxx2
-rw-r--r--vcl/unx/gtk/fpicker/SalGtkPicker.cxx2
-rw-r--r--xmlsecurity/source/dialogs/macrosecurity.cxx2
-rw-r--r--xmlsecurity/workben/signaturetest.cxx2
34 files changed, 211 insertions, 207 deletions
diff --git a/avmedia/source/framework/modeltools.cxx b/avmedia/source/framework/modeltools.cxx
index 9aacfc3b6015..d2d5380af9cd 100644
--- a/avmedia/source/framework/modeltools.cxx
+++ b/avmedia/source/framework/modeltools.cxx
@@ -164,7 +164,7 @@ static void lcl_EmbedExternals(const OUString& rSourceURL, const uno::Reference<
// Convert URL to a file path for loading
const INetURLObject aURLObj(sTempFileURL);
- std::string sUrl = OUStringToOString( aURLObj.getFSysPath(INetURLObject::FSYS_DETECT), RTL_TEXTENCODING_UTF8 ).getStr();
+ std::string sUrl = OUStringToOString( aURLObj.getFSysPath(FSysStyle::Detect), RTL_TEXTENCODING_UTF8 ).getStr();
// Parse json, read externals' URI and modify this relative URI's so they remain valid in the new context.
std::vector<std::string> vExternals;
diff --git a/avmedia/source/opengl/oglplayer.cxx b/avmedia/source/opengl/oglplayer.cxx
index 50fdf4c2a1be..bfc25d40b0fb 100644
--- a/avmedia/source/opengl/oglplayer.cxx
+++ b/avmedia/source/opengl/oglplayer.cxx
@@ -71,7 +71,7 @@ bool OGLPlayer::create( const OUString& rURL )
// Convert URL to a system path
const INetURLObject aURLObj(m_sURL);
- const std::string sFilePath = OUStringToOString( aURLObj.getFSysPath(INetURLObject::FSYS_DETECT), RTL_TEXTENCODING_UTF8 ).getStr();
+ const std::string sFilePath = OUStringToOString( aURLObj.getFSysPath(FSysStyle::Detect), RTL_TEXTENCODING_UTF8 ).getStr();
// Load *.json file and init renderer
m_pHandle = gltf_renderer_init(sFilePath, m_vInputFiles);
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index 13cfc685ee3f..0229fae7ee46 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -685,7 +685,7 @@ void ODbaseTable::refreshIndexes()
aURL.SetURL(getEntry(m_pConnection,m_Name));
aURL.setExtension("inf");
- Config aInfFile(aURL.getFSysPath(INetURLObject::FSYS_DETECT));
+ Config aInfFile(aURL.getFSysPath(FSysStyle::Detect));
aInfFile.SetGroup(dBASE_III_GROUP);
sal_uInt16 nKeyCnt = aInfFile.GetKeyCount();
OString aKeyName;
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 0f2005c68b20..03f51c929505 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -533,7 +533,7 @@ void SvxJavaOptionsPage::AddJRE( JavaInfo* _pInfo )
sEntry.append(m_sAccessibilityText);
SvTreeListEntry* pEntry = m_pJavaList->InsertEntry(sEntry.makeStringAndClear());
INetURLObject aLocObj( OUString( _pInfo->sLocation ) );
- OUString* pLocation = new OUString( aLocObj.getFSysPath( INetURLObject::FSYS_DETECT ) );
+ OUString* pLocation = new OUString( aLocObj.getFSysPath( FSysStyle::Detect ) );
pEntry->SetUserData( pLocation );
#else
(void) this;
@@ -1004,7 +1004,7 @@ IMPL_LINK_NOARG(SvxJavaClassPathDlg, AddArchiveHdl_Impl, Button*, void)
OUString sFolder;
if ( m_pPathList->GetSelectEntryCount() > 0 )
{
- INetURLObject aObj( m_pPathList->GetSelectEntry(), INetURLObject::FSYS_DETECT );
+ INetURLObject aObj( m_pPathList->GetSelectEntry(), FSysStyle::Detect );
sFolder = aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
else
@@ -1014,7 +1014,7 @@ IMPL_LINK_NOARG(SvxJavaClassPathDlg, AddArchiveHdl_Impl, Button*, void)
{
OUString sURL = aDlg.GetPath();
INetURLObject aURL( sURL );
- OUString sFile = aURL.getFSysPath( INetURLObject::FSYS_DETECT );
+ OUString sFile = aURL.getFSysPath( FSysStyle::Detect );
if ( !IsPathDuplicate( sURL ) )
{
sal_Int32 nPos = m_pPathList->InsertEntry( sFile, SvFileInformationManager::GetImage( aURL ) );
@@ -1039,7 +1039,7 @@ IMPL_LINK_NOARG(SvxJavaClassPathDlg, AddPathHdl_Impl, Button*, void)
OUString sOldFolder;
if ( m_pPathList->GetSelectEntryCount() > 0 )
{
- INetURLObject aObj( m_pPathList->GetSelectEntry(), INetURLObject::FSYS_DETECT );
+ INetURLObject aObj( m_pPathList->GetSelectEntry(), FSysStyle::Detect );
sOldFolder = aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
else
@@ -1049,7 +1049,7 @@ IMPL_LINK_NOARG(SvxJavaClassPathDlg, AddPathHdl_Impl, Button*, void)
{
OUString sFolderURL( xFolderPicker->getDirectory() );
INetURLObject aURL( sFolderURL );
- OUString sNewFolder = aURL.getFSysPath( INetURLObject::FSYS_DETECT );
+ OUString sNewFolder = aURL.getFSysPath( FSysStyle::Detect );
if ( !IsPathDuplicate( sFolderURL ) )
{
sal_Int32 nPos = m_pPathList->InsertEntry( sNewFolder, SvFileInformationManager::GetImage( aURL ) );
@@ -1098,7 +1098,7 @@ bool SvxJavaClassPathDlg::IsPathDuplicate( const OUString& _rPath )
sal_Int32 nCount = m_pPathList->GetEntryCount();
for ( sal_Int32 i = 0; i < nCount; ++i )
{
- INetURLObject aOtherObj( m_pPathList->GetEntry(i), INetURLObject::FSYS_DETECT );
+ INetURLObject aOtherObj( m_pPathList->GetEntry(i), FSysStyle::Detect );
if ( aOtherObj == aFileObj )
{
bRet = true;
@@ -1138,8 +1138,8 @@ void SvxJavaClassPathDlg::SetClassPath( const OUString& _rPath )
for ( sal_Int32 i = 0; i < nCount; ++i )
{
OUString sToken = _rPath.getToken( 0, CLASSPATH_DELIMITER, nIdx );
- INetURLObject aURL( sToken, INetURLObject::FSYS_DETECT );
- OUString sPath = aURL.getFSysPath( INetURLObject::FSYS_DETECT );
+ INetURLObject aURL( sToken, FSysStyle::Detect );
+ OUString sPath = aURL.getFSysPath( FSysStyle::Detect );
m_pPathList->InsertEntry( sPath, SvFileInformationManager::GetImage( aURL ) );
}
// select first entry
diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx
index f6129224312d..f975d7e80fc4 100644
--- a/cui/source/options/optpath.cxx
+++ b/cui/source/options/optpath.cxx
@@ -497,7 +497,7 @@ void SvxPathTabPage::ChangeCurrentEntry( const OUString& _rFolder )
aNewObj.removeFinalSlash();
// then the new path also an URL else system path
- OUString sNewPathStr = bURL ? _rFolder : aNewObj.getFSysPath( INetURLObject::FSYS_DETECT );
+ OUString sNewPathStr = bURL ? _rFolder : aNewObj.getFSysPath( FSysStyle::Detect );
bool bChanged =
#ifdef UNX
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 41e525d2d358..5b40f396b040 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -1163,7 +1163,7 @@ IMPL_LINK( SvxBackgroundTabPage, FileClickHdl_Impl, Button*, pBox, void )
INetURLObject aObj( aBgdGraphicPath );
OUString aFilePath;
if ( aObj.GetProtocol() == INetProtocol::File )
- aFilePath = aObj.getFSysPath( INetURLObject::FSYS_DETECT );
+ aFilePath = aObj.getFSysPath( FSysStyle::Detect );
else
aFilePath = aBgdGraphicPath;
m_pFtFile->SetText( aFilePath );
diff --git a/editeng/source/items/flditem.cxx b/editeng/source/items/flditem.cxx
index f235b5ea8f6e..8edcd9c2687a 100644
--- a/editeng/source/items/flditem.cxx
+++ b/editeng/source/items/flditem.cxx
@@ -985,14 +985,14 @@ OUString SvxExtFileField::GetFormatted() const
switch( eFormat )
{
case SVXFILEFORMAT_FULLPATH:
- aString = aURLObj.getFSysPath(INetURLObject::FSYS_DETECT);
+ aString = aURLObj.getFSysPath(FSysStyle::Detect);
break;
case SVXFILEFORMAT_PATH:
aURLObj.removeSegment(INetURLObject::LAST_SEGMENT, false);
// #101742# Leave trailing slash at the pathname
aURLObj.setFinalSlash();
- aString = aURLObj.getFSysPath(INetURLObject::FSYS_DETECT);
+ aString = aURLObj.getFSysPath(FSysStyle::Detect);
break;
case SVXFILEFORMAT_NAME:
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index 9ed27530a468..8b1f47a1d2cf 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -1431,7 +1431,7 @@ IMPL_LINK( SvtFileDialog, SelectHdl_Impl, SvTreeListBox*, pBox, void )
{
if ( !pUserData->mbIsFolder )
aObj.removeSegment();
- OUString aName = aObj.getFSysPath( (INetURLObject::FSysStyle)(INetURLObject::FSYS_DETECT & ~INetURLObject::FSYS_VOS) );
+ OUString aName = aObj.getFSysPath( (FSysStyle)(FSysStyle::Detect & ~FSysStyle::Vos) );
pImpl->_pEdFileName->SetText( aName );
pImpl->_pEdFileName->SetSelection( Selection( 0, aName.getLength() ) );
_aPath = pUserData->maURL;
diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx
index dec1ee8392ba..610db9ca683b 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -4173,7 +4173,7 @@ void AutoRecovery::impl_showFullDiscError()
OUString sBackupURL(SvtPathOptions().GetBackupPath());
INetURLObject aConverter(sBackupURL);
sal_Unicode aDelimiter;
- OUString sBackupPath = aConverter.getFSysPath(INetURLObject::FSYS_DETECT, &aDelimiter);
+ OUString sBackupPath = aConverter.getFSysPath(FSysStyle::Detect, &aDelimiter);
if (sBackupPath.getLength() < 1)
sBackupPath = sBackupURL;
diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx b/framework/source/uielement/recentfilesmenucontroller.cxx
index c651b2e02a16..e609cf129237 100644
--- a/framework/source/uielement/recentfilesmenucontroller.cxx
+++ b/framework/source/uielement/recentfilesmenucontroller.cxx
@@ -184,7 +184,7 @@ void RecentFilesMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >
// Abbreviate URL
OUString aMenuTitle;
INetURLObject aURL( m_aRecentFilesItems[i] );
- OUString aTipHelpText( aURL.getFSysPath( INetURLObject::FSYS_DETECT ) );
+ OUString aTipHelpText( aURL.getFSysPath( FSysStyle::Detect ) );
if ( aURL.GetProtocol() == INetProtocol::File )
{
diff --git a/include/svl/urihelper.hxx b/include/svl/urihelper.hxx
index b26a43fcb49f..487dc92a137c 100644
--- a/include/svl/urihelper.hxx
+++ b/include/svl/urihelper.hxx
@@ -58,7 +58,7 @@ SVL_DLLPUBLIC OUString SmartRel2Abs(INetURLObject const & rTheBaseURIRef,
INetURLObject::DecodeMechanism eDecodeMechanism = INetURLObject::DecodeMechanism::ToIUri,
rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8,
bool bRelativeNonURIs = false,
- INetURLObject::FSysStyle eStyle = INetURLObject::FSYS_DETECT);
+ FSysStyle eStyle = FSysStyle::Detect);
SVL_DLLPUBLIC void SetMaybeFileHdl(Link<OUString *, bool> const & rTheMaybeFileHdl);
diff --git a/include/tools/urlobj.hxx b/include/tools/urlobj.hxx
index 52675f9ded13..a477e478ab18 100644
--- a/include/tools/urlobj.hxx
+++ b/include/tools/urlobj.hxx
@@ -25,6 +25,7 @@
#include <rtl/ustrbuf.hxx>
#include <rtl/textenc.h>
#include <sal/types.h>
+#include <o3tl/typed_flags_set.hxx>
#include <memory>
@@ -79,6 +80,101 @@ enum class INetProtocol
LAST = Cmis
};
+/** The supported notations for file system paths.
+ */
+enum class FSysStyle
+{
+ /** VOS notation (e.g., "//server/dir/file").
+ */
+ Vos = 0x1,
+
+ /** Unix notation (e.g., "/dir/file").
+ */
+ Unix = 0x2,
+
+ /** DOS notation (e.g., "a:\dir\file" and "\\server\dir\file").
+ */
+ Dos = 0x4,
+
+ /** Detect the used notation.
+
+ @descr For the following descriptions, please note that
+ whereas FSYS_DEFAULT includes all style bits, combinations of only
+ a few style bits are also possible, and are also described.
+
+ @descr When used to translate a file system path to a file URL,
+ the subset of the following productions for which the appropriate
+ style bit is set are checked in order (using the conventions of
+ RFC 2234, RFC 2396, and RFC 2732; UCS4 stands for any UCS4
+ character):
+
+ Production T1 (VOS local; FSysStyle::Vos only):
+ "//." ["/" *UCS4]
+ becomes
+ "file:///" *UCS4
+
+ Production T2 (VOS host; FSysStyle::Vos only):
+ "//" [host] ["/" *UCS4]
+ becomes
+ "file://" host "/" *UCS4
+
+ Production T3 (UNC; FSysStyle::Dos only):
+ "\\" [host] ["\" *UCS4]
+ becomes
+ "file://" host "/" *UCS4
+ replacing "\" by "/" within <*UCS4>
+
+ Production T4 (Unix-like DOS; FSysStyle::Dos only):
+ ALPHA ":" ["/" *UCS4]
+ becomes
+ "file:///" ALPHA ":/" *UCS4
+ replacing "\" by "/" within <*UCS4>
+
+ Production T5 (DOS; FSysStyle::Dos only):
+ ALPHA ":" ["\" *UCS4]
+ becomes
+ "file:///" ALPHA ":/" *UCS4
+ replacing "\" by "/" within <*UCS4>
+
+ Production T6 (any):
+ *UCS4
+ becomes
+ "file:///" *UCS4
+ replacing the delimiter by "/" within <*UCS4>. The delimiter is
+ that character from the set { "/", "\" } which appears most
+ often in <*UCS4> (if FSysStyle::Unix is not among the style bits, "/"
+ is removed from the set; if FSysStyle::Dos is not among the style
+ bits, "\" is removed from the set). If two or more
+ characters appear the same number of times, the character
+ mentioned first in that set is chosen. If the first character
+ of <*UCS4> is the delimiter, that character is not copied.
+
+ @descr When used to translate a file URL to a file system path,
+ the following productions are checked in order (using the
+ conventions of RFC 2234, RFC 2396, and RFC 2732):
+
+ Production F1 (VOS; FSysStyle::Vos):
+ "file://" host "/" fpath ["#" fragment]
+ becomes
+ "//" host "/" fpath
+
+ Production F2 (DOS; FSysStyle::Dos):
+ "file:///" ALPHA ":" ["/" fpath] ["#" fragment]
+ becomes
+ ALPHA ":" ["\" fpath]
+ replacing "/" by "\" in <fpath>
+
+ Production F3 (Unix; FSysStyle::Unix):
+ "file:///" fpath ["#" fragment]
+ becomes
+ "/" fpath
+ */
+ Detect = Vos | Unix | Dos
+};
+namespace o3tl {
+ template<> struct typed_flags<FSysStyle> : is_typed_flags<FSysStyle, 0x07> {};
+}
+
class SAL_WARN_UNUSED TOOLS_DLLPUBLIC INetURLObject
{
public:
@@ -205,103 +301,11 @@ public:
// Smart Parsing:
- /** The supported notations for file system paths.
- */
- enum FSysStyle
- {
- /** VOS notation (e.g., "//server/dir/file").
- */
- FSYS_VOS = 0x1,
-
- /** Unix notation (e.g., "/dir/file").
- */
- FSYS_UNX = 0x2,
-
- /** DOS notation (e.g., "a:\dir\file" and "\\server\dir\file").
- */
- FSYS_DOS = 0x4,
-
- /** Detect the used notation.
-
- @descr For the following descriptions, please note that
- whereas FSYS_DEFAULT includes all style bits, combinations of only
- a few style bits are also possible, and are also described.
-
- @descr When used to translate a file system path to a file URL,
- the subset of the following productions for which the appropriate
- style bit is set are checked in order (using the conventions of
- RFC 2234, RFC 2396, and RFC 2732; UCS4 stands for any UCS4
- character):
-
- Production T1 (VOS local; FSYS_VOS only):
- "//." ["/" *UCS4]
- becomes
- "file:///" *UCS4
-
- Production T2 (VOS host; FSYS_VOS only):
- "//" [host] ["/" *UCS4]
- becomes
- "file://" host "/" *UCS4
-
- Production T3 (UNC; FSYS_DOS only):
- "\\" [host] ["\" *UCS4]
- becomes
- "file://" host "/" *UCS4
- replacing "\" by "/" within <*UCS4>
-
- Production T4 (Unix-like DOS; FSYS_DOS only):
- ALPHA ":" ["/" *UCS4]
- becomes
- "file:///" ALPHA ":/" *UCS4
- replacing "\" by "/" within <*UCS4>
-
- Production T5 (DOS; FSYS_DOS only):
- ALPHA ":" ["\" *UCS4]
- becomes
- "file:///" ALPHA ":/" *UCS4
- replacing "\" by "/" within <*UCS4>
-
- Production T6 (any):
- *UCS4
- becomes
- "file:///" *UCS4
- replacing the delimiter by "/" within <*UCS4>. The delimiter is
- that character from the set { "/", "\" } which appears most
- often in <*UCS4> (if FSYS_UNX is not among the style bits, "/"
- is removed from the set; if FSYS_DOS is not among the style
- bits, "\" is removed from the set). If two or more
- characters appear the same number of times, the character
- mentioned first in that set is chosen. If the first character
- of <*UCS4> is the delimiter, that character is not copied.
-
- @descr When used to translate a file URL to a file system path,
- the following productions are checked in order (using the
- conventions of RFC 2234, RFC 2396, and RFC 2732):
-
- Production F1 (VOS; FSYS_VOS):
- "file://" host "/" fpath ["#" fragment]
- becomes
- "//" host "/" fpath
-
- Production F2 (DOS; FSYS_DOS):
- "file:///" ALPHA ":" ["/" fpath] ["#" fragment]
- becomes
- ALPHA ":" ["\" fpath]
- replacing "/" by "\" in <fpath>
-
- Production F3 (Unix; FSYS_UNX):
- "file:///" fpath ["#" fragment]
- becomes
- "/" fpath
- */
- FSYS_DETECT = FSYS_VOS | FSYS_UNX | FSYS_DOS
- };
-
inline INetURLObject(OUString const & rTheAbsURIRef,
INetProtocol eTheSmartScheme,
EncodeMechanism eMechanism = EncodeMechanism::WasEncoded,
rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8,
- FSysStyle eStyle = FSYS_DETECT);
+ FSysStyle eStyle = FSysStyle::Detect);
inline void SetSmartProtocol(INetProtocol eTheSmartScheme)
{ m_eSmartScheme = eTheSmartScheme; }
@@ -310,7 +314,7 @@ public:
SetSmartURL(OUString const & rTheAbsURIRef,
EncodeMechanism eMechanism = EncodeMechanism::WasEncoded,
rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8,
- FSysStyle eStyle = FSYS_DETECT);
+ FSysStyle eStyle = FSysStyle::Detect);
inline INetURLObject
smartRel2Abs(OUString const & rTheRelURIRef,
@@ -319,7 +323,7 @@ public:
EncodeMechanism eMechanism = EncodeMechanism::WasEncoded,
rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8,
bool bRelativeNonURIs = false,
- FSysStyle eStyle = FSYS_DETECT) const;
+ FSysStyle eStyle = FSysStyle::Detect) const;
// Relative URLs:
@@ -349,7 +353,7 @@ public:
EncodeMechanism eEncodeMechanism = EncodeMechanism::WasEncoded,
DecodeMechanism eDecodeMechanism = DecodeMechanism::ToIUri,
rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8,
- FSysStyle eStyle = FSYS_DETECT);
+ FSysStyle eStyle = FSysStyle::Detect);
// External URLs:
@@ -1230,7 +1234,7 @@ inline bool INetURLObject::GetNewAbsURL(OUString const & rTheRelURIRef,
bool bWasAbsolute;
if (!convertRelToAbs(rTheRelURIRef, aTheAbsURIRef, bWasAbsolute,
EncodeMechanism::WasEncoded, RTL_TEXTENCODING_UTF8, false/*bIgnoreFragment*/, false, false,
- FSYS_DETECT))
+ FSysStyle::Detect))
return false;
if (pTheAbsURIRef)
*pTheAbsURIRef = aTheAbsURIRef;
diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx
index bbbbf4a7abff..ee7ec4b8fa3d 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -447,7 +447,7 @@ OUString XclExpHyperlink::BuildFileName(
sal_uInt16& rnLevel, bool& rbRel, const OUString& rUrl, const XclExpRoot& rRoot, bool bEncoded )
{
INetURLObject aURLObject( rUrl );
- OUString aDosName( bEncoded ? aURLObject.GetURLPath() : aURLObject.getFSysPath( INetURLObject::FSYS_DOS ) );
+ OUString aDosName( bEncoded ? aURLObject.GetURLPath() : aURLObject.getFSysPath( FSysStyle::Dos ) );
rnLevel = 0;
rbRel = rRoot.IsRelUrl();
@@ -2015,7 +2015,7 @@ XclExpWebQueryBuffer::XclExpWebQueryBuffer( const XclExpRoot& rRoot )
OUString aAbsDoc( ScGlobal::GetAbsDocName( aUrl, pShell ) );
INetURLObject aUrlObj( aAbsDoc );
- OUString aWebQueryUrl( aUrlObj.getFSysPath( INetURLObject::FSYS_DOS ) );
+ OUString aWebQueryUrl( aUrlObj.getFSysPath( FSysStyle::Dos ) );
if( aWebQueryUrl.isEmpty() )
aWebQueryUrl = aAbsDoc;
diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx
index 05201d6f8c23..ba13ae29371f 100644
--- a/sc/source/filter/excel/xehelper.cxx
+++ b/sc/source/filter/excel/xehelper.cxx
@@ -964,8 +964,8 @@ OUString lclEncodeDosUrl(
OUString XclExpUrlHelper::EncodeUrl( const XclExpRoot& rRoot, const OUString& rAbsUrl, const OUString* pTableName )
{
- OUString aDosUrl = INetURLObject(rAbsUrl).getFSysPath(INetURLObject::FSYS_DOS);
- OUString aDosBase = INetURLObject(rRoot.GetBasePath()).getFSysPath(INetURLObject::FSYS_DOS);
+ OUString aDosUrl = INetURLObject(rAbsUrl).getFSysPath(FSysStyle::Dos);
+ OUString aDosBase = INetURLObject(rRoot.GetBasePath()).getFSysPath(FSysStyle::Dos);
return lclEncodeDosUrl(rRoot.GetBiff(), aDosUrl, aDosBase, pTableName);
}
diff --git a/sc/source/filter/excel/xihelper.cxx b/sc/source/filter/excel/xihelper.cxx
index c20dd531b0c0..2d85d64abf75 100644
--- a/sc/source/filter/excel/xihelper.cxx
+++ b/sc/source/filter/excel/xihelper.cxx
@@ -618,7 +618,7 @@ void XclImpUrlHelper::DecodeUrl(
rbSameWb = false;
sal_Unicode cCurrDrive = 0;
- OUString aDosBase( INetURLObject( rRoot.GetBasePath() ).getFSysPath( INetURLObject::FSYS_DOS ) );
+ OUString aDosBase( INetURLObject( rRoot.GetBasePath() ).getFSysPath( FSysStyle::Dos ) );
if (!aDosBase.isEmpty() && aDosBase.match(":\\", 1))
cCurrDrive = aDosBase[0];
diff --git a/sc/source/filter/orcus/orcusfiltersimpl.cxx b/sc/source/filter/orcus/orcusfiltersimpl.cxx
index 66a9ca29efab..a27f2707e154 100644
--- a/sc/source/filter/orcus/orcusfiltersimpl.cxx
+++ b/sc/source/filter/orcus/orcusfiltersimpl.cxx
@@ -33,9 +33,9 @@
#include <com/sun/star/task/XStatusIndicator.hpp>
#ifdef _WIN32
-#define SYSTEM_PATH INetURLObject::FSYS_DOS
+#define SYSTEM_PATH FSysStyle::Dos
#else
-#define SYSTEM_PATH INetURLObject::FSYS_UNX
+#define SYSTEM_PATH FSysStyle::Unix
#endif
using namespace com::sun::star;
diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx
index 0d917d66e906..3e28e9f12ada 100644
--- a/sd/source/ui/dlg/tpaction.cxx
+++ b/sd/source/ui/dlg/tpaction.cxx
@@ -732,7 +732,7 @@ void SdTPAction::SetEditText( OUString const & rStr )
INetURLObject aURL( aText );
// try to convert to system path
- OUString aTmpStr(aURL.getFSysPath(INetURLObject::FSYS_DETECT));
+ OUString aTmpStr(aURL.getFSysPath(FSysStyle::Detect));
if( !aTmpStr.isEmpty() )
aText = aTmpStr; // was a system path
diff --git a/sfx2/source/appl/shutdowniconaqua.mm b/sfx2/source/appl/shutdowniconaqua.mm
index 2d466b48458c..a969e07831b4 100644
--- a/sfx2/source/appl/shutdowniconaqua.mm
+++ b/sfx2/source/appl/shutdowniconaqua.mm
@@ -217,7 +217,7 @@ class RecentFilesStringLength : public ::cppu::WeakImplHelper< css::util::XStrin
{
// Do handle file URL differently => convert it to a system
// path and abbreviate it with a special function:
- ::rtl::OUString aSystemPath( aURL.getFSysPath( INetURLObject::FSYS_DETECT ) );
+ ::rtl::OUString aSystemPath( aURL.getFSysPath( FSysStyle::Detect ) );
::rtl::OUString aCompactedSystemPath;
oslFileError nError = osl_abbreviateSystemPath( aSystemPath.pData, &aCompactedSystemPath.pData, 46, nullptr );
diff --git a/sfx2/source/control/recentdocsviewitem.cxx b/sfx2/source/control/recentdocsviewitem.cxx
index 0c12f38e9ce3..5260f0540e6d 100644
--- a/sfx2/source/control/recentdocsviewitem.cxx
+++ b/sfx2/source/control/recentdocsviewitem.cxx
@@ -43,7 +43,7 @@ RecentDocsViewItem::RecentDocsViewItem(ThumbnailView &rView, const OUString &rUR
INetURLObject aURLObj(rURL);
if( aURLObj.GetProtocol() == INetProtocol::File )
- m_sHelpText = aURLObj.getFSysPath(INetURLObject::FSYS_DETECT);
+ m_sHelpText = aURLObj.getFSysPath(FSysStyle::Detect);
if( m_sHelpText.isEmpty() )
m_sHelpText = aURLObj.GetURLNoPass();
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index cf93b3cb6f43..f7aa774126a7 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -1241,7 +1241,7 @@ OUString ModelData_Impl::GetRecommendedName( const OUString& aSuggestedName, con
if ( xTypeDetection.is() )
{
INetURLObject aObj( "c:/" + aRecommendedName, INetProtocol::File,
- INetURLObject::EncodeMechanism::All, RTL_TEXTENCODING_UTF8, INetURLObject::FSYS_DOS );
+ INetURLObject::EncodeMechanism::All, RTL_TEXTENCODING_UTF8, FSysStyle::Dos );
OUString aExtension = GetRecommendedExtension( aTypeName );
if ( !aExtension.isEmpty() )
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 3e18546749a3..42d97d8ab626 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -408,7 +408,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
bool bIsWebDAV = aMedObj.isAnyKnownWebDAVScheme();
if ( ( !bNeedsReload && ( ( aMedObj.GetProtocol() == INetProtocol::File &&
- aMedObj.getFSysPath( INetURLObject::FSYS_DETECT ) != aPhysObj.getFSysPath( INetURLObject::FSYS_DETECT ) &&
+ aMedObj.getFSysPath( FSysStyle::Detect ) != aPhysObj.getFSysPath( FSysStyle::Detect ) &&
!bPhysObjIsYounger )
|| ( bIsWebDAV && !bPhysObjIsYounger )
|| ( pMed->IsRemote() && !bIsWebDAV ) ) )
diff --git a/svl/source/misc/urihelper.cxx b/svl/source/misc/urihelper.cxx
index 4673a8907079..50c8b79b7b48 100644
--- a/svl/source/misc/urihelper.cxx
+++ b/svl/source/misc/urihelper.cxx
@@ -60,7 +60,7 @@ OUString URIHelper::SmartRel2Abs(INetURLObject const & rTheBaseURIRef,
INetURLObject::DecodeMechanism eDecodeMechanism,
rtl_TextEncoding eCharset,
bool bRelativeNonURIs,
- INetURLObject::FSysStyle eStyle)
+ FSysStyle eStyle)
{
// Backwards compatibility:
if( rTheRelURIRef.startsWith("#") )
@@ -495,7 +495,7 @@ OUString URIHelper::FindFirstURLInText(OUString const & rText,
// Productions 1--4 use the given eMechanism and eCharset. Productions 5--9
// use EncodeMechanism::All.
- // Productions 6--9 are only applicable if the FSYS_DOS bit is set in
+ // Productions 6--9 are only applicable if the FSysStyle::Dos bit is set in
// eStyle.
bool bBoundary1 = true;
@@ -528,7 +528,7 @@ OUString URIHelper::FindFirstURLInText(OUString const & rText,
{
INetURLObject aUri(rText.copy(nPos, nUriEnd - nPos),
INetProtocol::File, eMechanism, eCharset,
- INetURLObject::FSYS_DETECT);
+ FSysStyle::Detect);
if (!aUri.HasError())
{
rBegin = nPos;
@@ -632,7 +632,7 @@ OUString URIHelper::FindFirstURLInText(OUString const & rText,
INetProtocol::File,
INetURLObject::EncodeMechanism::All,
RTL_TEXTENCODING_UTF8,
- INetURLObject::FSYS_DOS);
+ FSysStyle::Dos);
if (!aUri.HasError())
{
rBegin = nPos;
@@ -661,7 +661,7 @@ OUString URIHelper::FindFirstURLInText(OUString const & rText,
INetProtocol::File,
INetURLObject::EncodeMechanism::All,
RTL_TEXTENCODING_UTF8,
- INetURLObject::FSYS_DOS);
+ FSysStyle::Dos);
if (!aUri.HasError())
{
rBegin = nPos;
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx
index 335ef8ba094e..218d0b53b8a3 100644
--- a/svtools/source/contnr/fileview.cxx
+++ b/svtools/source/contnr/fileview.cxx
@@ -256,7 +256,7 @@ NameTranslationList::NameTranslationList( const INetURLObject& rBaseURL ):
if( aTestContent.isDocument() )
{
// ... also tests the existence of maTransFile by throwing an Exception
- OUString aFsysName( maTransFile.getFSysPath( INetURLObject::FSYS_DETECT ) );
+ OUString aFsysName( maTransFile.getFSysPath( FSysStyle::Detect ) );
Config aConfig( aFsysName );
aConfig.SetGroup( OString("TRANSLATIONNAMES") );
diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx
index ed73fb92674a..6e4ad01aa508 100644
--- a/svtools/source/control/inettbc.cxx
+++ b/svtools/source/control/inettbc.cxx
@@ -415,7 +415,7 @@ void SvtMatchContext_Impl::ReadFolder( const OUString& rURL,
sal_Unicode aDelimiter = '/';
if ( bSmart )
// when parsing is done "smart", the delimiter must be "guessed"
- aObj.getFSysPath( (INetURLObject::FSysStyle)(INetURLObject::FSYS_DETECT & ~INetURLObject::FSYS_VOS), &aDelimiter );
+ aObj.getFSysPath( (FSysStyle)(FSysStyle::Detect & ~FSysStyle::Vos), &aDelimiter );
if ( bIsFolder )
aObj.setFinalSlash();
diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx
index df1ce017507e..7e4cdcac4fc8 100644
--- a/svx/source/gallery2/galbrws2.cxx
+++ b/svx/source/gallery2/galbrws2.cxx
@@ -1234,12 +1234,12 @@ OUString GalleryBrowser2::GetItemText( const GalleryTheme& rTheme, const SgaObje
if( nItemTextFlags & GalleryItemFlags::Path )
{
- const OUString aPath( aURL.getFSysPath( INetURLObject::FSYS_DETECT ) );
+ const OUString aPath( aURL.getFSysPath( FSysStyle::Detect ) );
if( !aPath.isEmpty() && ( nItemTextFlags & GalleryItemFlags::Title ) )
aRet += " (";
- aRet += aURL.getFSysPath( INetURLObject::FSYS_DETECT );
+ aRet += aURL.getFSysPath( FSysStyle::Detect );
if( !aPath.isEmpty() && ( nItemTextFlags & GalleryItemFlags::Title ) )
aRet += ")";
diff --git a/svx/source/gallery2/galmisc.cxx b/svx/source/gallery2/galmisc.cxx
index 765ad392030b..180cec48a1ae 100644
--- a/svx/source/gallery2/galmisc.cxx
+++ b/svx/source/gallery2/galmisc.cxx
@@ -195,7 +195,7 @@ OUString GetReducedString( const INetURLObject& rURL, sal_Int32 nMaxLen )
if( INetProtocol::PrivSoffice != rURL.GetProtocol() )
{
sal_Unicode aDelimiter;
- const OUString aPath( rURL.getFSysPath( INetURLObject::FSYS_DETECT, &aDelimiter ) );
+ const OUString aPath( rURL.getFSysPath( FSysStyle::Detect, &aDelimiter ) );
const OUString aName( aReduced );
if( aPath.getLength() > nMaxLen )
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index 2f61d329b8dd..f23072cd3b90 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -139,7 +139,7 @@ OUString SwBasicEscherEx::GetBasePath()
OUString SwBasicEscherEx::BuildFileName(sal_uInt16& rnLevel, bool& rbRel, const OUString& rUrl)
{
- OUString aDosName( INetURLObject( rUrl ).getFSysPath( INetURLObject::FSYS_DOS ) );
+ OUString aDosName( INetURLObject( rUrl ).getFSysPath( FSysStyle::Dos ) );
rnLevel = 0;
rbRel = IsRelUrl();
diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx b/sw/source/ui/dbui/mmresultdialogs.cxx
index 78836ebaf028..a8527de8147a 100644
--- a/sw/source/ui/dbui/mmresultdialogs.cxx
+++ b/sw/source/ui/dbui/mmresultdialogs.cxx
@@ -674,7 +674,7 @@ IMPL_LINK(SwMMResultSaveDialog, SaveOutputHdl_Impl, Button*, pButton, void)
ScopedVclPtrInstance< PrintMonitor > aSaveMonitor(this, false, PrintMonitor::MONITOR_TYPE_SAVE);
aSaveMonitor->m_pDocName->SetText(pSourceView->GetDocShell()->GetTitle(22));
aSaveMonitor->SetCancelHdl(LINK(this, SwMMResultSaveDialog, SaveCancelHdl_Impl));
- aSaveMonitor->m_pPrinter->SetText( INetURLObject( sPath ).getFSysPath( INetURLObject::FSYS_DETECT ) );
+ aSaveMonitor->m_pPrinter->SetText( INetURLObject( sPath ).getFSysPath( FSysStyle::Detect ) );
m_bCancelSaving = false;
aSaveMonitor->Show();
diff --git a/tools/qa/cppunit/test_urlobj.cxx b/tools/qa/cppunit/test_urlobj.cxx
index c2f2cf78d3bf..d2b74237cab8 100644
--- a/tools/qa/cppunit/test_urlobj.cxx
+++ b/tools/qa/cppunit/test_urlobj.cxx
@@ -73,7 +73,7 @@ namespace tools_urlobj
INetURLObject aUrl;
aUrl.
setFSysPath( "\\\\137.65.170.24\\c$\\Img0001.jpg",
- INetURLObject::FSYS_DETECT );
+ FSysStyle::Detect );
#ifdef LINUX
CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::DecodeMechanism::NONE )
== "smb://137.65.170.24/c$/Img0001.jpg" );
@@ -99,7 +99,7 @@ namespace tools_urlobj
INetURLObject aUrl;
aUrl.
setFSysPath( "\\\\hive-winxp-x86\\pmladek\\test2.odt",
- INetURLObject::FSYS_DETECT );
+ FSysStyle::Detect );
#ifdef LINUX
CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::DecodeMechanism::NONE )
== "smb://hive-winxp-x86/pmladek/test2.odt" );
@@ -142,7 +142,7 @@ namespace tools_urlobj
{
INetURLObject aUrl;
aUrl.setFSysPath( "//137.65.170.24/c$/Img0001.jpg",
- INetURLObject::FSYS_DETECT );
+ FSysStyle::Detect );
#ifdef LINUX
CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::DecodeMechanism::NONE )
== "smb://137.65.170.24/c$/Img0001.jpg" );
@@ -167,7 +167,7 @@ namespace tools_urlobj
{
INetURLObject aUrl;
aUrl.setFSysPath( "//hive-winxp-x86/pmladek/test2.odt",
- INetURLObject::FSYS_DETECT );
+ FSysStyle::Detect );
#ifdef LINUX
CPPUNIT_ASSERT( aUrl.GetMainURL( INetURLObject::DecodeMechanism::NONE )
== "smb://hive-winxp-x86/pmladek/test2.odt" );
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index 73384cde65cf..b402d441a5d6 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -614,22 +614,22 @@ std::unique_ptr<SvMemoryStream> INetURLObject::getData()
namespace {
-INetURLObject::FSysStyle guessFSysStyleByCounting(sal_Unicode const * pBegin,
+FSysStyle guessFSysStyleByCounting(sal_Unicode const * pBegin,
sal_Unicode const * pEnd,
- INetURLObject::FSysStyle eStyle)
+ FSysStyle eStyle)
{
DBG_ASSERT(eStyle
- & (INetURLObject::FSYS_UNX
- | INetURLObject::FSYS_DOS),
+ & (FSysStyle::Unix
+ | FSysStyle::Dos),
"guessFSysStyleByCounting(): Bad style");
DBG_ASSERT(std::numeric_limits< sal_Int32 >::min() < pBegin - pEnd
&& pEnd - pBegin <= std::numeric_limits< sal_Int32 >::max(),
"guessFSysStyleByCounting(): Too big");
sal_Int32 nSlashCount
- = (eStyle & INetURLObject::FSYS_UNX) ?
+ = (eStyle & FSysStyle::Unix) ?
0 : std::numeric_limits< sal_Int32 >::min();
sal_Int32 nBackslashCount
- = (eStyle & INetURLObject::FSYS_DOS) ?
+ = (eStyle & FSysStyle::Dos) ?
0 : std::numeric_limits< sal_Int32 >::min();
while (pBegin != pEnd)
switch (*pBegin++)
@@ -643,7 +643,7 @@ INetURLObject::FSysStyle guessFSysStyleByCounting(sal_Unicode const * pBegin,
break;
}
return nSlashCount >= nBackslashCount ?
- INetURLObject::FSYS_UNX : INetURLObject::FSYS_DOS;
+ FSysStyle::Unix : FSysStyle::Dos;
}
OUString parseScheme(
@@ -736,11 +736,11 @@ bool INetURLObject::setAbsURIRef(OUString const & rTheAbsURIRef,
// "//" (domain / IPv6reference) ["/" *UCS4]
// 6th Production (Unix file):
// "/" *UCS4
- // 7th Production (UNC file; FSYS_DOS only):
+ // 7th Production (UNC file; FSysStyle::Dos only):
// "\\" domain ["\" *UCS4]
- // 8th Production (Unix-like DOS file; FSYS_DOS only):
+ // 8th Production (Unix-like DOS file; FSysStyle::Dos only):
// ALPHA ":" ["/" *UCS4]
- // 9th Production (DOS file; FSYS_DOS only):
+ // 9th Production (DOS file; FSysStyle::Dos only):
// ALPHA ":" ["\" *UCS4]
// For the 'non URL' file productions 6--9, the interpretation of
@@ -749,7 +749,7 @@ bool INetURLObject::setAbsURIRef(OUString const & rTheAbsURIRef,
// taken as literal characters.
sal_Unicode const * p1 = pPos;
- if (eStyle & FSYS_DOS
+ if (eStyle & FSysStyle::Dos
&& pEnd - p1 >= 2
&& rtl::isAsciiAlpha(p1[0])
&& p1[1] == ':'
@@ -772,7 +772,7 @@ bool INetURLObject::setAbsURIRef(OUString const & rTheAbsURIRef,
eMechanism = EncodeMechanism::All;
nFragmentDelimiter = 0x80000000;
}
- else if (eStyle & FSYS_DOS
+ else if (eStyle & FSysStyle::Dos
&& pEnd - p1 >= 2
&& p1[0] == '\\'
&& p1[1] == '\\')
@@ -1037,12 +1037,12 @@ bool INetURLObject::setAbsURIRef(OUString const & rTheAbsURIRef,
}
}
- // 2nd Production (MS IE generated 1; FSYS_DOS only):
+ // 2nd Production (MS IE generated 1; FSysStyle::Dos only):
// "//" ALPHA ":" ["/" *path] ["#" *UCS4]
// becomes
// "file:///" ALPHA ":" ["/" *path] ["#" *UCS4]
// replacing "\" by "/" within <*path>
- // 3rd Production (MS IE generated 2; FSYS_DOS only):
+ // 3rd Production (MS IE generated 2; FSysStyle::Dos only):
// "//" ALPHA ":" ["\" *path] ["#" *UCS4]
// becomes
// "file:///" ALPHA ":" ["/" *path] ["#" *UCS4]
@@ -1056,7 +1056,7 @@ bool INetURLObject::setAbsURIRef(OUString const & rTheAbsURIRef,
aSynAbsURIRef.append("//");
pPos += 2;
bSkippedInitialSlash = true;
- if ((eStyle & FSYS_DOS) != 0
+ if ((eStyle & FSysStyle::Dos)
&& pEnd - pPos >= 2
&& rtl::isAsciiAlpha(pPos[0])
&& pPos[1] == ':'
@@ -1076,12 +1076,12 @@ bool INetURLObject::setAbsURIRef(OUString const & rTheAbsURIRef,
break;
}
- // 6th Production (UNC; FSYS_DOS only):
+ // 6th Production (UNC; FSysStyle::Dos only):
// "\\" domain ["\" *path] ["#" *UCS4]
// becomes
// "file://" domain "/" *path ["#" *UCS4]
// replacing "\" by "/" within <*path>
- if (eStyle & FSYS_DOS
+ if (eStyle & FSysStyle::Dos
&& pEnd - pPos >= 2
&& pPos[0] == '\\'
&& pPos[1] == '\\')
@@ -1109,17 +1109,17 @@ bool INetURLObject::setAbsURIRef(OUString const & rTheAbsURIRef,
}
}
- // 7th Production (Unix-like DOS; FSYS_DOS only):
+ // 7th Production (Unix-like DOS; FSysStyle::Dos only):
// ALPHA ":" ["/" *path] ["#" *UCS4]
// becomes
// "file:///" ALPHA ":" ["/" *path] ["#" *UCS4]
// replacing "\" by "/" within <*path>
- // 8th Production (DOS; FSYS_DOS only):
+ // 8th Production (DOS; FSysStyle::Dos only):
// ALPHA ":" ["\" *path] ["#" *UCS4]
// becomes
// "file:///" ALPHA ":" ["/" *path] ["#" *UCS4]
// replacing "\" by "/" within <*path>
- if (eStyle & FSYS_DOS
+ if (eStyle & FSysStyle::Dos
&& pEnd - pPos >= 2
&& rtl::isAsciiAlpha(pPos[0])
&& pPos[1] == ':'
@@ -1139,24 +1139,24 @@ bool INetURLObject::setAbsURIRef(OUString const & rTheAbsURIRef,
// "file:///" *path ["#" *UCS4]
// replacing the delimiter by "/" within <*path>. The
// delimiter is that character from the set { "/", "\"}
- // which appears most often in <*path> (if FSYS_UNX
+ // which appears most often in <*path> (if FSysStyle::Unix
// is not among the style bits, "/" is removed from the
- // set; if FSYS_DOS is not among the style bits, "\" is
+ // set; if FSysStyle::Dos is not among the style bits, "\" is
// removed from the set). If two or
// more characters appear the same number of times, the
// character mentioned first in that set is chosen. If
// the first character of <*path> is the delimiter, that
// character is not copied
- if (eStyle & (FSYS_UNX | FSYS_DOS))
+ if (eStyle & (FSysStyle::Unix | FSysStyle::Dos))
{
aSynAbsURIRef.append("//");
switch (guessFSysStyleByCounting(pPos, pEnd, eStyle))
{
- case FSYS_UNX:
+ case FSysStyle::Unix:
nSegmentDelimiter = '/';
break;
- case FSYS_DOS:
+ case FSysStyle::Dos:
nSegmentDelimiter = '\\';
break;
@@ -1511,13 +1511,13 @@ bool INetURLObject::convertRelToAbs(OUString const & rTheRelURIRef,
// alphanum = ALPHA / DIGIT
// UCS4 = <any UCS4 character>
- // 1st Production (UNC file; FSYS_DOS only):
+ // 1st Production (UNC file; FSysStyle::Dos only):
// "\\" domain ["\" *UCS4]
- // 2nd Production (Unix-like DOS file; FSYS_DOS only):
+ // 2nd Production (Unix-like DOS file; FSysStyle::Dos only):
// ALPHA ":" ["/" *UCS4]
- // 3rd Production (DOS file; FSYS_DOS only):
+ // 3rd Production (DOS file; FSysStyle::Dos only):
// ALPHA ":" ["\" *UCS4]
- if (eStyle & FSYS_DOS)
+ if (eStyle & FSysStyle::Dos)
{
bool bFSys = false;
sal_Unicode const * q = p;
@@ -1559,11 +1559,11 @@ bool INetURLObject::convertRelToAbs(OUString const & rTheRelURIRef,
if (m_eScheme == INetProtocol::File)
switch (guessFSysStyleByCounting(p, pEnd, eStyle))
{
- case FSYS_UNX:
+ case FSysStyle::Unix:
nSegmentDelimiter = '/';
break;
- case FSYS_DOS:
+ case FSysStyle::Dos:
nSegmentDelimiter = '\\';
bRelativeNonURIs = true;
break;
@@ -3353,7 +3353,7 @@ bool INetURLObject::setFragment(OUString const & rTheFragment,
bool INetURLObject::hasDosVolume(FSysStyle eStyle) const
{
sal_Unicode const * p = m_aAbsURIRef.getStr() + m_aPath.getBegin();
- return (eStyle & FSYS_DOS) != 0
+ return (eStyle & FSysStyle::Dos)
&& m_aPath.getLength() >= 3
&& p[0] == '/'
&& rtl::isAsciiAlpha(p[1])
@@ -3839,7 +3839,7 @@ OUString INetURLObject::GetAbsURL(OUString const & rTheBaseURIRef,
convertRelToAbs(rTheRelURIRef, aTheAbsURIRef,
bWasAbsolute, eEncodeMechanism,
eCharset, bIgnoreFragment, false,
- false, FSYS_DETECT)
+ false, FSysStyle::Detect)
|| eEncodeMechanism != EncodeMechanism::WasEncoded
|| eDecodeMechanism != DecodeMechanism::ToIUri
|| eCharset != RTL_TEXTENCODING_UTF8 ?
@@ -4261,9 +4261,9 @@ bool INetURLObject::setFSysPath(OUString const & rFSysPath,
sal_Unicode const * pFSysBegin = rFSysPath.getStr();
sal_Unicode const * pFSysEnd = pFSysBegin + rFSysPath.getLength();
- switch (((eStyle & FSYS_VOS) ? 1 : 0)
- + ((eStyle & FSYS_UNX) ? 1 : 0)
- + ((eStyle & FSYS_DOS) ? 1 : 0))
+ switch (((eStyle & FSysStyle::Vos) ? 1 : 0)
+ + ((eStyle & FSysStyle::Unix) ? 1 : 0)
+ + ((eStyle & FSysStyle::Dos) ? 1 : 0))
{
case 0:
return false;
@@ -4272,7 +4272,7 @@ bool INetURLObject::setFSysPath(OUString const & rFSysPath,
break;
default:
- if (eStyle & FSYS_VOS
+ if (eStyle & FSysStyle::Vos
&& pFSysEnd - pFSysBegin >= 2
&& pFSysBegin[0] == '/'
&& pFSysBegin[1] == '/')
@@ -4281,7 +4281,7 @@ bool INetURLObject::setFSysPath(OUString const & rFSysPath,
&& pFSysBegin[2] == '.'
&& (pFSysEnd - pFSysBegin == 3 || pFSysBegin[3] == '/'))
{
- eStyle = FSYS_VOS; // Production T1
+ eStyle = FSysStyle::Vos; // Production T1
break;
}
@@ -4290,12 +4290,12 @@ bool INetURLObject::setFSysPath(OUString const & rFSysPath,
if (parseHost(p, pFSysEnd, aHost)
&& (p == pFSysEnd || *p == '/'))
{
- eStyle = FSYS_VOS; // Production T2
+ eStyle = FSysStyle::Vos; // Production T2
break;
}
}
- if (eStyle & FSYS_DOS
+ if (eStyle & FSysStyle::Dos
&& pFSysEnd - pFSysBegin >= 2
&& pFSysBegin[0] == '\\'
&& pFSysBegin[1] == '\\')
@@ -4305,12 +4305,12 @@ bool INetURLObject::setFSysPath(OUString const & rFSysPath,
if (parseHost(p, pFSysEnd, aHost)
&& (p == pFSysEnd || *p == '\\'))
{
- eStyle = FSYS_DOS; // Production T3
+ eStyle = FSysStyle::Dos; // Production T3
break;
}
}
- if (eStyle & FSYS_DOS
+ if (eStyle & FSysStyle::Dos
&& pFSysEnd - pFSysBegin >= 2
&& rtl::isAsciiAlpha(pFSysBegin[0])
&& pFSysBegin[1] == ':'
@@ -4318,11 +4318,11 @@ bool INetURLObject::setFSysPath(OUString const & rFSysPath,
|| pFSysBegin[2] == '/'
|| pFSysBegin[2] == '\\'))
{
- eStyle = FSYS_DOS; // Productions T4, T5
+ eStyle = FSysStyle::Dos; // Productions T4, T5
break;
}
- if (!(eStyle & (FSYS_UNX | FSYS_DOS)))
+ if (!(eStyle & (FSysStyle::Unix | FSysStyle::Dos)))
return false;
eStyle = guessFSysStyleByCounting(pFSysBegin, pFSysEnd, eStyle);
@@ -4334,7 +4334,7 @@ bool INetURLObject::setFSysPath(OUString const & rFSysPath,
switch (eStyle)
{
- case FSYS_VOS:
+ case FSysStyle::Vos:
{
sal_Unicode const * p = pFSysBegin;
if (pFSysEnd - p < 2 || *p++ != '/' || *p++ != '/')
@@ -4357,7 +4357,7 @@ bool INetURLObject::setFSysPath(OUString const & rFSysPath,
break;
}
- case FSYS_UNX:
+ case FSysStyle::Unix:
{
sal_Unicode const * p = pFSysBegin;
if (p != pFSysEnd && *p != '/')
@@ -4378,7 +4378,7 @@ bool INetURLObject::setFSysPath(OUString const & rFSysPath,
break;
}
- case FSYS_DOS:
+ case FSysStyle::Dos:
{
sal_uInt32 nAltDelimiter = 0x80000000;
sal_Unicode const * p = pFSysBegin;
@@ -4432,29 +4432,29 @@ OUString INetURLObject::getFSysPath(FSysStyle eStyle,
if (m_eScheme != INetProtocol::File)
return OUString();
- if (((eStyle & FSYS_VOS) ? 1 : 0)
- + ((eStyle & FSYS_UNX) ? 1 : 0)
- + ((eStyle & FSYS_DOS) ? 1 : 0)
+ if (((eStyle & FSysStyle::Vos) ? 1 : 0)
+ + ((eStyle & FSysStyle::Unix) ? 1 : 0)
+ + ((eStyle & FSysStyle::Dos) ? 1 : 0)
> 1)
{
- eStyle = eStyle & FSYS_VOS
+ eStyle = eStyle & FSysStyle::Vos
&& m_aHost.isPresent()
&& m_aHost.getLength() > 0 ?
- FSYS_VOS :
+ FSysStyle::Vos :
hasDosVolume(eStyle)
- || ((eStyle & FSYS_DOS) != 0
+ || ((eStyle & FSysStyle::Dos)
&& m_aHost.isPresent()
&& m_aHost.getLength() > 0) ?
- FSYS_DOS :
- eStyle & FSYS_UNX
+ FSysStyle::Dos :
+ eStyle & FSysStyle::Unix
&& (!m_aHost.isPresent() || m_aHost.getLength() == 0) ?
- FSYS_UNX :
+ FSysStyle::Unix :
FSysStyle(0);
}
switch (eStyle)
{
- case FSYS_VOS:
+ case FSysStyle::Vos:
{
if (pDelimiter)
*pDelimiter = '/';
@@ -4471,7 +4471,7 @@ OUString INetURLObject::getFSysPath(FSysStyle eStyle,
return aSynFSysPath.makeStringAndClear();
}
- case FSYS_UNX:
+ case FSysStyle::Unix:
{
if (m_aHost.isPresent() && m_aHost.getLength() > 0)
return OUString();
@@ -4482,7 +4482,7 @@ OUString INetURLObject::getFSysPath(FSysStyle eStyle,
return decode(m_aPath, DecodeMechanism::WithCharset, RTL_TEXTENCODING_UTF8);
}
- case FSYS_DOS:
+ case FSysStyle::Dos:
{
if (pDelimiter)
*pDelimiter = '\\';
diff --git a/vcl/unx/generic/fontmanager/fontmanager.cxx b/vcl/unx/generic/fontmanager/fontmanager.cxx
index b660d73b54b2..8e7ab173e810 100644
--- a/vcl/unx/generic/fontmanager/fontmanager.cxx
+++ b/vcl/unx/generic/fontmanager/fontmanager.cxx
@@ -175,7 +175,7 @@ int PrintFontManager::getDirectoryAtom( const OString& rDirectory, bool bCreate
std::vector<fontID> PrintFontManager::addFontFile( const OString& rFileName )
{
rtl_TextEncoding aEncoding = osl_getThreadTextEncoding();
- INetURLObject aPath( OStringToOUString( rFileName, aEncoding ), INetURLObject::FSYS_DETECT );
+ INetURLObject aPath( OStringToOUString( rFileName, aEncoding ), FSysStyle::Detect );
OString aName( OUStringToOString( aPath.GetName( INetURLObject::DecodeMechanism::WithCharset, aEncoding ), aEncoding ) );
OString aDir( OUStringToOString(
INetURLObject::decode( aPath.GetPath(), INetURLObject::DecodeMechanism::WithCharset, aEncoding ), aEncoding ) );
diff --git a/vcl/unx/gtk/fpicker/SalGtkPicker.cxx b/vcl/unx/gtk/fpicker/SalGtkPicker.cxx
index d7f72b26f19b..dbbec941ce23 100644
--- a/vcl/unx/gtk/fpicker/SalGtkPicker.cxx
+++ b/vcl/unx/gtk/fpicker/SalGtkPicker.cxx
@@ -62,7 +62,7 @@ OUString SalGtkPicker::uritounicode(const gchar* pIn)
OUString sEncoded(pEncodedFileName, strlen(pEncodedFileName),
osl_getThreadTextEncoding());
g_free (pEncodedFileName);
- INetURLObject aCurrentURL(sEncoded, INetURLObject::FSYS_UNX);
+ INetURLObject aCurrentURL(sEncoded, FSysStyle::Unix);
aCurrentURL.SetHost(aURL.GetHost());
sURL = aCurrentURL.getExternalURL();
}
diff --git a/xmlsecurity/source/dialogs/macrosecurity.cxx b/xmlsecurity/source/dialogs/macrosecurity.cxx
index 62f67cbfd31e..01d188049996 100644
--- a/xmlsecurity/source/dialogs/macrosecurity.cxx
+++ b/xmlsecurity/source/dialogs/macrosecurity.cxx
@@ -270,7 +270,7 @@ IMPL_LINK_NOARG(MacroSecurityTrustedSourcesTP, AddLocPBHdl, Button*, void)
// then the new path also an URL else system path
OUString aSystemFileURL = ( aNewObj.GetProtocol() != INetProtocol::NotValid ) ?
- aPathStr : aNewObj.getFSysPath( INetURLObject::FSYS_DETECT );
+ aPathStr : aNewObj.getFSysPath( FSysStyle::Detect );
OUString aNewPathStr(aSystemFileURL);
diff --git a/xmlsecurity/workben/signaturetest.cxx b/xmlsecurity/workben/signaturetest.cxx
index 252e4882cfaa..97309c2f159e 100644
--- a/xmlsecurity/workben/signaturetest.cxx
+++ b/xmlsecurity/workben/signaturetest.cxx
@@ -236,7 +236,7 @@ MyWin::MyWin( vcl::Window* pParent, WinBits nWinStyle ) :
::osl::File::getTempDirURL( aTempDirURL );
INetURLObject aURLObj( aTempDirURL );
aURLObj.insertName( "nss", true );
- OUString aNSSFolder = aURLObj.getFSysPath( INetURLObject::FSYS_DETECT );
+ OUString aNSSFolder = aURLObj.getFSysPath( FSysStyle::Detect );
maEditXMLFileName.SetText( aNSSFolder + "demo-sample.xml" );
maEditBINFileName.SetText( aNSSFolder + "demo-sample.gif" );
maEditDOCFileName.SetText( aNSSFolder + "demo-sample.sxw" );