diff options
author | Adam Co <rattles2013@gmail.com> | 2013-07-03 12:28:12 +0300 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-07-04 10:14:03 +0200 |
commit | 7baf286555396416ac30a473dd1e50a878cef011 (patch) | |
tree | 7de2247d86cb1747122c76b9867aa4210c4d9dc2 /writerfilter | |
parent | minor (diff) | |
download | core-7baf286555396416ac30a473dd1e50a878cef011.tar.gz core-7baf286555396416ac30a473dd1e50a878cef011.zip |
fdo#66543: fixed line number attribute START VALUE wasnt imported and exported
Change-Id: I09e0356f994f5eb328f741723ac7dbfea51419ed
Reviewed-on: https://gerrit.libreoffice.org/4693
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper.cxx | 14 | ||||
-rw-r--r-- | writerfilter/source/dmapper/PropertyMap.cxx | 2 |
2 files changed, 14 insertions, 2 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index c7bc9d37d29c..de0783bae4de 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -1376,16 +1376,28 @@ void DomainMapper::lcl_attribute(Id nName, Value & val) { case NS_ooxml::LN_CT_LineNumber_countBy: aSettings.nInterval = nIntValue; + OSL_ENSURE(pSectionContext, "SectionContext unavailable!"); + if( pSectionContext ) + pSectionContext->SetLnnMod( nIntValue ); break; case NS_ooxml::LN_CT_LineNumber_start: aSettings.nStartValue = nIntValue; // todo: has to be set at (each) first paragraph + OSL_ENSURE(pSectionContext, "SectionContext unavailable!"); + if( pSectionContext ) + pSectionContext->SetLnnMin( nIntValue ); break; case NS_ooxml::LN_CT_LineNumber_distance: aSettings.nDistance = ConversionHelper::convertTwipToMM100( nIntValue ); + OSL_ENSURE(pSectionContext, "SectionContext unavailable!"); + if( pSectionContext ) + pSectionContext->SetdxaLnn( nIntValue ); break; case NS_ooxml::LN_CT_LineNumber_restart: //page:empty, probably 0,section:1,continuous:2; aSettings.bRestartAtEachPage = nIntValue < 1; + OSL_ENSURE(pSectionContext, "SectionContext unavailable!"); + if( pSectionContext ) + pSectionContext->SetLnc( nIntValue ); break; default:; } @@ -2537,7 +2549,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType case NS_sprm::LN_SLnnMin: // sprmSLnnMin OSL_ENSURE(pSectionContext, "SectionContext unavailable!"); if( pSectionContext ) - pSectionContext->SetLnnMin( nIntValue ); + pSectionContext->SetLnnMin( nIntValue + 1 ); // Sending '+1' because the value of 'sprmSLnnMin' is one less than the starting value for line numbers. break; case NS_sprm::LN_SGprfIhdt: diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx index a26fc18a3600..cfa2d88a214f 100644 --- a/writerfilter/source/dmapper/PropertyMap.cxx +++ b/writerfilter/source/dmapper/PropertyMap.cxx @@ -842,7 +842,7 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl ) //set the start value at the beginning of the document xRangeProperties = uno::Reference< beans::XPropertySet >( rDM_Impl.GetTextDocument()->getText()->getStart(), uno::UNO_QUERY_THROW ); } - xRangeProperties->setPropertyValue( rPropNameSupplier.GetName( PROP_PARA_LINE_NUMBER_START_VALUE ), uno::makeAny( m_nLnnMin + 1 )); + xRangeProperties->setPropertyValue( rPropNameSupplier.GetName( PROP_PARA_LINE_NUMBER_START_VALUE ), uno::makeAny( m_nLnnMin )); } catch( const uno::Exception& ) { |