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
9bab5e14
Kaydet (Commit)
9bab5e14
authored
Mar 28, 2015
tarafından
Bjoern Michaelsen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
flatten and improve exception msgs
Change-Id: I438d25d719b4a7e89ba0a628e29b11ee88e8af6e
üst
af686aa8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
53 deletions
+36
-53
unotbl.cxx
sw/source/core/unocore/unotbl.cxx
+36
-53
No files found.
sw/source/core/unocore/unotbl.cxx
Dosyayı görüntüle @
9bab5e14
...
@@ -4813,64 +4813,47 @@ void SwXTableColumns::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount)
...
@@ -4813,64 +4813,47 @@ void SwXTableColumns::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount)
SolarMutexGuard
aGuard
;
SolarMutexGuard
aGuard
;
if
(
nCount
==
0
)
if
(
nCount
==
0
)
return
;
return
;
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
SwTable
*
pTable
=
SwTable
::
FindTable
(
pFrmFmt
);
if
(
pTable
->
IsTblComplex
())
throw
uno
::
RuntimeException
(
"Table too complex"
,
static_cast
<
cppu
::
OWeakObject
*>
(
this
));
const
OUString
sTLName
=
sw_GetCellName
(
nIndex
,
0
);
const
SwTableBox
*
pTLBox
=
pTable
->
GetTblBox
(
sTLName
);
if
(
!
pTLBox
)
throw
uno
::
RuntimeException
(
"Cell not found"
,
static_cast
<
cppu
::
OWeakObject
*>
(
this
));
{
{
bool
bSuccess
=
false
;
// invalidate all actions
SwTable
*
pTable
=
SwTable
::
FindTable
(
pFrmFmt
);
UnoActionRemoveContext
aRemoveContext
(
pFrmFmt
->
GetDoc
());
if
(
!
pTable
->
IsTblComplex
())
}
{
const
SwStartNode
*
pSttNd
=
pTLBox
->
GetSttNd
();
const
OUString
sTLName
=
sw_GetCellName
(
nIndex
,
0
);
SwPosition
aPos
(
*
pSttNd
);
const
SwTableBox
*
pTLBox
=
pTable
->
GetTblBox
(
sTLName
);
// set cursor to the upper-left cell of the range
if
(
pTLBox
)
SwUnoCrsr
*
pUnoCrsr
=
pFrmFmt
->
GetDoc
()
->
CreateUnoCrsr
(
aPos
,
true
);
{
pUnoCrsr
->
Move
(
fnMoveForward
,
fnGoNode
);
{
pUnoCrsr
->
SetRemainInSection
(
false
);
// invalidate all actions
const
OUString
sTRName
=
sw_GetCellName
(
nIndex
+
nCount
-
1
,
0
);
UnoActionRemoveContext
aRemoveContext
(
pFrmFmt
->
GetDoc
());
const
SwTableBox
*
pTRBox
=
pTable
->
GetTblBox
(
sTRName
);
}
if
(
!
pTRBox
)
const
SwStartNode
*
pSttNd
=
pTLBox
->
GetSttNd
();
throw
uno
::
RuntimeException
(
"Cell not found"
,
static_cast
<
cppu
::
OWeakObject
*>
(
this
));
SwPosition
aPos
(
*
pSttNd
);
pUnoCrsr
->
SetMark
();
// set cursor to the upper-left cell of the range
pUnoCrsr
->
GetPoint
()
->
nNode
=
*
pTRBox
->
GetSttNd
();
SwUnoCrsr
*
pUnoCrsr
=
pFrmFmt
->
GetDoc
()
->
CreateUnoCrsr
(
aPos
,
true
);
pUnoCrsr
->
Move
(
fnMoveForward
,
fnGoNode
);
pUnoCrsr
->
Move
(
fnMoveForward
,
fnGoNode
);
SwUnoTableCrsr
*
pCrsr
=
dynamic_cast
<
SwUnoTableCrsr
*>
(
pUnoCrsr
);
pUnoCrsr
->
SetRemainInSection
(
false
);
pCrsr
->
MakeBoxSels
();
const
OUString
sTRName
=
sw_GetCellName
(
nIndex
+
nCount
-
1
,
0
);
{
// these braces are important
const
SwTableBox
*
pTRBox
=
pTable
->
GetTblBox
(
sTRName
);
UnoActionContext
aAction
(
pFrmFmt
->
GetDoc
());
if
(
pTRBox
)
pFrmFmt
->
GetDoc
()
->
DeleteCol
(
*
pUnoCrsr
);
{
delete
pUnoCrsr
;
pUnoCrsr
->
SetMark
();
}
pUnoCrsr
->
GetPoint
()
->
nNode
=
*
pTRBox
->
GetSttNd
();
{
pUnoCrsr
->
Move
(
fnMoveForward
,
fnGoNode
);
// invalidate all actions
SwUnoTableCrsr
*
pCrsr
=
UnoActionRemoveContext
aRemoveContext
(
pFrmFmt
->
GetDoc
());
dynamic_cast
<
SwUnoTableCrsr
*>
(
pUnoCrsr
);
pCrsr
->
MakeBoxSels
();
{
// these braces are important
UnoActionContext
aAction
(
pFrmFmt
->
GetDoc
());
pFrmFmt
->
GetDoc
()
->
DeleteCol
(
*
pUnoCrsr
);
delete
pUnoCrsr
;
bSuccess
=
true
;
}
{
// invalidate all actions
UnoActionRemoveContext
aRemoveContext
(
pFrmFmt
->
GetDoc
());
}
}
}
}
if
(
!
bSuccess
)
{
uno
::
RuntimeException
aExcept
;
aExcept
.
Message
=
"Illegal arguments"
;
throw
aExcept
;
}
}
}
}
}
void
SwXTableColumns
::
Modify
(
const
SfxPoolItem
*
pOld
,
const
SfxPoolItem
*
pNew
)
void
SwXTableColumns
::
Modify
(
const
SfxPoolItem
*
pOld
,
const
SfxPoolItem
*
pNew
)
{
{
ClientModify
(
this
,
pOld
,
pNew
);
}
ClientModify
(
this
,
pOld
,
pNew
);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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