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
e5796e02
Kaydet (Commit)
e5796e02
authored
Nis 10, 2015
tarafından
Bjoern Michaelsen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
SwxTextTable::setData can reuse XCellRange
Change-Id: Icf477e355feee338c063aee3c76ed7c5fee63591
üst
50ce85a8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
46 deletions
+8
-46
unotbl.cxx
sw/source/core/unocore/unotbl.cxx
+8
-46
No files found.
sw/source/core/unocore/unotbl.cxx
Dosyayı görüntüle @
e5796e02
...
...
@@ -2310,52 +2310,14 @@ void SwXTextTable::setData(const uno::Sequence< uno::Sequence< double > >& rData
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
;
}
SwFrmFmt
*
pFmt
=
GetFrmFmt
();
if
(
pFmt
)
{
bool
bChanged
=
false
;
const
sal_uInt16
nRowStart
=
m_bFirstRowAsLabel
?
1
:
0
;
if
(
rData
.
getLength
()
<
nRowCount
-
nRowStart
)
{
throw
uno
::
RuntimeException
();
}
const
uno
::
Sequence
<
double
>*
pRowArray
=
rData
.
getConstArray
();
for
(
sal_uInt16
nRow
=
nRowStart
;
nRow
<
nRowCount
;
nRow
++
)
{
const
uno
::
Sequence
<
double
>&
rColSeq
=
pRowArray
[
nRow
-
nRowStart
];
const
sal_uInt16
nColStart
=
m_bFirstColumnAsLabel
?
1
:
0
;
if
(
rColSeq
.
getLength
()
<
nColCount
-
nColStart
)
{
throw
uno
::
RuntimeException
();
}
const
double
*
pColArray
=
rColSeq
.
getConstArray
();
for
(
sal_uInt16
nCol
=
nColStart
;
nCol
<
nColCount
;
nCol
++
)
{
uno
::
Reference
<
table
::
XCell
>
xCell
=
getCellByPosition
(
nCol
,
nRow
);
if
(
!
xCell
.
is
())
{
throw
uno
::
RuntimeException
();
}
xCell
->
setValue
(
pColArray
[
nCol
-
nColStart
]);
bChanged
=
true
;
}
}
if
(
bChanged
)
{
lcl_SendChartEvent
(
*
this
,
m_pImpl
->
m_Listeners
);
}
}
std
::
pair
<
sal_uInt16
,
sal_uInt16
>
const
RowsAndColumns
(
m_pImpl
->
ThrowIfComplex
(
*
this
));
uno
::
Reference
<
chart
::
XChartDataArray
>
const
xAllRange
(
getCellRangeByPosition
(
0
,
0
,
RowsAndColumns
.
second
-
1
,
RowsAndColumns
.
first
-
1
),
uno
::
UNO_QUERY
);
static_cast
<
SwXCellRange
*>
(
xAllRange
.
get
())
->
SetLabels
(
m_bFirstRowAsLabel
,
m_bFirstColumnAsLabel
);
xAllRange
->
setData
(
rData
);
// this is rather inconsistent: setData on XTextTable sends events, but e.g. CellRanges do not
lcl_SendChartEvent
(
*
this
,
m_pImpl
->
m_Listeners
);
}
uno
::
Sequence
<
OUString
>
SwXTextTable
::
getRowDescriptions
(
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