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
77315c18
Kaydet (Commit)
77315c18
authored
Mar 30, 2015
tarafından
Bjoern Michaelsen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
SwXTextTable::setDataArray can reuse SwXCellRange too
Change-Id: Ia4aa4abcc6daa433004ab7f624f6b79c618a354d
üst
db123d18
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
63 deletions
+3
-63
unotbl.cxx
sw/source/core/unocore/unotbl.cxx
+3
-63
No files found.
sw/source/core/unocore/unotbl.cxx
Dosyayı görüntüle @
77315c18
...
@@ -2401,72 +2401,12 @@ uno::Sequence< uno::Sequence< uno::Any > > SAL_CALL SwXTextTable::getDataArray()
...
@@ -2401,72 +2401,12 @@ uno::Sequence< uno::Sequence< uno::Any > > SAL_CALL SwXTextTable::getDataArray()
return
xAllRange
->
getDataArray
();
return
xAllRange
->
getDataArray
();
}
}
void
SAL_CALL
SwXTextTable
::
setDataArray
(
void
SAL_CALL
SwXTextTable
::
setDataArray
(
const
uno
::
Sequence
<
uno
::
Sequence
<
uno
::
Any
>
>&
rArray
)
const
uno
::
Sequence
<
uno
::
Sequence
<
uno
::
Any
>
>&
rArray
)
throw
(
uno
::
RuntimeException
,
std
::
exception
)
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
{
// see SwXTextTable::setData(...) also
SolarMutexGuard
aGuard
;
SolarMutexGuard
aGuard
;
const
sal_uInt16
nRowCount
=
getRowCount
();
uno
::
Reference
<
sheet
::
XCellRangeData
>
xAllRange
(
getCellRangeByPosition
(
0
,
0
,
getColumnCount
()
-
1
,
getRowCount
()
-
1
),
uno
::
UNO_QUERY
);
const
sal_uInt16
nColCount
=
getColumnCount
();
return
xAllRange
->
setDataArray
(
rArray
);
SwFrmFmt
*
pFmt
=
GetFrmFmt
();
if
(
pFmt
)
{
SwTable
*
pTable
=
SwTable
::
FindTable
(
pFmt
);
if
(
pTable
->
IsTblComplex
())
{
uno
::
RuntimeException
aRuntime
;
aRuntime
.
Message
=
"Table too complex"
;
throw
aRuntime
;
}
if
(
rArray
.
getLength
()
!=
nRowCount
)
{
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
,
nCol
,
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
);
}
}
}
}
}
}
}
uno
::
Sequence
<
uno
::
Sequence
<
double
>
>
SwXTextTable
::
getData
(
void
)
uno
::
Sequence
<
uno
::
Sequence
<
double
>
>
SwXTextTable
::
getData
(
void
)
...
...
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