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
637c71b0
Kaydet (Commit)
637c71b0
authored
Mar 01, 2017
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
coverity#1401593 Wrapper object use after free
Change-Id: I7fdaf527ffbe7d3d952c17c62707bb4a22b05f1d
üst
79d3c022
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
31 deletions
+27
-31
lwppagelayout.cxx
lotuswordpro/source/filter/lwppagelayout.cxx
+27
-31
No files found.
lotuswordpro/source/filter/lwppagelayout.cxx
Dosyayı görüntüle @
637c71b0
...
@@ -312,8 +312,7 @@ void LwpPageLayout::ParseFootNoteSeparator(XFPageMaster * pm1)
...
@@ -312,8 +312,7 @@ void LwpPageLayout::ParseFootNoteSeparator(XFPageMaster * pm1)
*/
*/
void
LwpPageLayout
::
RegisterStyle
()
void
LwpPageLayout
::
RegisterStyle
()
{
{
std
::
unique_ptr
<
XFPageMaster
>
xpm1
(
new
XFPageMaster
());
std
::
unique_ptr
<
XFPageMaster
>
xpm1
(
new
XFPageMaster
);
m_pXFPageMaster
=
xpm1
.
get
();
ParseGeometry
(
xpm1
.
get
());
ParseGeometry
(
xpm1
.
get
());
//Does not process LayoutScale, for watermark is not supported in SODC.
//Does not process LayoutScale, for watermark is not supported in SODC.
...
@@ -339,11 +338,11 @@ void LwpPageLayout::RegisterStyle()
...
@@ -339,11 +338,11 @@ void LwpPageLayout::RegisterStyle()
OUString
pmname
=
pm1
->
GetStyleName
();
OUString
pmname
=
pm1
->
GetStyleName
();
//Add master page
//Add master page
XFMasterPage
*
p1
=
new
XFMasterPage
;
std
::
unique_ptr
<
XFMasterPage
>
p1
(
new
XFMasterPage
)
;
p1
->
SetStyleName
(
GetName
().
str
());
p1
->
SetStyleName
(
GetName
().
str
());
p1
->
SetPageMaster
(
pmname
);
p1
->
SetPageMaster
(
pmname
);
p1
=
static_cast
<
XFMasterPage
*>
(
pXFStyleManager
->
AddStyle
(
p1
).
m_pStyle
);
XFMasterPage
*
p1_added
=
static_cast
<
XFMasterPage
*>
(
pXFStyleManager
->
AddStyle
(
p1
.
release
()
).
m_pStyle
);
m_StyleName
=
p1
->
GetStyleName
();
m_StyleName
=
p1
_added
->
GetStyleName
();
//Set footer style
//Set footer style
LwpFooterLayout
*
pLayoutFooter
=
GetFooterLayout
();
LwpFooterLayout
*
pLayoutFooter
=
GetFooterLayout
();
...
@@ -351,7 +350,7 @@ void LwpPageLayout::RegisterStyle()
...
@@ -351,7 +350,7 @@ void LwpPageLayout::RegisterStyle()
{
{
pLayoutFooter
->
SetFoundry
(
m_pFoundry
);
pLayoutFooter
->
SetFoundry
(
m_pFoundry
);
pLayoutFooter
->
RegisterStyle
(
pm1
);
pLayoutFooter
->
RegisterStyle
(
pm1
);
pLayoutFooter
->
RegisterStyle
(
p1
);
pLayoutFooter
->
RegisterStyle
(
p1
_added
);
}
}
//Set header style
//Set header style
...
@@ -360,7 +359,7 @@ void LwpPageLayout::RegisterStyle()
...
@@ -360,7 +359,7 @@ void LwpPageLayout::RegisterStyle()
{
{
pLayoutHeader
->
SetFoundry
(
m_pFoundry
);
pLayoutHeader
->
SetFoundry
(
m_pFoundry
);
pLayoutHeader
->
RegisterStyle
(
pm1
);
pLayoutHeader
->
RegisterStyle
(
pm1
);
pLayoutHeader
->
RegisterStyle
(
p1
);
pLayoutHeader
->
RegisterStyle
(
p1
_added
);
}
}
//register child layout style for mirror page and frame
//register child layout style for mirror page and frame
RegisterChildStyle
();
RegisterChildStyle
();
...
@@ -372,18 +371,15 @@ void LwpPageLayout::RegisterStyle()
...
@@ -372,18 +371,15 @@ void LwpPageLayout::RegisterStyle()
*/
*/
OUString
LwpPageLayout
::
RegisterEndnoteStyle
()
OUString
LwpPageLayout
::
RegisterEndnoteStyle
()
{
{
XFPageMaster
*
pm1
=
new
XFPageMaster
();
std
::
unique_ptr
<
XFPageMaster
>
pm1
(
new
XFPageMaster
);
m_pXFPageMaster
=
pm1
;
ParseGeometry
(
pm1
.
get
());
ParseGeometry
(
pm1
);
ParseWaterMark
(
pm1
.
get
());
ParseWaterMark
(
pm1
);
ParseMargins
(
pm1
.
get
());
ParseMargins
(
pm1
);
ParseColumns
(
pm1
.
get
());
ParseColumns
(
pm1
);
ParseBorders
(
pm1
.
get
());
ParseBorders
(
pm1
);
ParseShadow
(
pm1
.
get
());
ParseShadow
(
pm1
);
ParseBackGround
(
pm1
.
get
());
// ParseBackColor(pm1);
ParseBackGround
(
pm1
);
//ParseFootNoteSeparator(pm1);
pm1
->
SetTextDir
(
GetTextDirection
());
pm1
->
SetTextDir
(
GetTextDirection
());
LwpUseWhen
*
pUseWhen
=
GetUseWhen
();
LwpUseWhen
*
pUseWhen
=
GetUseWhen
();
...
@@ -394,11 +390,11 @@ OUString LwpPageLayout::RegisterEndnoteStyle()
...
@@ -394,11 +390,11 @@ OUString LwpPageLayout::RegisterEndnoteStyle()
//Add the page master to stylemanager
//Add the page master to stylemanager
XFStyleManager
*
pXFStyleManager
=
LwpGlobalMgr
::
GetInstance
()
->
GetXFStyleManager
();
XFStyleManager
*
pXFStyleManager
=
LwpGlobalMgr
::
GetInstance
()
->
GetXFStyleManager
();
m_pXFPageMaster
=
pm1
=
static_cast
<
XFPageMaster
*>
(
pXFStyleManager
->
AddStyle
(
pm1
).
m_pStyle
);
m_pXFPageMaster
=
static_cast
<
XFPageMaster
*>
(
pXFStyleManager
->
AddStyle
(
pm1
.
release
()
).
m_pStyle
);
OUString
pmname
=
pm1
->
GetStyleName
();
OUString
pmname
=
m_pXFPageMaster
->
GetStyleName
();
//Add master page
//Add master page
XFMasterPage
*
p1
=
new
XFMasterPage
;
std
::
unique_ptr
<
XFMasterPage
>
p1
(
new
XFMasterPage
)
;
p1
->
SetStyleName
(
"Endnote"
);
p1
->
SetStyleName
(
"Endnote"
);
p1
->
SetPageMaster
(
pmname
);
p1
->
SetPageMaster
(
pmname
);
...
@@ -407,8 +403,8 @@ OUString LwpPageLayout::RegisterEndnoteStyle()
...
@@ -407,8 +403,8 @@ OUString LwpPageLayout::RegisterEndnoteStyle()
if
(
pLayoutFooter
)
if
(
pLayoutFooter
)
{
{
pLayoutFooter
->
SetFoundry
(
m_pFoundry
);
pLayoutFooter
->
SetFoundry
(
m_pFoundry
);
pLayoutFooter
->
RegisterStyle
(
pm1
);
pLayoutFooter
->
RegisterStyle
(
m_pXFPageMaster
);
pLayoutFooter
->
RegisterStyle
(
p1
);
pLayoutFooter
->
RegisterStyle
(
p1
.
get
()
);
}
}
//Set header style
//Set header style
...
@@ -416,11 +412,11 @@ OUString LwpPageLayout::RegisterEndnoteStyle()
...
@@ -416,11 +412,11 @@ OUString LwpPageLayout::RegisterEndnoteStyle()
if
(
pLayoutHeader
)
if
(
pLayoutHeader
)
{
{
pLayoutHeader
->
SetFoundry
(
m_pFoundry
);
pLayoutHeader
->
SetFoundry
(
m_pFoundry
);
pLayoutHeader
->
RegisterStyle
(
pm1
);
pLayoutHeader
->
RegisterStyle
(
m_pXFPageMaster
);
pLayoutHeader
->
RegisterStyle
(
p1
);
pLayoutHeader
->
RegisterStyle
(
p1
.
get
()
);
}
}
return
pXFStyleManager
->
AddStyle
(
p1
).
m_pStyle
->
GetStyleName
();
return
pXFStyleManager
->
AddStyle
(
p1
.
release
()
).
m_pStyle
->
GetStyleName
();
}
}
/**
/**
* @descr: Whether current page layout has columns
* @descr: Whether current page layout has columns
...
@@ -754,7 +750,7 @@ void LwpHeaderLayout::Read()
...
@@ -754,7 +750,7 @@ void LwpHeaderLayout::Read()
void
LwpHeaderLayout
::
RegisterStyle
(
XFPageMaster
*
pm1
)
void
LwpHeaderLayout
::
RegisterStyle
(
XFPageMaster
*
pm1
)
{
{
std
::
unique_ptr
<
XFHeaderStyle
>
xHeaderStyle
(
new
XFHeaderStyle
()
);
std
::
unique_ptr
<
XFHeaderStyle
>
xHeaderStyle
(
new
XFHeaderStyle
);
//Modify page top margin
//Modify page top margin
//page top marging: from top of header to the top edge
//page top marging: from top of header to the top edge
...
@@ -872,7 +868,7 @@ void LwpHeaderLayout::ParseWaterMark(XFHeaderStyle * pHeaderStyle)
...
@@ -872,7 +868,7 @@ void LwpHeaderLayout::ParseWaterMark(XFHeaderStyle * pHeaderStyle)
void
LwpHeaderLayout
::
RegisterStyle
(
XFMasterPage
*
mp1
)
void
LwpHeaderLayout
::
RegisterStyle
(
XFMasterPage
*
mp1
)
{
{
rtl
::
Reference
<
XFHeader
>
xHeader
(
new
XFHeader
()
);
rtl
::
Reference
<
XFHeader
>
xHeader
(
new
XFHeader
);
rtl
::
Reference
<
LwpObject
>
pStory
=
m_Content
.
obj
();
rtl
::
Reference
<
LwpObject
>
pStory
=
m_Content
.
obj
();
if
(
pStory
.
is
())
if
(
pStory
.
is
())
{
{
...
@@ -918,7 +914,7 @@ void LwpFooterLayout::Read()
...
@@ -918,7 +914,7 @@ void LwpFooterLayout::Read()
void
LwpFooterLayout
::
RegisterStyle
(
XFPageMaster
*
pm1
)
void
LwpFooterLayout
::
RegisterStyle
(
XFPageMaster
*
pm1
)
{
{
std
::
unique_ptr
<
XFFooterStyle
>
xFooterStyle
(
new
XFFooterStyle
()
);
std
::
unique_ptr
<
XFFooterStyle
>
xFooterStyle
(
new
XFFooterStyle
);
//Modify page bottom margin
//Modify page bottom margin
//page bottom margin: from bottom of footer to the bottom edge
//page bottom margin: from bottom of footer to the bottom edge
...
@@ -1023,7 +1019,7 @@ void LwpFooterLayout::ParseBackColor(XFFooterStyle* pFooterStyle)
...
@@ -1023,7 +1019,7 @@ void LwpFooterLayout::ParseBackColor(XFFooterStyle* pFooterStyle)
void
LwpFooterLayout
::
RegisterStyle
(
XFMasterPage
*
mp1
)
void
LwpFooterLayout
::
RegisterStyle
(
XFMasterPage
*
mp1
)
{
{
rtl
::
Reference
<
XFFooter
>
xFooter
(
new
XFFooter
()
);
rtl
::
Reference
<
XFFooter
>
xFooter
(
new
XFFooter
);
rtl
::
Reference
<
LwpObject
>
pStory
=
m_Content
.
obj
(
VO_STORY
);
rtl
::
Reference
<
LwpObject
>
pStory
=
m_Content
.
obj
(
VO_STORY
);
//Call the RegisterStyle first to register the styles in footer paras, and then XFConvert()
//Call the RegisterStyle first to register the styles in footer paras, and then XFConvert()
if
(
pStory
.
is
())
if
(
pStory
.
is
())
...
...
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