diff options
-rw-r--r-- | embeddedobj/source/msole/oleembed.cxx | 2 | ||||
-rw-r--r-- | embeddedobj/source/msole/olevisual.cxx | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/embeddedobj/source/msole/oleembed.cxx b/embeddedobj/source/msole/oleembed.cxx index 657d27710ca3..41792fede127 100644 --- a/embeddedobj/source/msole/oleembed.cxx +++ b/embeddedobj/source/msole/oleembed.cxx @@ -910,6 +910,7 @@ void SAL_CALL OleEmbeddedObject::doVerb( sal_Int32 nVerbID ) m_bTriedConversion = true; if ( TryToConvertToOOo( m_xObjectStream ) ) { + aGuard.clear(); changeState( embed::EmbedStates::ACTIVE ); return; } @@ -941,6 +942,7 @@ void SAL_CALL OleEmbeddedObject::doVerb( sal_Int32 nVerbID ) if ( TryToConvertToOOo( xStream ) ) { + aGuard.clear(); changeState( embed::EmbedStates::ACTIVE ); return; } diff --git a/embeddedobj/source/msole/olevisual.cxx b/embeddedobj/source/msole/olevisual.cxx index bcbacffe5d64..b5047d1036b6 100644 --- a/embeddedobj/source/msole/olevisual.cxx +++ b/embeddedobj/source/msole/olevisual.cxx @@ -355,9 +355,6 @@ embed::VisualRepresentation SAL_CALL OleEmbeddedObject::getPreferredVisualRepres { try { - if ( m_nObjectState == embed::EmbedStates::LOADED ) - changeState( embed::EmbedStates::RUNNING ); - datatransfer::DataFlavor aDataFlavor( "application/x-openoffice-wmf;windows_formatname=\"Image WMF\"", "Windows Metafile", @@ -366,6 +363,8 @@ embed::VisualRepresentation SAL_CALL OleEmbeddedObject::getPreferredVisualRepres embed::VisualRepresentation aVisualRepr; { ClearedMutexArea clearedMutex(aGuard); + if ( m_nObjectState == embed::EmbedStates::LOADED ) + changeState( embed::EmbedStates::RUNNING ); aVisualRepr.Data = m_pOleComponent->getTransferData(aDataFlavor); } aVisualRepr.Flavor = aDataFlavor; |