20 #ifndef INCLUDED_XMLOFF_INC_TXTLISTS_HXX
21 #define INCLUDED_XMLOFF_INC_TXTLISTS_HXX
23 #include <rtl/ustring.hxx>
27 #include <string_view>
30 #include <com/sun/star/container/XIndexReplace.hpp>
63 const OUString& sListStyleName,
64 const OUString& sContinueListId,
65 const OUString& sListStyleDefaultListId = OUString() );
69 const OUString& sListId )
const;
71 const OUString& sListId )
const;
82 const OUString& sContinuingListId );
88 const OUString& sListStyleName );
96 css::uno::Reference< css::container::XIndexReplace>
99 const OUString& i_ListId,
100 sal_Int16 & io_rLevel,
const OUString& i_StyleName);
104 const sal_uInt16 i_Level,
105 std::u16string_view i_StyleName);
116 static css::uno::Reference< css::container::XIndexReplace>
MakeNumRule(
118 const css::uno::Reference< css::container::XIndexReplace>& i_xNumRule,
119 std::u16string_view i_ParentStyleName,
120 const OUString& i_StyleName,
121 sal_Int16 & io_rLevel,
122 bool* o_pRestartNumbering =
nullptr,
123 bool* io_pSetDefaults =
nullptr);
138 typedef ::std::map< OUString,
158 typedef ::std::vector< ::std::pair< OUString, OUString > >
164 typedef ::std::vector< ::std::pair< OUString, OUString > >
170 typedef ::std::vector<
std::unique_ptr< tMapForLists > mpMapListIdToListStyleDefaultListId
std::stack< ListStackFrame_t > mListStack
LastNumberedParagraphs_t mLastNumberedParagraphs
::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-...
bool EqualsToTopListStyleOnStack(std::u16string_view sListId) const
void StoreLastContinuingList(const OUString &sListId, const OUString &sContinuingListId)
OUString GetListStyleOfProcessedList(const OUString &sListId) const
::std::vector< ::std::pair< OUString, OUString > > tStackForLists
std::unique_ptr< tStackForLists > mpListStack
XMLTextListsHelper & operator=(const XMLTextListsHelper &)=delete
OUString msListStyleOfLastProcessedList
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
OUString GenerateNewListId() const
OUString GetContinueListIdOfProcessedList(const OUString &sListId) const
void ListContextTop(XMLTextListBlockContext *&o_pListBlockContext, XMLTextListItemContext *&o_pListItemContext, XMLNumberedParaContext *&o_pNumberedParagraphContext)
peek at the top of the list context stack
const OUString & GetLastProcessedListId() const
void KeepListAsProcessed(const OUString &sListId, const OUString &sListStyleName, const OUString &sContinueListId, const OUString &sListStyleDefaultListId=OUString())
void PushListOnStack(const OUString &sListId, const OUString &sListStyleName)
OUString GetLastContinuingListId(const OUString &sListId) const
::std::map< OUString, OUString > tMapForContinuingLists
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 i...
std::unique_ptr< tMapForContinuingLists > mpContinuingLists
void PushListContext(XMLTextListBlockContext *i_pListBlock)
list stack for importing:
::std::map< OUString, NumParaList_t > mNPLists
OUString msLastProcessedListId
::std::map< OUString,::std::pair< OUString, OUString > > tMapForLists
rtl::Reference< SvXMLImportContext > SvXMLImportContextRef
void SetListItem(XMLTextListItemContext *pListItem)
set list item on top of the list context stack
void PopListContext()
pop the list context stack
::std::vector< ::std::pair< OUString, css::uno::Reference< css::container::XIndexReplace > > > NumParaList_t
numbered-paragraphs
std::unique_ptr< tMapForLists > mpProcessedLists
std::tuple< SvXMLImportContextRef, SvXMLImportContextRef, SvXMLImportContextRef > ListStackFrame_t
list context: list, list-item, numbered-paragraph XMLTextListBlockContext, XMLTextListItemContext, XMLNumberedParaContext
OUString GetListIdForListBlock(XMLTextListBlockContext const &rListBlock)
bool IsListProcessed(const OUString &sListId) const
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.
const OUString & GetListStyleOfLastProcessedList() const