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
374d2bcf
Kaydet (Commit)
374d2bcf
authored
Mar 29, 2015
tarafından
Bjoern Michaelsen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
use helper function for precond check
Change-Id: I6b3c9d50229265e26c1dc8da9194164c18c1687a
üst
696f79a8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
12 deletions
+10
-12
unotbl.cxx
sw/source/core/unocore/unotbl.cxx
+10
-12
No files found.
sw/source/core/unocore/unotbl.cxx
Dosyayı görüntüle @
374d2bcf
...
@@ -121,6 +121,12 @@ namespace
...
@@ -121,6 +121,12 @@ namespace
throw
uno
::
RuntimeException
(
"Lost connection to core objects"
,
pObject
);
throw
uno
::
RuntimeException
(
"Lost connection to core objects"
,
pObject
);
return
pFmt
;
return
pFmt
;
}
}
SwTable
*
lcl_EnsureTableNotComplex
(
SwTable
*
pTable
,
cppu
::
OWeakObject
*
pObject
)
{
if
(
pTable
->
IsTblComplex
())
throw
uno
::
RuntimeException
(
"Table too complex"
,
pObject
);
return
pTable
;
}
}
}
#define UNO_TABLE_COLUMN_SUM 10000
#define UNO_TABLE_COLUMN_SUM 10000
...
@@ -4446,9 +4452,7 @@ void SwXTableRows::insertByIndex(sal_Int32 nIndex, sal_Int32 nCount)
...
@@ -4446,9 +4452,7 @@ void SwXTableRows::insertByIndex(sal_Int32 nIndex, sal_Int32 nCount)
if
(
nCount
==
0
)
if
(
nCount
==
0
)
return
;
return
;
SwFrmFmt
*
pFrmFmt
(
lcl_EnsureCoreConnected
(
GetFrmFmt
(),
static_cast
<
cppu
::
OWeakObject
*>
(
this
)));
SwFrmFmt
*
pFrmFmt
(
lcl_EnsureCoreConnected
(
GetFrmFmt
(),
static_cast
<
cppu
::
OWeakObject
*>
(
this
)));
SwTable
*
pTable
=
SwTable
::
FindTable
(
pFrmFmt
);
SwTable
*
pTable
=
lcl_EnsureTableNotComplex
(
SwTable
::
FindTable
(
pFrmFmt
),
static_cast
<
cppu
::
OWeakObject
*>
(
this
));
if
(
pTable
->
IsTblComplex
())
throw
uno
::
RuntimeException
(
"Table too complex"
,
static_cast
<
cppu
::
OWeakObject
*>
(
this
));
const
size_t
nRowCount
=
pTable
->
GetTabLines
().
size
();
const
size_t
nRowCount
=
pTable
->
GetTabLines
().
size
();
if
(
nCount
<=
0
||
!
(
0
<=
nIndex
&&
static_cast
<
size_t
>
(
nIndex
)
<=
nRowCount
))
if
(
nCount
<=
0
||
!
(
0
<=
nIndex
&&
static_cast
<
size_t
>
(
nIndex
)
<=
nRowCount
))
throw
uno
::
RuntimeException
(
"Illegal arguments"
,
static_cast
<
cppu
::
OWeakObject
*>
(
this
));
throw
uno
::
RuntimeException
(
"Illegal arguments"
,
static_cast
<
cppu
::
OWeakObject
*>
(
this
));
...
@@ -4490,9 +4494,7 @@ void SwXTableRows::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount)
...
@@ -4490,9 +4494,7 @@ void SwXTableRows::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount)
if
(
nIndex
<
0
||
nCount
<=
0
)
if
(
nIndex
<
0
||
nCount
<=
0
)
throw
uno
::
RuntimeException
();
throw
uno
::
RuntimeException
();
bool
bSuccess
=
false
;
bool
bSuccess
=
false
;
SwTable
*
pTable
=
SwTable
::
FindTable
(
pFrmFmt
);
SwTable
*
pTable
=
lcl_EnsureTableNotComplex
(
SwTable
::
FindTable
(
pFrmFmt
),
static_cast
<
cppu
::
OWeakObject
*>
(
this
));
if
(
pTable
->
IsTblComplex
())
throw
uno
::
RuntimeException
(
"Table too complex"
,
static_cast
<
cppu
::
OWeakObject
*>
(
this
));
OUString
sTLName
=
sw_GetCellName
(
0
,
nIndex
);
OUString
sTLName
=
sw_GetCellName
(
0
,
nIndex
);
const
SwTableBox
*
pTLBox
=
pTable
->
GetTblBox
(
sTLName
);
const
SwTableBox
*
pTLBox
=
pTable
->
GetTblBox
(
sTLName
);
if
(
!
pTLBox
)
if
(
!
pTLBox
)
...
@@ -4591,9 +4593,7 @@ void SwXTableColumns::insertByIndex(sal_Int32 nIndex, sal_Int32 nCount)
...
@@ -4591,9 +4593,7 @@ void SwXTableColumns::insertByIndex(sal_Int32 nIndex, sal_Int32 nCount)
if
(
nCount
==
0
)
if
(
nCount
==
0
)
return
;
return
;
SwFrmFmt
*
pFrmFmt
(
lcl_EnsureCoreConnected
(
GetFrmFmt
(),
static_cast
<
cppu
::
OWeakObject
*>
(
this
)));
SwFrmFmt
*
pFrmFmt
(
lcl_EnsureCoreConnected
(
GetFrmFmt
(),
static_cast
<
cppu
::
OWeakObject
*>
(
this
)));
SwTable
*
pTable
=
SwTable
::
FindTable
(
pFrmFmt
);
SwTable
*
pTable
=
lcl_EnsureTableNotComplex
(
SwTable
::
FindTable
(
pFrmFmt
),
static_cast
<
cppu
::
OWeakObject
*>
(
this
));
if
(
pTable
->
IsTblComplex
())
throw
uno
::
RuntimeException
(
"Table too complex"
,
static_cast
<
cppu
::
OWeakObject
*>
(
this
));
SwTableLines
&
rLines
=
pTable
->
GetTabLines
();
SwTableLines
&
rLines
=
pTable
->
GetTabLines
();
SwTableLine
*
pLine
=
rLines
.
front
();
SwTableLine
*
pLine
=
rLines
.
front
();
const
size_t
nColCount
=
pLine
->
GetTabBoxes
().
size
();
const
size_t
nColCount
=
pLine
->
GetTabBoxes
().
size
();
...
@@ -4636,9 +4636,7 @@ void SwXTableColumns::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount)
...
@@ -4636,9 +4636,7 @@ void SwXTableColumns::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount)
SwFrmFmt
*
pFrmFmt
(
lcl_EnsureCoreConnected
(
GetFrmFmt
(),
static_cast
<
cppu
::
OWeakObject
*>
(
this
)));
SwFrmFmt
*
pFrmFmt
(
lcl_EnsureCoreConnected
(
GetFrmFmt
(),
static_cast
<
cppu
::
OWeakObject
*>
(
this
)));
if
(
nIndex
<
0
||
nCount
<=
0
)
if
(
nIndex
<
0
||
nCount
<=
0
)
throw
uno
::
RuntimeException
();
throw
uno
::
RuntimeException
();
SwTable
*
pTable
=
SwTable
::
FindTable
(
pFrmFmt
);
SwTable
*
pTable
=
lcl_EnsureTableNotComplex
(
SwTable
::
FindTable
(
pFrmFmt
),
static_cast
<
cppu
::
OWeakObject
*>
(
this
));
if
(
pTable
->
IsTblComplex
())
throw
uno
::
RuntimeException
(
"Table too complex"
,
static_cast
<
cppu
::
OWeakObject
*>
(
this
));
const
OUString
sTLName
=
sw_GetCellName
(
nIndex
,
0
);
const
OUString
sTLName
=
sw_GetCellName
(
nIndex
,
0
);
const
SwTableBox
*
pTLBox
=
pTable
->
GetTblBox
(
sTLName
);
const
SwTableBox
*
pTLBox
=
pTable
->
GetTblBox
(
sTLName
);
if
(
!
pTLBox
)
if
(
!
pTLBox
)
...
...
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