本文整理汇总了C++中KoXmlElement::parentNode方法的典型用法代码示例。如果您正苦于以下问题:C++ KoXmlElement::parentNode方法的具体用法?C++ KoXmlElement::parentNode怎么用?C++ KoXmlElement::parentNode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KoXmlElement
的用法示例。
在下文中一共展示了KoXmlElement::parentNode方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: isUserStyle
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*/;
}
示例2: supports
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;
}
示例3: supports
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;
}