When rows, columns, or sheets are deleted, referencing cells can
result in #REF! errors without warning. Manual reconstruction is
often time-intensive once the session is closed, so this patch
detects these errors and shows a warning infobar to alert the user.
The infobar includes a "Go to First Error" button that navigates to
the first affected formula cell. Only the first error is surfaced to
avoid UI clutter. The warning is dismissed on undo and re-shown on
redo automatically.
The feature is controlled by an Expert Configuration option at
org.openoffice.Office.Calc/Input/WarnOnDeleteCellReferences
(default: off for now).
See: https://github.com/CollaboraOnline/online/issues/2861
Change-Id: I649296444e783c88cbd4688109ac10b3a1bb5046
Signed-off-by: Ferdinand Gassauer <f.gassauer@chricar.at>
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/816
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Balázs Varga <balazs.varga@collabora.com>
(cherry picked from commit b3354e376bee90dedf1fe84b5cf6f4f3c17b7f70)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205499
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
Shrink to data area on either entire document export or expert
configuration (default true). Otherwise, preserve any selection
including leading or trailing empty cells.
Change-Id: I88850dbb194a7ebf9d4e987c5c487b6df3069cdb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205173
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
Tested-by: Jenkins
in Impress/Draw and Calc respectively.
org.openoffice.Office.Calc/Grid/Option/SizeToGrid
org.openoffice.Office.Draw/Grid/SnapGrid/Size
org.openoffice.Office.Impress/Grid/SnapGrid/Size
Seems like ever since "initial import" these were doing nothing
useful.
Change-Id: I5cf6bb7e4c4f91e57b6dba3c9ad7e7774f05e87b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191852
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
Tested-by: Jenkins
The problem appeared, because the existing CharSet property was storing
the index of the selection in the encoding list box; and that meant, that
any change in the list box content (different sorting; added elements)
could suddenly make the selection wrong the next time. With introduction
of the autodetection entry into the top of the list box in tdf#152336 (in
commit 565b619d57), many people who had
UTF-8 selected in the dialog previously, got UTF-7 instead; and many had
not noticed the difference, thus seeing unexpected results after import.
The said commit intended to force-select autodetection for the users who
had not used the updated dialog yet; but the detection of that scenario
was flawed, and didn't work (that was discussed, and respective code was
dropped in commit ...).
This change implements that idea. I decided to ignore the stored CharSet
value; after the change, autodetection entry will be pre-selected at the
first start of the dialog. This will be a minor annoyance for users who
have already re-selected wanted encoding after previous upgrade; but it
allows to resolve the bug for people upgrading from versions prior to
25.2. Also, since new versions will not write to CharSet, it's possible
to use a shared profile between old and new versions without breaking
the encoding selection in either.
Change-Id: I59640b16f703077b6fda44a34eadf2edbe8e6bf5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186240
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Remove the import dialog when performing a normal paste.
Show the dialog only for Paste Special to avoid unnecessary interruptions.
For normal paste, use the last selected preferences from Paste Special.
Change-Id: Idfc985b9c13cb3b995c91e947e815d1789e6f041
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181225
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Tested-by: Jenkins
This introduces Office/Calc/Input/CycleNextPrevSheetTab
boolean property, that controls the behavior implemented
in commit 552170c9c8
(tdf#156311 Cycling through tabs in Calc, 2023-08-16).
Change-Id: I0510743b4ab6d92488ba73a7b8d5b83be9586b2f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174745
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
1) On first call, "by column" was selected although that is the less common case.
> now by row is selected by default
2) The meaning of "Orientation" is not really clear. Suggestion: Compare: rows columns
> changed as suggested
3) The purpose of "Items" is unclear.
> renamed "Items" to "Records"
4) Help page does not exist.
> help page patch has been merged
5) If a database range is selected, the dialog does not consider the property "Contains column labels" of the database range.
> didn't quite get this one; require some help to reproduce
6) It is not usual to use "Okay", but other dialogs have it named "OK".
> changed as suggested.
7) Command has no extended tip.
> Added TooltipLabel
```
<prop oor:name="TooltipLabel" oor:type="xs:string">
<value xml:lang="en-US">Remove or select duplicate records from the selection</value>
</prop>
```
Change-Id: I9579af68b396cddeca608dc077af3b468191942b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174201
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Add a "Remove Duplicate Records" entry under Calc > menu Data
to remove duplicate records from a rectangular selection
of cells in Calc.
Change-Id: Ic8340d7f1e19461ef3666fd2ef65294b73577d5c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160685
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Tested-by: Jenkins
to optimal row height recalculation for optimal document loading.
If the "RecalcOptimalRowHeightMode" is set to "Recalc always" we always
recalculate the optimal row heights at load time, without any warning dialog.
If the "RecalcOptimalRowHeightMode" is set to "Recalc" we never recalculate
the optimal row heights at load time, without any warning dialog.
If the "RecalcOptimalRowHeightMode" is set to "Ask before Recalc" we ask the user
if want to recalculate the optimal row heights at load time or not.
The default value is the same what we are doing now: "Recalc always"
This option was necessary, since optimal row height calculation depending on also
the result of the conditional formatted formulas and it takes a lot of time to calculate
the optimal row heights and load the document. Because we allow a lot of text/cell format
attribute which are effect on the cell size, therefor it is necessary to evaluate all
the formulas. Also if we have 20 condition for a cell range we need to evaluate all
the 20 formulas for all the cells and it is very expensive at load time.
Change-Id: I9288d11dd2f061f85fa36292a909402a6bb89ea9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163421
Tested-by: Jenkins
Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
* Option to control the indicator size added
* Border color adopts the grid color
* Indicator moved to the very edge of the cell
* Default dynamic size reduced
Change-Id: Ia298edfa30061910344a1afa42b42840b9cdab77
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162175
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
from Calc grid options. Spotted while researching for tdf#158473
last mention of ther getters was commented out in 2001 by:
commit a4e5d2cb47
Change-Id: Iffc7b5c4fb50352ad7063fc911039707a20dca4d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160169
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <kelemeng@ubuntu.com>
Added an options that can limit Calc to behave like MS excel in case
of inserting hyperlinks, when MS format document is used.
Tools -> Options -> LibreOfficeDev Calc -> Compatibility -> Hyperlinks
In MS excel, only cells can have a hyperlink, and only 1.
In Calc even textfields in a cell can have hyperlinks, so it can have
multiple links in a cell, but once saved as MS format, and reloaded,
textfield links will become cell links, if there was 1 link in the cell.
If there was more links in the cell, then all will be lost.
So, when MS excel format document is edited in calc, the ability to make
text field links is useless can be missleading, and confuse users.
If this option is set, and an MS file format is opened, then insering a
hyperlink will work like if we selected the whole cell to insert the
hyperlink.
Change-Id: I7174216d10cf250d48f23f71ae681c46f7610bbc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155079
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Add a sub case of Detect special numbers for import CSV (SC_IMPORTFILE),
paste unformated text (SC_PASTETEXT) and text to columns
(SC_TEXTTOCOLUMNS). Following cases are treated:
- If "Detect special numbers" is true, then "Detect scientific numbers"
must be true and all special formats are treated (date, time,
scientific notation) in addition to basic decimal numbers.
- If "Detect special numbers" is false and "Detect scientific numbers" is
true only scientific notation is treated in addition to basic decimal
numbers.
- If "Detect special numbers" and "Detect scientific numbers" are both
false only basic decimal numbers are recognized as numbers. It is the
new case treated by this change
The new option bDetectScientificNumber is append to ASCII options
Change-Id: I73dff9f75d2c7b07ce155daa29dcc4ca9f288664
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152072
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
* Calc > View option replaced by a new application color
* Border not only in highcontrast mode but always shown
* Border color depending on cell/sheet background
The previous option TextOverflow in Calc.xcs was replaced by
CalcTextOverflow in UI.xcs in order to combine color and on/off
with the accepted drawback of incompatibility.
The alternative, keeping the color separate from the toggle, would
separate the options and was rejected therefore.
Change-Id: Ie3e469163485d8eb1cffc7022e1518ad20e8e54e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150340
Tested-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
And some of the comments didn't even tell that, but were just idiotic
copypasta, as in: <!-- OldLocation: --> .
Change-Id: I71b889d1905f9291f920e8219f5648e63da3586e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126530
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
... and Text to Columns, defaulting to false for CSV import via dialog
and stored as config item option similar to all other CSV/Text options.
Change-Id: I742f447b905a07b05dcf5fc58796c46de212276b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121344
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
It had curiously been added as nillable (by default) alongside other properties
that were added as non-nillable with ef809ce948
"More work on the new OpenCL options", but with a non-nil default value, and no
code sets a nil value, and ScModelObj::getFormulaCellNumberLimit, which reads
its value and expects it to be non-nil, would cause UB if it was nil.
So make it non-nillable and thereby simplify the code handling it. (Similar to
how e8bb827571 "Fixed cppheader.xsl nillable
treatment" retrofitted lots of existing properties to be non-nillable in the
past.)
Change-Id: I60ac95025f363e346f3102ef80f38d00862e6e9a
Reviewed-on: https://gerrit.libreoffice.org/84248
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Both of these are trivial and quite common mathematical operations.
Unary minus is a bit complicated in that unary '-' is the same symbol
as binary '-' and so there needs to be a hack to expand the '-'
from the list to both of the opcodes ocSub and ocNegSub.
Change-Id: I556e20e161c22dc89919afffbf904c1ef1d552ff
Reviewed-on: https://gerrit.libreoffice.org/64362
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>