summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/core/data/dpoutput.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx
index ce6e102ca2a7..ae3e2eb1e6ed 100644
--- a/sc/source/core/data/dpoutput.cxx
+++ b/sc/source/core/data/dpoutput.cxx
@@ -1294,16 +1294,14 @@ void lcl_GetTableVars( sal_Int32& rGrandTotalCols, sal_Int32& rGrandTotalRows, s
ScDPOutput::GetDataDimensionNames( aSourceName, aGivenName, xDim );
try
{
- uno::Any aValue = xDimProp->getPropertyValue(
- rtl::OUString::createFromAscii(SC_UNO_DP_LAYOUTNAME) );
+ uno::Any aValue = xDimProp->getPropertyValue( SC_UNO_DP_LAYOUTNAME );
if( aValue.hasValue() )
{
OUString strLayoutName;
- if( aValue >>= strLayoutName )
- if ( strLayoutName.getLength() > 0 )
- aGivenName = strLayoutName;
+ if( ( aValue >>= strLayoutName ) && !strLayoutName.isEmpty() )
+ aGivenName = strLayoutName;
}
}
catch(const uno::Exception&)