diff options
author | Kohei Yoshida <kohei.yoshida@suse.com> | 2011-08-13 01:04:26 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@suse.com> | 2011-08-16 21:22:43 -0400 |
commit | 80b1e662777100a7dfd80176a2b528880a838167 (patch) | |
tree | fe39ee8773de6282e6e2b468b815eadf4fc7ddca /sc/source/filter/excel/xiescher.cxx | |
parent | d2e538a63507aa3310a854d5c1414565efa3a361 (diff) |
Added XPropertySet2 to allow disabling of change event notifications.
Sometimes broadcasting changes to the property set on every new
value insertion makes no sense especially during import. Turning
that off also improves performance especially when inserting millions
of property values.
Diffstat (limited to 'sc/source/filter/excel/xiescher.cxx')
-rw-r--r-- | sc/source/filter/excel/xiescher.cxx | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx index 9123142997f5..c6aa20a5a1f8 100644 --- a/sc/source/filter/excel/xiescher.cxx +++ b/sc/source/filter/excel/xiescher.cxx @@ -402,13 +402,13 @@ void XclImpDrawObjBase::SetDffData( const DffObjData& rDffObjData, const String& mbAutoMargin = bAutoMargin; } -String XclImpDrawObjBase::GetObjName() const +OUString XclImpDrawObjBase::GetObjName() const { /* #i51348# Always return a non-empty name. Create English default names depending on the object type. This is not implemented as virtual functions in derived classes, as class type and object type may not match. */ - return (maObjName.Len() > 0) ? maObjName : GetObjectManager().GetDefaultObjName( *this ); + return maObjName.isEmpty() ? GetObjectManager().GetDefaultObjName(*this) : maObjName; } const XclObjAnchor* XclImpDrawObjBase::GetAnchor() const @@ -507,7 +507,7 @@ void XclImpDrawObjBase::PostProcessSdrObject( XclImpDffConverter& rDffConv, SdrO void XclImpDrawObjBase::ReadName5( XclImpStream& rStrm, sal_uInt16 nNameLen ) { - maObjName.Erase(); + maObjName = rtl::OUString(); if( nNameLen > 0 ) { // name length field is repeated before the name @@ -1855,7 +1855,6 @@ void XclImpControlHelper::ProcessControl( const XclImpDrawObjBase& rDrawObj ) co aPropSet.SetBoolProperty( CREATE_OUSTRING( "EnableVisible" ), rDrawObj.IsVisible() ); aPropSet.SetBoolProperty( CREATE_OUSTRING( "Printable" ), rDrawObj.IsPrintable() ); - // virtual call for type specific processing DoProcessControl( aPropSet ); } @@ -2829,7 +2828,7 @@ void XclImpPictureObj::DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal if( (rStrm.GetNextRecId() == EXC_ID3_IMGDATA) && rStrm.StartNextRecord() ) { // page background is stored as hidden picture with name "__BkgndObj" - if( IsHidden() && (GetObjName() == CREATE_STRING( "__BkgndObj" )) ) + if (IsHidden() && (GetObjName().equalsAscii("__BkgndObj"))) GetPageSettings().ReadImgData( rStrm ); else maGraphic = XclImpDrawing::ReadImgData( GetRoot(), rStrm ); @@ -2880,12 +2879,12 @@ SdrObject* XclImpPictureObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const return xSdrObj.release(); } -String XclImpPictureObj::GetObjName() const +OUString XclImpPictureObj::GetObjName() const { if( IsOcxControl() ) { - String sName( GetObjectManager().GetOleNameOverride( GetTab(), GetObjId() ) ); - if ( sName.Len() > 0 ) + OUString sName( GetObjectManager().GetOleNameOverride( GetTab(), GetObjId() ) ); + if (!sName.isEmpty()) return sName; } return XclImpDrawObjBase::GetObjName(); @@ -4167,7 +4166,7 @@ void XclImpObjectManager::ConvertObjects() // instead use InterpretDirtyCells in ScDocument::CalcAfterLoad. } -String XclImpObjectManager::GetDefaultObjName( const XclImpDrawObjBase& rDrawObj ) const +OUString XclImpObjectManager::GetDefaultObjName( const XclImpDrawObjBase& rDrawObj ) const { String aDefName; DefObjNameMap::const_iterator aIt = maDefObjNames.find( rDrawObj.GetObjType() ); |