[Libreoffice-commits] core.git: sc/qa
Stephan Bergmann
sbergman at redhat.com
Thu Jun 29 10:38:02 UTC 2017
sc/qa/extras/scnamedrangeobj.cxx | 3 +--
sc/qa/extras/scnamedrangesobj.cxx | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
New commits:
commit 12e92cdc1780258081e4d2daca329b4a1a6e56fa
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jun 29 12:37:33 2017 +0200
loplugin:oncevar
Change-Id: I9d923e218b3df6e54283d712d2e986c6d2533136
diff --git a/sc/qa/extras/scnamedrangeobj.cxx b/sc/qa/extras/scnamedrangeobj.cxx
index efca322b0331..f46428cd8d74 100644
--- a/sc/qa/extras/scnamedrangeobj.cxx
+++ b/sc/qa/extras/scnamedrangeobj.cxx
@@ -72,8 +72,7 @@ uno::Reference< sheet::XNamedRanges > ScNamedRangeObj::init_impl()
CPPUNIT_ASSERT(mxComponent.is());
uno::Reference< beans::XPropertySet > xPropSet (mxComponent, UNO_QUERY_THROW);
- OUString aNamedRangesPropertyString("NamedRanges");
- uno::Reference< sheet::XNamedRanges > xNamedRanges(xPropSet->getPropertyValue(aNamedRangesPropertyString), UNO_QUERY_THROW);
+ uno::Reference< sheet::XNamedRanges > xNamedRanges(xPropSet->getPropertyValue("NamedRanges"), UNO_QUERY_THROW);
CPPUNIT_ASSERT(xNamedRanges.is());
return xNamedRanges;
diff --git a/sc/qa/extras/scnamedrangesobj.cxx b/sc/qa/extras/scnamedrangesobj.cxx
index 9cce3235bf29..e041f69230ca 100644
--- a/sc/qa/extras/scnamedrangesobj.cxx
+++ b/sc/qa/extras/scnamedrangesobj.cxx
@@ -60,8 +60,7 @@ uno::Reference< uno::XInterface > ScNamedRangesObj::init(sal_Int32 nSheet)
CPPUNIT_ASSERT(mxComponent.is());
uno::Reference< beans::XPropertySet > xPropSet (mxComponent, UNO_QUERY_THROW);
- OUString aNamedRangesPropertyString("NamedRanges");
- uno::Reference< sheet::XNamedRanges > xNamedRanges(xPropSet->getPropertyValue(aNamedRangesPropertyString), UNO_QUERY_THROW);
+ uno::Reference< sheet::XNamedRanges > xNamedRanges(xPropSet->getPropertyValue("NamedRanges"), UNO_QUERY_THROW);
//set value from xnamedranges.hxx
uno::Reference< sheet::XSpreadsheetDocument > xDoc(mxComponent, UNO_QUERY_THROW);
More information about the Libreoffice-commits
mailing list