diff options
author | Michael Stahl <mst@openoffice.org> | 2010-03-15 12:53:13 +0100 |
---|---|---|
committer | Michael Stahl <mst@openoffice.org> | 2010-03-15 12:53:13 +0100 |
commit | 54ae625f15347772536eafe28301c18d73a081b9 (patch) | |
tree | 173f76e2dad656bb43333594993352d997bd8521 /xmloff/inc/xmloff | |
parent | 7686463f4c20dc8ce6f0865374142ef4e6a085ce (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/xmloff')
-rw-r--r-- | xmloff/inc/xmloff/txtimp.hxx | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/xmloff/inc/xmloff/txtimp.hxx b/xmloff/inc/xmloff/txtimp.hxx index cdfd1d9b34..d9572d33c6 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); |