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
fd2cb15b
Kaydet (Commit)
fd2cb15b
authored
Nis 15, 2012
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sw: also test RTF export of zoom level
üst
edcf5270
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
187 additions
and
15 deletions
+187
-15
CppunitTest_sw_subsequent_rtfexport.mk
sw/CppunitTest_sw_subsequent_rtfexport.mk
+82
-0
Module_sw.mk
sw/Module_sw.mk
+1
-0
zoom.rtf
sw/qa/extras/rtfexport/data/zoom.rtf
+0
-0
rtfexport.cxx
sw/qa/extras/rtfexport/rtfexport.cxx
+104
-0
rtftok.cxx
sw/qa/extras/rtftok/rtftok.cxx
+0
-15
No files found.
sw/CppunitTest_sw_subsequent_rtfexport.mk
0 → 100644
Dosyayı görüntüle @
fd2cb15b
# -*- 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_rtfexport))
$(eval $(call gb_CppunitTest_add_exception_objects,sw_subsequent_rtfexport, \
sw/qa/extras/rtfexport/rtfexport \
))
$(eval $(call gb_CppunitTest_use_libraries,sw_subsequent_rtfexport, \
cppu \
sal \
test \
unotest \
utl \
tl \
$(gb_STDLIBS) \
))
$(eval $(call gb_CppunitTest_use_api,sw_subsequent_rtfexport,\
offapi \
udkapi \
))
$(eval $(call gb_CppunitTest_use_ure,sw_subsequent_rtfexport))
$(eval $(call gb_CppunitTest_use_components,sw_subsequent_rtfexport,\
comphelper/util/comphelp \
configmgr/source/configmgr \
fileaccess/source/fileacc \
filter/source/config/cache/filterconfig1 \
framework/util/fwk \
i18npool/util/i18npool \
package/util/package2 \
sfx2/util/sfx \
svl/source/fsstor/fsstorage \
sw/util/msword \
sw/util/sw \
sw/util/swd \
toolkit/util/tk \
ucb/source/core/ucb1 \
ucb/source/ucp/file/ucpfile1 \
unoxml/source/service/unoxml \
writerfilter/util/writerfilter \
))
$(eval $(call gb_CppunitTest_use_configuration,sw_subsequent_rtfexport))
$(eval $(call gb_CppunitTest_use_filter_configuration,sw_subsequent_rtfexport))
$(eval $(call gb_CppunitTest_use_extra_configuration,sw_subsequent_rtfexport,\
$(OUTDIR)/unittest/registry \
))
# vim: set noet sw=4 ts=4:
sw/Module_sw.mk
Dosyayı görüntüle @
fd2cb15b
...
@@ -55,6 +55,7 @@ $(eval $(call gb_Module_add_slowcheck_targets,sw,\
...
@@ -55,6 +55,7 @@ $(eval $(call gb_Module_add_slowcheck_targets,sw,\
CppunitTest_sw_filters_test \
CppunitTest_sw_filters_test \
CppunitTest_sw_macros_test \
CppunitTest_sw_macros_test \
CppunitTest_sw_subsequent_ooxmltok \
CppunitTest_sw_subsequent_ooxmltok \
CppunitTest_sw_subsequent_rtfexport \
CppunitTest_sw_subsequent_rtftok \
CppunitTest_sw_subsequent_rtftok \
))
))
...
...
sw/qa/extras/rtf
tok
/data/zoom.rtf
→
sw/qa/extras/rtf
export
/data/zoom.rtf
Dosyayı görüntüle @
fd2cb15b
File moved
sw/qa/extras/rtfexport/rtfexport.cxx
0 → 100644
Dosyayı görüntüle @
fd2cb15b
/*
* 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/frame/XStorable.hpp>
#include <com/sun/star/view/XViewSettingsSupplier.hpp>
#include <test/bootstrapfixture.hxx>
#include <unotest/macros_test.hxx>
#include <unotools/tempfile.hxx>
#include <vcl/svapp.hxx>
using
rtl
::
OString
;
using
rtl
::
OUString
;
using
rtl
::
OUStringBuffer
;
using
namespace
com
::
sun
::
star
;
class
RtfExportTest
:
public
test
::
BootstrapFixture
,
public
unotest
::
MacrosTest
{
public
:
virtual
void
setUp
();
virtual
void
tearDown
();
void
testZoom
();
CPPUNIT_TEST_SUITE
(
RtfExportTest
);
#if !defined(MACOSX) && !defined(WNT)
CPPUNIT_TEST
(
testZoom
);
#endif
CPPUNIT_TEST_SUITE_END
();
private
:
void
roundtrip
(
const
OUString
&
rURL
);
uno
::
Reference
<
lang
::
XComponent
>
mxComponent
;
};
void
RtfExportTest
::
roundtrip
(
const
OUString
&
rFilename
)
{
uno
::
Reference
<
lang
::
XComponent
>
xImported
=
loadFromDesktop
(
getURLFromSrc
(
"/sw/qa/extras/rtfexport/data/"
)
+
rFilename
);
uno
::
Reference
<
frame
::
XStorable
>
xStorable
(
xImported
,
uno
::
UNO_QUERY
);
uno
::
Sequence
<
beans
::
PropertyValue
>
aArgs
(
1
);
aArgs
[
0
].
Name
=
"FilterName"
;
aArgs
[
0
].
Value
<<=
OUString
(
"Rich Text Format"
);
utl
::
TempFile
aTempFile
;
aTempFile
.
EnableKillingFile
();
xStorable
->
storeToURL
(
aTempFile
.
GetURL
(),
aArgs
);
mxComponent
=
loadFromDesktop
(
aTempFile
.
GetURL
());
}
void
RtfExportTest
::
setUp
()
{
test
::
BootstrapFixture
::
setUp
();
mxDesktop
.
set
(
getMultiServiceFactory
()
->
createInstance
(
"com.sun.star.frame.Desktop"
),
uno
::
UNO_QUERY
);
CPPUNIT_ASSERT
(
mxDesktop
.
is
());
}
void
RtfExportTest
::
tearDown
()
{
if
(
mxComponent
.
is
())
mxComponent
->
dispose
();
test
::
BootstrapFixture
::
tearDown
();
}
void
RtfExportTest
::
testZoom
()
{
roundtrip
(
"zoom.rtf"
);
uno
::
Reference
<
frame
::
XModel
>
xModel
(
mxComponent
,
uno
::
UNO_QUERY
);
uno
::
Reference
<
view
::
XViewSettingsSupplier
>
xViewSettingsSupplier
(
xModel
->
getCurrentController
(),
uno
::
UNO_QUERY
);
uno
::
Reference
<
beans
::
XPropertySet
>
xPropertySet
(
xViewSettingsSupplier
->
getViewSettings
());
sal_Int16
nValue
=
0
;
xPropertySet
->
getPropertyValue
(
"ZoomValue"
)
>>=
nValue
;
CPPUNIT_ASSERT_EQUAL
(
sal_Int16
(
42
),
nValue
);
}
CPPUNIT_TEST_SUITE_REGISTRATION
(
RtfExportTest
);
CPPUNIT_PLUGIN_IMPLEMENT
();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sw/qa/extras/rtftok/rtftok.cxx
Dosyayı görüntüle @
fd2cb15b
...
@@ -42,7 +42,6 @@
...
@@ -42,7 +42,6 @@
#include <com/sun/star/text/XTextFramesSupplier.hpp>
#include <com/sun/star/text/XTextFramesSupplier.hpp>
#include <com/sun/star/text/XTextTablesSupplier.hpp>
#include <com/sun/star/text/XTextTablesSupplier.hpp>
#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
#include <com/sun/star/view/XViewSettingsSupplier.hpp>
#include <rtl/oustringostreaminserter.hxx>
#include <rtl/oustringostreaminserter.hxx>
#include <test/bootstrapfixture.hxx>
#include <test/bootstrapfixture.hxx>
...
@@ -81,7 +80,6 @@ public:
...
@@ -81,7 +80,6 @@ public:
void
testFdo47107
();
void
testFdo47107
();
void
testFdo45182
();
void
testFdo45182
();
void
testFdo44176
();
void
testFdo44176
();
void
testZoom
();
void
testFdo39053
();
void
testFdo39053
();
CPPUNIT_TEST_SUITE
(
RtfModelTest
);
CPPUNIT_TEST_SUITE
(
RtfModelTest
);
...
@@ -105,7 +103,6 @@ public:
...
@@ -105,7 +103,6 @@ public:
CPPUNIT_TEST
(
testFdo47107
);
CPPUNIT_TEST
(
testFdo47107
);
CPPUNIT_TEST
(
testFdo45182
);
CPPUNIT_TEST
(
testFdo45182
);
CPPUNIT_TEST
(
testFdo44176
);
CPPUNIT_TEST
(
testFdo44176
);
CPPUNIT_TEST
(
testZoom
);
CPPUNIT_TEST
(
testFdo39053
);
CPPUNIT_TEST
(
testFdo39053
);
#endif
#endif
CPPUNIT_TEST_SUITE_END
();
CPPUNIT_TEST_SUITE_END
();
...
@@ -538,18 +535,6 @@ void RtfModelTest::testFdo44176()
...
@@ -538,18 +535,6 @@ void RtfModelTest::testFdo44176()
CPPUNIT_ASSERT_EQUAL
(
nFirstTop
,
nDefaultTop
+
nDefaultHeader
);
CPPUNIT_ASSERT_EQUAL
(
nFirstTop
,
nDefaultTop
+
nDefaultHeader
);
}
}
void
RtfModelTest
::
testZoom
()
{
load
(
"zoom.rtf"
);
uno
::
Reference
<
frame
::
XModel
>
xModel
(
mxComponent
,
uno
::
UNO_QUERY
);
uno
::
Reference
<
view
::
XViewSettingsSupplier
>
xViewSettingsSupplier
(
xModel
->
getCurrentController
(),
uno
::
UNO_QUERY
);
uno
::
Reference
<
beans
::
XPropertySet
>
xPropertySet
(
xViewSettingsSupplier
->
getViewSettings
());
sal_Int16
nValue
=
0
;
xPropertySet
->
getPropertyValue
(
"ZoomValue"
)
>>=
nValue
;
CPPUNIT_ASSERT_EQUAL
(
sal_Int16
(
42
),
nValue
);
}
void
RtfModelTest
::
testFdo39053
()
void
RtfModelTest
::
testFdo39053
()
{
{
load
(
"fdo39053.rtf"
);
load
(
"fdo39053.rtf"
);
...
...
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