From 6d861349df08331b4389bb9d0ddff65fc1af7b95 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Jul 18 2014 09:11:26 +0000 Subject: Resolves: rhbz#1117853 nStartPara of EE_PARA_NOT_FOUND --- diff --git a/0001-Related-rhbz-1117853-nStartPara-of-EE_PARA_NOT_FOUND.patch b/0001-Related-rhbz-1117853-nStartPara-of-EE_PARA_NOT_FOUND.patch deleted file mode 100644 index 4af2864..0000000 --- a/0001-Related-rhbz-1117853-nStartPara-of-EE_PARA_NOT_FOUND.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 48ff16650348b44ae3d78d7cc7b2dc2d92309de7 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= -Date: Thu, 17 Jul 2014 13:48:30 +0100 -Subject: [PATCH] Related: rhbz#1117853 nStartPara of EE_PARA_NOT_FOUND - -we know that nStartPara is EE_PARA_NOT_FOUND so rOutliner.GetAbsPos must have -returned that, but we don't know the circumstances that lead to that yet. - -Change-Id: I53a488317d154b4a3c050248b8737da0a611ca43 ---- - editeng/source/outliner/outliner.cxx | 2 +- - sd/source/ui/view/outlnvsh.cxx | 3 +-- - 2 files changed, 2 insertions(+), 3 deletions(-) - -diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx -index a8e3d66..6aaa3fe 100644 ---- a/editeng/source/outliner/outliner.cxx -+++ b/editeng/source/outliner/outliner.cxx -@@ -399,7 +399,7 @@ OutlinerParaObject* Outliner::CreateParaObject( sal_Int32 nStartPara, sal_Int32 - if ( ( nStartPara + nCount ) > pEditEngine->GetParagraphCount() ) - nCount = pEditEngine->GetParagraphCount() - nStartPara; - -- if( !nCount ) -+ if (nCount <= 0) - return NULL; - - EditTextObject* pText = pEditEngine->CreateTextObject( nStartPara, nCount ); -diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx -index f787857..8ff50d1 100644 ---- a/sd/source/ui/view/outlnvsh.cxx -+++ b/sd/source/ui/view/outlnvsh.cxx -@@ -1674,7 +1674,6 @@ bool OutlineViewShell::UpdateTitleObject( SdPage* pPage, Paragraph* pPara ) - - ::Outliner* pOutliner = pOlView->GetOutliner(); - SdrTextObj* pTO = pOlView->GetTitleTextObject( pPage ); -- OutlinerParaObject* pOPO = NULL; - - OUString aTest = pOutliner->GetText(pPara); - bool bText = !aTest.isEmpty(); -@@ -1691,9 +1690,9 @@ bool OutlineViewShell::UpdateTitleObject( SdPage* pPage, Paragraph* pPara ) - } - - // if we have a title object and a text, set the text -+ OutlinerParaObject* pOPO = pTO ? pOutliner->CreateParaObject(pOutliner->GetAbsPos(pPara), 1) : NULL; - if( pTO ) - { -- pOPO = pOutliner->CreateParaObject( pOutliner->GetAbsPos( pPara ), 1 ); - pOPO->SetOutlinerMode( OUTLINERMODE_TITLEOBJECT ); - pOPO->SetVertical( pTO->IsVerticalWriting() ); - if( pTO->GetOutlinerParaObject() && (pOPO->GetTextObject() == pTO->GetOutlinerParaObject()->GetTextObject()) ) --- -1.9.3 - diff --git a/0001-Resolves-fdo-81487-pasting-into-outline-view-crashes.patch b/0001-Resolves-fdo-81487-pasting-into-outline-view-crashes.patch new file mode 100644 index 0000000..4cbecd5 --- /dev/null +++ b/0001-Resolves-fdo-81487-pasting-into-outline-view-crashes.patch @@ -0,0 +1,48 @@ +From a5793f5e0013b156600fd718d8f77870a9e73032 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Fri, 18 Jul 2014 09:06:44 +0100 +Subject: [PATCH] Resolves: fdo#81487 pasting into outline view crashes impress + +CreateTitleTextObject will call indirectly ImpPageChange which +triggers tools::EventMultiplexerEvent::EID_PAGE_ORDER and so +in outlview.cxx without ignore page changes level in action +the outliner is filled in from the slide contents in +FillOutliner clearing the outliner contents and filling it +fresh, but.. + +a) this hack tower is not prepared for all the outliner +iterators to become invalid +b) the contents of this title object is empty, because +it was just created, and we didn't get a chance to fill +in its text. + +This all works for typing vs pasting because the KeyInput +uses the OutlineViewPageChangesGuard guard which sets the +ignore pages changes bit. + +So, given that OutlineView::UpdateDocument expects +the iterators of the outliner to be valid during +the lifetime of the method lock the full method with +the OutlineViewPageChangesGuard guard + +Change-Id: Iecbf37d54f5f0c5a181be5f27832f769a3d2e389 +--- + sd/source/ui/view/outlview.cxx | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx +index 268a32b..a76bb0b 100644 +--- a/sd/source/ui/view/outlview.cxx ++++ b/sd/source/ui/view/outlview.cxx +@@ -1535,6 +1535,8 @@ void OutlineView::EndModelChange() + /** updates all changes in the outliner model to the draw model */ + void OutlineView::UpdateDocument() + { ++ OutlineViewPageChangesGuard aGuard(this); ++ + const sal_uInt32 nPageCount = mrDoc.GetSdPageCount(PK_STANDARD); + Paragraph* pPara = mrOutliner.GetParagraph( 0 ); + sal_uInt32 nPage; +-- +1.9.3 + diff --git a/libreoffice.spec b/libreoffice.spec index 600a6d5..a146113 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -307,7 +307,7 @@ Patch49: 0001-fdo-79151-No-need-to-offset-column-index-by-category.patch Patch50: 0001-resolved-fdo-79441-keep-3D-references-intact-during-.patch Patch51: 0001-resolved-fdo-77018-keep-external-references-intact-d.patch Patch52: 0001-scrolling-very-slow-in-calc.patch -Patch53: 0001-Related-rhbz-1117853-nStartPara-of-EE_PARA_NOT_FOUND.patch +Patch53: 0001-Resolves-fdo-81487-pasting-into-outline-view-crashes.patch %define instdir %{_libdir} %define baseinstdir %{instdir}/libreoffice @@ -2258,9 +2258,9 @@ update-desktop-database %{_datadir}/applications &> /dev/null || : %endif %changelog -* Thu Jul 17 2014 Caolán McNamara - 1:4.2.5.2-7-UNBUILT -- speculative fix for scrolling woes in calc -- Related: rhbz#1117853 nStartPara of EE_PARA_NOT_FOUND +* Fri Jul 18 2014 Caolán McNamara - 1:4.2.5.2-8 +- Resolves: rhbz#1117853 nStartPara of EE_PARA_NOT_FOUND +- Related: rhbz#1089466 speculative fix for scrolling woes in calc * Tue Jul 15 2014 Eike Rathke - 1:4.2.5.2-6 - Resolves: rhbz#1118983 sorting breaks cell references to other sheets