bool KoStyleStack::isUserStyle(const KoXmlElement& e, const QString& family) const { if (e.attributeNS(m_styleNSURI, "family", QString()) != family) return false; const KoXmlElement parent = e.parentNode().toElement(); //kDebug(30003) <<"tagName=" << e.tagName() <<" parent-tagName=" << parent.tagName(); return parent.localName() == "styles" /*&& parent.namespaceURI() == KoXmlNS::office*/; }
bool KPrPlaceholderShapeFactory::supports(const KoXmlElement & e) const { // check parent if placeholder is set to true KoXmlNode parent = e.parentNode(); if ( !parent.isNull() ) { KoXmlElement element = parent.toElement(); if ( !element.isNull() ) { kDebug(33001) << "placeholder:" << ( element.attributeNS( KoXmlNS::presentation, "placeholder", "false" ) == "true" ); return ( element.attributeNS( KoXmlNS::presentation, "placeholder", "false" ) == "true" ); } } return false; }
bool KPrPlaceholderShapeFactory::supports(const KoXmlElement & e, KoShapeLoadingContext &context) const { Q_UNUSED(context); // check parent if placeholder is set to true KoXmlNode parent = e.parentNode(); if ( !parent.isNull() ) { KoXmlElement element = parent.toElement(); if ( !element.isNull() ) { bool supported = element.attributeNS( KoXmlNS::presentation, "placeholder", "false" ) == "true"; kDebug(33001) << "placeholder:" << supported; #ifndef NWORKAROUND_ODF_BUGS if (!supported && KoOdfWorkaround::fixPresentationPlaceholder() && element.hasAttributeNS(KoXmlNS::presentation, "class")) { supported = true; kDebug(33001) << "workaround OO placeholder bug" << supported; } #endif return supported; } } return false; }