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
bcf8dc3d
Kaydet (Commit)
bcf8dc3d
authored
Eyl 17, 2014
tarafından
Matúš Kukan
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sw: html import test: local images shouldn't be file links (bnc#580834)
Change-Id: Id35e03a3f814609e40e4beea778e66cce39054d1
üst
3914a711
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
115 additions
and
0 deletions
+115
-0
CppunitTest_sw_htmlimport.mk
sw/CppunitTest_sw_htmlimport.mk
+56
-0
Module_sw.mk
sw/Module_sw.mk
+1
-0
picture.html
sw/qa/extras/htmlimport/data/picture.html
+23
-0
htmlimport.cxx
sw/qa/extras/htmlimport/htmlimport.cxx
+35
-0
No files found.
sw/CppunitTest_sw_htmlimport.mk
0 → 100644
Dosyayı görüntüle @
bcf8dc3d
# -*- 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,sw_htmlimport))
$(eval $(call gb_CppunitTest_add_exception_objects,sw_htmlimport, \
sw/qa/extras/htmlimport/htmlimport \
))
$(eval $(call gb_CppunitTest_use_libraries,sw_htmlimport, \
comphelper \
cppu \
cppuhelper \
i18nlangtag \
sal \
sw \
test \
tl \
unotest \
utl \
vcl \
$(gb_UWINAPI) \
))
$(eval $(call gb_CppunitTest_use_externals,sw_htmlimport,\
boost_headers \
libxml2 \
))
$(eval $(call gb_CppunitTest_set_include,sw_htmlimport,\
-I$(SRCDIR)/sw/inc \
-I$(SRCDIR)/sw/source/core/inc \
-I$(SRCDIR)/sw/qa/extras/inc \
$$(INCLUDE) \
))
$(eval $(call gb_CppunitTest_use_sdk_api,sw_htmlimport))
$(eval $(call gb_CppunitTest_use_ure,sw_htmlimport))
$(eval $(call gb_CppunitTest_use_vcl,sw_htmlimport))
$(eval $(call gb_CppunitTest_use_rdb,sw_htmlimport,services))
$(eval $(call gb_CppunitTest_use_configuration,sw_htmlimport))
$(eval $(call gb_CppunitTest_use_unittest_configuration,sw_htmlimport))
# vim: set noet sw=4 ts=4:
sw/Module_sw.mk
Dosyayı görüntüle @
bcf8dc3d
...
...
@@ -53,6 +53,7 @@ $(eval $(call gb_Module_add_check_targets,sw,\
$(eval $(call gb_Module_add_slowcheck_targets,sw,\
CppunitTest_sw_uwriter \
CppunitTest_sw_htmlexport \
CppunitTest_sw_htmlimport \
CppunitTest_sw_macros_test \
CppunitTest_sw_ooxmlexport \
CppunitTest_sw_ooxmlexport2 \
...
...
sw/qa/extras/htmlimport/data/picture.html
0 → 100644
Dosyayı görüntüle @
bcf8dc3d
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html
xmlns=
"http://www.w3.org/1999/xhtml"
lang=
"en"
>
<body>
<div>
<p>
This document should contain only one link. (Edit -> Links...)
</p>
<p>
The picture below is supposed to be fully inserted into the document, not just as a link.
<br/>
<a
style=
"display:inline-block;"
href=
"http://www.libreoffice.org/"
title=
"Go to the Home of LibreOffice and the LibreOffice Community page"
>
<img
src=
"../../../../../odk/docs/images/sdk_head-1.png"
width=
"377"
height=
"120px"
/>
</a>
</p>
This one is supposed to be inserted as a link, since the source is "http://..." URL.
<br/>
<a
style=
"display:inline-block;"
href=
"http://www.libreoffice.org/"
title=
"Go to the Home of LibreOffice and the LibreOffice Community page"
>
<img
src=
"http://www.libreoffice.org/themes/libo/images/logo.png"
width=
"218px"
height=
"45px"
/>
</a>
</p>
</div>
</body>
</html>
sw/qa/extras/htmlimport/htmlimport.cxx
0 → 100644
Dosyayı görüntüle @
bcf8dc3d
/*
* 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 <swmodeltestbase.hxx>
#include <sfx2/linkmgr.hxx>
#include <docsh.hxx>
#include <editsh.hxx>
class
HtmlImportTest
:
public
SwModelTestBase
{
public
:
HtmlImportTest
()
:
SwModelTestBase
(
"sw/qa/extras/htmlimport/data/"
,
"HTML (StarWriter)"
)
{}
};
#define DECLARE_HTMLIMPORT_TEST(TestName, filename) DECLARE_SW_IMPORT_TEST(TestName, filename, HtmlImportTest)
DECLARE_HTMLIMPORT_TEST
(
testPictureImport
,
"picture.html"
)
{
SwXTextDocument
*
pTxtDoc
=
dynamic_cast
<
SwXTextDocument
*>
(
mxComponent
.
get
());
CPPUNIT_ASSERT
(
pTxtDoc
);
// The document contains one embeded picture and one stored as a link.
const
sfx2
::
LinkManager
&
rLinkManager
=
pTxtDoc
->
GetDocShell
()
->
GetDoc
()
->
GetEditShell
()
->
GetLinkManager
();
CPPUNIT_ASSERT_EQUAL
(
size_t
(
1
),
rLinkManager
.
GetLinks
().
size
());
}
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