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
fb8cba16
Kaydet (Commit)
fb8cba16
authored
Ara 13, 2015
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
infinite recurse protection
Change-Id: I7139e67e7b5bcd7e1867dff1cfbd53fa0f5748b7
üst
9e820dc8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
21 deletions
+38
-21
lwpdoc.hxx
lotuswordpro/source/filter/lwpdoc.hxx
+2
-2
lwplayout.cxx
lotuswordpro/source/filter/lwplayout.cxx
+14
-17
lwplayout.hxx
lotuswordpro/source/filter/lwplayout.hxx
+22
-2
No files found.
lotuswordpro/source/filter/lwpdoc.hxx
Dosyayı görüntüle @
fb8cba16
...
...
@@ -132,7 +132,7 @@ public:
void
RegisterStyle
()
override
;
inline
bool
IsChildDoc
();
inline
bool
HonorProtection
();
inline
bool
Get
HonorProtection
();
inline
LwpObjectID
&
GetDocData
();
inline
LwpObjectID
&
GetSocket
();
...
...
@@ -176,7 +176,7 @@ inline bool LwpDocument::IsChildDoc()
{
return
(
m_nPersistentFlags
&
DOC_CHILDDOC
)
!=
0
;
}
inline
bool
LwpDocument
::
HonorProtection
()
inline
bool
LwpDocument
::
Get
HonorProtection
()
{
return
(
m_nPersistentFlags
&
DOC_PROTECTED
)
!=
0
;
}
...
...
lotuswordpro/source/filter/lwplayout.cxx
Dosyayı görüntüle @
fb8cba16
...
...
@@ -73,6 +73,7 @@
LwpVirtualLayout
::
LwpVirtualLayout
(
LwpObjectHeader
&
objHdr
,
LwpSvStream
*
pStrm
)
:
LwpDLNFPVList
(
objHdr
,
pStrm
)
,
m_bGettingHonorProtection
(
false
)
,
m_nAttributes
(
0
)
,
m_nAttributes2
(
0
)
,
m_nAttributes3
(
0
)
...
...
@@ -139,20 +140,16 @@ bool LwpVirtualLayout::HonorProtection()
return
false
;
LwpVirtualLayout
*
pParent
=
dynamic_cast
<
LwpVirtualLayout
*>
(
GetParent
().
obj
().
get
());
if
(
pParent
&&
!
pParent
->
IsHeader
()
&&
pParent
!=
this
)
if
(
pParent
&&
!
pParent
->
IsHeader
())
{
return
pParent
->
HonorProtection
();
return
pParent
->
Get
HonorProtection
();
}
if
(
m_pFoundry
)
//is null now
{
LwpDocument
*
pDoc
=
m_pFoundry
->
GetDocument
();
/*if(pDoc)
{
return pDoc->HonorProtection();
}*/
if
(
pDoc
&&
pDoc
->
GetRootDocument
())
return
pDoc
->
GetRootDocument
()
->
HonorProtection
();
return
pDoc
->
GetRootDocument
()
->
Get
HonorProtection
();
}
return
true
;
...
...
@@ -169,7 +166,7 @@ bool LwpVirtualLayout::IsProtected()
LwpVirtualLayout
*
pParent
=
dynamic_cast
<
LwpVirtualLayout
*>
(
GetParent
().
obj
().
get
());
if
(
pParent
&&
!
pParent
->
IsHeader
())
{
if
(
pParent
->
HonorProtection
()
&&
(
pParent
->
HasProtection
()
||
bProtected
))
if
(
pParent
->
GetHonorProtection
()
&&
(
pParent
->
Get
HasProtection
()
||
bProtected
))
{
return
true
;
}
...
...
@@ -179,7 +176,7 @@ bool LwpVirtualLayout::IsProtected()
LwpDocument
*
pDoc
=
m_pFoundry
->
GetDocument
();
if
(
pDoc
)
{
if
(
pDoc
->
HonorProtection
()
&&
bProtected
)
if
(
pDoc
->
Get
HonorProtection
()
&&
bProtected
)
{
return
true
;
}
...
...
@@ -199,9 +196,9 @@ bool LwpVirtualLayout::HasProtection()
return
true
;
LwpVirtualLayout
*
pParent
=
dynamic_cast
<
LwpVirtualLayout
*>
(
GetParent
().
obj
().
get
());
if
(
pParent
&&
!
pParent
->
IsHeader
()
&&
pParent
!=
this
)
if
(
pParent
&&
!
pParent
->
IsHeader
())
{
return
pParent
->
HasProtection
();
return
pParent
->
Get
HasProtection
();
}
return
false
;
...
...
@@ -1235,9 +1232,9 @@ bool LwpMiddleLayout::HonorProtection()
return
false
;
LwpVirtualLayout
*
pParent
=
dynamic_cast
<
LwpVirtualLayout
*>
(
GetParent
().
obj
().
get
());
if
(
pParent
&&
!
pParent
->
IsHeader
())
if
(
pParent
&&
!
pParent
->
IsHeader
())
{
return
pParent
->
HonorProtection
();
return
pParent
->
Get
HonorProtection
();
}
if
(
m_pFoundry
)
//is null now
...
...
@@ -1245,13 +1242,13 @@ bool LwpMiddleLayout::HonorProtection()
LwpDocument
*
pDoc
=
m_pFoundry
->
GetDocument
();
if
(
pDoc
)
{
return
pDoc
->
HonorProtection
();
return
pDoc
->
Get
HonorProtection
();
}
}
}
else
if
(
LwpMiddleLayout
*
pLay
=
dynamic_cast
<
LwpMiddleLayout
*>
(
GetBasedOnStyle
().
get
()))
{
return
pLay
->
HonorProtection
();
return
pLay
->
Get
HonorProtection
();
}
return
LwpVirtualLayout
::
HonorProtection
();
...
...
@@ -1282,7 +1279,7 @@ bool LwpMiddleLayout::IsProtected()
if
(
pParent
->
IsProtected
())
return
true
;
if
(
pParent
->
HonorProtection
())
if
(
pParent
->
Get
HonorProtection
())
return
bProtected
;
/* If our parent isn't honoring protection then we aren't protected. */
...
...
@@ -1294,7 +1291,7 @@ bool LwpMiddleLayout::IsProtected()
LwpDocument
*
pDoc
=
m_pFoundry
->
GetDocument
();
if
(
pDoc
)
{
if
(
pDoc
->
HonorProtection
())
if
(
pDoc
->
Get
HonorProtection
())
return
bProtected
;
/* If the document isn't honoring protection then we aren't protected.*/
...
...
lotuswordpro/source/filter/lwplayout.hxx
Dosyayı görüntüle @
fb8cba16
...
...
@@ -111,9 +111,25 @@ public:
bool
IsAutoGrowWidth
();
bool
IsInlineToMargin
();
virtual
sal_uInt8
GetContentOrientation
(){
return
TEXT_ORIENT_LRTB
;}
virtual
bool
HonorProtection
();
bool
GetHonorProtection
()
{
if
(
m_bGettingHonorProtection
)
throw
std
::
runtime_error
(
"recursion in layout"
);
m_bGettingHonorProtection
=
true
;
bool
bRet
=
HonorProtection
();
m_bGettingHonorProtection
=
false
;
return
bRet
;
}
virtual
bool
IsProtected
();
bool
HasProtection
();
bool
GetHasProtection
()
{
if
(
m_bGettingHasProtection
)
throw
std
::
runtime_error
(
"recursion in layout"
);
m_bGettingHasProtection
=
true
;
bool
bRet
=
HasProtection
();
m_bGettingHasProtection
=
false
;
return
bRet
;
}
OUString
GetStyleName
(){
return
m_StyleName
;}
bool
IsComplex
();
virtual
bool
IsAnchorPage
(){
return
false
;}
...
...
@@ -163,7 +179,11 @@ public:
//End by
protected
:
void
Read
()
override
;
bool
HasProtection
();
virtual
bool
HonorProtection
();
protected
:
bool
m_bGettingHonorProtection
;
bool
m_bGettingHasProtection
;
sal_uInt32
m_nAttributes
;
sal_uInt32
m_nAttributes2
;
sal_uInt32
m_nAttributes3
;
...
...
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