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 /embeddedobj | |
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 'embeddedobj')
-rw-r--r-- | embeddedobj/Library_embobj.mk | 1 | ||||
-rw-r--r-- | embeddedobj/source/general/docholder.cxx | 10 |
2 files changed, 7 insertions, 4 deletions
diff --git a/embeddedobj/Library_embobj.mk b/embeddedobj/Library_embobj.mk index f2a971bb5a1e..7de4e48dd5e8 100644 --- a/embeddedobj/Library_embobj.mk +++ b/embeddedobj/Library_embobj.mk @@ -26,6 +26,7 @@ $(eval $(call gb_Library_use_libraries,embobj,\ cppu \ cppuhelper \ sal \ + svt \ vcl \ tl \ $(gb_UWINAPI) \ diff --git a/embeddedobj/source/general/docholder.cxx b/embeddedobj/source/general/docholder.cxx index bd0494f27368..783c99b59165 100644 --- a/embeddedobj/source/general/docholder.cxx +++ b/embeddedobj/source/general/docholder.cxx @@ -64,6 +64,7 @@ #include <osl/diagnose.h> #include <rtl/process.h> #include <vcl/svapp.hxx> +#include <svtools/embedhlp.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/namedvaluecollection.hxx> @@ -72,9 +73,9 @@ #include "commonembobj.hxx" #include "intercept.hxx" - -#define HATCH_BORDER_WIDTH (((m_pEmbedObj->getStatus(embed::Aspects::MSOLE_CONTENT)&embed::EmbedMisc::MS_EMBED_ACTIVATEWHENVISIBLE) && \ - m_pEmbedObj->getCurrentState()!=embed::EmbedStates::UI_ACTIVE) ? 0 : 4 ) +#define HATCH_BORDER_WIDTH ((((m_pEmbedObj->getStatus(embed::Aspects::MSOLE_CONTENT)&embed::EmbedMisc::MS_EMBED_ACTIVATEWHENVISIBLE) || \ + (svt::EmbeddedObjectRef::IsGLChart(m_pEmbedObj)) ) && \ + m_pEmbedObj->getCurrentState()!=embed::EmbedStates::UI_ACTIVE) ? 0 : 4 ) using namespace ::com::sun::star; @@ -1256,7 +1257,8 @@ awt::Rectangle SAL_CALL DocumentHolder::calcAdjustedRectangle( const awt::Rectan void SAL_CALL DocumentHolder::activated( ) throw (::com::sun::star::uno::RuntimeException, std::exception) { - if ( (m_pEmbedObj->getStatus(embed::Aspects::MSOLE_CONTENT)&embed::EmbedMisc::MS_EMBED_ACTIVATEWHENVISIBLE) ) + if ( (m_pEmbedObj->getStatus(embed::Aspects::MSOLE_CONTENT)&embed::EmbedMisc::MS_EMBED_ACTIVATEWHENVISIBLE) || + svt::EmbeddedObjectRef::IsGLChart(m_pEmbedObj) ) { if ( m_pEmbedObj->getCurrentState() != embed::EmbedStates::UI_ACTIVE && !(m_pEmbedObj->getStatus(embed::Aspects::MSOLE_CONTENT)&embed::EmbedMisc::MS_EMBED_NOUIACTIVATE) ) |