Lines 356-361
public:
Link Here
|
356 |
sal_Bool m_bVersionsAlreadyLoaded: 1; |
356 |
sal_Bool m_bVersionsAlreadyLoaded: 1; |
357 |
sal_Bool m_bLocked: 1; |
357 |
sal_Bool m_bLocked: 1; |
358 |
sal_Bool m_bGotDateTime: 1; |
358 |
sal_Bool m_bGotDateTime: 1; |
|
|
359 |
sal_Bool m_bTriedToCreateLogRing: 1; // whether we already attempted to create m_xLogRing |
359 |
|
360 |
|
360 |
uno::Reference < embed::XStorage > xStorage; |
361 |
uno::Reference < embed::XStorage > xStorage; |
361 |
|
362 |
|
Lines 404-409
public:
Link Here
|
404 |
|
405 |
|
405 |
SfxMedium_Impl( SfxMedium* pAntiImplP ); |
406 |
SfxMedium_Impl( SfxMedium* pAntiImplP ); |
406 |
~SfxMedium_Impl(); |
407 |
~SfxMedium_Impl(); |
|
|
408 |
|
409 |
void CreateLogRing(); |
407 |
}; |
410 |
}; |
408 |
|
411 |
|
409 |
void SfxMedium::DataAvailable_Impl() |
412 |
void SfxMedium::DataAvailable_Impl() |
Lines 451-456
SfxMedium_Impl::SfxMedium_Impl( SfxMedium* pAntiImplP )
Link Here
|
451 |
m_bVersionsAlreadyLoaded( sal_False ), |
454 |
m_bVersionsAlreadyLoaded( sal_False ), |
452 |
m_bLocked( sal_False ), |
455 |
m_bLocked( sal_False ), |
453 |
m_bGotDateTime( sal_False ), |
456 |
m_bGotDateTime( sal_False ), |
|
|
457 |
m_bTriedToCreateLogRing( sal_False ), |
454 |
pAntiImpl( pAntiImplP ), |
458 |
pAntiImpl( pAntiImplP ), |
455 |
nFileVersion( 0 ), |
459 |
nFileVersion( 0 ), |
456 |
pOrigFilter( 0 ), |
460 |
pOrigFilter( 0 ), |
Lines 474-479
SfxMedium_Impl::~SfxMedium_Impl()
Link Here
|
474 |
delete pTempFile; |
478 |
delete pTempFile; |
475 |
} |
479 |
} |
476 |
|
480 |
|
|
|
481 |
void SfxMedium_Impl::CreateLogRing() |
482 |
{ |
483 |
if ( !m_bTriedToCreateLogRing && !m_xLogRing.is() ) |
484 |
{ |
485 |
m_bTriedToCreateLogRing = sal_True; |
486 |
try |
487 |
{ |
488 |
::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() ); |
489 |
if ( aContext.is() ) |
490 |
m_xLogRing.set( aContext.getSingleton( "com.sun.star.logging.DocumentIOLogRing" ), UNO_QUERY_THROW ); |
491 |
} |
492 |
catch( uno::Exception& ) |
493 |
{} |
494 |
} |
495 |
} |
496 |
|
477 |
//================================================================ |
497 |
//================================================================ |
478 |
|
498 |
|
479 |
#define IMPL_CTOR(rootVal,URLVal) \ |
499 |
#define IMPL_CTOR(rootVal,URLVal) \ |
Lines 508-524
sal_uInt32 SfxMedium::GetLastStorageCreationState()
Link Here
|
508 |
//------------------------------------------------------------------ |
528 |
//------------------------------------------------------------------ |
509 |
void SfxMedium::AddLog( const ::rtl::OUString& aMessage ) |
529 |
void SfxMedium::AddLog( const ::rtl::OUString& aMessage ) |
510 |
{ |
530 |
{ |
511 |
if ( !pImp->m_xLogRing.is() ) |
531 |
pImp->CreateLogRing(); |
512 |
{ |
|
|
513 |
try |
514 |
{ |
515 |
::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() ); |
516 |
if ( aContext.is() ) |
517 |
pImp->m_xLogRing.set( aContext.getSingleton( "com.sun.star.logging.DocumentIOLogRing" ), UNO_QUERY_THROW ); |
518 |
} |
519 |
catch( uno::Exception& ) |
520 |
{} |
521 |
} |
522 |
|
532 |
|
523 |
if ( pImp->m_xLogRing.is() ) |
533 |
if ( pImp->m_xLogRing.is() ) |
524 |
pImp->m_xLogRing->logString( aMessage ); |
534 |
pImp->m_xLogRing->logString( aMessage ); |