summaryrefslogtreecommitdiff
path: root/pyuno/source
diff options
context:
space:
mode:
Diffstat (limited to 'pyuno/source')
0 files changed, 0 insertions, 0 deletions
lback, and checks the return from the callback, to decide if it needs to continue iteration (in case when callback indicated that if doesn't need further data), and if it needs calling the callback for the rest of current portion's lines. This allows to have the code that calculates and iterates dimensions of lines in one central place, without the need to have duplicating logic in several places. One important exception is ImpEditEngine::Paint, which iterates without ImpEditEngine::IterateLineAreas, because it does many atomic paint operations in different points of iteration process, and implementing ImpEditEngine::IterateLineAreas to call callback in the required places would require increased complexity, which is left for a future change. To make that possible, ImpEditEngine::IterFlag should be extended to indicate additional requirements. Note that in fact, ImpEditEngine::Paint was taken as the model for implementation of ImpEditEngine::IterateLineAreas, with its detailed handling of all the vertical offsets like additional line spacing and interparagraph spacings that depend on context. The notable result of the centralization of the iteration code is slight change of heights reported by ImpEditEngine::CalcTextHeight. Previously it simply added all pre-calculated heights of portions, and not taking into account all the spacing handling that ImpEditEngine::Paint did, which was inconsistent (calculated height was different from painted height). Now ImpEditEngine::CalcTextHeight should provide more accurate results, which required small changes in the unit tests. Change-Id: I33cbb978deb974b314d36fda8674186a03991107 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116034 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> 2020-10-31Improve 'resize with cell' handlingRegina Henschel The patch contains a larger rework of RecalcPos and connected areas and covers several bugs. Essentials in short: Move initialization from RecalcPos to own method and use it in ScXMLImport::endDocument Do not change hidden objects, which includes not setting width or height to zero, and be consistent in using object visibility. Special handling of vertical flipped customshapes. Repair anchor on import of line and measure line. ODF conformance: Create logical rectangle from anchor instead using size. Details: tdf#137044 ScDrawLayer::SetPageSize is called several times while loading a document. It includes a call to ScDrawLayer::RecalcPos for all cell anchored objects. An object gets initialized with the first call. Problem was, that the row heights were not finished at that time and anchor cells and offsets were partly calculated based on default cell height. That results in wrong height and offset of objects. The solution separates initialization from RecalcPos and puts it into an own method ScDrawLayer::InitializeCellAnchoredObj. This is then called from ScXMLImport::endDocument when row height settings are finished. The call to RecalcPos is not totally removed from SetPageSize but only excluded while loading, because it is needed for size changes after the document is loaded. tdf#137576 partly For measure lines and ordinary lines, which were anchored 'To cell (resize with cell)', LibreOffice has written wrong end-cell info to file. So reopening results in wrong lines. The geometry of lines is based on two points. Fortunatelly the combination of position of the cell, which contains the shape, and start and end points gives correct absolute position of these points. Solution is, to regenerate the initial ScDrawObjData infos from these points and do not use the stored end-cell info. For a total fix implementation of NbcSetSnapRect for SdrMeasureObj is needed, which is not included here. tdf#137020 Cell anchored shapes are contained in a cell in file. To determine size and position of the shape a rectangle is used, so defined, that after applying transformation you get the desired shape. In case of custom shapes, a vertical flip is not contained in the transformation but it is an attribute inside the shape and flip is done at the shape center and will not change the rectangle. This rectangle determines start and end addresses and offsets in ScDrawObjData in rNoRotatedAnchor. The info is used directly in XML export. It is correctly build while loading the file. But in case of vertical flipped custom shapes the logical rectangle of the shape has an additional 180deg rotation. Changing that behavior is currently out of scope. Therefore special handling of vertical flipped custom shapes was added. tdf#99549 ODF specifies that in case of existence of end-cell attribute, size attributes have to be ignored. But LO has based the logical rectangle on size. In addition it has written zero width and height in case of hidden row and cols. Result was, that objects are 'lost' on opening although they still exists in the file. With the patch the object size is recalculated from anchor on opening. tdf#137355, tdf#137044, tdf#115655 The old solution has recalculated the snap rectangle based on current state of hidden row or column. That has produced shapes of zero width or height and loss of offset in case start or end cell of the shape was hidden. In running LO it was partly offset by using cached infos in ScDrawObjData. That failed in case of save and reload. Solution is, to only change visible shapes. It is enough to adapt the shape when it becomes visible. That is introduced in RecalcPos and SetCellAnchoredFromPosition. tdf#137216 Shapes anchored to cell were not hidden, if the column of its anchor was hidden, and undo of hiding an image in a cell by hiding its column didn't work. Reason was, that the shapes were not set to hidden in the shapes geometry. Solution is to copy a similar part from SetRowHidden to SetColHidden. without bugreport, but detected while debugging LO has used a cell reference with bHiddenAsZero as true in shape export. That has resulted in wrong offsets. Unittest changes: Test::testGraphicsInGroup() ScShapeTest::testCustomShapeCellAnchoredRotatedShape() Set expected values so, that they correspond to anchor in file. ScFiltersTest::testLegacyCellAnchoredRotatedShape() FIXME is solved now and the test is adaped to reflect that. XSheetAnnotationShapeSupplier::testGetAnnotationShape() Expected value is adapted to the fact, that now annotation shape gets its position after optimal row height is applied. Change-Id: Iffee996054ebf79e04044da5520f8d1a8a48b7c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104643 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de> 2019-12-19tdf#42949 Fix IWYU warnings in test/Gabor Kelemen Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Id1ee9b6d44315443d023bdfbf9ae8e5aa2158ab2 Reviewed-on: https://gerrit.libreoffice.org/85171 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> 2017-10-23loplugin:includeform: testStephan Bergmann Change-Id: Ibcbb5b002e8326c484547a825cb295d0f5158a3b 2017-07-08tdf#45904 Move Java XSheetAnnotationShapeSupplier test to C++Jens Carl Change-Id: I5a3d64fd255fb8fd1f1caba572bc00a5399a6519 Reviewed-on: https://gerrit.libreoffice.org/39550 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>