Kaydet (Commit) 91cc656c authored tarafından Cédric Bosdonnat's avatar Cédric Bosdonnat

Remove the size in the LineListBox

üst 932d9136
...@@ -315,7 +315,7 @@ class SVT_DLLPUBLIC LineListBox : public ListBox ...@@ -315,7 +315,7 @@ class SVT_DLLPUBLIC LineListBox : public ListBox
SVT_DLLPRIVATE void ImpGetLine( long nLine1, long nLine2, long nDistance, SVT_DLLPRIVATE void ImpGetLine( long nLine1, long nLine2, long nDistance,
Color nColor1, Color nColor2, Color nColorDist, Color nColor1, Color nColor2, Color nColorDist,
sal_uInt16 nStyle, Bitmap& rBmp, XubString& rStr ); sal_uInt16 nStyle, Bitmap& rBmp );
using Window::ImplInit; using Window::ImplInit;
SVT_DLLPRIVATE void ImplInit(); SVT_DLLPRIVATE void ImplInit();
sal_Bool UpdatePaintLineColor( void ); // returns sal_True if maPaintCol has changed sal_Bool UpdatePaintLineColor( void ); // returns sal_True if maPaintCol has changed
......
...@@ -600,7 +600,7 @@ namespace svtools ...@@ -600,7 +600,7 @@ namespace svtools
void LineListBox::ImpGetLine( long nLine1, long nLine2, long nDistance, void LineListBox::ImpGetLine( long nLine1, long nLine2, long nDistance,
Color aColor1, Color aColor2, Color aColorDist, Color aColor1, Color aColor2, Color aColorDist,
sal_uInt16 nStyle, Bitmap& rBmp, XubString& rStr ) sal_uInt16 nStyle, Bitmap& rBmp )
{ {
Size aSize = GetOutputSizePixel(); Size aSize = GetOutputSizePixel();
aSize.Width() -= 20; aSize.Width() -= 20;
...@@ -655,25 +655,13 @@ void LineListBox::ImpGetLine( long nLine1, long nLine2, long nDistance, ...@@ -655,25 +655,13 @@ void LineListBox::ImpGetLine( long nLine1, long nLine2, long nDistance,
} }
rBmp = aVirDev.GetBitmap( Point(), Size( aSize.Width(), n1+nDist+n2 ) ); rBmp = aVirDev.GetBitmap( Point(), Size( aSize.Width(), n1+nDist+n2 ) );
} }
// Twips nach Unit
if ( eUnit == FUNIT_POINT )
{
nLine1 *= 5;
nLine2 *= 5;
nDistance *= 5;
rStr.AssignAscii( " pt" );
}
String aNum( GetSettings().GetLocaleI18nHelper().GetNum( nLine1+nLine2+nDistance, 2 ) );
rStr.Insert( aNum, 0 );
} }
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
void LineListBox::ImplInit() void LineListBox::ImplInit()
{ {
aTxtSize.Width() = GetTextWidth( XubString( RTL_CONSTASCII_USTRINGPARAM( "99,99 mm" ) ) ); aTxtSize.Width() = GetTextWidth( XubString( RTL_CONSTASCII_USTRINGPARAM( " " ) ) );
aTxtSize.Height() = GetTextHeight(); aTxtSize.Height() = GetTextHeight();
pLineList = new ImpLineList(); pLineList = new ImpLineList();
eUnit = FUNIT_POINT; eUnit = FUNIT_POINT;
...@@ -905,7 +893,6 @@ void LineListBox::UpdateEntries( long nOldWidth ) ...@@ -905,7 +893,6 @@ void LineListBox::UpdateEntries( long nOldWidth )
ImpLineListData* pData = pLineList->GetObject( n ); ImpLineListData* pData = pLineList->GetObject( n );
if ( pData && pData->GetMinWidth() <= m_nWidth ) if ( pData && pData->GetMinWidth() <= m_nWidth )
{ {
XubString aStr;
Bitmap aBmp; Bitmap aBmp;
ImpGetLine( pData->GetLine1ForWidth( m_nWidth ), ImpGetLine( pData->GetLine1ForWidth( m_nWidth ),
pData->GetLine2ForWidth( m_nWidth ), pData->GetLine2ForWidth( m_nWidth ),
...@@ -913,8 +900,8 @@ void LineListBox::UpdateEntries( long nOldWidth ) ...@@ -913,8 +900,8 @@ void LineListBox::UpdateEntries( long nOldWidth )
GetColorLine1( GetEntryCount( ) ), GetColorLine1( GetEntryCount( ) ),
GetColorLine2( GetEntryCount( ) ), GetColorLine2( GetEntryCount( ) ),
GetColorDist( GetEntryCount( ) ), GetColorDist( GetEntryCount( ) ),
pData->GetStyle(), aBmp, aStr ); pData->GetStyle(), aBmp );
ListBox::InsertEntry( aStr, aBmp, LISTBOX_APPEND ); ListBox::InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( " " ) ), aBmp, LISTBOX_APPEND );
if ( n == nTypePos ) if ( n == nTypePos )
SelectEntryPos( GetEntryCount() - 1 ); SelectEntryPos( GetEntryCount() - 1 );
} }
......
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