sw/source/core/layout/paintfrm.cxx | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-)
New commits: commit 77eec4c6c77f64eb257e0e7a5ff721f23886b883 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Sat Nov 30 15:06:04 2019 +0100 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Sat Nov 30 15:47:59 2019 +0100 Replace uses of boost::optional<>::get_ptr with free function ...in preparation of replacing boost::optional with std::optional, which doesn't have get_ptr Change-Id: I432d6deb7cf9b892b6126245882c74ab680f2984 Reviewed-on: https://gerrit.libreoffice.org/84119 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index a7508171ecad..21c64087a460 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -4764,6 +4764,14 @@ namespace drawinglayer } // end of namespace primitive2d } // end of namespace drawinglayer +namespace { + +editeng::SvxBorderLine const * get_ptr(boost::optional<editeng::SvxBorderLine> const & opt) { + return opt ? &*opt : nullptr; +} + +} + void PaintCharacterBorder( const SwFont& rFont, const SwRect& rPaintArea, @@ -4818,17 +4826,17 @@ void PaintCharacterBorder( aAlignedRect.Width(), aAlignedRect.Height(), aAlignedRect.Left(), aAlignedRect.Top())); const svx::frame::Style aStyleTop( - bTop ? rFont.GetAbsTopBorder(bVerticalLayout, bVerticalLayoutLRBT).get_ptr() : nullptr, + bTop ? get_ptr(rFont.GetAbsTopBorder(bVerticalLayout, bVerticalLayoutLRBT)) : nullptr, 1.0); const svx::frame::Style aStyleRight( - bRight ? rFont.GetAbsRightBorder(bVerticalLayout, bVerticalLayoutLRBT).get_ptr() : nullptr, + bRight ? get_ptr(rFont.GetAbsRightBorder(bVerticalLayout, bVerticalLayoutLRBT)) : nullptr, 1.0); const svx::frame::Style aStyleBottom( - bBottom ? rFont.GetAbsBottomBorder(bVerticalLayout, bVerticalLayoutLRBT).get_ptr() + bBottom ? get_ptr(rFont.GetAbsBottomBorder(bVerticalLayout, bVerticalLayoutLRBT)) : nullptr, 1.0); const svx::frame::Style aStyleLeft( - bLeft ? rFont.GetAbsLeftBorder(bVerticalLayout, bVerticalLayoutLRBT).get_ptr() : nullptr, + bLeft ? get_ptr(rFont.GetAbsLeftBorder(bVerticalLayout, bVerticalLayoutLRBT)) : nullptr, 1.0); drawinglayer::primitive2d::Primitive2DContainer aBorderLineTarget; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits