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/source/tbxctrls | |
parent | 94160afa68a6bf633c5fb14944c5f239187fa7c1 (diff) | |
parent | 75b47018bbe9e37d00ae2af2e6011b463a60a21e (diff) |
CWS-TOOLING: integrate CWS mib19
Diffstat (limited to 'svx/source/tbxctrls')
-rw-r--r-- | svx/source/tbxctrls/tbcontrl.cxx | 18 |
1 files changed, 10 insertions, 8 deletions
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& ) {} |