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
9bcfb6f0
Kaydet (Commit)
9bcfb6f0
authored
Ock 04, 2013
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
add some more safety checks for row and column import from ODS
Change-Id: Ic714c65cfe93198c462ba55752223f4e60e5aad9
üst
3e85d9c6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
1 deletion
+15
-1
xmlcelli.cxx
sc/source/filter/xml/xmlcelli.cxx
+12
-0
xmlcoli.cxx
sc/source/filter/xml/xmlcoli.cxx
+2
-1
xmlrowi.cxx
sc/source/filter/xml/xmlrowi.cxx
+1
-0
No files found.
sc/source/filter/xml/xmlcelli.cxx
Dosyayı görüntüle @
9bcfb6f0
...
@@ -833,6 +833,12 @@ void ScXMLTableRowCellContext::AddTextAndValueCells( const ScAddress& rCellPos,
...
@@ -833,6 +833,12 @@ void ScXMLTableRowCellContext::AddTextAndValueCells( const ScAddress& rCellPos,
for
(
SCCOL
i
=
0
;
i
<
nColsRepeated
;
++
i
)
for
(
SCCOL
i
=
0
;
i
<
nColsRepeated
;
++
i
)
{
{
rCurrentPos
.
SetCol
(
rCellPos
.
Col
()
+
i
);
rCurrentPos
.
SetCol
(
rCellPos
.
Col
()
+
i
);
// it makes no sense to import data after the last supported column
// fdo#58539 & gnome#627150
if
(
rCurrentPos
.
Col
()
>
MAXCOL
)
break
;
if
(
i
>
0
)
if
(
i
>
0
)
rTables
.
AddColumn
(
false
);
rTables
.
AddColumn
(
false
);
if
(
!
bIsEmpty
)
if
(
!
bIsEmpty
)
...
@@ -840,6 +846,12 @@ void ScXMLTableRowCellContext::AddTextAndValueCells( const ScAddress& rCellPos,
...
@@ -840,6 +846,12 @@ void ScXMLTableRowCellContext::AddTextAndValueCells( const ScAddress& rCellPos,
for
(
SCROW
j
=
0
;
j
<
nRepeatedRows
;
++
j
)
for
(
SCROW
j
=
0
;
j
<
nRepeatedRows
;
++
j
)
{
{
rCurrentPos
.
SetRow
(
rCellPos
.
Row
()
+
j
);
rCurrentPos
.
SetRow
(
rCellPos
.
Row
()
+
j
);
// it makes no sense to import data after last supported row
// fdo#58539 & gnome#627150
if
(
rCurrentPos
.
Row
()
>
MAXROW
)
break
;
if
(
(
rCurrentPos
.
Col
()
==
0
)
&&
(
j
>
0
)
)
if
(
(
rCurrentPos
.
Col
()
==
0
)
&&
(
j
>
0
)
)
{
{
rTables
.
AddRow
();
rTables
.
AddRow
();
...
...
sc/source/filter/xml/xmlcoli.cxx
Dosyayı görüntüle @
9bcfb6f0
...
@@ -66,7 +66,8 @@ ScXMLTableColContext::ScXMLTableColContext( ScXMLImport& rImport,
...
@@ -66,7 +66,8 @@ ScXMLTableColContext::ScXMLTableColContext( ScXMLImport& rImport,
{
{
case
XML_TOK_TABLE_COL_ATTR_REPEATED
:
case
XML_TOK_TABLE_COL_ATTR_REPEATED
:
{
{
nColCount
=
sValue
.
toInt32
();
nColCount
=
std
::
max
<
sal_Int32
>
(
sValue
.
toInt32
(),
1
);
nColCount
=
std
::
min
<
sal_Int32
>
(
nColCount
,
MAXCOLCOUNT
);
}
}
break
;
break
;
case
XML_TOK_TABLE_COL_ATTR_STYLE_NAME
:
case
XML_TOK_TABLE_COL_ATTR_STYLE_NAME
:
...
...
sc/source/filter/xml/xmlrowi.cxx
Dosyayı görüntüle @
9bcfb6f0
...
@@ -83,6 +83,7 @@ ScXMLTableRowContext::ScXMLTableRowContext( ScXMLImport& rImport,
...
@@ -83,6 +83,7 @@ ScXMLTableRowContext::ScXMLTableRowContext( ScXMLImport& rImport,
case
XML_TOK_TABLE_ROW_ATTR_REPEATED
:
case
XML_TOK_TABLE_ROW_ATTR_REPEATED
:
{
{
nRepeatedRows
=
std
::
max
(
sValue
.
toInt32
(),
(
sal_Int32
)
1
);
nRepeatedRows
=
std
::
max
(
sValue
.
toInt32
(),
(
sal_Int32
)
1
);
nRepeatedRows
=
std
::
min
(
nRepeatedRows
,
MAXROWCOUNT
);
}
}
break
;
break
;
case
XML_TOK_TABLE_ROW_ATTR_DEFAULT_CELL_STYLE_NAME
:
case
XML_TOK_TABLE_ROW_ATTR_DEFAULT_CELL_STYLE_NAME
:
...
...
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