|
LibreOffice Module xmloff (master) 1
|
#include <txtlists.hxx>
Public Member Functions | |
| XMLTextListsHelper () | |
| XMLTextListsHelper (const XMLTextListsHelper &)=delete | |
| XMLTextListsHelper & | operator= (const XMLTextListsHelper &)=delete |
| void | PushListContext (XMLTextListBlockContext *i_pListBlock) |
| list stack for importing: More... | |
| void | PushListContext (XMLNumberedParaContext *i_pNumberedParagraph) |
| void | PopListContext () |
| pop the list context stack More... | |
| void | ListContextTop (XMLTextListBlockContext *&o_pListBlockContext, XMLTextListItemContext *&o_pListItemContext, XMLNumberedParaContext *&o_pNumberedParagraphContext) |
| peek at the top of the list context stack More... | |
| void | SetListItem (XMLTextListItemContext *pListItem) |
| set list item on top of the list context stack More... | |
| void | KeepListAsProcessed (const OUString &sListId, const OUString &sListStyleName, const OUString &sContinueListId, const OUString &sListStyleDefaultListId=OUString()) |
| bool | IsListProcessed (const OUString &sListId) const |
| OUString | GetListStyleOfProcessedList (const OUString &sListId) const |
| OUString | GetContinueListIdOfProcessedList (const OUString &sListId) const |
| const OUString & | GetLastProcessedListId () const |
| const OUString & | GetListStyleOfLastProcessedList () const |
| OUString | GenerateNewListId () const |
| OUString | GetListIdForListBlock (XMLTextListBlockContext const &rListBlock) |
| void | StoreLastContinuingList (const OUString &sListId, const OUString &sContinuingListId) |
| OUString | GetLastContinuingListId (const OUString &sListId) const |
| void | PushListOnStack (const OUString &sListId, const OUString &sListStyleName) |
| void | PopListFromStack () |
| bool | EqualsToTopListStyleOnStack (std::u16string_view sListId) const |
| css::uno::Reference< css::container::XIndexReplace > | EnsureNumberedParagraph (SvXMLImport &i_rImport, const OUString &i_ListId, sal_Int16 &io_rLevel, const OUString &i_StyleName) |
| for importing numbered-paragraph note that the ID namespace for numbered-paragraph and regular list is distinct; we never combine a list and a n-p More... | |
| OUString | GetNumberedParagraphListId (const sal_uInt16 i_Level, std::u16string_view i_StyleName) |
| get ID of the last numbered-paragraph iff it has given style-name More... | |
| OUString | GetLastIdOfStyleName (const OUString &sListStyleName) const |
| Looks up the last list id of a given list style, by name. More... | |
Static Public Member Functions | |
| static css::uno::Reference< css::container::XIndexReplace > | MakeNumRule (SvXMLImport &i_rImport, const css::uno::Reference< css::container::XIndexReplace > &i_xNumRule, std::u16string_view i_ParentStyleName, const OUString &i_StyleName, sal_Int16 &io_rLevel, bool *o_pRestartNumbering=nullptr, bool *io_pSetDefaults=nullptr) |
| Creates a NumRule from given style-name. More... | |
Private Types | |
| typedef std::tuple< SvXMLImportContextRef, SvXMLImportContextRef, SvXMLImportContextRef > | ListStackFrame_t |
| list context: list, list-item, numbered-paragraph XMLTextListBlockContext, XMLTextListItemContext, XMLNumberedParaContext More... | |
| typedef ::std::map< OUString, ::std::pair< OUString, OUString > > | tMapForLists |
| typedef ::std::map< OUString, OUString > | tMapForContinuingLists |
| typedef ::std::vector< ::std::pair< OUString, OUString > > | tStackForLists |
| typedef ::std::vector< ::std::pair< OUString, OUString > > | LastNumberedParagraphs_t |
| to connect numbered-paragraphs that have no list-id attribute: vector of pair of style-name and list-id (indexed by level) More... | |
| typedef ::std::vector< ::std::pair< OUString, css::uno::Reference< css::container::XIndexReplace > > > | NumParaList_t |
| numbered-paragraphs More... | |
Private Attributes | |
| std::stack< ListStackFrame_t > | mListStack |
| std::unique_ptr< tMapForLists > | mpProcessedLists |
| OUString | msLastProcessedListId |
| OUString | msListStyleOfLastProcessedList |
| std::unique_ptr< tMapForLists > | mpMapListIdToListStyleDefaultListId |
| std::unique_ptr< tMapForContinuingLists > | mpContinuingLists |
| std::unique_ptr< std::map< OUString, OUString > > | mpStyleNameLastListIds |
| std::unique_ptr< tStackForLists > | mpListStack |
| LastNumberedParagraphs_t | mLastNumberedParagraphs |
| ::std::map< OUString, NumParaList_t > | mNPLists |
Definition at line 37 of file txtlists.hxx.
|
private |
to connect numbered-paragraphs that have no list-id attribute: vector of pair of style-name and list-id (indexed by level)
Definition at line 169 of file txtlists.hxx.
|
private |
list context: list, list-item, numbered-paragraph XMLTextListBlockContext, XMLTextListItemContext, XMLNumberedParaContext
Definition at line 134 of file txtlists.hxx.
|
private |
numbered-paragraphs
Definition at line 177 of file txtlists.hxx.
|
private |
Definition at line 155 of file txtlists.hxx.
|
private |
Definition at line 141 of file txtlists.hxx.
|
private |
Definition at line 163 of file txtlists.hxx.
| XMLTextListsHelper::XMLTextListsHelper | ( | ) |
Definition at line 44 of file txtlists.cxx.
|
delete |
| uno::Reference< container::XIndexReplace > XMLTextListsHelper::EnsureNumberedParagraph | ( | SvXMLImport & | i_rImport, |
| const OUString & | i_ListId, | ||
| sal_Int16 & | io_rLevel, | ||
| const OUString & | i_StyleName | ||
| ) |
for importing numbered-paragraph note that the ID namespace for numbered-paragraph and regular list is distinct; we never combine a list and a n-p
Definition at line 346 of file txtlists.cxx.
References ClampLevel(), first, i, o3tl::make_unsigned(), MakeNumRule(), mLastNumberedParagraphs, mNPLists, and none.
Referenced by XMLNumberedParaContext::XMLNumberedParaContext().
| bool XMLTextListsHelper::EqualsToTopListStyleOnStack | ( | std::u16string_view | sListId | ) | const |
Definition at line 307 of file txtlists.cxx.
References mpListStack.
| OUString XMLTextListsHelper::GenerateNewListId | ( | ) | const |
Definition at line 194 of file txtlists.cxx.
References Date::GetDateUnsigned(), tools::Time::GetTime(), mpProcessedLists, n, DateTime::SYSTEM, and comphelper::rng::uniform_int_distribution().
Referenced by GetNumberedParagraphListId(), and XMLTextListBlockContext::XMLTextListBlockContext().
| OUString XMLTextListsHelper::GetContinueListIdOfProcessedList | ( | const OUString & | sListId | ) | const |
Definition at line 178 of file txtlists.cxx.
References mpProcessedLists.
Referenced by XMLTextListBlockContext::XMLTextListBlockContext().
| OUString XMLTextListsHelper::GetLastContinuingListId | ( | const OUString & | sListId | ) | const |
Definition at line 271 of file txtlists.cxx.
References mpContinuingLists.
| OUString XMLTextListsHelper::GetLastIdOfStyleName | ( | const OUString & | sListStyleName | ) | const |
Looks up the last list id of a given list style, by name.
Definition at line 483 of file txtlists.cxx.
References mpStyleNameLastListIds.
Referenced by XMLTextListBlockContext::XMLTextListBlockContext().
|
inline |
Definition at line 71 of file txtlists.hxx.
References msLastProcessedListId.
Referenced by XMLTextListBlockContext::XMLTextListBlockContext().
| OUString XMLTextListsHelper::GetListIdForListBlock | ( | XMLTextListBlockContext const & | rListBlock | ) |
Definition at line 230 of file txtlists.cxx.
References XMLTextListBlockContext::GetContinueListId(), XMLTextListBlockContext::GetListId(), GetListStyleOfProcessedList(), and mpMapListIdToListStyleDefaultListId.
|
inline |
Definition at line 72 of file txtlists.hxx.
References msListStyleOfLastProcessedList.
Referenced by XMLTextListBlockContext::XMLTextListBlockContext().
| OUString XMLTextListsHelper::GetListStyleOfProcessedList | ( | const OUString & | sListId | ) | const |
Definition at line 163 of file txtlists.cxx.
References mpProcessedLists.
Referenced by GetListIdForListBlock().
| OUString XMLTextListsHelper::GetNumberedParagraphListId | ( | const sal_uInt16 | i_Level, |
| std::u16string_view | i_StyleName | ||
| ) |
get ID of the last numbered-paragraph iff it has given style-name
Definition at line 313 of file txtlists.cxx.
References GenerateNewListId(), mLastNumberedParagraphs, and SAL_INFO.
Referenced by XMLNumberedParaContext::XMLNumberedParaContext().
| bool XMLTextListsHelper::IsListProcessed | ( | const OUString & | sListId | ) | const |
Definition at line 153 of file txtlists.cxx.
References mpProcessedLists.
Referenced by KeepListAsProcessed(), and XMLTextListBlockContext::XMLTextListBlockContext().
| void XMLTextListsHelper::KeepListAsProcessed | ( | const OUString & | sListId, |
| const OUString & | sListStyleName, | ||
| const OUString & | sContinueListId, | ||
| const OUString & | sListStyleDefaultListId = OUString() |
||
| ) |
Definition at line 103 of file txtlists.cxx.
References IsListProcessed(), mpMapListIdToListStyleDefaultListId, mpProcessedLists, mpStyleNameLastListIds, msLastProcessedListId, and msListStyleOfLastProcessedList.
Referenced by XMLTextListBlockContext::XMLTextListBlockContext().
| void XMLTextListsHelper::ListContextTop | ( | XMLTextListBlockContext *& | o_pListBlockContext, |
| XMLTextListItemContext *& | o_pListItemContext, | ||
| XMLNumberedParaContext *& | o_pNumberedParagraphContext | ||
| ) |
peek at the top of the list context stack
Definition at line 72 of file txtlists.cxx.
References mListStack.
Referenced by XMLTextImportHelper::SetStyleAndAttrs(), and XMLTextListBlockContext::XMLTextListBlockContext().
|
static |
Creates a NumRule from given style-name.
extracted from the XMLTextListBlockContext constructor
| i_rImport | the SvXMLImport |
| i_xNumRule | parent num rule |
| i_ParentStyleName | parent list style name |
| i_StyleName | the list style name |
| io_rLevel | the list level (may be reset if too large) |
| o_rRestartNumbering | set to true if no style (defaulting) |
| io_rSetDefaults | set to true if no style (defaulting) |
Definition at line 407 of file txtlists.cxx.
References any, ClampLevel(), SvxXMLListStyleContext::CreateAndInsertAuto(), SvxXMLListStyleContext::CreateNumRule(), SvxXMLListStyleContext::GetNumRules(), SAL_INFO_IF, SvxXMLListStyleContext::SetDefaultStyle(), and TEXT_LIST.
Referenced by EnsureNumberedParagraph(), and XMLTextListBlockContext::XMLTextListBlockContext().
|
delete |
| void XMLTextListsHelper::PopListContext | ( | ) |
pop the list context stack
Definition at line 65 of file txtlists.cxx.
References mListStack.
Referenced by XMLTextListBlockContext::endFastElement(), XMLTextImportHelper::PopListContext(), and XMLTextListBlockContext::XMLTextListBlockContext().
| void XMLTextListsHelper::PopListFromStack | ( | ) |
Definition at line 298 of file txtlists.cxx.
References mpListStack.
| void XMLTextListsHelper::PushListContext | ( | XMLNumberedParaContext * | i_pNumberedParagraph | ) |
Definition at line 57 of file txtlists.cxx.
References mListStack.
| void XMLTextListsHelper::PushListContext | ( | XMLTextListBlockContext * | i_pListBlock | ) |
list stack for importing:
push a list context on the list context stack
Definition at line 49 of file txtlists.cxx.
References mListStack.
Referenced by XMLTextImportHelper::PushListContext(), and XMLTextListBlockContext::XMLTextListBlockContext().
| void XMLTextListsHelper::PushListOnStack | ( | const OUString & | sListId, |
| const OUString & | sListStyleName | ||
| ) |
Definition at line 287 of file txtlists.cxx.
References mpListStack.
| void XMLTextListsHelper::SetListItem | ( | XMLTextListItemContext * | pListItem | ) |
set list item on top of the list context stack
Definition at line 87 of file txtlists.cxx.
References mListStack.
Referenced by XMLTextListBlockContext::endFastElement(), XMLTextListItemContext::endFastElement(), and XMLTextImportHelper::SetStyleAndAttrs().
| void XMLTextListsHelper::StoreLastContinuingList | ( | const OUString & | sListId, |
| const OUString & | sContinuingListId | ||
| ) |
Definition at line 260 of file txtlists.cxx.
References mpContinuingLists.
|
private |
Definition at line 171 of file txtlists.hxx.
Referenced by EnsureNumberedParagraph(), and GetNumberedParagraphListId().
|
private |
Definition at line 135 of file txtlists.hxx.
Referenced by ListContextTop(), PopListContext(), PushListContext(), and SetListItem().
|
private |
Definition at line 178 of file txtlists.hxx.
Referenced by EnsureNumberedParagraph().
|
private |
Definition at line 156 of file txtlists.hxx.
Referenced by GetLastContinuingListId(), and StoreLastContinuingList().
|
private |
Definition at line 164 of file txtlists.hxx.
Referenced by EqualsToTopListStyleOnStack(), PopListFromStack(), and PushListOnStack().
|
private |
Definition at line 150 of file txtlists.hxx.
Referenced by GetListIdForListBlock(), and KeepListAsProcessed().
|
private |
Definition at line 142 of file txtlists.hxx.
Referenced by GenerateNewListId(), GetContinueListIdOfProcessedList(), GetListStyleOfProcessedList(), IsListProcessed(), and KeepListAsProcessed().
|
private |
Definition at line 158 of file txtlists.hxx.
Referenced by GetLastIdOfStyleName(), and KeepListAsProcessed().
|
private |
Definition at line 143 of file txtlists.hxx.
Referenced by GetLastProcessedListId(), and KeepListAsProcessed().
|
private |
Definition at line 144 of file txtlists.hxx.
Referenced by GetListStyleOfLastProcessedList(), and KeepListAsProcessed().