[Libreoffice-commits] core.git: 2 commits - sw/source vcl/workben
Caolán McNamara
caolanm at redhat.com
Thu Sep 10 13:08:15 PDT 2015
sw/source/uibase/uno/unomod.cxx | 38 ++++++++++++++++++++++----------------
vcl/workben/vcldemo.cxx | 1 +
2 files changed, 23 insertions(+), 16 deletions(-)
New commits:
commit e19d966b54d282ddd010827a4bfa34e8c133b69c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Sep 10 21:07:14 2015 +0100
coverity#1323758 Uninitialized pointer field
Change-Id: Iccbf40d09ffb9f9bb6058b81db4ebde6b64a7ae9
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index b3c6c86..a323ab4 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -1672,6 +1672,7 @@ public:
{
if (!OpenGLHelper::isVCLOpenGLEnabled())
{
+ mpImplA = mpImplB = nullptr;
fprintf (stderr, "OpenGL is not enabled: try SAL_FORCEGL=1\n");
return;
}
commit 13fdf04f6594c74f20c78f814c428f893fab9f64
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Sep 10 21:05:34 2015 +0100
coverity#1323757 Dereference before null check
Change-Id: I5353b78b6961d28fb3f42e5f2073e9a83ac1037c
diff --git a/sw/source/uibase/uno/unomod.cxx b/sw/source/uibase/uno/unomod.cxx
index 3a426a9..8837482 100644
--- a/sw/source/uibase/uno/unomod.cxx
+++ b/sw/source/uibase/uno/unomod.cxx
@@ -707,33 +707,39 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c
break;
case HANDLE_VIEWSET_ONLINE_LAYOUT :
{
- SwViewOption aOpt(*pView->GetWrtShell().GetViewOptions());
- if (pView && !bVal != !aOpt.getBrowseMode())
+ if ( pView )
{
- aOpt.setBrowseMode( bVal );
- pView->GetWrtShell().ApplyViewOptions( aOpt );
+ SwViewOption aOpt(*pView->GetWrtShell().GetViewOptions());
+ if (!bVal != !aOpt.getBrowseMode())
+ {
+ aOpt.setBrowseMode( bVal );
+ pView->GetWrtShell().ApplyViewOptions( aOpt );
- // must be set in mpViewOption as this will overwrite settings in _post!
- if(mpViewOption)
- mpViewOption->setBrowseMode(bVal);
+ // must be set in mpViewOption as this will overwrite settings in _post!
+ if(mpViewOption)
+ mpViewOption->setBrowseMode(bVal);
- pView->GetDocShell()->ToggleLayoutMode(pView);
+ pView->GetDocShell()->ToggleLayoutMode(pView);
+ }
}
}
break;
case HANDLE_VIEWSET_HIDE_WHITESPACE:
{
- SwViewOption aOpt(*pView->GetWrtShell().GetViewOptions());
- if (pView && !bVal != !aOpt.IsHideWhitespaceMode())
+ if ( pView )
{
- aOpt.SetHideWhitespaceMode( bVal );
- pView->GetWrtShell().ApplyViewOptions( aOpt );
+ SwViewOption aOpt(*pView->GetWrtShell().GetViewOptions());
+ if (!bVal != !aOpt.IsHideWhitespaceMode())
+ {
+ aOpt.SetHideWhitespaceMode( bVal );
+ pView->GetWrtShell().ApplyViewOptions( aOpt );
- // must be set in mpViewOption as this will overwrite settings in _post!
- if(mpViewOption)
- mpViewOption->SetHideWhitespaceMode(bVal);
+ // must be set in mpViewOption as this will overwrite settings in _post!
+ if(mpViewOption)
+ mpViewOption->SetHideWhitespaceMode(bVal);
- pView->GetDocShell()->ToggleLayoutMode(pView);
+ pView->GetDocShell()->ToggleLayoutMode(pView);
+ }
}
}
break;
More information about the Libreoffice-commits
mailing list