diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2013-04-26 18:29:17 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2013-04-26 18:42:57 +0200 |
commit | 76336334e669519cfa42413b851584fa321c004d (patch) | |
tree | 27d16e373d183c68f832574a139338640a613a45 /writerfilter | |
parent | make liborcus build on platforms that need PTHREAD_LIBS (diff) | |
download | core-76336334e669519cfa42413b851584fa321c004d.tar.gz core-76336334e669519cfa42413b851584fa321c004d.zip |
ugly hack for NS_ooxml::LN_CT_Style_type being the first attribute processed
Change-Id: I32e91c1a42619676467ac121865673733e8053f2
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx b/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx index a97759e0771d..b8f5aa3a9787 100644 --- a/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx +++ b/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx @@ -25,6 +25,7 @@ #include <com/sun/star/drawing/XShape.hpp> #include <ooxml/OOXMLFastTokens.hxx> #include "ooxmlLoggers.hxx" +#include <ooxml/resourceids.hxx> namespace writerfilter { namespace ooxml @@ -467,7 +468,20 @@ void OOXMLPropertySetImpl::add(OOXMLProperty::Pointer_t pProperty) if (pProperty.get() != NULL && pProperty->getId() != 0x0) { - mProperties.push_back(pProperty); + /* + HACK: Ugly hack. This retarded overdesigned writerfilter thing + processes attributes in random order (as given by boost::unordered_map + when iterating it), but StyleSheetTable::lcl_attribute() needs + to know whether NS_ooxml::LN_CT_Style_type is STYLE_TYPE_TABLE first. + And all this overdesigned machinery doesn't even give a reasonable + way to find out if an attribute is there before encountering it + in random order in lcl_attribute(), so just make sure here that + the attribute comes first. + */ + if( pProperty->getId() == NS_ooxml::LN_CT_Style_type ) + mProperties.insert( mProperties.begin(), pProperty ); + else + mProperties.push_back(pProperty); } #ifdef DEBUG_PROPERTY_SET else |