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
0231617f
Kaydet (Commit)
0231617f
authored
Ock 21, 2012
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sw: tweak translation
60c8a970
üst
a1e4a112
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
76 additions
and
85 deletions
+76
-85
fecopy.cxx
sw/source/core/frmedt/fecopy.cxx
+13
-14
fetab.cxx
sw/source/core/frmedt/fetab.cxx
+14
-16
fews.cxx
sw/source/core/frmedt/fews.cxx
+3
-4
tblsel.cxx
sw/source/core/frmedt/tblsel.cxx
+46
-51
No files found.
sw/source/core/frmedt/fecopy.cxx
Dosyayı görüntüle @
0231617f
...
...
@@ -292,12 +292,11 @@ sal_Bool SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt,
{
sal_Bool
bRet
=
sal_True
;
// The list should be copied, while new objects below
// were selected
// The list should be copied, because below new objects will be selected
const
SdrMarkList
aMrkList
(
Imp
()
->
GetDrawView
()
->
GetMarkedObjectList
()
);
sal_uLong
nMarkCount
=
aMrkList
.
GetMarkCount
();
if
(
!
pDestShell
->
Imp
()
->
GetDrawView
()
)
// should
be generated
// should
create it now
pDestShell
->
MakeDrawView
();
else
if
(
bSelectInsert
)
pDestShell
->
Imp
()
->
GetDrawView
()
->
UnmarkAll
();
...
...
@@ -322,7 +321,7 @@ sal_Bool SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt,
if
(
pDestDrwView
->
IsGroupEntered
()
)
{
// insert into the group, when it belongs to an entered group
// or when the object is not
coupled to
a character
// or when the object is not
anchored as
a character
if
(
pSrcDrwView
->
IsGroupEntered
()
||
(
FLY_AS_CHAR
!=
rAnchor
.
GetAnchorId
())
)
...
...
@@ -470,14 +469,14 @@ sal_Bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt,
// Shift references
sal_Bool
bCopyIsMove
=
pDoc
->
IsCopyIsMove
();
if
(
bIsMove
)
// set a flag in Doc,
therefore
in TextNodes
// set a flag in Doc,
handled
in TextNodes
pDoc
->
SetCopyIsMove
(
sal_True
);
RedlineMode_t
eOldRedlMode
=
pDestShell
->
GetDoc
()
->
GetRedlineMode
();
pDestShell
->
GetDoc
()
->
SetRedlineMode_intern
(
(
RedlineMode_t
)(
eOldRedlMode
|
nsRedlineMode_t
::
REDLINE_DELETE_REDLINES
));
//
Are the
re table formulas in the area, then display the table first
// s
uch
that the table formula can calculate a new value first
//
If there a
re table formulas in the area, then display the table first
// s
o
that the table formula can calculate a new value first
// (individual boxes in the area are retrieved via the layout)
SwFieldType
*
pTblFldTyp
=
pDestShell
->
GetDoc
()
->
GetSysFldType
(
RES_TABLEFLD
);
...
...
@@ -699,8 +698,8 @@ sal_Bool SwFEShell::Paste( SwDoc* pClpDoc, sal_Bool bIncludingPageFrames )
SwNodeIndex
aIdx
(
pClpDoc
->
GetNodes
().
GetEndOfExtras
(),
2
);
SwPaM
aCpyPam
(
aIdx
);
//DocStart
//
Are the
re table formulas in the area, then display the table first
// s
uch
that the table formula can calculate a new value first
//
If there a
re table formulas in the area, then display the table first
// s
o
that the table formula can calculate a new value first
// (individual boxes in the area are retrieved via the layout)
SwFieldType
*
pTblFldTyp
=
GetDoc
()
->
GetSysFldType
(
RES_TABLEFLD
);
...
...
@@ -899,7 +898,7 @@ sal_Bool SwFEShell::Paste( SwDoc* pClpDoc, sal_Bool bIncludingPageFrames )
else
if
(
*
aCpyPam
.
GetPoint
()
==
*
aCpyPam
.
GetMark
()
&&
pClpDoc
->
GetSpzFrmFmts
()
->
Count
()
)
{
//
draw a DrawView this slo
w
//
we need a DrawVie
w
if
(
!
Imp
()
->
GetDrawView
()
)
MakeDrawView
();
...
...
@@ -994,7 +993,7 @@ sal_Bool SwFEShell::Paste( SwDoc* pClpDoc, sal_Bool bIncludingPageFrames )
if
(
pFlyFrm
)
SelectFlyFrm
(
*
pFlyFrm
,
sal_True
);
// always pick the first FlyFrame only; the others
// were
via Fly in Fly copied to the clipboard
// were
copied to the clipboard via Fly in Fly
break
;
}
else
...
...
@@ -1036,7 +1035,7 @@ sal_Bool SwFEShell::Paste( SwDoc* pClpDoc, sal_Bool bIncludingPageFrames )
pBoxNd
->
GetIndex
()
&&
aCpyPam
.
GetPoint
()
->
nNode
!=
aCpyPam
.
GetMark
()
->
nNode
)
{
// Copy more
as
1 node in the current box. But
// Copy more
than
1 node in the current box. But
// then the BoxAttribute should be removed
GetDoc
()
->
ClearBoxNumAttrs
(
rInsPos
.
nNode
);
}
...
...
@@ -1275,8 +1274,8 @@ sal_Bool SwFEShell::GetDrawObjGraphic( sal_uLong nFmt, Graphic& rGrf ) const
else
{
// fix(23806): not the origial size, but the current one.
// Otherwise it could
occur the for vector
graphics
// many MB's
are requested
// Otherwise it could
happen that for vector
graphics
// many MB's
of memory are allocated.
const
Size
aSz
(
FindFlyFrm
()
->
Prt
().
SSize
()
);
VirtualDevice
aVirtDev
(
*
GetWin
()
);
...
...
sw/source/core/frmedt/fetab.cxx
Dosyayı görüntüle @
0231617f
...
...
@@ -202,7 +202,7 @@ void SwFEShell::ParkCursorInTab()
#***********************************************************************/
sal_Bool
SwFEShell
::
InsertRow
(
sal_uInt16
nCnt
,
sal_Bool
bBehind
)
{
// check if
Sp
oint/Mark of current cursor are in a table
// check if
P
oint/Mark of current cursor are in a table
SwFrm
*
pFrm
=
GetCurrFrm
();
if
(
!
pFrm
||
!
pFrm
->
IsInTab
()
)
return
sal_False
;
...
...
@@ -233,7 +233,7 @@ sal_Bool SwFEShell::InsertRow( sal_uInt16 nCnt, sal_Bool bBehind )
sal_Bool
SwFEShell
::
InsertCol
(
sal_uInt16
nCnt
,
sal_Bool
bBehind
)
{
// check if
Sp
oint/Mark of current cursor are in a table
// check if
P
oint/Mark of current cursor are in a table
SwFrm
*
pFrm
=
GetCurrFrm
();
if
(
!
pFrm
||
!
pFrm
->
IsInTab
()
)
return
sal_False
;
...
...
@@ -295,7 +295,7 @@ sal_Bool SwFEShell::IsLastCellInRow() const
sal_Bool
SwFEShell
::
DeleteCol
()
{
// check if
Sp
oint/Mark of current cursor are in a table
// check if
P
oint/Mark of current cursor are in a table
SwFrm
*
pFrm
=
GetCurrFrm
();
if
(
!
pFrm
||
!
pFrm
->
IsInTab
()
)
return
sal_False
;
...
...
@@ -341,7 +341,7 @@ sal_Bool SwFEShell::DeleteCol()
sal_Bool
SwFEShell
::
DeleteRow
()
{
// check if
Sp
oint/Mark of current cursor are in a table
// check if
P
oint/Mark of current cursor are in a table
SwFrm
*
pFrm
=
GetCurrFrm
();
if
(
!
pFrm
||
!
pFrm
->
IsInTab
()
)
return
sal_False
;
...
...
@@ -365,11 +365,11 @@ sal_Bool SwFEShell::DeleteRow()
{
TblWait
(
aBoxes
.
size
(),
pFrm
,
*
GetDoc
()
->
GetDocShell
()
);
// Delete c
rsr
from the deletion area.
// Delete c
ursors
from the deletion area.
// Then the cursor is:
//
- there is one line next to
this
//
- there is one line previous to
this
//
- otherwise always next
//
1. the following row, if there is another row after
this
//
2. the preceding row, if there is another row before
this
//
3. otherwise below the table
{
SwTableNode
*
pTblNd
=
((
SwCntntFrm
*
)
pFrm
)
->
GetNode
()
->
FindTableNode
();
...
...
@@ -430,7 +430,7 @@ sal_Bool SwFEShell::DeleteRow()
sal_uLong
nIdx
;
if
(
pNextBox
)
// put cursor here
nIdx
=
pNextBox
->
GetSttIdx
()
+
1
;
else
// otherwise be
hind
the table
else
// otherwise be
low
the table
nIdx
=
pTblNd
->
EndOfSectionIndex
()
+
1
;
SwNodeIndex
aIdx
(
GetDoc
()
->
GetNodes
(),
nIdx
);
...
...
@@ -467,7 +467,7 @@ sal_Bool SwFEShell::DeleteRow()
sal_uInt16
SwFEShell
::
MergeTab
()
{
// check if
Sp
oint/Mark of current cursor are in a table
// check if
P
oint/Mark of current cursor are in a table
sal_uInt16
nRet
=
TBLMERGE_NOSELECTION
;
if
(
IsTableMode
()
)
{
...
...
@@ -498,7 +498,7 @@ sal_uInt16 SwFEShell::MergeTab()
sal_Bool
SwFEShell
::
SplitTab
(
sal_Bool
bVert
,
sal_uInt16
nCnt
,
sal_Bool
bSameHeight
)
{
// check if
Sp
oint/Mark of current cursor are in a table
// check if
P
oint/Mark of current cursor are in a table
SwFrm
*
pFrm
=
GetCurrFrm
();
if
(
!
pFrm
||
!
pFrm
->
IsInTab
()
)
return
sal_False
;
...
...
@@ -549,7 +549,6 @@ void SwFEShell::_GetTabCols( SwTabCols &rToFill, const SwFrm *pBox ) const
const
SwTabFrm
*
pTab
=
pBox
->
FindTabFrm
();
if
(
pLastCols
)
{
// assure few small things
sal_Bool
bDel
=
sal_True
;
if
(
pColumnCacheLastTable
==
pTab
->
GetTable
()
)
{
...
...
@@ -627,7 +626,6 @@ void SwFEShell::_GetTabRows( SwTabCols &rToFill, const SwFrm *pBox ) const
const
SwTabFrm
*
pTab
=
pBox
->
FindTabFrm
();
if
(
pLastRows
)
{
// assure few things
sal_Bool
bDel
=
sal_True
;
if
(
pRowCacheLastTable
==
pTab
->
GetTable
()
)
{
...
...
@@ -1223,7 +1221,7 @@ void SwFEShell::AdjustCellWidth( sal_Bool bBalance )
sal_Bool
SwFEShell
::
IsAdjustCellWidthAllowed
(
sal_Bool
bBalance
)
const
{
// at least one
line
with content should be contained in the selection
// at least one
row
with content should be contained in the selection
SwFrm
*
pFrm
=
GetCurrFrm
();
if
(
!
pFrm
||
!
pFrm
->
IsInTab
()
)
...
...
@@ -1266,7 +1264,7 @@ sal_Bool SwFEShell::IsAdjustCellWidthAllowed( sal_Bool bBalance ) const
return
sal_False
;
}
// AutoFormat for the table/table
s selections
// AutoFormat for the table/table
selection
sal_Bool
SwFEShell
::
SetTableAutoFmt
(
const
SwTableAutoFmt
&
rNew
)
{
SwTableNode
*
pTblNd
=
(
SwTableNode
*
)
IsCrsrInTbl
();
...
...
@@ -1352,7 +1350,7 @@ sal_Bool SwFEShell::DeleteTblSel()
SET_CURR_SHELL
(
this
);
StartAllAction
();
// search boxes via the layout
// search boxes via the layout
sal_Bool
bRet
;
SwSelBoxes
aBoxes
;
GetTblSelCrs
(
*
this
,
aBoxes
);
...
...
sw/source/core/frmedt/fews.cxx
Dosyayı görüntüle @
0231617f
...
...
@@ -457,8 +457,7 @@ void SwFEShell::InsertLabel( const SwLabelType eType, const String &rTxt, const
const
String
&
rCharacterStyle
,
const
sal_Bool
bCpyBrd
)
{
// get CrsrPosition of NodeIndex, remaining stuff can
// be done by the document self
// get node index of cursor position, SwDoc can do everything else itself
SwCntntFrm
*
pCnt
=
LTYPE_DRAW
==
eType
?
0
:
GetCurrFrm
(
sal_False
);
if
(
LTYPE_DRAW
==
eType
||
pCnt
)
{
...
...
@@ -524,7 +523,7 @@ void SwFEShell::InsertLabel( const SwLabelType eType, const String &rTxt, const
}
break
;
default
:
OSL_ENSURE
(
!
this
,
"Crsr
both not
in table nor in fly."
);
OSL_ENSURE
(
!
this
,
"Crsr
neither
in table nor in fly."
);
}
if
(
nIdx
)
...
...
@@ -557,7 +556,7 @@ sal_Bool SwFEShell::Sort(const SwSortOptions& rOpt)
if
(
IsTableMode
())
{
// Sort table
// check if
S
Point/Mark of current Crsr are in one table
// check if Point/Mark of current Crsr are in one table
SwFrm
*
pFrm
=
GetCurrFrm
(
sal_False
);
OSL_ENSURE
(
pFrm
->
FindTabFrm
(),
"Crsr not in table."
);
...
...
sw/source/core/frmedt/tblsel.cxx
Dosyayı görüntüle @
0231617f
...
...
@@ -61,9 +61,9 @@
// see also swtable.cxx
#define COLFUZZY 20L
//
defines, determining how tabl
es are merged:
//
macros, determining how table box
es are merged:
// - 1. remove empty lines, all boxes separated with blanks,
// all
empty
lines separated with ParaBreak
// all lines separated with ParaBreak
// - 2. remove all empty lines and remove all empty boxes at beginning and end,
// all boxes separated with Blank,
// all lines separated with ParaBreak
...
...
@@ -132,7 +132,7 @@ const SwLayoutFrm *lcl_FindCellFrm( const SwLayoutFrm *pLay )
const
SwLayoutFrm
*
lcl_FindNextCellFrm
(
const
SwLayoutFrm
*
pLay
)
{
//
assure cell is left (area
s)
//
ensure we leave the cell (section
s)
const
SwLayoutFrm
*
pTmp
=
pLay
;
do
{
pTmp
=
pTmp
->
GetNextLayoutLeaf
();
...
...
@@ -173,7 +173,7 @@ void GetTblSelCrs( const SwTableCursor& rTblCrsr, SwSelBoxes& rBoxes )
void
GetTblSel
(
const
SwCrsrShell
&
rShell
,
SwSelBoxes
&
rBoxes
,
const
SwTblSearchType
eSearchType
)
{
// get start
- and endcell and request next.
// get start
and end cell
if
(
!
rShell
.
IsTableMode
()
)
rShell
.
GetCrsr
();
...
...
@@ -183,7 +183,7 @@ void GetTblSel( const SwCrsrShell& rShell, SwSelBoxes& rBoxes,
void
GetTblSel
(
const
SwCursor
&
rCrsr
,
SwSelBoxes
&
rBoxes
,
const
SwTblSearchType
eSearchType
)
{
// get start
- and endcell and request next.
// get start
and end cell
OSL_ENSURE
(
rCrsr
.
GetCntntNode
()
&&
rCrsr
.
GetCntntNode
(
sal_False
),
"Tabselection not on Cnt."
);
...
...
@@ -287,7 +287,7 @@ void GetTblSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd,
do
{
bTblIsValid
=
sal_True
;
// First
we search for tables and squar
es
// First
, compute tables and rectangl
es
SwSelUnions
aUnions
;
::
MakeSelUnions
(
aUnions
,
pStart
,
pEnd
,
eSearchType
);
...
...
@@ -415,8 +415,7 @@ void GetTblSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd,
SwDeletionChecker
aDelCheck
(
pStart
);
// otherwise quickly "calculate" the table layout
// and set it up again
// otherwise quickly "calculate" the table layout and start over
SwTabFrm
*
pTable
=
aUnions
[
0
]
->
GetTable
();
while
(
pTable
)
{
...
...
@@ -497,7 +496,7 @@ sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
sal_uInt16
nRowCells
=
USHRT_MAX
;
// First
we search for tables and squar
es
// First
, compute tables and rectangl
es
SwSelUnions
aUnions
;
::
MakeSelUnions
(
aUnions
,
pStart
,
pEnd
,
nsSwTblSearchType
::
TBLSEARCH_NO_UNION_CORRECT
);
...
...
@@ -566,8 +565,8 @@ sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
{
// ok, rUnion is _not_ completely outside of rFrmRect
// if not completely
outside the union, then for Chart
// it is an invalid selection
// if not completely
inside the union, then
//
for Chart
it is an invalid selection
if
(
rUnion
.
Left
()
<=
rFrmRect
.
Left
()
+
nXFuzzy
&&
rFrmRect
.
Left
()
<=
nUnionRight
&&
rUnion
.
Left
()
<=
nFrmRight
&&
...
...
@@ -601,7 +600,7 @@ sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
if
(
!
bValidChartSel
)
break
;
// all cells of the (part) table together. Now check
o
f
// all cells of the (part) table together. Now check
i
f
// they're all adjacent
size_t
n
,
nCellCnt
=
0
;
long
nYPos
=
LONG_MAX
;
...
...
@@ -616,7 +615,7 @@ sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
// new row
if
(
n
)
{
if
(
USHRT_MAX
==
nRowCells
)
// 1. row
ex
change
if
(
USHRT_MAX
==
nRowCells
)
// 1. row change
nRowCells
=
nCellCnt
;
else
if
(
nRowCells
!=
nCellCnt
)
{
...
...
@@ -678,7 +677,7 @@ sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
if
(
bTblIsValid
)
break
;
// otherwise quickly "calculate" table layout and s
et it up again
// otherwise quickly "calculate" table layout and s
tart over
SwTabFrm
*
pTable
=
aUnions
[
0
]
->
GetTable
();
for
(
i
=
0
;
i
<
aUnions
.
Count
();
++
i
)
{
...
...
@@ -695,7 +694,7 @@ sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
pGetCLines
->
DeleteAndDestroy
(
0
,
pGetCLines
->
Count
()
);
}
while
(
sal_True
);
OSL_ENSURE
(
nLoopMax
,
"table layout is still invalid
e
!"
);
OSL_ENSURE
(
nLoopMax
,
"table layout is still invalid!"
);
if
(
!
bValidChartSel
&&
pGetCLines
)
pGetCLines
->
DeleteAndDestroy
(
0
,
pGetCLines
->
Count
()
);
...
...
@@ -742,16 +741,16 @@ sal_Bool GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes )
while
(
pSttCell
&&
!
pSttCell
->
IsCellFrm
()
)
pSttCell
=
pSttCell
->
GetUpper
();
//
first we search for tables and squar
es
//
First, compute tables and rectangl
es
SwSelUnions
aUnions
;
//
then we test for above and
to the left
//
by default, first test above and then
to the left
::
MakeSelUnions
(
aUnions
,
pStart
,
pEnd
,
nsSwTblSearchType
::
TBLSEARCH_COL
);
sal_Bool
bTstRow
=
sal_True
,
bFound
=
sal_False
;
sal_uInt16
i
;
// 1. check if box above contains value
s/formulas
// 1. check if box above contains value
/formula
for
(
i
=
0
;
i
<
aUnions
.
Count
();
++
i
)
{
SwSelUnion
*
pUnion
=
aUnions
[
i
];
...
...
@@ -780,7 +779,7 @@ sal_Bool GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes )
break
;
// all boxes together, do not check the
// row, if a formula o
f values
was found
// row, if a formula o
r value
was found
bTstRow
=
0
==
nWhichId
||
USHRT_MAX
==
nWhichId
;
bFound
=
sal_True
;
break
;
...
...
@@ -849,7 +848,7 @@ sal_Bool GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes )
break
;
// all boxes together, do not check the
// row
, if a formula of values
was found
// row
if a formula or value
was found
bFound
=
0
!=
nWhichId
&&
USHRT_MAX
!=
nWhichId
;
bTstRow
=
sal_False
;
break
;
...
...
@@ -963,7 +962,6 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
{
rBoxes
.
clear
();
// first we check for tables and squares
OSL_ENSURE
(
rPam
.
GetCntntNode
()
&&
rPam
.
GetCntntNode
(
sal_False
),
"Tabselection not on Cnt."
);
...
...
@@ -979,6 +977,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
const
SwLayoutFrm
*
pEnd
=
pCntNd
->
getLayoutFrm
(
pCntNd
->
GetDoc
()
->
GetCurrentLayout
(),
&
aPt
)
->
GetUpper
();
// First, compute tables and rectangles
SwSelUnions
aUnions
;
::
MakeSelUnions
(
aUnions
,
pStart
,
pEnd
);
if
(
!
aUnions
.
Count
()
)
...
...
@@ -1178,11 +1177,11 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
if
(
1
>=
rBoxes
.
size
()
)
return
;
// now search all adjacent boxes and connect
// their contents with blanks. All
underneath
will be tied
// now search all
horizontally
adjacent boxes and connect
// their contents with blanks. All
vertically adjacent
will be tied
// together as paragraphs
// 1. Solution: map array and all on same Y-
plane
// 1. Solution: map array and all on same Y-
level
// are separated with blanks
// all others are separated with paragraphs
sal_Bool
bCalcWidth
=
sal_True
;
...
...
@@ -1202,7 +1201,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
for
(
n
=
0
;
n
<
aPosArr
.
Count
();
++
n
)
{
const
_CmpLPt
&
rPt
=
aPosArr
[
n
];
if
(
n
&&
aPosArr
[
n
-
1
].
Y
()
==
rPt
.
Y
()
)
// same
plane
?
if
(
n
&&
aPosArr
[
n
-
1
].
Y
()
==
rPt
.
Y
()
)
// same
Y level
?
{
if
(
bEmptyLine
&&
!
IsEmptyBox
(
*
rPt
.
pSelBox
,
aPam
))
bEmptyLine
=
sal_False
;
...
...
@@ -1246,7 +1245,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
for
(
n
=
0
;
n
<
aPosArr
.
Count
();
++
n
)
{
const
_CmpLPt
&
rPt
=
aPosArr
[
n
];
if
(
n
&&
aPosArr
[
n
-
1
].
Y
()
==
rPt
.
Y
()
)
// same
plane
?
if
(
n
&&
aPosArr
[
n
-
1
].
Y
()
==
rPt
.
Y
()
)
// same
Y level
?
{
sal_Bool
bEmptyBox
=
IsEmptyBox
(
*
rPt
.
pSelBox
,
aPam
);
if
(
bEmptyBox
)
...
...
@@ -1341,7 +1340,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
const
_CmpLPt
&
rPt
=
aPosArr
[
n
];
if
(
bCalcWidth
)
{
if
(
nY
==
(
bVert
?
rPt
.
X
()
:
rPt
.
Y
()
)
)
// same plane
?
if
(
nY
==
(
bVert
?
rPt
.
X
()
:
rPt
.
Y
()
)
)
// same Y level
?
nWidth
+=
rPt
.
pSelBox
->
GetFrmFmt
()
->
GetFrmSize
().
GetWidth
();
else
bCalcWidth
=
sal_False
;
// one line ready
...
...
@@ -1367,12 +1366,12 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
lcl_InsTblBox
(
pTblNd
,
pDoc
,
pTmpBox
,
nInsPos
);
(
*
ppMergeBox
)
=
pInsLine
->
GetTabBoxes
()[
nInsPos
];
pInsLine
->
GetTabBoxes
().
Remove
(
nInsPos
);
// deliver
again
pInsLine
->
GetTabBoxes
().
Remove
(
nInsPos
);
// remove
again
(
*
ppMergeBox
)
->
SetUpper
(
0
);
(
*
ppMergeBox
)
->
ClaimFrmFmt
();
// define the border:
of the first box the upper-left of the
//
last box the lower-right corner
:
// define the border:
the upper/left side of the first box,
//
the lower/right side of the last box
:
if
(
pLastBox
&&
pFirstBox
)
{
SvxBoxItem
aBox
(
pFirstBox
->
GetFrmFmt
()
->
GetBox
()
);
...
...
@@ -1404,8 +1403,8 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
aPam
.
GetPoint
()
->
nContent
.
Assign
(
pCNd
,
nL
);
SwNodeIndex
aSttNdIdx
(
*
rPt
.
pSelBox
->
GetSttNd
(),
1
);
// one node should be kept in the box (
otherwise the
// se
lection would be deleted during a move
// one node should be kept in the box (otherwise the
// se
ction would be deleted during a move)
bool
const
bUndo
(
pDoc
->
GetIDocumentUndoRedo
().
DoesUndo
());
if
(
pUndo
)
{
...
...
@@ -1535,8 +1534,8 @@ sal_uInt16 CheckMergeSel( const SwSelBoxes& rBoxes )
return
eRet
;
}
// Determines tables a
nd union-squares affected by a table selection
//
also for splitt tables
// Determines tables a
ffected by a table selection and union rectangles
//
of the selection (also for split tables)
SV_IMPL_PTRARR
(
SwSelUnions
,
SwSelUnion
*
);
SwTwips
lcl_CalcWish
(
const
SwLayoutFrm
*
pCell
,
long
nWish
,
...
...
@@ -1782,7 +1781,7 @@ void lcl_FindStartEndCol( const SwLayoutFrm *&rpStart,
if
(
!
pTmpLeaf
||
!
pTmpTab
->
IsAnLower
(
pTmpLeaf
)
)
{
pTmpTab
=
(
const
SwTabFrm
*
)
pTmpTab
->
FindPrev
();
OSL_ENSURE
(
pTmpTab
->
IsTabFrm
(),
"Predecessor of Follow not
in
Master."
);
OSL_ENSURE
(
pTmpTab
->
IsTabFrm
(),
"Predecessor of Follow not Master."
);
rpEnd
=
pTmpTab
->
FindLastCntnt
()
->
GetUpper
();
while
(
!
rpEnd
->
IsCellFrm
()
)
rpEnd
=
rpEnd
->
GetUpper
();
...
...
@@ -1819,7 +1818,7 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrm *pStart,
{
if
(
!
pTable
->
IsAnFollow
(
pEndTable
)
)
{
OSL_ENSURE
(
pEndTable
->
IsAnFollow
(
pTable
),
"Tabchain
linked
."
);
OSL_ENSURE
(
pEndTable
->
IsAnFollow
(
pTable
),
"Tabchain
in knots
."
);
bExchange
=
sal_True
;
}
}
...
...
@@ -1847,7 +1846,7 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrm *pStart,
}
// Beginning and end now nicely sorted, if required we
// should
transfer
them
// should
move
them
if
(
nsSwTblSearchType
::
TBLSEARCH_ROW
==
((
~
nsSwTblSearchType
::
TBLSEARCH_PROTECT
)
&
eSearchType
)
)
::
lcl_FindStartEndRow
(
pStart
,
pEnd
,
nsSwTblSearchType
::
TBLSEARCH_PROTECT
&
eSearchType
);
else
if
(
nsSwTblSearchType
::
TBLSEARCH_COL
==
((
~
nsSwTblSearchType
::
TBLSEARCH_PROTECT
)
&
eSearchType
)
)
...
...
@@ -1855,7 +1854,7 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrm *pStart,
if
(
!
pEnd
)
return
;
// Made code robust.
// retrieve again, as they have been
transferr
ed
// retrieve again, as they have been
mov
ed
pTable
=
pStart
->
FindTabFrm
();
pEndTable
=
pEnd
->
FindTabFrm
();
...
...
@@ -1913,13 +1912,12 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrm *pStart,
SwRect
aUnion
(
aSt
,
Size
(
aDiff
.
X
(),
aDiff
.
Y
()
)
);
aUnion
.
Justify
();
// for
if
(
!
(
nsSwTblSearchType
::
TBLSEARCH_NO_UNION_CORRECT
&
eSearchType
))
{
//
Pity the union contains rounding errors
, therefore
//
Unfortunately the union contains rounding errors now
, therefore
// erroneous results could occur during split/merge.
// To prevent these we will determine the first and last row
// within the union and use their values for
the
new union
// within the union and use their values for
a
new union
const
SwLayoutFrm
*
pRow
=
pTable
->
IsFollow
()
?
pTable
->
GetFirstNonHeadlineRow
()
:
(
const
SwLayoutFrm
*
)
pTable
->
Lower
();
...
...
@@ -2006,7 +2004,7 @@ sal_Bool CheckSplitCells( const SwCursor& rCrsr, sal_uInt16 nDiv,
sal_uInt16
nMinValue
=
nDiv
*
MINLAY
;
// Get start
- and end cell and request next
// Get start
and end cell
Point
aPtPos
,
aMkPos
;
const
SwShellCrsr
*
pShCrsr
=
dynamic_cast
<
const
SwShellCrsr
*>
(
&
rCrsr
);
if
(
pShCrsr
)
...
...
@@ -2024,7 +2022,7 @@ sal_Bool CheckSplitCells( const SwCursor& rCrsr, sal_uInt16 nDiv,
SWRECTFN
(
pStart
->
GetUpper
()
)
//
first we search for tables and squar
es
//
First, compute tables and rectangl
es
SwSelUnions
aUnions
;
::
MakeSelUnions
(
aUnions
,
pStart
,
pEnd
,
eSearchType
);
...
...
@@ -2072,11 +2070,8 @@ sal_Bool CheckSplitCells( const SwCursor& rCrsr, sal_uInt16 nDiv,
}
// -------------------------------------------------------------------
// Diese Klassen kopieren die aktuelle Tabellen-Selektion (rBoxes)
// unter Beibehaltung der Tabellen-Struktur in eine eigene Struktur
// neu: SS zum gezielten Loeschen/Retaurieren des Layouts.
// These Classes copy the current table selections (rBoxes),
//
retaining the table structure in a own
structure
//
into a new structure, retaining the table
structure
// new: SS for targeted erasing/restoring of the layout
void
lcl_InsertRow
(
SwTableLine
&
rLine
,
SwLayoutFrm
*
pUpper
,
SwFrm
*
pSibling
)
...
...
@@ -2284,7 +2279,7 @@ void _FndBox::DelFrms( SwTable &rTable )
else
if
(
pFollow
)
::
UnsetFollow
(
pFollow
);
// A Tab
ellen
Frm should always remain!
// A Tab
le
Frm should always remain!
if
(
pPrev
||
pFollow
)
{
// OD 26.08.2003 #i18103# - if table is in a section,
...
...
@@ -2443,9 +2438,9 @@ void _FndBox::MakeFrms( SwTable &rTable )
void
_FndBox
::
MakeNewFrms
(
SwTable
&
rTable
,
const
sal_uInt16
nNumber
,
const
sal_Bool
bBehind
)
{
// Create Frms for new inserted lines
// Create Frms for new
ly
inserted lines
// bBehind == sal_True: before pLineBehind
// == sal_False: af
er
pLineBefore
// == sal_False: af
ter
pLineBefore
const
sal_uInt16
nBfPos
=
pLineBefore
?
rTable
.
GetTabLines
().
GetPos
(
(
const
SwTableLine
*&
)
pLineBefore
)
:
USHRT_MAX
;
...
...
@@ -2454,7 +2449,7 @@ void _FndBox::MakeNewFrms( SwTable &rTable, const sal_uInt16 nNumber,
USHRT_MAX
;
//nNumber: how often did we insert
//nCnt: how many
nNumber were inserted
//nCnt: how many
were inserted nNumber times
const
sal_uInt16
nCnt
=
((
nBhPos
!=
USHRT_MAX
?
nBhPos
:
rTable
.
GetTabLines
().
Count
())
-
...
...
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