summaryrefslogtreecommitdiff
path: root/sfx2
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 /sfx2
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 'sfx2')
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx24
-rw-r--r--sfx2/source/dialog/documentfontsdialog.cxx6
-rw-r--r--sfx2/source/dialog/mgetempl.cxx6
-rw-r--r--sfx2/source/dialog/printopt.cxx6
-rw-r--r--sfx2/source/dialog/securitypage.cxx6
-rw-r--r--sfx2/source/dialog/tabdlg.cxx8
-rw-r--r--sfx2/source/inc/documentfontsdialog.hxx2
7 files changed, 29 insertions, 29 deletions
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index fbfe1211394d..38f9045cdb40 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -619,7 +619,7 @@ bool SfxDocumentInfoItem::PutValue( const Any& rVal, sal_uInt8 nMemberId )
}
SfxDocumentDescPage::SfxDocumentDescPage( Window * pParent, const SfxItemSet& rItemSet )
- : SfxTabPage(pParent, "DescriptionInfoPage", "sfx/ui/descriptioninfopage.ui", rItemSet)
+ : SfxTabPage(pParent, "DescriptionInfoPage", "sfx/ui/descriptioninfopage.ui", &rItemSet)
, m_pInfoItem ( NULL )
{
@@ -631,9 +631,9 @@ SfxDocumentDescPage::SfxDocumentDescPage( Window * pParent, const SfxItemSet& rI
m_pCommentEd->set_height_request(m_pCommentEd->GetTextHeight() * 16);
}
-SfxTabPage *SfxDocumentDescPage::Create(Window *pParent, const SfxItemSet &rItemSet)
+SfxTabPage *SfxDocumentDescPage::Create(Window *pParent, const SfxItemSet *rItemSet)
{
- return new SfxDocumentDescPage(pParent, rItemSet);
+ return new SfxDocumentDescPage(pParent, *rItemSet);
}
@@ -750,7 +750,7 @@ namespace
}
SfxDocumentPage::SfxDocumentPage(Window* pParent, const SfxItemSet& rItemSet)
- : SfxTabPage(pParent, "DocumentInfoPage", "sfx/ui/documentinfopage.ui", rItemSet)
+ : SfxTabPage(pParent, "DocumentInfoPage", "sfx/ui/documentinfopage.ui", &rItemSet)
, bEnableUseUserData( false )
, bHandleDelete( false )
{
@@ -912,9 +912,9 @@ void SfxDocumentPage::ImplCheckPasswordState()
-SfxTabPage* SfxDocumentPage::Create( Window* pParent, const SfxItemSet& rItemSet )
+SfxTabPage* SfxDocumentPage::Create( Window* pParent, const SfxItemSet* rItemSet )
{
- return new SfxDocumentPage( pParent, rItemSet );
+ return new SfxDocumentPage( pParent, *rItemSet );
}
@@ -2029,7 +2029,7 @@ void CustomPropertiesControl::AddLine( const OUString& sName, Any& rAny, bool bI
// class SfxCustomPropertiesPage -----------------------------------------
SfxCustomPropertiesPage::SfxCustomPropertiesPage( Window* pParent, const SfxItemSet& rItemSet )
- : SfxTabPage(pParent, "CustomInfoPage", "sfx/ui/custominfopage.ui", rItemSet)
+ : SfxTabPage(pParent, "CustomInfoPage", "sfx/ui/custominfopage.ui", &rItemSet)
{
get(m_pPropertiesCtrl, "properties");
m_pPropertiesCtrl->Init(*this);
@@ -2113,9 +2113,9 @@ int SfxCustomPropertiesPage::DeactivatePage( SfxItemSet* /*pSet*/ )
return nRet;
}
-SfxTabPage* SfxCustomPropertiesPage::Create( Window* pParent, const SfxItemSet& rItemSet )
+SfxTabPage* SfxCustomPropertiesPage::Create( Window* pParent, const SfxItemSet* rItemSet )
{
- return new SfxCustomPropertiesPage( pParent, rItemSet );
+ return new SfxCustomPropertiesPage( pParent, *rItemSet );
}
CmisValue::CmisValue( Window* pParent, const OUString& aStr )
@@ -2511,7 +2511,7 @@ void CmisPropertiesControl::AddLine( const OUString& sId, const OUString& sName,
// class SfxCmisPropertiesPage -----------------------------------------
SfxCmisPropertiesPage::SfxCmisPropertiesPage( Window* pParent, const SfxItemSet& rItemSet )
- : SfxTabPage(pParent, "CmisInfoPage", "sfx/ui/cmisinfopage.ui", rItemSet)
+ : SfxTabPage(pParent, "CmisInfoPage", "sfx/ui/cmisinfopage.ui", &rItemSet)
, m_pPropertiesCtrl( this )
{
}
@@ -2610,9 +2610,9 @@ int SfxCmisPropertiesPage::DeactivatePage( SfxItemSet* /*pSet*/ )
return LEAVE_PAGE;
}
-SfxTabPage* SfxCmisPropertiesPage::Create( Window* pParent, const SfxItemSet& rItemSet )
+SfxTabPage* SfxCmisPropertiesPage::Create( Window* pParent, const SfxItemSet* rItemSet )
{
- return new SfxCmisPropertiesPage( pParent, rItemSet );
+ return new SfxCmisPropertiesPage( pParent, *rItemSet );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/dialog/documentfontsdialog.cxx b/sfx2/source/dialog/documentfontsdialog.cxx
index 20b4a8fb3cd5..69b4fd4d9ec6 100644
--- a/sfx2/source/dialog/documentfontsdialog.cxx
+++ b/sfx2/source/dialog/documentfontsdialog.cxx
@@ -23,13 +23,13 @@
using namespace ::com::sun::star;
-SfxTabPage* SfxDocumentFontsPage::Create( Window* parent, const SfxItemSet& set )
+SfxTabPage* SfxDocumentFontsPage::Create( Window* parent, const SfxItemSet* set )
{
- return new SfxDocumentFontsPage( parent, set );
+ return new SfxDocumentFontsPage( parent, *set );
}
SfxDocumentFontsPage::SfxDocumentFontsPage( Window* parent, const SfxItemSet& set )
- : SfxTabPage( parent, "DocumentFontsPage", "sfx/ui/documentfontspage.ui", set )
+ : SfxTabPage( parent, "DocumentFontsPage", "sfx/ui/documentfontspage.ui", &set )
{
get( embedFontsCheckbox, "embedFonts" );
}
diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx
index abfccc64c087..14934e683fc0 100644
--- a/sfx2/source/dialog/mgetempl.cxx
+++ b/sfx2/source/dialog/mgetempl.cxx
@@ -43,7 +43,7 @@
* initializes the list box with the templates
*/
SfxManageStyleSheetPage::SfxManageStyleSheetPage(Window* pParent, const SfxItemSet& rAttrSet)
- : SfxTabPage(pParent, "ManageStylePage", "sfx/ui/managestylepage.ui", rAttrSet)
+ : SfxTabPage(pParent, "ManageStylePage", "sfx/ui/managestylepage.ui", &rAttrSet)
, pStyle(&((SfxStyleDialog*)GetParentDialog())->GetStyleSheet())
, pItem(0)
, bModified(false)
@@ -469,7 +469,7 @@ void SfxManageStyleSheetPage::Reset( const SfxItemSet* /*rAttrSet*/ )
SfxTabPage* SfxManageStyleSheetPage::Create( Window* pParent,
- const SfxItemSet &rAttrSet )
+ const SfxItemSet *rAttrSet )
/* [Description]
@@ -481,7 +481,7 @@ SfxTabPage* SfxManageStyleSheetPage::Create( Window* pParent,
*/
{
- return new SfxManageStyleSheetPage( pParent, rAttrSet );
+ return new SfxManageStyleSheetPage( pParent, *rAttrSet );
}
diff --git a/sfx2/source/dialog/printopt.cxx b/sfx2/source/dialog/printopt.cxx
index 5f7a87b164e7..f13d70d0601f 100644
--- a/sfx2/source/dialog/printopt.cxx
+++ b/sfx2/source/dialog/printopt.cxx
@@ -37,7 +37,7 @@ static bool bOutputForPrinter = true;
#define DPI_COUNT (sizeof(aDPIArray)/sizeof(aDPIArray[0 ]))
SfxCommonPrintOptionsTabPage::SfxCommonPrintOptionsTabPage( Window* pParent, const SfxItemSet& rSet )
- : SfxTabPage(pParent, "OptPrintPage", "sfx/ui/optprintpage.ui", rSet)
+ : SfxTabPage(pParent, "OptPrintPage", "sfx/ui/optprintpage.ui", &rSet)
{
get(m_pPrinterOutputRB, "printer");
get(m_pPrintFileOutputRB, "file");
@@ -89,9 +89,9 @@ SfxCommonPrintOptionsTabPage::~SfxCommonPrintOptionsTabPage()
{
}
-SfxTabPage* SfxCommonPrintOptionsTabPage::Create( Window* pParent, const SfxItemSet& rAttrSet )
+SfxTabPage* SfxCommonPrintOptionsTabPage::Create( Window* pParent, const SfxItemSet* rAttrSet )
{
- return( new SfxCommonPrintOptionsTabPage( pParent, rAttrSet ) );
+ return( new SfxCommonPrintOptionsTabPage( pParent, *rAttrSet ) );
}
Window* SfxCommonPrintOptionsTabPage::GetParentLabeledBy( const Window* pWindow ) const
diff --git a/sfx2/source/dialog/securitypage.cxx b/sfx2/source/dialog/securitypage.cxx
index e75f88dedd1b..f37621e43341 100644
--- a/sfx2/source/dialog/securitypage.cxx
+++ b/sfx2/source/dialog/securitypage.cxx
@@ -421,14 +421,14 @@ IMPL_LINK_NOARG(SfxSecurityPage_Impl, ChangeProtectionPBHdl)
}
-SfxTabPage* SfxSecurityPage::Create( Window * pParent, const SfxItemSet & rItemSet )
+SfxTabPage* SfxSecurityPage::Create( Window * pParent, const SfxItemSet * rItemSet )
{
- return new SfxSecurityPage( pParent, rItemSet );
+ return new SfxSecurityPage( pParent, *rItemSet );
}
SfxSecurityPage::SfxSecurityPage( Window* pParent, const SfxItemSet& rItemSet )
- : SfxTabPage(pParent, "SecurityInfoPage", "sfx/ui/securityinfopage.ui", rItemSet)
+ : SfxTabPage(pParent, "SecurityInfoPage", "sfx/ui/securityinfopage.ui", &rItemSet)
{
m_pImpl.reset(new SfxSecurityPage_Impl( *this, rItemSet ));
}
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index 55483d81192b..3bc6a7f828d5 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -181,9 +181,9 @@ SfxTabPage::SfxTabPage( Window *pParent,
}
-SfxTabPage::SfxTabPage(Window *pParent, const OString& rID, const OUString& rUIXMLDescription, const SfxItemSet &rAttrSet)
+SfxTabPage::SfxTabPage(Window *pParent, const OString& rID, const OUString& rUIXMLDescription, const SfxItemSet *rAttrSet)
: TabPage(pParent, rID, rUIXMLDescription)
- , pSet ( &rAttrSet )
+ , pSet ( rAttrSet )
, bHasExchangeSupport ( false )
, pImpl ( new TabPageImpl )
{
@@ -1195,10 +1195,10 @@ IMPL_LINK( SfxTabDialog, ActivatePageHdl, TabControl *, pTabCtrl )
}
if ( pTmpSet && !pDataObject->bOnDemand )
- pTabPage = (pDataObject->fnCreatePage)( pTabCtrl, *pTmpSet );
+ pTabPage = (pDataObject->fnCreatePage)( pTabCtrl, pTmpSet );
else
pTabPage = (pDataObject->fnCreatePage)
- ( pTabCtrl, *CreateInputItemSet( nId ) );
+ ( pTabCtrl, CreateInputItemSet( nId ) );
DBG_ASSERT( NULL == pDataObject->pTabPage, "create TabPage more than once" );
pDataObject->pTabPage = pTabPage;
diff --git a/sfx2/source/inc/documentfontsdialog.hxx b/sfx2/source/inc/documentfontsdialog.hxx
index 0264b97772c8..39f2d80adea2 100644
--- a/sfx2/source/inc/documentfontsdialog.hxx
+++ b/sfx2/source/inc/documentfontsdialog.hxx
@@ -31,7 +31,7 @@ class SfxDocumentFontsPage: public SfxTabPage
{
public:
SfxDocumentFontsPage( Window* parent, const SfxItemSet& set );
- static SfxTabPage* Create( Window* parent, const SfxItemSet& set );
+ static SfxTabPage* Create( Window* parent, const SfxItemSet* set );
protected:
virtual bool FillItemSet( SfxItemSet* set ) SAL_OVERRIDE;
virtual void Reset( const SfxItemSet* set ) SAL_OVERRIDE;