Files
odfstudio/sw/CppunitTest_sw_ooxmlimport2.mk
Mike Kaganski 31820f4fbc tdf#165348: release the lock on original file before clearing URL
Commit 92e7f28f9a (Related: tdf#104718
Use package repair request and behavior, 2023-11-29) made repaired
documents behave like templates, requiring user to explicitly choose
a name on save.

Since switching to template mode happens in this case rather late in
the loading procedure, at this point, lock file is already created
for the original file. Switching to template mode clears media URL;
and after that, media can't remove the lockfile.

This change releases the lock (and removes the lockfile) prior to
clearing URL.

Change-Id: Ibd4794e2b82dc8e1b1c96e22fa2089b9dd597744
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202521
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2026-03-24 09:50:11 +01:00

91 lines
2.2 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,sw_ooxmlimport2))
ifneq ($(OS),MACOSX)
$(eval $(call gb_CppunitTest_use_common_precompiled_header,sw_ooxmlimport2))
endif
$(eval $(call gb_CppunitTest_use_custom_headers,sw_ooxmlimport2,\
officecfg/registry \
))
$(eval $(call gb_CppunitTest_add_exception_objects,sw_ooxmlimport2, \
sw/qa/extras/ooxmlimport/ooxmlimport2 \
))
$(eval $(call gb_CppunitTest_use_libraries,sw_ooxmlimport2, \
basegfx \
comphelper \
cppu \
cppuhelper \
docmodel \
sal \
sfx \
subsequenttest \
test \
unotest \
utl \
sw \
swqahelper \
tl \
vcl \
svxcore \
svl\
))
$(eval $(call gb_CppunitTest_use_externals,sw_ooxmlimport2,\
boost_headers \
libxml2 \
))
$(eval $(call gb_CppunitTest_set_include,sw_ooxmlimport2,\
-I$(SRCDIR)/sw/inc \
-I$(SRCDIR)/sw/source/core/inc \
-I$(SRCDIR)/sw/source/uibase/inc \
-I$(SRCDIR)/sw/qa/inc \
$$(INCLUDE) \
))
ifeq ($(OS),MACOSX)
$(eval $(call gb_CppunitTest_add_cxxflags,sw_ooxmlimport2,\
$(gb_OBJCXXFLAGS) \
))
$(eval $(call gb_CppunitTest_use_system_darwin_frameworks,sw_ooxmlimport2,\
AppKit \
))
endif
$(eval $(call gb_CppunitTest_use_api,sw_ooxmlimport2,\
udkapi \
offapi \
oovbaapi \
))
$(eval $(call gb_CppunitTest_use_ure,sw_ooxmlimport2))
$(eval $(call gb_CppunitTest_use_vcl,sw_ooxmlimport2))
$(eval $(call gb_CppunitTest_use_rdb,sw_ooxmlimport2,services))
$(eval $(call gb_CppunitTest_use_configuration,sw_ooxmlimport2))
$(eval $(call gb_CppunitTest_use_more_fonts,sw_ooxmlimport2))
$(eval $(call gb_CppunitTest_add_arguments,sw_ooxmlimport2, \
-env:arg-env=$(gb_Helper_LIBRARY_PATH_VAR)"$$$${$(gb_Helper_LIBRARY_PATH_VAR)+=$$$$$(gb_Helper_LIBRARY_PATH_VAR)}" \
))
# vim: set noet sw=4 ts=4: