diff options
Diffstat (limited to 'sc/source/ui/vba/vbaformatconditions.cxx')
-rw-r--r-- | sc/source/ui/vba/vbaformatconditions.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sc/source/ui/vba/vbaformatconditions.cxx b/sc/source/ui/vba/vbaformatconditions.cxx index 91d0429326dd..8dd67843ec00 100644 --- a/sc/source/ui/vba/vbaformatconditions.cxx +++ b/sc/source/ui/vba/vbaformatconditions.cxx @@ -45,11 +45,11 @@ static rtl::OUString FORMULA2( RTL_CONSTASCII_USTRINGPARAM("Formula2") ); static rtl::OUString STYLENAME( RTL_CONSTASCII_USTRINGPARAM("StyleName") ); static rtl::OUString sStyleNamePrefix( RTL_CONSTASCII_USTRINGPARAM("Excel_CondFormat") ); -ScVbaFormatConditions::ScVbaFormatConditions( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< sheet::XSheetConditionalEntries >& _xSheetConditionalEntries, const uno::Reference< frame::XModel >& xModel ) : ScVbaFormatConditions_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( _xSheetConditionalEntries, uno::UNO_QUERY_THROW ) ), mxSheetConditionalEntries( _xSheetConditionalEntries ) +ScVbaFormatConditions::ScVbaFormatConditions( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< sheet::XSheetConditionalEntries >& _xSheetConditionalEntries, const uno::Reference< frame::XModel >& /*xModel*/ ) : ScVbaFormatConditions_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( _xSheetConditionalEntries, uno::UNO_QUERY_THROW ) ), mxSheetConditionalEntries( _xSheetConditionalEntries ) { mxRangeParent.set( xParent, uno::UNO_QUERY_THROW ); - uno::Reference< excel::XWorkbook > xWorkbook = new ScVbaWorkbook( uno::Reference< XHelperInterface >( Application(), uno::UNO_QUERY_THROW ), xContext, xModel ); - mxStyles.set( xWorkbook->Styles( uno::Any() ), uno::UNO_QUERY_THROW ); + uno::Reference< excel::XApplication> xApp( Application(), uno::UNO_QUERY_THROW ); + mxStyles.set( xApp->getThisWorkbook()->Styles( uno::Any() ), uno::UNO_QUERY_THROW ); uno::Reference< sheet::XCellRangeAddressable > xCellRange( mxRangeParent->getCellRange(), uno::UNO_QUERY_THROW ); mxParentRangePropertySet.set( xCellRange, uno::UNO_QUERY_THROW ); |