From 8328def688c1bd217ff0c05716e03cb55ce5a246 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Nov 07 2016 17:12:24 +0000 Subject: google docs can generate a pptx with an empty cmLst --- diff --git a/0001-google-docs-can-generate-a-pptx-with-an-empty-cmLst.patch b/0001-google-docs-can-generate-a-pptx-with-an-empty-cmLst.patch new file mode 100644 index 0000000..287e602 --- /dev/null +++ b/0001-google-docs-can-generate-a-pptx-with-an-empty-cmLst.patch @@ -0,0 +1,45 @@ +From e6157763e9fff300b86f3c17398216f306ba3f32 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Mon, 7 Nov 2016 17:06:54 +0000 +Subject: [PATCH] google docs can generate a pptx with an empty cmLst + +Change-Id: I2a3dcae5361929c6880b2da1b3107cb2c8141f32 +--- + oox/source/ppt/presentationfragmenthandler.cxx | 21 ++++++++++++--------- + 1 file changed, 12 insertions(+), 9 deletions(-) + +diff --git a/oox/source/ppt/presentationfragmenthandler.cxx b/oox/source/ppt/presentationfragmenthandler.cxx +index 944f134..b67eb8b 100644 +--- a/oox/source/ppt/presentationfragmenthandler.cxx ++++ b/oox/source/ppt/presentationfragmenthandler.cxx +@@ -325,15 +325,18 @@ void PresentationFragmentHandler::importSlide(sal_uInt32 nSlide, bool bFirstPage + pCommentsPersistPtr->getCommentsList().cmLst.clear(); + importSlide( xCommentsFragmentHandler, pCommentsPersistPtr ); + +- //set comment chars for last comment on slide +- SlideFragmentHandler* comment_handler = +- dynamic_cast(xCommentsFragmentHandler.get()); +- // some comments have no text -> set empty string as text to avoid +- // crash (back() on empty vector is undefined) and losing other +- // comment data that might be there (author, position, timestamp etc.) +- pCommentsPersistPtr->getCommentsList().cmLst.back().setText( +- comment_handler->getCharVector().empty() ? "" : +- comment_handler->getCharVector().back() ); ++ if (!pCommentsPersistPtr->getCommentsList().cmLst.empty()) ++ { ++ //set comment chars for last comment on slide ++ SlideFragmentHandler* comment_handler = ++ dynamic_cast(xCommentsFragmentHandler.get()); ++ // some comments have no text -> set empty string as text to avoid ++ // crash (back() on empty vector is undefined) and losing other ++ // comment data that might be there (author, position, timestamp etc.) ++ pCommentsPersistPtr->getCommentsList().cmLst.back().setText( ++ comment_handler->getCharVector().empty() ? "" : ++ comment_handler->getCharVector().back() ); ++ } + pCommentsPersistPtr->getCommentAuthors().setValues(maAuthorList); + + //insert all comments from commentsList +-- +2.9.3 + diff --git a/libreoffice.spec b/libreoffice.spec index 38e436f..e65ee18 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -293,6 +293,7 @@ Patch57: 0001-remove-OpenGL-transitions-config.-file-from-scheme.patch Patch58: 0001-Resolves-tdf-103472-gtk3-dnd-must-clear-listener-aft.patch Patch59: 0001-in-msword-the-hard-break-between-image-and-caption-h.patch Patch60: 0001-ensure-checkForUniqueItem-on-inserting-a-new-slide.patch +Patch61: 0001-google-docs-can-generate-a-pptx-with-an-empty-cmLst.patch %if ! 0%{?rhel} Patch400: 0001-Update-liborcus-to-0.11.0.patch @@ -2372,6 +2373,7 @@ done - tdf#103472 gtk3 dnd must clear listener after dragDropEnd dispatch - improve caption export to .doc - ensure checkForUniqueItem on inserting a new slide +- google docs can generate a pptx with an empty cmLst * Fri Oct 21 2016 Caolán McNamara - 1:5.1.6.2-2 - implement CryptoAPI RC4 + SHA1 encryption scheme for xls