Commit 48abadf3 authored by Jan Hambrecht's avatar Jan Hambrecht

load and save shape name


svn path=/trunk/koffice/; revision=697474
parent 96b504d6
...@@ -678,6 +678,9 @@ bool KoShape::loadOdfAttributes( const KoXmlElement & element, KoShapeLoadingCon ...@@ -678,6 +678,9 @@ bool KoShape::loadOdfAttributes( const KoXmlElement & element, KoShapeLoadingCon
// is the the order of the z-index // is the the order of the z-index
} }
if( element.hasAttributeNS( KoXmlNS::draw, "name" ) )
setName( element.attributeNS( KoXmlNS::draw, "name" ) );
setBackground( loadOdfFill( element, context ) ); setBackground( loadOdfFill( element, context ) );
setBorder( loadOdfStroke( element, context ) ); setBorder( loadOdfStroke( element, context ) );
} }
...@@ -850,6 +853,9 @@ void KoShape::saveOdfAttributes(KoShapeSavingContext &context, int attributes) c ...@@ -850,6 +853,9 @@ void KoShape::saveOdfAttributes(KoShapeSavingContext &context, int attributes) c
context.xmlWriter().addAttribute( "draw:id", context.drawId( this ) ); context.xmlWriter().addAttribute( "draw:id", context.drawId( this ) );
} }
if( ! name().isEmpty() )
context.xmlWriter().addAttribute( "draw:name", name() );
if(d->parent && dynamic_cast<KoShapeLayer*> (d->parent)) if(d->parent && dynamic_cast<KoShapeLayer*> (d->parent))
context.xmlWriter().addAttribute("draw:layer", d->parent->name()); context.xmlWriter().addAttribute("draw:layer", d->parent->name());
} }
......
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