[Libreoffice-commits] core.git: include/vcl vcl/source
panoskorovesis (via logerrit)
logerrit at kemper.freedesktop.org
Fri Aug 6 08:53:21 UTC 2021
include/vcl/filter/SvmWriter.hxx | 1 +
vcl/source/filter/svm/SvmWriter.cxx | 21 +++++++++++++++++++++
2 files changed, 22 insertions(+)
New commits:
commit 49a2a16c6186d372afd66b6630c813e33448b3e4
Author: panoskorovesis <panoskorovesis at outlook.com>
AuthorDate: Wed Aug 4 10:28:24 2021 +0300
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Fri Aug 6 10:52:45 2021 +0200
Add Handler for FloatTransparent Write
The handler separates MetaFloatTransparentAction::Write from
metaact.hxx. Read implementation is now in SvmWriter.hxx
Change-Id: I77755cc6c9337903808ade7b367d32d89f35a6a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119967
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
diff --git a/include/vcl/filter/SvmWriter.hxx b/include/vcl/filter/SvmWriter.hxx
index ff26899cfaa5..d1edf5fd27a3 100644
--- a/include/vcl/filter/SvmWriter.hxx
+++ b/include/vcl/filter/SvmWriter.hxx
@@ -64,4 +64,5 @@ public:
void PopHandler(MetaPopAction* pAction);
void RasterOpHandler(MetaRasterOpAction* pAction);
void TransparentHandler(MetaTransparentAction* pAction);
+ void FloatTransparentHandler(MetaFloatTransparentAction* pAction);
};
\ No newline at end of file
diff --git a/vcl/source/filter/svm/SvmWriter.cxx b/vcl/source/filter/svm/SvmWriter.cxx
index f6e4ad425e24..fb7b9c425495 100644
--- a/vcl/source/filter/svm/SvmWriter.cxx
+++ b/vcl/source/filter/svm/SvmWriter.cxx
@@ -255,6 +255,13 @@ void SvmWriter::MetaActionHandler(MetaAction* pAction, ImplMetaWriteData* pData)
}
break;
+ case MetaActionType::FLOATTRANSPARENT:
+ {
+ auto* pMetaAction = static_cast<MetaFloatTransparentAction*>(pAction);
+ FloatTransparentHandler(pMetaAction);
+ }
+ break;
+
/* default case prevents test failure and will be
removed once all the handlers are completed */
default:
@@ -580,4 +587,18 @@ void SvmWriter::TransparentHandler(MetaTransparentAction* pAction)
WritePolyPolygon(mrStream, aNoCurvePolyPolygon);
mrStream.WriteUInt16(pAction->GetTransparence());
}
+
+void SvmWriter::FloatTransparentHandler(MetaFloatTransparentAction* pAction)
+{
+ mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType()));
+ VersionCompatWrite aCompat(mrStream, 1);
+
+ SvmWriter aWriter(mrStream);
+ GDIMetaFile aMtf = pAction->GetGDIMetaFile();
+ aWriter.Write(aMtf);
+ TypeSerializer aSerializer(mrStream);
+ aSerializer.writePoint(pAction->GetPoint());
+ aSerializer.writeSize(pAction->GetSize());
+ aSerializer.writeGradient(pAction->GetGradient());
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list