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
a8a32d9c
Kaydet (Commit)
a8a32d9c
authored
Mar 28, 2015
tarafından
Bjoern Michaelsen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
flatten and simplify
Change-Id: I85d5715d6e4535463524dbc8af452655731acd54
üst
9bab5e14
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
40 deletions
+30
-40
unotbl.cxx
sw/source/core/unocore/unotbl.cxx
+30
-40
No files found.
sw/source/core/unocore/unotbl.cxx
Dosyayı görüntüle @
a8a32d9c
...
...
@@ -4761,49 +4761,39 @@ void SwXTableColumns::insertByIndex(sal_Int32 nIndex, sal_Int32 nCount)
SwFrmFmt
*
pFrmFmt
=
GetFrmFmt
();
if
(
!
pFrmFmt
)
throw
uno
::
RuntimeException
();
else
SwTable
*
pTable
=
SwTable
::
FindTable
(
pFrmFmt
);
if
(
pTable
->
IsTblComplex
())
throw
uno
::
RuntimeException
(
"Table too complex"
,
static_cast
<
cppu
::
OWeakObject
*>
(
this
));
SwTableLines
&
rLines
=
pTable
->
GetTabLines
();
SwTableLine
*
pLine
=
rLines
.
front
();
const
size_t
nColCount
=
pLine
->
GetTabBoxes
().
size
();
if
(
nCount
<=
0
||
!
(
0
<=
nIndex
&&
static_cast
<
size_t
>
(
nIndex
)
<=
nColCount
))
throw
uno
::
RuntimeException
(
"Illegal arguments"
,
static_cast
<
cppu
::
OWeakObject
*>
(
this
));
const
OUString
sTLName
=
sw_GetCellName
(
nIndex
,
0
);
const
SwTableBox
*
pTLBox
=
pTable
->
GetTblBox
(
sTLName
);
bool
bAppend
=
false
;
if
(
!
pTLBox
)
{
SwTable
*
pTable
=
SwTable
::
FindTable
(
pFrmFmt
);
if
(
!
pTable
->
IsTblComplex
())
{
SwTableLines
&
rLines
=
pTable
->
GetTabLines
();
SwTableLine
*
pLine
=
rLines
.
front
();
const
size_t
nColCount
=
pLine
->
GetTabBoxes
().
size
();
if
(
nCount
<=
0
||
!
(
0
<=
nIndex
&&
static_cast
<
size_t
>
(
nIndex
)
<=
nColCount
))
{
uno
::
RuntimeException
aExcept
;
aExcept
.
Message
=
"Illegal arguments"
;
throw
aExcept
;
}
const
OUString
sTLName
=
sw_GetCellName
(
nIndex
,
0
);
const
SwTableBox
*
pTLBox
=
pTable
->
GetTblBox
(
sTLName
);
bool
bAppend
=
false
;
if
(
!
pTLBox
)
{
bAppend
=
true
;
// to append at the end the cursor must be in the last line
SwTableBoxes
&
rBoxes
=
pLine
->
GetTabBoxes
();
pTLBox
=
rBoxes
.
back
();
}
if
(
pTLBox
)
{
const
SwStartNode
*
pSttNd
=
pTLBox
->
GetSttNd
();
SwPosition
aPos
(
*
pSttNd
);
UnoActionContext
aAction
(
pFrmFmt
->
GetDoc
());
SwUnoCrsr
*
pUnoCrsr
=
pFrmFmt
->
GetDoc
()
->
CreateUnoCrsr
(
aPos
,
true
);
pUnoCrsr
->
Move
(
fnMoveForward
,
fnGoNode
);
{
// remove actions
UnoActionRemoveContext
aRemoveContext
(
pUnoCrsr
->
GetDoc
());
}
bAppend
=
true
;
// to append at the end the cursor must be in the last line
SwTableBoxes
&
rBoxes
=
pLine
->
GetTabBoxes
();
pTLBox
=
rBoxes
.
back
();
}
if
(
!
pTLBox
)
throw
uno
::
RuntimeException
(
"Illegal arguments"
,
static_cast
<
cppu
::
OWeakObject
*>
(
this
));
const
SwStartNode
*
pSttNd
=
pTLBox
->
GetSttNd
();
SwPosition
aPos
(
*
pSttNd
);
UnoActionContext
aAction
(
pFrmFmt
->
GetDoc
());
SwUnoCrsr
*
pUnoCrsr
=
pFrmFmt
->
GetDoc
()
->
CreateUnoCrsr
(
aPos
,
true
);
pUnoCrsr
->
Move
(
fnMoveForward
,
fnGoNode
);
pFrmFmt
->
GetDoc
()
->
InsertCol
(
*
pUnoCrsr
,
(
sal_uInt16
)
nCount
,
bAppend
);
delete
pUnoCrsr
;
}
}
{
// remove actions
UnoActionRemoveContext
aRemoveContext
(
pUnoCrsr
->
GetDoc
());
}
pFrmFmt
->
GetDoc
()
->
InsertCol
(
*
pUnoCrsr
,
(
sal_uInt16
)
nCount
,
bAppend
);
delete
pUnoCrsr
;
}
///@see SwXTableRows::removeByIndex (TODO: seems to be copy and paste programming here)
...
...
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