From dbd42432c7b8f8149080bb13b103b35f2532eee8 Mon Sep 17 00:00:00 2001 From: YogeshBharate Date: Thu, 2 Jan 2014 15:03:02 +0530 Subject: [PATCH] fdo#69613: Code changes for TOC with flag '\x' should get preserved after RT. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Issue : TOC field flag '\x' was not getting preserved after RT. Implementation : Provided import & export support for TOC field flag '\x'. XML file difference : In document.xml, Before: ‒ TOC \o "1-3" \h \x After: ‒ TOC \x \o "1-3" \h Conflicts: sw/inc/tox.hxx sw/inc/unoprnms.hxx sw/source/core/unocore/unoidx.cxx sw/source/core/unocore/unomap.cxx sw/source/filter/ww8/ww8atr.cxx sw/source/ui/index/cntex.cxx writerfilter/source/dmapper/DomainMapper_Impl.cxx writerfilter/source/dmapper/PropertyIds.cxx writerfilter/source/dmapper/PropertyIds.hxx Reviewed on: https://gerrit.libreoffice.org/7257 Change-Id: I8f196446a3beb8deea6b7ddde50e16c9cea73cd9 --- sw/inc/tox.hxx | 1 + sw/inc/unomap.hxx | 1 + sw/inc/unoprnms.hxx | 1 + .../ooxmlexport/data/PreserveXfieldTOC.docx | Bin 0 -> 18620 bytes sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 10 ++++++++++ sw/source/core/unocore/unoidx.cxx | 3 +++ sw/source/core/unocore/unomap.cxx | 2 ++ sw/source/filter/ww8/ww8atr.cxx | 4 ++++ sw/source/ui/index/cntex.cxx | 2 ++ .../source/dmapper/DomainMapper_Impl.cxx | 10 ++++++---- writerfilter/source/dmapper/PropertyIds.cxx | 1 + writerfilter/source/dmapper/PropertyIds.hxx | 1 + 12 files changed, 32 insertions(+), 4 deletions(-) create mode 100644 sw/qa/extras/ooxmlexport/data/PreserveXfieldTOC.docx diff --git a/sw/inc/tox.hxx b/sw/inc/tox.hxx index 4ded582d456c..d8bab6e882aa 100644 --- a/sw/inc/tox.hxx +++ b/sw/inc/tox.hxx @@ -404,6 +404,7 @@ namespace nsSwTOXElement const SwTOXElement TOX_TABLEADER = 256; const SwTOXElement TOX_TAB_IN_TOC = 512; const SwTOXElement TOX_BOOKMARK = 1024; + const SwTOXElement TOX_NEWLINE = 2048; } typedef sal_uInt16 SwTOIOptions; diff --git a/sw/inc/unomap.hxx b/sw/inc/unomap.hxx index f0b72598e59b..060d0ae95038 100644 --- a/sw/inc/unomap.hxx +++ b/sw/inc/unomap.hxx @@ -219,6 +219,7 @@ #define WID_PRIMARY_KEY_READING 1059 #define WID_SECONDARY_KEY_READING 1060 #define WID_TOC_BOOKMARK 1061 +#define WID_TOC_NEWLINE 1062 // Text document #define WID_DOC_CHAR_COUNT 1000 diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx index f4fc116db19f..85e478c59f09 100644 --- a/sw/inc/unoprnms.hxx +++ b/sw/inc/unoprnms.hxx @@ -124,6 +124,7 @@ #define UNO_NAME_HIDE_TAB_LEADER_AND_PAGE_NUMBERS "HideTabLeaderAndPageNumber" #define UNO_NAME_TAB_IN_TOC "TabInTOC" #define UNO_NAME_TOC_BOOKMARK "TOCBookmark" +#define UNO_NAME_TOC_NEWLINE "TOCNewLine" #define UNO_NAME_CHAR_FLASH "CharFlash" #define UNO_NAME_CHAR_KERNING "CharKerning" diff --git a/sw/qa/extras/ooxmlexport/data/PreserveXfieldTOC.docx b/sw/qa/extras/ooxmlexport/data/PreserveXfieldTOC.docx new file mode 100644 index 0000000000000000000000000000000000000000..adf7fd92494d8d2b8c157eb9a177622bda55c776 GIT binary patch literal 18620 zcmeIabyOT#w1yfrgYZhb1PY&{OaW1d!?=G0KPnD!ScC zia|0V{RYi&y#=v*$P=E(wNBavjAf15ESyfLgrV&FPetJ~nVP3jmP1yiCH?B`$lzf3 zvGCD4ez|KYxne;@!O9E}CH*)`%cBeea=V9MT2AiWI&_iKmek6OJ+u`j!QG_tqXx)b zJ7ID%uPU$!b4kOJrKUtsYAWT#7Bkh8B`JlQHz|USQY>6({b^%;-^wv)$SoU5C{iYR zp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`o_;U2{o7YD^nVoI{%-zzh0)*UCrE#q|D)dMcl+N< zQ2w@uNBz_O*MgMa&3~^^_}iQoP_pnd4!>6{{O;oSwV;2yfWZ6H#jh(ve>eYqxz*q1 zn?!$^|JUNH-~Igl6Vu;*IOzW2=f`mSyYWA>`oB#9dz?VOWOsik>Yq9O@4o(-8~*AG zg8Nrr|I8GB_wvsi=~pjeJimMSnKAwD;Gg-&uMVhrfq?#%jr?x@I|%;mV2%IJa9RNF z{PRCp_`Ch@knp!XsL-GGzahi#9{xFH{%sHVN`!wofj=iuC0TGlsm+g63mHfkurgUz I?8jgK587R6i2wiq literal 0 HcmV?d00001 diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index 4fe902d0fd7a..7727bc1a5e26 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -2384,6 +2384,16 @@ DECLARE_OOXMLEXPORT_TEST(testFieldFlagB,"TOC_field_b.docx") CPPUNIT_ASSERT(contents.match(" TOC \\b \"bookmark111\" \\o \"1-9\" \\h")); } +DECLARE_OOXMLEXPORT_TEST(testPreserveXfieldTOC, "PreserveXfieldTOC.docx") +{ + xmlDocPtr pXmlDoc = parseExport("word/document.xml"); + if (!pXmlDoc) + return; + xmlNodeSetPtr pXmlNodes = getXPathNode(pXmlDoc,"/w:document/w:body/w:p[2]/w:r[2]/w:instrText"); + xmlNodePtr pXmlNode = pXmlNodes->nodeTab[0]; + OUString contents = OUString::createFromAscii((const char*)((pXmlNode->children[0]).content)); + CPPUNIT_ASSERT(contents.match(" TOC \\x \\f \\o \"1-3\" \\h")); +} #endif CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx index 06a695d68472..7aa85ffcdf52 100644 --- a/sw/source/core/unocore/unoidx.cxx +++ b/sw/source/core/unocore/unoidx.cxx @@ -665,6 +665,9 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, case WID_TAB_IN_TOC: lcl_AnyToBitMask(rValue, nCreate, nsSwTOXElement::TOX_TAB_IN_TOC); break; + case WID_TOC_NEWLINE: + lcl_AnyToBitMask(rValue, nCreate, nsSwTOXElement::TOX_NEWLINE); + break; // case WID_PARAGRAPH_STYLE_NAMES :OSL_FAIL("not implemented") // break; case WID_HIDE_TABLEADER_PAGENUMBERS: diff --git a/sw/source/core/unocore/unomap.cxx b/sw/source/core/unocore/unomap.cxx index e3f9d1e626af..da26adcddd0f 100644 --- a/sw/source/core/unocore/unomap.cxx +++ b/sw/source/core/unocore/unomap.cxx @@ -1416,6 +1416,7 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s { OUString(UNO_NAME_HIDE_TAB_LEADER_AND_PAGE_NUMBERS), WID_HIDE_TABLEADER_PAGENUMBERS , cppu::UnoType::get() , PROPERTY_NONE, 0}, { OUString(UNO_NAME_TAB_IN_TOC), WID_TAB_IN_TOC, cppu::UnoType::get(), PROPERTY_NONE, 0}, { OUString(UNO_NAME_TOC_BOOKMARK), WID_TOC_BOOKMARK, cppu::UnoType::get(), PROPERTY_NONE, 0}, + { OUString(UNO_NAME_TOC_NEWLINE), WID_TOC_NEWLINE, cppu::UnoType::get(), PROPERTY_NONE, 0}, { OUString(UNO_NAME_CREATE_FROM_OUTLINE), WID_CREATE_FROM_OUTLINE , cppu::UnoType::get() , PROPERTY_NONE, 0}, { OUString(UNO_NAME_CREATE_FROM_CHAPTER), WID_CREATE_FROM_CHAPTER , cppu::UnoType::get() , PROPERTY_NONE, 0}, { OUString(UNO_NAME_IS_PROTECTED), WID_PROTECTED , cppu::UnoType::get() , PROPERTY_NONE, 0}, @@ -1455,6 +1456,7 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s { OUString(UNO_NAME_HIDE_TAB_LEADER_AND_PAGE_NUMBERS), WID_HIDE_TABLEADER_PAGENUMBERS , cppu::UnoType::get() , PROPERTY_NONE, 0}, { OUString(UNO_NAME_TAB_IN_TOC), WID_TAB_IN_TOC, cppu::UnoType::get(), PROPERTY_NONE, 0}, { OUString(UNO_NAME_TOC_BOOKMARK), WID_TOC_BOOKMARK, cppu::UnoType::get(), PROPERTY_NONE, 0}, + { OUString(UNO_NAME_TOC_NEWLINE), WID_TOC_NEWLINE, cppu::UnoType::get(), PROPERTY_NONE, 0}, { OUString(UNO_NAME_CREATE_FROM_CHAPTER), WID_CREATE_FROM_CHAPTER , cppu::UnoType::get() , PROPERTY_NONE, 0}, { OUString(UNO_NAME_IS_PROTECTED), WID_PROTECTED , cppu::UnoType::get() , PROPERTY_NONE, 0}, { OUString(UNO_NAME_USE_LEVEL_FROM_SOURCE), WID_USE_LEVEL_FROM_SOURCE , cppu::UnoType::get() , PROPERTY_NONE, 0}, diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index d2c9dace2ad6..24d4a18e3553 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -2120,6 +2120,10 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect ) sStr +="\\w " ; GetExport( ).bTabInTOC = true ; } + if(nsSwTOXElement::TOX_NEWLINE & pTOX->GetCreateType()) + { + sStr +="\\x " ; + } if( nsSwTOXElement::TOX_MARK & pTOX->GetCreateType() ) { sStr += "\\f "; diff --git a/sw/source/ui/index/cntex.cxx b/sw/source/ui/index/cntex.cxx index 28ff7f92ff0e..ec6945f5782e 100644 --- a/sw/source/ui/index/cntex.cxx +++ b/sw/source/ui/index/cntex.cxx @@ -244,6 +244,8 @@ void SwMultiTOXTabDialog::CreateOrUpdateExample( lcl_SetBOOLProp(xInfo, xIdxProps, UNO_NAME_CREATE_FROM_LABELS, 0!=(nContentOptions&nsSwTOXElement::TOX_SEQUENCE )); lcl_SetBOOLProp(xInfo, xIdxProps, UNO_NAME_HIDE_TAB_LEADER_AND_PAGE_NUMBERS, 0!=(nContentOptions&nsSwTOXElement::TOX_TABLEADER )); lcl_SetBOOLProp(xInfo, xIdxProps, UNO_NAME_TAB_IN_TOC, 0!=(nContentOptions&nsSwTOXElement::TOX_TAB_IN_TOC )); + lcl_SetBOOLProp(xInfo, xIdxProps, UNO_NAME_TOC_NEWLINE, 0!=(nContentOptions&nsSwTOXElement::TOX_NEWLINE)); + lcl_SetBOOLProp(xInfo, xIdxProps, UNO_NAME_CREATE_FROM_CHAPTER, rDesc.IsFromChapter()); lcl_SetBOOLProp(xInfo, xIdxProps, UNO_NAME_IS_PROTECTED, rDesc.IsReadonly()); diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index d42137cc7e9c..57255088763c 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -2697,6 +2697,7 @@ void DomainMapper_Impl::handleToc bool bFromEntries = false; bool bHideTabLeaderPageNumbers = false ; bool bIsTabEntry = false ; + bool bNewLine = false ; sal_Int16 nMaxLevel = 10; OUString sTemplate; @@ -2789,10 +2790,10 @@ void DomainMapper_Impl::handleToc bIsTabEntry = true ; } // \x Preserve newline characters within table entries -// if( lcl_FindInCommand( pContext->GetCommand(), 'x', sValue )) -// { - //todo: unsupported -// } + if( lcl_FindInCommand( pContext->GetCommand(), 'x', sValue )) + { + bNewLine = true ; + } // \z Hides page numbers within the table of contens when shown in Web Layout View if( lcl_FindInCommand( pContext->GetCommand(), 'z', sValue )) { @@ -2822,6 +2823,7 @@ void DomainMapper_Impl::handleToc xTOC->setPropertyValue( rPropNameSupplier.GetName( PROP_CREATE_FROM_MARKS ), uno::makeAny( bFromEntries )); xTOC->setPropertyValue( rPropNameSupplier.GetName( PROP_HIDE_TAB_LEADER_AND_PAGE_NUMBERS ), uno::makeAny( bHideTabLeaderPageNumbers )); xTOC->setPropertyValue( rPropNameSupplier.GetName( PROP_TAB_IN_TOC ), uno::makeAny( bIsTabEntry )); + xTOC->setPropertyValue( rPropNameSupplier.GetName( PROP_TOC_NEW_LINE ), uno::makeAny( bNewLine )); if( !sTemplate.isEmpty() ) { //the string contains comma separated the names and related levels diff --git a/writerfilter/source/dmapper/PropertyIds.cxx b/writerfilter/source/dmapper/PropertyIds.cxx index a6bda94dcf15..776e263e0510 100644 --- a/writerfilter/source/dmapper/PropertyIds.cxx +++ b/writerfilter/source/dmapper/PropertyIds.cxx @@ -363,6 +363,7 @@ OUString PropertyNameSupplier::GetName( PropertyIds eId ) const case PROP_HIDE_TAB_LEADER_AND_PAGE_NUMBERS : sName = "HideTabLeaderAndPageNumber" ; break ; case PROP_TAB_IN_TOC : sName = "TabInTOC"; break ; case PROP_TOC_BOOKMARK: sName = "TOCBookmark"; break; + case PROP_TOC_NEW_LINE: sName = "TOCNewLine"; break; } ::std::pair aInsertIt = m_pImpl->aNameMap.insert( PropertyNameMap_t::value_type( eId, sName )); diff --git a/writerfilter/source/dmapper/PropertyIds.hxx b/writerfilter/source/dmapper/PropertyIds.hxx index c6cf976ae249..33690bcaa612 100644 --- a/writerfilter/source/dmapper/PropertyIds.hxx +++ b/writerfilter/source/dmapper/PropertyIds.hxx @@ -334,6 +334,7 @@ enum PropertyIds ,PROP_HIDE_TAB_LEADER_AND_PAGE_NUMBERS ,PROP_TAB_IN_TOC ,PROP_TOC_BOOKMARK + ,PROP_TOC_NEW_LINE }; struct PropertyNameSupplier_Impl; class PropertyNameSupplier