summaryrefslogtreecommitdiff
path: root/sw
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 /sw
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 'sw')
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport4.cxx2
-rw-r--r--sw/source/core/unocore/unoframe.cxx4
-rw-r--r--sw/source/core/unocore/unosett.cxx2
3 files changed, 4 insertions, 4 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
index 85ecb0cae056..3e90fe359865 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
@@ -154,7 +154,7 @@ DECLARE_OOXMLEXPORT_TEST(testTextBoxPictureFill, "textbox_picturefill.docx")
uno::Reference<graphic::XGraphic> xGraphic(xBitmap, uno::UNO_QUERY);
CPPUNIT_ASSERT(xGraphic.is());
Graphic aGraphic(xGraphic);
- CPPUNIT_ASSERT(aGraphic);
+ CPPUNIT_ASSERT(!aGraphic.IsNone());
CPPUNIT_ASSERT(aGraphic.GetSizeBytes() > 0L);
CPPUNIT_ASSERT_EQUAL(447L, aGraphic.GetSizePixel().Width());
CPPUNIT_ASSERT_EQUAL(528L, aGraphic.GetSizePixel().Height());
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index d5dfc5681fb6..99358c62f5ab 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -1617,7 +1617,7 @@ void SwXFrame::setPropertyValue(const OUString& rPropertyName, const ::uno::Any&
}
}
- if (aGraphic)
+ if (!aGraphic.IsNone())
{
const ::SwNodeIndex* pIdx = pFormat->GetContent().GetContentIdx();
if (pIdx)
@@ -1653,7 +1653,7 @@ void SwXFrame::setPropertyValue(const OUString& rPropertyName, const ::uno::Any&
}
}
- if (aGraphic)
+ if (!aGraphic.IsNone())
{
const ::SwFormatContent* pCnt = &pFormat->GetContent();
if ( pCnt->GetContentIdx() && pDoc->GetNodes()[ pCnt->GetContentIdx()->GetIndex() + 1 ] )
diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx
index 3a8e27b15774..ebaf24260187 100644
--- a/sw/source/core/unocore/unosett.cxx
+++ b/sw/source/core/unocore/unosett.cxx
@@ -2020,7 +2020,7 @@ void SwXNumberingRules::SetPropertiesToNumFormat(
}
Graphic aGraphic = vcl::graphic::loadFromURL(aURL);
- if (aGraphic)
+ if (!aGraphic.IsNone())
pSetBrush->SetGraphic(aGraphic);
}
else