diff options
author | Regina Henschel <rb.henschel@t-online.de> | 2023-09-06 23:03:39 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2023-11-15 11:13:31 +0100 |
commit | 0430adb42bc38f037b907984e71c144d863796cb (patch) | |
tree | cb2104e03b5f35f8eebfa0eecc142918e3522861 /oox/source/token/tokens.txt | |
parent | c0df28f957b43f0ecbffdc994ee0702dbe5bc33f (diff) |
Import Wordprocessing Canvas, wpc:wpc element
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>
Diffstat (limited to 'oox/source/token/tokens.txt')
-rw-r--r-- | oox/source/token/tokens.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/oox/source/token/tokens.txt b/oox/source/token/tokens.txt index eb5239d8a8ac..56e17dc35c22 100644 --- a/oox/source/token/tokens.txt +++ b/oox/source/token/tokens.txt @@ -5809,6 +5809,7 @@ wp wp14 wpJustification wpSpaceWidth +wpc wpg wps wrap |