44ee19c99b
The paths generated for curved connectors are basically incompatible between LibreOffice and OOXML. Thus it was not possible to render curved connectors the same way as MS Office. The patch adds an OOXML compatible method for calculating the path. The new method results in a different svg:d attribute when saved in ODF, but needs no change to ODF. The patch introduces the boolean connector property 'EdgeOOXMLCurve' to switch between the two methods. The property value is determined from the svg:d attribute in case of import from ODF. In case of missing svg:d attribute the property value is set to 'true', because Word currently does not write a svg:d attribute when it exports to ODF. The property value is set to 'true' for import of connectors on a drawing canvas in docx. Default value for new connectors is 'false'. The new property has no UI, but can be used via macro. Currently the new method is used for import of curved connectors on drawing canvas in docx documents. Change-Id: I53d99f44febe4d74c2b611f5fdb9de86628c4519 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159708 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
66 lines
2 KiB
Text
66 lines
2 KiB
Text
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
/*
|
|
* 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/.
|
|
*
|
|
* This file incorporates work covered by the following license notice:
|
|
*
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
* with this work for additional information regarding copyright
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
* except in compliance with the License. You may obtain a copy of
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
*/
|
|
|
|
|
|
|
|
module com { module sun { module star { module drawing {
|
|
|
|
|
|
/** This is a set of properties to describe the style for rendering connector.
|
|
*/
|
|
published service ConnectorProperties
|
|
{
|
|
|
|
/** This property contains the kind of the connector.
|
|
*/
|
|
[property] com::sun::star::drawing::ConnectorType EdgeKind;
|
|
|
|
|
|
/** This property contains the horizontal distance of node 1.
|
|
*/
|
|
[property] long EdgeNode1HorzDist;
|
|
|
|
|
|
/** This property contains the vertical distance of node 1.
|
|
*/
|
|
[property] long EdgeNode1VertDist;
|
|
|
|
|
|
/** This property contains the horizontal distance of node 2.
|
|
*/
|
|
[property] long EdgeNode2HorzDist;
|
|
|
|
|
|
/** This property contains the vertical distance of node 2.
|
|
*/
|
|
[property] long EdgeNode2VertDist;
|
|
|
|
|
|
/** If 'TRUE' a curved connector is routed compatible to OOXML.
|
|
The default value for new connectors is 'FALSE'.
|
|
The property is only evaluated in case EdgeKind CURVE.
|
|
@since LibreOffice 24.2
|
|
*/
|
|
[property, optional] boolean EdgeOOXMLCurve;
|
|
};
|
|
|
|
|
|
}; }; }; };
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|