From 7334034ae93b49fc93b5859a3c047a319d138282 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 29 Apr 2019 15:50:02 +0200 Subject: drop Graphic::operator bool MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit which tends to interact in very weird ways with other code, for example it makes Graphic appear to have an operator< Change-Id: I335fe8f3644b710bc61291e625cbca7334a37716 Reviewed-on: https://gerrit.libreoffice.org/71532 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl --- editeng/source/items/frmitems.cxx | 6 +++--- editeng/source/uno/unonrule.cxx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'editeng/source') diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index ac78520bdaa8..0d49c25681b6 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -2992,7 +2992,7 @@ bool SvxBrushItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) aGraphic = Graphic(xGraphic); } - if (aGraphic) + if (!aGraphic.IsNone()) { maStrLink.clear(); @@ -3001,11 +3001,11 @@ bool SvxBrushItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) ApplyGraphicTransparency_Impl(); xOldGrfObj.reset(); - if (aGraphic && eGraphicPos == GPOS_NONE) + if (!aGraphic.IsNone() && eGraphicPos == GPOS_NONE) { eGraphicPos = GPOS_MM; } - else if (!aGraphic) + else if (aGraphic.IsNone()) { eGraphicPos = GPOS_NONE; } diff --git a/editeng/source/uno/unonrule.cxx b/editeng/source/uno/unonrule.cxx index 4ed69af5c922..e3a3d5111706 100644 --- a/editeng/source/uno/unonrule.cxx +++ b/editeng/source/uno/unonrule.cxx @@ -361,7 +361,7 @@ void SvxUnoNumberingRules::setNumberingRuleByIndex(const Sequence>= aURL) { Graphic aGraphic = vcl::graphic::loadFromURL(aURL); - if (aGraphic) + if (!aGraphic.IsNone()) { SvxBrushItem aBrushItem(aGraphic, GPOS_AREA, SID_ATTR_BRUSH); aFmt.SetGraphicBrush(&aBrushItem); -- cgit v1.2.3