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
1f1ddaad
Kaydet (Commit)
1f1ddaad
authored
Ock 08, 2016
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Related: tdf#96308 RTF import: fix RTF_DEFTAB handling
Change-Id: Ia2655bf5748ea62155613a222d0cb17b678196c5
üst
8085555f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
1 deletion
+27
-1
tdf96308-deftab.rtf
sw/qa/extras/rtfimport/data/tdf96308-deftab.rtf
+8
-0
rtfimport.cxx
sw/qa/extras/rtfimport/rtfimport.cxx
+8
-0
rtfdocumentimpl.cxx
writerfilter/source/rtftok/rtfdocumentimpl.cxx
+9
-1
rtfdocumentimpl.hxx
writerfilter/source/rtftok/rtfdocumentimpl.hxx
+2
-0
No files found.
sw/qa/extras/rtfimport/data/tdf96308-deftab.rtf
0 → 100644
Dosyayı görüntüle @
1f1ddaad
{\rtf1
{\stylesheet
{
\s23\pvpg Slogan;}
}
\deftab284
hello\par
}
sw/qa/extras/rtfimport/rtfimport.cxx
Dosyayı görüntüle @
1f1ddaad
...
@@ -2383,6 +2383,14 @@ DECLARE_RTFIMPORT_TEST(testTdf54584, "tdf54584.rtf")
...
@@ -2383,6 +2383,14 @@ DECLARE_RTFIMPORT_TEST(testTdf54584, "tdf54584.rtf")
xFields
->
nextElement
());
xFields
->
nextElement
());
}
}
DECLARE_RTFIMPORT_TEST
(
testTdf96308Deftab
,
"tdf96308-deftab.rtf"
)
{
uno
::
Reference
<
lang
::
XMultiServiceFactory
>
xTextFactory
(
mxComponent
,
uno
::
UNO_QUERY
);
uno
::
Reference
<
beans
::
XPropertySet
>
xDefaults
(
xTextFactory
->
createInstance
(
"com.sun.star.text.Defaults"
),
uno
::
UNO_QUERY
);
// This was 1270 as \deftab was ignored on import.
CPPUNIT_ASSERT_EQUAL
(
static_cast
<
sal_Int32
>
(
convertTwipToMm100
(
284
)),
getProperty
<
sal_Int32
>
(
xDefaults
,
"TabStopDistance"
));
}
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 @
1f1ddaad
...
@@ -704,6 +704,14 @@ oox::GraphicHelper& RTFDocumentImpl::getGraphicHelper()
...
@@ -704,6 +704,14 @@ oox::GraphicHelper& RTFDocumentImpl::getGraphicHelper()
return
*
m_pGraphicHelper
;
return
*
m_pGraphicHelper
;
}
}
bool
RTFDocumentImpl
::
isStyleSheetImport
()
{
if
(
m_aStates
.
empty
())
return
false
;
Destination
eDestination
=
m_aStates
.
top
().
eDestination
;
return
eDestination
==
Destination
::
STYLESHEET
||
eDestination
==
Destination
::
STYLEENTRY
;
}
void
RTFDocumentImpl
::
resolve
(
Stream
&
rMapper
)
void
RTFDocumentImpl
::
resolve
(
Stream
&
rMapper
)
{
{
m_pMapperStream
=
&
rMapper
;
m_pMapperStream
=
&
rMapper
;
...
@@ -6328,7 +6336,7 @@ RTFFrame::RTFFrame(RTFParserState* pParserState)
...
@@ -6328,7 +6336,7 @@ RTFFrame::RTFFrame(RTFParserState* pParserState)
void
RTFFrame
::
setSprm
(
Id
nId
,
Id
nValue
)
void
RTFFrame
::
setSprm
(
Id
nId
,
Id
nValue
)
{
{
if (m_pParserState->m_pDocumentImpl->getFirstRun())
if
(
m_pParserState
->
m_pDocumentImpl
->
getFirstRun
()
&&
!
m_pParserState
->
m_pDocumentImpl
->
isStyleSheetImport
()
)
{
{
m_pParserState
->
m_pDocumentImpl
->
checkFirstRun
();
m_pParserState
->
m_pDocumentImpl
->
checkFirstRun
();
m_pParserState
->
m_pDocumentImpl
->
setNeedPar
(
false
);
m_pParserState
->
m_pDocumentImpl
->
setNeedPar
(
false
);
...
...
writerfilter/source/rtftok/rtfdocumentimpl.hxx
Dosyayı görüntüle @
1f1ddaad
...
@@ -395,6 +395,8 @@ public:
...
@@ -395,6 +395,8 @@ public:
/// Get the default parser state.
/// Get the default parser state.
RTFParserState
&
getDefaultState
();
RTFParserState
&
getDefaultState
();
oox
::
GraphicHelper
&
getGraphicHelper
();
oox
::
GraphicHelper
&
getGraphicHelper
();
/// Are we inside the stylesheet table?
bool
isStyleSheetImport
();
private
:
private
:
SvStream
&
Strm
();
SvStream
&
Strm
();
...
...
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