diff options
-rw-r--r-- | include/vcl/filter/SvmWriter.hxx | 1 | ||||
-rw-r--r-- | vcl/source/filter/svm/SvmWriter.cxx | 22 |
2 files changed, 23 insertions, 0 deletions
diff --git a/include/vcl/filter/SvmWriter.hxx b/include/vcl/filter/SvmWriter.hxx index 2b6f8f9db997..d42780b828af 100644 --- a/include/vcl/filter/SvmWriter.hxx +++ b/include/vcl/filter/SvmWriter.hxx @@ -53,4 +53,5 @@ public: void PolyPolygonHandler(MetaPolyPolygonAction* pAction); void TextHandler(MetaTextAction* pAction, ImplMetaWriteData* pData); void TextArrayHandler(MetaTextArrayAction* pAction, ImplMetaWriteData* pData); + void StretchTextHandler(MetaStretchTextAction* pAction, ImplMetaWriteData* pData); };
\ No newline at end of file diff --git a/vcl/source/filter/svm/SvmWriter.cxx b/vcl/source/filter/svm/SvmWriter.cxx index e51ea797aceb..830013b357b4 100644 --- a/vcl/source/filter/svm/SvmWriter.cxx +++ b/vcl/source/filter/svm/SvmWriter.cxx @@ -176,6 +176,13 @@ void SvmWriter::MetaActionHandler(MetaAction* pAction, ImplMetaWriteData* pData) } break; + case MetaActionType::STRETCHTEXT: + { + auto* pMetaAction = static_cast<MetaStretchTextAction*>(pAction); + StretchTextHandler(pMetaAction, pData); + } + break; + /* default case prevents test failure and will be removed once all the handlers are completed */ default: @@ -383,4 +390,19 @@ void SvmWriter::TextArrayHandler(MetaTextArrayAction* pAction, ImplMetaWriteData write_uInt16_lenPrefixed_uInt16s_FromOUString(mrStream, pAction->GetText()); // version 2 } + +void SvmWriter::StretchTextHandler(MetaStretchTextAction* pAction, ImplMetaWriteData* pData) +{ + mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType())); + + VersionCompatWrite aCompat(mrStream, 2); + TypeSerializer aSerializer(mrStream); + aSerializer.writePoint(pAction->GetPoint()); + mrStream.WriteUniOrByteString(pAction->GetText(), pData->meActualCharSet); + mrStream.WriteUInt32(pAction->GetWidth()); + mrStream.WriteUInt16(pAction->GetIndex()); + mrStream.WriteUInt16(pAction->GetLen()); + + write_uInt16_lenPrefixed_uInt16s_FromOUString(mrStream, pAction->GetText()); // version 2 +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |