summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-04-29 15:50:02 +0200
committerTomaž Vajngerl <quikee@gmail.com>2019-04-30 04:57:21 +0200
commit7334034ae93b49fc93b5859a3c047a319d138282 (patch)
tree6216d895de7ede63bd946a0e75913a3b07e4c2b6 /editeng
parentc0ff8a24365456383900ed7958c8fb9ea68043e9 (diff)
drop Graphic::operator bool
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 <quikee@gmail.com>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/items/frmitems.cxx6
-rw-r--r--editeng/source/uno/unonrule.cxx2
2 files changed, 4 insertions, 4 deletions
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<beans::Propert
if (aVal >>= aURL)
{
Graphic aGraphic = vcl::graphic::loadFromURL(aURL);
- if (aGraphic)
+ if (!aGraphic.IsNone())
{
SvxBrushItem aBrushItem(aGraphic, GPOS_AREA, SID_ATTR_BRUSH);
aFmt.SetGraphicBrush(&aBrushItem);