drawinglayer/source/tools/emfphelperdata.cxx | 6 drawinglayer/source/tools/wmfemfhelper.cxx | 1 emfio/CppunitTest_emfio_emf_test.mk | 8 - emfio/CppunitTest_emfio_wmf_test.mk | 93 +++++++-------- emfio/Module_emfio.mk | 3 emfio/inc/mtftools.hxx | 2 emfio/qa/cppunit/wmf/wmfimporttest.cxx | 7 - emfio/source/emfuno/xemfparser.cxx | 2 include/drawinglayer/primitive2d/metafileprimitive2d.hxx | 2 vcl/Module_vcl.mk | 1 10 files changed, 67 insertions(+), 58 deletions(-)
New commits: commit feccdc581cc3e98477a32d2e075602fc1369ff57 Author: Armin Le Grand <armin.le.gr...@cib.de> Date: Fri Jun 23 12:16:33 2017 +0200 emfplus: UnitTests and gerrit build corrections Needed to migrate UnitTest for Emf/Wmf import from vcl to emfio. Corrected stuff based on gerrit build feedback Change-Id: I7fd2456f814ea19583072ba09730a07e9b9d4061 diff --git a/drawinglayer/source/tools/emfphelperdata.cxx b/drawinglayer/source/tools/emfphelperdata.cxx index fdb0fb11c42f..0f81783dec5d 100644 --- a/drawinglayer/source/tools/emfphelperdata.cxx +++ b/drawinglayer/source/tools/emfphelperdata.cxx @@ -390,7 +390,7 @@ namespace emfplushelper void EmfPlusHelperData::processEmfPlusData( SvMemoryStream& rMS, - const drawinglayer::geometry::ViewInformation2D& rViewInformation) + const drawinglayer::geometry::ViewInformation2D& /*rViewInformation*/) { sal_uInt64 length = rMS.GetSize(); @@ -862,6 +862,10 @@ namespace emfplushelper SAL_INFO("cppcanvas.emf", "EMF+ DrawString layoutRect: " << lx << "," << ly << " - " << lw << "x" << lh); OUString text = read_uInt16s_ToOUString(rMS, stringLength); EMFPStringFormat *stringFormat = static_cast< EMFPStringFormat* >(maEMFPObjects[formatId & 0xff].get()); + + (void)(text); // avoid warning + (void)(stringFormat); // avoid warning + // css::rendering::FontRequest aFontRequest; // // if (stringFormat) diff --git a/drawinglayer/source/tools/wmfemfhelper.cxx b/drawinglayer/source/tools/wmfemfhelper.cxx index f10c05724f60..93162e4d3fad 100644 --- a/drawinglayer/source/tools/wmfemfhelper.cxx +++ b/drawinglayer/source/tools/wmfemfhelper.cxx @@ -46,6 +46,7 @@ #include <vcl/gradient.hxx> #include <vcl/hatch.hxx> #include <emfplushelper.hxx> +#include <numeric> namespace drawinglayer { diff --git a/emfio/CppunitTest_emfio.mk b/emfio/CppunitTest_emfio_emf_test.mk similarity index 97% rename from emfio/CppunitTest_emfio.mk rename to emfio/CppunitTest_emfio_emf_test.mk index e785ac45b6e5..6965613e9cd8 100644 --- a/emfio/CppunitTest_emfio.mk +++ b/emfio/CppunitTest_emfio_emf_test.mk @@ -21,6 +21,10 @@ $(eval $(call gb_CppunitTest_use_externals,emfio,\ libxml2 \ )) +$(eval $(call gb_CppunitTest_add_exception_objects,emfio,\ + emfio/qa/cppunit/emf/EmfImportTest \ +)) + $(eval $(call gb_CppunitTest_use_sdk_api,emfio)) $(eval $(call gb_CppunitTest_use_library_objects,emfio,\ @@ -42,10 +46,6 @@ $(eval $(call gb_CppunitTest_use_libraries,emfio,\ utl \ )) -$(eval $(call gb_CppunitTest_add_exception_objects,emfio,\ - emfio/qa/cppunit/EmfImportTest \ -)) - $(eval $(call gb_CppunitTest_use_ure,emfio)) $(eval $(call gb_CppunitTest_use_vcl,emfio)) diff --git a/vcl/CppunitTest_vcl_wmf_test.mk b/emfio/CppunitTest_emfio_wmf_test.mk similarity index 61% rename from vcl/CppunitTest_vcl_wmf_test.mk rename to emfio/CppunitTest_emfio_wmf_test.mk index 9e057d9c7581..82f53ce2f3fe 100644 --- a/vcl/CppunitTest_vcl_wmf_test.mk +++ b/emfio/CppunitTest_emfio_wmf_test.mk @@ -7,46 +7,39 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # -$(eval $(call gb_CppunitTest_CppunitTest,vcl_wmf_test)) +$(eval $(call gb_CppunitTest_CppunitTest,emfio)) -$(eval $(call gb_CppunitTest_add_exception_objects,vcl_wmf_test, \ - vcl/qa/cppunit/wmf/wmfimporttest \ +$(eval $(call gb_CppunitTest_set_componentfile,emfio,emfio/emfio)) + +$(eval $(call gb_CppunitTest_set_include,emfio,\ + $$(INCLUDE) \ + -I$(SRCDIR)/emfio/inc \ )) -$(eval $(call gb_CppunitTest_use_externals,vcl_wmf_test,\ +$(eval $(call gb_CppunitTest_use_externals,emfio,\ boost_headers \ libxml2 \ $(if $(filter PDFIUM,$(BUILD_TYPE)),pdfium) \ )) -$(eval $(call gb_CppunitTest_set_include,vcl_wmf_test,\ - $$(INCLUDE) \ - -I$(SRCDIR)/vcl/inc \ - -I$(SRCDIR)/vcl/source/filter/wmf \ +$(eval $(call gb_CppunitTest_add_exception_objects,emfio, \ + emfio/qa/cppunit/wmf/wmfimporttest \ )) -$(eval $(call gb_CppunitTest_use_library_objects,vcl_wmf_test, \ - test-setupvcl \ - vcl \ -)) +$(eval $(call gb_CppunitTest_use_sdk_api,emfio)) -$(eval $(call gb_CppunitTest_use_externals,vcl_wmf_test,\ - $(if $(filter LINUX MACOSX %BSD SOLARIS,$(OS)), \ - curl) \ - jpeg \ - $(if $(filter-out IOS WNT,$(OS)), \ - nss3 \ - plc4) \ - libeot \ +$(eval $(call gb_CppunitTest_use_library_objects,emfio, \ + emfio \ )) -$(eval $(call gb_CppunitTest_use_libraries,vcl_wmf_test,\ +$(eval $(call gb_CppunitTest_use_libraries,emfio,\ $(call gb_Helper_optional,BREAKPAD, \ crashreport) \ basegfx \ - comphelper \ + drawinglayer \ cppu \ cppuhelper \ + comphelper \ i18nlangtag \ i18nutil \ $(if $(filter OPENCL,$(BUILD_TYPE)),opencl) \ @@ -56,15 +49,27 @@ $(eval $(call gb_CppunitTest_use_libraries,vcl_wmf_test,\ svl \ svt \ test \ + test-setupvcl \ tl \ ucbhelper \ unotest \ + vcl \ utl \ xmlreader \ )) +$(eval $(call gb_CppunitTest_use_externals,emfio,\ + $(if $(filter LINUX MACOSX %BSD SOLARIS,$(OS)), \ + curl) \ + jpeg \ + $(if $(filter-out IOS WNT,$(OS)), \ + nss3 \ + plc4) \ + libeot \ +)) + ifeq ($(OS),MACOSX) -$(eval $(call gb_CppunitTest_add_libs,vcl_wmf_test,\ +$(eval $(call gb_CppunitTest_add_libs,emfio,\ -framework IOKit \ -F/System/Library/PrivateFrameworks \ -framework CoreUI \ @@ -73,12 +78,12 @@ $(eval $(call gb_CppunitTest_add_libs,vcl_wmf_test,\ endif ifeq ($(ENABLE_JAVA),TRUE) -$(eval $(call gb_CppunitTest_use_libraries,vcl_wmf_test,\ +$(eval $(call gb_CppunitTest_use_libraries,emfio,\ jvmaccess \ )) endif -$(eval $(call gb_CppunitTest_use_externals,vcl_wmf_test,\ +$(eval $(call gb_CppunitTest_use_externals,emfio,\ gio \ graphite \ harfbuzz \ @@ -86,30 +91,30 @@ $(eval $(call gb_CppunitTest_use_externals,vcl_wmf_test,\ lcms2 \ )) ifeq ($(ENABLE_HEADLESS),) -$(eval $(call gb_CppunitTest_use_externals,vcl_wmf_test,\ +$(eval $(call gb_CppunitTest_use_externals,emfio,\ epoxy \ )) endif ifeq ($(OS),MACOSX) -$(eval $(call gb_CppunitTest_use_system_darwin_frameworks,vcl_wmf_test,\ +$(eval $(call gb_CppunitTest_use_system_darwin_frameworks,emfio,\ ApplicationServices \ )) -$(eval $(call gb_CppunitTest_use_system_darwin_frameworks,vcl_wmf_test,\ +$(eval $(call gb_CppunitTest_use_system_darwin_frameworks,emfio,\ $(if $(filter X86_64,$(CPUNAME)),,QuickTime) \ Cocoa \ Carbon \ CoreFoundation \ )) ifneq ($(ENABLE_MACOSX_SANDBOX),TRUE) -$(eval $(call gb_CppunitTest_use_libraries,vcl_wmf_test,\ +$(eval $(call gb_CppunitTest_use_libraries,emfio,\ AppleRemote \ )) endif endif ifeq ($(USING_X11),TRUE) -$(eval $(call gb_CppunitTest_use_externals,vcl_wmf_test,\ +$(eval $(call gb_CppunitTest_use_externals,emfio,\ cairo \ cups \ dbus \ @@ -120,14 +125,14 @@ $(eval $(call gb_CppunitTest_use_externals,vcl_wmf_test,\ endif ifeq ($(ENABLE_HEADLESS),TRUE) -$(eval $(call gb_CppunitTest_use_externals,vcl_wmf_test,\ +$(eval $(call gb_CppunitTest_use_externals,emfio,\ cairo \ freetype \ fontconfig \ )) else ifeq ($(OS),LINUX) -$(eval $(call gb_CppunitTest_add_libs,vcl_wmf_test,\ +$(eval $(call gb_CppunitTest_add_libs,emfio,\ -lm \ -ldl \ -lpthread \ @@ -137,12 +142,12 @@ endif endif ifeq ($(OS),ANDROID) -$(eval $(call gb_CppunitTest_add_libs,vcl_wmf_test,\ +$(eval $(call gb_CppunitTest_add_libs,emfio,\ -llog \ -landroid \ -llo-bootstrap \ )) -$(eval $(call gb_CppunitTest_use_externals,vcl_wmf_test,\ +$(eval $(call gb_CppunitTest_use_externals,emfio,\ cairo \ fontconfig \ freetype \ @@ -151,14 +156,14 @@ $(eval $(call gb_CppunitTest_use_externals,vcl_wmf_test,\ endif ifeq ($(OS),IOS) -$(eval $(call gb_CppunitTest_use_system_darwin_frameworks,vcl_wmf_test,\ +$(eval $(call gb_CppunitTest_use_system_darwin_frameworks,emfio,\ UIKit \ CoreFoundation \ )) endif ifeq ($(OS),WNT) -$(eval $(call gb_CppunitTest_use_system_win32_libs,vcl_wmf_test,\ +$(eval $(call gb_CppunitTest_use_system_win32_libs,emfio,\ advapi32 \ crypt32 \ gdi32 \ @@ -174,11 +179,11 @@ $(eval $(call gb_CppunitTest_use_system_win32_libs,vcl_wmf_test,\ setupapi \ shlwapi \ )) -#$(eval $(call gb_CppunitTest_add_nativeres,vcl_wmf_test,vcl/salsrc)) +#$(eval $(call gb_CppunitTest_add_nativeres,emfio,vcl/salsrc)) endif ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS))) -$(eval $(call gb_CppunitTest_add_libs,vcl_wmf_test,\ +$(eval $(call gb_CppunitTest_add_libs,emfio,\ -lm $(DLOPEN_LIBS) \ -lpthread \ -lX11 \ @@ -186,29 +191,27 @@ $(eval $(call gb_CppunitTest_add_libs,vcl_wmf_test,\ )) endif -$(eval $(call gb_CppunitTest_use_sdk_api,vcl_wmf_test)) - -$(eval $(call gb_CppunitTest_use_ure,vcl_wmf_test)) +$(eval $(call gb_CppunitTest_use_ure,emfio)) -$(eval $(call gb_CppunitTest_use_components,vcl_wmf_test,\ +$(eval $(call gb_CppunitTest_use_components,emfio,\ configmgr/source/configmgr \ i18npool/util/i18npool \ ucb/source/core/ucb1 \ unotools/util/utl \ )) -$(eval $(call gb_CppunitTest_use_configuration,vcl_wmf_test)) +$(eval $(call gb_CppunitTest_use_configuration,emfio)) # See gb_CppunitTest__use_vcl (solenv/gbuild/CppunitTest.mk; headless): ifeq ($(USING_X11),TRUE) -$(call gb_CppunitTest_get_target,vcl_wmf_test): \ +$(call gb_CppunitTest_get_target,emfio): \ $(call gb_Library_get_target,desktop_detector) endif # Hack to suppress ASan ODR violation warnings about symbols present in both the # vcl objects linked into this test library and the vcl library (which gets # dynamically loaded during the test): -$(call gb_CppunitTest_get_target,vcl_wmf_test): \ +$(call gb_CppunitTest_get_target,emfio): \ EXTRA_ENV_VARS := \ ASAN_OPTIONS="$${ASAN_OPTIONS+$$ASAN_OPTIONS:}"detect_odr_violation=0 diff --git a/emfio/Module_emfio.mk b/emfio/Module_emfio.mk index 719bd0180628..c4d5ec70be9c 100644 --- a/emfio/Module_emfio.mk +++ b/emfio/Module_emfio.mk @@ -23,7 +23,8 @@ $(eval $(call gb_Module_add_targets,emfio,\ )) $(eval $(call gb_Module_add_check_targets,emfio,\ - CppunitTest_emfio \ + CppunitTest_emfio_emf_test \ + $(if $(MERGELIBS),,CppunitTest_emfio_wmf_test) \ )) # vim: set noet ts=4 sw=4: diff --git a/emfio/inc/mtftools.hxx b/emfio/inc/mtftools.hxx index 7442a3111f04..2d14d9cfe633 100644 --- a/emfio/inc/mtftools.hxx +++ b/emfio/inc/mtftools.hxx @@ -599,7 +599,7 @@ namespace emfio bool bDrawTo = false, bool bRecordPath = false ); - void DrawPolyBezier(tools::Polygon rPolygin, + void DrawPolyBezier(tools::Polygon rPolygon, bool bDrawTo, bool bRecordPath ); diff --git a/emfio/qa/cppunit/EmfImportTest.cxx b/emfio/qa/cppunit/emf/EmfImportTest.cxx similarity index 100% rename from emfio/qa/cppunit/EmfImportTest.cxx rename to emfio/qa/cppunit/emf/EmfImportTest.cxx diff --git a/emfio/qa/cppunit/data/fdo79679-2.emf b/emfio/qa/cppunit/emf/data/fdo79679-2.emf similarity index 100% rename from emfio/qa/cppunit/data/fdo79679-2.emf rename to emfio/qa/cppunit/emf/data/fdo79679-2.emf diff --git a/vcl/qa/cppunit/wmf/data/ETO_PDY.emf b/emfio/qa/cppunit/wmf/data/ETO_PDY.emf similarity index 100% rename from vcl/qa/cppunit/wmf/data/ETO_PDY.emf rename to emfio/qa/cppunit/wmf/data/ETO_PDY.emf diff --git a/vcl/qa/cppunit/wmf/data/ETO_PDY.wmf b/emfio/qa/cppunit/wmf/data/ETO_PDY.wmf similarity index 100% rename from vcl/qa/cppunit/wmf/data/ETO_PDY.wmf rename to emfio/qa/cppunit/wmf/data/ETO_PDY.wmf diff --git a/vcl/qa/cppunit/wmf/data/computer_mail.emf b/emfio/qa/cppunit/wmf/data/computer_mail.emf similarity index 100% rename from vcl/qa/cppunit/wmf/data/computer_mail.emf rename to emfio/qa/cppunit/wmf/data/computer_mail.emf diff --git a/vcl/qa/cppunit/wmf/data/image1.emf b/emfio/qa/cppunit/wmf/data/image1.emf similarity index 100% rename from vcl/qa/cppunit/wmf/data/image1.emf rename to emfio/qa/cppunit/wmf/data/image1.emf diff --git a/vcl/qa/cppunit/wmf/data/line_styles.emf b/emfio/qa/cppunit/wmf/data/line_styles.emf similarity index 100% rename from vcl/qa/cppunit/wmf/data/line_styles.emf rename to emfio/qa/cppunit/wmf/data/line_styles.emf diff --git a/vcl/qa/cppunit/wmf/data/sine_wave.emf b/emfio/qa/cppunit/wmf/data/sine_wave.emf similarity index 100% rename from vcl/qa/cppunit/wmf/data/sine_wave.emf rename to emfio/qa/cppunit/wmf/data/sine_wave.emf diff --git a/vcl/qa/cppunit/wmf/data/tdf39894.emf b/emfio/qa/cppunit/wmf/data/tdf39894.emf similarity index 100% rename from vcl/qa/cppunit/wmf/data/tdf39894.emf rename to emfio/qa/cppunit/wmf/data/tdf39894.emf diff --git a/vcl/qa/cppunit/wmf/data/tdf39894.wmf b/emfio/qa/cppunit/wmf/data/tdf39894.wmf similarity index 100% rename from vcl/qa/cppunit/wmf/data/tdf39894.wmf rename to emfio/qa/cppunit/wmf/data/tdf39894.wmf diff --git a/vcl/qa/cppunit/wmf/data/tdf93750.emf b/emfio/qa/cppunit/wmf/data/tdf93750.emf similarity index 100% rename from vcl/qa/cppunit/wmf/data/tdf93750.emf rename to emfio/qa/cppunit/wmf/data/tdf93750.emf diff --git a/vcl/qa/cppunit/wmf/data/visio_import_source.wmf b/emfio/qa/cppunit/wmf/data/visio_import_source.wmf similarity index 100% rename from vcl/qa/cppunit/wmf/data/visio_import_source.wmf rename to emfio/qa/cppunit/wmf/data/visio_import_source.wmf diff --git a/vcl/qa/cppunit/wmf/wmfimporttest.cxx b/emfio/qa/cppunit/wmf/wmfimporttest.cxx similarity index 98% rename from vcl/qa/cppunit/wmf/wmfimporttest.cxx rename to emfio/qa/cppunit/wmf/wmfimporttest.cxx index 96e11c0984d2..3c7520a7a2f2 100644 --- a/vcl/qa/cppunit/wmf/wmfimporttest.cxx +++ b/emfio/qa/cppunit/wmf/wmfimporttest.cxx @@ -23,6 +23,7 @@ #include <unotest/bootstrapfixturebase.hxx> #include <vcl/wmf.hxx> #include <vcl/metaact.hxx> +#include <mtftools.hxx> using namespace css; @@ -37,7 +38,7 @@ class WmfTest : public test::BootstrapFixtureBase, public XmlTestTools public: WmfTest() : - maDataUrl("/vcl/qa/cppunit/wmf/data/") + maDataUrl("/emfio/qa/cppunit/wmf/data/") {} // Hack around missing "once per class" setUp/tearDown in CppUnit; must be @@ -248,7 +249,7 @@ void WmfTest::testTdf99402() { // Symbol font should arrive with RTL_TEXTENCODING_SYMBOL encoding, // even if charset is OEM_CHARSET/DEFAULT_CHARSET in WMF - LOGFONTW logfontw; + emfio::LOGFONTW logfontw; logfontw.lfHeight = 0; logfontw.lfWidth = 0; logfontw.lfEscapement = 0; @@ -260,7 +261,7 @@ void WmfTest::testTdf99402() logfontw.lfPitchAndFamily = FF_ROMAN | DEFAULT_PITCH; logfontw.alfFaceName = "Symbol"; - WinMtfFontStyle fontStyle(logfontw); + emfio::WinMtfFontStyle fontStyle(logfontw); CPPUNIT_ASSERT_EQUAL(RTL_TEXTENCODING_SYMBOL, fontStyle.aFont.GetCharSet()); } diff --git a/emfio/source/emfuno/xemfparser.cxx b/emfio/source/emfuno/xemfparser.cxx index 433210c5ecd2..ff4dcccb6589 100644 --- a/emfio/source/emfuno/xemfparser.cxx +++ b/emfio/source/emfuno/xemfparser.cxx @@ -113,7 +113,7 @@ namespace emfio uno::Sequence< uno::Reference< ::graphic::XPrimitive2D > > XEmfParser::getDecomposition( const uno::Reference< ::io::XInputStream >& xEmfStream, - const OUString& aAbsolutePath, + const OUString& /*aAbsolutePath*/, const uno::Sequence< ::beans::PropertyValue >& rProperties) { drawinglayer::primitive2d::Primitive2DContainer aRetval; diff --git a/include/drawinglayer/primitive2d/metafileprimitive2d.hxx b/include/drawinglayer/primitive2d/metafileprimitive2d.hxx index e849e38b5752..a6d6c34338bd 100644 --- a/include/drawinglayer/primitive2d/metafileprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/metafileprimitive2d.hxx @@ -83,7 +83,7 @@ namespace drawinglayer virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const override; /// from MetafileAccessor - virtual bool accessMetafile(GDIMetaFile& rTargetMetafile) const; + virtual bool accessMetafile(GDIMetaFile& rTargetMetafile) const override; /// provide unique ID DeclPrimitive2DIDBlock() diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk index 54ba2bf027c6..d223555ae535 100644 --- a/vcl/Module_vcl.mk +++ b/vcl/Module_vcl.mk @@ -151,7 +151,6 @@ $(eval $(call gb_Module_add_check_targets,vcl,\ CppunitTest_vcl_mapmode \ CppunitTest_vcl_outdev \ CppunitTest_vcl_app_test \ - $(if $(MERGELIBS),,CppunitTest_vcl_wmf_test) \ CppunitTest_vcl_jpeg_read_write_test \ CppunitTest_vcl_svm_test \ CppunitTest_vcl_pdfexport \ _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits