summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-07-03 08:22:45 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-07-03 08:24:09 +0200
commitf36e64d8cc4a2fce8d84ef464a482445a8b8540a (patch)
treebb3934252107a275cd33cfb756e4b7042c9e55b7 /cui
parent6c4e21a234f12e1310ba06f9859e08b424acf8bf (diff)
Avoid null this pointers in member function calls
Change-Id: Iada6d8fcd261ddfb02b4dbc2f628ef0738c4ea01
Diffstat (limited to 'cui')
-rw-r--r--cui/source/tabpages/tpbitmap.cxx6
-rw-r--r--cui/source/tabpages/tpcolor.cxx5
-rw-r--r--cui/source/tabpages/tpgradnt.cxx6
-rw-r--r--cui/source/tabpages/tphatch.cxx5
-rw-r--r--cui/source/tabpages/tplnedef.cxx2
-rw-r--r--cui/source/tabpages/tplneend.cxx5
6 files changed, 19 insertions, 10 deletions
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index 4cab426e8d0c..953993c7a352 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -791,8 +791,10 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickLoadHdl_Impl)
aPathURL.removeFinalSlash();
// save table
- XBitmapListRef pBmpList = XPropertyList::CreatePropertyList(
- XBITMAP_LIST, aPathURL.GetMainURL( INetURLObject::NO_DECODE ), "" )->AsBitmapList();
+ XBitmapListRef pBmpList = XPropertyList::AsBitmapList(
+ XPropertyList::CreatePropertyList(
+ XBITMAP_LIST, aPathURL.GetMainURL(INetURLObject::NO_DECODE),
+ ""));
pBmpList->SetName( aURL.getName() );
if( pBmpList->Load() )
{
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index add743b89544..52ead2371577 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -155,8 +155,9 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickLoadHdl_Impl)
if ( aDlg.Execute() == ERRCODE_NONE )
{
- XColorListRef pList = XPropertyList::CreatePropertyListFromURL(
- meType, aDlg.GetPath() )->AsColorList();
+ XColorListRef pList = XPropertyList::AsColorList(
+ XPropertyList::CreatePropertyListFromURL(
+ meType, aDlg.GetPath()));
if( pList->Load() )
{
// check whether the table may be deleted:
diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx
index cbdefb300a08..96c48ffc747c 100644
--- a/cui/source/tabpages/tpgradnt.cxx
+++ b/cui/source/tabpages/tpgradnt.cxx
@@ -644,8 +644,10 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickLoadHdl_Impl)
aPathURL.removeFinalSlash();
// save list
- XGradientListRef pGrdList = XPropertyList::CreatePropertyList(
- XGRADIENT_LIST, aPathURL.GetMainURL( INetURLObject::NO_DECODE ), "" )->AsGradientList();
+ XGradientListRef pGrdList = XPropertyList::AsGradientList(
+ XPropertyList::CreatePropertyList(
+ XGRADIENT_LIST,
+ aPathURL.GetMainURL(INetURLObject::NO_DECODE), ""));
pGrdList->SetName( aURL.getName() );
if ( pGrdList->Load() )
diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx
index ae155b0f2ec4..0cdff356e37e 100644
--- a/cui/source/tabpages/tphatch.cxx
+++ b/cui/source/tabpages/tphatch.cxx
@@ -685,8 +685,9 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickLoadHdl_Impl)
aPathURL.removeSegment();
aPathURL.removeFinalSlash();
- XHatchListRef pHatchList = XPropertyList::CreatePropertyList(
- XHATCH_LIST, aPathURL.GetMainURL( INetURLObject::NO_DECODE ), "" )->AsHatchList();
+ XHatchListRef pHatchList = XPropertyList::AsHatchList(
+ XPropertyList::CreatePropertyList(
+ XHATCH_LIST, aPathURL.GetMainURL( INetURLObject::NO_DECODE ), "" ));
pHatchList->SetName( aURL.getName() );
if( pHatchList->Load() )
{
diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx
index 7dcca4b0e3a2..b2ddb14b8be0 100644
--- a/cui/source/tabpages/tplnedef.cxx
+++ b/cui/source/tabpages/tplnedef.cxx
@@ -749,7 +749,7 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickLoadHdl_Impl)
aPathURL.removeSegment();
aPathURL.removeFinalSlash();
- XDashListRef pDshLst = XPropertyList::CreatePropertyList( XDASH_LIST, aPathURL.GetMainURL( INetURLObject::NO_DECODE ), "" )->AsDashList();
+ XDashListRef pDshLst = XPropertyList::AsDashList(XPropertyList::CreatePropertyList( XDASH_LIST, aPathURL.GetMainURL( INetURLObject::NO_DECODE ), "" ));
pDshLst->SetName( aURL.getName() );
if( pDshLst->Load() )
diff --git a/cui/source/tabpages/tplneend.cxx b/cui/source/tabpages/tplneend.cxx
index 6cbcce81704f..c0264a79afde 100644
--- a/cui/source/tabpages/tplneend.cxx
+++ b/cui/source/tabpages/tplneend.cxx
@@ -570,7 +570,10 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickLoadHdl_Impl)
aPathURL.removeSegment();
aPathURL.removeFinalSlash();
- XLineEndListRef pLeList = XPropertyList::CreatePropertyList(XLINE_END_LIST, aPathURL.GetMainURL( INetURLObject::NO_DECODE ), "" )->AsLineEndList();
+ XLineEndListRef pLeList = XPropertyList::AsLineEndList(
+ XPropertyList::CreatePropertyList(
+ XLINE_END_LIST,
+ aPathURL.GetMainURL(INetURLObject::NO_DECODE), ""));
pLeList->SetName( aURL.getName() );
if( pLeList->Load() )
{