Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
f9e81786
Kaydet (Commit)
f9e81786
authored
May 15, 2014
tarafından
Tomaž Vajngerl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
wmf: test that non-placeable WMF uses correct sizes
Change-Id: I546d654726483b40ce4d981bc66377c8a3df6194
üst
fb688d64
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
142 additions
and
0 deletions
+142
-0
CppunitTest_vcl_wmf_test.mk
vcl/CppunitTest_vcl_wmf_test.mk
+57
-0
Module_vcl.mk
vcl/Module_vcl.mk
+1
-0
visio_import_source.wmf
vcl/qa/cppunit/wmf/data/visio_import_source.wmf
+0
-0
wmfimporttest.cxx
vcl/qa/cppunit/wmf/wmfimporttest.cxx
+84
-0
No files found.
vcl/CppunitTest_vcl_wmf_test.mk
0 → 100644
Dosyayı görüntüle @
f9e81786
# -*- 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,vcl_wmf_test))
$(eval $(call gb_CppunitTest_add_exception_objects,vcl_wmf_test, \
vcl/qa/cppunit/wmf/wmfimporttest \
))
$(eval $(call gb_CppunitTest_use_externals,vcl_wmf_test,\
boost_headers \
libxml2 \
))
$(eval $(call gb_CppunitTest_set_include,vcl_wmf_test,\
$$(INCLUDE) \
-I$(SRCDIR)/vcl/inc \
))
$(eval $(call gb_CppunitTest_use_libraries,vcl_wmf_test, \
comphelper \
cppu \
cppuhelper \
sal \
svt \
test \
tl \
unotest \
vcl \
utl \
$(gb_UWINAPI) \
))
$(eval $(call gb_CppunitTest_use_api,vcl_wmf_test,\
udkapi \
offapi \
))
$(eval $(call gb_CppunitTest_use_ure,vcl_wmf_test))
$(eval $(call gb_CppunitTest_use_components,vcl_wmf_test,\
configmgr/source/configmgr \
i18npool/util/i18npool \
ucb/source/core/ucb1 \
unotools/util/utl \
))
$(eval $(call gb_CppunitTest_use_configuration,vcl_wmf_test))
# vim: set noet sw=4 ts=4:
vcl/Module_vcl.mk
Dosyayı görüntüle @
f9e81786
...
@@ -92,6 +92,7 @@ $(eval $(call gb_Module_add_check_targets,vcl,\
...
@@ -92,6 +92,7 @@ $(eval $(call gb_Module_add_check_targets,vcl,\
CppunitTest_vcl_complextext \
CppunitTest_vcl_complextext \
CppunitTest_vcl_filters_test \
CppunitTest_vcl_filters_test \
CppunitTest_vcl_app_test \
CppunitTest_vcl_app_test \
CppunitTest_vcl_wmf_test \
))
))
# vim: set noet sw=4 ts=4:
# vim: set noet sw=4 ts=4:
vcl/qa/cppunit/wmf/data/visio_import_source.wmf
0 → 100644
Dosyayı görüntüle @
f9e81786
File added
vcl/qa/cppunit/wmf/wmfimporttest.cxx
0 → 100644
Dosyayı görüntüle @
f9e81786
/* -*- 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 .
*/
#include <test/bootstrapfixture.hxx>
#include <test/xmltesttools.hxx>
#include <test/mtfxmldump.hxx>
#include <vcl/wmf.hxx>
#include <vcl/metaact.hxx>
using
namespace
css
;
class
WmfTest
:
public
test
::
BootstrapFixture
,
public
XmlTestTools
{
public
:
WmfTest
()
:
BootstrapFixture
(
true
,
false
)
{}
void
runTest
();
void
testNonPlaceableWmf
();
CPPUNIT_TEST_SUITE
(
WmfTest
);
CPPUNIT_TEST
(
testNonPlaceableWmf
);
CPPUNIT_TEST_SUITE_END
();
};
void
WmfTest
::
testNonPlaceableWmf
()
{
OUString
aUrl
=
getURLFromSrc
(
"/vcl/qa/cppunit/wmf/data/"
);
SvFileStream
aFileStream
(
aUrl
+
"visio_import_source.wmf"
,
STREAM_READ
);
GDIMetaFile
aGDIMetaFile
;
ReadWindowMetafile
(
aFileStream
,
aGDIMetaFile
);
boost
::
scoped_ptr
<
SvMemoryStream
>
aStream
(
new
SvMemoryStream
);
MetafileXmlDump
dumper
(
*
aStream
);
dumper
.
filterAllActionTypes
();
dumper
.
filterActionType
(
META_POLYLINE_ACTION
,
false
);
dumper
.
dump
(
aGDIMetaFile
);
aStream
->
Seek
(
STREAM_SEEK_TO_BEGIN
);
xmlDocPtr
pDoc
=
parseXmlStream
(
aStream
.
get
());
CPPUNIT_ASSERT
(
pDoc
);
assertXPath
(
pDoc
,
"/metafile/polyline[1]/point[1]"
,
"x"
,
"16798"
);
assertXPath
(
pDoc
,
"/metafile/polyline[1]/point[1]"
,
"y"
,
"1003"
);
assertXPath
(
pDoc
,
"/metafile/polyline[1]/point[2]"
,
"x"
,
"16798"
);
assertXPath
(
pDoc
,
"/metafile/polyline[1]/point[2]"
,
"y"
,
"7507"
);
assertXPath
(
pDoc
,
"/metafile/polyline[1]/point[3]"
,
"x"
,
"26090"
);
assertXPath
(
pDoc
,
"/metafile/polyline[1]/point[3]"
,
"y"
,
"7507"
);
assertXPath
(
pDoc
,
"/metafile/polyline[1]/point[4]"
,
"x"
,
"26090"
);
assertXPath
(
pDoc
,
"/metafile/polyline[1]/point[4]"
,
"y"
,
"1003"
);
assertXPath
(
pDoc
,
"/metafile/polyline[1]/point[5]"
,
"x"
,
"16798"
);
assertXPath
(
pDoc
,
"/metafile/polyline[1]/point[5]"
,
"y"
,
"1003"
);
}
CPPUNIT_TEST_SUITE_REGISTRATION
(
WmfTest
);
CPPUNIT_PLUGIN_IMPLEMENT
();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment