diff options
author | Hans-Joachim Lankenau <hjs@openoffice.org> | 2010-12-17 13:36:59 +0100 |
---|---|---|
committer | Hans-Joachim Lankenau <hjs@openoffice.org> | 2010-12-17 13:36:59 +0100 |
commit | 0feae64efb6e6330ad2236d5eeb6d9678ea6fb98 (patch) | |
tree | 64225de00225469117e0908343c63c7c5d47b6f7 /svx | |
parent | 94160afa68a6bf633c5fb14944c5f239187fa7c1 (diff) | |
parent | 75b47018bbe9e37d00ae2af2e6011b463a60a21e (diff) |
CWS-TOOLING: integrate CWS mib19
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/form/fmview.cxx | 4 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbcontrl.cxx | 18 |
2 files changed, 11 insertions, 11 deletions
diff --git a/svx/source/form/fmview.cxx b/svx/source/form/fmview.cxx index 6804e838e602..f9980284993d 100644 --- a/svx/source/form/fmview.cxx +++ b/svx/source/form/fmview.cxx @@ -139,9 +139,7 @@ void FmFormView::Init() const SfxPoolItem *pItem=0; if ( pObjShell->GetMedium()->GetItemSet()->GetItemState( SID_COMPONENTDATA, sal_False, &pItem ) == SFX_ITEM_SET ) { - Sequence< PropertyValue > aSeq; - ( ((SfxUnoAnyItem*)pItem)->GetValue() ) >>= aSeq; - ::comphelper::NamedValueCollection aComponentData( aSeq ); + ::comphelper::NamedValueCollection aComponentData( ((SfxUnoAnyItem*)pItem)->GetValue() ); bInitDesignMode = aComponentData.getOrDefault( "ApplyFormDesignMode", bInitDesignMode ); } } diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 8e100c083814..bd0a39200dd1 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -1800,8 +1800,7 @@ struct SvxStyleToolBoxControl::Impl static const sal_Char* aCalcStyles[] = { "Default", - "Heading 1", - "Heading 2", + "Heading1", "Result", "Result2" }; @@ -1813,12 +1812,15 @@ struct SvxStyleToolBoxControl::Impl { try { - Reference< beans::XPropertySet > xStyle; - xCellStyles->getByName( rtl::OUString::createFromAscii( aCalcStyles[nStyle] )) >>= xStyle; - ::rtl::OUString sName; - xStyle->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DisplayName")))>>= sName; - if( sName.getLength() ) - aDefaultStyles.push_back(sName); + const rtl::OUString sStyleName( rtl::OUString::createFromAscii( aCalcStyles[nStyle] ) ); + if( xCellStyles->hasByName( sStyleName ) ) + { + Reference< beans::XPropertySet > xStyle( xCellStyles->getByName( sStyleName), UNO_QUERY_THROW ); + ::rtl::OUString sName; + xStyle->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DisplayName"))) >>= sName; + if( sName.getLength() ) + aDefaultStyles.push_back(sName); + } } catch( const uno::Exception& ) {} |