clip message box dialogs to some reasonable widths
Change-Id: I7fc179865306ba5b593b090b1fdb8971ba6bd508
This commit is contained in:
parent
a166e60982
commit
19a2685ec0
@ -81,6 +81,8 @@ public:
|
||||
virtual void SetMaxTextLen( xub_StrLen nMaxLen = 0 );
|
||||
virtual xub_StrLen GetMaxTextLen() const;
|
||||
|
||||
void SetMaxTextWidth( sal_uLong nMaxWidth );
|
||||
|
||||
virtual void SetSelection( const Selection& rSelection );
|
||||
virtual const Selection& GetSelection() const;
|
||||
|
||||
|
@ -115,6 +115,8 @@ public:
|
||||
void SetMaxTextLen( xub_StrLen nLen );
|
||||
xub_StrLen GetMaxTextLen() const;
|
||||
|
||||
void SetMaxTextWidth( sal_uLong nMaxWidth );
|
||||
|
||||
sal_Bool IsInsertMode() const;
|
||||
|
||||
void InsertText( const String& rStr );
|
||||
@ -400,6 +402,11 @@ String ImpVclMEdit::GetSelected( LineEnd aSeparator ) const
|
||||
return mpTextWindow->GetTextView()->GetSelected( aSeparator );
|
||||
}
|
||||
|
||||
void ImpVclMEdit::SetMaxTextWidth( sal_uLong nMaxWidth )
|
||||
{
|
||||
mpTextWindow->GetTextEngine()->SetMaxTextWidth( nMaxWidth );
|
||||
}
|
||||
|
||||
void ImpVclMEdit::Resize()
|
||||
{
|
||||
size_t nIteration = 1;
|
||||
@ -1113,6 +1120,11 @@ void VclMultiLineEdit::SetMaxTextLen( xub_StrLen nMaxLen )
|
||||
pImpVclMEdit->SetMaxTextLen( nMaxLen );
|
||||
}
|
||||
|
||||
void VclMultiLineEdit::SetMaxTextWidth( sal_uLong nMaxWidth )
|
||||
{
|
||||
pImpVclMEdit->SetMaxTextWidth(nMaxWidth );
|
||||
}
|
||||
|
||||
xub_StrLen VclMultiLineEdit::GetMaxTextLen() const
|
||||
{
|
||||
return pImpVclMEdit->GetMaxTextLen();
|
||||
|
@ -1803,6 +1803,7 @@ short MessageDialog::Execute()
|
||||
m_pPrimaryMessage->set_hexpand(true);
|
||||
m_pPrimaryMessage->SetText(m_sPrimaryString);
|
||||
m_pPrimaryMessage->Show(!m_sPrimaryString.isEmpty());
|
||||
m_pPrimaryMessage->SetMaxTextWidth(m_pPrimaryMessage->approximate_char_width() * 60);
|
||||
|
||||
m_pSecondaryMessage = new VclMultiLineEdit(m_pGrid, nWinStyle);
|
||||
m_pSecondaryMessage->SetPaintTransparent(true);
|
||||
@ -1812,6 +1813,7 @@ short MessageDialog::Execute()
|
||||
m_pSecondaryMessage->set_hexpand(true);
|
||||
m_pSecondaryMessage->SetText(m_sSecondaryString);
|
||||
m_pSecondaryMessage->Show(!m_sSecondaryString.isEmpty());
|
||||
m_pSecondaryMessage->SetMaxTextWidth(m_pPrimaryMessage->approximate_char_width() * 80);
|
||||
|
||||
VclButtonBox *pButtonBox = get_action_area();
|
||||
assert(pButtonBox);
|
||||
|
Loading…
x
Reference in New Issue
Block a user