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
0e5d5389
Kaydet (Commit)
0e5d5389
authored
Şub 01, 2018
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
ofz#5872 Direct-leak
Change-Id: Id792ecc80dd3367f070c9a613f3999a8c3e386a1
üst
f38c49cd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
12 deletions
+18
-12
htmltab.cxx
sw/source/filter/html/htmltab.cxx
+14
-7
swhtml.hxx
sw/source/filter/html/swhtml.hxx
+4
-5
No files found.
sw/source/filter/html/htmltab.cxx
Dosyayı görüntüle @
0e5d5389
...
@@ -401,7 +401,9 @@ class HTMLTable
...
@@ -401,7 +401,9 @@ class HTMLTable
const
SwStartNode
*
m_pPrevStartNode
;
// the Table-Node or the Start-Node of the section before
const
SwStartNode
*
m_pPrevStartNode
;
// the Table-Node or the Start-Node of the section before
const
SwTable
*
m_pSwTable
;
// SW-Table (only on Top-Level)
const
SwTable
*
m_pSwTable
;
// SW-Table (only on Top-Level)
SwTableBox
*
m_pBox1
;
// TableBox, generated when the Top-Level-Table was build
public
:
std
::
unique_ptr
<
SwTableBox
>
m_xBox1
;
// TableBox, generated when the Top-Level-Table was build
private
:
SwTableBoxFormat
*
m_pBoxFormat
;
// frame::Frame-Format from SwTableBox
SwTableBoxFormat
*
m_pBoxFormat
;
// frame::Frame-Format from SwTableBox
SwTableLineFormat
*
m_pLineFormat
;
// frame::Frame-Format from SwTableLine
SwTableLineFormat
*
m_pLineFormat
;
// frame::Frame-Format from SwTableLine
SwTableLineFormat
*
m_pLineFrameFormatNoHeight
;
SwTableLineFormat
*
m_pLineFrameFormatNoHeight
;
...
@@ -909,7 +911,6 @@ void HTMLTable::InitCtor(const HTMLTableOptions& rOptions)
...
@@ -909,7 +911,6 @@ void HTMLTable::InitCtor(const HTMLTableOptions& rOptions)
m_nRows
=
0
;
m_nRows
=
0
;
m_nCurrentRow
=
0
;
m_nCurrentColumn
=
0
;
m_nCurrentRow
=
0
;
m_nCurrentColumn
=
0
;
m_pBox1
=
nullptr
;
m_pBoxFormat
=
nullptr
;
m_pLineFormat
=
nullptr
;
m_pBoxFormat
=
nullptr
;
m_pLineFormat
=
nullptr
;
m_pLineFrameFormatNoHeight
=
nullptr
;
m_pLineFrameFormatNoHeight
=
nullptr
;
m_xInheritedBackgroundBrush
.
reset
();
m_xInheritedBackgroundBrush
.
reset
();
...
@@ -1047,6 +1048,13 @@ HTMLTable::HTMLTable(SwHTMLParser* pPars,
...
@@ -1047,6 +1048,13 @@ HTMLTable::HTMLTable(SwHTMLParser* pPars,
m_pParser
->
RegisterHTMLTable
(
this
);
m_pParser
->
RegisterHTMLTable
(
this
);
}
}
void
SwHTMLParser
::
DeregisterHTMLTable
(
HTMLTable
*
pOld
)
{
if
(
pOld
->
m_xBox1
)
m_aOrphanedTableBoxes
.
emplace_back
(
std
::
move
(
pOld
->
m_xBox1
));
m_aTables
.
erase
(
std
::
remove
(
m_aTables
.
begin
(),
m_aTables
.
end
(),
pOld
));
}
HTMLTable
::~
HTMLTable
()
HTMLTable
::~
HTMLTable
()
{
{
m_pParser
->
DeregisterHTMLTable
(
this
);
m_pParser
->
DeregisterHTMLTable
(
this
);
...
@@ -1465,12 +1473,11 @@ SwTableBox *HTMLTable::NewTableBox( const SwStartNode *pStNd,
...
@@ -1465,12 +1473,11 @@ SwTableBox *HTMLTable::NewTableBox( const SwStartNode *pStNd,
{
{
SwTableBox
*
pBox
;
SwTableBox
*
pBox
;
if
(
m_
pBox1
&&
m_p
Box1
->
GetSttNd
()
==
pStNd
)
if
(
m_
xBox1
&&
m_x
Box1
->
GetSttNd
()
==
pStNd
)
{
{
// If the StartNode is the StartNode of the initially created box, we take that box
// If the StartNode is the StartNode of the initially created box, we take that box
pBox
=
const_cast
<
HTMLTable
*>
(
this
)
->
m_
pBox1
;
pBox
=
const_cast
<
HTMLTable
*>
(
this
)
->
m_
xBox1
.
release
()
;
pBox
->
SetUpper
(
pUpper
);
pBox
->
SetUpper
(
pUpper
);
const_cast
<
HTMLTable
*>
(
this
)
->
m_pBox1
=
nullptr
;
}
}
else
else
pBox
=
new
SwTableBox
(
m_pBoxFormat
,
*
pStNd
,
pUpper
);
pBox
=
new
SwTableBox
(
m_pBoxFormat
,
*
pStNd
,
pUpper
);
...
@@ -2316,11 +2323,11 @@ void HTMLTable::MakeTable( SwTableBox *pBox, sal_uInt16 nAbsAvail,
...
@@ -2316,11 +2323,11 @@ void HTMLTable::MakeTable( SwTableBox *pBox, sal_uInt16 nAbsAvail,
// get the default line and box format
// get the default line and box format
// remember the first box and unlist it from the first row
// remember the first box and unlist it from the first row
SwTableLine
*
pLine1
=
(
m_pSwTable
->
GetTabLines
())[
0
];
SwTableLine
*
pLine1
=
(
m_pSwTable
->
GetTabLines
())[
0
];
m_
pBox1
=
(
pLine1
->
GetTabBoxes
())[
0
]
;
m_
xBox1
.
reset
((
pLine1
->
GetTabBoxes
())[
0
])
;
pLine1
->
GetTabBoxes
().
erase
(
pLine1
->
GetTabBoxes
().
begin
());
pLine1
->
GetTabBoxes
().
erase
(
pLine1
->
GetTabBoxes
().
begin
());
m_pLineFormat
=
static_cast
<
SwTableLineFormat
*>
(
pLine1
->
GetFrameFormat
());
m_pLineFormat
=
static_cast
<
SwTableLineFormat
*>
(
pLine1
->
GetFrameFormat
());
m_pBoxFormat
=
static_cast
<
SwTableBoxFormat
*>
(
m_
p
Box1
->
GetFrameFormat
());
m_pBoxFormat
=
static_cast
<
SwTableBoxFormat
*>
(
m_
x
Box1
->
GetFrameFormat
());
MakeTable_
(
pBox
);
MakeTable_
(
pBox
);
...
...
sw/source/filter/html/swhtml.hxx
Dosyayı görüntüle @
0e5d5389
...
@@ -406,6 +406,9 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient
...
@@ -406,6 +406,9 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient
HTMLAttrContexts
m_aContexts
;
// the current context of attribute/token
HTMLAttrContexts
m_aContexts
;
// the current context of attribute/token
std
::
vector
<
SwFrameFormat
*>
m_aMoveFlyFrames
;
// Fly-Frames, the anchor is moved
std
::
vector
<
SwFrameFormat
*>
m_aMoveFlyFrames
;
// Fly-Frames, the anchor is moved
std
::
deque
<
sal_Int32
>
m_aMoveFlyCnts
;
// and the Content-Positions
std
::
deque
<
sal_Int32
>
m_aMoveFlyCnts
;
// and the Content-Positions
//stray SwTableBoxes which need to be deleted to avoid leaking, but hold
//onto them until parsing is done
std
::
vector
<
std
::
unique_ptr
<
SwTableBox
>>
m_aOrphanedTableBoxes
;
SwApplet_Impl
*
m_pAppletImpl
;
// current applet
SwApplet_Impl
*
m_pAppletImpl
;
// current applet
...
@@ -947,11 +950,7 @@ public:
...
@@ -947,11 +950,7 @@ public:
m_aTables
.
push_back
(
pNew
);
m_aTables
.
push_back
(
pNew
);
}
}
void
DeregisterHTMLTable
(
HTMLTable
*
pOld
)
void
DeregisterHTMLTable
(
HTMLTable
*
pOld
);
{
m_aTables
.
erase
(
std
::
remove
(
m_aTables
.
begin
(),
m_aTables
.
end
(),
pOld
));
}
};
};
struct
SwPendingStackData
struct
SwPendingStackData
...
...
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