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 (std::u16string_view) 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 CopyBlock (SwImpBlocks &rImp, OUString &rShort, const OUString &rLong)=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 (std::u16string_view)
 Calculate hash code (is not guaranteed to be unique) More...
 

Protected Types

enum class  FileType {
  NoFile ,
  None ,
  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 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

◆ FileType

enum class SwImpBlocks::FileType
strongprotected
Enumerator
NoFile 
None 
XML 

Definition at line 74 of file swblocks.hxx.

Constructor & Destructor Documentation

◆ SwImpBlocks()

SwImpBlocks::SwImpBlocks ( const OUString &  rFile)
explicitprotected

◆ ~SwImpBlocks()

SwImpBlocks::~SwImpBlocks ( )
virtual

Definition at line 95 of file swblocks.cxx.

Member Function Documentation

◆ AddName()

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

◆ BeginPutDoc()

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

Implemented in SwXMLTextBlocks.

◆ ClearDoc()

void SwImpBlocks::ClearDoc ( )
protectedvirtual

Delete the document's content.

Reimplemented in SwXMLTextBlocks.

Definition at line 102 of file swblocks.cxx.

References m_xDoc.

◆ CloseFile()

virtual void SwImpBlocks::CloseFile ( )
pure virtual

Implemented in SwXMLTextBlocks.

Referenced by SwXMLTextBlocks::CopyBlock().

◆ CopyBlock()

virtual ErrCode SwImpBlocks::CopyBlock ( SwImpBlocks rImp,
OUString &  rShort,
const OUString &  rLong 
)
pure virtual

Implemented in SwXMLTextBlocks.

◆ Delete()

virtual ErrCode SwImpBlocks::Delete ( sal_uInt16  )
pure virtual

Implemented in SwXMLTextBlocks.

◆ GetBaseURL()

const OUString & SwImpBlocks::GetBaseURL ( ) const
inline

Definition at line 104 of file swblocks.hxx.

References m_sBaseURL.

Referenced by SwXMLTextBlocks::GetDoc(), and SwXMLTextBlocks::PutBlock().

◆ GetCount()

sal_uInt16 SwImpBlocks::GetCount ( ) const

◆ GetDoc()

virtual ErrCode SwImpBlocks::GetDoc ( sal_uInt16  )
pure virtual

Implemented in SwXMLTextBlocks.

◆ GetFileName()

const OUString & SwImpBlocks::GetFileName ( ) const
inline

Return packagename for index.

Definition at line 98 of file swblocks.hxx.

References m_aFile.

◆ GetFileType()

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

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

Definition at line 70 of file swblocks.cxx.

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

Referenced by SwTextBlocks::SwTextBlocks().

◆ GetIndex()

sal_uInt16 SwImpBlocks::GetIndex ( const OUString &  rShort) const

◆ GetLongIndex()

sal_uInt16 SwImpBlocks::GetLongIndex ( std::u16string_view  aLong) const

◆ GetLongName()

OUString SwImpBlocks::GetLongName ( sal_uInt16  n) const

◆ GetMacroTable()

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

Reimplemented in SwXMLTextBlocks.

Definition at line 209 of file swblocks.cxx.

References ERRCODE_NONE.

◆ GetName()

const OUString & SwImpBlocks::GetName ( ) const
inline

Definition at line 101 of file swblocks.hxx.

References m_aName.

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

◆ GetPackageName()

OUString SwImpBlocks::GetPackageName ( sal_uInt16  n) const

◆ GetShortName()

OUString SwImpBlocks::GetShortName ( sal_uInt16  n) const

◆ Hash()

sal_uInt16 SwImpBlocks::Hash ( std::u16string_view  r)
static

Calculate hash code (is not guaranteed to be unique)

Definition at line 39 of file swblocks.cxx.

References i, min(), and n.

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

◆ IsFileChanged()

bool SwImpBlocks::IsFileChanged ( ) const
protected

◆ IsOnlyTextBlock()

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

Reimplemented in SwXMLTextBlocks.

Definition at line 204 of file swblocks.cxx.

◆ MakeBlockList()

virtual ErrCode SwImpBlocks::MakeBlockList ( )
pure virtual

Implemented in SwXMLTextBlocks.

◆ MakePaM()

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

Creating a PaM, that spans the whole document.

Definition at line 110 of file swblocks.cxx.

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

Referenced by SwXMLTextBlocks::PutDoc().

◆ OpenFile()

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

Implemented in SwXMLTextBlocks.

Referenced by SwXMLTextBlocks::CopyBlock().

◆ PutDoc()

virtual ErrCode SwImpBlocks::PutDoc ( )
pure virtual

Implemented in SwXMLTextBlocks.

◆ PutMuchEntries()

bool SwImpBlocks::PutMuchEntries ( bool  bOn)
virtual

Reimplemented in SwXMLTextBlocks.

Definition at line 219 of file swblocks.cxx.

◆ PutText()

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

Implemented in SwXMLTextBlocks.

◆ Rename()

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

Implemented in SwXMLTextBlocks.

◆ SetBaseURL()

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

Definition at line 105 of file swblocks.hxx.

References m_sBaseURL.

◆ SetMacroTable()

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

Reimplemented in SwXMLTextBlocks.

Definition at line 214 of file swblocks.cxx.

References ERRCODE_NONE.

◆ SetName()

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

Return physical file name.

Logic name

Definition at line 99 of file swblocks.hxx.

References m_aName, and m_bInfoChanged.

◆ Touch()

void SwImpBlocks::Touch ( )
protected

Friends And Related Function Documentation

◆ SwTextBlocks

friend class SwTextBlocks
friend

Definition at line 56 of file swblocks.hxx.

Member Data Documentation

◆ m_aCurrentText

OUString SwImpBlocks::m_aCurrentText
protected

Definition at line 60 of file swblocks.hxx.

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

◆ m_aDateModified

Date SwImpBlocks::m_aDateModified
protected

Definition at line 64 of file swblocks.hxx.

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

◆ m_aFile

OUString SwImpBlocks::m_aFile
protected

Definition at line 58 of file swblocks.hxx.

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

◆ m_aLong

OUString SwImpBlocks::m_aLong
protected

◆ m_aName

OUString SwImpBlocks::m_aName
protected

◆ m_aNames

SwBlockNames SwImpBlocks::m_aNames
protected

◆ m_aShort

OUString SwImpBlocks::m_aShort
protected

◆ m_aTimeModified

tools::Time SwImpBlocks::m_aTimeModified
protected

Definition at line 65 of file swblocks.hxx.

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

◆ m_bInfoChanged

bool SwImpBlocks::m_bInfoChanged
protected

◆ m_bInPutMuchBlocks

bool SwImpBlocks::m_bInPutMuchBlocks
protected

Definition at line 69 of file swblocks.hxx.

Referenced by SwXMLTextBlocks::PutMuchEntries().

◆ m_bReadOnly

bool SwImpBlocks::m_bReadOnly
protected

Definition at line 68 of file swblocks.hxx.

Referenced by SwXMLTextBlocks::SwXMLTextBlocks().

◆ m_nCurrentIndex

sal_uInt16 SwImpBlocks::m_nCurrentIndex
protected

Definition at line 67 of file swblocks.hxx.

◆ m_sBaseURL

OUString SwImpBlocks::m_sBaseURL
protected

Definition at line 62 of file swblocks.hxx.

Referenced by GetBaseURL(), and SetBaseURL().

◆ m_xDoc

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

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