summaryrefslogtreecommitdiff
path: root/sw/source/ui/utlui/textcontrolcombo.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/utlui/textcontrolcombo.cxx')
-rw-r--r--sw/source/ui/utlui/textcontrolcombo.cxx36
1 files changed, 18 insertions, 18 deletions
diff --git a/sw/source/ui/utlui/textcontrolcombo.cxx b/sw/source/ui/utlui/textcontrolcombo.cxx
index db113e1697a7..69c6fbfa0ccb 100644
--- a/sw/source/ui/utlui/textcontrolcombo.cxx
+++ b/sw/source/ui/utlui/textcontrolcombo.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -35,10 +35,10 @@
TextControlCombo::TextControlCombo( Window* _pParent, const ResId& _rResId,
Control& _rCtrl, FixedText& _rFTbefore, FixedText& _rFTafter )
- :Window ( _pParent, _rResId )
- ,mrCtrl ( _rCtrl )
- ,mrFTbefore ( _rFTbefore )
- ,mrFTafter ( _rFTafter )
+ :Window ( _pParent, _rResId )
+ ,mrCtrl ( _rCtrl )
+ ,mrFTbefore ( _rFTbefore )
+ ,mrFTafter ( _rFTafter )
{
}
@@ -48,35 +48,35 @@ TextControlCombo::~TextControlCombo()
void TextControlCombo::Arrange( FixedText& _rFTcomplete, BOOL /*bShow*/ )
{
- Point aBasePos( GetPosPixel() );
- Size aMetricVals( GetSizePixel() );
+ Point aBasePos( GetPosPixel() );
+ Size aMetricVals( GetSizePixel() );
- long nTextHeight = _rFTcomplete.GetSizePixel().Height();
- long nCtrlHeight = mrCtrl.GetSizePixel().Height();
+ long nTextHeight = _rFTcomplete.GetSizePixel().Height();
+ long nCtrlHeight = mrCtrl.GetSizePixel().Height();
// calc y positions / center vertical
- long nYFT = aBasePos.Y();
- long nYCtrl = nYFT;
+ long nYFT = aBasePos.Y();
+ long nYCtrl = nYFT;
if( nCtrlHeight > nTextHeight )
nYFT += aMetricVals.Height();
else
nYCtrl += aMetricVals.Height();
// separate text parts
- const String aReplStr( RTL_CONSTASCII_STRINGPARAM( "%POSITION_OF_CONTROL" ) );
- String aTxtBefore( _rFTcomplete.GetText() );
- String aTxtAfter;
- xub_StrLen nReplPos = aTxtBefore.Search( aReplStr );
+ const String aReplStr( RTL_CONSTASCII_STRINGPARAM( "%POSITION_OF_CONTROL" ) );
+ String aTxtBefore( _rFTcomplete.GetText() );
+ String aTxtAfter;
+ xub_StrLen nReplPos = aTxtBefore.Search( aReplStr );
if( nReplPos != STRING_NOTFOUND )
{
- xub_StrLen nStrStartAfter = nReplPos + aReplStr.Len();
+ xub_StrLen nStrStartAfter = nReplPos + aReplStr.Len();
aTxtAfter = String( aTxtBefore, nStrStartAfter, aTxtBefore.Len() - nStrStartAfter );
aTxtBefore.Erase( nReplPos );
}
// arrange and fill Fixed Texts
- long nX = aBasePos.X();
- long nWidth = GetTextWidth( aTxtBefore );
+ long nX = aBasePos.X();
+ long nWidth = GetTextWidth( aTxtBefore );
mrFTbefore.SetText( aTxtBefore );
mrFTbefore.SetPosSizePixel( nX, nYFT, nWidth, nTextHeight );