summaryrefslogtreecommitdiff
path: root/xmloff/inc/txtlists.hxx
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2008-06-13 08:17:08 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2008-06-13 08:17:08 +0000
commit9d88f22f465fa8b66bc6cef12f58a763bfad9819 (patch)
treec4576ff41695e5e8c09ef87254d6840e10505ca7 /xmloff/inc/txtlists.hxx
parent490ad47f59d2fc01a24d7b4d5c83827b758a16c6 (diff)
INTEGRATION: CWS swlists01 (1.1.2); FILE ADDED
2008/05/28 09:14:13 od 1.1.2.4: #i86732# performance improvement by late creation of internal data structures 2008/05/21 12:21:41 od 1.1.2.3: #i86732# further changes/adjustments for new list handling 2008/05/09 12:36:58 od 1.1.2.2: #i86732# new license header 2008/05/08 14:21:01 od 1.1.2.1: #i86732# new helper class <XMLTextListsHelper> for new list handling
Diffstat (limited to 'xmloff/inc/txtlists.hxx')
-rw-r--r--xmloff/inc/txtlists.hxx97
1 files changed, 97 insertions, 0 deletions
diff --git a/xmloff/inc/txtlists.hxx b/xmloff/inc/txtlists.hxx
new file mode 100644
index 000000000000..bf9bf8030379
--- /dev/null
+++ b/xmloff/inc/txtlists.hxx
@@ -0,0 +1,97 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: txtlists.hxx,v $
+ * $Revision: 1.2 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _XMLOFF_TXTLISTS_HXX
+#define _XMLOFF_TXTLISTS_HXX
+
+#include <rtl/ustring.hxx>
+#include <comphelper/stl_types.hxx>
+#include <map>
+#include <vector>
+
+class XMLTextListsHelper
+{
+ public:
+ XMLTextListsHelper();
+ ~XMLTextListsHelper();
+
+ // keeping track of processed lists for import and export
+ void KeepListAsProcessed( ::rtl::OUString sListId,
+ ::rtl::OUString sListStyleName,
+ ::rtl::OUString sContinueListId );
+
+ sal_Bool IsListProcessed( const ::rtl::OUString sListId ) const;
+ ::rtl::OUString GetListStyleOfProcessedList(
+ const ::rtl::OUString sListId ) const;
+ ::rtl::OUString GetContinueListIdOfProcessedList(
+ const ::rtl::OUString sListId ) const;
+ const ::rtl::OUString& GetLastProcessedListId() const;
+ const ::rtl::OUString& GetListStyleOfLastProcessedList() const;
+
+ ::rtl::OUString GenerateNewListId() const;
+
+
+ // keep track of continue list chain for export
+ void StoreLastContinuingList( ::rtl::OUString sListId,
+ ::rtl::OUString sContinuingListId );
+
+ ::rtl::OUString GetLastContinuingListId( ::rtl::OUString sListId ) const;
+
+ // keep track of opened list elements of a certain list for export
+ void PushListOnStack( ::rtl::OUString sListId,
+ ::rtl::OUString sListStyleName );
+ void PopListFromStack();
+ sal_Bool EqualsToTopListStyleOnStack( const ::rtl::OUString sListId ) const;
+
+ private:
+ // container type for processed lists:
+ // map with <ListId> as key and pair( <ListStyleName, ContinueListId> )
+ // as value
+ typedef ::std::map< ::rtl::OUString,
+ ::std::pair< ::rtl::OUString, ::rtl::OUString >,
+ ::comphelper::UStringLess > tMapForLists;
+ tMapForLists* mpProcessedLists;
+ ::rtl::OUString msLastProcessedListId;
+ ::rtl::OUString msListStyleOfLastProcessedList;
+
+ // container type to build up continue list chain:
+ // map with <ListId> of master list as key and <ListId> of last list
+ // continuing the master list as value
+ typedef ::std::map< ::rtl::OUString, ::rtl::OUString,
+ ::comphelper::UStringLess > tMapForContinuingLists;
+ tMapForContinuingLists* mpContinuingLists;
+
+ // stack type for opened list elements and its list style:
+ // vector with pair( <ListId>, <ListStyleName> ) as value
+ typedef ::std::vector< ::std::pair< ::rtl::OUString, ::rtl::OUString > >
+ tStackForLists;
+ tStackForLists* mpListStack;
+};
+#endif