summaryrefslogtreecommitdiffstats
path: root/fpicker
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-12-05 08:47:18 +0200
committerAshod Nakashian <ashod.nakashian@collabora.co.uk>2017-12-18 01:07:53 -0500
commit3c4333c24882d6699b65d109f2cfbf7daf3122c6 (patch)
tree739dacdd38ddd2053aaa3ad7f0ffc053eb515d52 /fpicker
parentconvert INetURLObject::EncodeMechanism to scoped enum (diff)
downloadcore-3c4333c24882d6699b65d109f2cfbf7daf3122c6.tar.gz
core-3c4333c24882d6699b65d109f2cfbf7daf3122c6.zip
convert DecodeMechanism to scoped enum
(cherry picked from commit bfde4866e07746eafa2f0d6173c29d805cc35ad0) (cherry picked from commit 3de922d4a695e253d4ca2d42b70e0b35b52e9b7c) Change-Id: I5c56634b1bca8e37fa73d02d2428645301b6c547
Diffstat (limited to 'fpicker')
-rw-r--r--fpicker/source/office/OfficeFilePicker.cxx6
-rw-r--r--fpicker/source/office/OfficeFolderPicker.cxx2
-rw-r--r--fpicker/source/office/RemoteFilesDialog.cxx14
-rw-r--r--fpicker/source/office/iodlg.cxx42
-rw-r--r--fpicker/source/office/iodlgimp.cxx2
5 files changed, 33 insertions, 33 deletions
diff --git a/fpicker/source/office/OfficeFilePicker.cxx b/fpicker/source/office/OfficeFilePicker.cxx
index 64ec384d72a6..0177748a01fa 100644
--- a/fpicker/source/office/OfficeFilePicker.cxx
+++ b/fpicker/source/office/OfficeFilePicker.cxx
@@ -158,7 +158,7 @@ void SvtFilePicker::prepareExecute()
aPath.insertName( m_aDefaultName );
getDialog()->SetHasFilename( true );
}
- getDialog()->SetPath( aPath.GetMainURL( INetURLObject::NO_DECODE ) );
+ getDialog()->SetPath( aPath.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
isFileSet = true;
}
if ( !isFileSet && !m_aDefaultName.isEmpty() )
@@ -171,7 +171,7 @@ void SvtFilePicker::prepareExecute()
{
// Default-Standard-Dir setzen
INetURLObject aStdDirObj( SvtPathOptions().GetWorkPath() );
- getDialog()->SetPath( aStdDirObj.GetMainURL( INetURLObject::NO_DECODE ) );
+ getDialog()->SetPath( aStdDirObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
}
// set the control values and set the control labels, too
@@ -570,7 +570,7 @@ OUString SAL_CALL SvtFilePicker::getDisplayDirectory() throw( RuntimeException,
{
INetURLObject aFolder( aPath );
aFolder.CutLastName();
- aPath = aFolder.GetMainURL( INetURLObject::NO_DECODE );
+ aPath = aFolder.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
m_aOldDisplayDirectory = aPath;
return aPath;
diff --git a/fpicker/source/office/OfficeFolderPicker.cxx b/fpicker/source/office/OfficeFolderPicker.cxx
index ad09f8dcf89c..ec1f8a8e0f35 100644
--- a/fpicker/source/office/OfficeFolderPicker.cxx
+++ b/fpicker/source/office/OfficeFolderPicker.cxx
@@ -92,7 +92,7 @@ void SvtFolderPicker::prepareExecute()
{
// Default-Standard-Dir setzen
INetURLObject aStdDirObj( SvtPathOptions().GetWorkPath() );
- getDialog()->SetPath( aStdDirObj.GetMainURL( INetURLObject::NO_DECODE) );
+ getDialog()->SetPath( aStdDirObj.GetMainURL( INetURLObject::DecodeMechanism::NONE) );
}
}
diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx
index 4bdecd176162..3fb79e53d3db 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -412,7 +412,7 @@ OUString lcl_GetServiceType( const ServicePtr& pService )
return OUString( "FTP" );
case INetProtocol::Cmis:
{
- OUString sHost = pService->GetUrlObject().GetHost( INetURLObject::DECODE_WITH_CHARSET );
+ OUString sHost = pService->GetUrlObject().GetHost( INetURLObject::DecodeMechanism::WithCharset );
if( sHost.startsWith( GDRIVE_BASE_URL ) )
return OUString( "Google Drive" );
@@ -988,9 +988,9 @@ IMPL_LINK_NOARG( RemoteFilesDialog, SelectHdl, SvTreeListBox*, void )
INetURLObject aCurrentURL( m_sLastServiceUrl );
aURL.SetUser( aCurrentURL.GetUser() );
- m_sPath = aURL.GetMainURL( INetURLObject::NO_DECODE );
+ m_sPath = aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
- m_pName_ed->SetText( INetURLObject::decode( aURL.GetLastName(), INetURLObject::DECODE_WITH_CHARSET ) );
+ m_pName_ed->SetText( INetURLObject::decode( aURL.GetLastName(), INetURLObject::DecodeMechanism::WithCharset ) );
}
else
{
@@ -1143,7 +1143,7 @@ IMPL_LINK_NOARG ( RemoteFilesDialog, OkHdl, Button*, void )
INetURLObject aCurrentURL( m_sLastServiceUrl );
aURL.SetUser( aCurrentURL.GetUser() );
- m_sPath = aURL.GetMainURL( INetURLObject::NO_DECODE );
+ m_sPath = aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
bool bExists = false;
@@ -1236,7 +1236,7 @@ void RemoteFilesDialog::SetPath( const OUString& rNewURL )
if( m_eMode == REMOTEDLG_MODE_SAVE )
{
INetURLObject aUrl( m_sPath );
- OUString sFileName = aUrl.GetLastName( INetURLObject::DECODE_WITH_CHARSET );
+ OUString sFileName = aUrl.GetLastName( INetURLObject::DecodeMechanism::WithCharset );
m_pName_ed->SetText( sFileName );
}
@@ -1370,7 +1370,7 @@ void RemoteFilesDialog::UpdateControls( const OUString& rURL )
{
OUString sTitle( INetURLObject::decode(
aFolderName.copy( nTitleStart + 1 ),
- INetURLObject::DECODE_WITH_CHARSET ) );
+ INetURLObject::DecodeMechanism::WithCharset ) );
if( rFolder.mbIsFolder )
{
@@ -1414,7 +1414,7 @@ std::vector<OUString> RemoteFilesDialog::GetPathList() const
INetURLObject aCurrentURL( m_sLastServiceUrl );
aURL.SetUser( aCurrentURL.GetUser() );
- aList.push_back( aURL.GetMainURL( INetURLObject::NO_DECODE ) );
+ aList.push_back( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
pEntry = m_pFileView->NextSelected( pEntry );
}
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index 4630e33455e9..70ee9c822d3d 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -216,7 +216,7 @@ namespace
{
try
{
- bRealExtensions = !_pDialog->ContentIsFolder( aURL.GetMainURL( INetURLObject::NO_DECODE ) );
+ bRealExtensions = !_pDialog->ContentIsFolder( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
}
catch( const css::uno::Exception& )
{
@@ -275,7 +275,7 @@ namespace
{
INetURLObject aWorkPathObj( _rDir, INetProtocol::File );
aWorkPathObj.setFinalSlash();
- return aWorkPathObj.GetMainURL( INetURLObject::NO_DECODE );
+ return aWorkPathObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
@@ -582,7 +582,7 @@ void SvtFileDialog::Init_Impl
// Set the directory for the "back to the default dir" button
INetURLObject aStdDirObj( SvtPathOptions().GetWorkPath() );
- SetStandardDir( aStdDirObj.GetMainURL( INetURLObject::NO_DECODE ) );
+ SetStandardDir( aStdDirObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
// Create control element, the order defines the tab control.
pImpl->_pEdFileName->SetSelectHdl( LINK( this, SvtFileDialog, EntrySelectHdl_Impl ) );
@@ -1079,12 +1079,12 @@ void SvtFileDialog::OpenHdl_Impl(void* pVoid)
{
case FILEDLG_MODE_SAVE:
{
- if ( ::utl::UCBContentHelper::Exists( aFileObj.GetMainURL( INetURLObject::NO_DECODE ) ) )
+ if ( ::utl::UCBContentHelper::Exists( aFileObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ) )
{
OUString aMsg = SVT_RESSTR( STR_SVT_ALREADYEXISTOVERWRITE );
aMsg = aMsg.replaceFirst(
"$filename$",
- aFileObj.getName(INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET)
+ aFileObj.getName(INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset)
);
ScopedVclPtrInstance< MessageDialog > aBox(this, aMsg, VclMessageType::Question, VCL_BUTTONS_YES_NO);
if ( aBox->Execute() != RET_YES )
@@ -1098,7 +1098,7 @@ void SvtFileDialog::OpenHdl_Impl(void* pVoid)
// if content does not exist: at least its path must exist
INetURLObject aPathObj = aFileObj;
aPathObj.removeSegment();
- bool bFolder = m_aContent.isFolder( aPathObj.GetMainURL( INetURLObject::NO_DECODE ) );
+ bool bFolder = m_aContent.isFolder( aPathObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
if ( !bFolder )
{
ErrorHandler::HandleError( ERRCODE_IO_NOTEXISTSPATH );
@@ -1115,13 +1115,13 @@ void SvtFileDialog::OpenHdl_Impl(void* pVoid)
if ( INetProtocol::File == aFileObj.GetProtocol( ) )
{
- bool bExists = m_aContent.is( aFileObj.GetMainURL( INetURLObject::NO_DECODE ) );
+ bool bExists = m_aContent.is( aFileObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
if ( !bExists )
{
OUString sError( SVT_RESSTR( RID_FILEOPEN_NOTEXISTENTFILE ) );
- OUString sInvalidFile( aFileObj.GetMainURL( INetURLObject::DECODE_TO_IURI ) );
+ OUString sInvalidFile( aFileObj.GetMainURL( INetURLObject::DecodeMechanism::ToIUri ) );
if ( INetProtocol::File == aFileObj.GetProtocol() )
{ // if it's a file URL, transform the URL into system notation
OUString sURL( sInvalidFile );
@@ -1280,7 +1280,7 @@ IMPL_LINK_NOARG ( SvtFileDialog, AddPlacePressed_Hdl, Button*, void )
// there is an ux choice to make we did not make...
INetURLObject aURLObj( _pFileView->GetViewURL() );
PlacePtr newPlace(
- new Place( aURLObj.GetLastName(INetURLObject::DECODE_WITH_CHARSET),
+ new Place( aURLObj.GetLastName(INetURLObject::DecodeMechanism::WithCharset),
OUString(_pFileView->GetViewURL()), true));
pImpl->_pPlaces->AppendPlace(newPlace);
}
@@ -1411,7 +1411,7 @@ void SvtFileDialog::UpdateControls( const OUString& rURL )
if ( aObj.hasFinalSlash() )
{
aObj.removeFinalSlash();
- OUString sURL( aObj.GetMainURL( INetURLObject::NO_DECODE ) );
+ OUString sURL( aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
if (osl::FileBase::getSystemPathFromFileURL(sURL, sText) != osl::FileBase::E_None)
sText = sURL;
}
@@ -1616,7 +1616,7 @@ OUString SvtFileDialog::implGetInitialURL( const OUString& _rPath, const OUStrin
aURLParser = aURLParser.smartRel2Abs( _rPath, bWasAbsolute );
// is it a valid folder?
- m_aContent.bindTo( aURLParser.GetMainURL( INetURLObject::NO_DECODE ) );
+ m_aContent.bindTo( aURLParser.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
bool bIsFolder = m_aContent.isFolder( ); // do this _before_ asking isInvalid!
bool bIsInvalid = m_aContent.isInvalid();
@@ -1625,13 +1625,13 @@ OUString SvtFileDialog::implGetInitialURL( const OUString& _rPath, const OUStrin
INetURLObject aParent( aURLParser );
aParent.removeSegment( );
aParent.setFinalSlash( );
- bIsInvalid = implIsInvalid( aParent.GetMainURL( INetURLObject::NO_DECODE ) );
+ bIsInvalid = implIsInvalid( aParent.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
}
if ( bIsInvalid )
{
INetURLObject aFallback( _rFallback );
- bIsInvalid = implIsInvalid( aFallback.GetMainURL( INetURLObject::NO_DECODE ) );
+ bIsInvalid = implIsInvalid( aFallback.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
if ( !bIsInvalid )
aURLParser = aFallback;
@@ -1643,7 +1643,7 @@ OUString SvtFileDialog::implGetInitialURL( const OUString& _rPath, const OUStrin
while ( bIsInvalid && aParent.removeSegment() )
{
aParent.setFinalSlash( );
- bIsInvalid = implIsInvalid( aParent.GetMainURL( INetURLObject::NO_DECODE ) );
+ bIsInvalid = implIsInvalid( aParent.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
}
if ( !bIsInvalid )
@@ -1654,7 +1654,7 @@ OUString SvtFileDialog::implGetInitialURL( const OUString& _rPath, const OUStrin
{
aURLParser.setFinalSlash();
}
- return aURLParser.GetMainURL( INetURLObject::NO_DECODE );
+ return aURLParser.GetMainURL( INetURLObject::DecodeMechanism::NONE );
}
@@ -1680,7 +1680,7 @@ short SvtFileDialog::Execute()
{
// remember the selected directory only for file URLs not for virtual folders
sal_Int32 nLevel = aURL.getSegmentCount();
- bool bDir = m_aContent.isFolder( aURL.GetMainURL( INetURLObject::NO_DECODE ) );
+ bool bDir = m_aContent.isFolder( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
if ( nLevel > 1 && ( FILEDLG_TYPE_FILEDLG == pImpl->_eDlgType || !bDir ) )
aURL.removeSegment();
}
@@ -1814,7 +1814,7 @@ short SvtFileDialog::PrepareExecute()
{
INetURLObject aStdDir( GetStandardDir() );
::ucbhelper::Content aCnt( OUString( aStdDir.GetMainURL(
- INetURLObject::NO_DECODE ) ),
+ INetURLObject::DecodeMechanism::NONE ) ),
Reference< XCommandEnvironment >(),
comphelper::getProcessComponentContext() );
Sequence< OUString > aProps(2);
@@ -1959,7 +1959,7 @@ short SvtFileDialog::PrepareExecute()
bool bFileToSelect = nFileNameLen != 0;
if ( bFileToSelect && aFileName[ nFileNameLen - 1 ] != '/' )
{
- OUString aDecodedName = aFolderURL.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
+ OUString aDecodedName = aFolderURL.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset );
pImpl->_pEdFileName->SetText( aDecodedName );
aFolderURL.removeSegment();
}
@@ -1971,12 +1971,12 @@ short SvtFileDialog::PrepareExecute()
aObj.setFinalSlash();
}
- UpdateControls( aObj.GetMainURL( INetURLObject::NO_DECODE ) );
+ UpdateControls( aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
// Somebody might want to enable some controls according to the current filter
FilterSelect();
- OpenURL_Impl( aObj.GetMainURL( INetURLObject::NO_DECODE ) );
+ OpenURL_Impl( aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
_pFileView->Show();
_pSplitter->Show();
@@ -2035,7 +2035,7 @@ void SvtFileDialog::SetStandardDir( const OUString& rStdDir )
INetURLObject aObj( rStdDir );
SAL_WARN_IF( aObj.GetProtocol() == INetProtocol::NotValid, "fpicker.office", "Invalid protocol!" );
aObj.setFinalSlash();
- pImpl->SetStandardDir( aObj.GetMainURL( INetURLObject::NO_DECODE ) );
+ pImpl->SetStandardDir( aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
}
void SvtFileDialog::SetBlackList( const css::uno::Sequence< OUString >& rBlackList )
diff --git a/fpicker/source/office/iodlgimp.cxx b/fpicker/source/office/iodlgimp.cxx
index 43539fdc5197..62ed95d92af8 100644
--- a/fpicker/source/office/iodlgimp.cxx
+++ b/fpicker/source/office/iodlgimp.cxx
@@ -157,7 +157,7 @@ void SvtUpButton_Impl::FillURLMenu( PopupMenu* _pMenu )
while ( nCount >= 1 )
{
aObject.removeSegment();
- OUString aParentURL(aObject.GetMainURL(INetURLObject::NO_DECODE));
+ OUString aParentURL(aObject.GetMainURL(INetURLObject::DecodeMechanism::NONE));
OUString aTitle;
if (!GetDialogParent()->ContentGetTitle(aParentURL, aTitle) || aTitle.isEmpty())