For one, this should make it more obvious what the magic constant USHRT_MAX
meant in the context of SwXMLTableContext::m_nWidth (and shows that it should
arguably have value SAL_MAX_UINT16, not USHRT_MAX).
For another, at least some Android builds are stuck with a broken C library that
defines USHRT_MAX to be of type unsigned int instead of signed int, which caused
various -Wsign-compare that are removed as a side effect.
Change-Id: If2676954f4e7159b0c0d3656b8bc0186f0771e10
Reviewed-on: https://gerrit.libreoffice.org/48661
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
...even if GetColumnCount()*MINLAY > USHRT_MAX could ever be true, in which case
it will now cap m_nWidth == USHRT_MAX.
(The original code didn't have the cast of GetColumnCount() to sal_Int32, then
7e7c8a51f0 "#80552#: bug fixes for progress" added
a---presumably misplaced---C-style cast to the check (but not the assignment),
presumably to silence some signed-vs-unsigned warning.)
Change-Id: I2403ee3c5e8fe35ae2a7a7b7da9081a7fb7b59b1
Reviewed-on: https://gerrit.libreoffice.org/48654
Tested-by: Stephan Bergmann <sbergman@redhat.com>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
For creating the needed BorderPrimitives for TableCells for the
Tables used in Draw/Impress, adapt the ViewContactOfTableObj doing
this to use svx::frame::Array tooling now. This will correct the
error for not taking the neighboured connects for merged cells
into account and unify one more space to the same tooling.
Change-Id: I2e6f732985e9b963359f156628bd29ddfec1a80c
In Draw/Impress the indices for accessing the correct
neighbouring TableStyles were wrong and thus created wrong
visualizations, corrected that.
Change-Id: Iebc5f294adb62fa4c6358e2f8c27d29cc3163fbc
Similar to CalcBorders in Writer the overlap regions for
FrameBorders have to be taken into account when repainting the
CellBordes of WriterTables
Change-Id: I488ba158e1de579bfb06b9c8353adaa2cac706c6
For Cells with DoubleLine the connections to perpendicular
DoubleLine-Styles may have to be displayed in a Cell which
is 'around' the orig cell in a Cell-Border of one. To represent
that and to avoid repaint errors when scrolling in, the preparation
of Primitives has to take accordingly more neighbour cells into
account. Tested this change with the usages in Calc, UI (Dialogs)
and Calc exports Print/PrintPreview/PDF. This does not affect
Tables in Writer and/or Draw/Impress.
Change-Id: I3bcc68cdf7b4fc1825a87a9773892c359421024e
CellBorders can be rotated (including their Text) and need special
visualization that is based on an own sheared/rotated coordinate
system. Currently only possible for single cells (not merged ones)
and needs to handle all borders (also bottom-right directly in the
rotated cell, not in the neighboured ones to have the geometry,
plus avoiding these in the non-rotated neighbour cells.
Also corrected adding CellRotation data to svx::frame::Array
in calc using SetCellRotations() which now gets called in the
ScOutputData constructor to ensure it gets called in all places
where it is used.
Change-Id: I47bdfc29ba5ca76bbc07d98cb64733f867b1ee20
For MergedCells there was an effect that the BorderLines
were painted too far in PrintPreview/Print/PDF visualization,
found reason and changed. Checked (hopefully) all usages,
looks good.
Change-Id: I0acf8dcb20548a98533f3ab317ac72c0d0f0a947
In Print/PDF/PrintPreview border lines were missing, this
happened for merged cells. It has to do with access to the
involved Styles and/or 'Clip' set (to avoid creating everything).
Thus a 'mixed' usage of cell and merged-cell stuff was needed.
As it turns out support for this is already there, need to use
it.
Change-Id: Ic16085b97eef5c79a4501279432f43491bca350e
To fix some errors, need to change svx::frame::Array conversion
to Primitives, especially regarding handling of merged cells.
These make problems in the currtent form where the full extended
merged cell tries to be converted. This is bad for cropped stuff
and also wrong for double-line stuff attaching to a merged cell.
The solution is to handle cells single and merge created primitives
which is more expensive but will work. This will involve special
handling for X-Ed (crossed) and 'roated' Cells. Also need to be
very careful since all this is used in the meantime for all
visualizations of Tables in multiple apps/situations.
Change-Id: If0652a3ba97a6f27dd5d782ea22b1514303f3710
This patch fixes the invalid ODF generated in impress.
In tables now the attribute is shown as table:name="default"
instead of "text:style-name".
For strict XML version we only set table:name="default"
For Extended/Compatibility XML we set both text:style-name
and table:name
Change-Id: I894fd31f5f0eed3f77b216b3114b5da53acf1f9f
Reviewed-on: https://gerrit.libreoffice.org/48373
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>