diff options
author | Kohei Yoshida <kyoshida@novell.com> | 2010-02-23 11:00:52 -0500 |
---|---|---|
committer | Kohei Yoshida <kyoshida@novell.com> | 2010-02-23 11:00:52 -0500 |
commit | bb701f84b482b917230ccf471796568f6b082968 (patch) | |
tree | acfcec730a16623932aa4f20e3a30964f544ce61 /oox/source/xls | |
parent | de2b208848cd416a1b9a63f7cc662d653b06a04b (diff) |
calctabcolor: Use PropertySet to set property to sheet.
Diffstat (limited to 'oox/source/xls')
-rw-r--r-- | oox/source/xls/worksheetsettings.cxx | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/oox/source/xls/worksheetsettings.cxx b/oox/source/xls/worksheetsettings.cxx index f9b50c8bc8f2..a7817c02327f 100644 --- a/oox/source/xls/worksheetsettings.cxx +++ b/oox/source/xls/worksheetsettings.cxx @@ -34,9 +34,9 @@ #include "oox/xls/biffinputstream.hxx" #include "oox/xls/pagesettings.hxx" #include "oox/xls/workbooksettings.hxx" +#include "properties.hxx" #include <com/sun/star/util/XProtectable.hpp> -#include <com/sun/star/beans/XPropertySet.hpp> using ::rtl::OUString; using ::com::sun::star::beans::XPropertySet; @@ -319,16 +319,8 @@ void WorksheetSettings::finalizeImport() if (!maSheetSettings.maTabColor.isAuto()) { sal_Int32 nColor = maSheetSettings.maTabColor.getColor(getBaseFilter()); - try - { - Reference< XPropertySet > xPropSet( getSheet(), UNO_QUERY_THROW ); - Any any; - any <<= nColor; - xPropSet->setPropertyValue( CREATE_OUSTRING("TabColor"), any ); - } - catch ( Exception& ) - { - } + PropertySet aSheetProp(getSheet()); + aSheetProp.setProperty(PROP_TabColor, nColor); } } |