[Libreoffice] Duplicate code: replace mbBreak with hasLineBreak?
kyoshida at novell.com
Mon May 16 07:43:08 PDT 2011
On Mon, 2011-05-16 at 09:37 +0200, Chr. Rossmanith wrote:
> I had a closer look at output2.cxx.
> (1) ScOutputData::DrawEditTopBottom tests "if (rParam.hasLineBreak())"
> (2) ScOutputData::DrawEditBottomTop tests "if (rParam.mbBreak)"
> bool ScOutputData::DrawEditParam::hasLineBreak() const
> return (mbBreak || (meOrient == SVX_ORIENTATION_STACKED) ||
> so (2) is more restrictive than (1). Would it be valid to have
> rParam.hasLineBreak() in (2) as well?
My answer is I don't know. This part of the code is very fragile at the
moment and I don't want anybody changing anything without extensive
run-time testing of all sort of cell contents. I've experienced painful
debugging where changing small thing like that resulted in very weird
breakage which took me a day to debug. So, I'm not keen on changing
anything in this area without understanding the risk involved.
I'm working on cleaning up this area to make debugging less painful
Kohei Yoshida, LibreOffice hacker, Calc
<kyoshida at novell.com>
More information about the LibreOffice