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
27972b53
Kaydet (Commit)
27972b53
authored
Nis 10, 2015
tarafından
Bjoern Michaelsen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
simplify
Change-Id: I18670621a218f77b7996c3b7418fde4c4a230059
üst
ff1c479d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
52 deletions
+22
-52
unotbl.cxx
sw/source/core/unocore/unotbl.cxx
+22
-52
No files found.
sw/source/core/unocore/unotbl.cxx
Dosyayı görüntüle @
27972b53
...
...
@@ -3717,66 +3717,36 @@ uno::Sequence< uno::Sequence< uno::Any > > SAL_CALL SwXCellRange::getDataArray()
}
///@see SwXCellRange::setData
void
SAL_CALL
SwXCellRange
::
setDataArray
(
const
uno
::
Sequence
<
uno
::
Sequence
<
uno
::
Any
>
>&
rArray
)
throw
(
uno
::
RuntimeException
,
std
::
exception
)
void
SAL_CALL
SwXCellRange
::
setDataArray
(
const
uno
::
Sequence
<
uno
::
Sequence
<
uno
::
Any
>
>&
rArray
)
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
SolarMutexGuard
aGuard
;
const
sal_uInt16
nRowCount
=
getRowCount
();
const
sal_uInt16
nColCount
=
getColumnCount
();
if
(
!
nRowCount
||
!
nColCount
)
{
uno
::
RuntimeException
aRuntime
;
aRuntime
.
Message
=
"Table too complex"
;
throw
aRuntime
;
}
throw
uno
::
RuntimeException
(
"Table too complex"
,
static_cast
<
cppu
::
OWeakObject
*>
(
this
));
SwFrmFmt
*
pFmt
=
GetFrmFmt
();
if
(
pFmt
)
if
(
!
pFmt
)
return
;
if
(
rArray
.
getLength
()
!=
nRowCount
)
throw
uno
::
RuntimeException
(
"Row count mismatch"
,
static_cast
<
cppu
::
OWeakObject
*>
(
this
));
auto
vCells
(
getCells
());
auto
pCurrentCell
(
vCells
.
begin
());
for
(
const
auto
&
rColSeq
:
rArray
)
{
if
(
rArray
.
getLength
()
!=
nRowCount
)
if
(
rColSeq
.
getLength
()
!=
nColCount
)
throw
uno
::
RuntimeException
(
"Column count mismatch"
,
static_cast
<
cppu
::
OWeakObject
*>
(
this
));
for
(
const
auto
&
aValue
:
rColSeq
)
{
throw
uno
::
RuntimeException
();
}
const
uno
::
Sequence
<
uno
::
Any
>*
pRowArray
=
rArray
.
getConstArray
();
for
(
sal_uInt16
nRow
=
0
;
nRow
<
nRowCount
;
nRow
++
)
{
const
uno
::
Sequence
<
uno
::
Any
>&
rColSeq
=
pRowArray
[
nRow
];
if
(
rColSeq
.
getLength
()
!=
nColCount
)
{
throw
uno
::
RuntimeException
();
}
const
uno
::
Any
*
pColArray
=
rColSeq
.
getConstArray
();
uno
::
Reference
<
table
::
XCell
>
xCellRef
;
for
(
sal_uInt16
nCol
=
0
;
nCol
<
nColCount
;
nCol
++
)
{
SwXCell
*
pXCell
=
lcl_CreateXCell
(
pFmt
,
aRgDesc
.
nLeft
+
nCol
,
aRgDesc
.
nTop
+
nRow
);
//! keep (additional) reference to object to prevent implicit destruction
//! in following UNO calls (when object will get referenced)
xCellRef
=
pXCell
;
SwTableBox
*
pBox
=
pXCell
?
pXCell
->
GetTblBox
()
:
0
;
if
(
!
pBox
)
{
throw
uno
::
RuntimeException
();
}
else
{
const
uno
::
Any
&
rAny
=
pColArray
[
nCol
];
if
(
uno
::
TypeClass_STRING
==
rAny
.
getValueTypeClass
())
sw_setString
(
*
pXCell
,
*
static_cast
<
OUString
const
*>
(
rAny
.
getValue
())
);
else
{
double
d
=
0
;
// #i20067# don't throw exception just do nothing if
// there is no value set
if
(
(
rAny
>>=
d
)
)
sw_setValue
(
*
pXCell
,
d
);
else
sw_setString
(
*
pXCell
,
OUString
(),
true
);
}
}
}
auto
pCell
(
static_cast
<
SwXCell
*>
(
pCurrentCell
->
get
()));
if
(
!
pCell
||
!
pCell
->
GetTblBox
())
throw
uno
::
RuntimeException
(
"Box for cell missing"
,
static_cast
<
cppu
::
OWeakObject
*>
(
this
));
if
(
aValue
.
isExtractableTo
(
cppu
::
UnoType
<
OUString
>::
get
()))
sw_setString
(
*
pCell
,
aValue
.
get
<
OUString
>
());
else
if
(
aValue
.
isExtractableTo
(
cppu
::
UnoType
<
double
>::
get
()))
sw_setValue
(
*
pCell
,
aValue
.
get
<
double
>
());
else
sw_setString
(
*
pCell
,
OUString
(),
true
);
++
pCurrentCell
;
}
}
}
...
...
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