diff options
author | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-08-11 09:54:20 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2014-08-29 17:40:27 +0200 |
commit | 9991b50ccc6ef3d26c28859b4a31504bd5001368 (patch) | |
tree | ca80d9c0ea408a25d4eadad31e1d97e14d9d91cd /sfx2 | |
parent | bd9a4e19227834381dd776d8fc13e5f1ecdf92b3 (diff) |
Make opengl chart window always active
Fortunately there is a special ole object group with
the MS_EMBED_ACTIVATEWHENVISIBLE flag which define this
behaviour.
Problem is that both Aspect and EmbedMisc are MS specific
enums so we can't use them directly for non-MS objects. But we
can handle opengl charts the same as this ole object group.
Change-Id: I49abeffce319cbb775709a72ba198a1f76b65374
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/view/ipclient.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/view/viewsh.cxx | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx index da4037910d11..6700ec907e01 100644 --- a/sfx2/source/view/ipclient.cxx +++ b/sfx2/source/view/ipclient.cxx @@ -1048,7 +1048,8 @@ void SfxInPlaceClient::DeactivateObject() m_pViewSh->GetViewFrame()->GetTopFrame().LockResize_Impl(true); - if ( m_pImp->m_xObject->getStatus( m_pImp->m_nAspect ) & embed::EmbedMisc::MS_EMBED_ACTIVATEWHENVISIBLE ) + if ( (m_pImp->m_xObject->getStatus( m_pImp->m_nAspect ) & embed::EmbedMisc::MS_EMBED_ACTIVATEWHENVISIBLE) || + svt::EmbeddedObjectRef::IsGLChart(m_pImp->m_xObject) ) { m_pImp->m_xObject->changeState( embed::EmbedStates::INPLACE_ACTIVE ); if (bHasFocus) @@ -1081,7 +1082,8 @@ void SfxInPlaceClient::ResetObject() try { m_pImp->m_bUIActive = false; - if ( m_pImp->m_xObject->getStatus( m_pImp->m_nAspect ) & embed::EmbedMisc::MS_EMBED_ACTIVATEWHENVISIBLE ) + if ( (m_pImp->m_xObject->getStatus( m_pImp->m_nAspect ) & embed::EmbedMisc::MS_EMBED_ACTIVATEWHENVISIBLE) || + svt::EmbeddedObjectRef::IsGLChart(m_pImp->m_xObject) ) m_pImp->m_xObject->changeState( embed::EmbedStates::INPLACE_ACTIVE ); else { diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 4d1b807a6ed7..e02c25f00321 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -44,6 +44,7 @@ #include <unotools/pathoptions.hxx> #include <svtools/miscopt.hxx> #include <svtools/soerr.hxx> +#include <svtools/embedhlp.hxx> #include <basic/basmgr.hxx> #include <basic/sbuno.hxx> @@ -1735,7 +1736,8 @@ void SfxViewShell::CheckIPClient_Impl( SfxInPlaceClient *pIPClient, const Rectan bool bAlwaysActive = ( ( pIPClient->GetObjectMiscStatus() & embed::EmbedMisc::EMBED_ACTIVATEIMMEDIATELY ) != 0 ); bool bActiveWhenVisible = - ( ( pIPClient->GetObjectMiscStatus() & embed::EmbedMisc::MS_EMBED_ACTIVATEWHENVISIBLE ) != 0 ); + ( (( pIPClient->GetObjectMiscStatus() & embed::EmbedMisc::MS_EMBED_ACTIVATEWHENVISIBLE ) != 0 ) || + svt::EmbeddedObjectRef::IsGLChart(pIPClient->GetObject())); // this method is called when either a client is created or the "Edit/Plugins" checkbox is checked if ( !pIPClient->IsObjectInPlaceActive() && pImp->m_bPlugInsActive ) |