summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/sal/log-areas.dox7
-rw-r--r--linguistic/source/lngsvcmgr.cxx63
-rw-r--r--package/source/xstor/owriteablestream.cxx83
-rw-r--r--package/source/xstor/xstorage.cxx181
-rw-r--r--sd/source/filter/xml/sdxmlwrp.cxx57
-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
-rw-r--r--slideshow/source/engine/shapes/backgroundshape.cxx5
-rw-r--r--slideshow/source/engine/shapes/drawshape.cxx14
-rw-r--r--slideshow/source/engine/shapes/drawshapesubsetting.cxx9
-rw-r--r--slideshow/source/engine/shapes/viewbackgroundshape.cxx5
-rw-r--r--starmath/source/document.cxx79
-rw-r--r--starmath/source/toolbox.cxx7
-rw-r--r--starmath/source/view.cxx65
18 files changed, 336 insertions, 382 deletions
diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 986d3bf92ac1..35bd016a4fca 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -89,6 +89,7 @@ certain functionality.
@section Draw
@li @c sd
+@li @c sd.filter
@li @c sd.fwk
@li @c sd.sls - slidesorter
@li @c sd.tools
@@ -175,6 +176,10 @@ certain functionality.
@li @c starmath.ooxml - OOXML import/export
@li @c starmath.wordbase
+@section package
+
+@li @c package.xstor
+
@section sdext
@li @c sdext.minimizer
@@ -196,6 +201,7 @@ certain functionality.
@section slideshow
+@li @c slideshow
@li @c slideshow.opengl
@li @c slideshow.eventqueue
@@ -371,7 +377,6 @@ certain functionality.
@li @c helpcompiler
@li @c linguistic
@li @c oox
-@li @c package
@li @c rsc
@li @c sax
@li @c shell
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index 2adeb65f987e..3cb177d72337 100644
--- a/linguistic/source/lngsvcmgr.cxx
+++ b/linguistic/source/lngsvcmgr.cxx
@@ -35,7 +35,6 @@
#include <i18nlangtag/languagetag.hxx>
#include <cppuhelper/factory.hxx>
#include <comphelper/extract.hxx>
-#include <rtl/logfile.hxx>
#include <boost/checked_delete.hpp>
@@ -107,7 +106,7 @@ static uno::Sequence< lang::Locale > GetAvailLocales(
}
catch (uno::Exception &)
{
- DBG_ASSERT( 0, "createInstanceWithArguments failed" );
+ SAL_WARN( "linguistic", "createInstanceWithArguments failed" );
}
if (xSuppLoc.is())
@@ -126,7 +125,7 @@ static uno::Sequence< lang::Locale > GetAvailLocales(
}
else
{
- DBG_ASSERT( 0, "interface not supported by service" );
+ SAL_WARN( "linguistic", "interface not supported by service" );
}
}
@@ -628,13 +627,13 @@ namespace
Sequence< Any > aValues( rCfg.GetProperties( aNames ) );
if (aValues.getLength())
{
- OSL_ENSURE( aValues.getLength() == 1, "unexpected length of sequence" );
+ SAL_WARN_IF( aValues.getLength() != 1, "linguistic", "unexpected length of sequence" );
Sequence< OUString > aSvcImplNames;
if (aValues.getConstArray()[0] >>= aSvcImplNames)
aRes = aSvcImplNames;
else
{
- OSL_FAIL( "type mismatch" );
+ SAL_WARN( "linguistic", "type mismatch" );
}
}
}
@@ -820,7 +819,7 @@ void LngSvcMgr::UpdateAll()
if (!bRes)
{
#if OSL_DEBUG_LEVEL > 1
- OSL_FAIL( "failed to set new configuration values" );
+ SAL_WARN( "linguistic", "failed to set new configuration values" );
#endif
}
}
@@ -861,7 +860,7 @@ void LngSvcMgr::Notify( const uno::Sequence< OUString > &rPropertyNames )
OUString aKeyText;
if (nKeyStart != -1)
aKeyText = rName.copy( nKeyStart + 1 );
- DBG_ASSERT( !aKeyText.isEmpty(), "unexpected key (lang::Locale) string" );
+ SAL_WARN_IF( aKeyText.isEmpty(), "linguistic", "unexpected key (lang::Locale) string" );
if (rName.startsWith( aSpellCheckerList ))
{
// delete old cached data, needs to be acquired new on demand
@@ -967,7 +966,7 @@ void LngSvcMgr::Notify( const uno::Sequence< OUString > &rPropertyNames )
}
else
{
- DBG_ASSERT( 0, "nofified for unexpected property" );
+ SAL_WARN( "linguistic", "nofified for unexpected property" );
}
}
}
@@ -1017,13 +1016,13 @@ void LngSvcMgr::GetGrammarCheckerDsp_Impl( sal_Bool bSetSvcList )
catch (const uno::Exception &)
{
}
- DBG_ASSERT( xGCI.is(), "instantiating grammar checking iterator failed" );
+ SAL_WARN_IF( !xGCI.is(), "linguistic", "instantiating grammar checking iterator failed" );
if (xGCI.is())
{
pGrammarDsp = dynamic_cast< GrammarCheckingIterator * >(xGCI.get());
xGrammarDsp = xGCI;
- DBG_ASSERT( pGrammarDsp, "failed to get implementation" );
+ SAL_WARN_IF( pGrammarDsp == NULL, "linguistic", "failed to get implementation" );
if (bSetSvcList)
SetCfgServiceLists( *pGrammarDsp );
}
@@ -1085,7 +1084,7 @@ void LngSvcMgr::GetAvailableSpellSvcs_Impl()
}
catch (const uno::Exception &)
{
- DBG_ASSERT( 0, "createInstance failed" );
+ SAL_WARN( "linguistic", "createInstance failed" );
}
}
@@ -1096,9 +1095,9 @@ void LngSvcMgr::GetAvailableSpellSvcs_Impl()
uno::Reference< XServiceInfo > xInfo( xSvc, uno::UNO_QUERY );
if (xInfo.is())
aImplName = xInfo->getImplementationName();
- DBG_ASSERT( !aImplName.isEmpty(), "empty implementation name" );
+ SAL_WARN_IF( aImplName.isEmpty(), "linguistic", "empty implementation name" );
uno::Reference< linguistic2::XSupportedLocales > xSuppLoc( xSvc, uno::UNO_QUERY );
- DBG_ASSERT( xSuppLoc.is(), "interfaces not supported" );
+ SAL_WARN_IF( !xSuppLoc.is(), "linguistic", "interfaces not supported" );
if (xSuppLoc.is()) {
uno::Sequence<lang::Locale> aLocaleSequence(xSuppLoc->getLocales());
aLanguages = LocaleSeqToLangSeq( aLocaleSequence );
@@ -1142,7 +1141,7 @@ void LngSvcMgr::GetAvailableGrammarSvcs_Impl()
}
catch (const uno::Exception &)
{
- DBG_ASSERT( 0, "createInstance failed" );
+ SAL_WARN( "linguistic", "createInstance failed" );
}
}
@@ -1153,9 +1152,9 @@ void LngSvcMgr::GetAvailableGrammarSvcs_Impl()
uno::Reference< XServiceInfo > xInfo( xSvc, uno::UNO_QUERY );
if (xInfo.is())
aImplName = xInfo->getImplementationName();
- DBG_ASSERT( !aImplName.isEmpty(),"empty implementation name" );
+ SAL_WARN_IF( aImplName.isEmpty(), "linguistic", "empty implementation name" );
uno::Reference< linguistic2::XSupportedLocales > xSuppLoc( xSvc, uno::UNO_QUERY );
- DBG_ASSERT( xSuppLoc.is(), "interfaces not supported" );
+ SAL_WARN_IF( !xSuppLoc.is(), "linguistic", "interfaces not supported" );
if (xSuppLoc.is())
{
uno::Sequence<lang::Locale> aLocaleSequence(xSuppLoc->getLocales());
@@ -1199,7 +1198,7 @@ void LngSvcMgr::GetAvailableHyphSvcs_Impl()
}
catch (const uno::Exception &)
{
- DBG_ASSERT( 0, "createInstance failed" );
+ SAL_WARN( "linguistic", "createInstance failed" );
}
}
if (xSvc.is())
@@ -1209,9 +1208,9 @@ void LngSvcMgr::GetAvailableHyphSvcs_Impl()
uno::Reference< XServiceInfo > xInfo( xSvc, uno::UNO_QUERY );
if (xInfo.is())
aImplName = xInfo->getImplementationName();
- DBG_ASSERT( !aImplName.isEmpty(), "empty implementation name" );
+ SAL_WARN_IF( aImplName.isEmpty(), "linguistic", "empty implementation name" );
uno::Reference< linguistic2::XSupportedLocales > xSuppLoc( xSvc, uno::UNO_QUERY );
- DBG_ASSERT( xSuppLoc.is(), "interfaces not supported" );
+ SAL_WARN_IF( !xSuppLoc.is(), "linguistic", "interfaces not supported" );
if (xSuppLoc.is())
{
uno::Sequence<lang::Locale> aLocaleSequence(xSuppLoc->getLocales());
@@ -1255,7 +1254,7 @@ void LngSvcMgr::GetAvailableThesSvcs_Impl()
}
catch (const uno::Exception &)
{
- DBG_ASSERT( 0, "createInstance failed" );
+ SAL_WARN( "linguistic", "createInstance failed" );
}
}
if (xSvc.is())
@@ -1265,9 +1264,9 @@ void LngSvcMgr::GetAvailableThesSvcs_Impl()
uno::Reference< XServiceInfo > xInfo( xSvc, uno::UNO_QUERY );
if (xInfo.is())
aImplName = xInfo->getImplementationName();
- DBG_ASSERT( !aImplName.isEmpty(), "empty implementation name" );
+ SAL_WARN_IF( aImplName.isEmpty(), "linguistic", "empty implementation name" );
uno::Reference< linguistic2::XSupportedLocales > xSuppLoc( xSvc, uno::UNO_QUERY );
- DBG_ASSERT( xSuppLoc.is(), "interfaces not supported" );
+ SAL_WARN_IF( !xSuppLoc.is(), "linguistic", "interfaces not supported" );
if (xSuppLoc.is())
{
uno::Sequence<lang::Locale> aLocaleSequence(xSuppLoc->getLocales());
@@ -1284,7 +1283,7 @@ void LngSvcMgr::GetAvailableThesSvcs_Impl()
void LngSvcMgr::SetCfgServiceLists( SpellCheckerDispatcher &rSpellDsp )
{
- RTL_LOGFILE_CONTEXT( aLog, "linguistic: LngSvcMgr::SetCfgServiceLists - Spell" );
+ SAL_INFO( "linguistic", "linguistic: LngSvcMgr::SetCfgServiceLists - Spell" );
OUString aNode("ServiceManager/SpellCheckerList");
uno::Sequence< OUString > aNames( /*aCfg.*/GetNodeNames( aNode ) );
@@ -1322,7 +1321,7 @@ void LngSvcMgr::SetCfgServiceLists( SpellCheckerDispatcher &rSpellDsp )
void LngSvcMgr::SetCfgServiceLists( GrammarCheckingIterator &rGrammarDsp )
{
- RTL_LOGFILE_CONTEXT( aLog, "linguistic: LngSvcMgr::SetCfgServiceLists - Grammar" );
+ SAL_INFO( "linguistic", "linguistic: LngSvcMgr::SetCfgServiceLists - Grammar" );
OUString aNode("ServiceManager/GrammarCheckerList");
uno::Sequence< OUString > aNames( /*aCfg.*/GetNodeNames( aNode ) );
@@ -1364,7 +1363,7 @@ void LngSvcMgr::SetCfgServiceLists( GrammarCheckingIterator &rGrammarDsp )
void LngSvcMgr::SetCfgServiceLists( HyphenatorDispatcher &rHyphDsp )
{
- RTL_LOGFILE_CONTEXT( aLog, "linguistic: LngSvcMgr::SetCfgServiceLists - Hyph" );
+ SAL_INFO( "linguistic", "linguistic: LngSvcMgr::SetCfgServiceLists - Hyph" );
OUString aNode("ServiceManager/HyphenatorList");
uno::Sequence< OUString > aNames( /*aCfg.*/GetNodeNames( aNode ) );
@@ -1406,7 +1405,7 @@ void LngSvcMgr::SetCfgServiceLists( HyphenatorDispatcher &rHyphDsp )
void LngSvcMgr::SetCfgServiceLists( ThesaurusDispatcher &rThesDsp )
{
- RTL_LOGFILE_CONTEXT( aLog, "linguistic: LngSvcMgr::SetCfgServiceLists - Thes" );
+ SAL_INFO( "linguistic", "linguistic: LngSvcMgr::SetCfgServiceLists - Thes" );
OUString aNode("ServiceManager/ThesaurusList");
uno::Sequence< OUString > aNames( /*aCfg.*/GetNodeNames( aNode ) );
@@ -1659,7 +1658,7 @@ void SAL_CALL
const uno::Sequence< OUString >& rServiceImplNames )
throw(uno::RuntimeException)
{
- RTL_LOGFILE_CONTEXT( aLog, "linguistic: LngSvcMgr::setConfiguredServices" );
+ SAL_INFO( "linguistic", "linguistic: LngSvcMgr::setConfiguredServices" );
osl::MutexGuard aGuard( GetLinguMutex() );
@@ -1736,7 +1735,7 @@ void SAL_CALL
sal_Bool LngSvcMgr::SaveCfgSvcs( const String &rServiceName )
{
- RTL_LOGFILE_CONTEXT( aLog, "linguistic: LngSvcMgr::SaveCfgSvcs" );
+ SAL_INFO( "linguistic", "linguistic: LngSvcMgr::SaveCfgSvcs" );
sal_Bool bRes = sal_False;
@@ -1793,7 +1792,7 @@ sal_Bool LngSvcMgr::SaveCfgSvcs( const String &rServiceName )
pNodeName = "ServiceManager/ThesaurusList";
else
{
- DBG_ASSERT( 0, "node name missing" );
+ SAL_WARN( "linguistic", "node name missing" );
}
OUString aNodeName( OUString::createFromAscii(pNodeName) );
@@ -1825,7 +1824,7 @@ sal_Bool LngSvcMgr::SaveCfgSvcs( const String &rServiceName )
pValue++;
}
{
- RTL_LOGFILE_CONTEXT( aLog, "linguistic: LngSvcMgr::SaveCfgSvcs - ReplaceSetProperties" );
+ SAL_INFO( "linguistic", "linguistic: LngSvcMgr::SaveCfgSvcs - ReplaceSetProperties" );
// change, add new or replace existing entries.
bRes |= /*aCfg.*/ReplaceSetProperties( aNodeName, aValues );
}
@@ -1850,7 +1849,7 @@ static uno::Sequence< OUString > GetLangSvcList( const uno::Any &rVal )
for (sal_Int32 j = 0; j < nSvcs; ++j)
{
OUString aImplName( pSvcName[j] );
- DBG_ASSERT( !aImplName.isEmpty(), "service impl-name missing" );
+ SAL_WARN_IF( aImplName.isEmpty(), "linguistic", "service impl-name missing" );
}
}
#endif
@@ -1886,7 +1885,7 @@ static uno::Sequence< OUString > GetLangSvc( const uno::Any &rVal )
}
else
{
- DBG_ASSERT( 0, "GetLangSvc: unexpected type encountered" );
+ SAL_WARN( "linguistic", "GetLangSvc: unexpected type encountered" );
}
}
diff --git a/package/source/xstor/owriteablestream.cxx b/package/source/xstor/owriteablestream.cxx
index 3f0f3d9b8a7f..e8fa7e82f2b2 100644
--- a/package/source/xstor/owriteablestream.cxx
+++ b/package/source/xstor/owriteablestream.cxx
@@ -39,7 +39,6 @@
#include <comphelper/ofopxmlhelper.hxx>
#include <rtl/digest.h>
-#include <rtl/logfile.hxx>
#include <rtl/instance.hxx>
#include <PackageConstants.hxx>
@@ -103,7 +102,7 @@ namespace
void SetEncryptionKeyProperty_Impl( const uno::Reference< beans::XPropertySet >& xPropertySet,
const uno::Sequence< beans::NamedValue >& aKey )
{
- OSL_ENSURE( xPropertySet.is(), "No property set is provided!\n" );
+ SAL_WARN_IF( !xPropertySet.is(), "package.xstor", "No property set is provided!" );
if ( !xPropertySet.is() )
throw uno::RuntimeException();
@@ -114,7 +113,7 @@ void SetEncryptionKeyProperty_Impl( const uno::Reference< beans::XPropertySet >&
{
::package::StaticAddLog( rException.Message );
::package::StaticAddLog( OSL_LOG_PREFIX "Can't set encryption");
- OSL_FAIL( "Can't write encryption related properties!\n" );
+ SAL_WARN( "package.xstor", "Can't write encryption related properties!" );
throw io::IOException(); // TODO
}
}
@@ -122,7 +121,7 @@ void SetEncryptionKeyProperty_Impl( const uno::Reference< beans::XPropertySet >&
//-----------------------------------------------
uno::Any GetEncryptionKeyProperty_Impl( const uno::Reference< beans::XPropertySet >& xPropertySet )
{
- OSL_ENSURE( xPropertySet.is(), "No property set is provided!\n" );
+ SAL_WARN_IF( !xPropertySet.is(), "package.xstor", "No property set is provided!" );
if ( !xPropertySet.is() )
throw uno::RuntimeException();
@@ -134,7 +133,7 @@ uno::Any GetEncryptionKeyProperty_Impl( const uno::Reference< beans::XPropertySe
::package::StaticAddLog( rException.Message );
::package::StaticAddLog( OSL_LOG_PREFIX "Can't get encryption property" );
- OSL_FAIL( "Can't get encryption related properties!\n" );
+ SAL_WARN( "package.xstor", "Can't get encryption related properties!" );
throw io::IOException(); // TODO
}
}
@@ -291,9 +290,9 @@ OWriteStream_Impl::OWriteStream_Impl( OStorage_Impl* pParent,
, m_nRelInfoStatus( RELINFO_NO_INIT )
, m_nRelId( 1 )
{
- OSL_ENSURE( xPackageStream.is(), "No package stream is provided!\n" );
- OSL_ENSURE( xPackage.is(), "No package component is provided!\n" );
- OSL_ENSURE( m_xContext.is(), "No package stream is provided!\n" );
+ SAL_WARN_IF( !xPackageStream.is(), "package.xstor", "No package stream is provided!" );
+ SAL_WARN_IF( !xPackage.is(), "package.xstor", "No package component is provided!" );
+ SAL_WARN_IF( !m_xContext.is(), "package.xstor", "No package stream is provided!" );
OSL_ENSURE( pParent, "No parent storage is provided!\n" );
OSL_ENSURE( m_nStorageType == embed::StorageFormats::OFOPXML || !m_xOrigRelInfoStream.is(), "The Relations info makes sence only for OFOPXML format!\n" );
}
@@ -367,10 +366,10 @@ void OWriteStream_Impl::InsertIntoPackageFolder( const OUString& aName,
{
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
- OSL_ENSURE( m_bFlushed, "This method must not be called for nonflushed streams!\n" );
+ SAL_WARN_IF( !m_bFlushed, "package.xstor", "This method must not be called for nonflushed streams!" );
if ( m_bFlushed )
{
- OSL_ENSURE( m_xPackageStream.is(), "An inserted stream is incomplete!\n" );
+ SAL_WARN_IF( !m_xPackageStream.is(), "package.xstor", "An inserted stream is incomplete!\n" );
uno::Reference< lang::XUnoTunnel > xTunnel( m_xPackageStream, uno::UNO_QUERY );
if ( !xTunnel.is() )
throw uno::RuntimeException(); // TODO
@@ -403,7 +402,7 @@ sal_Bool OWriteStream_Impl::IsEncrypted()
uno::Any aValue = xPropSet->getPropertyValue("WasEncrypted");
if ( !( aValue >>= bWasEncr ) )
{
- OSL_FAIL( "The property WasEncrypted has wrong type!\n" );
+ SAL_WARN( "package.xstor", "The property WasEncrypted has wrong type!" );
}
}
@@ -414,7 +413,7 @@ sal_Bool OWriteStream_Impl::IsEncrypted()
{
if ( !( m_aProps[nInd].Value >>= bToBeEncr ) )
{
- OSL_FAIL( "The property has wrong type!\n" );
+ SAL_WARN( "package.xstor", "The property has wrong type!" );
}
}
}
@@ -444,7 +443,7 @@ sal_Bool OWriteStream_Impl::IsEncrypted()
//-----------------------------------------------
void OWriteStream_Impl::SetDecrypted()
{
- OSL_ENSURE( m_nStorageType == embed::StorageFormats::PACKAGE, "The encryption is supported only for package storages!\n" );
+ SAL_WARN_IF( m_nStorageType != embed::StorageFormats::PACKAGE, "package.xstor", "The encryption is supported only for package storages!" );
if ( m_nStorageType != embed::StorageFormats::PACKAGE )
throw uno::RuntimeException();
@@ -469,7 +468,7 @@ void OWriteStream_Impl::SetDecrypted()
//-----------------------------------------------
void OWriteStream_Impl::SetEncrypted( const ::comphelper::SequenceAsHashMap& aEncryptionData )
{
- OSL_ENSURE( m_nStorageType == embed::StorageFormats::PACKAGE, "The encryption is supported only for package storages!\n" );
+ SAL_WARN_IF( m_nStorageType != embed::StorageFormats::PACKAGE, "package.xstor", "The encryption is supported only for package storages!" );
if ( m_nStorageType != embed::StorageFormats::PACKAGE )
throw uno::RuntimeException();
@@ -591,7 +590,7 @@ OUString OWriteStream_Impl::FillTempGetFileName()
{
// in case of new inserted package stream it is possible that input stream still was not set
uno::Reference< io::XStream > xCacheStream = CreateMemoryStream( m_xContext );
- OSL_ENSURE( xCacheStream.is(), "If the stream can not be created an exception must be thrown!\n" );
+ SAL_WARN_IF( !xCacheStream.is(), "package.xstor", "If the stream can not be created an exception must be thrown!" );
m_xCacheSeek.set( xCacheStream, uno::UNO_QUERY_THROW );
m_xCacheStream = xCacheStream;
}
@@ -606,7 +605,7 @@ OUString OWriteStream_Impl::FillTempGetFileName()
if ( nRead <= MAX_STORCACHE_SIZE )
{
uno::Reference< io::XStream > xCacheStream = CreateMemoryStream( m_xContext );
- OSL_ENSURE( xCacheStream.is(), "If the stream can not be created an exception must be thrown!\n" );
+ SAL_WARN_IF( !xCacheStream.is(), "package.xstor", "If the stream can not be created an exception must be thrown!" );
if ( nRead )
{
@@ -750,7 +749,7 @@ void OWriteStream_Impl::InsertStreamDirectly( const uno::Reference< io::XInputSt
// the parent storage is responsible for the correct handling
// of deleted and renamed contents
- OSL_ENSURE( m_xPackageStream.is(), "No package stream is set!\n" );
+ SAL_WARN_IF( !m_xPackageStream.is(), "package.xstor", "No package stream is set!" );
if ( m_bHasDataToFlush )
throw io::IOException();
@@ -830,7 +829,7 @@ void OWriteStream_Impl::Commit()
{
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ) ;
- OSL_ENSURE( m_xPackageStream.is(), "No package stream is set!\n" );
+ SAL_WARN_IF( !m_xPackageStream.is(), "package.xstor", "No package stream is set!" );
if ( !m_bHasDataToFlush )
return;
@@ -1148,13 +1147,13 @@ uno::Sequence< beans::PropertyValue > OWriteStream_Impl::ReadPackageStreamProper
AddLog( rException.Message );
AddLog( OSL_LOG_PREFIX "Quiet exception" );
- OSL_FAIL( "A property can't be retrieved!\n" );
+ SAL_WARN( "package.xstor", "A property can't be retrieved!" );
}
}
}
else
{
- OSL_FAIL( "Can not get properties from a package stream!\n" );
+ SAL_WARN( "package.xstor", "Can not get properties from a package stream!" );
throw uno::RuntimeException();
}
@@ -1167,7 +1166,7 @@ void OWriteStream_Impl::CopyInternallyTo_Impl( const uno::Reference< io::XStream
{
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ) ;
- OSL_ENSURE( !m_bUseCommonEncryption, "The stream can not be encrypted!" );
+ SAL_WARN_IF( m_bUseCommonEncryption, "package.xstor", "The stream can not be encrypted!" );
if ( m_nStorageType != embed::StorageFormats::PACKAGE )
throw packages::NoEncryptionException();
@@ -1231,7 +1230,7 @@ uno::Reference< io::XStream > OWriteStream_Impl::GetStream( sal_Int32 nStreamMod
{
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ) ;
- OSL_ENSURE( m_xPackageStream.is(), "No package stream is set!\n" );
+ SAL_WARN_IF( !m_xPackageStream.is(), "package.xstor", "No package stream is set!" );
if ( m_pAntiImpl )
throw io::IOException(); // TODO:
@@ -1276,13 +1275,13 @@ uno::Reference< io::XStream > OWriteStream_Impl::GetStream( sal_Int32 nStreamMod
AddLog( rException.Message );
AddLog( OSL_LOG_PREFIX "Quiet exception" );
- OSL_FAIL( "Can't write encryption related properties!\n" );
+ SAL_WARN( "package.xstor", "Can't write encryption related properties!" );
SetEncryptionKeyProperty_Impl( xPropertySet, uno::Sequence< beans::NamedValue >() );
throw io::IOException(); // TODO:
}
}
- OSL_ENSURE( xResultStream.is(), "In case stream can not be retrieved an exception must be thrown!\n" );
+ SAL_WARN_IF( !xResultStream.is(), "package.xstor", "In case stream can not be retrieved an exception must be thrown!" );
return xResultStream;
}
@@ -1292,7 +1291,7 @@ uno::Reference< io::XStream > OWriteStream_Impl::GetStream( sal_Int32 nStreamMod
{
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ) ;
- OSL_ENSURE( m_xPackageStream.is(), "No package stream is set!\n" );
+ SAL_WARN_IF( !m_xPackageStream.is(), "package.xstor", "No package stream is set!" );
if ( m_pAntiImpl )
throw io::IOException(); // TODO:
@@ -1347,8 +1346,7 @@ uno::Reference< io::XStream > OWriteStream_Impl::GetStream_Impl( sal_Int32 nStre
uno::Reference< io::XStream > xCompStream(
static_cast< ::cppu::OWeakObject* >( pStream ),
uno::UNO_QUERY );
- OSL_ENSURE( xCompStream.is(),
- "OInputCompStream MUST provide XStream interfaces!\n" );
+ SAL_WARN_IF( !xCompStream.is(), "package.xstor", "OInputCompStream MUST provide XStream interfaces!" );
m_aInputStreamsList.push_back( pStream );
return xCompStream;
@@ -1372,8 +1370,7 @@ uno::Reference< io::XStream > OWriteStream_Impl::GetStream_Impl( sal_Int32 nStre
uno::Reference< io::XStream > xSeekStream(
static_cast< ::cppu::OWeakObject* >( pStream ),
uno::UNO_QUERY );
- OSL_ENSURE( xSeekStream.is(),
- "OInputSeekStream MUST provide XStream interfaces!\n" );
+ SAL_WARN_IF( !xSeekStream.is(), "package.xstor", "OInputSeekStream MUST provide XStream interfaces!" );
m_aInputStreamsList.push_back( pStream );
return xSeekStream;
@@ -1430,7 +1427,7 @@ uno::Reference< io::XStream > OWriteStream_Impl::GetStream_Impl( sal_Int32 nStre
uno::Reference< io::XStream >( static_cast< ::cppu::OWeakObject* >( m_pAntiImpl ),
uno::UNO_QUERY );
- OSL_ENSURE( xWriteStream.is(), "OWriteStream MUST implement XStream && XComponent interfaces!\n" );
+ SAL_WARN_IF( !xWriteStream.is(), "package.xstor", "OWriteStream MUST implement XStream && XComponent interfaces!" );
return xWriteStream;
}
@@ -1443,7 +1440,7 @@ uno::Reference< io::XInputStream > OWriteStream_Impl::GetPlainRawInStream()
{
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ) ;
- OSL_ENSURE( m_xPackageStream.is(), "No package stream is set!\n" );
+ SAL_WARN_IF( !m_xPackageStream.is(), "package.xstor", "No package stream is set!" );
// this method is used only internally, this stream object should not go outside of this implementation
// if ( m_pAntiImpl )
@@ -1457,12 +1454,12 @@ uno::Reference< io::XInputStream > OWriteStream_Impl::GetRawInStream()
{
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ) ;
- OSL_ENSURE( m_xPackageStream.is(), "No package stream is set!\n" );
+ SAL_WARN_IF( !m_xPackageStream.is(), "package.xstor", "No package stream is set!" );
if ( m_pAntiImpl )
throw io::IOException(); // TODO:
- OSL_ENSURE( IsEncrypted(), "Impossible to get raw representation for nonencrypted stream!\n" );
+ SAL_WARN_IF( !IsEncrypted(), "package.xstor", "Impossible to get raw representation for nonencrypted stream!" );
if ( !IsEncrypted() )
throw packages::NoEncryptionException();
@@ -1530,7 +1527,7 @@ void OWriteStream_Impl::GetCopyOfLastCommit( uno::Reference< io::XStream >& xTar
{
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
- OSL_ENSURE( m_xPackageStream.is(), "The source stream for copying is incomplete!\n" );
+ SAL_WARN_IF( !m_xPackageStream.is(), "package.xstor", "The source stream for copying is incomplete!" );
if ( !m_xPackageStream.is() )
throw uno::RuntimeException();
@@ -1569,7 +1566,7 @@ void OWriteStream_Impl::GetCopyOfLastCommit( uno::Reference< io::XStream >& xTar
{
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
- OSL_ENSURE( m_xPackageStream.is(), "The source stream for copying is incomplete!\n" );
+ SAL_WARN_IF( !m_xPackageStream.is(), "package.xstor", "The source stream for copying is incomplete!" );
if ( !m_xPackageStream.is() )
throw uno::RuntimeException();
@@ -1611,13 +1608,13 @@ void OWriteStream_Impl::GetCopyOfLastCommit( uno::Reference< io::XStream >& xTar
if ( !xDataToCopy.is() )
{
- OSL_FAIL( "Encrypted ZipStream must already have input stream inside!\n" );
+ SAL_WARN( "package.xstor", "Encrypted ZipStream must already have input stream inside!" );
SetEncryptionKeyProperty_Impl( xPropertySet, uno::Sequence< beans::NamedValue >() );
}
}
catch( const uno::Exception& rException )
{
- OSL_FAIL( "Can't open encrypted stream!\n" );
+ SAL_WARN( "package.xstor", "Can't open encrypted stream!" );
SetEncryptionKeyProperty_Impl( xPropertySet, uno::Sequence< beans::NamedValue >() );
AddLog( rException.Message );
AddLog( OSL_LOG_PREFIX "Rethrow" );
@@ -1832,7 +1829,7 @@ void OWriteStream::CheckInitOnDemand()
if ( m_bInitOnDemand )
{
- RTL_LOGFILE_CONTEXT( aLog, "package (mv76033) OWriteStream::CheckInitOnDemand, initializing" );
+ SAL_INFO( "package.xstor", "package (mv76033) OWriteStream::CheckInitOnDemand, initializing" );
uno::Reference< io::XStream > xStream = m_pImpl->GetTempFileAsStream();
if ( xStream.is() )
{
@@ -1893,7 +1890,7 @@ void OWriteStream::CopyToStreamInternally_Impl( const uno::Reference< io::XStrea
m_pImpl->AddLog( OSL_LOG_PREFIX "Quiet exception" );
// TODO: set the stoream in invalid state or dispose
- OSL_FAIL( "The stream become invalid during copiing!\n" );
+ SAL_WARN( "package.xstor", "The stream become invalid during copiing!" );
throw uno::RuntimeException();
}
@@ -2322,7 +2319,7 @@ void SAL_CALL OWriteStream::writeBytes( const uno::Sequence< sal_Int8 >& aData )
if ( m_bInitOnDemand )
{
- RTL_LOGFILE_CONTEXT( aLog, "package (mv76033) OWriteStream::CheckInitOnDemand, initializing" );
+ SAL_INFO( "package.xstor", "package (mv76033) OWriteStream::CheckInitOnDemand, initializing" );
uno::Reference< io::XStream > xStream = m_pImpl->GetTempFileAsStream();
if ( xStream.is() )
{
@@ -2511,7 +2508,7 @@ void SAL_CALL OWriteStream::truncate()
if ( !xTruncate.is() )
{
- OSL_FAIL( "The output stream must support XTruncate interface!\n" );
+ SAL_WARN( "package.xstor", "The output stream must support XTruncate interface!" );
throw uno::RuntimeException();
}
@@ -3404,7 +3401,7 @@ void SAL_CALL OWriteStream::commit()
embed::StorageWrappedTargetException,
uno::RuntimeException )
{
- RTL_LOGFILE_CONTEXT( aLog, "package (mv76033) OWriteStream::commit" );
+ SAL_INFO( "package.xstor", "package (mv76033) OWriteStream::commit" );
if ( !m_pImpl )
{
@@ -3469,7 +3466,7 @@ void SAL_CALL OWriteStream::revert()
embed::StorageWrappedTargetException,
uno::RuntimeException )
{
- RTL_LOGFILE_CONTEXT( aLog, "package (mv76033) OWriteStream::revert" );
+ SAL_INFO( "package.xstor", "package (mv76033) OWriteStream::revert" );
// the method removes all the changes done after last commit
diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx
index 64ae0f1a91d9..ee1850c0877c 100644
--- a/package/source/xstor/xstorage.cxx
+++ b/package/source/xstor/xstorage.cxx
@@ -42,7 +42,6 @@
#include <cppuhelper/typeprovider.hxx>
#include <cppuhelper/exc_hlp.hxx>
-#include <rtl/logfile.hxx>
#include <rtl/instance.hxx>
#include <comphelper/processfactory.hxx>
@@ -211,7 +210,7 @@ OStorage_Impl::OStorage_Impl( uno::Reference< io::XInputStream > xInputStream,
, m_nRelInfoStatus( RELINFO_NO_INIT )
{
// all the checks done below by assertion statements must be done by factory
- OSL_ENSURE( xInputStream.is(), "No input stream is provided!\n" );
+ SAL_WARN_IF( !xInputStream.is(), "package.xstor", "No input stream is provided!" );
m_pSwitchStream = (SwitchablePersistenceStream*) new SwitchablePersistenceStream( xContext, xInputStream );
m_xInputStream = m_pSwitchStream->getInputStream();
@@ -219,7 +218,7 @@ OStorage_Impl::OStorage_Impl( uno::Reference< io::XInputStream > xInputStream,
if ( m_nStorageMode & embed::ElementModes::WRITE )
{
// check that the stream allows to write
- OSL_FAIL( "No stream for writing is provided!\n" );
+ SAL_WARN( "package.xstor", "No stream for writing is provided!" );
}
}
@@ -251,7 +250,7 @@ OStorage_Impl::OStorage_Impl( uno::Reference< io::XStream > xStream,
, m_nRelInfoStatus( RELINFO_NO_INIT )
{
// all the checks done below by assertion statements must be done by factory
- OSL_ENSURE( xStream.is(), "No stream is provided!\n" );
+ SAL_WARN_IF( !xStream.is(), "package.xstor", "No stream is provided!" );
if ( m_nStorageMode & embed::ElementModes::WRITE )
{
@@ -294,7 +293,7 @@ OStorage_Impl::OStorage_Impl( OStorage_Impl* pParent,
, m_pRelStorElement( NULL )
, m_nRelInfoStatus( RELINFO_NO_INIT )
{
- OSL_ENSURE( xPackageFolder.is(), "No package folder!\n" );
+ SAL_WARN_IF( !xPackageFolder.is(), "package.xstor", "No package folder!" );
}
//-----------------------------------------------
@@ -304,7 +303,7 @@ OStorage_Impl::~OStorage_Impl()
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
if ( m_pAntiImpl ) // root storage wrapper must set this member to NULL before destruction of object
{
- OSL_ENSURE( !m_bIsRoot, "The root storage wrapper must be disposed already" );
+ SAL_WARN_IF( m_bIsRoot, "package.xstor", "The root storage wrapper must be disposed already" );
try {
m_pAntiImpl->InternalDispose( sal_False );
@@ -452,7 +451,7 @@ void OStorage_Impl::RemoveReadOnlyWrap( OStorage& aStorage )
//-----------------------------------------------
void OStorage_Impl::OpenOwnPackage()
{
- OSL_ENSURE( m_bIsRoot, "Opening of the package has no sence!\n" );
+ SAL_WARN_IF( !m_bIsRoot, "package.xstor", "Opening of the package has no sence!" );
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
@@ -465,7 +464,7 @@ void OStorage_Impl::OpenOwnPackage()
aArguments[ 0 ] <<= m_xStream;
else
{
- OSL_ENSURE( m_xInputStream.is(), "Input stream must be set for readonly access!\n" );
+ SAL_WARN_IF( !m_xInputStream.is(), "package.xstor", "Input stream must be set for readonly access!" );
aArguments[ 0 ] <<= m_xInputStream;
// TODO: if input stream is not seekable or XSeekable interface is supported
// on XStream object a wrapper must be used
@@ -519,7 +518,7 @@ void OStorage_Impl::OpenOwnPackage()
}
uno::Reference< container::XHierarchicalNameAccess > xHNameAccess( m_xPackage, uno::UNO_QUERY );
- OSL_ENSURE( xHNameAccess.is(), "The package could not be created!\n" );
+ SAL_WARN_IF( !xHNameAccess.is(), "package.xstor", "The package could not be created!" );
if ( xHNameAccess.is() )
{
@@ -528,7 +527,7 @@ void OStorage_Impl::OpenOwnPackage()
}
}
- OSL_ENSURE( m_xPackageFolder.is(), "The package root folder can not be opened!\n" );
+ SAL_WARN_IF( !m_xPackageFolder.is(), "package.xstor", "The package root folder can not be opened!" );
if ( !m_xPackageFolder.is() )
throw embed::InvalidStorageException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() );
}
@@ -644,12 +643,12 @@ void OStorage_Impl::ReadContents()
if ( !xNamed.is() )
{
- OSL_FAIL( "XNamed is not supported!\n" );
+ SAL_WARN( "package.xstor", "XNamed is not supported!" );
throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() );
}
OUString aName = xNamed->getName();
- OSL_ENSURE( !aName.isEmpty(), "Empty name!\n" );
+ SAL_WARN_IF( aName.isEmpty(), "package.xstor", "Empty name!" );
uno::Reference< container::XNameContainer > xNameContainer( xNamed, uno::UNO_QUERY );
@@ -678,7 +677,7 @@ void OStorage_Impl::ReadContents()
AddLog( rNoSuchElementException.Message );
AddLog( OSL_LOG_PREFIX "NoSuchElement" );
- OSL_FAIL( "hasMoreElements() implementation has problems!\n" );
+ SAL_WARN( "package.xstor", "hasMoreElements() implementation has problems!" );
break;
}
}
@@ -791,8 +790,8 @@ void OStorage_Impl::CopyStorageElement( SotElement_Impl* pElement,
OUString aName,
sal_Bool bDirect )
{
- OSL_ENSURE( xDest.is(), "No destination storage!\n" );
- OSL_ENSURE( !aName.isEmpty(), "Empty element name!\n" );
+ SAL_WARN_IF( !xDest.is(), "package.xstor", "No destination storage!" );
+ SAL_WARN_IF( aName.isEmpty(), "package.xstor", "Empty element name!" );
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
@@ -810,7 +809,7 @@ void OStorage_Impl::CopyStorageElement( SotElement_Impl* pElement,
xDest->openStorageElement( aName,
embed::ElementModes::WRITE );
- OSL_ENSURE( xSubDest.is(), "No destination substorage!\n" );
+ SAL_WARN_IF( !xSubDest.is(), "package.xstor", "No destination substorage!" );
if ( !pElement->m_pStorage )
{
@@ -877,7 +876,7 @@ void OStorage_Impl::CopyStorageElement( SotElement_Impl* pElement,
if ( pElement->m_pStream->HasTempFile_Impl() || !pElement->m_pStream->m_xPackageStream.is() )
{
- OSL_ENSURE( pElement->m_pStream->m_xPackageStream.is(), "No package stream!" );
+ SAL_WARN_IF( !pElement->m_pStream->m_xPackageStream.is(), "package.xstor", "No package stream!" );
// if the stream is modified - the temporary file must be used for insertion
xInputToInsert = pElement->m_pStream->GetTempFileAsInputStream();
@@ -900,14 +899,14 @@ void OStorage_Impl::CopyStorageElement( SotElement_Impl* pElement,
uno::Reference< io::XStream > xSubStr =
xDest->openStreamElement( aName,
embed::ElementModes::READWRITE | embed::ElementModes::TRUNCATE );
- OSL_ENSURE( xSubStr.is(), "No destination substream!\n" );
+ SAL_WARN_IF( !xSubStr.is(), "package.xstor", "No destination substream!" );
pElement->m_pStream->CopyInternallyTo_Impl( xSubStr );
}
}
else if ( m_nStorageType != embed::StorageFormats::PACKAGE )
{
- OSL_FAIL( "Encryption is only supported in package storage!\n" );
+ SAL_WARN( "package.xstor", "Encryption is only supported in package storage!" );
throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() );
}
else if ( pElement->m_pStream->HasCachedEncryptionData()
@@ -949,7 +948,7 @@ void OStorage_Impl::CopyStorageElement( SotElement_Impl* pElement,
xDest2->openEncryptedStream( aName,
embed::ElementModes::READWRITE | embed::ElementModes::TRUNCATE,
pElement->m_pStream->GetCachedEncryptionData().getAsConstNamedValueList() );
- OSL_ENSURE( xSubStr.is(), "No destination substream!\n" );
+ SAL_WARN_IF( !xSubStr.is(), "package.xstor", "No destination substream!" );
pElement->m_pStream->CopyInternallyTo_Impl( xSubStr, pElement->m_pStream->GetCachedEncryptionData() );
}
@@ -967,7 +966,7 @@ void OStorage_Impl::CopyStorageElement( SotElement_Impl* pElement,
uno::Reference< io::XStream > xDestStream =
xDest->openStreamElement( aName,
embed::ElementModes::READWRITE | embed::ElementModes::TRUNCATE );
- OSL_ENSURE( xDestStream.is(), "No destination substream!\n" );
+ SAL_WARN_IF( !xDestStream.is(), "package.xstor", "No destination substream!" );
completeStorageStreamCopy_Impl( xOwnStream, xDestStream, m_nStorageType, GetAllRelationshipsIfAny() );
uno::Reference< beans::XPropertySet > xProps( xDestStream, uno::UNO_QUERY_THROW );
@@ -1013,7 +1012,7 @@ void OStorage_Impl::CopyLastCommitTo( const uno::Reference< embed::XStorage >& x
{
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
- OSL_ENSURE( m_xPackageFolder.is(), "A commited storage is incomplete!\n" );
+ SAL_WARN_IF( !m_xPackageFolder.is(), "package.xstor", "A commited storage is incomplete!" );
if ( !m_xPackageFolder.is() )
throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() );
@@ -1034,7 +1033,7 @@ void OStorage_Impl::InsertIntoPackageFolder( const OUString& aName,
{
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
- OSL_ENSURE( m_xPackageFolder.is(), "An inserted storage is incomplete!\n" );
+ SAL_WARN_IF( !m_xPackageFolder.is(), "package.xstor", "An inserted storage is incomplete!" );
uno::Reference< lang::XUnoTunnel > xTunnel( m_xPackageFolder, uno::UNO_QUERY );
if ( !xTunnel.is() )
throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() );
@@ -1058,7 +1057,7 @@ void OStorage_Impl::Commit()
ReadContents();
// if storage is commited it should have a valid Package representation
- OSL_ENSURE( m_xPackageFolder.is(), "The package representation should exist!\n" );
+ SAL_WARN_IF( !m_xPackageFolder.is(), "package.xstor", "The package representation should exist!" );
if ( !m_xPackageFolder.is() )
throw embed::InvalidStorageException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() );
@@ -1263,7 +1262,7 @@ void OStorage_Impl::Commit()
{
uno::Reference< util::XChangesBatch > xChangesBatch( m_xPackage, uno::UNO_QUERY );
- OSL_ENSURE( xChangesBatch.is(), "Impossible to commit package!\n" );
+ SAL_WARN_IF( !xChangesBatch.is(), "package.xstor", "Impossible to commit package!" );
if ( !xChangesBatch.is() )
throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() );
@@ -1387,7 +1386,7 @@ void OStorage_Impl::Revert()
//-----------------------------------------------
SotElement_Impl* OStorage_Impl::FindElement( const OUString& rName )
{
- OSL_ENSURE( !rName.isEmpty(), "Name is empty!" );
+ SAL_WARN_IF( rName.isEmpty(), "package.xstor", "Name is empty!" );
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
@@ -1406,7 +1405,7 @@ SotElement_Impl* OStorage_Impl::FindElement( const OUString& rName )
//-----------------------------------------------
SotElement_Impl* OStorage_Impl::InsertStream( OUString aName, sal_Bool bEncr )
{
- OSL_ENSURE( m_xPackage.is(), "Not possible to refer to package as to factory!\n" );
+ SAL_WARN_IF( !m_xPackage.is(), "package.xstor", "Not possible to refer to package as to factory!" );
if ( !m_xPackage.is() )
throw embed::InvalidStorageException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() );
@@ -1415,7 +1414,7 @@ SotElement_Impl* OStorage_Impl::InsertStream( OUString aName, sal_Bool bEncr )
uno::Reference< lang::XUnoTunnel > xNewElement( m_xPackage->createInstanceWithArguments( aSeq ),
uno::UNO_QUERY );
- OSL_ENSURE( xNewElement.is(), "Not possible to create a new stream!\n" );
+ SAL_WARN_IF( !xNewElement.is(), "package.xstor", "Not possible to create a new stream!" );
if ( !xNewElement.is() )
throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() );
@@ -1442,7 +1441,7 @@ SotElement_Impl* OStorage_Impl::InsertStream( OUString aName, sal_Bool bEncr )
SotElement_Impl* OStorage_Impl::InsertRawStream( OUString aName, const uno::Reference< io::XInputStream >& xInStream )
{
// insert of raw stream means insert and commit
- OSL_ENSURE( m_xPackage.is(), "Not possible to refer to package as to factory!\n" );
+ SAL_WARN_IF( !m_xPackage.is(), "package.xstor", "Not possible to refer to package as to factory!" );
if ( !m_xPackage.is() )
throw embed::InvalidStorageException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() );
@@ -1458,7 +1457,7 @@ SotElement_Impl* OStorage_Impl::InsertRawStream( OUString aName, const uno::Refe
uno::Reference< lang::XUnoTunnel > xNewElement( m_xPackage->createInstanceWithArguments( aSeq ),
uno::UNO_QUERY );
- OSL_ENSURE( xNewElement.is(), "Not possible to create a new stream!\n" );
+ SAL_WARN_IF( !xNewElement.is(), "package.xstor", "Not possible to create a new stream!" );
if ( !xNewElement.is() )
throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() );
@@ -1484,7 +1483,7 @@ SotElement_Impl* OStorage_Impl::InsertRawStream( OUString aName, const uno::Refe
//-----------------------------------------------
OStorage_Impl* OStorage_Impl::CreateNewStorageImpl( sal_Int32 nStorageMode )
{
- OSL_ENSURE( m_xPackage.is(), "Not possible to refer to package as to factory!\n" );
+ SAL_WARN_IF( !m_xPackage.is(), "package.xstor", "Not possible to refer to package as to factory!" );
if ( !m_xPackage.is() )
throw embed::InvalidStorageException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() );
@@ -1493,7 +1492,7 @@ OStorage_Impl* OStorage_Impl::CreateNewStorageImpl( sal_Int32 nStorageMode )
uno::Reference< lang::XUnoTunnel > xNewElement( m_xPackage->createInstanceWithArguments( aSeq ),
uno::UNO_QUERY );
- OSL_ENSURE( xNewElement.is(), "Not possible to create a new storage!\n" );
+ SAL_WARN_IF( !xNewElement.is(), "package.xstor", "Not possible to create a new storage!" );
if ( !xNewElement.is() )
throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() );
@@ -1534,10 +1533,10 @@ SotElement_Impl* OStorage_Impl::InsertElement( OUString aName, sal_Bool bIsStora
{
if ( (*pElementIter)->m_aName == aName )
{
- OSL_ENSURE( (*pElementIter)->m_bIsRemoved, "Try to insert an element instead of existing one!\n" );
+ SAL_WARN_IF( !(*pElementIter)->m_bIsRemoved, "package.xstor", "Try to insert an element instead of existing one!" );
if ( (*pElementIter)->m_bIsRemoved )
{
- OSL_ENSURE( !(*pElementIter)->m_bIsInserted, "Inserted elements must be deleted immediatelly!\n" );
+ SAL_WARN_IF( (*pElementIter)->m_bIsInserted, "package.xstor", "Inserted elements must be deleted immediatelly!" );
pDeletedElm = *pElementIter;
break;
}
@@ -1562,14 +1561,14 @@ SotElement_Impl* OStorage_Impl::InsertElement( OUString aName, sal_Bool bIsStora
//-----------------------------------------------
void OStorage_Impl::OpenSubStorage( SotElement_Impl* pElement, sal_Int32 nStorageMode )
{
- OSL_ENSURE( pElement, "pElement is not set!\n" );
- OSL_ENSURE( pElement->m_bIsStorage, "Storage flag is not set!\n" );
+ SAL_WARN_IF( !pElement, "package.xstor", "pElement is not set!" );
+ SAL_WARN_IF( !pElement->m_bIsStorage, "package.xstor", "Storage flag is not set!" );
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
if ( !pElement->m_pStorage )
{
- OSL_ENSURE( !pElement->m_bIsInserted, "Inserted element must be created already!\n" );
+ SAL_WARN_IF( pElement->m_bIsInserted, "package.xstor", "Inserted element must be created already!" );
uno::Reference< lang::XUnoTunnel > xTunnel;
m_xPackageFolder->getByName( pElement->m_aOriginalName ) >>= xTunnel;
@@ -1578,7 +1577,7 @@ void OStorage_Impl::OpenSubStorage( SotElement_Impl* pElement, sal_Int32 nStorag
uno::Reference< container::XNameContainer > xPackageSubFolder( xTunnel, uno::UNO_QUERY );
- OSL_ENSURE( xPackageSubFolder.is(), "Can not get XNameContainer interface from folder!\n" );
+ SAL_WARN_IF( !xPackageSubFolder.is(), "package.xstor", "Can not get XNameContainer interface from folder!" );
if ( !xPackageSubFolder.is() )
throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() );
@@ -1590,14 +1589,14 @@ void OStorage_Impl::OpenSubStorage( SotElement_Impl* pElement, sal_Int32 nStorag
//-----------------------------------------------
void OStorage_Impl::OpenSubStream( SotElement_Impl* pElement )
{
- OSL_ENSURE( pElement, "pElement is not set!\n" );
- OSL_ENSURE( !pElement->m_bIsStorage, "Storage flag is set!\n" );
+ SAL_WARN_IF( !pElement, "package.xstor", "pElement is not set!" );
+ SAL_WARN_IF( pElement->m_bIsStorage, "package.xstor", "Storage flag is set!" );
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
if ( !pElement->m_pStream )
{
- OSL_ENSURE( !pElement->m_bIsInserted, "Inserted element must be created already!\n" );
+ SAL_WARN_IF( pElement->m_bIsInserted, "package.xstor", "Inserted element must be created already!" );
uno::Reference< lang::XUnoTunnel > xTunnel;
m_xPackageFolder->getByName( pElement->m_aOriginalName ) >>= xTunnel;
@@ -1638,7 +1637,7 @@ uno::Sequence< OUString > OStorage_Impl::GetElementNames()
//-----------------------------------------------
void OStorage_Impl::RemoveElement( SotElement_Impl* pElement )
{
- OSL_ENSURE( pElement, "Element must be provided!" );
+ SAL_WARN_IF( !pElement, "package.xstor", "Element must be provided!" );
if ( !pElement )
return;
@@ -1775,7 +1774,7 @@ void OStorage_Impl::CommitStreamRelInfo( SotElement_Impl* pStreamElement )
if ( m_nStorageType == embed::StorageFormats::OFOPXML && pStreamElement->m_pStream )
{
- OSL_ENSURE( !pStreamElement->m_aName.isEmpty(), "The name must not be empty!\n" );
+ SAL_WARN_IF( pStreamElement->m_aName.isEmpty(), "package.xstor", "The name must not be empty!" );
if ( !m_xRelStorage.is() )
{
@@ -1998,7 +1997,7 @@ OStorage::~OStorage()
//-----------------------------------------------
void SAL_CALL OStorage::InternalDispose( sal_Bool bNotifyImpl )
{
- RTL_LOGFILE_CONTEXT( aLog, "package (mv76033) OStorage::InternalDispose" );
+ SAL_INFO( "package.xstor", "package (mv76033) OStorage::InternalDispose" );
if ( !m_pImpl )
{
@@ -2110,7 +2109,7 @@ void OStorage::BroadcastModifiedIfNecessary()
m_pImpl->m_bBroadcastModified = sal_False;
- OSL_ENSURE( !m_pData->m_bReadOnlyWrap, "The storage can not be modified at all!\n" );
+ SAL_WARN_IF( m_pData->m_bReadOnlyWrap, "package.xstor", "The storage can not be modified at all!" );
lang::EventObject aSource( static_cast< ::cppu::OWeakObject* >(this) );
@@ -2143,7 +2142,7 @@ void OStorage::BroadcastTransaction( sal_Int8 nMessage )
throw lang::DisposedException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() );
}
- OSL_ENSURE( !m_pData->m_bReadOnlyWrap, "The storage can not be modified at all!\n" );
+ SAL_WARN_IF( m_pData->m_bReadOnlyWrap, "package.xstor", "The storage can not be modified at all!" );
lang::EventObject aSource( static_cast< ::cppu::OWeakObject* >(this) );
@@ -2201,7 +2200,7 @@ SotElement_Impl* OStorage::OpenStreamElement_Impl( const OUString& aStreamName,
throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() );
}
- OSL_ENSURE( pElement, "In case element can not be created an exception must be thrown!" );
+ SAL_WARN_IF( !pElement, "package.xstor", "In case element can not be created an exception must be thrown!" );
if ( !pElement->m_pStream )
m_pImpl->OpenSubStream( pElement );
@@ -2403,7 +2402,7 @@ void SAL_CALL OStorage::copyToStorage( const uno::Reference< embed::XStorage >&
embed::StorageWrappedTargetException,
uno::RuntimeException )
{
- RTL_LOGFILE_CONTEXT( aLog, "package (mv76033) OStorage::copyToStorage" );
+ SAL_INFO( "package.xstor", "package (mv76033) OStorage::copyToStorage" );
::osl::MutexGuard aGuard( m_pData->m_rSharedMutexRef->GetMutex() );
@@ -2471,7 +2470,7 @@ uno::Reference< io::XStream > SAL_CALL OStorage::openStreamElement(
embed::StorageWrappedTargetException,
uno::RuntimeException )
{
- RTL_LOGFILE_CONTEXT( aLog, "package (mv76033) OStorage::openStreamElement" );
+ SAL_INFO( "package.xstor", "package (mv76033) OStorage::openStreamElement" );
::osl::ResettableMutexGuard aGuard( m_pData->m_rSharedMutexRef->GetMutex() );
@@ -2497,7 +2496,7 @@ uno::Reference< io::XStream > SAL_CALL OStorage::openStreamElement(
OSL_ENSURE( pElement && pElement->m_pStream, "In case element can not be created an exception must be thrown!" );
xResult = pElement->m_pStream->GetStream( nOpenMode, sal_False );
- OSL_ENSURE( xResult.is(), "The method must throw exception instead of removing empty result!\n" );
+ SAL_WARN_IF( !xResult.is(), "package.xstor", "The method must throw exception instead of removing empty result!" );
if ( m_pData->m_bReadOnlyWrap )
{
@@ -2574,7 +2573,7 @@ uno::Reference< io::XStream > SAL_CALL OStorage::openEncryptedStreamElement(
embed::StorageWrappedTargetException,
uno::RuntimeException )
{
- RTL_LOGFILE_CONTEXT( aLog, "package (mv76033) OStorage::openEncryptedStreamElement" );
+ SAL_INFO( "package.xstor", "package (mv76033) OStorage::openEncryptedStreamElement" );
return openEncryptedStream( aStreamName, nOpenMode, ::comphelper::OStorageHelper::CreatePackageEncryptionData( aPass ) );
}
@@ -2588,7 +2587,7 @@ uno::Reference< embed::XStorage > SAL_CALL OStorage::openStorageElement(
embed::StorageWrappedTargetException,
uno::RuntimeException )
{
- RTL_LOGFILE_CONTEXT( aLog, "package (mv76033) OStorage::openStorageElement" );
+ SAL_INFO( "package.xstor", "package (mv76033) OStorage::openStorageElement" );
::osl::MutexGuard aGuard( m_pData->m_rSharedMutexRef->GetMutex() );
@@ -2742,7 +2741,7 @@ uno::Reference< io::XStream > SAL_CALL OStorage::cloneStreamElement( const OUStr
embed::StorageWrappedTargetException,
uno::RuntimeException )
{
- RTL_LOGFILE_CONTEXT( aLog, "package (mv76033) OStorage::cloneStreamElement" );
+ SAL_INFO( "package.xstor", "package (mv76033) OStorage::cloneStreamElement" );
::osl::MutexGuard aGuard( m_pData->m_rSharedMutexRef->GetMutex() );
@@ -2826,7 +2825,7 @@ uno::Reference< io::XStream > SAL_CALL OStorage::cloneEncryptedStreamElement(
embed::StorageWrappedTargetException,
uno::RuntimeException )
{
- RTL_LOGFILE_CONTEXT( aLog, "package (mv76033) OStorage::cloneEncryptedStreamElement" );
+ SAL_INFO( "package.xstor", "package (mv76033) OStorage::cloneEncryptedStreamElement" );
return cloneEncryptedStream( aStreamName, ::comphelper::OStorageHelper::CreatePackageEncryptionData( aPass ) );
}
@@ -2840,7 +2839,7 @@ void SAL_CALL OStorage::copyLastCommitTo(
embed::StorageWrappedTargetException,
uno::RuntimeException )
{
- RTL_LOGFILE_CONTEXT( aLog, "package (mv76033) OStorage::copyLastCommitTo" );
+ SAL_INFO( "package.xstor", "package (mv76033) OStorage::copyLastCommitTo" );
::osl::MutexGuard aGuard( m_pData->m_rSharedMutexRef->GetMutex() );
@@ -2907,7 +2906,7 @@ void SAL_CALL OStorage::copyStorageElementLastCommitTo(
embed::StorageWrappedTargetException,
uno::RuntimeException )
{
- RTL_LOGFILE_CONTEXT( aLog, "package (mv76033) OStorage::copyStorageElementLastCommitTo" );
+ SAL_INFO( "package.xstor", "package (mv76033) OStorage::copyStorageElementLastCommitTo" );
::osl::MutexGuard aGuard( m_pData->m_rSharedMutexRef->GetMutex() );
@@ -3140,7 +3139,7 @@ void SAL_CALL OStorage::removeElement( const OUString& aElementName )
embed::StorageWrappedTargetException,
uno::RuntimeException )
{
- RTL_LOGFILE_CONTEXT( aLog, "package (mv76033) OStorage::removeElement" );
+ SAL_INFO( "package.xstor", "package (mv76033) OStorage::removeElement" );
::osl::ResettableMutexGuard aGuard( m_pData->m_rSharedMutexRef->GetMutex() );
@@ -3233,7 +3232,7 @@ void SAL_CALL OStorage::renameElement( const OUString& aElementName, const OUStr
embed::StorageWrappedTargetException,
uno::RuntimeException )
{
- RTL_LOGFILE_CONTEXT( aLog, "package (mv76033) OStorage::renameElement" );
+ SAL_INFO( "package.xstor", "package (mv76033) OStorage::renameElement" );
::osl::ResettableMutexGuard aGuard( m_pData->m_rSharedMutexRef->GetMutex() );
@@ -3338,7 +3337,7 @@ void SAL_CALL OStorage::copyElementTo( const OUString& aElementName,
embed::StorageWrappedTargetException,
uno::RuntimeException )
{
- RTL_LOGFILE_CONTEXT( aLog, "package (mv76033) OStorage::copyElementTo" );
+ SAL_INFO( "package.xstor", "package (mv76033) OStorage::copyElementTo" );
::osl::MutexGuard aGuard( m_pData->m_rSharedMutexRef->GetMutex() );
@@ -3441,7 +3440,7 @@ void SAL_CALL OStorage::moveElementTo( const OUString& aElementName,
embed::StorageWrappedTargetException,
uno::RuntimeException )
{
- RTL_LOGFILE_CONTEXT( aLog, "package (mv76033) OStorage::moveElementTo" );
+ SAL_INFO( "package.xstor", "package (mv76033) OStorage::moveElementTo" );
::osl::ResettableMutexGuard aGuard( m_pData->m_rSharedMutexRef->GetMutex() );
@@ -3557,7 +3556,7 @@ uno::Reference< io::XStream > SAL_CALL OStorage::openEncryptedStream(
embed::StorageWrappedTargetException,
uno::RuntimeException )
{
- RTL_LOGFILE_CONTEXT( aLog, "package (mv76033) OStorage::openEncryptedStream" );
+ SAL_INFO( "package.xstor", "package (mv76033) OStorage::openEncryptedStream" );
::osl::ResettableMutexGuard aGuard( m_pData->m_rSharedMutexRef->GetMutex() );
@@ -3583,7 +3582,7 @@ uno::Reference< io::XStream > SAL_CALL OStorage::openEncryptedStream(
OSL_ENSURE( pElement && pElement->m_pStream, "In case element can not be created an exception must be thrown!" );
xResult = pElement->m_pStream->GetStream( nOpenMode, aEncryptionData, sal_False );
- OSL_ENSURE( xResult.is(), "The method must throw exception instead of removing empty result!\n" );
+ SAL_WARN_IF( !xResult.is(), "package.xstor", "The method must throw exception instead of removing empty result!" );
if ( m_pData->m_bReadOnlyWrap )
{
@@ -3667,7 +3666,7 @@ uno::Reference< io::XStream > SAL_CALL OStorage::cloneEncryptedStream(
embed::StorageWrappedTargetException,
uno::RuntimeException )
{
- RTL_LOGFILE_CONTEXT( aLog, "package (mv76033) OStorage::cloneEncryptedStream" );
+ SAL_INFO( "package.xstor", "package (mv76033) OStorage::cloneEncryptedStream" );
::osl::MutexGuard aGuard( m_pData->m_rSharedMutexRef->GetMutex() );
@@ -3760,7 +3759,7 @@ uno::Reference< io::XInputStream > SAL_CALL OStorage::getPlainRawStreamElement(
embed::StorageWrappedTargetException,
uno::RuntimeException )
{
- RTL_LOGFILE_CONTEXT( aLog, "package (mv76033) OStorage::getPlainRawStreamElement" );
+ SAL_INFO( "package.xstor", "package (mv76033) OStorage::getPlainRawStreamElement" );
::osl::MutexGuard aGuard( m_pData->m_rSharedMutexRef->GetMutex() );
@@ -3868,7 +3867,7 @@ uno::Reference< io::XInputStream > SAL_CALL OStorage::getRawEncrStreamElement(
embed::StorageWrappedTargetException,
uno::RuntimeException )
{
- RTL_LOGFILE_CONTEXT( aLog, "package (mv76033) OStorage::getRawEncrStreamElement" );
+ SAL_INFO( "package.xstor", "package (mv76033) OStorage::getRawEncrStreamElement" );
::osl::MutexGuard aGuard( m_pData->m_rSharedMutexRef->GetMutex() );
@@ -3986,7 +3985,7 @@ void SAL_CALL OStorage::insertRawEncrStreamElement( const OUString& aStreamName,
embed::StorageWrappedTargetException,
uno::RuntimeException)
{
- RTL_LOGFILE_CONTEXT( aLog, "package (mv76033) OStorage::insertRawEncrStreamElement" );
+ SAL_INFO( "package.xstor", "package (mv76033) OStorage::insertRawEncrStreamElement" );
::osl::MutexGuard aGuard( m_pData->m_rSharedMutexRef->GetMutex() );
@@ -4080,7 +4079,7 @@ void SAL_CALL OStorage::commit()
embed::StorageWrappedTargetException,
uno::RuntimeException )
{
- RTL_LOGFILE_CONTEXT( aLog, "package (mv76033) OStorage::commit" );
+ SAL_INFO( "package.xstor", "package (mv76033) OStorage::commit" );
uno::Reference< util::XModifiable > xParentModif;
@@ -4146,7 +4145,7 @@ void SAL_CALL OStorage::revert()
embed::StorageWrappedTargetException,
uno::RuntimeException )
{
- RTL_LOGFILE_CONTEXT( aLog, "package (mv76033) OStorage::revert" );
+ SAL_INFO( "package.xstor", "package (mv76033) OStorage::revert" );
// the method removes all the changes done after last commit
@@ -4344,7 +4343,7 @@ uno::Any SAL_CALL OStorage::getByName( const OUString& aName )
lang::WrappedTargetException,
uno::RuntimeException )
{
- RTL_LOGFILE_CONTEXT( aLog, "package (mv76033) OStorage::getByName" );
+ SAL_INFO( "package.xstor", "package (mv76033) OStorage::getByName" );
::osl::MutexGuard aGuard( m_pData->m_rSharedMutexRef->GetMutex() );
@@ -4410,7 +4409,7 @@ uno::Any SAL_CALL OStorage::getByName( const OUString& aName )
uno::Sequence< OUString > SAL_CALL OStorage::getElementNames()
throw ( uno::RuntimeException )
{
- RTL_LOGFILE_CONTEXT( aLog, "package (mv76033) OStorage::getElementNames" );
+ SAL_INFO( "package.xstor", "package (mv76033) OStorage::getElementNames" );
::osl::MutexGuard aGuard( m_pData->m_rSharedMutexRef->GetMutex() );
@@ -4448,7 +4447,7 @@ uno::Sequence< OUString > SAL_CALL OStorage::getElementNames()
sal_Bool SAL_CALL OStorage::hasByName( const OUString& aName )
throw ( uno::RuntimeException )
{
- RTL_LOGFILE_CONTEXT( aLog, "package (mv76033) OStorage::hasByName" );
+ SAL_INFO( "package.xstor", "package (mv76033) OStorage::hasByName" );
::osl::MutexGuard aGuard( m_pData->m_rSharedMutexRef->GetMutex() );
@@ -4512,7 +4511,7 @@ uno::Type SAL_CALL OStorage::getElementType()
sal_Bool SAL_CALL OStorage::hasElements()
throw ( uno::RuntimeException )
{
- RTL_LOGFILE_CONTEXT( aLog, "package (mv76033) OStorage::hasElements" );
+ SAL_INFO( "package.xstor", "package (mv76033) OStorage::hasElements" );
::osl::MutexGuard aGuard( m_pData->m_rSharedMutexRef->GetMutex() );
@@ -4627,7 +4626,7 @@ void SAL_CALL OStorage::setEncryptionPassword( const OUString& aPass )
throw ( uno::RuntimeException,
io::IOException )
{
- RTL_LOGFILE_CONTEXT( aLog, "package (mv76033) OStorage::setEncryptionPassword" );
+ SAL_INFO( "package.xstor", "package (mv76033) OStorage::setEncryptionPassword" );
setEncryptionData( ::comphelper::OStorageHelper::CreatePackageEncryptionData( aPass ) );
}
@@ -4636,7 +4635,7 @@ void SAL_CALL OStorage::removeEncryption()
throw ( uno::RuntimeException,
io::IOException )
{
- RTL_LOGFILE_CONTEXT( aLog, "package (mv76033) OStorage::removeEncryption" );
+ SAL_INFO( "package.xstor", "package (mv76033) OStorage::removeEncryption" );
::osl::MutexGuard aGuard( m_pData->m_rSharedMutexRef->GetMutex() );
@@ -4649,7 +4648,7 @@ void SAL_CALL OStorage::removeEncryption()
if ( m_pData->m_nStorageType != embed::StorageFormats::PACKAGE )
throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); // the interface must be visible only for package storage
- OSL_ENSURE( m_pData->m_bIsRoot, "removeEncryption() method is not available for nonroot storages!\n" );
+ SAL_WARN_IF( !m_pData->m_bIsRoot, "package.xstor", "removeEncryption() method is not available for nonroot storages!" );
if ( m_pData->m_bIsRoot )
{
try {
@@ -4690,7 +4689,7 @@ void SAL_CALL OStorage::removeEncryption()
m_pImpl->AddLog( rRException.Message );
m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" );
- OSL_ENSURE( sal_False, "The call must not fail, it is pretty simple!" );
+ SAL_WARN( "package.xstor", "The call must not fail, it is pretty simple!" );
throw;
}
catch( const uno::Exception& rException )
@@ -4698,7 +4697,7 @@ void SAL_CALL OStorage::removeEncryption()
m_pImpl->AddLog( rException.Message );
m_pImpl->AddLog( OSL_LOG_PREFIX "Rethrow" );
- OSL_FAIL( "The call must not fail, it is pretty simple!" );
+ SAL_WARN( "package.xstor", "The call must not fail, it is pretty simple!" );
throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() );
}
}
@@ -4712,7 +4711,7 @@ void SAL_CALL OStorage::setEncryptionData( const uno::Sequence< beans::NamedValu
throw ( io::IOException,
uno::RuntimeException )
{
- RTL_LOGFILE_CONTEXT( aLog, "package (mv76033) OStorage::setEncryptionData" );
+ SAL_INFO( "package.xstor", "package (mv76033) OStorage::setEncryptionData" );
::osl::MutexGuard aGuard( m_pData->m_rSharedMutexRef->GetMutex() );
@@ -4728,7 +4727,7 @@ void SAL_CALL OStorage::setEncryptionData( const uno::Sequence< beans::NamedValu
if ( !aEncryptionData.getLength() )
throw uno::RuntimeException( OSL_LOG_PREFIX "Unexpected empty encryption data!", uno::Reference< uno::XInterface >() );
- OSL_ENSURE( m_pData->m_bIsRoot, "setEncryptionData() method is not available for nonroot storages!\n" );
+ SAL_WARN_IF( !m_pData->m_bIsRoot, "package.xstor", "setEncryptionData() method is not available for nonroot storages!" );
if ( m_pData->m_bIsRoot )
{
try {
@@ -4788,7 +4787,7 @@ sal_Bool SAL_CALL OStorage::hasEncryptionData()
void SAL_CALL OStorage::setEncryptionAlgorithms( const uno::Sequence< beans::NamedValue >& aAlgorithms )
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
- RTL_LOGFILE_CONTEXT( aLog, "package (mv76033) OStorage::setEncryptionAlgorithms" );
+ SAL_INFO( "package.xstor", "package (mv76033) OStorage::setEncryptionAlgorithms" );
::osl::MutexGuard aGuard( m_pData->m_rSharedMutexRef->GetMutex() );
@@ -4804,7 +4803,7 @@ void SAL_CALL OStorage::setEncryptionAlgorithms( const uno::Sequence< beans::Nam
if ( !aAlgorithms.getLength() )
throw uno::RuntimeException( OSL_LOG_PREFIX "Unexpected empty encryption algorithms list!", uno::Reference< uno::XInterface >() );
- OSL_ENSURE( m_pData->m_bIsRoot, "setEncryptionAlgorithms() method is not available for nonroot storages!\n" );
+ SAL_WARN_IF( !m_pData->m_bIsRoot, "package.xstor", "setEncryptionAlgorithms() method is not available for nonroot storages!" );
if ( m_pData->m_bIsRoot )
{
try {
@@ -4854,7 +4853,7 @@ void SAL_CALL OStorage::setEncryptionAlgorithms( const uno::Sequence< beans::Nam
uno::Sequence< beans::NamedValue > SAL_CALL OStorage::getEncryptionAlgorithms()
throw (uno::RuntimeException)
{
- RTL_LOGFILE_CONTEXT( aLog, "package (mv76033) OStorage::getEncryptionAlgorithms" );
+ SAL_INFO( "package.xstor", "package (mv76033) OStorage::getEncryptionAlgorithms" );
::osl::MutexGuard aGuard( m_pData->m_rSharedMutexRef->GetMutex() );
@@ -4868,7 +4867,7 @@ uno::Sequence< beans::NamedValue > SAL_CALL OStorage::getEncryptionAlgorithms()
throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); // the interface must be visible only for package storage
uno::Sequence< beans::NamedValue > aResult;
- OSL_ENSURE( m_pData->m_bIsRoot, "getEncryptionAlgorithms() method is not available for nonroot storages!\n" );
+ SAL_WARN_IF( !m_pData->m_bIsRoot, "package.xstor", "getEncryptionAlgorithms() method is not available for nonroot storages!" );
if ( m_pData->m_bIsRoot )
{
try {
@@ -4945,7 +4944,7 @@ void SAL_CALL OStorage::setPropertyValue( const OUString& aPropertyName, const u
lang::WrappedTargetException,
uno::RuntimeException )
{
- RTL_LOGFILE_CONTEXT( aLog, "package (mv76033) OStorage::setPropertyValue" );
+ SAL_INFO( "package.xstor", "package (mv76033) OStorage::setPropertyValue" );
::osl::MutexGuard aGuard( m_pData->m_rSharedMutexRef->GetMutex() );
@@ -5054,7 +5053,7 @@ uno::Any SAL_CALL OStorage::getPropertyValue( const OUString& aPropertyName )
lang::WrappedTargetException,
uno::RuntimeException )
{
- RTL_LOGFILE_CONTEXT( aLog, "package (mv76033) OStorage::getPropertyValue" );
+ SAL_INFO( "package.xstor", "package (mv76033) OStorage::getPropertyValue" );
::osl::MutexGuard aGuard( m_pData->m_rSharedMutexRef->GetMutex() );
@@ -5651,7 +5650,7 @@ void SAL_CALL OStorage::insertStreamElementDirect(
embed::StorageWrappedTargetException,
uno::RuntimeException )
{
- RTL_LOGFILE_CONTEXT( aLog, "package (mv76033) OStorage::insertStreamElementDirect" );
+ SAL_INFO( "package.xstor", "package (mv76033) OStorage::insertStreamElementDirect" );
::osl::MutexGuard aGuard( m_pData->m_rSharedMutexRef->GetMutex() );
@@ -5743,7 +5742,7 @@ void SAL_CALL OStorage::copyElementDirectlyTo(
embed::StorageWrappedTargetException,
uno::RuntimeException )
{
- RTL_LOGFILE_CONTEXT( aLog, "package (mv76033) OStorage::copyElementDirectlyTo" );
+ SAL_INFO( "package.xstor", "package (mv76033) OStorage::copyElementDirectlyTo" );
::osl::MutexGuard aGuard( m_pData->m_rSharedMutexRef->GetMutex() );
@@ -5842,7 +5841,7 @@ void SAL_CALL OStorage::writeAndAttachToStream( const uno::Reference< io::XStrea
embed::StorageWrappedTargetException,
uno::RuntimeException )
{
- RTL_LOGFILE_CONTEXT( aLog, "package (mv76033) OStorage::writeAndAttachToStream" );
+ SAL_INFO( "package.xstor", "package (mv76033) OStorage::writeAndAttachToStream" );
::osl::MutexGuard aGuard( m_pData->m_rSharedMutexRef->GetMutex() );
@@ -5914,7 +5913,7 @@ void SAL_CALL OStorage::attachToURL( const OUString& sURL,
embed::StorageWrappedTargetException,
uno::RuntimeException )
{
- RTL_LOGFILE_CONTEXT( aLog, "package (mv76033) OStorage::attachToURL" );
+ SAL_INFO( "package.xstor", "package (mv76033) OStorage::attachToURL" );
::osl::MutexGuard aGuard( m_pData->m_rSharedMutexRef->GetMutex() );
@@ -5999,7 +5998,7 @@ uno::Any SAL_CALL OStorage::getElementPropertyValue( const OUString& aElementNam
embed::StorageWrappedTargetException,
uno::RuntimeException)
{
- RTL_LOGFILE_CONTEXT( aLog, "package (mv76033) OStorage::getElementPropertyValue" );
+ SAL_INFO( "package.xstor", "package (mv76033) OStorage::getElementPropertyValue" );
::osl::MutexGuard aGuard( m_pData->m_rSharedMutexRef->GetMutex() );
@@ -6125,7 +6124,7 @@ void SAL_CALL OStorage::copyStreamElementData( const OUString& aStreamName, cons
uno::Reference< io::XStream > xNonconstRef = xTargetStream;
m_pImpl->CloneStreamElement( aStreamName, sal_False, ::comphelper::SequenceAsHashMap(), xNonconstRef );
- OSL_ENSURE( xNonconstRef == xTargetStream, "The provided stream reference seems not be filled in correctly!\n" );
+ SAL_WARN_IF( xNonconstRef != xTargetStream, "package.xstor", "The provided stream reference seems not be filled in correctly!" );
if ( xNonconstRef != xTargetStream )
throw uno::RuntimeException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); // if the stream reference is set it must not be changed!
}
diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx
index 73af0529e5ac..161aa92f21a4 100644
--- a/sd/source/filter/xml/sdxmlwrp.cxx
+++ b/sd/source/filter/xml/sdxmlwrp.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <rtl/logfile.hxx>
#include <rtl/strbuf.hxx>
#include <com/sun/star/container/XChild.hpp>
#include <com/sun/star/beans/XPropertySetInfo.hpp>
@@ -210,7 +209,7 @@ sal_Int32 ReadThroughComponent(
DBG_ASSERT(rxContext.is(), "factory missing");
DBG_ASSERT(NULL != pFilterName,"I need a service name for the component!");
- RTL_LOGFILE_CONTEXT( aLog, "ReadThroughComponent" );
+ SAL_INFO( "sd.filter", "ReadThroughComponent" );
// prepare ParserInputSrouce
xml::sax::InputSource aParserInput;
@@ -219,17 +218,17 @@ sal_Int32 ReadThroughComponent(
// get parser
Reference< xml::sax::XParser > xParser = xml::sax::Parser::create(rxContext);
- RTL_LOGFILE_CONTEXT_TRACE( aLog, "parser created" );
+ SAL_INFO( "sd.filter", "parser created" );
// get filter
OUString aFilterName(OUString::createFromAscii(pFilterName));
Reference< xml::sax::XDocumentHandler > xFilter(
rxContext->getServiceManager()->createInstanceWithArgumentsAndContext(aFilterName, rFilterArguments, rxContext),
UNO_QUERY );
- SAL_WARN_IF(!xFilter.is(), "sd", "Can't instantiate filter component: " << aFilterName);
+ SAL_WARN_IF(!xFilter.is(), "sd.filter", "Can't instantiate filter component: " << aFilterName);
if( !xFilter.is() )
return SD_XML_READERROR;
- RTL_LOGFILE_CONTEXT_TRACE1( aLog, "%s created", pFilterName );
+ SAL_INFO( "sd.filter", "" << pFilterName << " created" );
// connect parser and filter
xParser->setDocumentHandler( xFilter );
@@ -238,7 +237,7 @@ sal_Int32 ReadThroughComponent(
Reference < XImporter > xImporter( xFilter, UNO_QUERY );
xImporter->setTargetDocument( xModelComponent );
// finally, parser the stream
- RTL_LOGFILE_CONTEXT_TRACE( aLog, "parsing stream" );
+ SAL_INFO( "sd.filter", "parsing stream" );
try
{
xParser->parseStream( aParserInput );
@@ -267,10 +266,7 @@ sal_Int32 ReadThroughComponent(
return ERRCODE_SFX_WRONGPASSWORD;
#if OSL_DEBUG_LEVEL > 1
- OStringBuffer aError("SAX parse exception caught while importing:\n");
- aError.append(OUStringToOString(r.Message,
- RTL_TEXTENCODING_ASCII_US));
- OSL_FAIL(aError.getStr());
+ SAL_WARN( "sd.filter", "SAX parse exception caught while importing:" << r.Message);
#endif
String sErr( OUString::number( r.LineNumber ));
@@ -302,20 +298,14 @@ sal_Int32 ReadThroughComponent(
return ERRCODE_SFX_WRONGPASSWORD;
#if OSL_DEBUG_LEVEL > 1
- OStringBuffer aError("SAX exception caught while importing:\n");
- aError.append(OUStringToOString(r.Message,
- RTL_TEXTENCODING_ASCII_US));
- OSL_FAIL(aError.getStr());
+ SAL_WARN( "sd.filter", "SAX exception caught while importing:" << r.Message);
#endif
return SD_XML_READERROR;
}
catch (const packages::zip::ZipIOException& r)
{
#if OSL_DEBUG_LEVEL > 1
- OStringBuffer aError("Zip exception caught while importing:\n");
- aError.append(OUStringToOString(r.Message,
- RTL_TEXTENCODING_ASCII_US));
- OSL_FAIL(aError.getStr());
+ SAL_WARN( "sd.filter", "Zip exception caught while importing:" << r.Message);
#else
(void)r;
#endif
@@ -324,10 +314,7 @@ sal_Int32 ReadThroughComponent(
catch (const io::IOException& r)
{
#if OSL_DEBUG_LEVEL > 1
- OStringBuffer aError("IO exception caught while importing:\n");
- aError.append(OUStringToOString(r.Message,
- RTL_TEXTENCODING_ASCII_US));
- OSL_FAIL(aError.getStr());
+ SAL_WARN( "sd.filter", "IO exception caught while importing:" << r.Message);
#else
(void)r;
#endif
@@ -336,10 +323,7 @@ sal_Int32 ReadThroughComponent(
catch (const uno::Exception& r)
{
#if OSL_DEBUG_LEVEL > 1
- OStringBuffer aError("uno exception caught while importing:\n");
- aError.append(OUStringToOString(r.Message,
- RTL_TEXTENCODING_ASCII_US));
- OSL_FAIL(aError.getStr());
+ SAL_WARN( "sd.filter", "uno exception caught while importing:" << r.Message);
#else
(void)r;
#endif
@@ -449,10 +433,10 @@ sal_Int32 ReadThroughComponent(
sal_Bool SdXMLFilter::Import( ErrCode& nError )
{
- RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sd", "cl93746", "SdXMLFilter::Import" );
+ SAL_INFO( "sd.filter", "sd cl93746 SdXMLFilter::Import" );
#ifdef TIMELOG
OString aFile(OUStringToOString(mrMedium.GetName(), RTL_TEXTENCODING_ASCII_US));
- RTL_LOGFILE_CONTEXT_TRACE1( aLog, "importing %s", aFile.getStr() );
+ SAL_INFO( "sd.filter", "importing " << aFile.getStr() );
#endif
sal_uInt32 nRet = 0;
@@ -754,7 +738,7 @@ sal_Bool SdXMLFilter::Import( ErrCode& nError )
}
catch (const Exception&)
{
- OSL_FAIL("sd::SdXMLFilter::Import(), exception during clearing of unused named items");
+ SAL_WARN( "sd.filter","sd::SdXMLFilter::Import(), exception during clearing of unused named items");
}
}
@@ -827,9 +811,9 @@ sal_Bool SdXMLFilter::Import( ErrCode& nError )
sal_Bool SdXMLFilter::Export()
{
#ifdef TIMELOG
- RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sd", "cl93746", "SdXMLFilter::Export" );
+ SAL_INFO( "sd.filter", "sd cl93746 SdXMLFilter::Export" );
OString aFile(OUStringToOString(mrMedium.GetName(), RTL_TEXTENCODING_ASCII_US));
- RTL_LOGFILE_CONTEXT_TRACE1( aLog, "exporting %s", aFile.getStr() );
+ SAL_INFO( "sd.filter", "exporting " << aFile.getStr() );
#endif
SvXMLEmbeddedObjectHelper* pObjectHelper = NULL;
@@ -838,7 +822,7 @@ sal_Bool SdXMLFilter::Export()
if( !mxModel.is() )
{
- OSL_FAIL("Got NO Model in XMLExport");
+ SAL_WARN( "sd.filter","Got NO Model in XMLExport");
return sal_False;
}
@@ -852,7 +836,7 @@ sal_Bool SdXMLFilter::Export()
if( !xServiceInfo.is() || !xServiceInfo->supportsService( "com.sun.star.drawing.GenericDrawingDocument" ) )
{
- OSL_FAIL( "Model is no DrawingDocument in XMLExport" );
+ SAL_WARN( "sd.filter", "Model is no DrawingDocument in XMLExport" );
return sal_False;
}
@@ -996,7 +980,7 @@ sal_Bool SdXMLFilter::Export()
// doc export
do
{
- RTL_LOGFILE_CONTEXT_TRACE1( aLog, "exporting substream %s", pServices->mpStream );
+ SAL_INFO( "sd.filter", "exporting substream " << pServices->mpStream );
uno::Reference<io::XOutputStream> xDocOut;
if( xStorage.is() )
@@ -1064,10 +1048,7 @@ sal_Bool SdXMLFilter::Export()
catch (const uno::Exception &e)
{
#if OSL_DEBUG_LEVEL > 1
- OStringBuffer aError("uno Exception caught while exporting:\n");
- aError.append(OUStringToOString(e.Message,
- RTL_TEXTENCODING_ASCII_US));
- OSL_FAIL(aError.getStr());
+ SAL_WARN( "sd.filter", "uno Exception caught while exporting:" << e.Message);
#else
(void)e;
#endif
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 );
diff --git a/slideshow/source/engine/shapes/backgroundshape.cxx b/slideshow/source/engine/shapes/backgroundshape.cxx
index 1fe56fc68625..b1c8395220ec 100644
--- a/slideshow/source/engine/shapes/backgroundshape.cxx
+++ b/slideshow/source/engine/shapes/backgroundshape.cxx
@@ -24,7 +24,6 @@
#include <com/sun/star/awt/Rectangle.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/awt/FontWeight.hpp>
-#include <rtl/logfile.hxx>
#include <vcl/metaact.hxx>
#include <vcl/gdimtf.hxx>
@@ -270,8 +269,8 @@ namespace slideshow
bool BackgroundShape::render() const
{
- RTL_LOGFILE_CONTEXT( aLog, "::presentation::internal::BackgroundShape::render()" );
- RTL_LOGFILE_CONTEXT_TRACE1( aLog, "::presentation::internal::BackgroundShape: 0x%X", this );
+ SAL_INFO( "slideshow", "::presentation::internal::BackgroundShape::render()" );
+ SAL_INFO( "slideshow", "::presentation::internal::BackgroundShape: 0x" << std::hex << this );
// gcc again...
const ::basegfx::B2DRectangle& rCurrBounds( BackgroundShape::getBounds() );
diff --git a/slideshow/source/engine/shapes/drawshape.cxx b/slideshow/source/engine/shapes/drawshape.cxx
index ace22211aefd..75435695ec23 100644
--- a/slideshow/source/engine/shapes/drawshape.cxx
+++ b/slideshow/source/engine/shapes/drawshape.cxx
@@ -22,7 +22,6 @@
#include <tools/diagnose_ex.h>
#include <canvas/verbosetrace.hxx>
-#include <rtl/logfile.hxx>
#include <osl/diagnose.hxx>
#include <com/sun/star/awt/Rectangle.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
@@ -150,8 +149,8 @@ namespace slideshow
bool DrawShape::implRender( int nUpdateFlags ) const
{
- RTL_LOGFILE_CONTEXT( aLog, "::presentation::internal::DrawShape::implRender()" );
- RTL_LOGFILE_CONTEXT_TRACE1( aLog, "::presentation::internal::DrawShape: 0x%X", this );
+ SAL_INFO( "slideshow", "::presentation::internal::DrawShape::implRender()" );
+ SAL_INFO( "slideshow", "::presentation::internal::DrawShape: 0x" << std::hex << this );
// will perform the update now, clear update-enforcing
// flags
@@ -621,10 +620,7 @@ namespace slideshow
}
catch (uno::Exception &)
{
- OSL_FAIL( OUStringToOString(
- comphelper::anyToString(
- cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 ).getStr() );
+ SAL_WARN( "slideshow", "" << comphelper::anyToString(cppu::getCaughtException() ) );
}
}
@@ -930,7 +926,7 @@ namespace slideshow
{
if (!maHyperlinkIndices.empty() &&
maHyperlinkIndices.back().second == -1) {
- OSL_FAIL( "### pending FIELD_SEQ_END!" );
+ SAL_WARN( "slideshow", "### pending FIELD_SEQ_END!" );
maHyperlinkIndices.pop_back();
maHyperlinkRegions.pop_back();
}
@@ -961,7 +957,7 @@ namespace slideshow
}
if (!maHyperlinkIndices.empty() &&
maHyperlinkIndices.back().second == -1) {
- OSL_FAIL( "### pending FIELD_SEQ_END!" );
+ SAL_WARN( "slideshow", "### pending FIELD_SEQ_END!" );
maHyperlinkIndices.pop_back();
maHyperlinkRegions.pop_back();
}
diff --git a/slideshow/source/engine/shapes/drawshapesubsetting.cxx b/slideshow/source/engine/shapes/drawshapesubsetting.cxx
index ddb5ee46397d..a05305575606 100644
--- a/slideshow/source/engine/shapes/drawshapesubsetting.cxx
+++ b/slideshow/source/engine/shapes/drawshapesubsetting.cxx
@@ -24,7 +24,6 @@
#include <canvas/verbosetrace.hxx>
#include <rtl/math.hxx>
-#include <rtl/logfile.hxx>
#include <vcl/metaact.hxx>
#include <vcl/gdimtf.hxx>
@@ -300,7 +299,7 @@ namespace slideshow
AttributableShapeSharedPtr DrawShapeSubsetting::getSubsetShape( const DocTreeNode& rTreeNode ) const
{
- RTL_LOGFILE_CONTEXT( aLog, "::presentation::internal::DrawShapeSubsetting::getSubsetShape()" );
+ SAL_INFO( "slideshow", "::presentation::internal::DrawShapeSubsetting::getSubsetShape()" );
// subset shape already created for this DocTreeNode?
SubsetEntry aEntry;
@@ -320,7 +319,7 @@ namespace slideshow
void DrawShapeSubsetting::addSubsetShape( const AttributableShapeSharedPtr& rShape )
{
- RTL_LOGFILE_CONTEXT( aLog, "::presentation::internal::DrawShapeSubsetting::addSubsetShape()" );
+ SAL_INFO( "slideshow", "::presentation::internal::DrawShapeSubsetting::addSubsetShape()" );
// subset shape already created for this DocTreeNode?
SubsetEntry aEntry;
@@ -354,7 +353,7 @@ namespace slideshow
bool DrawShapeSubsetting::revokeSubsetShape( const AttributableShapeSharedPtr& rShape )
{
- RTL_LOGFILE_CONTEXT( aLog, "::presentation::internal::DrawShapeSubsetting::revokeSubsetShape()" );
+ SAL_INFO( "slideshow", "::presentation::internal::DrawShapeSubsetting::revokeSubsetShape()" );
// lookup subset shape
SubsetEntry aEntry;
@@ -610,7 +609,7 @@ namespace slideshow
case DocTreeNode::NODETYPE_INVALID:
// FALLTHROUGH intended
default:
- OSL_FAIL("DrawShapeSubsetting::mapDocTreeNode(): unexpected node type");
+ SAL_WARN( "slideshow", "DrawShapeSubsetting::mapDocTreeNode(): unexpected node type");
return DrawShapeSubsetting::CLASS_NOOP;
case DocTreeNode::NODETYPE_LOGICAL_SHAPE:
diff --git a/slideshow/source/engine/shapes/viewbackgroundshape.cxx b/slideshow/source/engine/shapes/viewbackgroundshape.cxx
index 51e3fc3373d6..05f255b28604 100644
--- a/slideshow/source/engine/shapes/viewbackgroundshape.cxx
+++ b/slideshow/source/engine/shapes/viewbackgroundshape.cxx
@@ -25,7 +25,6 @@
#include "viewbackgroundshape.hxx"
#include "tools.hxx"
-#include <rtl/logfile.hxx>
#include <rtl/math.hxx>
#include <comphelper/anytostring.hxx>
@@ -57,7 +56,7 @@ namespace slideshow
bool ViewBackgroundShape::prefetch( const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas,
const GDIMetaFileSharedPtr& rMtf ) const
{
- RTL_LOGFILE_CONTEXT( aLog, "::presentation::internal::ViewBackgroundShape::prefetch()" );
+ SAL_INFO( "slideshow", "::presentation::internal::ViewBackgroundShape::prefetch()" );
ENSURE_OR_RETURN_FALSE( rMtf,
"ViewBackgroundShape::prefetch(): no valid metafile!" );
@@ -152,7 +151,7 @@ namespace slideshow
bool ViewBackgroundShape::render( const GDIMetaFileSharedPtr& rMtf ) const
{
- RTL_LOGFILE_CONTEXT( aLog, "::presentation::internal::ViewBackgroundShape::draw()" );
+ SAL_INFO( "slideshow", "::presentation::internal::ViewBackgroundShape::draw()" );
const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas( mpViewLayer->getCanvas() );
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index 91d4088e8f57..52e6319e13a6 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -24,7 +24,6 @@
#include <comphelper/accessibletexthelper.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/storagehelper.hxx>
-#include <rtl/logfile.hxx>
#include <rtl/ustring.hxx>
#include <unotools/eventcfg.hxx>
#include <sfx2/event.hxx>
@@ -133,7 +132,7 @@ void SmDocShell::SFX_NOTIFY(SfxBroadcaster&, const TypeId&,
void SmDocShell::LoadSymbols()
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::LoadSymbols" );
+ SAL_INFO( "starmath", "starmath: SmDocShell::LoadSymbols" );
SmModule *pp = SM_MOD();
pp->GetSymbolManager().Load();
@@ -142,7 +141,7 @@ void SmDocShell::LoadSymbols()
const String SmDocShell::GetComment() const
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::GetComment" );
+ SAL_INFO( "starmath", "starmath: SmDocShell::GetComment" );
uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
const_cast<SmDocShell*>(this)->GetModel(), uno::UNO_QUERY_THROW);
uno::Reference<document::XDocumentProperties> xDocProps(
@@ -153,7 +152,7 @@ const String SmDocShell::GetComment() const
void SmDocShell::SetText(const OUString& rBuffer)
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SetText" );
+ SAL_INFO( "starmath", "starmath: SmDocShell::SetText" );
if (rBuffer != OUString(aText))
{
@@ -206,7 +205,7 @@ void SmDocShell::SetText(const OUString& rBuffer)
void SmDocShell::SetFormat(SmFormat& rFormat)
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SetFormat" );
+ SAL_INFO( "starmath", "starmath: SmDocShell::SetFormat" );
aFormat = rFormat;
SetFormulaArranged( false );
@@ -226,7 +225,7 @@ void SmDocShell::SetFormat(SmFormat& rFormat)
OUString SmDocShell::GetAccessibleText()
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::GetAccessibleText" );
+ SAL_INFO( "starmath", "starmath: SmDocShell::GetAccessibleText" );
if (!IsFormulaArranged())
ArrangeFormula();
@@ -245,7 +244,7 @@ OUString SmDocShell::GetAccessibleText()
void SmDocShell::Parse()
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::Parse" );
+ SAL_INFO( "starmath", "starmath: SmDocShell::Parse" );
if (pTree)
delete pTree;
@@ -260,7 +259,7 @@ void SmDocShell::Parse()
void SmDocShell::ArrangeFormula()
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::ArrangeFormula" );
+ SAL_INFO( "starmath", "starmath: SmDocShell::ArrangeFormula" );
if (IsFormulaArranged())
return;
@@ -273,7 +272,7 @@ void SmDocShell::ArrangeFormula()
if (!pOutDev)
{
#if OSL_DEBUG_LEVEL > 1
- OSL_FAIL("!! SmDocShell::ArrangeFormula: reference device missing !!");
+ SAL_WARN( "starmath", "!! SmDocShell::ArrangeFormula: reference device missing !!");
#endif
}
@@ -371,7 +370,7 @@ void SetEditEngineDefaultFonts(SfxItemPool &rEditEngineItemPool)
EditEngine& SmDocShell::GetEditEngine()
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::GetEditEngine" );
+ SAL_INFO( "starmath", "starmath: SmDocShell::GetEditEngine" );
if (!pEditEngine)
{
@@ -416,7 +415,7 @@ EditEngine& SmDocShell::GetEditEngine()
SfxItemPool& SmDocShell::GetEditEngineItemPool()
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::GetEditEngineItemPool" );
+ SAL_INFO( "starmath", "starmath: SmDocShell::GetEditEngineItemPool" );
if (!pEditEngineItemPool)
GetEditEngine();
@@ -426,7 +425,7 @@ SfxItemPool& SmDocShell::GetEditEngineItemPool()
void SmDocShell::DrawFormula(OutputDevice &rDev, Point &rPosition, bool bDrawSelection)
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::Draw" );
+ SAL_INFO( "starmath", "starmath: SmDocShell::Draw" );
if (!pTree)
Parse();
@@ -483,7 +482,7 @@ void SmDocShell::DrawFormula(OutputDevice &rDev, Point &rPosition, bool bDrawSel
Size SmDocShell::GetSize()
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::GetSize" );
+ SAL_INFO( "starmath", "starmath: SmDocShell::GetSize" );
Size aRet;
@@ -590,7 +589,7 @@ SmPrinterAccess::~SmPrinterAccess()
Printer* SmDocShell::GetPrt()
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::GetPrt" );
+ SAL_INFO( "starmath", "starmath: SmDocShell::GetPrt" );
if ( SFX_CREATE_MODE_EMBEDDED == GetCreateMode() )
{
@@ -625,7 +624,7 @@ Printer* SmDocShell::GetPrt()
OutputDevice* SmDocShell::GetRefDev()
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::GetRefDev" );
+ SAL_INFO( "starmath", "starmath: SmDocShell::GetRefDev" );
if ( SFX_CREATE_MODE_EMBEDDED == GetCreateMode() )
{
@@ -640,7 +639,7 @@ OutputDevice* SmDocShell::GetRefDev()
void SmDocShell::SetPrinter( SfxPrinter *pNew )
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SetPrinter" );
+ SAL_INFO( "starmath", "starmath: SmDocShell::SetPrinter" );
delete pPrinter;
pPrinter = pNew; //Transfer ownership
@@ -651,7 +650,7 @@ void SmDocShell::SetPrinter( SfxPrinter *pNew )
void SmDocShell::OnDocumentPrinterChanged( Printer *pPrt )
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::OnDocumentPrinterChanged" );
+ SAL_INFO( "starmath", "starmath: SmDocShell::OnDocumentPrinterChanged" );
pTmpPrinter = pPrt;
SetFormulaArranged(false);
@@ -664,7 +663,7 @@ void SmDocShell::OnDocumentPrinterChanged( Printer *pPrt )
void SmDocShell::Repaint()
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::Repaint" );
+ SAL_INFO( "starmath", "starmath: SmDocShell::Repaint" );
bool bIsEnabled = IsEnableSetModified();
if ( bIsEnabled )
@@ -694,7 +693,7 @@ SmDocShell::SmDocShell( const sal_uInt64 i_nSfxCreationFlags ) :
bIsFormulaArranged ( false )
{
pCursor = NULL;
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SmDocShell" );
+ SAL_INFO( "starmath", "starmath: SmDocShell::SmDocShell" );
SetPool(&SFX_APP()->GetPool());
@@ -711,7 +710,7 @@ SmDocShell::SmDocShell( const sal_uInt64 i_nSfxCreationFlags ) :
SmDocShell::~SmDocShell()
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::~SmDocShell" );
+ SAL_INFO( "starmath", "starmath: SmDocShell::~SmDocShell" );
SmModule *pp = SM_MOD();
@@ -732,7 +731,7 @@ SmDocShell::~SmDocShell()
sal_Bool SmDocShell::SetData( const String& rData )
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SetData" );
+ SAL_INFO( "starmath", "starmath: SmDocShell::SetData" );
SetText( rData );
return true;
@@ -741,7 +740,7 @@ sal_Bool SmDocShell::SetData( const String& rData )
sal_Bool SmDocShell::ConvertFrom(SfxMedium &rMedium)
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::ConvertFrom" );
+ SAL_INFO( "starmath", "starmath: SmDocShell::ConvertFrom" );
bool bSuccess = false;
const String& rFltName = rMedium.GetFilter()->GetFilterName();
@@ -792,7 +791,7 @@ sal_Bool SmDocShell::ConvertFrom(SfxMedium &rMedium)
sal_Bool SmDocShell::InitNew( const uno::Reference < embed::XStorage >& xStorage )
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::InitNew" );
+ SAL_INFO( "starmath", "starmath: SmDocShell::InitNew" );
bool bRet = false;
if ( SfxObjectShell::InitNew( xStorage ) )
@@ -806,7 +805,7 @@ sal_Bool SmDocShell::InitNew( const uno::Reference < embed::XStorage >& xStorage
sal_Bool SmDocShell::Load( SfxMedium& rMedium )
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::Load" );
+ SAL_INFO( "starmath", "starmath: SmDocShell::Load" );
bool bRet = false;
if( SfxObjectShell::Load( rMedium ))
@@ -847,7 +846,7 @@ sal_Bool SmDocShell::Load( SfxMedium& rMedium )
sal_Bool SmDocShell::Save()
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::Save" );
+ SAL_INFO( "starmath", "starmath: SmDocShell::Save" );
//! apply latest changes if necessary
UpdateText();
@@ -905,7 +904,7 @@ sal_Bool SmDocShell::ReplaceBadChars()
void SmDocShell::UpdateText()
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::UpdateText" );
+ SAL_INFO( "starmath", "starmath: SmDocShell::UpdateText" );
if (pEditEngine && pEditEngine->IsModified())
{
@@ -918,7 +917,7 @@ void SmDocShell::UpdateText()
sal_Bool SmDocShell::SaveAs( SfxMedium& rMedium )
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SaveAs" );
+ SAL_INFO( "starmath", "starmath: SmDocShell::SaveAs" );
bool bRet = false;
@@ -942,7 +941,7 @@ sal_Bool SmDocShell::SaveAs( SfxMedium& rMedium )
sal_Bool SmDocShell::ConvertTo( SfxMedium &rMedium )
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::ConvertTo" );
+ SAL_INFO( "starmath", "starmath: SmDocShell::ConvertTo" );
bool bRet = false;
const SfxFilter* pFlt = rMedium.GetFilter();
@@ -976,7 +975,7 @@ sal_Bool SmDocShell::ConvertTo( SfxMedium &rMedium )
bool SmDocShell::writeFormulaOoxml( ::sax_fastparser::FSHelperPtr pSerializer, oox::core::OoxmlVersion version )
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::writeFormulaOoxml" );
+ SAL_INFO( "starmath", "starmath: SmDocShell::writeFormulaOoxml" );
if( !pTree )
Parse();
@@ -998,7 +997,7 @@ void SmDocShell::writeFormulaRtf(OStringBuffer& rBuffer, rtl_TextEncoding nEncod
void SmDocShell::readFormulaOoxml( oox::formulaimport::XmlStream& stream )
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::readFormulaOoxml" );
+ SAL_INFO( "starmath", "starmath: SmDocShell::readFormulaOoxml" );
SmOoxmlImport aEquation( stream );
SetText( aEquation.ConvertToStarMath());
@@ -1006,7 +1005,7 @@ void SmDocShell::readFormulaOoxml( oox::formulaimport::XmlStream& stream )
sal_Bool SmDocShell::SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage )
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SaveCompleted" );
+ SAL_INFO( "starmath", "starmath: SmDocShell::SaveCompleted" );
if( SfxObjectShell::SaveCompleted( xStorage ))
return true;
@@ -1017,7 +1016,7 @@ sal_Bool SmDocShell::SaveCompleted( const ::com::sun::star::uno::Reference< ::co
void SmDocShell::Execute(SfxRequest& rReq)
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::Execute" );
+ SAL_INFO( "starmath", "starmath: SmDocShell::Execute" );
switch (rReq.GetSlot())
{
@@ -1225,7 +1224,7 @@ void SmDocShell::Execute(SfxRequest& rReq)
void SmDocShell::GetState(SfxItemSet &rSet)
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::GetState" );
+ SAL_INFO( "starmath", "starmath: SmDocShell::GetState" );
SfxWhichIter aIter(rSet);
@@ -1324,7 +1323,7 @@ void SmDocShell::GetState(SfxItemSet &rSet)
::svl::IUndoManager *SmDocShell::GetUndoManager()
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::GetUndoManager" );
+ SAL_INFO( "starmath", "starmath: SmDocShell::GetUndoManager" );
if (!pEditEngine)
GetEditEngine();
@@ -1334,7 +1333,7 @@ void SmDocShell::GetState(SfxItemSet &rSet)
void SmDocShell::SaveSymbols()
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SaveSymbols" );
+ SAL_INFO( "starmath", "starmath: SmDocShell::SaveSymbols" );
SmModule *pp = SM_MOD();
pp->GetSymbolManager().Save();
@@ -1345,7 +1344,7 @@ void SmDocShell::Draw(OutputDevice *pDevice,
const JobSetup &,
sal_uInt16 /*nAspect*/)
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::Draw" );
+ SAL_INFO( "starmath", "starmath: SmDocShell::Draw" );
pDevice->IntersectClipRegion(GetVisArea());
Point atmppoint;
@@ -1359,7 +1358,7 @@ SfxItemPool& SmDocShell::GetPool() const
void SmDocShell::SetVisArea(const Rectangle & rVisArea)
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SetVisArea" );
+ SAL_INFO( "starmath", "starmath: SmDocShell::SetVisArea" );
Rectangle aNewRect(rVisArea);
@@ -1402,7 +1401,7 @@ void SmDocShell::FillClass(SvGlobalName* pClassName,
sal_Int32 nFileFormat,
sal_Bool bTemplate /* = sal_False */) const
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::FillClass" );
+ SAL_INFO( "starmath", "starmath: SmDocShell::FillClass" );
if (nFileFormat == SOFFICE_FILEFORMAT_60 )
{
@@ -1428,7 +1427,7 @@ sal_uLong SmDocShell::GetMiscStatus() const
void SmDocShell::SetModified(sal_Bool bModified)
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SetModified" );
+ SAL_INFO( "starmath", "starmath: SmDocShell::SetModified" );
if( IsEnableSetModified() )
{
@@ -1439,7 +1438,7 @@ void SmDocShell::SetModified(sal_Bool bModified)
bool SmDocShell::WriteAsMathType3( SfxMedium& rMedium )
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::WriteAsMathType3" );
+ SAL_INFO( "starmath", "starmath: SmDocShell::WriteAsMathType3" );
MathType aEquation( aText, pTree );
diff --git a/starmath/source/toolbox.cxx b/starmath/source/toolbox.cxx
index 75f606526a26..e556fd720147 100644
--- a/starmath/source/toolbox.cxx
+++ b/starmath/source/toolbox.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <rtl/logfile.hxx>
#include <svl/eitem.hxx>
#include <sfx2/app.hxx>
#include <svl/intitem.hxx>
@@ -48,7 +47,7 @@ static sal_uInt16 GetImageListRID( sal_uInt16 nCategoryRID )
case RID_FORMAT_CAT : nRes = RID_IL_FORMAT; break;
case RID_MISC_CAT : nRes = RID_IL_MISC; break;
default :
- OSL_FAIL( "unknown category" );
+ SAL_WARN( "starmath", "unknown category" );
}
return nRes;
}
@@ -93,7 +92,7 @@ static sal_uInt16 GetCategoryRID( sal_uInt16 nResId )
if (nResId != RID_IL_CATALOG)
{
#if OSL_DEBUG_LEVEL > 1
- OSL_FAIL( "unknown category" );
+ SAL_WARN( "starmath", "unknown category" );
#endif
}
}
@@ -111,7 +110,7 @@ SmToolBoxWindow::SmToolBoxWindow(SfxBindings *pTmpBindings,
aToolBoxCat(this, SmResId(TOOLBOX_CATALOG)),
aToolBoxCat_Delim(this, SmResId( FL_TOOLBOX_CAT_DELIM ))
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmToolBoxWindow::SmToolBoxWindow" );
+ SAL_INFO( "starmath", "starmath: SmToolBoxWindow::SmToolBoxWindow" );
// allow for cursor travelling between toolbox and sub-categories
SetStyle( GetStyle() | WB_DIALOGCONTROL );
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 42325559e34f..d3ffcfea2aac 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -29,7 +29,6 @@
#include <comphelper/processfactory.hxx>
#include <comphelper/storagehelper.hxx>
#include <comphelper/string.hxx>
-#include <rtl/logfile.hxx>
#include <sfx2/app.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/docfile.hxx>
@@ -842,7 +841,7 @@ IMPL_LINK( SmCmdBoxWindow, InitialFocusTimerHdl, Timer *, EMPTYARG /*pTimer*/ )
}
catch (uno::Exception &)
{
- OSL_FAIL( "failed to properly set initial focus to edit window" );
+ SAL_WARN( "starmath", "failed to properly set initial focus to edit window" );
}
return 0;
}
@@ -947,7 +946,7 @@ SFX_IMPL_NAMED_VIEWFACTORY(SmViewShell, "Default")
void SmViewShell::AdjustPosSizePixel(const Point &rPos, const Size &rSize)
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::AdjustPosSizePixel" );
+ SAL_INFO( "starmath", "starmath: SmViewShell::AdjustPosSizePixel" );
aGraphic.SetPosSizePixel(rPos, rSize);
}
@@ -955,7 +954,7 @@ void SmViewShell::AdjustPosSizePixel(const Point &rPos, const Size &rSize)
void SmViewShell::InnerResizePixel(const Point &rOfs, const Size &rSize)
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::InnerResizePixel" );
+ SAL_INFO( "starmath", "starmath: SmViewShell::InnerResizePixel" );
Size aObjSize = GetObjectShell()->GetVisArea().GetSize();
if ( aObjSize.Width() > 0 && aObjSize.Height() > 0 )
@@ -973,7 +972,7 @@ void SmViewShell::InnerResizePixel(const Point &rOfs, const Size &rSize)
void SmViewShell::OuterResizePixel(const Point &rOfs, const Size &rSize)
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::OuterResizePixel" );
+ SAL_INFO( "starmath", "starmath: SmViewShell::OuterResizePixel" );
SmGraphicWindow &rWin = GetGraphicWindow();
rWin.SetPosSizePixel(rOfs, rSize);
@@ -985,7 +984,7 @@ void SmViewShell::OuterResizePixel(const Point &rOfs, const Size &rSize)
void SmViewShell::QueryObjAreaPixel( Rectangle& rRect ) const
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::QueryObjAreaPixel" );
+ SAL_INFO( "starmath", "starmath: SmViewShell::QueryObjAreaPixel" );
rRect.SetSize( GetGraphicWindow().GetSizePixel() );
}
@@ -993,7 +992,7 @@ void SmViewShell::QueryObjAreaPixel( Rectangle& rRect ) const
void SmViewShell::SetZoomFactor( const Fraction &rX, const Fraction &rY )
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::SetZoomFactor" );
+ SAL_INFO( "starmath", "starmath: SmViewShell::SetZoomFactor" );
const Fraction &rFrac = rX < rY ? rX : rY;
GetGraphicWindow().SetZoom( (sal_uInt16) long(rFrac * Fraction( 100, 1 )) );
@@ -1006,7 +1005,7 @@ void SmViewShell::SetZoomFactor( const Fraction &rX, const Fraction &rY )
Size SmViewShell::GetTextLineSize(OutputDevice& rDevice, const String& rLine)
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::GetTextLineSize" );
+ SAL_INFO( "starmath", "starmath: SmViewShell::GetTextLineSize" );
Size aSize(rDevice.GetTextWidth(rLine), rDevice.GetTextHeight());
sal_uInt16 nTabs = comphelper::string::getTokenCount(rLine, '\t');
@@ -1035,7 +1034,7 @@ Size SmViewShell::GetTextLineSize(OutputDevice& rDevice, const String& rLine)
Size SmViewShell::GetTextSize(OutputDevice& rDevice, const String& rText, long MaxWidth)
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::GetTextSize" );
+ SAL_INFO( "starmath", "starmath: SmViewShell::GetTextSize" );
Size aSize;
Size TextSize;
@@ -1096,7 +1095,7 @@ Size SmViewShell::GetTextSize(OutputDevice& rDevice, const String& rText, long M
void SmViewShell::DrawTextLine(OutputDevice& rDevice, const Point& rPosition, const String& rLine)
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::DrawTextLine" );
+ SAL_INFO( "starmath", "starmath: SmViewShell::DrawTextLine" );
Point aPoint (rPosition);
sal_uInt16 nTabs = comphelper::string::getTokenCount(rLine, '\t');
@@ -1124,7 +1123,7 @@ void SmViewShell::DrawTextLine(OutputDevice& rDevice, const Point& rPosition, co
void SmViewShell::DrawText(OutputDevice& rDevice, const Point& rPosition, const String& rText, sal_uInt16 MaxWidth)
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::DrawText" );
+ SAL_INFO( "starmath", "starmath: SmViewShell::DrawText" );
sal_uInt16 nLines = comphelper::string::getTokenCount(rText, '\n');
Point aPoint (rPosition);
@@ -1189,7 +1188,7 @@ void SmViewShell::Impl_Print(
const SmPrintUIOptions &rPrintUIOptions,
Rectangle aOutRect, Point aZeroPoint )
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::Impl_Print" );
+ SAL_INFO( "starmath", "starmath: SmViewShell::Impl_Print" );
const bool bIsPrintTitle = rPrintUIOptions.getBoolValue( PRTUIOPT_TITLE_ROW, sal_True );
const bool bIsPrintFrame = rPrintUIOptions.getBoolValue( PRTUIOPT_BORDER, sal_True );
@@ -1338,15 +1337,15 @@ void SmViewShell::Impl_Print(
sal_uInt16 SmViewShell::Print(SfxProgress & /*rProgress*/, sal_Bool /*bIsAPI*/)
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::Print" );
- OSL_FAIL( "SmViewShell::Print: no longer used with new UI print dialog. Should be removed!!" );
+ SAL_INFO( "starmath", "starmath: SmViewShell::Print" );
+ SAL_WARN( "starmath", "SmViewShell::Print: no longer used with new UI print dialog. Should be removed!!" );
return 0;
}
SfxPrinter* SmViewShell::GetPrinter(sal_Bool bCreate)
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::GetPrinter" );
+ SAL_INFO( "starmath", "starmath: SmViewShell::GetPrinter" );
SmDocShell *pDoc = GetDoc();
if ( pDoc->HasPrinter() || bCreate )
@@ -1357,7 +1356,7 @@ SfxPrinter* SmViewShell::GetPrinter(sal_Bool bCreate)
sal_uInt16 SmViewShell::SetPrinter(SfxPrinter *pNewPrinter, sal_uInt16 nDiffFlags, bool )
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::SetPrinter" );
+ SAL_INFO( "starmath", "starmath: SmViewShell::SetPrinter" );
SfxPrinter *pOld = GetDoc()->GetPrinter();
if ( pOld && pOld->IsPrinting() )
return SFX_PRINTERROR_BUSY;
@@ -1381,7 +1380,7 @@ bool SmViewShell::HasPrintOptionsPage() const
SfxTabPage* SmViewShell::CreatePrintOptionsPage(Window *pParent,
const SfxItemSet &rOptions)
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::CreatePrintOptionsPage" );
+ SAL_INFO( "starmath", "starmath: SmViewShell::CreatePrintOptionsPage" );
return SmPrintOptionsTabPage::Create(pParent, rOptions);
}
@@ -1389,7 +1388,7 @@ SfxTabPage* SmViewShell::CreatePrintOptionsPage(Window *pParent,
SmEditWindow *SmViewShell::GetEditWindow()
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::GetEditWindow" );
+ SAL_INFO( "starmath", "starmath: SmViewShell::GetEditWindow" );
SmCmdBoxWrapper *pWrapper = (SmCmdBoxWrapper *) GetViewFrame()->
GetChildWindow( SmCmdBoxWrapper::GetChildWindowId() );
@@ -1407,7 +1406,7 @@ SmEditWindow *SmViewShell::GetEditWindow()
void SmViewShell::SetStatusText(const OUString& rText)
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::SetStatusText" );
+ SAL_INFO( "starmath", "starmath: SmViewShell::SetStatusText" );
aStatusText = rText;
GetViewFrame()->GetBindings().Invalidate(SID_TEXTSTATUS);
@@ -1416,7 +1415,7 @@ void SmViewShell::SetStatusText(const OUString& rText)
void SmViewShell::ShowError( const SmErrorDesc *pErrorDesc )
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::ShowError" );
+ SAL_INFO( "starmath", "starmath: SmViewShell::ShowError" );
OSL_ENSURE(GetDoc(), "Sm : Document missing");
if (pErrorDesc || 0 != (pErrorDesc = GetDoc()->GetParser().GetError(0)) )
@@ -1430,7 +1429,7 @@ void SmViewShell::ShowError( const SmErrorDesc *pErrorDesc )
void SmViewShell::NextError()
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::NextError" );
+ SAL_INFO( "starmath", "starmath: SmViewShell::NextError" );
OSL_ENSURE(GetDoc(), "Sm : Document missing");
const SmErrorDesc *pErrorDesc = GetDoc()->GetParser().NextError();
@@ -1442,7 +1441,7 @@ void SmViewShell::NextError()
void SmViewShell::PrevError()
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::PrevError" );
+ SAL_INFO( "starmath", "starmath: SmViewShell::PrevError" );
OSL_ENSURE(GetDoc(), "Sm : Document missing");
const SmErrorDesc *pErrorDesc = GetDoc()->GetParser().PrevError();
@@ -1454,7 +1453,7 @@ void SmViewShell::PrevError()
bool SmViewShell::Insert( SfxMedium& rMedium )
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::Insert" );
+ SAL_INFO( "starmath", "starmath: SmViewShell::Insert" );
SmDocShell *pDoc = GetDoc();
bool bRet = false;
@@ -1480,7 +1479,7 @@ bool SmViewShell::Insert( SfxMedium& rMedium )
pEditWin->InsertText( aText );
else
{
- OSL_FAIL( "EditWindow missing" );
+ SAL_WARN( "starmath", "EditWindow missing" );
}
pDoc->Parse();
@@ -1496,7 +1495,7 @@ bool SmViewShell::Insert( SfxMedium& rMedium )
bool SmViewShell::InsertFrom(SfxMedium &rMedium)
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::InsertFrom" );
+ SAL_INFO( "starmath", "starmath: SmViewShell::InsertFrom" );
bool bSuccess = false;
SmDocShell *pDoc = GetDoc();
@@ -1521,7 +1520,7 @@ bool SmViewShell::InsertFrom(SfxMedium &rMedium)
pEditWin->InsertText( aText );
else
{
- OSL_FAIL( "EditWindow missing" );
+ SAL_WARN( "starmath", "EditWindow missing" );
}
pDoc->Parse();
@@ -1538,7 +1537,7 @@ bool SmViewShell::InsertFrom(SfxMedium &rMedium)
void SmViewShell::Execute(SfxRequest& rReq)
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::Execute" );
+ SAL_INFO( "starmath", "starmath: SmViewShell::Execute" );
SmEditWindow *pWin = GetEditWindow();
@@ -1627,7 +1626,7 @@ void SmViewShell::Execute(SfxRequest& rReq)
}
catch (uno::Exception &)
{
- OSL_FAIL( "SmViewShell::Execute (SID_PASTEOBJECT): failed to get storage from input stream" );
+ SAL_WARN( "starmath", "SmViewShell::Execute (SID_PASTEOBJECT): failed to get storage from input stream" );
}
}
}
@@ -1893,7 +1892,7 @@ void SmViewShell::Execute(SfxRequest& rReq)
void SmViewShell::GetState(SfxItemSet &rSet)
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::GetState" );
+ SAL_INFO( "starmath", "starmath: SmViewShell::GetState" );
SfxWhichIter aIter(rSet);
@@ -1999,7 +1998,7 @@ SmViewShell::SmViewShell(SfxViewFrame *pFrame_, SfxViewShell *):
aGraphic(this),
aGraphicController(aGraphic, SID_GAPHIC_SM, pFrame_->GetBindings())
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::SmViewShell" );
+ SAL_INFO( "starmath", "starmath: SmViewShell::SmViewShell" );
SetStatusText(OUString());
SetWindow(&aGraphic);
@@ -2011,7 +2010,7 @@ SmViewShell::SmViewShell(SfxViewFrame *pFrame_, SfxViewShell *):
SmViewShell::~SmViewShell()
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::~SmViewShell" );
+ SAL_INFO( "starmath", "starmath: SmViewShell::~SmViewShell" );
//!! this view shell is not active anymore !!
// Thus 'SmGetActiveView' will give a 0 pointer.
@@ -2024,7 +2023,7 @@ SmViewShell::~SmViewShell()
void SmViewShell::Deactivate( sal_Bool bIsMDIActivate )
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::Deactivate" );
+ SAL_INFO( "starmath", "starmath: SmViewShell::Deactivate" );
SmEditWindow *pEdit = GetEditWindow();
if ( pEdit )
@@ -2036,7 +2035,7 @@ void SmViewShell::Deactivate( sal_Bool bIsMDIActivate )
void SmViewShell::Activate( sal_Bool bIsMDIActivate )
{
- RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::Activate" );
+ SAL_INFO( "starmath", "starmath: SmViewShell::Activate" );
SfxViewShell::Activate( bIsMDIActivate );