User: kz Date: 2006/12/13 08:48:01 Modified: dba/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
Log: INTEGRATION: CWS dba22ui (1.9.12); FILE MERGED 2006/12/04 08:05:49 fs 1.9.12.2: #i10000# 2006/11/29 09:33:53 oj 1.9.12.1: #i61558# correct size of controls to fit text size File Changes: Directory: /dba/dbaccess/source/ui/dlg/ ======================================= File [changed]: DBSetupConnectionPages.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx?r1=1.9&r2=1.10 Delta lines: +34 -0 -------------------- --- DBSetupConnectionPages.cxx 17 Sep 2006 07:05:15 -0000 1.9 +++ DBSetupConnectionPages.cxx 13 Dec 2006 16:47:57 -0000 1.10 @@ -876,6 +876,40 @@ m_aCBStartTableWizard.SetClickHdl(getControlModifiedLink()); m_aRBRegisterDataSource.SetState(sal_True); FreeResource(); + + sal_Int32 nUnrelatedHeight = LogicToPixel( Size( 0, UNRELATED_CONTROLS ), MAP_APPFONT ).Height(); + sal_Int32 nRelatedHeight = LogicToPixel( Size( 0, RELATED_CONTROLS ), MAP_APPFONT ).Height(); + + ::std::pair<Window*,sal_Int32> pWindows[] = { + ::std::pair<Window*,sal_Int32>(&m_aFTFinalHelpText,nRelatedHeight) + ,::std::pair<Window*,sal_Int32>(&m_aRBRegisterDataSource,nRelatedHeight) + ,::std::pair<Window*,sal_Int32>(&m_aRBDontregisterDataSource,nUnrelatedHeight) + ,::std::pair<Window*,sal_Int32>(&m_aFTAdditionalSettings,nRelatedHeight) + ,::std::pair<Window*,sal_Int32>(&m_aCBOpenAfterwards,nRelatedHeight) + ,::std::pair<Window*,sal_Int32>(&m_aCBStartTableWizard,nUnrelatedHeight) + ,::std::pair<Window*,sal_Int32>(&m_aFTFinalText,nUnrelatedHeight) + }; + + Point aPos(m_aFTFinalHeader.GetPosPixel()); + Size aStart(m_aFTFinalHeader.GetSizePixel()); + aPos.Y() += aStart.Height() + nUnrelatedHeight; + sal_Int32 nCount = sizeof(pWindows) / sizeof(pWindows[0]); + for (sal_Int32 i=0; i < nCount; ++i) + { + aPos.X() = pWindows[i].first->GetPosPixel().X(); + Size aSize = pWindows[i].first->GetSizePixel(); + FixedText* pText = dynamic_cast<FixedText*>(pWindows[i].first); + CheckBox* pCheck = dynamic_cast<CheckBox*>(pWindows[i].first); + RadioButton* pRadio = dynamic_cast<RadioButton*>(pWindows[i].first); + if ( pText ) + aSize = pText->CalcMinimumSize(aSize.Width()); + else if ( pRadio ) + aSize = pRadio->CalcMinimumSize(aSize.Width()); + else if ( pCheck ) + aSize = pCheck->CalcMinimumSize(aSize.Width()); + pWindows[i].first->SetPosSizePixel(aPos,aSize); + aPos.Y() += aSize.Height() + pWindows[i].second; + } } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
