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 /sw/source/ui | |
parent | 803215142efa6437515348f63bd70ffdcf5d45f1 (diff) |
convert DecodeMechanism to scoped enum
Change-Id: I5c56634b1bca8e37fa73d02d2428645301b6c547
Diffstat (limited to 'sw/source/ui')
-rw-r--r-- | sw/source/ui/chrdlg/chardlg.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/dbui/addresslistdialog.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/dbui/createaddresslistdialog.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/dbui/mmresultdialogs.cxx | 6 | ||||
-rw-r--r-- | sw/source/ui/dialog/uiregionsw.cxx | 12 | ||||
-rw-r--r-- | sw/source/ui/frmdlg/frmpage.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/index/cnttab.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/misc/glosbib.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/vba/vbatemplate.cxx | 2 |
9 files changed, 17 insertions, 17 deletions
diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx index 1211e6efb5f7..e1e6cefc0a76 100644 --- a/sw/source/ui/chrdlg/chardlg.cxx +++ b/sw/source/ui/chrdlg/chardlg.cxx @@ -211,7 +211,7 @@ void SwCharURLPage::Reset(const SfxItemSet* rSet) { const SwFormatINetFormat* pINetFormat = static_cast<const SwFormatINetFormat*>( pItem); m_pURLED->SetText(INetURLObject::decode(pINetFormat->GetValue(), - INetURLObject::DECODE_UNAMBIGUOUS)); + INetURLObject::DecodeMechanism::Unambiguous)); m_pURLED->SaveValue(); m_pNameED->SetText(pINetFormat->GetName()); diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx index 682e5b76035a..617957d5c7a6 100644 --- a/sw/source/ui/dbui/addresslistdialog.cxx +++ b/sw/source/ui/dbui/addresslistdialog.cxx @@ -385,7 +385,7 @@ IMPL_LINK(SwAddressListDialog, CreateHdl_Impl, Button*, pButton, void) INetURLObject aTempURL(aURL); aTempURL.removeSegment(); aTempURL.removeFinalSlash(); - const OUString sDBURL("sdbc:flat:" + aTempURL.GetMainURL(INetURLObject::NO_DECODE)); + const OUString sDBURL("sdbc:flat:" + aTempURL.GetMainURL(INetURLObject::DecodeMechanism::NONE)); xDataProperties->setPropertyValue("URL", Any(sDBURL)); //set the filter to the file name without extension uno::Sequence<OUString> aFilters { sNewName }; diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx index 27086a9338f0..7c87d4875fd6 100644 --- a/sw/source/ui/dbui/createaddresslistdialog.cxx +++ b/sw/source/ui/dbui/createaddresslistdialog.cxx @@ -636,7 +636,7 @@ IMPL_LINK_NOARG(SwCreateAddressListDialog, OkHdl_Impl, Button*, void) m_sURL = xFP->getSelectedFiles().getConstArray()[0]; INetURLObject aResult( m_sURL ); aResult.setExtension("csv"); - m_sURL = aResult.GetMainURL(INetURLObject::NO_DECODE); + m_sURL = aResult.GetMainURL(INetURLObject::DecodeMechanism::NONE); } } if(!m_sURL.isEmpty()) diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx b/sw/source/ui/dbui/mmresultdialogs.cxx index 509f6bb329a7..78836ebaf028 100644 --- a/sw/source/ui/dbui/mmresultdialogs.cxx +++ b/sw/source/ui/dbui/mmresultdialogs.cxx @@ -165,7 +165,7 @@ SwSaveWarningBox_Impl::SwSaveWarningBox_Impl(vcl::Window* pParent, const OUStrin INetURLObject aTmp(rFileName); m_pPrimaryMessage->SetText(m_pPrimaryMessage->GetText().replaceAll("%1", aTmp.getName( - INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET))); + INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset))); ModifyHdl(*m_pEdit); } @@ -429,7 +429,7 @@ void SwMMResultEmailDialog::FillInEmailSettings() { INetURLObject aTmp(pDocShell->GetMedium()->GetName()); m_pAttachmentED->SetText(aTmp.getName( - INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET )); + INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset )); } } @@ -713,7 +713,7 @@ IMPL_LINK(SwMMResultSaveDialog, SaveOutputHdl_Impl, Button*, pButton, void) documentStartPageNumber(xConfigItem.get(), nDoc), documentEndPageNumber(xConfigItem.get(), nDoc)); pTargetView->GetWrtShell().EndAction(); //then save it - OUString sOutPath = aURL.GetMainURL(INetURLObject::DECODE_TO_IURI); + OUString sOutPath = aURL.GetMainURL(INetURLObject::DecodeMechanism::ToIUri); OUString sCounter = "_" + OUString::number(nDoc); sOutPath = sOutPath.replaceAt( sOutPath.getLength() - sExtension.getLength() - 1, 0, sCounter); diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index 496654aaeb76..722ec47ca64c 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -204,7 +204,7 @@ SectRepr::SectRepr( size_t nPos, SwSection& rSect ) void SectRepr::SetFile( const OUString& rFile ) { OUString sNewFile( INetURLObject::decode( rFile, - INetURLObject::DECODE_UNAMBIGUOUS )); + INetURLObject::DecodeMechanism::Unambiguous )); const OUString sOldFileName( m_SectionData.GetLinkFileName() ); const OUString sSub( sOldFileName.getToken( 2, sfx2::cTokenSeparator ) ); @@ -289,7 +289,7 @@ OUString SectRepr::GetFile() const .replaceFirst( OUStringLiteral1(sfx2::cTokenSeparator), " ", &n ); } return INetURLObject::decode( sLinkFile.getToken( 0, sfx2::cTokenSeparator ), - INetURLObject::DECODE_UNAMBIGUOUS ); + INetURLObject::DecodeMechanism::Unambiguous ); } OUString SectRepr::GetSubRegion() const @@ -1319,7 +1319,7 @@ IMPL_LINK( SwEditRegionDlg, DlgClosedHdl, sfx2::FileDialogHelper *, _pFileDlg, v std::unique_ptr<SfxMedium> pMedium(m_pDocInserter->CreateMedium("sglobal")); if ( pMedium ) { - sFileName = pMedium->GetURLObject().GetMainURL( INetURLObject::NO_DECODE ); + sFileName = pMedium->GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE ); sFilterName = pMedium->GetFilter()->GetFilterName(); const SfxPoolItem* pItem; if ( SfxItemState::SET == pMedium->GetItemSet()->GetItemState( SID_PASSWORD, false, &pItem ) ) @@ -1358,7 +1358,7 @@ IMPL_LINK( SwEditRegionDlg, SubRegionEventHdl, VclWindowEvent&, rEvent, void ) //load file and set the shell SfxMedium aMedium( sFileName, StreamMode::STD_READ ); - sFileName = aMedium.GetURLObject().GetMainURL( INetURLObject::NO_DECODE ); + sFileName = aMedium.GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE ); ::lcl_ReadSections(aMedium, *m_pSubRegionED); } else @@ -1786,13 +1786,13 @@ IMPL_LINK( SwInsertSectionTabPage, DlgClosedHdl, sfx2::FileDialogHelper *, _pFil std::unique_ptr<SfxMedium> pMedium(m_pDocInserter->CreateMedium("sglobal")); if ( pMedium ) { - m_sFileName = pMedium->GetURLObject().GetMainURL( INetURLObject::NO_DECODE ); + m_sFileName = pMedium->GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE ); m_sFilterName = pMedium->GetFilter()->GetFilterName(); const SfxPoolItem* pItem; if ( SfxItemState::SET == pMedium->GetItemSet()->GetItemState( SID_PASSWORD, false, &pItem ) ) m_sFilePasswd = static_cast<const SfxStringItem*>(pItem)->GetValue(); m_pFileNameED->SetText( INetURLObject::decode( - m_sFileName, INetURLObject::DECODE_UNAMBIGUOUS ) ); + m_sFileName, INetURLObject::DecodeMechanism::Unambiguous ) ); ::lcl_ReadSections(*pMedium, *m_pSubRegionED); } } diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index b9d850aed94a..9f40d88f5686 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -2586,7 +2586,7 @@ IMPL_LINK_NOARG(SwGrfExtPage, BrowseHdl, Button*, void) { // remember selected filter aFilterName = pGrfDlg->GetCurrentFilter(); aNewGrfName = INetURLObject::decode( pGrfDlg->GetPath(), - INetURLObject::DECODE_UNAMBIGUOUS ); + INetURLObject::DecodeMechanism::Unambiguous ); m_pConnectED->SetModifyFlag(); m_pConnectED->SetText( aNewGrfName ); //reset mirrors because maybe a Bitmap was swapped with @@ -2778,7 +2778,7 @@ void SwFrameURLPage::Reset( const SfxItemSet *rSet ) { const SwFormatURL* pFormatURL = static_cast<const SwFormatURL*>(pItem); pURLED->SetText( INetURLObject::decode( pFormatURL->GetURL(), - INetURLObject::DECODE_UNAMBIGUOUS )); + INetURLObject::DecodeMechanism::Unambiguous )); pNameED->SetText( pFormatURL->GetName()); pClientCB->Enable( pFormatURL->GetMap() != nullptr ); diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index b565df9db20c..bb187b0db1d1 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -1264,7 +1264,7 @@ void SwTOXSelectTabPage::Reset( const SfxItemSet* ) m_pTypeLB->SelectEntryPos(m_pTypeLB->GetEntryPos(reinterpret_cast<void*>(nData))); sAutoMarkURL = INetURLObject::decode( rSh.GetTOIAutoMarkURL(), - INetURLObject::DECODE_UNAMBIGUOUS ); + INetURLObject::DecodeMechanism::Unambiguous ); m_pFromFileCB->Check( !sAutoMarkURL.isEmpty() ); m_pCaptionSequenceLB->Clear(); diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx index fa2804d0ffbf..85ec9bfdc5f9 100644 --- a/sw/source/ui/misc/glosbib.cxx +++ b/sw/source/ui/misc/glosbib.cxx @@ -79,7 +79,7 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(vcl::Window * pParent, for (size_t i = 0; i < rPathArr.size(); ++i) { INetURLObject aTempURL(rPathArr[i]); - const OUString sPath = aTempURL.GetMainURL(INetURLObject::DECODE_WITH_CHARSET ); + const OUString sPath = aTempURL.GetMainURL(INetURLObject::DecodeMechanism::WithCharset ); m_pPathLB->InsertEntry(sPath); sal_uLong nCaseReadonly = 0; utl::TempFile aTempFile(&sPath); diff --git a/sw/source/ui/vba/vbatemplate.cxx b/sw/source/ui/vba/vbatemplate.cxx index 69ff6ee85fea..a23735a9c8ec 100644 --- a/sw/source/ui/vba/vbatemplate.cxx +++ b/sw/source/ui/vba/vbatemplate.cxx @@ -74,7 +74,7 @@ SwVbaTemplate::getPath() throw ( css::uno::RuntimeException, std::exception ) if( !msFullUrl.isEmpty() ) { INetURLObject aURL( msFullUrl ); - OUString sURL( aURL.GetMainURL( INetURLObject::DECODE_TO_IURI ) ); + OUString sURL( aURL.GetMainURL( INetURLObject::DecodeMechanism::ToIUri ) ); sURL = sURL.copy( 0, sURL.getLength() - aURL.GetLastName().getLength() - 1 ); ::osl::File::getSystemPathFromFileURL( sURL, sPath ); } |