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
99298d61
Kaydet (Commit)
99298d61
authored
Mar 23, 2012
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
add testcase for n#751054
üst
6776cb6f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
187 additions
and
0 deletions
+187
-0
CppunitTest_sw_subsequent_ooxmltok.mk
sw/CppunitTest_sw_subsequent_ooxmltok.mk
+89
-0
Module_sw.mk
sw/Module_sw.mk
+1
-0
n751054.docx
sw/qa/extras/ooxmltok/data/n751054.docx
+0
-0
ooxmltok.cxx
sw/qa/extras/ooxmltok/ooxmltok.cxx
+97
-0
No files found.
sw/CppunitTest_sw_subsequent_ooxmltok.mk
0 → 100644
Dosyayı görüntüle @
99298d61
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#*************************************************************************
# Version: MPL 1.1 / GPLv3+ / LGPLv3+
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License or as specified alternatively below. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Initial Developer of the Original Code is
# Miklos Vajna <vmiklos@suse.cz> (SUSE, Inc.)
# Portions created by the Initial Developer are Copyright (C) 2012 the
# Initial Developer. All Rights Reserved.
#
# Major Contributor(s):
#
# For minor contributions see the git repository.
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
#*************************************************************************
$(eval $(call gb_CppunitTest_CppunitTest,sw_subsequent_ooxmltok))
$(eval $(call gb_CppunitTest_add_exception_objects,sw_subsequent_ooxmltok, \
sw/qa/extras/ooxmltok/ooxmltok \
))
$(eval $(call gb_CppunitTest_add_linked_libs,sw_subsequent_ooxmltok, \
cppu \
sal \
test \
unotest \
vcl \
$(gb_STDLIBS) \
))
$(eval $(call gb_CppunitTest_add_api,sw_subsequent_ooxmltok,\
offapi \
udkapi \
))
$(eval $(call gb_CppunitTest_uses_ure,sw_subsequent_ooxmltok))
$(eval $(call gb_CppunitTest_add_type_rdbs,sw_subsequent_ooxmltok,\
types \
))
$(eval $(call gb_CppunitTest_add_components,sw_subsequent_ooxmltok,\
comphelper/util/comphelp \
configmgr/source/configmgr \
fileaccess/source/fileacc \
filter/source/config/cache/filterconfig1 \
framework/util/fwk \
i18npool/util/i18npool \
oox/util/oox \
package/source/xstor/xstor \
package/util/package2 \
sax/source/expatwrap/expwrap \
sax/source/fastparser/fastsax \
sw/util/sw \
sw/util/swd \
sw/util/msword \
sfx2/util/sfx \
svl/source/fsstor/fsstorage \
svtools/util/svt \
toolkit/util/tk \
ucb/source/core/ucb1 \
ucb/source/ucp/file/ucpfile1 \
unotools/util/utl \
unoxml/source/service/unoxml \
writerfilter/util/writerfilter \
))
$(eval $(call gb_CppunitTest_set_args,sw_subsequent_ooxmltok,\
--headless \
--protector unoexceptionprotector$(gb_Library_DLLEXT) unoexceptionprotector \
"-env:CONFIGURATION_LAYERS=xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry) module:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry/spool) xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/unittest/registry)" \
))
# vim: set noet sw=4 ts=4:
sw/Module_sw.mk
Dosyayı görüntüle @
99298d61
...
...
@@ -54,6 +54,7 @@ $(eval $(call gb_Module_add_check_targets,sw,\
$(eval $(call gb_Module_add_slowcheck_targets,sw,\
CppunitTest_sw_filters_test \
CppunitTest_sw_macros_test \
CppunitTest_sw_subsequent_ooxmltok \
CppunitTest_sw_subsequent_rtftok \
))
...
...
sw/qa/extras/ooxmltok/data/n751054.docx
0 → 100644
Dosyayı görüntüle @
99298d61
File added
sw/qa/extras/ooxmltok/ooxmltok.cxx
0 → 100644
Dosyayı görüntüle @
99298d61
/*
* Version: MPL 1.1 / GPLv3+ / LGPLv3+
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (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.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Initial Developer of the Original Code is
* Miklos Vajna <vmiklos@suse.cz> (SUSE, Inc.)
* Portions created by the Initial Developer are Copyright (C) 2012 the
* Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 3 or later (the "GPLv3+"), or
* the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
* in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
* instead of those above.
*/
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
#include <com/sun/star/text/TextContentAnchorType.hpp>
#include <test/bootstrapfixture.hxx>
#include <unotest/macros_test.hxx>
#include <vcl/svapp.hxx>
using
rtl
::
OString
;
using
rtl
::
OUString
;
using
rtl
::
OUStringBuffer
;
using
namespace
com
::
sun
::
star
;
class
OoxmlModelTest
:
public
test
::
BootstrapFixture
,
public
unotest
::
MacrosTest
{
public
:
virtual
void
setUp
();
virtual
void
tearDown
();
void
testN751054
();
CPPUNIT_TEST_SUITE
(
OoxmlModelTest
);
#if !defined(MACOSX) && !defined(WNT)
CPPUNIT_TEST
(
testN751054
);
#endif
CPPUNIT_TEST_SUITE_END
();
private
:
/// Load an OOXML file and make the document available via mxComponent.
void
load
(
const
OUString
&
rURL
);
uno
::
Reference
<
lang
::
XComponent
>
mxComponent
;
};
void
OoxmlModelTest
::
load
(
const
OUString
&
rFilename
)
{
mxComponent
=
loadFromDesktop
(
getURLFromSrc
(
"/sw/qa/extras/ooxmltok/data/"
)
+
rFilename
);
}
void
OoxmlModelTest
::
setUp
()
{
test
::
BootstrapFixture
::
setUp
();
mxDesktop
.
set
(
getMultiServiceFactory
()
->
createInstance
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.frame.Desktop"
))),
uno
::
UNO_QUERY
);
CPPUNIT_ASSERT
(
mxDesktop
.
is
());
}
void
OoxmlModelTest
::
tearDown
()
{
if
(
mxComponent
.
is
())
mxComponent
->
dispose
();
test
::
BootstrapFixture
::
tearDown
();
}
void
OoxmlModelTest
::
testN751054
()
{
load
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"n751054.docx"
)));
uno
::
Reference
<
drawing
::
XDrawPageSupplier
>
xDrawPageSupplier
(
mxComponent
,
uno
::
UNO_QUERY
);
uno
::
Reference
<
container
::
XIndexAccess
>
xDraws
(
xDrawPageSupplier
->
getDrawPage
(),
uno
::
UNO_QUERY
);
uno
::
Reference
<
beans
::
XPropertySet
>
xPropertySet
(
xDraws
->
getByIndex
(
0
),
uno
::
UNO_QUERY
);
text
::
TextContentAnchorType
eValue
;
xPropertySet
->
getPropertyValue
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"AnchorType"
)))
>>=
eValue
;
CPPUNIT_ASSERT
(
eValue
!=
text
::
TextContentAnchorType_AS_CHARACTER
);
}
CPPUNIT_TEST_SUITE_REGISTRATION
(
OoxmlModelTest
);
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