diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2019-10-21 17:41:52 +0200 |
---|---|---|
committer | Xisco Faulí <xiscofauli@libreoffice.org> | 2019-10-24 11:30:38 +0200 |
commit | 83baaec3a087f83d0ad3371d55671d9496771586 (patch) | |
tree | bb83645345f3aa9748303659ed8a9784273c0f7f /sw | |
parent | 6a45c9755293f0969b4c2081d6d602bac9986d16 (diff) |
tdf#115967: Revert "sw: Use primitive renderer for graphics"
This reverts commit 302af8c2da58719844d22483b65a9fe5b3674684
I would like to revert it until a better solution is proposed
due to the number of duplicates already reported
After the commit, Libo exports LTR formulas in RTL documents to PDF
as RTL formulas
it also introduced other problems like tdf#112513 and tdf#117560
Unittest added
Change-Id: I097fb5801eb728bd258ae96bd981c6725e7aa06a
Reviewed-on: https://gerrit.libreoffice.org/81262
Tested-by: Jenkins
Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/doc/notxtfrm.cxx | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index 45c32b51a1b3..a8ddd5849078 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -1248,31 +1248,17 @@ void SwNoTextFrame::PaintPicture( vcl::RenderContext* pOut, const SwRect &rGrfAr // SwOLENode does not have a known GraphicObject, need to // work with Graphic instead const Graphic* pGraphic = pOLENd->GetGraphic(); + const Point aPosition(aAlignedGrfArea.Pos()); + const Size aSize(aAlignedGrfArea.SSize()); if ( pGraphic && pGraphic->GetType() != GraphicType::NONE ) { - GraphicObject aTempGraphicObject(*pGraphic); - GraphicAttr aGrfAttr; - const basegfx::B2DHomMatrix aGraphicTransform( - basegfx::utils::createScaleTranslateB2DHomMatrix( - aAlignedGrfArea.Width(), aAlignedGrfArea.Height(), - aAlignedGrfArea.Left(), aAlignedGrfArea.Top())); - - paintGraphicUsingPrimitivesHelper( - *pOut, - aTempGraphicObject, - aGrfAttr, - aGraphicTransform, - nullptr == pOLENd->GetFlyFormat() ? OUString() : pOLENd->GetFlyFormat()->GetName(), - rNoTNd.GetTitle(), - rNoTNd.GetDescription()); + pGraphic->Draw( pOut, aPosition, aSize ); // shade the representation if the object is activated outplace uno::Reference < embed::XEmbeddedObject > xObj = pOLENd->GetOLEObj().GetOleRef(); if ( xObj.is() && xObj->getCurrentState() == embed::EmbedStates::ACTIVE ) { - const Point aPosition(aAlignedGrfArea.Pos()); - const Size aSize(aAlignedGrfArea.SSize()); ::svt::EmbeddedObjectRef::DrawShading( tools::Rectangle( @@ -1283,9 +1269,6 @@ void SwNoTextFrame::PaintPicture( vcl::RenderContext* pOut, const SwRect &rGrfAr } else { - const Point aPosition(aAlignedGrfArea.Pos()); - const Size aSize(aAlignedGrfArea.SSize()); - ::svt::EmbeddedObjectRef::DrawPaintReplacement( tools::Rectangle(aPosition, aSize), pOLENd->GetOLEObj().GetCurrentPersistName(), |