From bb1e59d596ffa29d40b4538e18a08e5e91d469a9 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 17 Jun 2016 19:40:58 +0200 Subject: Simplify OPropertyContainerHelper::registerPropertyNoMember's _pInitialValue Change-Id: Ibfb27b3eded45e2646dada37ce3663f427985ae9 --- sc/source/ui/unoobj/celllistsource.cxx | 5 ++--- sc/source/ui/unoobj/cellvaluebinding.cxx | 5 ++--- sc/source/ui/unoobj/chartuno.cxx | 4 ++-- 3 files changed, 6 insertions(+), 8 deletions(-) (limited to 'sc') diff --git a/sc/source/ui/unoobj/celllistsource.cxx b/sc/source/ui/unoobj/celllistsource.cxx index f6908f2c2cf6..b00ea8a014de 100644 --- a/sc/source/ui/unoobj/celllistsource.cxx +++ b/sc/source/ui/unoobj/celllistsource.cxx @@ -52,13 +52,12 @@ namespace calc OSL_PRECOND( m_xDocument.is(), "OCellListSource::OCellListSource: invalid document!" ); // register our property at the base class - CellRangeAddress aInitialPropValue; registerPropertyNoMember( "CellRange", PROP_HANDLE_RANGE_ADDRESS, PropertyAttribute::BOUND | PropertyAttribute::READONLY, - cppu::UnoType::get(), - &aInitialPropValue + cppu::UnoType::get(), + css::uno::Any(CellRangeAddress()) ); } diff --git a/sc/source/ui/unoobj/cellvaluebinding.cxx b/sc/source/ui/unoobj/cellvaluebinding.cxx index a03941394566..3b301d043372 100644 --- a/sc/source/ui/unoobj/cellvaluebinding.cxx +++ b/sc/source/ui/unoobj/cellvaluebinding.cxx @@ -56,13 +56,12 @@ namespace calc ,m_bListPos( _bListPos ) { // register our property at the base class - CellAddress aInitialPropValue; registerPropertyNoMember( "BoundCell", PROP_HANDLE_BOUND_CELL, PropertyAttribute::BOUND | PropertyAttribute::READONLY, - cppu::UnoType::get(), - &aInitialPropValue + cppu::UnoType::get(), + css::uno::Any(CellAddress()) ); // TODO: implement a ReadOnly property as required by the service, diff --git a/sc/source/ui/unoobj/chartuno.cxx b/sc/source/ui/unoobj/chartuno.cxx index 9809f4bdadc1..b974560f7a9b 100644 --- a/sc/source/ui/unoobj/chartuno.cxx +++ b/sc/source/ui/unoobj/chartuno.cxx @@ -450,10 +450,10 @@ ScChartObj::ScChartObj(ScDocShell* pDocSh, SCTAB nT, const OUString& rN) { pDocShell->GetDocument().AddUnoObject(*this); - uno::Sequence< table::CellRangeAddress > aInitialPropValue; registerPropertyNoMember( "RelatedCellRanges", PROP_HANDLE_RELATED_CELLRANGES, beans::PropertyAttribute::MAYBEVOID, - cppu::UnoType::get(), &aInitialPropValue ); + cppu::UnoType>::get(), + css::uno::Any(uno::Sequence()) ); } ScChartObj::~ScChartObj() -- cgit