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
6ca69fc4
Kaydet (Commit)
6ca69fc4
authored
Tem 19, 2014
tarafından
Tomaž Vajngerl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bnc#881024 test font size at world transform
Change-Id: If9b09b69ccd890e45d963422ccedb711585f6434
üst
a34e2e08
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
0 deletions
+33
-0
image1.emf
vcl/qa/cppunit/wmf/data/image1.emf
+0
-0
wmfimporttest.cxx
vcl/qa/cppunit/wmf/wmfimporttest.cxx
+33
-0
No files found.
vcl/qa/cppunit/wmf/data/image1.emf
0 → 100644
Dosyayı görüntüle @
6ca69fc4
File added
vcl/qa/cppunit/wmf/wmfimporttest.cxx
Dosyayı görüntüle @
6ca69fc4
...
@@ -43,11 +43,14 @@ public:
...
@@ -43,11 +43,14 @@ public:
void
testNonPlaceableWmf
();
void
testNonPlaceableWmf
();
void
testSine
();
void
testSine
();
void
testEmfProblem
();
void
testEmfProblem
();
void
testWorldTransformFontSize
();
CPPUNIT_TEST_SUITE
(
WmfTest
);
CPPUNIT_TEST_SUITE
(
WmfTest
);
CPPUNIT_TEST
(
testNonPlaceableWmf
);
CPPUNIT_TEST
(
testNonPlaceableWmf
);
CPPUNIT_TEST
(
testSine
);
CPPUNIT_TEST
(
testSine
);
CPPUNIT_TEST
(
testEmfProblem
);
CPPUNIT_TEST
(
testEmfProblem
);
CPPUNIT_TEST
(
testWorldTransformFontSize
);
CPPUNIT_TEST_SUITE_END
();
CPPUNIT_TEST_SUITE_END
();
};
};
...
@@ -123,6 +126,36 @@ void WmfTest::testEmfProblem()
...
@@ -123,6 +126,36 @@ void WmfTest::testEmfProblem()
assertXPath
(
pDoc
,
"/metafile/sectrectclipregion[1]"
,
"right"
,
"1876"
);
assertXPath
(
pDoc
,
"/metafile/sectrectclipregion[1]"
,
"right"
,
"1876"
);
}
}
void
WmfTest
::
testWorldTransformFontSize
()
{
SvFileStream
aFileStream
(
getFullUrl
(
"image1.emf"
),
STREAM_READ
);
GDIMetaFile
aGDIMetaFile
;
ReadWindowMetafile
(
aFileStream
,
aGDIMetaFile
);
MetafileXmlDump
dumper
;
dumper
.
filterAllActionTypes
();
dumper
.
filterActionType
(
META_FONT_ACTION
,
false
);
xmlDocPtr
pDoc
=
dumper
.
dumpAndParse
(
aGDIMetaFile
);
CPPUNIT_ASSERT
(
pDoc
);
assertXPath
(
pDoc
,
"/metafile/font"
,
8
);
assertXPath
(
pDoc
,
"/metafile/font[1]"
,
"color"
,
"#595959"
);
assertXPath
(
pDoc
,
"/metafile/font[1]"
,
"width"
,
"0"
);
assertXPath
(
pDoc
,
"/metafile/font[1]"
,
"height"
,
"389"
);
assertXPath
(
pDoc
,
"/metafile/font[1]"
,
"orientation"
,
"0"
);
assertXPath
(
pDoc
,
"/metafile/font[1]"
,
"weight"
,
"bold"
);
// World transform should not affect font size. Rotating text for 90 degrees
// should not exchange font width and height.
assertXPath
(
pDoc
,
"/metafile/font[3]"
,
"color"
,
"#000000"
);
assertXPath
(
pDoc
,
"/metafile/font[3]"
,
"width"
,
"0"
);
assertXPath
(
pDoc
,
"/metafile/font[3]"
,
"height"
,
"530"
);
assertXPath
(
pDoc
,
"/metafile/font[3]"
,
"orientation"
,
"900"
);
assertXPath
(
pDoc
,
"/metafile/font[3]"
,
"weight"
,
"normal"
);
}
CPPUNIT_TEST_SUITE_REGISTRATION
(
WmfTest
);
CPPUNIT_TEST_SUITE_REGISTRATION
(
WmfTest
);
CPPUNIT_PLUGIN_IMPLEMENT
();
CPPUNIT_PLUGIN_IMPLEMENT
();
...
...
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