diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2012-04-11 16:05:00 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2012-04-12 17:11:36 +0200 |
commit | c4fbb0360889ded44ccbade8bb893eac5f1fbd2f (patch) | |
tree | aba8a45129abc1c099fa0dbb20008a1c1c693f78 | |
parent | 835cea6bea0b4a1783d8e50f9b0ca1abe5cd3701 (diff) |
implement wp:docPr title and fix descr
-rw-r--r-- | writerfilter/source/dmapper/GraphicImport.cxx | 9 | ||||
-rw-r--r-- | writerfilter/source/ooxml/model.xml | 9 |
2 files changed, 17 insertions, 1 deletions
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx index 959f521d7530..1d7d632cfb59 100644 --- a/writerfilter/source/dmapper/GraphicImport.cxx +++ b/writerfilter/source/dmapper/GraphicImport.cxx @@ -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)); diff --git a/writerfilter/source/ooxml/model.xml b/writerfilter/source/ooxml/model.xml index 98f35a15dfb4..f95112e03884 100644 --- a/writerfilter/source/ooxml/model.xml +++ b/writerfilter/source/ooxml/model.xml @@ -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"/> |