Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/1659

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/59/1659/1

fix a bunch of more crashes when setting personas

Change-Id: I6c2c398e074a41c3173bff57bc12496b4c2032b4
---
M basctl/source/basicide/baside2b.cxx
M basctl/source/basicide/layout.cxx
M basctl/source/basicide/linenumberwindow.cxx
3 files changed, 13 insertions(+), 11 deletions(-)



diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index e4d7350..ffa93e4 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -666,8 +666,8 @@
         && (rDCEvt.GetFlags() & SETTINGS_STYLE) != 0)
     {
         Color aColor(GetSettings().GetStyleSettings().GetFieldColor());
-        if (aColor
-            != rDCEvt.GetOldSettings()->GetStyleSettings().GetFieldColor())
+        const AllSettings* pOldSettings = rDCEvt.GetOldSettings();
+        if (!pOldSettings || aColor != pOldSettings->GetStyleSettings().GetFieldColor())
         {
             SetBackground(Wallpaper(aColor));
             Invalidate();
@@ -675,8 +675,8 @@
         if (pEditEngine != 0)
         {
             aColor = GetSettings().GetStyleSettings().GetFieldTextColor();
-            if (aColor != rDCEvt.GetOldSettings()->
-                GetStyleSettings().GetFieldTextColor())
+            if (!pOldSettings || aColor !=
+                    pOldSettings-> GetStyleSettings().GetFieldTextColor())
             {
                 Font aFont(pEditEngine->GetFont());
                 aFont.SetColor(aColor);
@@ -1166,8 +1166,8 @@
         && (rDCEvt.GetFlags() & SETTINGS_STYLE) != 0)
     {
         Color aColor(GetSettings().GetStyleSettings().GetFieldColor());
-        if (aColor
-            != rDCEvt.GetOldSettings()->GetStyleSettings().GetFieldColor())
+        const AllSettings* pOldSettings = rDCEvt.GetOldSettings();
+        if (!pOldSettings || aColor != pOldSettings->GetStyleSettings().GetFieldColor())
         {
             setBackgroundColor(aColor);
             Invalidate();
@@ -1690,8 +1690,8 @@
         && (rDCEvt.GetFlags() & SETTINGS_STYLE) != 0)
     {
         Color aColor(GetSettings().GetStyleSettings().GetFaceColor());
-        if (aColor
-            != rDCEvt.GetOldSettings()->GetStyleSettings().GetFaceColor())
+        const AllSettings* pOldSettings = rDCEvt.GetOldSettings();
+        if (!pOldSettings || aColor != pOldSettings->GetStyleSettings().GetFaceColor())
         {
             SetBackground(Wallpaper(aColor));
             Invalidate();
diff --git a/basctl/source/basicide/layout.cxx b/basctl/source/basicide/layout.cxx
index e679a4f..344345f 100644
--- a/basctl/source/basicide/layout.cxx
+++ b/basctl/source/basicide/layout.cxx
@@ -135,13 +135,14 @@
     {
         bool bInvalidate = false;
         Color aColor = GetSettings().GetStyleSettings().GetWindowColor();
-        if (aColor != rDCEvt.GetOldSettings()->GetStyleSettings().GetWindowColor())
+        const AllSettings* pOldSettings = rDCEvt.GetOldSettings();
+        if (!pOldSettings || aColor != pOldSettings->GetStyleSettings().GetWindowColor())
         {
             SetBackground(Wallpaper(aColor));
             bInvalidate = true;
         }
         aColor = GetSettings().GetStyleSettings().GetWindowTextColor();
-        if (aColor != rDCEvt.GetOldSettings()->GetStyleSettings().GetWindowTextColor())
+        if (!pOldSettings || aColor != pOldSettings->GetStyleSettings().GetWindowTextColor())
         {
             Font aFont(GetFont());
             aFont.SetColor(aColor);
diff --git a/basctl/source/basicide/linenumberwindow.cxx 
b/basctl/source/basicide/linenumberwindow.cxx
index 6e81075..79edc16 100644
--- a/basctl/source/basicide/linenumberwindow.cxx
+++ b/basctl/source/basicide/linenumberwindow.cxx
@@ -98,7 +98,8 @@
         && (rDCEvt.GetFlags() & SETTINGS_STYLE) != 0)
     {
         Color aColor(GetSettings().GetStyleSettings().GetFieldColor());
-        if (aColor != rDCEvt.GetOldSettings()->GetStyleSettings().GetFieldColor())
+        const AllSettings* pOldSettings = rDCEvt.GetOldSettings();
+        if (!pOldSettings || aColor != pOldSettings->GetStyleSettings().GetFieldColor())
         {
             SetBackground(Wallpaper(aColor));
             Invalidate();

-- 
To view, visit https://gerrit.libreoffice.org/1659
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6c2c398e074a41c3173bff57bc12496b4c2032b4
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Markus Mohrhard <markus.mohrhard@googlemail.com>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.