implement wp:docPr title and fix descr

This commit is contained in:
Luboš Luňák
2012-04-11 16:05:00 +02:00
parent 835cea6bea
commit c4fbb03608
2 changed files with 17 additions and 1 deletions

View File

@@ -256,6 +256,7 @@ public:
::rtl::OUString sName;
::rtl::OUString sAlternativeText;
::rtl::OUString title;
GraphicImport_Impl(GraphicImportType eImportType, DomainMapper& rDMapper) :
nXSize(0)
@@ -791,6 +792,10 @@ void GraphicImport::lcl_attribute(Id nName, Value & val)
//alternative text
m_pImpl->sAlternativeText = val.getString();
break;
case NS_ooxml::LN_CT_NonVisualDrawingProps_title:
//alternative text
m_pImpl->title = val.getString();
break;
case NS_ooxml::LN_CT_GraphicalObjectFrameLocking_noChangeAspect://90644;
//disallow aspect ratio change - ignored
break;
@@ -1318,8 +1323,10 @@ uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const b
}
// setting properties for all types
xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_TITLE ),
xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_DESCRIPTION ),
uno::makeAny( m_pImpl->sAlternativeText ));
xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_TITLE ),
uno::makeAny( m_pImpl->title ));
if( m_pImpl->bPositionProtected )
xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_POSITION_PROTECTED ),
uno::makeAny(true));

View File

@@ -5009,6 +5009,14 @@
<xs:documentation>Hidden</xs:documentation>
</attribute>
</optional>
<optional>
<attribute name="title">
<data type="string">
<xs:documentation>Title</xs:documentation>
</data>
<xs:documentation>Title</xs:documentation>
</attribute>
</optional>
</define>
<define name="CT_NonVisualDrawingShapeProps">
<group>
@@ -5118,6 +5126,7 @@
<attribute name="name" tokenid="ooxml:CT_NonVisualDrawingProps_name"/>
<attribute name="descr" tokenid="ooxml:CT_NonVisualDrawingProps_descr"/>
<attribute name="hidden" tokenid="ooxml:CT_NonVisualDrawingProps_hidden"/>
<attribute name="title" tokenid="ooxml:CT_NonVisualDrawingProps_title"/>
</resource>
<resource name="CT_NonVisualPictureProperties" resource="Properties" tag="shape">
<element name="picLocks" tokenid="ooxml:CT_NonVisualPictureProperties_picLocks"/>