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
84e71f3b
Kaydet (Commit)
84e71f3b
authored
Mar 30, 2015
tarafından
Bjoern Michaelsen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
use even more SwXCellRange impls from SwXTextTable
Change-Id: If1eede3bc1dc4effdb6a46ad2c0aeed2d6cd57a2
üst
7cb7ced2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
64 deletions
+10
-64
unotbl.cxx
sw/source/core/unocore/unotbl.cxx
+10
-64
No files found.
sw/source/core/unocore/unotbl.cxx
Dosyayı görüntüle @
84e71f3b
...
...
@@ -2539,39 +2539,13 @@ uno::Sequence<OUString> SwXTextTable::getRowDescriptions(void)
return
xAllRange
->
getRowDescriptions
();
}
void
SwXTextTable
::
setRowDescriptions
(
const
uno
::
Sequence
<
OUString
>&
rRowDesc
)
throw
(
uno
::
RuntimeException
,
std
::
exception
)
void
SwXTextTable
::
setRowDescriptions
(
const
uno
::
Sequence
<
OUString
>&
rRowDesc
)
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
SolarMutexGuard
aGuard
;
SwFrmFmt
*
pFmt
=
GetFrmFmt
();
if
(
pFmt
)
{
const
sal_uInt16
nRowCount
=
getRowCount
();
if
(
!
nRowCount
||
rRowDesc
.
getLength
()
<
(
m_bFirstRowAsLabel
?
nRowCount
-
1
:
nRowCount
))
{
throw
uno
::
RuntimeException
();
}
const
OUString
*
pArray
=
rRowDesc
.
getConstArray
();
if
(
m_bFirstColumnAsLabel
)
{
const
sal_uInt16
nStart
=
m_bFirstRowAsLabel
?
1
:
0
;
for
(
sal_uInt16
i
=
nStart
;
i
<
nRowCount
;
i
++
)
{
uno
::
Reference
<
table
::
XCell
>
xCell
=
getCellByPosition
(
0
,
i
);
if
(
!
xCell
.
is
())
{
throw
uno
::
RuntimeException
();
}
uno
::
Reference
<
text
::
XText
>
xText
(
xCell
,
uno
::
UNO_QUERY
);
xText
->
setString
(
pArray
[
i
-
nStart
]);
}
}
else
{
OSL_FAIL
(
"Where to put theses labels?"
);
}
}
else
throw
uno
::
RuntimeException
();
uno
::
Reference
<
chart
::
XChartDataArray
>
xAllRange
(
getCellRangeByPosition
(
0
,
0
,
getColumnCount
()
-
1
,
getRowCount
()
-
1
),
uno
::
UNO_QUERY
);
static_cast
<
SwXCellRange
*>
(
xAllRange
.
get
())
->
SetLabels
(
m_bFirstRowAsLabel
,
m_bFirstColumnAsLabel
);
xAllRange
->
setRowDescriptions
(
rRowDesc
);
}
uno
::
Sequence
<
OUString
>
SwXTextTable
::
getColumnDescriptions
(
void
)
...
...
@@ -2583,41 +2557,13 @@ uno::Sequence<OUString> SwXTextTable::getColumnDescriptions(void)
return
xAllRange
->
getColumnDescriptions
();
}
void
SwXTextTable
::
setColumnDescriptions
(
const
uno
::
Sequence
<
OUString
>&
rColumnDesc
)
throw
(
uno
::
RuntimeException
,
std
::
exception
)
void
SwXTextTable
::
setColumnDescriptions
(
const
uno
::
Sequence
<
OUString
>&
rColumnDesc
)
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
SolarMutexGuard
aGuard
;
const
sal_uInt16
nColCount
=
getColumnCount
();
if
(
!
nColCount
)
{
uno
::
RuntimeException
aRuntime
;
aRuntime
.
Message
=
"Table too complex"
;
throw
aRuntime
;
}
SwFrmFmt
*
pFmt
=
GetFrmFmt
();
if
(
pFmt
)
{
const
OUString
*
pArray
=
rColumnDesc
.
getConstArray
();
if
(
m_bFirstRowAsLabel
&&
rColumnDesc
.
getLength
()
>=
nColCount
-
(
m_bFirstColumnAsLabel
?
1
:
0
))
{
const
sal_uInt16
nStart
=
m_bFirstColumnAsLabel
?
1
:
0
;
for
(
sal_uInt16
i
=
nStart
;
i
<
nColCount
;
i
++
)
{
uno
::
Reference
<
table
::
XCell
>
xCell
=
getCellByPosition
(
i
,
0
);
if
(
!
xCell
.
is
())
{
throw
uno
::
RuntimeException
();
}
uno
::
Reference
<
text
::
XText
>
xText
(
xCell
,
uno
::
UNO_QUERY
);
xText
->
setString
(
pArray
[
i
-
nStart
]);
}
}
else
{
OSL_FAIL
(
"Where do these labels come from?"
);
}
}
else
throw
uno
::
RuntimeException
();
uno
::
Reference
<
chart
::
XChartDataArray
>
xAllRange
(
getCellRangeByPosition
(
0
,
0
,
getColumnCount
()
-
1
,
getRowCount
()
-
1
),
uno
::
UNO_QUERY
);
static_cast
<
SwXCellRange
*>
(
xAllRange
.
get
())
->
SetLabels
(
m_bFirstRowAsLabel
,
m_bFirstColumnAsLabel
);
return
xAllRange
->
setColumnDescriptions
(
rColumnDesc
);
}
void
SAL_CALL
SwXTextTable
::
addChartDataChangeEventListener
(
...
...
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