From e7bc267692824fe8629cb8ccd9951eceae997067 Mon Sep 17 00:00:00 2001 From: RĂ¼diger Timm Date: Tue, 6 Jul 2004 12:33:05 +0000 Subject: INTEGRATION: CWS dba13 (1.36.78); FILE MERGED 2004/06/29 08:39:15 fs 1.36.78.1: #i30643# only ask for the LineEndFormat property if it exists at the model --- svx/source/fmcomp/gridcell.cxx | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) (limited to 'svx/source') diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index 1629879cd713..1d777e6caa07 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -2,9 +2,9 @@ * * $RCSfile: gridcell.cxx,v $ * - * $Revision: 1.37 $ + * $Revision: 1.38 $ * - * last change: $Author: obo $ $Date: 2004-07-05 15:49:34 $ + * last change: $Author: rt $ $Date: 2004-07-06 13:33:05 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -196,17 +196,23 @@ namespace { sal_Int16 nLineEndFormat = awt::LineEndFormat::LINE_FEED; - OSL_ENSURE( _rxModel.is(), "getModelLineEndSetting: invalid column model!" ); + Reference< XPropertySetInfo > xPSI; if ( _rxModel.is() ) - OSL_VERIFY( _rxModel->getPropertyValue( FM_PROP_LINEENDFORMAT ) >>= nLineEndFormat ); + xPSI = _rxModel->getPropertySetInfo(); - switch ( nLineEndFormat ) + OSL_ENSURE( xPSI.is(), "getModelLineEndSetting: invalid column model!" ); + if ( xPSI.is() && xPSI->hasPropertyByName( FM_PROP_LINEENDFORMAT ) ) { - case awt::LineEndFormat::CARRIAGE_RETURN: eFormat = LINEEND_CR; break; - case awt::LineEndFormat::LINE_FEED: eFormat = LINEEND_LF; break; - case awt::LineEndFormat::CARRIAGE_RETURN_LINE_FEED: eFormat = LINEEND_CRLF; break; - default: - OSL_ENSURE( sal_False, "getModelLineEndSetting: what's this?" ); + OSL_VERIFY( _rxModel->getPropertyValue( FM_PROP_LINEENDFORMAT ) >>= nLineEndFormat ); + + switch ( nLineEndFormat ) + { + case awt::LineEndFormat::CARRIAGE_RETURN: eFormat = LINEEND_CR; break; + case awt::LineEndFormat::LINE_FEED: eFormat = LINEEND_LF; break; + case awt::LineEndFormat::CARRIAGE_RETURN_LINE_FEED: eFormat = LINEEND_CRLF; break; + default: + OSL_ENSURE( sal_False, "getModelLineEndSetting: what's this?" ); + } } } catch( const Exception& ) -- cgit