longparas: convert GetMaxVisChars from xub_StrLen to sal_Int32
Change-Id: I25fcfc3ae5a599bbd7ebef3071895ec9dbf2949e
This commit is contained in:
parent
beaa383389
commit
f8f18871b0
@ -234,7 +234,7 @@ public:
|
|||||||
virtual Size CalcMinimumSizeForText(const OUString &rString) const;
|
virtual Size CalcMinimumSizeForText(const OUString &rString) const;
|
||||||
virtual Size GetOptimalSize() const;
|
virtual Size GetOptimalSize() const;
|
||||||
virtual Size CalcSize( sal_uInt16 nChars ) const;
|
virtual Size CalcSize( sal_uInt16 nChars ) const;
|
||||||
virtual xub_StrLen GetMaxVisChars() const;
|
virtual sal_Int32 GetMaxVisChars() const;
|
||||||
|
|
||||||
sal_Int32 GetCharPos( const Point& rWindowPos ) const;
|
sal_Int32 GetCharPos( const Point& rWindowPos ) const;
|
||||||
|
|
||||||
|
@ -788,7 +788,7 @@ void VCLXFileControl::getColumnsAndLines( sal_Int16& nCols, sal_Int16& nLines )
|
|||||||
nLines = 1;
|
nLines = 1;
|
||||||
FileControl* pControl = (FileControl*) GetWindow();
|
FileControl* pControl = (FileControl*) GetWindow();
|
||||||
if ( pControl )
|
if ( pControl )
|
||||||
nCols = (sal_Int16) pControl->GetEdit().GetMaxVisChars();
|
nCols = pControl->GetEdit().GetMaxVisChars();
|
||||||
}
|
}
|
||||||
|
|
||||||
void VCLXFileControl::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
|
void VCLXFileControl::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
|
||||||
|
@ -2957,12 +2957,12 @@ Size Edit::CalcSize( xub_StrLen nChars ) const
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
xub_StrLen Edit::GetMaxVisChars() const
|
sal_Int32 Edit::GetMaxVisChars() const
|
||||||
{
|
{
|
||||||
const Window* pW = mpSubEdit ? mpSubEdit : this;
|
const Window* pW = mpSubEdit ? mpSubEdit : this;
|
||||||
long nOutWidth = pW->GetOutputSizePixel().Width();
|
sal_Int32 nOutWidth = pW->GetOutputSizePixel().Width();
|
||||||
long nCharWidth = GetTextWidth( OUString('x') );
|
sal_Int32 nCharWidth = GetTextWidth( OUString('x') );
|
||||||
return nCharWidth ? (xub_StrLen)(nOutWidth/nCharWidth) : 0;
|
return nCharWidth ? nOutWidth/nCharWidth : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user