summaryrefslogtreecommitdiff
path: root/sw/source/filter
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-04-02 15:58:06 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-04-02 16:30:34 +0200
commit44b3e56bb4a4df59f53447c4ca4d8e02fe926206 (patch)
tree71a9efde3a6a2a00688e8feb8e3086cb32eceb4f /sw/source/filter
parent0b4965bcd7ec911951e7ca3a4cd48062843b2634 (diff)
Change INetProtocol to scoped enumeration
...and fix o3tl::enumarray::operator [] const overload Change-Id: I749b1b9d68686b03a97074253478d9d2d9d32b0b
Diffstat (limited to 'sw/source/filter')
-rw-r--r--sw/source/filter/basflt/iodetect.cxx2
-rw-r--r--sw/source/filter/html/htmlgrin.cxx2
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx4
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx10
-rw-r--r--sw/source/filter/ww8/ww8par.cxx4
5 files changed, 11 insertions, 11 deletions
diff --git a/sw/source/filter/basflt/iodetect.cxx b/sw/source/filter/basflt/iodetect.cxx
index e9bb306c9310..af2f911f987b 100644
--- a/sw/source/filter/basflt/iodetect.cxx
+++ b/sw/source/filter/basflt/iodetect.cxx
@@ -158,7 +158,7 @@ const SfxFilter* SwIoSystem::GetFileFilter(const OUString& rFileName)
// package storage or OLEStorage based format
SotStorageRef xStg;
INetURLObject aObj;
- aObj.SetSmartProtocol( INET_PROT_FILE );
+ aObj.SetSmartProtocol( INetProtocol::FILE );
aObj.SetSmartURL( rFileName );
SfxMedium aMedium(aObj.GetMainURL(INetURLObject::NO_DECODE), STREAM_STD_READ);
diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx
index 38f06b0af863..fb5b960ab38c 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -466,7 +466,7 @@ IMAGE_SETEVENT:
Graphic aGraphic;
INetURLObject aGraphicURL( sGrfNm );
- if( aGraphicURL.GetProtocol() == INET_PROT_DATA )
+ if( aGraphicURL.GetProtocol() == INetProtocol::DATA )
{
std::unique_ptr<SvMemoryStream> const pStream(aGraphicURL.getData());
if (pStream)
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index 0e03963d58b0..40977d4dbe6e 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -219,7 +219,7 @@ void SwBasicEscherEx::WriteHyperlinkWithinFly( SvMemoryStream& rStrm, const SwFm
}
// file link or URL
- if (eProtocol == INET_PROT_FILE || (eProtocol == INET_PROT_NOT_VALID && rUrl[0] != '#'))
+ if (eProtocol == INetProtocol::FILE || (eProtocol == INetProtocol::NOT_VALID && rUrl[0] != '#'))
{
sal_uInt16 nLevel;
bool bRel;
@@ -242,7 +242,7 @@ void SwBasicEscherEx::WriteHyperlinkWithinFly( SvMemoryStream& rStrm, const SwFm
tmpStrm.WriteUInt16( 0x0003 );
SwWW8Writer::WriteString16(tmpStrm, aFileName, false);
}
- else if( eProtocol != INET_PROT_NOT_VALID )
+ else if( eProtocol != INetProtocol::NOT_VALID )
{
tmpStrm.Write( maGuidUrlMoniker,sizeof(maGuidUrlMoniker) );
SwWW8Writer::WriteLong(tmpStrm, 2*(rUrl.getLength()+1));
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 49d2a80b1c22..ed3f07edf3e0 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -877,7 +877,7 @@ bool AttributeOutputBase::AnalyzeURL( const OUString& rUrl, const OUString& /*rT
}
else
{
- INetURLObject aURL( rUrl, INET_PROT_NOT_VALID );
+ INetURLObject aURL( rUrl, INetProtocol::NOT_VALID );
sURL = aURL.GetURLNoMark( INetURLObject::DECODE_UNAMBIGUOUS );
sMark = aURL.GetMark( INetURLObject::DECODE_UNAMBIGUOUS );
}
@@ -993,7 +993,7 @@ bool WW8AttributeOutput::StartURL( const OUString &rUrl, const OUString &rTarget
SwWW8Writer::WriteLong( *m_rWW8Export.pDataStrm, nFlag );
INetProtocol eProto = aURL.GetProtocol();
- if ( eProto == INET_PROT_FILE || eProto == INET_PROT_SMB )
+ if ( eProto == INetProtocol::FILE || eProto == INetProtocol::SMB )
{
// version 1 (for a document)
@@ -1011,7 +1011,7 @@ bool WW8AttributeOutput::StartURL( const OUString &rUrl, const OUString &rTarget
// save the links to files as relative
sURL = URIHelper::simpleNormalizedMakeRelative( m_rWW8Export.GetWriter().GetBaseURL(), sURL );
- if ( eProto == INET_PROT_FILE && sURL.startsWith( "/" ) )
+ if ( eProto == INetProtocol::FILE && sURL.startsWith( "/" ) )
sURL = aURL.PathToFileName();
// special case for the absolute windows names
@@ -1028,7 +1028,7 @@ bool WW8AttributeOutput::StartURL( const OUString &rUrl, const OUString &rTarget
// n#261623 convert smb notation to '\\'
const char pSmb[] = "smb://";
- if ( eProto == INET_PROT_SMB && sURL.startsWith( pSmb ) )
+ if ( eProto == INetProtocol::SMB && sURL.startsWith( pSmb ) )
{
sURL = sURL.copy( sizeof(pSmb)-3 ).replaceAll( "/", "\\" );
}
@@ -1044,7 +1044,7 @@ bool WW8AttributeOutput::StartURL( const OUString &rUrl, const OUString &rTarget
SwWW8Writer::WriteShort( *m_rWW8Export.pDataStrm, 3 );
SwWW8Writer::WriteString16( *m_rWW8Export.pDataStrm, sURL, false );
}
- else if ( eProto != INET_PROT_NOT_VALID )
+ else if ( eProto != INetProtocol::NOT_VALID )
{
// version 2 (simple url)
// an write some data to the data stream, but dont ask
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index e2446d1c2ef3..615b2af56e2e 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -4743,7 +4743,7 @@ static void lcl_createTemplateToProjectEntry( const uno::Reference< container::X
{
INetURLObject aObj;
aObj.SetURL( sTemplatePathOrURL );
- bool bIsURL = aObj.GetProtocol() != INET_PROT_NOT_VALID;
+ bool bIsURL = aObj.GetProtocol() != INetProtocol::NOT_VALID;
OUString aURL;
if ( bIsURL )
aURL = sTemplatePathOrURL;
@@ -4828,7 +4828,7 @@ bool SwWW8ImplReader::ReadGlobalTemplateSettings( const OUString& sCreatedFrom,
{
INetURLObject aObj;
aObj.SetURL( sGlobalTemplates[ i ] );
- bool bIsURL = aObj.GetProtocol() != INET_PROT_NOT_VALID;
+ bool bIsURL = aObj.GetProtocol() != INetProtocol::NOT_VALID;
OUString aURL;
if ( bIsURL )
aURL = sGlobalTemplates[ i ];