summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorAttila Bakos (NISZ) <bakos.attilakaroly@nisz.hu>2021-04-01 17:08:58 +0200
committerLászló Németh <nemeth@numbertext.org>2021-04-19 10:44:28 +0200
commitcb965f2cf6d68c284ccbd8a9635abfdfcc0538ca (patch)
tree211234a77440fc026faedc6c4af41a5724557c8a /README.md
parent531993161d6fe8065436191666cc88d7c4c20749 (diff)
tdf#141550 tdf#141557 tdf#140975 sw: fix textbox crash
and regressions by refactoring SwTextBoxHelper. tdf#141550 was a DOCX import regression from commit ff321dd36554d25f0817903becf4598065e0a194 (tdf#140828 sw textbox: fix AS_CHAR regression), resulting bad horizontal position of the frame of the textbox. tdf#141557 was a regression resulting crash by changing text box anchoring "To Paragraph". tdf#140975 was an implementation error, resulting broken textbox by changing box anchoring to "As Character". In the SwTextBoxHelper class there were many repeating code parts for textbox positioning. Now these parts have been replaced with the calls of several new functions: 1) getShapeFormat() returns with the SwFrameFormat of the UNO XShape; 2) setWrapThrough() only sets the surround of the textframe (used in the code frequently); 3) changeAnchor() sets the anchor of the textframe according to the anchor of the shape; 4) doTextFramePositioning() sets the position of the textbox according to the shape (used in the code frequently); 5) isAnchorTypeDifferent() shows difference of the anchor types of the shape and the textframe. Also it handles the situation of anchoring "As Character"; 6) isTextBoxHasValidTextFrame() checks if the shape is a part of a textbox or not. Every function returns with true on success, otherwise gives information to the log. All of them can be called with ShapeFormat or UNO XShape. The goal of this to make the possibility to advance this class for further functions – rotation, grouped textboxes etc. – without code copying. Change-Id: I4441cab87931f161d0ace4983646d6d2a68a7321 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113463 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'README.md')
0 files changed, 0 insertions, 0 deletions