diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-12-05 08:47:18 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-12-05 12:49:02 +0200 |
commit | bfde4866e07746eafa2f0d6173c29d805cc35ad0 (patch) | |
tree | be939a44eb70c7187fa5536089b782326b160013 /sd/source/ui | |
parent | 803215142efa6437515348f63bd70ffdcf5d45f1 (diff) |
convert DecodeMechanism to scoped enum
Change-Id: I5c56634b1bca8e37fa73d02d2428645301b6c547
Diffstat (limited to 'sd/source/ui')
-rw-r--r-- | sd/source/ui/app/sdmod.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/dlg/PhotoAlbumDialog.cxx | 6 | ||||
-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 | 4 | ||||
-rw-r--r-- | sd/source/ui/func/fudraw.cxx | 10 | ||||
-rw-r--r-- | sd/source/ui/func/fuinsert.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/func/fusel.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/func/futext.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/sidebar/MasterPageDescriptor.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/slideshow/slideshowimpl.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/unoidl/UnoDocumentSettings.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/drviews3.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/drviewse.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/sdview4.cxx | 2 |
15 files changed, 24 insertions, 24 deletions
diff --git a/sd/source/ui/app/sdmod.cxx b/sd/source/ui/app/sdmod.cxx index d5cfa2a62fe0..18df03c9cd69 100644 --- a/sd/source/ui/app/sdmod.cxx +++ b/sd/source/ui/app/sdmod.cxx @@ -184,7 +184,7 @@ tools::SvRef<SotStorageStream> SdModule::GetOptionStream( const OUString& rOptio aURL.Append( "drawing.cfg" ); - SvStream* pStm = ::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::READWRITE ); + SvStream* pStm = ::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::READWRITE ); if( pStm ) xOptionStorage = new SotStorage( pStm, true ); diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx index 54c6be14b1bb..4f4011ef0da0 100644 --- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx +++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx @@ -510,7 +510,7 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, FileHdl, Button*, void) if (!sUrl.isEmpty()) aDlg.SetDisplayDirectory(sUrl); else - aDlg.SetDisplayDirectory( aFile.GetMainURL( INetURLObject::NO_DECODE ) ); + aDlg.SetDisplayDirectory( aFile.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ); if ( aDlg.Execute() == ERRCODE_NONE ) { @@ -530,8 +530,8 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, FileHdl, Button*, void) { // Store full path, show filename only. Use INetURLObject to display spaces in filename correctly INetURLObject aUrl = INetURLObject(aFilesArr[i]); - sal_Int16 nPos = pImagesLst->InsertEntry( aUrl.GetLastName(INetURLObject::DECODE_WITH_CHARSET) ); - pImagesLst->SetEntryData(nPos, new OUString(aUrl.GetMainURL(INetURLObject::DECODE_WITH_CHARSET))); + sal_Int16 nPos = pImagesLst->InsertEntry( aUrl.GetLastName(INetURLObject::DecodeMechanism::WithCharset) ); + pImagesLst->SetEntryData(nPos, new OUString(aUrl.GetMainURL(INetURLObject::DecodeMechanism::WithCharset))); } } } diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx index 0f3c15fd9ace..c1e19adbd8c5 100644 --- a/sd/source/ui/dlg/navigatr.cxx +++ b/sd/source/ui/dlg/navigatr.cxx @@ -484,7 +484,7 @@ bool SdNavigatorWin::InsertFile(const OUString& rFileName) } // get adjusted FileName - OUString aFileName( aURL.GetMainURL( INetURLObject::NO_DECODE ) ); + OUString aFileName( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ); if (aFileName.isEmpty()) { diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx index d6a0434a9d39..c0be5330c245 100644 --- a/sd/source/ui/dlg/sdtreelb.cxx +++ b/sd/source/ui/dlg/sdtreelb.cxx @@ -1165,7 +1165,7 @@ void SdPageObjsTLB::DoDrag() if( mpDropNavWin ) { ::sd::DrawDocShell* pDocShell = mpDoc->GetDocSh(); - OUString aURL = INetURLObject( pDocShell->GetMedium()->GetPhysicalName(), INetProtocol::File ).GetMainURL( INetURLObject::NO_DECODE ); + OUString aURL = INetURLObject( pDocShell->GetMedium()->GetPhysicalName(), INetProtocol::File ).GetMainURL( INetURLObject::DecodeMechanism::NONE ); NavigatorDragType eDragType = mpDropNavWin->GetNavigatorDragType(); aURL += "#" + GetSelectEntry(); diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx index 815fa6bbf207..0d917d66e906 100644 --- a/sd/source/ui/dlg/tpaction.cxx +++ b/sd/source/ui/dlg/tpaction.cxx @@ -304,7 +304,7 @@ bool SdTPAction::FillItemSet( SfxItemSet* rAttrs ) eCA == presentation::ClickAction_PROGRAM ) aFileName = ::URIHelper::SmartRel2Abs( INetURLObject(aBaseURL), aFileName, URIHelper::GetMaybeFileHdl(), true, false, INetURLObject::EncodeMechanism::WasEncoded, - INetURLObject::DECODE_UNAMBIGUOUS ); + INetURLObject::DecodeMechanism::Unambiguous ); rAttrs->Put( SfxStringItem( ATTR_ACTION_FILENAME, aFileName ) ); bModified = true; @@ -821,7 +821,7 @@ OUString SdTPAction::GetEditText( bool bFullDocDestination ) aURL = INetURLObject( ::URIHelper::SmartRel2Abs( INetURLObject(aBaseURL), aStr, URIHelper::GetMaybeFileHdl() ) ); // get adjusted file name - aStr = aURL.GetMainURL( INetURLObject::NO_DECODE ); + aStr = aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ); if( bFullDocDestination && eCA == presentation::ClickAction_DOCUMENT && diff --git a/sd/source/ui/func/fudraw.cxx b/sd/source/ui/func/fudraw.cxx index 45c8dddbaaa2..c2929684422e 100644 --- a/sd/source/ui/func/fudraw.cxx +++ b/sd/source/ui/func/fudraw.cxx @@ -795,7 +795,7 @@ bool FuDraw::SetHelpText(SdrObject* pObj, const Point& rPosPixel, const SdrViewE if (aHelpText.isEmpty()) { // show url if no name is available - aHelpText = INetURLObject::decode( pIMapObj->GetURL(), INetURLObject::DECODE_WITH_CHARSET ); + aHelpText = INetURLObject::decode( pIMapObj->GetURL(), INetURLObject::DecodeMechanism::WithCharset ); } } } @@ -838,7 +838,7 @@ bool FuDraw::SetHelpText(SdrObject* pObj, const Point& rPosPixel, const SdrViewE // jump to object/page aHelpText = SD_RESSTR(STR_CLICK_ACTION_BOOKMARK); aHelpText += ": "; - aHelpText += INetURLObject::decode( pInfo->GetBookmark(), INetURLObject::DECODE_WITH_CHARSET ); + aHelpText += INetURLObject::decode( pInfo->GetBookmark(), INetURLObject::DecodeMechanism::WithCharset ); } break; @@ -847,7 +847,7 @@ bool FuDraw::SetHelpText(SdrObject* pObj, const Point& rPosPixel, const SdrViewE // jump to document (object/page) aHelpText = SD_RESSTR(STR_CLICK_ACTION_DOCUMENT); aHelpText += ": "; - aHelpText += INetURLObject::decode( pInfo->GetBookmark(), INetURLObject::DECODE_WITH_CHARSET ); + aHelpText += INetURLObject::decode( pInfo->GetBookmark(), INetURLObject::DecodeMechanism::WithCharset ); } break; @@ -856,7 +856,7 @@ bool FuDraw::SetHelpText(SdrObject* pObj, const Point& rPosPixel, const SdrViewE // execute program aHelpText = SD_RESSTR(STR_CLICK_ACTION_PROGRAM); aHelpText += ": "; - aHelpText += INetURLObject::decode( pInfo->GetBookmark(), INetURLObject::DECODE_WITH_CHARSET ); + aHelpText += INetURLObject::decode( pInfo->GetBookmark(), INetURLObject::DecodeMechanism::WithCharset ); } break; @@ -911,7 +911,7 @@ bool FuDraw::SetHelpText(SdrObject* pObj, const Point& rPosPixel, const SdrViewE /************************************************************** * URL-Field **************************************************************/ - aHelpText = INetURLObject::decode( rVEvt.pURLField->GetURL(), INetURLObject::DECODE_WITH_CHARSET ); + aHelpText = INetURLObject::decode( rVEvt.pURLField->GetURL(), INetURLObject::DecodeMechanism::WithCharset ); } if (!aHelpText.isEmpty()) diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx index f68e92bfa0ca..5edf2182b7ab 100644 --- a/sd/source/ui/func/fuinsert.cxx +++ b/sd/source/ui/func/fuinsert.cxx @@ -801,7 +801,7 @@ void FuInsert3DModel::DoExecute( SfxRequest& ) if( aDlg.Execute() == ERRCODE_NONE ) { const INetURLObject aURL( aDlg.GetPath() ); - sURL = aURL.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ); + sURL = aURL.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous ); } else if( !sURL.isEmpty() ) sURL.clear(); diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx index 4a0acda8d055..90d2aa0d8d5b 100644 --- a/sd/source/ui/func/fusel.cxx +++ b/sd/source/ui/func/fusel.cxx @@ -1365,11 +1365,11 @@ bool FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos) OUString aBaseURL = GetDocSh()->GetMedium()->GetBaseURL(); INetURLObject aURL( ::URIHelper::SmartRel2Abs( INetURLObject(aBaseURL), pInfo->GetBookmark(), URIHelper::GetMaybeFileHdl(), true, false, - INetURLObject::EncodeMechanism::WasEncoded, INetURLObject::DECODE_UNAMBIGUOUS ) ); + INetURLObject::EncodeMechanism::WasEncoded, INetURLObject::DecodeMechanism::Unambiguous ) ); if( INetProtocol::File == aURL.GetProtocol() ) { - SfxStringItem aUrl( SID_FILE_NAME, aURL.GetMainURL( INetURLObject::NO_DECODE ) ); + SfxStringItem aUrl( SID_FILE_NAME, aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ); SfxBoolItem aBrowsing( SID_BROWSE, true ); SfxViewFrame* pViewFrm = SfxViewFrame::Current(); diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx index 1657d2a39895..200c001daf07 100644 --- a/sd/source/ui/func/futext.cxx +++ b/sd/source/ui/func/futext.cxx @@ -1187,7 +1187,7 @@ bool FuText::RequestHelp(const HelpEvent& rHEvt) if (pField && dynamic_cast< const SvxURLField *>( pField ) != nullptr) { // URL-Field - aHelpText = INetURLObject::decode( static_cast<const SvxURLField*>(pField)->GetURL(), INetURLObject::DECODE_WITH_CHARSET ); + aHelpText = INetURLObject::decode( static_cast<const SvxURLField*>(pField)->GetURL(), INetURLObject::DecodeMechanism::WithCharset ); } if (!aHelpText.isEmpty()) { diff --git a/sd/source/ui/sidebar/MasterPageDescriptor.cxx b/sd/source/ui/sidebar/MasterPageDescriptor.cxx index b60725562626..60e7931d5aec 100644 --- a/sd/source/ui/sidebar/MasterPageDescriptor.cxx +++ b/sd/source/ui/sidebar/MasterPageDescriptor.cxx @@ -38,7 +38,7 @@ MasterPageDescriptor::MasterPageDescriptor ( const std::shared_ptr<PreviewProvider>& rpPreviewProvider) : maToken(MasterPageContainer::NIL_TOKEN), meOrigin(eOrigin), - msURL(INetURLObject(rsURL).GetMainURL(INetURLObject::DECODE_UNAMBIGUOUS)), + msURL(INetURLObject(rsURL).GetMainURL(INetURLObject::DecodeMechanism::Unambiguous)), msPageName(rsPageName), msStyleName(rsStyleName), mbIsPrecious(bIsPrecious), diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index 4a71463d236b..140f0ac73cd0 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -1535,11 +1535,11 @@ void SlideshowImpl::click( const Reference< XShape >& xShape, const css::awt::Mo INetURLObject(mpDocSh->GetMedium()->GetBaseURL()), pEvent->maStrBookmark, ::URIHelper::GetMaybeFileHdl(), true, false, INetURLObject::EncodeMechanism::WasEncoded, - INetURLObject::DECODE_UNAMBIGUOUS ) ); + INetURLObject::DecodeMechanism::Unambiguous ) ); if( INetProtocol::File == aURL.GetProtocol() ) { - SfxStringItem aUrl( SID_FILE_NAME, aURL.GetMainURL( INetURLObject::NO_DECODE ) ); + SfxStringItem aUrl( SID_FILE_NAME, aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ); SfxBoolItem aBrowsing( SID_BROWSE, true ); SfxViewFrame* pViewFrm = SfxViewFrame::Current(); diff --git a/sd/source/ui/unoidl/UnoDocumentSettings.cxx b/sd/source/ui/unoidl/UnoDocumentSettings.cxx index c6aba162be0c..9b654caf04cb 100644 --- a/sd/source/ui/unoidl/UnoDocumentSettings.cxx +++ b/sd/source/ui/unoidl/UnoDocumentSettings.cxx @@ -969,7 +969,7 @@ void DocumentSettings::ExtractURL( XPropertyListType t, Any* pValue ) INetURLObject aPathURL( pList->GetPath() ); aPathURL.insertName( pList->GetName() ); aPathURL.setExtension( pList->GetDefaultExt() ); - OUString aPath( aPathURL.GetMainURL( INetURLObject::NO_DECODE ) ); + OUString aPath( aPathURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ); *pValue <<= aPath; } diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx index d24e4cbeaefb..ea73c9427ab7 100644 --- a/sd/source/ui/view/drviews3.cxx +++ b/sd/source/ui/view/drviews3.cxx @@ -416,7 +416,7 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq) if (pBookmark) { - OUString sBookmark(INetURLObject::decode(pBookmark->GetValue(), INetURLObject::DECODE_WITH_CHARSET)); + OUString sBookmark(INetURLObject::decode(pBookmark->GetValue(), INetURLObject::DecodeMechanism::WithCharset)); rtl::Reference< sd::SlideShow > xSlideshow( SlideShow::GetSlideShow( GetViewShellBase() ) ); if(xSlideshow.is() && xSlideshow->isRunning()) diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index 704b8d9ff172..1e0d809efd68 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -1474,7 +1474,7 @@ void DrawViewShell::InsertURLButton(const OUString& rURL, const OUString& rText, const OUString sTargetURL( ::URIHelper::SmartRel2Abs( INetURLObject( GetDocSh()->GetMedium()->GetBaseURL() ), rURL, URIHelper::GetMaybeFileHdl(), true, false, INetURLObject::EncodeMechanism::WasEncoded, - INetURLObject::DECODE_UNAMBIGUOUS ) ); + INetURLObject::DecodeMechanism::Unambiguous ) ); if (mpDrawView->GetMarkedObjectList().GetMarkCount() > 0) { SdrObject* pMarkedObj = mpDrawView->GetMarkedObjectList().GetMark(0)->GetMarkedSdrObj(); diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx index 96a2ffc5363c..5fffe0460c1a 100644 --- a/sd/source/ui/view/sdview4.cxx +++ b/sd/source/ui/view/sdview4.cxx @@ -412,7 +412,7 @@ IMPL_LINK_NOARG(View, DropInsertFileHdl, Idle *, void) GraphicFilter& rGraphicFilter = GraphicFilter::GetGraphicFilter(); Graphic aGraphic; - aCurrentDropFile = aURL.GetMainURL( INetURLObject::NO_DECODE ); + aCurrentDropFile = aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ); if( !::avmedia::MediaWindow::isMediaURL( aCurrentDropFile, ""/*TODO?*/ ) ) { |