diff options
author | Caolán McNamara <caolanm@redhat.com> | 2023-03-03 09:22:39 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2023-03-03 14:52:00 +0000 |
commit | f87ea14edfe3053e3091731deb90fc87c17ddad4 (patch) | |
tree | 2e5fbb48aa21ab9b4a107028678f3be4aa4b8dd9 /svx | |
parent | df182c7e4235513916204a4dc4aec6ec6e4c746b (diff) |
This reverts commit d1046e7c3f66e5f3384ee1ef534ef28346702fc6.
and all its associated follow up fixes. Doesn't actually have any effect
on the issue which isolated it as a source of the problem which has
mutated in the meantime
Revert "tdf#126184 Use max paper dimensions to calculate clip region"
This reverts commit 1dccd6814f1fe7a06f3168d01d18d347269cd3c1.
and:
Revert "Resolves: tdf#101187 colossal page width wraps around if doubled"
This reverts commit 2fd88ab1cbb4690a770ca2ca5d66157ec4906a2e.
and:
Revert "Resolves: tdf#98366 paste document has 10x10 sized SdPages..."
This reverts commit 93efd7ebbad293d3729b8ea4b9726aff498f607f.
and:
Revert "Resolves: tdf#97276 don't clip out line if the underlying page size is unknown"
This reverts commit ad99c633908f7c70d06812ebfb4e0696666f0158.
Change-Id: I22d3e1592c172f137fcec8085ff3240428f0d248
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148170
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/sdr/contact/viewcontactofsdrpathobj.cxx | 43 |
1 files changed, 1 insertions, 42 deletions
diff --git a/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx b/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx index e2644489d6d1..0b546cd34d5a 100644 --- a/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx @@ -19,12 +19,9 @@ #include <sdr/contact/viewcontactofsdrpathobj.hxx> -#include <svtools/optionsdrawinglayer.hxx> #include <svx/svdopath.hxx> -#include <svx/svdpage.hxx> #include <sdr/primitive2d/sdrattributecreator.hxx> #include <basegfx/polygon/b2dpolypolygontools.hxx> -#include <basegfx/polygon/b2dpolygonclipper.hxx> #include <sdr/primitive2d/sdrpathprimitive2d.hxx> #include <basegfx/matrix/b2dhommatrixtools.hxx> #include <basegfx/polygon/b2dpolygontools.hxx> @@ -84,51 +81,13 @@ namespace sdr::contact // prepare object transformation and unit polygon (direct model data) basegfx::B2DHomMatrix aObjectMatrix; basegfx::B2DPolyPolygon aUnitDefinitionPolyPolygon; - bool bIsLine( + const bool bIsLine( !aUnitPolyPolygon.areControlPointsUsed() && bPolyCountIsOne && 2 == aUnitPolyPolygon.getB2DPolygon(0).count()); if(bIsLine) { - //tdf#63955 if we have an extremely long line then clip it to a - //very generous range of -1 page width/height vs +1 page - //width/height to avoid oom and massive churn generating a huge - //polygon chain to cover the length in applyLineDashing if this - //line is dashed - const SdrPage* pPage(GetPathObj().getSdrPageFromSdrObject()); - sal_Int32 nPageWidth = pPage ? pPage->GetWidth() : 0; - sal_Int32 nPageHeight = pPage ? pPage->GetHeight() : 0; - - //But, see tdf#101187, only do this if our generous clip region - //would not over flow into a tiny clip region - if (nPageWidth < SAL_MAX_INT32/2 && nPageHeight < SAL_MAX_INT32/2 && !utl::ConfigManager::IsFuzzing()) - { - //But, see tdf#97276, tdf#126184 and tdf#98366. Don't clip too much if the - //underlying page dimension is unknown or a paste document - //where the page sizes use the odd default of 10x10 - const sal_Int32 nMaxPaperWidth = SvtOptionsDrawinglayer::GetMaximumPaperWidth() * 1000; - const sal_Int32 nMaxPaperHeight = SvtOptionsDrawinglayer::GetMaximumPaperHeight() * 1000; - nPageWidth = std::max<sal_Int32>(nPageWidth, nMaxPaperWidth); - nPageHeight = std::max<sal_Int32>(nPageHeight, nMaxPaperHeight); - basegfx::B2DRange aClipRange(-nPageWidth, -nPageHeight, - nPageWidth*2, nPageHeight*2); - - aUnitPolyPolygon = basegfx::utils::clipPolyPolygonOnRange(aUnitPolyPolygon, - aClipRange, true, true); - bPolyCountIsOne = ensureGeometry(aUnitPolyPolygon); - - // re-check that we have't been clipped out to oblivion - bIsLine = - !aUnitPolyPolygon.areControlPointsUsed() - && bPolyCountIsOne - && 2 == aUnitPolyPolygon.getB2DPolygon(0).count(); - } - } - - if(bIsLine) - { - // special handling for single line mode (2 points) const basegfx::B2DPolygon aSubPolygon(aUnitPolyPolygon.getB2DPolygon(0)); const basegfx::B2DPoint aStart(aSubPolygon.getB2DPoint(0)); |