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
305ecd18
Kaydet (Commit)
305ecd18
authored
Agu 29, 2014
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#79959 RTF import: trim whitespace around style names
Change-Id: Id23cbd62b057442c577fef124a5705e4d551076f
üst
9f05a870
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
2 deletions
+13
-2
fdo79959.rtf
sw/qa/extras/rtfimport/data/fdo79959.rtf
+4
-0
rtfimport.cxx
sw/qa/extras/rtfimport/rtfimport.cxx
+6
-0
rtfdocumentimpl.cxx
writerfilter/source/rtftok/rtfdocumentimpl.cxx
+3
-2
No files found.
sw/qa/extras/rtfimport/data/fdo79959.rtf
0 → 100644
Dosyayı görüntüle @
305ecd18
{\rtf1\ansi\ansicpg1251\deff0\deflang1049{\fonttbl{\f0\fnil\fcharset0 Calibri;}}
{\stylesheet{\s0 Test;}}
\viewkind4\uc1\pard\s0\slmult1\lang9\f0\fs22 Hello world!\par
}
sw/qa/extras/rtfimport/rtfimport.cxx
Dosyayı görüntüle @
305ecd18
...
...
@@ -1928,6 +1928,12 @@ DECLARE_RTFIMPORT_TEST(testFdo74229, "fdo74229.rtf")
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
convertTwipToMm100
(
67
)),
getProperty
<
sal_Int32
>
(
xCell
,
"RightBorderDistance"
));
}
DECLARE_RTFIMPORT_TEST
(
testFdo79959
,
"fdo79959.rtf"
)
{
// This was false, as the style was imported as " Test", i.e. no whitespace stripping.
CPPUNIT_ASSERT_EQUAL
(
true
,
static_cast
<
bool
>
(
getStyles
(
"ParagraphStyles"
)
->
hasByName
(
"Test"
)));
}
CPPUNIT_PLUGIN_IMPLEMENT
();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
writerfilter/source/rtftok/rtfdocumentimpl.cxx
Dosyayı görüntüle @
305ecd18
...
...
@@ -1162,8 +1162,9 @@ void RTFDocumentImpl::text(OUString& rString)
case DESTINATION_STYLEENTRY:
if (m_aStates.top().aTableAttributes.find(NS_ooxml::LN_CT_Style_type))
{
m_aStyleNames
[
m_nCurrentStyleIndex
]
=
aName
;
RTFValue
::
Pointer_t
pValue
(
new
RTFValue
(
aName
));
// Word strips whitespace around style names.
m_aStyleNames[m_nCurrentStyleIndex] = aName.trim();
RTFValue::Pointer_t pValue(new RTFValue(aName.trim()));
m_aStates.top().aTableAttributes.set(NS_ooxml::LN_CT_Style_styleId, pValue);
m_aStates.top().aTableSprms.set(NS_ooxml::LN_CT_Style_name, pValue);
...
...
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