summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2015-01-13 12:42:43 +0900
committerTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2015-01-14 21:31:31 +0900
commit767ec4666f5edea8aa8e5c6aa299c1312973e5e7 (patch)
treea960db8af354ec0d51d33618eb10be05beb45daa /cui
parent3b3eeff3fdf19833b8793e15c9a57ff3044d9118 (diff)
Cleanup SfxZoomDialog, convert plain pointer to unique_ptr
Change-Id: I50f16a6c2ec3dcbb12881ab42d0a2f9556cf7ec8
Diffstat (limited to 'cui')
-rw-r--r--cui/source/dialogs/zoom.cxx293
-rw-r--r--cui/source/inc/zoom.hxx56
2 files changed, 183 insertions, 166 deletions
diff --git a/cui/source/dialogs/zoom.cxx b/cui/source/dialogs/zoom.cxx
index 6fee5a5e0ad0..5107c6eb169e 100644
--- a/cui/source/dialogs/zoom.cxx
+++ b/cui/source/dialogs/zoom.cxx
@@ -31,27 +31,29 @@
#include <dialmgr.hxx>
#include <svx/zoom_def.hxx>
-// static ----------------------------------------------------------------
+namespace
+{
-#define SPECIAL_FACTOR ((sal_uInt16)0xFFFF)
+const sal_uInt16 SPECIAL_FACTOR = 0xFFFF;
-// class SvxZoomDialog ---------------------------------------------------
+} // anonymous namespace
sal_uInt16 SvxZoomDialog::GetFactor() const
{
- if ( m_p100Btn->IsChecked() )
+ if (m_p100Btn->IsChecked())
return 100;
- if ( m_pUserBtn->IsChecked() )
- return (sal_uInt16)m_pUserEdit->GetValue();
+
+ if (m_pUserBtn->IsChecked())
+ return static_cast<sal_uInt16>(m_pUserEdit->GetValue());
else
return SPECIAL_FACTOR;
}
-void SvxZoomDialog::SetFactor( sal_uInt16 nNewFactor, sal_uInt16 nBtnId )
+void SvxZoomDialog::SetFactor(sal_uInt16 nNewFactor, sal_uInt16 nButtonId)
{
m_pUserEdit->Disable();
- if ( !nBtnId )
+ if (!nButtonId)
{
if ( nNewFactor == 100 )
{
@@ -62,35 +64,37 @@ void SvxZoomDialog::SetFactor( sal_uInt16 nNewFactor, sal_uInt16 nBtnId )
{
m_pUserBtn->Check();
m_pUserEdit->Enable();
- m_pUserEdit->SetValue( (long)nNewFactor );
+ m_pUserEdit->SetValue(static_cast<long>(nNewFactor));
m_pUserEdit->GrabFocus();
}
}
else
{
- m_pUserEdit->SetValue( (long)nNewFactor );
-
- if ( ZOOMBTN_OPTIMAL == nBtnId )
- {
- m_pOptimalBtn->Check();
- m_pOptimalBtn->GrabFocus();
- }
- else if ( ZOOMBTN_PAGEWIDTH == nBtnId )
- {
- m_pPageWidthBtn->Check();
- m_pPageWidthBtn->GrabFocus();
- }
- else if ( ZOOMBTN_WHOLEPAGE == nBtnId )
+ m_pUserEdit->SetValue(static_cast<long>(nNewFactor));
+ switch(nButtonId)
{
- m_pWholePageBtn->Check();
- m_pWholePageBtn->GrabFocus();
+ case ZOOMBTN_OPTIMAL:
+ {
+ m_pOptimalBtn->Check();
+ m_pOptimalBtn->GrabFocus();
+ }
+ case ZOOMBTN_PAGEWIDTH:
+ {
+ m_pPageWidthBtn->Check();
+ m_pPageWidthBtn->GrabFocus();
+ }
+ case ZOOMBTN_WHOLEPAGE:
+ {
+ m_pWholePageBtn->Check();
+ m_pWholePageBtn->GrabFocus();
+ }
}
}
}
-void SvxZoomDialog::HideButton( sal_uInt16 nBtnId )
+void SvxZoomDialog::HideButton(sal_uInt16 nButtonId)
{
- switch ( nBtnId )
+ switch (nButtonId)
{
case ZOOMBTN_OPTIMAL:
m_pOptimalBtn->Hide();
@@ -109,20 +113,25 @@ void SvxZoomDialog::HideButton( sal_uInt16 nBtnId )
}
}
-void SvxZoomDialog::SetLimits( sal_uInt16 nMin, sal_uInt16 nMax )
+void SvxZoomDialog::SetLimits(sal_uInt16 nMin, sal_uInt16 nMax)
+{
+ DBG_ASSERT(nMin < nMax, "invalid limits");
+ m_pUserEdit->SetMin(nMin);
+ m_pUserEdit->SetFirst(nMin);
+ m_pUserEdit->SetMax(nMax);
+ m_pUserEdit->SetLast(nMax);
+}
+
+const SfxItemSet* SvxZoomDialog::GetOutputItemSet() const
{
- DBG_ASSERT( nMin < nMax, "invalid limits" );
- m_pUserEdit->SetMin( nMin );
- m_pUserEdit->SetFirst( nMin );
- m_pUserEdit->SetMax( nMax );
- m_pUserEdit->SetLast( nMax );
+ return mpOutSet.get();
}
SvxZoomDialog::SvxZoomDialog( vcl::Window* pParent, const SfxItemSet& rCoreSet )
: SfxModalDialog(pParent, "ZoomDialog", "cui/ui/zoomdialog.ui")
- , rSet(rCoreSet)
- , pOutSet(NULL)
- , bModified(false)
+ , mrSet(rCoreSet)
+ , mpOutSet()
+ , mbModified(false)
{
get(m_pOptimalBtn, "optimal");
@@ -138,26 +147,26 @@ SvxZoomDialog::SvxZoomDialog( vcl::Window* pParent, const SfxItemSet& rCoreSet )
get(m_pColumnsEdit, "columnssb");
get(m_pBookModeChk, "bookmode");
get(m_pOKBtn, "ok");
- Link aLink = LINK( this, SvxZoomDialog, UserHdl );
- m_p100Btn->SetClickHdl( aLink );
- m_pOptimalBtn->SetClickHdl( aLink );
- m_pPageWidthBtn->SetClickHdl( aLink );
- m_pWholePageBtn->SetClickHdl( aLink );
- m_pUserBtn->SetClickHdl( aLink );
+ Link aLink = LINK(this, SvxZoomDialog, UserHdl);
+ m_p100Btn->SetClickHdl(aLink);
+ m_pOptimalBtn->SetClickHdl(aLink);
+ m_pPageWidthBtn->SetClickHdl(aLink);
+ m_pWholePageBtn->SetClickHdl(aLink);
+ m_pUserBtn->SetClickHdl(aLink);
- Link aViewLayoutLink = LINK( this, SvxZoomDialog, ViewLayoutUserHdl );
- m_pAutomaticBtn->SetClickHdl( aViewLayoutLink );
- m_pSingleBtn->SetClickHdl( aViewLayoutLink );
- m_pColumnsBtn->SetClickHdl( aViewLayoutLink );
+ Link aViewLayoutLink = LINK(this, SvxZoomDialog, ViewLayoutUserHdl);
+ m_pAutomaticBtn->SetClickHdl(aViewLayoutLink);
+ m_pSingleBtn->SetClickHdl(aViewLayoutLink);
+ m_pColumnsBtn->SetClickHdl(aViewLayoutLink);
- Link aViewLayoutSpinLink = LINK( this, SvxZoomDialog, ViewLayoutSpinHdl );
- m_pColumnsEdit->SetModifyHdl( aViewLayoutSpinLink );
+ Link aViewLayoutSpinLink = LINK(this, SvxZoomDialog, ViewLayoutSpinHdl);
+ m_pColumnsEdit->SetModifyHdl(aViewLayoutSpinLink);
- Link aViewLayoutCheckLink = LINK( this, SvxZoomDialog, ViewLayoutCheckHdl );
- m_pBookModeChk->SetClickHdl( aViewLayoutCheckLink );
+ Link aViewLayoutCheckLink = LINK(this, SvxZoomDialog, ViewLayoutCheckHdl);
+ m_pBookModeChk->SetClickHdl(aViewLayoutCheckLink);
- m_pOKBtn->SetClickHdl( LINK( this, SvxZoomDialog, OKHdl ) );
- m_pUserEdit->SetModifyHdl( LINK( this, SvxZoomDialog, SpinHdl ) );
+ m_pOKBtn->SetClickHdl(LINK(this, SvxZoomDialog, OKHdl));
+ m_pUserEdit->SetModifyHdl(LINK(this, SvxZoomDialog, SpinHdl));
// default values
sal_uInt16 nValue = 100;
@@ -166,50 +175,48 @@ SvxZoomDialog::SvxZoomDialog( vcl::Window* pParent, const SfxItemSet& rCoreSet )
// maybe get the old value first
const SfxUInt16Item* pOldUserItem = 0;
- SfxObjectShell* pSh = SfxObjectShell::Current();
+ SfxObjectShell* pShell = SfxObjectShell::Current();
- if ( pSh )
- pOldUserItem = static_cast<const SfxUInt16Item*>(pSh->GetItem( SID_ATTR_ZOOM_USER ));
+ if (pShell)
+ pOldUserItem = static_cast<const SfxUInt16Item*>(pShell->GetItem(SID_ATTR_ZOOM_USER));
- if ( pOldUserItem )
+ if (pOldUserItem)
nValue = pOldUserItem->GetValue();
// initialize UserEdit
- if ( nMin > nValue )
+ if (nMin > nValue)
nMin = nValue;
- if ( nMax < nValue )
+ if (nMax < nValue)
nMax = nValue;
- m_pUserEdit->SetMin( nMin );
- m_pUserEdit->SetFirst( nMin );
- m_pUserEdit->SetMax( nMax );
- m_pUserEdit->SetLast( nMax );
- m_pUserEdit->SetValue( nValue );
+
+ SetLimits(nMin, nMax);
+ m_pUserEdit->SetValue(nValue);
m_pUserEdit->SetAccessibleName(m_pUserBtn->GetText());
m_pColumnsEdit->SetAccessibleName(m_pColumnsBtn->GetText());
m_pColumnsEdit->SetAccessibleRelationMemberOf(m_pColumnsBtn);
m_pBookModeChk->SetAccessibleRelationMemberOf(m_pColumnsBtn);
- const SfxPoolItem& rItem = rSet.Get( rSet.GetPool()->GetWhich( SID_ATTR_ZOOM ) );
+ const SfxPoolItem& rItem = mrSet.Get(mrSet.GetPool()->GetWhich(SID_ATTR_ZOOM));
- if ( rItem.ISA(SvxZoomItem) )
+ if (rItem.ISA(SvxZoomItem))
{
const SvxZoomItem& rZoomItem = static_cast<const SvxZoomItem&>(rItem);
const sal_uInt16 nZoom = rZoomItem.GetValue();
const SvxZoomType eType = rZoomItem.GetType();
const sal_uInt16 nValSet = rZoomItem.GetValueSet();
- sal_uInt16 nBtnId = 0;
+ sal_uInt16 nButtonId = 0;
- switch ( eType )
+ switch (eType)
{
case SVX_ZOOM_OPTIMAL:
- nBtnId = ZOOMBTN_OPTIMAL;
+ nButtonId = ZOOMBTN_OPTIMAL;
break;
case SVX_ZOOM_PAGEWIDTH:
- nBtnId = ZOOMBTN_PAGEWIDTH;
+ nButtonId = ZOOMBTN_PAGEWIDTH;
break;
case SVX_ZOOM_WHOLEPAGE:
- nBtnId = ZOOMBTN_WHOLEPAGE;
+ nButtonId = ZOOMBTN_WHOLEPAGE;
break;
case SVX_ZOOM_PERCENT:
break;
@@ -217,54 +224,56 @@ SvxZoomDialog::SvxZoomDialog( vcl::Window* pParent, const SfxItemSet& rCoreSet )
break;
}
- if ( !(SVX_ZOOM_ENABLE_100 & nValSet) )
+ if (!(SVX_ZOOM_ENABLE_100 & nValSet))
m_p100Btn->Disable();
- if ( !(SVX_ZOOM_ENABLE_OPTIMAL & nValSet) )
+ if (!(SVX_ZOOM_ENABLE_OPTIMAL & nValSet))
m_pOptimalBtn->Disable();
- if ( !(SVX_ZOOM_ENABLE_PAGEWIDTH & nValSet) )
+ if (!(SVX_ZOOM_ENABLE_PAGEWIDTH & nValSet))
m_pPageWidthBtn->Disable();
- if ( !(SVX_ZOOM_ENABLE_WHOLEPAGE & nValSet) )
+ if (!(SVX_ZOOM_ENABLE_WHOLEPAGE & nValSet))
m_pWholePageBtn->Disable();
- SetFactor( nZoom, nBtnId );
+
+ SetFactor(nZoom, nButtonId);
}
else
{
const sal_uInt16 nZoom = static_cast<const SfxUInt16Item&>(rItem).GetValue();
- SetFactor( nZoom );
+ SetFactor(nZoom);
}
- const SfxPoolItem* pViewLayoutItem = 0;
- if ( SfxItemState::SET == rSet.GetItemState( SID_ATTR_VIEWLAYOUT, false, &pViewLayoutItem ) )
+ const SfxPoolItem* pPoolViewLayoutItem = NULL;
+ if (SfxItemState::SET == mrSet.GetItemState(SID_ATTR_VIEWLAYOUT, false, &pPoolViewLayoutItem))
{
- const sal_uInt16 nColumns = static_cast<const SvxViewLayoutItem*>(pViewLayoutItem)->GetValue();
- const bool bBookMode = static_cast<const SvxViewLayoutItem*>(pViewLayoutItem)->IsBookMode();
+ const SvxViewLayoutItem* pViewLayoutItem = static_cast<const SvxViewLayoutItem*>(pPoolViewLayoutItem);
+ const sal_uInt16 nColumns = pViewLayoutItem->GetValue();
+ const bool bBookMode = pViewLayoutItem->IsBookMode();
- if ( 0 == nColumns )
+ if (0 == nColumns)
{
m_pAutomaticBtn->Check();
- m_pColumnsEdit->SetValue( 2 );
+ m_pColumnsEdit->SetValue(2);
m_pColumnsEdit->Disable();
m_pBookModeChk->Disable();
}
- else if ( 1 == nColumns)
+ else if (1 == nColumns)
{
m_pSingleBtn->Check();
- m_pColumnsEdit->SetValue( 2 );
+ m_pColumnsEdit->SetValue(2);
m_pColumnsEdit->Disable();
m_pBookModeChk->Disable();
}
else
{
m_pColumnsBtn->Check();
- if ( !bBookMode )
+ if (!bBookMode)
{
- m_pColumnsEdit->SetValue( nColumns );
- if ( 0 != nColumns % 2 )
+ m_pColumnsEdit->SetValue(nColumns);
+ if (nColumns % 2 != 0)
m_pBookModeChk->Disable();
}
else
{
- m_pColumnsEdit->SetValue( nColumns );
+ m_pColumnsEdit->SetValue(nColumns);
m_pBookModeChk->Check();
}
}
@@ -277,52 +286,52 @@ SvxZoomDialog::SvxZoomDialog( vcl::Window* pParent, const SfxItemSet& rCoreSet )
}
SvxZoomDialog::~SvxZoomDialog()
-{
- delete pOutSet;
- pOutSet = 0;
-}
+{}
-IMPL_LINK( SvxZoomDialog, UserHdl, RadioButton *, pBtn )
+IMPL_LINK(SvxZoomDialog, UserHdl, RadioButton *, pButton)
{
- bModified = true;
+ mbModified = true;
- if (pBtn == m_pUserBtn)
+ if (pButton == m_pUserBtn)
{
m_pUserEdit->Enable();
m_pUserEdit->GrabFocus();
}
else
+ {
m_pUserEdit->Disable();
+ }
return 0;
}
IMPL_LINK_NOARG(SvxZoomDialog, SpinHdl)
{
- if ( !m_pUserBtn->IsChecked() )
+ if (!m_pUserBtn->IsChecked())
return 0;
- bModified = true;
+
+ mbModified = true;
return 0;
}
-IMPL_LINK( SvxZoomDialog, ViewLayoutUserHdl, RadioButton *, pBtn )
+IMPL_LINK(SvxZoomDialog, ViewLayoutUserHdl, RadioButton*, pButton)
{
- bModified = true;
+ mbModified = true;
- if (pBtn == m_pAutomaticBtn)
+ if (pButton == m_pAutomaticBtn)
{
m_pColumnsEdit->Disable();
m_pBookModeChk->Disable();
}
- else if (pBtn == m_pSingleBtn)
+ else if (pButton == m_pSingleBtn)
{
m_pColumnsEdit->Disable();
m_pBookModeChk->Disable();
}
- else if (pBtn == m_pColumnsBtn)
+ else if (pButton == m_pColumnsBtn)
{
m_pColumnsEdit->Enable();
m_pColumnsEdit->GrabFocus();
- if ( 0 == m_pColumnsEdit->GetValue() % 2 )
+ if (m_pColumnsEdit->GetValue() % 2 == 0)
m_pBookModeChk->Enable();
}
else
@@ -334,71 +343,75 @@ IMPL_LINK( SvxZoomDialog, ViewLayoutUserHdl, RadioButton *, pBtn )
return 0;
}
-IMPL_LINK( SvxZoomDialog, ViewLayoutSpinHdl, NumericField *, pEdt )
+IMPL_LINK(SvxZoomDialog, ViewLayoutSpinHdl, NumericField*, pEdit)
{
- if ( pEdt == m_pColumnsEdit && !m_pColumnsBtn->IsChecked() )
+ if (pEdit == m_pColumnsEdit && !m_pColumnsBtn->IsChecked())
return 0;
- if ( 0 == m_pColumnsEdit->GetValue() % 2 )
+ if (m_pColumnsEdit->GetValue() % 2 == 0)
+ {
m_pBookModeChk->Enable();
+ }
else
{
- m_pBookModeChk->Check( false );
+ m_pBookModeChk->Check(false);
m_pBookModeChk->Disable();
}
- bModified = true;
+ mbModified = true;
return 0;
}
-IMPL_LINK( SvxZoomDialog, ViewLayoutCheckHdl, CheckBox *, pChk )
+IMPL_LINK(SvxZoomDialog, ViewLayoutCheckHdl, CheckBox*, pCheckBox)
{
- if (pChk == m_pBookModeChk && !m_pColumnsBtn->IsChecked())
+ if (pCheckBox == m_pBookModeChk && !m_pColumnsBtn->IsChecked())
return 0;
- bModified = true;
+ mbModified = true;
return 0;
}
-IMPL_LINK( SvxZoomDialog, OKHdl, Button *, pBtn )
+IMPL_LINK(SvxZoomDialog, OKHdl, Button*, pButton)
{
- if ( bModified || m_pOKBtn != pBtn )
+ if (mbModified || m_pOKBtn != pButton)
{
- SvxZoomItem aZoomItem( SVX_ZOOM_PERCENT, 0, rSet.GetPool()->GetWhich( SID_ATTR_ZOOM ) );
- SvxViewLayoutItem aViewLayoutItem( 0, false, rSet.GetPool()->GetWhich( SID_ATTR_VIEWLAYOUT ) );
+ SvxZoomItem aZoomItem(SVX_ZOOM_PERCENT, 0, mrSet.GetPool()->GetWhich(SID_ATTR_ZOOM));
+ SvxViewLayoutItem aViewLayoutItem(0, false, mrSet.GetPool()->GetWhich(SID_ATTR_VIEWLAYOUT));
- if ( m_pOKBtn == pBtn )
+ if (m_pOKBtn == pButton)
{
sal_uInt16 nFactor = GetFactor();
- if ( SPECIAL_FACTOR == nFactor )
+ if (SPECIAL_FACTOR == nFactor)
{
- if ( m_pOptimalBtn->IsChecked() )
- aZoomItem.SetType( SVX_ZOOM_OPTIMAL );
- else if ( m_pPageWidthBtn->IsChecked() )
- aZoomItem.SetType( SVX_ZOOM_PAGEWIDTH );
- else if ( m_pWholePageBtn->IsChecked() )
- aZoomItem.SetType( SVX_ZOOM_WHOLEPAGE );
+ if (m_pOptimalBtn->IsChecked())
+ aZoomItem.SetType(SVX_ZOOM_OPTIMAL);
+ else if (m_pPageWidthBtn->IsChecked())
+ aZoomItem.SetType(SVX_ZOOM_PAGEWIDTH);
+ else if (m_pWholePageBtn->IsChecked())
+ aZoomItem.SetType(SVX_ZOOM_WHOLEPAGE);
}
else
- aZoomItem.SetValue( nFactor );
+ {
+ aZoomItem.SetValue(nFactor);
+ }
- if ( m_pAutomaticBtn->IsChecked() )
+ if (m_pAutomaticBtn->IsChecked())
{
- aViewLayoutItem.SetValue( 0 );
- aViewLayoutItem.SetBookMode( false );
+ aViewLayoutItem.SetValue(0);
+ aViewLayoutItem.SetBookMode(false);
}
- if ( m_pSingleBtn->IsChecked() )
+ if (m_pSingleBtn->IsChecked())
{
- aViewLayoutItem.SetValue( 1 );
- aViewLayoutItem.SetBookMode( false );
+ aViewLayoutItem.SetValue(1);
+ aViewLayoutItem.SetBookMode(false);
}
- else if ( m_pColumnsBtn->IsChecked() )
+ else if (m_pColumnsBtn->IsChecked())
{
- aViewLayoutItem.SetValue( static_cast<sal_uInt16>(m_pColumnsEdit->GetValue()) );
- aViewLayoutItem.SetBookMode( m_pBookModeChk->IsChecked() );
+ aViewLayoutItem.SetValue(static_cast<sal_uInt16>(m_pColumnsEdit->GetValue()));
+ aViewLayoutItem.SetBookMode(m_pBookModeChk->IsChecked());
}
}
else
@@ -406,23 +419,27 @@ IMPL_LINK( SvxZoomDialog, OKHdl, Button *, pBtn )
OSL_FAIL("Wrong Button");
return 0;
}
- pOutSet = new SfxItemSet( rSet );
- pOutSet->Put( aZoomItem );
+ mpOutSet.reset(new SfxItemSet(mrSet));
+ mpOutSet->Put(aZoomItem);
// don't set attribute in case the whole viewlayout stuff is disabled:
if (m_pViewFrame->IsEnabled())
- pOutSet->Put(aViewLayoutItem);
+ mpOutSet->Put(aViewLayoutItem);
// memorize value from the UserEdit beyond the dialog
SfxObjectShell* pShell = SfxObjectShell::Current();
- if ( pShell )
- pShell->PutItem( SfxUInt16Item( SID_ATTR_ZOOM_USER,
- (sal_uInt16)m_pUserEdit->GetValue() ) );
+ if (pShell)
+ {
+ sal_uInt16 nZoomValue = static_cast<sal_uInt16>(m_pUserEdit->GetValue());
+ pShell->PutItem(SfxUInt16Item(SID_ATTR_ZOOM_USER, nZoomValue));
+ }
EndDialog( RET_OK );
}
else
+ {
EndDialog( RET_CANCEL );
+ }
return 0;
}
diff --git a/cui/source/inc/zoom.hxx b/cui/source/inc/zoom.hxx
index a8b3176ddb56..3cccaceb49e8 100644
--- a/cui/source/inc/zoom.hxx
+++ b/cui/source/inc/zoom.hxx
@@ -27,44 +27,44 @@
class SvxZoomDialog : public SfxModalDialog
{
private:
- RadioButton* m_pOptimalBtn;
- RadioButton* m_pWholePageBtn;
- RadioButton* m_pPageWidthBtn;
- RadioButton* m_p100Btn;
- RadioButton* m_pUserBtn;
- MetricField* m_pUserEdit;
+ RadioButton* m_pOptimalBtn;
+ RadioButton* m_pWholePageBtn;
+ RadioButton* m_pPageWidthBtn;
+ RadioButton* m_p100Btn;
+ RadioButton* m_pUserBtn;
+ MetricField* m_pUserEdit;
- VclContainer* m_pViewFrame;
- RadioButton* m_pAutomaticBtn;
- RadioButton* m_pSingleBtn;
- RadioButton* m_pColumnsBtn;
- NumericField* m_pColumnsEdit;
- CheckBox* m_pBookModeChk;
+ VclContainer* m_pViewFrame;
+ RadioButton* m_pAutomaticBtn;
+ RadioButton* m_pSingleBtn;
+ RadioButton* m_pColumnsBtn;
+ NumericField* m_pColumnsEdit;
+ CheckBox* m_pBookModeChk;
- OKButton* m_pOKBtn;
+ OKButton* m_pOKBtn;
- const SfxItemSet& rSet;
- SfxItemSet* pOutSet;
- bool bModified;
+ const SfxItemSet& mrSet;
+ std::unique_ptr<SfxItemSet> mpOutSet;
+ bool mbModified;
- DECL_LINK( UserHdl, RadioButton* );
- DECL_LINK(SpinHdl, void *);
- DECL_LINK( ViewLayoutUserHdl, RadioButton* );
- DECL_LINK( ViewLayoutSpinHdl, NumericField* );
- DECL_LINK( ViewLayoutCheckHdl, CheckBox* );
- DECL_LINK( OKHdl, Button* );
+ DECL_LINK(UserHdl, RadioButton*);
+ DECL_LINK(SpinHdl, void*);
+ DECL_LINK(ViewLayoutUserHdl, RadioButton*);
+ DECL_LINK(ViewLayoutSpinHdl, NumericField*);
+ DECL_LINK(ViewLayoutCheckHdl, CheckBox*);
+ DECL_LINK(OKHdl, Button*);
public:
- SvxZoomDialog( vcl::Window* pParent, const SfxItemSet& rCoreSet );
+ SvxZoomDialog(vcl::Window* pParent, const SfxItemSet& rCoreSet);
virtual ~SvxZoomDialog();
- const SfxItemSet* GetOutputItemSet() const { return pOutSet; }
+ const SfxItemSet* GetOutputItemSet() const;
- sal_uInt16 GetFactor() const;
- void SetFactor( sal_uInt16 nNewFactor, sal_uInt16 nBtnId = 0 );
+ sal_uInt16 GetFactor() const;
+ void SetFactor(sal_uInt16 nNewFactor, sal_uInt16 nButtonId = 0);
- void HideButton( sal_uInt16 nBtnId );
- void SetLimits( sal_uInt16 nMin, sal_uInt16 nMax );
+ void HideButton(sal_uInt16 nButtonId);
+ void SetLimits(sal_uInt16 nMin, sal_uInt16 nMax);
};
#endif