diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2019-02-12 17:50:59 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-02-13 09:02:37 +0100 |
commit | cb9f393a5293c0f39d76b703154f8392c45f8047 (patch) | |
tree | c772c9afd86d11aefabcb2e36b9fe62bbe8cd65e /sw/source/core/layout/paintfrm.cxx | |
parent | 16780939141031632d04603a148859dc8a1ef3e1 (diff) |
sw btlr writing mode layout: implement unmapping of this direction
Fix various cases which trigger this warning:
warn:legacy.osl:10975:10975:sw/source/core/txtnode/swfont.cxx:427: Unsupported direction
Which means that we tried to work with a VCL direction of 900, without
passing around the btlr flag accordingly.
Change-Id: I96374fc949f60e8324c5a84de48b710b6461bafb
Reviewed-on: https://gerrit.libreoffice.org/67746
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw/source/core/layout/paintfrm.cxx')
-rw-r--r-- | sw/source/core/layout/paintfrm.cxx | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 9db67c8b292d..28244dab159f 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -4694,6 +4694,7 @@ void PaintCharacterBorder( const SwFont& rFont, const SwRect& rPaintArea, const bool bVerticalLayout, + const bool bVerticalLayoutLRBT, const bool bJoinWithPrev, const bool bJoinWithNext ) { @@ -4705,7 +4706,7 @@ void PaintCharacterBorder( bool bLeft = true; bool bRight = true; - switch( rFont.GetOrientation(bVerticalLayout) ) + switch (rFont.GetOrientation(bVerticalLayout, bVerticalLayoutLRBT)) { case 0 : bLeft = !bJoinWithPrev; @@ -4729,7 +4730,7 @@ void PaintCharacterBorder( { const SvxShadowItem aShadow( 0, &rFont.GetShadowColor(), rFont.GetShadowWidth(), - rFont.GetAbsShadowLocation(bVerticalLayout)); + rFont.GetAbsShadowLocation(bVerticalLayout, bVerticalLayoutLRBT)); if( aShadow.GetLocation() != SvxShadowLocation::NONE ) { @@ -4742,10 +4743,19 @@ void PaintCharacterBorder( basegfx::utils::createScaleTranslateB2DHomMatrix( aAlignedRect.Width(), aAlignedRect.Height(), aAlignedRect.Left(), aAlignedRect.Top())); - const svx::frame::Style aStyleTop(bTop ? rFont.GetAbsTopBorder(bVerticalLayout).get_ptr() : nullptr, 1.0); - const svx::frame::Style aStyleRight(bRight ? rFont.GetAbsRightBorder(bVerticalLayout).get_ptr() : nullptr, 1.0); - const svx::frame::Style aStyleBottom(bBottom ? rFont.GetAbsBottomBorder(bVerticalLayout).get_ptr() : nullptr, 1.0); - const svx::frame::Style aStyleLeft(bLeft ? rFont.GetAbsLeftBorder(bVerticalLayout).get_ptr() : nullptr, 1.0); + const svx::frame::Style aStyleTop( + bTop ? rFont.GetAbsTopBorder(bVerticalLayout, bVerticalLayoutLRBT).get_ptr() : nullptr, + 1.0); + const svx::frame::Style aStyleRight( + bRight ? rFont.GetAbsRightBorder(bVerticalLayout, bVerticalLayoutLRBT).get_ptr() : nullptr, + 1.0); + const svx::frame::Style aStyleBottom( + bBottom ? rFont.GetAbsBottomBorder(bVerticalLayout, bVerticalLayoutLRBT).get_ptr() + : nullptr, + 1.0); + const svx::frame::Style aStyleLeft( + bLeft ? rFont.GetAbsLeftBorder(bVerticalLayout, bVerticalLayoutLRBT).get_ptr() : nullptr, + 1.0); drawinglayer::primitive2d::Primitive2DContainer aBorderLineTarget; aBorderLineTarget.append( |