summaryrefslogtreecommitdiff
path: root/cui/source/dialogs/dlgname.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-01-25 12:25:19 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-01-25 12:43:35 +0000
commitfbe878da6216028f5943b7863be366adfa0be4fc (patch)
treef3826450d9344c786456e1c878b51a0f8f4b1430 /cui/source/dialogs/dlgname.cxx
parent4c05804b2ee2e98c1f2652f88283815a43e9d75e (diff)
hand rolled dynamic positioning code can go now
Change-Id: If30c91ea3828f8e4d8ed4c5ac95697fb2817d68f
Diffstat (limited to 'cui/source/dialogs/dlgname.cxx')
-rw-r--r--cui/source/dialogs/dlgname.cxx24
1 files changed, 4 insertions, 20 deletions
diff --git a/cui/source/dialogs/dlgname.cxx b/cui/source/dialogs/dlgname.cxx
index 2b824f2ac8bc..c8417713f6e1 100644
--- a/cui/source/dialogs/dlgname.cxx
+++ b/cui/source/dialogs/dlgname.cxx
@@ -46,20 +46,6 @@ SvxNameDialog::SvxNameDialog( Window* pWindow, const String& rName, const String
pEdtName->SetSelection(Selection(SELECTION_MIN, SELECTION_MAX));
ModifyHdl(&pEdtName);
pEdtName->SetModifyHdl(LINK(this, SvxNameDialog, ModifyHdl));
-
- // dynamic height of the description field
- Size aSize = pFtDescription->GetSizePixel();
- long nTxtWidth = pFtDescription->GetCtrlTextWidth( rDesc );
- if ( nTxtWidth > aSize.Width() )
- {
- long nLines = Min( ( nTxtWidth / (aSize.Width()+1) + 1 ), MAX_DESCRIPTION_LINES );
- long nHeight = aSize.Height();
- aSize.Height() = nHeight * nLines;
- pFtDescription->SetSizePixel( aSize );
- Point aPnt = pEdtName->GetPosPixel();
- aPnt.Y() += ( aSize.Height() - nHeight );
- pEdtName->SetPosPixel( aPnt );
- }
}
IMPL_LINK_NOARG(SvxNameDialog, ModifyHdl)
@@ -130,8 +116,9 @@ SvxObjectTitleDescDialog::SvxObjectTitleDescDialog(
|*
\************************************************************************/
-SvxMessDialog::SvxMessDialog( Window* pWindow, const String& rText, const String& rDesc, Image* pImg ) :
- ModalDialog ( pWindow, "MessBox", "cui/ui/messbox.ui" )
+SvxMessDialog::SvxMessDialog( Window* pWindow, const String& rText, const String& rDesc, Image* pImg )
+ : ModalDialog(pWindow, "MessBox", "cui/ui/messbox.ui")
+ , pImage(NULL)
{
get(pBtn1, "mess_box_btn1");
get(pBtn2, "mess_box_btn2");
@@ -142,8 +129,6 @@ SvxMessDialog::SvxMessDialog( Window* pWindow, const String& rText, const String
pImage = new Image( *pImg );
pFtImage->SetImage( *pImage );
pFtImage->SetStyle( ( pFtImage->GetStyle()/* | WB_NOTABSTOP */) & ~WB_3DLOOK );
- pFtImage->SetPosSizePixel( LogicToPixel( Point( 3, 6 ), MAP_APPFONT ),
- pFtImage->GetImage().GetSizePixel() );
pFtImage->Show();
}
@@ -156,8 +141,7 @@ SvxMessDialog::SvxMessDialog( Window* pWindow, const String& rText, const String
SvxMessDialog::~SvxMessDialog()
{
- if( pImage )
- delete pImage;
+ delete pImage;
}
/*************************************************************************/