summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-06-11 14:34:46 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-06-11 14:39:04 +0200
commitbb761be472ea9a590837dc6c1ca295387ac4c0b7 (patch)
tree178b4187effe2a05f3d77660ad83eea97144a287 /sd
parent4d120b6ab181f530d3fedc963b1c6ec777f2608a (diff)
Change SfxTabPage ctor SfxItemSet param from ref to pointer
...and also corresponding param of CreateTabPage function type and corresponding Craete functions. There were some call sites that passed undefined "null pointer references" and SfxTabPage internally uses a pointer member pSet that is checked for null anyway. Change-Id: I4eb3636155eac46c9c9d26e6e6e842e85d7e95af
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/app/sdmod2.cxx10
-rw-r--r--sd/source/ui/dlg/paragr.cxx8
-rw-r--r--sd/source/ui/dlg/prntopts.cxx6
-rw-r--r--sd/source/ui/dlg/tpaction.cxx2
-rw-r--r--sd/source/ui/dlg/tpoption.cxx16
-rw-r--r--sd/source/ui/inc/prntopts.hxx2
-rw-r--r--sd/source/ui/inc/tpoption.hxx6
7 files changed, 25 insertions, 25 deletions
diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx
index 928b05577cb0..b26d86a26e69 100644
--- a/sd/source/ui/app/sdmod2.cxx
+++ b/sd/source/ui/app/sdmod2.cxx
@@ -726,14 +726,14 @@ SfxTabPage* SdModule::CreateTabPage( sal_uInt16 nId, Window* pParent, const SfxI
case SID_SI_TP_CONTENTS:
{ ::CreateTabPage fnCreatePage = pFact->GetSdOptionsContentsTabPageCreatorFunc();
if( fnCreatePage )
- pRet = (*fnCreatePage)( pParent, rSet );
+ pRet = (*fnCreatePage)( pParent, &rSet );
}
break;
case SID_SD_TP_SNAP:
case SID_SI_TP_SNAP:
{ ::CreateTabPage fnCreatePage = pFact->GetSdOptionsSnapTabPageCreatorFunc();
if( fnCreatePage )
- pRet = (*fnCreatePage)( pParent, rSet );
+ pRet = (*fnCreatePage)( pParent, &rSet );
}
break;
case SID_SD_TP_PRINT:
@@ -742,7 +742,7 @@ SfxTabPage* SdModule::CreateTabPage( sal_uInt16 nId, Window* pParent, const SfxI
::CreateTabPage fnCreatePage = pFact->GetSdPrintOptionsTabPageCreatorFunc();
if( fnCreatePage )
{
- pRet = (*fnCreatePage)( pParent, rSet );
+ pRet = (*fnCreatePage)( pParent, &rSet );
if(SID_SD_TP_PRINT == nId)
aSet.Put (SfxUInt32Item(SID_SDMODE_FLAG,SD_DRAW_MODE));
pRet->PageCreated(aSet);
@@ -755,7 +755,7 @@ SfxTabPage* SdModule::CreateTabPage( sal_uInt16 nId, Window* pParent, const SfxI
::CreateTabPage fnCreatePage = pFact->GetSdOptionsMiscTabPageCreatorFunc();
if( fnCreatePage )
{
- pRet = (*fnCreatePage)( pParent, rSet );
+ pRet = (*fnCreatePage)( pParent, &rSet );
if(SID_SD_TP_MISC == nId)
aSet.Put (SfxUInt32Item(SID_SDMODE_FLAG,SD_DRAW_MODE));
else
@@ -771,7 +771,7 @@ SfxTabPage* SdModule::CreateTabPage( sal_uInt16 nId, Window* pParent, const SfxI
{
::CreateTabPage fnCreatePage = pSfxFact->GetTabPageCreatorFunc( nId );
if ( fnCreatePage )
- pRet = (*fnCreatePage)( pParent, rSet );
+ pRet = (*fnCreatePage)( pParent, &rSet );
}
}
break;
diff --git a/sd/source/ui/dlg/paragr.cxx b/sd/source/ui/dlg/paragr.cxx
index c6642099c98c..069fb40a7fb4 100644
--- a/sd/source/ui/dlg/paragr.cxx
+++ b/sd/source/ui/dlg/paragr.cxx
@@ -40,7 +40,7 @@ public:
SdParagraphNumTabPage(Window* pParent, const SfxItemSet& rSet );
virtual ~SdParagraphNumTabPage();
- static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet );
+ static SfxTabPage* Create( Window* pParent, const SfxItemSet* rSet );
static const sal_uInt16* GetRanges();
virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
@@ -59,7 +59,7 @@ SdParagraphNumTabPage::SdParagraphNumTabPage(Window* pParent, const SfxItemSet&
: SfxTabPage(pParent,
"DrawParaNumbering",
"modules/sdraw/ui/paranumberingtab.ui",
- rAttr),
+ &rAttr),
mbModified(false)
{
get(m_pNewStartCB,"checkbuttonCB_NEW_START");
@@ -74,9 +74,9 @@ SdParagraphNumTabPage::~SdParagraphNumTabPage()
{
}
-SfxTabPage* SdParagraphNumTabPage::Create(Window *pParent, const SfxItemSet & rAttrSet)
+SfxTabPage* SdParagraphNumTabPage::Create(Window *pParent, const SfxItemSet * rAttrSet)
{
- return new SdParagraphNumTabPage( pParent, rAttrSet );
+ return new SdParagraphNumTabPage( pParent, *rAttrSet );
}
const sal_uInt16* SdParagraphNumTabPage::GetRanges()
diff --git a/sd/source/ui/dlg/prntopts.cxx b/sd/source/ui/dlg/prntopts.cxx
index e54400c1dac2..5f4ffa2de9a9 100644
--- a/sd/source/ui/dlg/prntopts.cxx
+++ b/sd/source/ui/dlg/prntopts.cxx
@@ -29,7 +29,7 @@
* dialog to adjust print options
*/
SdPrintOptions::SdPrintOptions( Window* pParent, const SfxItemSet& rInAttrs ) :
- SfxTabPage ( pParent, "prntopts" , "modules/simpress/ui/prntopts.ui" , rInAttrs ),
+ SfxTabPage ( pParent, "prntopts" , "modules/simpress/ui/prntopts.ui" , &rInAttrs ),
rOutAttrs ( rInAttrs )
{
get( m_pFrmContent , "contentframe" );
@@ -191,9 +191,9 @@ void SdPrintOptions::Reset( const SfxItemSet* rAttrs )
SfxTabPage* SdPrintOptions::Create( Window* pWindow,
- const SfxItemSet& rOutAttrs )
+ const SfxItemSet* rOutAttrs )
{
- return( new SdPrintOptions( pWindow, rOutAttrs ) );
+ return( new SdPrintOptions( pWindow, *rOutAttrs ) );
}
diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx
index 2c4084aca333..c5977b916e5c 100644
--- a/sd/source/ui/dlg/tpaction.cxx
+++ b/sd/source/ui/dlg/tpaction.cxx
@@ -98,7 +98,7 @@ SdActionDlg::SdActionDlg (
*/
SdTPAction::SdTPAction(Window* pWindow, const SfxItemSet& rInAttrs)
: SfxTabPage(pWindow, "InteractionPage",
- "modules/simpress/ui/interactionpage.ui", rInAttrs)
+ "modules/simpress/ui/interactionpage.ui", &rInAttrs)
, rOutAttrs(rInAttrs)
, mpView(NULL)
, mpDoc(NULL)
diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index 44aced815aeb..254a13d0f7d1 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -108,9 +108,9 @@ void SdTpOptionsSnap::Reset( const SfxItemSet* rAttrs )
SfxTabPage* SdTpOptionsSnap::Create( Window* pWindow,
- const SfxItemSet& rAttrs )
+ const SfxItemSet* rAttrs )
{
- return( new SdTpOptionsSnap( pWindow, rAttrs ) );
+ return( new SdTpOptionsSnap( pWindow, *rAttrs ) );
}
/*************************************************************************
@@ -120,7 +120,7 @@ SfxTabPage* SdTpOptionsSnap::Create( Window* pWindow,
\************************************************************************/
SdTpOptionsContents::SdTpOptionsContents( Window* pParent, const SfxItemSet& rInAttrs ) :
- SfxTabPage ( pParent, "SdViewPage", "modules/simpress/ui/sdviewpage.ui", rInAttrs )
+ SfxTabPage ( pParent, "SdViewPage", "modules/simpress/ui/sdviewpage.ui", &rInAttrs )
{
get( m_pCbxRuler, "ruler");
get( m_pCbxDragStripes, "dragstripes");
@@ -182,9 +182,9 @@ void SdTpOptionsContents::Reset( const SfxItemSet* rAttrs )
SfxTabPage* SdTpOptionsContents::Create( Window* pWindow,
- const SfxItemSet& rAttrs )
+ const SfxItemSet* rAttrs )
{
- return( new SdTpOptionsContents( pWindow, rAttrs ) );
+ return( new SdTpOptionsContents( pWindow, *rAttrs ) );
}
/*************************************************************************
@@ -196,7 +196,7 @@ SfxTabPage* SdTpOptionsContents::Create( Window* pWindow,
#define TOKEN ':'
SdTpOptionsMisc::SdTpOptionsMisc(Window* pParent, const SfxItemSet& rInAttrs)
- : SfxTabPage(pParent, "OptSavePage", "modules/simpress/ui/optimpressgeneralpage.ui", rInAttrs)
+ : SfxTabPage(pParent, "OptSavePage", "modules/simpress/ui/optimpressgeneralpage.ui", &rInAttrs)
, nWidth(0)
, nHeight(0)
{
@@ -514,9 +514,9 @@ void SdTpOptionsMisc::Reset( const SfxItemSet* rAttrs )
SfxTabPage* SdTpOptionsMisc::Create( Window* pWindow,
- const SfxItemSet& rAttrs )
+ const SfxItemSet* rAttrs )
{
- return( new SdTpOptionsMisc( pWindow, rAttrs ) );
+ return( new SdTpOptionsMisc( pWindow, *rAttrs ) );
}
diff --git a/sd/source/ui/inc/prntopts.hxx b/sd/source/ui/inc/prntopts.hxx
index 550a0a4efc36..0b3dc7a12920 100644
--- a/sd/source/ui/inc/prntopts.hxx
+++ b/sd/source/ui/inc/prntopts.hxx
@@ -64,7 +64,7 @@ public:
SdPrintOptions( Window* pParent, const SfxItemSet& rInAttrs);
virtual ~SdPrintOptions();
- static SfxTabPage* Create( Window*, const SfxItemSet& );
+ static SfxTabPage* Create( Window*, const SfxItemSet* );
virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
virtual void Reset( const SfxItemSet * ) SAL_OVERRIDE;
diff --git a/sd/source/ui/inc/tpoption.hxx b/sd/source/ui/inc/tpoption.hxx
index f94b06a99483..ea787eff7c88 100644
--- a/sd/source/ui/inc/tpoption.hxx
+++ b/sd/source/ui/inc/tpoption.hxx
@@ -39,7 +39,7 @@ public:
SdTpOptionsSnap( Window* pParent, const SfxItemSet& rInAttrs );
virtual ~SdTpOptionsSnap();
- static SfxTabPage* Create( Window*, const SfxItemSet& );
+ static SfxTabPage* Create( Window*, const SfxItemSet* );
virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
virtual void Reset( const SfxItemSet * ) SAL_OVERRIDE;
@@ -61,7 +61,7 @@ public:
SdTpOptionsContents( Window* pParent, const SfxItemSet& rInAttrs );
virtual ~SdTpOptionsContents();
- static SfxTabPage* Create( Window*, const SfxItemSet& );
+ static SfxTabPage* Create( Window*, const SfxItemSet* );
virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
virtual void Reset( const SfxItemSet * ) SAL_OVERRIDE;
};
@@ -134,7 +134,7 @@ public:
SdTpOptionsMisc( Window* pParent, const SfxItemSet& rInAttrs );
virtual ~SdTpOptionsMisc();
- static SfxTabPage* Create( Window*, const SfxItemSet& );
+ static SfxTabPage* Create( Window*, const SfxItemSet* );
virtual bool FillItemSet( SfxItemSet* ) SAL_OVERRIDE;
virtual void Reset( const SfxItemSet * ) SAL_OVERRIDE;