Age | Commit message (Collapse) | Author |
|
The contextmenu service handles the context
menus stored in a document. So far, it
provided only the AddItem() method to add
new items at the bottom of the menu.
The new method allows to forget the preconfigured
menu and to replace it completely.
Example: associate next Sub with the
on-right-click event of sheet 'Sheet1'
=> The custom menu appears when
right-clicking in column C, otherwise
normal behaviour
Sub OnRightClick1(Optional XRange)
' Xrange is a com.sun.star.table.XCellRange
Dim calc, menu, bColumn
Set calc = CreateScriptService("Calc", ThisComponent)
Set menu = calc.ContextMenus("cell")
menu.RemoveAllItems()
bColumn = ( Len(calc.Intersect("Sheet1.$C:$C", _
XRange.AbsoluteName)) > 0 )
If bColumn Then
menu.AddItem("A", Script := "vnd.sun.star.script:...&location=document")
...
End If
menu.Activate(bColumn)
End Sub
The function is available both for Basic and Python user scripts.
The user documentation will have to be reviewed.
Change-Id: I84ee8724bf99c37397a19d729133cc4686a63980
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180520
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
Tested-by: Jenkins
|
|
The
calc.Intersect(range1, range2) method
computes the common area as a string
which is a sub-range of both input ranges.
It returns an empty string when the
sub-range is empty.
Potential use case: customizing a popup
or context menu depending on the presence
of the selected cell in a given area.
In addition, the A1Style() method returns
the sheetname in the output string only
when it is an explicit argument.
Changes are applicable both for Basic and
Python scripts.
They require an update of the user documentation.
Change-Id: I920fc8bee6dace9ceed263a0570b4c0197bc8cb8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180479
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
Tested-by: Jenkins
|
|
In addition the VALIDATEREGEX message
is obsolete and removed from next
language files
modified: wizards/source/scriptforge/po/es.po
modified: wizards/source/scriptforge/po/fr.po
modified: wizards/source/scriptforge/po/pt.po
Change-Id: I67c2e5604e548870bf1bdceb9641d4802530e437
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180413
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
Tested-by: Jenkins
|
|
Replace:
-"supporté" with "pris en charge"
-"tableau" with "matrice" when it's about an array
Change-Id: I7c91bece58da90beb8c9787c1310fcd235698402
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180306
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
Tested-by: Jenkins
|
|
modified: wizards/Package_scriptforge.mk
new file: wizards/source/scriptforge/po/es.po
Change-Id: Ia4d51b9dfaa75bf2f50bb5a11f7f8d465b106489
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180285
Tested-by: Jenkins
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
|
|
Change-Id: Ibc073d4167e9aa755a52ddcea412039925f4c0df
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180187
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
modified: wizards/Package_scriptforge.mk
new file: wizards/source/scriptforge/po/fr.po
Change-Id: I4cb0c93c2c8b335d8319835a383255e02b9b04ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180143
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
Tested-by: Jenkins
|
|
The
XReetangle(rangename)
property returns a com.sun.star.awt.Rectangle
structure describing the coordinates (in pixels)
on the screen where the given range is
located.
This opens the door to effective interactivity
in calc sheets with the use of popup menus.
Example:
r = calc.XRectangle("B2")
menu = CreateScriptService("PopupMenu", , _
X := r.X + r.Width/2, Y := r.Y + r.Height/2)
initializes a popup menu centered on the given
cell.
The property exists in Basic and Python.
The SF_Calc help page should be updated
according to the actual patch.
Change-Id: I2a97c5c7b5bf84d36a2aab5e4b822e30c9d53d8e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180140
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
Tested-by: Jenkins
|
|
The Methods() method returns the list of methods
present in each class.
It is unused so far (vs. Properties() is used
in the code) => a wrong list has no
consequences. It is however reserved for
future use.
The list was incomplete in Array class.
Change-Id: I3e0522d6669d2732c68e52e4021ffb5c8a3fb108
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180127
Tested-by: Jenkins
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
|
|
Hard-coded version numbers are modified
from 25.2 to 25.8.
Many changes in po files due to the alphabetical
sequence of keys after the introduction of the
new "case-sensitive" keys feature.
Before this the dict.Keys() method delivered
the keys as an array in the order of creation.
No effect on actual user scripts.
Change-Id: Iee0c48eca22d17ad892278398c9125912b8b2b3c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180120
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
Tested-by: Jenkins
|
|
Change-Id: I0b9be4ea10c3837007158771fde46ad70e5c52a8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177785
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
Tested-by: Jenkins
|
|
The ExecuteCalcFunction() method is a wrapper
of the
com.sun.star.sheet.FunctionAccess::callFunction()
method.
This method accepts a broad variety of arguments
- scalars: numeric and strings only
- data arrays (= arrays os arrays)
- 2D arrays (1D arrays give errors)
- com.sun.star.table.XCellRange objects
depending on the called function and its
execution or not as an "array function".
The actual commit makes that the arguments passed to
session.ExecuteCalcFunction()
are checked as formally correct: scalars are filtered
as numeric or strings, dates and booleans are converted,
arrays are reshaped to 2D where necessary.
The actual change facilitates, as an example,
the use of complex array functions like XLOOKUP,
a powerful search engine on large data sets.
The implemented functionalities are valid in Basic
and Python.
The help documentation might be completed with
additional examples.
Change-Id: I6bba1e21828ef09c5c6f0463cbcfa1f5df695073
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177744
Tested-by: Jenkins
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
|
|
Change-Id: I7066a328fa54c062d1a12582d4f270e70f466c32
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177702
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
Tested-by: Jenkins
|
|
A data array is a 1D array of 1D subarrays.
All arrays are presumed zero-based.
Usages:
- the content of a range of Calc cells returned
by the UNO XCellRange.getDataArray() or
XCellRange.getFormulaArray() methods
- the output of SF_Session.ExecuteCalcFunction()
- a tuple of (sub)tuples returned by a Python script
3 methods are added to the Array service:
1) ConvertFromDataArray(DataArray, [IsRange], [FillValue])
Convert a data array to a scalar, a vector or a 2D array.
On request, the individual items are reduced
to strings or doubles only.
2) ConvertToDataArray(Data, [IsRange], [Rows], [Columns)
Create a data array from a scalar, a 1D array or a 2D array.
The returned data array is zero-based and compatible
with the XCellRange.DataArray property when IsRange = True.
3) ConvertToRange(Data, [Direction])
Create a valid cells range content from a scalar,
a 1D array, a 2D array or a data array.
The individual items are always reduced to strings
or doubles. Including booleans or dates.
The returned scalar or array is a valid argument
of the SF_Session.ExecuteCalcFunction() method.
They replace the internal _ConvertFromDataArray()
and _ConvertToDataArray() that were present in
the Calc service, called by SetValue(),
SetFormula() etc. methods.
This change is Basic only and has no effect in Python.
The documentation about the Array service
should be completed with these new 3 methods.
Change-Id: Idc5b6417648e4574b0f9c7c6e2438ff7dfce1829
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177620
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
Tested-by: Jenkins
|
|
This is probably not an ideal fix, I'm not sure where exactly the
positioning is off, but this does the job for now.
regression from
commit 95ccc26ba71259be29fde8ba6b6f52ffbe5bd3c7
Author: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Date: Fri May 22 18:07:45 2015 +0900
Change-Id: I2f02e68418b7adf2cba8dfa4e4e51d4416a91389
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175417
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I993e30d3d228c639a69007a846b46f420f9297b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175097
Tested-by: Jenkins
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
|
|
1) Error handling in the ExecuteCalcFunction()
function must be conditioned by the global
error handling.
True; display a user-friendly message
False: abort on the erroneous line
So far, an ambiguous error message was displayed
in both cases.
2) Above ambiguous error message was corrupted
by the detour to SF_Array.Prepend() method
in exc.RaiseFatal() and exc.RaiseAbort().
A simple workaround fixes the ambiguity
about the name of the faulty routine.
Change-Id: Iab38b48e6291e1960fc288696a7ebd18ffe8ebae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175020
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
Tested-by: Jenkins
|
|
Change-Id: I2d58d52d5f331ae9b3f3c4d3dc91d86c075c2a39
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174968
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
The
exception.PythonShell()
method opens the APSO console.
It receives 2 additional arguments
background
foreground
which specify the back- and foreground colors
of the window to open as a Python console.
Typical use of the method:
exc.PythonShell({**globals(), **locals()}, \
background = 0x0, foregound = 0xFFFFFF)
opens the shell with all existing variables
loaded and with white characters on a black
background.
The default values are those set in APSO:
background = 0xFDF6E3
foreground = 0x657B83
No impact on existing scripts.
The current change requires to be completed with
the addition of the 2 arguments in the
adequate help page.
Additonal minor changes
- typo in scriptforge.pyi
- 'outsideprocess' replaced by 'remoteprocess'
Change-Id: I9b1be123f049aa39bd0d814b6dd63fcc4f4ea310
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174897
Tested-by: Jenkins
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
|
|
Introduction of a
ScriptForge.outsideprocess
property: when True the actual mode
is via socket or via pipe.
The property is for internal use only.
Once set it cannot be changed anymore.
Previous statements similar to
if ScriptForge.port > 0:
which returned True when socket mode
are replaced by a broader
if ScriptForge.outsideprocess:
No effect on user scripts.
Change-Id: Ice0efd8c2ab9925511fc8c6889cab714fd208ba1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174874
Tested-by: Jenkins
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
|
|
Reference:
https://bugs.documentfoundation.org/show_bug.cgi?id=163219#c7
Everywhere the With block variable is defined
or redefined inside the With block, the Basic
code has been reviewed.
Found in
SFDatabases/SF_Database.xba/SetTransactionMode()
SFDocuments/SF_Document.xba/Styles()
ScriptForge/SF_Dictionary.xba/ImportFromPropertyValues()
ScriptForge/SF_UI.xba/SetStatusBar()
ScriptForge/SF_UI.xba/ShowProgressBar()
Most changes consist in isolating the With block
variable before the With block itself.
No functional change.
This solution is a workaround for the bug.
IT DOES NOT SOLVE THE ROOT CAUSE.
Change-Id: I48af29d3d9c8b1e36ef5a85c8cfe28f9639ae483
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174560
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
Tested-by: Jenkins
|
|
Change-Id: Ieff7ec790c457b1f4f67544d3f300fc68723d5aa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174393
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
Tested-by: Jenkins
|
|
Change-Id: I8ec74e943232f98c861e035c0da11e8d75f8fa29
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174106
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Change-Id: Ic76b397921c97314005cd0e05646fc45b303ded8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173974
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Change-Id: Iedea5a5e42fa311441a77ee4e18a1b3cbfdf0c44
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173973
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Change-Id: I44377535cabfd0c34a7f2b0815d779b17fbf8f53
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173972
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
|
|
Change-Id: I710d0d90122f4b2a82084a32a98a3877b3fae5bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173971
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Change-Id: If140f3256a7e1afaae723147cb4870fa01b4e52e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173946
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Change-Id: I46bd84741d3958cb807df4f3080426fc2afdd6fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173945
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
|
|
Change-Id: I9bf9de822851bbf4f28614ae686e79a9c7438aac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173944
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
since:
commit 43cc8ad33e815522e2b23ac87a4a9c4526cd85c9
CommitDate: Mon Jan 5 08:23:29 2015 +0200
java: remove dead code
Change-Id: Ib2b3e7a45ef1c9f1a7edf06ed6d474375bfe1c5b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173943
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
|
|
Change-Id: Ie5034470b02310f329c041224ebf035769374e50
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173942
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Change-Id: I23f518a7b492ae92417657f5a319eb1aae4dac3c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173941
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Change-Id: Iab539e41702f0decc071be13ef02c0fb14b11e63
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173848
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Change-Id: I62fbc3ee8fc05facb4c1542706c46266005c363f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173847
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Change-Id: Icf37c5cc813ef80252f557d8896e163fe90e97b9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173846
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
|
|
Change-Id: I0c0a107643b67395a2f4835aab70c58ca6edec9e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173845
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Change-Id: I991d0213a2f429a89e6b1431d9dc900400b60a96
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173844
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
|
|
Change-Id: I70a2b4fbbde93f9ce839129441a17afe3d2059e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173843
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Change-Id: I9aa852422a0ce3daa527599f9d3ed033b5943d04
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173842
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Change-Id: I4712b1523cc54feb3b84b5435960e4d5707735a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173841
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
|
|
Change-Id: I58d91c2d89b175dc8b8c062e1e291fe9c5192017
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173840
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Change-Id: I8ea0d65e01affa7b2a7b787bebcf5bc2ca3b63f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173839
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
|
|
Change-Id: I3fe12f088e6bd2951a9dfdf62b156eb33a44750b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173838
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Change-Id: I2d5c28e7fb220426b5a7c4881e35a4d269322883
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173778
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Change-Id: Ib31c45ffb51db8ec7b3a8c8809b212515cee0437
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173777
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
|
|
Change-Id: Id4afe36a78851205d79850800407966387cc43fb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173776
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Change-Id: I7f67264abf3ab6e52fe74c3e0bbac86a363b45c5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173724
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
|
|
Change-Id: Ideb3c4523dc6210f56c978fdab52690a54b88d1d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173723
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
Change-Id: I3e162e3b58f750b92c5939f3866fdcb8a148de99
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173722
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|