summaryrefslogtreecommitdiff
path: root/xmloff/inc
diff options
context:
space:
mode:
authorMichael Stahl <mst@openoffice.org>2010-03-15 12:53:13 +0100
committerMichael Stahl <mst@openoffice.org>2010-03-15 12:53:13 +0100
commit251c4df1190aa19f1372ad9cc43435df6f95d7c4 (patch)
treeb39daec04c8d1c0a68089e5811905646720f2c5d /xmloff/inc
parentd02ed4c2c1a421f6d51a4e2bb6df9164557094e7 (diff)
odfmetadata4: #i110070#: fix import of RDFa on text:bookmark-start:
XMLTextImportHelper: store parsed RDFa attributes in bookmark map. XMLTextMarkImportContext::EndElement(): handle RDFa attributes properly. TextPortionEnumerationTest: add test for bookmark xml:id and RDFa.
Diffstat (limited to 'xmloff/inc')
-rw-r--r--xmloff/inc/xmloff/txtimp.hxx27
1 files changed, 19 insertions, 8 deletions
diff --git a/xmloff/inc/xmloff/txtimp.hxx b/xmloff/inc/xmloff/txtimp.hxx
index 2cdbaffbbde3..da181b463b3f 100644
--- a/xmloff/inc/xmloff/txtimp.hxx
+++ b/xmloff/inc/xmloff/txtimp.hxx
@@ -36,6 +36,8 @@
#include <vector>
#include <memory>
#include <boost/utility.hpp>
+#include <boost/tuple/tuple.hpp>
+#include <boost/shared_ptr.hpp>
#include <tools/list.hxx>
#include <xmloff/xmlictxt.hxx>
@@ -66,6 +68,10 @@ class XMLFontStylesContext;
template<class A> class XMLPropertyBackpatcher;
class XMLEventsImportContext;
+namespace xmloff {
+ struct ParsedRDFaAttributes;
+}
+
namespace com { namespace sun { namespace star {
namespace text { class XText; class XTextCursor; class XTextRange; class XTextContent; }
namespace frame { class XModel; }
@@ -417,13 +423,14 @@ class XMLOFF_DLLPUBLIC XMLTextImportHelper : public UniRefBase,
::std::vector< ::rtl::OUString >* mpOutlineStylesCandidates;
// <--
+
+ // start range, xml:id, RDFa stuff
+ typedef ::boost::tuple<
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange>,
+ ::rtl::OUString, ::boost::shared_ptr< ::xmloff::ParsedRDFaAttributes > >
+ BookmarkMapEntry_t;
/// start ranges for open bookmarks
- ::std::map< ::rtl::OUString,
- // start range, xml:id
- ::std::pair<
- ::com::sun::star::uno::Reference<
- ::com::sun::star::text::XTextRange>,
- ::rtl::OUString>,
+ ::std::map< ::rtl::OUString, BookmarkMapEntry_t,
::comphelper::UStringLess> aBookmarkStartRanges;
typedef ::std::vector< ::rtl::OUString> BookmarkVector_t;
@@ -757,14 +764,18 @@ public:
const ::rtl::OUString sName,
const ::com::sun::star::uno::Reference<
::com::sun::star::text::XTextRange> & rRange,
- const ::rtl::OUString & i_rXmlId);
+ ::rtl::OUString const& i_rXmlId,
+ ::boost::shared_ptr< ::xmloff::ParsedRDFaAttributes > &
+ i_rpRDFaAttributes);
/// process the start of a range reference
sal_Bool FindAndRemoveBookmarkStartRange(
const ::rtl::OUString sName,
::com::sun::star::uno::Reference<
::com::sun::star::text::XTextRange> & o_rRange,
- ::rtl::OUString& o_rXmlId);
+ ::rtl::OUString & o_rXmlId,
+ ::boost::shared_ptr< ::xmloff::ParsedRDFaAttributes > &
+ o_rpRDFaAttributes);
::rtl::OUString FindActiveBookmarkName();
::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > GetRangeFor(::rtl::OUString &sName);