diff options
author | Rüdiger Timm <rt@openoffice.org> | 2004-07-06 12:33:05 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2004-07-06 12:33:05 +0000 |
commit | e7bc267692824fe8629cb8ccd9951eceae997067 (patch) | |
tree | e180686fab73aea47831521d921d5c61619a34a1 /svx/source/fmcomp | |
parent | f9500a753789fdfdf80441d942fce55c7a5720d4 (diff) |
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
Diffstat (limited to 'svx/source/fmcomp')
-rw-r--r-- | svx/source/fmcomp/gridcell.cxx | 26 |
1 files changed, 16 insertions, 10 deletions
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& ) |