[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - sc/source

Mike Kaganski mike.kaganski at collabora.com
Tue Mar 13 10:38:29 UTC 2018


 sc/source/ui/view/prevwsh.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit e722d9a406da01514bb256def98624da3eafee0c
Author: Mike Kaganski <mike.kaganski at collabora.com>
Date:   Mon Mar 12 10:07:06 2018 +0300

    tdf#103175: Initialize DrawLayer if required
    
    Change-Id: Ia99dd1e349e807d339dce0ead518a72a31e0fc02
    Reviewed-on: https://gerrit.libreoffice.org/51096
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
    (cherry picked from commit de53d4690d25b9f1bbc0def6c66ce5b45b2fdc96)
    Reviewed-on: https://gerrit.libreoffice.org/51110
    Reviewed-by: Xisco FaulĂ­ <xiscofauli at libreoffice.org>

diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index 8fe89c51673b..281d10f8d569 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -940,7 +940,8 @@ void ScPreviewShell::WriteUserDataSequence(uno::Sequence < beans::PropertyValue
     }
 
     // Common SdrModel processing
-    GetDocument().GetDrawLayer()->WriteUserDataSequence(rSeq);
+    if (ScDrawLayer* pDrawLayer = GetDocument().GetDrawLayer())
+        pDrawLayer->WriteUserDataSequence(rSeq);
 }
 
 void ScPreviewShell::ReadUserDataSequence(const uno::Sequence < beans::PropertyValue >& rSeq)
@@ -967,7 +968,7 @@ void ScPreviewShell::ReadUserDataSequence(const uno::Sequence < beans::PropertyV
                         pPreview->SetPageNo(nTemp);
                 }
                 // Fallback to common SdrModel processing
-                else GetDocument().GetDrawLayer()->ReadUserDataSequenceValue(pSeq);
+                else pDocShell->MakeDrawLayer()->ReadUserDataSequenceValue(pSeq);
             }
         }
     }


More information about the Libreoffice-commits mailing list