moving of controls optimized

This commit is contained in:
Oliver Specht
2001-05-09 07:15:35 +00:00
parent 08a96ef93e
commit 32b66beeef
2 changed files with 74 additions and 56 deletions

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: optload.cxx,v $ * $RCSfile: optload.cxx,v $
* *
* $Revision: 1.8 $ * $Revision: 1.9 $
* *
* last change: $Author: os $ $Date: 2001-05-04 12:05:45 $ * last change: $Author: os $ $Date: 2001-05-09 08:15:35 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -300,12 +300,6 @@ BOOL __EXPORT SwLoadOptPage::FillItemSet( SfxItemSet& rSet )
/*-----------------18.01.97 12.42------------------- /*-----------------18.01.97 12.42-------------------
--------------------------------------------------*/ --------------------------------------------------*/
inline void lcl_MoveWin(Window& rWin, long nDiff)
{
Point aPos(rWin.GetPosPixel());
aPos.Y() -= nDiff;
rWin.SetPosPixel(aPos);
}
void __EXPORT SwLoadOptPage::Reset( const SfxItemSet& rSet) void __EXPORT SwLoadOptPage::Reset( const SfxItemSet& rSet)
{ {
const SwMasterUsrPref* pUsrPref = SW_MOD()->GetUsrPref(FALSE); const SwMasterUsrPref* pUsrPref = SW_MOD()->GetUsrPref(FALSE);
@@ -393,14 +387,24 @@ void __EXPORT SwLoadOptPage::Reset( const SfxItemSet& rSet)
aCaptionPB.Hide(); aCaptionPB.Hide();
long nDiff = aSettingsGB.GetPosPixel().Y() - aCaptionGB.GetPosPixel().Y(); long nDiff = aSettingsGB.GetPosPixel().Y() - aCaptionGB.GetPosPixel().Y();
lcl_MoveWin(aSettingsGB, nDiff);
lcl_MoveWin(aMetricFT, nDiff); Window* aCntrlArr[] = {
lcl_MoveWin(aMetricLB, nDiff); &aSettingsGB,
lcl_MoveWin(aTabFT, nDiff); &aMetricFT,
lcl_MoveWin(aTabMF, nDiff); &aMetricLB,
lcl_MoveWin(aCompatGB, nDiff); &aTabFT,
lcl_MoveWin(aMergeDistCB, nDiff); &aTabMF,
lcl_MoveWin(aMergeDistPageStartCB, nDiff); &aCompatGB,
&aMergeDistCB,
&aMergeDistPageStartCB,
0};
for( Window** ppW = aCntrlArr; *ppW; ++ppW )
{
Point aPnt( (*ppW)->GetPosPixel() );
aPnt.Y() -= nDiff;
(*ppW)->SetPosPixel( aPnt );
}
} }
} }
/*-----------------13.01.97 14.44------------------- /*-----------------13.01.97 14.44-------------------

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: mailmrge.cxx,v $ * $RCSfile: mailmrge.cxx,v $
* *
* $Revision: 1.8 $ * $Revision: 1.9 $
* *
* last change: $Author: os $ $Date: 2001-03-14 09:54:00 $ * last change: $Author: os $ $Date: 2001-05-09 08:15:09 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -155,13 +155,6 @@ using namespace com::sun::star::frame;
/*------------------------------------------------------------------------ /*------------------------------------------------------------------------
Beschreibung: Beschreibung:
------------------------------------------------------------------------*/ ------------------------------------------------------------------------*/
void lcl_MoveWin(Window& rWin, long nDiff)
{
Point aPos(rWin.GetPosPixel());
aPos.Y() -= nDiff;
rWin.SetPosPixel(aPos);
}
SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell, SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
const String& rSourceName, const String& rSourceName,
const String& rTblName, const String& rTblName,
@@ -226,37 +219,58 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
Size aSize = GetSizePixel(); Size aSize = GetSizePixel();
aSize.Height() -= nDiff; aSize.Height() -= nDiff;
SetSizePixel(aSize); SetSizePixel(aSize);
lcl_MoveWin(aAllRB , nDiff); Window* aCntrlArr[] = {
lcl_MoveWin(aMarkedRB , nDiff); &aAllRB ,
lcl_MoveWin(aFromRB , nDiff); &aMarkedRB ,
lcl_MoveWin(aFromNF , nDiff); &aFromRB ,
lcl_MoveWin(aBisFT , nDiff); &aFromNF ,
lcl_MoveWin(aToNF , nDiff); &aBisFT ,
lcl_MoveWin(aRecordGB , nDiff); &aToNF ,
lcl_MoveWin(aPrinterRB , nDiff); &aRecordGB ,
lcl_MoveWin(aMailingRB , nDiff); &aPrinterRB ,
lcl_MoveWin(aFileRB , nDiff); &aMailingRB ,
lcl_MoveWin(aSingleJobsCB, nDiff); &aFileRB ,
lcl_MoveWin(aPathFT , nDiff); &aSingleJobsCB,
lcl_MoveWin(aPathED , nDiff); &aPathFT ,
lcl_MoveWin(aPathPB , nDiff); &aPathED ,
lcl_MoveWin(aFilenameFT , nDiff); &aPathPB ,
lcl_MoveWin(aColumnRB , nDiff); &aFilenameFT ,
lcl_MoveWin(aFilenameRB , nDiff); &aColumnRB ,
lcl_MoveWin(aColumnLB , nDiff); &aFilenameRB ,
lcl_MoveWin(aFilenameED , nDiff); &aColumnLB ,
lcl_MoveWin(aAddressFT , nDiff); &aFilenameED ,
lcl_MoveWin(aAddressFldLB, nDiff); &aAddressFT ,
lcl_MoveWin(aSubjectFT , nDiff); &aAddressFldLB,
lcl_MoveWin(aSubjectED , nDiff); &aSubjectFT ,
lcl_MoveWin(aFormatFT , nDiff); &aSubjectED ,
lcl_MoveWin(aAttachFT , nDiff); &aFormatFT ,
lcl_MoveWin(aAttachED , nDiff); &aAttachFT ,
lcl_MoveWin(aAttachPB , nDiff); &aAttachED ,
lcl_MoveWin(aFormatHtmlCB, nDiff); &aAttachPB ,
lcl_MoveWin(aFormatRtfCB , nDiff); &aFormatHtmlCB,
lcl_MoveWin(aFormatSwCB , nDiff); &aFormatRtfCB ,
lcl_MoveWin(aDestGB , nDiff); &aFormatSwCB ,
&aDestGB ,
0};
for( Window** ppW = aCntrlArr; *ppW; ++ppW )
{
Point aPnt( (*ppW)->GetPosPixel() );
aPnt.Y() -= nDiff;
(*ppW)->SetPosPixel( aPnt );
}
} }
else else
{ {