[Libreoffice-commits] core.git: include/vcl vcl/source
panoskorovesis (via logerrit)
logerrit at kemper.freedesktop.org
Tue Aug 10 07:50:55 UTC 2021
include/vcl/filter/SvmWriter.hxx | 1 +
vcl/source/filter/svm/SvmWriter.cxx | 22 ++++++++++++++++++++++
2 files changed, 23 insertions(+)
New commits:
commit d2d22b506c14176b01e09899bcbb1975f292a1c7
Author: panoskorovesis <panoskorovesis at outlook.com>
AuthorDate: Wed Aug 4 16:18:06 2021 +0300
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Tue Aug 10 09:50:18 2021 +0200
Add Handler for BmpExScalePart Write
The handler separates MetaBmpExScalePartAction::Write from metaact.hxx
Write implementation is now in SvmWriter.hxx
Change-Id: I5afead72ae5c9c96c78ca915617bd2138458aaed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120158
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
diff --git a/include/vcl/filter/SvmWriter.hxx b/include/vcl/filter/SvmWriter.hxx
index 9bf3a3f50bc6..c57002e0a5d7 100644
--- a/include/vcl/filter/SvmWriter.hxx
+++ b/include/vcl/filter/SvmWriter.hxx
@@ -61,6 +61,7 @@ public:
void BmpScalePartHandler(MetaBmpScalePartAction* pAction);
void BmpExHandler(MetaBmpExAction* pAction);
void BmpExScaleHandler(MetaBmpExScaleAction* pAction);
+ void BmpExScalePartHandler(MetaBmpExScalePartAction* pAction);
void OverlineColorHandler(MetaOverlineColorAction* pAction);
void TextAlignHandler(MetaTextAlignAction* pAction);
void MapModeHandler(MetaMapModeAction* pAction);
diff --git a/vcl/source/filter/svm/SvmWriter.cxx b/vcl/source/filter/svm/SvmWriter.cxx
index d0e72957ff0a..bd4557c0c653 100644
--- a/vcl/source/filter/svm/SvmWriter.cxx
+++ b/vcl/source/filter/svm/SvmWriter.cxx
@@ -235,6 +235,13 @@ void SvmWriter::MetaActionHandler(MetaAction* pAction, ImplMetaWriteData* pData)
}
break;
+ case MetaActionType::BMPEXSCALEPART:
+ {
+ auto* pMetaAction = static_cast<MetaBmpExScalePartAction*>(pAction);
+ BmpExScalePartHandler(pMetaAction);
+ }
+ break;
+
case MetaActionType::OVERLINECOLOR:
{
auto* pMetaAction = static_cast<MetaOverlineColorAction*>(pAction);
@@ -650,6 +657,21 @@ void SvmWriter::BmpExScaleHandler(MetaBmpExScaleAction* pAction)
}
}
+void SvmWriter::BmpExScalePartHandler(MetaBmpExScalePartAction* pAction)
+{
+ if (!pAction->GetBitmapEx().GetBitmap().IsEmpty())
+ {
+ mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType()));
+ VersionCompatWrite aCompat(mrStream, 1);
+ WriteDIBBitmapEx(pAction->GetBitmapEx(), mrStream);
+ TypeSerializer aSerializer(mrStream);
+ aSerializer.writePoint(pAction->GetDestPoint());
+ aSerializer.writeSize(pAction->GetDestSize());
+ aSerializer.writePoint(pAction->GetSrcPoint());
+ aSerializer.writeSize(pAction->GetSrcSize());
+ }
+}
+
void SvmWriter::OverlineColorHandler(MetaOverlineColorAction* pAction)
{
mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType()));
More information about the Libreoffice-commits
mailing list