summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-06-11 10:35:24 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-06-11 10:39:03 +0200
commita92e973b6d0a9ad87fe014442e1678af2ce0c7d0 (patch)
treeb39139c7992a853cc5e4d836fc35cd45c01a3f6d /starmath
parent88f84eb1b0eebbb7e0a072f1e7001a9207ebbe9e (diff)
Change SfxTabPage::Reset param from ref to pointer
...there was a call site that passed undefined "null pointer reference" (apparently in a case where the passed argument was actually unused) Change-Id: I663d4264b7a84f44ca69c732f3bc502f614b2b2a
Diffstat (limited to 'starmath')
-rw-r--r--starmath/inc/dialog.hxx2
-rw-r--r--starmath/source/dialog.cxx18
2 files changed, 10 insertions, 10 deletions
diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx
index 7c1a2b9689c6..24b563092aa2 100644
--- a/starmath/inc/dialog.hxx
+++ b/starmath/inc/dialog.hxx
@@ -64,7 +64,7 @@ class SmPrintOptionsTabPage : public SfxTabPage
DECL_LINK(SizeButtonClickHdl, Button *);
virtual bool FillItemSet(SfxItemSet* rSet) SAL_OVERRIDE;
- virtual void Reset(const SfxItemSet& rSet) SAL_OVERRIDE;
+ virtual void Reset(const SfxItemSet* rSet) SAL_OVERRIDE;
public:
static SfxTabPage* Create(Window *pWindow, const SfxItemSet &rSet);
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index 99a8dc9c93b6..97ec16baef16 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -174,7 +174,7 @@ SmPrintOptionsTabPage::SmPrintOptionsTabPage(Window *pParent, const SfxItemSet &
m_pSizeScaled->SetClickHdl(LINK(this, SmPrintOptionsTabPage, SizeButtonClickHdl));
m_pSizeZoomed->SetClickHdl(LINK(this, SmPrintOptionsTabPage, SizeButtonClickHdl));
- Reset(rOptions);
+ Reset(&rOptions);
}
@@ -200,9 +200,9 @@ bool SmPrintOptionsTabPage::FillItemSet(SfxItemSet* rSet)
}
-void SmPrintOptionsTabPage::Reset(const SfxItemSet& rSet)
+void SmPrintOptionsTabPage::Reset(const SfxItemSet* rSet)
{
- SmPrintSize ePrintSize = (SmPrintSize)((const SfxUInt16Item &)rSet.Get(GetWhich(SID_PRINTSIZE))).GetValue();
+ SmPrintSize ePrintSize = (SmPrintSize)((const SfxUInt16Item &)rSet->Get(GetWhich(SID_PRINTSIZE))).GetValue();
m_pSizeNormal->Check(ePrintSize == PRINT_SIZE_NORMAL);
m_pSizeScaled->Check(ePrintSize == PRINT_SIZE_SCALED);
@@ -210,13 +210,13 @@ void SmPrintOptionsTabPage::Reset(const SfxItemSet& rSet)
m_pZoom->Enable(m_pSizeZoomed->IsChecked());
- m_pZoom->SetValue(((const SfxUInt16Item &)rSet.Get(GetWhich(SID_PRINTZOOM))).GetValue());
+ m_pZoom->SetValue(((const SfxUInt16Item &)rSet->Get(GetWhich(SID_PRINTZOOM))).GetValue());
- m_pTitle->Check(((const SfxBoolItem &)rSet.Get(GetWhich(SID_PRINTTITLE))).GetValue());
- m_pText->Check(((const SfxBoolItem &)rSet.Get(GetWhich(SID_PRINTTEXT))).GetValue());
- m_pFrame->Check(((const SfxBoolItem &)rSet.Get(GetWhich(SID_PRINTFRAME))).GetValue());
- m_pNoRightSpaces->Check(((const SfxBoolItem &)rSet.Get(GetWhich(SID_NO_RIGHT_SPACES))).GetValue());
- m_pSaveOnlyUsedSymbols->Check(((const SfxBoolItem &)rSet.Get(GetWhich(SID_SAVE_ONLY_USED_SYMBOLS))).GetValue());
+ m_pTitle->Check(((const SfxBoolItem &)rSet->Get(GetWhich(SID_PRINTTITLE))).GetValue());
+ m_pText->Check(((const SfxBoolItem &)rSet->Get(GetWhich(SID_PRINTTEXT))).GetValue());
+ m_pFrame->Check(((const SfxBoolItem &)rSet->Get(GetWhich(SID_PRINTFRAME))).GetValue());
+ m_pNoRightSpaces->Check(((const SfxBoolItem &)rSet->Get(GetWhich(SID_NO_RIGHT_SPACES))).GetValue());
+ m_pSaveOnlyUsedSymbols->Check(((const SfxBoolItem &)rSet->Get(GetWhich(SID_SAVE_ONLY_USED_SYMBOLS))).GetValue());
}