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
c44e6855
Kaydet (Commit)
c44e6855
authored
Mar 14, 2013
tarafından
Michael Meeks
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
xmloff: at least do something to test styles.
Change-Id: I7982f162ef95a9f10501c860b6f19865bf34744b
üst
9d0e346d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
11 deletions
+30
-11
xmlaustp.hxx
xmloff/inc/xmloff/xmlaustp.hxx
+1
-0
uxmloff.cxx
xmloff/qa/unit/uxmloff.cxx
+29
-11
No files found.
xmloff/inc/xmloff/xmlaustp.hxx
Dosyayı görüntüle @
c44e6855
...
...
@@ -37,6 +37,7 @@ namespace com { namespace sun { namespace star { namespace uno
class
XMLOFF_DLLPUBLIC
SvXMLAutoStylePoolP
:
public
UniRefBase
{
friend
class
Test
;
friend
class
SvXMLAutoStylePoolP_Impl
;
SvXMLAutoStylePoolP_Impl
*
pImpl
;
...
...
xmloff/qa/unit/uxmloff.cxx
Dosyayı görüntüle @
c44e6855
...
...
@@ -11,14 +11,17 @@
#include <test/bootstrapfixture.hxx>
#include <xmloff/xmlexp.hxx>
#include <xmloff/xmltoken.hxx>
#include <xmloff/xmlaustp.hxx>
#include "SchXMLExport.hxx"
#include "XMLChartPropertySetMapper.hxx"
#include "impastpl.hxx"
#include <comphelper/processfactory.hxx>
#include <com/sun/star/util/MeasureUnit.hpp>
using
namespace
::
xmloff
::
token
;
using
namespace
::
com
::
sun
::
star
;
namespace
{
class
Test
:
public
test
::
BootstrapFixture
{
public
:
Test
();
...
...
@@ -26,16 +29,15 @@ public:
virtual
void
setUp
();
virtual
void
tearDown
();
void
test
Something
();
void
test
AutoStylePool
();
CPPUNIT_TEST_SUITE
(
Test
);
CPPUNIT_TEST
(
test
Something
);
CPPUNIT_TEST
(
test
AutoStylePool
);
CPPUNIT_TEST_SUITE_END
();
private
:
SvXMLExport
*
pExport
;
};
Test
::
Test
()
:
pExport
(
NULL
)
{
...
...
@@ -55,17 +57,33 @@ void Test::tearDown()
BootstrapFixture
::
tearDown
();
}
void
Test
::
test
Something
()
void
Test
::
test
AutoStylePool
()
{
OUString
s1
(
"A"
);
OUString
s2
(
"B"
);
CPPUNIT_ASSERT_MESSAGE
(
"these strings are supposed to be different!"
,
s1
!=
s2
);
UniReference
<
SvXMLAutoStylePoolP
>
xPool
(
new
SvXMLAutoStylePoolP
(
*
pExport
)
);
UniReference
<
XMLPropertySetMapper
>
xSetMapper
(
new
XMLChartPropertySetMapper
);
UniReference
<
XMLChartExportPropertyMapper
>
xExportPropMapper
(
new
XMLChartExportPropertyMapper
(
xSetMapper
,
*
pExport
)
);
xPool
->
AddFamily
(
XML_STYLE_FAMILY_TEXT_PARAGRAPH
,
GetXMLToken
(
XML_PARAGRAPH
),
xExportPropMapper
.
get
(),
OUString
(
"Bob"
)
);
std
::
vector
<
XMLPropertyState
>
aProperties
;
OUString
aName
=
xPool
->
Add
(
XML_STYLE_FAMILY_TEXT_PARAGRAPH
,
""
,
aProperties
);
// not that interesting but worth checking
CPPUNIT_ASSERT_MESSAGE
(
"style / naming changed"
,
aName
==
"Bob1"
);
// find ourselves again:
OUString
aSameName
=
xPool
->
Find
(
XML_STYLE_FAMILY_TEXT_PARAGRAPH
,
""
,
aProperties
);
CPPUNIT_ASSERT_MESSAGE
(
"same style not found"
,
aSameName
==
aName
);
}
CPPUNIT_TEST_SUITE_REGISTRATION
(
Test
);
}
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