[Libreoffice-commits] core.git: drawinglayer/source include/svtools sc/source sd/source sw/source
Noel (via logerrit)
logerrit at kemper.freedesktop.org
Fri Jan 8 17:15:01 UTC 2021
drawinglayer/source/tools/emfphelperdata.cxx | 4 ++--
include/svtools/valueset.hxx | 2 +-
sc/source/ui/view/output.cxx | 4 ++--
sd/source/filter/pdf/sdpdffilter.cxx | 4 ++--
sw/source/filter/ww8/docxattributeoutput.cxx | 2 +-
5 files changed, 8 insertions(+), 8 deletions(-)
New commits:
commit 498f6f67979f2cb62ca53a42963dc85c6102f179
Author: Noel <noel.grandin at collabora.co.uk>
AuthorDate: Fri Jan 8 14:35:24 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Jan 8 18:14:17 2021 +0100
use more IsTransparent
Change-Id: Ice7904f2531dba98101c5f7a05d14702fa897053
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108971
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/drawinglayer/source/tools/emfphelperdata.cxx b/drawinglayer/source/tools/emfphelperdata.cxx
index fcd5697161a0..e8f0688d9cae 100644
--- a/drawinglayer/source/tools/emfphelperdata.cxx
+++ b/drawinglayer/source/tools/emfphelperdata.cxx
@@ -569,7 +569,7 @@ namespace emfplushelper
aStrokeAttribute = drawinglayer::attribute::StrokeAttribute(aPattern);
}
- if (pen->GetColor().GetTransparency() == 0)
+ if (!pen->GetColor().IsTransparent())
{
mrTargetHolders.Current().append(
std::make_unique<drawinglayer::primitive2d::PolyPolygonStrokePrimitive2D>(
@@ -691,7 +691,7 @@ namespace emfplushelper
if (color.GetTransparency() >= 255)
return;
- if (color.GetTransparency() == 0)
+ if (!color.IsTransparent())
{
// not transparent
mrTargetHolders.Current().append(
diff --git a/include/svtools/valueset.hxx b/include/svtools/valueset.hxx
index 7753546e1255..084008c79e2e 100644
--- a/include/svtools/valueset.hxx
+++ b/include/svtools/valueset.hxx
@@ -368,7 +368,7 @@ public:
}
bool IsColor() const
{
- return maColor.GetTransparency() == 0;
+ return !maColor.IsTransparent();
}
void SetExtraSpacing( sal_uInt16 nNewSpacing );
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index dc054dae86c0..7dc9cd1ded95 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -1639,7 +1639,7 @@ void ScOutputData::DrawRotatedFrame(vcl::RenderContext& rRenderContext)
// for DrawPolygon, without Pen one pixel is left out
// to the right and below...
- if (rColor.GetTransparency() == 0)
+ if (!rColor.IsTransparent())
rRenderContext.SetLineColor(rColor);
else
rRenderContext.SetLineColor();
@@ -1655,7 +1655,7 @@ void ScOutputData::DrawRotatedFrame(vcl::RenderContext& rRenderContext)
// for DrawPolygon, without Pen one pixel is left out
// to the right and below...
- if (pColor->GetTransparency() == 0)
+ if (!pColor->IsTransparent())
rRenderContext.SetLineColor(*pColor);
else
rRenderContext.SetLineColor();
diff --git a/sd/source/filter/pdf/sdpdffilter.cxx b/sd/source/filter/pdf/sdpdffilter.cxx
index 669dd0c0c769..8a413a7c706f 100644
--- a/sd/source/filter/pdf/sdpdffilter.cxx
+++ b/sd/source/filter/pdf/sdpdffilter.cxx
@@ -158,7 +158,7 @@ bool SdPdfFilter::Import()
}
else if (rPDFAnnotation.meSubType == vcl::pdf::PDFAnnotationSubType::Highlight)
{
- if (rCustomAnnotationMarker.maLineColor.GetTransparency() == 0)
+ if (!rCustomAnnotationMarker.maLineColor.IsTransparent())
rCustomAnnotationMarker.maLineColor.SetTransparency(0x90);
auto* pMarker = static_cast<vcl::pdf::PDFAnnotationMarkerHighlight*>(
rPDFAnnotation.mpMarker.get());
@@ -166,7 +166,7 @@ bool SdPdfFilter::Import()
rCustomAnnotationMarker.maPolygons.push_back(rPolygon);
rCustomAnnotationMarker.mnLineWidth = 1;
rCustomAnnotationMarker.maFillColor = rPDFAnnotation.maColor;
- if (rCustomAnnotationMarker.maFillColor.GetTransparency() == 0)
+ if (!rCustomAnnotationMarker.maFillColor.IsTransparent())
rCustomAnnotationMarker.maFillColor.SetTransparency(0x90);
}
else if (rPDFAnnotation.meSubType == vcl::pdf::PDFAnnotationSubType::Line)
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 0b20b982812e..e5b068a11676 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -7639,7 +7639,7 @@ void DocxAttributeOutput::CharUnderline( const SvxUnderlineItem& rUnderline )
}
Color aUnderlineColor = rUnderline.GetColor();
- bool bUnderlineHasColor = aUnderlineColor.GetTransparency() == 0;
+ bool bUnderlineHasColor = !aUnderlineColor.IsTransparent();
if (bUnderlineHasColor)
{
// Underline has a color
More information about the Libreoffice-commits
mailing list