Kaydet (Commit) 3dfdf8c1 authored tarafından Caolán McNamara's avatar Caolán McNamara Kaydeden (comit) Miklos Vajna

coverity#1323757 Dereference before null check

Change-Id: I5353b78b6961d28fb3f42e5f2073e9a83ac1037c
(cherry picked from commit 13fdf04f)
üst f3f09557
......@@ -705,9 +705,11 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c
}
break;
case HANDLE_VIEWSET_ONLINE_LAYOUT :
{
if ( pView )
{
SwViewOption aOpt(*pView->GetWrtShell().GetViewOptions());
if (pView && !bVal != !aOpt.getBrowseMode())
if (!bVal != !aOpt.getBrowseMode())
{
aOpt.setBrowseMode( bVal );
pView->GetWrtShell().ApplyViewOptions( aOpt );
......@@ -719,11 +721,14 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c
pView->GetDocShell()->ToggleLayoutMode(pView);
}
}
}
break;
case HANDLE_VIEWSET_HIDE_WHITESPACE:
{
if ( pView )
{
SwViewOption aOpt(*pView->GetWrtShell().GetViewOptions());
if (pView && !bVal != !aOpt.IsHideWhitespaceMode())
if (!bVal != !aOpt.IsHideWhitespaceMode())
{
aOpt.SetHideWhitespaceMode( bVal );
pView->GetWrtShell().ApplyViewOptions( aOpt );
......@@ -735,6 +740,7 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c
pView->GetDocShell()->ToggleLayoutMode(pView);
}
}
}
break;
case HANDLE_VIEWSET_HELP_URL:
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment