Kaydet (Commit) d288ee63 authored tarafından Michael Stahl's avatar Michael Stahl

fdo#85858: svx: fix mouse dragging of table row separators in Writer

Add a work-around for Writer's usage of LONG_MAX to SvxColumnDescription:
on 64-bit platforms the LONG_MAX added in SwView::StateTabWin() for
SID_RULER_ROWS will overflow in vcl's LogicToPixel mapping and that
causes wrong positioning of the row highlight lines.

Probably Writer should use something other than LONG_MAX (no reason why
these types need to be bigger than 32-bit anyway) but that needs a
bigger cleanup.

(regression from 4c60f722)

Change-Id: I08147462356368d48959a85a85ef7dd8dcae0943
üst 19576d84
...@@ -670,8 +670,9 @@ SvxColumnDescription::SvxColumnDescription(long start, long end, long endMin, lo ...@@ -670,8 +670,9 @@ SvxColumnDescription::SvxColumnDescription(long start, long end, long endMin, lo
nStart (start), nStart (start),
nEnd (end), nEnd (end),
bVisible (bVis), bVisible (bVis),
nEndMin (endMin), // fdo#85858 hack: clamp these to smaller value to prevent overflow
nEndMax (endMax) nEndMin(std::min<long>(endMin, std::numeric_limits<unsigned short>::max())),
nEndMax(std::min<long>(endMax, std::numeric_limits<unsigned short>::max()))
{} {}
bool SvxColumnDescription::operator==(const SvxColumnDescription& rCmp) const bool SvxColumnDescription::operator==(const SvxColumnDescription& rCmp) const
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment