diff options
author | Pallavi Jadhav <pallavi.jadhav@synerzip.com> | 2014-01-28 11:42:53 +0530 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-02-25 10:13:55 +0100 |
commit | 01826dc12550e7a4204034f7876c593726525b54 (patch) | |
tree | 68e04dae604422e84f59c14ece1d4c4b59cdbaf5 /writerfilter | |
parent | warning C4510: default constructor could not be generated (diff) | |
download | core-01826dc12550e7a4204034f7876c593726525b54.tar.gz core-01826dc12550e7a4204034f7876c593726525b54.zip |
fdo#74105 : Prservation of Numbered lists-Starting with Value '0'
Issue :
- DOCX containing Numbered lists- Strating with
value '0' is not preserved after RT.
- LO exports document with Numbered lists starting
from '1' instead of '0'.
- LO "Import" and "Export" need fixes.
- If LO will imports correctly, export will get
correct value.
Implentation :
- Added code at Import and Export side.
- Added Export Unit test case to check that
<w:start> is not present in numbering.xml
for 0th level.
NOTE : <w:start> is optional. If not mentioned
Numbered lists starts from '0'.
Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
Reviewed on:
https://gerrit.libreoffice.org/7710
Change-Id: I30910c41fd188f30a1723cf8e07be5ea1cde1be0
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/NumberingManager.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx index 60582c863bc4..98d9c44c6f26 100644 --- a/writerfilter/source/dmapper/NumberingManager.cxx +++ b/writerfilter/source/dmapper/NumberingManager.cxx @@ -829,6 +829,7 @@ void ListsManager::lcl_attribute( Id nName, Value& rVal ) void ListsManager::lcl_sprm( Sprm& rSprm ) { + static bool bIsStartVisited = false; //fill the attributes of the style sheet sal_uInt32 nSprmId = rSprm.getId(); if( m_pCurrentDefinition.get() || @@ -952,11 +953,22 @@ void ListsManager::lcl_sprm( Sprm& rSprm ) } break; case NS_ooxml::LN_CT_Lvl_start: + if (m_pCurrentDefinition->GetCurrentLevel().get()) + m_pCurrentDefinition->GetCurrentLevel( )->SetValue( nSprmId, nIntValue ); + bIsStartVisited = true; + break; case NS_ooxml::LN_CT_Lvl_numFmt: case NS_ooxml::LN_CT_Lvl_isLgl: case NS_ooxml::LN_CT_Lvl_legacy: if (m_pCurrentDefinition->GetCurrentLevel().get()) + { m_pCurrentDefinition->GetCurrentLevel( )->SetValue( nSprmId, nIntValue ); + if( false == bIsStartVisited ) + { + m_pCurrentDefinition->GetCurrentLevel( )->SetValue( NS_ooxml::LN_CT_Lvl_start, 0 ); + bIsStartVisited = true; + } + } break; case NS_ooxml::LN_CT_Lvl_suff: { |