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
dc92bac5
Kaydet (Commit)
dc92bac5
authored
Nis 26, 2013
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#58949 testcase
Change-Id: I584efc83ef1643a683757ac369cd140f52610293
üst
6238cfe2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
4 deletions
+34
-4
CppunitTest_sw_odfexport.mk
sw/CppunitTest_sw_odfexport.mk
+9
-4
fdo58949.docx
sw/qa/extras/odfexport/data/fdo58949.docx
+0
-0
odfexport.cxx
sw/qa/extras/odfexport/odfexport.cxx
+25
-0
No files found.
sw/CppunitTest_sw_odfexport.mk
Dosyayı görüntüle @
dc92bac5
...
...
@@ -49,28 +49,33 @@ $(eval $(call gb_CppunitTest_use_api,sw_odfexport,\
$(eval $(call gb_CppunitTest_use_ure,sw_odfexport))
$(eval $(call gb_CppunitTest_use_components,sw_odfexport,\
basic/util/sb \
basic/util/sb \
comphelper/util/comphelp \
configmgr/source/configmgr \
embeddedobj/util/embobj \
fileaccess/source/fileacc \
filter/source/config/cache/filterconfig1 \
framework/util/fwk \
i18npool/util/i18npool \
linguistic/source/lng \
package/util/package2
\
oox/util/oox
\
package/source/xstor/xstor \
sw/util/sw \
sw/util/swd \
package/util/package2 \
sax/source/expatwrap/expwrap \
sax/source/fastparser/fastsax \
sfx2/util/sfx \
starmath/util/sm \
svl/source/fsstor/fsstorage \
svtools/util/svt \
sw/util/sw \
sw/util/swd \
toolkit/util/tk \
ucb/source/core/ucb1 \
ucb/source/ucp/file/ucpfile1 \
unotools/util/utl \
unoxml/source/service/unoxml \
uui/util/uui \
writerfilter/util/writerfilter \
$(if $(filter DESKTOP,$(BUILD_TYPE)),xmlhelp/util/ucpchelp1) \
xmloff/util/xo \
))
...
...
sw/qa/extras/odfexport/data/fdo58949.docx
0 → 100644
Dosyayı görüntüle @
dc92bac5
File added
sw/qa/extras/odfexport/odfexport.cxx
Dosyayı görüntüle @
dc92bac5
...
...
@@ -17,6 +17,7 @@ public:
void
testFirstHeaderFooter
();
void
testTextframeGradient
();
void
testFdo60769
();
void
testFdo58949
();
CPPUNIT_TEST_SUITE
(
Test
);
#if !defined(MACOSX) && !defined(WNT)
...
...
@@ -35,6 +36,7 @@ void Test::run()
{
"first-header-footer.odt"
,
&
Test
::
testFirstHeaderFooter
},
{
"textframe-gradient.odt"
,
&
Test
::
testTextframeGradient
},
{
"fdo60769.odt"
,
&
Test
::
testFdo60769
},
{
"fdo58949.docx"
,
&
Test
::
testFdo58949
},
};
header
();
for
(
unsigned
int
i
=
0
;
i
<
SAL_N_ELEMENTS
(
aMethods
);
++
i
)
...
...
@@ -142,6 +144,29 @@ void Test::testFdo60769()
}
}
void
Test
::
testFdo58949
()
{
/*
* The problem was that the exporter didn't insert "Obj102" to the
* resulting zip file. No idea how to check for "broken" (missing OLE data
* and replacement image) OLE objects using UNO, so we'll check the zip file directly.
*/
// Create the zip file.
utl
::
TempFile
aTempFile
;
aTempFile
.
EnableKillingFile
();
uno
::
Reference
<
frame
::
XStorable
>
xStorable
(
mxComponent
,
uno
::
UNO_QUERY
);
uno
::
Sequence
<
beans
::
PropertyValue
>
aFilterArgs
(
1
);
aFilterArgs
[
0
].
Name
=
"FilterName"
;
aFilterArgs
[
0
].
Value
<<=
OUString
(
"writer8"
);
xStorable
->
storeToURL
(
aTempFile
.
GetURL
(),
aFilterArgs
);
uno
::
Sequence
<
uno
::
Any
>
aArgs
(
1
);
aArgs
[
0
]
<<=
OUString
(
aTempFile
.
GetURL
());
uno
::
Reference
<
container
::
XNameAccess
>
xNameAccess
(
m_xSFactory
->
createInstanceWithArguments
(
"com.sun.star.packages.zip.ZipFileAccess"
,
aArgs
),
uno
::
UNO_QUERY
);
CPPUNIT_ASSERT_EQUAL
(
true
,
bool
(
xNameAccess
->
hasByName
(
"Obj102"
)));
}
CPPUNIT_TEST_SUITE_REGISTRATION
(
Test
);
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