summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorRadu Ioan <ioan.radu.g@gmail.com>2013-06-01 22:28:05 +0300
committerMiklos Vajna <vmiklos@suse.cz>2013-06-10 08:41:50 +0000
commitdb979ee28a360d1222ddc8a67b929434c0c51255 (patch)
treebef8791a1004782187d826e5c99bb0f3887e97a1 /sfx2
parentdcfefd6676d8cf8930424724a509cce0d3612962 (diff)
fdo#63690 - replace RTL_CONTEXT_ macros with SAL_INFO
- replaced RTL_CONTEXT_ with SAL_INFO - replace OSL_* with SAL_* Change-Id: I9a7cce0d3abef42c9d9d0ad56609d94d504854cb Reviewed-on: https://gerrit.libreoffice.org/4128 Reviewed-by: Miklos Vajna <vmiklos@suse.cz> Tested-by: Miklos Vajna <vmiklos@suse.cz>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/app.cxx15
-rw-r--r--sfx2/source/appl/appinit.cxx3
-rw-r--r--sfx2/source/bastyp/fltfnc.cxx9
-rw-r--r--sfx2/source/doc/docfile.cxx44
-rw-r--r--sfx2/source/doc/objstor.cxx67
-rw-r--r--sfx2/source/view/frmload.cxx5
6 files changed, 63 insertions, 80 deletions
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index b973bc41ea97..78c317c04d2d 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -63,7 +63,6 @@
#include <basic/basmgr.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <vcl/svapp.hxx>
-#include <rtl/logfile.hxx>
#include <sfx2/appuno.hxx>
#include "sfx2/sfxhelp.hxx"
#include <sfx2/request.hxx>
@@ -149,7 +148,7 @@ SfxApplication* SfxApplication::GetOrCreate()
::osl::MutexGuard aGuard(theApplicationMutex::get());
if (!pApp)
{
- RTL_LOGFILE_CONTEXT( aLog, "sfx2 (mb93783) ::SfxApplication::SetApp" );
+ SAL_INFO( "sfx2.appl", "sfx2 (mb93783) ::SfxApplication::SetApp" );
pApp = new SfxApplication;
@@ -183,7 +182,7 @@ SfxApplication* SfxApplication::GetOrCreate()
SfxApplication::SfxApplication()
: pAppData_Impl( 0 )
{
- RTL_LOGFILE_CONTEXT( aLog, "sfx2 (mb93783) ::SfxApplication::SfxApplication" );
+ SAL_INFO( "sfx2.appl", "sfx2 (mb93783) ::SfxApplication::SfxApplication" );
SetName( OUString("StarOffice") );
SvtViewOptions::AcquireOptions();
@@ -191,7 +190,7 @@ SfxApplication::SfxApplication()
pAppData_Impl = new SfxAppData_Impl( this );
pAppData_Impl->m_xImeStatusWindow->init();
- RTL_LOGFILE_CONTEXT_TRACE( aLog, "{ initialize DDE" );
+ SAL_INFO( "sfx2.appl", "{ initialize DDE" );
sal_Bool bOk = InitializeDde();
@@ -218,7 +217,7 @@ SfxApplication::SfxApplication()
pBasic = new BasicDLL;
StarBASIC::SetGlobalErrorHdl( LINK( this, SfxApplication, GlobalBasicErrorHdl_Impl ) );
#endif
- RTL_LOGFILE_CONTEXT_TRACE( aLog, "} initialize DDE" );
+ SAL_INFO( "sfx2.appl", "} initialize DDE" );
}
SfxApplication::~SfxApplication()
@@ -571,7 +570,7 @@ SfxApplication::ChooseScript()
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
if ( pFact )
{
- OSL_TRACE("create selector dialog");
+ SAL_INFO( "sfx2.appl", "create selector dialog");
const SfxViewFrame* pViewFrame = SfxViewFrame::Current();
const SfxFrame* pFrame = pViewFrame ? &pViewFrame->GetFrame() : NULL;
@@ -580,11 +579,11 @@ SfxApplication::ChooseScript()
AbstractScriptSelectorDialog* pDlg =
pFact->CreateScriptSelectorDialog( NULL, sal_False, xFrame );
- OSL_TRACE("done, now exec it");
+ SAL_INFO( "sfx2.appl", "done, now exec it");
sal_uInt16 nRet = pDlg->Execute();
- OSL_TRACE("has returned");
+ SAL_INFO( "sfx2.appl", "has returned");
if ( nRet == RET_OK )
{
diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx
index 2a85ac9c6189..695154b7f681 100644
--- a/sfx2/source/appl/appinit.cxx
+++ b/sfx2/source/appl/appinit.cxx
@@ -43,7 +43,6 @@
#include <unotools/moduleoptions.hxx>
#include <cppuhelper/implbase2.hxx>
-#include <rtl/logfile.hxx>
#include <vcl/edit.hxx>
#include <sfx2/unoctitm.hxx>
@@ -209,7 +208,7 @@ String GetSpecialCharsForEdit(Window* pParent, const Font& rFont)
bool SfxApplication::Initialize_Impl()
{
- RTL_LOGFILE_CONTEXT( aLog, "sfx2 (mb93783) ::SfxApplication::Initialize_Impl" );
+ SAL_INFO( "sfx2.appl", "sfx2 (mb93783) ::SfxApplication::Initialize_Impl" );
#ifdef TLX_VALIDATE
StgIo::SetErrorLink( LINK( this, SfxStorageErrHdl, Error ) );
diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx
index 42477d09916f..12ea5060bed7 100644
--- a/sfx2/source/bastyp/fltfnc.cxx
+++ b/sfx2/source/bastyp/fltfnc.cxx
@@ -76,7 +76,6 @@
#include <comphelper/mediadescriptor.hxx>
#include <tools/urlobj.hxx>
-#include <rtl/logfile.hxx>
#include <rtl/instance.hxx>
#include <svl/ctypeitm.hxx>
@@ -792,7 +791,7 @@ const SfxFilter* SfxFilterMatcher::GetFilter4FilterName( const String& rName, Sf
sal_uInt16 nIndex = aName.SearchAscii(": ");
if ( nIndex != STRING_NOTFOUND )
{
- OSL_FAIL("Old filter name used!");
+ SAL_WARN( "sfx2.bastyp", "Old filter name used!");
aName = rName.Copy( nIndex + 2 );
}
@@ -1074,7 +1073,7 @@ void SfxFilterContainer::ReadSingleFilter_Impl(
sal_Int32 nStartRealName = sFilterName.indexOf( ": ", 0 );
if( nStartRealName != -1 )
{
- OSL_FAIL("Old format, not supported!");
+ SAL_WARN( "sfx2.bastyp", "Old format, not supported!");
sFilterName = sFilterName.copy( nStartRealName+2 );
}
@@ -1123,7 +1122,7 @@ void SfxFilterContainer::ReadSingleFilter_Impl(
void SfxFilterContainer::ReadFilters_Impl( sal_Bool bUpdate )
{
- RTL_LOGFILE_CONTEXT( aMeasure, "sfx2 (as96863) ::SfxFilterContainer::ReadFilters" );
+ SAL_INFO( "sfx2.bastyp", "sfx2 (as96863) ::SfxFilterContainer::ReadFilters" );
if ( !pFilterArr )
CreateFilterArr();
@@ -1181,7 +1180,7 @@ void SfxFilterContainer::ReadFilters_Impl( sal_Bool bUpdate )
}
catch(const uno::Exception&)
{
- DBG_ASSERT( sal_False, "SfxFilterContainer::ReadFilter()\nException detected. Possible not all filters could be cached.\n" );
+ SAL_WARN( "sfx2.bastyp", "SfxFilterContainer::ReadFilter()\nException detected. Possible not all filters could be cached.\n" );
}
if ( bUpdate )
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 0c8457f01b9c..543e8e8ccb1c 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -84,7 +84,6 @@
#include <unotools/streamwrap.hxx>
-#include <rtl/logfile.hxx>
#include <osl/file.hxx>
#include <comphelper/storagehelper.hxx>
@@ -511,7 +510,7 @@ Reference < XContent > SfxMedium::GetContent() const
}
else
{
- // TODO: OSL_FAIL("SfxMedium::GetContent()\nCreate Content? This code exists as fallback only. Please clarify, why its used.");
+ // TODO: SAL_WARN( "sfx2.doc", "SfxMedium::GetContent()\nCreate Content? This code exists as fallback only. Please clarify, why its used.");
OUString aURL;
if ( !pImp->m_aName.isEmpty() )
::utl::LocalFileHelper::ConvertPhysicalNameToURL( pImp->m_aName, aURL );
@@ -754,7 +753,7 @@ sal_Bool SfxMedium::IsStorage()
OUString aURL;
if ( !::utl::LocalFileHelper::ConvertPhysicalNameToURL( pImp->m_aName, aURL ) )
{
- OSL_FAIL("Physical name not convertible!");
+ SAL_WARN( "sfx2.doc", "Physical name not convertible!");
}
pImp->bIsStorage = SotStorage::IsStorageFile( aURL ) && !SotStorage::IsOLEStorage( aURL);
if ( !pImp->bIsStorage )
@@ -865,7 +864,7 @@ void SfxMedium::SetEncryptionDataToStorage_Impl()
}
catch( const uno::Exception& )
{
- OSL_FAIL( "It must be possible to set a common password for the storage" );
+ SAL_WARN( "sfx2.doc", "It must be possible to set a common password for the storage" );
// TODO/LATER: set the error code in case of problem
// SetError( ERRCODE_IO_GENERAL, OUString( OSL_LOG_PREFIX ) );
}
@@ -1237,7 +1236,7 @@ bool SfxMedium::LockOrigFileOnDemand( sal_Bool bLoading, sal_Bool bNoUI )
}
catch( const uno::Exception& )
{
- OSL_FAIL( "Locking exception: high probability, that the content has not been created" );
+ SAL_WARN( "sfx2.doc", "Locking exception: high probability, that the content has not been created" );
}
return bResult;
#endif
@@ -1432,7 +1431,7 @@ uno::Reference< embed::XStorage > SfxMedium::GetZipStorageToSign_Impl( sal_Bool
}
catch( const uno::Exception& )
{
- OSL_FAIL( "No possibility to get readonly version of storage from medium!\n" );
+ SAL_WARN( "sfx2.doc", "No possibility to get readonly version of storage from medium!" );
}
if ( GetError() ) // do not remove warnings
@@ -1468,7 +1467,7 @@ void SfxMedium::CloseStorage()
xComp->dispose();
} catch( const uno::Exception& )
{
- OSL_FAIL( "Medium's storage is already disposed!\n" );
+ SAL_WARN( "sfx2.doc", "Medium's storage is already disposed!" );
}
}
@@ -1800,12 +1799,12 @@ void SfxMedium::Transfer_Impl()
{
// makes sence only in case logic name is set
if ( !::utl::LocalFileHelper::ConvertPhysicalNameToURL( pImp->m_aName, aNameURL ) )
- OSL_FAIL( "The medium name is not convertible!\n" );
+ SAL_WARN( "sfx2.doc", "The medium name is not convertible!" );
}
if ( !aNameURL.isEmpty() && ( !pImp->m_eError || (pImp->m_eError & ERRCODE_WARNING_MASK) ) )
{
- RTL_LOGFILE_CONTEXT( aLog, "sfx2 (mv76033) SfxMedium::Transfer_Impl, copying to target" );
+ SAL_INFO( "sfx2.doc", "sfx2 (mv76033) SfxMedium::Transfer_Impl, copying to target" );
Reference < ::com::sun::star::ucb::XCommandEnvironment > xEnv;
Reference< XOutputStream > rOutStream;
@@ -1861,7 +1860,7 @@ void SfxMedium::Transfer_Impl()
}
else
{
- OSL_FAIL( "Illegal Output stream parameter!\n" );
+ SAL_WARN( "sfx2.doc", "Illegal Output stream parameter!" );
SetError( ERRCODE_IO_GENERAL, OUString( OSL_LOG_PREFIX ) );
}
@@ -1934,8 +1933,7 @@ void SfxMedium::Transfer_Impl()
if ( aFile.open( osl_File_OpenFlag_Write ) == osl::FileBase::E_None )
{
aFile.sync();
- OSL_TRACE("fsync'd saved file '%s'\n",
- OUStringToOString( aDestURL, RTL_TEXTENCODING_UTF8 ).getStr() );
+ SAL_INFO( "sfx2.doc", "fsync'd saved file '" << aDestURL << "'" );
aFile.close();
}
}
@@ -2089,7 +2087,7 @@ void SfxMedium::DoInternalBackup_Impl( const ::ucbhelper::Content& aOriginalCont
const String& aExtension,
const String& aDestDir )
{
- RTL_LOGFILE_CONTEXT( aLog, "sfx2 (mv76033) SfxMedium::DoInternalBackup_Impl( with destdir )" );
+ SAL_INFO( "sfx2.doc", "sfx2 (mv76033) SfxMedium::DoInternalBackup_Impl( with destdir )" );
if ( !pImp->m_aBackupURL.isEmpty() )
return; // the backup was done already
@@ -2161,7 +2159,7 @@ void SfxMedium::DoInternalBackup_Impl( const ::ucbhelper::Content& aOriginalCont
//------------------------------------------------------------------
void SfxMedium::DoBackup_Impl()
{
- RTL_LOGFILE_CONTEXT( aLog, "sfx2 (mv76033) SfxMedium::DoBackup_Impl" );
+ SAL_INFO( "sfx2.doc", "sfx2 (mv76033) SfxMedium::DoBackup_Impl" );
// source file name is the logical name of this medium
INetURLObject aSource( GetURLObject() );
@@ -2236,7 +2234,7 @@ void SfxMedium::ClearBackup_Impl()
else
{
- OSL_FAIL("Couldn't remove backup file!");
+ SAL_WARN( "sfx2.doc", "Couldn't remove backup file!");
}
}
}
@@ -2316,7 +2314,7 @@ void SfxMedium::GetMedium_Impl()
{
if ( !::utl::LocalFileHelper::ConvertPhysicalNameToURL( pImp->m_aName, aFileName ) )
{
- OSL_FAIL("Physical name not convertible!");
+ SAL_WARN( "sfx2.doc", "Physical name not convertible!");
}
}
else
@@ -2482,7 +2480,7 @@ void SfxMedium::Init_Impl()
INetProtocol eProt = aUrl.GetProtocol();
if ( eProt == INET_PROT_NOT_VALID )
{
- OSL_FAIL( "Unknown protocol!" );
+ SAL_WARN( "sfx2.doc", "Unknown protocol!" );
}
else
{
@@ -2518,7 +2516,7 @@ void SfxMedium::Init_Impl()
|| !pImp->m_aLogicName.startsWith("private:stream")) )
{
pImp->m_pSet->ClearItem( SID_OUTPUTSTREAM );
- OSL_FAIL( "Unexpected Output stream parameter!\n" );
+ SAL_WARN( "sfx2.doc", "Unexpected Output stream parameter!\n" );
}
if (!pImp->m_aLogicName.isEmpty())
@@ -2913,7 +2911,7 @@ SfxMedium::SfxMedium( const uno::Sequence<beans::PropertyValue>& aArgs ) :
}
else
{
- OSL_FAIL( "Can not create a new temporary file for crash recovery!\n" );
+ SAL_WARN( "sfx2.doc", "Can not create a new temporary file for crash recovery!\n" );
}
}
}
@@ -2981,12 +2979,12 @@ SfxMedium::~SfxMedium()
OUString aTemp;
if ( !::utl::LocalFileHelper::ConvertPhysicalNameToURL( pImp->m_aName, aTemp ))
{
- OSL_FAIL("Physical name not convertible!");
+ SAL_WARN( "sfx2.doc", "Physical name not convertible!");
}
if ( !::utl::UCBContentHelper::Kill( aTemp ) )
{
- OSL_FAIL("Couldn't remove temporary file!");
+ SAL_WARN( "sfx2.doc", "Couldn't remove temporary file!");
}
}
@@ -3487,7 +3485,7 @@ sal_Bool SfxMedium::SignContents_Impl( sal_Bool bScriptingContent, const OUStrin
}
catch ( const uno::Exception& )
{
- OSL_FAIL( "Couldn't use signing functionality!\n" );
+ SAL_WARN( "sfx2.doc", "Couldn't use signing functionality!\n" );
}
CloseAndRelease();
@@ -3503,7 +3501,7 @@ sal_Bool SfxMedium::SignContents_Impl( sal_Bool bScriptingContent, const OUStrin
}
catch( const uno::Exception& )
{
- OSL_FAIL( "Couldn't use signing functionality!\n" );
+ SAL_WARN( "sfx2.doc", "Couldn't use signing functionality!\n" );
}
}
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 902b5386e7aa..29d9d2d44266 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -98,7 +98,6 @@
#include <comphelper/string.hxx>
#include <vcl/bitmapex.hxx>
#include <svtools/embedhlp.hxx>
-#include <rtl/logfile.hxx>
#include <basic/modsizeexceeded.hxx>
#include <osl/file.hxx>
@@ -158,7 +157,7 @@ void impl_addToModelCollection(const css::uno::Reference< css::frame::XModel >&
}
catch ( uno::Exception& )
{
- OSL_FAIL( "The document seems to be in the collection already!\n" );
+ SAL_WARN( "sfx2.doc", "The document seems to be in the collection already!\n" );
}
}
@@ -288,7 +287,7 @@ OUString SfxObjectShell::CreateTempCopyOfStorage_Impl( const uno::Reference< emb
}
catch ( uno::Exception& )
{
- OSL_FAIL( "Creation of a storage copy is failed!" );
+ SAL_WARN( "sfx2.doc", "Creation of a storage copy is failed!" );
::utl::UCBContentHelper::Kill( aTempURL );
aTempURL = OUString();
@@ -460,7 +459,7 @@ sal_Bool SfxObjectShell::GeneralInit_Impl( const uno::Reference< embed::XStorage
}
catch ( uno::Exception& )
{
- OSL_FAIL( "Can't check storage's mediatype!\n" );
+ SAL_WARN( "sfx2.doc", "Can't check storage's mediatype!" );
}
}
else
@@ -1103,13 +1102,8 @@ sal_Bool SfxObjectShell::SaveTo_Impl
*/
{
- RTL_LOGFILE_PRODUCT_CONTEXT( aLog, "PERFORMANCE SfxObjectShell::SaveTo_Impl" );
- if( RTL_LOGFILE_HASLOGFILE() )
- {
- OString aString(
- OUStringToOString(rMedium.GetName(), RTL_TEXTENCODING_ASCII_US));
- RTL_LOGFILE_PRODUCT_CONTEXT_TRACE1(aLog, "saving \"%s\"", aString.getStr());
- }
+ SAL_INFO( "sfx2.doc", "PERFORMANCE SfxObjectShell::SaveTo_Impl" );
+ SAL_INFO( "sfx2.doc", "saving \"" << rMedium.GetName() << "\"" );
AddLog( OUString( OSL_LOG_PREFIX "Begin" ) );
@@ -1120,7 +1114,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl
{
// if no filter was set, use the default filter
// this should be changed in the feature, it should be an error!
- OSL_FAIL("No filter set!");
+ SAL_WARN( "sfx2.doc","No filter set!");
pFilter = GetFactory().GetFilterContainer()->GetAnyFilter( SFX_FILTER_IMPORT | SFX_FILTER_EXPORT );
rMedium.SetFilter(pFilter);
}
@@ -1403,7 +1397,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl
}
catch( uno::Exception& )
{
- OSL_FAIL( "Setting of common encryption key failed!" );
+ SAL_WARN( "sfx2.doc", "Setting of common encryption key failed!" );
SetError( ERRCODE_IO_GENERAL, OUString( OSL_LOG_PREFIX ) );
}
}
@@ -1453,7 +1447,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl
xMedStorage ) )
{
// TODO: error handling
- OSL_FAIL( "Couldn't store thumbnail representation!" );
+ SAL_WARN( "sfx2.doc", "Couldn't store thumbnail representation!" );
}
}
@@ -1492,7 +1486,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl
catch( uno::Exception& )
{
AddLog( OUString( OSL_LOG_PREFIX "Preserve versions has failed." ) );
- OSL_FAIL( "Couldn't copy versions!\n" );
+ SAL_WARN( "sfx2.doc", "Couldn't copy versions!" );
bOk = sal_False;
// TODO/LATER: a specific error could be set
}
@@ -1646,7 +1640,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl
{
// it should not happen, the copies signature is invalid!
// throw the changes away
- OSL_FAIL( "An invalid signature was copied!" );
+ SAL_WARN( "sfx2.doc", "An invalid signature was copied!" );
}
}
}
@@ -1758,7 +1752,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl
//------------------------------------------------------------------------
sal_Bool SfxObjectShell::DisconnectStorage_Impl( SfxMedium& rSrcMedium, SfxMedium& rTargetMedium )
{
- RTL_LOGFILE_CONTEXT( aLog, "sfx2 (mv76033) SfxObjectShell::DisconnectStorage_Impl" );
+ SAL_INFO( "sfx2.doc", "sfx2 (mv76033) SfxObjectShell::DisconnectStorage_Impl" );
// this method disconnects the storage from source medium, and attaches it to the backup created by the target medium
@@ -1816,7 +1810,7 @@ sal_Bool SfxObjectShell::ConnectTmpStorage_Impl(
*/
{
- RTL_LOGFILE_CONTEXT( aLog, "sfx2 (mv76033) SfxObjectShell::ConnectTmpStorage_Impl" );
+ SAL_INFO( "sfx2.doc", "sfx2 (mv76033) SfxObjectShell::ConnectTmpStorage_Impl" );
sal_Bool bResult = sal_False;
@@ -1905,7 +1899,7 @@ sal_Bool SfxObjectShell::DoSaveObjectAs( SfxMedium& rMedium, sal_Bool bCommit )
OUString aMediaType;
if ( !(a>>=aMediaType) || aMediaType.isEmpty() )
{
- OSL_FAIL( "The mediatype must be set already!\n" );
+ SAL_WARN( "sfx2.doc", "The mediatype must be set already!" );
SetupStorage( xNewStor, SOFFICE_FILEFORMAT_CURRENT, sal_False, false );
}
@@ -1920,7 +1914,7 @@ sal_Bool SfxObjectShell::DoSaveObjectAs( SfxMedium& rMedium, sal_Bool bCommit )
}
catch( uno::Exception& )
{
- OSL_FAIL( "The strotage was not commited on DoSaveAs!\n" );
+ SAL_WARN( "sfx2.doc", "The strotage was not commited on DoSaveAs!" );
}
}
}
@@ -1953,7 +1947,7 @@ sal_Bool SfxObjectShell::DoSaveAs( SfxMedium& rMedium )
sal_Bool SfxObjectShell::DoSaveCompleted( SfxMedium* pNewMed )
{
- RTL_LOGFILE_CONTEXT( aLog, "sfx2 (mv76033) SfxObjectShell::DoSaveCompleted" );
+ SAL_INFO( "sfx2.doc", "sfx2 (mv76033) SfxObjectShell::DoSaveCompleted" );
sal_Bool bOk = sal_True;
sal_Bool bMedChanged = pNewMed && pNewMed!=pMedium;
@@ -2772,7 +2766,7 @@ sal_Bool SfxObjectShell::PreDoSaveAs_Impl
#ifdef DBG_UTIL
if ( pMergedParams->GetItemState( SID_DOC_SALVAGE) >= SFX_ITEM_SET )
- OSL_FAIL("Salvage item present in Itemset, check the parameters!");
+ SAL_WARN( "sfx2.doc","Salvage item present in Itemset, check the parameters!");
#endif
// should be unneccessary - too hot to handle!
@@ -2876,7 +2870,7 @@ sal_Bool SfxObjectShell::PreDoSaveAs_Impl
sal_Bool SfxObjectShell::LoadFrom( SfxMedium& /*rMedium*/ )
{
- OSL_FAIL( "Base implementation, must not be called in general!" );
+ SAL_WARN( "sfx2.doc", "Base implementation, must not be called in general!" );
return sal_True;
}
@@ -3026,13 +3020,8 @@ void SfxObjectShell::SetSecurityOptOpenReadOnly( sal_Bool _b )
sal_Bool SfxObjectShell::LoadOwnFormat( SfxMedium& rMedium )
{
- RTL_LOGFILE_PRODUCT_CONTEXT( aLog, "PERFORMANCE SfxObjectShell::LoadOwnFormat" );
- if( RTL_LOGFILE_HASLOGFILE() )
- {
- OString aString(
- OUStringToOString(rMedium.GetName(), RTL_TEXTENCODING_ASCII_US));
- RTL_LOGFILE_PRODUCT_CONTEXT_TRACE1(aLog, "loading \"%s\"", aString.getStr());
- }
+ SAL_INFO( "sfx2.doc", "PERFORMANCE SfxObjectShell::LoadOwnFormat" );
+ SAL_INFO( "sfx2.doc", "loading \" " << rMedium.GetName() << "\"" );
uno::Reference< embed::XStorage > xStorage = rMedium.GetStorage();
if ( xStorage.is() )
@@ -3123,7 +3112,7 @@ uno::Reference< embed::XStorage > SfxObjectShell::GetStorage()
sal_Bool SfxObjectShell::SaveChildren( sal_Bool bObjectsOnly )
{
- RTL_LOGFILE_CONTEXT( aLog, "sfx2 (mv76033) SfxObjectShell::SaveChildren" );
+ SAL_INFO( "sfx2.doc", "sfx2 (mv76033) SfxObjectShell::SaveChildren" );
sal_Bool bResult = sal_True;
if ( pImp->mpObjectContainer )
@@ -3137,7 +3126,7 @@ sal_Bool SfxObjectShell::SaveChildren( sal_Bool bObjectsOnly )
sal_Bool SfxObjectShell::SaveAsChildren( SfxMedium& rMedium )
{
- RTL_LOGFILE_CONTEXT( aLog, "sfx2 (mv76033) SfxObjectShell::SaveAsChildren" );
+ SAL_INFO( "sfx2.doc", "sfx2 (mv76033) SfxObjectShell::SaveAsChildren" );
sal_Bool bResult = sal_True;
@@ -3163,7 +3152,7 @@ sal_Bool SfxObjectShell::SaveAsChildren( SfxMedium& rMedium )
sal_Bool SfxObjectShell::SaveCompletedChildren( sal_Bool bSuccess )
{
- RTL_LOGFILE_CONTEXT( aLog, "sfx2 (mv76033) SfxObjectShell::SaveCompletedChildren" );
+ SAL_INFO( "sfx2.doc", "sfx2 (mv76033) SfxObjectShell::SaveCompletedChildren" );
sal_Bool bResult = sal_True;
@@ -3200,7 +3189,7 @@ sal_Bool SfxObjectShell::SaveCompletedChildren( sal_Bool bSuccess )
sal_Bool SfxObjectShell::SwitchChildrenPersistance( const uno::Reference< embed::XStorage >& xStorage,
sal_Bool bForceNonModified )
{
- RTL_LOGFILE_CONTEXT( aLog, "sfx2 (mv76033) SfxObjectShell::SwitchChildrenPersistence" );
+ SAL_INFO( "sfx2.doc", "sfx2 (mv76033) SfxObjectShell::SwitchChildrenPersistence" );
if ( !xStorage.is() )
{
@@ -3219,7 +3208,7 @@ sal_Bool SfxObjectShell::SwitchChildrenPersistance( const uno::Reference< embed:
// Never call this method directly, always use the DoSaveCompleted call
sal_Bool SfxObjectShell::SaveCompleted( const uno::Reference< embed::XStorage >& xStorage )
{
- RTL_LOGFILE_CONTEXT( aLog, "sfx2 (mv76033) SfxObjectShell::SaveCompleted" );
+ SAL_INFO( "sfx2.doc", "sfx2 (mv76033) SfxObjectShell::SaveCompleted" );
sal_Bool bResult = sal_False;
sal_Bool bSendNotification = sal_False;
@@ -3362,7 +3351,7 @@ sal_Bool StoragesOfUnknownMediaTypeAreCopied_Impl( const uno::Reference< embed::
}
catch( uno::Exception& )
{
- OSL_FAIL( "Cant check storage consistency!\n" );
+ SAL_WARN( "sfx2.doc", "Cant check storage consistency!" );
}
return sal_True;
@@ -3371,7 +3360,7 @@ sal_Bool StoragesOfUnknownMediaTypeAreCopied_Impl( const uno::Reference< embed::
sal_Bool SfxObjectShell::SwitchPersistance( const uno::Reference< embed::XStorage >& xStorage )
{
- RTL_LOGFILE_CONTEXT( aLog, "sfx2 (mv76033) SfxObjectShell::SwitchPersistance" );
+ SAL_INFO( "sfx2.doc", "sfx2 (mv76033) SfxObjectShell::SwitchPersistance" );
sal_Bool bResult = sal_False;
#ifdef DBG_UTIL
@@ -3406,7 +3395,7 @@ sal_Bool SfxObjectShell::SwitchPersistance( const uno::Reference< embed::XStorag
sal_Bool SfxObjectShell::CopyStoragesOfUnknownMediaType( const uno::Reference< embed::XStorage >& xSource,
const uno::Reference< embed::XStorage >& xTarget )
{
- RTL_LOGFILE_CONTEXT( aLog, "sfx2 (mv76033) SfxObjectShell::CopyStoragesOfUnknownMediaType" );
+ SAL_INFO( "sfx2.doc", "sfx2 (mv76033) SfxObjectShell::CopyStoragesOfUnknownMediaType" );
// This method does not commit the target storage and should not do it
sal_Bool bResult = sal_True;
@@ -3521,7 +3510,7 @@ sal_Bool SfxObjectShell::GenerateAndStoreThumbnail( sal_Bool bEncrypted,
sal_Bool bIsTemplate,
const uno::Reference< embed::XStorage >& xStor )
{
- RTL_LOGFILE_CONTEXT( aLog, "sfx2 (mv76033) SfxObjectShell::GenerateAndStoreThumbnail" );
+ SAL_INFO( "sfx2.doc", "sfx2 (mv76033) SfxObjectShell::GenerateAndStoreThumbnail" );
bIsInGenerateThumbnail = sal_True;//optimize thumbnail generate and store procedure to improve odt saving performance, i120030
diff --git a/sfx2/source/view/frmload.cxx b/sfx2/source/view/frmload.cxx
index 624de0f12398..c87031ec4002 100644
--- a/sfx2/source/view/frmload.cxx
+++ b/sfx2/source/view/frmload.cxx
@@ -52,7 +52,6 @@
#include <comphelper/processfactory.hxx>
#include <cppuhelper/exc_hlp.hxx>
#include <framework/interaction.hxx>
-#include <rtl/logfile.hxx>
#include <rtl/ustring.h>
#include <sot/storinfo.hxx>
#include <svtools/ehdl.hxx>
@@ -311,7 +310,7 @@ SfxObjectShellRef SfxFrameLoader_Impl::impl_findObjectShell( const Reference< XM
}
}
- OSL_FAIL( "SfxFrameLoader_Impl::impl_findObjectShell: model is not based on SfxObjectShell - wrong frame loader usage!" );
+ SAL_WARN( "sfx2.view", "SfxFrameLoader_Impl::impl_findObjectShell: model is not based on SfxObjectShell - wrong frame loader usage!" );
return NULL;
}
@@ -515,7 +514,7 @@ sal_Bool SAL_CALL SfxFrameLoader_Impl::load( const Sequence< PropertyValue >& rA
SolarMutexGuard aGuard;
- RTL_LOGFILE_CONTEXT( aLog, "sfx2 (mb93783) ::SfxFrameLoader::load" );
+ SAL_INFO( "sfx2.view", "sfx2 (mb93783) ::SfxFrameLoader::load" );
::comphelper::NamedValueCollection aDescriptor( rArgs );