[Libreoffice-commits] core.git: Changes to 'refs/changes/27/7627/3'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/38/7438/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/27/7627/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/47/7047/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/47/7047/3'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/47/7047/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/08/7208/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/90/8390/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/71/7371/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/26/11426/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/96/7096/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/49/7049/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/08/7208/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/49/7049/3'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/96/7096/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/26/11426/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/75/6575/5'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/87/7587/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/75/6575/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/49/6849/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/87/7587/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/72/7372/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/72/7372/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/75/6575/4'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/02/8202/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/02/8202/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/18/6718/3'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/18/6718/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/49/6849/4'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/18/6718/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/48/7048/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/99/8099/4'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/99/8099/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/48/7048/3'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/48/7048/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/99/8099/3'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/99/8099/5'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/20/7120/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/20/7120/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/99/8099/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - filter/source include/filter include/oox oox/source sw/source
filter/source/msfilter/escherex.cxx | 11 +++ filter/source/msfilter/eschesdo.cxx | 14 +++--- filter/source/msfilter/eschesdo.hxx |4 ++-- include/filter/msfilter/escherex.hxx |8 +--- include/oox/export/vmlexport.hxx |2 +- oox/source/export/vmlexport.cxx |4 ++-- sw/source/filter/ww8/docxattributeoutput.cxx |2 +- 7 files changed, 25 insertions(+), 20 deletions(-) New commits: commit 6f87913d843a97963703721506495bd57af36461 Author: Nikhil Walvekar nikhil.walve...@synerzip.com Date: Fri Nov 29 14:03:46 2013 +0530 fdo#65836 bnc#621241 Do not compress WMF / EMF file incase of OOXML export (cherry picked from commit 8fe352be80ff69552f622f3c7a6a6f269912ab71) Change-Id: Ic498e5703ab48719f998be6da3f245843cc0979d Reviewed-on: https://gerrit.libreoffice.org/11426 Reviewed-by: Nikhil Walvekar nikhil.walve...@synerzip.com Reviewed-by: Andras Timar andras.ti...@collabora.com Tested-by: Andras Timar andras.ti...@collabora.com diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 7318de1..cc865ba 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -1428,7 +1428,7 @@ sal_Bool EscherPropertyContainer::CreateEmbeddedHatchProperties( const ::com::su sal_Bool EscherPropertyContainer::CreateGraphicProperties( const ::com::sun::star::uno::Reference ::com::sun::star::beans::XPropertySet rXPropSet, const OUString rSource, const sal_Bool bCreateFillBitmap, const sal_Bool bCreateCroppingAttributes, -const sal_Bool bFillBitmapModeAllowed ) +const sal_Bool bFillBitmapModeAllowed, const sal_Bool bOOxmlExport ) { sal_BoolbRetValue = sal_False; sal_BoolbCreateFillStyles = sal_False; @@ -1742,7 +1742,7 @@ sal_Bool EscherPropertyContainer::CreateGraphicProperties( SvMemoryStream aMemStrm; Rectangle aRect; -if ( aProvider.GetBlibID( aMemStrm, aUniqueId, aRect, NULL, pGraphicAttr ) ) +if ( aProvider.GetBlibID( aMemStrm, aUniqueId, aRect, NULL, pGraphicAttr, bOOxmlExport ) ) { // grab BLIP from stream and insert directly as complex property // ownership of stream memory goes to complex property @@ -4217,7 +4217,8 @@ sal_Bool EscherGraphicProvider::GetPrefSize( const sal_uInt32 nBlibId, Size rPr } sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream rPicOutStrm, const OString rId, -const Rectangle /* rBoundRect */, const com::sun::star::awt::Rectangle* pVisArea, const GraphicAttr* pGraphicAttr ) +const Rectangle /* rBoundRect */, const com::sun::star::awt::Rectangle* pVisArea, +const GraphicAttr* pGraphicAttr, const sal_Bool bOOxmlExport ) { sal_uInt32 nBlibId = 0; GraphicObject aGraphicObject( rId ); @@ -4353,7 +4354,9 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream rPicOutStrm, const OStrin else if ( eBlibType == PEG ) rPicOutStrm (sal_uInt16)0x0505; } -if ( ( eBlibType == PEG ) || ( eBlibType == PNG ) ) +// #69607 do not compress WMF files if we are in OOXML export +if ( ( eBlibType == PEG ) || ( eBlibType == PNG ) || +( ( ( eBlibType == WMF ) || ( eBlibType == EMF ) ) bOOxmlExport ) ) { nExtra = 17; p_EscherBlibEntry-mnSizeExtra = nExtra + 8; diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx index 0e20dfb..cbf457f 100644 --- a/filter/source/msfilter/eschesdo.cxx +++ b/filter/source/msfilter/eschesdo.cxx @@ -173,7 +173,7 @@ void ImplEESdrWriter::MapRect(ImplEESdrObject /* rObj */ ) sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject rObj, EscherSolverContainer rSolverContainer, -ImplEESdrPageType ePageType ) +ImplEESdrPageType ePageType, const sal_Bool bOOxmlExport ) { sal_uInt32 nShapeID = 0; sal_uInt16 nShapeType = 0; @@ -209,7 +209,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject rObj, ImplEESdrObject aObj( *this, *(Reference XShape *) xXIndexAccess-getByIndex( n ).getValue() ); if( aObj.IsValid() ) -ImplWriteShape( aObj, rSolverContainer, ePageType ); +ImplWriteShape( aObj, rSolverContainer, ePageType, bOOxmlExport ); } mpEscherEx-LeaveGroup(); } @@ -551,7 +551,7 @@ sal_uInt32 ImplEESdrWriter
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.2' - 3 commits - filter/source framework/source include/filter include/oox oox/source sw/source
filter/source/msfilter/escherex.cxx | 11 --- filter/source/msfilter/eschesdo.cxx | 14 - filter/source/msfilter/eschesdo.hxx |4 +- framework/source/services/autorecovery.cxx | 24 +++- include/filter/msfilter/escherex.hxx |8 +++-- include/oox/export/vmlexport.hxx |2 - oox/source/drawingml/graphicshapecontext.cxx | 40 ++- oox/source/export/vmlexport.cxx |4 +- sw/source/filter/ww8/docxattributeoutput.cxx |2 - 9 files changed, 69 insertions(+), 40 deletions(-) New commits: commit 9cfd47f878dbb84fe516ce7992277fedcb026b24 Author: Nikhil Walvekar nikhil.walve...@synerzip.com Date: Fri Nov 29 14:03:46 2013 +0530 fdo#65836 bnc#621241 Do not compress WMF / EMF file incase of OOXML export (cherry picked from commit 8fe352be80ff69552f622f3c7a6a6f269912ab71) Change-Id: Ic498e5703ab48719f998be6da3f245843cc0979d Reviewed-on: https://gerrit.libreoffice.org/11426 Reviewed-by: Nikhil Walvekar nikhil.walve...@synerzip.com Reviewed-by: Andras Timar andras.ti...@collabora.com Tested-by: Andras Timar andras.ti...@collabora.com diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 7318de1..cc865ba 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -1428,7 +1428,7 @@ sal_Bool EscherPropertyContainer::CreateEmbeddedHatchProperties( const ::com::su sal_Bool EscherPropertyContainer::CreateGraphicProperties( const ::com::sun::star::uno::Reference ::com::sun::star::beans::XPropertySet rXPropSet, const OUString rSource, const sal_Bool bCreateFillBitmap, const sal_Bool bCreateCroppingAttributes, -const sal_Bool bFillBitmapModeAllowed ) +const sal_Bool bFillBitmapModeAllowed, const sal_Bool bOOxmlExport ) { sal_BoolbRetValue = sal_False; sal_BoolbCreateFillStyles = sal_False; @@ -1742,7 +1742,7 @@ sal_Bool EscherPropertyContainer::CreateGraphicProperties( SvMemoryStream aMemStrm; Rectangle aRect; -if ( aProvider.GetBlibID( aMemStrm, aUniqueId, aRect, NULL, pGraphicAttr ) ) +if ( aProvider.GetBlibID( aMemStrm, aUniqueId, aRect, NULL, pGraphicAttr, bOOxmlExport ) ) { // grab BLIP from stream and insert directly as complex property // ownership of stream memory goes to complex property @@ -4217,7 +4217,8 @@ sal_Bool EscherGraphicProvider::GetPrefSize( const sal_uInt32 nBlibId, Size rPr } sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream rPicOutStrm, const OString rId, -const Rectangle /* rBoundRect */, const com::sun::star::awt::Rectangle* pVisArea, const GraphicAttr* pGraphicAttr ) +const Rectangle /* rBoundRect */, const com::sun::star::awt::Rectangle* pVisArea, +const GraphicAttr* pGraphicAttr, const sal_Bool bOOxmlExport ) { sal_uInt32 nBlibId = 0; GraphicObject aGraphicObject( rId ); @@ -4353,7 +4354,9 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream rPicOutStrm, const OStrin else if ( eBlibType == PEG ) rPicOutStrm (sal_uInt16)0x0505; } -if ( ( eBlibType == PEG ) || ( eBlibType == PNG ) ) +// #69607 do not compress WMF files if we are in OOXML export +if ( ( eBlibType == PEG ) || ( eBlibType == PNG ) || +( ( ( eBlibType == WMF ) || ( eBlibType == EMF ) ) bOOxmlExport ) ) { nExtra = 17; p_EscherBlibEntry-mnSizeExtra = nExtra + 8; diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx index 0e20dfb..cbf457f 100644 --- a/filter/source/msfilter/eschesdo.cxx +++ b/filter/source/msfilter/eschesdo.cxx @@ -173,7 +173,7 @@ void ImplEESdrWriter::MapRect(ImplEESdrObject /* rObj */ ) sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject rObj, EscherSolverContainer rSolverContainer, -ImplEESdrPageType ePageType ) +ImplEESdrPageType ePageType, const sal_Bool bOOxmlExport ) { sal_uInt32 nShapeID = 0; sal_uInt16 nShapeType = 0; @@ -209,7 +209,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject rObj, ImplEESdrObject aObj( *this, *(Reference XShape *) xXIndexAccess-getByIndex( n ).getValue() ); if( aObj.IsValid() ) -ImplWriteShape( aObj, rSolverContainer, ePageType ); +ImplWriteShape( aObj, rSolverContainer, ePageType, bOOxmlExport
[Libreoffice-commits] core.git: sw/qa sw/source writerfilter/source
sw/qa/extras/inc/swmodeltestbase.hxx | 17 ++ sw/qa/extras/ooxmlexport/data/fdo73596_AlphaSeparator.docx |binary sw/qa/extras/ooxmlexport/data/fdo73596_RunInStyle.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 21 + sw/source/filter/ww8/ww8atr.cxx|2 + writerfilter/source/dmapper/DomainMapper_Impl.cxx | 13 +++- 6 files changed, 52 insertions(+), 1 deletion(-) New commits: commit d043c9e3be791993348afaba6effdc3731f7c33d Author: Nikhil Walvekar nikhil.walve...@synerzip.com Date: Mon Feb 17 20:46:18 2014 +0530 fdo#73596 Added support to import and export \r,\h Index flags. This supports \r flag run-in type index. If \r is specified then we don't have to write \e flag (separator char). \h is Alphabetic separator, where indexes are grouped as per starting character. Change-Id: I690b29cef3d24b2a71b01f1deef0e418162d71aa Reviewed-on: https://gerrit.libreoffice.org/8099 Reviewed-by: Miklos Vajna vmik...@collabora.co.uk Tested-by: Miklos Vajna vmik...@collabora.co.uk diff --git a/sw/qa/extras/inc/swmodeltestbase.hxx b/sw/qa/extras/inc/swmodeltestbase.hxx index 5be397a..cb15d69 100644 --- a/sw/qa/extras/inc/swmodeltestbase.hxx +++ b/sw/qa/extras/inc/swmodeltestbase.hxx @@ -580,6 +580,23 @@ protected: nNumberOfNodes, xmlXPathNodeSetGetLength(pXmlNodes)); } + +/** + * Assert that rXPath exists, and returns exactly nNumberOfNodes nodes. + * Useful for checking that we do _not_ export some node (nNumberOfNodes == 0). + */ +void assertXPathContent(xmlDocPtr pXmlDoc, const OString rXPath, const OUString rContent) +{ +xmlNodeSetPtr pXmlNodes = getXPathNode(pXmlDoc, rXPath); + +CPPUNIT_ASSERT_EQUAL_MESSAGE(OString(XPath ' + rXPath + ' not found).getStr(), + 1, xmlXPathNodeSetGetLength(pXmlNodes)); + +xmlNodePtr pXmlNode = pXmlNodes-nodeTab[0]; +OUString contents = OUString::createFromAscii((const char*)((pXmlNode-children[0]).content)); +CPPUNIT_ASSERT_EQUAL_MESSAGE(XPath contents do not match,rContent,contents); +} + /** * Assert that rXPath exists, and has exactly nNumberOfChildNodes child nodes. * Useful for checking that we do have a no child nodes to a specific node (nNumberOfChildNodes == 0). diff --git a/sw/qa/extras/ooxmlexport/data/fdo73596_AlphaSeparator.docx b/sw/qa/extras/ooxmlexport/data/fdo73596_AlphaSeparator.docx new file mode 100644 index 000..892bc55 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/fdo73596_AlphaSeparator.docx differ diff --git a/sw/qa/extras/ooxmlexport/data/fdo73596_RunInStyle.docx b/sw/qa/extras/ooxmlexport/data/fdo73596_RunInStyle.docx new file mode 100644 index 000..8f1863b Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/fdo73596_RunInStyle.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index 06b6fa5..f885438 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -2348,6 +2348,27 @@ DECLARE_OOXMLEXPORT_TEST(testFdo73541,fdo73541.docx) assertXPath(pXmlDoc, /w:settings/w:mirrorMargins); } +DECLARE_OOXMLEXPORT_TEST(testfdo73596_RunInStyle,fdo73596_RunInStyle.docx) +{ +// INDEX should be preserved. +xmlDocPtr pXmlDoc = parseExport(word/document.xml); +if (!pXmlDoc) +return; +assertXPathContent(pXmlDoc, /w:document/w:body/w:p[2]/w:r[2]/w:instrText[1], INDEX \\e \); +} + +DECLARE_OOXMLEXPORT_TEST(testfdo73596_AlphaSeparator,fdo73596_AlphaSeparator.docx) +{ +// INDEX flag \h A should be preserved. +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[1]); +xmlNodePtr pXmlNode = pXmlNodes-nodeTab[0]; +OUString contents = OUString::createFromAscii((const char*)((pXmlNode-children[0]).content)); +CPPUNIT_ASSERT(contents.match( INDEX \\h \A\ \\e \)); +} + DECLARE_OOXMLEXPORT_TEST(testFDO74106, FDO74106.docx) { xmlDocPtr pXmlDoc = parseExport(word/numbering.xml); diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index 5263dcf..0109d87 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -2102,7 +2102,9 @@ void AttributeOutputBase::StartTOX( const SwSection rSect ) if (nsSwTOIOptions::TOI_ALPHA_DELIMITTER pTOX-GetOptions()) sStr += \\h \A\ ; +if (!pTOX-GetTOXForm().IsCommaSeparated()) { +// In case of Run-in style no separators are added. OUString aFillTxt; for (sal_uInt8 n = 1; n = 3; ++n) { diff
[Libreoffice-commits] core.git: sw/source
sw/source/filter/ww8/docxsdrexport.cxx | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) New commits: commit 3c0a7cf4f67720f2cca2c4eb543f838d5b644e7f Author: Nikhil Walvekar nikhil.walve...@synerzip.com Date: Mon Feb 24 14:25:09 2014 +0530 fdo#75254 Unsupported shape in DML writing was causing document corruption. Added a way to avoid DML export for un-supported shapes. We need to fix those properly by adding proper support. Change-Id: I0aeac1cc3b6e807a0427df9a9695446148d2ba38 Reviewed-on: https://gerrit.libreoffice.org/8202 Reviewed-by: Miklos Vajna vmik...@collabora.co.uk Tested-by: Miklos Vajna vmik...@collabora.co.uk diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx index 170be93..bb771c8 100644 --- a/sw/source/filter/ww8/docxsdrexport.cxx +++ b/sw/source/filter/ww8/docxsdrexport.cxx @@ -103,6 +103,7 @@ struct DocxSdrExport::Impl /// Writes wp wrapper code around an SdrObject, which itself is written using drawingML syntax. void writeDMLDrawing(const SdrObject* pSdrObj, const SwFrmFmt* pFrmFmt, int nAnchorId); void textFrameShadow(const SwFrmFmt rFrmFmt); +bool isSupportedDMLShape(com::sun::star::uno::Referencecom::sun::star::drawing::XShape xShape); }; DocxSdrExport::DocxSdrExport(DocxExport rExport, sax_fastparser::FSHelperPtr pSerializer, oox::drawingml::DrawingML* pDrawingML) @@ -549,6 +550,17 @@ void DocxSdrExport::Impl::textFrameShadow(const SwFrmFmt rFrmFmt) FSEND); } +bool DocxSdrExport::Impl::isSupportedDMLShape(uno::Referencedrawing::XShape xShape) +{ +bool supported = true; + +uno::Referencelang::XServiceInfo xServiceInfo(xShape, uno::UNO_QUERY_THROW); +if (xServiceInfo-supportsService(com.sun.star.drawing.PolyPolygonShape)) +supported = false; + +return supported; +} + void DocxSdrExport::writeDMLAndVMLDrawing(const SdrObject* sdrObj, const SwFrmFmt rFrmFmt,const Point rNdTopLeft, int nAnchorId) { // Depending on the shape type, we actually don't write the shape as DML. @@ -557,7 +569,7 @@ void DocxSdrExport::writeDMLAndVMLDrawing(const SdrObject* sdrObj, const SwFrmFm uno::Referencedrawing::XShape xShape(const_castSdrObject*(sdrObj)-getUnoShape(), uno::UNO_QUERY_THROW); MSO_SPT eShapeType = EscherPropertyContainer::GetCustomShapeType(xShape, nMirrorFlags, sShapeType); -if (eShapeType != ESCHER_ShpInst_TextPlainText) +if (eShapeType != ESCHER_ShpInst_TextPlainText m_pImpl-isSupportedDMLShape(xShape)) { m_pImpl-m_pSerializer-startElementNS(XML_mc, XML_AlternateContent, FSEND); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: writerfilter/source
writerfilter/source/dmapper/DomainMapper.cxx | 24 +++-- writerfilter/source/dmapper/DomainMapper_Impl.cxx | 101 ++ writerfilter/source/dmapper/DomainMapper_Impl.hxx | 11 ++ writerfilter/source/dmapper/FieldTypes.hxx|7 + 4 files changed, 119 insertions(+), 24 deletions(-) New commits: commit 07911ac9fd343fd59229b631c0fcf8dd30426b07 Author: Nikhil Walvekar nikhil.walve...@synerzip.com Date: Fri Feb 7 10:21:33 2014 +0530 fdo#73596 Added support to import and export Index from docx. This currently supports basic import of indexes. Other flags are still pending. Currently flags are not preserved completely, just index and xe fields are preserved. Reviewed on: https://gerrit.libreoffice.org/7627 Change-Id: I56058df19aa8332fbcccde77fb1f29347264bbc6 diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index 02b234e..61d32d8 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -2423,19 +2423,25 @@ void DomainMapper::data(const sal_uInt8* /*buf*/, size_t /*len*/, void DomainMapper::lcl_startSectionGroup() { -m_pImpl-PushProperties(CONTEXT_SECTION); +if (!m_pImpl-isInIndexContext()) +{ +m_pImpl-PushProperties(CONTEXT_SECTION); +} } void DomainMapper::lcl_endSectionGroup() { -m_pImpl-CheckUnregisteredFrameConversion(); -m_pImpl-ExecuteFrameConversion(); -PropertyMapPtr pContext = m_pImpl-GetTopContextOfType(CONTEXT_SECTION); -SectionPropertyMap* pSectionContext = dynamic_cast SectionPropertyMap* ( pContext.get() ); -OSL_ENSURE(pSectionContext, SectionContext unavailable!); -if(pSectionContext) -pSectionContext-CloseSectionGroup( *m_pImpl ); -m_pImpl-PopProperties(CONTEXT_SECTION); +if (!m_pImpl-isInIndexContext()) +{ +m_pImpl-CheckUnregisteredFrameConversion(); +m_pImpl-ExecuteFrameConversion(); +PropertyMapPtr pContext = m_pImpl-GetTopContextOfType(CONTEXT_SECTION); +SectionPropertyMap* pSectionContext = dynamic_cast SectionPropertyMap* ( pContext.get() ); +OSL_ENSURE(pSectionContext, SectionContext unavailable!); +if(pSectionContext) +pSectionContext-CloseSectionGroup( *m_pImpl ); +m_pImpl-PopProperties(CONTEXT_SECTION); +} } void DomainMapper::lcl_startParagraphGroup() diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index deb4fdd..d67b9eb 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -146,6 +146,7 @@ DomainMapper_Impl::DomainMapper_Impl( m_bIsPageBreakDeferred( false ), m_bStartTOC(false), m_bStartedTOC(false), +m_bStartIndex(false), m_bTOCPageRef(false), m_pLastSectionContext( ), m_pLastCharacterContext(), @@ -172,6 +173,7 @@ DomainMapper_Impl::DomainMapper_Impl( m_aAnnotationPositions(), m_xInsertTextRange(xInsertTextRange), m_bIsNewDoc(bIsNewDoc), +m_bIndexMarkerAdded(false), m_bInTableStyleRunProps(false), m_pSdtHelper(0), m_nTableDepth(0), @@ -1122,7 +1124,7 @@ void DomainMapper_Impl::appendTextPortion( const OUString rString, PropertyMapP uno::Sequence beans::PropertyValue pValues = pPropertyMap-GetPropertyValues(); sal_Int32 len = pValues.getLength(); -if (m_bStartTOC) +if (m_bStartTOC || m_bStartIndex) for( int i =0; i len; ++i ) { if (pValues[i].Name == CharHidden) @@ -1133,11 +1135,11 @@ void DomainMapper_Impl::appendTextPortion( const OUString rString, PropertyMapP if (m_aTextAppendStack.top().xInsertPosition.is()) { xTextRange = xTextAppend-insertTextPortion(rString, pValues, m_aTextAppendStack.top().xInsertPosition); - m_aTextAppendStack.top().xCursor-gotoRange(xTextRange-getEnd(), false); + m_aTextAppendStack.top().xCursor-gotoRange(xTextRange-getEnd(), true); } else { -if (m_bStartTOC) +if (m_bStartTOC || m_bStartIndex) { m_bStartedTOC = true; uno::Reference text::XTextCursor xTOCTextCursor; @@ -1145,8 +1147,11 @@ void DomainMapper_Impl::appendTextPortion( const OUString rString, PropertyMapP xTOCTextCursor-gotoEnd(false); if (xTOCTextCursor.is()) { +if (m_bStartIndex) +xTOCTextCursor-goLeft(1, false); xTextRange = xTextAppend-insertTextPortion(rString, pValues, xTOCTextCursor); xTOCTextCursor
[Libreoffice-commits] core.git: sw/qa sw/source
sw/qa/extras/ooxmlexport/data/fdo73550.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 10 +- sw/source/filter/ww8/attributeoutputbase.hxx |2 +- sw/source/filter/ww8/docxattributeoutput.cxx |5 +++-- sw/source/filter/ww8/docxattributeoutput.hxx |2 +- sw/source/filter/ww8/rtfattributeoutput.cxx |2 +- sw/source/filter/ww8/rtfattributeoutput.hxx |2 +- sw/source/filter/ww8/wrtw8nds.cxx| 10 -- sw/source/filter/ww8/ww8attributeoutput.hxx |2 +- 9 files changed, 25 insertions(+), 10 deletions(-) New commits: commit 36c5078d244e5a757d92cdc0f183ebd11712f6fc Author: Nikhil Walvekar nikhil.walve...@synerzip.com Date: Wed Jan 22 12:22:42 2014 +0530 fdo#73550 : Fix for files having spacing issues due to missing pPr/rPr for empty paragraphs. Change-Id: I7e73a750982a0bd57da602379ea47c8bf9c194fe Reviewed-on: https://gerrit.libreoffice.org/7587 Reviewed-by: Miklos Vajna vmik...@collabora.co.uk Tested-by: Miklos Vajna vmik...@collabora.co.uk diff --git a/sw/qa/extras/ooxmlexport/data/fdo73550.docx b/sw/qa/extras/ooxmlexport/data/fdo73550.docx new file mode 100644 index 000..c6b7f15 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/fdo73550.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index 315fb0b..8f1982d 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -2472,6 +2472,15 @@ DECLARE_OOXMLEXPORT_TEST(testMsoSpt180, mso-spt180.docx) CPPUNIT_ASSERT_EQUAL(OUString(ooxml-borderCallout1), aType); } +DECLARE_OOXMLEXPORT_TEST(testFdo73550, fdo73550.docx) +{ +xmlDocPtr pXmlDocument = parseExport(word/document.xml); +if (!pXmlDocument) +return; +// This was wrap=none. +assertXPath(pXmlDocument, /w:document/w:body/w:p[2]/w:pPr/w:rPr/w:rFonts); +} + DECLARE_OOXMLEXPORT_TEST(testDmlTextshape, dml-textshape.docx) { uno::Referencecontainer::XIndexAccess xGroup(getShape(1), uno::UNO_QUERY); @@ -2512,7 +2521,6 @@ DECLARE_OOXMLEXPORT_TEST(testDrawinglayerPicPos, drawinglayer-pic-pos.docx) // This was 1828800. assertXPath(pXmlDocument, aXPath, y, 0); } - DECLARE_OOXMLEXPORT_TEST(testShapeThemePreservation, shape-theme-preservation.docx) { xmlDocPtr pXmlDocument = parseExport(word/document.xml); diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx b/sw/source/filter/ww8/attributeoutputbase.hxx index 8ed93db..e5b461a 100644 --- a/sw/source/filter/ww8/attributeoutputbase.hxx +++ b/sw/source/filter/ww8/attributeoutputbase.hxx @@ -161,7 +161,7 @@ public: virtual void StartParagraphProperties() = 0; /// Called after we end outputting the attributes. -virtual void EndParagraphProperties(const boost::shared_ptrSfxItemSet pParagraphMarkerProperties, const SwRedlineData* pRedlineData, const SwRedlineData* pRedlineParagraphMarkerDeleted, const SwRedlineData* pRedlineParagraphMarkerInserted) = 0; +virtual void EndParagraphProperties(const SfxItemSet* pParagraphMarkerProperties, const SwRedlineData* pRedlineData, const SwRedlineData* pRedlineParagraphMarkerDeleted, const SwRedlineData* pRedlineParagraphMarkerInserted) = 0; /// Empty paragraph. virtual void EmptyParagraph() = 0; diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index caf2635..c5c2feb 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -502,7 +502,7 @@ void DocxAttributeOutput::WriteCollectedParagraphProperties() } } -void DocxAttributeOutput::EndParagraphProperties( const boost::shared_ptrSfxItemSet pParagraphMarkerProperties, const SwRedlineData* pRedlineData, const SwRedlineData* pRedlineParagraphMarkerDeleted, const SwRedlineData* pRedlineParagraphMarkerInserted) +void DocxAttributeOutput::EndParagraphProperties( const SfxItemSet* pParagraphMarkerProperties, const SwRedlineData* pRedlineData, const SwRedlineData* pRedlineParagraphMarkerDeleted, const SwRedlineData* pRedlineParagraphMarkerInserted) { // Call the 'Redline' function. This will add redline (change-tracking) information that regards to paragraph properties. // This includes changes like 'Bold', 'Underline', 'Strikethrough' etc. @@ -540,7 +540,8 @@ void DocxAttributeOutput::EndParagraphProperties( const boost::shared_ptrSfxIte if( SFX_ITEM_SET == pParagraphMarkerProperties-GetItemState( nWhichId, sal_True, pItem )) { SAL_INFO( sw.ww8, nWhichId nWhichId); -OutputItem( *pItem ); +if (isCHRATR( nWhichId )) +OutputItem( *pItem ); } nWhichId = aIter.NextWhich(); } diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx index
[Libreoffice-commits] core.git: sw/source
sw/source/filter/ww8/docxattributeoutput.cxx | 24 1 file changed, 12 insertions(+), 12 deletions(-) New commits: commit 7e4823772ceb00d18301497fdad1a5b2678872bf Author: Nikhil Walvekar nikhil.walve...@synerzip.com Date: Wed Jan 15 15:23:40 2014 +0530 FILESAVE: DOCX Preserve Font information for Para marker Change-Id: Ic8cb9fec8a62f14e47899056beaededd791b590d Reviewed-on: https://gerrit.libreoffice.org/7438 Tested-by: Adam CloudOn rattles2...@gmail.com Reviewed-by: Adam CloudOn rattles2...@gmail.com diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 20ce7f0..c70a2a4 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -519,6 +519,18 @@ void DocxAttributeOutput::EndParagraphProperties( const boost::shared_ptrSfxIte if(pParagraphMarkerProperties) { +// The 'm_pFontsAttrList', 'm_pEastAsianLayoutAttrList', 'm_pCharLangAttrList' are used to hold information +// that should be collected by different properties in the core, and are all flushed together +// to the DOCX when the function 'WriteCollectedRunProperties' gets called. +// So we need to store the current status of these lists, so that we can revert back to them when +// we are done exporting the redline attributes. +::sax_fastparser::FastAttributeList *pFontsAttrList_Original = m_pFontsAttrList; +::sax_fastparser::FastAttributeList *pEastAsianLayoutAttrList_Original = m_pEastAsianLayoutAttrList; +::sax_fastparser::FastAttributeList *pCharLangAttrList_Original = m_pCharLangAttrList; +m_pFontsAttrList = NULL; +m_pEastAsianLayoutAttrList = NULL; +m_pCharLangAttrList= NULL; + SfxWhichIter aIter( *pParagraphMarkerProperties ); sal_uInt16 nWhichId = aIter.FirstWhich(); const SfxPoolItem* pItem = 0; @@ -532,18 +544,6 @@ void DocxAttributeOutput::EndParagraphProperties( const boost::shared_ptrSfxIte nWhichId = aIter.NextWhich(); } -// The 'm_pFontsAttrList', 'm_pEastAsianLayoutAttrList', 'm_pCharLangAttrList' are used to hold information -// that should be collected by different properties in the core, and are all flushed together -// to the DOCX when the function 'WriteCollectedRunProperties' gets called. -// So we need to store the current status of these lists, so that we can revert back to them when -// we are done exporting the redline attributes. -::sax_fastparser::FastAttributeList *pFontsAttrList_Original = m_pFontsAttrList; -::sax_fastparser::FastAttributeList *pEastAsianLayoutAttrList_Original = m_pEastAsianLayoutAttrList; -::sax_fastparser::FastAttributeList *pCharLangAttrList_Original = m_pCharLangAttrList; -m_pFontsAttrList = NULL; -m_pEastAsianLayoutAttrList = NULL; -m_pCharLangAttrList= NULL; - // Write the collected run properties that are stored in 'm_pFontsAttrList', 'm_pEastAsianLayoutAttrList', 'm_pCharLangAttrList' WriteCollectedRunProperties(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: include/oox oox/source sw/qa sw/source
include/oox/drawingml/customshapeproperties.hxx |3 +++ oox/source/drawingml/customshapeproperties.cxx |1 + oox/source/drawingml/shape.cxx | 12 oox/source/shape/WpsContext.cxx |1 + sw/qa/extras/ooxmlexport/data/fdo70942.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport.cxx|9 + sw/source/filter/ww8/docxattributeoutput.cxx| 23 +++ 7 files changed, 45 insertions(+), 4 deletions(-) New commits: commit 3cf58da99ef152db31fa8378045d4bff041f7ff4 Author: Nikhil Walvekar nikhil.walve...@synerzip.com Date: Fri Jan 10 20:21:45 2014 +0530 fdo#70942 Preserve original shape type, if shape contains text. Currently we change shape type to textframe if a shape contains text. Due to this shape information is not preserved when file is saved. Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx Reviewed on: https://gerrit.libreoffice.org/7372 Change-Id: I7af3ce29f857d6fa2ceab0350937d91638361e7c diff --git a/include/oox/drawingml/customshapeproperties.hxx b/include/oox/drawingml/customshapeproperties.hxx index e6df846..fdf8d49 100644 --- a/include/oox/drawingml/customshapeproperties.hxx +++ b/include/oox/drawingml/customshapeproperties.hxx @@ -135,6 +135,8 @@ public: sal_Int32 getShapePresetType() const { return mnShapePresetType; } OUString getShapePresetTypeName() const; void setShapePresetType( sal_Int32 nShapePresetType ){ mnShapePresetType = nShapePresetType; }; +sal_BoolgetShapeTypeOverride(){ return mbShapeTypeOverride; }; +voidsetShapeTypeOverride( sal_Bool bShapeTypeOverride ) { mbShapeTypeOverride = bShapeTypeOverride; }; std::vector CustomShapeGuide getAdjustmentGuideList(){ return maAdjustmentGuideList; }; std::vector CustomShapeGuide getGuideList(){ return maGuideList; }; @@ -155,6 +157,7 @@ public: private: sal_Int32 mnShapePresetType; +sal_BoolmbShapeTypeOverride; std::vector CustomShapeGuide maAdjustmentGuideList; std::vector CustomShapeGuide maGuideList; std::vector AdjustHandle maAdjustHandleList; diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx index 247e8cf..cdc6974 100644 --- a/oox/source/drawingml/customshapeproperties.cxx +++ b/oox/source/drawingml/customshapeproperties.cxx @@ -44,6 +44,7 @@ namespace oox { namespace drawingml { CustomShapeProperties::CustomShapeProperties() : mnShapePresetType ( -1 ) +, mbShapeTypeOverride(sal_False) , mbMirroredX ( sal_False ) , mbMirroredY ( sal_False ) , mnTextRotateAngle ( 0 ) diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index 9437f02..eff9ad4 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -621,6 +621,18 @@ Reference XShape Shape::createAndInsert( { if (aServiceName == com.sun.star.text.TextFrame) { +if (mpCustomShapePropertiesPtr != NULL mpCustomShapePropertiesPtr-getShapeTypeOverride()) +{ +uno::Referencebeans::XPropertySet propertySet (mxShape, uno::UNO_QUERY); +uno::Sequencebeans::PropertyValue aGrabBag; +propertySet-getPropertyValue(FrameInteropGrabBag) = aGrabBag; +sal_Int32 length = aGrabBag.getLength(); +aGrabBag.realloc( length+1); +aGrabBag[length].Name = mso-orig-shape-type; +aGrabBag[length].Value = uno::makeAny(mpCustomShapePropertiesPtr-getShapePresetTypeName()); + propertySet-setPropertyValue(FrameInteropGrabBag,uno::makeAny(aGrabBag)); +} + // TextFrames have BackColor, not FillColor if (aShapeProps.hasProperty(PROP_FillColor)) { diff --git a/oox/source/shape/WpsContext.cxx b/oox/source/shape/WpsContext.cxx index e2bbb0e..04e8a23 100644 --- a/oox/source/shape/WpsContext.cxx +++ b/oox/source/shape/WpsContext.cxx @@ -101,6 +101,7 @@ oox::core::ContextHandlerRef WpsContext::onCreateContext(sal_Int32 nElementToken } break; case XML_txbx: +mpShape-getCustomShapeProperties()-setShapeTypeOverride(true); mpShape-setServiceName(com.sun.star.text.TextFrame); break; default: diff --git a/sw/qa/extras/ooxmlexport/data/fdo70942.docx b/sw/qa/extras/ooxmlexport/data/fdo70942.docx new file mode 100644 index 000..a04a784 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/fdo70942.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index d4f5e3f..95b2cb2 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
[Libreoffice-commits] core.git: sw/source
sw/source/filter/ww8/docxsdrexport.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit 96dcea05d2aedceeb27f9506b4178c664be5f80b Author: Nikhil Walvekar nikhil.walve...@synerzip.com Date: Fri Dec 27 13:49:14 2013 +0530 fdo#73046 DOCX For anchor tag relativeHeight attribute should be always present. Change-Id: Ib54651878b6343e2ab8bb11a13c11289dd0f72f6 Reviewed-on: https://gerrit.libreoffice.org/7208 Reviewed-by: Miklos Vajna vmik...@collabora.co.uk Tested-by: Miklos Vajna vmik...@collabora.co.uk diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx index a714e55..15a7b0e 100644 --- a/sw/source/filter/ww8/docxsdrexport.cxx +++ b/sw/source/filter/ww8/docxsdrexport.cxx @@ -93,6 +93,9 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrmFmt* pFrmFmt, const Size rS attrList-add(XML_allowOverlap, 1); // TODO if (const SdrObject* pObj = pFrmFmt-FindRealSdrObject()) attrList-add(XML_relativeHeight, OString::number(pObj-GetOrdNum())); +else +// relativeHeight is mandatory attribute, if value is not present, we must write default value +attrList-add(XML_relativeHeight, 0); sax_fastparser::XFastAttributeListRef xAttrList(attrList); m_pImpl-m_pSerializer-startElementNS(XML_wp, XML_anchor, xAttrList); m_pImpl-m_pSerializer-singleElementNS(XML_wp, XML_simplePos, XML_x, 0, XML_y, 0, FSEND); // required, unused ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source
sw/source/filter/ww8/ww8atr.cxx | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) New commits: commit 828113d2293638e33ffe9e2737e09d2cd6c3b0e9 Author: Nikhil Walvekar nikhil.walve...@synerzip.com Date: Mon Dec 16 12:22:02 2013 +0530 FILESAVE: DOCX. Added null check to avoid crash. Change-Id: I6f61d69702f77f0291ad25f5c39974d263d273e8 Reviewed-on: https://gerrit.libreoffice.org/7096 Reviewed-by: Caolán McNamara caol...@redhat.com Tested-by: Caolán McNamara caol...@redhat.com diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index c2f3d58..0c407ee 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -2229,11 +2229,14 @@ void AttributeOutputBase::StartTOX( const SwSection rSect ) if( !sStyle.isEmpty() ) { SwTxtFmtColl* pColl = GetExport().pDoc-FindTxtFmtCollByName(sStyle); -if (!pColl-IsAssignedToListLevelOfOutlineStyle() || pColl-GetAssignedOutlineStyleLevel() nTOXLvl) +if (pColl) { -if( !sTOption.isEmpty() ) -sTOption += ,; -sTOption += sStyle + sLvl; +if (!pColl-IsAssignedToListLevelOfOutlineStyle() || pColl-GetAssignedOutlineStyleLevel() nTOXLvl) +{ +if( !sTOption.isEmpty() ) +sTOption += ,; +sTOption += sStyle + sLvl; +} } } } while( -1 != nPos ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: writerfilter/source
writerfilter/source/dmapper/DomainMapper.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 910ec33b72fa7675e606c4389d50d3a0d4adbe45 Author: Nikhil Walvekar nikhil.walve...@synerzip.com Date: Tue Dec 17 20:04:30 2013 +0530 fdo#72790 Clear interop grab bag name, once grab bag is cleared. This fixes problem while exporting documents containing table styles. Change-Id: I0c39ab18eda3b4aacbccfa9d5a6b0d3ac7ab005c Reviewed-on: https://gerrit.libreoffice.org/7120 Reviewed-by: Miklos Vajna vmik...@collabora.co.uk Tested-by: Miklos Vajna vmik...@collabora.co.uk diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index 1ee9e2d..bc5d2bf 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -4440,6 +4440,7 @@ beans::PropertyValue DomainMapper::getInteropGrabBag() *pSeq++ = *i; m_pImpl-m_aInteropGrabBag.clear(); +m_pImpl-m_aInteropGrabBagName = ; aRet.Value = uno::makeAny(aSeq); return aRet; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: filter/source include/filter include/oox oox/source sw/source
filter/source/msfilter/escherex.cxx | 11 +++ filter/source/msfilter/eschesdo.cxx | 14 +++--- filter/source/msfilter/eschesdo.hxx |4 ++-- include/filter/msfilter/escherex.hxx |8 +--- include/oox/export/vmlexport.hxx |2 +- oox/source/export/vmlexport.cxx |4 ++-- sw/source/filter/ww8/docxattributeoutput.cxx |2 +- 7 files changed, 25 insertions(+), 20 deletions(-) New commits: commit 8fe352be80ff69552f622f3c7a6a6f269912ab71 Author: Nikhil Walvekar nikhil.walve...@synerzip.com Date: Fri Nov 29 14:03:46 2013 +0530 fdo#65836 Do not compress WMF / EMF file incase of OOXML export Change-Id: Ic498e5703ab48719f998be6da3f245843cc0979d Reviewed-on: https://gerrit.libreoffice.org/6849 Reviewed-by: Miklos Vajna vmik...@collabora.co.uk Tested-by: Miklos Vajna vmik...@collabora.co.uk diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 4f94859..1f41f2b 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -1429,7 +1429,7 @@ sal_Bool EscherPropertyContainer::CreateEmbeddedHatchProperties( const ::com::su sal_Bool EscherPropertyContainer::CreateGraphicProperties( const ::com::sun::star::uno::Reference ::com::sun::star::beans::XPropertySet rXPropSet, const OUString rSource, const sal_Bool bCreateFillBitmap, const sal_Bool bCreateCroppingAttributes, -const sal_Bool bFillBitmapModeAllowed ) +const sal_Bool bFillBitmapModeAllowed, const sal_Bool bOOxmlExport ) { sal_BoolbRetValue = sal_False; sal_BoolbCreateFillStyles = sal_False; @@ -1743,7 +1743,7 @@ sal_Bool EscherPropertyContainer::CreateGraphicProperties( SvMemoryStream aMemStrm; Rectangle aRect; -if ( aProvider.GetBlibID( aMemStrm, aUniqueId, aRect, NULL, pGraphicAttr ) ) +if ( aProvider.GetBlibID( aMemStrm, aUniqueId, aRect, NULL, pGraphicAttr, bOOxmlExport ) ) { // grab BLIP from stream and insert directly as complex property // ownership of stream memory goes to complex property @@ -4231,7 +4231,8 @@ sal_Bool EscherGraphicProvider::GetPrefSize( const sal_uInt32 nBlibId, Size rPr } sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream rPicOutStrm, const OString rId, -const Rectangle /* rBoundRect */, const com::sun::star::awt::Rectangle* pVisArea, const GraphicAttr* pGraphicAttr ) +const Rectangle /* rBoundRect */, const com::sun::star::awt::Rectangle* pVisArea, +const GraphicAttr* pGraphicAttr, const sal_Bool bOOxmlExport ) { sal_uInt32 nBlibId = 0; GraphicObject aGraphicObject( rId ); @@ -4367,7 +4368,9 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream rPicOutStrm, const OStrin else if ( eBlibType == PEG ) rPicOutStrm (sal_uInt16)0x0505; } -if ( ( eBlibType == PEG ) || ( eBlibType == PNG ) ) +// #69607 do not compress WMF files if we are in OOXML export +if ( ( eBlibType == PEG ) || ( eBlibType == PNG ) || +( ( ( eBlibType == WMF ) || ( eBlibType == EMF ) ) bOOxmlExport ) ) { nExtra = 17; p_EscherBlibEntry-mnSizeExtra = nExtra + 8; diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx index ca78c69..16311df 100644 --- a/filter/source/msfilter/eschesdo.cxx +++ b/filter/source/msfilter/eschesdo.cxx @@ -173,7 +173,7 @@ void ImplEESdrWriter::MapRect(ImplEESdrObject /* rObj */ ) sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject rObj, EscherSolverContainer rSolverContainer, -ImplEESdrPageType ePageType ) +ImplEESdrPageType ePageType, const sal_Bool bOOxmlExport ) { sal_uInt32 nShapeID = 0; sal_uInt16 nShapeType = 0; @@ -209,7 +209,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject rObj, ImplEESdrObject aObj( *this, *(Reference XShape *) xXIndexAccess-getByIndex( n ).getValue() ); if( aObj.IsValid() ) -ImplWriteShape( aObj, rSolverContainer, ePageType ); +ImplWriteShape( aObj, rSolverContainer, ePageType, bOOxmlExport ); } mpEscherEx-LeaveGroup(); } @@ -551,7 +551,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject rObj, else { ADD_SHAPE( ESCHER_ShpInst_PictureFrame, 0xa00
License statement : Synerzip
Hi All, For the record, All contributions past and present made to LibreOffice from Synerzip are available under the terms the MPL / LGPLv3+. Until further notice, future contributions made to LibreOffice from Synerzip are available under the terms the MPL / LGPLv3+. Regards, Nikhil -- This e-mail, including any attached files, may contain confidential and privileged information for the sole use of the intended recipient. Any review, use, distribution, or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive information for the intended recipient), please contact the sender by reply e-mail and delete all copies of this message. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: sw/qa
sw/qa/extras/ooxmlexport/data/para-auto-spacing.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport.cxx |9 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) New commits: commit c3702eb165ce0f0841ef1a166ae361e9616c77fb Author: Nikhil Walvekar nikhil.walve...@synerzip.com Date: Tue Nov 19 14:18:26 2013 +0530 DOCX: Enhacing unit test para auto spacing Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx Change-Id: I589b76d0229a3dc4b5822e14399f7dbd9e7a31f8 Reviewed-on: https://gerrit.libreoffice.org/6718 Tested-by: Caolán McNamara caol...@redhat.com Reviewed-by: Caolán McNamara caol...@redhat.com diff --git a/sw/qa/extras/ooxmlexport/data/para-auto-spacing.docx b/sw/qa/extras/ooxmlexport/data/para-auto-spacing.docx index c7604bf..3cc8bd6 100644 Binary files a/sw/qa/extras/ooxmlexport/data/para-auto-spacing.docx and b/sw/qa/extras/ooxmlexport/data/para-auto-spacing.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index 019aeb1..5390ed5 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -1909,8 +1909,13 @@ DECLARE_OOXMLEXPORT_TEST(testParaAutoSpacing, para-auto-spacing.docx) xmlDocPtr pXmlDoc = parseExport(); if (!pXmlDoc) return; -CPPUNIT_ASSERT(getXPath(pXmlDoc, /w:document/w:body/w:p/w:pPr/w:spacing, beforeAutospacing).match(1)); -CPPUNIT_ASSERT(getXPath(pXmlDoc, /w:document/w:body/w:p/w:pPr/w:spacing, afterAutospacing).match(1)); +assertXPath(pXmlDoc, /w:document/w:body/w:p[1]/w:pPr/w:spacing, beforeAutospacing,1); +assertXPath(pXmlDoc, /w:document/w:body/w:p[1]/w:pPr/w:spacing, afterAutospacing,1); + +assertXPath(pXmlDoc, /w:document/w:body/w:p[2]/w:pPr/w:spacing, beforeAutospacing,); +assertXPath(pXmlDoc, /w:document/w:body/w:p[2]/w:pPr/w:spacing, afterAutospacing,); +assertXPath(pXmlDoc, /w:document/w:body/w:p[2]/w:pPr/w:spacing, before,400); +assertXPath(pXmlDoc, /w:document/w:body/w:p[2]/w:pPr/w:spacing, after,400); } DECLARE_OOXMLEXPORT_TEST(testGIFImageCrop, test_GIF_ImageCrop.docx) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits