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
a1426bc5
Kaydet (Commit)
a1426bc5
authored
Ara 13, 2015
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
use more references to fix life cycles
Change-Id: I0c903533542608c1d7a3c97e2be7f2b7624b265b
üst
ad23fb09
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
94 additions
and
87 deletions
+94
-87
lwpcelllayout.cxx
lotuswordpro/source/filter/lwpcelllayout.cxx
+3
-3
lwpcontent.cxx
lotuswordpro/source/filter/lwpcontent.cxx
+13
-7
lwpcontent.hxx
lotuswordpro/source/filter/lwpcontent.hxx
+1
-1
lwpfootnote.cxx
lotuswordpro/source/filter/lwpfootnote.cxx
+2
-2
lwpgrfobj.cxx
lotuswordpro/source/filter/lwpgrfobj.cxx
+2
-2
lwplayout.cxx
lotuswordpro/source/filter/lwplayout.cxx
+26
-28
lwplayout.hxx
lotuswordpro/source/filter/lwplayout.hxx
+1
-1
lwpoleobject.cxx
lotuswordpro/source/filter/lwpoleobject.cxx
+3
-3
lwppara1.cxx
lotuswordpro/source/filter/lwppara1.cxx
+4
-2
lwpsdwgrouploaderv0102.cxx
lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx
+7
-9
lwpstory.cxx
lotuswordpro/source/filter/lwpstory.cxx
+27
-27
lwpstory.hxx
lotuswordpro/source/filter/lwpstory.hxx
+1
-1
lwptable.hxx
lotuswordpro/source/filter/lwptable.hxx
+4
-1
No files found.
lotuswordpro/source/filter/lwpcelllayout.cxx
Dosyayı görüntüle @
a1426bc5
...
@@ -327,7 +327,7 @@ XFCell* LwpCellLayout::ConvertCell(LwpObjectID aTableID, sal_uInt16 nRow, sal_uI
...
@@ -327,7 +327,7 @@ XFCell* LwpCellLayout::ConvertCell(LwpObjectID aTableID, sal_uInt16 nRow, sal_uI
// we should adjust its style by current position
// we should adjust its style by current position
if
(
pTable
->
GetDefaultCellStyle
()
==
GetObjectID
())
if
(
pTable
->
GetDefaultCellStyle
()
==
GetObjectID
())
{
{
aStyleName
=
GetCellStyleName
(
nRow
,
nCol
,
pTable
->
GetTableLayout
());
aStyleName
=
GetCellStyleName
(
nRow
,
nCol
,
pTable
->
GetTableLayout
()
.
get
()
);
}
}
// content of cell
// content of cell
...
@@ -661,8 +661,8 @@ void LwpCellLayout::ApplyProtect(XFCell * pCell, LwpObjectID aTableID)
...
@@ -661,8 +661,8 @@ void LwpCellLayout::ApplyProtect(XFCell * pCell, LwpObjectID aTableID)
{
{
// judge whole table
// judge whole table
LwpTable
*
pTable
=
dynamic_cast
<
LwpTable
*>
(
aTableID
.
obj
().
get
());
LwpTable
*
pTable
=
dynamic_cast
<
LwpTable
*>
(
aTableID
.
obj
().
get
());
LwpTableLayout
*
pTableLayout
=
pTable
?
dynamic_cast
<
LwpTableLayout
*>
(
pTable
->
GetTableLayout
())
:
nullptr
;
rtl
::
Reference
<
LwpTableLayout
>
xTableLayout
(
pTable
?
pTable
->
GetTableLayout
()
:
nullptr
)
;
LwpSuperTableLayout
*
pSuper
=
pTableLayout
?
p
TableLayout
->
GetSuperTableLayout
()
:
nullptr
;
LwpSuperTableLayout
*
pSuper
=
xTableLayout
.
is
()
?
x
TableLayout
->
GetSuperTableLayout
()
:
nullptr
;
if
(
pSuper
&&
pSuper
->
GetIsProtected
())
if
(
pSuper
&&
pSuper
->
GetIsProtected
())
{
{
bProtected
=
true
;
bProtected
=
true
;
...
...
lotuswordpro/source/filter/lwpcontent.cxx
Dosyayı görüntüle @
a1426bc5
...
@@ -121,17 +121,20 @@ void LwpContent::Read()
...
@@ -121,17 +121,20 @@ void LwpContent::Read()
pStrm
->
SkipExtra
();
pStrm
->
SkipExtra
();
}
}
LwpVirtualLayout
*
LwpContent
::
GetLayout
(
LwpVirtualLayout
*
pStartLayout
)
rtl
::
Reference
<
LwpVirtualLayout
>
LwpContent
::
GetLayout
(
LwpVirtualLayout
*
pStartLayout
)
{
{
return
m_LayoutsWithMe
.
GetLayout
(
pStartLayout
);
return
m_LayoutsWithMe
.
GetLayout
(
pStartLayout
);
}
}
bool
LwpContent
::
HasNonEmbeddedLayouts
()
bool
LwpContent
::
HasNonEmbeddedLayouts
()
{
{
LwpVirtualLayout
*
pLayout
=
nullptr
;
rtl
::
Reference
<
LwpVirtualLayout
>
xLayout
;
while
(
(
pLayout
=
GetLayout
(
pLayout
))
)
while
(
1
)
{
{
if
(
!
pLayout
->
NoContentReference
())
xLayout
=
GetLayout
(
xLayout
.
get
());
if
(
!
xLayout
.
is
())
break
;
if
(
!
xLayout
->
NoContentReference
())
return
true
;
return
true
;
}
}
return
false
;
return
false
;
...
@@ -139,10 +142,13 @@ bool LwpContent::HasNonEmbeddedLayouts()
...
@@ -139,10 +142,13 @@ bool LwpContent::HasNonEmbeddedLayouts()
bool
LwpContent
::
IsStyleContent
()
bool
LwpContent
::
IsStyleContent
()
{
{
LwpVirtualLayout
*
pLayout
=
nullptr
;
rtl
::
Reference
<
LwpVirtualLayout
>
xLayout
;
while
(
(
pLayout
=
GetLayout
(
pLayout
))
)
while
(
1
)
{
{
if
(
pLayout
->
IsStyleLayout
())
xLayout
=
GetLayout
(
xLayout
.
get
());
if
(
!
xLayout
.
is
())
break
;
if
(
xLayout
->
IsStyleLayout
())
return
true
;
return
true
;
}
}
return
false
;
return
false
;
...
...
lotuswordpro/source/filter/lwpcontent.hxx
Dosyayı görüntüle @
a1426bc5
...
@@ -106,7 +106,7 @@ protected:
...
@@ -106,7 +106,7 @@ protected:
void
Read
()
override
;
void
Read
()
override
;
public
:
public
:
inline
LwpAssociatedLayouts
&
GetLayoutsWithMe
();
inline
LwpAssociatedLayouts
&
GetLayoutsWithMe
();
LwpVirtualLayout
*
GetLayout
(
LwpVirtualLayout
*
pStartLayout
);
rtl
::
Reference
<
LwpVirtualLayout
>
GetLayout
(
LwpVirtualLayout
*
pStartLayout
);
inline
bool
IsActive
();
inline
bool
IsActive
();
virtual
bool
IsTable
();
virtual
bool
IsTable
();
inline
OUString
GetClassName
();
inline
OUString
GetClassName
();
...
...
lotuswordpro/source/filter/lwpfootnote.cxx
Dosyayı görüntüle @
a1426bc5
...
@@ -363,7 +363,7 @@ LwpEnSuperTableLayout* LwpFootnote::FindFootnoteTableLayout()
...
@@ -363,7 +363,7 @@ LwpEnSuperTableLayout* LwpFootnote::FindFootnoteTableLayout()
while
((
pContent
=
pFoundry
->
EnumContents
(
pContent
))
!=
nullptr
)
while
((
pContent
=
pFoundry
->
EnumContents
(
pContent
))
!=
nullptr
)
if
(
pContent
->
IsTable
()
&&
(
strClassName
.
equals
(
pContent
->
GetClassName
()))
&&
if
(
pContent
->
IsTable
()
&&
(
strClassName
.
equals
(
pContent
->
GetClassName
()))
&&
pContent
->
IsActive
()
&&
pContent
->
GetLayout
(
nullptr
))
pContent
->
IsActive
()
&&
pContent
->
GetLayout
(
nullptr
)
.
is
()
)
{
{
// Found it!
// Found it!
return
static_cast
<
LwpEnSuperTableLayout
*>
(
return
static_cast
<
LwpEnSuperTableLayout
*>
(
...
@@ -381,7 +381,7 @@ LwpContent* LwpFootnote::FindFootnoteContent()
...
@@ -381,7 +381,7 @@ LwpContent* LwpFootnote::FindFootnoteContent()
LwpContent
*
pContent
=
dynamic_cast
<
LwpContent
*>
(
m_Content
.
obj
().
get
());
LwpContent
*
pContent
=
dynamic_cast
<
LwpContent
*>
(
m_Content
.
obj
().
get
());
//if the content has layout, the content has footnote contents;
//if the content has layout, the content has footnote contents;
//or looking for the celllayout and return the footnote contents.
//or looking for the celllayout and return the footnote contents.
if
(
pContent
&&
pContent
->
GetLayout
(
nullptr
))
if
(
pContent
&&
pContent
->
GetLayout
(
nullptr
).
is
(
))
return
pContent
;
return
pContent
;
LwpCellLayout
*
pCellLayout
=
GetCellLayout
();
LwpCellLayout
*
pCellLayout
=
GetCellLayout
();
...
...
lotuswordpro/source/filter/lwpgrfobj.cxx
Dosyayı görüntüle @
a1426bc5
...
@@ -273,8 +273,8 @@ void LwpGraphicObject::RegisterStyle()
...
@@ -273,8 +273,8 @@ void LwpGraphicObject::RegisterStyle()
if
(
m_sServerContextFormat
[
1
]
==
'l'
&&
m_sServerContextFormat
[
2
]
==
'c'
&&
m_sServerContextFormat
[
3
]
==
'h'
)
if
(
m_sServerContextFormat
[
1
]
==
'l'
&&
m_sServerContextFormat
[
2
]
==
'c'
&&
m_sServerContextFormat
[
3
]
==
'h'
)
{
{
LwpVirtualLayout
*
pMyLayout
=
GetLayout
(
nullptr
);
rtl
::
Reference
<
LwpVirtualLayout
>
xMyLayout
(
GetLayout
(
nullptr
)
);
if
(
pMyLayout
&&
p
MyLayout
->
IsFrame
())
if
(
xMyLayout
.
is
()
&&
x
MyLayout
->
IsFrame
())
{
{
XFFrameStyle
*
pXFFrameStyle
=
new
XFFrameStyle
();
XFFrameStyle
*
pXFFrameStyle
=
new
XFFrameStyle
();
pXFFrameStyle
->
SetXPosType
(
enumXFFrameXPosFromLeft
,
enumXFFrameXRelFrame
);
pXFFrameStyle
->
SetXPosType
(
enumXFFrameXPosFromLeft
,
enumXFFrameXRelFrame
);
...
...
lotuswordpro/source/filter/lwplayout.cxx
Dosyayı görüntüle @
a1426bc5
...
@@ -419,42 +419,40 @@ void LwpAssociatedLayouts::Read(LwpObjectStream* pStrm)
...
@@ -419,42 +419,40 @@ void LwpAssociatedLayouts::Read(LwpObjectStream* pStrm)
* @descr: Looking for the layout which follows the pStartLayout
* @descr: Looking for the layout which follows the pStartLayout
* @param: pStartLayout - the layout which is used for looking for its following layout
* @param: pStartLayout - the layout which is used for looking for its following layout
*/
*/
LwpVirtualLayout
*
LwpAssociatedLayouts
::
GetLayout
(
LwpVirtualLayout
*
pStartLayout
)
rtl
::
Reference
<
LwpVirtualLayout
>
LwpAssociatedLayouts
::
GetLayout
(
LwpVirtualLayout
*
pStartLayout
)
{
{
if
(
!
pStartLayout
&&
!
m_OnlyLayout
.
IsNull
())
if
(
!
pStartLayout
&&
!
m_OnlyLayout
.
IsNull
())
/* Looking for the first layout and there's only one layout in the list.*/
/* Looking for the first layout and there's only one layout in the list.*/
return
dynamic_cast
<
LwpVirtualLayout
*>
(
m_OnlyLayout
.
obj
().
get
(
));
return
rtl
::
Reference
<
LwpVirtualLayout
>
(
dynamic_cast
<
LwpVirtualLayout
*>
(
m_OnlyLayout
.
obj
().
get
()
));
LwpObjectHolder
*
pObjHolder
=
dynamic_cast
<
LwpObjectHolder
*>
(
m_Layouts
.
GetHead
().
obj
().
get
(
));
rtl
::
Reference
<
LwpObjectHolder
>
xObjHolder
(
dynamic_cast
<
LwpObjectHolder
*>
(
m_Layouts
.
GetHead
().
obj
().
get
()
));
if
(
pObjHolder
)
if
(
xObjHolder
.
is
()
)
{
{
LwpVirtualLayout
*
pLayout
=
dynamic_cast
<
LwpVirtualLayout
*>
(
pObjHolder
->
GetObject
().
obj
().
get
(
));
rtl
::
Reference
<
LwpVirtualLayout
>
xLayout
(
dynamic_cast
<
LwpVirtualLayout
*>
(
xObjHolder
->
GetObject
().
obj
().
get
()
));
if
(
!
pStartLayout
)
if
(
!
pStartLayout
)
return
p
Layout
;
return
x
Layout
;
while
(
pObjHolder
&&
pStartLayout
!=
pLayout
)
while
(
xObjHolder
.
is
()
&&
pStartLayout
!=
xLayout
.
get
()
)
{
{
pObjHolder
=
dynamic_cast
<
LwpObjectHolder
*>
(
pObjHolder
->
GetNext
().
obj
().
get
(
));
xObjHolder
.
set
(
dynamic_cast
<
LwpObjectHolder
*>
(
xObjHolder
->
GetNext
().
obj
().
get
()
));
if
(
pObjHolder
)
if
(
xObjHolder
.
is
()
)
{
{
pLayout
=
dynamic_cast
<
LwpVirtualLayout
*>
(
pObjHolder
->
GetObject
().
obj
().
get
(
));
xLayout
.
set
(
dynamic_cast
<
LwpVirtualLayout
*>
(
xObjHolder
->
GetObject
().
obj
().
get
()
));
}
}
}
}
if
(
pObjHolder
)
if
(
xObjHolder
.
is
()
)
{
{
pObjHolder
=
dynamic_cast
<
LwpObjectHolder
*>
(
pObjHolder
->
GetNext
().
obj
().
get
(
));
xObjHolder
.
set
(
dynamic_cast
<
LwpObjectHolder
*>
(
xObjHolder
->
GetNext
().
obj
().
get
()
));
if
(
pObjHolder
)
if
(
xObjHolder
.
is
()
)
{
{
pLayout
=
dynamic_cast
<
LwpVirtualLayout
*>
(
pObjHolder
->
GetObject
().
obj
().
get
(
));
xLayout
.
set
(
dynamic_cast
<
LwpVirtualLayout
*>
(
xObjHolder
->
GetObject
().
obj
().
get
()
));
return
p
Layout
;
return
x
Layout
;
}
}
}
}
//return pLayout;
}
}
return
nullptr
;
return
rtl
::
Reference
<
LwpVirtualLayout
>
()
;
}
}
LwpHeadLayout
::
LwpHeadLayout
(
LwpObjectHeader
&
objHdr
,
LwpSvStream
*
pStrm
)
LwpHeadLayout
::
LwpHeadLayout
(
LwpObjectHeader
&
objHdr
,
LwpSvStream
*
pStrm
)
...
@@ -473,27 +471,27 @@ void LwpHeadLayout::Read()
...
@@ -473,27 +471,27 @@ void LwpHeadLayout::Read()
void
LwpHeadLayout
::
RegisterStyle
()
void
LwpHeadLayout
::
RegisterStyle
()
{
{
//Register all children styles
//Register all children styles
LwpVirtualLayout
*
pLayout
=
dynamic_cast
<
LwpVirtualLayout
*>
(
GetChildHead
().
obj
().
get
(
));
rtl
::
Reference
<
LwpVirtualLayout
>
xLayout
(
dynamic_cast
<
LwpVirtualLayout
*>
(
GetChildHead
().
obj
().
get
()
));
while
(
pLayout
)
while
(
xLayout
.
is
()
)
{
{
p
Layout
->
SetFoundry
(
m_pFoundry
);
x
Layout
->
SetFoundry
(
m_pFoundry
);
//if the layout is relative to para, the layout will be registered in para
//if the layout is relative to para, the layout will be registered in para
if
(
!
p
Layout
->
IsRelativeAnchored
())
if
(
!
x
Layout
->
IsRelativeAnchored
())
{
{
if
(
pLayout
==
this
)
if
(
xLayout
.
get
()
==
this
)
{
{
OSL_FAIL
(
"Layout points to itself"
);
OSL_FAIL
(
"Layout points to itself"
);
break
;
break
;
}
}
p
Layout
->
DoRegisterStyle
();
x
Layout
->
DoRegisterStyle
();
}
}
LwpVirtualLayout
*
pNext
=
dynamic_cast
<
LwpVirtualLayout
*>
(
pLayout
->
GetNext
().
obj
().
get
(
));
rtl
::
Reference
<
LwpVirtualLayout
>
xNext
(
dynamic_cast
<
LwpVirtualLayout
*>
(
xLayout
->
GetNext
().
obj
().
get
()
));
if
(
pNext
==
pLayout
)
if
(
xNext
.
get
()
==
xLayout
.
get
()
)
{
{
OSL_FAIL
(
"Layout points to itself"
);
OSL_FAIL
(
"Layout points to itself"
);
break
;
break
;
}
}
pLayout
=
p
Next
;
xLayout
=
x
Next
;
}
}
}
}
...
...
lotuswordpro/source/filter/lwplayout.hxx
Dosyayı görüntüle @
a1426bc5
...
@@ -254,7 +254,7 @@ public:
...
@@ -254,7 +254,7 @@ public:
LwpAssociatedLayouts
(){}
LwpAssociatedLayouts
(){}
void
Read
(
LwpObjectStream
*
pStrm
);
void
Read
(
LwpObjectStream
*
pStrm
);
LwpObjectID
&
GetOnlyLayout
()
{
return
m_OnlyLayout
;}
LwpObjectID
&
GetOnlyLayout
()
{
return
m_OnlyLayout
;}
LwpVirtualLayout
*
GetLayout
(
LwpVirtualLayout
*
pStartLayout
);
rtl
::
Reference
<
LwpVirtualLayout
>
GetLayout
(
LwpVirtualLayout
*
pStartLayout
);
protected
:
protected
:
LwpObjectID
m_OnlyLayout
;
//LwpVirtualLayout
LwpObjectID
m_OnlyLayout
;
//LwpVirtualLayout
LwpDLVListHeadTail
m_Layouts
;
LwpDLVListHeadTail
m_Layouts
;
...
...
lotuswordpro/source/filter/lwpoleobject.cxx
Dosyayı görüntüle @
a1426bc5
...
@@ -107,10 +107,10 @@ void LwpGraphicOleObject::GetGrafScaledSize(double & fWidth, double & fHeight)
...
@@ -107,10 +107,10 @@ void LwpGraphicOleObject::GetGrafScaledSize(double & fWidth, double & fHeight)
double
fSclGrafWidth
=
fWidth
;
//LwpTools::ConvertFromUnitsToMetric(pMyScale->GetScaleWidth());
double
fSclGrafWidth
=
fWidth
;
//LwpTools::ConvertFromUnitsToMetric(pMyScale->GetScaleWidth());
double
fSclGrafHeight
=
fHeight
;
//LwpTools::ConvertFromUnitsToMetric(pMyScale->GetScaleHeight());
double
fSclGrafHeight
=
fHeight
;
//LwpTools::ConvertFromUnitsToMetric(pMyScale->GetScaleHeight());
LwpVirtualLayout
*
pLayout
=
GetLayout
(
nullptr
);
rtl
::
Reference
<
LwpVirtualLayout
>
xLayout
(
GetLayout
(
nullptr
)
);
if
(
pLayout
&&
p
Layout
->
IsFrame
())
if
(
xLayout
.
is
()
&&
x
Layout
->
IsFrame
())
{
{
LwpFrameLayout
*
pMyFrameLayout
=
static_cast
<
LwpFrameLayout
*>
(
pLayout
);
LwpFrameLayout
*
pMyFrameLayout
=
static_cast
<
LwpFrameLayout
*>
(
xLayout
.
get
()
);
LwpLayoutScale
*
pMyScale
=
pMyFrameLayout
->
GetLayoutScale
();
LwpLayoutScale
*
pMyScale
=
pMyFrameLayout
->
GetLayoutScale
();
LwpLayoutGeometry
*
pFrameGeo
=
pMyFrameLayout
->
GetGeometry
();
LwpLayoutGeometry
*
pFrameGeo
=
pMyFrameLayout
->
GetGeometry
();
...
...
lotuswordpro/source/filter/lwppara1.cxx
Dosyayı görüntüle @
a1426bc5
...
@@ -618,8 +618,10 @@ bool LwpPara::ComparePagePosition(LwpVirtualLayout * pPreLayout, LwpVirtualLayou
...
@@ -618,8 +618,10 @@ bool LwpPara::ComparePagePosition(LwpVirtualLayout * pPreLayout, LwpVirtualLayou
bool
LwpPara
::
IsInCell
()
bool
LwpPara
::
IsInCell
()
{
{
LwpStory
*
pStory
=
GetStory
();
LwpStory
*
pStory
=
GetStory
();
LwpVirtualLayout
*
pLayout
=
pStory
?
pStory
->
GetLayout
(
nullptr
)
:
nullptr
;
if
(
!
pStory
)
if
(
pLayout
&&
pLayout
->
IsCell
())
return
false
;
rtl
::
Reference
<
LwpVirtualLayout
>
xLayout
(
pStory
->
GetLayout
(
nullptr
));
if
(
xLayout
.
is
()
&&
xLayout
->
IsCell
())
return
true
;
return
true
;
return
false
;
return
false
;
}
}
...
...
lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx
Dosyayı görüntüle @
a1426bc5
...
@@ -129,11 +129,11 @@ void LwpSdwGroupLoaderV0102::BeginDrawObjects(std::vector< rtl::Reference<XFFram
...
@@ -129,11 +129,11 @@ void LwpSdwGroupLoaderV0102::BeginDrawObjects(std::vector< rtl::Reference<XFFram
m_pStream
->
SeekRel
(
2
);
m_pStream
->
SeekRel
(
2
);
//for calculating transformation params.
//for calculating transformation params.
LwpFrameLayout
*
pMyFrameLayout
=
static_cast
<
LwpFrameLayout
*>
(
m_pGraphicObj
->
GetLayout
(
nullptr
));
rtl
::
Reference
<
LwpFrameLayout
>
xMyFrameLayout
(
dynamic_cast
<
LwpFrameLayout
*>
(
m_pGraphicObj
->
GetLayout
(
nullptr
).
get
()
));
if
(
pMyFrameLayout
)
if
(
xMyFrameLayout
.
is
()
)
{
{
LwpLayoutScale
*
pMyScale
=
p
MyFrameLayout
->
GetLayoutScale
();
LwpLayoutScale
*
pMyScale
=
x
MyFrameLayout
->
GetLayoutScale
();
LwpLayoutGeometry
*
pFrameGeo
=
p
MyFrameLayout
->
GetGeometry
();
LwpLayoutGeometry
*
pFrameGeo
=
x
MyFrameLayout
->
GetGeometry
();
if
(
pMyScale
&&
pFrameGeo
)
if
(
pMyScale
&&
pFrameGeo
)
{
{
// original drawing size
// original drawing size
...
@@ -143,10 +143,8 @@ void LwpSdwGroupLoaderV0102::BeginDrawObjects(std::vector< rtl::Reference<XFFram
...
@@ -143,10 +143,8 @@ void LwpSdwGroupLoaderV0102::BeginDrawObjects(std::vector< rtl::Reference<XFFram
double
fGrafOrgHeight
=
(
double
)
nHeight
/
TWIPS_PER_CM
;
double
fGrafOrgHeight
=
(
double
)
nHeight
/
TWIPS_PER_CM
;
// get margin values
// get margin values
double
fLeftMargin
=
pMyFrameLayout
->
GetMarginsValue
(
MARGIN_LEFT
);
double
fLeftMargin
=
xMyFrameLayout
->
GetMarginsValue
(
MARGIN_LEFT
);
// double fRightMargin = pMyFrameLayout->GetMarginsValue(MARGIN_RIGHT);
double
fTopMargin
=
xMyFrameLayout
->
GetMarginsValue
(
MARGIN_TOP
);
double
fTopMargin
=
pMyFrameLayout
->
GetMarginsValue
(
MARGIN_TOP
);
// double fBottomMargin = pMyFrameLayout->GetMarginsValue(MARGIN_BOTTOM);
// frame size
// frame size
double
fFrameWidth
=
LwpTools
::
ConvertFromUnitsToMetric
(
pFrameGeo
->
GetWidth
());
double
fFrameWidth
=
LwpTools
::
ConvertFromUnitsToMetric
(
pFrameGeo
->
GetWidth
());
...
@@ -197,7 +195,7 @@ void LwpSdwGroupLoaderV0102::BeginDrawObjects(std::vector< rtl::Reference<XFFram
...
@@ -197,7 +195,7 @@ void LwpSdwGroupLoaderV0102::BeginDrawObjects(std::vector< rtl::Reference<XFFram
}
}
// placement: centered
// placement: centered
if
(
p
MyFrameLayout
->
GetScaleCenter
())
if
(
x
MyFrameLayout
->
GetScaleCenter
())
{
{
Rectangle
aBoundRect
(
static_cast
<
long
>
(
left
*
m_aTransformData
.
fScaleX
+
fLeftMargin
),
Rectangle
aBoundRect
(
static_cast
<
long
>
(
left
*
m_aTransformData
.
fScaleX
+
fLeftMargin
),
static_cast
<
long
>
(
top
*
m_aTransformData
.
fScaleY
+
fTopMargin
),
static_cast
<
long
>
(
top
*
m_aTransformData
.
fScaleY
+
fTopMargin
),
...
...
lotuswordpro/source/filter/lwpstory.cxx
Dosyayı görüntüle @
a1426bc5
...
@@ -215,20 +215,20 @@ void LwpStory::SortPageLayout()
...
@@ -215,20 +215,20 @@ void LwpStory::SortPageLayout()
{
{
//Get all the pagelayout and store in list
//Get all the pagelayout and store in list
std
::
vector
<
LwpPageLayout
*>
aLayoutList
;
std
::
vector
<
LwpPageLayout
*>
aLayoutList
;
LwpVirtualLayout
*
pLayout
=
GetLayout
(
nullptr
);
rtl
::
Reference
<
LwpVirtualLayout
>
xLayout
(
GetLayout
(
nullptr
)
);
while
(
pLayout
)
while
(
xLayout
.
get
()
)
{
{
if
(
p
Layout
->
IsPage
())
if
(
x
Layout
->
IsPage
())
{
{
LwpLayout
::
UseWhenType
eSectionType
=
static_cast
<
LwpPageLayout
*>
(
pLayout
)
->
GetUseWhenType
();
LwpLayout
::
UseWhenType
eSectionType
=
static_cast
<
LwpPageLayout
*>
(
xLayout
.
get
()
)
->
GetUseWhenType
();
//for mirror page, the child is pagelayout
//for mirror page, the child is pagelayout
LwpVirtualLayout
*
pParent
=
p
Layout
->
GetParentLayout
();
LwpVirtualLayout
*
pParent
=
x
Layout
->
GetParentLayout
();
if
(
eSectionType
!=
LwpLayout
::
StartWithinColume
&&
pParent
&&
!
pParent
->
IsPage
())
if
(
eSectionType
!=
LwpLayout
::
StartWithinColume
&&
pParent
&&
!
pParent
->
IsPage
())
{
{
aLayoutList
.
push_back
(
static_cast
<
LwpPageLayout
*>
(
pLayout
));
aLayoutList
.
push_back
(
static_cast
<
LwpPageLayout
*>
(
xLayout
.
get
()
));
}
}
}
}
pLayout
=
GetLayout
(
pLayout
);
xLayout
=
GetLayout
(
xLayout
.
get
()
);
}
}
// sort the pagelayout according to their position
// sort the pagelayout according to their position
std
::
vector
<
LwpPageLayout
*>::
iterator
aIt
;
std
::
vector
<
LwpPageLayout
*>::
iterator
aIt
;
...
@@ -315,10 +315,10 @@ bool LwpStory::IsNeedSection()
...
@@ -315,10 +315,10 @@ bool LwpStory::IsNeedSection()
**************************************************************************/
**************************************************************************/
void
LwpStory
::
XFConvertFrameInCell
(
XFContentContainer
*
pCont
)
void
LwpStory
::
XFConvertFrameInCell
(
XFContentContainer
*
pCont
)
{
{
LwpVirtualLayout
*
pLayout
=
GetLayout
(
nullptr
);
rtl
::
Reference
<
LwpVirtualLayout
>
xLayout
(
GetLayout
(
nullptr
)
);
while
(
pLayout
)
while
(
xLayout
.
is
()
)
{
{
LwpVirtualLayout
*
pFrameLayout
=
dynamic_cast
<
LwpVirtualLayout
*>
(
p
Layout
->
GetChildHead
().
obj
().
get
());
LwpVirtualLayout
*
pFrameLayout
=
dynamic_cast
<
LwpVirtualLayout
*>
(
x
Layout
->
GetChildHead
().
obj
().
get
());
while
(
pFrameLayout
)
while
(
pFrameLayout
)
{
{
...
@@ -334,7 +334,7 @@ void LwpStory::XFConvertFrameInCell(XFContentContainer* pCont)
...
@@ -334,7 +334,7 @@ void LwpStory::XFConvertFrameInCell(XFContentContainer* pCont)
}
}
pFrameLayout
=
dynamic_cast
<
LwpVirtualLayout
*>
(
pFrameLayout
->
GetNext
().
obj
().
get
());
pFrameLayout
=
dynamic_cast
<
LwpVirtualLayout
*>
(
pFrameLayout
->
GetNext
().
obj
().
get
());
}
}
pLayout
=
GetLayout
(
pLayout
);
xLayout
=
GetLayout
(
xLayout
.
get
()
);
}
}
}
}
...
@@ -343,10 +343,10 @@ void LwpStory::XFConvertFrameInCell(XFContentContainer* pCont)
...
@@ -343,10 +343,10 @@ void LwpStory::XFConvertFrameInCell(XFContentContainer* pCont)
**************************************************************************/
**************************************************************************/
void
LwpStory
::
XFConvertFrameInPage
(
XFContentContainer
*
pCont
)
void
LwpStory
::
XFConvertFrameInPage
(
XFContentContainer
*
pCont
)
{
{
LwpVirtualLayout
*
pLayout
=
GetLayout
(
nullptr
);
rtl
::
Reference
<
LwpVirtualLayout
>
xLayout
(
GetLayout
(
nullptr
)
);
while
(
pLayout
)
while
(
xLayout
.
is
()
)
{
{
LwpVirtualLayout
*
pFrameLayout
=
dynamic_cast
<
LwpVirtualLayout
*>
(
p
Layout
->
GetChildHead
().
obj
().
get
());
LwpVirtualLayout
*
pFrameLayout
=
dynamic_cast
<
LwpVirtualLayout
*>
(
x
Layout
->
GetChildHead
().
obj
().
get
());
while
(
pFrameLayout
)
while
(
pFrameLayout
)
{
{
if
((
pFrameLayout
->
IsAnchorPage
()
if
((
pFrameLayout
->
IsAnchorPage
()
...
@@ -358,7 +358,7 @@ void LwpStory::XFConvertFrameInPage(XFContentContainer* pCont)
...
@@ -358,7 +358,7 @@ void LwpStory::XFConvertFrameInPage(XFContentContainer* pCont)
}
}
pFrameLayout
=
dynamic_cast
<
LwpVirtualLayout
*>
(
pFrameLayout
->
GetNext
().
obj
().
get
());
pFrameLayout
=
dynamic_cast
<
LwpVirtualLayout
*>
(
pFrameLayout
->
GetNext
().
obj
().
get
());
}
}
pLayout
=
GetLayout
(
pLayout
);
xLayout
=
GetLayout
(
xLayout
.
get
()
);
}
}
}
}
/**************************************************************************
/**************************************************************************
...
@@ -366,10 +366,10 @@ void LwpStory::XFConvertFrameInPage(XFContentContainer* pCont)
...
@@ -366,10 +366,10 @@ void LwpStory::XFConvertFrameInPage(XFContentContainer* pCont)
**************************************************************************/
**************************************************************************/
void
LwpStory
::
XFConvertFrameInFrame
(
XFContentContainer
*
pCont
)
void
LwpStory
::
XFConvertFrameInFrame
(
XFContentContainer
*
pCont
)
{
{
LwpVirtualLayout
*
pLayout
=
GetLayout
(
nullptr
);
rtl
::
Reference
<
LwpVirtualLayout
>
xLayout
(
GetLayout
(
nullptr
)
);
while
(
pLayout
)
while
(
xLayout
.
get
()
)
{
{
LwpVirtualLayout
*
pFrameLayout
=
dynamic_cast
<
LwpVirtualLayout
*>
(
p
Layout
->
GetChildHead
().
obj
().
get
());
LwpVirtualLayout
*
pFrameLayout
=
dynamic_cast
<
LwpVirtualLayout
*>
(
x
Layout
->
GetChildHead
().
obj
().
get
());
while
(
pFrameLayout
)
while
(
pFrameLayout
)
{
{
if
(
pFrameLayout
->
IsAnchorFrame
())
if
(
pFrameLayout
->
IsAnchorFrame
())
...
@@ -378,7 +378,7 @@ void LwpStory::XFConvertFrameInFrame(XFContentContainer* pCont)
...
@@ -378,7 +378,7 @@ void LwpStory::XFConvertFrameInFrame(XFContentContainer* pCont)
}
}
pFrameLayout
=
dynamic_cast
<
LwpVirtualLayout
*>
(
pFrameLayout
->
GetNext
().
obj
().
get
());
pFrameLayout
=
dynamic_cast
<
LwpVirtualLayout
*>
(
pFrameLayout
->
GetNext
().
obj
().
get
());
}
}
pLayout
=
GetLayout
(
pLayout
);
xLayout
=
GetLayout
(
xLayout
.
get
()
);
}
}
}
}
/**************************************************************************
/**************************************************************************
...
@@ -386,13 +386,13 @@ void LwpStory::XFConvertFrameInFrame(XFContentContainer* pCont)
...
@@ -386,13 +386,13 @@ void LwpStory::XFConvertFrameInFrame(XFContentContainer* pCont)
**************************************************************************/
**************************************************************************/
void
LwpStory
::
XFConvertFrameInHeaderFooter
(
XFContentContainer
*
pCont
)
void
LwpStory
::
XFConvertFrameInHeaderFooter
(
XFContentContainer
*
pCont
)
{
{
LwpVirtualLayout
*
pLayout
=
GetLayout
(
nullptr
);
rtl
::
Reference
<
LwpVirtualLayout
>
xLayout
(
GetLayout
(
nullptr
)
);
while
(
pLayout
)
while
(
xLayout
.
is
()
)
{
{
LwpVirtualLayout
*
pFrameLayout
=
dynamic_cast
<
LwpVirtualLayout
*>
(
p
Layout
->
GetChildHead
().
obj
().
get
());
LwpVirtualLayout
*
pFrameLayout
=
dynamic_cast
<
LwpVirtualLayout
*>
(
x
Layout
->
GetChildHead
().
obj
().
get
());
while
(
pFrameLayout
)
while
(
pFrameLayout
)
{
{
if
(
pFrameLayout
->
IsAnchorPage
()
&&
(
pLayout
->
IsHeader
()
||
p
Layout
->
IsFooter
()))
if
(
pFrameLayout
->
IsAnchorPage
()
&&
(
xLayout
->
IsHeader
()
||
x
Layout
->
IsFooter
()))
{
{
//The frame must be included by <text:p>
//The frame must be included by <text:p>
rtl
::
Reference
<
XFContent
>
first
(
rtl
::
Reference
<
XFContent
>
first
(
...
@@ -403,7 +403,7 @@ void LwpStory::XFConvertFrameInHeaderFooter(XFContentContainer* pCont)
...
@@ -403,7 +403,7 @@ void LwpStory::XFConvertFrameInHeaderFooter(XFContentContainer* pCont)
}
}
pFrameLayout
=
dynamic_cast
<
LwpVirtualLayout
*>
(
pFrameLayout
->
GetNext
().
obj
().
get
());
pFrameLayout
=
dynamic_cast
<
LwpVirtualLayout
*>
(
pFrameLayout
->
GetNext
().
obj
().
get
());
}
}
pLayout
=
GetLayout
(
pLayout
);
xLayout
=
GetLayout
(
xLayout
.
get
()
);
}
}
}
}
...
@@ -423,10 +423,10 @@ XFContentContainer* LwpStory::GetXFContent()
...
@@ -423,10 +423,10 @@ XFContentContainer* LwpStory::GetXFContent()
LwpPara
*
LwpStory
::
GetLastParaOfPreviousStory
()
LwpPara
*
LwpStory
::
GetLastParaOfPreviousStory
()
{
{
LwpVirtualLayout
*
pVLayout
=
this
->
GetLayout
(
nullptr
);
rtl
::
Reference
<
LwpVirtualLayout
>
xVLayout
(
this
->
GetLayout
(
nullptr
)
);
if
(
pVLayout
)
if
(
xVLayout
.
is
()
)
{
{
return
p
VLayout
->
GetLastParaOfPreviousStory
();
return
x
VLayout
->
GetLastParaOfPreviousStory
();
}
}
return
nullptr
;
return
nullptr
;
...
...
lotuswordpro/source/filter/lwpstory.hxx
Dosyayı görüntüle @
a1426bc5
...
@@ -147,7 +147,7 @@ LwpMiddleLayout* LwpStory::GetTabLayout()
...
@@ -147,7 +147,7 @@ LwpMiddleLayout* LwpStory::GetTabLayout()
{
{
if
(
m_pTabLayout
)
if
(
m_pTabLayout
)
return
m_pTabLayout
;
return
m_pTabLayout
;
return
static_cast
<
LwpMiddleLayout
*>
(
GetLayout
(
nullptr
));
return
dynamic_cast
<
LwpMiddleLayout
*>
(
GetLayout
(
nullptr
).
get
(
));
}
}
void
LwpStory
::
SetPMModified
(
bool
bPMModified
)
void
LwpStory
::
SetPMModified
(
bool
bPMModified
)
{
{
...
...
lotuswordpro/source/filter/lwptable.hxx
Dosyayı görüntüle @
a1426bc5
...
@@ -119,7 +119,10 @@ public:
...
@@ -119,7 +119,10 @@ public:
LwpObjectID
&
GetDefaultCellStyle
()
{
return
m_DefaultCellStyle
;}
LwpObjectID
&
GetDefaultCellStyle
()
{
return
m_DefaultCellStyle
;}
sal_uInt16
GetRow
()
{
return
m_nRow
;}
sal_uInt16
GetRow
()
{
return
m_nRow
;}
sal_uInt16
GetColumn
()
{
return
m_nColumn
;}
sal_uInt16
GetColumn
()
{
return
m_nColumn
;}
LwpTableLayout
*
GetTableLayout
(){
return
dynamic_cast
<
LwpTableLayout
*>
(
GetLayout
(
nullptr
));}
rtl
::
Reference
<
LwpTableLayout
>
GetTableLayout
()
{
return
rtl
::
Reference
<
LwpTableLayout
>
(
dynamic_cast
<
LwpTableLayout
*>
(
GetLayout
(
nullptr
).
get
()));
}
bool
IsNumberDown
();
bool
IsNumberDown
();
virtual
bool
IsTable
()
override
{
return
true
;}
virtual
bool
IsTable
()
override
{
return
true
;}
LwpSuperTableLayout
*
GetSuperTableLayout
();
LwpSuperTableLayout
*
GetSuperTableLayout
();
...
...
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