Example #1
0
bool KPrPlaceholderShape::loadOdf( const KoXmlElement & element, KoShapeLoadingContext &context )
{
    loadOdfAttributes( element, context, OdfAllAttributes );

    delete m_strategy;

    m_strategy = KPrPlaceholderStrategy::create( additionalAttribute( "presentation:class" ) );
    if ( m_strategy == 0 ) {
        return false;
    }
    m_strategy->loadOdf( element, context );

    return true;
}
bool KPrPlaceholderShape::loadOdf( const KoXmlElement & element, KoShapeLoadingContext &context )
{
    loadOdfAttributes(element, context, OdfAdditionalAttributes);

#ifndef NWORKAROUND_ODF_BUGS
    KoOdfWorkaround::fixPresentationPlaceholder(this);
#endif
    delete m_strategy;

    m_strategy = KPrPlaceholderStrategy::create( additionalAttribute( "presentation:class" ) );
    if ( m_strategy == 0 ) {
        return false;
    }

    // first check if we can create a placeholder before we load the attributes
    loadOdfAttributes(element, context, OdfMandatories | OdfTransformation | OdfGeometry | OdfCommonChildElements);
    m_strategy->loadOdf( element, context );

    return true;
}