[Libreoffice-commits] core.git: 2 commits - sfx2/source svx/source

Michael Stahl mstahl at redhat.com
Thu Mar 6 15:31:06 PST 2014


 sfx2/source/doc/templatedlg.cxx |    7 +++++--
 svx/source/dialog/svxruler.cxx  |    3 +++
 2 files changed, 8 insertions(+), 2 deletions(-)

New commits:
commit 6b6ec280f3d7f35fb9c8c8ba92a31d51ab4dca16
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Mar 7 00:24:52 2014 +0100

    fdo#74787, rhbz#1072553: fix Template Mananger import crash
    
    File dialog causes call to ThumbnailView::LoseFocus() and clears
    selected folders.
    
    (regression from 0314034d8b23d5b69399cfcdf6b2f2add73f9f47)
    
    Change-Id: Ic5f2602e9dd1d12aad8c68c48f6bbb119ee6492c

diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index a853a33..2741d71 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -901,6 +901,9 @@ void SfxTemplateManagerDlg::OnTemplateImport ()
     aFileDlg.AddFilter( sFilterName, sFilterExt );
     aFileDlg.SetCurrentFilter( sFilterName );
 
+    // fdo#74787 file dialog causes ThumbnailView::LoseFocus() - save selection
+    std::set<const ThumbnailViewItem*,selection_cmp_fn> selFolders(maSelFolders);
+
     ErrCode nCode = aFileDlg.Execute();
 
     if ( nCode == ERRCODE_NONE )
@@ -909,11 +912,11 @@ void SfxTemplateManagerDlg::OnTemplateImport ()
 
         if (aFiles.hasElements())
         {
-            if (!maSelFolders.empty())
+            if (!selFolders.empty())
             {
                 //Import to the selected regions
                 std::set<const ThumbnailViewItem*,selection_cmp_fn>::const_iterator pIter;
-                for (pIter = maSelFolders.begin(); pIter != maSelFolders.end(); ++pIter)
+                for (pIter = selFolders.begin(); pIter != selFolders.end(); ++pIter)
                 {
                     OUString aTemplateList;
                     TemplateContainerItem *pFolder = (TemplateContainerItem*)(*pIter);
commit 958616a323b7fe6b42cd642394cd90a9cd82e7f9
Author: Michael Stahl <mstahl at redhat.com>
Date:   Thu Mar 6 22:25:55 2014 +0100

    rhbz#1072607: (hopefully) fix crash in SvxRuler::MouseMove()
    
    Not sure why mpParaItem is 0 here, add a check like in every other
    SvxRuler method.
    
    (regression from 47a77d7dbc427e51421e2df8d59695834cb74980)
    
    Change-Id: Ic11a4d0c9b6ca217cd59d1d3f6789592996d2c1d

diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx
index 9a51bcb..80e3b4d 100644
--- a/svx/source/dialog/svxruler.cxx
+++ b/svx/source/dialog/svxruler.cxx
@@ -581,6 +581,9 @@ void SvxRuler::MouseMove( const MouseEvent& rMEvt )
     {
         case RULER_TYPE_INDENT:
         {
+            if (!mpParaItem.get())
+                break;
+
             long nIndex = aSelection.nAryPos + INDENT_GAP;
 
             long nIndentValue = 0.0;


More information about the Libreoffice-commits mailing list