office-gobmx/embeddedobj/CppunitTest_embeddedobj_msole.mk
Miklos Vajna d5cd62164d 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
2021-05-07 14:21:40 +02:00

48 lines
1.3 KiB
Makefile

# -*- 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: