fdo#63690 - replace RTL_CONTEXT_ macros with SAL_INFO

- replaced RTL_CONTEXT_ with SAL_INFO
- replace OSL_* with SAL_*

Change-Id: Id4e90b83a7275bfd30914f7514a609cebbfbf4ac
Reviewed-on: https://gerrit.libreoffice.org/4044
Reviewed-by: Luboš Luňák <l.lunak@suse.cz>
Tested-by: Luboš Luňák <l.lunak@suse.cz>
This commit is contained in:
Radu Ioan 2013-05-27 00:22:20 +03:00 committed by Luboš Luňák
parent 2c7b6aa7a3
commit 660b67a413
26 changed files with 261 additions and 306 deletions

View File

@ -86,7 +86,6 @@
#include <unotools/pathoptions.hxx> #include <unotools/pathoptions.hxx>
#include <svtools/miscopt.hxx> #include <svtools/miscopt.hxx>
#include <svtools/menuoptions.hxx> #include <svtools/menuoptions.hxx>
#include <rtl/logfile.hxx>
#include <rtl/bootstrap.hxx> #include <rtl/bootstrap.hxx>
#include <vcl/help.hxx> #include <vcl/help.hxx>
#include <vcl/msgbox.hxx> #include <vcl/msgbox.hxx>
@ -166,8 +165,7 @@ void removeTree(OUString const & url) {
case osl::FileBase::E_NOENT: case osl::FileBase::E_NOENT:
return; //TODO: SAL_WARN if recursive return; //TODO: SAL_WARN if recursive
default: default:
SAL_WARN( SAL_WARN("desktop.app", "cannot open directory " << dir.getURL() << ": " << +rc);
"desktop", "cannot open directory " << dir.getURL() << ": " << +rc);
return; return;
} }
for (;;) { for (;;) {
@ -177,9 +175,7 @@ void removeTree(OUString const & url) {
break; break;
} }
if (rc != osl::FileBase::E_None) { if (rc != osl::FileBase::E_None) {
SAL_WARN( SAL_WARN( "desktop.app", "cannot iterate directory " << dir.getURL() << ": " << +rc);
"desktop",
"cannot iterate directory " << dir.getURL() << ": " << +rc);
break; break;
} }
osl::FileStatus stat( osl::FileStatus stat(
@ -187,9 +183,7 @@ void removeTree(OUString const & url) {
osl_FileStatus_Mask_FileURL); osl_FileStatus_Mask_FileURL);
rc = i.getFileStatus(stat); rc = i.getFileStatus(stat);
if (rc != osl::FileBase::E_None) { if (rc != osl::FileBase::E_None) {
SAL_WARN( SAL_WARN( "desktop.app", "cannot stat in directory " << dir.getURL() << ": " << +rc);
"desktop",
"cannot stat in directory " << dir.getURL() << ": " << +rc);
continue; continue;
} }
if (stat.getFileType() == osl::FileStatus::Directory) { //TODO: symlinks if (stat.getFileType() == osl::FileStatus::Directory) { //TODO: symlinks
@ -197,19 +191,19 @@ void removeTree(OUString const & url) {
} else { } else {
rc = osl::File::remove(stat.getFileURL()); rc = osl::File::remove(stat.getFileURL());
SAL_WARN_IF( SAL_WARN_IF(
rc != osl::FileBase::E_None, "desktop", rc != osl::FileBase::E_None, "desktop.app",
"cannot remove file " << stat.getFileURL() << ": " << +rc); "cannot remove file " << stat.getFileURL() << ": " << +rc);
} }
} }
if (dir.isOpen()) { if (dir.isOpen()) {
rc = dir.close(); rc = dir.close();
SAL_WARN_IF( SAL_WARN_IF(
rc != osl::FileBase::E_None, "desktop", rc != osl::FileBase::E_None, "desktop.app",
"cannot close directory " << dir.getURL() << ": " << +rc); "cannot close directory " << dir.getURL() << ": " << +rc);
} }
rc = osl::Directory::remove(url); rc = osl::Directory::remove(url);
SAL_WARN_IF( SAL_WARN_IF(
rc != osl::FileBase::E_None, "desktop", rc != osl::FileBase::E_None, "desktop.app",
"cannot remove directory " << url << ": " << +rc); "cannot remove directory " << url << ": " << +rc);
} }
@ -261,12 +255,10 @@ bool cleanExtensionCache() {
rc = fr.readLine(s1); rc = fr.readLine(s1);
osl::FileBase::RC rc2 = fr.close(); osl::FileBase::RC rc2 = fr.close();
SAL_WARN_IF( SAL_WARN_IF(
rc2 != osl::FileBase::E_None, "desktop", rc2 != osl::FileBase::E_None, "desktop.app",
"cannot close " << fr.getURL() << " after reading: " << +rc2); "cannot close " << fr.getURL() << " after reading: " << +rc2);
if (rc != osl::FileBase::E_None) { if (rc != osl::FileBase::E_None) {
SAL_WARN( SAL_WARN( "desktop.app", "cannot read from " << fr.getURL() << ": " << +rc);
"desktop",
"cannot read from " << fr.getURL() << ": " << +rc);
break; break;
} }
OUString s2( OUString s2(
@ -282,9 +274,7 @@ bool cleanExtensionCache() {
case osl::FileBase::E_NOENT: case osl::FileBase::E_NOENT:
break; break;
default: default:
SAL_WARN( SAL_WARN( "desktop.app", "cannot open " << fr.getURL() << " for reading: " << +rc);
"desktop",
"cannot open " << fr.getURL() << " for reading: " << +rc);
break; break;
} }
removeTree(extDir); removeTree(extDir);
@ -294,18 +284,16 @@ bool cleanExtensionCache() {
rtl::Bootstrap::expandMacros(userRcFile); //TODO: detect failure rtl::Bootstrap::expandMacros(userRcFile); //TODO: detect failure
rc = osl::File::remove(userRcFile); rc = osl::File::remove(userRcFile);
SAL_WARN_IF( SAL_WARN_IF(
rc != osl::FileBase::E_None && rc != osl::FileBase::E_NOENT, "desktop", rc != osl::FileBase::E_None && rc != osl::FileBase::E_NOENT, "desktop.app",
"cannot remove file " << userRcFile << ": " << +rc); "cannot remove file " << userRcFile << ": " << +rc);
rc = osl::Directory::createPath(extDir); rc = osl::Directory::createPath(extDir);
SAL_WARN_IF( SAL_WARN_IF(
rc != osl::FileBase::E_None && rc != osl::FileBase::E_EXIST, "desktop", rc != osl::FileBase::E_None && rc != osl::FileBase::E_EXIST, "desktop.app",
"cannot create path " << extDir << ": " << +rc); "cannot create path " << extDir << ": " << +rc);
osl::File fw(buildIdFile); osl::File fw(buildIdFile);
rc = fw.open(osl_File_OpenFlag_Write | osl_File_OpenFlag_Create); rc = fw.open(osl_File_OpenFlag_Write | osl_File_OpenFlag_Create);
if (rc != osl::FileBase::E_None) { if (rc != osl::FileBase::E_None) {
SAL_WARN( SAL_WARN( "desktop.app", "cannot open " << fw.getURL() << " for writing: " << +rc);
"desktop",
"cannot open " << fw.getURL() << " for writing: " << +rc);
return true; return true;
} }
OString buf(OUStringToOString(buildId, RTL_TEXTENCODING_UTF8)); OString buf(OUStringToOString(buildId, RTL_TEXTENCODING_UTF8));
@ -317,11 +305,11 @@ bool cleanExtensionCache() {
SAL_WARN_IF( SAL_WARN_IF(
(rc != osl::FileBase::E_None (rc != osl::FileBase::E_None
|| n != static_cast< sal_uInt32 >(buf.getLength())), || n != static_cast< sal_uInt32 >(buf.getLength())),
"desktop", "desktop.app",
"cannot write to " << fw.getURL() << ": " << +rc << ", " << n); "cannot write to " << fw.getURL() << ": " << +rc << ", " << n);
rc = fw.close(); rc = fw.close();
SAL_WARN_IF( SAL_WARN_IF(
rc != osl::FileBase::E_None, "desktop", rc != osl::FileBase::E_None, "desktop.app",
"cannot close " << fw.getURL() << " after writing: " << +rc); "cannot close " << fw.getURL() << " after writing: " << +rc);
return true; return true;
} }
@ -557,7 +545,7 @@ Desktop::Desktop()
, m_bServicesRegistered( false ) , m_bServicesRegistered( false )
, m_aBootstrapError( BE_OK ) , m_aBootstrapError( BE_OK )
{ {
RTL_LOGFILE_TRACE( "desktop (cd100003) ::Desktop::Desktop" ); SAL_INFO( "desktop.app", "desktop (cd100003) ::Desktop::Desktop" );
} }
Desktop::~Desktop() Desktop::~Desktop()
@ -569,7 +557,7 @@ Desktop::~Desktop()
void Desktop::Init() void Desktop::Init()
{ {
RTL_LOGFILE_CONTEXT( aLog, "desktop (cd100003) ::Desktop::Init" ); SAL_INFO( "desktop.app", "desktop (cd100003) ::Desktop::Init" );
SetBootstrapStatus(BS_OK); SetBootstrapStatus(BS_OK);
m_bCleanedExtensionCache = cleanExtensionCache(); m_bCleanedExtensionCache = cleanExtensionCache();
@ -605,7 +593,7 @@ void Desktop::Init()
const CommandLineArgs& rCmdLineArgs = GetCommandLineArgs(); const CommandLineArgs& rCmdLineArgs = GetCommandLineArgs();
// start ipc thread only for non-remote offices // start ipc thread only for non-remote offices
RTL_LOGFILE_CONTEXT( aLog2, "desktop (cd100003) ::OfficeIPCThread::EnableOfficeIPCThread" ); SAL_INFO( "desktop.app", "desktop (cd100003) ::OfficeIPCThread::EnableOfficeIPCThread" );
OfficeIPCThread::Status aStatus = OfficeIPCThread::EnableOfficeIPCThread(); OfficeIPCThread::Status aStatus = OfficeIPCThread::EnableOfficeIPCThread();
if ( aStatus == OfficeIPCThread::IPC_STATUS_PIPE_ERROR ) if ( aStatus == OfficeIPCThread::IPC_STATUS_PIPE_ERROR )
{ {
@ -650,21 +638,21 @@ void Desktop::Init()
void Desktop::InitFinished() void Desktop::InitFinished()
{ {
RTL_LOGFILE_CONTEXT( aLog, "desktop (cd100003) ::Desktop::InitFinished" ); SAL_INFO( "desktop.app", "desktop (cd100003) ::Desktop::InitFinished" );
CloseSplashScreen(); CloseSplashScreen();
} }
void Desktop::DeInit() void Desktop::DeInit()
{ {
RTL_LOGFILE_CONTEXT( aLog, "desktop (cd100003) ::Desktop::DeInit" ); SAL_INFO( "desktop.app", "desktop (cd100003) ::Desktop::DeInit" );
try { try {
// instead of removing of the configManager just let it commit all the changes // instead of removing of the configManager just let it commit all the changes
RTL_LOGFILE_CONTEXT_TRACE( aLog, "<- store config items" ); SAL_INFO( "desktop.app", "<- store config items" );
utl::ConfigManager::storeConfigItems(); utl::ConfigManager::storeConfigItems();
FlushConfiguration(); FlushConfiguration();
RTL_LOGFILE_CONTEXT_TRACE( aLog, "<- store config items" ); SAL_INFO( "desktop.app", "<- store config items" );
// close splashscreen if it's still open // close splashscreen if it's still open
CloseSplashScreen(); CloseSplashScreen();
@ -685,16 +673,16 @@ void Desktop::DeInit()
// this will leave some garbage behind.. // this will leave some garbage behind..
} }
RTL_LOGFILE_CONTEXT_TRACE( aLog, "FINISHED WITH Destop::DeInit" ); SAL_INFO( "desktop.app", "FINISHED WITH Destop::DeInit" );
} }
sal_Bool Desktop::QueryExit() sal_Bool Desktop::QueryExit()
{ {
try try
{ {
RTL_LOGFILE_CONTEXT_TRACE( aLog, "<- store config items" ); SAL_INFO( "desktop.app", "<- store config items" );
utl::ConfigManager::storeConfigItems(); utl::ConfigManager::storeConfigItems();
RTL_LOGFILE_CONTEXT_TRACE( aLog, "<- store config items" ); SAL_INFO( "desktop.app", "<- store config items" );
} }
catch ( const RuntimeException& ) catch ( const RuntimeException& )
{ {
@ -881,8 +869,8 @@ void Desktop::HandleBootstrapErrors(
/// the bootstrap INI file could not be found or read /// the bootstrap INI file could not be found or read
/// the bootstrap INI is missing a required entry /// the bootstrap INI is missing a required entry
/// the bootstrap INI contains invalid data /// the bootstrap INI contains invalid data
case ::utl::Bootstrap::MISSING_BOOTSTRAP_FILE_ENTRY: case ::utl::Bootstrap::MISSING_BOOTSTRAP_FILE_ENTRY:
case ::utl::Bootstrap::INVALID_BOOTSTRAP_FILE_ENTRY: case ::utl::Bootstrap::INVALID_BOOTSTRAP_FILE_ENTRY:
case ::utl::Bootstrap::MISSING_BOOTSTRAP_FILE: case ::utl::Bootstrap::MISSING_BOOTSTRAP_FILE:
{ {
OUString aBootstrapFileURL; OUString aBootstrapFileURL;
@ -895,7 +883,7 @@ void Desktop::HandleBootstrapErrors(
/// the version locator INI file could not be found or read /// the version locator INI file could not be found or read
/// the version locator INI has no entry for this version /// the version locator INI has no entry for this version
/// the version locator INI entry is not a valid directory URL /// the version locator INI entry is not a valid directory URL
case ::utl::Bootstrap::INVALID_VERSION_FILE_ENTRY: case ::utl::Bootstrap::INVALID_VERSION_FILE_ENTRY:
case ::utl::Bootstrap::MISSING_VERSION_FILE_ENTRY: case ::utl::Bootstrap::MISSING_VERSION_FILE_ENTRY:
case ::utl::Bootstrap::MISSING_VERSION_FILE: case ::utl::Bootstrap::MISSING_VERSION_FILE:
{ {
@ -907,7 +895,7 @@ void Desktop::HandleBootstrapErrors(
break; break;
/// the user installation directory does not exist /// the user installation directory does not exist
case ::utl::Bootstrap::MISSING_USER_DIRECTORY: case ::utl::Bootstrap::MISSING_USER_DIRECTORY:
{ {
OUString aUserInstallationURL; OUString aUserInstallationURL;
@ -1336,7 +1324,7 @@ namespace {
// frame/window is created. Since we do not use the TaskCreator here, we need to mimic its behavior, // frame/window is created. Since we do not use the TaskCreator here, we need to mimic its behavior,
// otherwise documents loaded into this frame will later on miss functionality depending on the style. // otherwise documents loaded into this frame will later on miss functionality depending on the style.
Window* pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow ); Window* pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow );
OSL_ENSURE( pContainerWindow, "Desktop::Main: no implementation access to the frame's container window!" ); SAL_WARN_IF( !pContainerWindow, "desktop.app", "Desktop::Main: no implementation access to the frame's container window!" );
if (!pContainerWindow) { if (!pContainerWindow) {
fprintf (stderr, "Error: It very much looks as if you have used 'linkoo' (or bin/ooinstall -l)\n" fprintf (stderr, "Error: It very much looks as if you have used 'linkoo' (or bin/ooinstall -l)\n"
"but have then forgotten to source 'ooenv' into your shell before running !\n" "but have then forgotten to source 'ooenv' into your shell before running !\n"
@ -1367,7 +1355,7 @@ int Desktop::Main()
{ {
pExecGlobals = new ExecuteGlobals(); pExecGlobals = new ExecuteGlobals();
RTL_LOGFILE_CONTEXT( aLog, "desktop (cd100003) ::Desktop::Main" ); SAL_INFO( "desktop.app", "desktop (cd100003) ::Desktop::Main" );
// Remember current context object // Remember current context object
com::sun::star::uno::ContextLayer layer( com::sun::star::uno::ContextLayer layer(
@ -1416,16 +1404,16 @@ int Desktop::Main()
ResMgr::SetReadStringHook( ReplaceStringHookProc ); ResMgr::SetReadStringHook( ReplaceStringHookProc );
// Startup screen // Startup screen
RTL_LOGFILE_CONTEXT_TRACE( aLog, "desktop (lo119109) Desktop::Main { OpenSplashScreen" ); SAL_INFO( "desktop.app", "desktop (lo119109) Desktop::Main { OpenSplashScreen" );
OpenSplashScreen(); OpenSplashScreen();
RTL_LOGFILE_CONTEXT_TRACE( aLog, "desktop (lo119109) Desktop::Main } OpenSplashScreen" ); SAL_INFO( "desktop.app", "desktop (lo119109) Desktop::Main } OpenSplashScreen" );
SetSplashScreenProgress(10); SetSplashScreenProgress(10);
UserInstall::UserInstallStatus inst_fin = UserInstall::finalize(); UserInstall::UserInstallStatus inst_fin = UserInstall::finalize();
if (inst_fin != UserInstall::Ok && inst_fin != UserInstall::Created) if (inst_fin != UserInstall::Ok && inst_fin != UserInstall::Created)
{ {
OSL_FAIL("userinstall failed"); SAL_WARN( "desktop.app", "userinstall failed");
if ( inst_fin == UserInstall::E_NoDiskSpace ) if ( inst_fin == UserInstall::E_NoDiskSpace )
HandleBootstrapErrors( HandleBootstrapErrors(
BE_USERINSTALL_NOTENOUGHDISKSPACE, OUString() ); BE_USERINSTALL_NOTENOUGHDISKSPACE, OUString() );
@ -1452,7 +1440,7 @@ int Desktop::Main()
// check user installation directory for lockfile so we can be sure // check user installation directory for lockfile so we can be sure
// there is no other instance using our data files from a remote host // there is no other instance using our data files from a remote host
RTL_LOGFILE_CONTEXT_TRACE( aLog, "desktop (lo119109) Desktop::Main -> Lockfile" ); SAL_INFO( "desktop.app", "desktop (lo119109) Desktop::Main -> Lockfile" );
m_xLockfile.reset(new Lockfile); m_xLockfile.reset(new Lockfile);
#if HAVE_FEATURE_DESKTOP #if HAVE_FEATURE_DESKTOP
@ -1462,10 +1450,10 @@ int Desktop::Main()
// Lockfile exists, and user clicked 'no' // Lockfile exists, and user clicked 'no'
return EXIT_FAILURE; return EXIT_FAILURE;
} }
RTL_LOGFILE_CONTEXT_TRACE( aLog, "desktop (lo119109) Desktop::Main <- Lockfile" ); SAL_INFO( "desktop.app", "desktop (lo119109) Desktop::Main <- Lockfile" );
// check if accessibility is enabled but not working and allow to quit // check if accessibility is enabled but not working and allow to quit
RTL_LOGFILE_CONTEXT_TRACE( aLog, "{ GetEnableATToolSupport" ); SAL_INFO( "desktop.app", "{ GetEnableATToolSupport" );
if( Application::GetSettings().GetMiscSettings().GetEnableATToolSupport() ) if( Application::GetSettings().GetMiscSettings().GetEnableATToolSupport() )
{ {
bool bQuitApp; bool bQuitApp;
@ -1474,7 +1462,7 @@ int Desktop::Main()
if( bQuitApp ) if( bQuitApp )
return EXIT_FAILURE; return EXIT_FAILURE;
} }
RTL_LOGFILE_CONTEXT_TRACE( aLog, "} GetEnableATToolSupport" ); SAL_INFO( "desktop.app", "} GetEnableATToolSupport" );
#endif #endif
// terminate if requested... // terminate if requested...
@ -1512,10 +1500,10 @@ int Desktop::Main()
SetDisplayName( aTitle ); SetDisplayName( aTitle );
SetSplashScreenProgress(35); SetSplashScreenProgress(35);
RTL_LOGFILE_CONTEXT_TRACE( aLog, "{ create SvtPathOptions and SvtLanguageOptions" ); SAL_INFO( "desktop.app", "{ create SvtPathOptions and SvtLanguageOptions" );
pExecGlobals->pPathOptions.reset( new SvtPathOptions); pExecGlobals->pPathOptions.reset( new SvtPathOptions);
SetSplashScreenProgress(40); SetSplashScreenProgress(40);
RTL_LOGFILE_CONTEXT_TRACE( aLog, "} create SvtPathOptions and SvtLanguageOptions" ); SAL_INFO( "desktop.app", "} create SvtPathOptions and SvtLanguageOptions" );
xDesktop = css::frame::Desktop::create( xContext ); xDesktop = css::frame::Desktop::create( xContext );
@ -1559,9 +1547,9 @@ int Desktop::Main()
sal_Bool bExistsRecoveryData = sal_False; sal_Bool bExistsRecoveryData = sal_False;
sal_Bool bExistsSessionData = sal_False; sal_Bool bExistsSessionData = sal_False;
RTL_LOGFILE_CONTEXT_TRACE( aLog, "{ impl_checkRecoveryState" ); SAL_INFO( "desktop.app", "{ impl_checkRecoveryState" );
impl_checkRecoveryState(bCrashed, bExistsRecoveryData, bExistsSessionData); impl_checkRecoveryState(bCrashed, bExistsRecoveryData, bExistsSessionData);
RTL_LOGFILE_CONTEXT_TRACE( aLog, "} impl_checkRecoveryState" ); SAL_INFO( "desktop.app", "} impl_checkRecoveryState" );
OUString pidfileName = rCmdLineArgs.GetPidfileName(); OUString pidfileName = rCmdLineArgs.GetPidfileName();
if ( !pidfileName.isEmpty() ) if ( !pidfileName.isEmpty() )
@ -1580,18 +1568,18 @@ int Desktop::Main()
sal_uInt64 written = 0; sal_uInt64 written = 0;
if ( pidfile.write(pid.getStr(), pid.getLength(), written) != osl::File::E_None ) if ( pidfile.write(pid.getStr(), pid.getLength(), written) != osl::File::E_None )
{ {
SAL_WARN("desktop", "cannot write pidfile " << pidfile.getURL()); SAL_WARN("desktop.app", "cannot write pidfile " << pidfile.getURL());
} }
pidfile.close(); pidfile.close();
} }
else else
{ {
SAL_WARN("desktop", "cannot open pidfile " << pidfile.getURL() << osl::FileBase::RC(rc)); SAL_WARN("desktop.app", "cannot open pidfile " << pidfile.getURL() << osl::FileBase::RC(rc));
} }
} }
else else
{ {
SAL_WARN("desktop", "cannot get pidfile URL from path" << pidfileName); SAL_WARN("desktop.app", "cannot get pidfile URL from path" << pidfileName);
} }
} }
@ -1615,9 +1603,9 @@ int Desktop::Main()
(!bExistsSessionData ) && (!bExistsSessionData ) &&
(!Application::AnyInput( VCL_INPUT_APPEVENT ) )) (!Application::AnyInput( VCL_INPUT_APPEVENT ) ))
{ {
RTL_LOGFILE_CONTEXT_TRACE( aLog, "{ create BackingComponent" ); SAL_INFO( "desktop.app", "{ create BackingComponent" );
ShowBackingComponent(this); ShowBackingComponent(this);
RTL_LOGFILE_CONTEXT_TRACE( aLog, "} create BackingComponent" ); SAL_INFO( "desktop.app", "} create BackingComponent" );
} }
} }
} }
@ -1666,7 +1654,7 @@ int Desktop::Main()
!rCmdLineArgs.IsNoQuickstart() ) !rCmdLineArgs.IsNoQuickstart() )
InitializeQuickstartMode( xContext ); InitializeQuickstartMode( xContext );
RTL_LOGFILE_CONTEXT( aLog2, "desktop (cd100003) createInstance com.sun.star.frame.Desktop" ); SAL_INFO( "desktop.app", "desktop (cd100003) createInstance com.sun.star.frame.Desktop" );
try try
{ {
if ( xDesktop.is() ) if ( xDesktop.is() )
@ -1698,7 +1686,7 @@ int Desktop::Main()
Application::AcquireSolarMutex( nAcquireCount ); Application::AcquireSolarMutex( nAcquireCount );
// call Application::Execute to process messages in vcl message loop // call Application::Execute to process messages in vcl message loop
RTL_LOGFILE_PRODUCT_TRACE( "PERFORMANCE - enter Application::Execute()" ); SAL_INFO( "desktop.app", "PERFORMANCE - enter Application::Execute()" );
try try
{ {
@ -1774,12 +1762,12 @@ int Desktop::doShutdown()
{ {
if ( osl::File::remove( pidfileURL ) != osl::FileBase::E_None ) if ( osl::File::remove( pidfileURL ) != osl::FileBase::E_None )
{ {
SAL_WARN("desktop", "shutdown: cannot remove pidfile " << pidfileURL); SAL_WARN("desktop.app", "shutdown: cannot remove pidfile " << pidfileURL);
} }
} }
else else
{ {
SAL_WARN("desktop", "shutdown: cannot get pidfile URL from path" << pidfileName); SAL_WARN("desktop.app", "shutdown: cannot get pidfile URL from path" << pidfileName);
} }
} }
@ -1793,15 +1781,15 @@ int Desktop::doShutdown()
Application::AcquireSolarMutex(nAcquireCount); Application::AcquireSolarMutex(nAcquireCount);
// be sure that path/language options gets destroyed before // be sure that path/language options gets destroyed before
// UCB is deinitialized // UCB is deinitialized
RTL_LOGFILE_CONTEXT_TRACE( aLog, "-> dispose path/language options" ); SAL_INFO( "desktop.app", "-> dispose path/language options" );
pExecGlobals->pLanguageOptions.reset( 0 ); pExecGlobals->pLanguageOptions.reset( 0 );
pExecGlobals->pPathOptions.reset( 0 ); pExecGlobals->pPathOptions.reset( 0 );
RTL_LOGFILE_CONTEXT_TRACE( aLog, "<- dispose path/language options" ); SAL_INFO( "desktop.app", "<- dispose path/language options" );
sal_Bool bRR = pExecGlobals->bRestartRequested; sal_Bool bRR = pExecGlobals->bRestartRequested;
delete pExecGlobals, pExecGlobals = NULL; delete pExecGlobals, pExecGlobals = NULL;
RTL_LOGFILE_CONTEXT_TRACE( aLog, "FINISHED WITH Destop::Main" ); SAL_INFO( "desktop.app", "FINISHED WITH Destop::Main" );
if ( bRR ) if ( bRR )
{ {
restartOnMac(true); restartOnMac(true);
@ -1820,7 +1808,7 @@ IMPL_LINK( Desktop, ImplInitFilterHdl, ConvertData*, pData )
bool Desktop::InitializeConfiguration() bool Desktop::InitializeConfiguration()
{ {
RTL_LOGFILE_CONTEXT( aLog, "desktop (jb99855) ::InitConfiguration" ); SAL_INFO( "desktop.app", "desktop (jb99855) ::InitConfiguration" );
try try
{ {
css::configuration::theDefaultProvider::get( css::configuration::theDefaultProvider::get(
@ -1916,7 +1904,7 @@ sal_Bool Desktop::InitializeQuickstartMode( const Reference< XComponentContext >
// the shutdown icon sits in the systray and allows the user to keep // the shutdown icon sits in the systray and allows the user to keep
// the office instance running for quicker restart // the office instance running for quicker restart
// this will only be activated if --quickstart was specified on cmdline // this will only be activated if --quickstart was specified on cmdline
RTL_LOGFILE_CONTEXT( aLog, "desktop (cd100003) createInstance com.sun.star.office.Quickstart" ); SAL_INFO( "desktop.app", "desktop (cd100003) createInstance com.sun.star.office.Quickstart" );
sal_Bool bQuickstart = shouldLaunchQuickstart(); sal_Bool bQuickstart = shouldLaunchQuickstart();
@ -2012,7 +2000,7 @@ class ExitTimer : public Timer
IMPL_LINK_NOARG(Desktop, OpenClients_Impl) IMPL_LINK_NOARG(Desktop, OpenClients_Impl)
{ {
RTL_LOGFILE_PRODUCT_CONTEXT( aLog, "PERFORMANCE - DesktopOpenClients_Impl()" ); SAL_INFO( "desktop.app", "PERFORMANCE - DesktopOpenClients_Impl()" );
try { try {
OpenClients(); OpenClients();
@ -2043,7 +2031,7 @@ IMPL_LINK_NOARG(Desktop, EnableAcceptors_Impl)
// Registers a COM class factory of the service manager with the windows operating system. // Registers a COM class factory of the service manager with the windows operating system.
void Desktop::EnableOleAutomation() void Desktop::EnableOleAutomation()
{ {
RTL_LOGFILE_CONTEXT( aLog, "desktop (jl97489) ::Desktop::EnableOleAutomation" ); SAL_INFO( "desktop.app", "desktop (jl97489) ::Desktop::EnableOleAutomation" );
#ifdef WNT #ifdef WNT
Reference< XMultiServiceFactory > xSMgr= comphelper::getProcessServiceFactory(); Reference< XMultiServiceFactory > xSMgr= comphelper::getProcessServiceFactory();
xSMgr->createInstance(OUString("com.sun.star.bridge.OleApplicationRegistration")); xSMgr->createInstance(OUString("com.sun.star.bridge.OleApplicationRegistration"));
@ -2376,9 +2364,7 @@ void Desktop::OpenClients()
} }
catch(const css::uno::Exception& e) catch(const css::uno::Exception& e)
{ {
OUString aMessage = OUString("Could not disable AutoRecovery.\n") SAL_WARN( "desktop.app", "Could not disable AutoRecovery." << e.Message);
+ e.Message;
OSL_FAIL(OUStringToOString(aMessage, RTL_TEXTENCODING_ASCII_US).getStr());
} }
} }
else else
@ -2405,9 +2391,7 @@ void Desktop::OpenClients()
} }
catch(const css::uno::Exception& e) catch(const css::uno::Exception& e)
{ {
OUString aMessage = OUString("Error during recovery\n") SAL_WARN( "desktop.app", "Error during recovery" << e.Message);
+ e.Message;
OSL_FAIL(OUStringToOString(aMessage, RTL_TEXTENCODING_ASCII_US).getStr());
} }
} }
@ -2428,9 +2412,7 @@ void Desktop::OpenClients()
} }
catch(const com::sun::star::uno::Exception& e) catch(const com::sun::star::uno::Exception& e)
{ {
OUString aMessage = OUString("Registration of session listener failed\n") SAL_WARN( "desktop.app", "Registration of session listener failed" << e.Message);
+ e.Message;
OSL_FAIL(OUStringToOString(aMessage, RTL_TEXTENCODING_ASCII_US).getStr());
} }
if ( !bExistsRecoveryData ) if ( !bExistsRecoveryData )
@ -2442,9 +2424,7 @@ void Desktop::OpenClients()
} }
catch(const com::sun::star::uno::Exception& e) catch(const com::sun::star::uno::Exception& e)
{ {
OUString aMessage = OUString("Error in session management\n") SAL_WARN( "desktop.app", "Error in session management" << e.Message);
+ e.Message;
OSL_FAIL(OUStringToOString(aMessage, RTL_TEXTENCODING_ASCII_US).getStr());
} }
} }
} }
@ -2536,7 +2516,7 @@ void Desktop::OpenClients()
void Desktop::OpenDefault() void Desktop::OpenDefault()
{ {
RTL_LOGFILE_CONTEXT( aLog, "desktop (cd100003) ::Desktop::OpenDefault" ); SAL_INFO( "desktop.app", "desktop (cd100003) ::Desktop::OpenDefault" );
OUString aName; OUString aName;
SvtModuleOptions aOpt; SvtModuleOptions aOpt;
@ -2791,7 +2771,7 @@ void Desktop::HandleAppEvent( const ApplicationEvent& rAppEvent )
destroyAcceptor(rAppEvent.GetData()); destroyAcceptor(rAppEvent.GetData());
break; break;
default: default:
OSL_FAIL("this cannot happen"); SAL_WARN( "desktop.app", "this cannot happen");
break; break;
} }
} }
@ -2885,7 +2865,7 @@ void Desktop::DoFirstRunInitializations()
} }
catch(const ::com::sun::star::uno::Exception&) catch(const ::com::sun::star::uno::Exception&)
{ {
OSL_FAIL( "Desktop::DoFirstRunInitializations: caught an exception while trigger job executor ..." ); SAL_WARN( "desktop.app", "Desktop::DoFirstRunInitializations: caught an exception while trigger job executor ..." );
} }
} }

View File

@ -46,7 +46,6 @@
#include <tools/rcid.h> #include <tools/rcid.h>
#include <rtl/logfile.hxx>
#include <rtl/instance.hxx> #include <rtl/instance.hxx>
#include <comphelper/processfactory.hxx> #include <comphelper/processfactory.hxx>
#include <unotools/localfilehelper.hxx> #include <unotools/localfilehelper.hxx>
@ -69,7 +68,7 @@ namespace desktop
static void configureUcb() static void configureUcb()
{ {
RTL_LOGFILE_CONTEXT( aLog, "desktop (sb93797) ::configureUcb" ); SAL_INFO( "desktop.app", "desktop (sb93797) ::configureUcb" );
// For backwards compatibility, in case some code still uses plain // For backwards compatibility, in case some code still uses plain
// createInstance w/o args directly to obtain an instance: // createInstance w/o args directly to obtain an instance:
@ -98,14 +97,14 @@ static void configureUcb()
} }
catch ( const Exception & ) catch ( const Exception & )
{ {
SAL_WARN( "desktop", "missing gnome-vfs component to initialize thread workaround" ); SAL_WARN( "desktop.app", "missing gnome-vfs component to initialize thread workaround" );
} }
#endif // ENABLE_GNOME_VFS #endif // ENABLE_GNOME_VFS
} }
void Desktop::InitApplicationServiceManager() void Desktop::InitApplicationServiceManager()
{ {
RTL_LOGFILE_CONTEXT( aLog, "desktop (cd100003) ::createApplicationServiceManager" ); SAL_INFO( "desktop.app", "desktop (cd100003) ::createApplicationServiceManager" );
Reference<XMultiServiceFactory> sm; Reference<XMultiServiceFactory> sm;
#ifdef ANDROID #ifdef ANDROID
OUString aUnoRc( OUString( "file:///assets/program/unorc" ) ); OUString aUnoRc( OUString( "file:///assets/program/unorc" ) );
@ -124,7 +123,7 @@ void Desktop::RegisterServices(Reference< XComponentContext > const & context)
{ {
if( !m_bServicesRegistered ) if( !m_bServicesRegistered )
{ {
RTL_LOGFILE_CONTEXT( aLog, "desktop (cd100003) ::registerServices" ); SAL_INFO( "desktop.app", "desktop (cd100003) ::registerServices" );
// interpret command line arguments // interpret command line arguments
CommandLineArgs& rCmdLine = GetCommandLineArgs(); CommandLineArgs& rCmdLine = GetCommandLineArgs();
@ -188,13 +187,13 @@ void Desktop::createAcceptor(const OUString& aAcceptString)
{ {
// no error handling needed... // no error handling needed...
// acceptor just won't come up // acceptor just won't come up
OSL_FAIL("Acceptor could not be created."); SAL_WARN( "desktop.app", "Acceptor could not be created.");
} }
} }
else else
{ {
// there is already an acceptor with this description // there is already an acceptor with this description
OSL_FAIL("Acceptor already exists."); SAL_WARN( "desktop.app", "Acceptor already exists.");
} }
} }
} }
@ -216,7 +215,7 @@ class enable
void Desktop::enableAcceptors() void Desktop::enableAcceptors()
{ {
RTL_LOGFILE_CONTEXT(aLog, "desktop (lo119109) Desktop::enableAcceptors"); SAL_INFO( "desktop.app", "desktop (lo119109) Desktop::enableAcceptors");
if (!bAccept) if (!bAccept)
{ {
// from now on, all new acceptors are enabled // from now on, all new acceptors are enabled
@ -243,7 +242,7 @@ void Desktop::destroyAcceptor(const OUString& aAcceptString)
// this is the last reference and the acceptor will be destructed // this is the last reference and the acceptor will be destructed
rMap.erase(aAcceptString); rMap.erase(aAcceptString);
} else { } else {
OSL_FAIL("Found no acceptor to remove"); SAL_WARN( "desktop.app", "Found no acceptor to remove");
} }
} }
} }
@ -257,7 +256,7 @@ void Desktop::DeregisterServices()
void Desktop::CreateTemporaryDirectory() void Desktop::CreateTemporaryDirectory()
{ {
RTL_LOGFILE_CONTEXT( aLog, "desktop (cd100003) ::createTemporaryDirectory" ); SAL_INFO( "desktop.app", "desktop (cd100003) ::createTemporaryDirectory" );
OUString aTempBaseURL; OUString aTempBaseURL;
try try
@ -312,7 +311,7 @@ void Desktop::CreateTemporaryDirectory()
void Desktop::RemoveTemporaryDirectory() void Desktop::RemoveTemporaryDirectory()
{ {
RTL_LOGFILE_CONTEXT( aLog, "desktop (cd100003) ::removeTemporaryDirectory" ); SAL_INFO( "desktop.app", "desktop (cd100003) ::removeTemporaryDirectory" );
// remove current temporary directory // remove current temporary directory
String &rCurrentTempURL = CurrentTempURL::get(); String &rCurrentTempURL = CurrentTempURL::get();

View File

@ -22,7 +22,6 @@
#include <rtl/bootstrap.hxx> #include <rtl/bootstrap.hxx>
#include <rtl/ustring.hxx> #include <rtl/ustring.hxx>
#include <rtl/logfile.hxx>
#include "cppuhelper/compbase3.hxx" #include "cppuhelper/compbase3.hxx"
#include "vcl/wrkwin.hxx" #include "vcl/wrkwin.hxx"
@ -246,7 +245,7 @@ static bool impl_checkDependencies( const uno::Reference< uno::XComponentContext
if ( !xExtensionManager.is() ) if ( !xExtensionManager.is() )
{ {
OSL_FAIL( "Could not get the Extension Manager!" ); SAL_WARN( "desktop.app", "Could not get the Extension Manager!" );
return true; return true;
} }
@ -293,7 +292,7 @@ static bool impl_checkDependencies( const uno::Reference< uno::XComponentContext
catch ( const uno::RuntimeException & ) { throw; } catch ( const uno::RuntimeException & ) { throw; }
catch (const uno::Exception & exc) { catch (const uno::Exception & exc) {
(void) exc; (void) exc;
OSL_FAIL( OUStringToOString( exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() ); SAL_WARN( "desktop.app", "" << exc.Message );
} }
if ( bRegistered ) if ( bRegistered )
@ -411,7 +410,7 @@ sal_Bool Desktop::CheckExtensionDependencies()
void Desktop::SynchronizeExtensionRepositories() void Desktop::SynchronizeExtensionRepositories()
{ {
RTL_LOGFILE_CONTEXT(aLog,"desktop (jl) ::Desktop::SynchronizeExtensionRepositories"); SAL_INFO( "desktop.app", "desktop (jl) ::Desktop::SynchronizeExtensionRepositories");
uno::Reference< uno::XComponentContext > context( uno::Reference< uno::XComponentContext > context(
comphelper_getProcessComponentContext()); comphelper_getProcessComponentContext());
uno::Reference< ucb::XCommandEnvironment > silent( uno::Reference< ucb::XCommandEnvironment > silent(

View File

@ -93,16 +93,16 @@ void SAL_CALL Acceptor::run()
{ {
while ( m_rAcceptor.is() ) while ( m_rAcceptor.is() )
{ {
RTL_LOGFILE_CONTEXT( aLog, "desktop (lo119109) Acceptor::run" ); SAL_INFO( "desktop.offacc", "desktop (lo119109) Acceptor::run" );
try try
{ {
// wait until we get enabled // wait until we get enabled
RTL_LOGFILE_CONTEXT_TRACE( aLog, "desktop (lo119109)"\ SAL_INFO( "desktop.offacc", "desktop (lo119109)"\
"Acceptor::run waiting for office to come up"); "Acceptor::run waiting for office to come up");
m_cEnable.wait(); m_cEnable.wait();
if (m_bDying) //see destructor if (m_bDying) //see destructor
break; break;
RTL_LOGFILE_CONTEXT_TRACE( aLog, "desktop (lo119109)"\ SAL_INFO( "desktop.offacc", "desktop (lo119109)"\
"Acceptor::run now enabled and continuing"); "Acceptor::run now enabled and continuing");
// accept connection // accept connection
@ -111,8 +111,7 @@ void SAL_CALL Acceptor::run()
// is destructed so we break out of the run method terminating the thread // is destructed so we break out of the run method terminating the thread
if (! rConnection.is()) break; if (! rConnection.is()) break;
OUString aDescription = rConnection->getDescription(); OUString aDescription = rConnection->getDescription();
RTL_LOGFILE_CONTEXT_TRACE1( aLog, "desktop (lo119109) Acceptor::run connection %s", SAL_INFO( "desktop.offacc", "desktop (lo119109) Acceptor::run connection " << aDescription );
OUStringToOString(aDescription, RTL_TEXTENCODING_ASCII_US).getStr());
// create instanceprovider for this connection // create instanceprovider for this connection
Reference< XInstanceProvider > rInstanceProvider( Reference< XInstanceProvider > rInstanceProvider(
@ -125,7 +124,7 @@ void SAL_CALL Acceptor::run()
osl::MutexGuard g(m_aMutex); osl::MutexGuard g(m_aMutex);
m_bridges.add(rBridge); m_bridges.add(rBridge);
} catch (const Exception& e) { } catch (const Exception& e) {
SAL_WARN("desktop", "caught Exception \"" << e.Message << "\""); SAL_WARN("desktop.offacc", "caught Exception \"" << e.Message << "\"");
// connection failed... // connection failed...
// something went wrong during connection setup. // something went wrong during connection setup.
// just wait for a new connection to accept // just wait for a new connection to accept
@ -139,7 +138,7 @@ void SAL_CALL Acceptor::initialize( const Sequence<Any>& aArguments )
{ {
// prevent multiple initialization // prevent multiple initialization
ClearableMutexGuard aGuard( m_aMutex ); ClearableMutexGuard aGuard( m_aMutex );
RTL_LOGFILE_CONTEXT( aLog, "destop (lo119109) Acceptor::initialize()" ); SAL_INFO( "desktop.offacc", "destop (lo119109) Acceptor::initialize()" );
sal_Bool bOk = sal_False; sal_Bool bOk = sal_False;
@ -149,8 +148,7 @@ void SAL_CALL Acceptor::initialize( const Sequence<Any>& aArguments )
// not yet initialized and acceptstring // not yet initialized and acceptstring
if (!m_bInit && nArgs > 0 && (aArguments[0] >>= m_aAcceptString)) if (!m_bInit && nArgs > 0 && (aArguments[0] >>= m_aAcceptString))
{ {
RTL_LOGFILE_CONTEXT_TRACE1( aLog, "desktop (lo119109) Acceptor::initialize string=%s", SAL_INFO( "desktop.offacc", "desktop (lo119109) Acceptor::initialize string=" << m_aAcceptString );
OUStringToOString(m_aAcceptString, RTL_TEXTENCODING_ASCII_US).getStr());
// get connect string and protocol from accept string // get connect string and protocol from accept string
// "<connectString>;<protocol>" // "<connectString>;<protocol>"

View File

@ -30,7 +30,6 @@
#include <com/sun/star/task/XStatusIndicator.hpp> #include <com/sun/star/task/XStatusIndicator.hpp>
#include <cppuhelper/implbase2.hxx> #include <cppuhelper/implbase2.hxx>
#include <rtl/bootstrap.hxx> #include <rtl/bootstrap.hxx>
#include <rtl/logfile.hxx>
#include <rtl/strbuf.hxx> #include <rtl/strbuf.hxx>
#include <rtl/math.hxx> #include <rtl/math.hxx>
#include <vcl/introwin.hxx> #include <vcl/introwin.hxx>
@ -207,8 +206,8 @@ void SAL_CALL SplashScreen::setText(const OUString& rText)
void SAL_CALL SplashScreen::setValue(sal_Int32 nValue) void SAL_CALL SplashScreen::setValue(sal_Int32 nValue)
throw (RuntimeException) throw (RuntimeException)
{ {
RTL_LOGFILE_CONTEXT( aLog, "::SplashScreen::setValue (lo119109)" ); SAL_INFO( "desktop.splash", "::SplashScreen::setValue (lo119109)" );
RTL_LOGFILE_CONTEXT_TRACE1( aLog, "value=%d", nValue ); SAL_INFO( "desktop.splash", "value=" << nValue );
SolarMutexGuard aSolarGuard; SolarMutexGuard aSolarGuard;
if (_bVisible && !_bProgressEnd) { if (_bVisible && !_bProgressEnd) {

View File

@ -39,7 +39,6 @@
#include <com/sun/star/embed/EmbedMisc.hpp> #include <com/sun/star/embed/EmbedMisc.hpp>
#include <comphelper/processfactory.hxx> #include <comphelper/processfactory.hxx>
#include <rtl/logfile.hxx>
#include <vcl/svapp.hxx> #include <vcl/svapp.hxx>
#include <targetstatecontrol.hxx> #include <targetstatecontrol.hxx>
@ -205,7 +204,7 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState )
} }
else else
{ {
OSL_FAIL( "Unacceptable state switch!\n" ); SAL_WARN( "embeddedobj.common", "Unacceptable state switch!" );
throw uno::RuntimeException(); // TODO throw uno::RuntimeException(); // TODO
} }
} }
@ -277,7 +276,7 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState )
} }
else else
{ {
OSL_FAIL( "Unacceptable state switch!\n" ); SAL_WARN( "embeddedobj.common", "Unacceptable state switch!" );
throw uno::RuntimeException(); // TODO throw uno::RuntimeException(); // TODO
} }
} }
@ -347,7 +346,7 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState )
} }
else else
{ {
OSL_FAIL( "Unacceptable state switch!\n" ); SAL_WARN( "embeddedobj.common", "Unacceptable state switch!" );
throw uno::RuntimeException(); // TODO throw uno::RuntimeException(); // TODO
} }
} }
@ -360,7 +359,7 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState )
} }
else else
{ {
OSL_FAIL( "Unacceptable state switch!\n" ); SAL_WARN( "embeddedobj.common", "Unacceptable state switch!" );
throw uno::RuntimeException(); // TODO throw uno::RuntimeException(); // TODO
} }
} }
@ -425,7 +424,7 @@ void SAL_CALL OCommonEmbeddedObject::changeState( sal_Int32 nNewState )
uno::Exception, uno::Exception,
uno::RuntimeException ) uno::RuntimeException )
{ {
RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OCommonEmbeddedObject::changeState" ); SAL_INFO( "embeddedobj.common", "embeddedobj (mv76033) OCommonEmbeddedObject::changeState" );
uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >( this ), uno::UNO_QUERY); uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >( this ), uno::UNO_QUERY);
{ {
@ -529,7 +528,7 @@ void SAL_CALL OCommonEmbeddedObject::doVerb( sal_Int32 nVerbID )
uno::Exception, uno::Exception,
uno::RuntimeException ) uno::RuntimeException )
{ {
RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OCommonEmbeddedObject::doVerb" ); SAL_INFO( "embeddedobj.common", "embeddedobj (mv76033) OCommonEmbeddedObject::doVerb" );
SolarMutexGuard aSolarGuard; SolarMutexGuard aSolarGuard;
//TODO: a gross hack to avoid deadlocks when this is called from the //TODO: a gross hack to avoid deadlocks when this is called from the

View File

@ -52,8 +52,6 @@
#include <comphelper/mimeconfighelper.hxx> #include <comphelper/mimeconfighelper.hxx>
#include <comphelper/namedvaluecollection.hxx> #include <comphelper/namedvaluecollection.hxx>
#include <rtl/logfile.hxx>
#include <tools/diagnose_ex.h> #include <tools/diagnose_ex.h>
using namespace ::com::sun::star; using namespace ::com::sun::star;
@ -120,7 +118,7 @@ uno::Reference< io::XInputStream > createTempInpStreamFromStor(
const uno::Reference< embed::XStorage >& xStorage, const uno::Reference< embed::XStorage >& xStorage,
const uno::Reference< uno::XComponentContext >& xContext ) const uno::Reference< uno::XComponentContext >& xContext )
{ {
OSL_ENSURE( xStorage.is(), "The storage can not be empty!" ); SAL_WARN_IF( !xStorage.is(), "embeddedobj.common", "The storage can not be empty!" );
uno::Reference< io::XInputStream > xResult; uno::Reference< io::XInputStream > xResult;
@ -149,7 +147,7 @@ uno::Reference< io::XInputStream > createTempInpStreamFromStor(
try { try {
uno::Reference< lang::XComponent > xComponent( xTempStorage, uno::UNO_QUERY ); uno::Reference< lang::XComponent > xComponent( xTempStorage, uno::UNO_QUERY );
OSL_ENSURE( xComponent.is(), "Wrong storage implementation!" ); SAL_WARN_IF( !xComponent.is(), "embeddedobj.common", "Wrong storage implementation!" );
if ( xComponent.is() ) if ( xComponent.is() )
xComponent->dispose(); xComponent->dispose();
} }
@ -246,7 +244,7 @@ void OCommonEmbeddedObject::SwitchOwnPersistence( const uno::Reference< embed::X
{ {
if ( xNewParentStorage == m_xParentStorage && aNewName.equals( m_aEntryName ) ) if ( xNewParentStorage == m_xParentStorage && aNewName.equals( m_aEntryName ) )
{ {
OSL_ENSURE( xNewObjectStorage == m_xObjectStorage, "The storage must be the same!\n" ); SAL_WARN_IF( xNewObjectStorage != m_xObjectStorage, "embeddedobj.common", "The storage must be the same!" );
return; return;
} }
@ -284,7 +282,7 @@ void OCommonEmbeddedObject::SwitchOwnPersistence( const uno::Reference< embed::X
sal_Int32 nStorageMode = m_bReadOnly ? embed::ElementModes::READ : embed::ElementModes::READWRITE; sal_Int32 nStorageMode = m_bReadOnly ? embed::ElementModes::READ : embed::ElementModes::READWRITE;
uno::Reference< embed::XStorage > xNewOwnStorage = xNewParentStorage->openStorageElement( aNewName, nStorageMode ); uno::Reference< embed::XStorage > xNewOwnStorage = xNewParentStorage->openStorageElement( aNewName, nStorageMode );
OSL_ENSURE( xNewOwnStorage.is(), "The method can not return empty reference!" ); SAL_WARN_IF( !xNewOwnStorage.is(), "embeddedobj.common", "The method can not return empty reference!" );
SwitchOwnPersistence( xNewParentStorage, xNewOwnStorage, aNewName ); SwitchOwnPersistence( xNewParentStorage, xNewOwnStorage, aNewName );
} }
@ -302,7 +300,7 @@ void OCommonEmbeddedObject::EmbedAndReparentDoc_Impl( const uno::Reference< util
} }
catch( const lang::NoSupportException & ) catch( const lang::NoSupportException & )
{ {
OSL_FAIL( "OCommonEmbeddedObject::EmbedAndReparentDoc: cannot set parent at document!" ); SAL_WARN( "embeddedobj.common", "OCommonEmbeddedObject::EmbedAndReparentDoc: cannot set parent at document!" );
} }
} }
@ -327,7 +325,7 @@ uno::Reference< util::XCloseable > OCommonEmbeddedObject::InitNewDocument_Impl()
if ( m_xRecoveryStorage.is() ) if ( m_xRecoveryStorage.is() )
{ {
uno::Reference< document::XStorageBasedDocument > xDoc( xLoadable, uno::UNO_QUERY ); uno::Reference< document::XStorageBasedDocument > xDoc( xLoadable, uno::UNO_QUERY );
OSL_ENSURE( xDoc.is(), "OCommonEmbeddedObject::InitNewDocument_Impl: cannot recover from a storage when the document is not storage based!" ); SAL_WARN_IF( !xDoc.is(), "embeddedobj.common", "OCommonEmbeddedObject::InitNewDocument_Impl: cannot recover from a storage when the document is not storage based!" );
if ( xDoc.is() ) if ( xDoc.is() )
{ {
::comphelper::NamedValueCollection aLoadArgs; ::comphelper::NamedValueCollection aLoadArgs;
@ -463,7 +461,7 @@ void OCommonEmbeddedObject::FillDefaultLoadArgs_Impl( const uno::Reference< embe
o_rLoadArgs.put( "ReadOnly", m_bReadOnly ); o_rLoadArgs.put( "ReadOnly", m_bReadOnly );
OUString aFilterName = GetFilterName( ::comphelper::OStorageHelper::GetXStorageFormat( i_rxStorage ) ); OUString aFilterName = GetFilterName( ::comphelper::OStorageHelper::GetXStorageFormat( i_rxStorage ) );
OSL_ENSURE( !aFilterName.isEmpty(), "OCommonEmbeddedObject::FillDefaultLoadArgs_Impl: Wrong document service name!" ); SAL_WARN_IF( aFilterName.isEmpty(), "embeddedobj.common", "OCommonEmbeddedObject::FillDefaultLoadArgs_Impl: Wrong document service name!" );
if ( aFilterName.isEmpty() ) if ( aFilterName.isEmpty() )
throw io::IOException(); // TODO: error message/code throw io::IOException(); // TODO: error message/code
@ -516,7 +514,7 @@ uno::Reference< util::XCloseable > OCommonEmbeddedObject::LoadDocumentFromStorag
{ {
} }
OSL_ENSURE( !aTempFileURL.isEmpty(), "Coudn't retrieve temporary file URL!\n" ); SAL_WARN_IF( aTempFileURL.isEmpty(), "embeddedobj.common", "Coudn't retrieve temporary file URL!" );
aLoadArgs.put( "URL", aTempFileURL ); aLoadArgs.put( "URL", aTempFileURL );
aLoadArgs.put( "InputStream", xTempInpStream ); aLoadArgs.put( "InputStream", xTempInpStream );
@ -586,7 +584,7 @@ uno::Reference< io::XInputStream > OCommonEmbeddedObject::StoreDocumentToTempStr
OUString aFilterName = GetFilterName( nStorageFormat ); OUString aFilterName = GetFilterName( nStorageFormat );
OSL_ENSURE( !aFilterName.isEmpty(), "Wrong document service name!" ); SAL_WARN_IF( aFilterName.isEmpty(), "embeddedobj.common", "Wrong document service name!" );
if ( aFilterName.isEmpty() ) if ( aFilterName.isEmpty() )
throw io::IOException(); // TODO: throw io::IOException(); // TODO:
@ -607,7 +605,7 @@ uno::Reference< io::XInputStream > OCommonEmbeddedObject::StoreDocumentToTempStr
} }
catch( const uno::Exception& ) catch( const uno::Exception& )
{ {
OSL_FAIL( "Looks like stream was closed already" ); SAL_WARN( "embeddedobj.common", "Looks like stream was closed already" );
} }
return aResult; return aResult;
@ -634,7 +632,7 @@ void OCommonEmbeddedObject::SaveObject_Impl()
} }
catch( const uno::Exception& ) catch( const uno::Exception& )
{ {
OSL_FAIL( "The object was not stored!\n" ); SAL_WARN( "embeddedobj.common", "The object was not stored!" );
} }
} }
} }
@ -731,7 +729,7 @@ void OCommonEmbeddedObject::StoreDocToStorage_Impl( const uno::Reference< embed:
const OUString& aHierarchName, const OUString& aHierarchName,
sal_Bool bAttachToTheStorage ) sal_Bool bAttachToTheStorage )
{ {
OSL_ENSURE( xStorage.is(), "No storage is provided for storing!" ); SAL_WARN_IF( !xStorage.is(), "embeddedobj.common", "No storage is provided for storing!" );
if ( !xStorage.is() ) if ( !xStorage.is() )
throw uno::RuntimeException(); // TODO: throw uno::RuntimeException(); // TODO:
@ -747,7 +745,7 @@ void OCommonEmbeddedObject::StoreDocToStorage_Impl( const uno::Reference< embed:
{ {
OUString aFilterName = GetFilterName( nStorageFormat ); OUString aFilterName = GetFilterName( nStorageFormat );
OSL_ENSURE( !aFilterName.isEmpty(), "Wrong document service name!" ); SAL_WARN_IF( aFilterName.isEmpty(), "embeddedobj.common", "Wrong document service name!" );
if ( aFilterName.isEmpty() ) if ( aFilterName.isEmpty() )
throw io::IOException(); // TODO: throw io::IOException(); // TODO:
@ -768,7 +766,7 @@ void OCommonEmbeddedObject::StoreDocToStorage_Impl( const uno::Reference< embed:
// store document to temporary stream based on temporary file // store document to temporary stream based on temporary file
uno::Reference < io::XInputStream > xTempIn = StoreDocumentToTempStream_Impl( nStorageFormat, aBaseURL, aHierarchName ); uno::Reference < io::XInputStream > xTempIn = StoreDocumentToTempStream_Impl( nStorageFormat, aBaseURL, aHierarchName );
OSL_ENSURE( xTempIn.is(), "The stream reference can not be empty!\n" ); SAL_WARN_IF( !xTempIn.is(), "embeddedobj.common", "The stream reference can not be empty!" );
// open storage based on document temporary file for reading // open storage based on document temporary file for reading
uno::Reference < lang::XSingleServiceFactory > xStorageFactory = embed::StorageFactory::create(m_xContext); uno::Reference < lang::XSingleServiceFactory > xStorageFactory = embed::StorageFactory::create(m_xContext);
@ -828,7 +826,7 @@ uno::Reference< util::XCloseable > OCommonEmbeddedObject::CreateTempDocFromLink_
{ {
uno::Reference< util::XCloseable > xResult; uno::Reference< util::XCloseable > xResult;
OSL_ENSURE( m_bIsLink, "The object is not a linked one!\n" ); SAL_WARN_IF( !m_bIsLink, "embeddedobj.common", "The object is not a linked one!" );
uno::Sequence< beans::PropertyValue > aTempMediaDescr; uno::Sequence< beans::PropertyValue > aTempMediaDescr;
@ -842,7 +840,7 @@ uno::Reference< util::XCloseable > OCommonEmbeddedObject::CreateTempDocFromLink_
} }
catch ( const uno::Exception& ) catch ( const uno::Exception& )
{ {
OSL_FAIL( "Can not retrieve storage media type!\n" ); SAL_WARN( "embeddedobj.common", "Can not retrieve storage media type!" );
} }
if ( m_pDocHolder->GetComponent().is() ) if ( m_pDocHolder->GetComponent().is() )
@ -865,7 +863,7 @@ uno::Reference< util::XCloseable > OCommonEmbeddedObject::CreateTempDocFromLink_
{ {
} }
OSL_ENSURE( !aTempFileURL.isEmpty(), "Couldn't retrieve temporary file URL!\n" ); SAL_WARN_IF( aTempFileURL.isEmpty(), "embeddedobj.common", "Couldn't retrieve temporary file URL!" );
aTempMediaDescr[0].Name = OUString( "URL" ); aTempMediaDescr[0].Name = OUString( "URL" );
aTempMediaDescr[0].Value <<= aTempFileURL; aTempMediaDescr[0].Value <<= aTempFileURL;
@ -903,7 +901,7 @@ void SAL_CALL OCommonEmbeddedObject::setPersistentEntry(
uno::Exception, uno::Exception,
uno::RuntimeException ) uno::RuntimeException )
{ {
RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OCommonEmbeddedObject::setPersistentEntry" ); SAL_INFO( "embeddedobj.common", "embeddedobj (mv76033) OCommonEmbeddedObject::setPersistentEntry" );
// the type of the object must be already set // the type of the object must be already set
// a kind of typedetection should be done in the factory // a kind of typedetection should be done in the factory
@ -1040,7 +1038,7 @@ void SAL_CALL OCommonEmbeddedObject::setPersistentEntry(
m_pDocHolder->SetOutplaceFrameProperties( aOutFrameProps ); m_pDocHolder->SetOutplaceFrameProperties( aOutFrameProps );
} }
else else
OSL_FAIL( "OCommonEmbeddedObject::setPersistentEntry: illegal type for argument 'OutplaceFrameProperties'!" ); SAL_WARN( "embeddedobj.common", "OCommonEmbeddedObject::setPersistentEntry: illegal type for argument 'OutplaceFrameProperties'!" );
} }
else if ( lObjArgs[nObjInd].Name == "ModuleName" ) else if ( lObjArgs[nObjInd].Name == "ModuleName" )
{ {
@ -1131,7 +1129,7 @@ void SAL_CALL OCommonEmbeddedObject::storeToEntry( const uno::Reference< embed::
uno::Exception, uno::Exception,
uno::RuntimeException ) uno::RuntimeException )
{ {
RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OCommonEmbeddedObject::storeToEntry" ); SAL_INFO( "embeddedobj.common", "embeddedobj (mv76033) OCommonEmbeddedObject::storeToEntry" );
::osl::ResettableMutexGuard aGuard( m_aMutex ); ::osl::ResettableMutexGuard aGuard( m_aMutex );
if ( m_bDisposed ) if ( m_bDisposed )
@ -1168,7 +1166,7 @@ void SAL_CALL OCommonEmbeddedObject::storeToEntry( const uno::Reference< embed::
} }
catch ( const uno::Exception& ) catch ( const uno::Exception& )
{ {
OSL_FAIL( "Can not retrieve target storage media type!\n" ); SAL_WARN( "embeddedobj.common", "Can not retrieve target storage media type!" );
} }
try try
@ -1181,7 +1179,7 @@ void SAL_CALL OCommonEmbeddedObject::storeToEntry( const uno::Reference< embed::
} }
catch ( const uno::Exception& ) catch ( const uno::Exception& )
{ {
OSL_FAIL( "Can not retrieve own storage media type!\n" ); SAL_WARN( "embeddedobj.common", "Can not retrieve own storage media type!" );
} }
sal_Bool bTryOptimization = sal_False; sal_Bool bTryOptimization = sal_False;
@ -1257,7 +1255,7 @@ void SAL_CALL OCommonEmbeddedObject::storeAsEntry( const uno::Reference< embed::
uno::Exception, uno::Exception,
uno::RuntimeException ) uno::RuntimeException )
{ {
RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OCommonEmbeddedObject::storeAsEntry" ); SAL_INFO( "embeddedobj.common", "embeddedobj (mv76033) OCommonEmbeddedObject::storeAsEntry" );
// TODO: use lObjArgs // TODO: use lObjArgs
@ -1299,7 +1297,7 @@ void SAL_CALL OCommonEmbeddedObject::storeAsEntry( const uno::Reference< embed::
} }
catch ( const uno::Exception& ) catch ( const uno::Exception& )
{ {
OSL_FAIL( "Can not retrieve target storage media type!\n" ); SAL_WARN( "embeddedobj.common", "Can not retrieve target storage media type!" );
} }
try try
@ -1312,7 +1310,7 @@ void SAL_CALL OCommonEmbeddedObject::storeAsEntry( const uno::Reference< embed::
} }
catch ( const uno::Exception& ) catch ( const uno::Exception& )
{ {
OSL_FAIL( "Can not retrieve own storage media type!\n" ); SAL_WARN( "embeddedobj.common", "Can not retrieve own storage media type!" );
} }
PostEvent_Impl( OUString( "OnSaveAs" ) ); PostEvent_Impl( OUString( "OnSaveAs" ) );
@ -1394,7 +1392,7 @@ void SAL_CALL OCommonEmbeddedObject::saveCompleted( sal_Bool bUseNew )
uno::Exception, uno::Exception,
uno::RuntimeException ) uno::RuntimeException )
{ {
RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OCommonEmbeddedObject::saveCompleted" ); SAL_INFO( "embeddedobj.common", "embeddedobj (mv76033) OCommonEmbeddedObject::saveCompleted" );
::osl::MutexGuard aGuard( m_aMutex ); ::osl::MutexGuard aGuard( m_aMutex );
if ( m_bDisposed ) if ( m_bDisposed )
@ -1422,7 +1420,7 @@ void SAL_CALL OCommonEmbeddedObject::saveCompleted( sal_Bool bUseNew )
if ( !m_bWaitSaveCompleted && !bUseNew ) if ( !m_bWaitSaveCompleted && !bUseNew )
return; return;
OSL_ENSURE( m_bWaitSaveCompleted, "Unexpected saveCompleted() call!\n" ); SAL_WARN_IF( !m_bWaitSaveCompleted, "embeddedobj.common", "Unexpected saveCompleted() call!" );
if ( !m_bWaitSaveCompleted ) if ( !m_bWaitSaveCompleted )
throw io::IOException(); // TODO: illegal call throw io::IOException(); // TODO: illegal call
@ -1445,7 +1443,7 @@ void SAL_CALL OCommonEmbeddedObject::saveCompleted( sal_Bool bUseNew )
{ {
try { try {
uno::Reference< lang::XComponent > xComponent( m_xNewObjectStorage, uno::UNO_QUERY ); uno::Reference< lang::XComponent > xComponent( m_xNewObjectStorage, uno::UNO_QUERY );
OSL_ENSURE( xComponent.is(), "Wrong storage implementation!" ); SAL_WARN_IF( !xComponent.is(), "embeddedobj.common", "Wrong storage implementation!" );
if ( xComponent.is() ) if ( xComponent.is() )
xComponent->dispose(); xComponent->dispose();
} }
@ -1522,7 +1520,7 @@ void SAL_CALL OCommonEmbeddedObject::storeOwn()
uno::Exception, uno::Exception,
uno::RuntimeException ) uno::RuntimeException )
{ {
RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OCommonEmbeddedObject::storeOwn" ); SAL_INFO( "embeddedobj.common", "embeddedobj (mv76033) OCommonEmbeddedObject::storeOwn" );
// during switching from Activated to Running and from Running to Loaded states the object will // during switching from Activated to Running and from Running to Loaded states the object will
// ask container to store the object, the container has to make decision // ask container to store the object, the container has to make decision
@ -1553,7 +1551,7 @@ void SAL_CALL OCommonEmbeddedObject::storeOwn()
PostEvent_Impl( OUString( "OnSave" ) ); PostEvent_Impl( OUString( "OnSave" ) );
OSL_ENSURE( m_pDocHolder->GetComponent().is(), "If an object is activated or in running state it must have a document!\n" ); SAL_WARN_IF( !m_pDocHolder->GetComponent().is(), "embeddedobj.common", "If an object is activated or in running state it must have a document!" );
if ( !m_pDocHolder->GetComponent().is() ) if ( !m_pDocHolder->GetComponent().is() )
throw uno::RuntimeException(); throw uno::RuntimeException();
@ -1588,7 +1586,7 @@ void SAL_CALL OCommonEmbeddedObject::storeOwn()
} }
catch ( const uno::Exception& ) catch ( const uno::Exception& )
{ {
OSL_FAIL( "Can not retrieve storage media type!\n" ); SAL_WARN( "embeddedobj.common", "Can not retrieve storage media type!" );
} }
aGuard.clear(); aGuard.clear();
@ -1830,7 +1828,7 @@ void SAL_CALL OCommonEmbeddedObject::breakLink( const uno::Reference< embed::XSt
{} {}
m_pDocHolder->SetComponent( xDocument, m_bReadOnly ); m_pDocHolder->SetComponent( xDocument, m_bReadOnly );
OSL_ENSURE( m_pDocHolder->GetComponent().is(), "If document cant be created, an exception must be thrown!\n" ); SAL_WARN_IF( !m_pDocHolder->GetComponent().is(), "embeddedobj.common", "If document cant be created, an exception must be thrown!" );
if ( m_nObjectState == embed::EmbedStates::LOADED ) if ( m_nObjectState == embed::EmbedStates::LOADED )
{ {

View File

@ -23,8 +23,6 @@
#include <com/sun/star/uno/Sequence.hxx> #include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/lang/DisposedException.hpp> #include <com/sun/star/lang/DisposedException.hpp>
#include <rtl/logfile.hxx>
#include <commonembobj.hxx> #include <commonembobj.hxx>
@ -37,13 +35,13 @@ void SAL_CALL OCommonEmbeddedObject::setVisualAreaSize( sal_Int64 nAspect, const
uno::Exception, uno::Exception,
uno::RuntimeException ) uno::RuntimeException )
{ {
RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OCommonEmbeddedObject::setVisualAreaSize" ); SAL_WARN( "embeddedobj.common", "embeddedobj (mv76033) OCommonEmbeddedObject::setVisualAreaSize" );
::osl::MutexGuard aGuard( m_aMutex ); ::osl::MutexGuard aGuard( m_aMutex );
if ( m_bDisposed ) if ( m_bDisposed )
throw lang::DisposedException(); // TODO throw lang::DisposedException(); // TODO
OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!\n" ); SAL_WARN_IF( nAspect == embed::Aspects::MSOLE_ICON, "embeddedobj.common", "For iconified objects no graphical replacement is required!" );
if ( nAspect == embed::Aspects::MSOLE_ICON ) if ( nAspect == embed::Aspects::MSOLE_ICON )
// no representation can be retrieved // no representation can be retrieved
throw embed::WrongStateException( OUString( "Illegal call!\n" ), throw embed::WrongStateException( OUString( "Illegal call!\n" ),
@ -79,7 +77,7 @@ awt::Size SAL_CALL OCommonEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect )
uno::Exception, uno::Exception,
uno::RuntimeException ) uno::RuntimeException )
{ {
RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OCommonEmbeddedObject::getVisualAreaSize" ); SAL_WARN( "embeddedobj.common", "embeddedobj (mv76033) OCommonEmbeddedObject::getVisualAreaSize" );
::osl::MutexGuard aGuard( m_aMutex ); ::osl::MutexGuard aGuard( m_aMutex );
if ( m_bDisposed ) if ( m_bDisposed )
@ -89,7 +87,7 @@ awt::Size SAL_CALL OCommonEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect )
throw embed::WrongStateException( OUString( "The own object has no persistence!\n" ), throw embed::WrongStateException( OUString( "The own object has no persistence!\n" ),
uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) );
OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!\n" ); SAL_WARN_IF( nAspect == embed::Aspects::MSOLE_ICON, "embeddedobj.common", "For iconified objects no graphical replacement is required!" );
if ( m_bHasClonedSize ) if ( m_bHasClonedSize )
return m_aClonedSize; return m_aClonedSize;
@ -123,7 +121,7 @@ sal_Int32 SAL_CALL OCommonEmbeddedObject::getMapUnit( sal_Int64 nAspect )
if ( m_bDisposed ) if ( m_bDisposed )
throw lang::DisposedException(); // TODO throw lang::DisposedException(); // TODO
OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!\n" ); SAL_WARN_IF( nAspect == embed::Aspects::MSOLE_ICON, "embeddedobj.common", "For iconified objects no graphical replacement is required!" );
if ( nAspect == embed::Aspects::MSOLE_ICON ) if ( nAspect == embed::Aspects::MSOLE_ICON )
// no representation can be retrieved // no representation can be retrieved
throw embed::WrongStateException( OUString( "Illegal call!\n" ), throw embed::WrongStateException( OUString( "Illegal call!\n" ),
@ -162,7 +160,7 @@ embed::VisualRepresentation SAL_CALL OCommonEmbeddedObject::getPreferredVisualRe
uno::Exception, uno::Exception,
uno::RuntimeException ) uno::RuntimeException )
{ {
RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OCommonEmbeddedObject::getPrefferedVisualRepresentation" ); SAL_WARN( "embeddedobj.common", "embeddedobj (mv76033) OCommonEmbeddedObject::getPrefferedVisualRepresentation" );
::osl::MutexGuard aGuard( m_aMutex ); ::osl::MutexGuard aGuard( m_aMutex );
if ( m_bDisposed ) if ( m_bDisposed )
@ -173,7 +171,7 @@ embed::VisualRepresentation SAL_CALL OCommonEmbeddedObject::getPreferredVisualRe
uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) );
OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!\n" ); SAL_WARN_IF( nAspect == embed::Aspects::MSOLE_ICON, "embeddedobj.common", "For iconified objects no graphical replacement is required!" );
if ( nAspect == embed::Aspects::MSOLE_ICON ) if ( nAspect == embed::Aspects::MSOLE_ICON )
// no representation can be retrieved // no representation can be retrieved
throw embed::WrongStateException( OUString( "Illegal call!\n" ), throw embed::WrongStateException( OUString( "Illegal call!\n" ),
@ -188,7 +186,7 @@ embed::VisualRepresentation SAL_CALL OCommonEmbeddedObject::getPreferredVisualRe
bBackToLoaded = m_bIsLink; bBackToLoaded = m_bIsLink;
} }
OSL_ENSURE( m_pDocHolder->GetComponent().is(), "Running or Active object has no component!\n" ); SAL_WARN_IF( !m_pDocHolder->GetComponent().is(), "embeddedobj.common", "Running or Active object has no component!" );
// TODO: return for the aspect of the document // TODO: return for the aspect of the document
embed::VisualRepresentation aVisualRepresentation; embed::VisualRepresentation aVisualRepresentation;

View File

@ -24,7 +24,6 @@
#include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/container/XNameAccess.hpp>
#include <rtl/logfile.hxx>
#include <comphelper/processfactory.hxx> #include <comphelper/processfactory.hxx>
@ -70,7 +69,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta
uno::Exception, uno::Exception,
uno::RuntimeException) uno::RuntimeException)
{ {
RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OOoEmbeddedObjectFactory::createInstanceInitFromEntry" ); SAL_INFO( "embeddedobj.common", "embeddedobj (mv76033) OOoEmbeddedObjectFactory::createInstanceInitFromEntry" );
if ( !xStorage.is() ) if ( !xStorage.is() )
throw lang::IllegalArgumentException( OUString( "No parent storage is provided!\n" ), throw lang::IllegalArgumentException( OUString( "No parent storage is provided!\n" ),
@ -161,7 +160,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta
uno::Exception, uno::Exception,
uno::RuntimeException) uno::RuntimeException)
{ {
RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OOoEmbeddedObjectFactory::createInstanceInitFromMediaDescriptor" ); SAL_INFO( "embeddedobj.common", "embeddedobj (mv76033) OOoEmbeddedObjectFactory::createInstanceInitFromMediaDescriptor" );
if ( !xStorage.is() ) if ( !xStorage.is() )
throw lang::IllegalArgumentException( OUString( "No parent storage is provided!\n" ), throw lang::IllegalArgumentException( OUString( "No parent storage is provided!\n" ),
@ -226,7 +225,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta
uno::Exception, uno::Exception,
uno::RuntimeException) uno::RuntimeException)
{ {
RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OOoEmbeddedObjectFactory::createInstanceInitNew" ); SAL_INFO( "embeddedobj.common", "embeddedobj (mv76033) OOoEmbeddedObjectFactory::createInstanceInitNew" );
uno::Reference< uno::XInterface > xResult; uno::Reference< uno::XInterface > xResult;
@ -279,7 +278,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta
uno::Exception, uno::Exception,
uno::RuntimeException ) uno::RuntimeException )
{ {
RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OOoEmbeddedObjectFactory::createInstanceUserInit" ); SAL_INFO( "embeddedobj.common", "embeddedobj (mv76033) OOoEmbeddedObjectFactory::createInstanceUserInit" );
// the initialization is completelly controlled by user // the initialization is completelly controlled by user
if ( !xStorage.is() ) if ( !xStorage.is() )
@ -339,7 +338,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta
uno::Exception, uno::Exception,
uno::RuntimeException ) uno::RuntimeException )
{ {
RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OOoEmbeddedObjectFactory::createInstanceLink" ); SAL_INFO( "embeddedobj.common", "embeddedobj (mv76033) OOoEmbeddedObjectFactory::createInstanceLink" );
uno::Reference< uno::XInterface > xResult; uno::Reference< uno::XInterface > xResult;
@ -395,7 +394,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta
uno::Exception, uno::Exception,
uno::RuntimeException ) uno::RuntimeException )
{ {
RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OOoEmbeddedObjectFactory::createInstanceLinkUserInit" ); SAL_INFO( "embeddedobj.common", "embeddedobj (mv76033) OOoEmbeddedObjectFactory::createInstanceLinkUserInit" );
uno::Reference< uno::XInterface > xResult; uno::Reference< uno::XInterface > xResult;

View File

@ -29,7 +29,6 @@
#include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/lang/XComponent.hpp>
#include <rtl/logfile.hxx>
#include <comphelper/processfactory.hxx> #include <comphelper/processfactory.hxx>
@ -74,7 +73,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta
uno::Exception, uno::Exception,
uno::RuntimeException) uno::RuntimeException)
{ {
RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) UNOEmbeddedObjectCreator::createInstanceInitNew" ); SAL_INFO( "embeddedobj.general", "embeddedobj (mv76033) UNOEmbeddedObjectCreator::createInstanceInitNew" );
uno::Reference< uno::XInterface > xResult; uno::Reference< uno::XInterface > xResult;
@ -119,7 +118,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta
uno::Exception, uno::Exception,
uno::RuntimeException) uno::RuntimeException)
{ {
RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) UNOEmbeddedObjectCreator::createInstanceInitFromEntry" ); SAL_INFO( "embeddedobj.general", "embeddedobj (mv76033) UNOEmbeddedObjectCreator::createInstanceInitFromEntry" );
if ( !xStorage.is() ) if ( !xStorage.is() )
throw lang::IllegalArgumentException( OUString( "No parent storage is provided!\n" ), throw lang::IllegalArgumentException( OUString( "No parent storage is provided!\n" ),
@ -238,7 +237,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta
uno::Exception, uno::Exception,
uno::RuntimeException) uno::RuntimeException)
{ {
RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) UNOEmbeddedObjectCreator::createInstanceInitFromMediaDescriptor" ); SAL_INFO( "embeddedobj.general", "embeddedobj (mv76033) UNOEmbeddedObjectCreator::createInstanceInitFromMediaDescriptor" );
// TODO: use lObjArgs // TODO: use lObjArgs
@ -303,7 +302,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta
uno::Exception, uno::Exception,
uno::RuntimeException) uno::RuntimeException)
{ {
RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) UNOEmbeddedObjectCreator::createInstanceUserInit" ); SAL_INFO( "embeddedobj.general", "embeddedobj (mv76033) UNOEmbeddedObjectCreator::createInstanceUserInit" );
uno::Reference< uno::XInterface > xResult; uno::Reference< uno::XInterface > xResult;
@ -344,7 +343,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta
uno::Exception, uno::Exception,
uno::RuntimeException ) uno::RuntimeException )
{ {
RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) UNOEmbeddedObjectCreator::createInstanceLink" ); SAL_INFO( "embeddedobj.general", "embeddedobj (mv76033) UNOEmbeddedObjectCreator::createInstanceLink" );
uno::Reference< uno::XInterface > xResult; uno::Reference< uno::XInterface > xResult;
@ -419,7 +418,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta
uno::Exception, uno::Exception,
uno::RuntimeException ) uno::RuntimeException )
{ {
RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) UNOEmbeddedObjectCreator::createInstanceLinkUserInit" ); SAL_INFO( "embeddedobj.general", "embeddedobj (mv76033) UNOEmbeddedObjectCreator::createInstanceLinkUserInit" );
uno::Reference< uno::XInterface > xResult; uno::Reference< uno::XInterface > xResult;

View File

@ -42,7 +42,6 @@
#include <com/sun/star/system/SystemShellExecute.hpp> #include <com/sun/star/system/SystemShellExecute.hpp>
#include <com/sun/star/system/SystemShellExecuteFlags.hpp> #include <com/sun/star/system/SystemShellExecuteFlags.hpp>
#include <rtl/logfile.hxx>
#include <cppuhelper/interfacecontainer.h> #include <cppuhelper/interfacecontainer.h>
#include <comphelper/processfactory.hxx> #include <comphelper/processfactory.hxx>
#include <comphelper/mimeconfighelper.hxx> #include <comphelper/mimeconfighelper.hxx>
@ -104,7 +103,7 @@ uno::Sequence< sal_Int32 > OleEmbeddedObject::GetReachableStatesList_Impl(
//---------------------------------------------- //----------------------------------------------
uno::Sequence< sal_Int32 > OleEmbeddedObject::GetIntermediateVerbsSequence_Impl( sal_Int32 nNewState ) uno::Sequence< sal_Int32 > OleEmbeddedObject::GetIntermediateVerbsSequence_Impl( sal_Int32 nNewState )
{ {
OSL_ENSURE( m_nObjectState != embed::EmbedStates::LOADED, "Loaded object is switched to running state without verbs using!" ); SAL_WARN_IF( m_nObjectState == embed::EmbedStates::LOADED, "embeddedobj.ole", "Loaded object is switched to running state without verbs using!" );
// actually there will be only one verb // actually there will be only one verb
if ( m_nObjectState == embed::EmbedStates::RUNNING && nNewState == embed::EmbedStates::ACTIVE ) if ( m_nObjectState == embed::EmbedStates::RUNNING && nNewState == embed::EmbedStates::ACTIVE )
@ -415,7 +414,7 @@ sal_Bool OleEmbeddedObject::TryToConvertToOOo()
if ( !aStorageName.isEmpty() ) if ( !aStorageName.isEmpty() )
try { try {
m_xParentStorage->removeElement( aStorageName ); m_xParentStorage->removeElement( aStorageName );
} catch( const uno::Exception& ) { OSL_FAIL( "Can not remove temporary storage!" ); } } catch( const uno::Exception& ) { SAL_WARN( "embeddedobj.ole", "Can not remove temporary storage!" ); }
break; break;
} }
} }
@ -445,7 +444,7 @@ void SAL_CALL OleEmbeddedObject::changeState( sal_Int32 nNewState )
uno::Exception, uno::Exception,
uno::RuntimeException ) uno::RuntimeException )
{ {
RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OleEmbeddedObject::changeState" ); SAL_INFO( "embeddedobj.ole", "embeddedobj (mv76033) OleEmbeddedObject::changeState" );
// begin wrapping related part ==================== // begin wrapping related part ====================
uno::Reference< embed::XEmbeddedObject > xWrappedObject = m_xWrappedObject; uno::Reference< embed::XEmbeddedObject > xWrappedObject = m_xWrappedObject;
@ -603,7 +602,7 @@ uno::Sequence< sal_Int32 > SAL_CALL OleEmbeddedObject::getReachableStates()
throw ( embed::WrongStateException, throw ( embed::WrongStateException,
uno::RuntimeException ) uno::RuntimeException )
{ {
RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OleEmbeddedObject::getReachableStates" ); SAL_INFO( "embeddedobj.ole", "embeddedobj (mv76033) OleEmbeddedObject::getReachableStates" );
// begin wrapping related part ==================== // begin wrapping related part ====================
uno::Reference< embed::XEmbeddedObject > xWrappedObject = m_xWrappedObject; uno::Reference< embed::XEmbeddedObject > xWrappedObject = m_xWrappedObject;
@ -762,7 +761,7 @@ void SAL_CALL OleEmbeddedObject::doVerb( sal_Int32 nVerbID )
uno::Exception, uno::Exception,
uno::RuntimeException ) uno::RuntimeException )
{ {
RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OleEmbeddedObject::doVerb" ); SAL_INFO( "embeddedobj.ole", "embeddedobj (mv76033) OleEmbeddedObject::doVerb" );
// begin wrapping related part ==================== // begin wrapping related part ====================
uno::Reference< embed::XEmbeddedObject > xWrappedObject = m_xWrappedObject; uno::Reference< embed::XEmbeddedObject > xWrappedObject = m_xWrappedObject;
@ -898,7 +897,7 @@ uno::Sequence< embed::VerbDescriptor > SAL_CALL OleEmbeddedObject::getSupportedV
throw ( embed::WrongStateException, throw ( embed::WrongStateException,
uno::RuntimeException ) uno::RuntimeException )
{ {
RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OleEmbeddedObject::getSupportedVerb" ); SAL_INFO( "embeddedobj.ole", "embeddedobj (mv76033) OleEmbeddedObject::getSupportedVerb" );
// begin wrapping related part ==================== // begin wrapping related part ====================
uno::Reference< embed::XEmbeddedObject > xWrappedObject = m_xWrappedObject; uno::Reference< embed::XEmbeddedObject > xWrappedObject = m_xWrappedObject;
@ -1022,7 +1021,7 @@ void SAL_CALL OleEmbeddedObject::update()
else else
{ {
// the object must be up to date // the object must be up to date
OSL_ENSURE( m_nUpdateMode == embed::EmbedUpdateModes::ALWAYS_UPDATE, "Unknown update mode!\n" ); SAL_WARN_IF( m_nUpdateMode != embed::EmbedUpdateModes::ALWAYS_UPDATE, "embeddedobj.ole", "Unknown update mode!" );
} }
} }

View File

@ -37,8 +37,6 @@
#include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/ucb/SimpleFileAccess.hpp> #include <com/sun/star/ucb/SimpleFileAccess.hpp>
#include <rtl/logfile.hxx>
#include <comphelper/processfactory.hxx> #include <comphelper/processfactory.hxx>
#include <comphelper/storagehelper.hxx> #include <comphelper/storagehelper.hxx>
#include <comphelper/mimeconfighelper.hxx> #include <comphelper/mimeconfighelper.hxx>
@ -77,7 +75,7 @@ sal_Bool KillFile_Impl( const OUString& aURL, const uno::Reference< lang::XMulti
//---------------------------------------------- //----------------------------------------------
OUString GetNewTempFileURL_Impl( const uno::Reference< lang::XMultiServiceFactory >& xFactory ) OUString GetNewTempFileURL_Impl( const uno::Reference< lang::XMultiServiceFactory >& xFactory )
{ {
OSL_ENSURE( xFactory.is(), "No factory is provided!\n" ); SAL_WARN_IF( !xFactory.is(), "embeddedobj.ole", "No factory is provided!" );
OUString aResult; OUString aResult;
@ -263,7 +261,7 @@ void VerbExecutionController::UnlockNotification()
uno::Reference< io::XStream > OleEmbeddedObject::GetNewFilledTempStream_Impl( const uno::Reference< io::XInputStream >& xInStream ) uno::Reference< io::XStream > OleEmbeddedObject::GetNewFilledTempStream_Impl( const uno::Reference< io::XInputStream >& xInStream )
throw( io::IOException ) throw( io::IOException )
{ {
OSL_ENSURE( xInStream.is(), "Wrong parameter is provided!\n" ); SAL_WARN_IF( !xInStream.is(), "embeddedobj.ole", "Wrong parameter is provided!" );
uno::Reference < io::XStream > xTempFile( uno::Reference < io::XStream > xTempFile(
io::TempFile::create(comphelper::getComponentContext(m_xFactory)), io::TempFile::create(comphelper::getComponentContext(m_xFactory)),
@ -481,7 +479,7 @@ void OleEmbeddedObject::InsertVisualCache_Impl( const uno::Reference< io::XStrea
sal_Int64 nLength = xTempSeek->getLength() - 40; sal_Int64 nLength = xTempSeek->getLength() - 40;
if ( nLength < 0 || nLength >= 0xFFFFFFFF ) if ( nLength < 0 || nLength >= 0xFFFFFFFF )
{ {
OSL_FAIL( "Length is not acceptable!" ); SAL_WARN( "embeddedobj.ole", "Length is not acceptable!" );
return; return;
} }
for ( sal_Int32 nInd = 0; nInd < 4; nInd++ ) for ( sal_Int32 nInd = 0; nInd < 4; nInd++ )
@ -566,7 +564,7 @@ sal_Bool OleEmbeddedObject::HasVisReplInStream()
SetVisReplInStream( sal_True ); SetVisReplInStream( sal_True );
else else
{ {
RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OleEmbeddedObject::HasVisualReplInStream, analizing" ); SAL_INFO( "embeddedobj.ole", "embeddedobj (mv76033) OleEmbeddedObject::HasVisualReplInStream, analizing" );
uno::Reference< io::XInputStream > xStream; uno::Reference< io::XInputStream > xStream;
@ -634,7 +632,7 @@ uno::Reference< io::XStream > OleEmbeddedObject::TryToRetrieveCachedVisualRepres
if ( xStream.is() ) if ( xStream.is() )
{ {
RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OleEmbeddedObject::TryToRetrieveCachedVisualRepresentation, retrieving" ); SAL_INFO( "embeddedobj.ole", "embeddedobj (mv76033) OleEmbeddedObject::TryToRetrieveCachedVisualRepresentation, retrieving" );
uno::Reference< container::XNameContainer > xNameContainer; uno::Reference< container::XNameContainer > xNameContainer;
uno::Sequence< uno::Any > aArgs( 2 ); uno::Sequence< uno::Any > aArgs( 2 );
@ -768,7 +766,7 @@ void OleEmbeddedObject::SwitchOwnPersistence( const uno::Reference< embed::XStor
{ {
if ( xNewParentStorage == m_xParentStorage && aNewName.equals( m_aEntryName ) ) if ( xNewParentStorage == m_xParentStorage && aNewName.equals( m_aEntryName ) )
{ {
OSL_ENSURE( xNewObjectStream == m_xObjectStream, "The streams must be the same!\n" ); SAL_WARN_IF( xNewObjectStream != m_xObjectStream, "embeddedobj.ole", "The streams must be the same!" );
return; return;
} }
@ -797,7 +795,7 @@ void OleEmbeddedObject::SwitchOwnPersistence( const uno::Reference< embed::XStor
sal_Int32 nStreamMode = m_bReadOnly ? embed::ElementModes::READ : embed::ElementModes::READWRITE; sal_Int32 nStreamMode = m_bReadOnly ? embed::ElementModes::READ : embed::ElementModes::READWRITE;
uno::Reference< io::XStream > xNewOwnStream = xNewParentStorage->openStreamElement( aNewName, nStreamMode ); uno::Reference< io::XStream > xNewOwnStream = xNewParentStorage->openStreamElement( aNewName, nStreamMode );
OSL_ENSURE( xNewOwnStream.is(), "The method can not return empty reference!" ); SAL_WARN_IF( !xNewOwnStream.is(), "embeddedobj.ole", "The method can not return empty reference!" );
SwitchOwnPersistence( xNewParentStorage, xNewOwnStream, aNewName ); SwitchOwnPersistence( xNewParentStorage, xNewOwnStream, aNewName );
} }
@ -830,8 +828,8 @@ sal_Bool OleEmbeddedObject::OnShowWindow_Impl( sal_Bool bShow )
sal_Bool bResult = sal_False; sal_Bool bResult = sal_False;
OSL_ENSURE( m_nObjectState != -1, "The object has no persistence!\n" ); SAL_WARN_IF( m_nObjectState == -1, "embeddedobj.ole", "The object has no persistence!" );
OSL_ENSURE( m_nObjectState != embed::EmbedStates::LOADED, "The object get OnShowWindow in loaded state!\n" ); SAL_WARN_IF( m_nObjectState == embed::EmbedStates::LOADED, "embeddedobj.ole", "The object get OnShowWindow in loaded state!" );
if ( m_nObjectState == -1 || m_nObjectState == embed::EmbedStates::LOADED ) if ( m_nObjectState == -1 || m_nObjectState == embed::EmbedStates::LOADED )
return sal_False; return sal_False;
@ -923,7 +921,7 @@ void OleEmbeddedObject::OnClosed_Impl()
//------------------------------------------------------ //------------------------------------------------------
OUString OleEmbeddedObject::CreateTempURLEmpty_Impl() OUString OleEmbeddedObject::CreateTempURLEmpty_Impl()
{ {
OSL_ENSURE( m_aTempURL.isEmpty(), "The object has already the temporary file!" ); SAL_WARN_IF( !m_aTempURL.isEmpty(), "embeddedobj.ole", "The object has already the temporary file!" );
m_aTempURL = GetNewTempFileURL_Impl( m_xFactory ); m_aTempURL = GetNewTempFileURL_Impl( m_xFactory );
return m_aTempURL; return m_aTempURL;
@ -934,7 +932,7 @@ OUString OleEmbeddedObject::GetTempURL_Impl()
{ {
if ( m_aTempURL.isEmpty() ) if ( m_aTempURL.isEmpty() )
{ {
RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OleEmbeddedObject::GetTempURL_Impl, tempfile creation" ); SAL_INFO( "embeddedobj.ole", "embeddedobj (mv76033) OleEmbeddedObject::GetTempURL_Impl, tempfile creation" );
// if there is no temporary file, it will be created from the own entry // if there is no temporary file, it will be created from the own entry
uno::Reference< embed::XOptimizedStorage > xOptParStorage( m_xParentStorage, uno::UNO_QUERY ); uno::Reference< embed::XOptimizedStorage > xOptParStorage( m_xParentStorage, uno::UNO_QUERY );
@ -1046,7 +1044,7 @@ void OleEmbeddedObject::StoreObjectToStream( uno::Reference< io::XOutputStream >
ucb::SimpleFileAccess::create( comphelper::getComponentContext(m_xFactory) ) ); ucb::SimpleFileAccess::create( comphelper::getComponentContext(m_xFactory) ) );
uno::Reference< io::XInputStream > xTempInStream = xTempAccess->openFileRead( m_aTempURL ); uno::Reference< io::XInputStream > xTempInStream = xTempAccess->openFileRead( m_aTempURL );
OSL_ENSURE( xTempInStream.is(), "The object's temporary file can not be reopened for reading!\n" ); SAL_WARN_IF( !xTempInStream.is(), "embeddedobj.ole", "The object's temporary file can not be reopened for reading!" );
// TODO: use bStoreVisReplace // TODO: use bStoreVisReplace
@ -1218,7 +1216,7 @@ void OleEmbeddedObject::StoreToLocation_Impl(
if ( !xCachedVisualRepresentation.is() ) if ( !xCachedVisualRepresentation.is() )
xCachedVisualRepresentation = TryToRetrieveCachedVisualRepresentation_Impl( xTargetStream ); xCachedVisualRepresentation = TryToRetrieveCachedVisualRepresentation_Impl( xTargetStream );
OSL_ENSURE( xCachedVisualRepresentation.is(), "No representation is available!" ); SAL_WARN_IF( !xCachedVisualRepresentation.is(), "embeddedobj.ole", "No representation is available!" );
// the following copying will be done in case it is SaveAs anyway // the following copying will be done in case it is SaveAs anyway
// if it is not SaveAs the seekable access is not required currently // if it is not SaveAs the seekable access is not required currently
@ -1293,7 +1291,7 @@ void SAL_CALL OleEmbeddedObject::setPersistentEntry(
uno::Exception, uno::Exception,
uno::RuntimeException ) uno::RuntimeException )
{ {
RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OleEmbeddedObject::setPersistentEntry" ); SAL_INFO( "embeddedobj.ole", "embeddedobj (mv76033) OleEmbeddedObject::setPersistentEntry" );
// begin wrapping related part ==================== // begin wrapping related part ====================
uno::Reference< embed::XEmbedPersist > xWrappedObject( m_xWrappedObject, uno::UNO_QUERY ); uno::Reference< embed::XEmbedPersist > xWrappedObject( m_xWrappedObject, uno::UNO_QUERY );
@ -1501,7 +1499,7 @@ void SAL_CALL OleEmbeddedObject::storeToEntry( const uno::Reference< embed::XSto
uno::Exception, uno::Exception,
uno::RuntimeException ) uno::RuntimeException )
{ {
RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OleEmbeddedObject::storeToEntry" ); SAL_INFO( "embeddedobj.ole", "embeddedobj (mv76033) OleEmbeddedObject::storeToEntry" );
// begin wrapping related part ==================== // begin wrapping related part ====================
uno::Reference< embed::XEmbedPersist > xWrappedObject( m_xWrappedObject, uno::UNO_QUERY ); uno::Reference< embed::XEmbedPersist > xWrappedObject( m_xWrappedObject, uno::UNO_QUERY );
@ -1535,7 +1533,7 @@ void SAL_CALL OleEmbeddedObject::storeAsEntry( const uno::Reference< embed::XSto
uno::Exception, uno::Exception,
uno::RuntimeException ) uno::RuntimeException )
{ {
RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OleEmbeddedObject::storeAsEntry" ); SAL_INFO( "embeddedobj.ole", "embeddedobj (mv76033) OleEmbeddedObject::storeAsEntry" );
// begin wrapping related part ==================== // begin wrapping related part ====================
uno::Reference< embed::XEmbedPersist > xWrappedObject( m_xWrappedObject, uno::UNO_QUERY ); uno::Reference< embed::XEmbedPersist > xWrappedObject( m_xWrappedObject, uno::UNO_QUERY );
@ -1564,7 +1562,7 @@ void SAL_CALL OleEmbeddedObject::saveCompleted( sal_Bool bUseNew )
uno::Exception, uno::Exception,
uno::RuntimeException ) uno::RuntimeException )
{ {
RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OleEmbeddedObject::saveCompleted" ); SAL_INFO( "embeddedobj.ole", "embeddedobj (mv76033) OleEmbeddedObject::saveCompleted" );
// begin wrapping related part ==================== // begin wrapping related part ====================
uno::Reference< embed::XEmbedPersist > xWrappedObject( m_xWrappedObject, uno::UNO_QUERY ); uno::Reference< embed::XEmbedPersist > xWrappedObject( m_xWrappedObject, uno::UNO_QUERY );
@ -1591,7 +1589,7 @@ void SAL_CALL OleEmbeddedObject::saveCompleted( sal_Bool bUseNew )
if ( !m_bWaitSaveCompleted && !bUseNew ) if ( !m_bWaitSaveCompleted && !bUseNew )
return; return;
OSL_ENSURE( m_bWaitSaveCompleted, "Unexpected saveCompleted() call!\n" ); SAL_WARN_IF( !m_bWaitSaveCompleted, "embeddedobj.ole", "Unexpected saveCompleted() call!\n" );
if ( !m_bWaitSaveCompleted ) if ( !m_bWaitSaveCompleted )
throw io::IOException(); // TODO: illegal call throw io::IOException(); // TODO: illegal call
@ -1611,7 +1609,7 @@ void SAL_CALL OleEmbeddedObject::saveCompleted( sal_Bool bUseNew )
// close remembered stream // close remembered stream
try { try {
uno::Reference< lang::XComponent > xComponent( m_xNewObjectStream, uno::UNO_QUERY ); uno::Reference< lang::XComponent > xComponent( m_xNewObjectStream, uno::UNO_QUERY );
OSL_ENSURE( xComponent.is(), "Wrong storage implementation!" ); SAL_WARN_IF( !xComponent.is(), "embeddedobj.ole", "Wrong storage implementation!" );
if ( xComponent.is() ) if ( xComponent.is() )
xComponent->dispose(); xComponent->dispose();
} }
@ -1729,7 +1727,7 @@ void SAL_CALL OleEmbeddedObject::storeOwn()
uno::Exception, uno::Exception,
uno::RuntimeException ) uno::RuntimeException )
{ {
RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OleEmbeddedObject::storeOwn" ); SAL_INFO( "embeddedobj.ole", "embeddedobj (mv76033) OleEmbeddedObject::storeOwn" );
// begin wrapping related part ==================== // begin wrapping related part ====================
uno::Reference< embed::XEmbedPersist > xWrappedObject( m_xWrappedObject, uno::UNO_QUERY ); uno::Reference< embed::XEmbedPersist > xWrappedObject( m_xWrappedObject, uno::UNO_QUERY );
@ -1805,7 +1803,7 @@ void SAL_CALL OleEmbeddedObject::storeOwn()
else else
{ {
m_xCachedVisualRepresentation = TryToRetrieveCachedVisualRepresentation_Impl( m_xObjectStream ); m_xCachedVisualRepresentation = TryToRetrieveCachedVisualRepresentation_Impl( m_xObjectStream );
OSL_ENSURE( m_xCachedVisualRepresentation.is(), "No representation is available!" ); SAL_WARN_IF( !m_xCachedVisualRepresentation.is(), "embeddedobj.ole", "No representation is available!" );
} }
} }
else else

View File

@ -25,8 +25,6 @@
#include <com/sun/star/io/XSeekable.hpp> #include <com/sun/star/io/XSeekable.hpp>
#include <com/sun/star/embed/NoVisualAreaSizeException.hpp> #include <com/sun/star/embed/NoVisualAreaSizeException.hpp>
#include <rtl/logfile.hxx>
#include <oleembobj.hxx> #include <oleembobj.hxx>
#include <olecomponent.hxx> #include <olecomponent.hxx>
#include <comphelper/mimeconfighelper.hxx> #include <comphelper/mimeconfighelper.hxx>
@ -81,7 +79,7 @@ void SAL_CALL OleEmbeddedObject::setVisualAreaSize( sal_Int64 nAspect, const awt
uno::Exception, uno::Exception,
uno::RuntimeException ) uno::RuntimeException )
{ {
RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OleEmbeddedObject::setVisualAreaSize" ); SAL_INFO( "embeddedobj.ole", "embeddedobj (mv76033) OleEmbeddedObject::setVisualAreaSize" );
// begin wrapping related part ==================== // begin wrapping related part ====================
uno::Reference< embed::XEmbeddedObject > xWrappedObject = m_xWrappedObject; uno::Reference< embed::XEmbeddedObject > xWrappedObject = m_xWrappedObject;
@ -97,7 +95,7 @@ void SAL_CALL OleEmbeddedObject::setVisualAreaSize( sal_Int64 nAspect, const awt
if ( m_bDisposed ) if ( m_bDisposed )
throw lang::DisposedException(); // TODO throw lang::DisposedException(); // TODO
OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!\n" ); SAL_WARN_IF( nAspect == embed::Aspects::MSOLE_ICON, "embeddedobj.ole", "For iconified objects no graphical replacement is required!\n" );
if ( nAspect == embed::Aspects::MSOLE_ICON ) if ( nAspect == embed::Aspects::MSOLE_ICON )
// no representation can be retrieved // no representation can be retrieved
throw embed::WrongStateException( OUString( "Illegal call!\n" ), throw embed::WrongStateException( OUString( "Illegal call!\n" ),
@ -126,7 +124,7 @@ void SAL_CALL OleEmbeddedObject::setVisualAreaSize( sal_Int64 nAspect, const awt
} }
catch( const uno::Exception& ) catch( const uno::Exception& )
{ {
OSL_FAIL( "The object should not be resized without activation!\n" ); SAL_WARN( "embeddedobj.ole", "The object should not be resized without activation!\n" );
} }
aGuard.reset(); aGuard.reset();
} }
@ -162,7 +160,7 @@ awt::Size SAL_CALL OleEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect )
uno::Exception, uno::Exception,
uno::RuntimeException ) uno::RuntimeException )
{ {
RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OleEmbeddedObject::getVisualAreaSize" ); SAL_INFO( "embeddedobj.ole", "embeddedobj (mv76033) OleEmbeddedObject::getVisualAreaSize" );
// begin wrapping related part ==================== // begin wrapping related part ====================
uno::Reference< embed::XEmbeddedObject > xWrappedObject = m_xWrappedObject; uno::Reference< embed::XEmbeddedObject > xWrappedObject = m_xWrappedObject;
@ -177,7 +175,7 @@ awt::Size SAL_CALL OleEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect )
if ( m_bDisposed ) if ( m_bDisposed )
throw lang::DisposedException(); // TODO throw lang::DisposedException(); // TODO
OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!\n" ); SAL_WARN_IF( nAspect == embed::Aspects::MSOLE_ICON, "embeddedobj.ole", "For iconified objects no graphical replacement is required!" );
if ( nAspect == embed::Aspects::MSOLE_ICON ) if ( nAspect == embed::Aspects::MSOLE_ICON )
// no representation can be retrieved // no representation can be retrieved
throw embed::WrongStateException( OUString( "Illegal call!\n" ), throw embed::WrongStateException( OUString( "Illegal call!\n" ),
@ -209,7 +207,7 @@ awt::Size SAL_CALL OleEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect )
sal_Bool bSuccess = sal_False; sal_Bool bSuccess = sal_False;
if ( getCurrentState() == embed::EmbedStates::LOADED ) if ( getCurrentState() == embed::EmbedStates::LOADED )
{ {
OSL_FAIL( "Loaded object has no cached size!\n" ); SAL_WARN( "embeddedobj.ole", "Loaded object has no cached size!" );
// try to switch the object to RUNNING state and request the value again // try to switch the object to RUNNING state and request the value again
try { try {
@ -290,7 +288,7 @@ awt::Size SAL_CALL OleEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect )
// return cached value // return cached value
if ( m_bHasCachedSize ) if ( m_bHasCachedSize )
{ {
OSL_ENSURE( nAspect == m_nCachedAspect, "Unexpected aspect is requested!\n" ); SAL_WARN_IF( nAspect != m_nCachedAspect, "embeddedobj.ole", "Unexpected aspect is requested!" );
aResult = m_aCachedSize; aResult = m_aCachedSize;
} }
else else
@ -310,7 +308,7 @@ embed::VisualRepresentation SAL_CALL OleEmbeddedObject::getPreferredVisualRepres
uno::Exception, uno::Exception,
uno::RuntimeException ) uno::RuntimeException )
{ {
RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OleEmbeddedObject::getPreferredVisualRepresentation" ); SAL_INFO( "embeddedobj.ole", "embeddedobj (mv76033) OleEmbeddedObject::getPreferredVisualRepresentation" );
// begin wrapping related part ==================== // begin wrapping related part ====================
uno::Reference< embed::XEmbeddedObject > xWrappedObject = m_xWrappedObject; uno::Reference< embed::XEmbeddedObject > xWrappedObject = m_xWrappedObject;
@ -325,7 +323,7 @@ embed::VisualRepresentation SAL_CALL OleEmbeddedObject::getPreferredVisualRepres
if ( m_bDisposed ) if ( m_bDisposed )
throw lang::DisposedException(); // TODO throw lang::DisposedException(); // TODO
OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!\n" ); SAL_WARN_IF( nAspect == embed::Aspects::MSOLE_ICON, "embeddedobj.ole", "For iconified objects no graphical replacement is required!" );
if ( nAspect == embed::Aspects::MSOLE_ICON ) if ( nAspect == embed::Aspects::MSOLE_ICON )
// no representation can be retrieved // no representation can be retrieved
throw embed::WrongStateException( OUString( "Illegal call!\n" ), throw embed::WrongStateException( OUString( "Illegal call!\n" ),
@ -418,7 +416,7 @@ sal_Int32 SAL_CALL OleEmbeddedObject::getMapUnit( sal_Int64 nAspect )
if ( m_bDisposed ) if ( m_bDisposed )
throw lang::DisposedException(); // TODO throw lang::DisposedException(); // TODO
OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!\n" ); SAL_WARN_IF( nAspect == embed::Aspects::MSOLE_ICON, "embeddedobj.ole", "For iconified objects no graphical replacement is required!" );
if ( nAspect == embed::Aspects::MSOLE_ICON ) if ( nAspect == embed::Aspects::MSOLE_ICON )
// no representation can be retrieved // no representation can be retrieved
throw embed::WrongStateException( OUString( "Illegal call!\n" ), throw embed::WrongStateException( OUString( "Illegal call!\n" ),

View File

@ -24,9 +24,6 @@
#include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/embed/Aspects.hpp> #include <com/sun/star/embed/Aspects.hpp>
#include <rtl/logfile.hxx>
#include "xolefactory.hxx" #include "xolefactory.hxx"
#include "oleembobj.hxx" #include "oleembobj.hxx"
@ -69,7 +66,7 @@ uno::Reference< uno::XInterface > SAL_CALL OleEmbeddedObjectFactory::createInsta
uno::Exception, uno::Exception,
uno::RuntimeException) uno::RuntimeException)
{ {
RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OleEmbeddedObjectFactory::createInstanceInitFromEntry" ); SAL_INFO( "embeddedobj.ole", "embeddedobj (mv76033) OleEmbeddedObjectFactory::createInstanceInitFromEntry" );
if ( !xStorage.is() ) if ( !xStorage.is() )
throw lang::IllegalArgumentException( OUString( "No parent storage is provided!\n" ), throw lang::IllegalArgumentException( OUString( "No parent storage is provided!\n" ),
@ -141,7 +138,7 @@ uno::Reference< uno::XInterface > SAL_CALL OleEmbeddedObjectFactory::createInsta
uno::Exception, uno::Exception,
uno::RuntimeException) uno::RuntimeException)
{ {
RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OleEmbeddedObjectFactory::createInstanceInitFromMediaDescriptor" ); SAL_INFO( "embeddedobj.ole", "embeddedobj (mv76033) OleEmbeddedObjectFactory::createInstanceInitFromMediaDescriptor" );
if ( !xStorage.is() ) if ( !xStorage.is() )
throw lang::IllegalArgumentException( OUString( "No parent storage is provided!\n" ), throw lang::IllegalArgumentException( OUString( "No parent storage is provided!\n" ),
@ -183,7 +180,7 @@ uno::Reference< uno::XInterface > SAL_CALL OleEmbeddedObjectFactory::createInsta
uno::Exception, uno::Exception,
uno::RuntimeException) uno::RuntimeException)
{ {
RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OleEmbeddedObjectFactory::createInstanceInitNew" ); SAL_INFO( "embeddedobj.ole", "embeddedobj (mv76033) OleEmbeddedObjectFactory::createInstanceInitNew" );
if ( !xStorage.is() ) if ( !xStorage.is() )
throw lang::IllegalArgumentException( OUString( "No parent storage is provided!\n" ), throw lang::IllegalArgumentException( OUString( "No parent storage is provided!\n" ),
@ -224,7 +221,7 @@ uno::Reference< uno::XInterface > SAL_CALL OleEmbeddedObjectFactory::createInsta
uno::Exception, uno::Exception,
uno::RuntimeException ) uno::RuntimeException )
{ {
RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OleEmbeddedObjectFactory::createInstanceLink" ); SAL_INFO( "embeddedobj.ole", "embeddedobj (mv76033) OleEmbeddedObjectFactory::createInstanceLink" );
if ( !xStorage.is() ) if ( !xStorage.is() )
throw lang::IllegalArgumentException( OUString( "No parent storage is provided!\n" ), throw lang::IllegalArgumentException( OUString( "No parent storage is provided!\n" ),
@ -270,7 +267,7 @@ uno::Reference< uno::XInterface > SAL_CALL OleEmbeddedObjectFactory::createInsta
uno::Exception, uno::Exception,
uno::RuntimeException ) uno::RuntimeException )
{ {
RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OleEmbeddedObjectFactory::createInstanceUserInit" ); SAL_INFO( "embeddedobj.ole", "embeddedobj (mv76033) OleEmbeddedObjectFactory::createInstanceUserInit" );
// the initialization is completelly controlled by user // the initialization is completelly controlled by user
if ( !xStorage.is() ) if ( !xStorage.is() )

View File

@ -44,7 +44,6 @@
#include <unotools/configpaths.hxx> #include <unotools/configpaths.hxx>
#include <rtl/ustrbuf.hxx> #include <rtl/ustrbuf.hxx>
#include <rtl/logfile.hxx>
#include <rtl/uri.hxx> #include <rtl/uri.hxx>
#include <tools/urlobj.hxx> #include <tools/urlobj.hxx>
#include <tools/wldcrd.hxx> #include <tools/wldcrd.hxx>
@ -60,14 +59,14 @@ FilterCache::FilterCache()
: BaseLock ( ) : BaseLock ( )
, m_eFillState(E_CONTAINS_NOTHING ) , m_eFillState(E_CONTAINS_NOTHING )
{ {
RTL_LOGFILE_TRACE("{ (as96863) FilterCache lifetime"); SAL_INFO( "filter.config", "{ (as96863) FilterCache lifetime");
} }
FilterCache::~FilterCache() FilterCache::~FilterCache()
{ {
RTL_LOGFILE_TRACE("} (as96863) FilterCache lifetime"); SAL_INFO( "filter.config", "} (as96863) FilterCache lifetime");
if (m_xTypesChglisteners.is()) if (m_xTypesChglisteners.is())
m_xTypesChglisteners->stopListening(); m_xTypesChglisteners->stopListening();
if (m_xFiltersChgListener.is()) if (m_xFiltersChgListener.is())
@ -188,7 +187,7 @@ void FilterCache::load(EFillState eRequired,
#if OSL_DEBUG_LEVEL > 1 #if OSL_DEBUG_LEVEL > 1
if (!bByThread && ((eRequired & E_CONTAINS_ALL) == E_CONTAINS_ALL)) if (!bByThread && ((eRequired & E_CONTAINS_ALL) == E_CONTAINS_ALL))
{ {
OSL_FAIL("Who disturb our \"fill cache on demand\" feature and force loading of ALL data during office startup? Please optimize your code, so a full filled filter cache is not realy needed here!"); SAL_WARN( "filter.config", "Who disturb our \"fill cache on demand\" feature and force loading of ALL data during office startup? Please optimize your code, so a full filled filter cache is not realy needed here!");
} }
#endif #endif
@ -858,7 +857,7 @@ css::uno::Reference< css::uno::XInterface > FilterCache::impl_openConfig(EConfig
} }
{ {
RTL_LOGFILE_CONTEXT(aLog, sRtlLog.getStr()); SAL_INFO( "filter.config", "" << sRtlLog.getStr());
*pConfig = impl_createConfigAccess(sPath , *pConfig = impl_createConfigAccess(sPath ,
sal_False, // bReadOnly sal_False, // bReadOnly
sal_True ); // bLocalesMode sal_True ); // bLocalesMode
@ -999,7 +998,7 @@ void FilterCache::impl_validateAndOptimize()
// SAFE -> // SAFE ->
::osl::ResettableMutexGuard aLock(m_aLock); ::osl::ResettableMutexGuard aLock(m_aLock);
RTL_LOGFILE_CONTEXT( aLog, "framework (as96863) ::FilterCache::impl_validateAndOptimize"); SAL_INFO( "filter.config", "framework (as96863) ::FilterCache::impl_validateAndOptimize");
// First check if any filter or type could be readed // First check if any filter or type could be readed
// from the underlying configuration! // from the underlying configuration!
@ -1378,7 +1377,7 @@ void FilterCache::impl_load(EFillState eRequiredState)
// to our calli ... // to our calli ...
css::uno::Reference< css::container::XNameAccess > xTypes(impl_openConfig(E_PROVIDER_TYPES), css::uno::UNO_QUERY_THROW); css::uno::Reference< css::container::XNameAccess > xTypes(impl_openConfig(E_PROVIDER_TYPES), css::uno::UNO_QUERY_THROW);
{ {
RTL_LOGFILE_CONTEXT( aLog, "framework (as96863) ::FilterCache::load std"); SAL_INFO( "filter.config", "framework (as96863) ::FilterCache::load std");
impl_loadSet(xTypes, E_TYPE, E_READ_STANDARD, &m_lTypes); impl_loadSet(xTypes, E_TYPE, E_READ_STANDARD, &m_lTypes);
} }
} }
@ -1395,7 +1394,7 @@ void FilterCache::impl_load(EFillState eRequiredState)
// to our calli ... // to our calli ...
css::uno::Reference< css::container::XNameAccess > xTypes(impl_openConfig(E_PROVIDER_TYPES), css::uno::UNO_QUERY_THROW); css::uno::Reference< css::container::XNameAccess > xTypes(impl_openConfig(E_PROVIDER_TYPES), css::uno::UNO_QUERY_THROW);
{ {
RTL_LOGFILE_CONTEXT( aLog, "framework (as96863) ::FilterCache::load all types"); SAL_INFO( "filter.config", "framework (as96863) ::FilterCache::load all types");
impl_loadSet(xTypes, E_TYPE, E_READ_UPDATE, &m_lTypes); impl_loadSet(xTypes, E_TYPE, E_READ_UPDATE, &m_lTypes);
} }
} }
@ -1412,7 +1411,7 @@ void FilterCache::impl_load(EFillState eRequiredState)
// to our calli ... // to our calli ...
css::uno::Reference< css::container::XNameAccess > xFilters(impl_openConfig(E_PROVIDER_FILTERS), css::uno::UNO_QUERY_THROW); css::uno::Reference< css::container::XNameAccess > xFilters(impl_openConfig(E_PROVIDER_FILTERS), css::uno::UNO_QUERY_THROW);
{ {
RTL_LOGFILE_CONTEXT( aLog, "framework (as96863) ::FilterCache::load all filters"); SAL_INFO( "filter.config", "framework (as96863) ::FilterCache::load all filters");
impl_loadSet(xFilters, E_FILTER, E_READ_ALL, &m_lFilters); impl_loadSet(xFilters, E_FILTER, E_READ_ALL, &m_lFilters);
} }
} }
@ -1429,7 +1428,7 @@ void FilterCache::impl_load(EFillState eRequiredState)
// to our calli ... // to our calli ...
css::uno::Reference< css::container::XNameAccess > xLoaders(impl_openConfig(E_PROVIDER_OTHERS), css::uno::UNO_QUERY_THROW); css::uno::Reference< css::container::XNameAccess > xLoaders(impl_openConfig(E_PROVIDER_OTHERS), css::uno::UNO_QUERY_THROW);
{ {
RTL_LOGFILE_CONTEXT( aLog, "framework (as96863) ::FilterCache::load all frame loader"); SAL_INFO( "filter.config", "framework (as96863) ::FilterCache::load all frame loader");
impl_loadSet(xLoaders, E_FRAMELOADER, E_READ_ALL, &m_lFrameLoaders); impl_loadSet(xLoaders, E_FRAMELOADER, E_READ_ALL, &m_lFrameLoaders);
} }
} }
@ -1446,7 +1445,7 @@ void FilterCache::impl_load(EFillState eRequiredState)
// to our calli ... // to our calli ...
css::uno::Reference< css::container::XNameAccess > xHandlers(impl_openConfig(E_PROVIDER_OTHERS), css::uno::UNO_QUERY_THROW); css::uno::Reference< css::container::XNameAccess > xHandlers(impl_openConfig(E_PROVIDER_OTHERS), css::uno::UNO_QUERY_THROW);
{ {
RTL_LOGFILE_CONTEXT( aLog, "framework (as96863) ::FilterCache::load all content handler"); SAL_INFO( "filter.config", "framework (as96863) ::FilterCache::load all content handler");
impl_loadSet(xHandlers, E_CONTENTHANDLER, E_READ_ALL, &m_lContentHandlers); impl_loadSet(xHandlers, E_CONTENTHANDLER, E_READ_ALL, &m_lContentHandlers);
} }
} }
@ -1848,7 +1847,7 @@ CacheItemList::iterator FilterCache::impl_loadItemOnDemand( EItemType
case E_DETECTSERVICE : case E_DETECTSERVICE :
{ {
OSL_FAIL("Cant load detect services on demand. Who use this unsupported feature?"); SAL_WARN( "filter.config", "Cant load detect services on demand. Who use this unsupported feature?");
} }
break; break;
} }
@ -2198,7 +2197,7 @@ void FilterCache::impl_interpretDataVal4Filter(const OUString& sValue,
sal_Int32 nOrder = sValue.toInt32(); sal_Int32 nOrder = sValue.toInt32();
if (nOrder > 0) if (nOrder > 0)
{ {
OSL_FAIL("FilterCache::impl_interpretDataVal4Filter()\nCant move Order value from filter to type on demand!\n"); SAL_WARN( "filter.config", "FilterCache::impl_interpretDataVal4Filter()\nCant move Order value from filter to type on demand!");
_FILTER_CONFIG_LOG_2_("impl_interpretDataVal4Filter(%d, \"%s\") ... OK", (int)eType, _FILTER_CONFIG_TO_ASCII_(rItem).getStr()) _FILTER_CONFIG_LOG_2_("impl_interpretDataVal4Filter(%d, \"%s\") ... OK", (int)eType, _FILTER_CONFIG_TO_ASCII_(rItem).getStr())
} }
} }

View File

@ -23,7 +23,6 @@
#include <comphelper/sequence.hxx> #include <comphelper/sequence.hxx>
#include <tools/debug.hxx> #include <tools/debug.hxx>
#include <com/sun/star/form/XForm.hpp> #include <com/sun/star/form/XForm.hpp>
#include <rtl/logfile.hxx>
//......................................................................... //.........................................................................
namespace frm namespace frm
@ -149,7 +148,7 @@ Reference< XCloneable > SAL_CALL OFormsCollection::createClone( ) throw (Runtim
void OFormsCollection::disposing() void OFormsCollection::disposing()
{ {
{ {
RTL_LOGFILE_CONTEXT( aLogger, "forms::OFormsCollection::disposing" ); SAL_INFO( "forms.component", "forms::OFormsCollection::disposing" );
OInterfaceContainer::disposing(); OInterfaceContainer::disposing();
} }
FormsCollectionComponentBase::disposing(); FormsCollectionComponentBase::disposing();

View File

@ -46,7 +46,6 @@
#include <connectivity/formattedcolumnvalue.hxx> #include <connectivity/formattedcolumnvalue.hxx>
#include <connectivity/dbconversion.hxx> #include <connectivity/dbconversion.hxx>
#include <cppuhelper/queryinterface.hxx> #include <cppuhelper/queryinterface.hxx>
#include <rtl/logfile.hxx>
#include <tools/debug.hxx> #include <tools/debug.hxx>
#include <tools/diagnose_ex.h> #include <tools/diagnose_ex.h>
#include <unotools/sharedunocomponent.hxx> #include <unotools/sharedunocomponent.hxx>
@ -342,7 +341,7 @@ namespace frm
break; break;
case PROPERTY_ID_VALUE_SEQ : case PROPERTY_ID_VALUE_SEQ :
OSL_FAIL( "ValueItemList is read-only!" ); SAL_WARN( "forms.component", "ValueItemList is read-only!" );
throw PropertyVetoException(); throw PropertyVetoException();
case PROPERTY_ID_SELECT_VALUE_SEQ : case PROPERTY_ID_SELECT_VALUE_SEQ :
@ -411,7 +410,7 @@ namespace frm
break; break;
case PROPERTY_ID_VALUE_SEQ : case PROPERTY_ID_VALUE_SEQ :
OSL_FAIL( "ValueItemList is read-only!" ); SAL_WARN( "forms.component", "ValueItemList is read-only!" );
throw PropertyVetoException(); throw PropertyVetoException();
case PROPERTY_ID_SELECT_VALUE_SEQ : case PROPERTY_ID_SELECT_VALUE_SEQ :
@ -575,7 +574,7 @@ namespace frm
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_FAIL( "OComboBoxModel::read: caught an exception while examining the aggregate's string item list!" ); SAL_WARN( "forms.component", "OComboBoxModel::read: caught an exception while examining the aggregate's string item list!" );
} }
// Version // Version
@ -584,7 +583,7 @@ namespace frm
if (nVersion > 0x0004) if (nVersion > 0x0004)
{ {
OSL_FAIL("OListBoxModel::read : invalid (means unknown) version !"); SAL_WARN( "forms.component", "OListBoxModel::read : invalid (means unknown) version !");
ValueList().swap(m_aListSourceValues); ValueList().swap(m_aListSourceValues);
m_aBoundColumn <<= (sal_Int16)0; m_aBoundColumn <<= (sal_Int16)0;
clearBoundValues(); clearBoundValues();
@ -675,7 +674,7 @@ namespace frm
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void OListBoxModel::loadData( bool _bForce ) void OListBoxModel::loadData( bool _bForce )
{ {
RTL_LOGFILE_CONTEXT( aLogContext, "OListBoxModel::loadData" ); SAL_INFO( "forms.component", "OListBoxModel::loadData" );
DBG_ASSERT( m_eListSourceType != ListSourceType_VALUELIST, "OListBoxModel::loadData: cannot load value list from DB!" ); DBG_ASSERT( m_eListSourceType != ListSourceType_VALUELIST, "OListBoxModel::loadData: cannot load value list from DB!" );
DBG_ASSERT( !hasExternalListSource(), "OListBoxModel::loadData: cannot load from DB when I have an external list source!" ); DBG_ASSERT( !hasExternalListSource(), "OListBoxModel::loadData: cannot load from DB when I have an external list source!" );
@ -899,7 +898,7 @@ namespace frm
// If the LB is bound to a field and empty entries are valid, we remember the position // If the LB is bound to a field and empty entries are valid, we remember the position
// for an empty entry // for an empty entry
RTL_LOGFILE_CONTEXT( aLogContext, "OListBoxModel::loadData: string collection" ); SAL_INFO( "forms.component", "OListBoxModel::loadData: string collection" );
OUString aStr; OUString aStr;
sal_Int16 entryPos = 0; sal_Int16 entryPos = 0;
ORowSetValue aBoundValue; ORowSetValue aBoundValue;
@ -937,7 +936,7 @@ namespace frm
} }
break; break;
default: default:
OSL_FAIL( "OListBoxModel::loadData: unreachable!" ); SAL_WARN( "forms.component", "OListBoxModel::loadData: unreachable!" );
break; break;
} }
} }
@ -1086,7 +1085,7 @@ namespace frm
size_t selectedValue = aSelectedIndices[0]; size_t selectedValue = aSelectedIndices[0];
if ( selectedValue >= aValues.size() ) if ( selectedValue >= aValues.size() )
{ {
OSL_FAIL( "OListBoxModel::getFirstSelectedValue: inconsistent selection/valuelist!" ); SAL_WARN( "forms.component", "OListBoxModel::getFirstSelectedValue: inconsistent selection/valuelist!" );
return s_aEmptyVaue; return s_aEmptyVaue;
} }
@ -1194,7 +1193,7 @@ namespace frm
Reference< XPropertySet > xBoundField( getField() ); Reference< XPropertySet > xBoundField( getField() );
if ( !xBoundField.is() ) if ( !xBoundField.is() )
{ {
OSL_FAIL( "OListBoxModel::translateDbColumnToControlValue: no field? How could that happen?!" ); SAL_WARN( "forms.component", "OListBoxModel::translateDbColumnToControlValue: no field? How could that happen?!" );
return Any(); return Any();
} }
@ -1285,7 +1284,7 @@ namespace frm
default: default:
break; break;
} }
OSL_FAIL( "lcl_getCurrentExchangeType: unsupported (unexpected) exchange type!" ); SAL_WARN( "forms.component", "lcl_getCurrentExchangeType: unsupported (unexpected) exchange type!" );
return eEntry; return eEntry;
} }
} }

View File

@ -36,7 +36,6 @@
#include <vcl/svapp.hxx> #include <vcl/svapp.hxx>
#include <unotools/dynamicmenuoptions.hxx> #include <unotools/dynamicmenuoptions.hxx>
#include <svtools/menuoptions.hxx> #include <svtools/menuoptions.hxx>
#include <rtl/logfile.hxx>
using namespace ::comphelper; using namespace ::comphelper;
using namespace ::com::sun::star::uno; using namespace ::com::sun::star::uno;
@ -106,7 +105,7 @@ BmkMenu::~BmkMenu()
void BmkMenu::Initialize() void BmkMenu::Initialize()
{ {
RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::BmkMenu::Initialize" ); SAL_INFO( "fwk", "framework (cd100003) ::BmkMenu::Initialize" );
if( _pImp->m_bInitialized ) if( _pImp->m_bInitialized )
return; return;

View File

@ -39,7 +39,6 @@
#include <rtl/ustrbuf.hxx> #include <rtl/ustrbuf.hxx>
#include <vcl/svapp.hxx> #include <vcl/svapp.hxx>
#include <rtl/logfile.hxx>
namespace framework{ namespace framework{
@ -143,7 +142,7 @@ JobExecutor::~JobExecutor()
*/ */
void SAL_CALL JobExecutor::trigger( const OUString& sEvent ) throw(css::uno::RuntimeException) void SAL_CALL JobExecutor::trigger( const OUString& sEvent ) throw(css::uno::RuntimeException)
{ {
RTL_LOGFILE_CONTEXT(aLog, "fwk (as96863) JobExecutor::trigger()"); SAL_INFO( "fwk", "fwk (as96863) JobExecutor::trigger()");
/* SAFE { */ /* SAFE { */
ReadGuard aReadLock(m_aLock); ReadGuard aReadLock(m_aLock);

View File

@ -73,7 +73,6 @@
#include <toolkit/awt/vclxmenu.hxx> #include <toolkit/awt/vclxmenu.hxx>
#include <comphelper/mediadescriptor.hxx> #include <comphelper/mediadescriptor.hxx>
#include <comphelper/uno3.hxx> #include <comphelper/uno3.hxx>
#include <rtl/logfile.hxx>
#include <rtl/instance.hxx> #include <rtl/instance.hxx>
#include <unotools/cmdoptions.hxx> #include <unotools/cmdoptions.hxx>
@ -1435,7 +1434,7 @@ IMPL_LINK( LayoutManager, WindowEventListener, VclSimpleEvent*, pEvent )
void SAL_CALL LayoutManager::createElement( const OUString& aName ) void SAL_CALL LayoutManager::createElement( const OUString& aName )
throw (RuntimeException) throw (RuntimeException)
{ {
RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::LayoutManager::createElement" ); SAL_INFO( "fwk", "framework (cd100003) ::LayoutManager::createElement" );
ReadGuard aReadLock( m_aLock ); ReadGuard aReadLock( m_aLock );
Reference< XFrame > xFrame = m_xFrame; Reference< XFrame > xFrame = m_xFrame;
@ -1569,7 +1568,7 @@ throw (RuntimeException)
void SAL_CALL LayoutManager::destroyElement( const OUString& aName ) void SAL_CALL LayoutManager::destroyElement( const OUString& aName )
throw (RuntimeException) throw (RuntimeException)
{ {
RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::LayoutManager::destroyElement" ); SAL_INFO( "fwk", "framework (cd100003) ::LayoutManager::destroyElement" );
/* SAFE AREA ----------------------------------------------------------------------------------------------- */ /* SAFE AREA ----------------------------------------------------------------------------------------------- */
WriteGuard aWriteLock( m_aLock ); WriteGuard aWriteLock( m_aLock );
@ -1656,7 +1655,7 @@ throw (uno::RuntimeException)
WriteGuard aWriteLock( m_aLock ); WriteGuard aWriteLock( m_aLock );
OString aResName = OUStringToOString( aElementName, RTL_TEXTENCODING_ASCII_US ); OString aResName = OUStringToOString( aElementName, RTL_TEXTENCODING_ASCII_US );
RTL_LOGFILE_CONTEXT_TRACE1( aLog, "framework (cd100003) Element %s requested.", aResName.getStr() ); SAL_INFO( "fwk", "framework (cd100003) Element " << aResName.getStr() << " requested." );
if (( aElementType.equalsIgnoreAsciiCase("statusbar") && if (( aElementType.equalsIgnoreAsciiCase("statusbar") &&
aElementName.equalsIgnoreAsciiCase("statusbar") ) || aElementName.equalsIgnoreAsciiCase("statusbar") ) ||
@ -1776,7 +1775,7 @@ throw (uno::RuntimeException)
sal_Bool SAL_CALL LayoutManager::showElement( const OUString& aName ) sal_Bool SAL_CALL LayoutManager::showElement( const OUString& aName )
throw (RuntimeException) throw (RuntimeException)
{ {
RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::LayoutManager::showElement" ); SAL_INFO( "fwk", "framework (cd100003) ::LayoutManager::showElement" );
bool bResult( false ); bool bResult( false );
bool bNotify( false ); bool bNotify( false );
@ -1787,7 +1786,7 @@ throw (RuntimeException)
parseResourceURL( aName, aElementType, aElementName ); parseResourceURL( aName, aElementType, aElementName );
OString aResName = OUStringToOString( aElementName, RTL_TEXTENCODING_ASCII_US ); OString aResName = OUStringToOString( aElementName, RTL_TEXTENCODING_ASCII_US );
RTL_LOGFILE_CONTEXT_TRACE1( aLog, "framework (cd100003) Element %s", aResName.getStr() ); SAL_INFO( "fwk", "framework (cd100003) Element " << aResName.getStr() );
if ( aElementType.equalsIgnoreAsciiCase("menubar") && if ( aElementType.equalsIgnoreAsciiCase("menubar") &&
aElementName.equalsIgnoreAsciiCase("menubar") ) aElementName.equalsIgnoreAsciiCase("menubar") )
@ -1861,7 +1860,7 @@ throw (RuntimeException)
sal_Bool SAL_CALL LayoutManager::hideElement( const OUString& aName ) sal_Bool SAL_CALL LayoutManager::hideElement( const OUString& aName )
throw (RuntimeException) throw (RuntimeException)
{ {
RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::LayoutManager::hideElement" ); SAL_INFO( "fwk", "framework (cd100003) ::LayoutManager::hideElement" );
bool bNotify( false ); bool bNotify( false );
bool bMustLayout( false ); bool bMustLayout( false );
@ -1870,7 +1869,7 @@ throw (RuntimeException)
parseResourceURL( aName, aElementType, aElementName ); parseResourceURL( aName, aElementType, aElementName );
OString aResName = OUStringToOString( aElementName, RTL_TEXTENCODING_ASCII_US ); OString aResName = OUStringToOString( aElementName, RTL_TEXTENCODING_ASCII_US );
RTL_LOGFILE_CONTEXT_TRACE1( aLog, "framework (cd100003) Element %s", aResName.getStr() ); SAL_INFO( "fwk", "framework (cd100003) Element " << aResName.getStr() );
if ( aElementType.equalsIgnoreAsciiCase("menubar") && if ( aElementType.equalsIgnoreAsciiCase("menubar") &&
aElementName.equalsIgnoreAsciiCase("menubar") ) aElementName.equalsIgnoreAsciiCase("menubar") )
@ -2259,13 +2258,13 @@ throw (RuntimeException)
sal_Int32 nLockCount( m_nLockCount ); sal_Int32 nLockCount( m_nLockCount );
aReadLock.unlock(); aReadLock.unlock();
RTL_LOGFILE_TRACE1( "framework (cd100003) ::LayoutManager::lock lockCount=%d", nLockCount ); SAL_INFO( "fwk", "framework (cd100003) ::LayoutManager::lock lockCount=" << nLockCount );
#ifdef DBG_UTIL #ifdef DBG_UTIL
OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM("LayoutManager::lock ")); OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM("LayoutManager::lock "));
aStr.append(reinterpret_cast<sal_Int64>(this)); aStr.append(reinterpret_cast<sal_Int64>(this));
aStr.append(RTL_CONSTASCII_STRINGPARAM(" - ")); aStr.append(RTL_CONSTASCII_STRINGPARAM(" - "));
aStr.append(nLockCount); aStr.append(nLockCount);
OSL_TRACE(aStr.getStr()); SAL_INFO( "fwk", "" << aStr.getStr());
#endif #endif
Any a( nLockCount ); Any a( nLockCount );
@ -2281,13 +2280,13 @@ throw (RuntimeException)
sal_Int32 nLockCount( m_nLockCount ); sal_Int32 nLockCount( m_nLockCount );
aReadLock.unlock(); aReadLock.unlock();
RTL_LOGFILE_TRACE1( "framework (cd100003) ::LayoutManager::unlock lockCount=%d", nLockCount ); SAL_INFO( "fwk", "framework (cd100003) ::LayoutManager::unlock lockCount=" << nLockCount );
#ifdef DBG_UTIL #ifdef DBG_UTIL
OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM("LayoutManager::unlock ")); OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM("LayoutManager::unlock "));
aStr.append(reinterpret_cast<sal_Int64>(this)); aStr.append(reinterpret_cast<sal_Int64>(this));
aStr.append(RTL_CONSTASCII_STRINGPARAM(" - ")); aStr.append(RTL_CONSTASCII_STRINGPARAM(" - "));
aStr.append(nLockCount); aStr.append(nLockCount);
OSL_TRACE(aStr.getStr()); SAL_INFO( "fwk", "" << aStr.getStr());
#endif #endif
// conform to documentation: unlock with lock count == 0 means force a layout // conform to documentation: unlock with lock count == 0 means force a layout
@ -2327,7 +2326,7 @@ void LayoutManager::implts_doLayout_notify( sal_Bool bOuterResize )
sal_Bool LayoutManager::implts_doLayout( sal_Bool bForceRequestBorderSpace, sal_Bool bOuterResize ) sal_Bool LayoutManager::implts_doLayout( sal_Bool bForceRequestBorderSpace, sal_Bool bOuterResize )
{ {
RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::LayoutManager::implts_doLayout" ); SAL_INFO( "fwk", "framework (cd100003) ::LayoutManager::implts_doLayout" );
/* SAFE AREA ----------------------------------------------------------------------------------------------- */ /* SAFE AREA ----------------------------------------------------------------------------------------------- */
ReadGuard aReadLock( m_aLock ); ReadGuard aReadLock( m_aLock );
@ -2812,7 +2811,7 @@ throw ( RuntimeException )
{ {
if (( aEvent.Action == FrameAction_COMPONENT_ATTACHED ) || ( aEvent.Action == FrameAction_COMPONENT_REATTACHED )) if (( aEvent.Action == FrameAction_COMPONENT_ATTACHED ) || ( aEvent.Action == FrameAction_COMPONENT_REATTACHED ))
{ {
RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::LayoutManager::frameAction (COMPONENT_ATTACHED|REATTACHED)" ); SAL_INFO( "fwk", "framework (cd100003) ::LayoutManager::frameAction (COMPONENT_ATTACHED|REATTACHED)" );
WriteGuard aWriteLock( m_aLock ); WriteGuard aWriteLock( m_aLock );
m_bComponentAttached = sal_True; m_bComponentAttached = sal_True;
@ -2825,7 +2824,7 @@ throw ( RuntimeException )
} }
else if (( aEvent.Action == FrameAction_FRAME_UI_ACTIVATED ) || ( aEvent.Action == FrameAction_FRAME_UI_DEACTIVATING )) else if (( aEvent.Action == FrameAction_FRAME_UI_ACTIVATED ) || ( aEvent.Action == FrameAction_FRAME_UI_DEACTIVATING ))
{ {
RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::LayoutManager::frameAction (FRAME_UI_ACTIVATED|DEACTIVATING)" ); SAL_INFO( "fwk", "framework (cd100003) ::LayoutManager::frameAction (FRAME_UI_ACTIVATED|DEACTIVATING)" );
WriteGuard aWriteLock( m_aLock ); WriteGuard aWriteLock( m_aLock );
m_bActive = ( aEvent.Action == FrameAction_FRAME_UI_ACTIVATED ); m_bActive = ( aEvent.Action == FrameAction_FRAME_UI_ACTIVATED );
@ -2835,7 +2834,7 @@ throw ( RuntimeException )
} }
else if ( aEvent.Action == FrameAction_COMPONENT_DETACHING ) else if ( aEvent.Action == FrameAction_COMPONENT_DETACHING )
{ {
RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::LayoutManager::frameAction (COMPONENT_DETACHING)" ); SAL_INFO( "fwk", "framework (cd100003) ::LayoutManager::frameAction (COMPONENT_DETACHING)" );
WriteGuard aWriteLock( m_aLock ); WriteGuard aWriteLock( m_aLock );
m_bComponentAttached = sal_False; m_bComponentAttached = sal_False;

View File

@ -66,7 +66,6 @@
#include <cppuhelper/factory.hxx> #include <cppuhelper/factory.hxx>
#include <cppuhelper/proptypehlp.hxx> #include <cppuhelper/proptypehlp.hxx>
#include <rtl/ustrbuf.hxx> #include <rtl/ustrbuf.hxx>
#include <rtl/logfile.hxx>
#include <vcl/svapp.hxx> #include <vcl/svapp.hxx>
#include <tools/errinf.hxx> #include <tools/errinf.hxx>
@ -640,14 +639,14 @@ css::uno::Reference< css::lang::XComponent > SAL_CALL Desktop::loadComponentFrom
/* UNSAFE AREA --------------------------------------------------------------------------------------------- */ /* UNSAFE AREA --------------------------------------------------------------------------------------------- */
// Register transaction and reject wrong calls. // Register transaction and reject wrong calls.
TransactionGuard aTransaction( m_aTransactionManager, E_HARDEXCEPTIONS ); TransactionGuard aTransaction( m_aTransactionManager, E_HARDEXCEPTIONS );
RTL_LOGFILE_CONTEXT( aLog, "framework (as96863) ::Desktop::loadComponentFromURL" ); SAL_INFO( "fwk.desktop", "framework (as96863) ::Desktop::loadComponentFromURL" );
ReadGuard aReadLock(m_aLock); ReadGuard aReadLock(m_aLock);
css::uno::Reference< css::frame::XComponentLoader > xThis(static_cast< css::frame::XComponentLoader* >(this), css::uno::UNO_QUERY); css::uno::Reference< css::frame::XComponentLoader > xThis(static_cast< css::frame::XComponentLoader* >(this), css::uno::UNO_QUERY);
css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = m_xFactory; css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = m_xFactory;
aReadLock.unlock(); aReadLock.unlock();
RTL_LOGFILE_PRODUCT_CONTEXT( aLog2, "PERFORMANCE - Desktop::loadComponentFromURL()" ); SAL_INFO( "fwk.desktop", "PERFORMANCE - Desktop::loadComponentFromURL()" );
return LoadEnv::loadComponentFromURL(xThis, comphelper::getComponentContext(xSMGR), sURL, sTargetFrameName, nSearchFlags, lArguments); return LoadEnv::loadComponentFromURL(xThis, comphelper::getComponentContext(xSMGR), sURL, sTargetFrameName, nSearchFlags, lArguments);
} }

View File

@ -38,7 +38,6 @@
#include <tools/urlobj.hxx> #include <tools/urlobj.hxx>
#include <rtl/ustrbuf.hxx> #include <rtl/ustrbuf.hxx>
#include <rtl/logfile.hxx>
#include <comphelper/configurationhelper.hxx> #include <comphelper/configurationhelper.hxx>
#include <comphelper/processfactory.hxx> #include <comphelper/processfactory.hxx>
@ -140,7 +139,7 @@ PathSettings::PathSettings( const css::uno::Reference< css::lang::XMultiServiceF
, m_pPropHelp(0 ) , m_pPropHelp(0 )
, m_bIgnoreEvents(sal_False) , m_bIgnoreEvents(sal_False)
{ {
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "PathSettings::PathSettings" ); SAL_INFO( "fwk", "framework Ocke.Janssen@sun.com PathSettings::PathSettings" );
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@ -157,7 +156,7 @@ PathSettings::~PathSettings()
void SAL_CALL PathSettings::changesOccurred(const css::util::ChangesEvent& aEvent) void SAL_CALL PathSettings::changesOccurred(const css::util::ChangesEvent& aEvent)
throw (css::uno::RuntimeException) throw (css::uno::RuntimeException)
{ {
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "PathSettings::changesOccurred" ); SAL_INFO( "fwk", "framework Ocke.Janssen@sun.com PathSettings::changesOccurred" );
sal_Int32 c = aEvent.Changes.getLength(); sal_Int32 c = aEvent.Changes.getLength();
sal_Int32 i = 0; sal_Int32 i = 0;
@ -190,7 +189,7 @@ void SAL_CALL PathSettings::changesOccurred(const css::util::ChangesEvent& aEven
void SAL_CALL PathSettings::disposing(const css::lang::EventObject& aSource) void SAL_CALL PathSettings::disposing(const css::lang::EventObject& aSource)
throw(css::uno::RuntimeException) throw(css::uno::RuntimeException)
{ {
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "PathSettings::disposing" ); SAL_INFO( "fwk", "framework Ocke.Janssen@sun.com PathSettings::disposing" );
WriteGuard aWriteLock(m_aLock); WriteGuard aWriteLock(m_aLock);
if (aSource.Source == m_xCfgNew) if (aSource.Source == m_xCfgNew)
@ -219,8 +218,8 @@ void PathSettings::setStringProperty(const OUString& p1, const OUString& p2)
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void PathSettings::impl_readAll() void PathSettings::impl_readAll()
{ {
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "PathSettings::impl_readAll" ); SAL_INFO( "fwk", "framework Ocke.Janssen@sun.com PathSettings::impl_readAll" );
RTL_LOGFILE_CONTEXT(aLog, "framework (as96863) ::PathSettings::load config (all)"); SAL_INFO( "fwk", "framework (as96863) ::PathSettings::load config (all)");
try try
{ {
@ -246,7 +245,7 @@ void PathSettings::impl_readAll()
// NO substitution here ! It's done outside ... // NO substitution here ! It's done outside ...
OUStringList PathSettings::impl_readOldFormat(const OUString& sPath) OUStringList PathSettings::impl_readOldFormat(const OUString& sPath)
{ {
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "PathSettings::impl_readOldFormat" ); SAL_INFO( "fwk", "framework Ocke.Janssen@sun.com PathSettings::impl_readOldFormat" );
css::uno::Reference< css::container::XNameAccess > xCfg( fa_getCfgOld() ); css::uno::Reference< css::container::XNameAccess > xCfg( fa_getCfgOld() );
OUStringList aPathVal; OUStringList aPathVal;
@ -319,7 +318,7 @@ PathSettings::PathInfo PathSettings::impl_readNewFormat(const OUString& sPath)
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void PathSettings::impl_storePath(const PathSettings::PathInfo& aPath) void PathSettings::impl_storePath(const PathSettings::PathInfo& aPath)
{ {
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "PathSettings::impl_storePath" ); SAL_INFO( "fwk", "framework Ocke.Janssen@sun.com PathSettings::impl_storePath" );
m_bIgnoreEvents = sal_True; m_bIgnoreEvents = sal_True;
css::uno::Reference< css::container::XNameAccess > xCfgNew = fa_getCfgNew(); css::uno::Reference< css::container::XNameAccess > xCfgNew = fa_getCfgNew();
@ -367,7 +366,7 @@ void PathSettings::impl_storePath(const PathSettings::PathInfo& aPath)
void PathSettings::impl_mergeOldUserPaths( PathSettings::PathInfo& rPath, void PathSettings::impl_mergeOldUserPaths( PathSettings::PathInfo& rPath,
const OUStringList& lOld ) const OUStringList& lOld )
{ {
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "PathSettings::impl_mergeOldUserPaths" ); SAL_INFO( "fwk", "framework Ocke.Janssen@sun.com PathSettings::impl_mergeOldUserPaths" );
OUStringList::const_iterator pIt; OUStringList::const_iterator pIt;
for ( pIt = lOld.begin(); for ( pIt = lOld.begin();
pIt != lOld.end() ; pIt != lOld.end() ;

View File

@ -45,7 +45,6 @@
#include <unotools/ucbstreamhelper.hxx> #include <unotools/ucbstreamhelper.hxx>
#include <vcl/pngread.hxx> #include <vcl/pngread.hxx>
#include <vcl/pngwrite.hxx> #include <vcl/pngwrite.hxx>
#include <rtl/logfile.hxx>
#include <rtl/instance.hxx> #include <rtl/instance.hxx>
#include <svtools/miscopt.hxx> #include <svtools/miscopt.hxx>
@ -169,7 +168,7 @@ CmdImageList::~CmdImageList()
void CmdImageList::impl_fillCommandToImageNameMap() void CmdImageList::impl_fillCommandToImageNameMap()
{ {
RTL_LOGFILE_CONTEXT( aLog, "framework: CmdImageList::impl_fillCommandToImageNameMap" ); SAL_INFO( "fwk", "framework: CmdImageList::impl_fillCommandToImageNameMap" );
if ( !m_bVectorInit ) if ( !m_bVectorInit )
{ {

View File

@ -18,7 +18,6 @@
*/ */
#include <rtl/logfile.hxx>
#include <uiconfiguration/moduleimagemanager.hxx> #include <uiconfiguration/moduleimagemanager.hxx>
#include <threadhelp/resetableguard.hxx> #include <threadhelp/resetableguard.hxx>
#include <xml/imagesconfiguration.hxx> #include <xml/imagesconfiguration.hxx>
@ -128,7 +127,7 @@ Sequence< uno::Reference< XGraphic > > SAL_CALL ModuleImageManager::getImages(
const Sequence< OUString >& aCommandURLSequence ) const Sequence< OUString >& aCommandURLSequence )
throw ( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ) throw ( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException )
{ {
RTL_LOGFILE_CONTEXT( aLog, "framework: ModuleImageManager::getImages" ); SAL_INFO( "fwk", "framework: ModuleImageManager::getImages" );
return m_pImpl->getImages(nImageType,aCommandURLSequence); return m_pImpl->getImages(nImageType,aCommandURLSequence);
} }

View File

@ -38,7 +38,6 @@
#include <vcl/mnemonic.hxx> #include <vcl/mnemonic.hxx>
#include <comphelper/sequence.hxx> #include <comphelper/sequence.hxx>
#include <rtl/logfile.hxx>
//_________________________________________________________________________________________________________________ //_________________________________________________________________________________________________________________
// Defines // Defines
@ -143,7 +142,7 @@ ConfigurationAccess_UICategory::ConfigurationAccess_UICategory( const OUString&
m_bConfigAccessInitialized( sal_False ), m_bConfigAccessInitialized( sal_False ),
m_bCacheFilled( sal_False ) m_bCacheFilled( sal_False )
{ {
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ConfigurationAccess_UICategory::ConfigurationAccess_UICategory" ); SAL_INFO( "fwk", "framework Ocke.Janssen@sun.com ConfigurationAccess_UICategory::ConfigurationAccess_UICategory" );
// Create configuration hierachical access name // Create configuration hierachical access name
m_aConfigCategoryAccess += aModuleName; m_aConfigCategoryAccess += aModuleName;
m_aConfigCategoryAccess += OUString( CONFIGURATION_CATEGORY_ELEMENT_ACCESS ); m_aConfigCategoryAccess += OUString( CONFIGURATION_CATEGORY_ELEMENT_ACCESS );
@ -164,7 +163,7 @@ ConfigurationAccess_UICategory::~ConfigurationAccess_UICategory()
Any SAL_CALL ConfigurationAccess_UICategory::getByName( const OUString& rId ) Any SAL_CALL ConfigurationAccess_UICategory::getByName( const OUString& rId )
throw ( NoSuchElementException, WrappedTargetException, RuntimeException) throw ( NoSuchElementException, WrappedTargetException, RuntimeException)
{ {
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ConfigurationAccess_UICategory::getByName" ); SAL_INFO( "fwk", "framework Ocke.Janssen@sun.com ConfigurationAccess_UICategory::getByName" );
ResetableGuard aLock( m_aLock ); ResetableGuard aLock( m_aLock );
if ( !m_bConfigAccessInitialized ) if ( !m_bConfigAccessInitialized )
{ {
@ -185,14 +184,14 @@ throw ( NoSuchElementException, WrappedTargetException, RuntimeException)
Sequence< OUString > SAL_CALL ConfigurationAccess_UICategory::getElementNames() Sequence< OUString > SAL_CALL ConfigurationAccess_UICategory::getElementNames()
throw ( RuntimeException ) throw ( RuntimeException )
{ {
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ConfigurationAccess_UICategory::getElementNames" ); SAL_INFO( "fwk", "framework Ocke.Janssen@sun.com ConfigurationAccess_UICategory::getElementNames" );
return getAllIds(); return getAllIds();
} }
sal_Bool SAL_CALL ConfigurationAccess_UICategory::hasByName( const OUString& rId ) sal_Bool SAL_CALL ConfigurationAccess_UICategory::hasByName( const OUString& rId )
throw (::com::sun::star::uno::RuntimeException) throw (::com::sun::star::uno::RuntimeException)
{ {
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ConfigurationAccess_UICategory::hasByName" ); SAL_INFO( "fwk", "framework Ocke.Janssen@sun.com ConfigurationAccess_UICategory::hasByName" );
return getByName( rId ).hasValue(); return getByName( rId ).hasValue();
} }
@ -200,22 +199,22 @@ throw (::com::sun::star::uno::RuntimeException)
Type SAL_CALL ConfigurationAccess_UICategory::getElementType() Type SAL_CALL ConfigurationAccess_UICategory::getElementType()
throw ( RuntimeException ) throw ( RuntimeException )
{ {
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ConfigurationAccess_UICategory::getElementType" ); SAL_INFO( "fwk", "framework Ocke.Janssen@sun.com ConfigurationAccess_UICategory::getElementType" );
return( ::getCppuType( (const OUString*)NULL ) ); return( ::getCppuType( (const OUString*)NULL ) );
} }
sal_Bool SAL_CALL ConfigurationAccess_UICategory::hasElements() sal_Bool SAL_CALL ConfigurationAccess_UICategory::hasElements()
throw ( RuntimeException ) throw ( RuntimeException )
{ {
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ConfigurationAccess_UICategory::hasElements" ); SAL_INFO( "fwk", "framework Ocke.Janssen@sun.com ConfigurationAccess_UICategory::hasElements" );
// There must be global categories! // There must be global categories!
return sal_True; return sal_True;
} }
sal_Bool ConfigurationAccess_UICategory::fillCache() sal_Bool ConfigurationAccess_UICategory::fillCache()
{ {
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ConfigurationAccess_UICategory::fillCache" ); SAL_INFO( "fwk", "framework Ocke.Janssen@sun.com ConfigurationAccess_UICategory::fillCache" );
RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::ConfigurationAccess_UICategory::fillCache" ); SAL_INFO( "fwk", "framework (cd100003) ::ConfigurationAccess_UICategory::fillCache" );
if ( m_bCacheFilled ) if ( m_bCacheFilled )
return sal_True; return sal_True;
@ -251,7 +250,7 @@ sal_Bool ConfigurationAccess_UICategory::fillCache()
Any ConfigurationAccess_UICategory::getUINameFromID( const OUString& rId ) Any ConfigurationAccess_UICategory::getUINameFromID( const OUString& rId )
{ {
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ConfigurationAccess_UICategory::getUINameFromID" ); SAL_INFO( "fwk", "framework Ocke.Janssen@sun.com ConfigurationAccess_UICategory::getUINameFromID" );
Any a; Any a;
try try
@ -287,7 +286,7 @@ Any ConfigurationAccess_UICategory::getUINameFromID( const OUString& rId )
Any ConfigurationAccess_UICategory::getUINameFromCache( const OUString& rId ) Any ConfigurationAccess_UICategory::getUINameFromCache( const OUString& rId )
{ {
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ConfigurationAccess_UICategory::getUINameFromCache" ); SAL_INFO( "fwk", "framework Ocke.Janssen@sun.com ConfigurationAccess_UICategory::getUINameFromCache" );
Any a; Any a;
IdToInfoCache::const_iterator pIter = m_aIdCache.find( rId ); IdToInfoCache::const_iterator pIter = m_aIdCache.find( rId );
@ -299,7 +298,7 @@ Any ConfigurationAccess_UICategory::getUINameFromCache( const OUString& rId )
Sequence< OUString > ConfigurationAccess_UICategory::getAllIds() Sequence< OUString > ConfigurationAccess_UICategory::getAllIds()
{ {
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ConfigurationAccess_UICategory::getAllIds" ); SAL_INFO( "fwk", "framework Ocke.Janssen@sun.com ConfigurationAccess_UICategory::getAllIds" );
// SAFE // SAFE
ResetableGuard aLock( m_aLock ); ResetableGuard aLock( m_aLock );
@ -348,7 +347,7 @@ Sequence< OUString > ConfigurationAccess_UICategory::getAllIds()
sal_Bool ConfigurationAccess_UICategory::initializeConfigAccess() sal_Bool ConfigurationAccess_UICategory::initializeConfigAccess()
{ {
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ConfigurationAccess_UICategory::initializeConfigAccess" ); SAL_INFO( "fwk", "framework Ocke.Janssen@sun.com ConfigurationAccess_UICategory::initializeConfigAccess" );
Sequence< Any > aArgs( 1 ); Sequence< Any > aArgs( 1 );
PropertyValue aPropValue; PropertyValue aPropValue;
@ -385,23 +384,23 @@ sal_Bool ConfigurationAccess_UICategory::initializeConfigAccess()
// container.XContainerListener // container.XContainerListener
void SAL_CALL ConfigurationAccess_UICategory::elementInserted( const ContainerEvent& ) throw(RuntimeException) void SAL_CALL ConfigurationAccess_UICategory::elementInserted( const ContainerEvent& ) throw(RuntimeException)
{ {
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ConfigurationAccess_UICategory::elementInserted" ); SAL_INFO( "fwk", "framework Ocke.Janssen@sun.com ConfigurationAccess_UICategory::elementInserted" );
} }
void SAL_CALL ConfigurationAccess_UICategory::elementRemoved ( const ContainerEvent& ) throw(RuntimeException) void SAL_CALL ConfigurationAccess_UICategory::elementRemoved ( const ContainerEvent& ) throw(RuntimeException)
{ {
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ConfigurationAccess_UICategory::elementRemoved " ); SAL_INFO( "fwk", "framework Ocke.Janssen@sun.com ConfigurationAccess_UICategory::elementRemoved " );
} }
void SAL_CALL ConfigurationAccess_UICategory::elementReplaced( const ContainerEvent& ) throw(RuntimeException) void SAL_CALL ConfigurationAccess_UICategory::elementReplaced( const ContainerEvent& ) throw(RuntimeException)
{ {
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ConfigurationAccess_UICategory::elementReplaced" ); SAL_INFO( "fwk", "framework Ocke.Janssen@sun.com ConfigurationAccess_UICategory::elementReplaced" );
} }
// lang.XEventListener // lang.XEventListener
void SAL_CALL ConfigurationAccess_UICategory::disposing( const EventObject& aEvent ) throw(RuntimeException) void SAL_CALL ConfigurationAccess_UICategory::disposing( const EventObject& aEvent ) throw(RuntimeException)
{ {
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ConfigurationAccess_UICategory::disposing" ); SAL_INFO( "fwk", "framework Ocke.Janssen@sun.com ConfigurationAccess_UICategory::disposing" );
// SAFE // SAFE
// remove our reference to the config access // remove our reference to the config access
ResetableGuard aLock( m_aLock ); ResetableGuard aLock( m_aLock );

View File

@ -80,8 +80,11 @@ certain functionality.
@section desktop @section desktop
@li @c desktop @li @c desktop
@li @c desktop.app
@li @c desktop.deployment @li @c desktop.deployment
@li @c desktop.migration @li @c desktop.migration
@li @c desktop.offacc
@li @c desktop.splash
@section Draw @section Draw
@ -103,6 +106,8 @@ certain functionality.
@section embeddedobj @section embeddedobj
@li @c embeddedobj - embedded objects @li @c embeddedobj - embedded objects
@li @c embeddedobj.common
@li @c embeddedobj.general
@li @c embeddedobj.ole - OLE embedded objects @li @c embeddedobj.ole - OLE embedded objects
@section extensions @section extensions
@ -114,6 +119,7 @@ certain functionality.
@section Filter @section Filter
@li @c filter.config
@li @c filter.ms - escher import/export @li @c filter.ms - escher import/export
@li @c filter.xslt - xslt import/export @li @c filter.xslt - xslt import/export
@li @c oox.xmlstream - XmlStream class @li @c oox.xmlstream - XmlStream class