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
78ccfb18
Kaydet (Commit)
78ccfb18
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: Ie2500d115d3fd856481345430839507c814c1bac
üst
326177f4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
24 deletions
+10
-24
unotbl.cxx
sw/source/core/unocore/unotbl.cxx
+10
-24
No files found.
sw/source/core/unocore/unotbl.cxx
Dosyayı görüntüle @
78ccfb18
...
@@ -4604,16 +4604,14 @@ void SwXTableRows::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount)
...
@@ -4604,16 +4604,14 @@ void SwXTableRows::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount)
SwFrmFmt
*
pFrmFmt
=
GetFrmFmt
();
SwFrmFmt
*
pFrmFmt
=
GetFrmFmt
();
if
(
!
pFrmFmt
||
nIndex
<
0
||
nCount
<=
0
)
if
(
!
pFrmFmt
||
nIndex
<
0
||
nCount
<=
0
)
throw
uno
::
RuntimeException
();
throw
uno
::
RuntimeException
();
else
{
bool
bSuccess
=
false
;
bool
bSuccess
=
false
;
SwTable
*
pTable
=
SwTable
::
FindTable
(
pFrmFmt
);
SwTable
*
pTable
=
SwTable
::
FindTable
(
pFrmFmt
);
if
(
!
pTable
->
IsTblComplex
())
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
)
{
throw
uno
::
RuntimeException
(
"Illegal arguments"
,
static_cast
<
cppu
::
OWeakObject
*>
(
this
));
{
{
// invalidate all actions
// invalidate all actions
UnoActionRemoveContext
aRemoveContext
(
pFrmFmt
->
GetDoc
());
UnoActionRemoveContext
aRemoveContext
(
pFrmFmt
->
GetDoc
());
...
@@ -4622,38 +4620,26 @@ void SwXTableRows::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount)
...
@@ -4622,38 +4620,26 @@ void SwXTableRows::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount)
SwPosition
aPos
(
*
pSttNd
);
SwPosition
aPos
(
*
pSttNd
);
// set cursor to the upper-left cell of the range
// set cursor to the upper-left cell of the range
SwUnoCrsr
*
pUnoCrsr
=
pFrmFmt
->
GetDoc
()
->
CreateUnoCrsr
(
aPos
,
true
);
SwUnoCrsr
*
pUnoCrsr
=
pFrmFmt
->
GetDoc
()
->
CreateUnoCrsr
(
aPos
,
true
);
pUnoCrsr
->
Move
(
fnMoveForward
,
fnGoNode
);
pUnoCrsr
->
Move
(
fnMoveForward
,
fnGoNode
);
pUnoCrsr
->
SetRemainInSection
(
false
);
pUnoCrsr
->
SetRemainInSection
(
false
);
const
OUString
sBLName
=
sw_GetCellName
(
0
,
nIndex
+
nCount
-
1
);
const
OUString
sBLName
=
sw_GetCellName
(
0
,
nIndex
+
nCount
-
1
);
const
SwTableBox
*
pBLBox
=
pTable
->
GetTblBox
(
sBLName
);
const
SwTableBox
*
pBLBox
=
pTable
->
GetTblBox
(
sBLName
);
if
(
pBLBox
)
if
(
!
pBLBox
)
{
throw
uno
::
RuntimeException
(
"Illegal arguments"
,
static_cast
<
cppu
::
OWeakObject
*>
(
this
));
pUnoCrsr
->
SetMark
();
pUnoCrsr
->
SetMark
();
pUnoCrsr
->
GetPoint
()
->
nNode
=
*
pBLBox
->
GetSttNd
();
pUnoCrsr
->
GetPoint
()
->
nNode
=
*
pBLBox
->
GetSttNd
();
pUnoCrsr
->
Move
(
fnMoveForward
,
fnGoNode
);
pUnoCrsr
->
Move
(
fnMoveForward
,
fnGoNode
);
SwUnoTableCrsr
*
pCrsr
=
SwUnoTableCrsr
*
pCrsr
=
dynamic_cast
<
SwUnoTableCrsr
*>
(
pUnoCrsr
);
dynamic_cast
<
SwUnoTableCrsr
*>
(
pUnoCrsr
);
pCrsr
->
MakeBoxSels
();
pCrsr
->
MakeBoxSels
();
{
// these braces are important
{
// these braces are important
UnoActionContext
aAction
(
pFrmFmt
->
GetDoc
());
UnoActionContext
aAction
(
pFrmFmt
->
GetDoc
());
pFrmFmt
->
GetDoc
()
->
DeleteRow
(
*
pUnoCrsr
);
pFrmFmt
->
GetDoc
()
->
DeleteRow
(
*
pUnoCrsr
);
delete
pUnoCrsr
;
delete
pUnoCrsr
;
bSuccess
=
true
;
}
}
{
{
// invalidate all actions
// invalidate all actions
UnoActionRemoveContext
aRemoveContext
(
pFrmFmt
->
GetDoc
());
UnoActionRemoveContext
aRemoveContext
(
pFrmFmt
->
GetDoc
());
}
}
}
}
}
if
(
!
bSuccess
)
{
uno
::
RuntimeException
aExcept
;
aExcept
.
Message
=
"Illegal arguments"
;
throw
aExcept
;
}
}
}
}
void
SwXTableRows
::
Modify
(
const
SfxPoolItem
*
pOld
,
const
SfxPoolItem
*
pNew
)
void
SwXTableRows
::
Modify
(
const
SfxPoolItem
*
pOld
,
const
SfxPoolItem
*
pNew
)
...
...
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