summaryrefslogtreecommitdiff
path: root/include/sfx2
diff options
context:
space:
mode:
authorZolnai Tamás <zolnaitamas2000@gmail.com>2015-03-15 13:29:53 +0100
committerZolnai Tamás <zolnaitamas2000@gmail.com>2015-03-17 00:10:01 +0100
commitf7424ed710e54bb2437a28380b03ed7c26290edc (patch)
treeca44565d82433bf9c33fbeeeddce2bd5893c262c /include/sfx2
parente3167924fd28c8b854f23139dbf49f53e6282ef7 (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 'include/sfx2')
-rw-r--r--include/sfx2/styledlg.hxx2
-rw-r--r--include/sfx2/tabdlg.hxx4
2 files changed, 3 insertions, 3 deletions
diff --git a/include/sfx2/styledlg.hxx b/include/sfx2/styledlg.hxx
index f3b0448a4c93..9e9bef903aeb 100644
--- a/include/sfx2/styledlg.hxx
+++ b/include/sfx2/styledlg.hxx
@@ -34,7 +34,7 @@ private:
DECL_DLLPRIVATE_LINK( CancelHdl, Button * );
sal_uInt16 m_nOrganizerId;
protected:
- virtual const SfxItemSet* GetRefreshedSet() SAL_OVERRIDE;
+ virtual void RefreshInputSet() SAL_OVERRIDE;
public:
SfxStyleDialog(vcl::Window* pParent, const OUString& rID,
diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx
index 252d728a79b5..2465321b3acd 100644
--- a/include/sfx2/tabdlg.hxx
+++ b/include/sfx2/tabdlg.hxx
@@ -81,7 +81,7 @@ friend class SfxTabDialogController;
bool m_bOwnsResetBtn;
bool m_bOwnsBaseFmtBtn;
- const SfxItemSet* pSet;
+ SfxItemSet* pSet;
SfxItemSet* pOutSet;
TabDlg_Impl* pImpl;
sal_uInt16* pRanges;
@@ -103,7 +103,7 @@ protected:
// Is deleted in Sfx!
virtual SfxItemSet* CreateInputItemSet( sal_uInt16 nId );
// Is not deleted in Sfx!
- virtual const SfxItemSet* GetRefreshedSet();
+ virtual void RefreshInputSet();
virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
VclButtonBox* m_pActionArea;