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
6a298f0e
Kaydet (Commit)
6a298f0e
authored
May 12, 2015
tarafından
Jan Holesovsky
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sw: Prefix _CopyTable member variables.
Change-Id: I12a020f4912921761a8bc4f8913638b5b41a91b5
üst
0571a2de
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
36 deletions
+41
-36
ndcopy.cxx
sw/source/core/docnode/ndcopy.cxx
+41
-36
No files found.
sw/source/core/docnode/ndcopy.cxx
Dosyayı görüntüle @
6a298f0e
...
...
@@ -120,18 +120,18 @@ static bool lcl_SrchNew( const _MapTblFrmFmt& rMap, SwFrmFmt** pPara )
struct
_CopyTable
{
SwDoc
*
pDoc
;
sal_uLong
nOldTblSttIdx
;
_MapTblFrmFmts
&
rMapArr
;
SwTableLine
*
pInsLine
;
SwTableBox
*
pInsBox
;
SwTableNode
*
pTblNd
;
const
SwTable
*
pOldTable
;
_CopyTable
(
SwDoc
*
pDc
,
_MapTblFrmFmts
&
rArr
,
sal_uLong
nOldStt
,
SwTableNode
&
rTblNd
,
const
SwTable
*
pOldTbl
)
:
pDoc
(
pDc
),
nOldTblSttIdx
(
nOldStt
),
rMapArr
(
rArr
),
pInsLine
(
0
),
pInsBox
(
0
),
pTblNd
(
&
rTblNd
),
pOldTable
(
pOldTbl
)
SwDoc
*
m_
pDoc
;
sal_uLong
m_
nOldTblSttIdx
;
_MapTblFrmFmts
&
m_
rMapArr
;
SwTableLine
*
m_
pInsLine
;
SwTableBox
*
m_
pInsBox
;
SwTableNode
*
m_
pTblNd
;
const
SwTable
*
m_
pOldTable
;
_CopyTable
(
SwDoc
*
pDc
,
_MapTblFrmFmts
&
rArr
,
sal_uLong
nOldStt
,
SwTableNode
&
rTblNd
,
const
SwTable
*
pOldTable
)
:
m_pDoc
(
pDc
),
m_nOldTblSttIdx
(
nOldStt
),
m_
rMapArr
(
rArr
),
m_pInsLine
(
0
),
m_pInsBox
(
0
),
m_pTblNd
(
&
rTblNd
),
m_pOldTable
(
pOldTable
)
{}
};
...
...
@@ -140,24 +140,25 @@ static void lcl_CopyTblLine( const SwTableLine* pLine, _CopyTable* pCT );
static
void
lcl_CopyTblBox
(
SwTableBox
*
pBox
,
_CopyTable
*
pCT
)
{
SwTableBoxFmt
*
pBoxFmt
=
static_cast
<
SwTableBoxFmt
*>
(
pBox
->
GetFrmFmt
());
for
(
_MapTblFrmFmts
::
const_iterator
it
=
pCT
->
rMapArr
.
begin
();
it
!=
pCT
->
rMapArr
.
end
();
++
it
)
for
(
_MapTblFrmFmts
::
const_iterator
it
=
pCT
->
m_rMapArr
.
begin
();
it
!=
pCT
->
m_rMapArr
.
end
();
++
it
)
if
(
!
lcl_SrchNew
(
*
it
,
reinterpret_cast
<
SwFrmFmt
**>
(
&
pBoxFmt
)
)
)
break
;
if
(
pBoxFmt
==
pBox
->
GetFrmFmt
()
)
// Create a new one?
if
(
pBoxFmt
==
pBox
->
GetFrmFmt
())
// Create a new one?
{
const
SfxPoolItem
*
pItem
;
if
(
SfxItemState
::
SET
==
pBoxFmt
->
GetItemState
(
RES_BOXATR_FORMULA
,
false
,
&
pItem
)
&&
static_cast
<
const
SwTblBoxFormula
*>
(
pItem
)
->
IsIntrnlName
()
)
{
const_cast
<
SwTblBoxFormula
*>
(
static_cast
<
const
SwTblBoxFormula
*>
(
pItem
))
->
PtrToBoxNm
(
pCT
->
pOldTable
);
const_cast
<
SwTblBoxFormula
*>
(
static_cast
<
const
SwTblBoxFormula
*>
(
pItem
))
->
PtrToBoxNm
(
pCT
->
m_pOldTable
);
}
pBoxFmt
=
pCT
->
pDoc
->
MakeTableBoxFmt
();
pBoxFmt
=
pCT
->
m_
pDoc
->
MakeTableBoxFmt
();
pBoxFmt
->
CopyAttrs
(
*
pBox
->
GetFrmFmt
()
);
if
(
pBox
->
GetSttIdx
()
)
{
SvNumberFormatter
*
pN
=
pCT
->
pDoc
->
GetNumberFormatter
(
false
);
SvNumberFormatter
*
pN
=
pCT
->
m_pDoc
->
GetNumberFormatter
(
false
);
if
(
pN
&&
pN
->
HasMergeFmtTbl
()
&&
SfxItemState
::
SET
==
pBoxFmt
->
GetItemState
(
RES_BOXATR_FORMAT
,
false
,
&
pItem
)
)
{
...
...
@@ -169,60 +170,64 @@ static void lcl_CopyTblBox( SwTableBox* pBox, _CopyTable* pCT )
}
}
pCT
->
rMapArr
.
push_back
(
_MapTblFrmFmt
(
pBox
->
GetFrmFmt
(),
pBoxFmt
)
);
pCT
->
m_rMapArr
.
push_back
(
_MapTblFrmFmt
(
pBox
->
GetFrmFmt
(),
pBoxFmt
)
);
}
sal_uInt16
nLines
=
pBox
->
GetTabLines
().
size
();
SwTableBox
*
pNewBox
;
if
(
nLines
)
pNewBox
=
new
SwTableBox
(
pBoxFmt
,
nLines
,
pCT
->
pInsLine
);
pNewBox
=
new
SwTableBox
(
pBoxFmt
,
nLines
,
pCT
->
m_pInsLine
);
else
{
SwNodeIndex
aNewIdx
(
*
pCT
->
pTblNd
,
pBox
->
GetSttIdx
()
-
pCT
->
nOldTblSttIdx
);
SwNodeIndex
aNewIdx
(
*
pCT
->
m_pTblNd
,
pBox
->
GetSttIdx
()
-
pCT
->
m_nOldTblSttIdx
);
OSL_ENSURE
(
aNewIdx
.
GetNode
().
IsStartNode
(),
"Index is not on the start node"
);
pNewBox
=
new
SwTableBox
(
pBoxFmt
,
aNewIdx
,
pCT
->
pInsLine
);
pNewBox
=
new
SwTableBox
(
pBoxFmt
,
aNewIdx
,
pCT
->
m_pInsLine
);
pNewBox
->
setRowSpan
(
pBox
->
getRowSpan
()
);
}
pCT
->
pInsLine
->
GetTabBoxes
().
push_back
(
pNewBox
);
pCT
->
m_
pInsLine
->
GetTabBoxes
().
push_back
(
pNewBox
);
if
(
nLines
)
if
(
nLines
)
{
_CopyTable
aPara
(
*
pCT
);
aPara
.
pInsBox
=
pNewBox
;
_CopyTable
aPara
(
*
pCT
);
aPara
.
m_
pInsBox
=
pNewBox
;
for
(
const
SwTableLine
*
pLine
:
pBox
->
GetTabLines
()
)
lcl_CopyTblLine
(
pLine
,
&
aPara
);
}
else
if
(
pNewBox
->
IsInHeadline
(
&
pCT
->
pTblNd
->
GetTable
()
))
else
if
(
pNewBox
->
IsInHeadline
(
&
pCT
->
m_pTblNd
->
GetTable
()))
{
// In the headline, the paragraphs must match conditional styles
pNewBox
->
GetSttNd
()
->
CheckSectionCondColl
();
}
}
static
void
lcl_CopyTblLine
(
const
SwTableLine
*
pLine
,
_CopyTable
*
pCT
)
{
SwTableLineFmt
*
pLineFmt
=
static_cast
<
SwTableLineFmt
*>
(
pLine
->
GetFrmFmt
());
for
(
_MapTblFrmFmts
::
const_iterator
it
=
pCT
->
rMapArr
.
begin
();
it
!=
pCT
->
rMapArr
.
end
();
++
it
)
for
(
_MapTblFrmFmts
::
const_iterator
it
=
pCT
->
m_rMapArr
.
begin
();
it
!=
pCT
->
m_rMapArr
.
end
();
++
it
)
if
(
!
lcl_SrchNew
(
*
it
,
reinterpret_cast
<
SwFrmFmt
**>
(
&
pLineFmt
)
)
)
break
;
if
(
pLineFmt
==
pLine
->
GetFrmFmt
()
)
// Create a new one?
{
pLineFmt
=
pCT
->
pDoc
->
MakeTableLineFmt
();
pLineFmt
=
pCT
->
m_
pDoc
->
MakeTableLineFmt
();
pLineFmt
->
CopyAttrs
(
*
pLine
->
GetFrmFmt
()
);
pCT
->
rMapArr
.
push_back
(
_MapTblFrmFmt
(
pLine
->
GetFrmFmt
(),
pLineFmt
)
);
pCT
->
m_rMapArr
.
push_back
(
_MapTblFrmFmt
(
pLine
->
GetFrmFmt
(),
pLineFmt
)
);
}
SwTableLine
*
pNewLine
=
new
SwTableLine
(
pLineFmt
,
pLine
->
GetTabBoxes
().
size
(),
pCT
->
pInsBox
);
SwTableLine
*
pNewLine
=
new
SwTableLine
(
pLineFmt
,
pLine
->
GetTabBoxes
().
size
(),
pCT
->
m_pInsBox
);
// Insert the new row into the table
if
(
pCT
->
pInsBox
)
if
(
pCT
->
m_pInsBox
)
{
pCT
->
pInsBox
->
GetTabLines
().
push_back
(
pNewLine
);
pCT
->
m_pInsBox
->
GetTabLines
().
push_back
(
pNewLine
);
}
else
{
pCT
->
pTblNd
->
GetTable
().
GetTabLines
().
push_back
(
pNewLine
);
pCT
->
m_pTblNd
->
GetTable
().
GetTabLines
().
push_back
(
pNewLine
);
}
pCT
->
pInsLine
=
pNewLine
;
pCT
->
m_pInsLine
=
pNewLine
;
for
(
SwTableBoxes
::
iterator
it
=
const_cast
<
SwTableLine
*>
(
pLine
)
->
GetTabBoxes
().
begin
();
it
!=
const_cast
<
SwTableLine
*>
(
pLine
)
->
GetTabBoxes
().
end
();
++
it
)
lcl_CopyTblBox
(
*
it
,
pCT
);
...
...
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