summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorpanoskorovesis <panoskorovesis@outlook.com>2021-08-05 10:49:29 +0300
committerTomaž Vajngerl <quikee@gmail.com>2021-08-12 12:53:39 +0200
commita129b138043ee167f1043725f5d918bb8535a292 (patch)
treeda955e6f4030ae538584f03fd62d65ecaedd78d7 /vcl
parent7ce78320b7bcf60ec2a2d661f3d91ab5ee89622e (diff)
Add Handler for TextLineColor Write
The handler separates MetaTextLineColorAction::Write from metaact.hxx Remove default case as it's not needed anymore. Write implementation is now in SvmWriter.hxx' Change-Id: If0c23649d9fef49e07c558c8f7fddb028d5da9ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120372 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/filter/svm/SvmWriter.cxx20
1 files changed, 15 insertions, 5 deletions
diff --git a/vcl/source/filter/svm/SvmWriter.cxx b/vcl/source/filter/svm/SvmWriter.cxx
index 9d3fbb26a494..bb1901f19dc2 100644
--- a/vcl/source/filter/svm/SvmWriter.cxx
+++ b/vcl/source/filter/svm/SvmWriter.cxx
@@ -347,6 +347,13 @@ void SvmWriter::MetaActionHandler(MetaAction* pAction, ImplMetaWriteData* pData)
}
break;
+ case MetaActionType::TEXTLINECOLOR:
+ {
+ auto* pMetaAction = static_cast<MetaTextLineColorAction*>(pAction);
+ TextLineColorHandler(pMetaAction);
+ }
+ break;
+
case MetaActionType::OVERLINECOLOR:
{
auto* pMetaAction = static_cast<MetaOverlineColorAction*>(pAction);
@@ -444,11 +451,6 @@ void SvmWriter::MetaActionHandler(MetaAction* pAction, ImplMetaWriteData* pData)
TextLanguageHandler(pMetaAction);
}
break;
-
- /* default case prevents test failure and will be
- removed once all the handlers are completed */
- default:
- pAction->Write(mrStream, pData);
}
}
@@ -923,6 +925,14 @@ void SvmWriter::TextFillColorHandler(MetaTextFillColorAction* pAction)
mrStream.WriteBool(pAction->IsSetting());
}
+void SvmWriter::TextLineColorHandler(MetaTextLineColorAction* pAction)
+{
+ mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType()));
+ VersionCompatWrite aCompat(mrStream, 1);
+ WriteColor(pAction->GetColor());
+ mrStream.WriteBool(pAction->IsSetting());
+}
+
void SvmWriter::OverlineColorHandler(MetaOverlineColorAction* pAction)
{
mrStream.WriteUInt16(static_cast<sal_uInt16>(pAction->GetType()));