Kaydet (Commit) edffe404 authored tarafından Noel Grandin's avatar Noel Grandin

convert svtools/source/contnr/imivctl.hxx from String to OUString

Change-Id: Ieac230b495c84b58362e176bf934afea0c391476
üst ea5cba1f
...@@ -411,7 +411,7 @@ public: ...@@ -411,7 +411,7 @@ public:
SvxIconChoiceCtrlEntry*, SvxIconChoiceCtrlEntry*,
const Point* pPos = 0, const Point* pPos = 0,
sal_Bool bForInplaceEdit = sal_False, sal_Bool bForInplaceEdit = sal_False,
const String* pStr = 0 const OUString* pStr = 0
); );
long CalcBoundingWidth( SvxIconChoiceCtrlEntry* ) const; long CalcBoundingWidth( SvxIconChoiceCtrlEntry* ) const;
...@@ -449,7 +449,7 @@ public: ...@@ -449,7 +449,7 @@ public:
SvxIconChoiceCtrlEntry* pEntry, SvxIconChoiceCtrlEntry* pEntry,
sal_uInt16 nPaintFlags, sal_uInt16 nPaintFlags,
OutputDevice* pOut, OutputDevice* pOut,
const String* pStr = 0, const OUString* pStr = 0,
::vcl::ControlLayoutData* _pLayoutData = NULL ::vcl::ControlLayoutData* _pLayoutData = NULL
); );
......
...@@ -1664,11 +1664,11 @@ void SvxIconChoiceCtrl_Impl::PaintEmphasis( ...@@ -1664,11 +1664,11 @@ void SvxIconChoiceCtrl_Impl::PaintEmphasis(
void SvxIconChoiceCtrl_Impl::PaintItem( const Rectangle& rRect, void SvxIconChoiceCtrl_Impl::PaintItem( const Rectangle& rRect,
IcnViewFieldType eItem, SvxIconChoiceCtrlEntry* pEntry, sal_uInt16 nPaintFlags, IcnViewFieldType eItem, SvxIconChoiceCtrlEntry* pEntry, sal_uInt16 nPaintFlags,
OutputDevice* pOut, const String* pStr, ::vcl::ControlLayoutData* _pLayoutData ) OutputDevice* pOut, const OUString* pStr, ::vcl::ControlLayoutData* _pLayoutData )
{ {
if( eItem == IcnViewFieldTypeText ) if( eItem == IcnViewFieldTypeText )
{ {
String aText; OUString aText;
if( !pStr ) if( !pStr )
aText = pView->GetEntryText( pEntry, sal_False ); aText = pView->GetEntryText( pEntry, sal_False );
else else
...@@ -1786,7 +1786,7 @@ void SvxIconChoiceCtrl_Impl::PaintEntry( SvxIconChoiceCtrlEntry* pEntry, const P ...@@ -1786,7 +1786,7 @@ void SvxIconChoiceCtrl_Impl::PaintEntry( SvxIconChoiceCtrlEntry* pEntry, const P
} }
*/ */
String aEntryText( pView->GetEntryText( pEntry, sal_False ) ); OUString aEntryText( pView->GetEntryText( pEntry, sal_False ) );
Rectangle aTextRect( CalcTextRect(pEntry,&rPos,sal_False,&aEntryText)); Rectangle aTextRect( CalcTextRect(pEntry,&rPos,sal_False,&aEntryText));
Rectangle aBmpRect( CalcBmpRect(pEntry, &rPos ) ); Rectangle aBmpRect( CalcBmpRect(pEntry, &rPos ) );
...@@ -2038,9 +2038,9 @@ Rectangle SvxIconChoiceCtrl_Impl::CalcBmpRect( SvxIconChoiceCtrlEntry* pEntry, c ...@@ -2038,9 +2038,9 @@ Rectangle SvxIconChoiceCtrl_Impl::CalcBmpRect( SvxIconChoiceCtrlEntry* pEntry, c
} }
Rectangle SvxIconChoiceCtrl_Impl::CalcTextRect( SvxIconChoiceCtrlEntry* pEntry, Rectangle SvxIconChoiceCtrl_Impl::CalcTextRect( SvxIconChoiceCtrlEntry* pEntry,
const Point* pEntryPos, sal_Bool bEdit, const String* pStr ) const Point* pEntryPos, sal_Bool bEdit, const OUString* pStr )
{ {
String aEntryText; OUString aEntryText;
if( !pStr ) if( !pStr )
aEntryText = pView->GetEntryText( pEntry, bEdit ); aEntryText = pView->GetEntryText( pEntry, bEdit );
else else
...@@ -2557,7 +2557,7 @@ Size SvxIconChoiceCtrl_Impl::GetMinGrid() const ...@@ -2557,7 +2557,7 @@ Size SvxIconChoiceCtrl_Impl::GetMinGrid() const
Size aMinSize( aImageSize ); Size aMinSize( aImageSize );
aMinSize.Width() += 2 * LROFFS_BOUND; aMinSize.Width() += 2 * LROFFS_BOUND;
aMinSize.Height() += TBOFFS_BOUND; // single offset is enough (FileDlg) aMinSize.Height() += TBOFFS_BOUND; // single offset is enough (FileDlg)
String aStrDummy( RTL_CONSTASCII_USTRINGPARAM( "XXX" ) ); OUString aStrDummy( "XXX" );
Size aTextSize( pView->GetTextWidth( aStrDummy ), pView->GetTextHeight() ); Size aTextSize( pView->GetTextWidth( aStrDummy ), pView->GetTextHeight() );
if( nWinBits & WB_ICON ) if( nWinBits & WB_ICON )
{ {
...@@ -3200,7 +3200,7 @@ void SvxIconChoiceCtrl_Impl::EditEntry( SvxIconChoiceCtrlEntry* pEntry ) ...@@ -3200,7 +3200,7 @@ void SvxIconChoiceCtrl_Impl::EditEntry( SvxIconChoiceCtrlEntry* pEntry )
SetNoSelection(); SetNoSelection();
pCurEditedEntry = pEntry; pCurEditedEntry = pEntry;
String aEntryText( pView->GetEntryText( pEntry, sal_True ) ); OUString aEntryText( pView->GetEntryText( pEntry, sal_True ) );
Rectangle aRect( CalcTextRect( pEntry, 0, sal_True, &aEntryText ) ); Rectangle aRect( CalcTextRect( pEntry, 0, sal_True, &aEntryText ) );
MakeVisible( aRect ); MakeVisible( aRect );
Point aPos( aRect.TopLeft() ); Point aPos( aRect.TopLeft() );
...@@ -3233,7 +3233,7 @@ IMPL_LINK_NOARG(SvxIconChoiceCtrl_Impl, TextEditEndedHdl) ...@@ -3233,7 +3233,7 @@ IMPL_LINK_NOARG(SvxIconChoiceCtrl_Impl, TextEditEndedHdl)
return 0; return 0;
} }
String aText; OUString aText;
if ( !pEdit->EditingCanceled() ) if ( !pEdit->EditingCanceled() )
aText = pEdit->GetText(); aText = pEdit->GetText();
else else
...@@ -3674,10 +3674,10 @@ sal_Bool SvxIconChoiceCtrl_Impl::RequestHelp( const HelpEvent& rHEvt ) ...@@ -3674,10 +3674,10 @@ sal_Bool SvxIconChoiceCtrl_Impl::RequestHelp( const HelpEvent& rHEvt )
if ( !pEntry ) if ( !pEntry )
return sal_False; return sal_False;
String sQuickHelpText = pEntry->GetQuickHelpText(); OUString sQuickHelpText = pEntry->GetQuickHelpText();
String aEntryText( pView->GetEntryText( pEntry, sal_False ) ); OUString aEntryText( pView->GetEntryText( pEntry, sal_False ) );
Rectangle aTextRect( CalcTextRect( pEntry, 0, sal_False, &aEntryText ) ); Rectangle aTextRect( CalcTextRect( pEntry, 0, sal_False, &aEntryText ) );
if ( ( !aTextRect.IsInside( aPos ) || !aEntryText.Len() ) && !sQuickHelpText.Len() ) if ( ( !aTextRect.IsInside( aPos ) || aEntryText.isEmpty() ) && sQuickHelpText.isEmpty() )
return sal_False; return sal_False;
Rectangle aOptTextRect( aTextRect ); Rectangle aOptTextRect( aTextRect );
...@@ -3685,7 +3685,7 @@ sal_Bool SvxIconChoiceCtrl_Impl::RequestHelp( const HelpEvent& rHEvt ) ...@@ -3685,7 +3685,7 @@ sal_Bool SvxIconChoiceCtrl_Impl::RequestHelp( const HelpEvent& rHEvt )
sal_uInt16 nNewFlags = nCurTextDrawFlags; sal_uInt16 nNewFlags = nCurTextDrawFlags;
nNewFlags &= ~( TEXT_DRAW_CLIP | TEXT_DRAW_ENDELLIPSIS ); nNewFlags &= ~( TEXT_DRAW_CLIP | TEXT_DRAW_ENDELLIPSIS );
aOptTextRect = pView->GetTextRect( aOptTextRect, aEntryText, nNewFlags ); aOptTextRect = pView->GetTextRect( aOptTextRect, aEntryText, nNewFlags );
if ( aOptTextRect != aTextRect || sQuickHelpText.Len() > 0 ) if ( aOptTextRect != aTextRect || !sQuickHelpText.isEmpty() )
{ {
//aTextRect.Right() = aTextRect.Left() + aRealSize.Width() + 4; //aTextRect.Right() = aTextRect.Left() + aRealSize.Width() + 4;
Point aPt( aOptTextRect.TopLeft() ); Point aPt( aOptTextRect.TopLeft() );
...@@ -3695,8 +3695,8 @@ sal_Bool SvxIconChoiceCtrl_Impl::RequestHelp( const HelpEvent& rHEvt ) ...@@ -3695,8 +3695,8 @@ sal_Bool SvxIconChoiceCtrl_Impl::RequestHelp( const HelpEvent& rHEvt )
aPt.Y() -= 1; aPt.Y() -= 1;
aPt.X() -= 3; aPt.X() -= 3;
aOptTextRect.SetPos( aPt ); aOptTextRect.SetPos( aPt );
String sHelpText; OUString sHelpText;
if ( sQuickHelpText.Len() > 0 ) if ( !sQuickHelpText.isEmpty() )
sHelpText = sQuickHelpText; sHelpText = sQuickHelpText;
else else
sHelpText = aEntryText; sHelpText = aEntryText;
......
...@@ -454,7 +454,7 @@ void SvtIconChoiceCtrl::FillLayoutData() const ...@@ -454,7 +454,7 @@ void SvtIconChoiceCtrl::FillLayoutData() const
SvxIconChoiceCtrlEntry* pEntry = GetEntry( nPos ); SvxIconChoiceCtrlEntry* pEntry = GetEntry( nPos );
Point aPos = _pImp->GetEntryBoundRect( pEntry ).TopLeft(); Point aPos = _pImp->GetEntryBoundRect( pEntry ).TopLeft();
String sEntryText = pEntry->GetDisplayText( ); OUString sEntryText = pEntry->GetDisplayText( );
Rectangle aTextRect = _pImp->CalcTextRect( pEntry, &aPos, sal_False, &sEntryText ); Rectangle aTextRect = _pImp->CalcTextRect( pEntry, &aPos, sal_False, &sEntryText );
sal_Bool bLargeIconMode = WB_ICON == ( _pImp->GetStyle() & ( VIEWMODE_MASK ) ); sal_Bool bLargeIconMode = WB_ICON == ( _pImp->GetStyle() & ( VIEWMODE_MASK ) );
......
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