summaryrefslogtreecommitdiff
path: root/embeddedobj/CppunitTest_embeddedobj_msole.mk
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2021-05-07 12:31:24 +0200
committerMiklos Vajna <vmiklos@collabora.com>2021-05-07 14:21:40 +0200
commitd5cd62164d32273a25913c93aa04be9f7f3a4073 (patch)
treecd5136b2c652071225721ac16c933033eb8a4662 /embeddedobj/CppunitTest_embeddedobj_msole.mk
parent5ed1e84ce2acbcc8700a49549b68fe7be19f94d0 (diff)
embeddedobj: handle getting the visible area on a thread
The Windows OLE2 implementation of the embedded object interface assumes that the same thread is used for loading and saving the embedded objects. This means that in case the main thread is used for loading (e.g. from remote UNO, but with OnMainThead=true), but a thread is used for storing (without an explicit OnMainThead=true), then the underlying win32 API call failed and we returned a fixed size in EmbeddedObjectRef::GetSize(). Fix the problem by explicitly checking for RPC_E_WRONG_THREAD and adding error handling for that case. Change-Id: Icf1e7722d33a809fa671d1505b2a0155af040c71 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115236 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'embeddedobj/CppunitTest_embeddedobj_msole.mk')
-rw-r--r--embeddedobj/CppunitTest_embeddedobj_msole.mk48
1 files changed, 48 insertions, 0 deletions
diff --git a/embeddedobj/CppunitTest_embeddedobj_msole.mk b/embeddedobj/CppunitTest_embeddedobj_msole.mk
new file mode 100644
index 000000000000..2ffb7f64d829
--- /dev/null
+++ b/embeddedobj/CppunitTest_embeddedobj_msole.mk
@@ -0,0 +1,48 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#*************************************************************************
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+#*************************************************************************
+
+$(eval $(call gb_CppunitTest_CppunitTest,embeddedobj_msole))
+
+$(eval $(call gb_CppunitTest_use_externals,embeddedobj_msole,\
+ boost_headers \
+ libxml2 \
+))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,embeddedobj_msole, \
+ embeddedobj/qa/cppunit/msole \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,embeddedobj_msole, \
+ comphelper \
+ cppu \
+ embobj \
+ sal \
+ test \
+ unotest \
+ utl \
+ vcl \
+ tl \
+))
+
+$(eval $(call gb_CppunitTest_use_sdk_api,embeddedobj_msole))
+
+$(eval $(call gb_CppunitTest_use_ure,embeddedobj_msole))
+$(eval $(call gb_CppunitTest_use_vcl,embeddedobj_msole))
+
+$(eval $(call gb_CppunitTest_use_rdb,embeddedobj_msole,services))
+
+$(eval $(call gb_CppunitTest_use_custom_headers,embeddedobj_msole,\
+ officecfg/registry \
+))
+
+$(eval $(call gb_CppunitTest_use_configuration,embeddedobj_msole))
+
+# vim: set noet sw=4 ts=4: