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
21e573d6
Kaydet (Commit)
21e573d6
authored
Haz 15, 2013
tarafından
Michael Meeks
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
initial attempt at text measuring unit test: linux only.
Change-Id: I11a1845350e3404f348be1321571b19d816426a3
üst
f29966b2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
120 additions
and
0 deletions
+120
-0
CppunitTest_vcl_complextext.mk
vcl/CppunitTest_vcl_complextext.mk
+44
-0
Module_vcl.mk
vcl/Module_vcl.mk
+1
-0
complextext.cxx
vcl/qa/cppunit/complextext.cxx
+75
-0
No files found.
vcl/CppunitTest_vcl_complextext.mk
0 → 100644
Dosyayı görüntüle @
21e573d6
# -*- 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_complextext))
$(eval $(call gb_CppunitTest_add_exception_objects,vcl_complextext, \
vcl/qa/cppunit/complextext \
))
$(eval $(call gb_CppunitTest_use_libraries,vcl_complextext, \
comphelper \
cppu \
cppuhelper \
sal \
svt \
test \
tl \
unotest \
vcl \
$(gb_UWINAPI) \
))
$(eval $(call gb_CppunitTest_use_api,vcl_complextext,\
udkapi \
offapi \
))
$(eval $(call gb_CppunitTest_use_ure,vcl_complextext))
$(eval $(call gb_CppunitTest_use_components,vcl_complextext,\
configmgr/source/configmgr \
i18npool/util/i18npool \
ucb/source/core/ucb1 \
))
$(eval $(call gb_CppunitTest_use_configuration,vcl_complextext))
# vim: set noet sw=4 ts=4:
vcl/Module_vcl.mk
Dosyayı görüntüle @
21e573d6
...
...
@@ -82,6 +82,7 @@ $(eval $(call gb_Module_add_targets,vcl,\
endif
$(eval $(call gb_Module_add_check_targets,vcl,\
CppunitTest_vcl_complextext \
CppunitTest_vcl_filters_test \
))
...
...
vcl/qa/cppunit/complextext.cxx
0 → 100644
Dosyayı görüntüle @
21e573d6
/* -*- 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/.
*/
#include <unotest/filters-test.hxx>
#include <test/bootstrapfixture.hxx>
#include <vcl/wrkwin.hxx>
#include <osl/file.hxx>
#include <osl/process.h>
class
VclComplexTextTest
:
public
test
::
BootstrapFixture
{
public
:
VclComplexTextTest
()
:
BootstrapFixture
(
true
,
false
)
{}
/// Play with font measuring etc.
void
testArabic
();
CPPUNIT_TEST_SUITE
(
VclComplexTextTest
);
CPPUNIT_TEST
(
testArabic
);
CPPUNIT_TEST_SUITE_END
();
};
void
VclComplexTextTest
::
testArabic
()
{
#if !defined (LINUX)
return
;
#else // only tested on Linux so far
OUString
aOneTwoThree
(
"واحِدْ إثٍنين ثلاثةٌ"
);
Window
*
pWin
=
new
WorkWindow
(
(
Window
*
)
NULL
);
CPPUNIT_ASSERT
(
pWin
!=
NULL
);
OutputDevice
*
pOutDev
=
static_cast
<
OutputDevice
*
>
(
pWin
);
Font
aFont
=
OutputDevice
::
GetDefaultFont
(
DEFAULTFONT_CTL_SPREADSHEET
,
LANGUAGE_ARABIC_SAUDI_ARABIA
,
DEFAULTFONT_FLAGS_ONLYONE
,
0
);
pOutDev
->
SetFont
(
aFont
);
// normal orientation
Rectangle
aInput
;
Rectangle
aRect
=
pOutDev
->
GetTextRect
(
aInput
,
aOneTwoThree
);
// now rotate 270 degress
Font
aRotated
(
aFont
);
aRotated
.
SetOrientation
(
2700
);
pOutDev
->
SetFont
(
aRotated
);
Rectangle
aRectRot
=
pOutDev
->
GetTextRect
(
aInput
,
aOneTwoThree
);
// Check that we did do the rotation ...
#if 0
fprintf( stderr, "%ld %ld %ld %ld\n",
aRect.GetWidth(), aRect.GetHeight(),
aRectRot.GetWidth(), aRectRot.GetHeight() );
CPPUNIT_ASSERT( aRectRot.GetWidth() == aRect.GetHeight() );
CPPUNIT_ASSERT( aRectRot.GetHeight() == aRect.GetWidth() );
#else
(
void
)
aRect
;
(
void
)
aRectRot
;
#endif
#endif
}
CPPUNIT_TEST_SUITE_REGISTRATION
(
VclComplexTextTest
);
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