LibreOffice Module sw (master)  1
Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Friends | List of all members
SwImpBlocks Class Referenceabstract

#include <swblocks.hxx>

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

Public Member Functions

virtual ~SwImpBlocks ()
 
sal_uInt16 GetCount () const
 Hashcode for Block names. More...
 
sal_uInt16 GetIndex (const OUString &) const
 Get count of Text Blocks. More...
 
sal_uInt16 GetLongIndex (const OUString &) const
 Index for shortnames. More...
 
OUString GetShortName (sal_uInt16) const
 Index for longnames. More...
 
OUString GetLongName (sal_uInt16) const
 Return shortname for index. More...
 
OUString GetPackageName (sal_uInt16) const
 Return longname for index. More...
 
const OUString & GetFileName () const
 Return packagename for index. More...
 
void SetName (const OUString &rName)
 Return physical file name. More...
 
const OUString & GetName () const
 
const OUString & GetBaseURL () const
 
void SetBaseURL (const OUString &rURL)
 
virtual ErrCode Delete (sal_uInt16)=0
 
virtual ErrCode Rename (sal_uInt16, const OUString &)=0
 
virtual ErrCode GetDoc (sal_uInt16)=0
 
virtual ErrCode BeginPutDoc (const OUString &, const OUString &)=0
 
virtual ErrCode PutDoc ()=0
 
virtual ErrCode PutText (const OUString &, const OUString &, const OUString &)=0
 
virtual ErrCode MakeBlockList ()=0
 
virtual ErrCode OpenFile (bool bReadOnly=true)=0
 
virtual void CloseFile ()=0
 
virtual bool IsOnlyTextBlock (const OUString &rShort) const
 
virtual ErrCode GetMacroTable (sal_uInt16 nIdx, SvxMacroTableDtor &rMacroTable)
 
virtual ErrCode SetMacroTable (sal_uInt16 nIdx, const SvxMacroTableDtor &rMacroTable)
 
virtual bool PutMuchEntries (bool bOn)
 

Static Public Member Functions

static sal_uInt16 Hash (const OUString &)
 Calculate hash code (is not guaranteed to be unique) More...
 

Protected Types

enum  FileType {
  FileType::NoFile,
  FileType::None,
  FileType::XML
}
 

Protected Member Functions

 SwImpBlocks (const OUString &)
 
virtual void ClearDoc ()
 Delete the document's content. More...
 
std::unique_ptr< SwPaMMakePaM ()
 Creating a PaM, that spans the whole document. More...
 
virtual void AddName (const OUString &, const OUString &, bool bOnlyText=false)
 
bool IsFileChanged () const
 
void Touch ()
 

Static Protected Member Functions

static FileType GetFileType (const OUString &)
 Is the provided file a storage or doesn't it exist? More...
 

Protected Attributes

OUString const m_aFile
 
OUString m_aName
 
OUString m_aCurrentText
 
OUString m_aShort
 
OUString m_aLong
 
OUString m_sBaseURL
 
SwBlockNames m_aNames
 
Date m_aDateModified
 
tools::Time m_aTimeModified
 
rtl::Reference< SwDocm_xDoc
 
sal_uInt16 m_nCurrentIndex
 
bool m_bReadOnly: 1
 
bool m_bInPutMuchBlocks: 1
 
bool m_bInfoChanged: 1
 

Friends

class SwTextBlocks
 

Detailed Description

Definition at line 54 of file swblocks.hxx.

Member Enumeration Documentation

enum SwImpBlocks::FileType
strongprotected
Enumerator
NoFile 
None 
XML 

Definition at line 74 of file swblocks.hxx.

Constructor & Destructor Documentation

SwImpBlocks::SwImpBlocks ( const OUString &  rFile)
explicitprotected
SwImpBlocks::~SwImpBlocks ( )
virtual

Definition at line 94 of file swblocks.cxx.

Member Function Documentation

void SwImpBlocks::AddName ( const OUString &  rShort,
const OUString &  rLong,
bool  bOnlyText = false 
)
protectedvirtual
virtual ErrCode SwImpBlocks::BeginPutDoc ( const OUString &  ,
const OUString &   
)
pure virtual

Implemented in SwXMLTextBlocks.

void SwImpBlocks::ClearDoc ( )
protectedvirtual

Delete the document's content.

Reimplemented in SwXMLTextBlocks.

Definition at line 101 of file swblocks.cxx.

References m_xDoc.

virtual void SwImpBlocks::CloseFile ( )
pure virtual

Implemented in SwXMLTextBlocks.

virtual ErrCode SwImpBlocks::Delete ( sal_uInt16  )
pure virtual

Implemented in SwXMLTextBlocks.

const OUString& SwImpBlocks::GetBaseURL ( ) const
inline

Definition at line 104 of file swblocks.hxx.

References m_sBaseURL.

Referenced by SwXMLTextBlocks::PutBlock().

sal_uInt16 SwImpBlocks::GetCount ( ) const

Hashcode for Block names.

Definition at line 119 of file swblocks.cxx.

References m_aNames, and o3tl::sorted_vector< Value, Compare, Find, class >::size().

Referenced by SwXMLBlockListExport::exportDoc().

virtual ErrCode SwImpBlocks::GetDoc ( sal_uInt16  )
pure virtual

Implemented in SwXMLTextBlocks.

const OUString& SwImpBlocks::GetFileName ( ) const
inline

Return packagename for index.

Definition at line 98 of file swblocks.hxx.

References m_aFile.

SwImpBlocks::FileType SwImpBlocks::GetFileType ( const OUString &  rFile)
staticprotected

Is the provided file a storage or doesn't it exist?

Definition at line 69 of file swblocks.cxx.

References FStatHelper::IsDocument(), SwXMLTextBlocks::IsFileUCBStorage(), NoFile, None, and XML.

Referenced by SwTextBlocks::SwTextBlocks().

sal_uInt16 SwImpBlocks::GetIndex ( const OUString &  rShort) const
sal_uInt16 SwImpBlocks::GetLongIndex ( const OUString &  rLong) const
OUString SwImpBlocks::GetLongName ( sal_uInt16  n) const

Return shortname for index.

Definition at line 161 of file swblocks.cxx.

References m_aNames, and o3tl::sorted_vector< Value, Compare, Find, class >::size().

Referenced by SwXMLBlockListExport::exportDoc().

ErrCode SwImpBlocks::GetMacroTable ( sal_uInt16  nIdx,
SvxMacroTableDtor rMacroTable 
)
virtual

Reimplemented in SwXMLTextBlocks.

Definition at line 208 of file swblocks.cxx.

References ERRCODE_NONE.

const OUString& SwImpBlocks::GetName ( ) const
inline

Definition at line 101 of file swblocks.hxx.

References m_aName.

Referenced by SwXMLBlockListExport::exportDoc(), and SwXMLTextBlockExport::exportDoc().

OUString SwImpBlocks::GetPackageName ( sal_uInt16  n) const

Return longname for index.

Definition at line 168 of file swblocks.cxx.

References m_aNames, and o3tl::sorted_vector< Value, Compare, Find, class >::size().

Referenced by SwXMLBlockListExport::exportDoc().

OUString SwImpBlocks::GetShortName ( sal_uInt16  n) const

Index for longnames.

Definition at line 154 of file swblocks.cxx.

References m_aNames, and o3tl::sorted_vector< Value, Compare, Find, class >::size().

Referenced by SwXMLBlockListExport::exportDoc().

sal_uInt16 SwImpBlocks::Hash ( const OUString &  r)
static

Calculate hash code (is not guaranteed to be unique)

Definition at line 38 of file swblocks.cxx.

References i, and n.

Referenced by GetIndex(), GetLongIndex(), and SwBlockName::SwBlockName().

bool SwImpBlocks::IsFileChanged ( ) const
protected
bool SwImpBlocks::IsOnlyTextBlock ( const OUString &  rShort) const
virtual

Reimplemented in SwXMLTextBlocks.

Definition at line 203 of file swblocks.cxx.

virtual ErrCode SwImpBlocks::MakeBlockList ( )
pure virtual

Implemented in SwXMLTextBlocks.

std::unique_ptr< SwPaM > SwImpBlocks::MakePaM ( )
protected

Creating a PaM, that spans the whole document.

Definition at line 109 of file swblocks.cxx.

References fnMoveBackward, fnMoveForward, GoInDoc(), and m_xDoc.

Referenced by SwXMLTextBlocks::PutDoc().

virtual ErrCode SwImpBlocks::OpenFile ( bool  bReadOnly = true)
pure virtual

Implemented in SwXMLTextBlocks.

virtual ErrCode SwImpBlocks::PutDoc ( )
pure virtual

Implemented in SwXMLTextBlocks.

bool SwImpBlocks::PutMuchEntries ( bool  bOn)
virtual

Reimplemented in SwXMLTextBlocks.

Definition at line 218 of file swblocks.cxx.

virtual ErrCode SwImpBlocks::PutText ( const OUString &  ,
const OUString &  ,
const OUString &   
)
pure virtual

Implemented in SwXMLTextBlocks.

virtual ErrCode SwImpBlocks::Rename ( sal_uInt16  ,
const OUString &   
)
pure virtual

Implemented in SwXMLTextBlocks.

void SwImpBlocks::SetBaseURL ( const OUString &  rURL)
inline

Definition at line 105 of file swblocks.hxx.

ErrCode SwImpBlocks::SetMacroTable ( sal_uInt16  nIdx,
const SvxMacroTableDtor rMacroTable 
)
virtual

Reimplemented in SwXMLTextBlocks.

Definition at line 213 of file swblocks.cxx.

References ERRCODE_NONE.

void SwImpBlocks::SetName ( const OUString &  rName)
inline

Return physical file name.

Logic name

Definition at line 99 of file swblocks.hxx.

References m_bInfoChanged.

void SwImpBlocks::Touch ( )
protected

Friends And Related Function Documentation

friend class SwTextBlocks
friend

Definition at line 56 of file swblocks.hxx.

Member Data Documentation

OUString SwImpBlocks::m_aCurrentText
protected

Definition at line 60 of file swblocks.hxx.

Referenced by SwXMLTextBlocks::PutText().

Date SwImpBlocks::m_aDateModified
protected

Definition at line 64 of file swblocks.hxx.

Referenced by IsFileChanged(), SwImpBlocks(), SwXMLTextBlocks::SwXMLTextBlocks(), and Touch().

OUString const SwImpBlocks::m_aFile
protected

Definition at line 58 of file swblocks.hxx.

Referenced by GetFileName(), IsFileChanged(), SwXMLTextBlocks::OpenFile(), and Touch().

OUString SwImpBlocks::m_aLong
protected

Definition at line 61 of file swblocks.hxx.

Referenced by SwXMLTextBlocks::BeginPutDoc(), and SwXMLTextBlocks::PutText().

OUString SwImpBlocks::m_aName
protected

Definition at line 59 of file swblocks.hxx.

Referenced by GetName(), and SwImpBlocks().

SwBlockNames SwImpBlocks::m_aNames
protected
OUString SwImpBlocks::m_aShort
protected
tools::Time SwImpBlocks::m_aTimeModified
protected

Definition at line 65 of file swblocks.hxx.

Referenced by IsFileChanged(), SwImpBlocks(), SwXMLTextBlocks::SwXMLTextBlocks(), and Touch().

bool SwImpBlocks::m_bInfoChanged
protected
bool SwImpBlocks::m_bInPutMuchBlocks
protected

Definition at line 69 of file swblocks.hxx.

Referenced by SwXMLTextBlocks::PutMuchEntries().

bool SwImpBlocks::m_bReadOnly
protected

Definition at line 68 of file swblocks.hxx.

Referenced by SwXMLTextBlocks::SwXMLTextBlocks().

sal_uInt16 SwImpBlocks::m_nCurrentIndex
protected

Definition at line 67 of file swblocks.hxx.

OUString SwImpBlocks::m_sBaseURL
protected

Definition at line 62 of file swblocks.hxx.

Referenced by GetBaseURL().

rtl::Reference<SwDoc> SwImpBlocks::m_xDoc
protected

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