summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/vcl/filter/SvmReader.hxx1
-rw-r--r--include/vcl/metaact.hxx5
-rw-r--r--vcl/source/filter/svm/SvmReader.cxx28
3 files changed, 33 insertions, 1 deletions
diff --git a/include/vcl/filter/SvmReader.hxx b/include/vcl/filter/SvmReader.hxx
index 853a52a8ae3d..9ce071448dca 100644
--- a/include/vcl/filter/SvmReader.hxx
+++ b/include/vcl/filter/SvmReader.hxx
@@ -61,6 +61,7 @@ public:
rtl::Reference<MetaAction> BmpScalePartHandler();
rtl::Reference<MetaAction> BmpExHandler();
rtl::Reference<MetaAction> BmpExScaleHandler();
+ rtl::Reference<MetaAction> BmpExScalePartHandler();
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx
index b71c59b5144f..c59257433daa 100644
--- a/include/vcl/metaact.hxx
+++ b/include/vcl/metaact.hxx
@@ -909,6 +909,11 @@ public:
const Size& GetDestSize() const { return maDstSz; }
const Point& GetSrcPoint() const { return maSrcPt; }
const Size& GetSrcSize() const { return maSrcSz; }
+ void SetBitmapEx(BitmapEx& rBmpEx) { maBmpEx = rBmpEx; }
+ void SetDestPoint(Point& rDstPt) { maDstPt = rDstPt; }
+ void SetDestSize(Size& rDstSz) { maDstSz = rDstSz; }
+ void SetSrcPoint(Point& rSrcPt) { maSrcPt = rSrcPt; }
+ void SetSrcSize(Size& rSrcSz) { maSrcSz = rSrcSz; }
bool IsTransparent() const override { return GetBitmapEx().IsAlpha(); }
};
diff --git a/vcl/source/filter/svm/SvmReader.cxx b/vcl/source/filter/svm/SvmReader.cxx
index 303e280e8680..679a6185c503 100644
--- a/vcl/source/filter/svm/SvmReader.cxx
+++ b/vcl/source/filter/svm/SvmReader.cxx
@@ -226,7 +226,7 @@ rtl::Reference<MetaAction> SvmReader::MetaActionHandler(ImplMetaReadData* pData)
return BmpExScaleHandler();
break;
case MetaActionType::BMPEXSCALEPART:
- pAction = new MetaBmpExScalePartAction;
+ return BmpExScalePartHandler();
break;
case MetaActionType::MASK:
pAction = new MetaMaskAction;
@@ -935,4 +935,30 @@ rtl::Reference<MetaAction> SvmReader::BmpExScaleHandler()
return pAction;
}
+
+rtl::Reference<MetaAction> SvmReader::BmpExScalePartHandler()
+{
+ auto pAction = new MetaBmpExScalePartAction();
+
+ VersionCompatRead aCompat(mrStream);
+ BitmapEx aBmpEx;
+ ReadDIBBitmapEx(aBmpEx, mrStream);
+ TypeSerializer aSerializer(mrStream);
+ Point aDstPoint;
+ aSerializer.readPoint(aDstPoint);
+ Size aDstSize;
+ aSerializer.readSize(aDstSize);
+ Point aSrcPoint;
+ aSerializer.readPoint(aSrcPoint);
+ Size aSrcSize;
+ aSerializer.readSize(aSrcSize);
+
+ pAction->SetBitmapEx(aBmpEx);
+ pAction->SetDestPoint(aDstPoint);
+ pAction->SetDestSize(aDstSize);
+ pAction->SetSrcPoint(aSrcPoint);
+ pAction->SetSrcSize(aSrcSize);
+
+ return pAction;
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */