0430adb42b
Currently LibreOffice uses the VML fallback, when a docx document has a wpc:wpc element. This patch implements to use the choice part with the wpc:wpc element. That is often called 'drawing canvas'. The patch uses a similar approach as for SmartArt. The drawing canvas is imported as group shape and for the background an additional rectangular shape is inserted as first in the children vector. Not using VML has the advantage, that the custom shape import is used for preset shapes. VML import produces problems because some properties are not available in VML or the current VML import has deficits. The test suite shows examples, what is better without using the VML fallback. Affected bug reports are e.g. tdf#104671 or tdf#154828. A drawing canvas must be used in Word for connector shapes. A connector in Word on the drawing canvas is not written as cxnSp element, but as ordinary wsp element with additional wps:cNvCnPr child element. The patch generates a connector in such case. Unsolved problems: The path of a curved connector in OOXML is basically incompatible to the path which LibreOffice generates. This patch uses the default path for a curved connector. Same is done in import in Impress. Using the VML fallback had generated a custom shape with the current path and handles, but the connections to the target shapes were lost. Export to docx is missing. The drawing canvas is not recreated, instead a group with the additional background shape is exported. That is no regression, using VML has produced a group too on export. I don't know whether XML_graphicFrame can occur in WordprocessingCanvasContext. At least charts and math equations are not possible on the drawing canvas in Word. Import of WordArt shapes does not work. That is not regression. It works neither in the VML import. Change-Id: I04bf8407efd1939cdf3137775f8afad420b74014 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156629 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
54 lines
1.6 KiB
Makefile
54 lines
1.6 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,oox_wpc_drawing_canvas))
|
|
|
|
$(eval $(call gb_CppunitTest_use_externals,oox_wpc_drawing_canvas,\
|
|
boost_headers \
|
|
libxml2 \
|
|
))
|
|
|
|
$(eval $(call gb_CppunitTest_add_exception_objects,oox_wpc_drawing_canvas, \
|
|
oox/qa/unit/wpc_drawing_canvas \
|
|
))
|
|
|
|
$(eval $(call gb_CppunitTest_use_libraries,oox_wpc_drawing_canvas, \
|
|
comphelper \
|
|
cppu \
|
|
cppuhelper \
|
|
docmodel \
|
|
oox \
|
|
sal \
|
|
subsequenttest \
|
|
test \
|
|
unotest \
|
|
utl \
|
|
tl \
|
|
))
|
|
|
|
$(eval $(call gb_CppunitTest_use_sdk_api,oox_wpc_drawing_canvas))
|
|
|
|
$(eval $(call gb_CppunitTest_use_ure,oox_wpc_drawing_canvas))
|
|
$(eval $(call gb_CppunitTest_use_vcl,oox_wpc_drawing_canvas))
|
|
|
|
$(eval $(call gb_CppunitTest_use_rdb,oox_wpc_drawing_canvas,services))
|
|
|
|
$(eval $(call gb_CppunitTest_use_custom_headers,oox_wpc_drawing_canvas,\
|
|
officecfg/registry \
|
|
))
|
|
|
|
$(eval $(call gb_CppunitTest_use_configuration,oox_wpc_drawing_canvas))
|
|
|
|
$(eval $(call gb_CppunitTest_add_arguments,oox_wpc_drawing_canvas, \
|
|
-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:
|