diff options
author | Radu Ioan <ioan.radu.g@gmail.com> | 2013-05-27 00:22:20 +0300 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2013-05-31 18:08:02 +0000 |
commit | 660b67a413fed152bc273bdc534e53b01b1e9d77 (patch) | |
tree | 1bdaad775c26d63325d32c8529d303cf0261b587 /embeddedobj/source/commonembedding | |
parent | 2c7b6aa7a3127370afa41c1e83b2c198da504055 (diff) |
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>
Diffstat (limited to 'embeddedobj/source/commonembedding')
-rw-r--r-- | embeddedobj/source/commonembedding/embedobj.cxx | 13 | ||||
-rw-r--r-- | embeddedobj/source/commonembedding/persistence.cxx | 66 | ||||
-rw-r--r-- | embeddedobj/source/commonembedding/visobj.cxx | 18 | ||||
-rw-r--r-- | embeddedobj/source/commonembedding/xfactory.cxx | 13 |
4 files changed, 52 insertions, 58 deletions
diff --git a/embeddedobj/source/commonembedding/embedobj.cxx b/embeddedobj/source/commonembedding/embedobj.cxx index 24a7850427ca..6983fc0de2e3 100644 --- a/embeddedobj/source/commonembedding/embedobj.cxx +++ b/embeddedobj/source/commonembedding/embedobj.cxx @@ -39,7 +39,6 @@ #include <com/sun/star/embed/EmbedMisc.hpp> #include <comphelper/processfactory.hxx> -#include <rtl/logfile.hxx> #include <vcl/svapp.hxx> #include <targetstatecontrol.hxx> @@ -205,7 +204,7 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState ) } else { - OSL_FAIL( "Unacceptable state switch!\n" ); + SAL_WARN( "embeddedobj.common", "Unacceptable state switch!" ); throw uno::RuntimeException(); // TODO } } @@ -277,7 +276,7 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState ) } else { - OSL_FAIL( "Unacceptable state switch!\n" ); + SAL_WARN( "embeddedobj.common", "Unacceptable state switch!" ); throw uno::RuntimeException(); // TODO } } @@ -347,7 +346,7 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState ) } else { - OSL_FAIL( "Unacceptable state switch!\n" ); + SAL_WARN( "embeddedobj.common", "Unacceptable state switch!" ); throw uno::RuntimeException(); // TODO } } @@ -360,7 +359,7 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState ) } else { - OSL_FAIL( "Unacceptable state switch!\n" ); + SAL_WARN( "embeddedobj.common", "Unacceptable state switch!" ); throw uno::RuntimeException(); // TODO } } @@ -425,7 +424,7 @@ void SAL_CALL OCommonEmbeddedObject::changeState( sal_Int32 nNewState ) uno::Exception, 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); { @@ -529,7 +528,7 @@ void SAL_CALL OCommonEmbeddedObject::doVerb( sal_Int32 nVerbID ) uno::Exception, uno::RuntimeException ) { - RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OCommonEmbeddedObject::doVerb" ); + SAL_INFO( "embeddedobj.common", "embeddedobj (mv76033) OCommonEmbeddedObject::doVerb" ); SolarMutexGuard aSolarGuard; //TODO: a gross hack to avoid deadlocks when this is called from the diff --git a/embeddedobj/source/commonembedding/persistence.cxx b/embeddedobj/source/commonembedding/persistence.cxx index cc99b3b8beae..06868e7b4a20 100644 --- a/embeddedobj/source/commonembedding/persistence.cxx +++ b/embeddedobj/source/commonembedding/persistence.cxx @@ -52,8 +52,6 @@ #include <comphelper/mimeconfighelper.hxx> #include <comphelper/namedvaluecollection.hxx> -#include <rtl/logfile.hxx> - #include <tools/diagnose_ex.h> using namespace ::com::sun::star; @@ -120,7 +118,7 @@ uno::Reference< io::XInputStream > createTempInpStreamFromStor( const uno::Reference< embed::XStorage >& xStorage, 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; @@ -149,7 +147,7 @@ uno::Reference< io::XInputStream > createTempInpStreamFromStor( try { 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() ) xComponent->dispose(); } @@ -246,7 +244,7 @@ void OCommonEmbeddedObject::SwitchOwnPersistence( const uno::Reference< embed::X { 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; } @@ -284,7 +282,7 @@ void OCommonEmbeddedObject::SwitchOwnPersistence( const uno::Reference< embed::X sal_Int32 nStorageMode = m_bReadOnly ? embed::ElementModes::READ : embed::ElementModes::READWRITE; 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 ); } @@ -302,7 +300,7 @@ void OCommonEmbeddedObject::EmbedAndReparentDoc_Impl( const uno::Reference< util } 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() ) { 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() ) { ::comphelper::NamedValueCollection aLoadArgs; @@ -463,7 +461,7 @@ void OCommonEmbeddedObject::FillDefaultLoadArgs_Impl( const uno::Reference< embe o_rLoadArgs.put( "ReadOnly", m_bReadOnly ); 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() ) 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( "InputStream", xTempInpStream ); @@ -586,7 +584,7 @@ uno::Reference< io::XInputStream > OCommonEmbeddedObject::StoreDocumentToTempStr 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() ) throw io::IOException(); // TODO: @@ -607,7 +605,7 @@ uno::Reference< io::XInputStream > OCommonEmbeddedObject::StoreDocumentToTempStr } catch( const uno::Exception& ) { - OSL_FAIL( "Looks like stream was closed already" ); + SAL_WARN( "embeddedobj.common", "Looks like stream was closed already" ); } return aResult; @@ -634,7 +632,7 @@ void OCommonEmbeddedObject::SaveObject_Impl() } 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, 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() ) throw uno::RuntimeException(); // TODO: @@ -747,7 +745,7 @@ void OCommonEmbeddedObject::StoreDocToStorage_Impl( const uno::Reference< embed: { 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() ) 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 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 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; - 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; @@ -842,7 +840,7 @@ uno::Reference< util::XCloseable > OCommonEmbeddedObject::CreateTempDocFromLink_ } 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() ) @@ -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].Value <<= aTempFileURL; @@ -903,7 +901,7 @@ void SAL_CALL OCommonEmbeddedObject::setPersistentEntry( uno::Exception, 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 // a kind of typedetection should be done in the factory @@ -1040,7 +1038,7 @@ void SAL_CALL OCommonEmbeddedObject::setPersistentEntry( m_pDocHolder->SetOutplaceFrameProperties( aOutFrameProps ); } 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" ) { @@ -1131,7 +1129,7 @@ void SAL_CALL OCommonEmbeddedObject::storeToEntry( const uno::Reference< embed:: uno::Exception, uno::RuntimeException ) { - RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OCommonEmbeddedObject::storeToEntry" ); + SAL_INFO( "embeddedobj.common", "embeddedobj (mv76033) OCommonEmbeddedObject::storeToEntry" ); ::osl::ResettableMutexGuard aGuard( m_aMutex ); if ( m_bDisposed ) @@ -1168,7 +1166,7 @@ void SAL_CALL OCommonEmbeddedObject::storeToEntry( const uno::Reference< embed:: } 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 @@ -1181,7 +1179,7 @@ void SAL_CALL OCommonEmbeddedObject::storeToEntry( const uno::Reference< embed:: } 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; @@ -1257,7 +1255,7 @@ void SAL_CALL OCommonEmbeddedObject::storeAsEntry( const uno::Reference< embed:: uno::Exception, uno::RuntimeException ) { - RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OCommonEmbeddedObject::storeAsEntry" ); + SAL_INFO( "embeddedobj.common", "embeddedobj (mv76033) OCommonEmbeddedObject::storeAsEntry" ); // TODO: use lObjArgs @@ -1299,7 +1297,7 @@ void SAL_CALL OCommonEmbeddedObject::storeAsEntry( const uno::Reference< embed:: } 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 @@ -1312,7 +1310,7 @@ void SAL_CALL OCommonEmbeddedObject::storeAsEntry( const uno::Reference< embed:: } 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" ) ); @@ -1394,7 +1392,7 @@ void SAL_CALL OCommonEmbeddedObject::saveCompleted( sal_Bool bUseNew ) uno::Exception, uno::RuntimeException ) { - RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OCommonEmbeddedObject::saveCompleted" ); + SAL_INFO( "embeddedobj.common", "embeddedobj (mv76033) OCommonEmbeddedObject::saveCompleted" ); ::osl::MutexGuard aGuard( m_aMutex ); if ( m_bDisposed ) @@ -1422,7 +1420,7 @@ void SAL_CALL OCommonEmbeddedObject::saveCompleted( sal_Bool bUseNew ) if ( !m_bWaitSaveCompleted && !bUseNew ) return; - OSL_ENSURE( m_bWaitSaveCompleted, "Unexpected saveCompleted() call!\n" ); + SAL_WARN_IF( !m_bWaitSaveCompleted, "embeddedobj.common", "Unexpected saveCompleted() call!" ); if ( !m_bWaitSaveCompleted ) throw io::IOException(); // TODO: illegal call @@ -1445,7 +1443,7 @@ void SAL_CALL OCommonEmbeddedObject::saveCompleted( sal_Bool bUseNew ) { try { 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() ) xComponent->dispose(); } @@ -1522,7 +1520,7 @@ void SAL_CALL OCommonEmbeddedObject::storeOwn() uno::Exception, 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 // 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" ) ); - 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() ) throw uno::RuntimeException(); @@ -1588,7 +1586,7 @@ void SAL_CALL OCommonEmbeddedObject::storeOwn() } 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(); @@ -1830,7 +1828,7 @@ void SAL_CALL OCommonEmbeddedObject::breakLink( const uno::Reference< embed::XSt {} 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 ) { diff --git a/embeddedobj/source/commonembedding/visobj.cxx b/embeddedobj/source/commonembedding/visobj.cxx index 38c89fd704c3..046be33b1ed7 100644 --- a/embeddedobj/source/commonembedding/visobj.cxx +++ b/embeddedobj/source/commonembedding/visobj.cxx @@ -23,8 +23,6 @@ #include <com/sun/star/uno/Sequence.hxx> #include <com/sun/star/lang/DisposedException.hpp> -#include <rtl/logfile.hxx> - #include <commonembobj.hxx> @@ -37,13 +35,13 @@ void SAL_CALL OCommonEmbeddedObject::setVisualAreaSize( sal_Int64 nAspect, const uno::Exception, uno::RuntimeException ) { - RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OCommonEmbeddedObject::setVisualAreaSize" ); + SAL_WARN( "embeddedobj.common", "embeddedobj (mv76033) OCommonEmbeddedObject::setVisualAreaSize" ); ::osl::MutexGuard aGuard( m_aMutex ); if ( m_bDisposed ) 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 ) // no representation can be retrieved throw embed::WrongStateException( OUString( "Illegal call!\n" ), @@ -79,7 +77,7 @@ awt::Size SAL_CALL OCommonEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect ) uno::Exception, uno::RuntimeException ) { - RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OCommonEmbeddedObject::getVisualAreaSize" ); + SAL_WARN( "embeddedobj.common", "embeddedobj (mv76033) OCommonEmbeddedObject::getVisualAreaSize" ); ::osl::MutexGuard aGuard( m_aMutex ); 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" ), 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 ) return m_aClonedSize; @@ -123,7 +121,7 @@ sal_Int32 SAL_CALL OCommonEmbeddedObject::getMapUnit( sal_Int64 nAspect ) if ( m_bDisposed ) 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 ) // no representation can be retrieved throw embed::WrongStateException( OUString( "Illegal call!\n" ), @@ -162,7 +160,7 @@ embed::VisualRepresentation SAL_CALL OCommonEmbeddedObject::getPreferredVisualRe uno::Exception, uno::RuntimeException ) { - RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OCommonEmbeddedObject::getPrefferedVisualRepresentation" ); + SAL_WARN( "embeddedobj.common", "embeddedobj (mv76033) OCommonEmbeddedObject::getPrefferedVisualRepresentation" ); ::osl::MutexGuard aGuard( m_aMutex ); if ( m_bDisposed ) @@ -173,7 +171,7 @@ embed::VisualRepresentation SAL_CALL OCommonEmbeddedObject::getPreferredVisualRe 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 ) // no representation can be retrieved throw embed::WrongStateException( OUString( "Illegal call!\n" ), @@ -188,7 +186,7 @@ embed::VisualRepresentation SAL_CALL OCommonEmbeddedObject::getPreferredVisualRe 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 embed::VisualRepresentation aVisualRepresentation; diff --git a/embeddedobj/source/commonembedding/xfactory.cxx b/embeddedobj/source/commonembedding/xfactory.cxx index 74e4d4f0563a..0ccd7b1028aa 100644 --- a/embeddedobj/source/commonembedding/xfactory.cxx +++ b/embeddedobj/source/commonembedding/xfactory.cxx @@ -24,7 +24,6 @@ #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/container/XNameAccess.hpp> -#include <rtl/logfile.hxx> #include <comphelper/processfactory.hxx> @@ -70,7 +69,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta uno::Exception, uno::RuntimeException) { - RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OOoEmbeddedObjectFactory::createInstanceInitFromEntry" ); + SAL_INFO( "embeddedobj.common", "embeddedobj (mv76033) OOoEmbeddedObjectFactory::createInstanceInitFromEntry" ); if ( !xStorage.is() ) 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::RuntimeException) { - RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OOoEmbeddedObjectFactory::createInstanceInitFromMediaDescriptor" ); + SAL_INFO( "embeddedobj.common", "embeddedobj (mv76033) OOoEmbeddedObjectFactory::createInstanceInitFromMediaDescriptor" ); if ( !xStorage.is() ) 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::RuntimeException) { - RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OOoEmbeddedObjectFactory::createInstanceInitNew" ); + SAL_INFO( "embeddedobj.common", "embeddedobj (mv76033) OOoEmbeddedObjectFactory::createInstanceInitNew" ); uno::Reference< uno::XInterface > xResult; @@ -279,7 +278,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta uno::Exception, 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 if ( !xStorage.is() ) @@ -339,7 +338,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta uno::Exception, uno::RuntimeException ) { - RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OOoEmbeddedObjectFactory::createInstanceLink" ); + SAL_INFO( "embeddedobj.common", "embeddedobj (mv76033) OOoEmbeddedObjectFactory::createInstanceLink" ); uno::Reference< uno::XInterface > xResult; @@ -395,7 +394,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta uno::Exception, uno::RuntimeException ) { - RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OOoEmbeddedObjectFactory::createInstanceLinkUserInit" ); + SAL_INFO( "embeddedobj.common", "embeddedobj (mv76033) OOoEmbeddedObjectFactory::createInstanceLinkUserInit" ); uno::Reference< uno::XInterface > xResult; |