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
3e2cda22
Kaydet (Commit)
3e2cda22
authored
Mar 14, 2014
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#69289 RTF import: handle cells with zero width
Change-Id: I31b12a5afa5d501d57b56f515ee1d2fd46a09b32
üst
06f7d1a9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
0 deletions
+19
-0
fdo69289.rtf
sw/qa/extras/rtfimport/data/fdo69289.rtf
+6
-0
rtfimport.cxx
sw/qa/extras/rtfimport/rtfimport.cxx
+10
-0
rtfdocumentimpl.cxx
writerfilter/source/rtftok/rtfdocumentimpl.cxx
+3
-0
No files found.
sw/qa/extras/rtfimport/data/fdo69289.rtf
0 → 100644
Dosyayı görüntüle @
3e2cda22
{\rtf\ansi
{
\trowd\trgaph30\trleft-30\trrh256\clvertalb\cellx1280\clvertalb\cellx1280\clvertalb\cellx2560\pard\plain\intbl
\ql a\cell\ql b\cell\ql c\cell\row
}
}
sw/qa/extras/rtfimport/rtfimport.cxx
Dosyayı görüntüle @
3e2cda22
...
@@ -1518,6 +1518,16 @@ DECLARE_RTFIMPORT_TEST(testCharColor, "char-color.rtf")
...
@@ -1518,6 +1518,16 @@ DECLARE_RTFIMPORT_TEST(testCharColor, "char-color.rtf")
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
0x365F91
),
getProperty
<
sal_Int32
>
(
getParagraph
(
1
),
"CharColor"
));
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
0x365F91
),
getProperty
<
sal_Int32
>
(
getParagraph
(
1
),
"CharColor"
));
}
}
DECLARE_RTFIMPORT_TEST
(
testFdo69289
,
"fdo69289.rtf"
)
{
uno
::
Reference
<
text
::
XTextTablesSupplier
>
xTextTablesSupplier
(
mxComponent
,
uno
::
UNO_QUERY
);
uno
::
Reference
<
container
::
XIndexAccess
>
xTables
(
xTextTablesSupplier
->
getTextTables
(),
uno
::
UNO_QUERY
);
uno
::
Reference
<
text
::
XTextTable
>
xTable
(
xTables
->
getByIndex
(
0
),
uno
::
UNO_QUERY
);
uno
::
Reference
<
table
::
XTableRows
>
xTableRows
(
xTable
->
getRows
(),
uno
::
UNO_QUERY
);
// There were only 2 cells (1 separators) in the table, should be 3 (2 separators).
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
2
),
getProperty
<
uno
::
Sequence
<
text
::
TableColumnSeparator
>
>
(
xTableRows
->
getByIndex
(
0
),
"TableColumnSeparators"
).
getLength
());
}
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 @
3e2cda22
...
@@ -3510,6 +3510,9 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
...
@@ -3510,6 +3510,9 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
?
m_nNestedCurrentCellX
?
m_nNestedCurrentCellX
:
m_nTopLevelCurrentCellX
);
:
m_nTopLevelCurrentCellX
);
int
nCellX
=
nParam
-
rCurrentCellX
;
int
nCellX
=
nParam
-
rCurrentCellX
;
const
int
COL_DFLT_WIDTH
=
41
;
// sw/source/filter/inc/wrtswtbl.hxx, minimal possible width of cells.
if
(
!
nCellX
)
nCellX
=
COL_DFLT_WIDTH
;
// If there is a negative left margin, then the first cellx is relative to that.
// If there is a negative left margin, then the first cellx is relative to that.
RTFValue
::
Pointer_t
pTblInd
=
m_aStates
.
top
().
aTableRowSprms
.
find
(
NS_ooxml
::
LN_CT_TblPrBase_tblInd
);
RTFValue
::
Pointer_t
pTblInd
=
m_aStates
.
top
().
aTableRowSprms
.
find
(
NS_ooxml
::
LN_CT_TblPrBase_tblInd
);
...
...
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