summaryrefslogtreecommitdiff
path: root/sfx2/source/doc/objstor.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/doc/objstor.cxx')
-rw-r--r--sfx2/source/doc/objstor.cxx110
1 files changed, 55 insertions, 55 deletions
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 2c5850e3300a..e9bb92a45352 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -260,7 +260,7 @@ bool SfxObjectShell::PutURLContentsToVersionStream_Impl(
catch( uno::Exception& )
{
// TODO/LATER: handle the error depending on exception
- SetError( ERRCODE_IO_GENERAL, OUString( OSL_LOG_PREFIX ) );
+ SetError( ERRCODE_IO_GENERAL, OSL_LOG_PREFIX );
}
return bResult;
@@ -292,7 +292,7 @@ OUString SfxObjectShell::CreateTempCopyOfStorage_Impl( const uno::Reference< emb
aTempURL.clear();
// TODO/LATER: may need error code setting based on exception
- SetError( ERRCODE_IO_GENERAL, OUString( OSL_LOG_PREFIX ) );
+ SetError( ERRCODE_IO_GENERAL, OSL_LOG_PREFIX );
}
}
@@ -366,7 +366,7 @@ void SfxObjectShell::SetupStorage( const uno::Reference< embed::XStorage >& xSto
}
catch( uno::Exception& )
{
- const_cast<SfxObjectShell*>( this )->SetError( ERRCODE_IO_GENERAL, OUString( OSL_LOG_PREFIX ) );
+ const_cast<SfxObjectShell*>( this )->SetError( ERRCODE_IO_GENERAL, OSL_LOG_PREFIX );
}
SvtSaveOptions::ODFDefaultVersion nDefVersion = SvtSaveOptions::ODFVER_012;
@@ -419,7 +419,7 @@ void SfxObjectShell::SetupStorage( const uno::Reference< embed::XStorage >& xSto
}
catch( uno::Exception& )
{
- const_cast<SfxObjectShell*>( this )->SetError( ERRCODE_IO_GENERAL, OUString( OSL_LOG_PREFIX ) );
+ const_cast<SfxObjectShell*>( this )->SetError( ERRCODE_IO_GENERAL, OSL_LOG_PREFIX );
}
}
@@ -457,7 +457,7 @@ bool SfxObjectShell::GeneralInit_Impl( const uno::Reference< embed::XStorage >&
{
if ( bTypeMustBeSetAlready )
{
- SetError( ERRCODE_IO_BROKENPACKAGE, OUString( OSL_LOG_PREFIX ) );
+ SetError( ERRCODE_IO_BROKENPACKAGE, OSL_LOG_PREFIX );
return false;
}
@@ -671,7 +671,7 @@ bool SfxObjectShell::DoLoad( SfxMedium *pMed )
{
sal_uInt32 nError = HandleFilter( pMedium, this );
if ( nError != ERRCODE_NONE )
- SetError( nError, OUString( OSL_LOG_PREFIX ) );
+ SetError( nError, OSL_LOG_PREFIX );
if (pMedium->GetFilter()->GetFilterFlags() & SfxFilterFlags::STARTPRESENTATION)
pSet->Put( SfxBoolItem( SID_DOC_STARTPRESENTATION, true) );
@@ -711,12 +711,12 @@ bool SfxObjectShell::DoLoad( SfxMedium *pMed )
}
if ( bWarnMediaTypeFallback || !xStorage->getElementNames().getLength() )
- SetError( ERRCODE_IO_BROKENPACKAGE, OUString( OSL_LOG_PREFIX ) );
+ SetError( ERRCODE_IO_BROKENPACKAGE, OSL_LOG_PREFIX );
}
catch( uno::Exception& )
{
// TODO/LATER: may need error code setting based on exception
- SetError( ERRCODE_IO_GENERAL, OUString( OSL_LOG_PREFIX ) );
+ SetError( ERRCODE_IO_GENERAL, OSL_LOG_PREFIX );
}
// Load
@@ -733,11 +733,11 @@ bool SfxObjectShell::DoLoad( SfxMedium *pMed )
bHasName = true;
}
else
- SetError( ERRCODE_ABORT, OUString( OSL_LOG_PREFIX ) );
+ SetError( ERRCODE_ABORT, OSL_LOG_PREFIX );
}
}
else
- SetError( pMed->GetLastStorageCreationState(), OUString( OSL_LOG_PREFIX ) );
+ SetError( pMed->GetLastStorageCreationState(), OSL_LOG_PREFIX );
}
else if ( GetError() == ERRCODE_NONE && InitNew(0) )
{
@@ -1022,7 +1022,7 @@ bool SfxObjectShell::DoSave()
}
catch( uno::Exception& )
{
- SetError( ERRCODE_IO_GENERAL, OUString( OSL_LOG_PREFIX ) );
+ SetError( ERRCODE_IO_GENERAL, OSL_LOG_PREFIX );
}
DBG_ASSERT( bOk, "The root storage must allow to set common password!\n" );
@@ -1062,7 +1062,7 @@ bool SfxObjectShell::DoSave()
}
catch( uno::Exception& )
{
- SetError( ERRCODE_IO_GENERAL, OUString( OSL_LOG_PREFIX ) );
+ SetError( ERRCODE_IO_GENERAL, OSL_LOG_PREFIX );
bOk = false;
}
}
@@ -1113,7 +1113,7 @@ bool SfxObjectShell::SaveTo_Impl
UpdateDocInfoForSave();
- AddLog( OUString( OSL_LOG_PREFIX "Begin" ) );
+ AddLog( OSL_LOG_PREFIX "Begin" );
ModifyBlocker_Impl aMod(this);
@@ -1136,7 +1136,7 @@ bool SfxObjectShell::SaveTo_Impl
// protected libraries exceed the size we can handler
if ( bOwnTarget && !QuerySaveSizeExceededModules_Impl( rMedium.GetInteractionHandler() ) )
{
- SetError( ERRCODE_IO_ABORT, OUString( OSL_LOG_PREFIX ) );
+ SetError( ERRCODE_IO_ABORT, OSL_LOG_PREFIX );
return false;
}
@@ -1153,7 +1153,7 @@ bool SfxObjectShell::SaveTo_Impl
|| pImp->nScriptingSignatureState == SignatureState::NOTVALIDATED
|| pImp->nScriptingSignatureState == SignatureState::INVALID ) )
{
- AddLog( OUString( OSL_LOG_PREFIX "MacroSignaturePreserving" ) );
+ AddLog( OSL_LOG_PREFIX "MacroSignaturePreserving" );
// the checking of the library modified state iterates over the libraries, should be done only when required
// currently the check is commented out since it is broken, we have to check the signature every time we save
@@ -1199,7 +1199,7 @@ bool SfxObjectShell::SaveTo_Impl
&& ::utl::UCBContentHelper::EqualURLs( pMedium->GetName(), rMedium.GetName() ) )
{
bStoreToSameLocation = true;
- AddLog( OUString( OSL_LOG_PREFIX "Save" ) );
+ AddLog( OSL_LOG_PREFIX "Save" );
if ( pMedium->DocNeedsFileDateCheck() )
rMedium.CheckFileDate( pMedium->GetInitFileDate( false ) );
@@ -1207,7 +1207,7 @@ bool SfxObjectShell::SaveTo_Impl
if ( bCopyTo && GetCreateMode() != SfxObjectCreateMode::EMBEDDED )
{
// export to the same location is forbidden
- SetError( ERRCODE_IO_CANTWRITE, OUString( OSL_LOG_PREFIX ) );
+ SetError( ERRCODE_IO_CANTWRITE, OSL_LOG_PREFIX );
}
else
{
@@ -1216,11 +1216,11 @@ bool SfxObjectShell::SaveTo_Impl
const bool bDoBackup = SvtSaveOptions().IsBackup();
if ( bDoBackup )
{
- AddLog( OUString( OSL_LOG_PREFIX "DoBackup" ) );
+ AddLog( OSL_LOG_PREFIX "DoBackup" );
rMedium.DoBackup_Impl();
if ( rMedium.GetError() )
{
- SetError( rMedium.GetErrorCode(), OUString( OSL_LOG_PREFIX ) );
+ SetError( rMedium.GetErrorCode(), OSL_LOG_PREFIX );
rMedium.ResetError();
}
}
@@ -1244,7 +1244,7 @@ bool SfxObjectShell::SaveTo_Impl
// if the last step is failed the stream should stay to be transacted and should be committed on any flush
// so we can forget the stream in any way and the next storage commit will flush it
- AddLog( OUString( OSL_LOG_PREFIX "Save: Own to Own" ) );
+ AddLog( OSL_LOG_PREFIX "Save: Own to Own" );
bNeedsDisconnectionOnFail = DisconnectStorage_Impl(
*pMedium, rMedium );
@@ -1267,7 +1267,7 @@ bool SfxObjectShell::SaveTo_Impl
// just disconnect the stream from the source format
// so that the target medium can use it
- AddLog( OUString( OSL_LOG_PREFIX "Save: Alien to Alien" ) );
+ AddLog( OSL_LOG_PREFIX "Save: Alien to Alien" );
pMedium->CloseAndRelease();
rMedium.CloseAndRelease();
@@ -1280,7 +1280,7 @@ bool SfxObjectShell::SaveTo_Impl
// format is an own one so just disconnect the source
// medium
- AddLog( OUString( OSL_LOG_PREFIX "Save: Alien to Own" ) );
+ AddLog( OSL_LOG_PREFIX "Save: Alien to Own" );
pMedium->CloseAndRelease();
rMedium.CloseAndRelease();
@@ -1292,7 +1292,7 @@ bool SfxObjectShell::SaveTo_Impl
// an alien format, just connect the source to temporary
// storage
- AddLog( OUString( OSL_LOG_PREFIX "Save: Own to Alien" ) );
+ AddLog( OSL_LOG_PREFIX "Save: Own to Alien" );
bNeedsDisconnectionOnFail = DisconnectStorage_Impl(
*pMedium, rMedium );
@@ -1314,7 +1314,7 @@ bool SfxObjectShell::SaveTo_Impl
// but for now the framework has to be ready for it
// TODO/LATER: let the medium be prepared for alien formats as well
- AddLog( OUString( OSL_LOG_PREFIX "SaveAs/Export" ) );
+ AddLog( OSL_LOG_PREFIX "SaveAs/Export" );
rMedium.CloseAndRelease();
if ( bStorageBasedTarget )
@@ -1327,7 +1327,7 @@ bool SfxObjectShell::SaveTo_Impl
if( rMedium.GetErrorCode() || pMedium->GetErrorCode() || GetErrorCode() )
return false;
- AddLog( OUString( OSL_LOG_PREFIX "Locking" ) );
+ AddLog( OSL_LOG_PREFIX "Locking" );
rMedium.LockOrigFileOnDemand( false, false );
@@ -1380,14 +1380,14 @@ bool SfxObjectShell::SaveTo_Impl
// TODO/LATER: get rid of bOk
if (bOwnTarget && pFilter && !(pFilter->GetFilterFlags() & SfxFilterFlags::STARONEFILTER))
{
- AddLog( OUString( OSL_LOG_PREFIX "Storing in own format." ) );
+ AddLog( OSL_LOG_PREFIX "Storing in own format." );
uno::Reference< embed::XStorage > xMedStorage = rMedium.GetStorage();
if ( !xMedStorage.is() )
{
// no saving without storage, unlock UI and return
Lock_Impl( this, false );
pImp->bForbidReload = bOldStat;
- AddLog( OUString( OSL_LOG_PREFIX "Storing failed, still no error set." ) );
+ AddLog( OSL_LOG_PREFIX "Storing failed, still no error set." );
return false;
}
@@ -1404,7 +1404,7 @@ bool SfxObjectShell::SaveTo_Impl
catch( uno::Exception& )
{
SAL_WARN( "sfx.doc", "Setting of common encryption key failed!" );
- SetError( ERRCODE_IO_GENERAL, OUString( OSL_LOG_PREFIX ) );
+ SetError( ERRCODE_IO_GENERAL, OSL_LOG_PREFIX );
}
}
else
@@ -1422,18 +1422,18 @@ bool SfxObjectShell::SaveTo_Impl
if ( xMedStorage == GetStorage() )
{
OSL_ENSURE( !pVersionItem, "This scenario is impossible currently!\n" );
- AddLog( OUString( OSL_LOG_PREFIX "Should be impossible." ) );
+ AddLog( OSL_LOG_PREFIX "Should be impossible." );
// usual save procedure
bOk = Save();
}
else
{
// save to target
- AddLog( OUString( OSL_LOG_PREFIX "Save as own format." ) );
+ AddLog( OSL_LOG_PREFIX "Save as own format." );
bOk = SaveAsOwnFormat( rMedium );
if ( bOk && pVersionItem )
{
- AddLog( OUString( OSL_LOG_PREFIX "pVersionItem != NULL" ) );
+ AddLog( OSL_LOG_PREFIX "pVersionItem != NULL" );
aTmpVersionURL = CreateTempCopyOfStorage_Impl( xMedStorage );
bOk = !aTmpVersionURL.isEmpty();
}
@@ -1446,7 +1446,7 @@ bool SfxObjectShell::SaveTo_Impl
{
// store the thumbnail representation image
// the thumbnail is not stored in case of encrypted document
- AddLog( OUString( OSL_LOG_PREFIX "Thumbnail creation." ) );
+ AddLog( OSL_LOG_PREFIX "Thumbnail creation." );
if ( !GenerateAndStoreThumbnail( bPasswdProvided,
pFilter->IsOwnTemplateFormat(),
xMedStorage ) )
@@ -1460,7 +1460,7 @@ bool SfxObjectShell::SaveTo_Impl
{
if ( pImp->bIsSaving || pImp->bPreserveVersions )
{
- AddLog( OUString( OSL_LOG_PREFIX "Preserve versions." ) );
+ AddLog( OSL_LOG_PREFIX "Preserve versions." );
try
{
Sequence < util::RevisionTag > aVersions = rMedium.GetVersionList();
@@ -1490,7 +1490,7 @@ bool SfxObjectShell::SaveTo_Impl
}
catch( uno::Exception& )
{
- AddLog( OUString( OSL_LOG_PREFIX "Preserve versions has failed." ) );
+ AddLog( OSL_LOG_PREFIX "Preserve versions has failed." );
SAL_WARN( "sfx.doc", "Couldn't copy versions!" );
bOk = false;
// TODO/LATER: a specific error could be set
@@ -1541,7 +1541,7 @@ bool SfxObjectShell::SaveTo_Impl
}
else
{
- AddLog( OUString( OSL_LOG_PREFIX "Storing in alien format." ) );
+ AddLog( OSL_LOG_PREFIX "Storing in alien format." );
// it's a "SaveAs" in an alien format
if ( rMedium.GetFilter() && ( rMedium.GetFilter()->GetFilterFlags() & SfxFilterFlags::STARONEFILTER ) )
bOk = ExportTo( rMedium );
@@ -1570,7 +1570,7 @@ bool SfxObjectShell::SaveTo_Impl
uno::Reference< security::XDocumentDigitalSignatures > xDDSigns;
if ( bOk && bTryToPreserveScriptSignature )
{
- AddLog( OUString( OSL_LOG_PREFIX "Copying scripting signature." ) );
+ AddLog( OSL_LOG_PREFIX "Copying scripting signature." );
// if the scripting code was not changed and it is signed the signature should be preserved
// unfortunately at this point we have only information whether the basic code has changed or not
@@ -1657,7 +1657,7 @@ bool SfxObjectShell::SaveTo_Impl
rMedium.CloseZipStorage_Impl();
}
- AddLog( OUString( OSL_LOG_PREFIX "Medium commit." ) );
+ AddLog( OSL_LOG_PREFIX "Medium commit." );
OUString sName( rMedium.GetName( ) );
bOk = rMedium.Commit();
@@ -1668,7 +1668,7 @@ bool SfxObjectShell::SaveTo_Impl
if ( bOk )
{
- AddLog( OUString( OSL_LOG_PREFIX "Storing is successful." ) );
+ AddLog( OSL_LOG_PREFIX "Storing is successful." );
// if the target medium is an alien format and the "old" medium was an own format and the "old" medium
// has a name, the object storage must be exchanged, because now we need a new temporary storage
@@ -1689,7 +1689,7 @@ bool SfxObjectShell::SaveTo_Impl
// copy storage of old medium to new temporary storage and take this over
if( !ConnectTmpStorage_Impl( pMedium->GetStorage(), pMedium ) )
{
- AddLog( OUString( OSL_LOG_PREFIX "Process after storing has failed." ) );
+ AddLog( OSL_LOG_PREFIX "Process after storing has failed." );
bOk = false;
}
}
@@ -1697,7 +1697,7 @@ bool SfxObjectShell::SaveTo_Impl
}
else
{
- AddLog( OUString( OSL_LOG_PREFIX "Storing has failed." ) );
+ AddLog( OSL_LOG_PREFIX "Storing has failed." );
// in case the document storage was connected to backup temporarely it must be disconnected now
if ( bNeedsDisconnectionOnFail )
@@ -1881,7 +1881,7 @@ bool SfxObjectShell::ConnectTmpStorage_Impl(
if ( !bResult )
{
// TODO/LATER: may need error code setting based on exception
- SetError( ERRCODE_IO_GENERAL, OUString( OSL_LOG_PREFIX ) );
+ SetError( ERRCODE_IO_GENERAL, OSL_LOG_PREFIX );
}
}
@@ -1936,7 +1936,7 @@ bool SfxObjectShell::DoSaveAs( SfxMedium& rMedium )
{
// here only root storages are included, which are stored via temp file
rMedium.CreateTempFileNoCopy();
- SetError(rMedium.GetErrorCode(), OUString( OSL_LOG_PREFIX ) );
+ SetError(rMedium.GetErrorCode(), OSL_LOG_PREFIX );
if ( GetError() )
return false;
@@ -1946,7 +1946,7 @@ bool SfxObjectShell::DoSaveAs( SfxMedium& rMedium )
bool bRet = SaveTo_Impl( rMedium, NULL );
if ( !bRet )
- SetError(rMedium.GetErrorCode(), OUString( OSL_LOG_PREFIX ) );
+ SetError(rMedium.GetErrorCode(), OSL_LOG_PREFIX );
return bRet;
}
@@ -2514,7 +2514,7 @@ bool SfxObjectShell::DoSave_Impl( const SfxItemSet* pArgs )
pMediumTmp->SetLongName( pRetrMedium->GetLongName() );
if ( pMediumTmp->GetErrorCode() != ERRCODE_NONE )
{
- SetError( pMediumTmp->GetError(), OUString( OSL_LOG_PREFIX ) );
+ SetError( pMediumTmp->GetError(), OSL_LOG_PREFIX );
delete pMediumTmp;
return false;
}
@@ -2540,7 +2540,7 @@ bool SfxObjectShell::DoSave_Impl( const SfxItemSet* pArgs )
pMediumTmp->GetItemSet()->ClearItem( SID_PROGRESS_STATUSBAR_CONTROL );
}
- SetError(pMediumTmp->GetErrorCode(), OUString( OSL_LOG_PREFIX ) );
+ SetError(pMediumTmp->GetErrorCode(), OSL_LOG_PREFIX );
bool bOpen( false );
bOpen = DoSaveCompleted( pMediumTmp );
@@ -2551,7 +2551,7 @@ bool SfxObjectShell::DoSave_Impl( const SfxItemSet* pArgs )
else
{
// transfer error code from medium to objectshell
- SetError( pMediumTmp->GetError(), OUString( OSL_LOG_PREFIX ) );
+ SetError( pMediumTmp->GetError(), OSL_LOG_PREFIX );
// reconnect to object storage
DoSaveCompleted();
@@ -2575,7 +2575,7 @@ bool SfxObjectShell::Save_Impl( const SfxItemSet* pSet )
{
if ( IsReadOnly() )
{
- SetError( ERRCODE_SFX_DOCUMENTREADONLY, OUString( OSL_LOG_PREFIX ) );
+ SetError( ERRCODE_SFX_DOCUMENTREADONLY, OSL_LOG_PREFIX );
return false;
}
@@ -2613,7 +2613,7 @@ bool SfxObjectShell::CommonSaveAs_Impl(const INetURLObject& aURL, const OUString
{
if( aURL.HasError() )
{
- SetError( ERRCODE_IO_INVALIDPARAMETER, OUString( OSL_LOG_PREFIX ) );
+ SetError( ERRCODE_IO_INVALIDPARAMETER, OSL_LOG_PREFIX );
return false;
}
@@ -2635,7 +2635,7 @@ bool SfxObjectShell::CommonSaveAs_Impl(const INetURLObject& aURL, const OUString
if ( pDoc )
{
// Then error message: "already opened"
- SetError(ERRCODE_SFX_ALREADYOPEN, OUString( OSL_LOG_PREFIX ));
+ SetError(ERRCODE_SFX_ALREADYOPEN, OSL_LOG_PREFIX);
return false;
}
}
@@ -2651,7 +2651,7 @@ bool SfxObjectShell::CommonSaveAs_Impl(const INetURLObject& aURL, const OUString
|| !pFilter->CanExport()
|| (!bSaveTo && !pFilter->CanImport()) )
{
- SetError( ERRCODE_IO_INVALIDPARAMETER, OUString( OSL_LOG_PREFIX ) );
+ SetError( ERRCODE_IO_INVALIDPARAMETER, OSL_LOG_PREFIX );
return false;
}
@@ -2673,7 +2673,7 @@ bool SfxObjectShell::CommonSaveAs_Impl(const INetURLObject& aURL, const OUString
if ( aURL == aActName && aURL != INetURLObject( OUString("private:stream") )
&& IsReadOnly() )
{
- SetError(ERRCODE_SFX_DOCUMENTREADONLY, OUString( OSL_LOG_PREFIX ));
+ SetError(ERRCODE_SFX_DOCUMENTREADONLY, OSL_LOG_PREFIX);
return false;
}
@@ -2796,7 +2796,7 @@ bool SfxObjectShell::PreDoSaveAs_Impl(const OUString& rFileName, const OUString&
if ( pNewFile->GetErrorCode() != ERRCODE_NONE )
{
// creating temporary file failed ( f.e. floppy disk not inserted! )
- SetError( pNewFile->GetError(), OUString( OSL_LOG_PREFIX ) );
+ SetError( pNewFile->GetError(), OSL_LOG_PREFIX );
delete pNewFile;
return false;
}
@@ -2817,7 +2817,7 @@ bool SfxObjectShell::PreDoSaveAs_Impl(const OUString& rFileName, const OUString&
if ( !pNewFile->GetErrorCode() && SaveTo_Impl( *pNewFile, NULL ) )
{
// transfer a possible error from the medium to the document
- SetError( pNewFile->GetErrorCode(), OUString( OSL_LOG_PREFIX ) );
+ SetError( pNewFile->GetErrorCode(), OSL_LOG_PREFIX );
// notify the document that saving was done successfully
if ( !bCopyTo )
@@ -2838,7 +2838,7 @@ bool SfxObjectShell::PreDoSaveAs_Impl(const OUString& rFileName, const OUString&
// and the DoSaveCompleted call should not be able to fail in general
DBG_ASSERT( !bCopyTo, "Error while reconnecting to medium, can't be handled!");
- SetError( pNewFile->GetErrorCode(), OUString( OSL_LOG_PREFIX ) );
+ SetError( pNewFile->GetErrorCode(), OSL_LOG_PREFIX );
if ( !bCopyTo )
{
@@ -2857,7 +2857,7 @@ bool SfxObjectShell::PreDoSaveAs_Impl(const OUString& rFileName, const OUString&
}
else
{
- SetError( pNewFile->GetErrorCode(), OUString( OSL_LOG_PREFIX ) );
+ SetError( pNewFile->GetErrorCode(), OSL_LOG_PREFIX );
// reconnect to the old storage
DoSaveCompleted();