[Libreoffice-commits] core.git: starmath/source

Takeshi Abe tabe at fixedpoint.jp
Wed Jan 4 14:01:19 UTC 2017


 starmath/source/view.cxx |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit 49f10e92dc1a9bd563f4a8620f6e6019e5d6a683
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Wed Jan 4 18:20:11 2017 +0900

    starmath: SmGraphicWindow requires non-null pViewShell
    
    Change-Id: Ic1e0f3f7aefb801cdda4709c3d43794ad9a21b02
    Reviewed-on: https://gerrit.libreoffice.org/32722
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Tested-by: Michael Stahl <mstahl at redhat.com>

diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index e046400..0311b1b 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -99,6 +99,7 @@ SmGraphicWindow::SmGraphicWindow(SmViewShell* pShell)
     , pViewShell(pShell)
     , nZoom(100)
 {
+    assert(pViewShell);
     // docking windows are usually hidden (often already done in the
     // resource) and will be shown by the sfx framework.
     Hide();
@@ -370,8 +371,6 @@ const SmNode * SmGraphicWindow::SetCursorPos(sal_uInt16 nRow, sal_uInt16 nCol)
 
 void SmGraphicWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
 {
-    SAL_WARN_IF(!pViewShell, "starmath", "view shell missing");
-
     ApplyColorConfigValues(SM_MOD()->GetColorConfig());
 
     SmDocShell& rDoc = *pViewShell->GetDoc();
@@ -547,7 +546,6 @@ void SmGraphicWindow::Command(const CommandEvent& rCEvt)
                 Point aPos(5, 5);
                 if (rCEvt.IsMouseEvent())
                     aPos = rCEvt.GetMousePosPixel();
-                SAL_WARN_IF( !pViewShell, "starmath", "view shell missing" );
 
                 // added for replaceability of context menus
                 SfxDispatcher::ExecutePopup( this, &aPos );


More information about the Libreoffice-commits mailing list