Kaydet (Commit) 617623fb authored tarafından Jan Holesovsky's avatar Jan Holesovsky

Revert "ugly hack for NS_ooxml::LN_CT_Style_type being the first attribute...

I believe this is not necessary after the recent removal of unordered_map from
handling the attributes.

This reverts commit 76336334.

Change-Id: I631bc2613954953a30448dbe2a5bf564c529e2a0
üst 00db42fe
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include <resourcemodel/QNameToString.hxx> #include <resourcemodel/QNameToString.hxx>
#include <com/sun/star/drawing/XShape.hpp> #include <com/sun/star/drawing/XShape.hpp>
#include <oox/token/tokens.hxx> #include <oox/token/tokens.hxx>
#include <ooxml/resourceids.hxx>
namespace writerfilter { namespace writerfilter {
namespace ooxml namespace ooxml
...@@ -471,20 +470,7 @@ void OOXMLPropertySetImpl::add(OOXMLProperty::Pointer_t pProperty) ...@@ -471,20 +470,7 @@ void OOXMLPropertySetImpl::add(OOXMLProperty::Pointer_t pProperty)
{ {
if (pProperty.get() != NULL && pProperty->getId() != 0x0) 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);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment