8 Commits
Author SHA1 Message Date
Mike Kaganski a6a6921123 Use good old string literals in assertXPath and friends
These are only sent to an external API expecting char*-like strings,
or for comparison. Having every assertXPath having three of _[ou]str
is too much syntactic noise, making the unit tests almost unreadable.

Change-Id: Ic004a36ea75e7bfe0b96f405c40f926a957b51cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174416
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-10-05 10:06:44 +02:00
Caolán McNamara 9ff4fd5ccc this duplicated CPPUNIT_ASSERT_POINT_EQUAL_WITH_TOLERANCE
so use that instead

Change-Id: I0a627fdd2f2657a3f23d47f014ff7019cab544f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162330
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-20 17:10:56 +01:00
Caolán McNamara 7edfb1b85c calc doc with saved zoom in settings causes disjoint invalidations...
in multiple views, while the invalidations rectangles should be reported
at the same place from each view.

on load, ScTabView::SetZoom gets called with the zoom stored in the
document settings, which both calls sets Zoom on the ViewData, and then
calls ZoomChanged, which syncs the GridWindows MapMode from the ViewData
derived GetDrawMapMode().

Later lok sets zoom via setClientArea which leaves the GridWindows
MapMode untouched and out of sync with the newly changed ViewData
MapMode.

Typically then, on e.g. on deleting text in one view then
ScViewFunc::DeleteContents or similar is called which calls
ScTabView::UpdateCopySourceOverlay which calls
ScGridWindow::UpdateCopySourceOverlay and that sets the GridWindow
MapMode to the DrawMapMode but then *for lokit* returns early (among a
few other unlikely early return cases) while every other similar func
restores the orig GridWindow mode before returning. So the view which
is used to make the change ends up with GridWindows synced to the
ViewData MapMode, which looks like accident. While the other view
remains with GridWindows with MapModes unsynced with that views
ViewData MapMode.

So on invalidate, the view that was used to make the change has
GridWindows with MapModes that report the correct rectangle, while the
other unsynced view will report an incorrect rectangle, until something
happens in that view to get it to exec UpdateCopySourceOverlay and get
synced.

Here add the sync to ScModelObj::setClientZoom so the two MapModes
remain synced once that is called.

Change-Id: I2da59f50ae2b0e3ea6b7ef8b54debdab1ee98266
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162312
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162322
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-20 12:45:13 +01:00
Stephan Bergmann df5995b0bf Only specialize CppUnit::assetion_traits<T>::toString member functions
...not the whole CppUnit::assetion_traits<T> classes (where applicable).  That
avoids spelling out the (identical) equals member functions, and also leaves
around the less and lessEqual member functions, in case they want to be used
after all.

Change-Id: I18f8d6cff0353921ced4952b33a0c85ff8292923
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147165
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-02-16 21:16:12 +00:00
Jens Carl 35f6b6f6b9 tdf#45904 Move _SheetCell Java tests to C++
Change-Id: I5d698303a901ee103fdd4ffdea34809142afa0e5
Reviewed-on: https://gerrit.libreoffice.org/48463
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-01-25 18:18:18 +01:00
Miklos Vajna 3a32caa141 test: avoid 'using namespace' declarations in a header
Change-Id: I8dc06129360124fcaa52bc13bb9d134918b84c17
2017-11-07 10:47:43 +01:00
Miklos Vajna 5946eedfb7 test: clang-format recently added xsheet tests
Jens says he was unhappy with the 80 cols limit, so clang-format was
explicitly avoided for these new files, but now that the both the config
and TEMPLATE.SOURCECODE.HEADER says 100, it's fine to reformat these to
enforce consistency from now on.

Change-Id: Ia6f0a65920ad2c9d7b0834a0712356568c39624e
2017-11-07 10:47:35 +01:00
Jens Carl afc5d7aedf Create CppUnit::assertion_traits helper file
Place the CppUnit:assertion_traits for ::table::CellAddress and
::table::CellRangeAddress into a file, so that they can be used/shared
from several locations. Avoid copy/paste action.

Change-Id: Ie2358ea1ac6925eef05644bea03a2ae526cd7fc6
Reviewed-on: https://gerrit.libreoffice.org/44291
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jens Carl <j.carl43@gmx.de>
2017-11-04 06:57:57 +01:00