View | Details | Raw Unified | Return to issue 119903
Collapse All | Expand All

(-)filter/source/msfilter/msdffimp.cxx (+8 lines)
Lines 4810-4815 Link Here
4810
		mpTracer->RemoveAttribute( aObjData.nSpFlags & SP_FGROUP
4810
		mpTracer->RemoveAttribute( aObjData.nSpFlags & SP_FGROUP
4811
									? rtl::OUString::createFromAscii( "GroupShape" )
4811
									? rtl::OUString::createFromAscii( "GroupShape" )
4812
									: rtl::OUString::createFromAscii( "Shape" ) );
4812
									: rtl::OUString::createFromAscii( "Shape" ) );
4813
    //Import alt text as description
4814
	if ( pRet && SeekToContent( DFF_Prop_wzDescription, rSt ) )
4815
	{
4816
		String aAltText;
4817
		MSDFFReadZString( rSt, aAltText, GetPropertyValue( DFF_Prop_wzDescription ), sal_True );
4818
		pRet->SetDescription( aAltText );
4819
	}
4820
    
4813
	return pRet;
4821
	return pRet;
4814
}
4822
}
4815
4823
(-)sc/source/filter/excel/xeescher.cxx (+7 lines)
Lines 554-559 Link Here
554
    if( aCtrlProp.GetProperty( aCtrlName, CREATE_OUSTRING( "Name" ) ) && (aCtrlName.getLength() > 0) )
554
    if( aCtrlProp.GetProperty( aCtrlName, CREATE_OUSTRING( "Name" ) ) && (aCtrlName.getLength() > 0) )
555
        aPropOpt.AddOpt( ESCHER_Prop_wzName, aCtrlName );
555
        aPropOpt.AddOpt( ESCHER_Prop_wzName, aCtrlName );
556
556
557
    //Export description as alt text
558
	if( SdrObject* pSdrObj = SdrObject::getSdrObjectFromXShape( xShape ) )
559
	{
560
		String  aAltTxt( pSdrObj->GetDescription(), 0, MSPROP_DESCRIPTION_MAX_LEN );
561
		aPropOpt.AddOpt( ESCHER_Prop_wzDescription, aAltTxt );
562
	}
563
557
    // write DFF property set to stream
564
    // write DFF property set to stream
558
    aPropOpt.Commit( mrEscherEx.GetStream() );
565
    aPropOpt.Commit( mrEscherEx.GetStream() );
559
566
(-)sc/source/filter/excel/xiescher.cxx (+15 lines)
Lines 109-114 Link Here
109
109
110
using ::rtl::OUString;
110
using ::rtl::OUString;
111
using ::rtl::OUStringBuffer;
111
using ::rtl::OUStringBuffer;
112
using ::com::sun::star::uno::makeAny;
112
using ::com::sun::star::uno::Any;
113
using ::com::sun::star::uno::Any;
113
using ::com::sun::star::uno::Exception;
114
using ::com::sun::star::uno::Exception;
114
using ::com::sun::star::uno::Reference;
115
using ::com::sun::star::uno::Reference;
Lines 1965-1970 Link Here
1965
                aLabel.Insert( '~', nPos );
1966
                aLabel.Insert( '~', nPos );
1966
        }
1967
        }
1967
        rPropSet.SetStringProperty( CREATE_OUSTRING( "Label" ), aLabel );
1968
        rPropSet.SetStringProperty( CREATE_OUSTRING( "Label" ), aLabel );
1969
1970
        //Excel Alt text <==> Aoo description
1971
		//For TBX control, if user does not operate alt text, alt text will be set label text as default value in Excel.
1972
		//In this case, DFF_Prop_wzDescription will not be set in excel file. 
1973
		//So In the end of SvxMSDffManager::ImportShape, description will not be set. But actually in excel,
1974
		//the alt text is the label value. So here set description as label text first which is called before ImportShape.
1975
		Reference< ::com::sun::star::beans::XPropertySet > xPropset( mxShape, UNO_QUERY );
1976
		try{
1977
		if(xPropset.is())
1978
			xPropset->setPropertyValue( CREATE_OUSTRING( "Description" ), makeAny(::rtl::OUString(aLabel)) );
1979
		}catch( ... )
1980
		{
1981
			OSL_TRACE( " Can't set a default text for TBX Control ");
1982
		}
1968
    }
1983
    }
1969
    ConvertFont( rPropSet );
1984
    ConvertFont( rPropSet );
1970
}
1985
}
(-)sc/source/filter/inc/xiescher.hxx (-2 / +2 lines)
Lines 497-502 Link Here
497
497
498
    /** Derived classes will set additional properties for the current form control. */
498
    /** Derived classes will set additional properties for the current form control. */
499
    virtual void        DoProcessControl( ScfPropertySet& rPropSet ) const;
499
    virtual void        DoProcessControl( ScfPropertySet& rPropSet ) const;
500
    mutable ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >
501
                        mxShape;        /// The UNO wrapper of the control shape.
500
502
501
private:
503
private:
502
    /** Reads a list of cell ranges from a formula at the current stream position. */
504
    /** Reads a list of cell ranges from a formula at the current stream position. */
Lines 506-513 Link Here
506
508
507
private:
509
private:
508
    const XclImpRoot&   mrRoot;         /// Not derived from XclImpRoot to allow multiple inheritance.
510
    const XclImpRoot&   mrRoot;         /// Not derived from XclImpRoot to allow multiple inheritance.
509
    mutable ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >
510
                        mxShape;        /// The UNO wrapper of the control shape.
511
    ScfRef< ScAddress > mxCellLink;     /// Linked cell in the Calc document.
511
    ScfRef< ScAddress > mxCellLink;     /// Linked cell in the Calc document.
512
    ScfRef< ScRange >   mxSrcRange;     /// Source data range in the Calc document.
512
    ScfRef< ScRange >   mxSrcRange;     /// Source data range in the Calc document.
513
    XclCtrlBindMode     meBindMode;     /// Value binding mode.
513
    XclCtrlBindMode     meBindMode;     /// Value binding mode.
(-)svx/inc/svx/msdffdef.hxx (+3 lines)
Lines 1220-1223 Link Here
1220
void  *m_pvBits;              // raster bits of the blip.
1220
void  *m_pvBits;              // raster bits of the blip.
1221
#endif
1221
#endif
1222
1222
1223
//ALT_TXT_MSINTEROP
1224
#define MSPROP_DESCRIPTION_MAX_LEN	4096
1225
1223
#endif
1226
#endif

Return to issue 119903