diff options
author | Zolnai Tamás <zolnaitamas2000@gmail.com> | 2015-03-15 13:29:53 +0100 |
---|---|---|
committer | Zolnai Tamás <zolnaitamas2000@gmail.com> | 2015-03-17 00:10:01 +0100 |
commit | f7424ed710e54bb2437a28380b03ed7c26290edc (patch) | |
tree | ca44565d82433bf9c33fbeeeddce2bd5893c262c /cui | |
parent | e3167924fd28c8b854f23139dbf49f53e6282ef7 (diff) |
SfxTabDialog: avoid changing const input parameter
* SfxTabDialog constructor has a const pointer parameter
pointing to the input set and also the corresponding member
is a const pointer which indicated that set is not changed by
the dialog, but this is not true, const is casted away and
the input set is changed.
* So use a copy of the input set instead, pointed by
a non-const member, so we can spare some const cast and
misunderstandings.
* GetRefreshedSet not behaves as a getter method, but changes
the input set instead, so redeclare it accordingly.
Change-Id: Ic63f9ae68c50e65d4498b20f597547c1c075b94e
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/iconcdlg.cxx | 8 | ||||
-rw-r--r-- | cui/source/inc/iconcdlg.hxx | 2 |
2 files changed, 4 insertions, 6 deletions
diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx index 45e8dcb06531..982ed6c1ca2a 100644 --- a/cui/source/dialogs/iconcdlg.cxx +++ b/cui/source/dialogs/iconcdlg.cxx @@ -547,8 +547,7 @@ bool IconChoiceDialog::DeActivatePageImpl () if ( nRet & IconChoicePage::REFRESH_SET ) { - pSet = GetRefreshedSet(); - DBG_ASSERT( pSet, "GetRefreshedSet() liefert NULL" ); + RefreshInputSet(); // flag all pages to be newly initialized for ( size_t i = 0, nCount = maPageList.size(); i < nCount; ++i ) { @@ -723,10 +722,9 @@ void IconChoiceDialog::Start_Impl() ActivatePageImpl(); } -const SfxItemSet* IconChoiceDialog::GetRefreshedSet() +void IconChoiceDialog::RefreshInputSet() { - SAL_WARN( "cui.dialogs", "GetRefreshedSet not implemented" ); - return 0; + SAL_WARN( "cui.dialogs", "RefreshInputSet not implemented" ); } /********************************************************************** diff --git a/cui/source/inc/iconcdlg.hxx b/cui/source/inc/iconcdlg.hxx index 29317d3ecaf2..0c89da130c03 100644 --- a/cui/source/inc/iconcdlg.hxx +++ b/cui/source/inc/iconcdlg.hxx @@ -170,7 +170,7 @@ protected : inline SfxItemSet* GetInputSetImpl() { return (SfxItemSet*)pSet; } inline IconChoicePage* GetTabPage( sal_uInt16 nPageId ) { return ( GetPageData (nPageId)->pPage?GetPageData (nPageId)->pPage:NULL); } - const SfxItemSet* GetRefreshedSet(); + void RefreshInputSet(); void ActivatePageImpl (); bool DeActivatePageImpl (); |