diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-04-02 15:58:06 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-04-02 16:30:34 +0200 |
commit | 44b3e56bb4a4df59f53447c4ca4d8e02fe926206 (patch) | |
tree | 71a9efde3a6a2a00688e8feb8e3086cb32eceb4f /vcl/source | |
parent | 0b4965bcd7ec911951e7ca3a4cd48062843b2634 (diff) |
Change INetProtocol to scoped enumeration
...and fix o3tl::enumarray::operator [] const overload
Change-Id: I749b1b9d68686b03a97074253478d9d2d9d32b0b
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/filter/graphicfilter.cxx | 10 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx index 907205258112..69f566e5eb7b 100644 --- a/vcl/source/filter/graphicfilter.cxx +++ b/vcl/source/filter/graphicfilter.cxx @@ -1282,7 +1282,7 @@ sal_uInt16 GraphicFilter::CanImportGraphic( const INetURLObject& rPath, sal_uInt16 nFormat, sal_uInt16* pDeterminedFormat ) { sal_uInt16 nRetValue = GRFILTER_FORMATERROR; - DBG_ASSERT( rPath.GetProtocol() != INET_PROT_NOT_VALID, "GraphicFilter::CanImportGraphic() : ProtType == INET_PROT_NOT_VALID" ); + DBG_ASSERT( rPath.GetProtocol() != INetProtocol::NOT_VALID, "GraphicFilter::CanImportGraphic() : ProtType == INetProtocol::NOT_VALID" ); OUString aMainUrl( rPath.GetMainURL( INetURLObject::NO_DECODE ) ); std::unique_ptr<SvStream> xStream(::utl::UcbStreamHelper::CreateStream( aMainUrl, StreamMode::READ | StreamMode::SHARE_DENYNONE )); @@ -1312,7 +1312,7 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const INetURLObject& sal_uInt16 nFormat, sal_uInt16 * pDeterminedFormat, sal_uInt32 nImportFlags ) { sal_uInt16 nRetValue = GRFILTER_FORMATERROR; - DBG_ASSERT( rPath.GetProtocol() != INET_PROT_NOT_VALID, "GraphicFilter::ImportGraphic() : ProtType == INET_PROT_NOT_VALID" ); + DBG_ASSERT( rPath.GetProtocol() != INetProtocol::NOT_VALID, "GraphicFilter::ImportGraphic() : ProtType == INetProtocol::NOT_VALID" ); OUString aMainUrl( rPath.GetMainURL( INetURLObject::NO_DECODE ) ); std::unique_ptr<SvStream> xStream(::utl::UcbStreamHelper::CreateStream( aMainUrl, StreamMode::READ | StreamMode::SHARE_DENYNONE )); @@ -1804,7 +1804,7 @@ sal_uInt16 GraphicFilter::ExportGraphic( const Graphic& rGraphic, const INetURLO #else SAL_INFO( "vcl.filter", "GraphicFilter::ExportGraphic() (thb)" ); sal_uInt16 nRetValue = GRFILTER_FORMATERROR; - DBG_ASSERT( rPath.GetProtocol() != INET_PROT_NOT_VALID, "GraphicFilter::ExportGraphic() : ProtType == INET_PROT_NOT_VALID" ); + DBG_ASSERT( rPath.GetProtocol() != INetProtocol::NOT_VALID, "GraphicFilter::ExportGraphic() : ProtType == INetProtocol::NOT_VALID" ); bool bAlreadyExists = DirEntryExists( rPath ); OUString aMainUrl( rPath.GetMainURL( INetURLObject::NO_DECODE ) ); @@ -2254,12 +2254,12 @@ int GraphicFilter::LoadGraphic( const OUString &rPath, const OUString &rFilterNa INetURLObject aURL( rPath ); if ( aURL.HasError() ) { - aURL.SetSmartProtocol( INET_PROT_FILE ); + aURL.SetSmartProtocol( INetProtocol::FILE ); aURL.SetSmartURL( rPath ); } SvStream* pStream = NULL; - if ( INET_PROT_FILE != aURL.GetProtocol() ) + if ( INetProtocol::FILE != aURL.GetProtocol() ) { pStream = ::utl::UcbStreamHelper::CreateStream( rPath, StreamMode::READ ); } diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index eabf0c1b8c1d..b6e1a65f63a0 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -4504,7 +4504,7 @@ we check in the following sequence: // check if the protocol is a known one, or if there is no protocol at all (on target only) // if there is no protocol, make the target relative to the current document directory // getting the needed URL information from the current document path - if( eTargetProtocol == INET_PROT_NOT_VALID ) + if( eTargetProtocol == INetProtocol::NOT_VALID ) { if( rLink.m_aURL.getLength() > 4 && rLink.m_aURL.startsWith("\\\\\\\\")) { @@ -4571,7 +4571,7 @@ we check in the following sequence: bool bSetRelative = false; bool bFileSpec = false; //check if relative file link is requested and if the protocol is 'file://' - if( m_aContext.RelFsys && eBaseProtocol == eTargetProtocol && eTargetProtocol == INET_PROT_FILE ) + if( m_aContext.RelFsys && eBaseProtocol == eTargetProtocol && eTargetProtocol == INetProtocol::FILE ) bSetRelative = true; OUString aFragment = aTargetURL.GetMark( INetURLObject::NO_DECODE /*DECODE_WITH_CHARSET*/ ); //fragment as is, @@ -4593,7 +4593,7 @@ we check in the following sequence: // the one that normally have fragments (but I may be wrong...) // and will force the use of URI when the protocol is not file: if( (!aFragment.isEmpty() && !bTargetHasPDFExtension) || - eTargetProtocol != INET_PROT_FILE ) + eTargetProtocol != INetProtocol::FILE ) { aLine.append( "/URI/URI" ); } |