[Libreoffice-commits] core.git: filter/CppunitTest_filter_tiff_test.mk filter/Library_gie.mk filter/Module_filter.mk filter/qa filter/source include/vcl solenv/clang-format vcl/CppunitTest_vcl_filters_test.mk vcl/inc vcl/Library_vcl.mk vcl/qa vcl/source
Tomaž Vajngerl (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jan 6 07:50:32 UTC 2021
filter/CppunitTest_filter_tiff_test.mk | 38 ----
filter/Library_gie.mk | 4
filter/Module_filter.mk | 1
filter/source/config/fragments/internalgraphicfilters/tif_Export.xcu | 2
filter/source/config/fragments/internalgraphicfilters/tif_Import.xcu | 2
include/vcl/graphicfilter.hxx | 3
solenv/clang-format/excludelist | 11 -
vcl/CppunitTest_vcl_filters_test.mk | 6
vcl/Library_vcl.mk | 4
vcl/inc/filter/TiffReader.hxx | 26 +++
vcl/inc/filter/TiffWriter.hxx | 28 +++
vcl/qa/cppunit/GraphicTest.cxx | 2
vcl/qa/cppunit/graphicfilter/filters-tiff-test.cxx | 82 ++++++----
vcl/source/filter/FilterConfigCache.cxx | 10 -
vcl/source/filter/etiff/etiff.cxx | 5
vcl/source/filter/graphicfilter.cxx | 36 ++--
vcl/source/filter/itiff/itiff.cxx | 8
17 files changed, 164 insertions(+), 104 deletions(-)
New commits:
commit 94d34e53ac9eb41cba96a56bf715d4b02794a12a
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Tue Dec 29 22:32:01 2020 +0900
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Wed Jan 6 08:49:53 2021 +0100
Move TIFF reader and writer from filter module into VCL
Moving graphicfilter one by one into VCL to get rid of filter_gio
module and all the nonsense of dynamic/static library loading in
"GraphicFilter".
Change-Id: I21ebc0334ee07d36553a88557d33e01d9caec9ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108822
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
diff --git a/filter/CppunitTest_filter_tiff_test.mk b/filter/CppunitTest_filter_tiff_test.mk
deleted file mode 100644
index 23a7bbf9ccac..000000000000
--- a/filter/CppunitTest_filter_tiff_test.mk
+++ /dev/null
@@ -1,38 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-$(eval $(call gb_CppunitTest_CppunitTest,filter_tiff_test))
-
-$(eval $(call gb_CppunitTest_use_external,filter_tiff_test,boost_headers))
-
-$(eval $(call gb_CppunitTest_add_exception_objects,filter_tiff_test, \
- filter/qa/cppunit/filters-tiff-test \
-))
-
-$(eval $(call gb_CppunitTest_use_libraries,filter_tiff_test, \
- gie \
- sal \
- test \
- tl \
- unotest \
- vcl \
-))
-
-$(eval $(call gb_CppunitTest_use_sdk_api,filter_tiff_test))
-
-$(eval $(call gb_CppunitTest_use_ure,filter_tiff_test))
-$(eval $(call gb_CppunitTest_use_vcl,filter_tiff_test))
-
-$(eval $(call gb_CppunitTest_use_components,filter_tiff_test,\
- configmgr/source/configmgr \
-))
-
-$(eval $(call gb_CppunitTest_use_configuration,filter_tiff_test))
-
-# vim: set noet sw=4 ts=4:
diff --git a/filter/Library_gie.mk b/filter/Library_gie.mk
index 2dcab32717b6..8c0cbd46b9b9 100644
--- a/filter/Library_gie.mk
+++ b/filter/Library_gie.mk
@@ -50,12 +50,8 @@ $(eval $(call gb_Library_use_libraries,gie,\
$(eval $(call gb_Library_add_exception_objects,gie,\
filter/source/graphicfilter/egif/egif \
- filter/source/graphicfilter/etiff/etiff \
filter/source/graphicfilter/eps/eps \
filter/source/graphicfilter/egif/giflzwc \
- filter/source/graphicfilter/itiff/ccidecom \
- filter/source/graphicfilter/itiff/itiff \
- filter/source/graphicfilter/itiff/lzwdecom \
filter/source/graphicfilter/ipict/ipict \
filter/source/graphicfilter/ipict/shape \
filter/source/graphicfilter/ipcx/ipcx \
diff --git a/filter/Module_filter.mk b/filter/Module_filter.mk
index 6ac173e45859..898ac710db8a 100644
--- a/filter/Module_filter.mk
+++ b/filter/Module_filter.mk
@@ -64,7 +64,6 @@ $(eval $(call gb_Module_add_check_targets,filter,\
CppunitTest_filter_ppm_test \
CppunitTest_filter_psd_test \
CppunitTest_filter_ras_test \
- CppunitTest_filter_tiff_test \
CppunitTest_filter_tga_test \
CppunitTest_filter_svg \
))
diff --git a/filter/source/config/fragments/internalgraphicfilters/tif_Export.xcu b/filter/source/config/fragments/internalgraphicfilters/tif_Export.xcu
index c83701d2df88..6fc07ec7231f 100644
--- a/filter/source/config/fragments/internalgraphicfilters/tif_Export.xcu
+++ b/filter/source/config/fragments/internalgraphicfilters/tif_Export.xcu
@@ -17,7 +17,7 @@
-->
<node oor:name="tif_Export" oor:op="replace" >
<prop oor:name="Type"><value>tif_Tag_Image_File</value></prop>
- <prop oor:name="FormatName"><value>eti</value></prop>
+ <prop oor:name="FormatName"><value>SVTIFF</value></prop>
<prop oor:name="RealFilterName"/>
<prop oor:name="UIComponent"><value>com.sun.star.svtools.SvFilterOptionsDialog</value></prop>
<prop oor:name="UIName">
diff --git a/filter/source/config/fragments/internalgraphicfilters/tif_Import.xcu b/filter/source/config/fragments/internalgraphicfilters/tif_Import.xcu
index 8d4b32296bd3..b77e6e6d62a1 100644
--- a/filter/source/config/fragments/internalgraphicfilters/tif_Import.xcu
+++ b/filter/source/config/fragments/internalgraphicfilters/tif_Import.xcu
@@ -17,7 +17,7 @@
-->
<node oor:name="tif_Import" oor:op="replace" >
<prop oor:name="Type"><value>tif_Tag_Image_File</value></prop>
- <prop oor:name="FormatName"><value>iti</value></prop>
+ <prop oor:name="FormatName"><value>SVTIFF</value></prop>
<prop oor:name="RealFilterName"><value>TIF - Tag Image File</value></prop>
<prop oor:name="UIComponent"/>
<prop oor:name="UIName">
diff --git a/include/vcl/graphicfilter.hxx b/include/vcl/graphicfilter.hxx
index 35728237dc7a..5b18654cb81b 100644
--- a/include/vcl/graphicfilter.hxx
+++ b/include/vcl/graphicfilter.hxx
@@ -77,6 +77,7 @@ namespace o3tl
#define IMP_XPM "SVIXPM"
#define IMP_SVG "SVISVG"
#define IMP_PDF "SVIPDF"
+#define IMP_TIFF "SVTIFF"
#define EXP_BMP "SVBMP"
#define EXP_SVMETAFILE "SVMETAFILE"
#define EXP_WMF "SVWMF"
@@ -85,6 +86,8 @@ namespace o3tl
#define EXP_SVG "SVESVG"
#define EXP_PDF "SVEPDF"
#define EXP_PNG "SVEPNG"
+#define EXP_TIFF "SVTIFF"
+
#define BMP_SHORTNAME u"BMP"
#define GIF_SHORTNAME u"GIF"
diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist
index 32fc5a9e7f3e..4b0e44a74377 100644
--- a/solenv/clang-format/excludelist
+++ b/solenv/clang-format/excludelist
@@ -3900,7 +3900,6 @@ filter/qa/cppunit/filters-ppm-test.cxx
filter/qa/cppunit/filters-psd-test.cxx
filter/qa/cppunit/filters-ras-test.cxx
filter/qa/cppunit/filters-tga-test.cxx
-filter/qa/cppunit/filters-tiff-test.cxx
filter/qa/cppunit/msfilter-test.cxx
filter/qa/cppunit/priority-test.cxx
filter/qa/cppunit/xslt-test.cxx
@@ -3931,7 +3930,6 @@ filter/source/graphicfilter/egif/egif.cxx
filter/source/graphicfilter/egif/giflzwc.cxx
filter/source/graphicfilter/egif/giflzwc.hxx
filter/source/graphicfilter/eps/eps.cxx
-filter/source/graphicfilter/etiff/etiff.cxx
filter/source/graphicfilter/icgm/actimpr.cxx
filter/source/graphicfilter/icgm/bitmap.cxx
filter/source/graphicfilter/icgm/bitmap.hxx
@@ -3979,10 +3977,6 @@ filter/source/graphicfilter/ipict/shape.hxx
filter/source/graphicfilter/ipsd/ipsd.cxx
filter/source/graphicfilter/iras/iras.cxx
filter/source/graphicfilter/itga/itga.cxx
-filter/source/graphicfilter/itiff/ccidecom.cxx
-filter/source/graphicfilter/itiff/ccidecom.hxx
-filter/source/graphicfilter/itiff/itiff.cxx
-filter/source/graphicfilter/itiff/lzwdecom.cxx
filter/source/msfilter/countryid.cxx
filter/source/msfilter/dffpropset.cxx
filter/source/msfilter/escherex.cxx
@@ -14938,12 +14932,17 @@ vcl/source/filter/FilterConfigCache.hxx
vcl/source/filter/FilterConfigItem.cxx
vcl/source/filter/graphicfilter.cxx
vcl/source/filter/graphicfilter2.cxx
+vcl/source/filter/etiff/etiff.cxx
vcl/source/filter/igif/decode.cxx
vcl/source/filter/igif/decode.hxx
vcl/source/filter/igif/gifread.cxx
vcl/source/filter/ixbm/xbmread.cxx
vcl/source/filter/ixpm/rgbtable.hxx
vcl/source/filter/ixpm/xpmread.cxx
+vcl/source/filter/itiff/ccidecom.cxx
+vcl/source/filter/itiff/ccidecom.hxx
+vcl/source/filter/itiff/itiff.cxx
+vcl/source/filter/itiff/lzwdecom.cxx
vcl/source/filter/jpeg/Exif.cxx
vcl/source/filter/jpeg/Exif.hxx
vcl/source/filter/jpeg/JpegReader.cxx
diff --git a/vcl/CppunitTest_vcl_filters_test.mk b/vcl/CppunitTest_vcl_filters_test.mk
index 03a423233c9e..70667a04417b 100644
--- a/vcl/CppunitTest_vcl_filters_test.mk
+++ b/vcl/CppunitTest_vcl_filters_test.mk
@@ -11,6 +11,12 @@ $(eval $(call gb_CppunitTest_CppunitTest,vcl_filters_test))
$(eval $(call gb_CppunitTest_add_exception_objects,vcl_filters_test, \
vcl/qa/cppunit/graphicfilter/filters-test \
+ vcl/qa/cppunit/graphicfilter/filters-tiff-test \
+))
+
+$(eval $(call gb_CppunitTest_set_include,vcl_filters_test,\
+ $$(INCLUDE) \
+ -I$(SRCDIR)/vcl/inc \
))
ifeq ($(DISABLE_CVE_TESTS),TRUE)
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index f258b0279a64..e222b72b574a 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -423,6 +423,7 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
vcl/source/components/dtranscomp \
vcl/source/components/factory \
vcl/source/components/fontident \
+ vcl/source/filter/etiff/etiff \
vcl/source/filter/FilterConfigCache \
vcl/source/filter/FilterConfigItem \
vcl/source/filter/graphicfilter \
@@ -434,6 +435,9 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
vcl/source/filter/igif/gifread \
vcl/source/filter/ipdf/pdfread \
vcl/source/filter/ipdf/pdfdocument \
+ vcl/source/filter/itiff/ccidecom \
+ vcl/source/filter/itiff/itiff \
+ vcl/source/filter/itiff/lzwdecom \
vcl/source/filter/ixbm/xbmread \
vcl/source/filter/ixpm/xpmread \
vcl/source/filter/jpeg/Exif \
diff --git a/vcl/inc/filter/TiffReader.hxx b/vcl/inc/filter/TiffReader.hxx
new file mode 100644
index 000000000000..3c9922895a4f
--- /dev/null
+++ b/vcl/inc/filter/TiffReader.hxx
@@ -0,0 +1,26 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <vcl/graph.hxx>
+
+VCL_DLLPUBLIC bool ImportTiffGraphicImport(SvStream& rStream, Graphic& rGraphic);
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/filter/TiffWriter.hxx b/vcl/inc/filter/TiffWriter.hxx
new file mode 100644
index 000000000000..a2219a687915
--- /dev/null
+++ b/vcl/inc/filter/TiffWriter.hxx
@@ -0,0 +1,28 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <vcl/graph.hxx>
+#include <vcl/FilterConfigItem.hxx>
+
+VCL_DLLPUBLIC bool ExportTiffGraphicImport(SvStream& rStream, Graphic& rGraphic,
+ FilterConfigItem* pFilterConfigItem);
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/qa/cppunit/GraphicTest.cxx b/vcl/qa/cppunit/GraphicTest.cxx
index b1f6b77ef5c2..c9be978c9f6c 100644
--- a/vcl/qa/cppunit/GraphicTest.cxx
+++ b/vcl/qa/cppunit/GraphicTest.cxx
@@ -256,7 +256,7 @@ void GraphicTest::testUnloadedGraphic()
void GraphicTest::testUnloadedGraphicLoading()
{
- const OUString aFormats[] = { "png", "gif", "jpg" };
+ const OUString aFormats[] = { "png", "gif", "jpg", "tif" };
for (OUString const& sFormat : aFormats)
{
diff --git a/filter/qa/cppunit/data/tiff/fail/.gitignore b/vcl/qa/cppunit/graphicfilter/data/tiff/fail/.gitignore
similarity index 100%
rename from filter/qa/cppunit/data/tiff/fail/.gitignore
rename to vcl/qa/cppunit/graphicfilter/data/tiff/fail/.gitignore
diff --git a/filter/qa/cppunit/data/tiff/fail/BID-51132-1.tiff b/vcl/qa/cppunit/graphicfilter/data/tiff/fail/BID-51132-1.tiff
similarity index 100%
rename from filter/qa/cppunit/data/tiff/fail/BID-51132-1.tiff
rename to vcl/qa/cppunit/graphicfilter/data/tiff/fail/BID-51132-1.tiff
diff --git a/filter/qa/cppunit/data/tiff/fail/CVE-2006-3459-1.tiff b/vcl/qa/cppunit/graphicfilter/data/tiff/fail/CVE-2006-3459-1.tiff
similarity index 100%
rename from filter/qa/cppunit/data/tiff/fail/CVE-2006-3459-1.tiff
rename to vcl/qa/cppunit/graphicfilter/data/tiff/fail/CVE-2006-3459-1.tiff
diff --git a/filter/qa/cppunit/data/tiff/fail/CVE-2009-2285-1.tiff b/vcl/qa/cppunit/graphicfilter/data/tiff/fail/CVE-2009-2285-1.tiff
similarity index 100%
rename from filter/qa/cppunit/data/tiff/fail/CVE-2009-2285-1.tiff
rename to vcl/qa/cppunit/graphicfilter/data/tiff/fail/CVE-2009-2285-1.tiff
diff --git a/filter/qa/cppunit/data/tiff/fail/CVE-2010-2482-1.tiff b/vcl/qa/cppunit/graphicfilter/data/tiff/fail/CVE-2010-2482-1.tiff
similarity index 100%
rename from filter/qa/cppunit/data/tiff/fail/CVE-2010-2482-1.tiff
rename to vcl/qa/cppunit/graphicfilter/data/tiff/fail/CVE-2010-2482-1.tiff
diff --git a/filter/qa/cppunit/data/tiff/fail/CVE-2012-0276-1.tiff b/vcl/qa/cppunit/graphicfilter/data/tiff/fail/CVE-2012-0276-1.tiff
similarity index 100%
rename from filter/qa/cppunit/data/tiff/fail/CVE-2012-0276-1.tiff
rename to vcl/qa/cppunit/graphicfilter/data/tiff/fail/CVE-2012-0276-1.tiff
diff --git a/filter/qa/cppunit/data/tiff/fail/CVE-2012-0276-2.tiff b/vcl/qa/cppunit/graphicfilter/data/tiff/fail/CVE-2012-0276-2.tiff
similarity index 100%
rename from filter/qa/cppunit/data/tiff/fail/CVE-2012-0276-2.tiff
rename to vcl/qa/cppunit/graphicfilter/data/tiff/fail/CVE-2012-0276-2.tiff
diff --git a/filter/qa/cppunit/data/tiff/fail/CVE-2012-2027-1.tiff b/vcl/qa/cppunit/graphicfilter/data/tiff/fail/CVE-2012-2027-1.tiff
similarity index 100%
rename from filter/qa/cppunit/data/tiff/fail/CVE-2012-2027-1.tiff
rename to vcl/qa/cppunit/graphicfilter/data/tiff/fail/CVE-2012-2027-1.tiff
diff --git a/filter/qa/cppunit/data/tiff/fail/CVE-2013-3906-1.tiff b/vcl/qa/cppunit/graphicfilter/data/tiff/fail/CVE-2013-3906-1.tiff
similarity index 100%
rename from filter/qa/cppunit/data/tiff/fail/CVE-2013-3906-1.tiff
rename to vcl/qa/cppunit/graphicfilter/data/tiff/fail/CVE-2013-3906-1.tiff
diff --git a/filter/qa/cppunit/data/tiff/fail/CVE-2017-10688-1.tiff b/vcl/qa/cppunit/graphicfilter/data/tiff/fail/CVE-2017-10688-1.tiff
similarity index 100%
rename from filter/qa/cppunit/data/tiff/fail/CVE-2017-10688-1.tiff
rename to vcl/qa/cppunit/graphicfilter/data/tiff/fail/CVE-2017-10688-1.tiff
diff --git a/filter/qa/cppunit/data/tiff/fail/CVE-2017-9147-1.tiff b/vcl/qa/cppunit/graphicfilter/data/tiff/fail/CVE-2017-9147-1.tiff
similarity index 100%
rename from filter/qa/cppunit/data/tiff/fail/CVE-2017-9147-1.tiff
rename to vcl/qa/cppunit/graphicfilter/data/tiff/fail/CVE-2017-9147-1.tiff
diff --git a/filter/qa/cppunit/data/tiff/fail/CVE-2017-9936-1.tiff b/vcl/qa/cppunit/graphicfilter/data/tiff/fail/CVE-2017-9936-1.tiff
similarity index 100%
rename from filter/qa/cppunit/data/tiff/fail/CVE-2017-9936-1.tiff
rename to vcl/qa/cppunit/graphicfilter/data/tiff/fail/CVE-2017-9936-1.tiff
diff --git a/filter/qa/cppunit/data/tiff/fail/EBD-22681-1.tiff b/vcl/qa/cppunit/graphicfilter/data/tiff/fail/EBD-22681-1.tiff
similarity index 100%
rename from filter/qa/cppunit/data/tiff/fail/EBD-22681-1.tiff
rename to vcl/qa/cppunit/graphicfilter/data/tiff/fail/EBD-22681-1.tiff
diff --git a/filter/qa/cppunit/data/tiff/fail/EDB-24743-5.tiff b/vcl/qa/cppunit/graphicfilter/data/tiff/fail/EDB-24743-5.tiff
similarity index 100%
rename from filter/qa/cppunit/data/tiff/fail/EDB-24743-5.tiff
rename to vcl/qa/cppunit/graphicfilter/data/tiff/fail/EDB-24743-5.tiff
diff --git a/filter/qa/cppunit/data/tiff/fail/RC4-crash-1.tiff b/vcl/qa/cppunit/graphicfilter/data/tiff/fail/RC4-crash-1.tiff
similarity index 100%
rename from filter/qa/cppunit/data/tiff/fail/RC4-crash-1.tiff
rename to vcl/qa/cppunit/graphicfilter/data/tiff/fail/RC4-crash-1.tiff
diff --git a/filter/qa/cppunit/data/tiff/fail/RC4-crash-2.tiff b/vcl/qa/cppunit/graphicfilter/data/tiff/fail/RC4-crash-2.tiff
similarity index 100%
rename from filter/qa/cppunit/data/tiff/fail/RC4-crash-2.tiff
rename to vcl/qa/cppunit/graphicfilter/data/tiff/fail/RC4-crash-2.tiff
diff --git a/filter/qa/cppunit/data/tiff/fail/RC4-crash-3.tiff b/vcl/qa/cppunit/graphicfilter/data/tiff/fail/RC4-crash-3.tiff
similarity index 100%
rename from filter/qa/cppunit/data/tiff/fail/RC4-crash-3.tiff
rename to vcl/qa/cppunit/graphicfilter/data/tiff/fail/RC4-crash-3.tiff
diff --git a/filter/qa/cppunit/data/tiff/fail/RC4-crash-4.tiff b/vcl/qa/cppunit/graphicfilter/data/tiff/fail/RC4-crash-4.tiff
similarity index 100%
rename from filter/qa/cppunit/data/tiff/fail/RC4-crash-4.tiff
rename to vcl/qa/cppunit/graphicfilter/data/tiff/fail/RC4-crash-4.tiff
diff --git a/filter/qa/cppunit/data/tiff/fail/RC4-crash-5.tiff b/vcl/qa/cppunit/graphicfilter/data/tiff/fail/RC4-crash-5.tiff
similarity index 100%
rename from filter/qa/cppunit/data/tiff/fail/RC4-crash-5.tiff
rename to vcl/qa/cppunit/graphicfilter/data/tiff/fail/RC4-crash-5.tiff
diff --git a/filter/qa/cppunit/data/tiff/fail/RC4-crash-6.tiff b/vcl/qa/cppunit/graphicfilter/data/tiff/fail/RC4-crash-6.tiff
similarity index 100%
rename from filter/qa/cppunit/data/tiff/fail/RC4-crash-6.tiff
rename to vcl/qa/cppunit/graphicfilter/data/tiff/fail/RC4-crash-6.tiff
diff --git a/filter/qa/cppunit/data/tiff/fail/RC4-crash-7.tiff b/vcl/qa/cppunit/graphicfilter/data/tiff/fail/RC4-crash-7.tiff
similarity index 100%
rename from filter/qa/cppunit/data/tiff/fail/RC4-crash-7.tiff
rename to vcl/qa/cppunit/graphicfilter/data/tiff/fail/RC4-crash-7.tiff
diff --git a/filter/qa/cppunit/data/tiff/fail/RC4-hang-1.tiff b/vcl/qa/cppunit/graphicfilter/data/tiff/fail/RC4-hang-1.tiff
similarity index 100%
rename from filter/qa/cppunit/data/tiff/fail/RC4-hang-1.tiff
rename to vcl/qa/cppunit/graphicfilter/data/tiff/fail/RC4-hang-1.tiff
diff --git a/filter/qa/cppunit/data/tiff/fail/RC4-hang-10.tiff b/vcl/qa/cppunit/graphicfilter/data/tiff/fail/RC4-hang-10.tiff
similarity index 100%
rename from filter/qa/cppunit/data/tiff/fail/RC4-hang-10.tiff
rename to vcl/qa/cppunit/graphicfilter/data/tiff/fail/RC4-hang-10.tiff
diff --git a/filter/qa/cppunit/data/tiff/fail/RC4-hang-2.tiff b/vcl/qa/cppunit/graphicfilter/data/tiff/fail/RC4-hang-2.tiff
similarity index 100%
rename from filter/qa/cppunit/data/tiff/fail/RC4-hang-2.tiff
rename to vcl/qa/cppunit/graphicfilter/data/tiff/fail/RC4-hang-2.tiff
diff --git a/filter/qa/cppunit/data/tiff/fail/RC4-hang-3.tiff b/vcl/qa/cppunit/graphicfilter/data/tiff/fail/RC4-hang-3.tiff
similarity index 100%
rename from filter/qa/cppunit/data/tiff/fail/RC4-hang-3.tiff
rename to vcl/qa/cppunit/graphicfilter/data/tiff/fail/RC4-hang-3.tiff
diff --git a/filter/qa/cppunit/data/tiff/fail/RC4-hang-4.tiff b/vcl/qa/cppunit/graphicfilter/data/tiff/fail/RC4-hang-4.tiff
similarity index 100%
rename from filter/qa/cppunit/data/tiff/fail/RC4-hang-4.tiff
rename to vcl/qa/cppunit/graphicfilter/data/tiff/fail/RC4-hang-4.tiff
diff --git a/filter/qa/cppunit/data/tiff/fail/RC4-hang-5.tiff b/vcl/qa/cppunit/graphicfilter/data/tiff/fail/RC4-hang-5.tiff
similarity index 100%
rename from filter/qa/cppunit/data/tiff/fail/RC4-hang-5.tiff
rename to vcl/qa/cppunit/graphicfilter/data/tiff/fail/RC4-hang-5.tiff
diff --git a/filter/qa/cppunit/data/tiff/fail/RC4-hang-6.tiff b/vcl/qa/cppunit/graphicfilter/data/tiff/fail/RC4-hang-6.tiff
similarity index 100%
rename from filter/qa/cppunit/data/tiff/fail/RC4-hang-6.tiff
rename to vcl/qa/cppunit/graphicfilter/data/tiff/fail/RC4-hang-6.tiff
diff --git a/filter/qa/cppunit/data/tiff/fail/RC4-hang-7.tiff b/vcl/qa/cppunit/graphicfilter/data/tiff/fail/RC4-hang-7.tiff
similarity index 100%
rename from filter/qa/cppunit/data/tiff/fail/RC4-hang-7.tiff
rename to vcl/qa/cppunit/graphicfilter/data/tiff/fail/RC4-hang-7.tiff
diff --git a/filter/qa/cppunit/data/tiff/fail/RC4-hang-8.tiff b/vcl/qa/cppunit/graphicfilter/data/tiff/fail/RC4-hang-8.tiff
similarity index 100%
rename from filter/qa/cppunit/data/tiff/fail/RC4-hang-8.tiff
rename to vcl/qa/cppunit/graphicfilter/data/tiff/fail/RC4-hang-8.tiff
diff --git a/filter/qa/cppunit/data/tiff/fail/RC4-hang-9.tiff b/vcl/qa/cppunit/graphicfilter/data/tiff/fail/RC4-hang-9.tiff
similarity index 100%
rename from filter/qa/cppunit/data/tiff/fail/RC4-hang-9.tiff
rename to vcl/qa/cppunit/graphicfilter/data/tiff/fail/RC4-hang-9.tiff
diff --git a/filter/qa/cppunit/data/tiff/indeterminate/.gitignore b/vcl/qa/cppunit/graphicfilter/data/tiff/indeterminate/.gitignore
similarity index 100%
rename from filter/qa/cppunit/data/tiff/indeterminate/.gitignore
rename to vcl/qa/cppunit/graphicfilter/data/tiff/indeterminate/.gitignore
diff --git a/filter/qa/cppunit/data/tiff/pass/.gitignore b/vcl/qa/cppunit/graphicfilter/data/tiff/pass/.gitignore
similarity index 100%
rename from filter/qa/cppunit/data/tiff/pass/.gitignore
rename to vcl/qa/cppunit/graphicfilter/data/tiff/pass/.gitignore
diff --git a/filter/qa/cppunit/data/tiff/pass/CVE-2005-1544-1.tiff b/vcl/qa/cppunit/graphicfilter/data/tiff/pass/CVE-2005-1544-1.tiff
similarity index 100%
rename from filter/qa/cppunit/data/tiff/pass/CVE-2005-1544-1.tiff
rename to vcl/qa/cppunit/graphicfilter/data/tiff/pass/CVE-2005-1544-1.tiff
diff --git a/filter/qa/cppunit/data/tiff/pass/CVE-2006-2656-1.tiff b/vcl/qa/cppunit/graphicfilter/data/tiff/pass/CVE-2006-2656-1.tiff
similarity index 100%
rename from filter/qa/cppunit/data/tiff/pass/CVE-2006-2656-1.tiff
rename to vcl/qa/cppunit/graphicfilter/data/tiff/pass/CVE-2006-2656-1.tiff
diff --git a/filter/qa/cppunit/data/tiff/pass/CVE-2007-2217-1.tiff b/vcl/qa/cppunit/graphicfilter/data/tiff/pass/CVE-2007-2217-1.tiff
similarity index 100%
rename from filter/qa/cppunit/data/tiff/pass/CVE-2007-2217-1.tiff
rename to vcl/qa/cppunit/graphicfilter/data/tiff/pass/CVE-2007-2217-1.tiff
diff --git a/filter/qa/cppunit/data/tiff/pass/CVE-2013-5575-1.tiff b/vcl/qa/cppunit/graphicfilter/data/tiff/pass/CVE-2013-5575-1.tiff
similarity index 100%
rename from filter/qa/cppunit/data/tiff/pass/CVE-2013-5575-1.tiff
rename to vcl/qa/cppunit/graphicfilter/data/tiff/pass/CVE-2013-5575-1.tiff
diff --git a/filter/qa/cppunit/data/tiff/pass/multi-page-1.tiff b/vcl/qa/cppunit/graphicfilter/data/tiff/pass/multi-page-1.tiff
similarity index 100%
rename from filter/qa/cppunit/data/tiff/pass/multi-page-1.tiff
rename to vcl/qa/cppunit/graphicfilter/data/tiff/pass/multi-page-1.tiff
diff --git a/filter/qa/cppunit/data/tiff/tdf115863.tif b/vcl/qa/cppunit/graphicfilter/data/tiff/tdf115863.tif
similarity index 100%
rename from filter/qa/cppunit/data/tiff/tdf115863.tif
rename to vcl/qa/cppunit/graphicfilter/data/tiff/tdf115863.tif
diff --git a/filter/qa/cppunit/data/tiff/tdf126460.tif b/vcl/qa/cppunit/graphicfilter/data/tiff/tdf126460.tif
similarity index 100%
rename from filter/qa/cppunit/data/tiff/tdf126460.tif
rename to vcl/qa/cppunit/graphicfilter/data/tiff/tdf126460.tif
diff --git a/filter/qa/cppunit/data/tiff/tdf138818.tif b/vcl/qa/cppunit/graphicfilter/data/tiff/tdf138818.tif
similarity index 100%
rename from filter/qa/cppunit/data/tiff/tdf138818.tif
rename to vcl/qa/cppunit/graphicfilter/data/tiff/tdf138818.tif
diff --git a/filter/qa/cppunit/filters-tiff-test.cxx b/vcl/qa/cppunit/graphicfilter/filters-tiff-test.cxx
similarity index 54%
rename from filter/qa/cppunit/filters-tiff-test.cxx
rename to vcl/qa/cppunit/graphicfilter/filters-tiff-test.cxx
index a1ce322a4614..ab3a9a343dec 100644
--- a/filter/qa/cppunit/filters-tiff-test.cxx
+++ b/vcl/qa/cppunit/graphicfilter/filters-tiff-test.cxx
@@ -13,32 +13,29 @@
#include <tools/stream.hxx>
#include <vcl/graph.hxx>
#include <vcl/graphicfilter.hxx>
+#include <bitmap/BitmapWriteAccess.hxx>
+#include <graphic/GraphicFormatDetector.hxx>
-extern "C"
-{
- SAL_DLLPUBLIC_EXPORT bool SAL_CALL
- itiGraphicImport(SvStream & rStream, Graphic & rGraphic,
- FilterConfigItem*);
-}
+#include <filter/TiffReader.hxx>
using namespace ::com::sun::star;
/* Implementation of Filters test */
-class TiffFilterTest
- : public test::FiltersTest
- , public test::BootstrapFixture
+class TiffFilterTest : public test::FiltersTest, public test::BootstrapFixture
{
public:
- TiffFilterTest() : BootstrapFixture(true, false) {}
+ TiffFilterTest()
+ : BootstrapFixture(true, false)
+ {
+ }
- virtual bool load(const OUString &,
- const OUString &rURL, const OUString &,
- SfxFilterFlags, SotClipboardFormatId, unsigned int) override;
+ virtual bool load(const OUString&, const OUString& rURL, const OUString&, SfxFilterFlags,
+ SotClipboardFormatId, unsigned int) override;
OUString getUrl()
{
- return m_directories.getURLFromSrc(u"/filter/qa/cppunit/data/tiff/");
+ return m_directories.getURLFromSrc(u"/vcl/qa/cppunit/graphicfilter/data/tiff/");
}
/**
@@ -48,29 +45,26 @@ public:
void testTdf126460();
void testTdf115863();
void testTdf138818();
+ void testRoundtrip();
CPPUNIT_TEST_SUITE(TiffFilterTest);
CPPUNIT_TEST(testCVEs);
CPPUNIT_TEST(testTdf126460);
CPPUNIT_TEST(testTdf115863);
CPPUNIT_TEST(testTdf138818);
+ CPPUNIT_TEST(testRoundtrip);
CPPUNIT_TEST_SUITE_END();
};
-bool TiffFilterTest::load(const OUString &,
- const OUString &rURL, const OUString &,
- SfxFilterFlags, SotClipboardFormatId, unsigned int)
+bool TiffFilterTest::load(const OUString&, const OUString& rURL, const OUString&, SfxFilterFlags,
+ SotClipboardFormatId, unsigned int)
{
SvFileStream aFileStream(rURL, StreamMode::READ);
Graphic aGraphic;
- return itiGraphicImport(aFileStream, aGraphic, nullptr);
+ return ImportTiffGraphicImport(aFileStream, aGraphic);
}
-void TiffFilterTest::testCVEs()
-{
- testDir(OUString(),
- getUrl());
-}
+void TiffFilterTest::testCVEs() { testDir(OUString(), getUrl()); }
void TiffFilterTest::testTdf126460()
{
@@ -106,7 +100,6 @@ void TiffFilterTest::testTdf115863()
Size aSize = aBitmap.GetSizePixel();
CPPUNIT_ASSERT_EQUAL(tools::Long(528), aSize.Width());
CPPUNIT_ASSERT_EQUAL(tools::Long(618), aSize.Height());
-
}
void TiffFilterTest::testTdf138818()
@@ -124,11 +117,48 @@ void TiffFilterTest::testTdf138818()
// - Expected: 46428
// - Actual : 45951
CPPUNIT_ASSERT_EQUAL(sal_uInt32(46428), aGraphic.GetGfxLink().GetDataSize());
+}
+
+void TiffFilterTest::testRoundtrip()
+{
+ Bitmap aBitmap(Size(2, 2), 24);
+ {
+ BitmapScopedWriteAccess pAccess(aBitmap);
+ pAccess->SetPixel(0, 0, COL_WHITE);
+ pAccess->SetPixel(0, 1, COL_BLACK);
+ pAccess->SetPixel(1, 0, COL_LIGHTRED);
+ pAccess->SetPixel(1, 1, COL_LIGHTGREEN);
+ }
+
+ SvMemoryStream aStream;
+ GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
+ sal_uInt16 nFilterFormat = rFilter.GetExportFormatNumberForShortName(u"tif");
+ rFilter.ExportGraphic(Graphic(BitmapEx(aBitmap)), "none", aStream, nFilterFormat);
+ aStream.Seek(STREAM_SEEK_TO_BEGIN);
+
+ Graphic aGraphic;
+ ErrCode bResult = rFilter.ImportGraphic(aGraphic, "none", aStream);
+ CPPUNIT_ASSERT_EQUAL(ERRCODE_NONE, bResult);
+ CPPUNIT_ASSERT_EQUAL(GfxLinkType::NativeTif, aGraphic.GetGfxLink().GetType());
+ Bitmap aResultBitmap = aGraphic.GetBitmapEx().GetBitmap();
+ CPPUNIT_ASSERT_EQUAL(Size(2, 2), aResultBitmap.GetSizePixel());
+ {
+ Bitmap::ScopedReadAccess pAccess(aResultBitmap);
+ CPPUNIT_ASSERT_EQUAL(COL_WHITE, Color(pAccess->GetPixel(0, 0)));
+ CPPUNIT_ASSERT_EQUAL(COL_BLACK, Color(pAccess->GetPixel(0, 1)));
+ CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, Color(pAccess->GetPixel(1, 0)));
+ CPPUNIT_ASSERT_EQUAL(COL_LIGHTGREEN, Color(pAccess->GetPixel(1, 1)));
+ }
+
+ aStream.Seek(STREAM_SEEK_TO_BEGIN);
+ vcl::GraphicFormatDetector aDetector(aStream, "");
+
+ CPPUNIT_ASSERT_EQUAL(true, aDetector.detect());
+ CPPUNIT_ASSERT_EQUAL(true, aDetector.checkTIF());
+ CPPUNIT_ASSERT_EQUAL(OUString(u"TIF"), aDetector.msDetectedFormat);
}
CPPUNIT_TEST_SUITE_REGISTRATION(TiffFilterTest);
-CPPUNIT_PLUGIN_IMPLEMENT();
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/filter/FilterConfigCache.cxx b/vcl/source/filter/FilterConfigCache.cxx
index a315c0279b69..020d77c3d298 100644
--- a/vcl/source/filter/FilterConfigCache.cxx
+++ b/vcl/source/filter/FilterConfigCache.cxx
@@ -41,8 +41,8 @@ using namespace ::com::sun::star::configuration ;
const char* FilterConfigCache::FilterConfigCacheEntry::InternalPixelFilterNameList[] =
{
- IMP_BMP, IMP_GIF, IMP_PNG,IMP_JPEG, IMP_XBM, IMP_XPM,
- EXP_BMP, EXP_JPEG, EXP_PNG, IMP_MOV, nullptr
+ IMP_BMP, IMP_GIF, IMP_PNG, IMP_JPEG, IMP_XBM, IMP_XPM,
+ EXP_BMP, EXP_JPEG, EXP_PNG, IMP_MOV, IMP_TIFF, EXP_TIFF, nullptr
};
const char* FilterConfigCache::FilterConfigCacheEntry::InternalVectorFilterNameList[] =
@@ -54,7 +54,7 @@ const char* FilterConfigCache::FilterConfigCacheEntry::InternalVectorFilterNameL
const char* FilterConfigCache::FilterConfigCacheEntry::ExternalPixelFilterNameList[] =
{
"egi", "icd", "ipd", "ipx", "ipb", "epb", "epg",
- "epp", "ira", "era", "itg", "iti", "eti", "exp", nullptr
+ "epp", "ira", "era", "itg", "exp", nullptr
};
void FilterConfigCache::FilterConfigCacheEntry::CreateFilterName( const OUString& rUserDataEntry )
@@ -244,8 +244,8 @@ const char* FilterConfigCache::InternalFilterListForSvxLight[] =
"svm","1","SVMETAFILE",
"svm","2","SVMETAFILE",
"tga","1","itg",
- "tif","1","iti",
- "tif","2","eti",
+ "tif","1","SVTIFF",
+ "tif","2","SVTIFF",
"emf","1","SVEMF",
"emf","2","SVEMF",
"wmf","1","SVWMF",
diff --git a/filter/source/graphicfilter/etiff/etiff.cxx b/vcl/source/filter/etiff/etiff.cxx
similarity index 99%
rename from filter/source/graphicfilter/etiff/etiff.cxx
rename to vcl/source/filter/etiff/etiff.cxx
index 80c185e1ea5b..65a90cd160da 100644
--- a/filter/source/graphicfilter/etiff/etiff.cxx
+++ b/vcl/source/filter/etiff/etiff.cxx
@@ -24,6 +24,7 @@
#include <vcl/BitmapReadAccess.hxx>
#include <vcl/FilterConfigItem.hxx>
#include <com/sun/star/task/XStatusIndicator.hpp>
+#include <filter/TiffWriter.hxx>
#define NewSubfileType 254
#define ImageWidth 256
@@ -576,9 +577,7 @@ void TIFFWriter::EndCompression()
pTable.reset();
}
-
-extern "C" SAL_DLLPUBLIC_EXPORT bool
-etiGraphicExport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pFilterConfigItem )
+bool ExportTiffGraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem* pFilterConfigItem)
{
TIFFWriter aWriter(rStream);
return aWriter.WriteTIFF( rGraphic, pFilterConfigItem );
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index 5dc3d8b0f10c..2c2aa67bcbe2 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -47,6 +47,8 @@
#include "jpeg/jpeg.hxx"
#include "ixbm/xbmread.hxx"
#include "ixpm/xpmread.hxx"
+#include <filter/TiffReader.hxx>
+#include <filter/TiffWriter.hxx>
#include <osl/module.hxx>
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/awt/Size.hpp>
@@ -676,8 +678,6 @@ PFilterCall ImpFilterLibCacheEntry::GetImportFunction()
mpfnImport = reinterpret_cast<PFilterCall>(maLibrary.getFunctionSymbol("iraGraphicImport"));
else if (maFormatName == "itg")
mpfnImport = reinterpret_cast<PFilterCall>(maLibrary.getFunctionSymbol("itgGraphicImport"));
- else if (maFormatName == "iti")
- mpfnImport = reinterpret_cast<PFilterCall>(maLibrary.getFunctionSymbol("itiGraphicImport"));
#else
if (maFormatName == "icd")
mpfnImport = icdGraphicImport;
@@ -699,8 +699,6 @@ PFilterCall ImpFilterLibCacheEntry::GetImportFunction()
mpfnImport = iraGraphicImport;
else if (maFormatName == "itg")
mpfnImport = itgGraphicImport;
- else if (maFormatName == "iti")
- mpfnImport = itiGraphicImport;
#endif
}
@@ -1333,6 +1331,10 @@ Graphic GraphicFilter::ImportUnloadedGraphic(SvStream& rIStream, sal_uInt64 size
{
eLinkType = GfxLinkType::NativePdf;
}
+ else if (aFilterName == IMP_TIFF)
+ {
+ eLinkType = GfxLinkType::NativeTif;
+ }
else
{
nStatus = ERRCODE_GRFILTER_FILTERERROR;
@@ -1366,9 +1368,7 @@ Graphic GraphicFilter::ImportUnloadedGraphic(SvStream& rIStream, sal_uInt64 size
if (nFormat != GRFILTER_FORMAT_DONTKNOW)
aShortName = GetImportFormatShortName(nFormat).toAsciiUpperCase();
- if (aShortName.startsWith(TIF_SHORTNAME))
- eLinkType = GfxLinkType::NativeTif;
- else if( aShortName.startsWith(MET_SHORTNAME))
+ if( aShortName.startsWith(MET_SHORTNAME))
eLinkType = GfxLinkType::NativeMet;
else if( aShortName.startsWith(PCT_SHORTNAME))
eLinkType = GfxLinkType::NativePct;
@@ -1433,7 +1433,7 @@ void GraphicFilter::preload()
sal_Int32 nTokenCount = comphelper::string::getTokenCount(aFilterPath, ';');
ImpFilterLibCache& rCache = Cache::get();
static const std::initializer_list<std::u16string_view> aFilterNames = {
- u"icd", u"idx", u"ime", u"ipb", u"ipd", u"ips", u"ipt", u"ipx", u"ira", u"itg", u"iti",
+ u"icd", u"idx", u"ime", u"ipb", u"ipd", u"ips", u"ipt", u"ipx", u"ira", u"itg",
};
// Load library for each filter.
@@ -1738,6 +1738,13 @@ ErrCode GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPath,
else
nStatus = ERRCODE_GRFILTER_FILTERERROR;
}
+ else if (aFilterName.equalsIgnoreAsciiCase(IMP_TIFF) )
+ {
+ if (!ImportTiffGraphicImport(rIStream, rGraphic))
+ nStatus = ERRCODE_GRFILTER_FILTERERROR;
+ else
+ eLinkType = GfxLinkType::NativeTif;
+ }
else
nStatus = ERRCODE_GRFILTER_FILTERERROR;
}
@@ -1863,7 +1870,6 @@ ErrCode GraphicFilter::ExportGraphic( const Graphic& rGraphic, const INetURLObje
extern "C" bool egiGraphicExport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem );
extern "C" bool epsGraphicExport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem );
-extern "C" bool etiGraphicExport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pConfigItem );
#endif
@@ -1956,6 +1962,14 @@ ErrCode GraphicFilter::ExportGraphic( const Graphic& rGraphic, const OUString& r
if( rOStm.GetError() )
nStatus = ERRCODE_GRFILTER_IOERROR;
}
+ if (aFilterName.equalsIgnoreAsciiCase(EXP_TIFF))
+ {
+ if (!ExportTiffGraphicImport(rOStm, aGraphic, &aConfigItem))
+ nStatus = ERRCODE_GRFILTER_FORMATERROR;
+
+ if( rOStm.GetError() )
+ nStatus = ERRCODE_GRFILTER_IOERROR;
+ }
else if( aFilterName.equalsIgnoreAsciiCase( EXP_SVMETAFILE ) )
{
sal_Int32 nVersion = aConfigItem.ReadInt32( "Version", 0 ) ;
@@ -2185,8 +2199,6 @@ ErrCode GraphicFilter::ExportGraphic( const Graphic& rGraphic, const OUString& r
pFunc = reinterpret_cast<PFilterCall>(aLibrary.getFunctionSymbol("egiGraphicExport"));
else if (aExternalFilterName == "eps")
pFunc = reinterpret_cast<PFilterCall>(aLibrary.getFunctionSymbol("epsGraphicExport"));
- else if (aExternalFilterName == "eti")
- pFunc = reinterpret_cast<PFilterCall>(aLibrary.getFunctionSymbol("etiGraphicExport"));
// Execute dialog in DLL
#else
--nIdx; // Just one iteration
@@ -2195,8 +2207,6 @@ ErrCode GraphicFilter::ExportGraphic( const Graphic& rGraphic, const OUString& r
pFunc = egiGraphicExport;
else if (aExternalFilterName == "eps")
pFunc = epsGraphicExport;
- else if (aExternalFilterName == "eti")
- pFunc = etiGraphicExport;
#endif
if( pFunc )
{
diff --git a/filter/source/graphicfilter/itiff/ccidecom.cxx b/vcl/source/filter/itiff/ccidecom.cxx
similarity index 100%
rename from filter/source/graphicfilter/itiff/ccidecom.cxx
rename to vcl/source/filter/itiff/ccidecom.cxx
diff --git a/filter/source/graphicfilter/itiff/ccidecom.hxx b/vcl/source/filter/itiff/ccidecom.hxx
similarity index 100%
rename from filter/source/graphicfilter/itiff/ccidecom.hxx
rename to vcl/source/filter/itiff/ccidecom.hxx
diff --git a/filter/source/graphicfilter/itiff/itiff.cxx b/vcl/source/filter/itiff/itiff.cxx
similarity index 99%
rename from filter/source/graphicfilter/itiff/itiff.cxx
rename to vcl/source/filter/itiff/itiff.cxx
index f07e496bc347..674b5f3656dd 100644
--- a/filter/source/graphicfilter/itiff/itiff.cxx
+++ b/vcl/source/filter/itiff/itiff.cxx
@@ -30,6 +30,8 @@
#include "lzwdecom.hxx"
#include "ccidecom.hxx"
+#include <filter/TiffReader.hxx>
+
namespace {
template< typename T > T BYTESWAP(T nByte) {
@@ -1710,11 +1712,7 @@ bool TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic )
return false;
}
-
-//================== GraphicImport - the exported function ================
-
-extern "C" SAL_DLLPUBLIC_EXPORT bool
-itiGraphicImport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* )
+bool ImportTiffGraphicImport(SvStream & rStream, Graphic & rGraphic)
{
TIFFReader aTIFFReader;
try
diff --git a/filter/source/graphicfilter/itiff/lzwdecom.cxx b/vcl/source/filter/itiff/lzwdecom.cxx
similarity index 100%
rename from filter/source/graphicfilter/itiff/lzwdecom.cxx
rename to vcl/source/filter/itiff/lzwdecom.cxx
diff --git a/filter/source/graphicfilter/itiff/lzwdecom.hxx b/vcl/source/filter/itiff/lzwdecom.hxx
similarity index 100%
rename from filter/source/graphicfilter/itiff/lzwdecom.hxx
rename to vcl/source/filter/itiff/lzwdecom.hxx
More information about the Libreoffice-commits
mailing list