diff options
-rw-r--r-- | basctl/source/basicide/moduldl2.cxx | 4 | ||||
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx | 2 | ||||
-rw-r--r-- | desktop/source/deployment/manager/dp_manager.cxx | 4 | ||||
-rw-r--r-- | desktop/source/deployment/registry/component/dp_component.cxx | 4 | ||||
-rw-r--r-- | desktop/source/deployment/registry/dp_backend.cxx | 2 | ||||
-rw-r--r-- | desktop/source/deployment/registry/package/dp_package.cxx | 4 | ||||
-rw-r--r-- | framework/source/services/autorecovery.cxx | 2 | ||||
-rw-r--r-- | include/ucbhelper/content.hxx | 9 | ||||
-rw-r--r-- | sfx2/source/doc/docfile.cxx | 14 | ||||
-rw-r--r-- | sfx2/source/doc/doctemplates.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/doc/printhelper.cxx | 2 | ||||
-rw-r--r-- | sot/source/sdstor/ucbstorage.cxx | 2 | ||||
-rw-r--r-- | svl/source/fsstor/fsstorage.cxx | 2 | ||||
-rw-r--r-- | ucb/source/core/FileAccess.cxx | 4 | ||||
-rw-r--r-- | ucbhelper/source/client/content.cxx | 10 |
15 files changed, 32 insertions, 37 deletions
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index 200d845f8fbd..d17f91210c91 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -1239,7 +1239,7 @@ void LibPage::ExportAsPackage( const OUString& aLibName ) ::ucbhelper::Content destFolderContent( destFolder, xCmdEnv, comphelper::getProcessComponentContext() ); destFolderContent.transferContent( - sourceContent, ::ucbhelper::InsertOperation_COPY, + sourceContent, ::ucbhelper::InsertOperation::Copy, OUString(), NameClash::OVERWRITE ); INetURLObject aMetaInfInetObj( aTmpPath ); @@ -1279,7 +1279,7 @@ void LibPage::ExportAsPackage( const OUString& aLibName ) ::ucbhelper::Content MetaInfContent( aMetaInfFolder, xCmdEnv, comphelper::getProcessComponentContext() ); destFolderContent.transferContent( - MetaInfContent, ::ucbhelper::InsertOperation_COPY, + MetaInfContent, ::ucbhelper::InsertOperation::Copy, OUString(), NameClash::OVERWRITE ); if( xSFA->exists( aSourcePath ) ) diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx index 35b6aa40ccf8..0254152a927a 100644 --- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx @@ -604,7 +604,7 @@ bool UpdateInstallDialog::Thread::download(OUString const & sDownloadURL, Update const OUString sTitle( StrTitle::getTitle( sourceContent ) ); if (destFolderContent.transferContent( - sourceContent, ::ucbhelper::InsertOperation_COPY, + sourceContent, ::ucbhelper::InsertOperation::Copy, sTitle, css::ucb::NameClash::OVERWRITE )) { //the user may have cancelled the dialog because downloading took to long diff --git a/desktop/source/deployment/manager/dp_manager.cxx b/desktop/source/deployment/manager/dp_manager.cxx index 09ba8fe81dd0..8b9d18479847 100644 --- a/desktop/source/deployment/manager/dp_manager.cxx +++ b/desktop/source/deployment/manager/dp_manager.cxx @@ -636,7 +636,7 @@ OUString PackageManagerImpl::insertToActivationLayer( buf.makeStringAndClear(), xCmdEnv, m_xComponentContext ); } if (! destFolderContent.transferContent( - sourceContent, ::ucbhelper::InsertOperation_COPY, + sourceContent, ::ucbhelper::InsertOperation::Copy, title, NameClash::OVERWRITE )) throw RuntimeException( "UCB transferContent() failed!", nullptr ); @@ -747,7 +747,7 @@ Reference<deployment::XPackage> PackageManagerImpl::addPackage( create_folder( &docFolderContent, m_context, xCmdEnv ); // copy into document, first: if (! docFolderContent.transferContent( - sourceContent, ::ucbhelper::InsertOperation_COPY, + sourceContent, ::ucbhelper::InsertOperation::Copy, OUString(), NameClash::ASK /* xxx todo: ASK not needed? */)) throw RuntimeException("UCB transferContent() failed!", nullptr ); diff --git a/desktop/source/deployment/registry/component/dp_component.cxx b/desktop/source/deployment/registry/component/dp_component.cxx index bc0f75170d5f..f2c1708f9478 100644 --- a/desktop/source/deployment/registry/component/dp_component.cxx +++ b/desktop/source/deployment/registry/component/dp_component.cxx @@ -430,7 +430,7 @@ void BackendImpl::initServiceRdbFiles() if (oldRDB.get().is()) { if (! cacheDir.transferContent( - oldRDB, ::ucbhelper::InsertOperation_COPY, + oldRDB, ::ucbhelper::InsertOperation::Copy, m_commonRDB, NameClash::OVERWRITE )) { @@ -451,7 +451,7 @@ void BackendImpl::initServiceRdbFiles() if (oldRDB.get().is()) { if (! cacheDir.transferContent( - oldRDB, ::ucbhelper::InsertOperation_COPY, + oldRDB, ::ucbhelper::InsertOperation::Copy, m_nativeRDB, NameClash::OVERWRITE )) throw RuntimeException( "UCB transferContent() failed!", nullptr ); } diff --git a/desktop/source/deployment/registry/dp_backend.cxx b/desktop/source/deployment/registry/dp_backend.cxx index 2ef737c75ea1..0ce14491b972 100644 --- a/desktop/source/deployment/registry/dp_backend.cxx +++ b/desktop/source/deployment/registry/dp_backend.cxx @@ -545,7 +545,7 @@ void Package::exportTo( try { bOk = destFolder.transferContent( - sourceContent, ::ucbhelper::InsertOperation_COPY, + sourceContent, ::ucbhelper::InsertOperation::Copy, newTitle, nameClashAction); } catch (const css::ucb::ContentCreationException&) diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx index e01901c1f17b..a487ec95e6b4 100644 --- a/desktop/source/deployment/registry/package/dp_package.cxx +++ b/desktop/source/deployment/registry/package/dp_package.cxx @@ -1033,7 +1033,7 @@ void BackendImpl::PackageImpl::exportTo( xResultSet, UNO_QUERY_THROW )->queryContent(), xCmdEnv, getMyBackend()->getComponentContext() ); if (! destFolderContent.transferContent( - subContent, ::ucbhelper::InsertOperation_COPY, + subContent, ::ucbhelper::InsertOperation::Copy, OUString(), ucb::NameClash::OVERWRITE )) throw RuntimeException( "UCB transferContent() failed!", static_cast<OWeakObject *>(this) ); @@ -1141,7 +1141,7 @@ void BackendImpl::PackageImpl::exportTo( } if (metainfFolderContent.transferContent( - manifestContent, ::ucbhelper::InsertOperation_COPY, + manifestContent, ::ucbhelper::InsertOperation::Copy, OUString(), ucb::NameClash::OVERWRITE )) { bSuccess = true; diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx index 70ac2b769c3d..1a964e5fd0e2 100644 --- a/framework/source/services/autorecovery.cxx +++ b/framework/source/services/autorecovery.cxx @@ -3939,7 +3939,7 @@ AutoRecovery::EFailureSafeResult AutoRecovery::implts_copyFile(const OUString& s bool bSuccess = ::ucbhelper::Content::create(sSource, xEnvironment, m_xContext, aSourceContent); if (!bSuccess) return AutoRecovery::E_ORIGINAL_FILE_MISSING; - aTargetContent.transferContent(aSourceContent, ::ucbhelper::InsertOperation_COPY, sTargetName, nNameClash); + aTargetContent.transferContent(aSourceContent, ::ucbhelper::InsertOperation::Copy, sTargetName, nNameClash); } catch(const css::uno::Exception&) { diff --git a/include/ucbhelper/content.hxx b/include/ucbhelper/content.hxx index 4943fce10979..90a28229f9dd 100644 --- a/include/ucbhelper/content.hxx +++ b/include/ucbhelper/content.hxx @@ -76,12 +76,11 @@ enum ResultSetInclude * These are the possible values for the parameter eOperation of method * ucbhelper::Content::insertNewContent. */ -enum InsertOperation +enum class InsertOperation { - InsertOperation_COPY, // copy source data - InsertOperation_MOVE, // move source data - InsertOperation_LINK, // create a link to source - InsertOperation_CHECKIN // check-in source data + Copy, // copy source data + Move, // move source data + Checkin // check-in source data }; diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 01da9338ec34..8b90a7a6595d 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -2062,12 +2062,12 @@ void SfxMedium::Transfer_Impl() try { OUString aMimeType = pImpl->getFilterMimeType(); - ::ucbhelper::InsertOperation eOperation = ::ucbhelper::InsertOperation_COPY; + ::ucbhelper::InsertOperation eOperation = ::ucbhelper::InsertOperation::Copy; bool bMajor = false; OUString sComment; if ( IsInCheckIn( ) ) { - eOperation = ::ucbhelper::InsertOperation_CHECKIN; + eOperation = ::ucbhelper::InsertOperation::Checkin; const SfxBoolItem* pMajor = SfxItemSet::GetItem<SfxBoolItem>(GetItemSet(), SID_DOCINFO_MAJOR, false); bMajor = pMajor && pMajor->GetValue( ); const SfxStringItem* pComments = SfxItemSet::GetItem<SfxStringItem>(GetItemSet(), SID_DOCINFO_COMMENTS, false); @@ -2088,7 +2088,7 @@ void SfxMedium::Transfer_Impl() { if ( GetURLObject().isAnyKnownWebDAVScheme() && isTransferOK && - eOperation == ::ucbhelper::InsertOperation_COPY ) + eOperation == ::ucbhelper::InsertOperation::Copy ) { // tdf#95272 try to re-issue a lock command when a new file is created. // This may be needed because some WebDAV servers fail to implement the @@ -2171,7 +2171,7 @@ void SfxMedium::DoInternalBackup_Impl( const ::ucbhelper::Content& aOriginalCont { OUString sMimeType = pImpl->getFilterMimeType(); if( aBackupCont.transferContent( aOriginalContent, - ::ucbhelper::InsertOperation_COPY, + ::ucbhelper::InsertOperation::Copy, aBackupName, NameClash::OVERWRITE, sMimeType ) ) @@ -2260,7 +2260,7 @@ void SfxMedium::DoBackup_Impl() // do the transfer ( copy source file to backup dir ) OUString sMimeType = pImpl->getFilterMimeType(); bSuccess = aContent.transferContent( aSourceContent, - ::ucbhelper::InsertOperation_COPY, + ::ucbhelper::InsertOperation::Copy, aFileName, NameClash::OVERWRITE, sMimeType ); @@ -3407,7 +3407,7 @@ void SfxMedium::CreateTempFile( bool bReplace ) { ::ucbhelper::Content aTargetContent( aTmpURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), xComEnv, comphelper::getProcessComponentContext() ); OUString sMimeType = pImpl->getFilterMimeType(); - if ( aTargetContent.transferContent( pImpl->aContent, ::ucbhelper::InsertOperation_COPY, aFileName, NameClash::OVERWRITE, sMimeType ) ) + if ( aTargetContent.transferContent( pImpl->aContent, ::ucbhelper::InsertOperation::Copy, aFileName, NameClash::OVERWRITE, sMimeType ) ) { SetWritableForUserOnly( aTmpURL ); bTransferSuccess = true; @@ -3698,7 +3698,7 @@ OUString SfxMedium::CreateTempCopyWithExt( const OUString& aURL ) ::ucbhelper::Content aTargetContent( aDest.GetMainURL( INetURLObject::DecodeMechanism::NONE ), xComEnv, comphelper::getProcessComponentContext() ); ::ucbhelper::Content aSourceContent( aSource.GetMainURL( INetURLObject::DecodeMechanism::NONE ), xComEnv, comphelper::getProcessComponentContext() ); if ( aTargetContent.transferContent( aSourceContent, - ::ucbhelper::InsertOperation_COPY, + ::ucbhelper::InsertOperation::Copy, aFileName, NameClash::OVERWRITE ) ) { diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx index ffe67b47f6df..0dfd449e4727 100644 --- a/sfx2/source/doc/doctemplates.cxx +++ b/sfx2/source/doc/doctemplates.cxx @@ -1340,7 +1340,7 @@ bool SfxDocTplService_Impl::WriteUINamesForTemplateDir_Impl( const OUString& aUs Content aTargetContent( aUserPath, maCmdEnv, comphelper::getProcessComponentContext() ); Content aSourceContent( aTempURL, maCmdEnv, comphelper::getProcessComponentContext() ); aTargetContent.transferContent( aSourceContent, - InsertOperation_COPY, + InsertOperation::Copy, "groupuinames.xml", ucb::NameClash::OVERWRITE, "text/xml" ); @@ -1980,7 +1980,7 @@ bool SfxDocTplService_Impl::addTemplate( const OUString& rGroupName, try { if( ! aTargetGroup.transferContent( aSourceContent, - InsertOperation_COPY, + InsertOperation::Copy, aNewTemplateTargetName, NameClash::OVERWRITE, aType ) ) diff --git a/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx index c9dbf27e957a..f217aa73d642 100644 --- a/sfx2/source/doc/printhelper.cxx +++ b/sfx2/source/doc/printhelper.cxx @@ -550,7 +550,7 @@ class ImplUCBPrintWatcher : public ::osl::Thread aTarget.transferContent( aSource, - ::ucbhelper::InsertOperation_COPY, + ::ucbhelper::InsertOperation::Copy, OUString(sFileName), css::ucb::NameClash::OVERWRITE); } diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx index 3be2e67efcc9..8f3e27a6f4fb 100644 --- a/sot/source/sdstor/ucbstorage.cxx +++ b/sot/source/sdstor/ucbstorage.cxx @@ -2221,7 +2221,7 @@ sal_Int16 UCBStorage_Impl::Commit() xWriter = nullptr; xOutputStream = nullptr; pTempFile.reset(); - aNewSubFolder.transferContent( aSource, InsertOperation_MOVE, "manifest.xml", NameClash::OVERWRITE ); + aNewSubFolder.transferContent( aSource, InsertOperation::Move, "manifest.xml", NameClash::OVERWRITE ); } } else diff --git a/svl/source/fsstor/fsstorage.cxx b/svl/source/fsstor/fsstorage.cxx index 9bbedd210250..999a5a52e121 100644 --- a/svl/source/fsstor/fsstorage.cxx +++ b/svl/source/fsstor/fsstorage.cxx @@ -729,7 +729,7 @@ void SAL_CALL FSStorage::renameElement( const OUString& aElementName, const OUSt ::ucbhelper::Content aSourceContent( aOldURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), xDummyEnv, comphelper::getProcessComponentContext() ); if ( !GetContent()->transferContent( aSourceContent, - ::ucbhelper::InsertOperation_MOVE, + ::ucbhelper::InsertOperation::Move, aNewName, ucb::NameClash::ERROR ) ) throw io::IOException(); // TODO: error handling diff --git a/ucb/source/core/FileAccess.cxx b/ucb/source/core/FileAccess.cxx index 450bafcb5e65..5cd51712e073 100644 --- a/ucb/source/core/FileAccess.cxx +++ b/ucb/source/core/FileAccess.cxx @@ -263,8 +263,8 @@ void OFileAccess::transferImpl( const OUString& rSource, { (void)aDestPath.transferContent(aSrc, bMoveData - ? ucbhelper::InsertOperation_MOVE - : ucbhelper::InsertOperation_COPY, + ? ucbhelper::InsertOperation::Move + : ucbhelper::InsertOperation::Copy, aName, css::ucb::NameClash::OVERWRITE); } diff --git a/ucbhelper/source/client/content.cxx b/ucbhelper/source/client/content.cxx index 34d6124eae2a..f25f56d4e1b2 100644 --- a/ucbhelper/source/client/content.cxx +++ b/ucbhelper/source/client/content.cxx @@ -956,19 +956,15 @@ bool Content::transferContent( const Content& rSourceContent, bool bCheckIn = false; switch ( eOperation ) { - case InsertOperation_COPY: + case InsertOperation::Copy: eTransOp = TransferCommandOperation_COPY; break; - case InsertOperation_MOVE: + case InsertOperation::Move: eTransOp = TransferCommandOperation_MOVE; break; - case InsertOperation_LINK: - eTransOp = TransferCommandOperation_LINK; - break; - - case InsertOperation_CHECKIN: + case InsertOperation::Checkin: eTransOp = TransferCommandOperation_COPY; sCommand = "checkin"; bCheckIn = true; |