summaryrefslogtreecommitdiff
path: root/include/vcl
diff options
context:
space:
mode:
authorArmin Le Grand (Allotropia) <armin.le.grand@me.com>2021-02-23 14:24:24 +0100
committerArmin Le Grand <Armin.Le.Grand@me.com>2021-02-23 20:42:34 +0100
commit3d33e4ce3987ea17e73a72e84f7f0df7af8101a6 (patch)
tree32f1f556d21d63c02a746813e2b2e993e2a3f764 /include/vcl
parented796e0fcd47edcc1df2766a08aaf0cb85622bab (diff)
tdf#127471 Detect&Correct EMF/WMF with wrong FontScale
Before correcting our EMF/WMF export to write the Windows- specific data in the case of FontScaling, we wrote these files with wrong FontScaling. This change tries to detect and correct this at import, so that newer versions of the office on all plattforms can again load old, from us but not on Windows written EMF/WMF files. With this change we can read again all new and old EMF/WMF files (see table in task, comment 80). Change-Id: I1a0b0ab5f57c7cd40520401568af05cab4ecb4c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111399 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Diffstat (limited to 'include/vcl')
-rw-r--r--include/vcl/metaact.hxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx
index 5ed09a9c5315..69552a2bbf95 100644
--- a/include/vcl/metaact.hxx
+++ b/include/vcl/metaact.hxx
@@ -1410,12 +1410,20 @@ public:
const MapMode& GetMapMode() const { return maMapMode; }
};
+// tdf#127471 decl for friend below
+namespace emfio { class ScaledFontDetectCorrectHelper; }
+
class UNLESS_MERGELIBS(VCL_DLLPUBLIC) MetaFontAction final : public MetaAction
{
private:
vcl::Font maFont;
+ // tdf#127471 for import correction of own wrong written EMF/WMF files allow correction
+ // of FontScale after import. Only from there, so use a friend here and keep the method private
+ friend class emfio::ScaledFontDetectCorrectHelper;
+ void correctFontScale(tools::Long nNewFontScale) { maFont.SetAverageFontWidth(nNewFontScale); }
+
public:
MetaFontAction();
MetaFontAction(MetaFontAction const &) = default;