diff options
author | Andrew Higginson <at.higginsonAtgmail.com> | 2012-04-10 12:43:48 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-04-10 12:49:49 +0100 |
commit | 8a3aae9b694deb2b41157509e84815a5b7fb7655 (patch) | |
tree | 330c03bb0b312ac25f3ac7174261eedc9f6a642c /sfx2 | |
parent | 65cf853589958a51a3a30f6e03dc578c01c320bc (diff) |
Resolves: fdo#31022 about dialog is suboptimal
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/Module_sfx2.mk | 1 | ||||
-rw-r--r-- | sfx2/source/dialog/templdlg.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/docinf.cxx | 28 |
3 files changed, 19 insertions, 12 deletions
diff --git a/sfx2/Module_sfx2.mk b/sfx2/Module_sfx2.mk index 7aaf257898fc..bf9b37147298 100644 --- a/sfx2/Module_sfx2.mk +++ b/sfx2/Module_sfx2.mk @@ -52,7 +52,6 @@ $(eval $(call gb_Module_add_targets,sfx2,\ endif endif -#todo: source/dialog BUILD_VER_STRING #todo: clean up quickstarter stuff in both libraries #todo: move standard pool to svl diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index edee5ab35204..e06df27a42af 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -2801,7 +2801,7 @@ sal_Bool SfxTemplateCatalog_Impl::IsCheckedItem(sal_uInt16 nMesId) sal_uInt16 i; for ( i = 0; i < aFamIds.size() && aFamIds[i] != nMesId; i++ ) ; - return aFamList.IsEntrySelected( String::CreateFromInt32(i) ); + return aFamList.IsEntrySelected( rtl::OUString::valueOf(static_cast<sal_Int32>(i)) ); } //------------------------------------------------------------------------- diff --git a/sfx2/source/doc/docinf.cxx b/sfx2/source/doc/docinf.cxx index 539f31c5743f..3048a3e7bb5c 100644 --- a/sfx2/source/doc/docinf.cxx +++ b/sfx2/source/doc/docinf.cxx @@ -133,7 +133,7 @@ sal_uInt32 SFX2_DLLPUBLIC LoadOlePropertySet( aDateTime.Minutes * 60 + aDateTime.Seconds ); } - catch (lang::IllegalArgumentException &) + catch (const lang::IllegalArgumentException &) { // ignore } @@ -160,11 +160,15 @@ sal_uInt32 SFX2_DLLPUBLIC LoadOlePropertySet( { ::rtl::OUString aPropName = xCustomSect->GetPropertyName( *aIt ); uno::Any aPropValue = xCustomSect->GetAnyValue( *aIt ); - if( !aPropName.isEmpty() && aPropValue.hasValue() ) { - try { + if( !aPropName.isEmpty() && aPropValue.hasValue() ) + { + try + { xUserDefined->addProperty( aPropName, beans::PropertyAttribute::REMOVEABLE, aPropValue ); - } catch ( uno::Exception& ) { + } + catch (const uno::Exception&) + { //ignore } } @@ -187,7 +191,7 @@ sal_uInt32 SFX2_DLLPUBLIC LoadOlePropertySet( if ( xBuiltin->GetStringValue( aStrValue, PROPID_COMPANY ) ) xWriterProps->setCompany( aStrValue ); } - catch ( uno::Exception& ) + catch (const uno::Exception&) { } } @@ -237,13 +241,13 @@ bool SFX2_DLLPUBLIC SaveOlePropertySet( rGlobSect.SetFileTimeValue( PROPID_EDITTIME, aEditTime ); rGlobSect.SetStringValue( PROPID_REVNUMBER, - String::CreateFromInt32( i_xDocProps->getEditingCycles() ) ); + rtl::OUString::valueOf( i_xDocProps->getEditingCycles() ) ); if ( i_pThumb && i_pThumb->getLength() ) rGlobSect.SetThumbnailValue( PROPID_THUMBNAIL, *i_pThumb ); // save the property set ErrCode nGlobError = aGlobSet.SavePropertySet(i_pStorage, - String( RTL_CONSTASCII_USTRINGPARAM( STREAM_SUMMARYINFO ) ) ); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(STREAM_SUMMARYINFO))); // *** custom properties into stream "005DocumentSummaryInformation" *** @@ -278,8 +282,10 @@ bool SFX2_DLLPUBLIC SaveOlePropertySet( xUserDefinedProps->getPropertySetInfo(); DBG_ASSERT(xPropInfo.is(), "UserDefinedProperties Info is null"); uno::Sequence<beans::Property> props = xPropInfo->getProperties(); - for (sal_Int32 i = 0; i < props.getLength(); ++i) { - try { + for (sal_Int32 i = 0; i < props.getLength(); ++i) + { + try + { // skip transient properties if (~props[i].Attributes & beans::PropertyAttribute::TRANSIENT) { @@ -290,7 +296,9 @@ bool SFX2_DLLPUBLIC SaveOlePropertySet( rCustomSect.SetPropertyName( nPropId, name ); } } - } catch (uno::Exception &) { + } + catch (const uno::Exception &) + { // may happen with concurrent modification... DBG_WARNING("SavePropertySet: exception"); } |