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 /sd | |
parent | 0b4965bcd7ec911951e7ca3a4cd48062843b2634 (diff) |
Change INetProtocol to scoped enumeration
...and fix o3tl::enumarray::operator [] const overload
Change-Id: I749b1b9d68686b03a97074253478d9d2d9d32b0b
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/filter/eppt/epptso.cxx | 8 | ||||
-rw-r--r-- | sd/source/filter/html/htmlex.cxx | 8 | ||||
-rw-r--r-- | sd/source/filter/html/pubdlg.cxx | 2 | ||||
-rw-r--r-- | sd/source/filter/ppt/pptin.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/dlg/PhotoAlbumDialog.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/dlg/dlgass.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/dlg/navigatr.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/dlg/sdtreelb.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/dlg/tpaction.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/func/fuinsert.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/func/fusel.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/slideshow/slideshowimpl.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/sdview4.cxx | 2 |
13 files changed, 23 insertions, 23 deletions
diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx index 31cbc5948ca7..86bf529d16f3 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; @@ -2016,7 +2016,7 @@ void PPTWriter::ImplWriteClickAction( SvStream& rSt, ::com::sun::star::presentat OUString aBookmarkFile( aBookmark ); INetURLObject aUrl( aBookmark ); - if ( INET_PROT_FILE == aUrl.GetProtocol() ) + if ( INetProtocol::FILE == aUrl.GetProtocol() ) aBookmarkFile = aUrl.PathToFileName(); nHyperLinkID = ImplInsertBookmarkURL( aBookmark, (sal_uInt32)(2 | ( 1U << 31 )), aBookmarkFile, aBookmark, "", "" ); } diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx index 3bdbae53f114..e943858fdea4 100644 --- a/sd/source/filter/html/htmlex.cxx +++ b/sd/source/filter/html/htmlex.cxx @@ -607,7 +607,7 @@ void HtmlExport::InitExportParameters( const Sequence< PropertyValue >& rParams // we come up with a destination... INetURLObject aINetURLObj( maPath ); - DBG_ASSERT( aINetURLObj.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" ); + DBG_ASSERT( aINetURLObj.GetProtocol() != INetProtocol::NOT_VALID, "invalid URL" ); maExportPath = aINetURLObj.GetPartBeforeLastName(); // with trailing '/' maIndex = aINetURLObj.GetLastName(); @@ -3031,7 +3031,7 @@ OUString HtmlExport::InsertSound( const OUString& rSoundFile ) INetURLObject aURL( rSoundFile ); OUString aSoundFileName = aURL.getName(); - DBG_ASSERT( aURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" ); + DBG_ASSERT( aURL.GetProtocol() != INetProtocol::NOT_VALID, "invalid URL" ); OUString aStr("<embed src=\"" + aSoundFileName + "\" hidden=\"true\" autostart=\"true\">"); @@ -3203,13 +3203,13 @@ sal_uLong EasyFile::createFileName( const OUString& rURL, OUString& rFileName ) { INetURLObject aURL( rURL ); - if( aURL.GetProtocol() == INET_PROT_NOT_VALID ) + if( aURL.GetProtocol() == INetProtocol::NOT_VALID ) { OUString aURLStr; ::utl::LocalFileHelper::ConvertPhysicalNameToURL( rURL, aURLStr ); aURL = INetURLObject( aURLStr ); } - DBG_ASSERT( aURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" ); + DBG_ASSERT( aURL.GetProtocol() != INetProtocol::NOT_VALID, "invalid URL" ); rFileName = aURL.GetMainURL( INetURLObject::NO_DECODE ); } diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx index c65adae60e68..f2ab340e26ae 100644 --- a/sd/source/filter/html/pubdlg.cxx +++ b/sd/source/filter/html/pubdlg.cxx @@ -782,7 +782,7 @@ void SdPublishingDlg::GetParameterSequence( Sequence< PropertyValue >& rParams ) // try to guess protocol for user's homepage INetURLObject aHomeURL( pPage4_WWW->GetText(), - INET_PROT_HTTP, // default proto is HTTP + INetProtocol::HTTP, // default proto is HTTP INetURLObject::ENCODE_ALL ); aValue.Name = "HomepageURL"; diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx index 076a71119362..0d6622ad28a2 100644 --- a/sd/source/filter/ppt/pptin.cxx +++ b/sd/source/filter/ppt/pptin.cxx @@ -397,7 +397,7 @@ bool ImplSdPPTImport::Import() break; // Convert '\\' notation to 'smb://' - INetURLObject aUrl( pHyperlink->aTarget, INET_PROT_FILE ); + INetURLObject aUrl( pHyperlink->aTarget, INetProtocol::FILE ); pHyperlink->aTarget = aUrl.GetMainURL( INetURLObject::NO_DECODE ); if ( !aPropItem.Read( pHyperlink->aSubAdress, VT_EMPTY ) ) @@ -2065,7 +2065,7 @@ void ImplSdPPTImport::FillSdAnimationInfo( SdAnimationInfo* pInfo, PptInteractiv OUString aBaseURL = pDocShell->GetMedium()->GetBaseURL(); OUString aBookmarkURL( pInfo->GetBookmark() ); INetURLObject aURL( pPtr->aTarget ); - if( INET_PROT_NOT_VALID == aURL.GetProtocol() ) + if( INetProtocol::NOT_VALID == aURL.GetProtocol() ) utl::LocalFileHelper::ConvertSystemPathToURL( pPtr->aTarget, aBaseURL, aBookmarkURL ); if( aBookmarkURL.isEmpty() ) aBookmarkURL = URIHelper::SmartRel2Abs( INetURLObject(aBaseURL), pPtr->aTarget, URIHelper::GetMaybeFileHdl(), true ); diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx index 5a62f7207fad..6b9783c4cd47 100644 --- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx +++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx @@ -579,15 +579,15 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, SelectHdl) sal_uInt16 nFilter = GRFILTER_FORMAT_DONTKNOW; - if ( aURLObj.HasError() || INET_PROT_NOT_VALID == aURLObj.GetProtocol() ) + if ( aURLObj.HasError() || INetProtocol::NOT_VALID == aURLObj.GetProtocol() ) { - aURLObj.SetSmartProtocol( INET_PROT_FILE ); + aURLObj.SetSmartProtocol( INetProtocol::FILE ); aURLObj.SetSmartURL( sImgUrl ); } sal_uInt32 nFilterImportFlags = GRFILTER_I_FLAGS_SET_LOGSIZE_FOR_JPEG; // remote? - if ( INET_PROT_FILE != aURLObj.GetProtocol() ) + if ( INetProtocol::FILE != aURLObj.GetProtocol() ) { SvStream* pStream = ::utl::UcbStreamHelper::CreateStream( sImgUrl, StreamMode::READ ); diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx index fbf21f5ac386..cc95909988ca 100644 --- a/sd/source/ui/dlg/dlgass.cxx +++ b/sd/source/ui/dlg/dlgass.cxx @@ -1616,7 +1616,7 @@ bool AssistentDlgImpl::IsOwnFormat( const OUString& rPath ) INetURLObject aURL( rPath ); OUString aExt( aURL.GetFileExtension() ); - DBG_ASSERT( aURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" ); + DBG_ASSERT( aURL.GetProtocol() != INetProtocol::NOT_VALID, "invalid URL" ); return !aExt.equalsIgnoreAsciiCase( "ppt" ); } diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx index c1bf56d1e661..24df6b6225f2 100644 --- a/sd/source/ui/dlg/navigatr.cxx +++ b/sd/source/ui/dlg/navigatr.cxx @@ -584,7 +584,7 @@ bool SdNavigatorWin::InsertFile(const OUString& rFileName) { INetURLObject aURL( rFileName ); - if( aURL.GetProtocol() == INET_PROT_NOT_VALID ) + if( aURL.GetProtocol() == INetProtocol::NOT_VALID ) { OUString aURLStr; ::utl::LocalFileHelper::ConvertPhysicalNameToURL( rFileName, aURLStr ); diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx index cd90acf2f1f7..c21ea4eb8e8e 100644 --- a/sd/source/ui/dlg/sdtreelb.cxx +++ b/sd/source/ui/dlg/sdtreelb.cxx @@ -1176,7 +1176,7 @@ void SdPageObjsTLB::DoDrag() if( mpDropNavWin ) { ::sd::DrawDocShell* pDocShell = mpDoc->GetDocSh(); - OUString aURL = INetURLObject( pDocShell->GetMedium()->GetPhysicalName(), INET_PROT_FILE ).GetMainURL( INetURLObject::NO_DECODE ); + OUString aURL = INetURLObject( pDocShell->GetMedium()->GetPhysicalName(), INetProtocol::FILE ).GetMainURL( INetURLObject::NO_DECODE ); NavigatorDragType eDragType = mpDropNavWin->GetNavigatorDragType(); aURL += "#" + GetSelectEntry(); diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx index e281738b6a25..a2d3cd1dc455 100644 --- a/sd/source/ui/dlg/tpaction.cxx +++ b/sd/source/ui/dlg/tpaction.cxx @@ -811,7 +811,7 @@ OUString SdTPAction::GetEditText( bool bFullDocDestination ) if( mpDoc && mpDoc->GetDocSh() && mpDoc->GetDocSh()->GetMedium() ) aBaseURL = mpDoc->GetDocSh()->GetMedium()->GetBaseURL(); - if( !aStr.isEmpty() && aURL.GetProtocol() == INET_PROT_NOT_VALID ) + if( !aStr.isEmpty() && aURL.GetProtocol() == INetProtocol::NOT_VALID ) aURL = INetURLObject( ::URIHelper::SmartRel2Abs( INetURLObject(aBaseURL), aStr, URIHelper::GetMaybeFileHdl(), true, false ) ); // get adjusted file name diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx index ffa9c4977965..ccdcb5c7d8fe 100644 --- a/sd/source/ui/func/fuinsert.cxx +++ b/sd/source/ui/func/fuinsert.cxx @@ -485,8 +485,8 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq ) { // get URL OUString aStrURL(aPluginFileDialog.GetPath()); - INetURLObject aURL( aStrURL, INET_PROT_FILE ); - if( aURL.GetProtocol() != INET_PROT_NOT_VALID ) + INetURLObject aURL( aStrURL, INetProtocol::FILE ); + if( aURL.GetProtocol() != INetProtocol::NOT_VALID ) { // create a plugin object xObj = mpViewShell->GetObjectShell()->GetEmbeddedObjectContainer().CreateEmbeddedObject( SvGlobalName( SO3_PLUGIN_CLASSID ).GetByteSequence(), aName ); diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx index c17aba83a8bf..6f90fd6e4c9d 100644 --- a/sd/source/ui/func/fusel.cxx +++ b/sd/source/ui/func/fusel.cxx @@ -1380,7 +1380,7 @@ bool FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos) URIHelper::GetMaybeFileHdl(), true, false, INetURLObject::WAS_ENCODED, INetURLObject::DECODE_UNAMBIGUOUS ) ); - if( INET_PROT_FILE == aURL.GetProtocol() ) + if( INetProtocol::FILE == aURL.GetProtocol() ) { SfxStringItem aUrl( SID_FILE_NAME, aURL.GetMainURL( INetURLObject::NO_DECODE ) ); SfxBoolItem aBrowsing( SID_BROWSE, true ); diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index 314d6b1339e5..c1f251952822 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -1594,7 +1594,7 @@ void SlideshowImpl::click( const Reference< XShape >& xShape, const ::com::sun:: false, INetURLObject::WAS_ENCODED, INetURLObject::DECODE_UNAMBIGUOUS ) ); - if( INET_PROT_FILE == aURL.GetProtocol() ) + if( INetProtocol::FILE == aURL.GetProtocol() ) { SfxStringItem aUrl( SID_FILE_NAME, aURL.GetMainURL( INetURLObject::NO_DECODE ) ); SfxBoolItem aBrowsing( SID_BROWSE, true ); diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx index 205f17a12141..510bbec86d55 100644 --- a/sd/source/ui/view/sdview4.cxx +++ b/sd/source/ui/view/sdview4.cxx @@ -415,7 +415,7 @@ IMPL_LINK_NOARG(View, DropInsertFileHdl) INetURLObject aURL( aCurrentDropFile ); bool bOK = false; - if( aURL.GetProtocol() == INET_PROT_NOT_VALID ) + if( aURL.GetProtocol() == INetProtocol::NOT_VALID ) { OUString aURLStr; ::utl::LocalFileHelper::ConvertPhysicalNameToURL( aCurrentDropFile, aURLStr ); |