Since ea890b1d4b "tdf#108408: support unit
specifications for ST_HpsMeasure", the OOXMLUniversalMeasureValue ctor is
converting textual data to mnValue via intermediary double instead of sal_Int32,
so textual data representing negative values now triggers UBSan warnings (e.g.,
"writerfilter/source/ooxml/OOXMLPropertySet.cxx:630:43: runtime error: -70 is
outside the range of representable values of type 'unsigned int'" during
CppunitTest_chart2_export; it appears that, while HpsMeasure may be documented
to only cover positive values, TwipsMeasure may be negative).
But OOXMLUniversalMeasureValue::mnValue is apparently only used in
OOXMLUniversalMeasureValue::getInt, to return an int value, so just change its
type.
Change-Id: I44eabb78f09100c05cc9d1e79a739648f34ea743
w:ST_HpsMeasure is defined in ECMA-376 5th ed. Part 1, 17.18.42 as
This simple type specifies that its contents contain either:
* A positive whole number, whose contents consist of a measurement in
half-points (equivalent to 1/144th of an inch), or
* A positive decimal number immediately followed by a unit identifier.
...
This simple type is a union of the following types:
* The ST_PositiveUniversalMeasure simple type (§22.9.2.12).
* The ST_UnsignedDecimalNumber simple type (§22.9.2.16).
This patch generalizes OOXMLUniversalMeasureValue to handle standard-
defined units, and introduces two typedefed specifications:
OOXMLTwipsMeasureValue (which is used where UniversalMeasure was
previously used), and new OOXMLHpsMeasureValue.
Unit test included.
Change-Id: Iccc6d46f717cb618381baf89dfd3e4bbb844b4af
Reviewed-on: https://gerrit.libreoffice.org/38562
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
...to stop CppunitTest_sd_dialogs_test failing with
> cppunittester: /data/sbergman/lo-san/core/svl/source/items/itemset.cxx:678: void SfxItemSet::MergeRange(sal_uInt16, sal_uInt16): Assertion `!pRange[2] || (pRange[2] - pRange[1]) > 1' failed.
(and whyever that only started to hit now)
Change-Id: Iadb5538b8b10182ddf5dbe02d34d7c73c7d62a14
See <https://listarchives.libreoffice.org/global/users/msg51243.html>
"[libreoffice-users] type byte in Basic", where
> Sub Main
> dim oOutputStream as variant
> oOutputStream = createUnoService("com.sun.star.io.SequenceOutputStream")
> dim nA as byte
> nA = 195
> oOutputStream.writeBytes(array(nA))
> oOutputStream.flush
> dim back(0) as byte
> back = oOutputStream.getWrittenBytes
> MsgBox(back(0))
> End Sub
failed with "Inadmissible value or data type. Overflow." instead of showing
"-61".
Change-Id: I0445476c67510d5f8669a6e711e92332c01ec06c
Mutexes in different classes operate exclusively, which might
cause sync problem when multithreads are involved. This
patch shares the mutex across all classes that share
the underlying stream.
Change-Id: I57e549fb7c375f93955bf54886b91b1892db1e27
Reviewed-on: https://gerrit.libreoffice.org/38563
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
This way it's not necessary to state the size of the array in advance,
which is kind of redundant. It's also easy to forget to adjust it when
adding new elements.
Change-Id: I5fe24fd24954afb69ead014941b8f8b90bcaeac3
Fails here on Linux dbgutil like this:
======================================================================
ERROR: test_validation (calc.ManualCalcTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "uitest/manual_tests/calc.py", line 133, in test_validation
self.ui_test.execute_blocking_action(enter_text, "ok", args=("B6", "2.18"))
File "uitest/uitest/test.py", line 191, in execute_blocking_action
raise DialogNotExecutedException("did not execute a dialog for a blocking action")
uitest.test.DialogNotExecutedException: Dialog not executed for: did not execute a dialog for a blocking action
Change-Id: I2004eb52ce0846ada7ed38dc19d71258d2272ad5
#define STR_POOLCOLL_TOX_AUTHORITIESH (RC_POOLCOLL_REGISTER_BEGIN+ 29)
#define STR_POOLCOLL_TOX_AUTHORITIES1 (RC_POOLCOLL_REGISTER_BEGIN+ 30)
in the context of
switch( m_eType )
...
case TOX_AUTHORITIES : nPoolId = STR_POOLCOLL_TOX_AUTHORITIESH; break;
SetTemplate( 0, SwResId( nPoolId++ ));
already results in a nPoolId of STR_POOLCOLL_TOX_AUTHORITIES1 when we enter this
loop, so don't need to special case TOX_AUTHORITIES
Change-Id: Ic41596a85c48d080cd38003663b729583f08ff98
Reviewed-on: https://gerrit.libreoffice.org/38561
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
..."tdf#45904 Move java XCellSeries test to c++".
For one, the XCellSeries tests needed to be removed from
qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetObj.csv, now that those
tests are done in C++. (Plus some clean-up in
qadevOOo/tests/java/mod/_sc/ScTableSheetObj.java and
sc/qa/unoapi/knownissues.xcl that was missing from
f1454b474d9248d7ef2cb84f396a974184e5167e.)
But for another, qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellCursorObj.csv
and qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellRangeObj.csv still list
XCellSeries tests (which apparently have not been superseded with C++ tests),
so partially revert f1454b474d to get back
qadevOOo/tests/java/ifc/sheet/_XCellSeries.java needed by those tests.
Change-Id: I09f756fb804dafee3064947abcfb796db4797b32