Files
odfstudio/wizards/Package_sfdocuments.mk
Jean-Pierre Ledure 2a3eb41c03 ScriptForge (SFDocuments) new Shape service
The new "Shape" service is focused on
the description of shapes/images/drawing
objects stored in documents.
In the actual release only shapes
in Calc sheets are considered.

A Shape instance is created from either:
-  calc.CreateShapeFromFile(shapename, imagefile,
                            range, aslink)
   => the shape is loaded in the sheet and
      anchored to the given range.
      The shape may or not be embedded in the
      document.
-  calc.Shapes(sheetname, shapename)

Next methods are available:
-  shape.Anchor(anchortype, cell)
   => define the anchor type and the cell
      to which the shape has to be anchored.
-  shape.ExportToFile(filename, imagetype, overwrite)
   => save the shape as an image file
      to a specified location.
-  shape.Pick()
   => select the shape (NB "Select" is a reserved
      word in Basic, hence "Pick")
-  shape.Resize(xpos, ypos, width, height)
   => change position and/or size.
-  shape.Rotate(angle, pivot)
   => rotate the shape using a given
      pivot point (x, y) with a given angle.

The shape.XShape property gives a direct
access to its com.sun.star.drawing.XShape
UNO representation.

The pre-existing SF_Chart service is
functionally unchanged. However it is
now implemented as a subclass of the
new SF_Shape service.
Compatibility with previous releases
is preserved.

The implementation required a few changes
in the error messages. Hence also in
their translations.

All the functions are available for both
Basic and Python user scripts.

The documentation should include:
- a revision of the Calc and Chart help pages
- the creation of an additional Shape page

Change-Id: Ib67f5e755e3112961aadeffc3188b2cdf9aca613
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193906
Tested-by: Jenkins
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2025-11-13 10:04:58 +01:00

40 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/.
#
# 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 .
#
$(eval $(call gb_Package_Package,wizards_basicsrvsfdocuments,$(SRCDIR)/wizards/source/sfdocuments))
$(eval $(call gb_Package_add_files,wizards_basicsrvsfdocuments,$(LIBO_SHARE_FOLDER)/basic/SFDocuments,\
SF_Base.xba \
SF_Calc.xba \
SF_Chart.xba \
SF_Document.xba \
SF_DocumentListener.xba \
SF_Form.xba \
SF_FormControl.xba \
SF_FormDocument.xba \
SF_Register.xba \
SF_Shape.xba \
SF_Writer.xba \
__License.xba \
dialog.xlb \
script.xlb \
))
# vim: set noet sw=4 ts=4: