Kaydet (Commit) 8c639609 authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl

Cleanup source of zoom dialog, translate german error message

Change-Id: Iccd140f06b9504606850de780262a23004a803b4
üst 0be5d2b2
......@@ -47,8 +47,6 @@ sal_uInt16 SvxZoomDialog::GetFactor() const
return SPECIAL_FACTOR;
}
void SvxZoomDialog::SetFactor( sal_uInt16 nNewFactor, sal_uInt16 nBtnId )
{
m_pUserEdit->Disable();
......@@ -90,8 +88,6 @@ void SvxZoomDialog::SetFactor( sal_uInt16 nNewFactor, sal_uInt16 nBtnId )
}
}
void SvxZoomDialog::HideButton( sal_uInt16 nBtnId )
{
switch ( nBtnId )
......@@ -109,12 +105,10 @@ void SvxZoomDialog::HideButton( sal_uInt16 nBtnId )
break;
default:
OSL_FAIL( "Falsche Button-Nummer!!!" );
OSL_FAIL("Wrong button number!" );
}
}
void SvxZoomDialog::SetLimits( sal_uInt16 nMin, sal_uInt16 nMax )
{
DBG_ASSERT( nMin < nMax, "invalid limits" );
......@@ -124,8 +118,6 @@ void SvxZoomDialog::SetLimits( sal_uInt16 nMin, sal_uInt16 nMax )
m_pUserEdit->SetLast( nMax );
}
SvxZoomDialog::SvxZoomDialog( vcl::Window* pParent, const SfxItemSet& rCoreSet )
: SfxModalDialog(pParent, "ZoomDialog", "cui/ui/zoomdialog.ui")
, rSet(rCoreSet)
......@@ -284,16 +276,12 @@ SvxZoomDialog::SvxZoomDialog( vcl::Window* pParent, const SfxItemSet& rCoreSet )
}
}
SvxZoomDialog::~SvxZoomDialog()
{
delete pOutSet;
pOutSet = 0;
}
IMPL_LINK( SvxZoomDialog, UserHdl, RadioButton *, pBtn )
{
bModified = true;
......@@ -308,8 +296,6 @@ IMPL_LINK( SvxZoomDialog, UserHdl, RadioButton *, pBtn )
return 0;
}
IMPL_LINK_NOARG(SvxZoomDialog, SpinHdl)
{
if ( !m_pUserBtn->IsChecked() )
......@@ -318,8 +304,6 @@ IMPL_LINK_NOARG(SvxZoomDialog, SpinHdl)
return 0;
}
IMPL_LINK( SvxZoomDialog, ViewLayoutUserHdl, RadioButton *, pBtn )
{
bModified = true;
......@@ -343,15 +327,13 @@ IMPL_LINK( SvxZoomDialog, ViewLayoutUserHdl, RadioButton *, pBtn )
}
else
{
OSL_FAIL( "Wrong Button" );
OSL_FAIL("Wrong Button");
return 0;
}
return 0;
}
IMPL_LINK( SvxZoomDialog, ViewLayoutSpinHdl, NumericField *, pEdt )
{
if ( pEdt == m_pColumnsEdit && !m_pColumnsBtn->IsChecked() )
......@@ -370,8 +352,6 @@ IMPL_LINK( SvxZoomDialog, ViewLayoutSpinHdl, NumericField *, pEdt )
return 0;
}
IMPL_LINK( SvxZoomDialog, ViewLayoutCheckHdl, CheckBox *, pChk )
{
if (pChk == m_pBookModeChk && !m_pColumnsBtn->IsChecked())
......@@ -382,8 +362,6 @@ IMPL_LINK( SvxZoomDialog, ViewLayoutCheckHdl, CheckBox *, pChk )
return 0;
}
IMPL_LINK( SvxZoomDialog, OKHdl, Button *, pBtn )
{
if ( bModified || m_pOKBtn != pBtn )
......@@ -425,7 +403,7 @@ IMPL_LINK( SvxZoomDialog, OKHdl, Button *, pBtn )
}
else
{
OSL_FAIL( "Wrong Button" );
OSL_FAIL("Wrong Button");
return 0;
}
pOutSet = new SfxItemSet( rSet );
......@@ -436,10 +414,10 @@ IMPL_LINK( SvxZoomDialog, OKHdl, Button *, pBtn )
pOutSet->Put(aViewLayoutItem);
// memorize value from the UserEdit beyond the dialog
SfxObjectShell* pSh = SfxObjectShell::Current();
SfxObjectShell* pShell = SfxObjectShell::Current();
if ( pSh )
pSh->PutItem( SfxUInt16Item( SID_ATTR_ZOOM_USER,
if ( pShell )
pShell->PutItem( SfxUInt16Item( SID_ATTR_ZOOM_USER,
(sal_uInt16)m_pUserEdit->GetValue() ) );
EndDialog( RET_OK );
}
......@@ -448,5 +426,4 @@ IMPL_LINK( SvxZoomDialog, OKHdl, Button *, pBtn )
return 0;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment