[Libreoffice-commits] core.git: 5 commits - avmedia/source basctl/source basic/source connectivity/source cui/source dbaccess/source desktop/source editeng/source extensions/source filter/source forms/source fpicker/source framework/source include/o3tl include/svl include/svtools include/tools linguistic/source reportdesign/source sc/source sd/source sfx2/source solenv/gbuild sot/source svl/source svtools/source svx/source sw/source toolkit/source tools/qa tools/source ucb/source unotools/source vbahelper/source vcl/source vcl/unx xmloff/source xmlsecurity/source
Stephan Bergmann
sbergman at redhat.com
Thu Apr 2 07:31:11 PDT 2015
avmedia/source/framework/modeltools.cxx | 2
avmedia/source/viewer/mediawindow.cxx | 2
avmedia/source/viewer/mediawindow_impl.cxx | 2
basctl/source/basicide/baside2b.cxx | 2
basctl/source/basicide/moduldl2.cxx | 2
basic/source/basmgr/basicmanagerrepository.cxx | 2
basic/source/basmgr/basmgr.cxx | 18
basic/source/runtime/methods.cxx | 2
basic/source/runtime/methods1.cxx | 2
connectivity/source/drivers/calc/CConnection.cxx | 4
connectivity/source/drivers/dbase/DTable.cxx | 6
connectivity/source/drivers/file/FConnection.cxx | 2
connectivity/source/drivers/file/FDatabaseMetaData.cxx | 2
connectivity/source/drivers/flat/ETable.cxx | 2
cui/source/dialogs/cuigaldlg.cxx | 2
cui/source/dialogs/cuihyperdlg.cxx | 16
cui/source/dialogs/hldocntp.cxx | 10
cui/source/dialogs/hldoctp.cxx | 6
cui/source/dialogs/hlinettp.cxx | 14
cui/source/dialogs/hlmailtp.cxx | 12
cui/source/dialogs/hltpbase.cxx | 8
cui/source/dialogs/insdlg.cxx | 6
cui/source/dialogs/linkdlg.cxx | 6
cui/source/inc/hltpbase.hxx | 2
cui/source/options/doclinkdialog.cxx | 4
cui/source/options/optlingu.cxx | 4
cui/source/options/optpath.cxx | 6
cui/source/options/treeopt.cxx | 2
cui/source/tabpages/backgrnd.cxx | 4
cui/source/tabpages/numpages.cxx | 4
cui/source/tabpages/tpbitmap.cxx | 4
cui/source/tabpages/tpcolor.cxx | 2
cui/source/tabpages/tpgradnt.cxx | 4
cui/source/tabpages/tphatch.cxx | 4
cui/source/tabpages/tpline.cxx | 4
cui/source/tabpages/tplnedef.cxx | 4
cui/source/tabpages/tplneend.cxx | 4
dbaccess/source/core/dataaccess/ModelImpl.cxx | 2
dbaccess/source/core/dataaccess/databasecontext.cxx | 2
dbaccess/source/core/dataaccess/databaseregistrations.cxx | 2
dbaccess/source/core/dataaccess/datasource.cxx | 2
dbaccess/source/ext/macromigration/macromigrationpages.cxx | 2
dbaccess/source/ui/app/AppController.cxx | 2
dbaccess/source/ui/browser/unodatbr.cxx | 4
dbaccess/source/ui/dlg/ConnectionHelper.cxx | 2
dbaccess/source/ui/dlg/dbfindex.cxx | 6
dbaccess/source/ui/dlg/dbwizsetup.cxx | 2
dbaccess/source/ui/dlg/sqlmessage.cxx | 2
dbaccess/source/ui/misc/UITools.cxx | 2
desktop/source/app/dispatchwatcher.cxx | 2
editeng/source/items/flditem.cxx | 6
editeng/source/misc/svxacorr.cxx | 4
extensions/source/abpilot/abpfinalpage.cxx | 4
extensions/source/bibliography/general.cxx | 2
extensions/source/dbpilots/controlwizard.cxx | 2
extensions/source/plugin/base/context.cxx | 2
extensions/source/plugin/base/xplugin.cxx | 2
extensions/source/propctrlr/formcomponenthandler.cxx | 6
extensions/source/propctrlr/pcrcommon.cxx | 4
filter/source/msfilter/msdffimp.cxx | 2
filter/source/msfilter/msvbahelper.cxx | 4
filter/source/pdf/pdfexport.cxx | 4
forms/source/component/DatabaseForm.cxx | 8
forms/source/component/clickableimage.cxx | 2
forms/source/xforms/submission/submission_get.cxx | 2
fpicker/source/office/OfficeControlAccess.cxx | 4
fpicker/source/office/iodlg.cxx | 28
framework/source/classes/menumanager.cxx | 2
framework/source/fwe/helper/titlehelper.cxx | 2
framework/source/services/urltransformer.cxx | 10
framework/source/uielement/generictoolbarcontroller.cxx | 4
framework/source/uielement/recentfilesmenucontroller.cxx | 2
include/o3tl/enumarray.hxx | 23
include/svl/inethist.hxx | 8
include/svtools/inettbc.hxx | 6
include/svtools/place.hxx | 2
include/tools/urlobj.hxx | 85 +-
linguistic/source/convdiclist.cxx | 6
linguistic/source/misc2.cxx | 2
reportdesign/source/ui/inspection/DefaultInspection.cxx | 2
sc/source/filter/excel/xecontent.cxx | 6
sc/source/filter/html/htmlexp.cxx | 12
sc/source/filter/xml/xmltabi.cxx | 2
sc/source/ui/docshell/docsh.cxx | 4
sc/source/ui/docshell/docsh8.cxx | 4
sc/source/ui/docshell/tablink.cxx | 2
sc/source/ui/drawfunc/fuins2.cxx | 2
sc/source/ui/vba/vbaworkbooks.cxx | 2
sd/source/filter/eppt/epptso.cxx | 8
sd/source/filter/html/htmlex.cxx | 8
sd/source/filter/html/pubdlg.cxx | 2
sd/source/filter/ppt/pptin.cxx | 4
sd/source/ui/dlg/PhotoAlbumDialog.cxx | 6
sd/source/ui/dlg/dlgass.cxx | 2
sd/source/ui/dlg/navigatr.cxx | 2
sd/source/ui/dlg/sdtreelb.cxx | 2
sd/source/ui/dlg/tpaction.cxx | 2
sd/source/ui/func/fuinsert.cxx | 4
sd/source/ui/func/fusel.cxx | 2
sd/source/ui/slideshow/slideshowimpl.cxx | 2
sd/source/ui/view/sdview4.cxx | 2
sfx2/source/appl/appdde.cxx | 2
sfx2/source/appl/appopen.cxx | 12
sfx2/source/appl/fileobj.cxx | 2
sfx2/source/appl/imagemgr.cxx | 4
sfx2/source/appl/linkmgr2.cxx | 6
sfx2/source/appl/newhelp.cxx | 4
sfx2/source/appl/opengrf.cxx | 2
sfx2/source/appl/sfxhelp.cxx | 2
sfx2/source/appl/sfxpicklist.cxx | 6
sfx2/source/appl/shutdowniconaqua.mm | 2
sfx2/source/bastyp/helper.cxx | 2
sfx2/source/control/recentdocsviewitem.cxx | 4
sfx2/source/dialog/dinfdlg.cxx | 14
sfx2/source/dialog/filedlghelper.cxx | 14
sfx2/source/dialog/mailmodel.cxx | 2
sfx2/source/dialog/taskpane.cxx | 2
sfx2/source/doc/docfile.cxx | 20
sfx2/source/doc/doctempl.cxx | 2
sfx2/source/doc/doctemplates.cxx | 4
sfx2/source/doc/guisaveas.cxx | 4
sfx2/source/doc/new.cxx | 2
sfx2/source/doc/objmisc.cxx | 6
sfx2/source/doc/objstor.cxx | 4
sfx2/source/doc/printhelper.cxx | 2
sfx2/source/inet/inettbc.cxx | 4
sfx2/source/view/viewfrm.cxx | 4
sfx2/source/view/viewsh.cxx | 2
solenv/gbuild/platform/com_GCC_defs.mk | 1
sot/source/sdstor/storage.cxx | 4
svl/source/misc/filenotation.cxx | 8
svl/source/misc/inethist.cxx | 8
svl/source/misc/urihelper.cxx | 20
svtools/source/contnr/contentenumeration.cxx | 2
svtools/source/contnr/fileview.cxx | 2
svtools/source/control/filectrl.cxx | 2
svtools/source/control/fileurlbox.cxx | 2
svtools/source/control/inettbc.cxx | 40 -
svtools/source/control/urlcontrol.cxx | 2
svtools/source/dialogs/ServerDetailsControls.cxx | 4
svtools/source/dialogs/addresstemplate.cxx | 6
svtools/source/misc/imagemgr.cxx | 4
svtools/source/misc/templatefoldercache.cxx | 8
svtools/source/uno/wizard/unowizard.cxx | 4
svx/source/dialog/docrecovery.cxx | 2
svx/source/dialog/imapdlg.cxx | 4
svx/source/dialog/imapwnd.cxx | 4
svx/source/dialog/langbox.cxx | 2
svx/source/fmcomp/fmgridif.cxx | 2
svx/source/form/dataaccessdescriptor.cxx | 2
svx/source/form/databaselocationinput.cxx | 2
svx/source/form/fmpage.cxx | 6
svx/source/gallery2/galbrws1.cxx | 2
svx/source/gallery2/galbrws2.cxx | 4
svx/source/gallery2/galctrl.cxx | 2
svx/source/gallery2/galexpl.cxx | 2
svx/source/gallery2/gallery1.cxx | 12
svx/source/gallery2/galmisc.cxx | 8
svx/source/gallery2/galtheme.cxx | 18
svx/source/sidebar/nbdtmg.cxx | 2
svx/source/svdraw/svdotxln.cxx | 6
svx/source/unodraw/UnoGraphicExporter.cxx | 2
svx/source/unodraw/unoshap2.cxx | 4
svx/source/unogallery/unogaltheme.cxx | 2
svx/source/xml/xmlxtexp.cxx | 2
svx/source/xml/xmlxtimp.cxx | 2
svx/source/xoutdev/_xoutbmp.cxx | 4
svx/source/xoutdev/xtable.cxx | 4
sw/source/core/doc/DocumentLinksAdministrationManager.cxx | 4
sw/source/core/doc/acmplwrd.cxx | 2
sw/source/core/fields/docufld.cxx | 4
sw/source/core/graphic/ndgrf.cxx | 2
sw/source/core/swg/SwXMLTextBlocks.cxx | 2
sw/source/core/unocore/unofield.cxx | 4
sw/source/filter/basflt/iodetect.cxx | 2
sw/source/filter/html/htmlgrin.cxx | 2
sw/source/filter/ww8/wrtw8esh.cxx | 4
sw/source/filter/ww8/wrtw8nds.cxx | 10
sw/source/filter/ww8/ww8par.cxx | 4
sw/source/ui/envelp/mailmrge.cxx | 4
sw/source/ui/fldui/javaedit.cxx | 4
sw/source/ui/vba/vbadocument.cxx | 2
sw/source/ui/vba/vbadocuments.cxx | 2
sw/source/ui/vba/vbasystem.cxx | 2
sw/source/uibase/app/docsh2.cxx | 2
sw/source/uibase/dochdl/swdtflvr.cxx | 4
sw/source/uibase/shells/textsh.cxx | 2
sw/source/uibase/uno/unomailmerge.cxx | 2
sw/source/uibase/uno/unomod.cxx | 2
toolkit/source/awt/animatedimagespeer.cxx | 2
toolkit/source/awt/vclxwindow.cxx | 2
toolkit/source/controls/controlmodelcontainerbase.cxx | 2
tools/qa/cppunit/test_urlobj.cxx | 32
tools/source/fsys/urlobj.cxx | 459 ++++++-------
ucb/source/core/FileAccess.cxx | 36 -
ucb/source/ucp/cmis/cmis_content.cxx | 2
unotools/source/config/pathoptions.cxx | 4
unotools/source/config/securityoptions.cxx | 4
unotools/source/ucbhelper/ucbhelper.cxx | 2
vbahelper/source/vbahelper/vbadocumentsbase.cxx | 2
vcl/source/filter/graphicfilter.cxx | 10
vcl/source/gdi/pdfwriter_impl.cxx | 6
vcl/unx/generic/printer/ppdparser.cxx | 4
vcl/unx/generic/printer/printerinfomanager.cxx | 4
vcl/unx/gtk/fpicker/SalGtkPicker.cxx | 4
xmloff/source/forms/elementexport.cxx | 2
xmloff/source/forms/elementimport.cxx | 2
xmlsecurity/source/dialogs/macrosecurity.cxx | 2
208 files changed, 776 insertions(+), 756 deletions(-)
New commits:
commit 44b3e56bb4a4df59f53447c4ca4d8e02fe926206
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Apr 2 15:58:06 2015 +0200
Change INetProtocol to scoped enumeration
...and fix o3tl::enumarray::operator [] const overload
Change-Id: I749b1b9d68686b03a97074253478d9d2d9d32b0b
diff --git a/avmedia/source/framework/modeltools.cxx b/avmedia/source/framework/modeltools.cxx
index fe6ea56..72e6a03 100644
--- a/avmedia/source/framework/modeltools.cxx
+++ b/avmedia/source/framework/modeltools.cxx
@@ -90,7 +90,7 @@ bool KmzDae2Gltf(const OUString& rSourceURL, OUString& o_rOutput)
// If *.dae file is not in the local file system, then copy it to a temp folder for the conversion
OUString sInput = rSourceURL;
const INetURLObject aSourceURLObj(rSourceURL);
- if( aSourceURLObj.GetProtocol() != INET_PROT_FILE )
+ if( aSourceURLObj.GetProtocol() != INetProtocol::FILE )
{
try
{
diff --git a/avmedia/source/viewer/mediawindow.cxx b/avmedia/source/viewer/mediawindow.cxx
index 7912bf5..9713666 100644
--- a/avmedia/source/viewer/mediawindow.cxx
+++ b/avmedia/source/viewer/mediawindow.cxx
@@ -339,7 +339,7 @@ bool MediaWindow::isMediaURL( const OUString& rURL, const OUString& rReferer, bo
const INetURLObject aURL( rURL );
bool bRet = false;
- if( aURL.GetProtocol() != INET_PROT_NOT_VALID )
+ if( aURL.GetProtocol() != INetProtocol::NOT_VALID )
{
if( bDeep || pPreferredSizePixel )
{
diff --git a/avmedia/source/viewer/mediawindow_impl.cxx b/avmedia/source/viewer/mediawindow_impl.cxx
index 26877f6..9916b44 100644
--- a/avmedia/source/viewer/mediawindow_impl.cxx
+++ b/avmedia/source/viewer/mediawindow_impl.cxx
@@ -310,7 +310,7 @@ void MediaWindowImpl::setURL( const OUString& rURL,
{
INetURLObject aURL( rURL );
- if (aURL.GetProtocol() != INET_PROT_NOT_VALID)
+ if (aURL.GetProtocol() != INetProtocol::NOT_VALID)
maFileURL = aURL.GetMainURL(INetURLObject::DECODE_UNAMBIGUOUS);
else
maFileURL = rURL;
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 4cb705d..007d395 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -292,7 +292,7 @@ OUString EditorWindow::GetWordAtCursor()
{
OUString aURL( URIHelper::FindFirstURLInText( aText, nStart, nEnd, aClass ) );
INetURLObject aURLObj( aURL );
- if ( aURLObj.GetProtocol() == INET_PROT_VND_SUN_STAR_HELP
+ if ( aURLObj.GetProtocol() == INetProtocol::VND_SUN_STAR_HELP
&& nSelStart >= nStart && nSelStart <= nEnd && nSelEnd >= nStart && nSelEnd <= nEnd )
{
aWord = aURL;
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index 4f2b2c5..058fd97 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -1269,7 +1269,7 @@ void LibPage::ExportAsBasic( const OUString& aLibName )
if( aPath.isEmpty() )
aPath = SvtPathOptions().GetWorkPath();
- // INetURLObject aURL(m_sSavePath, INET_PROT_FILE);
+ // INetURLObject aURL(m_sSavePath, INetProtocol::FILE);
xFolderPicker->setDisplayDirectory( aPath );
short nRet = xFolderPicker->execute();
if( nRet == RET_OK )
diff --git a/basic/source/basmgr/basicmanagerrepository.cxx b/basic/source/basmgr/basicmanagerrepository.cxx
index 3f873e4..c12e904 100644
--- a/basic/source/basmgr/basicmanagerrepository.cxx
+++ b/basic/source/basmgr/basicmanagerrepository.cxx
@@ -288,7 +288,7 @@ namespace basic
// The first dir in the path as destination:
OUString aFileName( aAppBasic.getName() );
aAppBasic = INetURLObject( aAppBasicDir.getToken(1, ';') );
- DBG_ASSERT(aAppBasic.GetProtocol() != INET_PROT_NOT_VALID,
+ DBG_ASSERT(aAppBasic.GetProtocol() != INetProtocol::NOT_VALID,
OString("Invalid URL: \"" +
OUStringToOString(aAppBasicDir, osl_getThreadTextEncoding()) +
"\"").getStr());
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index 3472015..a4527d4a 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -587,7 +587,7 @@ BasicManager::BasicManager( SotStorage& rStorage, const OUString& rBaseURL, Star
pLibs->aBasicLibPath = *pLibPath;
}
OUString aStorName( rStorage.GetName() );
- maStorageName = INetURLObject(aStorName, INET_PROT_FILE).GetMainURL( INetURLObject::NO_DECODE );
+ maStorageName = INetURLObject(aStorName, INetProtocol::FILE).GetMainURL( INetURLObject::NO_DECODE );
// If there is no Manager Stream, no further actions are necessary
@@ -831,7 +831,7 @@ void BasicManager::LoadBasicManager( SotStorage& rStorage, const OUString& rBase
return;
}
- maStorageName = INetURLObject(aStorName, INET_PROT_FILE).GetMainURL( INetURLObject::NO_DECODE );
+ maStorageName = INetURLObject(aStorName, INetProtocol::FILE).GetMainURL( INetURLObject::NO_DECODE );
// #i13114 removed, DBG_ASSERT(aStorageName.Len() != 0, "Bad storage name");
OUString aRealStorageName = maStorageName; // for relative paths, can be modified through BaseURL
@@ -839,7 +839,7 @@ void BasicManager::LoadBasicManager( SotStorage& rStorage, const OUString& rBase
if ( !rBaseURL.isEmpty() )
{
INetURLObject aObj( rBaseURL );
- if ( aObj.GetProtocol() == INET_PROT_FILE )
+ if ( aObj.GetProtocol() == INetProtocol::FILE )
{
aRealStorageName = aObj.PathToFileName();
}
@@ -875,7 +875,7 @@ void BasicManager::LoadBasicManager( SotStorage& rStorage, const OUString& rBase
// Always try relative first if there are two stands on disk
if ( !pInfo->GetRelStorageName().isEmpty() && pInfo->GetRelStorageName() != szImbedded )
{
- INetURLObject aObj( aRealStorageName, INET_PROT_FILE );
+ INetURLObject aObj( aRealStorageName, INetProtocol::FILE );
aObj.removeSegment();
bool bWasAbsolute = false;
aObj = aObj.smartRel2Abs( pInfo->GetRelStorageName(), bWasAbsolute );
@@ -946,7 +946,7 @@ void BasicManager::LoadOldBasicManager( SotStorage& rStorage )
if ( !aLibs.isEmpty() )
{
OUString aCurStorageName( aStorName );
- INetURLObject aCurStorage( aCurStorageName, INET_PROT_FILE );
+ INetURLObject aCurStorage( aCurStorageName, INetProtocol::FILE );
sal_Int32 nLibs = comphelper::string::getTokenCount(aLibs, LIB_SEP);
for ( sal_Int32 nLib = 0; nLib < nLibs; nLib++ )
{
@@ -956,7 +956,7 @@ void BasicManager::LoadOldBasicManager( SotStorage& rStorage )
OUString aLibName( aLibInfo.getToken( 0, LIBINFO_SEP ) );
OUString aLibAbsStorageName( aLibInfo.getToken( 1, LIBINFO_SEP ) );
OUString aLibRelStorageName( aLibInfo.getToken( 2, LIBINFO_SEP ) );
- INetURLObject aLibAbsStorage( aLibAbsStorageName, INET_PROT_FILE );
+ INetURLObject aLibAbsStorage( aLibAbsStorageName, INetProtocol::FILE );
INetURLObject aLibRelStorage( aStorName );
aLibRelStorage.removeSegment();
@@ -1056,10 +1056,10 @@ bool BasicManager::ImpLoadLibrary( BasicLibInfo* pLibInfo, SotStorage* pCurStora
OUString aStorName( pCurStorage->GetName() );
// #i13114 removed, DBG_ASSERT( aStorName.Len(), "No Storage Name!" );
- INetURLObject aCurStorageEntry(aStorName, INET_PROT_FILE);
+ INetURLObject aCurStorageEntry(aStorName, INetProtocol::FILE);
// #i13114 removed, DBG_ASSERT(aCurStorageEntry.GetMainURL( INetURLObject::NO_DECODE ).Len() != 0, "Bad storage name");
- INetURLObject aStorageEntry(aStorageName, INET_PROT_FILE);
+ INetURLObject aStorageEntry(aStorageName, INetProtocol::FILE);
// #i13114 removed, DBG_ASSERT(aCurStorageEntry.GetMainURL( INetURLObject::NO_DECODE ).Len() != 0, "Bad storage name");
if ( aCurStorageEntry == aStorageEntry )
@@ -1235,7 +1235,7 @@ StarBASIC* BasicManager::AddLib( SotStorage& rStorage, const OUString& rLibName,
OUString aStorName( rStorage.GetName() );
DBG_ASSERT( !aStorName.isEmpty(), "No Storage Name!" );
- OUString aStorageName = INetURLObject(aStorName, INET_PROT_FILE).GetMainURL( INetURLObject::NO_DECODE );
+ OUString aStorageName = INetURLObject(aStorName, INetProtocol::FILE).GetMainURL( INetURLObject::NO_DECODE );
DBG_ASSERT(!aStorageName.isEmpty(), "Bad storage name");
OUString aNewLibName( rLibName );
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index e8502f4..8dbdf8e 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -628,7 +628,7 @@ RTLFUNC(MkDir)
// In vba if the full path is not specified then
// folder is created relative to the curdir
INetURLObject aURLObj( getFullPath( aPath ) );
- if ( aURLObj.GetProtocol() != INET_PROT_FILE )
+ if ( aURLObj.GetProtocol() != INetProtocol::FILE )
{
SbxArrayRef pPar = new SbxArray();
SbxVariableRef pResult = new SbxVariable();
diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx
index 2030490..59459d9 100644
--- a/basic/source/runtime/methods1.cxx
+++ b/basic/source/runtime/methods1.cxx
@@ -1644,7 +1644,7 @@ RTLFUNC(ConvertToUrl)
if ( rPar.Count() == 2 )
{
OUString aStr = rPar.Get(1)->GetOUString();
- INetURLObject aURLObj( aStr, INET_PROT_FILE );
+ INetURLObject aURLObj( aStr, INetProtocol::FILE );
OUString aFileURL = aURLObj.GetMainURL( INetURLObject::NO_DECODE );
if( aFileURL.isEmpty() )
{
diff --git a/connectivity/source/drivers/calc/CConnection.cxx b/connectivity/source/drivers/calc/CConnection.cxx
index 35967f2..6ed3e12 100644
--- a/connectivity/source/drivers/calc/CConnection.cxx
+++ b/connectivity/source/drivers/calc/CConnection.cxx
@@ -72,13 +72,13 @@ void OCalcConnection::construct(const OUString& url,const Sequence< PropertyValu
m_aFileName = aDSN;
INetURLObject aURL;
- aURL.SetSmartProtocol(INET_PROT_FILE);
+ aURL.SetSmartProtocol(INetProtocol::FILE);
{
SvtPathOptions aPathOptions;
m_aFileName = aPathOptions.SubstituteVariable(m_aFileName);
}
aURL.SetSmartURL(m_aFileName);
- if ( aURL.GetProtocol() == INET_PROT_NOT_VALID )
+ if ( aURL.GetProtocol() == INetProtocol::NOT_VALID )
{
// don't pass invalid URL to loadComponentFromURL
throw SQLException();
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index 8313889..b47a00f 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -628,7 +628,7 @@ OUString ODbaseTable::getEntry(OConnection* _pConnection,const OUString& _sName
while(xDir->next())
{
sName = xRow->getString(1);
- aURL.SetSmartProtocol(INET_PROT_FILE);
+ aURL.SetSmartProtocol(INetProtocol::FILE);
OUString sUrl = _pConnection->getURL() + s_sSeparator + sName;
aURL.SetSmartURL( sUrl );
@@ -1038,7 +1038,7 @@ bool ODbaseTable::CreateImpl()
}
INetURLObject aURL;
- aURL.SetSmartProtocol(INET_PROT_FILE);
+ aURL.SetSmartProtocol(INetProtocol::FILE);
OUString aName = getEntry(m_pConnection, m_Name);
if(aName.isEmpty())
{
@@ -2523,7 +2523,7 @@ OUString ODbaseTable::createTempFile()
getConnection()->throwGenericSQLException(STR_COULD_NOT_ALTER_TABLE, *this);
INetURLObject aURL;
- aURL.SetSmartProtocol(INET_PROT_FILE);
+ aURL.SetSmartProtocol(INetProtocol::FILE);
aURL.SetURL(aTempFile.GetURL());
OUString sNewName(aURL.getName().copy(0, aURL.getName().getLength() - sExt.getLength()));
diff --git a/connectivity/source/drivers/file/FConnection.cxx b/connectivity/source/drivers/file/FConnection.cxx
index 4e15516..ae5d244 100644
--- a/connectivity/source/drivers/file/FConnection.cxx
+++ b/connectivity/source/drivers/file/FConnection.cxx
@@ -136,7 +136,7 @@ void OConnection::construct(const OUString& url,const Sequence< PropertyValue >&
OUString aFileName = aDSN;
INetURLObject aURL;
- aURL.SetSmartProtocol(INET_PROT_FILE);
+ aURL.SetSmartProtocol(INetProtocol::FILE);
{
SvtPathOptions aPathOptions;
aFileName = aPathOptions.SubstituteVariable(aFileName);
diff --git a/connectivity/source/drivers/file/FDatabaseMetaData.cxx b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
index 2d2b8f9..eb9e750 100644
--- a/connectivity/source/drivers/file/FDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
@@ -220,7 +220,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables(
while(xResultSet->next())
{
aName = xRow->getString(1);
- aURL.SetSmartProtocol(INET_PROT_FILE);
+ aURL.SetSmartProtocol(INetProtocol::FILE);
OUString sUrl = m_pConnection->getURL() + "/" + aName;
aURL.SetSmartURL( sUrl );
sThisContentExtension = aURL.getExtension();
diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx
index 7ca90d6..26d6b22 100644
--- a/connectivity/source/drivers/flat/ETable.cxx
+++ b/connectivity/source/drivers/flat/ETable.cxx
@@ -468,7 +468,7 @@ OUString OFlatTable::getEntry()
while(xDir->next())
{
sName = xRow->getString(1);
- aURL.SetSmartProtocol(INET_PROT_FILE);
+ aURL.SetSmartProtocol(INetProtocol::FILE);
OUString sUrl = m_pConnection->getURL() + s_sSeparator + sName;
aURL.SetSmartURL( sUrl );
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index b1b0451..9996a86 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -145,7 +145,7 @@ void SearchThread::ImplSearch( const INetURLObject& rStartURL,
while( xResultSet->next() && schedule() )
{
INetURLObject aFoundURL( xContentAccess->queryContentIdentifierString() );
- DBG_ASSERT( aFoundURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" );
+ DBG_ASSERT( aFoundURL.GetProtocol() != INetProtocol::NOT_VALID, "invalid URL" );
bool bFolder = xRow->getBoolean( 1 ); // property "IsFolder"
if ( xRow->wasNull() )
diff --git a/cui/source/dialogs/cuihyperdlg.cxx b/cui/source/dialogs/cuihyperdlg.cxx
index d110787..2daa9e5 100644
--- a/cui/source/dialogs/cuihyperdlg.cxx
+++ b/cui/source/dialogs/cuihyperdlg.cxx
@@ -305,17 +305,17 @@ sal_uInt16 SvxHpLinkDlg::SetPage ( SvxHyperlinkItem* pItem )
switch ( eProtocolTyp )
{
- case INET_PROT_HTTP :
- case INET_PROT_FTP :
+ case INetProtocol::HTTP :
+ case INetProtocol::FTP :
nPageId = RID_SVXPAGE_HYPERLINK_INTERNET;
break;
- case INET_PROT_FILE :
- case INET_PROT_POP3 :
- case INET_PROT_IMAP :
+ case INetProtocol::FILE :
+ case INetProtocol::POP3 :
+ case INetProtocol::IMAP :
nPageId = RID_SVXPAGE_HYPERLINK_DOCUMENT;
break;
- case INET_PROT_MAILTO :
- case INET_PROT_NEWS :
+ case INetProtocol::MAILTO :
+ case INetProtocol::NEWS :
nPageId = RID_SVXPAGE_HYPERLINK_MAIL;
break;
default :
@@ -323,7 +323,7 @@ sal_uInt16 SvxHpLinkDlg::SetPage ( SvxHyperlinkItem* pItem )
nPageId = RID_SVXPAGE_HYPERLINK_DOCUMENT;
else
{
- eProtocolTyp = INET_PROT_NOT_VALID;
+ eProtocolTyp = INetProtocol::NOT_VALID;
nPageId = GetCurPageId();
}
break;
diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx
index 2686b48..f74809b 100644
--- a/cui/source/dialogs/hldocntp.cxx
+++ b/cui/source/dialogs/hldocntp.cxx
@@ -64,7 +64,7 @@ bool SvxHyperlinkNewDocTp::ImplGetURLObject( const OUString& rPath, const OUStri
if ( bIsValidURL )
{
aURLObject.SetURL( rPath );
- if ( aURLObject.GetProtocol() == INET_PROT_NOT_VALID ) // test if the source is already a valid url
+ if ( aURLObject.GetProtocol() == INetProtocol::NOT_VALID ) // test if the source is already a valid url
{ // if not we have to create a url from a physical file name
bool wasAbs;
INetURLObject base(rBase);
@@ -73,7 +73,7 @@ bool SvxHyperlinkNewDocTp::ImplGetURLObject( const OUString& rPath, const OUStri
rPath, wasAbs, true, INetURLObject::ENCODE_ALL,
RTL_TEXTENCODING_UTF8, true);
}
- bIsValidURL = aURLObject.GetProtocol() != INET_PROT_NOT_VALID;
+ bIsValidURL = aURLObject.GetProtocol() != INetProtocol::NOT_VALID;
if ( bIsValidURL )
{
OUString aBase( aURLObject.getName( INetURLObject::LAST_SEGMENT, false ) );
@@ -103,7 +103,7 @@ SvxHyperlinkNewDocTp::SvxHyperlinkNewDocTp ( vcl::Window *pParent, IconChoiceDia
get(m_pRbtEditNow, "editnow");
get(m_pRbtEditLater, "editlater");
get(m_pCbbPath, "path");
- m_pCbbPath->SetSmartProtocol(INET_PROT_FILE);
+ m_pCbbPath->SetSmartProtocol(INetProtocol::FILE);
get(m_pBtCreate, "create");
m_pBtCreate->SetModeImage(Image(CUI_RES(RID_SVXBMP_NEWDOC)));
get(m_pLbDocTypes, "types");
@@ -417,7 +417,7 @@ IMPL_LINK_NOARG(SvxHyperlinkNewDocTp, ClickNewHdl_Impl)
{
sal_Char const sSlash[] = "/";
- INetURLObject aURL( aStrURL, INET_PROT_FILE );
+ INetURLObject aURL( aStrURL, INetProtocol::FILE );
OUString aStrName;
if( bHandleFileName )
aStrName = bZeroPath? aTempStrURL : OUString(aURL.getName());
@@ -442,7 +442,7 @@ IMPL_LINK_NOARG(SvxHyperlinkNewDocTp, ClickNewHdl_Impl)
aNewURL.setExtension( static_cast<DocumentTypeData*>(m_pLbDocTypes->GetEntryData( nPos ))->aStrExt );
}
- if( aNewURL.GetProtocol() == INET_PROT_FILE )
+ if( aNewURL.GetProtocol() == INetProtocol::FILE )
{
utl::LocalFileHelper::ConvertURLToSystemPath( aNewURL.GetMainURL( INetURLObject::NO_DECODE ), aStrTmp );
}
diff --git a/cui/source/dialogs/hldoctp.cxx b/cui/source/dialogs/hldoctp.cxx
index 2f5b8f7..12d73d1 100644
--- a/cui/source/dialogs/hldoctp.cxx
+++ b/cui/source/dialogs/hldoctp.cxx
@@ -39,7 +39,7 @@ SvxHyperlinkDocTp::SvxHyperlinkDocTp ( vcl::Window *pParent, IconChoiceDialog* p
mbMarkWndOpen ( false )
{
get(m_pCbbPath, "path");
- m_pCbbPath->SetSmartProtocol(INET_PROT_FILE);
+ m_pCbbPath->SetSmartProtocol(INetProtocol::FILE);
get(m_pBtFileopen, "fileopen");
m_pBtFileopen->SetModeImage(Image(CUI_RES(RID_SVXBMP_FILEOPEN)));
get(m_pEdTarget, "target");
@@ -113,7 +113,7 @@ OUString SvxHyperlinkDocTp::GetCurrentURL ()
if ( aStrPath != aEmptyStr )
{
INetURLObject aURL( aStrPath );
- if ( aURL.GetProtocol() != INET_PROT_NOT_VALID ) // maybe the path is already a valid
+ if ( aURL.GetProtocol() != INetProtocol::NOT_VALID ) // maybe the path is already a valid
aStrURL = aStrPath; // hyperlink, then we can use this path directly
else
utl::LocalFileHelper::ConvertSystemPathToURL( aStrPath, aBaseURL, aStrURL );
@@ -341,7 +341,7 @@ void SvxHyperlinkDocTp::SetMarkStr ( const OUString& aStrMark )
SvxHyperlinkDocTp::EPathType SvxHyperlinkDocTp::GetPathType ( const OUString& rStrPath )
{
- INetURLObject aURL( rStrPath, INET_PROT_FILE );
+ INetURLObject aURL( rStrPath, INetProtocol::FILE );
if( aURL.HasError() )
return Type_Invalid;
diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx
index 76088ba..0471571 100644
--- a/cui/source/dialogs/hlinettp.cxx
+++ b/cui/source/dialogs/hlinettp.cxx
@@ -44,7 +44,7 @@ SvxHyperlinkInternetTp::SvxHyperlinkInternetTp ( vcl::Window *pParent,
get(m_pRbtLinktypInternet, "linktyp_internet");
get(m_pRbtLinktypFTP, "linktyp_ftp");
get(m_pCbbTarget, "target");
- m_pCbbTarget->SetSmartProtocol(INET_PROT_HTTP);
+ m_pCbbTarget->SetSmartProtocol(INetProtocol::HTTP);
get(m_pBtBrowse, "browse");
m_pBtBrowse->SetModeImage(Image(CUI_RES (RID_SVXBMP_BROWSE)));
get(m_pFtLogin, "login_label");
@@ -111,7 +111,7 @@ void SvxHyperlinkInternetTp::FillDlgFields(const OUString& rStrURL)
// set URL-field
// Show the scheme, #72740
- if ( aURL.GetProtocol() != INET_PROT_NOT_VALID )
+ if ( aURL.GetProtocol() != INetProtocol::NOT_VALID )
m_pCbbTarget->SetText( aURL.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ) );
else
m_pCbbTarget->SetText(rStrURL); // #77696#
@@ -165,17 +165,17 @@ OUString SvxHyperlinkInternetTp::CreateAbsoluteURL() const
INetURLObject aURL(aStrURL);
- if( aURL.GetProtocol() == INET_PROT_NOT_VALID )
+ if( aURL.GetProtocol() == INetProtocol::NOT_VALID )
{
aURL.SetSmartProtocol( GetSmartProtocolFromButtons() );
aURL.SetSmartURL(aStrURL);
}
// username and password for ftp-url
- if( aURL.GetProtocol() == INET_PROT_FTP && !m_pEdLogin->GetText().isEmpty() )
+ if( aURL.GetProtocol() == INetProtocol::FTP && !m_pEdLogin->GetText().isEmpty() )
aURL.SetUserAndPass ( m_pEdLogin->GetText(), m_pEdPassword->GetText() );
- if ( aURL.GetProtocol() != INET_PROT_NOT_VALID )
+ if ( aURL.GetProtocol() != INetProtocol::NOT_VALID )
return aURL.GetMainURL( INetURLObject::DECODE_TO_IURI );
else //#105788# always create a URL even if it is not valid
return aStrURL;
@@ -321,9 +321,9 @@ INetProtocol SvxHyperlinkInternetTp::GetSmartProtocolFromButtons() const
{
if( m_pRbtLinktypFTP->IsChecked() )
{
- return INET_PROT_FTP;
+ return INetProtocol::FTP;
}
- return INET_PROT_HTTP;
+ return INetProtocol::HTTP;
}
/*************************************************************************
diff --git a/cui/source/dialogs/hlmailtp.cxx b/cui/source/dialogs/hlmailtp.cxx
index de79f64..60d8142 100644
--- a/cui/source/dialogs/hlmailtp.cxx
+++ b/cui/source/dialogs/hlmailtp.cxx
@@ -44,7 +44,7 @@ SvxHyperlinkMailTp::SvxHyperlinkMailTp ( vcl::Window *pParent, IconChoiceDialog*
get(m_pRbtMail, "linktyp_mail");
get(m_pRbtNews, "linktyp_news");
get(m_pCbbReceiver, "receiver");
- m_pCbbReceiver->SetSmartProtocol(INET_PROT_MAILTO);
+ m_pCbbReceiver->SetSmartProtocol(INetProtocol::MAILTO);
get(m_pBtAdrBook, "adressbook");
m_pBtAdrBook->SetModeImage(Image(CUI_RES(RID_SVXBMP_ADRESSBOOK)));
get(m_pFtSubject, "subject_label");
@@ -139,14 +139,14 @@ OUString SvxHyperlinkMailTp::CreateAbsoluteURL() const
OUString aStrURL = m_pCbbReceiver->GetText();
INetURLObject aURL(aStrURL);
- if( aURL.GetProtocol() == INET_PROT_NOT_VALID )
+ if( aURL.GetProtocol() == INetProtocol::NOT_VALID )
{
aURL.SetSmartProtocol( GetSmartProtocolFromButtons() );
aURL.SetSmartURL(aStrURL);
}
// subject for EMail-url
- if( aURL.GetProtocol() == INET_PROT_MAILTO )
+ if( aURL.GetProtocol() == INetProtocol::MAILTO )
{
if ( m_pEdSubject->GetText() != OUString(aEmptyStr) )
{
@@ -156,7 +156,7 @@ OUString SvxHyperlinkMailTp::CreateAbsoluteURL() const
}
}
- if ( aURL.GetProtocol() != INET_PROT_NOT_VALID )
+ if ( aURL.GetProtocol() != INetProtocol::NOT_VALID )
return aURL.GetMainURL( INetURLObject::DECODE_WITH_CHARSET );
else //#105788# always create a URL even if it is not valid
return aStrURL;
@@ -238,9 +238,9 @@ INetProtocol SvxHyperlinkMailTp::GetSmartProtocolFromButtons() const
{
if( m_pRbtNews->IsChecked() )
{
- return INET_PROT_NEWS;
+ return INetProtocol::NEWS;
}
- return INET_PROT_MAILTO;
+ return INetProtocol::MAILTO;
}
/*************************************************************************
diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx
index 92c9703..fcaaed8 100644
--- a/cui/source/dialogs/hltpbase.cxx
+++ b/cui/source/dialogs/hltpbase.cxx
@@ -43,7 +43,7 @@ SvxHyperURLBox::SvxHyperURLBox( vcl::Window* pParent, INetProtocol eSmart )
extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSvxHyperURLBox(vcl::Window *pParent, VclBuilder::stringmap &)
{
- return new SvxHyperURLBox(pParent, INET_PROT_HTTP);
+ return new SvxHyperURLBox(pParent, INetProtocol::HTTP);
}
sal_Int8 SvxHyperURLBox::AcceptDrop( const AcceptDropEvent& /* rEvt */ )
@@ -383,7 +383,7 @@ OUString SvxHyperlinkTabPageBase::GetSchemeFromURL( const OUString& rStrURL )
// #77696#
// our new INetUrlObject now has the ability
// to detect if an Url is valid or not :-(
- if ( aProtocol == INET_PROT_NOT_VALID )
+ if ( aProtocol == INetProtocol::NOT_VALID )
{
if ( rStrURL.startsWithIgnoreAsciiCase( INET_HTTP_SCHEME ) )
{
@@ -474,10 +474,10 @@ OUString SvxHyperlinkTabPageBase::CreateUiNameFromURL( const OUString& aStrURL )
switch(aURLObj.GetProtocol())
{
- case INET_PROT_FILE:
+ case INetProtocol::FILE:
utl::LocalFileHelper::ConvertURLToSystemPath( aURLObj.GetMainURL(INetURLObject::NO_DECODE), aStrUiURL );
break;
- case INET_PROT_FTP :
+ case INetProtocol::FTP :
{
//remove password from name
INetURLObject aTmpURL(aURLObj);
diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx
index 84c2fd7..b8cd08b 100644
--- a/cui/source/dialogs/insdlg.cxx
+++ b/cui/source/dialogs/insdlg.cxx
@@ -295,7 +295,7 @@ short SvInsertOleDlg::Execute()
{
aFileName = GetFilePath();
INetURLObject aURL;
- aURL.SetSmartProtocol( INET_PROT_FILE );
+ aURL.SetSmartProtocol( INetProtocol::FILE );
aURL.SetSmartURL( aFileName );
aFileName = aURL.GetMainURL( INetURLObject::NO_DECODE );
bool bLink = IsLinked();
@@ -433,7 +433,7 @@ short SvInsertPlugInDialog::Execute()
OUString aURL = GetPlugInFile();
// URL can be a valid and absolute URL or a system file name
- m_pURL->SetSmartProtocol( INET_PROT_FILE );
+ m_pURL->SetSmartProtocol( INetProtocol::FILE );
if ( aURL.isEmpty() || m_pURL->SetSmartURL( aURL ) )
{
// create a plugin object
@@ -618,7 +618,7 @@ short SfxInsertFloatingFrameDialog::Execute()
{
// URL can be a valid and absolute URL or a system file name
INetURLObject aObj;
- aObj.SetSmartProtocol( INET_PROT_FILE );
+ aObj.SetSmartProtocol( INetProtocol::FILE );
if ( aObj.SetSmartURL( m_pEDURL->GetText() ) )
aURL = aObj.GetMainURL( INetURLObject::NO_DECODE );
}
diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx
index fc0c4d6..bde3585 100644
--- a/cui/source/dialogs/linkdlg.cxx
+++ b/cui/source/dialogs/linkdlg.cxx
@@ -361,7 +361,7 @@ IMPL_LINK( SvBaseLinksDlg, ChangeSourceClickHdl, PushButton *, pPushButton )
SvBaseLink* pLink = static_cast<SvBaseLink*>(pEntry->GetUserData());
pLinkMgr->GetDisplayNames( pLink, &sType, &sFile, 0, 0 );
INetURLObject aUrl(sFile);
- if(aUrl.GetProtocol() == INET_PROT_FILE)
+ if(aUrl.GetProtocol() == INetProtocol::FILE)
{
OUString sOldPath(aUrl.PathToFileName());
sal_Int32 nLen = aUrl.GetName().getLength();
@@ -386,7 +386,7 @@ IMPL_LINK( SvBaseLinksDlg, ChangeSourceClickHdl, PushButton *, pPushButton )
continue;
pLinkMgr->GetDisplayNames( pLink, &sType, &sFile, &sLinkName, &sFilter );
INetURLObject aUrl_(sFile);
- INetURLObject aUrl2(aPath, INET_PROT_FILE);
+ INetURLObject aUrl2(aPath, INetProtocol::FILE);
aUrl2.insertName( aUrl_.getName() );
OUString sNewLinkName;
MakeLnkName( sNewLinkName, 0 ,
@@ -639,7 +639,7 @@ void SvBaseLinksDlg::InsertEntry( const SvBaseLink& rLink, sal_uLong nPos, bool
long nWidthPixel = m_pTbLinks->GetLogicTab( 2 ) - m_pTbLinks->GetLogicTab( 1 );
nWidthPixel -= SV_TAB_BORDER;
OUString aTxt = m_pTbLinks->GetEllipsisString( sFileNm, nWidthPixel, TEXT_DRAW_PATHELLIPSIS );
- INetURLObject aPath( sFileNm, INET_PROT_FILE );
+ INetURLObject aPath( sFileNm, INetProtocol::FILE );
OUString aFileName = aPath.getName();
aFileName = INetURLObject::decode(aFileName, '%', INetURLObject::DECODE_UNAMBIGUOUS);
diff --git a/cui/source/inc/hltpbase.hxx b/cui/source/inc/hltpbase.hxx
index 8b645e8..b338534d 100644
--- a/cui/source/inc/hltpbase.hxx
+++ b/cui/source/inc/hltpbase.hxx
@@ -59,7 +59,7 @@ protected:
virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
public:
- SvxHyperURLBox( vcl::Window* pParent, INetProtocol eSmart = INET_PROT_FILE );
+ SvxHyperURLBox( vcl::Window* pParent, INetProtocol eSmart = INetProtocol::FILE );
};
diff --git a/cui/source/options/doclinkdialog.cxx b/cui/source/options/doclinkdialog.cxx
index 068f361..6a4eba8 100644
--- a/cui/source/options/doclinkdialog.cxx
+++ b/cui/source/options/doclinkdialog.cxx
@@ -121,7 +121,7 @@ namespace svx
return 0L;
} // if (!bFileExists)
INetURLObject aURL( sURL );
- if ( aURL.GetProtocol() != INET_PROT_FILE )
+ if ( aURL.GetProtocol() != INetProtocol::FILE )
{
OUString sMsg = CUI_RES(STR_LINKEDDOC_NO_SYSTEM_FILE);
sMsg = sMsg.replaceFirst("$file$", m_pURL->GetText());
@@ -176,7 +176,7 @@ namespace svx
{ // default the name to the base of the chosen URL
INetURLObject aParser;
- aParser.SetSmartProtocol(INET_PROT_FILE);
+ aParser.SetSmartProtocol(INetProtocol::FILE);
aParser.SetSmartURL(aFileDlg.GetPath());
m_pName->SetText(aParser.getBase(INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET));
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index 29151a2..33fe5cb 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -1676,9 +1676,9 @@ IMPL_LINK( SvxLinguTabPage, ClickHdl_Impl, PushButton *, pBtn )
{
OUString sURL = xStor->getLocation();
INetURLObject aObj(sURL);
- DBG_ASSERT( aObj.GetProtocol() == INET_PROT_FILE,
+ DBG_ASSERT( aObj.GetProtocol() == INetProtocol::FILE,
"non-file URLs cannot be deleted" );
- if ( aObj.GetProtocol() == INET_PROT_FILE )
+ if ( aObj.GetProtocol() == INetProtocol::FILE )
{
KillFile_Impl( aObj.GetMainURL( INetURLObject::NO_DECODE ) );
}
diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx
index 747b310..512c61f 100644
--- a/cui/source/options/optpath.cxx
+++ b/cui/source/options/optpath.cxx
@@ -150,7 +150,7 @@ OUString Convert_Impl( const OUString& rValue )
{
OUString aValue = rValue.getToken( i, cDelim );
INetURLObject aObj( aValue );
- if ( aObj.GetProtocol() == INET_PROT_FILE )
+ if ( aObj.GetProtocol() == INetProtocol::FILE )
aReturn += aObj.PathToFileName();
else if ( ::utl::LocalFileHelper::IsFileContent( aValue ) )
aReturn += aObj.GetURLPath( INetURLObject::DECODE_WITH_CHARSET );
@@ -482,7 +482,7 @@ void SvxPathTabPage::ChangeCurrentEntry( const OUString& _rFolder )
// old path is an URL?
INetURLObject aObj( sWritable );
- bool bURL = ( aObj.GetProtocol() != INET_PROT_NOT_VALID );
+ bool bURL = ( aObj.GetProtocol() != INetProtocol::NOT_VALID );
OUString aPathStr( _rFolder );
INetURLObject aNewObj( aPathStr );
aNewObj.removeFinalSlash();
@@ -607,7 +607,7 @@ IMPL_LINK_NOARG(SvxPathTabPage, PathHdl_Impl)
Reference < XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
xFolderPicker = FolderPicker::create(xContext);;
- INetURLObject aURL( sWritable, INET_PROT_FILE );
+ INetURLObject aURL( sWritable, INetProtocol::FILE );
xFolderPicker->setDisplayDirectory( aURL.GetMainURL( INetURLObject::NO_DECODE ) );
Reference< XAsynchronousExecutableDialog > xAsyncDlg( xFolderPicker, UNO_QUERY );
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 36d6357..81fb8af 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -830,7 +830,7 @@ void OfaTreeOptionsDialog::ActivateLastSelection()
: pLastPageSaver->m_sLastPageURL_Tools;
}
- bool bMustExpand = ( INetURLObject( sLastURL ).GetProtocol() == INET_PROT_FILE );
+ bool bMustExpand = ( INetURLObject( sLastURL ).GetProtocol() == INetProtocol::FILE );
SvTreeListEntry* pTemp = pTreeLB->First();
while( !pEntry && pTemp )
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index af67a18..12e0f17 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -1340,7 +1340,7 @@ IMPL_LINK( SvxBackgroundTabPage, FileClickHdl_Impl, CheckBox*, pBox )
m_pFtUnlinked->Hide();
INetURLObject aObj( aBgdGraphicPath );
OUString aFilePath;
- if ( aObj.GetProtocol() == INET_PROT_FILE )
+ if ( aObj.GetProtocol() == INetProtocol::FILE )
aFilePath = aObj.getFSysPath( INetURLObject::FSYS_DETECT );
else
aFilePath = aBgdGraphicPath;
@@ -1745,7 +1745,7 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr,
{
#ifdef DBG_UTIL
INetURLObject aObj( aStrLink );
- DBG_ASSERT( aObj.GetProtocol() != INET_PROT_NOT_VALID, "Invalid URL!" );
+ DBG_ASSERT( aObj.GetProtocol() != INetProtocol::NOT_VALID, "Invalid URL!" );
#endif
aBgdGraphicPath = aStrLink;
m_pBtnLink->Check( true );
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 531a4a7..14b7646 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -799,7 +799,7 @@ SvxBitmapPickTabPage::SvxBitmapPickTabPage(vcl::Window* pParent,
m_pExamplesVS->InsertItem( i + 1, i);
INetURLObject aObj(*it);
- if(aObj.GetProtocol() == INET_PROT_FILE)
+ if(aObj.GetProtocol() == INetProtocol::FILE)
*it = aObj.PathToFileName();
m_pExamplesVS->SetItemText( i + 1, *it );
@@ -1978,7 +1978,7 @@ IMPL_LINK_NOARG(SvxNumOptionsTabPage, PopupActivateHdl_Impl)
{
sGrfName = *it;
INetURLObject aObj(sGrfName);
- if(aObj.GetProtocol() == INET_PROT_FILE)
+ if(aObj.GetProtocol() == INetProtocol::FILE)
sGrfName = aObj.PathToFileName();
if(GalleryExplorer::GetGraphicObj( GALLERY_THEME_BULLETS, i, &aGraphic))
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index 1e9e466..6170eb4 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -190,7 +190,7 @@ void SvxBitmapTabPage::ActivatePage( const SfxItemSet& )
INetURLObject aURL( pBitmapList->GetPath() );
aURL.Append( pBitmapList->GetName() );
- DBG_ASSERT( aURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" );
+ DBG_ASSERT( aURL.GetProtocol() != INetProtocol::NOT_VALID, "invalid URL" );
if( aURL.getBase().getLength() > 18 )
{
@@ -857,7 +857,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickSaveHdl_Impl)
aDlg.AddFilter( aStrFilterType, aStrFilterType );
INetURLObject aFile( SvtPathOptions().GetPalettePath() );
- DBG_ASSERT( aFile.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" );
+ DBG_ASSERT( aFile.GetProtocol() != INetProtocol::NOT_VALID, "invalid URL" );
if( !pBitmapList->GetName().isEmpty() )
{
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index ed3668b..8ed8012 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -210,7 +210,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickSaveHdl_Impl)
aDlg.AddFilter( aStrFilterType, aStrFilterType );
INetURLObject aFile( SvtPathOptions().GetPalettePath() );
- DBG_ASSERT( aFile.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" );
+ DBG_ASSERT( aFile.GetProtocol() != INetProtocol::NOT_VALID, "invalid URL" );
XPropertyListRef pList = GetList();
diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx
index 46b001b..aab58f2 100644
--- a/cui/source/tabpages/tpgradnt.cxx
+++ b/cui/source/tabpages/tpgradnt.cxx
@@ -203,7 +203,7 @@ void SvxGradientTabPage::ActivatePage( const SfxItemSet& )
INetURLObject aURL( pGradientList->GetPath() );
aURL.Append( pGradientList->GetName() );
- DBG_ASSERT( aURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" );
+ DBG_ASSERT( aURL.GetProtocol() != INetProtocol::NOT_VALID, "invalid URL" );
if ( aURL.getBase().getLength() > 18 )
{
@@ -712,7 +712,7 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickSaveHdl_Impl)
aDlg.AddFilter( aStrFilterType, aStrFilterType );
INetURLObject aFile( SvtPathOptions().GetPalettePath() );
- DBG_ASSERT( aFile.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" );
+ DBG_ASSERT( aFile.GetProtocol() != INetProtocol::NOT_VALID, "invalid URL" );
if( !pGradientList->GetName().isEmpty() )
{
diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx
index a8ce8ca..7754a07 100644
--- a/cui/source/tabpages/tphatch.cxx
+++ b/cui/source/tabpages/tphatch.cxx
@@ -187,7 +187,7 @@ void SvxHatchTabPage::ActivatePage( const SfxItemSet& rSet )
INetURLObject aURL( pHatchingList->GetPath() );
aURL.Append( pHatchingList->GetName() );
- DBG_ASSERT( aURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" );
+ DBG_ASSERT( aURL.GetProtocol() != INetProtocol::NOT_VALID, "invalid URL" );
if ( aURL.getBase().getLength() > 18 )
{
@@ -745,7 +745,7 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickSaveHdl_Impl)
aDlg.AddFilter( aStrFilterType, aStrFilterType );
INetURLObject aFile( SvtPathOptions().GetPalettePath() );
- DBG_ASSERT( aFile.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" );
+ DBG_ASSERT( aFile.GetProtocol() != INetProtocol::NOT_VALID, "invalid URL" );
if( !pHatchingList->GetName().isEmpty() )
{
diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx
index 85a7cbe..6fffcef 100644
--- a/cui/source/tabpages/tpline.cxx
+++ b/cui/source/tabpages/tpline.cxx
@@ -562,7 +562,7 @@ void SvxLineTabPage::ActivatePage( const SfxItemSet& rSet )
INetURLObject aDashURL( pDashList->GetPath() );
aDashURL.Append( pDashList->GetName() );
- DBG_ASSERT( aDashURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" );
+ DBG_ASSERT( aDashURL.GetProtocol() != INetProtocol::NOT_VALID, "invalid URL" );
// LineEnd list
if( ( *pnLineEndListState & CT_MODIFIED ) || ( *pnLineEndListState & CT_CHANGED ) )
{
@@ -601,7 +601,7 @@ void SvxLineTabPage::ActivatePage( const SfxItemSet& rSet )
INetURLObject aLineURL( pLineEndList->GetPath() );
aLineURL.Append( pLineEndList->GetName() );
- DBG_ASSERT( aLineURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" );
+ DBG_ASSERT( aLineURL.GetProtocol() != INetProtocol::NOT_VALID, "invalid URL" );
// Evaluate if another TabPage set another fill type
if( m_pLbLineStyle->GetSelectEntryPos() != 0 )
{
diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx
index bfc053e..4fe1be6 100644
--- a/cui/source/tabpages/tplnedef.cxx
+++ b/cui/source/tabpages/tplnedef.cxx
@@ -184,7 +184,7 @@ void SvxLineDefTabPage::ActivatePage( const SfxItemSet& )
INetURLObject aURL( pDashList->GetPath() );
aURL.Append( pDashList->GetName() );
- DBG_ASSERT( aURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" );
+ DBG_ASSERT( aURL.GetProtocol() != INetProtocol::NOT_VALID, "invalid URL" );
*pPageType = 0; // 2
*pPosDashLb = LISTBOX_ENTRY_NOTFOUND;
@@ -801,7 +801,7 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickSaveHdl_Impl)
aDlg.AddFilter( aStrFilterType, aStrFilterType );
INetURLObject aFile( SvtPathOptions().GetPalettePath() );
- DBG_ASSERT( aFile.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" );
+ DBG_ASSERT( aFile.GetProtocol() != INetProtocol::NOT_VALID, "invalid URL" );
if( !pDashList->GetName().isEmpty() )
{
diff --git a/cui/source/tabpages/tplneend.cxx b/cui/source/tabpages/tplneend.cxx
index b69f9d9..d00f374 100644
--- a/cui/source/tabpages/tplneend.cxx
+++ b/cui/source/tabpages/tplneend.cxx
@@ -163,7 +163,7 @@ void SvxLineEndDefTabPage::ActivatePage( const SfxItemSet& )
INetURLObject aURL( pLineEndList->GetPath() );
aURL.Append( pLineEndList->GetName() );
- DBG_ASSERT( aURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" );
+ DBG_ASSERT( aURL.GetProtocol() != INetProtocol::NOT_VALID, "invalid URL" );
*pPageType = 0; // 3
*pPosLineEndLb = LISTBOX_ENTRY_NOTFOUND;
}
@@ -623,7 +623,7 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickSaveHdl_Impl)
aDlg.AddFilter( aStrFilterType, aStrFilterType );
INetURLObject aFile( SvtPathOptions().GetPalettePath() );
- DBG_ASSERT( aFile.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" );
+ DBG_ASSERT( aFile.GetProtocol() != INetProtocol::NOT_VALID, "invalid URL" );
if( !pLineEndList->GetName().isEmpty() )
{
diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx b/dbaccess/source/core/dataaccess/ModelImpl.cxx
index 143cc19..30967d8 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.cxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx
@@ -1245,7 +1245,7 @@ void ODatabaseModelImpl::impl_switchToLogicalURL( const OUString& i_rDocumentURL
)
{
INetURLObject aURL( i_rDocumentURL );
- if ( aURL.GetProtocol() != INET_PROT_NOT_VALID )
+ if ( aURL.GetProtocol() != INetProtocol::NOT_VALID )
{
m_sName = i_rDocumentURL;
// TODO: our data source must broadcast the change of the Name property
diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx
index 25fc583..98a3050 100644
--- a/dbaccess/source/core/dataaccess/databasecontext.cxx
+++ b/dbaccess/source/core/dataaccess/databasecontext.cxx
@@ -313,7 +313,7 @@ Reference< XInterface > ODatabaseContext::getRegisteredObject(const OUString& _
Reference< XInterface > ODatabaseContext::loadObjectFromURL(const OUString& _rName,const OUString& _sURL)
{
INetURLObject aURL( _sURL );
- if ( aURL.GetProtocol() == INET_PROT_NOT_VALID )
+ if ( aURL.GetProtocol() == INetProtocol::NOT_VALID )
throw NoSuchElementException( _rName, *this );
try
diff --git a/dbaccess/source/core/dataaccess/databaseregistrations.cxx b/dbaccess/source/core/dataaccess/databaseregistrations.cxx
index 7039a1a..9d2d9b7 100644
--- a/dbaccess/source/core/dataaccess/databaseregistrations.cxx
+++ b/dbaccess/source/core/dataaccess/databaseregistrations.cxx
@@ -239,7 +239,7 @@ namespace dbaccess
throw IllegalArgumentException( OUString(), *this, 2 );
INetURLObject aURL( _rLocation );
- if ( aURL.GetProtocol() == INET_PROT_NOT_VALID )
+ if ( aURL.GetProtocol() == INetProtocol::NOT_VALID )
throw IllegalArgumentException( OUString(), *this, 2 );
}
diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx
index b6c5708..021e973 100644
--- a/dbaccess/source/core/dataaccess/datasource.cxx
+++ b/dbaccess/source/core/dataaccess/datasource.cxx
@@ -1091,7 +1091,7 @@ Reference< XConnection > SAL_CALL ODatabaseSource::connectWithCompletion( const
// the name which should be referred in the login dialog
OUString sServerName( m_pImpl->m_sName );
INetURLObject aURLCheck( sServerName );
- if ( aURLCheck.GetProtocol() != INET_PROT_NOT_VALID )
+ if ( aURLCheck.GetProtocol() != INetProtocol::NOT_VALID )
sServerName = aURLCheck.getBase( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_UNAMBIGUOUS );
// the request
diff --git a/dbaccess/source/ext/macromigration/macromigrationpages.cxx b/dbaccess/source/ext/macromigration/macromigrationpages.cxx
index 3a2f559..658a14a 100644
--- a/dbaccess/source/ext/macromigration/macromigrationpages.cxx
+++ b/dbaccess/source/ext/macromigration/macromigrationpages.cxx
@@ -119,7 +119,7 @@ namespace dbmm
// get the document's current URL
Reference< XModel > xDocument( getDialog().getDocument(), UNO_QUERY_THROW );
INetURLObject aURLParser( xDocument->getURL() );
- OSL_ENSURE( aURLParser.GetProtocol() != INET_PROT_NOT_VALID, "SaveDBDocPage::initializePage: illegal document URL!" );
+ OSL_ENSURE( aURLParser.GetProtocol() != INetProtocol::NOT_VALID, "SaveDBDocPage::initializePage: illegal document URL!" );
OUStringBuffer aBaseName( aURLParser.getBase() );
aBaseName.appendAscii( ".backup" );
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index 618237e..53759bc 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -404,7 +404,7 @@ void SAL_CALL OApplicationController::disposing()
OUString());
// add to recent document list
- if ( aURL.GetProtocol() == INET_PROT_FILE )
+ if ( aURL.GetProtocol() == INetProtocol::FILE )
Application::AddToRecentDocumentList( aURL.GetURLNoPass( INetURLObject::NO_DECODE ),
(pFilter) ? pFilter->GetMimeType() : OUString(),
(pFilter) ? pFilter->GetServiceName() : OUString() );
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 93250fa..1161468 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -1089,7 +1089,7 @@ namespace
bool getDataSourceDisplayName_isURL( const OUString& _rDS, OUString& _rDisplayName, OUString& _rUniqueId )
{
INetURLObject aURL( _rDS );
- if ( aURL.GetProtocol() != INET_PROT_NOT_VALID )
+ if ( aURL.GetProtocol() != INetProtocol::NOT_VALID )
{
_rDisplayName = aURL.getBase(INetURLObject::LAST_SEGMENT,true,INetURLObject::DECODE_WITH_CHARSET);
_rUniqueId = aURL.GetMainURL( INetURLObject::NO_DECODE );
@@ -3653,7 +3653,7 @@ OUString SbaTableQueryBrowser::getPrivateTitle() const
OUString sName = m_pTreeView->getListBox().GetEntryText(m_pCurrentlyDisplayed);
sTitle = GetEntryText( pConnection );
INetURLObject aURL(sTitle);
- if ( aURL.GetProtocol() != INET_PROT_NOT_VALID )
+ if ( aURL.GetProtocol() != INetProtocol::NOT_VALID )
sTitle = aURL.getBase(INetURLObject::LAST_SEGMENT,true,INetURLObject::DECODE_WITH_CHARSET);
if ( !sName.isEmpty() )
{
diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
index 06afe78..3f914c7 100644
--- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
@@ -612,7 +612,7 @@ namespace dbaui
::ucbhelper::Content aParent(aParser.GetMainURL(INetURLObject::NO_DECODE), xEmptyEnv, comphelper::getProcessComponentContext());
OUString sContentType;
- if ( INET_PROT_FILE == eProtocol )
+ if ( INetProtocol::FILE == eProtocol )
{
sContentType = "application/vnd.sun.staroffice.fsys-folder";
// the file UCP currently does not support the ContentType property
diff --git a/dbaccess/source/ui/dlg/dbfindex.cxx b/dbaccess/source/ui/dlg/dbfindex.cxx
index 238a8ba..847f69f 100644
--- a/dbaccess/source/ui/dlg/dbfindex.cxx
+++ b/dbaccess/source/ui/dlg/dbfindex.cxx
@@ -268,7 +268,7 @@ void ODbaseIndexDialog::Init()
// if the string does not contain a path, cut the string
INetURLObject aURL;
- aURL.SetSmartProtocol(INET_PROT_FILE);
+ aURL.SetSmartProtocol(INetProtocol::FILE);
{
SvtPathOptions aPathOptions;
m_aDSN = aPathOptions.SubstituteVariable(m_aDSN);
@@ -300,7 +300,7 @@ void ODbaseIndexDialog::Init()
const OUString *pBegin = aFolderContent.getConstArray();
const OUString *pEnd = pBegin + aFolderContent.getLength();
- aURL.SetSmartProtocol(INET_PROT_FILE);
+ aURL.SetSmartProtocol(INetProtocol::FILE);
for(;pBegin != pEnd;++pBegin)
{
OUString aName;
@@ -408,7 +408,7 @@ void OTableInfo::WriteInfFile( const OUString& rDSN ) const
{
// open INF file
INetURLObject aURL;
- aURL.SetSmartProtocol(INET_PROT_FILE);
+ aURL.SetSmartProtocol(INetProtocol::FILE);
OUString aDsn = rDSN;
{
SvtPathOptions aPathOptions;
diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx
index 7111764..725f79c 100644
--- a/dbaccess/source/ui/dlg/dbwizsetup.cxx
+++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx
@@ -815,7 +815,7 @@ bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
{
m_aDocURL = INetURLObject(aFileDlg.GetPath());
- if( m_aDocURL.GetProtocol() != INET_PROT_NOT_VALID )
+ if( m_aDocURL.GetProtocol() != INetProtocol::NOT_VALID )
{
OUString sFileName = m_aDocURL.GetMainURL( INetURLObject::NO_DECODE );
if ( ::utl::UCBContentHelper::IsDocument(sFileName) )
diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx
index a3ded92..951e41f 100644
--- a/dbaccess/source/ui/dlg/sqlmessage.cxx
+++ b/dbaccess/source/ui/dlg/sqlmessage.cxx
@@ -595,7 +595,7 @@ void OSQLMessageBox::impl_createStandardButtons( WinBits _nStyle )
OUString aTmp;
INetURLObject aHID( m_sHelpURL );
- if ( aHID.GetProtocol() == INET_PROT_HID )
+ if ( aHID.GetProtocol() == INetProtocol::HID )
aTmp = aHID.GetURLPath();
else
aTmp = m_sHelpURL;
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index b51ae0b..9dca902 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -1081,7 +1081,7 @@ OUString getStrippedDatabaseName(const Reference<XPropertySet>& _xDataSource,OUS
}
OUString sName = _rsDatabaseName;
INetURLObject aURL(sName);
- if ( aURL.GetProtocol() != INET_PROT_NOT_VALID )
+ if ( aURL.GetProtocol() != INetProtocol::NOT_VALID )
sName = aURL.getBase(INetURLObject::LAST_SEGMENT,true,INetURLObject::DECODE_UNAMBIGUOUS);
return sName;
}
diff --git a/desktop/source/app/dispatchwatcher.cxx b/desktop/source/app/dispatchwatcher.cxx
index ce5c2ac..d33459c 100644
--- a/desktop/source/app/dispatchwatcher.cxx
+++ b/desktop/source/app/dispatchwatcher.cxx
@@ -395,7 +395,7 @@ bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatchRequ
else
{
INetURLObject aObj( aName );
- if ( aObj.GetProtocol() == INET_PROT_PRIV_SOFFICE )
+ if ( aObj.GetProtocol() == INetProtocol::PRIV_SOFFICE )
aTarget = "_default";
// Set "AsTemplate" argument according to request type
diff --git a/editeng/source/items/flditem.cxx b/editeng/source/items/flditem.cxx
index 7371b6c..09e8021 100644
--- a/editeng/source/items/flditem.cxx
+++ b/editeng/source/items/flditem.cxx
@@ -1008,7 +1008,7 @@ OUString SvxExtFileField::GetFormatted() const
INetURLObject aURLObj( aFile );
- if( INET_PROT_NOT_VALID == aURLObj.GetProtocol() )
+ if( INetProtocol::NOT_VALID == aURLObj.GetProtocol() )
{
// invalid? try to interpret string as system file name
OUString aURLStr;
@@ -1020,12 +1020,12 @@ OUString SvxExtFileField::GetFormatted() const
// #92009# Be somewhat liberate when trying to
// get formatted content out of the FileField
- if( INET_PROT_NOT_VALID == aURLObj.GetProtocol() )
+ if( INetProtocol::NOT_VALID == aURLObj.GetProtocol() )
{
// still not valid? Then output as is
aString = aFile;
}
- else if( INET_PROT_FILE == aURLObj.GetProtocol() )
+ else if( INetProtocol::FILE == aURLObj.GetProtocol() )
{
switch( eFormat )
{
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 7ec0a8b..241b26b 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -662,7 +662,7 @@ bool SvxAutoCorrect::FnAddNonBrkSpace(
sal_Int32 nProtocolLen = nEndPos - nSttWdPos + 1;
if (nIndex + nProtocolLen <= rTxt.getLength())
{
- if (INetURLObject::CompareProtocolScheme(rTxt.copy(nIndex, nProtocolLen)) != INET_PROT_NOT_VALID)
+ if (INetURLObject::CompareProtocolScheme(rTxt.copy(nIndex, nProtocolLen)) != INetProtocol::NOT_VALID)
return false;
}
@@ -854,7 +854,7 @@ bool SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
sal_Int32 nProtocolLen = pDelim - pWordStt + 1;
if (nIndex + nProtocolLen <= rTxt.getLength())
{
- if (INetURLObject::CompareProtocolScheme(rTxt.copy(nIndex, nProtocolLen)) != INET_PROT_NOT_VALID)
+ if (INetURLObject::CompareProtocolScheme(rTxt.copy(nIndex, nProtocolLen)) != INetProtocol::NOT_VALID)
return false; // already ok
}
diff --git a/extensions/source/abpilot/abpfinalpage.cxx b/extensions/source/abpilot/abpfinalpage.cxx
index 337b732..55da306 100644
--- a/extensions/source/abpilot/abpfinalpage.cxx
+++ b/extensions/source/abpilot/abpfinalpage.cxx
@@ -87,7 +87,7 @@ namespace abp
AddressSettings& rSettings = getSettings();
INetURLObject aURL( rSettings.sDataSourceName );
- if( aURL.GetProtocol() == INET_PROT_NOT_VALID )
+ if( aURL.GetProtocol() == INetProtocol::NOT_VALID )
{
OUString sPath = SvtPathOptions().GetWorkPath();
sPath += "/";
@@ -102,7 +102,7 @@ namespace abp
aURL.SetURL(sPath);
}
- OSL_ENSURE( aURL.GetProtocol() != INET_PROT_NOT_VALID ,"No valid file name!");
+ OSL_ENSURE( aURL.GetProtocol() != INetProtocol::NOT_VALID ,"No valid file name!");
rSettings.sDataSourceName = aURL.GetMainURL( INetURLObject::NO_DECODE );
m_pLocationController->setURL( rSettings.sDataSourceName );
OUString sName = aURL.getName( );
diff --git a/extensions/source/bibliography/general.cxx b/extensions/source/bibliography/general.cxx
index f6cbfee..736bba1 100644
--- a/extensions/source/bibliography/general.cxx
+++ b/extensions/source/bibliography/general.cxx
@@ -448,7 +448,7 @@ uno::Reference< awt::XControlModel > BibGeneralPage::AddXControl(
if(xPropInfo->hasPropertyByName(uProp))
{
OUString sId( INET_HID_SCHEME );
- DBG_ASSERT( INetURLObject( OStringToOUString( sHelpId, RTL_TEXTENCODING_UTF8 ) ).GetProtocol() == INET_PROT_NOT_VALID, "Wrong HelpId!" );
+ DBG_ASSERT( INetURLObject( OStringToOUString( sHelpId, RTL_TEXTENCODING_UTF8 ) ).GetProtocol() == INetProtocol::NOT_VALID, "Wrong HelpId!" );
sId += OStringToOUString( sHelpId, RTL_TEXTENCODING_UTF8 );
xPropSet->setPropertyValue( uProp, makeAny( sId ) );
}
diff --git a/extensions/source/dbpilots/controlwizard.cxx b/extensions/source/dbpilots/controlwizard.cxx
index 061f765..4aa7b27 100644
--- a/extensions/source/dbpilots/controlwizard.cxx
+++ b/extensions/source/dbpilots/controlwizard.cxx
@@ -202,7 +202,7 @@ namespace dbp
}
INetURLObject aURL( sDataSource );
- if( aURL.GetProtocol() != INET_PROT_NOT_VALID )
+ if( aURL.GetProtocol() != INetProtocol::NOT_VALID )
sDataSource = aURL.GetName(INetURLObject::DECODE_WITH_CHARSET);
m_pFormDatasource->SetText(sDataSource);
m_pFormTable->SetText(sCommand);
diff --git a/extensions/source/plugin/base/context.cxx b/extensions/source/plugin/base/context.cxx
index 31250b5..c4007ab 100644
--- a/extensions/source/plugin/base/context.cxx
+++ b/extensions/source/plugin/base/context.cxx
@@ -131,7 +131,7 @@ void XPluginContext_Impl::getURL(const Reference< ::com::sun::star::plugin::XPlu
if( target.isEmpty() )
{
INetURLObject aURL;
- aURL.SetSmartProtocol( INET_PROT_FILE );
+ aURL.SetSmartProtocol( INetProtocol::FILE );
aURL.SetSmartURL( url );
OUString aUrl = aURL.GetMainURL(INetURLObject::DECODE_TO_IURI);
diff --git a/extensions/source/plugin/base/xplugin.cxx b/extensions/source/plugin/base/xplugin.cxx
index cef5e4b..41feb4e 100644
--- a/extensions/source/plugin/base/xplugin.cxx
+++ b/extensions/source/plugin/base/xplugin.cxx
@@ -1051,7 +1051,7 @@ void PluginInputStream::load()
Guard< Mutex > aGuard( m_pPlugin->getMutex() );
INetURLObject aUrl;
- aUrl.SetSmartProtocol( INET_PROT_FILE );
+ aUrl.SetSmartProtocol( INetProtocol::FILE );
aUrl.SetSmartURL(
OUString( getStream().url,
strlen( getStream().url ),
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx
index ae7a46c..b007711 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -2432,7 +2432,7 @@ namespace pcr
}
// additional info about what happened
INetURLObject aParser( sDataSourceName );
- if ( aParser.GetProtocol() != INET_PROT_NOT_VALID )
+ if ( aParser.GetProtocol() != INetProtocol::NOT_VALID )
sDataSourceName = aParser.getBase( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
OUString sInfo(PcrRes(RID_STR_UNABLETOCONNECT).toString().replaceAll("$name$", sDataSourceName));
SQLContext aContext;
@@ -2845,7 +2845,7 @@ namespace pcr
OUString sURL;
OSL_VERIFY( impl_getPropertyValue_throw( PROPERTY_TARGET_URL ) >>= sURL );
INetURLObject aParser( sURL );
- if ( INET_PROT_FILE == aParser.GetProtocol() )
+ if ( INetProtocol::FILE == aParser.GetProtocol() )
// set the initial directory only for file-URLs. Everything else
// is considered to be potentially expensive
aFileDlg.SetDisplayDirectory( sURL );
@@ -2900,7 +2900,7 @@ namespace pcr
OUString sDataSource;
OSL_VERIFY( impl_getPropertyValue_throw( PROPERTY_DATASOURCE ) >>= sDataSource );
INetURLObject aParser( sDataSource );
- if ( INET_PROT_FILE == aParser.GetProtocol() )
+ if ( INetProtocol::FILE == aParser.GetProtocol() )
// set the initial directory only for file-URLs. Everything else
// is considered to be potentially expensive
aFileDlg.SetDisplayDirectory( sDataSource );
diff --git a/extensions/source/propctrlr/pcrcommon.cxx b/extensions/source/propctrlr/pcrcommon.cxx
index 9292a02..25bed3f 100644
--- a/extensions/source/propctrlr/pcrcommon.cxx
+++ b/extensions/source/propctrlr/pcrcommon.cxx
@@ -39,7 +39,7 @@ namespace pcr
OString HelpIdUrl::getHelpId( const OUString& _rHelpURL )
{
INetURLObject aHID( _rHelpURL );
- if ( aHID.GetProtocol() == INET_PROT_HID )
+ if ( aHID.GetProtocol() == INetProtocol::HID )
return OUStringToOString( aHID.GetURLPath(), RTL_TEXTENCODING_UTF8 );
else
return OUStringToOString( _rHelpURL, RTL_TEXTENCODING_UTF8 );
@@ -51,7 +51,7 @@ namespace pcr
OUStringBuffer aBuffer;
OUString aTmp( OStringToOUString(sHelpId, RTL_TEXTENCODING_UTF8) );
INetURLObject aHID( aTmp );
- if ( aHID.GetProtocol() == INET_PROT_NOT_VALID )
+ if ( aHID.GetProtocol() == INetProtocol::NOT_VALID )
aBuffer.appendAscii( INET_HID_SCHEME );
aBuffer.append( aTmp.getStr() );
return aBuffer.makeStringAndClear();
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index b2f7093..ffd0cda 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -3944,7 +3944,7 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons
if( ::utl::LocalFileHelper::ConvertPhysicalNameToURL( aFileName, aValidURL ) )
aAbsURL = INetURLObject( aValidURL );
}
- if( aAbsURL.GetProtocol() != INET_PROT_NOT_VALID )
+ if( aAbsURL.GetProtocol() != INetProtocol::NOT_VALID )
{
GraphicFilter &rGrfFilter = GraphicFilter::GetGraphicFilter();
aLinkFilterName = rGrfFilter.GetImportFormatName(
diff --git a/filter/source/msfilter/msvbahelper.cxx b/filter/source/msfilter/msvbahelper.cxx
index e7662ca..3dbdde9 100644
--- a/filter/source/msfilter/msvbahelper.cxx
+++ b/filter/source/msfilter/msvbahelper.cxx
@@ -80,7 +80,7 @@ SfxObjectShell* findShellForUrl( const OUString& sMacroURLOrPath )
SfxObjectShell* pShell = SfxObjectShell::GetFirst();
INetURLObject aObj;
aObj.SetURL( sMacroURLOrPath );
- bool bIsURL = aObj.GetProtocol() != INET_PROT_NOT_VALID;
+ bool bIsURL = aObj.GetProtocol() != INetProtocol::NOT_VALID;
OUString aURL;
if ( bIsURL )
aURL = sMacroURLOrPath;
@@ -398,7 +398,7 @@ MacroResolvedInfo resolveVBAMacro( SfxObjectShell* pShell, const OUString& Macro
{
INetURLObject aObj;
aObj.SetURL( sCreatedFrom );
- bool bIsURL = aObj.GetProtocol() != INET_PROT_NOT_VALID;
+ bool bIsURL = aObj.GetProtocol() != INetProtocol::NOT_VALID;
OUString aURL;
if ( bIsURL )
aURL = sCreatedFrom;
diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index 19e3f18..d4942b9 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -381,7 +381,7 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >&
std::set< PDFWriter::ErrorCode > aErrors;
- if( aURL.GetProtocol() != INET_PROT_FILE )
+ if( aURL.GetProtocol() != INetProtocol::FILE )
{
OUString aTmp;
@@ -389,7 +389,7 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >&
aURL = INetURLObject(aTmp);
}
- if( aURL.GetProtocol() == INET_PROT_FILE )
+ if( aURL.GetProtocol() == INetProtocol::FILE )
{
Reference< XRenderable > xRenderable( mxSrcDoc, UNO_QUERY );
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index 225967c..3041e83 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -489,9 +489,9 @@ OUString ODatabaseForm::GetDataEncoded(bool _bURLEncoded,const Reference<XContro
{
// For File URLs we transfer the file name and not a URL, because Netscape does it like that
INetURLObject aURL;
- aURL.SetSmartProtocol(INET_PROT_FILE);
+ aURL.SetSmartProtocol(INetProtocol::FILE);
aURL.SetSmartURL(aValue);
- if( INET_PROT_FILE == aURL.GetProtocol() )
+ if( INetProtocol::FILE == aURL.GetProtocol() )
aValue = INetURLObject::decode(aURL.PathToFileName(), '%', INetURLObject::DECODE_UNAMBIGUOUS);
}
Encode( aName );
@@ -1035,9 +1035,9 @@ bool ODatabaseForm::InsertFilePart( INetMIMEMessage& rParent, const OUString& rN
{
// We can only process File URLs yet
INetURLObject aURL;
- aURL.SetSmartProtocol(INET_PROT_FILE);
+ aURL.SetSmartProtocol(INetProtocol::FILE);
aURL.SetSmartURL(rFileName);
- if( INET_PROT_FILE == aURL.GetProtocol() )
+ if( INetProtocol::FILE == aURL.GetProtocol() )
{
aFileName = INetURLObject::decode(aURL.PathToFileName(), '%', INetURLObject::DECODE_UNAMBIGUOUS);
pStream = ::utl::UcbStreamHelper::CreateStream(aFileName, StreamMode::READ);
diff --git a/forms/source/component/clickableimage.cxx b/forms/source/component/clickableimage.cxx
index d111fc8..79a4d04 100644
--- a/forms/source/component/clickableimage.cxx
+++ b/forms/source/component/clickableimage.cxx
@@ -716,7 +716,7 @@ namespace frm
// the SfxMedium is not allowed to be created with an invalid URL, so we have to check this first
INetURLObject aUrl(rURL);
- if (INET_PROT_NOT_VALID == aUrl.GetProtocol())
+ if (INetProtocol::NOT_VALID == aUrl.GetProtocol())
// we treat an invalid URL like we would treat no URL
return;
diff --git a/forms/source/xforms/submission/submission_get.cxx b/forms/source/xforms/submission/submission_get.cxx
index de7caa6..79a295a 100644
--- a/forms/source/xforms/submission/submission_get.cxx
+++ b/forms/source/xforms/submission/submission_get.cxx
@@ -80,7 +80,7 @@ CSubmission::SubmissionResult CSubmissionGet::submit(const css::uno::Reference<
Sequence< sal_Int8 > aByteBuffer(size);
while ((n = aInStream->readSomeBytes(aByteBuffer, size-1)) != 0)
aQueryString.append(reinterpret_cast<char const *>(aByteBuffer.getConstArray()), n);
- if (!aQueryString.isEmpty() && m_aURLObj.GetProtocol() != INET_PROT_FILE)
+ if (!aQueryString.isEmpty() && m_aURLObj.GetProtocol() != INetProtocol::FILE)
{
aUTF8QueryURL.append('?');
aUTF8QueryURL.append(aQueryString.makeStringAndClear());
diff --git a/fpicker/source/office/OfficeControlAccess.cxx b/fpicker/source/office/OfficeControlAccess.cxx
index a5bfde1..d7b0aab 100644
--- a/fpicker/source/office/OfficeControlAccess.cxx
+++ b/fpicker/source/office/OfficeControlAccess.cxx
@@ -182,7 +182,7 @@ namespace svt
{
OUString sHelpID( sHelpURL );
INetURLObject aHID( sHelpURL );
- if ( aHID.GetProtocol() == INET_PROT_HID )
+ if ( aHID.GetProtocol() == INetProtocol::HID )
sHelpID = aHID.GetURLPath();
// URLs should always be UTF8 encoded and escaped
@@ -205,7 +205,7 @@ namespace svt
OUString sHelpURL;
OUString aTmp( OStringToOUString( aHelpId, RTL_TEXTENCODING_UTF8 ) );
INetURLObject aHID( aTmp );
- if ( aHID.GetProtocol() == INET_PROT_NOT_VALID )
+ if ( aHID.GetProtocol() == INetProtocol::NOT_VALID )
sHelpURL = INET_HID_SCHEME;
sHelpURL += aTmp;
return sHelpURL;
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index 7ad01ab..b13e5ec 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -210,13 +210,13 @@ namespace
// So we have to check if the file name denotes a folder or a file.
// For performance reasons, we do this for file urls only
INetURLObject aURL( aNewFile );
- if ( INET_PROT_NOT_VALID == aURL.GetProtocol() )
+ if ( INetProtocol::NOT_VALID == aURL.GetProtocol() )
{
OUString sURL;
if ( ::utl::LocalFileHelper::ConvertPhysicalNameToURL( aNewFile, sURL ) )
aURL = INetURLObject( sURL );
}
- if ( INET_PROT_FILE == aURL.GetProtocol() )
+ if ( INetProtocol::FILE == aURL.GetProtocol() )
{
try
{
@@ -277,7 +277,7 @@ namespace
static OUString lcl_ensureFinalSlash( const OUString& _rDir )
{
- INetURLObject aWorkPathObj( _rDir, INET_PROT_FILE );
+ INetURLObject aWorkPathObj( _rDir, INetProtocol::FILE );
aWorkPathObj.setFinalSlash();
return aWorkPathObj.GetMainURL( INetURLObject::NO_DECODE );
}
@@ -916,7 +916,7 @@ IMPL_STATIC_LINK( SvtFileDialog, OpenHdl_Impl, void*, pVoid )
{
INetURLObject aFileObject( aFileName );
- if ( ( aFileObject.GetProtocol() == INET_PROT_NOT_VALID ) && !aFileName.isEmpty() )
+ if ( ( aFileObject.GetProtocol() == INetProtocol::NOT_VALID ) && !aFileName.isEmpty() )
{
OUString sCompleted = SvtURLBox::ParseSmart( aFileName, pThis->_pFileView->GetViewURL(), SvtPathOptions().GetWorkPath() );
if ( !sCompleted.isEmpty() )
@@ -1073,7 +1073,7 @@ IMPL_STATIC_LINK( SvtFileDialog, OpenHdl_Impl, void*, pVoid )
{
// do an existence check herein, again
- if ( INET_PROT_FILE == aFileObj.GetProtocol( ) )
+ if ( INetProtocol::FILE == aFileObj.GetProtocol( ) )
{
bool bExists = pThis->m_aContent.is( aFileObj.GetMainURL( INetURLObject::NO_DECODE ) );
@@ -1082,7 +1082,7 @@ IMPL_STATIC_LINK( SvtFileDialog, OpenHdl_Impl, void*, pVoid )
OUString sError( SVT_RESSTR( RID_FILEOPEN_NOTEXISTENTFILE ) );
OUString sInvalidFile( aFileObj.GetMainURL( INetURLObject::DECODE_TO_IURI ) );
- if ( INET_PROT_FILE == aFileObj.GetProtocol() )
+ if ( INetProtocol::FILE == aFileObj.GetProtocol() )
{ // if it's a file URL, transform the URL into system notation
OUString sURL( sInvalidFile );
OUString sSystem;
@@ -1394,7 +1394,7 @@ void SvtFileDialog::UpdateControls( const OUString& rURL )
{
OUString sText;
- DBG_ASSERT( INET_PROT_NOT_VALID != aObj.GetProtocol(), "SvtFileDialog::UpdateControls: Invalid URL!" );
+ DBG_ASSERT( INetProtocol::NOT_VALID != aObj.GetProtocol(), "SvtFileDialog::UpdateControls: Invalid URL!" );
if ( aObj.getSegmentCount() )
{
@@ -1402,7 +1402,7 @@ void SvtFileDialog::UpdateControls( const OUString& rURL )
if ( !sText.isEmpty() )
{
// no Fsys path for server file system ( only UCB has mountpoints! )
- if ( INET_PROT_FILE != aObj.GetProtocol() )
+ if ( INetProtocol::FILE != aObj.GetProtocol() )
sText = rURL.copy( INetURLObject::GetScheme( aObj.GetProtocol() ).getLength() );
}
@@ -1449,7 +1449,7 @@ IMPL_LINK( SvtFileDialog, SelectHdl_Impl, SvTabListBox*, pBox )
INetURLObject aObj( pUserData->maURL );
if ( FILEDLG_TYPE_PATHDLG == _pImp->_eDlgType )
{
- if ( aObj.GetProtocol() == INET_PROT_FILE )
+ if ( aObj.GetProtocol() == INetProtocol::FILE )
{
if ( !pUserData->mbIsFolder )
aObj.removeSegment();
@@ -1524,7 +1524,7 @@ IMPL_LINK( SvtFileDialog, OpenDoneHdl_Impl, SvtFileView*, pView )
{
// additional check: the parent folder should not be prohibited
INetURLObject aCurrentFolder( sCurrentFolder );
- DBG_ASSERT( INET_PROT_NOT_VALID != aCurrentFolder.GetProtocol(),
+ DBG_ASSERT( INetProtocol::NOT_VALID != aCurrentFolder.GetProtocol(),
"SvtFileDialog::OpenDoneHdl_Impl: invalid current URL!" );
aCurrentFolder.removeSegment();
@@ -1719,7 +1719,7 @@ short SvtFileDialog::Execute()
if ( RET_OK == nResult )
{
INetURLObject aURL( _aPath );
- if ( aURL.GetProtocol() == INET_PROT_FILE )
+ if ( aURL.GetProtocol() == INetProtocol::FILE )
{
// remember the selected directory only for file URLs not for virtual folders
sal_Int32 nLevel = aURL.getSegmentCount();
@@ -2004,7 +2004,7 @@ short SvtFileDialog::PrepareExecute()
}
INetURLObject aObj = aFolderURL;
- if ( aObj.GetProtocol() == INET_PROT_FILE )
+ if ( aObj.GetProtocol() == INetProtocol::FILE )
{
// set folder as current directory
aObj.setFinalSlash();
@@ -2076,7 +2076,7 @@ void SvtFileDialog::SetStandardDir( const OUString& rStdDir )
{
INetURLObject aObj( rStdDir );
- DBG_ASSERT( aObj.GetProtocol() != INET_PROT_NOT_VALID, "Invalid protocol!" );
+ DBG_ASSERT( aObj.GetProtocol() != INetProtocol::NOT_VALID, "Invalid protocol!" );
aObj.setFinalSlash();
_pImp->SetStandardDir( aObj.GetMainURL( INetURLObject::NO_DECODE ) );
}
@@ -2269,7 +2269,7 @@ bool SvtFileDialog::IsolateFilterFromPath_Impl( OUString& rPath, OUString& rFilt
// use question mark as wildcard only for files
INetProtocol eProt = INetURLObject::CompareProtocolScheme( rPath );
- if ( INET_PROT_NOT_VALID != eProt && INET_PROT_FILE != eProt )
+ if ( INetProtocol::NOT_VALID != eProt && INetProtocol::FILE != eProt )
nQuestionMarkPos = -1;
nWildCardPos = std::min( nWildCardPos, nQuestionMarkPos );
diff --git a/framework/source/classes/menumanager.cxx b/framework/source/classes/menumanager.cxx
index b9350ef..06ff1e2 100644
--- a/framework/source/classes/menumanager.cxx
+++ b/framework/source/classes/menumanager.cxx
@@ -567,7 +567,7 @@ void MenuManager::UpdateSpecialFileMenu( Menu* pMenu )
OUString aMenuTitle;
INetURLObject aURL( aURLString );
- if ( aURL.GetProtocol() == INET_PROT_FILE )
+ if ( aURL.GetProtocol() == INetProtocol::FILE )
{
// Do handle file URL differently => convert it to a system
// path and abbreviate it with a special function:
diff --git a/framework/source/fwe/helper/titlehelper.cxx b/framework/source/fwe/helper/titlehelper.cxx
index 5ddf125..ee5cbf9 100644
--- a/framework/source/fwe/helper/titlehelper.cxx
+++ b/framework/source/fwe/helper/titlehelper.cxx
@@ -618,7 +618,7 @@ OUString TitleHelper::impl_convertURL2Title(const OUString& sURL)
INetURLObject aURL (sURL);
OUString sTitle;
- if (aURL.GetProtocol() == INET_PROT_FILE)
+ if (aURL.GetProtocol() == INetProtocol::FILE)
{
if (aURL.HasMark())
aURL = INetURLObject(aURL.GetURLNoMark());
diff --git a/framework/source/services/urltransformer.cxx b/framework/source/services/urltransformer.cxx
index 77394bb..c17743f 100644
--- a/framework/source/services/urltransformer.cxx
+++ b/framework/source/services/urltransformer.cxx
@@ -140,14 +140,14 @@ sal_Bool SAL_CALL URLTransformer::parseStrict( css::util::URL& aURL ) throw( css
aProtocol = aURL.Complete.copy( 0, nURLIndex+1 );
// If INetURLObject knows this protocol let it parse
- if ( INetURLObject::CompareProtocolScheme( aProtocol ) != INET_PROT_NOT_VALID )
+ if ( INetURLObject::CompareProtocolScheme( aProtocol ) != INetProtocol::NOT_VALID )
{
// Initialize parser with given URL.
INetURLObject aParser( aURL.Complete );
// Get all information about this URL.
INetProtocol eINetProt = aParser.GetProtocol();
- if ( eINetProt == INET_PROT_NOT_VALID )
+ if ( eINetProt == INetProtocol::NOT_VALID )
{
return sal_False;
}
@@ -200,7 +200,7 @@ sal_Bool SAL_CALL URLTransformer::parseSmart( css::util::URL& aURL,
{
// Minmal support for unknown protocols. This is mandatory to support the "Protocol Handlers" implemented
// in framework!
- if ( INetURLObject::CompareProtocolScheme( sSmartProtocol ) == INET_PROT_NOT_VALID )
+ if ( INetURLObject::CompareProtocolScheme( sSmartProtocol ) == INetProtocol::NOT_VALID )
{
// Try to extract the protocol
sal_Int32 nIndex = aURL.Complete.indexOf( ':' );
@@ -211,7 +211,7 @@ sal_Bool SAL_CALL URLTransformer::parseSmart( css::util::URL& aURL,
// If INetURLObject knows this protocol something is wrong as detected before =>
// give up and return false!
- if ( INetURLObject::CompareProtocolScheme( aProtocol ) != INET_PROT_NOT_VALID )
+ if ( INetURLObject::CompareProtocolScheme( aProtocol ) != INetProtocol::NOT_VALID )
return sal_False;
else
aURL.Protocol = aProtocol;
@@ -234,7 +234,7 @@ sal_Bool SAL_CALL URLTransformer::assemble( css::util::URL& aURL ) throw( css::u
// Initialize parser.
INetURLObject aParser;
- if ( INetURLObject::CompareProtocolScheme( aURL.Protocol ) != INET_PROT_NOT_VALID )
+ if ( INetURLObject::CompareProtocolScheme( aURL.Protocol ) != INetProtocol::NOT_VALID )
{
OUStringBuffer aCompletePath( aURL.Path );
diff --git a/framework/source/uielement/generictoolbarcontroller.cxx b/framework/source/uielement/generictoolbarcontroller.cxx
index f59982a..8cdfb51 100644
--- a/framework/source/uielement/generictoolbarcontroller.cxx
+++ b/framework/source/uielement/generictoolbarcontroller.cxx
@@ -55,7 +55,7 @@ static bool isEnumCommand( const OUString& rCommand )
{
INetURLObject aURL( rCommand );
- if (( aURL.GetProtocol() == INET_PROT_UNO ) &&
+ if (( aURL.GetProtocol() == INetProtocol::UNO ) &&
( aURL.GetURLPath().indexOf( '.' ) != -1))
return true;
@@ -79,7 +79,7 @@ static OUString getMasterCommand( const OUString& rCommand )
{
OUString aMasterCommand( rCommand );
INetURLObject aURL( rCommand );
- if ( aURL.GetProtocol() == INET_PROT_UNO )
+ if ( aURL.GetProtocol() == INetProtocol::UNO )
{
sal_Int32 nIndex = aURL.GetURLPath().indexOf( '.' );
if ( nIndex )
diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx b/framework/source/uielement/recentfilesmenucontroller.cxx
index ed23595..f536e26 100644
--- a/framework/source/uielement/recentfilesmenucontroller.cxx
+++ b/framework/source/uielement/recentfilesmenucontroller.cxx
@@ -198,7 +198,7 @@ void RecentFilesMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >
INetURLObject aURL( m_aRecentFilesItems[i].aURL );
OUString aTipHelpText( aURL.getFSysPath( INetURLObject::FSYS_DETECT ) );
- if ( aURL.GetProtocol() == INET_PROT_FILE )
+ if ( aURL.GetProtocol() == INetProtocol::FILE )
{
// Do handle file URL differently: don't show the protocol, just the file name
aMenuTitle = aURL.GetLastName(INetURLObject::DECODE_WITH_CHARSET, RTL_TEXTENCODING_UTF8);
diff --git a/include/o3tl/enumarray.hxx b/include/o3tl/enumarray.hxx
index b476cb3..6bc3dff 100644
--- a/include/o3tl/enumarray.hxx
+++ b/include/o3tl/enumarray.hxx
@@ -51,7 +51,7 @@ public:
static const size_type max_index = static_cast<size_type>(E::LAST);
- const V operator[](E index) const
+ const V& operator[](E index) const
{
assert(index>=static_cast<E>(0) && index<=E::LAST);
return detail_values[static_cast<size_type>(index)];
diff --git a/include/svl/inethist.hxx b/include/svl/inethist.hxx
index a21db8a..6b4f975 100644
--- a/include/svl/inethist.hxx
+++ b/include/svl/inethist.hxx
@@ -63,10 +63,10 @@ public:
*/
bool QueryProtocol (INetProtocol eProto) const
{
- return ((eProto == INET_PROT_FILE ) ||
- (eProto == INET_PROT_FTP ) ||
- (eProto == INET_PROT_HTTP ) ||
- (eProto == INET_PROT_HTTPS) );
+ return ((eProto == INetProtocol::FILE ) ||
+ (eProto == INetProtocol::FTP ) ||
+ (eProto == INetProtocol::HTTP ) ||
+ (eProto == INetProtocol::HTTPS) );
}
/** QueryUrl.
diff --git a/include/svtools/inettbc.hxx b/include/svtools/inettbc.hxx
index b9852ce..92a0766 100644
--- a/include/svtools/inettbc.hxx
+++ b/include/svtools/inettbc.hxx
@@ -59,9 +59,9 @@ protected:
virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
public:
- SvtURLBox( vcl::Window* pParent, INetProtocol eSmart = INET_PROT_NOT_VALID, bool bSetDefaultHelpID = true );
- SvtURLBox( vcl::Window* pParent, WinBits _nStyle, INetProtocol eSmart = INET_PROT_NOT_VALID, bool bSetDefaultHelpID = true );
- SvtURLBox( vcl::Window* pParent, const ResId& _rResId, INetProtocol eSmart = INET_PROT_NOT_VALID, bool bSetDefaultHelpID = true );
+ SvtURLBox( vcl::Window* pParent, INetProtocol eSmart = INetProtocol::NOT_VALID, bool bSetDefaultHelpID = true );
+ SvtURLBox( vcl::Window* pParent, WinBits _nStyle, INetProtocol eSmart = INetProtocol::NOT_VALID, bool bSetDefaultHelpID = true );
+ SvtURLBox( vcl::Window* pParent, const ResId& _rResId, INetProtocol eSmart = INetProtocol::NOT_VALID, bool bSetDefaultHelpID = true );
virtual ~SvtURLBox();
void SetBaseURL( const OUString& rURL );
diff --git a/include/svtools/place.hxx b/include/svtools/place.hxx
index e46eba4..0933f99 100644
--- a/include/svtools/place.hxx
+++ b/include/svtools/place.hxx
@@ -33,7 +33,7 @@ public:
OUString& GetName( ) { return msName; }
OUString GetUrl( ) { return maUrl.GetMainURL( INetURLObject::NO_DECODE ); }
INetURLObject& GetUrlObject( ) { return maUrl; }
- bool IsLocal( ) { return maUrl.GetProtocol() == INET_PROT_FILE; }
+ bool IsLocal( ) { return maUrl.GetProtocol() == INetProtocol::FILE; }
bool IsEditable( ) { return mbEditable; }
};
diff --git a/include/tools/urlobj.hxx b/include/tools/urlobj.hxx
index bbe6d39..50c5b51 100644
--- a/include/tools/urlobj.hxx
+++ b/include/tools/urlobj.hxx
@@ -64,43 +64,43 @@ enum
};
// Schemes:
-enum INetProtocol
+enum class INetProtocol
{
- INET_PROT_NOT_VALID = 0,
- INET_PROT_FTP = 1,
- INET_PROT_HTTP = 2,
- INET_PROT_FILE = 3,
- INET_PROT_MAILTO = 4,
- INET_PROT_VND_SUN_STAR_WEBDAV = 5,
- INET_PROT_NEWS = 6,
- INET_PROT_PRIV_SOFFICE = 7,
- INET_PROT_VND_SUN_STAR_HELP = 8,
- INET_PROT_HTTPS = 9,
- INET_PROT_SLOT = 10,
- INET_PROT_MACRO = 11,
- INET_PROT_JAVASCRIPT = 12,
- INET_PROT_IMAP = 13,
- INET_PROT_POP3 = 14,
- INET_PROT_DATA = 15,
- INET_PROT_CID = 16,
- INET_PROT_OUT = 17,
- INET_PROT_VND_SUN_STAR_HIER = 18,
- INET_PROT_VIM = 19,
- INET_PROT_UNO = 20,
- INET_PROT_COMPONENT = 21,
- INET_PROT_VND_SUN_STAR_PKG = 22,
- INET_PROT_LDAP = 23,
- INET_PROT_DB = 24,
- INET_PROT_VND_SUN_STAR_CMD = 25,
- INET_PROT_TELNET = 26,
- INET_PROT_VND_SUN_STAR_EXPAND = 27,
- INET_PROT_VND_SUN_STAR_TDOC = 28,
- INET_PROT_GENERIC = 29,
- INET_PROT_SMB = 30,
- INET_PROT_HID = 31,
- INET_PROT_SFTP = 32,
- INET_PROT_CMIS = 33,
- INET_PROT_END = 34
+ NOT_VALID,
+ FTP,
+ HTTP,
+ FILE,
+ MAILTO,
+ VND_SUN_STAR_WEBDAV,
+ NEWS,
+ PRIV_SOFFICE,
+ VND_SUN_STAR_HELP,
+ HTTPS,
+ SLOT,
+ MACRO,
+ JAVASCRIPT,
+ IMAP,
+ POP3,
+ DATA,
+ CID,
+ OUT,
+ VND_SUN_STAR_HIER,
+ VIM,
+ UNO,
+ COMPONENT,
+ VND_SUN_STAR_PKG,
+ LDAP,
+ DB,
+ VND_SUN_STAR_CMD,
+ TELNET,
+ VND_SUN_STAR_EXPAND,
+ VND_SUN_STAR_TDOC,
+ GENERIC,
+ SMB,
+ HID,
+ SFTP,
+ CMIS,
+ LAST = CMIS
};
class TOOLS_DLLPUBLIC SAL_WARN_UNUSED INetURLObject
@@ -182,9 +182,9 @@ public:
// General Structure:
inline INetURLObject():
- m_eScheme(INET_PROT_NOT_VALID), m_eSmartScheme(INET_PROT_HTTP) {}
+ m_eScheme(INetProtocol::NOT_VALID), m_eSmartScheme(INetProtocol::HTTP) {}
- inline bool HasError() const { return m_eScheme == INET_PROT_NOT_VALID; }
+ inline bool HasError() const { return m_eScheme == INetProtocol::NOT_VALID; }
inline OUString GetMainURL(DecodeMechanism eMechanism,
rtl_TextEncoding eCharset
@@ -1234,7 +1234,7 @@ private:
// Coding:
static inline sal_Char getEscapePrefix(INetProtocol eTheScheme)
- { return eTheScheme == INET_PROT_VIM ? '=' : '%'; }
+ { return eTheScheme == INetProtocol::VIM ? '=' : '%'; }
inline sal_Char getEscapePrefix() const
{ return getEscapePrefix(m_eScheme); }
@@ -1299,7 +1299,7 @@ inline OUString INetURLObject::decode(SubString const & rSubString,
inline INetURLObject::INetURLObject(OUString const & rTheAbsURIRef,
EncodeMechanism eMechanism,
rtl_TextEncoding eCharset):
- m_eScheme(INET_PROT_NOT_VALID), m_eSmartScheme(INET_PROT_HTTP)
+ m_eScheme(INetProtocol::NOT_VALID), m_eSmartScheme(INetProtocol::HTTP)
{
setAbsURIRef(rTheAbsURIRef, false, eMechanism, eCharset, false,
FSysStyle(0));
@@ -1318,7 +1318,7 @@ inline INetURLObject::INetURLObject(OUString const & rTheAbsURIRef,
EncodeMechanism eMechanism,
rtl_TextEncoding eCharset,
FSysStyle eStyle):
- m_eScheme(INET_PROT_NOT_VALID), m_eSmartScheme(eTheSmartScheme)
+ m_eScheme(INetProtocol::NOT_VALID), m_eSmartScheme(eTheSmartScheme)
{
setAbsURIRef(rTheAbsURIRef, false, eMechanism, eCharset, true, eStyle);
}
@@ -1456,7 +1456,7 @@ inline bool INetURLObject::SetMark(OUString const & rTheFragment,
inline INetURLObject::INetURLObject(OUString const & rFSysPath,
FSysStyle eStyle):
- m_eScheme(INET_PROT_NOT_VALID), m_eSmartScheme(INET_PROT_HTTP)
+ m_eScheme(INetProtocol::NOT_VALID), m_eSmartScheme(INetProtocol::HTTP)
{
setFSysPath(rFSysPath, eStyle);
}
diff --git a/linguistic/source/convdiclist.cxx b/linguistic/source/convdiclist.cxx
index f1cc9306..6ebd8c4 100644
--- a/linguistic/source/convdiclist.cxx
+++ b/linguistic/source/convdiclist.cxx
@@ -71,7 +71,7 @@ OUString GetConvDicMainURL( const OUString &rDicName, const OUString &rDirectory
OUString aFullDicName = OUString(rDicName) + CONV_DIC_DOT_EXT;
INetURLObject aURLObj;
- aURLObj.SetSmartProtocol( INET_PROT_FILE );
+ aURLObj.SetSmartProtocol( INetProtocol::FILE );
aURLObj.SetSmartURL( rDirectoryURL );
aURLObj.Append( aFullDicName, INetURLObject::ENCODE_ALL );
DBG_ASSERT(!aURLObj.HasError(), "invalid URL");
@@ -276,8 +276,8 @@ void SAL_CALL ConvDicNameContainer::removeByName( const OUString& rName )
OUString aName( xDel->getName() );
OUString aDicMainURL( GetConvDicMainURL( aName, GetDictionaryWriteablePath() ) );
INetURLObject aObj( aDicMainURL );
- DBG_ASSERT( aObj.GetProtocol() == INET_PROT_FILE, "+HangulHanjaOptionsDialog::OkHdl(): non-file URLs cannot be deleted" );
- if( aObj.GetProtocol() == INET_PROT_FILE )
+ DBG_ASSERT( aObj.GetProtocol() == INetProtocol::FILE, "+HangulHanjaOptionsDialog::OkHdl(): non-file URLs cannot be deleted" );
+ if( aObj.GetProtocol() == INetProtocol::FILE )
{
try
{
diff --git a/linguistic/source/misc2.cxx b/linguistic/source/misc2.cxx
index e7e8031..ed3c3d8 100644
--- a/linguistic/source/misc2.cxx
+++ b/linguistic/source/misc2.cxx
@@ -140,7 +140,7 @@ OUString GetWritableDictionaryURL( const OUString &rDicName )
// build URL to use for a new (persistent) dictionary
INetURLObject aURLObj;
- aURLObj.SetSmartProtocol( INET_PROT_FILE );
+ aURLObj.SetSmartProtocol( INetProtocol::FILE );
aURLObj.SetSmartURL( aDirName );
DBG_ASSERT(!aURLObj.HasError(), "lng : invalid URL");
aURLObj.Append( rDicName, INetURLObject::ENCODE_ALL );
diff --git a/reportdesign/source/ui/inspection/DefaultInspection.cxx b/reportdesign/source/ui/inspection/DefaultInspection.cxx
index 792b64c..718e89d 100644
--- a/reportdesign/source/ui/inspection/DefaultInspection.cxx
+++ b/reportdesign/source/ui/inspection/DefaultInspection.cxx
@@ -37,7 +37,7 @@ namespace rptui
{
OUStringBuffer aBuffer;
OUString aTmp( OStringToOUString(sHelpId, RTL_TEXTENCODING_UTF8) );
- DBG_ASSERT( INetURLObject( aTmp ).GetProtocol() == INET_PROT_NOT_VALID, "Wrong HelpId!" );
+ DBG_ASSERT( INetURLObject( aTmp ).GetProtocol() == INetProtocol::NOT_VALID, "Wrong HelpId!" );
aBuffer.appendAscii( INET_HID_SCHEME );
aBuffer.append( aTmp.getStr() );
return aBuffer.makeStringAndClear();
diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx
index f3f0cf3..0553ff1 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -349,7 +349,7 @@ XclExpHyperlink::XclExpHyperlink( const XclExpRoot& rRoot, const SvxURLField& rU
}
// file link or URL
- if( eProtocol == INET_PROT_FILE || eProtocol == INET_PROT_SMB )
+ if( eProtocol == INetProtocol::FILE || eProtocol == INetProtocol::SMB )
{
sal_uInt16 nLevel;
bool bRel;
@@ -357,7 +357,7 @@ XclExpHyperlink::XclExpHyperlink( const XclExpRoot& rRoot, const SvxURLField& rU
* encoded for OOXML? */
OUString aFileName( BuildFileName( nLevel, bRel, rUrl, rRoot, false ) );
- if( eProtocol == INET_PROT_SMB )
+ if( eProtocol == INetProtocol::SMB )
{
// #n382718# (and #n261623#) Convert smb notation to '\\'
aFileName = aUrlObj.GetMainURL( INetURLObject::NO_DECODE );
@@ -392,7 +392,7 @@ XclExpHyperlink::XclExpHyperlink( const XclExpRoot& rRoot, const SvxURLField& rU
// ms2007 does, ms2010 is more tolerant )
msTarget = "file:///" + msTarget;
}
- else if( eProtocol != INET_PROT_NOT_VALID )
+ else if( eProtocol != INetProtocol::NOT_VALID )
{
XclExpString aUrl( aUrlObj.GetURLNoMark(), EXC_STR_FORCEUNICODE, 255 );
aXclStrm << XclTools::maGuidUrlMoniker
diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx
index 614af46..3b4a063 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -1236,11 +1236,11 @@ bool ScHTMLExport::CopyLocalFileToINet( OUString& rFileNm,
INetURLObject aFileUrl, aTargetUrl;
aFileUrl.SetSmartURL( rFileNm );
aTargetUrl.SetSmartURL( rTargetNm );
- if( INET_PROT_FILE == aFileUrl.GetProtocol() &&
- ( (bFileToFile && INET_PROT_FILE == aTargetUrl.GetProtocol()) ||
- (!bFileToFile && INET_PROT_FILE != aTargetUrl.GetProtocol() &&
- INET_PROT_FTP <= aTargetUrl.GetProtocol() &&
- INET_PROT_NEWS >= aTargetUrl.GetProtocol()) ) )
+ if( INetProtocol::FILE == aFileUrl.GetProtocol() &&
+ ( (bFileToFile && INetProtocol::FILE == aTargetUrl.GetProtocol()) ||
+ (!bFileToFile && INetProtocol::FILE != aTargetUrl.GetProtocol() &&
+ INetProtocol::FTP <= aTargetUrl.GetProtocol() &&
+ INetProtocol::NEWS >= aTargetUrl.GetProtocol()) ) )
{
if( pFileNameMap )
{
@@ -1304,7 +1304,7 @@ void ScHTMLExport::MakeCIdURL( OUString& rURL )
return;
INetURLObject aURLObj( rURL );
- if( INET_PROT_FILE != aURLObj.GetProtocol() )
+ if( INetProtocol::FILE != aURLObj.GetProtocol() )
return;
OUString aLastName( aURLObj.GetLastName().toAsciiLowerCase() );
diff --git a/sc/source/filter/xml/xmltabi.cxx b/sc/source/filter/xml/xmltabi.cxx
index 8376558..af399d5 100644
--- a/sc/source/filter/xml/xmltabi.cxx
+++ b/sc/source/filter/xml/xmltabi.cxx
@@ -81,7 +81,7 @@ static bool lcl_isExternalRefCache(const OUString& rName, OUString& rUrl, OUStri
// #i114504# Other schemes besides "file:" are also allowed.
// CompareProtocolScheme is quick, only looks at the start of the string.
INetProtocol eProt = INetURLObject::CompareProtocolScheme( rName.copy(1) );
- if ( eProt == INET_PROT_NOT_VALID )
+ if ( eProt == INetProtocol::NOT_VALID )
return false;
OUString aPrefix = INetURLObject::GetScheme( eProt );
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index fa3895f..8edbf82 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -2327,7 +2327,7 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed )
eError = eERR_OK;
}
- INetURLObject aTmpFile( rMed.GetPhysicalName(), INET_PROT_FILE );
+ INetURLObject aTmpFile( rMed.GetPhysicalName(), INetProtocol::FILE );
if ( bHasMemo )
aTmpFile.setExtension(OUString("dbt"));
if ( eError != eERR_OK )
@@ -2344,7 +2344,7 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed )
{
const SfxStringItem* pNameItem =
static_cast<const SfxStringItem*>( rMed.GetItemSet()->GetItem( SID_FILE_NAME ) );
- INetURLObject aDbtFile( pNameItem->GetValue(), INET_PROT_FILE );
+ INetURLObject aDbtFile( pNameItem->GetValue(), INetProtocol::FILE );
aDbtFile.setExtension(OUString("dbt"));
if ( IsDocument( aDbtFile ) && !KillFile( aDbtFile ) )
bRet = false;
diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx
index 12260b6..4125ffa 100644
--- a/sc/source/ui/docshell/docsh8.cxx
+++ b/sc/source/ui/docshell/docsh8.cxx
@@ -104,7 +104,7 @@ namespace
sal_uLong lcl_getDBaseConnection(uno::Reference<sdbc::XDriverManager2>& _rDrvMgr, uno::Reference<sdbc::XConnection>& _rConnection, OUString& _rTabName, const OUString& rFullFileName, rtl_TextEncoding eCharSet)
{
INetURLObject aURL;
- aURL.SetSmartProtocol( INET_PROT_FILE );
+ aURL.SetSmartProtocol( INetProtocol::FILE );
aURL.SetSmartURL( rFullFileName );
_rTabName = aURL.getBase( INetURLObject::LAST_SEGMENT, true,
INetURLObject::DECODE_UNAMBIGUOUS );
@@ -794,7 +794,7 @@ sal_uLong ScDocShell::DBaseExport( const OUString& rFullFileName, rtl_TextEncodi
return ERRCODE_IO_GENERAL;
#else
// remove the file so the dBase driver doesn't find an invalid file
- INetURLObject aDeleteObj( rFullFileName, INET_PROT_FILE );
+ INetURLObject aDeleteObj( rFullFileName, INetProtocol::FILE );
KillFile( aDeleteObj );
sal_uLong nErr = eERR_OK;
diff --git a/sc/source/ui/docshell/tablink.cxx b/sc/source/ui/docshell/tablink.cxx
index 0e94605..6ee467c 100644
--- a/sc/source/ui/docshell/tablink.cxx
+++ b/sc/source/ui/docshell/tablink.cxx
@@ -463,7 +463,7 @@ bool ScDocumentLoader::GetFilterName( const OUString& rFileName,
INetURLObject aUrl( rFileName );
INetProtocol eProt = aUrl.GetProtocol();
- if ( eProt == INET_PROT_NOT_VALID ) // invalid URL?
+ if ( eProt == INetProtocol::NOT_VALID ) // invalid URL?
return false; // abort without creating a medium
// Filter-Detection
diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx
index 0956311..24a1e1a 100644
--- a/sc/source/ui/drawfunc/fuins2.cxx
+++ b/sc/source/ui/drawfunc/fuins2.cxx
@@ -273,7 +273,7 @@ FuInsertOLE::FuInsertOLE(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView*
{
// get URL
INetURLObject aURL;
- aURL.SetSmartProtocol( INET_PROT_FILE );
+ aURL.SetSmartProtocol( INetProtocol::FILE );
if ( aURL.SetURL( aPluginFileDialog.GetPath() ) )
{
// create a plugin object
diff --git a/sc/source/ui/vba/vbaworkbooks.cxx b/sc/source/ui/vba/vbaworkbooks.cxx
index b22326e..ab9b79d 100644
--- a/sc/source/ui/vba/vbaworkbooks.cxx
+++ b/sc/source/ui/vba/vbaworkbooks.cxx
@@ -209,7 +209,7 @@ ScVbaWorkbooks::Open( const OUString& rFileName, const uno::Any& /*UpdateLinks*/
OUString aURL;
INetURLObject aObj;
aObj.SetURL( rFileName );
- bool bIsURL = aObj.GetProtocol() != INET_PROT_NOT_VALID;
+ bool bIsURL = aObj.GetProtocol() != INetProtocol::NOT_VALID;
if ( bIsURL )
aURL = rFileName;
else
diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index 31cbc59..86bf529 100644
--- a/sd/source/filter/eppt/epptso.cxx
+++ b/sd/source/filter/eppt/epptso.cxx
@@ -1131,9 +1131,9 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u
OUString aFile( pFieldEntry->aFieldUrl );
OUString aTarget( pFieldEntry->aFieldUrl );
INetURLObject aUrl( pFieldEntry->aFieldUrl );
- if ( INET_PROT_FILE == aUrl.GetProtocol() )
+ if ( INetProtocol::FILE == aUrl.GetProtocol() )
aFile = aUrl.PathToFileName();
- else if ( INET_PROT_SMB == aUrl.GetProtocol() )
+ else if ( INetProtocol::SMB == aUrl.GetProtocol() )
{
// Convert smb notation to '\\' and skip the 'smb:' part
aFile = aUrl.GetMainURL(INetURLObject::NO_DECODE).copy(4);
@@ -1968,7 +1968,7 @@ void PPTWriter::ImplWriteClickAction( SvStream& rSt, ::com::sun::star::presentat
if ( ImplGetPropertyValue( OUString( "Bookmark" ) ) )
{
INetURLObject aUrl( *static_cast<OUString const *>(mAny.getValue()) );
- if ( INET_PROT_FILE == aUrl.GetProtocol() )
+ if ( INetProtocol::FILE == aUrl.GetProtocol() )
{
aFile = aUrl.PathToFileName();
nAction = 2;
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list