LibreOffice Module lotuswordpro (master) 1
Public Member Functions | Private Attributes | List of all members
XFContentContainer Class Reference

A container for content. More...

#include <xfcontentcontainer.hxx>

Inheritance diagram for XFContentContainer:
[legend]
Collaboration diagram for XFContentContainer:
[legend]

Public Member Functions

 XFContentContainer ()
 
virtual ~XFContentContainer () override
 @descr Destructure, all contents will be deleted too. More...
 
virtual void Add (XFContent *pContent)
 @descr Add content. More...
 
rtl::Reference< XFContentGetLastContent ()
 
void RemoveLastContent ()
 
void Add (const OUString &text)
 @descr convenience function for add text content. More...
 
int GetCount () const
 @descr return the number of contents in the container. More...
 
rtl::Reference< XFContentGetContent (sal_uInt32 index) const
 @descr get content by index. More...
 
void Reset ()
 @descr clear all contents in the container. More...
 
rtl::Reference< XFContentFindFirstContent (enumXFContent type)
 @descr helper function, find first content by type. More...
 
virtual enumXFContent GetContentType () override
 @descr return the content type. More...
 
virtual void ToXml (IXFStream *pStrm) override
 @descr Output to OOo model or local file. More...
 
bool HierarchyContains (const XFContent *pContent) const
 
- Public Member Functions inherited from XFContent
virtual enumXFContent GetContentType ()
 : return the content type. More...
 
virtual void SetStyleName (const OUString &style)
 : All content except XFTextContent can have a style. More...
 
const OUString & GetStyleName () const
 : return the style name. More...
 
void DoToXml (IXFStream *stream)
 
- Public Member Functions inherited from salhelper::SimpleReferenceObject
 SimpleReferenceObject ()
 
void acquire ()
 
void release ()
 

Private Attributes

std::vector< rtl::Reference< XFContent > > m_aContents
 

Additional Inherited Members

- Static Public Member Functions inherited from salhelper::SimpleReferenceObject
static void * operator new (std::size_t nSize)
 
static void * operator new (std::size_t nSize, std::nothrow_t const &rNothrow)
 
static void operator delete (void *pPtr)
 
static void operator delete (void *pPtr, std::nothrow_t const &rNothrow)
 
- Protected Member Functions inherited from XFContent
 XFContent ()
 
virtual void ToXml (IXFStream *stream)=0
 
virtual ~XFContent () override
 
- Protected Member Functions inherited from salhelper::SimpleReferenceObject
virtual ~SimpleReferenceObject () COVERITY_NOEXCEPT_FALSE
 
- Protected Attributes inherited from XFContent
OUString m_strStyleName
 
- Protected Attributes inherited from salhelper::SimpleReferenceObject
oslInterlockedCount m_nCount
 

Detailed Description

A container for content.

The contents will be deleted when delete container.

Definition at line 76 of file xfcontentcontainer.hxx.

Constructor & Destructor Documentation

◆ XFContentContainer()

XFContentContainer::XFContentContainer ( )

Definition at line 63 of file xfcontentcontainer.cxx.

◆ ~XFContentContainer()

XFContentContainer::~XFContentContainer ( )
overridevirtual

@descr Destructure, all contents will be deleted too.

Definition at line 67 of file xfcontentcontainer.cxx.

Member Function Documentation

◆ Add() [1/2]

void XFContentContainer::Add ( const OUString &  text)

@descr convenience function for add text content.

Definition at line 76 of file xfcontentcontainer.cxx.

References Add(), and text().

◆ Add() [2/2]

void XFContentContainer::Add ( XFContent pContent)
virtual

◆ FindFirstContent()

rtl::Reference< XFContent > XFContentContainer::FindFirstContent ( enumXFContent  type)

◆ GetContent()

rtl::Reference< XFContent > XFContentContainer::GetContent ( sal_uInt32  index) const
inline

@descr get content by index.

Definition at line 134 of file xfcontentcontainer.hxx.

References index, and m_aContents.

Referenced by XFFrame::AdjustZIndex(), and FindFirstContent().

◆ GetContentType()

enumXFContent XFContentContainer::GetContentType ( )
overridevirtual

@descr return the content type.

Reimplemented from XFContent.

Reimplemented in XFFrame, and XFParagraph.

Definition at line 139 of file xfcontentcontainer.cxx.

References enumXFContentContainer.

◆ GetCount()

int XFContentContainer::GetCount ( ) const

@descr return the number of contents in the container.

Definition at line 101 of file xfcontentcontainer.cxx.

References m_aContents.

Referenced by XFFrame::AdjustZIndex(), FindFirstContent(), XFParagraph::HasContents(), HierarchyContains(), and XFChangeList::ToXml().

◆ GetLastContent()

rtl::Reference< XFContent > XFContentContainer::GetLastContent ( )

Definition at line 154 of file xfcontentcontainer.cxx.

References index, and m_aContents.

Referenced by LwpMasterPage::ParseSection(), and LwpFribTable::XFConvert().

◆ HierarchyContains()

bool XFContentContainer::HierarchyContains ( const XFContent pContent) const

Definition at line 83 of file xfcontentcontainer.cxx.

References GetCount(), i, and nCount.

Referenced by XFTable::AddRow(), and XFTable::ContainsTable().

◆ RemoveLastContent()

void XFContentContainer::RemoveLastContent ( )

Definition at line 166 of file xfcontentcontainer.cxx.

References index, and m_aContents.

Referenced by LwpMasterPage::ParseSection(), and LwpFribTable::XFConvert().

◆ Reset()

void XFContentContainer::Reset ( void  )

@descr clear all contents in the container.

Definition at line 106 of file xfcontentcontainer.cxx.

References m_aContents.

Referenced by XFCell::Add().

◆ ToXml()

void XFContentContainer::ToXml ( IXFStream pStrm)
overridevirtual

Member Data Documentation

◆ m_aContents

std::vector<rtl::Reference<XFContent> > XFContentContainer::m_aContents
private

The documentation for this class was generated from the following files: