diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2018-02-27 16:56:44 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2018-03-13 00:23:40 +0100 |
commit | 4f29ce6a67b81e7f28e1c86d60ff15ec1d180661 (patch) | |
tree | 1b6095f1c1805fe084ac106c52d3748f9fce8783 /sc/qa/unit/subsequent_filters-test.cxx | |
parent | a1a60f79c6ffccfd49034a6251031e1f9a0c63a0 (diff) |
tdf#114552 Improve image scaling in Calc
When anchor type "To cell (resize with cell)" is selected, we do now::
1. Consider aspect ratio when scaling graphic objects with cell
This only works when the image fits into one cell.
When the image is over multiple cells, we need to respect the end
anchor, so we need to keep the existing behavior (no aspect ratio considered).
2. Always scale images if anchor type is "resize with cell"
Previously it would only scale if the image is larger than the cell.
Now we always enlarge the image if the cell is enlarged, and shrink
the image if the cell is shrinked _and_ the image no longer fits
into the shrinked cell
Change-Id: Ib2a24819d0058bcebce73ea97bbf70a963d74584
Reviewed-on: https://gerrit.libreoffice.org/50451
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc/qa/unit/subsequent_filters-test.cxx')
-rw-r--r-- | sc/qa/unit/subsequent_filters-test.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index 3ec2982ada04..2e876434ce49 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -1761,7 +1761,7 @@ void ScFiltersTest::testCellAnchoredShapesODS() CPPUNIT_ASSERT_MESSAGE("Failed to get drawing object.", pObj); ScDrawObjData* pData = ScDrawLayer::GetObjData(pObj); CPPUNIT_ASSERT_MESSAGE("Failed to retrieve user data for this object.", pData); - CPPUNIT_ASSERT_MESSAGE("Bounding rectangle should have been calculated upon import.", !pData->maLastRect.IsEmpty()); + CPPUNIT_ASSERT_MESSAGE("Bounding rectangle should have been calculated upon import.", !pData->getShapeRect().IsEmpty()); } xDocSh->DoClose(); |