Index: filter/source/msfilter/msdffimp.cxx =================================================================== --- filter/source/msfilter/msdffimp.cxx (revision 1343161) +++ filter/source/msfilter/msdffimp.cxx (working copy) @@ -4810,6 +4810,14 @@ mpTracer->RemoveAttribute( aObjData.nSpFlags & SP_FGROUP ? rtl::OUString::createFromAscii( "GroupShape" ) : rtl::OUString::createFromAscii( "Shape" ) ); + //Import alt text as description + if ( pRet && SeekToContent( DFF_Prop_wzDescription, rSt ) ) + { + String aAltText; + MSDFFReadZString( rSt, aAltText, GetPropertyValue( DFF_Prop_wzDescription ), sal_True ); + pRet->SetDescription( aAltText ); + } + return pRet; } Index: sc/source/filter/excel/xeescher.cxx =================================================================== --- sc/source/filter/excel/xeescher.cxx (revision 1343161) +++ sc/source/filter/excel/xeescher.cxx (working copy) @@ -554,6 +554,13 @@ if( aCtrlProp.GetProperty( aCtrlName, CREATE_OUSTRING( "Name" ) ) && (aCtrlName.getLength() > 0) ) aPropOpt.AddOpt( ESCHER_Prop_wzName, aCtrlName ); + //Export description as alt text + if( SdrObject* pSdrObj = SdrObject::getSdrObjectFromXShape( xShape ) ) + { + String aAltTxt( pSdrObj->GetDescription(), 0, MSPROP_DESCRIPTION_MAX_LEN ); + aPropOpt.AddOpt( ESCHER_Prop_wzDescription, aAltTxt ); + } + // write DFF property set to stream aPropOpt.Commit( mrEscherEx.GetStream() ); Index: sc/source/filter/excel/xiescher.cxx =================================================================== --- sc/source/filter/excel/xiescher.cxx (revision 1343161) +++ sc/source/filter/excel/xiescher.cxx (working copy) @@ -109,6 +109,7 @@ using ::rtl::OUString; using ::rtl::OUStringBuffer; +using ::com::sun::star::uno::makeAny; using ::com::sun::star::uno::Any; using ::com::sun::star::uno::Exception; using ::com::sun::star::uno::Reference; @@ -1965,6 +1966,20 @@ aLabel.Insert( '~', nPos ); } rPropSet.SetStringProperty( CREATE_OUSTRING( "Label" ), aLabel ); + + //Excel Alt text <==> Aoo description + //For TBX control, if user does not operate alt text, alt text will be set label text as default value in Excel. + //In this case, DFF_Prop_wzDescription will not be set in excel file. + //So In the end of SvxMSDffManager::ImportShape, description will not be set. But actually in excel, + //the alt text is the label value. So here set description as label text first which is called before ImportShape. + Reference< ::com::sun::star::beans::XPropertySet > xPropset( mxShape, UNO_QUERY ); + try{ + if(xPropset.is()) + xPropset->setPropertyValue( CREATE_OUSTRING( "Description" ), makeAny(::rtl::OUString(aLabel)) ); + }catch( ... ) + { + OSL_TRACE( " Can't set a default text for TBX Control "); + } } ConvertFont( rPropSet ); } Index: sc/source/filter/inc/xiescher.hxx =================================================================== --- sc/source/filter/inc/xiescher.hxx (revision 1343161) +++ sc/source/filter/inc/xiescher.hxx (working copy) @@ -497,6 +497,8 @@ /** Derived classes will set additional properties for the current form control. */ virtual void DoProcessControl( ScfPropertySet& rPropSet ) const; + mutable ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > + mxShape; /// The UNO wrapper of the control shape. private: /** Reads a list of cell ranges from a formula at the current stream position. */ @@ -506,8 +508,6 @@ private: const XclImpRoot& mrRoot; /// Not derived from XclImpRoot to allow multiple inheritance. - mutable ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > - mxShape; /// The UNO wrapper of the control shape. ScfRef< ScAddress > mxCellLink; /// Linked cell in the Calc document. ScfRef< ScRange > mxSrcRange; /// Source data range in the Calc document. XclCtrlBindMode meBindMode; /// Value binding mode. Index: svx/inc/svx/msdffdef.hxx =================================================================== --- svx/inc/svx/msdffdef.hxx (revision 1343161) +++ svx/inc/svx/msdffdef.hxx (working copy) @@ -1220,4 +1220,7 @@ void *m_pvBits; // raster bits of the blip. #endif +//ALT_TXT_MSINTEROP +#define MSPROP_DESCRIPTION_MAX_LEN 4096 + #endif