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
76c0d0ab
Kaydet (Commit)
76c0d0ab
authored
Eyl 07, 2014
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
RTF import: adapt getProperties() to createStyleProperties()
Change-Id: I8561aa1532a863bf7f8dd44fbd40e8e0187e4967
üst
ed75aa27
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
1 deletion
+29
-1
cs-bold.rtf
sw/qa/extras/rtfimport/data/cs-bold.rtf
+12
-0
rtfimport.cxx
sw/qa/extras/rtfimport/rtfimport.cxx
+6
-0
rtfdocumentimpl.cxx
writerfilter/source/rtftok/rtfdocumentimpl.cxx
+11
-1
No files found.
sw/qa/extras/rtfimport/data/cs-bold.rtf
0 → 100644
Dosyayı görüntüle @
76c0d0ab
{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff31507\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe1033\themelang1033\themelangfe0\themelangcs0
{\stylesheet
{\ql \li0\ri0\sl240\slmult0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 \f40\fs18\lang1033\langfe1033\cgrid\langnp1033\langfenp1033
\snext0 \sqformat \spriority14 \styrsid11343869 Normal;}
{\*\cs73 \additive \rtlch\fcs1 \ab\af0 \ltrch\fcs0 \b
\sbasedon10 \sqformat \spriority22 \styrsid12276622 Strong;}
}
\pard
{\rtlch\fcs1 \ab\af40\afs18 \ltrch\fcs0
\cs73\b\f41\fs18\lang9\langfe1033\langnp9\insrsid12276622\charrsid12797106 bold}
\par
}
sw/qa/extras/rtfimport/rtfimport.cxx
Dosyayı görüntüle @
76c0d0ab
...
@@ -1926,6 +1926,12 @@ DECLARE_RTFIMPORT_TEST(testFdo82078, "fdo82078.rtf")
...
@@ -1926,6 +1926,12 @@ DECLARE_RTFIMPORT_TEST(testFdo82078, "fdo82078.rtf")
CPPUNIT_ASSERT_EQUAL
(
awt
::
FontWeight
::
NORMAL
,
getProperty
<
float
>
(
getRun
(
getParagraph
(
1
),
2
),
"CharWeight"
));
CPPUNIT_ASSERT_EQUAL
(
awt
::
FontWeight
::
NORMAL
,
getProperty
<
float
>
(
getRun
(
getParagraph
(
1
),
2
),
"CharWeight"
));
}
}
DECLARE_RTFIMPORT_TEST
(
testCsBold
,
"cs-bold.rtf"
)
{
// This was awt::FontWeight::NORMAL, i.e. the first run was bold, when it should be bold (applied character style without direct formatting).
CPPUNIT_ASSERT_EQUAL
(
awt
::
FontWeight
::
BOLD
,
getProperty
<
float
>
(
getRun
(
getParagraph
(
1
),
1
),
"CharWeight"
));
}
CPPUNIT_PLUGIN_IMPLEMENT
();
CPPUNIT_PLUGIN_IMPLEMENT
();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
writerfilter/source/rtftok/rtfdocumentimpl.cxx
Dosyayı görüntüle @
76c0d0ab
...
@@ -458,7 +458,17 @@ writerfilter::Reference<Properties>::Pointer_t RTFDocumentImpl::getProperties(RT
...
@@ -458,7 +458,17 @@ writerfilter::Reference<Properties>::Pointer_t RTFDocumentImpl::getProperties(RT
RTFReferenceProperties
&
rCharProps
=
*
(
RTFReferenceProperties
*
)
itChar
->
second
.
get
();
RTFReferenceProperties
&
rCharProps
=
*
(
RTFReferenceProperties
*
)
itChar
->
second
.
get
();
RTFSprms
&
rCharStyleSprms
=
rCharProps
.
getSprms
();
RTFSprms
&
rCharStyleSprms
=
rCharProps
.
getSprms
();
for
(
RTFSprms
::
Iterator_t
itSprm
=
rCharStyleSprms
.
begin
();
itSprm
!=
rCharStyleSprms
.
end
();
++
itSprm
)
for
(
RTFSprms
::
Iterator_t
itSprm
=
rCharStyleSprms
.
begin
();
itSprm
!=
rCharStyleSprms
.
end
();
++
itSprm
)
aStyleSprms
.
set
(
itSprm
->
first
,
itSprm
->
second
);
{
// createStyleProperties() puts properties to rPr, but here we need a flat list.
if
(
itSprm
->
first
==
NS_ooxml
::
LN_CT_Style_rPr
)
{
RTFSprms
&
rRPrSprms
=
itSprm
->
second
->
getSprms
();
for
(
RTFSprms
::
Iterator_t
itRPrSprm
=
rRPrSprms
.
begin
();
itRPrSprm
!=
rRPrSprms
.
end
();
++
itRPrSprm
)
aStyleSprms
.
set
(
itRPrSprm
->
first
,
itRPrSprm
->
second
);
}
else
aStyleSprms
.
set
(
itSprm
->
first
,
itSprm
->
second
);
}
RTFSprms
&
rCharStyleAttributes
=
rCharProps
.
getAttributes
();
RTFSprms
&
rCharStyleAttributes
=
rCharProps
.
getAttributes
();
for
(
RTFSprms
::
Iterator_t
itAttr
=
rCharStyleAttributes
.
begin
();
itAttr
!=
rCharStyleAttributes
.
end
();
++
itAttr
)
for
(
RTFSprms
::
Iterator_t
itAttr
=
rCharStyleAttributes
.
begin
();
itAttr
!=
rCharStyleAttributes
.
end
();
++
itAttr
)
...
...
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