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
bf123eef
Kaydet (Commit)
bf123eef
authored
May 11, 2012
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#45190 import of RTF_LI should reset inherited RTF_FI
Change-Id: I17c287fa4daa399876b34182c02d9cf928fe1b6f
üst
46f38ec4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
1 deletion
+39
-1
fdo45190.rtf
sw/qa/extras/rtftok/data/fdo45190.rtf
+10
-0
rtftok.cxx
sw/qa/extras/rtftok/rtftok.cxx
+22
-0
rtfdocumentimpl.cxx
writerfilter/source/rtftok/rtfdocumentimpl.cxx
+7
-1
No files found.
sw/qa/extras/rtftok/data/fdo45190.rtf
0 → 100644
Dosyayı görüntüle @
bf123eef
{\rtf1
{\stylesheet
{\s1 \fi-100 style;}
}
\s1\li0 first
\par
\pard
\s1\fi-100\li0 second
\par
}
sw/qa/extras/rtftok/rtftok.cxx
Dosyayı görüntüle @
bf123eef
...
...
@@ -92,6 +92,7 @@ public:
void
testFdo49501
();
void
testFdo49271
();
void
testFdo49692
();
void
testFdo45190
();
CPPUNIT_TEST_SUITE
(
Test
);
#if !defined(MACOSX) && !defined(WNT)
...
...
@@ -127,6 +128,7 @@ public:
CPPUNIT_TEST
(
testFdo49501
);
CPPUNIT_TEST
(
testFdo49271
);
CPPUNIT_TEST
(
testFdo49692
);
CPPUNIT_TEST
(
testFdo45190
);
#endif
CPPUNIT_TEST_SUITE_END
();
...
...
@@ -721,6 +723,26 @@ void Test::testFdo49692()
}
}
void
Test
::
testFdo45190
()
{
load
(
"fdo45190.rtf"
);
uno
::
Reference
<
text
::
XTextDocument
>
xTextDocument
(
mxComponent
,
uno
::
UNO_QUERY
);
uno
::
Reference
<
container
::
XEnumerationAccess
>
xParaEnumAccess
(
xTextDocument
->
getText
(),
uno
::
UNO_QUERY
);
uno
::
Reference
<
container
::
XEnumeration
>
xParaEnum
=
xParaEnumAccess
->
createEnumeration
();
// inherited \fi should be reset
uno
::
Reference
<
beans
::
XPropertySet
>
xPropertySet
(
xParaEnum
->
nextElement
(),
uno
::
UNO_QUERY
);
sal_Int32
nValue
=
0
;
xPropertySet
->
getPropertyValue
(
"ParaFirstLineIndent"
)
>>=
nValue
;
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
0
),
nValue
);
// but direct one not
xPropertySet
.
set
(
xParaEnum
->
nextElement
(),
uno
::
UNO_QUERY
);
xPropertySet
->
getPropertyValue
(
"ParaFirstLineIndent"
)
>>=
nValue
;
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
TWIP_TO_MM100
(
-
100
)),
nValue
);
}
CPPUNIT_TEST_SUITE_REGISTRATION
(
Test
);
CPPUNIT_PLUGIN_IMPLEMENT
();
...
...
writerfilter/source/rtftok/rtfdocumentimpl.cxx
Dosyayı görüntüle @
bf123eef
...
...
@@ -2233,7 +2233,6 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
switch
(
nKeyword
)
{
case
RTF_FI
:
nSprm
=
NS_sprm
::
LN_PDxaLeft1
;
break
;
case
RTF_LI
:
nSprm
=
NS_sprm
::
LN_PDxaLeft
;
break
;
case
RTF_LIN
:
nSprm
=
0x845e
;
break
;
case
RTF_RI
:
nSprm
=
NS_sprm
::
LN_PDxaRight
;
break
;
case
RTF_RIN
:
nSprm
=
0x845d
;
break
;
...
...
@@ -2868,6 +2867,13 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
case
RTF_DPFILLBGCB
:
m_aStates
.
top
().
aDrawingObject
.
nFillColorB
=
nParam
;
m_aStates
.
top
().
aDrawingObject
.
bHasFillColor
=
true
;
break
;
case
RTF_LI
:
m_aStates
.
top
().
aParagraphSprms
->
push_back
(
make_pair
(
NS_sprm
::
LN_PDxaLeft
,
pIntValue
));
// It turns out \li should reset the \fi inherited from the stylesheet.
// So set the direct formatting to zero, if we don't have such direct formatting yet.
if
(
!
m_aStates
.
top
().
aParagraphSprms
.
find
(
NS_sprm
::
LN_PDxaLeft1
).
get
())
m_aStates
.
top
().
aParagraphSprms
->
push_back
(
make_pair
(
NS_sprm
::
LN_PDxaLeft1
,
RTFValue
::
Pointer_t
(
new
RTFValue
(
0
))));
break
;
default
:
SAL_INFO
(
"writerfilter"
,
OSL_THIS_FUNC
<<
": TODO handle value '"
<<
lcl_RtfToString
(
nKeyword
)
<<
"'"
);
aSkip
.
setParsed
(
false
);
...
...
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