LibreOffice Module sw (master) 1
|
#include <swblocks.hxx>
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< SwPaM > | MakePaM () |
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< SwDoc > | m_xDoc |
sal_uInt16 | m_nCurrentIndex |
bool | m_bReadOnly: 1 |
bool | m_bInPutMuchBlocks: 1 |
bool | m_bInfoChanged: 1 |
Friends | |
class | SwTextBlocks |
Definition at line 54 of file swblocks.hxx.
|
strongprotected |
Enumerator | |
---|---|
NoFile | |
None | |
XML |
Definition at line 74 of file swblocks.hxx.
|
explicitprotected |
Definition at line 80 of file swblocks.cxx.
References EMPTY, INetURLObject::GetBase(), FStatHelper::GetModifiedDateTimeOfFile(), m_aDateModified, m_aName, m_aTimeModified, m_bReadOnly, m_nCurrentIndex, INetURLObject::setExtension(), Time, and u.
|
virtual |
Definition at line 95 of file swblocks.cxx.
|
protectedvirtual |
Reimplemented in SwXMLTextBlocks.
Definition at line 176 of file swblocks.cxx.
References o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::begin(), o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::erase(), GetIndex(), o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::insert(), and m_aNames.
|
pure virtual |
Implemented in SwXMLTextBlocks.
|
protectedvirtual |
Delete the document's content.
Reimplemented in SwXMLTextBlocks.
Definition at line 102 of file swblocks.cxx.
References m_xDoc.
|
pure virtual |
Implemented in SwXMLTextBlocks.
Referenced by SwXMLTextBlocks::CopyBlock().
|
pure virtual |
Implemented in SwXMLTextBlocks.
|
pure virtual |
Implemented in SwXMLTextBlocks.
|
inline |
Definition at line 104 of file swblocks.hxx.
References m_sBaseURL.
Referenced by SwXMLTextBlocks::GetDoc(), and SwXMLTextBlocks::PutBlock().
sal_uInt16 SwImpBlocks::GetCount | ( | ) | const |
Hashcode for Block names.
Definition at line 120 of file swblocks.cxx.
References m_aNames, and o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::size().
Referenced by SwXMLBlockListExport::exportDoc().
|
pure virtual |
Implemented in SwXMLTextBlocks.
|
inline |
|
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().
sal_uInt16 SwImpBlocks::GetIndex | ( | const OUString & | rShort | ) | const |
Get count of Text Blocks.
Case Insensitive.
Definition at line 128 of file swblocks.cxx.
References GetAppCharClass(), Hash(), i, m_aNames, pName, and o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::size().
Referenced by AddName(), SwXMLTextBlocks::AddName(), SwXMLTextBlocks::CopyBlock(), SwXMLTextBlocks::IsOnlyTextBlock(), SwXMLTextBlocks::MakeBlockText(), SwXMLTextBlocks::PutBlockText(), SwXMLTextBlocks::SetIsTextOnly(), and SwXMLTextBlocks::StartPutBlock().
sal_uInt16 SwImpBlocks::GetLongIndex | ( | std::u16string_view | aLong | ) | const |
Index for shortnames.
Definition at line 142 of file swblocks.cxx.
References Hash(), i, m_aNames, pName, and o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::size().
OUString SwImpBlocks::GetLongName | ( | sal_uInt16 | n | ) | const |
Return shortname for index.
Definition at line 162 of file swblocks.cxx.
References m_aNames, n, and o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::size().
Referenced by SwXMLBlockListExport::exportDoc().
|
virtual |
Reimplemented in SwXMLTextBlocks.
Definition at line 209 of file swblocks.cxx.
References ERRCODE_NONE.
|
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 169 of file swblocks.cxx.
References m_aNames, n, and o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::size().
Referenced by SwXMLTextBlocks::CopyBlock(), SwXMLBlockListExport::exportDoc(), and SwXMLTextBlocks::GetDoc().
OUString SwImpBlocks::GetShortName | ( | sal_uInt16 | n | ) | const |
Index for longnames.
Definition at line 155 of file swblocks.cxx.
References m_aNames, n, and o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::size().
Referenced by SwXMLBlockListExport::exportDoc().
|
static |
Calculate hash code (is not guaranteed to be unique)
Definition at line 39 of file swblocks.cxx.
Referenced by GetIndex(), GetLongIndex(), and SwBlockName::SwBlockName().
|
protected |
Definition at line 190 of file swblocks.cxx.
References FStatHelper::GetModifiedDateTimeOfFile(), m_aDateModified, m_aFile, and m_aTimeModified.
Referenced by SwXMLTextBlocks::PutMuchEntries().
|
virtual |
Reimplemented in SwXMLTextBlocks.
Definition at line 204 of file swblocks.cxx.
|
pure virtual |
Implemented in SwXMLTextBlocks.
|
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().
|
pure virtual |
Implemented in SwXMLTextBlocks.
Referenced by SwXMLTextBlocks::CopyBlock().
|
pure virtual |
Implemented in SwXMLTextBlocks.
|
virtual |
Reimplemented in SwXMLTextBlocks.
Definition at line 219 of file swblocks.cxx.
|
pure virtual |
Implemented in SwXMLTextBlocks.
|
pure virtual |
Implemented in SwXMLTextBlocks.
|
inline |
Definition at line 105 of file swblocks.hxx.
References m_sBaseURL.
|
virtual |
Reimplemented in SwXMLTextBlocks.
Definition at line 214 of file swblocks.cxx.
References ERRCODE_NONE.
|
inline |
Return physical file name.
Logic name
Definition at line 99 of file swblocks.hxx.
References m_aName, and m_bInfoChanged.
|
protected |
Definition at line 199 of file swblocks.cxx.
References FStatHelper::GetModifiedDateTimeOfFile(), m_aDateModified, m_aFile, and m_aTimeModified.
Referenced by SwXMLTextBlocks::PutMuchEntries(), and SwXMLTextBlocks::SwXMLTextBlocks().
|
friend |
Definition at line 56 of file swblocks.hxx.
|
protected |
Definition at line 60 of file swblocks.hxx.
Referenced by SwXMLTextBlocks::GetDoc(), and SwXMLTextBlocks::PutText().
|
protected |
Definition at line 64 of file swblocks.hxx.
Referenced by IsFileChanged(), SwImpBlocks(), SwXMLTextBlocks::SwXMLTextBlocks(), and Touch().
|
protected |
Definition at line 58 of file swblocks.hxx.
Referenced by GetFileName(), IsFileChanged(), SwXMLTextBlocks::OpenFile(), and Touch().
|
protected |
Definition at line 61 of file swblocks.hxx.
Referenced by SwXMLTextBlocks::BeginPutDoc(), SwXMLTextBlocks::GetMacroTable(), SwXMLTextBlocks::PutText(), and SwXMLTextBlocks::SetMacroTable().
|
protected |
Definition at line 59 of file swblocks.hxx.
Referenced by SwXMLTextBlocks::GetBlockText(), SwXMLTextBlocks::GetMacroTable(), GetName(), SetName(), and SwImpBlocks().
|
protected |
Definition at line 63 of file swblocks.hxx.
Referenced by AddName(), SwXMLTextBlocks::AddName(), SwXMLTextBlocks::Delete(), GetCount(), SwXMLTextBlocks::GetDoc(), GetIndex(), GetLongIndex(), GetLongName(), SwXMLTextBlocks::GetMacroTable(), GetPackageName(), GetShortName(), SwXMLTextBlocks::IsOnlyTextBlock(), SwXMLTextBlocks::Rename(), SwXMLTextBlocks::SetIsTextOnly(), and SwXMLTextBlocks::SetMacroTable().
|
protected |
Definition at line 61 of file swblocks.hxx.
Referenced by SwXMLTextBlocks::BeginPutDoc(), SwXMLTextBlocks::GetMacroTable(), SwXMLTextBlocks::PutText(), SwXMLTextBlocks::Rename(), and SwXMLTextBlocks::SetMacroTable().
|
protected |
Definition at line 65 of file swblocks.hxx.
Referenced by IsFileChanged(), SwImpBlocks(), SwXMLTextBlocks::SwXMLTextBlocks(), and Touch().
|
protected |
Definition at line 70 of file swblocks.hxx.
Referenced by SwXMLTextBlocks::AddName(), SwXMLTextBlocks::CloseFile(), SwXMLTextBlocks::GetDoc(), SetName(), SwXMLTextBlocks::SwXMLTextBlocks(), SwXMLTextBlocks::WriteInfo(), and SwXMLTextBlocks::~SwXMLTextBlocks().
|
protected |
Definition at line 69 of file swblocks.hxx.
Referenced by SwXMLTextBlocks::PutMuchEntries().
|
protected |
Definition at line 68 of file swblocks.hxx.
Referenced by SwXMLTextBlocks::SwXMLTextBlocks().
|
protected |
Definition at line 67 of file swblocks.hxx.
|
protected |
Definition at line 62 of file swblocks.hxx.
Referenced by GetBaseURL(), and SetBaseURL().
|
protected |
Definition at line 66 of file swblocks.hxx.
Referenced by ClearDoc(), SwXMLTextBlocks::ClearDoc(), SwXMLTextBlocks::GetDoc(), SwXMLTextBlocks::MakeBlockText(), MakePaM(), SwXMLTextBlocks::PutBlock(), SwXMLTextBlocks::SetMacroTable(), and SwXMLTextBlocks::SwXMLTextBlocks().