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
608a67ac
Kaydet (Commit)
608a67ac
authored
Haz 11, 2014
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix memory leaks, by refcounting XFContent
Change-Id: I8c94c63230eec13bf22043ff07f9f480a0463111
üst
a83e40e2
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
72 additions
and
75 deletions
+72
-75
lwpfribframe.cxx
lotuswordpro/source/filter/lwpfribframe.cxx
+3
-1
lwpfribtable.cxx
lotuswordpro/source/filter/lwpfribtable.cxx
+3
-1
lwpgrfobj.cxx
lotuswordpro/source/filter/lwpgrfobj.cxx
+5
-5
lwpgrfobj.hxx
lotuswordpro/source/filter/lwpgrfobj.hxx
+1
-1
lwpsdwfileloader.cxx
lotuswordpro/source/filter/lwpsdwfileloader.cxx
+1
-1
lwpsdwfileloader.hxx
lotuswordpro/source/filter/lwpsdwfileloader.hxx
+7
-3
lwpsdwgrouploaderv0102.cxx
lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx
+1
-1
lwpsdwgrouploaderv0102.hxx
lotuswordpro/source/filter/lwpsdwgrouploaderv0102.hxx
+6
-3
lwpstory.cxx
lotuswordpro/source/filter/lwpstory.cxx
+6
-2
lwptablelayout.cxx
lotuswordpro/source/filter/lwptablelayout.cxx
+3
-2
xfcontent.hxx
lotuswordpro/source/filter/xfilter/xfcontent.hxx
+4
-3
xfcontentcontainer.cxx
lotuswordpro/source/filter/xfilter/xfcontentcontainer.cxx
+9
-24
xfcontentcontainer.hxx
lotuswordpro/source/filter/xfilter/xfcontentcontainer.hxx
+7
-7
xfframe.cxx
lotuswordpro/source/filter/xfilter/xfframe.cxx
+3
-3
xftextspan.cxx
lotuswordpro/source/filter/xfilter/xftextspan.cxx
+6
-16
xftextspan.hxx
lotuswordpro/source/filter/xfilter/xftextspan.hxx
+7
-2
No files found.
lotuswordpro/source/filter/lwpfribframe.cxx
Dosyayı görüntüle @
608a67ac
...
@@ -165,7 +165,9 @@ void LwpFribFrame::XFConvert(XFContentContainer* pCont)
...
@@ -165,7 +165,9 @@ void LwpFribFrame::XFConvert(XFContentContainer* pCont)
else
if
(
pContainerLayout
&&
pContainerLayout
->
IsCell
())
else
if
(
pContainerLayout
&&
pContainerLayout
->
IsCell
())
{
{
//same page as text and in cell, get the first xfpara
//same page as text and in cell, get the first xfpara
XFContentContainer
*
pXFFirtPara
=
static_cast
<
XFContentContainer
*>
(
pCont
->
FindFirstContent
(
enumXFContentPara
));
rtl
::
Reference
<
XFContent
>
first
(
pCont
->
FindFirstContent
(
enumXFContentPara
));
XFContentContainer
*
pXFFirtPara
=
static_cast
<
XFContentContainer
*>
(
first
.
get
());
if
(
pXFFirtPara
)
if
(
pXFFirtPara
)
pXFContentContainer
=
pXFFirtPara
;
pXFContentContainer
=
pXFFirtPara
;
}
}
...
...
lotuswordpro/source/filter/lwpfribtable.cxx
Dosyayı görüntüle @
608a67ac
...
@@ -127,7 +127,9 @@ void LwpFribTable::XFConvert(XFContentContainer* pCont)
...
@@ -127,7 +127,9 @@ void LwpFribTable::XFConvert(XFContentContainer* pCont)
else
if
(
pContainer
->
IsCell
())
else
if
(
pContainer
->
IsCell
())
{
{
//same page as text and in cell, get the first xfpara
//same page as text and in cell, get the first xfpara
XFContentContainer
*
pXFFirtPara
=
static_cast
<
XFContentContainer
*>
(
pCont
->
FindFirstContent
(
enumXFContentPara
));
rtl
::
Reference
<
XFContent
>
first
(
pCont
->
FindFirstContent
(
enumXFContentPara
));
XFContentContainer
*
pXFFirtPara
=
static_cast
<
XFContentContainer
*>
(
first
.
get
());
if
(
pXFFirtPara
)
if
(
pXFFirtPara
)
pXFContentContainer
=
pXFFirtPara
;
pXFContentContainer
=
pXFFirtPara
;
}
}
...
...
lotuswordpro/source/filter/lwpgrfobj.cxx
Dosyayı görüntüle @
608a67ac
...
@@ -197,15 +197,15 @@ void LwpGraphicObject::XFConvert (XFContentContainer* pCont)
...
@@ -197,15 +197,15 @@ void LwpGraphicObject::XFConvert (XFContentContainer* pCont)
{
{
if
((
m_sServerContextFormat
[
1
]
==
's'
&&
m_sServerContextFormat
[
2
]
==
'd'
&&
m_sServerContextFormat
[
3
]
==
'w'
))
if
((
m_sServerContextFormat
[
1
]
==
's'
&&
m_sServerContextFormat
[
2
]
==
'd'
&&
m_sServerContextFormat
[
3
]
==
'w'
))
{
{
std
::
vector
<
XFFrame
*
>::
iterator
iter
;
std
::
vector
<
rtl
::
Reference
<
XFFrame
>
>::
iterator
iter
;
for
(
iter
=
m_vXFDrawObjects
.
begin
();
iter
!=
m_vXFDrawObjects
.
end
();
++
iter
)
for
(
iter
=
m_vXFDrawObjects
.
begin
();
iter
!=
m_vXFDrawObjects
.
end
();
++
iter
)
{
{
pCont
->
Add
(
*
iter
);
pCont
->
Add
(
iter
->
get
()
);
}
}
}
}
else
if
(
this
->
IsGrafFormatValid
())
else
if
(
this
->
IsGrafFormatValid
())
{
{
XFImage
*
pImage
=
static_cast
<
XFImage
*>
(
m_vXFDrawObjects
.
front
());
XFImage
*
pImage
=
static_cast
<
XFImage
*>
(
m_vXFDrawObjects
.
front
()
.
get
()
);
if
(
m_bIsLinked
)
if
(
m_bIsLinked
)
{
{
...
@@ -438,7 +438,7 @@ sal_uInt32 LwpGraphicObject::GetGrafData(sal_uInt8*& pGrafData)
...
@@ -438,7 +438,7 @@ sal_uInt32 LwpGraphicObject::GetGrafData(sal_uInt8*& pGrafData)
*/
*/
void
LwpGraphicObject
::
CreateGrafObject
()
void
LwpGraphicObject
::
CreateGrafObject
()
{
{
XFImage
*
pImage
=
new
XFImage
();
rtl
::
Reference
<
XFImage
>
pImage
=
new
XFImage
();
// set image processing styles
// set image processing styles
XFImageStyle
*
pImageStyle
=
new
XFImageStyle
();
XFImageStyle
*
pImageStyle
=
new
XFImageStyle
();
...
@@ -660,7 +660,7 @@ void LwpGraphicObject::CreateGrafObject()
...
@@ -660,7 +660,7 @@ void LwpGraphicObject::CreateGrafObject()
}
}
// insert image object into array
// insert image object into array
m_vXFDrawObjects
.
push_back
(
pImage
);
m_vXFDrawObjects
.
push_back
(
pImage
.
get
()
);
}
}
...
...
lotuswordpro/source/filter/lwpgrfobj.hxx
Dosyayı görüntüle @
608a67ac
...
@@ -110,7 +110,7 @@ private:
...
@@ -110,7 +110,7 @@ private:
void
ParseChart
(
IXFStream
*
pOutputStream
);
void
ParseChart
(
IXFStream
*
pOutputStream
);
bool
IsGrafFormatValid
();
bool
IsGrafFormatValid
();
// add by , 03/25/2005
// add by , 03/25/2005
std
::
vector
<
XFFrame
*
>
m_vXFDrawObjects
;
std
::
vector
<
rtl
::
Reference
<
XFFrame
>
>
m_vXFDrawObjects
;
// end add
// end add
public
:
public
:
...
...
lotuswordpro/source/filter/lwpsdwfileloader.cxx
Dosyayı görüntüle @
608a67ac
...
@@ -78,7 +78,7 @@ LwpSdwFileLoader::~LwpSdwFileLoader(void)
...
@@ -78,7 +78,7 @@ LwpSdwFileLoader::~LwpSdwFileLoader(void)
* @descr entry of lwp-drawing objects.
* @descr entry of lwp-drawing objects.
* @param pDrawObjVector a container which will contains the created drawing object of XF-Model.
* @param pDrawObjVector a container which will contains the created drawing object of XF-Model.
*/
*/
void
LwpSdwFileLoader
::
CreateDrawObjects
(
std
::
vector
<
XFFrame
*
>*
pDrawObjVector
)
void
LwpSdwFileLoader
::
CreateDrawObjects
(
std
::
vector
<
rtl
::
Reference
<
XFFrame
>
>*
pDrawObjVector
)
{
{
unsigned
char
BinSignature
[
2
];
unsigned
char
BinSignature
[
2
];
m_pStream
->
Read
(
BinSignature
,
2
);
m_pStream
->
Read
(
BinSignature
,
2
);
...
...
lotuswordpro/source/filter/lwpsdwfileloader.hxx
Dosyayı görüntüle @
608a67ac
...
@@ -62,11 +62,15 @@
...
@@ -62,11 +62,15 @@
#ifndef INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_LWPSDWFILELOADER_HXX
#ifndef INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_LWPSDWFILELOADER_HXX
#define INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_LWPSDWFILELOADER_HXX
#define INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_LWPSDWFILELOADER_HXX
#include <assert.h>
#include <sal/config.h>
#include <vector>
#include <rtl/ref.hxx>
#include <tools/stream.hxx>
#include <tools/stream.hxx>
#include "lwpheader.hxx"
#include "lwpheader.hxx"
#include "xfilter/ixfstream.hxx"
#include "xfilter/ixfstream.hxx"
#include <vector>
class
XFFrame
;
class
XFFrame
;
class
LwpGraphicObject
;
class
LwpGraphicObject
;
...
@@ -83,7 +87,7 @@ public:
...
@@ -83,7 +87,7 @@ public:
// void RegisterStyle(void);
// void RegisterStyle(void);
// add by ,03/25/2005
// add by ,03/25/2005
void
CreateDrawObjects
(
std
::
vector
<
XFFrame
*
>*
pDrawObjVector
);
void
CreateDrawObjects
(
std
::
vector
<
rtl
::
Reference
<
XFFrame
>
>*
pDrawObjVector
);
// end add
// end add
};
};
...
...
lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx
Dosyayı görüntüle @
608a67ac
...
@@ -93,7 +93,7 @@ LwpSdwGroupLoaderV0102::~LwpSdwGroupLoaderV0102()
...
@@ -93,7 +93,7 @@ LwpSdwGroupLoaderV0102::~LwpSdwGroupLoaderV0102()
* the corresponding drawing objects.
* the corresponding drawing objects.
* @param pDrawObjVector a container which will contains the created drawing object of XF-Model.
* @param pDrawObjVector a container which will contains the created drawing object of XF-Model.
*/
*/
void
LwpSdwGroupLoaderV0102
::
BeginDrawObjects
(
std
::
vector
<
XFFrame
*
>*
pDrawObjVector
)
void
LwpSdwGroupLoaderV0102
::
BeginDrawObjects
(
std
::
vector
<
rtl
::
Reference
<
XFFrame
>
>*
pDrawObjVector
)
{
{
// save the container
// save the container
m_pDrawObjVector
=
pDrawObjVector
;
m_pDrawObjVector
=
pDrawObjVector
;
...
...
lotuswordpro/source/filter/lwpsdwgrouploaderv0102.hxx
Dosyayı görüntüle @
608a67ac
...
@@ -62,9 +62,12 @@
...
@@ -62,9 +62,12 @@
#ifndef INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_LWPSDWGROUPLOADERV0102_HXX
#ifndef INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_LWPSDWGROUPLOADERV0102_HXX
#define INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_LWPSDWGROUPLOADERV0102_HXX
#define INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_LWPSDWGROUPLOADERV0102_HXX
#include <sal/config.h>
#include <rtl/ref.hxx>
#include <tools/stream.hxx>
#include <tools/stream.hxx>
#include "lwpheader.hxx"
#include "lwpheader.hxx"
#include "assert.h"
#include "lwpsdwdrawheader.hxx"
#include "lwpsdwdrawheader.hxx"
class
XFFrame
;
class
XFFrame
;
...
@@ -75,7 +78,7 @@ class LwpSdwGroupLoaderV0102
...
@@ -75,7 +78,7 @@ class LwpSdwGroupLoaderV0102
private
:
private
:
SvStream
*
m_pStream
;
SvStream
*
m_pStream
;
LwpGraphicObject
*
m_pGraphicObj
;
LwpGraphicObject
*
m_pGraphicObj
;
std
::
vector
<
XFFrame
*
>*
m_pDrawObjVector
;
std
::
vector
<
rtl
::
Reference
<
XFFrame
>
>*
m_pDrawObjVector
;
DrawingOffsetAndScale
m_aTransformData
;
DrawingOffsetAndScale
m_aTransformData
;
...
@@ -84,7 +87,7 @@ public:
...
@@ -84,7 +87,7 @@ public:
~
LwpSdwGroupLoaderV0102
();
~
LwpSdwGroupLoaderV0102
();
public
:
public
:
void
BeginDrawObjects
(
std
::
vector
<
XFFrame
*
>*
pDrawObjVector
);
void
BeginDrawObjects
(
std
::
vector
<
rtl
::
Reference
<
XFFrame
>
>*
pDrawObjVector
);
XFDrawGroup
*
CreateDrawGroupObject
(
void
);
XFDrawGroup
*
CreateDrawGroupObject
(
void
);
XFFrame
*
CreateDrawObject
(
void
);
XFFrame
*
CreateDrawObject
(
void
);
// end add
// end add
...
...
lotuswordpro/source/filter/lwpstory.cxx
Dosyayı görüntüle @
608a67ac
...
@@ -348,7 +348,9 @@ void LwpStory::XFConvertFrameInCell(XFContentContainer* pCont)
...
@@ -348,7 +348,9 @@ void LwpStory::XFConvertFrameInCell(XFContentContainer* pCont)
if
(
pFrameLayout
->
IsAnchorCell
()
&&
pFrameLayout
->
HasContent
())
if
(
pFrameLayout
->
IsAnchorCell
()
&&
pFrameLayout
->
HasContent
())
{
{
//get the first xfpara
//get the first xfpara
XFContentContainer
*
pXFFirtPara
=
static_cast
<
XFContentContainer
*>
(
pCont
->
FindFirstContent
(
enumXFContentPara
));
rtl
::
Reference
<
XFContent
>
first
(
pCont
->
FindFirstContent
(
enumXFContentPara
));
XFContentContainer
*
pXFFirtPara
=
static_cast
<
XFContentContainer
*>
(
first
.
get
());
if
(
pXFFirtPara
)
if
(
pXFFirtPara
)
pFrameLayout
->
XFConvert
(
pXFFirtPara
);
pFrameLayout
->
XFConvert
(
pXFFirtPara
);
}
}
...
@@ -424,7 +426,9 @@ void LwpStory::XFConvertFrameInHeaderFooter(XFContentContainer* pCont)
...
@@ -424,7 +426,9 @@ void LwpStory::XFConvertFrameInHeaderFooter(XFContentContainer* pCont)
if
(
pFrameLayout
->
IsAnchorPage
()
&&
(
pLayout
->
IsHeader
()
||
pLayout
->
IsFooter
()))
if
(
pFrameLayout
->
IsAnchorPage
()
&&
(
pLayout
->
IsHeader
()
||
pLayout
->
IsFooter
()))
{
{
//The frame must be included by <text:p>
//The frame must be included by <text:p>
XFContentContainer
*
pXFFirtPara
=
static_cast
<
XFContentContainer
*>
(
pCont
->
FindFirstContent
(
enumXFContentPara
));
rtl
::
Reference
<
XFContent
>
first
(
pCont
->
FindFirstContent
(
enumXFContentPara
));
XFContentContainer
*
pXFFirtPara
=
static_cast
<
XFContentContainer
*>
(
first
.
get
());
if
(
pXFFirtPara
)
if
(
pXFFirtPara
)
pFrameLayout
->
XFConvert
(
pXFFirtPara
);
pFrameLayout
->
XFConvert
(
pXFFirtPara
);
}
}
...
...
lotuswordpro/source/filter/lwptablelayout.cxx
Dosyayı görüntüle @
608a67ac
...
@@ -1183,8 +1183,9 @@ void LwpTableLayout::PostProcessParagraph(XFCell *pCell, sal_uInt16 nRowID, sal_
...
@@ -1183,8 +1183,9 @@ void LwpTableLayout::PostProcessParagraph(XFCell *pCell, sal_uInt16 nRowID, sal_
LwpCellLayout
*
pCellLayout
=
GetCellByRowCol
(
nRowID
,
nColID
);
LwpCellLayout
*
pCellLayout
=
GetCellByRowCol
(
nRowID
,
nColID
);
if
(
pCellLayout
)
if
(
pCellLayout
)
{
{
XFParagraph
*
pXFPara
=
NULL
;
rtl
::
Reference
<
XFContent
>
first
(
pXFPara
=
static_cast
<
XFParagraph
*>
(
pCell
->
FindFirstContent
(
enumXFContentPara
));
pCell
->
FindFirstContent
(
enumXFContentPara
));
XFParagraph
*
pXFPara
=
static_cast
<
XFParagraph
*>
(
first
.
get
());
if
(
!
pXFPara
)
if
(
!
pXFPara
)
return
;
return
;
XFColor
aNullColor
=
XFColor
();
XFColor
aNullColor
=
XFColor
();
...
...
lotuswordpro/source/filter/xfilter/xfcontent.hxx
Dosyayı görüntüle @
608a67ac
...
@@ -63,6 +63,7 @@
...
@@ -63,6 +63,7 @@
#include <sal/config.h>
#include <sal/config.h>
#include <rtl/ustring.hxx>
#include <rtl/ustring.hxx>
#include <salhelper/simplereferenceobject.hxx>
#include "xfdefs.hxx"
#include "xfdefs.hxx"
...
@@ -73,11 +74,9 @@ class IXFStream;
...
@@ -73,11 +74,9 @@ class IXFStream;
* Base class for all content object.
* Base class for all content object.
* There is only two properties:style name and content type in this class.
* There is only two properties:style name and content type in this class.
*/
*/
class
XFContent
class
XFContent
:
public
salhelper
::
SimpleReferenceObject
{
{
public
:
public
:
virtual
~
XFContent
()
{}
/**
/**
* @short: return the content type.
* @short: return the content type.
*/
*/
...
@@ -98,6 +97,8 @@ public:
...
@@ -98,6 +97,8 @@ public:
protected
:
protected
:
XFContent
()
{}
XFContent
()
{}
virtual
~
XFContent
()
{}
OUString
m_strStyleName
;
OUString
m_strStyleName
;
};
};
...
...
lotuswordpro/source/filter/xfilter/xfcontentcontainer.cxx
Dosyayı görüntüle @
608a67ac
...
@@ -66,13 +66,6 @@ XFContentContainer::XFContentContainer()
...
@@ -66,13 +66,6 @@ XFContentContainer::XFContentContainer()
XFContentContainer
::~
XFContentContainer
()
XFContentContainer
::~
XFContentContainer
()
{
{
std
::
vector
<
XFContent
*>::
iterator
it
;
for
(
it
=
m_aContents
.
begin
();
it
!=
m_aContents
.
end
();
++
it
)
{
XFContent
*
pContent
=
*
it
;
delete
pContent
;
}
}
}
void
XFContentContainer
::
Add
(
XFContent
*
pContent
)
void
XFContentContainer
::
Add
(
XFContent
*
pContent
)
...
@@ -102,26 +95,18 @@ int XFContentContainer::GetCount() const
...
@@ -102,26 +95,18 @@ int XFContentContainer::GetCount() const
void
XFContentContainer
::
Reset
()
void
XFContentContainer
::
Reset
()
{
{
std
::
vector
<
XFContent
*>::
iterator
it
;
for
(
it
=
m_aContents
.
begin
();
it
!=
m_aContents
.
end
();
++
it
)
{
XFContent
*
pContent
=
*
it
;
if
(
pContent
)
delete
pContent
;
}
m_aContents
.
clear
();
m_aContents
.
clear
();
}
}
XFContent
*
XFContentContainer
::
FindFirstContent
(
enumXFContent
type
)
rtl
::
Reference
<
XFContent
>
XFContentContainer
::
FindFirstContent
(
enumXFContent
type
)
{
{
XFContent
*
pRet
=
NULL
;
rtl
::
Reference
<
XFContent
>
pRet
;
XFContent
*
pContent
=
NULL
;
rtl
::
Reference
<
XFContent
>
pContent
;
for
(
int
i
=
0
;
i
<
GetCount
();
i
++
)
for
(
int
i
=
0
;
i
<
GetCount
();
i
++
)
{
{
pContent
=
GetContent
(
i
);
pContent
=
GetContent
(
i
);
if
(
!
pContent
)
if
(
!
pContent
.
is
()
)
continue
;
continue
;
enumXFContent
eType
=
pContent
->
GetContentType
();
enumXFContent
eType
=
pContent
->
GetContentType
();
...
@@ -129,11 +114,11 @@ XFContent* XFContentContainer::FindFirstContent(enumXFContent type)
...
@@ -129,11 +114,11 @@ XFContent* XFContentContainer::FindFirstContent(enumXFContent type)
return
pContent
;
return
pContent
;
else
else
{
{
XFContentContainer
*
pChildCont
=
static_cast
<
XFContentContainer
*>
(
pContent
);
XFContentContainer
*
pChildCont
=
static_cast
<
XFContentContainer
*>
(
pContent
.
get
()
);
if
(
pChildCont
)
if
(
pChildCont
)
{
{
pRet
=
pChildCont
->
FindFirstContent
(
type
);
pRet
=
pChildCont
->
FindFirstContent
(
type
);
if
(
pRet
)
if
(
pRet
.
is
()
)
return
pRet
;
return
pRet
;
}
}
}
}
...
@@ -148,17 +133,17 @@ enumXFContent XFContentContainer::GetContentType()
...
@@ -148,17 +133,17 @@ enumXFContent XFContentContainer::GetContentType()
void
XFContentContainer
::
ToXml
(
IXFStream
*
pStrm
)
void
XFContentContainer
::
ToXml
(
IXFStream
*
pStrm
)
{
{
std
::
vector
<
XFContent
*
>::
iterator
it
;
std
::
vector
<
rtl
::
Reference
<
XFContent
>
>::
iterator
it
;
for
(
it
=
m_aContents
.
begin
();
it
!=
m_aContents
.
end
();
++
it
)
for
(
it
=
m_aContents
.
begin
();
it
!=
m_aContents
.
end
();
++
it
)
{
{
XFContent
*
pContent
=
*
it
;
XFContent
*
pContent
=
it
->
get
()
;
if
(
pContent
)
if
(
pContent
)
pContent
->
ToXml
(
pStrm
);
pContent
->
ToXml
(
pStrm
);
}
}
}
}
XFContent
*
XFContentContainer
::
GetLastContent
()
rtl
::
Reference
<
XFContent
>
XFContentContainer
::
GetLastContent
()
{
{
sal_uInt32
index
=
m_aContents
.
size
()
-
1
;
sal_uInt32
index
=
m_aContents
.
size
()
-
1
;
if
(
index
>
0
)
if
(
index
>
0
)
...
...
lotuswordpro/source/filter/xfilter/xfcontentcontainer.hxx
Dosyayı görüntüle @
608a67ac
...
@@ -64,7 +64,7 @@
...
@@ -64,7 +64,7 @@
#include <vector>
#include <vector>
#include <
boost/noncopyable.hpp
>
#include <
rtl/ref.hxx
>
#include "xfcontent.hxx"
#include "xfcontent.hxx"
...
@@ -73,7 +73,7 @@
...
@@ -73,7 +73,7 @@
* A container for content.
* A container for content.
* The contents will be deleted when delete container.
* The contents will be deleted when delete container.
*/
*/
class
XFContentContainer
:
public
XFContent
,
private
boost
::
noncopyable
class
XFContentContainer
:
public
XFContent
{
{
public
:
public
:
XFContentContainer
();
XFContentContainer
();
...
@@ -91,7 +91,7 @@ public:
...
@@ -91,7 +91,7 @@ public:
virtual
void
InsertAtBegin
(
XFContent
*
pContent
);
virtual
void
InsertAtBegin
(
XFContent
*
pContent
);
virtual
void
RemoveAt
(
sal_uInt32
nPos
);
virtual
void
RemoveAt
(
sal_uInt32
nPos
);
virtual
XFContent
*
GetLastContent
();
virtual
rtl
::
Reference
<
XFContent
>
GetLastContent
();
virtual
void
RemoveLastContent
();
virtual
void
RemoveLastContent
();
/**
/**
* @descr convience function for add text content.
* @descr convience function for add text content.
...
@@ -106,7 +106,7 @@ public:
...
@@ -106,7 +106,7 @@ public:
/**
/**
* @descr get content by index.
* @descr get content by index.
*/
*/
XFContent
*
GetContent
(
sal_uInt32
index
)
const
;
rtl
::
Reference
<
XFContent
>
GetContent
(
sal_uInt32
index
)
const
;
/**
/**
* @descr clear all contents in the container.
* @descr clear all contents in the container.
...
@@ -116,7 +116,7 @@ public:
...
@@ -116,7 +116,7 @@ public:
/**
/**
* @descr helper function, find first content by type.
* @descr helper function, find first content by type.
*/
*/
XFContent
*
FindFirstContent
(
enumXFContent
type
);
rtl
::
Reference
<
XFContent
>
FindFirstContent
(
enumXFContent
type
);
/**
/**
* @descr return the content type.
* @descr return the content type.
...
@@ -128,10 +128,10 @@ public:
...
@@ -128,10 +128,10 @@ public:
virtual
void
ToXml
(
IXFStream
*
pStrm
)
SAL_OVERRIDE
;
virtual
void
ToXml
(
IXFStream
*
pStrm
)
SAL_OVERRIDE
;
private
:
private
:
std
::
vector
<
XFContent
*
>
m_aContents
;
std
::
vector
<
rtl
::
Reference
<
XFContent
>
>
m_aContents
;
};
};
inline
XFContent
*
XFContentContainer
::
GetContent
(
sal_uInt32
index
)
const
inline
rtl
::
Reference
<
XFContent
>
XFContentContainer
::
GetContent
(
sal_uInt32
index
)
const
{
{
if
(
index
>
m_aContents
.
size
()
-
1
)
if
(
index
>
m_aContents
.
size
()
-
1
)
return
NULL
;
return
NULL
;
...
...
lotuswordpro/source/filter/xfilter/xfframe.cxx
Dosyayı görüntüle @
608a67ac
...
@@ -194,12 +194,12 @@ void XFFrame::AdjustZIndex()
...
@@ -194,12 +194,12 @@ void XFFrame::AdjustZIndex()
{
{
for
(
int
i
=
0
;
i
<
GetCount
();
i
++
)
for
(
int
i
=
0
;
i
<
GetCount
();
i
++
)
{
{
XFContent
*
pContent
=
GetContent
(
i
);
rtl
::
Reference
<
XFContent
>
pContent
=
GetContent
(
i
);
if
(
pContent
)
if
(
pContent
.
is
()
)
{
{
if
(
pContent
->
GetContentType
()
==
enumXFContentFrame
)
if
(
pContent
->
GetContentType
()
==
enumXFContentFrame
)
{
{
XFFrame
*
pFrame
=
(
XFFrame
*
)
pContent
;
XFFrame
*
pFrame
=
(
XFFrame
*
)
pContent
.
get
()
;
pFrame
->
m_nZIndex
=
m_nZIndex
+
1
;
pFrame
->
m_nZIndex
=
m_nZIndex
+
1
;
pFrame
->
AdjustZIndex
();
pFrame
->
AdjustZIndex
();
}
}
...
...
lotuswordpro/source/filter/xfilter/xftextspan.cxx
Dosyayı görüntüle @
608a67ac
...
@@ -77,16 +77,6 @@ XFTextSpan::XFTextSpan(const OUString& text,
...
@@ -77,16 +77,6 @@ XFTextSpan::XFTextSpan(const OUString& text,
XFTextSpan
::~
XFTextSpan
()
XFTextSpan
::~
XFTextSpan
()
{
{
std
::
vector
<
XFContent
*>::
iterator
it
;
for
(
it
=
m_aContents
.
begin
();
it
!=
m_aContents
.
end
();
++
it
)
{
XFContent
*
pContent
=
*
it
;
if
(
pContent
)
{
delete
pContent
;
}
}
m_aContents
.
clear
();
}
}
enumXFContent
XFTextSpan
::
GetContentType
()
enumXFContent
XFTextSpan
::
GetContentType
()
...
@@ -117,10 +107,10 @@ void XFTextSpan::ToXml(IXFStream *pStrm)
...
@@ -117,10 +107,10 @@ void XFTextSpan::ToXml(IXFStream *pStrm)
pAttrList
->
AddAttribute
(
"text:style-name"
,
GetStyleName
()
);
pAttrList
->
AddAttribute
(
"text:style-name"
,
GetStyleName
()
);
pStrm
->
StartElement
(
"text:span"
);
pStrm
->
StartElement
(
"text:span"
);
std
::
vector
<
XFContent
*
>::
iterator
it
;
std
::
vector
<
rtl
::
Reference
<
XFContent
>
>::
iterator
it
;
for
(
it
=
m_aContents
.
begin
();
it
!=
m_aContents
.
end
();
++
it
)
for
(
it
=
m_aContents
.
begin
();
it
!=
m_aContents
.
end
();
++
it
)
{
{
XFContent
*
pContent
=
*
it
;
XFContent
*
pContent
=
it
->
get
()
;
if
(
pContent
)
if
(
pContent
)
pContent
->
ToXml
(
pStrm
);
pContent
->
ToXml
(
pStrm
);
}
}
...
@@ -140,20 +130,20 @@ void XFTextSpanStart::ToXml(IXFStream *pStrm)
...
@@ -140,20 +130,20 @@ void XFTextSpanStart::ToXml(IXFStream *pStrm)
pAttrList
->
AddAttribute
(
"text:style-name"
,
GetStyleName
()
);
pAttrList
->
AddAttribute
(
"text:style-name"
,
GetStyleName
()
);
pStrm
->
StartElement
(
"text:span"
);
pStrm
->
StartElement
(
"text:span"
);
std
::
vector
<
XFContent
*
>::
iterator
it
;
std
::
vector
<
rtl
::
Reference
<
XFContent
>
>::
iterator
it
;
for
(
it
=
m_aContents
.
begin
();
it
!=
m_aContents
.
end
();
++
it
)
for
(
it
=
m_aContents
.
begin
();
it
!=
m_aContents
.
end
();
++
it
)
{
{
XFContent
*
pContent
=
*
it
;
XFContent
*
pContent
=
it
->
get
()
;
if
(
pContent
)
if
(
pContent
)
pContent
->
ToXml
(
pStrm
);
pContent
->
ToXml
(
pStrm
);
}
}
}
}
void
XFTextSpanEnd
::
ToXml
(
IXFStream
*
pStrm
)
void
XFTextSpanEnd
::
ToXml
(
IXFStream
*
pStrm
)
{
{
std
::
vector
<
XFContent
*
>::
iterator
it
;
std
::
vector
<
rtl
::
Reference
<
XFContent
>
>::
iterator
it
;
for
(
it
=
m_aContents
.
begin
();
it
!=
m_aContents
.
end
();
++
it
)
for
(
it
=
m_aContents
.
begin
();
it
!=
m_aContents
.
end
();
++
it
)
{
{
XFContent
*
pContent
=
*
it
;
XFContent
*
pContent
=
it
->
get
()
;
if
(
pContent
)
if
(
pContent
)
pContent
->
ToXml
(
pStrm
);
pContent
->
ToXml
(
pStrm
);
}
}
...
...
lotuswordpro/source/filter/xfilter/xftextspan.hxx
Dosyayı görüntüle @
608a67ac
...
@@ -60,9 +60,14 @@
...
@@ -60,9 +60,14 @@
#ifndef INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_XFILTER_XFTEXTSPAN_HXX
#ifndef INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_XFILTER_XFTEXTSPAN_HXX
#define INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_XFILTER_XFTEXTSPAN_HXX
#define INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_XFILTER_XFTEXTSPAN_HXX
#include <sal/config.h>
#include <vector>
#include <rtl/ref.hxx>
#include "xfglobal.hxx"
#include "xfglobal.hxx"
#include "xfcontent.hxx"
#include "xfcontent.hxx"
#include <vector>
class
IXFStream
;
class
IXFStream
;
...
@@ -80,7 +85,7 @@ public:
...
@@ -80,7 +85,7 @@ public:
virtual
enumXFContent
GetContentType
()
SAL_OVERRIDE
;
virtual
enumXFContent
GetContentType
()
SAL_OVERRIDE
;
virtual
void
ToXml
(
IXFStream
*
pStrm
)
SAL_OVERRIDE
;
virtual
void
ToXml
(
IXFStream
*
pStrm
)
SAL_OVERRIDE
;
protected
:
protected
:
std
::
vector
<
XFContent
*>
m_aContents
;
std
::
vector
<
rtl
::
Reference
<
XFContent
>
>
m_aContents
;
};
};
class
XFTextSpanStart
:
public
XFTextSpan
//for adding style of power field
class
XFTextSpanStart
:
public
XFTextSpan
//for adding style of power field
...
...
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