writerfilter07: new: OOXMLFastContextHandler::sendPropertiesToParent

This commit is contained in:
Henning Brinkmann[hbrinkm] 2010-01-11 13:00:43 +01:00
parent 88b08c3d42
commit 128a52d510
2 changed files with 51 additions and 26 deletions

View file

@ -1236,7 +1236,7 @@ void OOXMLFastContextHandler::sendPropertyToParent()
pProps->add(pProp);
#ifdef DEBUG_ELEMENT
debug_logger->chars(pProp->toString());
debug_logger->addTag(toPropertiesTag(pProps));
#endif
}
}
@ -1246,6 +1246,54 @@ void OOXMLFastContextHandler::sendPropertyToParent()
#endif
}
void OOXMLFastContextHandler::sendPropertiesToParent()
{
#ifdef DEBUG_ELEMENT
debug_logger->startElement("sendPropertiesToParent");
#endif
if (mpParent != NULL)
{
OOXMLPropertySet::Pointer_t pParentProps(mpParent->getPropertySet());
if (pParentProps.get() != NULL)
{
OOXMLPropertySet::Pointer_t pProps(getPropertySet());
#ifdef DEBUG_ELEMENT
debug_logger->startElement("me");
debug_logger->addTag(toPropertiesTag(pProps));
debug_logger->endElement("me");
#endif
if (pProps.get() != NULL)
{
OOXMLValue::Pointer_t pValue
(new OOXMLPropertySetValue(getPropertySet()));
OOXMLProperty::Pointer_t pProp
(new OOXMLPropertyImpl(getId(), pValue, OOXMLPropertyImpl::SPRM));
#ifdef DEBUG_ELEMENT
debug_logger->startElement("propertyForSet");
debug_logger->chars(pProp->toString());
debug_logger->endElement("propertyForSet");
#endif
pParentProps->add(pProp);
#ifdef DEBUG_ELEMENT
debug_logger->startElement("parent");
debug_logger->addTag(toPropertiesTag(pParentProps));
debug_logger->endElement("parent");
#endif
}
}
}
#ifdef DEBUG_ELEMENT
debug_logger->endElement("sendPropertiesToParent");
#endif
}
uno::Reference< uno::XComponentContext >
OOXMLFastContextHandler::getComponentContext()
{
@ -1387,31 +1435,7 @@ void OOXMLFastContextHandlerProperties::lcl_endFastElement
}
else
{
OOXMLValue::Pointer_t pVal
(new OOXMLPropertySetValue(mpPropertySet));
OOXMLPropertyImpl::Pointer_t pProperty
(new OOXMLPropertyImpl(mId, pVal, OOXMLPropertyImpl::SPRM));
OOXMLPropertySet::Pointer_t pProperties = (*mpParent).getPropertySet();
if (pProperties.get() != NULL)
{
#ifdef DEBUG_PROPERTIES
debug_logger->startElement("property");
debug_logger->chars(xmlify(pProperty->toString()));
debug_logger->endElement("property");
#endif
pProperties->add(pProperty);
}
#ifdef DEBUG_PROPERTIES
else if (! propagatesProperties())
{
debug_logger->startElement("warning");
debug_logger->chars("properties lost");
debug_logger->endElement("warning");
}
#endif
sendPropertiesToParent();
}
}

View file

@ -226,6 +226,7 @@ public:
virtual void propagateCellProperties();
virtual bool propagatesProperties() const;
void sendPropertiesWithId(const Id & rId);
void sendPropertiesToParent();
void sendCellProperties();
void sendRowProperties();
void sendTableProperties();