diff options
Diffstat (limited to 'svtools/source/control')
39 files changed, 903 insertions, 903 deletions
diff --git a/svtools/source/control/asynclink.cxx b/svtools/source/control/asynclink.cxx index 758999d61dcd..f83d9add50f2 100644 --- a/svtools/source/control/asynclink.cxx +++ b/svtools/source/control/asynclink.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 diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx index 0fba66e132a8..242af6124d07 100644 --- a/svtools/source/control/calendar.cxx +++ b/svtools/source/control/calendar.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 @@ -50,29 +50,29 @@ // ======================================================================= -#define DAY_OFFX 4 -#define DAY_OFFY 2 -#define MONTH_BORDERX 4 -#define MONTH_OFFY 3 -#define WEEKNUMBER_OFFX 4 -#define WEEKDAY_OFFY 3 -#define TITLE_OFFY 3 -#define TITLE_BORDERY 2 -#define SPIN_OFFX 4 -#define SPIN_OFFY TITLE_BORDERY +#define DAY_OFFX 4 +#define DAY_OFFY 2 +#define MONTH_BORDERX 4 +#define MONTH_OFFY 3 +#define WEEKNUMBER_OFFX 4 +#define WEEKDAY_OFFY 3 +#define TITLE_OFFY 3 +#define TITLE_BORDERY 2 +#define SPIN_OFFX 4 +#define SPIN_OFFY TITLE_BORDERY -#define WEEKNUMBER_HEIGHT 85 +#define WEEKNUMBER_HEIGHT 85 -#define CALENDAR_HITTEST_DAY ((USHORT)0x0001) -#define CALENDAR_HITTEST_WEEK ((USHORT)0x0002) -#define CALENDAR_HITTEST_MONTHTITLE ((USHORT)0x0004) -#define CALENDAR_HITTEST_PREV ((USHORT)0x0008) -#define CALENDAR_HITTEST_NEXT ((USHORT)0x0010) -#define CALENDAR_HITTEST_OUTSIDE ((USHORT)0x1000) +#define CALENDAR_HITTEST_DAY ((USHORT)0x0001) +#define CALENDAR_HITTEST_WEEK ((USHORT)0x0002) +#define CALENDAR_HITTEST_MONTHTITLE ((USHORT)0x0004) +#define CALENDAR_HITTEST_PREV ((USHORT)0x0008) +#define CALENDAR_HITTEST_NEXT ((USHORT)0x0010) +#define CALENDAR_HITTEST_OUTSIDE ((USHORT)0x1000) -#define MENU_YEAR_COUNT 3 +#define MENU_YEAR_COUNT 3 -#define TABLE_DATE_SELECTED ((void*)0x00000001) +#define TABLE_DATE_SELECTED ((void*)0x00000001) using namespace ::com::sun::star; @@ -80,10 +80,10 @@ using namespace ::com::sun::star; struct ImplDateInfo { - XubString maText; - Color* mpTextColor; - Color* mpFrameColor; - USHORT mnFlags; + XubString maText; + Color* mpTextColor; + Color* mpFrameColor; + USHORT mnFlags; ImplDateInfo( const XubString& rText ) : maText( rText ) @@ -197,36 +197,36 @@ inline void ImplCalendarClearSelectDate( Table* pTable ) void Calendar::ImplInit( WinBits nWinStyle ) { - mpDateTable = NULL; - mpSelectTable = new Table; - mpOldSelectTable = NULL; - mpRestoreSelectTable = NULL; - mpStandardColor = NULL; - mpSaturdayColor = NULL; - mpSundayColor = NULL; - mnDayCount = 0; - mnWinStyle = nWinStyle; - mnFirstYear = 0; - mnLastYear = 0; - mnRequestYear = 0; - mbCalc = TRUE; - mbFormat = TRUE; - mbDrag = FALSE; - mbSelection = FALSE; - mbMultiSelection = FALSE; - mbWeekSel = FALSE; - mbUnSel = FALSE; - mbMenuDown = FALSE; - mbSpinDown = FALSE; - mbPrevIn = FALSE; - mbNextIn = FALSE; - mbDirect = FALSE; - mbInSelChange = FALSE; - mbTravelSelect = FALSE; - mbScrollDateRange = FALSE; - mbSelLeft = FALSE; - mbAllSel = FALSE; - mbDropPos = FALSE; + mpDateTable = NULL; + mpSelectTable = new Table; + mpOldSelectTable = NULL; + mpRestoreSelectTable = NULL; + mpStandardColor = NULL; + mpSaturdayColor = NULL; + mpSundayColor = NULL; + mnDayCount = 0; + mnWinStyle = nWinStyle; + mnFirstYear = 0; + mnLastYear = 0; + mnRequestYear = 0; + mbCalc = TRUE; + mbFormat = TRUE; + mbDrag = FALSE; + mbSelection = FALSE; + mbMultiSelection = FALSE; + mbWeekSel = FALSE; + mbUnSel = FALSE; + mbMenuDown = FALSE; + mbSpinDown = FALSE; + mbPrevIn = FALSE; + mbNextIn = FALSE; + mbDirect = FALSE; + mbInSelChange = FALSE; + mbTravelSelect = FALSE; + mbScrollDateRange = FALSE; + mbSelLeft = FALSE; + mbAllSel = FALSE; + mbDropPos = FALSE; ::rtl::OUString aGregorian( RTL_CONSTASCII_USTRINGPARAM( "gregorian")); maCalendarWrapper.loadCalendar( aGregorian, @@ -466,39 +466,39 @@ void Calendar::ImplFormat() long nTextHeight = GetTextHeight(); // Breiten und X-Positionen berechnen - mnDayWidth = n99TextWidth+DAY_OFFX; - mnMonthWidth = mnDayWidth*7; + mnDayWidth = n99TextWidth+DAY_OFFX; + mnMonthWidth = mnDayWidth*7; mnMonthWidth += mnWeekWidth; mnMonthWidth += MONTH_BORDERX*2; - mnMonthPerLine = aOutSize.Width() / mnMonthWidth; + mnMonthPerLine = aOutSize.Width() / mnMonthWidth; if ( !mnMonthPerLine ) mnMonthPerLine = 1; - long nOver = ((aOutSize.Width()-(mnMonthPerLine*mnMonthWidth)) / mnMonthPerLine); + long nOver = ((aOutSize.Width()-(mnMonthPerLine*mnMonthWidth)) / mnMonthPerLine); mnMonthWidth += nOver; - mnDaysOffX = MONTH_BORDERX; - mnDaysOffX += nOver/2; - mnDaysOffX += mnWeekWidth; + mnDaysOffX = MONTH_BORDERX; + mnDaysOffX += nOver/2; + mnDaysOffX += mnWeekWidth; // Hoehen und Y-Positionen berechnen - mnDayHeight = nTextHeight + DAY_OFFY; - mnWeekDayOffY = nTextHeight + TITLE_OFFY + (TITLE_BORDERY*2); - mnDaysOffY = mnWeekDayOffY + nTextHeight + WEEKDAY_OFFY; - mnMonthHeight = (mnDayHeight*6) + mnDaysOffY; + mnDayHeight = nTextHeight + DAY_OFFY; + mnWeekDayOffY = nTextHeight + TITLE_OFFY + (TITLE_BORDERY*2); + mnDaysOffY = mnWeekDayOffY + nTextHeight + WEEKDAY_OFFY; + mnMonthHeight = (mnDayHeight*6) + mnDaysOffY; mnMonthHeight += MONTH_OFFY; - mnLines = aOutSize.Height() / mnMonthHeight; + mnLines = aOutSize.Height() / mnMonthHeight; if ( !mnLines ) mnLines = 1; mnMonthHeight += (aOutSize.Height()-(mnLines*mnMonthHeight)) / mnLines; // Spinfelder berechnen - long nSpinSize = nTextHeight+TITLE_BORDERY-SPIN_OFFY; - maPrevRect.Left() = SPIN_OFFX; - maPrevRect.Top() = SPIN_OFFY; - maPrevRect.Right() = maPrevRect.Left()+nSpinSize; + long nSpinSize = nTextHeight+TITLE_BORDERY-SPIN_OFFY; + maPrevRect.Left() = SPIN_OFFX; + maPrevRect.Top() = SPIN_OFFY; + maPrevRect.Right() = maPrevRect.Left()+nSpinSize; maPrevRect.Bottom() = maPrevRect.Top()+nSpinSize; - maNextRect.Left() = aOutSize.Width()-SPIN_OFFX-nSpinSize-1; - maNextRect.Top() = SPIN_OFFY; - maNextRect.Right() = maNextRect.Left()+nSpinSize; + maNextRect.Left() = aOutSize.Width()-SPIN_OFFX-nSpinSize-1; + maNextRect.Top() = SPIN_OFFY; + maNextRect.Right() = maNextRect.Left()+nSpinSize; maNextRect.Bottom() = maNextRect.Top()+nSpinSize; if ( mnWinStyle & WB_BOLDTEXT ) @@ -616,12 +616,12 @@ USHORT Calendar::ImplHitTest( const Point& rPos, Date& rDate ) const else if ( maNextRect.IsInside( rPos ) ) return CALENDAR_HITTEST_NEXT; - long nX; - long nY; - long nOffX; - long nYMonth; - USHORT nDay; - DayOfWeek eStartDay = ImplGetWeekStart(); + long nX; + long nY; + long nOffX; + long nYMonth; + USHORT nDay; + DayOfWeek eStartDay = ImplGetWeekStart(); rDate = GetFirstMonth(); nY = 0; @@ -740,11 +740,11 @@ USHORT Calendar::ImplHitTest( const Point& rPos, Date& rDate ) const static void ImplDrawSpinArrow( OutputDevice* pDev, const Rectangle& rRect, BOOL bPrev ) { - long i; - long n; - long nLines; - long nHeight = rRect.GetHeight(); - long nWidth = rRect.GetWidth(); + long i; + long n; + long nLines; + long nHeight = rRect.GetHeight(); + long nWidth = rRect.GetWidth(); if ( nWidth < nHeight ) n = nWidth; else @@ -794,7 +794,7 @@ void Calendar::ImplDrawSpin( BOOL bDrawPrev, BOOL bDrawNext ) { Rectangle aOutRect = maPrevRect; aOutRect.Left() += 3; - aOutRect.Top() += 3; + aOutRect.Top() += 3; aOutRect.Right() -= 3; aOutRect.Bottom() -= 3; ImplDrawSpinArrow( this, aOutRect, TRUE ); @@ -803,7 +803,7 @@ void Calendar::ImplDrawSpin( BOOL bDrawPrev, BOOL bDrawNext ) { Rectangle aOutRect = maNextRect; aOutRect.Left() += 3; - aOutRect.Top() += 3; + aOutRect.Top() += 3; aOutRect.Right() -= 3; aOutRect.Bottom() -= 3; ImplDrawSpinArrow( this, aOutRect, FALSE ); @@ -817,15 +817,15 @@ void Calendar::ImplDrawDate( long nX, long nY, DayOfWeek eDayOfWeek, BOOL bBack, BOOL bOther, ULONG nToday ) { - ImplDateInfo* pDateInfo; - Color* pTextColor = NULL; - const String& rDay = *(mpDayText[nDay-1]); - Rectangle aDateRect( nX, nY, nX+mnDayWidth-1, nY+mnDayHeight-1 ); + ImplDateInfo* pDateInfo; + Color* pTextColor = NULL; + const String& rDay = *(mpDayText[nDay-1]); + Rectangle aDateRect( nX, nY, nX+mnDayWidth-1, nY+mnDayHeight-1 ); BOOL bSel = FALSE; BOOL bFocus = FALSE; // Aktueller Tag - if ( (nDay == maCurDate.GetDay()) && + if ( (nDay == maCurDate.GetDay()) && (nMonth == maCurDate.GetMonth()) && (nYear == maCurDate.GetYear()) ) bFocus = TRUE; @@ -916,7 +916,7 @@ void Calendar::ImplDrawDate( long nX, long nY, aTodayDate.SetDate( nToday ); else aTodayDate = Date(); - if ( (nDay == aTodayDate.GetDay()) && + if ( (nDay == aTodayDate.GetDay()) && (nMonth == aTodayDate.GetMonth()) && (nYear == aTodayDate.GetYear()) ) { @@ -971,21 +971,21 @@ void Calendar::ImplDraw( BOOL bPaint ) ImplFormat(); const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); - Size aOutSize = GetOutputSizePixel(); - long i; - long j; - long nX; - long nY; - long nDeltaX; - long nDeltaY; - long nDayX; - long nDayY; - ULONG nToday = Date().GetDate(); - USHORT nDay; - USHORT nMonth; - USHORT nYear; - Date aDate = GetFirstMonth(); - DayOfWeek eStartDay = ImplGetWeekStart(); + Size aOutSize = GetOutputSizePixel(); + long i; + long j; + long nX; + long nY; + long nDeltaX; + long nDeltaY; + long nDayX; + long nDayY; + ULONG nToday = Date().GetDate(); + USHORT nDay; + USHORT nMonth; + USHORT nYear; + Date aDate = GetFirstMonth(); + DayOfWeek eStartDay = ImplGetWeekStart(); HideFocus(); @@ -1043,8 +1043,8 @@ void Calendar::ImplDraw( BOOL bPaint ) nX = 0; for ( j = 0; j < mnMonthPerLine; j++ ) { - nMonth = aDate.GetMonth(); - nYear = aDate.GetYear(); + nMonth = aDate.GetMonth(); + nYear = aDate.GetYear(); // Monat in der Titleleiste ausgeben nDeltaX = nX; @@ -1123,9 +1123,9 @@ void Calendar::ImplDraw( BOOL bPaint ) for ( USHORT nWeekCount = 0; nWeekCount < 6; nWeekCount++ ) { sal_Int16 nWeek = maCalendarWrapper.getValue( i18n::CalendarFieldIndex::WEEK_OF_YEAR); - String aWeekText( String::CreateFromInt32( nWeek)); - long nOffX = (mnWeekWidth-WEEKNUMBER_OFFX)-GetTextWidth( aWeekText ); - long nOffY = (mnDayHeight-GetTextHeight())/2; + String aWeekText( String::CreateFromInt32( nWeek)); + long nOffX = (mnWeekWidth-WEEKNUMBER_OFFX)-GetTextWidth( aWeekText ); + long nOffY = (mnDayHeight-GetTextHeight())/2; DrawText( Point( nDayX+nOffX, nDayY+nOffY ), aWeekText ); nDayY += mnDayHeight; maCalendarWrapper.addValue( i18n::CalendarFieldIndex::DAY_OF_MONTH, 7); @@ -1228,9 +1228,9 @@ void Calendar::ImplUpdateDate( const Date& rDate ) void Calendar::ImplUpdateSelection( Table* pOld ) { - Table* pNew = mpSelectTable; - void* p; - ULONG nKey; + Table* pNew = mpSelectTable; + void* p; + ULONG nKey; p = pOld->First(); while ( p ) @@ -1264,9 +1264,9 @@ void Calendar::ImplUpdateSelection( Table* pOld ) void Calendar::ImplMouseSelect( const Date& rDate, USHORT nHitTest, BOOL bMove, BOOL bExpand, BOOL bExtended ) { - Table* pOldSel = new Table( *mpSelectTable ); - Date aOldDate = maCurDate; - Date aTempDate = rDate; + Table* pOldSel = new Table( *mpSelectTable ); + Date aOldDate = maCurDate; + Date aTempDate = rDate; if ( !(nHitTest & CALENDAR_HITTEST_DAY) ) aTempDate--; @@ -1430,15 +1430,15 @@ void Calendar::ImplShowMenu( const Point& rPos, const Date& rDate ) { EndSelection(); - Date aOldFirstDate = GetFirstMonth(); - PopupMenu aPopupMenu; - PopupMenu* pYearPopupMenus[MENU_YEAR_COUNT]; - USHORT nMonthOff; - USHORT nCurItemId; - USHORT nYear = rDate.GetYear()-1; - USHORT i; - USHORT j; - USHORT nYearIdCount = 1000; + Date aOldFirstDate = GetFirstMonth(); + PopupMenu aPopupMenu; + PopupMenu* pYearPopupMenus[MENU_YEAR_COUNT]; + USHORT nMonthOff; + USHORT nCurItemId; + USHORT nYear = rDate.GetYear()-1; + USHORT i; + USHORT j; + USHORT nYearIdCount = 1000; nMonthOff = (rDate.GetYear()-aOldFirstDate.GetYear())*12; if ( aOldFirstDate.GetMonth() < rDate.GetMonth() ) @@ -1493,8 +1493,8 @@ void Calendar::ImplShowMenu( const Point& rPos, const Date& rDate ) void Calendar::ImplTracking( const Point& rPos, BOOL bRepeat ) { - Date aTempDate = maCurDate; - USHORT nHitTest = ImplHitTest( rPos, aTempDate ); + Date aTempDate = maCurDate; + USHORT nHitTest = ImplHitTest( rPos, aTempDate ); if ( mbSpinDown ) { @@ -1519,13 +1519,13 @@ void Calendar::ImplEndTracking( BOOL bCancel ) BOOL bSelection = mbSelection; BOOL bSpinDown = mbSpinDown; - mbDrag = FALSE; - mbSelection = FALSE; - mbMultiSelection = FALSE; - mbUnSel = FALSE; - mbSpinDown = FALSE; - mbPrevIn = FALSE; - mbNextIn = FALSE; + mbDrag = FALSE; + mbSelection = FALSE; + mbMultiSelection = FALSE; + mbUnSel = FALSE; + mbSpinDown = FALSE; + mbPrevIn = FALSE; + mbNextIn = FALSE; if ( bCancel ) { @@ -1534,10 +1534,10 @@ void Calendar::ImplEndTracking( BOOL bCancel ) if ( !bSpinDown ) { - Table* pOldSel = new Table( *mpSelectTable ); - Date aOldDate = maCurDate; - maCurDate = maOldCurDate; - *mpSelectTable = *mpOldSelectTable; + Table* pOldSel = new Table( *mpSelectTable ); + Date aOldDate = maCurDate; + maCurDate = maOldCurDate; + *mpSelectTable = *mpOldSelectTable; HideFocus(); ImplUpdateSelection( pOldSel ); if ( !pOldSel->Get( aOldDate.GetDate() ) ) @@ -1601,8 +1601,8 @@ void Calendar::MouseButtonDown( const MouseEvent& rMEvt ) { if ( rMEvt.IsLeft() && !mbMenuDown ) { - Date aTempDate = maCurDate; - USHORT nHitTest = ImplHitTest( rMEvt.GetPosPixel(), aTempDate ); + Date aTempDate = maCurDate; + USHORT nHitTest = ImplHitTest( rMEvt.GetPosPixel(), aTempDate ); if ( nHitTest ) { if ( nHitTest & CALENDAR_HITTEST_MONTHTITLE ) @@ -1694,10 +1694,10 @@ void Calendar::Tracking( const TrackingEvent& rTEvt ) void Calendar::KeyInput( const KeyEvent& rKEvt ) { - Date aNewDate = maCurDate; - BOOL bMultiSel = (mnWinStyle & (WB_RANGESELECT | WB_MULTISELECT)) != 0; - BOOL bExpand = rKEvt.GetKeyCode().IsShift(); - BOOL bExtended = rKEvt.GetKeyCode().IsMod1(); + Date aNewDate = maCurDate; + BOOL bMultiSel = (mnWinStyle & (WB_RANGESELECT | WB_MULTISELECT)) != 0; + BOOL bExpand = rKEvt.GetKeyCode().IsShift(); + BOOL bExtended = rKEvt.GetKeyCode().IsMod1(); switch ( rKEvt.GetKeyCode().GetCode() ) { @@ -1882,8 +1882,8 @@ void Calendar::RequestHelp( const HelpEvent& rHEvt ) { maCalendarWrapper.setGregorianDateTime( aDate); USHORT nWeek = (USHORT) maCalendarWrapper.getValue( i18n::CalendarFieldIndex::WEEK_OF_YEAR); - USHORT nMonth = aDate.GetMonth(); - XubString aStr( maDayText ); + USHORT nMonth = aDate.GetMonth(); + XubString aStr( maDayText ); aStr.AppendAscii( ": " ); aStr.Append( XubString::CreateFromInt32( aDate.GetDayOfYear() ) ); aStr.AppendAscii( " / " ); @@ -1918,8 +1918,8 @@ void Calendar::Command( const CommandEvent& rCEvt ) { if ( !mbSelection && rCEvt.IsMouseEvent() ) { - Date aTempDate = maCurDate; - USHORT nHitTest = ImplHitTest( rCEvt.GetMousePosPixel(), aTempDate ); + Date aTempDate = maCurDate; + USHORT nHitTest = ImplHitTest( rCEvt.GetMousePosPixel(), aTempDate ); if ( nHitTest & CALENDAR_HITTEST_MONTHTITLE ) { ImplShowMenu( rCEvt.GetMousePosPixel(), aTempDate ); @@ -2121,10 +2121,10 @@ void Calendar::SetCurDate( const Date& rNewDate ) if ( maCurDate != rNewDate ) { - BOOL bUpdate = IsVisible() && IsUpdateMode(); - Date aOldDate = maCurDate; - maCurDate = rNewDate; - maAnchorDate = maCurDate; + BOOL bUpdate = IsVisible() && IsUpdateMode(); + Date aOldDate = maCurDate; + maCurDate = rNewDate; + maAnchorDate = maCurDate; if ( !(mnWinStyle & (WB_RANGESELECT | WB_MULTISELECT)) ) { @@ -2235,8 +2235,8 @@ BOOL Calendar::GetDropDate( Date& rDate ) const BOOL Calendar::GetDate( const Point& rPos, Date& rDate ) const { - Date aDate = maCurDate; - USHORT nHitTest = ImplHitTest( rPos, aDate ); + Date aDate = maCurDate; + USHORT nHitTest = ImplHitTest( rPos, aDate ); if ( nHitTest & CALENDAR_HITTEST_DAY ) { rDate = aDate; @@ -2255,11 +2255,11 @@ Rectangle Calendar::GetDateRect( const Date& rDate ) const if ( mbFormat || (rDate < maFirstDate) || (rDate > (maFirstDate+mnDayCount)) ) return aRect; - long nX; - long nY; - ULONG nDaysOff; - USHORT nDayIndex; - Date aDate = GetFirstMonth(); + long nX; + long nY; + ULONG nDaysOff; + USHORT nDayIndex; + Date aDate = GetFirstMonth(); if ( rDate < aDate ) { @@ -2322,10 +2322,10 @@ Rectangle Calendar::GetDateRect( const Date& rDate ) const { if ( nDay == rDate.GetDay() ) { - aRect.Left() = nDayX + (nDayIndex*mnDayWidth); - aRect.Top() = nDayY; - aRect.Right() = aRect.Left()+mnDayWidth; - aRect.Bottom() = aRect.Top()+mnDayHeight; + aRect.Left() = nDayX + (nDayIndex*mnDayWidth); + aRect.Top() = nDayY; + aRect.Right() = aRect.Left()+mnDayWidth; + aRect.Bottom() = aRect.Top()+mnDayHeight; break; } if ( nDayIndex == 6 ) @@ -2390,9 +2390,9 @@ void Calendar::AddDateInfo( const Date& rDate, const String& rText, if ( !mpDateTable ) mpDateTable = new ImplDateTable( 256, 256 ); - BOOL bChanged = FALSE; - ULONG nKey = rDate.GetDate(); - ImplDateInfo* pDateInfo = mpDateTable->Get( nKey ); + BOOL bChanged = FALSE; + ULONG nKey = rDate.GetDate(); + ImplDateInfo* pDateInfo = mpDateTable->Get( nKey ); if ( pDateInfo ) pDateInfo->maText = rText; else @@ -2503,8 +2503,8 @@ XubString Calendar::GetDateInfoText( const Date& rDate ) XubString aRet; if ( mpDateTable ) { - ULONG nKey = rDate.GetDate(); - ImplDateInfo* pDateInfo = mpDateTable->Get( nKey ); + ULONG nKey = rDate.GetDate(); + ImplDateInfo* pDateInfo = mpDateTable->Get( nKey ); if ( pDateInfo ) aRet = pDateInfo->maText; } @@ -2515,7 +2515,7 @@ XubString Calendar::GetDateInfoText( const Date& rDate ) BOOL Calendar::ShowDropPos( const Point& rPos, Date& rDate ) { - Date aTempDate = maCurDate; + Date aTempDate = maCurDate; mnDragScrollHitTest = ImplHitTest( rPos, aTempDate ); if ( mnDragScrollHitTest ) @@ -2583,12 +2583,12 @@ void Calendar::EndSelection() if ( !mbSelection ) ReleaseMouse(); - mbDrag = FALSE; - mbSelection = FALSE; - mbMultiSelection = FALSE; - mbSpinDown = FALSE; - mbPrevIn = FALSE; - mbNextIn = FALSE; + mbDrag = FALSE; + mbSelection = FALSE; + mbMultiSelection = FALSE; + mbSpinDown = FALSE; + mbPrevIn = FALSE; + mbNextIn = FALSE; } } @@ -2597,8 +2597,8 @@ void Calendar::EndSelection() Size Calendar::CalcWindowSizePixel( long nCalcMonthPerLine, long nCalcLines ) const { - XubString a99Text( XubString( RTL_CONSTASCII_USTRINGPARAM( "99" ) ) ); - Font aOldFont = GetFont(); + XubString a99Text( XubString( RTL_CONSTASCII_USTRINGPARAM( "99" ) ) ); + Font aOldFont = GetFont(); // Wochenanzeige beruecksichtigen long nWeekWidth; @@ -2623,9 +2623,9 @@ Size Calendar::CalcWindowSizePixel( long nCalcMonthPerLine, ((Calendar*)this)->SetFont( aFont ); } - Size aSize; - long n99TextWidth = GetTextWidth( a99Text ); - long nTextHeight = GetTextHeight(); + Size aSize; + long n99TextWidth = GetTextWidth( a99Text ); + long nTextHeight = GetTextHeight(); if ( mnWinStyle & WB_BOLDTEXT ) ((Calendar*)this)->SetFont( aOldFont ); @@ -2634,7 +2634,7 @@ Size Calendar::CalcWindowSizePixel( long nCalcMonthPerLine, aSize.Width() += MONTH_BORDERX*2; aSize.Width() *= nCalcMonthPerLine; - aSize.Height() = nTextHeight + TITLE_OFFY + (TITLE_BORDERY*2); + aSize.Height() = nTextHeight + TITLE_OFFY + (TITLE_BORDERY*2); aSize.Height() += nTextHeight + WEEKDAY_OFFY; aSize.Height() += ((nTextHeight+DAY_OFFY)*6); aSize.Height() += MONTH_OFFY; @@ -2645,35 +2645,35 @@ Size Calendar::CalcWindowSizePixel( long nCalcMonthPerLine, // ======================================================================= -#define CALFIELD_EXTRA_BUTTON_WIDTH 14 -#define CALFIELD_EXTRA_BUTTON_HEIGHT 8 -#define CALFIELD_SEP_X 6 -#define CALFIELD_BORDERLINE_X 5 -#define CALFIELD_BORDER_YTOP 4 -#define CALFIELD_BORDER_Y 5 +#define CALFIELD_EXTRA_BUTTON_WIDTH 14 +#define CALFIELD_EXTRA_BUTTON_HEIGHT 8 +#define CALFIELD_SEP_X 6 +#define CALFIELD_BORDERLINE_X 5 +#define CALFIELD_BORDER_YTOP 4 +#define CALFIELD_BORDER_Y 5 // ======================================================================= class ImplCFieldFloatWin : public FloatingWindow { private: - Calendar* mpCalendar; - PushButton* mpTodayBtn; - PushButton* mpNoneBtn; - FixedLine* mpFixedLine; + Calendar* mpCalendar; + PushButton* mpTodayBtn; + PushButton* mpNoneBtn; + FixedLine* mpFixedLine; public: ImplCFieldFloatWin( Window* pParent ); ~ImplCFieldFloatWin(); - void SetCalendar( Calendar* pCalendar ) + void SetCalendar( Calendar* pCalendar ) { mpCalendar = pCalendar; } - PushButton* EnableTodayBtn( BOOL bEnable ); - PushButton* EnableNoneBtn( BOOL bEnable ); - void ArrangeButtons(); + PushButton* EnableTodayBtn( BOOL bEnable ); + PushButton* EnableNoneBtn( BOOL bEnable ); + void ArrangeButtons(); - long Notify( NotifyEvent& rNEvt ); + long Notify( NotifyEvent& rNEvt ); }; // ----------------------------------------------------------------------- @@ -2681,9 +2681,9 @@ public: ImplCFieldFloatWin::ImplCFieldFloatWin( Window* pParent ) : FloatingWindow( pParent, WB_BORDER | WB_SYSTEMWINDOW | WB_NOSHADOW ) { - mpCalendar = NULL; - mpTodayBtn = NULL; - mpNoneBtn = NULL; + mpCalendar = NULL; + mpTodayBtn = NULL; + mpNoneBtn = NULL; mpFixedLine = NULL; } @@ -2708,8 +2708,8 @@ PushButton* ImplCFieldFloatWin::EnableTodayBtn( BOOL bEnable ) XubString aTodayText( SvtResId( STR_SVT_CALENDAR_TODAY ) ); mpTodayBtn->SetText( aTodayText ); Size aSize; - aSize.Width() = mpTodayBtn->GetCtrlTextWidth( mpTodayBtn->GetText() ); - aSize.Height() = mpTodayBtn->GetTextHeight(); + aSize.Width() = mpTodayBtn->GetCtrlTextWidth( mpTodayBtn->GetText() ); + aSize.Height() = mpTodayBtn->GetTextHeight(); aSize.Width() += CALFIELD_EXTRA_BUTTON_WIDTH; aSize.Height() += CALFIELD_EXTRA_BUTTON_HEIGHT; mpTodayBtn->SetSizePixel( aSize ); @@ -2740,8 +2740,8 @@ PushButton* ImplCFieldFloatWin::EnableNoneBtn( BOOL bEnable ) XubString aNoneText( SvtResId( STR_SVT_CALENDAR_NONE ) ); mpNoneBtn->SetText( aNoneText ); Size aSize; - aSize.Width() = mpNoneBtn->GetCtrlTextWidth( mpNoneBtn->GetText() ); - aSize.Height() = mpNoneBtn->GetTextHeight(); + aSize.Width() = mpNoneBtn->GetCtrlTextWidth( mpNoneBtn->GetText() ); + aSize.Height() = mpNoneBtn->GetTextHeight(); aSize.Width() += CALFIELD_EXTRA_BUTTON_WIDTH; aSize.Height() += CALFIELD_EXTRA_BUTTON_HEIGHT; mpNoneBtn->SetSizePixel( aSize ); @@ -2765,8 +2765,8 @@ PushButton* ImplCFieldFloatWin::EnableNoneBtn( BOOL bEnable ) void ImplCFieldFloatWin::ArrangeButtons() { long nBtnHeight = 0; - long nBtnWidth = 0; - Size aOutSize = GetOutputSizePixel(); + long nBtnWidth = 0; + Size aOutSize = GetOutputSizePixel(); if ( mpTodayBtn && mpNoneBtn ) { Size aTodayBtnSize = mpTodayBtn->GetSizePixel(); @@ -2846,11 +2846,11 @@ CalendarField::CalendarField( Window* pParent, WinBits nWinStyle ) : DateField( pParent, nWinStyle ), maDefaultDate( 0, 0, 0 ) { - mpFloatWin = NULL; - mpCalendar = NULL; + mpFloatWin = NULL; + mpCalendar = NULL; mnCalendarStyle = 0; - mbToday = FALSE; - mbNone = FALSE; + mbToday = FALSE; + mbNone = FALSE; } // ----------------------------------------------------------------------- @@ -2859,11 +2859,11 @@ CalendarField::CalendarField( Window* pParent, const ResId& rResId ) : DateField( pParent, rResId ), maDefaultDate( 0, 0, 0 ) { - mpFloatWin = NULL; - mpCalendar = NULL; + mpFloatWin = NULL; + mpCalendar = NULL; mnCalendarStyle = 0; - mbToday = FALSE; - mbNone = FALSE; + mbToday = FALSE; + mbNone = FALSE; } // ----------------------------------------------------------------------- @@ -2969,8 +2969,8 @@ BOOL CalendarField::ShowDropDown( BOOL bShow ) pCalendar->SelectDate( aDate ); } pCalendar->SetCurDate( aDate ); - Point aPos( GetParent()->OutputToScreenPixel( GetPosPixel() ) ); - Rectangle aRect( aPos, GetSizePixel() ); + Point aPos( GetParent()->OutputToScreenPixel( GetPosPixel() ) ); + Rectangle aRect( aPos, GetSizePixel() ); aRect.Bottom() -= 1; mpCalendar->SetOutputSizePixel( mpCalendar->CalcWindowSizePixel() ); mpFloatWin->SetOutputSizePixel( mpCalendar->GetSizePixel() ); diff --git a/svtools/source/control/calendar.src b/svtools/source/control/calendar.src index 4dd31765a5c1..82f8bb0f4ef4 100755 --- a/svtools/source/control/calendar.src +++ b/svtools/source/control/calendar.src @@ -1,7 +1,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 diff --git a/svtools/source/control/collatorres.cxx b/svtools/source/control/collatorres.cxx index 20b7865db569..fb5566607cdd 100644 --- a/svtools/source/control/collatorres.cxx +++ b/svtools/source/control/collatorres.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 @@ -45,31 +45,31 @@ class CollatorRessourceData { friend class CollatorRessource; private: /* data */ - String ma_Name; - String ma_Translation; + String ma_Name; + String ma_Translation; private: /* member functions */ CollatorRessourceData () {} public: CollatorRessourceData ( const String &r_Algorithm, const String &r_Translation) : ma_Name (r_Algorithm), ma_Translation (r_Translation) {} - const String& GetAlgorithm () const { return ma_Name; } + const String& GetAlgorithm () const { return ma_Name; } - const String& GetTranslation () const { return ma_Translation; } + const String& GetTranslation () const { return ma_Translation; } ~CollatorRessourceData () {} CollatorRessourceData& operator= (const CollatorRessourceData& r_From) - { - ma_Name = r_From.GetAlgorithm(); - ma_Translation = r_From.GetTranslation(); + { + ma_Name = r_From.GetAlgorithm(); + ma_Translation = r_From.GetTranslation(); return *this; } }; // ------------------------------------------------------------------------- // -// implementation of the collator-algorithm-name translation +// implementation of the collator-algorithm-name translation // // ------------------------------------------------------------------------- @@ -117,12 +117,12 @@ CollatorRessource::GetTranslation (const String &r_Algorithm) nIndex += 1; aLocaleFreeAlgorithm = String(r_Algorithm, nIndex, r_Algorithm.Len() - nIndex); } - + for (sal_uInt32 i = 0; i < COLLATOR_RESSOURCE_COUNT; i++) { if (aLocaleFreeAlgorithm == mp_Data[i].GetAlgorithm()) return mp_Data[i].GetTranslation(); - } + } return r_Algorithm; } diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index 0dce36d4a5d8..37b01f3d30a4 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.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 @@ -643,20 +643,20 @@ void LineListBox::UpdateLineColors( void ) { if( UpdatePaintLineColor() ) { - ULONG nCount = pLineList->Count(); + ULONG nCount = pLineList->Count(); if( !nCount ) return; - XubString aStr; - Bitmap aBmp; + XubString aStr; + Bitmap aBmp; // exchange entries which containing lines SetUpdateMode( FALSE ); - USHORT nSelEntry = GetSelectEntryPos(); + USHORT nSelEntry = GetSelectEntryPos(); for( ULONG n = 0 ; n < nCount ; ++n ) { - ImpLineListData* pData = pLineList->GetObject( n ); + ImpLineListData* pData = pLineList->GetObject( n ); if( pData ) { // exchange listbox data @@ -679,9 +679,9 @@ void LineListBox::UpdateLineColors( void ) BOOL LineListBox::UpdatePaintLineColor( void ) { - BOOL bRet = TRUE; - const StyleSettings& rSettings = GetSettings().GetStyleSettings(); - Color aNewCol( rSettings.GetWindowColor().IsDark()? rSettings.GetLabelTextColor() : aColor ); + BOOL bRet = TRUE; + const StyleSettings& rSettings = GetSettings().GetStyleSettings(); + Color aNewCol( rSettings.GetWindowColor().IsDark()? rSettings.GetLabelTextColor() : aColor ); bRet = aNewCol != maPaintCol; diff --git a/svtools/source/control/ctrlbox.src b/svtools/source/control/ctrlbox.src index 95440c905d89..5ddedbe4098f 100755 --- a/svtools/source/control/ctrlbox.src +++ b/svtools/source/control/ctrlbox.src @@ -1,7 +1,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 diff --git a/svtools/source/control/ctrldll.cxx b/svtools/source/control/ctrldll.cxx index e9ecfaf7b550..4ba19c9de22e 100644 --- a/svtools/source/control/ctrldll.cxx +++ b/svtools/source/control/ctrldll.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 diff --git a/svtools/source/control/ctrltool.cxx b/svtools/source/control/ctrltool.cxx index 3e5d3e16cc39..674113e14097 100644 --- a/svtools/source/control/ctrltool.cxx +++ b/svtools/source/control/ctrltool.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 @@ -93,8 +93,8 @@ class ImplFontListFontInfo : public FontInfo friend class FontList; private: - OutputDevice* mpDevice; - ImplFontListFontInfo* mpNext; + OutputDevice* mpDevice; + ImplFontListFontInfo* mpNext; public: ImplFontListFontInfo( const FontInfo& rInfo, @@ -104,7 +104,7 @@ public: mpDevice = pDev; } - OutputDevice* GetDevice() const { return mpDevice; } + OutputDevice* GetDevice() const { return mpDevice; } }; // ------------------------------ @@ -116,15 +116,15 @@ class ImplFontListNameInfo friend class FontList; private: - XubString maSearchName; - ImplFontListFontInfo* mpFirst; - USHORT mnType; + XubString maSearchName; + ImplFontListFontInfo* mpFirst; + USHORT mnType; ImplFontListNameInfo( const XubString& rSearchName ) : maSearchName( rSearchName ) {} - const XubString& GetSearchName() const { return maSearchName; } + const XubString& GetSearchName() const { return maSearchName; } }; // ======================================================================= @@ -196,11 +196,11 @@ ImplFontListNameInfo* FontList::ImplFind( const XubString& rSearchName, ULONG* p } // Fonts in der Liste suchen - ImplFontListNameInfo* pCompareData; - ImplFontListNameInfo* pFoundData = NULL; - ULONG nLow = 0; - ULONG nHigh = nCnt-1; - ULONG nMid; + ImplFontListNameInfo* pCompareData; + ImplFontListNameInfo* pFoundData = NULL; + ULONG nLow = 0; + ULONG nHigh = nCnt-1; + ULONG nMid; do { @@ -262,7 +262,7 @@ void FontList::ImplInsertFonts( OutputDevice* pDevice, BOOL bAll, // Alle Fonts vom Device abfragen int n = pDevice->GetDevFontCount(); - USHORT i; + USHORT i; for( i = 0; i < n; i++ ) { FontInfo aFontInfo = pDevice->GetDevFont( i ); @@ -272,9 +272,9 @@ void FontList::ImplInsertFonts( OutputDevice* pDevice, BOOL bAll, if ( !bAll && (aFontInfo.GetType() == TYPE_RASTER) ) continue; - XubString aSearchName = aFontInfo.GetName(); - ImplFontListNameInfo* pData; - ULONG nIndex; + XubString aSearchName = aFontInfo.GetName(); + ImplFontListNameInfo* pData; + ULONG nIndex; ImplMakeSearchString( aSearchName ); pData = ImplFind( aSearchName, &nIndex ); @@ -284,9 +284,9 @@ void FontList::ImplInsertFonts( OutputDevice* pDevice, BOOL bAll, { ImplFontListFontInfo* pNewInfo = new ImplFontListFontInfo( aFontInfo, pDevice ); pData = new ImplFontListNameInfo( aSearchName ); - pData->mpFirst = pNewInfo; - pNewInfo->mpNext = NULL; - pData->mnType = 0; + pData->mpFirst = pNewInfo; + pNewInfo->mpNext = NULL; + pData->mnType = 0; Insert( (void*)pData, nIndex ); } } @@ -294,10 +294,10 @@ void FontList::ImplInsertFonts( OutputDevice* pDevice, BOOL bAll, { if ( bInsertData ) { - BOOL bInsert = TRUE; - ImplFontListFontInfo* pPrev = NULL; - ImplFontListFontInfo* pTemp = pData->mpFirst; - ImplFontListFontInfo* pNewInfo = new ImplFontListFontInfo( aFontInfo, pDevice ); + BOOL bInsert = TRUE; + ImplFontListFontInfo* pPrev = NULL; + ImplFontListFontInfo* pTemp = pData->mpFirst; + ImplFontListFontInfo* pNewInfo = new ImplFontListFontInfo( aFontInfo, pDevice ); while ( pTemp ) { StringCompare eComp = ImplCompareFontInfo( pNewInfo, pTemp ); @@ -356,14 +356,14 @@ FontList::FontList( OutputDevice* pDevice, OutputDevice* pDevice2, BOOL bAll ) : mpSizeAry = NULL; // Stylenamen festlegen - maLight = XubString( SvtResId( STR_SVT_STYLE_LIGHT ) ); - maLightItalic = XubString( SvtResId( STR_SVT_STYLE_LIGHT_ITALIC ) ); - maNormal = XubString( SvtResId( STR_SVT_STYLE_NORMAL ) ); - maNormalItalic = XubString( SvtResId( STR_SVT_STYLE_NORMAL_ITALIC ) ); - maBold = XubString( SvtResId( STR_SVT_STYLE_BOLD ) ); - maBoldItalic = XubString( SvtResId( STR_SVT_STYLE_BOLD_ITALIC ) ); - maBlack = XubString( SvtResId( STR_SVT_STYLE_BLACK ) ); - maBlackItalic = XubString( SvtResId( STR_SVT_STYLE_BLACK_ITALIC ) ); + maLight = XubString( SvtResId( STR_SVT_STYLE_LIGHT ) ); + maLightItalic = XubString( SvtResId( STR_SVT_STYLE_LIGHT_ITALIC ) ); + maNormal = XubString( SvtResId( STR_SVT_STYLE_NORMAL ) ); + maNormalItalic = XubString( SvtResId( STR_SVT_STYLE_NORMAL_ITALIC ) ); + maBold = XubString( SvtResId( STR_SVT_STYLE_BOLD ) ); + maBoldItalic = XubString( SvtResId( STR_SVT_STYLE_BOLD_ITALIC ) ); + maBlack = XubString( SvtResId( STR_SVT_STYLE_BLACK ) ); + maBlackItalic = XubString( SvtResId( STR_SVT_STYLE_BLACK_ITALIC ) ); ImplInsertFonts( pDevice, bAll, TRUE ); @@ -412,7 +412,7 @@ FontList* FontList::Clone() const FontList* pReturn = new FontList( mpDev, mpDev2, GetFontNameCount() == mpDev->GetDevFontCount()); return pReturn; -} +} // ----------------------------------------------------------------------- @@ -459,9 +459,9 @@ const XubString& FontList::GetStyleName( FontWeight eWeight, FontItalic eItalic XubString FontList::GetStyleName( const FontInfo& rInfo ) const { - XubString aStyleName = rInfo.GetStyleName(); - FontWeight eWeight = rInfo.GetWeight(); - FontItalic eItalic = rInfo.GetItalic(); + XubString aStyleName = rInfo.GetStyleName(); + FontWeight eWeight = rInfo.GetWeight(); + FontItalic eItalic = rInfo.GetItalic(); // Nur wenn kein StyleName gesetzt ist, geben wir einen syntetischen // Namen zurueck @@ -530,15 +530,15 @@ XubString FontList::GetFontMapText( const FontInfo& rInfo ) const } // search for synthetic style - USHORT nType = pData->mnType; - const XubString& rStyleName = rInfo.GetStyleName(); + USHORT nType = pData->mnType; + const XubString& rStyleName = rInfo.GetStyleName(); if ( rStyleName.Len() ) { - BOOL bNotSynthetic = FALSE; - BOOL bNoneAvailable = FALSE; - FontWeight eWeight = rInfo.GetWeight(); - FontItalic eItalic = rInfo.GetItalic(); - ImplFontListFontInfo* pFontInfo = pData->mpFirst; + BOOL bNotSynthetic = FALSE; + BOOL bNoneAvailable = FALSE; + FontWeight eWeight = rInfo.GetWeight(); + FontItalic eItalic = rInfo.GetItalic(); + ImplFontListFontInfo* pFontInfo = pData->mpFirst; while ( pFontInfo ) { if ( (eWeight == pFontInfo->GetWeight()) && @@ -584,7 +584,7 @@ XubString FontList::GetFontMapText( const FontInfo& rInfo ) const return maMapPrinterOnly; } // Only Screen-Font? - else if ( (nType & (FONTLIST_FONTNAMETYPE_PRINTER | FONTLIST_FONTNAMETYPE_SCREEN)) == FONTLIST_FONTNAMETYPE_SCREEN + else if ( (nType & (FONTLIST_FONTNAMETYPE_PRINTER | FONTLIST_FONTNAMETYPE_SCREEN)) == FONTLIST_FONTNAMETYPE_SCREEN && rInfo.GetType() == TYPE_RASTER ) { if ( !maMapScreenOnly.Len() ) @@ -818,8 +818,8 @@ const long* FontList::GetSizeAry( const FontInfo& rInfo ) const // Zuerst nach dem Fontnamen suchen um das Device dann von dem // entsprechenden Font zu nehmen - OutputDevice* pDevice = mpDev; - ImplFontListNameInfo* pData = ImplFindByName( rInfo.GetName() ); + OutputDevice* pDevice = mpDev; + ImplFontListNameInfo* pData = ImplFindByName( rInfo.GetName() ); if ( pData ) pDevice = pData->mpFirst->GetDevice(); @@ -832,9 +832,9 @@ const long* FontList::GetSizeAry( const FontInfo& rInfo ) const MapMode aMap( MAP_10TH_INCH, Point(), Fraction( 1, 72 ), Fraction( 1, 72 ) ); pDevice->SetMapMode( aMap ); - USHORT i; - USHORT nRealCount = 0; - long nOldHeight = 0; + USHORT i; + USHORT nRealCount = 0; + long nOldHeight = 0; ((FontList*)this)->mpSizeAry = new long[nDevSizeCount+1]; for ( i = 0; i < nDevSizeCount; i++ ) { @@ -867,7 +867,7 @@ const long* FontList::GetStdSizeAry() struct ImplFSNameItem { - long mnSize; + long mnSize; const char* mszUtf8Name; }; diff --git a/svtools/source/control/ctrltool.src b/svtools/source/control/ctrltool.src index 72420af4908e..75e039708e75 100755 --- a/svtools/source/control/ctrltool.src +++ b/svtools/source/control/ctrltool.src @@ -1,7 +1,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 diff --git a/svtools/source/control/filectrl.cxx b/svtools/source/control/filectrl.cxx index 1a1d539d0120..a97fb4ceef6e 100644 --- a/svtools/source/control/filectrl.cxx +++ b/svtools/source/control/filectrl.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 diff --git a/svtools/source/control/filectrl.src b/svtools/source/control/filectrl.src index dc8bbb5905d6..3ac29f94da89 100644 --- a/svtools/source/control/filectrl.src +++ b/svtools/source/control/filectrl.src @@ -1,7 +1,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 diff --git a/svtools/source/control/filectrl2.cxx b/svtools/source/control/filectrl2.cxx index a45014d7d13e..cbb40c1b6be7 100644 --- a/svtools/source/control/filectrl2.cxx +++ b/svtools/source/control/filectrl2.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 diff --git a/svtools/source/control/fileurlbox.cxx b/svtools/source/control/fileurlbox.cxx index f2880feef2d0..51fddf787acc 100644 --- a/svtools/source/control/fileurlbox.cxx +++ b/svtools/source/control/fileurlbox.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 @@ -120,7 +120,7 @@ namespace svt } //......................................................................... -} // namespace svt +} // namespace svt //......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/control/fixedhyper.cxx b/svtools/source/control/fixedhyper.cxx index c5500bd691ea..1c9ab29f40c9 100644 --- a/svtools/source/control/fixedhyper.cxx +++ b/svtools/source/control/fixedhyper.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 diff --git a/svtools/source/control/fmtfield.cxx b/svtools/source/control/fmtfield.cxx index 8a2c4767794a..7c7d3d4247ff 100644 --- a/svtools/source/control/fmtfield.cxx +++ b/svtools/source/control/fmtfield.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 @@ -76,35 +76,35 @@ namespace validation // the states of our automat. enum State { - START, // at the very start of the string - NUM_START, // the very start of the number + START, // at the very start of the string + NUM_START, // the very start of the number - DIGIT_PRE_COMMA, // some pre-comma digits are read, perhaps including some thousand separators + DIGIT_PRE_COMMA, // some pre-comma digits are read, perhaps including some thousand separators - DIGIT_POST_COMMA, // reading digits after the comma - EXPONENT_START, // at the very start of the exponent value + DIGIT_POST_COMMA, // reading digits after the comma + EXPONENT_START, // at the very start of the exponent value // (means: not including the "e" which denotes the exponent) - EXPONENT_DIGIT, // currently reading the digits of the exponent + EXPONENT_DIGIT, // currently reading the digits of the exponent - END // reached the end of the string + END // reached the end of the string }; // a row in the transition table (means the set of states to be reached from a given state) - typedef ::std::map< sal_Unicode, State > StateTransitions; + typedef ::std::map< sal_Unicode, State > StateTransitions; // a single transition - typedef StateTransitions::value_type Transition; + typedef StateTransitions::value_type Transition; // the complete transition table - typedef ::std::map< State, StateTransitions > TransitionTable; + typedef ::std::map< State, StateTransitions > TransitionTable; // the validator class class NumberValidator { private: - TransitionTable m_aTransitions; - const sal_Unicode m_cThSep; - const sal_Unicode m_cDecSep; + TransitionTable m_aTransitions; + const sal_Unicode m_cThSep; + const sal_Unicode m_cDecSep; public: NumberValidator( const sal_Unicode _cThSep, const sal_Unicode _cDecSep ); @@ -342,25 +342,25 @@ FormattedField::StaticFormatter::~StaticFormatter() //============================================================================== DBG_NAME(FormattedField); -#define INIT_MEMBERS() \ - m_aLastSelection(0,0) \ - ,m_dMinValue(0) \ - ,m_dMaxValue(0) \ - ,m_bHasMin(FALSE) \ - ,m_bHasMax(FALSE) \ - ,m_bStrictFormat(TRUE) \ - ,m_bValueDirty(TRUE) \ - ,m_bEnableEmptyField(TRUE) \ - ,m_bAutoColor(FALSE) \ +#define INIT_MEMBERS() \ + m_aLastSelection(0,0) \ + ,m_dMinValue(0) \ + ,m_dMaxValue(0) \ + ,m_bHasMin(FALSE) \ + ,m_bHasMax(FALSE) \ + ,m_bStrictFormat(TRUE) \ + ,m_bValueDirty(TRUE) \ + ,m_bEnableEmptyField(TRUE) \ + ,m_bAutoColor(FALSE) \ ,m_bEnableNaN(FALSE) \ - ,m_dCurrentValue(0) \ - ,m_dDefaultValue(0) \ - ,m_nFormatKey(0) \ - ,m_pFormatter(NULL) \ - ,m_dSpinSize(1) \ - ,m_dSpinFirst(-1000000) \ - ,m_dSpinLast(1000000) \ - ,m_bTreatAsNumber(TRUE) \ + ,m_dCurrentValue(0) \ + ,m_dDefaultValue(0) \ + ,m_nFormatKey(0) \ + ,m_pFormatter(NULL) \ + ,m_dSpinSize(1) \ + ,m_dSpinFirst(-1000000) \ + ,m_dSpinLast(1000000) \ + ,m_bTreatAsNumber(TRUE) \ ,m_pLastOutputColor(NULL) \ ,m_bUseInputStringForFormatting(false) @@ -459,22 +459,22 @@ void FormattedField::SetTextFormatted(const XubString& rStr) USHORT nNewLen = sFormatted.Len(); USHORT nCurrentLen = GetText().Len(); if ((nNewLen > nCurrentLen) && (aNewSel.Max() == nCurrentLen)) - { // the new text is longer and the cursor was behind the last char (of the old text) + { // the new text is longer and the cursor was behind the last char (of the old text) if (aNewSel.Min() == 0) - { // the whole text was selected -> select the new text on the whole, too + { // the whole text was selected -> select the new text on the whole, too aNewSel.Max() = nNewLen; if (!nCurrentLen) - { // there wasn't really a previous selection (as there was no previous text), we're setting a new one -> check the selection options + { // there wasn't really a previous selection (as there was no previous text), we're setting a new one -> check the selection options ULONG nSelOptions = GetSettings().GetStyleSettings().GetSelectionOptions(); if (nSelOptions & SELECTION_OPTION_SHOWFIRST) - { // selection should be from right to left -> swap min and max + { // selection should be from right to left -> swap min and max aNewSel.Min() = aNewSel.Max(); aNewSel.Max() = 0; } } } else if (aNewSel.Max() == aNewSel.Min()) - { // there was no selection -> set the cursor behind the new last char + { // there was no selection -> set the cursor behind the new last char aNewSel.Max() = nNewLen; aNewSel.Min() = nNewLen; } @@ -482,7 +482,7 @@ void FormattedField::SetTextFormatted(const XubString& rStr) else if (aNewSel.Max() > nNewLen) aNewSel.Max() = nNewLen; else - aNewSel = aSel; // don't use the justified version + aNewSel = aSel; // don't use the justified version SpinField::SetText(sFormatted, aNewSel); m_bValueDirty = FALSE; } @@ -515,7 +515,7 @@ void FormattedField::SetAutoColor(BOOL _bAutomatic) m_bAutoColor = _bAutomatic; if (m_bAutoColor) - { // if auto color is switched on, adjust the current text color, too + { // if auto color is switched on, adjust the current text color, too if (m_pLastOutputColor) SetControlForeground(*m_pLastOutputColor); else @@ -574,22 +574,22 @@ void FormattedField::ImplSetTextImpl(const XubString& rNew, Selection* pNewSel) USHORT nCurrentLen = GetText().Len(); if ((nNewLen > nCurrentLen) && (aSel.Max() == nCurrentLen)) - { // new new text is longer and the cursor is behind the last char + { // new new text is longer and the cursor is behind the last char if (aSel.Min() == 0) - { // the whole text was selected -> select the new text on the whole, too + { // the whole text was selected -> select the new text on the whole, too aSel.Max() = nNewLen; if (!nCurrentLen) - { // there wasn't really a previous selection (as there was no previous text), we're setting a new one -> check the selection options + { // there wasn't really a previous selection (as there was no previous text), we're setting a new one -> check the selection options ULONG nSelOptions = GetSettings().GetStyleSettings().GetSelectionOptions(); if (nSelOptions & SELECTION_OPTION_SHOWFIRST) - { // selection should be from right to left -> swap min and max + { // selection should be from right to left -> swap min and max aSel.Min() = aSel.Max(); aSel.Max() = 0; } } } else if (aSel.Max() == aSel.Min()) - { // there was no selection -> set the cursor behind the new last char + { // there was no selection -> set the cursor behind the new last char aSel.Max() = nNewLen; aSel.Min() = nNewLen; } @@ -621,7 +621,7 @@ void FormattedField::ImplSetFormatKey(ULONG nFormatKey) BOOL bNeedFormatter = (m_pFormatter == NULL) && (nFormatKey != 0); if (bNeedFormatter) { - ImplGetFormatter(); // damit wird ein Standard-Formatter angelegt + ImplGetFormatter(); // damit wird ein Standard-Formatter angelegt m_nFormatKey = nFormatKey; // kann sein, dass das in dem Standard-Formatter keinen Sinn macht, aber der nimmt dann ein Default-Format an. @@ -826,10 +826,10 @@ void FormattedField::Commit() // do the reformat ReFormat(); - + // did the text change? if ( GetText() != sOld ) - { // consider the field as modified + { // consider the field as modified Modify(); // but we have the most recent value now m_bValueDirty = FALSE; @@ -1024,7 +1024,7 @@ BOOL FormattedField::ImplGetValue(double& dNewVal) DBG_ASSERT(ImplGetFormatter() != NULL, "FormattedField::ImplGetValue : can't give you a current value without a formatter !"); - sal_uInt32 nFormatKey = m_nFormatKey; // IsNumberFormat veraendert den FormatKey ... + sal_uInt32 nFormatKey = m_nFormatKey; // IsNumberFormat veraendert den FormatKey ... if (ImplGetFormatter()->IsTextFormat(nFormatKey) && m_bTreatAsNumber) // damit wir in einem als Text formatierten Feld trotzdem eine Eingabe wie '1,1' erkennen ... diff --git a/svtools/source/control/headbar.cxx b/svtools/source/control/headbar.cxx index 284338e0fb76..6f041cae4635 100644 --- a/svtools/source/control/headbar.cxx +++ b/svtools/source/control/headbar.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 @@ -43,54 +43,54 @@ struct ImplHeadItem { - USHORT mnId; - HeaderBarItemBits mnBits; - long mnSize; - ULONG mnHelpId; - Image maImage; - XubString maOutText; - XubString maText; - XubString maHelpText; - void* mpUserData; + USHORT mnId; + HeaderBarItemBits mnBits; + long mnSize; + ULONG mnHelpId; + Image maImage; + XubString maOutText; + XubString maText; + XubString maHelpText; + void* mpUserData; }; DECLARE_LIST( ImplHeadItemList, ImplHeadItem* ) // ======================================================================= -#define HEAD_ARROWSIZE1 4 -#define HEAD_ARROWSIZE2 7 +#define HEAD_ARROWSIZE1 4 +#define HEAD_ARROWSIZE2 7 -#define HEADERBAR_TEXTOFF 2 -#define HEADERBAR_ARROWOFF 5 -#define HEADERBAR_SPLITOFF 3 +#define HEADERBAR_TEXTOFF 2 +#define HEADERBAR_ARROWOFF 5 +#define HEADERBAR_SPLITOFF 3 -#define HEADERBAR_DRAGOFF 4 -#define HEADERBAR_DRAGOUTOFF 15 +#define HEADERBAR_DRAGOFF 4 +#define HEADERBAR_DRAGOUTOFF 15 -#define HEAD_HITTEST_ITEM ((USHORT)0x0001) -#define HEAD_HITTEST_DIVIDER ((USHORT)0x0002) +#define HEAD_HITTEST_ITEM ((USHORT)0x0001) +#define HEAD_HITTEST_DIVIDER ((USHORT)0x0002) // ======================================================================= void HeaderBar::ImplInit( WinBits nWinStyle ) { - mpItemList = new ImplHeadItemList; - mnBorderOff1 = 0; - mnBorderOff2 = 0; - mnOffset = 0; - mnDX = 0; - mnDY = 0; - mnDragSize = 0; - mnStartPos = 0; - mnDragPos = 0; - mnMouseOff = 0; - mnCurItemId = 0; - mnItemDragPos = HEADERBAR_ITEM_NOTFOUND; - mbDrag = FALSE; - mbItemDrag = FALSE; - mbOutDrag = FALSE; - mbItemMode = FALSE; + mpItemList = new ImplHeadItemList; + mnBorderOff1 = 0; + mnBorderOff2 = 0; + mnOffset = 0; + mnDX = 0; + mnDY = 0; + mnDragSize = 0; + mnStartPos = 0; + mnDragPos = 0; + mnMouseOff = 0; + mnCurItemId = 0; + mnItemDragPos = HEADERBAR_ITEM_NOTFOUND; + mbDrag = FALSE; + mbItemDrag = FALSE; + mbOutDrag = FALSE; + mbItemMode = FALSE; // StyleBits auswerten if ( nWinStyle & WB_DRAG ) @@ -212,10 +212,10 @@ Rectangle HeaderBar::ImplGetItemRect( USHORT nPos ) const USHORT HeaderBar::ImplHitTest( const Point& rPos, long& nMouseOff, USHORT& nPos ) const { - ImplHeadItem* pItem; - USHORT nCount = (USHORT)mpItemList->Count(); - BOOL bLastFixed = TRUE; - long nX = -mnOffset; + ImplHeadItem* pItem; + USHORT nCount = (USHORT)mpItemList->Count(); + BOOL bLastFixed = TRUE; + long nX = -mnOffset; for ( USHORT i = 0; i < nCount; i++ ) { @@ -278,8 +278,8 @@ void HeaderBar::ImplInvertDrag( USHORT nStartPos, USHORT nEndPos ) { Rectangle aRect1 = ImplGetItemRect( nStartPos ); Rectangle aRect2 = ImplGetItemRect( nEndPos ); - Point aStartPos = aRect1.Center(); - Point aEndPos = aStartPos; + Point aStartPos = aRect1.Center(); + Point aEndPos = aStartPos; Rectangle aStartRect( aStartPos.X()-2, aStartPos.Y()-2, aStartPos.X()+2, aStartPos.Y()+2 ); @@ -350,13 +350,13 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev, return; } - ImplHeadItem* pItem = mpItemList->GetObject( nPos ); - HeaderBarItemBits nBits = pItem->mnBits; - const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); + ImplHeadItem* pItem = mpItemList->GetObject( nPos ); + HeaderBarItemBits nBits = pItem->mnBits; + const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); // Border muss nicht gemalt werden - aRect.Top() += mnBorderOff1; - aRect.Bottom() -= mnBorderOff2; + aRect.Top() += mnBorderOff1; + aRect.Bottom() -= mnBorderOff2; // Hintergrund loeschen if ( !pRect || bDrag ) @@ -651,8 +651,8 @@ void HeaderBar::ImplUpdate( USHORT nPos, BOOL bEnd, BOOL bDirect ) { if ( !bDirect ) { - Rectangle aRect; - USHORT nItemCount = (USHORT)(mpItemList->Count()); + Rectangle aRect; + USHORT nItemCount = (USHORT)(mpItemList->Count()); if ( nPos < nItemCount ) aRect = ImplGetItemRect( nPos ); else @@ -663,8 +663,8 @@ void HeaderBar::ImplUpdate( USHORT nPos, BOOL bEnd, BOOL bDirect ) } if ( bEnd ) aRect.Right() = mnDX-1; - aRect.Top() += mnBorderOff1; - aRect.Bottom() -= mnBorderOff2; + aRect.Top() += mnBorderOff1; + aRect.Bottom() -= mnBorderOff2; Invalidate( aRect ); } else @@ -678,8 +678,8 @@ void HeaderBar::ImplUpdate( USHORT nPos, BOOL bEnd, BOOL bDirect ) aRect.Right() = mnDX-1; if ( aRect.Left() < aRect.Right() ) { - aRect.Top() += mnBorderOff1; - aRect.Bottom() -= mnBorderOff2; + aRect.Top() += mnBorderOff1; + aRect.Bottom() -= mnBorderOff2; Erase( aRect ); } } @@ -691,8 +691,8 @@ void HeaderBar::ImplUpdate( USHORT nPos, BOOL bEnd, BOOL bDirect ) void HeaderBar::ImplStartDrag( const Point& rMousePos, BOOL bCommand ) { - USHORT nPos; - USHORT nHitTest = ImplHitTest( rMousePos, mnMouseOff, nPos ); + USHORT nPos; + USHORT nHitTest = ImplHitTest( rMousePos, mnMouseOff, nPos ); if ( nHitTest ) { mbDrag = FALSE; @@ -754,8 +754,8 @@ void HeaderBar::ImplStartDrag( const Point& rMousePos, BOOL bCommand ) void HeaderBar::ImplDrag( const Point& rMousePos ) { - BOOL bNewOutDrag; - USHORT nPos = GetItemPos( mnCurItemId ); + BOOL bNewOutDrag; + USHORT nPos = GetItemPos( mnCurItemId ); mnDragPos = rMousePos.X()-mnMouseOff; if ( mbItemMode ) @@ -909,13 +909,13 @@ void HeaderBar::ImplEndDrag( BOOL bCancel ) } } - mbDrag = FALSE; + mbDrag = FALSE; EndDrag(); - mnCurItemId = 0; - mnItemDragPos = HEADERBAR_ITEM_NOTFOUND; - mbOutDrag = FALSE; - mbItemMode = FALSE; - mbItemDrag = FALSE; + mnCurItemId = 0; + mnItemDragPos = HEADERBAR_ITEM_NOTFOUND; + mbOutDrag = FALSE; + mbItemMode = FALSE; + mbItemDrag = FALSE; } // ----------------------------------------------------------------------- @@ -926,9 +926,9 @@ void HeaderBar::MouseButtonDown( const MouseEvent& rMEvt ) { if ( rMEvt.GetClicks() == 2 ) { - long nTemp; - USHORT nPos; - USHORT nHitTest = ImplHitTest( rMEvt.GetPosPixel(), nTemp, nPos ); + long nTemp; + USHORT nPos; + USHORT nHitTest = ImplHitTest( rMEvt.GetPosPixel(), nTemp, nPos ); if ( nHitTest ) { ImplHeadItem* pItem = mpItemList->GetObject( nPos ); @@ -951,10 +951,10 @@ void HeaderBar::MouseButtonDown( const MouseEvent& rMEvt ) void HeaderBar::MouseMove( const MouseEvent& rMEvt ) { - long nTemp1; - USHORT nTemp2; - PointerStyle eStyle = POINTER_ARROW; - USHORT nHitTest = ImplHitTest( rMEvt.GetPosPixel(), nTemp1, nTemp2 ); + long nTemp1; + USHORT nTemp2; + PointerStyle eStyle = POINTER_ARROW; + USHORT nHitTest = ImplHitTest( rMEvt.GetPosPixel(), nTemp1, nTemp2 ); if ( nHitTest & HEAD_HITTEST_DIVIDER ) eStyle = POINTER_HSIZEBAR; @@ -1008,10 +1008,10 @@ void HeaderBar::Paint( const Rectangle& rRect ) void HeaderBar::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags ) { - Point aPos = pDev->LogicToPixel( rPos ); - Size aSize = pDev->LogicToPixel( rSize ); - Rectangle aRect( aPos, aSize ); - Font aFont = GetDrawPixelFont( pDev ); + Point aPos = pDev->LogicToPixel( rPos ); + Size aSize = pDev->LogicToPixel( rSize ); + Rectangle aRect( aPos, aSize ); + Font aFont = GetDrawPixelFont( pDev ); pDev->Push(); pDev->SetMapMode(); @@ -1036,13 +1036,13 @@ void HeaderBar::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, if ( mnBorderOff1 && mnBorderOff2 ) { pDev->DrawLine( aRect.TopLeft(), Point( aRect.Left(), aRect.Bottom() ) ); - pDev->DrawLine( Point( aRect.Right(), aRect.Top() ), Point( aRect.Right(), aRect.Bottom() ) ); + pDev->DrawLine( Point( aRect.Right(), aRect.Top() ), Point( aRect.Right(), aRect.Bottom() ) ); } } } Rectangle aItemRect( aRect ); -// aItemRect.Bottom()--; +// aItemRect.Bottom()--; USHORT nItemCount = (USHORT)mpItemList->Count(); for ( USHORT i = 0; i < nItemCount; i++ ) { @@ -1234,11 +1234,11 @@ void HeaderBar::InsertItem( USHORT nItemId, const Image& rImage, // Item anlegen und in die Liste einfuegen ImplHeadItem* pItem = new ImplHeadItem; - pItem->mnId = nItemId; - pItem->mnBits = nBits; - pItem->mnSize = nSize; - pItem->maImage = rImage; - pItem->mpUserData = 0; + pItem->mnId = nItemId; + pItem->mnBits = nBits; + pItem->mnSize = nSize; + pItem->maImage = rImage; + pItem->mpUserData = 0; mpItemList->Insert( pItem, nPos ); // Ausgabe updaten @@ -1256,12 +1256,12 @@ void HeaderBar::InsertItem( USHORT nItemId, const XubString& rText, // Item anlegen und in die Liste einfuegen ImplHeadItem* pItem = new ImplHeadItem; - pItem->mnId = nItemId; - pItem->mnBits = nBits; - pItem->mnSize = nSize; - pItem->mnHelpId = 0; - pItem->maText = rText; - pItem->mpUserData = 0; + pItem->mnId = nItemId; + pItem->mnBits = nBits; + pItem->mnSize = nSize; + pItem->mnHelpId = 0; + pItem->maText = rText; + pItem->mpUserData = 0; mpItemList->Insert( pItem, nPos ); // Ausgabe updaten @@ -1281,13 +1281,13 @@ void HeaderBar::InsertItem( USHORT nItemId, // Item anlegen und in die Liste einfuegen ImplHeadItem* pItem = new ImplHeadItem; - pItem->mnId = nItemId; - pItem->mnBits = nBits; - pItem->mnSize = nSize; - pItem->mnHelpId = 0; - pItem->maImage = rImage; - pItem->maText = rText; - pItem->mpUserData = 0; + pItem->mnId = nItemId; + pItem->mnBits = nBits; + pItem->mnSize = nSize; + pItem->mnHelpId = 0; + pItem->maImage = rImage; + pItem->maText = rText; + pItem->mpUserData = 0; mpItemList->Insert( pItem, nPos ); // Ausgabe updaten diff --git a/svtools/source/control/hyperlabel.cxx b/svtools/source/control/hyperlabel.cxx index ab42a891a1ed..f0c8e8613627 100644 --- a/svtools/source/control/hyperlabel.cxx +++ b/svtools/source/control/hyperlabel.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 @@ -46,7 +46,7 @@ namespace svt class FontChanger { protected: - OutputDevice* m_pDev; + OutputDevice* m_pDev; public: FontChanger( OutputDevice* _pDev, const Font& _rNewFont ) @@ -70,7 +70,7 @@ namespace svt sal_Bool bInteractive; Size m_aMinSize; sal_Bool m_bHyperMode; - + HyperLabelImpl(); }; @@ -85,7 +85,7 @@ namespace svt { implInit(); } - + HyperLabel::HyperLabel( Window* _pParent, WinBits _nWinStyle ) :FixedText( _pParent, _nWinStyle ) ,m_pImpl( new HyperLabelImpl ) @@ -97,7 +97,7 @@ namespace svt sal_Int32 HyperLabel::GetLogicWidth() { Size rLogicLocSize = PixelToLogic( m_pImpl->m_aMinSize, MAP_APPFONT ); - return rLogicLocSize.Width(); + return rLogicLocSize.Width(); } @@ -106,7 +106,7 @@ namespace svt m_pImpl->m_aMinSize = FixedText::CalcMinimumSize( nMaxWidth ); // the MinimumSize is used to size the FocusRectangle // and for the MouseMove method - m_pImpl->m_aMinSize.Height() += 2; + m_pImpl->m_aMinSize.Height() += 2; m_pImpl->m_aMinSize.Width() += 1; return m_pImpl->m_aMinSize; } @@ -122,14 +122,14 @@ namespace svt Show(); } - void HyperLabel::ToggleBackgroundColor( const Color& _rGBColor ) - { + void HyperLabel::ToggleBackgroundColor( const Color& _rGBColor ) + { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); - SetControlBackground( _rGBColor ); + SetControlBackground( _rGBColor ); if (_rGBColor == COL_TRANSPARENT) - SetTextColor( rStyleSettings.GetFieldTextColor( ) ); + SetTextColor( rStyleSettings.GetFieldTextColor( ) ); else - SetTextColor( rStyleSettings.GetHighlightTextColor( ) ); + SetTextColor( rStyleSettings.GetHighlightTextColor( ) ); } @@ -137,7 +137,7 @@ namespace svt { Font aFont = GetControlFont( ); const Color aColor = GetTextColor(); - + if (rMEvt.IsLeaveWindow()) { DeactivateHyperMode(aFont, aColor); @@ -155,7 +155,7 @@ namespace svt } DeactivateHyperMode(aFont, aColor); } - } + } void HyperLabel::ActivateHyperMode(Font aFont, const Color aColor) { @@ -163,7 +163,7 @@ namespace svt m_pImpl->m_bHyperMode = sal_True; SetPointer( POINTER_REFHAND ); SetControlFont( aFont); - SetTextColor( aColor); + SetTextColor( aColor); } @@ -173,7 +173,7 @@ namespace svt aFont.SetUnderline(UNDERLINE_NONE); SetPointer( POINTER_ARROW ); SetControlFont( aFont); - SetTextColor( aColor); + SetTextColor( aColor); } void HyperLabel::MouseButtonDown( const MouseEvent& ) @@ -182,7 +182,7 @@ namespace svt { maClickHdl.Call( this ); } - } + } void HyperLabel::GetFocus() { @@ -245,24 +245,24 @@ namespace svt { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); FixedText::DataChanged( rDCEvt ); - if ((( rDCEvt.GetType() == DATACHANGED_SETTINGS ) || - ( rDCEvt.GetType() == DATACHANGED_DISPLAY )) && - ( rDCEvt.GetFlags() & SETTINGS_STYLE )) + if ((( rDCEvt.GetType() == DATACHANGED_SETTINGS ) || + ( rDCEvt.GetType() == DATACHANGED_DISPLAY )) && + ( rDCEvt.GetFlags() & SETTINGS_STYLE )) { const Color& rGBColor = GetControlBackground(); if (rGBColor == COL_TRANSPARENT) - SetTextColor( rStyleSettings.GetFieldTextColor( ) ); + SetTextColor( rStyleSettings.GetFieldTextColor( ) ); else { SetControlBackground(rStyleSettings.GetHighlightColor()); - SetTextColor( rStyleSettings.GetHighlightTextColor( ) ); + SetTextColor( rStyleSettings.GetHighlightTextColor( ) ); } Invalidate(); } } //......................................................................... -} // namespace svt +} // namespace svt //......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/control/indexentryres.cxx b/svtools/source/control/indexentryres.cxx index 4bc40eb8edeb..a9636c02ce97 100644 --- a/svtools/source/control/indexentryres.cxx +++ b/svtools/source/control/indexentryres.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 @@ -45,24 +45,24 @@ class IndexEntryRessourceData { friend class IndexEntryRessource; private: /* data */ - String ma_Name; - String ma_Translation; + String ma_Name; + String ma_Translation; private: /* member functions */ IndexEntryRessourceData () {} public: IndexEntryRessourceData ( const String &r_Algorithm, const String &r_Translation) : ma_Name (r_Algorithm), ma_Translation (r_Translation) {} - const String& GetAlgorithm () const { return ma_Name; } + const String& GetAlgorithm () const { return ma_Name; } - const String& GetTranslation () const { return ma_Translation; } + const String& GetTranslation () const { return ma_Translation; } ~IndexEntryRessourceData () {} IndexEntryRessourceData& operator= (const IndexEntryRessourceData& r_From) { - ma_Name = r_From.GetAlgorithm(); - ma_Translation = r_From.GetTranslation(); + ma_Name = r_From.GetAlgorithm(); + ma_Translation = r_From.GetTranslation(); return *this; } }; diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx index 2a3153109eed..42da1eb19bdc 100644 --- a/svtools/source/control/inettbc.cxx +++ b/svtools/source/control/inettbc.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 @@ -97,7 +97,7 @@ public: SvStringsDtor* pURLs; SvStringsDtor* pCompletions; const IUrlFilter* pUrlFilter; - ::std::vector< WildCard > m_aFilters; + ::std::vector< WildCard > m_aFilters; static sal_Bool TildeParsing( String& aText, String& aBaseUrl ); @@ -115,18 +115,18 @@ class SvtMatchContext_Impl : public ::osl::Thread { static ::osl::Mutex* pDirMutex; - SvStringsDtor aPickList; + SvStringsDtor aPickList; SvStringsDtor* pCompletions; SvStringsDtor* pURLs; - svtools::AsynchronLink aLink; - String aBaseURL; + svtools::AsynchronLink aLink; + String aBaseURL; String aText; - SvtURLBox* pBox; + SvtURLBox* pBox; BOOL bStop; - BOOL bOnlyDirectories; - BOOL bNoSelection; + BOOL bOnlyDirectories; + BOOL bNoSelection; - DECL_STATIC_LINK( SvtMatchContext_Impl, Select_Impl, void* ); + DECL_STATIC_LINK( SvtMatchContext_Impl, Select_Impl, void* ); virtual void SAL_CALL onTerminated( ); virtual void SAL_CALL run(); @@ -140,7 +140,7 @@ public: SvtMatchContext_Impl( SvtURLBox* pBoxP, const String& rText ); ~SvtMatchContext_Impl(); - void Stop(); + void Stop(); }; ::osl::Mutex* SvtMatchContext_Impl::pDirMutex = 0; @@ -417,9 +417,9 @@ void SvtMatchContext_Impl::ReadFolder( const String& rURL, try { uno::Reference< XDynamicResultSet > xDynResultSet; - ResultSetInclude eInclude = INCLUDE_FOLDERS_AND_DOCUMENTS; + ResultSetInclude eInclude = INCLUDE_FOLDERS_AND_DOCUMENTS; if ( bOnlyDirectories ) - eInclude = INCLUDE_FOLDERS_ONLY; + eInclude = INCLUDE_FOLDERS_ONLY; xDynResultSet = aCnt.createDynamicCursor( aProps, eInclude ); @@ -553,7 +553,7 @@ String SvtURLBox::ParseSmart( String aText, String aBaseURL, String aWorkDir ) // HRO: I suppose this hack should only be done for Windows !!!??? #ifdef WNT // HRO: INetURLObject::smatRel2Abs does not recognize '\\' as a relative path - // but in case of "\\\\" INetURLObject is right - this is an absolute path ! + // but in case of "\\\\" INetURLObject is right - this is an absolute path ! if( aText.Search( '\\' ) == 0 && (aText.Len() < 2 || aText.GetChar( 1 ) != '\\') ) { diff --git a/svtools/source/control/prgsbar.cxx b/svtools/source/control/prgsbar.cxx index 500a3a5c4227..77c3b2148bb8 100644 --- a/svtools/source/control/prgsbar.cxx +++ b/svtools/source/control/prgsbar.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 @@ -37,15 +37,15 @@ // ======================================================================= -#define PROGRESSBAR_OFFSET 3 -#define PROGRESSBAR_WIN_OFFSET 2 +#define PROGRESSBAR_OFFSET 3 +#define PROGRESSBAR_WIN_OFFSET 2 // ======================================================================= void ProgressBar::ImplInit() { - mnPercent = 0; - mbCalcNew = TRUE; + mnPercent = 0; + mbCalcNew = TRUE; ImplInitSettings( TRUE, TRUE, TRUE ); } diff --git a/svtools/source/control/roadmap.cxx b/svtools/source/control/roadmap.cxx index 55677bb15e67..c26fbdd4d912 100644 --- a/svtools/source/control/roadmap.cxx +++ b/svtools/source/control/roadmap.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 @@ -67,7 +67,7 @@ namespace svt public: IDLabel( Window* _pParent, WinBits _nWinStyle = 0 ); ~IDLabel( ); - virtual void DataChanged( const DataChangedEvent& rDCEvt ); + virtual void DataChanged( const DataChangedEvent& rDCEvt ); }; //===================================================================== @@ -76,7 +76,7 @@ namespace svt class ColorChanger { protected: - OutputDevice* m_pDev; + OutputDevice* m_pDev; public: ColorChanger( OutputDevice* _pDev, const Color& _rNewLineColor, const Color& _rNewFillColor ) @@ -106,33 +106,33 @@ namespace svt public: RoadmapItem( ORoadmap& _rParent, const Size& _rItemPlayground ); ~RoadmapItem( ); + + void SetID( sal_Int16 _ID ); + sal_Int16 GetID() const; - void SetID( sal_Int16 _ID ); - sal_Int16 GetID() const; - - void SetIndex( ItemIndex _Index ); + void SetIndex( ItemIndex _Index ); ItemIndex GetIndex() const; - void SetLabel( const ::rtl::OUString& _rText ); - ::rtl::OUString GetLabel( ); + void SetLabel( const ::rtl::OUString& _rText ); + ::rtl::OUString GetLabel( ); - void Update( ItemIndex _RMIndex, const ::rtl::OUString& _rText ); + void Update( ItemIndex _RMIndex, const ::rtl::OUString& _rText ); + + void SetPosition( RoadmapItem* OldHyperLabel ); - void SetPosition( RoadmapItem* OldHyperLabel ); + void ToggleBackgroundColor( const Color& _rGBColor ); + void SetInteractive( sal_Bool _bInteractive ); - void ToggleBackgroundColor( const Color& _rGBColor ); - void SetInteractive( sal_Bool _bInteractive ); - - void SetClickHdl( const Link& rLink ); - const Link& GetClickHdl() const; - void SetZOrder( RoadmapItem* pRefRoadmapHyperLabel, USHORT nFlags ); - void Enable( BOOL bEnable = TRUE); - BOOL IsEnabled() const; - void GrabFocus(); + void SetClickHdl( const Link& rLink ); + const Link& GetClickHdl() const; + void SetZOrder( RoadmapItem* pRefRoadmapHyperLabel, USHORT nFlags ); + void Enable( BOOL bEnable = TRUE); + BOOL IsEnabled() const; + void GrabFocus(); bool Contains( const Window* _pWindow ) const; - - HyperLabel* GetDescriptionHyperLabel() const { return mpDescription; } + + HyperLabel* GetDescriptionHyperLabel() const { return mpDescription; } private: void ImplUpdateIndex( const ItemIndex _nIndex ); @@ -147,7 +147,7 @@ namespace svt protected: const ORoadmap& m_rAntiImpl; Link m_aSelectHdl; - BitmapEx m_aPicture; + BitmapEx m_aPicture; HL_Vector m_aRoadmapSteps; ItemId m_iCurItemID; sal_Bool m_bInteractive; @@ -165,10 +165,10 @@ namespace svt RoadmapItem* InCompleteHyperLabel; - void addHyperLabel( RoadmapItem* _rRoadmapStep ) { m_aRoadmapSteps.push_back(_rRoadmapStep); } + void addHyperLabel( RoadmapItem* _rRoadmapStep ) { m_aRoadmapSteps.push_back(_rRoadmapStep); } - HL_Vector& getHyperLabels() { return m_aRoadmapSteps; } - const HL_Vector& getHyperLabels() const { return m_aRoadmapSteps; } + HL_Vector& getHyperLabels() { return m_aRoadmapSteps; } + const HL_Vector& getHyperLabels() const { return m_aRoadmapSteps; } void insertHyperLabel( ItemIndex _Index, RoadmapItem* _rRoadmapStep ) { m_aRoadmapSteps.insert( m_aRoadmapSteps.begin() + _Index, _rRoadmapStep ); } @@ -183,11 +183,11 @@ namespace svt void setComplete(const sal_Bool _bComplete) {m_bComplete = _bComplete; } sal_Bool isComplete() const { return m_bComplete; }; - void setPicture( const BitmapEx& _rPic ) { m_aPicture = _rPic; } - const BitmapEx& getPicture( ) const { return m_aPicture; } + void setPicture( const BitmapEx& _rPic ) { m_aPicture = _rPic; } + const BitmapEx& getPicture( ) const { return m_aPicture; } - void setSelectHdl( const Link& _rHdl ) { m_aSelectHdl = _rHdl; } - const Link& getSelectHdl( ) const { return m_aSelectHdl; } + void setSelectHdl( const Link& _rHdl ) { m_aSelectHdl = _rHdl; } + const Link& getSelectHdl( ) const { return m_aSelectHdl; } void initItemSize(); const Size& getItemSize() const { return m_aItemSizePixel; } @@ -763,9 +763,9 @@ namespace svt //--------------------------------------------------------------------- void ORoadmap::DataChanged( const DataChangedEvent& rDCEvt ) { - if ((( rDCEvt.GetType() == DATACHANGED_SETTINGS ) || - ( rDCEvt.GetType() == DATACHANGED_DISPLAY )) && - ( rDCEvt.GetFlags() & SETTINGS_STYLE )) + if ((( rDCEvt.GetType() == DATACHANGED_SETTINGS ) || + ( rDCEvt.GetType() == DATACHANGED_DISPLAY )) && + ( rDCEvt.GetFlags() & SETTINGS_STYLE )) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); SetBackground( Wallpaper( rStyleSettings.GetFieldColor() ) ); @@ -999,9 +999,9 @@ namespace svt { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); FixedText::DataChanged( rDCEvt ); - if ((( rDCEvt.GetType() == DATACHANGED_SETTINGS ) || - ( rDCEvt.GetType() == DATACHANGED_DISPLAY )) && - ( rDCEvt.GetFlags() & SETTINGS_STYLE )) + if ((( rDCEvt.GetType() == DATACHANGED_SETTINGS ) || + ( rDCEvt.GetType() == DATACHANGED_DISPLAY )) && + ( rDCEvt.GetFlags() & SETTINGS_STYLE )) { const Color& rGBColor = GetControlBackground(); if (rGBColor == COL_TRANSPARENT) @@ -1019,7 +1019,7 @@ namespace svt //......................................................................... -} // namespace svt +} // namespace svt //......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx index 43cdf1132c43..2395050eeff8 100644 --- a/svtools/source/control/ruler.cxx +++ b/svtools/source/control/ruler.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 @@ -82,7 +82,7 @@ #define RULER_UNIT_MILE 6 #define RULER_UNIT_POINT 7 #define RULER_UNIT_PICA 8 -#define RULER_UNIT_CHAR 9 +#define RULER_UNIT_CHAR 9 #define RULER_UNIT_LINE 10 #define RULER_UNIT_COUNT 11 @@ -149,7 +149,7 @@ static ImplRulerUnitData aImplRulerUnitTab[RULER_UNIT_COUNT] = { MAP_10TH_INCH, 633600, 63360, 316800, 633600, 1609344, 4, " miles" }, // MILE { MAP_POINT, 1, 12, 12, 36, 353, 2, " pt" }, // POINT { MAP_100TH_MM, 423, 423, 423, 846, 423, 3, " pi" }, // PICA -{ MAP_100TH_MM, 371, 371, 371, 743, 371, 3, " ch" }, // CHAR +{ MAP_100TH_MM, 371, 371, 371, 743, 371, 3, " ch" }, // CHAR { MAP_100TH_MM, 551, 551, 551, 1102, 551, 3, " li" } // LINE }; @@ -1301,7 +1301,7 @@ void Ruler::ImplFormat() Size aVirDevSize; BOOL b3DLook = !(rStyleSettings.GetOptions() & STYLE_OPTION_MONO); - // initialize VirtualDevice + // initialize VirtualDevice if ( mnWinStyle & WB_HORZ ) { aVirDevSize.Width() = mnVirWidth; @@ -1513,16 +1513,16 @@ void Ruler::ImplDraw() if(mpData->bTextRTL) aVirDevSize.Width() -= maExtraRect.GetWidth(); -// else -// aVirDevSize.Width() -= mnVirOff; +// else +// aVirDevSize.Width() -= mnVirOff; aOffPos.Y() = RULER_OFF; } else { aOffPos.X() = RULER_OFF; aOffPos.Y() = mnVirOff; -// else -// aVirDevSize.Height() -= mnVirOff; +// else +// aVirDevSize.Height() -= mnVirOff; } DrawOutDev( aOffPos, aVirDevSize, Point(), aVirDevSize, maVirDev ); diff --git a/svtools/source/control/scriptedtext.cxx b/svtools/source/control/scriptedtext.cxx index adc92f75e719..ff07effa4c1e 100644 --- a/svtools/source/control/scriptedtext.cxx +++ b/svtools/source/control/scriptedtext.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 diff --git a/svtools/source/control/scrwin.cxx b/svtools/source/control/scrwin.cxx index 4c748b17ce3e..17230995a57a 100644 --- a/svtools/source/control/scrwin.cxx +++ b/svtools/source/control/scrwin.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 @@ -192,21 +192,21 @@ void __EXPORT ScrollableWindow::Resize() const long nScrSize = GetSettings().GetStyleSettings().GetScrollBarSize(); BOOL bVVisible = FALSE; // by default no vertical-ScrollBar BOOL bHVisible = FALSE; // by default no horizontal-ScrollBar - BOOL bChanged; // determines if a visiblility was changed + BOOL bChanged; // determines if a visiblility was changed do { bChanged = FALSE; // does we need a vertical ScrollBar if ( aOutPixSz.Width() < aTotPixSz.Width() && !bHVisible ) - { bHVisible = TRUE; + { bHVisible = TRUE; aOutPixSz.Height() -= nScrSize; bChanged = TRUE; } // does we need a horizontal ScrollBar if ( aOutPixSz.Height() < aTotPixSz.Height() && !bVVisible ) - { bVVisible = TRUE; + { bVVisible = TRUE; aOutPixSz.Width() -= nScrSize; bChanged = TRUE; } @@ -350,7 +350,7 @@ void ScrollableWindow::SetVisibleSize( const Size& rNewSize ) // get maximum rectangle for us from our parent-window (subst our border!) Rectangle aMax( Point(0, 0), GetParent()->GetOutputSizePixel() ); - aMax.Left() -= ( Window::GetSizePixel().Width() - + aMax.Left() -= ( Window::GetSizePixel().Width() - Window::GetOutputSizePixel().Width() ); aMax.Bottom() -= (Window::GetSizePixel().Height() - Window::GetOutputSizePixel().Height()); @@ -359,7 +359,7 @@ void ScrollableWindow::SetVisibleSize( const Size& rNewSize ) BOOL bHScroll = FALSE; const long nScrSize = GetSettings().GetStyleSettings().GetScrollBarSize(); if ( aWill.Width() < aWish.GetSize().Width() ) - { bHScroll = TRUE; + { bHScroll = TRUE; aWill.Height() = Min( aWill.Height()+nScrSize, aMax.GetSize().Height() ); } diff --git a/svtools/source/control/stdctrl.cxx b/svtools/source/control/stdctrl.cxx index 55aa20209699..e9040491b682 100644 --- a/svtools/source/control/stdctrl.cxx +++ b/svtools/source/control/stdctrl.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 diff --git a/svtools/source/control/stdmenu.cxx b/svtools/source/control/stdmenu.cxx index 13a9cdacfc5e..c144698337df 100644 --- a/svtools/source/control/stdmenu.cxx +++ b/svtools/source/control/stdmenu.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 @@ -202,25 +202,25 @@ void FontStyleMenu::Fill( const XubString& rName, const FontList* pList ) sal_Handle hFontInfo = pList->GetFirstFontInfo( rName ); if ( hFontInfo ) { - XubString aStyleText; - USHORT nPos = 0; - USHORT nId = FONTSTYLEMENU_FIRSTID; - FontWeight eLastWeight = WEIGHT_DONTKNOW; - FontItalic eLastItalic = ITALIC_NONE; - FontWidth eLastWidth = WIDTH_DONTKNOW; - BOOL bNormal = FALSE; - BOOL bItalic = FALSE; - BOOL bBold = FALSE; - BOOL bBoldItalic = FALSE; - BOOL bInsert = FALSE; - FontInfo aInfo; + XubString aStyleText; + USHORT nPos = 0; + USHORT nId = FONTSTYLEMENU_FIRSTID; + FontWeight eLastWeight = WEIGHT_DONTKNOW; + FontItalic eLastItalic = ITALIC_NONE; + FontWidth eLastWidth = WIDTH_DONTKNOW; + BOOL bNormal = FALSE; + BOOL bItalic = FALSE; + BOOL bBold = FALSE; + BOOL bBoldItalic = FALSE; + BOOL bInsert = FALSE; + FontInfo aInfo; while ( hFontInfo ) { aInfo = pList->GetFontInfo( hFontInfo ); - FontWeight eWeight = aInfo.GetWeight(); - FontItalic eItalic = aInfo.GetItalic(); - FontWidth eWidth = aInfo.GetWidthType(); + FontWeight eWeight = aInfo.GetWeight(); + FontItalic eItalic = aInfo.GetItalic(); + FontWidth eWidth = aInfo.GetWidthType(); // Only if the attributes are different, we insert the // Font to avoid double Entries in different languages if ( (eWeight != eLastWeight) || (eItalic != eLastItalic) || @@ -329,7 +329,7 @@ void FontStyleMenu::Fill( const XubString& rName, const FontList* pList ) else { // Wenn Font nicht, dann Standard-Styles einfuegen - InsertItem( FONTSTYLEMENU_FIRSTID, pList->GetNormalStr(), + InsertItem( FONTSTYLEMENU_FIRSTID, pList->GetNormalStr(), MIB_RADIOCHECK | MIB_AUTOCHECK, 0 ); InsertItem( FONTSTYLEMENU_FIRSTID+1, pList->GetItalicStr(), MIB_RADIOCHECK | MIB_AUTOCHECK, 0 ); @@ -446,8 +446,8 @@ void FontSizeMenu::Fill( const FontInfo& rInfo, const FontList* pList ) ULONG nCount = aFontSizeNames.Count(); for( ULONG i = 0; i < nCount; i++ ) { - String aSizeName = aFontSizeNames.GetIndexName( i ); - long nSize = aFontSizeNames.GetIndexSize( i ); + String aSizeName = aFontSizeNames.GetIndexName( i ); + long nSize = aFontSizeNames.GetIndexSize( i ); mpHeightAry[nPos] = nSize; nPos++; // Id is nPos+1 InsertItem( nPos, aSizeName, MIB_RADIOCHECK | MIB_AUTOCHECK ); @@ -492,9 +492,9 @@ void FontSizeMenu::SetCurHeight( long nHeight ) mnCurHeight = nHeight; // check menue item - XubString aHeight = Application::GetSettings().GetUILocaleI18nHelper().GetNum( nHeight, 1, TRUE, FALSE ); - USHORT nChecked = 0; - USHORT nItemCount = GetItemCount(); + XubString aHeight = Application::GetSettings().GetUILocaleI18nHelper().GetNum( nHeight, 1, TRUE, FALSE ); + USHORT nChecked = 0; + USHORT nItemCount = GetItemCount(); for( USHORT i = 0; i < nItemCount; i++ ) { USHORT nItemId = GetItemId( i ); diff --git a/svtools/source/control/svxbox.cxx b/svtools/source/control/svxbox.cxx index 5dbf505d4946..0ffb10517abe 100644 --- a/svtools/source/control/svxbox.cxx +++ b/svtools/source/control/svxbox.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 @@ -89,7 +89,7 @@ SvxListBox::SvxListBox(Window* pParent, const ResId& rId): __EXPORT SvxListBox::~SvxListBox() { - aEntryLst.DeleteAndDestroy(0, aEntryLst.Count()); + aEntryLst.DeleteAndDestroy(0, aEntryLst.Count()); aDelEntryLst.DeleteAndDestroy(0, aDelEntryLst.Count()); } @@ -102,7 +102,7 @@ void SvxListBox::InitListBox() // Verwaltung fuer die Stringlist aus der Resource aufbauen USHORT nSize = GetEntryCount(); for(USHORT i=0; i < nSize; ++i) - { const SvxBoxEntry* pTmp = new SvxBoxEntry(ListBox::GetEntry(i), i); + { const SvxBoxEntry* pTmp = new SvxBoxEntry(ListBox::GetEntry(i), i); const SvxBoxEntry* &rpTmp = pTmp; aEntryLst.Insert(rpTmp, aEntryLst.Count()); } @@ -228,7 +228,7 @@ USHORT SvxListBox::GetModifiedCount() const USHORT nMod = 0; USHORT nSize = aEntryLst.Count(); for(USHORT i=0; i < nSize; ++i) - { if(aEntryLst[i]->bModified) + { if(aEntryLst[i]->bModified) nMod++; } return nMod; @@ -245,8 +245,8 @@ void SvxListBox::ModifyEntry(USHORT nPos, const String& rName) SvxBoxEntry* pEntry = aEntryLst[nPos]; aEntryLst.Remove(nPos, 1); - aEntryLst[nPos]->aName = rName; - aEntryLst[nPos]->bModified = TRUE; + aEntryLst[nPos]->aName = rName; + aEntryLst[nPos]->bModified = TRUE; ListBox::RemoveEntry(nPos); InsertSorted(pEntry); @@ -261,8 +261,8 @@ const SvxBoxEntry& SvxListBox::GetModifiedEntry(USHORT nPos) const USHORT nSize = aEntryLst.Count(); USHORT nMod = 0; for(USHORT i=0; i < nSize; ++i) - { if(aEntryLst[i]->bModified) - { if(nMod == nPos) + { if(aEntryLst[i]->bModified) + { if(nMod == nPos) return *aEntryLst[i]; nMod++; } @@ -297,14 +297,14 @@ USHORT SvxListBox::GetNewCount() const USHORT nNew = 0; USHORT nSize = aEntryLst.Count(); for(USHORT i=0; i < nSize; ++i) - { if(aEntryLst[i]->bNew) + { if(aEntryLst[i]->bNew) nNew++; } return nNew; } /*-------------------------------------------------------------------- - Beschreibung: Alle neuen Eintraege ueberpruefen + Beschreibung: Alle neuen Eintraege ueberpruefen --------------------------------------------------------------------*/ const SvxBoxEntry& SvxListBox::GetNewEntry(USHORT nPos) const @@ -312,8 +312,8 @@ const SvxBoxEntry& SvxListBox::GetNewEntry(USHORT nPos) const USHORT nSize = aEntryLst.Count(); USHORT nNew = 0; for(USHORT i=0; i < nSize; ++i) - { if(aEntryLst[i]->bNew) - { if(nNew == nPos) + { if(aEntryLst[i]->bNew) + { if(nNew == nPos) return *aEntryLst[i]; nNew++; } @@ -357,7 +357,7 @@ SvxComboBox::SvxComboBox(Window* pParent, const ResId& rId, USHORT nStyleBits ): __EXPORT SvxComboBox::~SvxComboBox() { - aEntryLst.DeleteAndDestroy(0, aEntryLst.Count()); + aEntryLst.DeleteAndDestroy(0, aEntryLst.Count()); aDelEntryLst.DeleteAndDestroy(0, aDelEntryLst.Count()); } @@ -370,7 +370,7 @@ void SvxComboBox::InitComboBox() // Verwaltung fuer die Stringlist aus der Resource aufbauen USHORT nSize = GetEntryCount(); for(USHORT i=0; i < nSize; ++i) - { const SvxBoxEntry* pTmp = new SvxBoxEntry(ComboBox::GetEntry(i), i); + { const SvxBoxEntry* pTmp = new SvxBoxEntry(ComboBox::GetEntry(i), i); const SvxBoxEntry* &rpTmp = pTmp; aEntryLst.Insert(rpTmp, aEntryLst.Count()); } @@ -470,7 +470,7 @@ USHORT SvxComboBox::GetModifiedCount() const USHORT nMod = 0; USHORT nSize = aEntryLst.Count(); for(USHORT i=0; i < nSize; ++i) - { if(aEntryLst[i]->bModified) + { if(aEntryLst[i]->bModified) nMod++; } return nMod; @@ -487,8 +487,8 @@ void SvxComboBox::ModifyEntry(USHORT nPos, const String& rName) SvxBoxEntry* pEntry = aEntryLst[nPos]; aEntryLst.Remove(nPos, 1); - aEntryLst[nPos]->aName = rName; - aEntryLst[nPos]->bModified = TRUE; + aEntryLst[nPos]->aName = rName; + aEntryLst[nPos]->bModified = TRUE; ComboBox::RemoveEntry(nPos); InsertSorted(pEntry); @@ -503,8 +503,8 @@ const SvxBoxEntry& SvxComboBox::GetModifiedEntry(USHORT nPos) const USHORT nSize = aEntryLst.Count(); USHORT nMod = 0; for(USHORT i=0; i < nSize; ++i) - { if(aEntryLst[i]->bModified) - { if(nMod == nPos) + { if(aEntryLst[i]->bModified) + { if(nMod == nPos) return *aEntryLst[i]; nMod++; } @@ -539,14 +539,14 @@ USHORT SvxComboBox::GetNewCount() const USHORT nNew = 0; USHORT nSize = aEntryLst.Count(); for(USHORT i=0; i < nSize; ++i) - { if(aEntryLst[i]->bNew) + { if(aEntryLst[i]->bNew) nNew++; } return nNew; } /*-------------------------------------------------------------------- - Beschreibung: Alle neuen Eintraege ueberpruefen + Beschreibung: Alle neuen Eintraege ueberpruefen --------------------------------------------------------------------*/ const SvxBoxEntry& SvxComboBox::GetNewEntry(USHORT nPos) const @@ -554,8 +554,8 @@ const SvxBoxEntry& SvxComboBox::GetNewEntry(USHORT nPos) const USHORT nSize = aEntryLst.Count(); USHORT nNew = 0; for(USHORT i=0; i < nSize; ++i) - { if(aEntryLst[i]->bNew) - { if(nNew == nPos) + { if(aEntryLst[i]->bNew) + { if(nNew == nPos) return *aEntryLst[i]; nNew++; } @@ -589,7 +589,7 @@ void __EXPORT SvxComboBox::KeyInput( const KeyEvent& rKEvt ) if( cChar == sal_Unicode( '/' ) || cChar == sal_Unicode( ' ' ) ) return; #else - if( cChar == sal_Unicode( ':' ) || cChar == sal_Unicode( '\\' ) || + if( cChar == sal_Unicode( ':' ) || cChar == sal_Unicode( '\\' ) || cChar == sal_Unicode( '.' ) || cChar == sal_Unicode( ' ' ) ) return; #endif diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx index 0dae1ae3eb20..7b951212ea4d 100644 --- a/svtools/source/control/tabbar.cxx +++ b/svtools/source/control/tabbar.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 diff --git a/svtools/source/control/taskbar.cxx b/svtools/source/control/taskbar.cxx index 185989c5b68f..6995ce4659eb 100644 --- a/svtools/source/control/taskbar.cxx +++ b/svtools/source/control/taskbar.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 @@ -43,7 +43,7 @@ class ImplTaskBarFloat : public FloatingWindow { public: - TaskBar* mpTaskBar; + TaskBar* mpTaskBar; public: ImplTaskBarFloat( TaskBar* pTaskBar ); @@ -54,33 +54,33 @@ public: ImplTaskBarFloat::ImplTaskBarFloat( TaskBar* pTaskBar ) : FloatingWindow( pTaskBar, 0 ) { - mpTaskBar = pTaskBar; + mpTaskBar = pTaskBar; } // ======================================================================= -#define TASKBAR_BORDER 2 -#define TASKBAR_OFFSIZE 3 -#define TASKBAR_OFFX 2 -#define TASKBAR_OFFY 1 -#define TASKBAR_BUTTONOFF 5 -#define TASKBAR_AUTOHIDE_HEIGHT 2 +#define TASKBAR_BORDER 2 +#define TASKBAR_OFFSIZE 3 +#define TASKBAR_OFFX 2 +#define TASKBAR_OFFY 1 +#define TASKBAR_BUTTONOFF 5 +#define TASKBAR_AUTOHIDE_HEIGHT 2 // ======================================================================= TaskBar::TaskBar( Window* pParent, WinBits nWinStyle ) : Window( pParent, WB_3DLOOK ) { - mpButtonBar = NULL; - mpTaskToolBox = NULL; - mpStatusBar = NULL; - mnStatusWidth = 0; - mnOldStatusWidth = 0; - mnLines = 1; - mnWinBits = nWinStyle; - mbStatusText = FALSE; - mbShowItems = FALSE; - mbAutoHide = FALSE; + mpButtonBar = NULL; + mpTaskToolBox = NULL; + mpStatusBar = NULL; + mnStatusWidth = 0; + mnOldStatusWidth = 0; + mnLines = 1; + mnWinBits = nWinStyle; + mbStatusText = FALSE; + mbShowItems = FALSE; + mbAutoHide = FALSE; ImplInitSettings(); } @@ -161,14 +161,14 @@ void TaskBar::MouseMove( const MouseEvent& rMEvt ) { if ( mnWinBits & WB_SIZEABLE ) { - TaskToolBox* pTempTaskToolBox = GetTaskToolBox(); - TaskStatusBar* pTempStatusBar = GetStatusBar(); + TaskToolBox* pTempTaskToolBox = GetTaskToolBox(); + TaskStatusBar* pTempStatusBar = GetStatusBar(); if ( pTempTaskToolBox && pTempStatusBar ) { - long nStatusX = pTempStatusBar->GetPosPixel().X()-TASKBAR_OFFSIZE-2; - long nMouseX = rMEvt.GetPosPixel().X(); - PointerStyle ePtrStyle; + long nStatusX = pTempStatusBar->GetPosPixel().X()-TASKBAR_OFFSIZE-2; + long nMouseX = rMEvt.GetPosPixel().X(); + PointerStyle ePtrStyle; if ( (nMouseX >= nStatusX-1) && (nMouseX <= nStatusX+3) ) ePtrStyle = POINTER_HSIZEBAR; else @@ -185,13 +185,13 @@ void TaskBar::MouseButtonDown( const MouseEvent& rMEvt ) { if ( rMEvt.IsLeft() && (mnWinBits & WB_SIZEABLE) ) { - TaskToolBox* pTempTaskToolBox = GetTaskToolBox(); - TaskStatusBar* pTempStatusBar = GetStatusBar(); + TaskToolBox* pTempTaskToolBox = GetTaskToolBox(); + TaskStatusBar* pTempStatusBar = GetStatusBar(); if ( pTempTaskToolBox && pTempStatusBar ) { - long nStatusX = pTempStatusBar->GetPosPixel().X()-TASKBAR_OFFSIZE-2; - long nMouseX = rMEvt.GetPosPixel().X(); + long nStatusX = pTempStatusBar->GetPosPixel().X()-TASKBAR_OFFSIZE-2; + long nMouseX = rMEvt.GetPosPixel().X(); if ( (nMouseX >= nStatusX-1) && (nMouseX <= nStatusX+3) ) { if ( rMEvt.GetClicks() == 2 ) @@ -248,9 +248,9 @@ void TaskBar::Paint( const Rectangle& rRect ) { if ( mnWinBits & (WB_BORDER | WB_SIZEABLE) ) { - const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); - Size aSize = GetOutputSizePixel(); - long nY = 0; + const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); + Size aSize = GetOutputSizePixel(); + long nY = 0; if ( mnWinBits & WB_BORDER ) { @@ -263,9 +263,9 @@ void TaskBar::Paint( const Rectangle& rRect ) if ( (mnWinBits & WB_SIZEABLE) ) { - //TaskButtonBar* pTempButtonBar = GetButtonBar(); - TaskToolBox* pTempTaskToolBox = GetTaskToolBox(); - TaskStatusBar* pTempStatusBar = GetStatusBar(); + //TaskButtonBar* pTempButtonBar = GetButtonBar(); + TaskToolBox* pTempTaskToolBox = GetTaskToolBox(); + TaskStatusBar* pTempStatusBar = GetStatusBar(); if ( pTempTaskToolBox && pTempStatusBar ) { @@ -292,16 +292,16 @@ void TaskBar::Resize() if ( !IsReallyShown() ) return; - TaskButtonBar* pTempButtonBar = GetButtonBar(); - TaskToolBox* pTempTaskToolBox = GetTaskToolBox(); - TaskStatusBar* pTempStatusBar = GetStatusBar(); - Point aToolPos( TASKBAR_OFFX, 0 ); - Size aSize = GetOutputSizePixel(); - Size aStatusSize; - Size aToolSize( aSize.Width()-(TASKBAR_OFFX*2), 0 ); - long nOldStatusX = -1; - long nNewStatusX = -1; - long nTaskHeight = aSize.Height() - (TASKBAR_OFFY*2); + TaskButtonBar* pTempButtonBar = GetButtonBar(); + TaskToolBox* pTempTaskToolBox = GetTaskToolBox(); + TaskStatusBar* pTempStatusBar = GetStatusBar(); + Point aToolPos( TASKBAR_OFFX, 0 ); + Size aSize = GetOutputSizePixel(); + Size aStatusSize; + Size aToolSize( aSize.Width()-(TASKBAR_OFFX*2), 0 ); + long nOldStatusX = -1; + long nNewStatusX = -1; + long nTaskHeight = aSize.Height() - (TASKBAR_OFFY*2); if ( mnWinBits & WB_BORDER ) { @@ -311,8 +311,8 @@ void TaskBar::Resize() if ( pTempButtonBar ) { - USHORT i = 0; - BOOL bVisibleItems = FALSE; + USHORT i = 0; + BOOL bVisibleItems = FALSE; while ( i < pTempButtonBar->GetItemCount() ) { if ( pTempButtonBar->IsItemVisible( pTempButtonBar->GetItemId( i ) ) ) @@ -532,11 +532,11 @@ void TaskBar::HideStatusText() Size TaskBar::CalcWindowSizePixel() const { - TaskButtonBar* pTempButtonBar = GetButtonBar(); - TaskToolBox* pTempTaskToolBox = GetTaskToolBox(); - TaskStatusBar* pTempStatusBar = GetStatusBar(); - Size aSize; - long nTempHeight; + TaskButtonBar* pTempButtonBar = GetButtonBar(); + TaskToolBox* pTempTaskToolBox = GetTaskToolBox(); + TaskStatusBar* pTempStatusBar = GetStatusBar(); + Size aSize; + long nTempHeight; if ( pTempButtonBar && pTempButtonBar->GetItemCount() ) aSize.Height() = pTempButtonBar->CalcWindowSizePixel().Height()+(TASKBAR_OFFY*2); diff --git a/svtools/source/control/taskbox.cxx b/svtools/source/control/taskbox.cxx index 33c8002e0b46..8fa7434f646f 100644 --- a/svtools/source/control/taskbox.cxx +++ b/svtools/source/control/taskbox.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 diff --git a/svtools/source/control/taskmisc.cxx b/svtools/source/control/taskmisc.cxx index 1e4634a2a1fe..f293ffea556e 100644 --- a/svtools/source/control/taskmisc.cxx +++ b/svtools/source/control/taskmisc.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 @@ -112,30 +112,30 @@ void WindowArrange::ImplTile( const Rectangle& rRect ) return; } - USHORT i; - USHORT j; - USHORT nCols; - USHORT nRows; - USHORT nActRows; - USHORT nOffset; - long nOverWidth; - long nOverHeight; - Window* pWindow; - long nX = rRect.Left(); - long nY = rRect.Top(); - long nWidth = rRect.GetWidth(); - long nHeight = rRect.GetHeight(); - long nRectY = nY; - long nRectWidth = nWidth; - long nRectHeight = nHeight; - long nTempWidth; - long nTempHeight; - - nCols = ImplCeilSqareRoot( nCount ); + USHORT i; + USHORT j; + USHORT nCols; + USHORT nRows; + USHORT nActRows; + USHORT nOffset; + long nOverWidth; + long nOverHeight; + Window* pWindow; + long nX = rRect.Left(); + long nY = rRect.Top(); + long nWidth = rRect.GetWidth(); + long nHeight = rRect.GetHeight(); + long nRectY = nY; + long nRectWidth = nWidth; + long nRectHeight = nHeight; + long nTempWidth; + long nTempHeight; + + nCols = ImplCeilSqareRoot( nCount ); nOffset = (nCols*nCols) - nCount; if ( nOffset >= nCols ) { - nRows = nCols -1; + nRows = nCols -1; nOffset = nOffset - nCols; } else @@ -194,15 +194,15 @@ void WindowArrange::ImplTile( const Rectangle& rRect ) void WindowArrange::ImplHorz( const Rectangle& rRect ) { - long nCount = (long)mpWinList->Count(); - long nX = rRect.Left(); - long nY = rRect.Top(); - long nWidth = rRect.GetWidth(); - long nHeight = rRect.GetHeight(); - long nRectHeight = nHeight; - long nOver; - long nTempHeight; - Window* pWindow; + long nCount = (long)mpWinList->Count(); + long nX = rRect.Left(); + long nY = rRect.Top(); + long nWidth = rRect.GetWidth(); + long nHeight = rRect.GetHeight(); + long nRectHeight = nHeight; + long nOver; + long nTempHeight; + Window* pWindow; nHeight /= nCount; if ( nHeight < 1 ) @@ -228,15 +228,15 @@ void WindowArrange::ImplHorz( const Rectangle& rRect ) void WindowArrange::ImplVert( const Rectangle& rRect ) { - long nCount = (long)mpWinList->Count(); - long nX = rRect.Left(); - long nY = rRect.Top(); - long nWidth = rRect.GetWidth(); - long nHeight = rRect.GetHeight(); - long nRectWidth = nWidth; - long nOver; - long nTempWidth; - Window* pWindow; + long nCount = (long)mpWinList->Count(); + long nX = rRect.Left(); + long nY = rRect.Top(); + long nWidth = rRect.GetWidth(); + long nHeight = rRect.GetHeight(); + long nRectWidth = nWidth; + long nOver; + long nTempWidth; + Window* pWindow; nWidth /= nCount; if ( nWidth < 1 ) @@ -262,29 +262,29 @@ void WindowArrange::ImplVert( const Rectangle& rRect ) void WindowArrange::ImplCascade( const Rectangle& rRect ) { - long nX = rRect.Left(); - long nY = rRect.Top(); - long nWidth = rRect.GetWidth(); - long nHeight = rRect.GetHeight(); - long nRectWidth = nWidth; - long nRectHeight = nHeight; - long nOff; - long nCascadeWins; - sal_Int32 nLeftBorder; - sal_Int32 nTopBorder; - sal_Int32 nRightBorder; - sal_Int32 nBottomBorder; - long nStartOverWidth; - long nStartOverHeight; - long nOverWidth = 0; - long nOverHeight = 0; - long nTempX; - long nTempY; - long nTempWidth; - long nTempHeight; - long i; - Window* pWindow; - Window* pTempWindow; + long nX = rRect.Left(); + long nY = rRect.Top(); + long nWidth = rRect.GetWidth(); + long nHeight = rRect.GetHeight(); + long nRectWidth = nWidth; + long nRectHeight = nHeight; + long nOff; + long nCascadeWins; + sal_Int32 nLeftBorder; + sal_Int32 nTopBorder; + sal_Int32 nRightBorder; + sal_Int32 nBottomBorder; + long nStartOverWidth; + long nStartOverHeight; + long nOverWidth = 0; + long nOverHeight = 0; + long nTempX; + long nTempY; + long nTempWidth; + long nTempHeight; + long i; + Window* pWindow; + Window* pTempWindow; // Border-Fenster suchen um den Versatz zu ermitteln pTempWindow = (Window*)mpWinList->First(); @@ -304,7 +304,7 @@ void WindowArrange::ImplCascade( const Rectangle& rRect ) nCascadeWins = nRectHeight / 3 / nOff; if ( !nCascadeWins ) nCascadeWins = 1; - nWidth -= nCascadeWins*nOff; + nWidth -= nCascadeWins*nOff; nHeight -= nCascadeWins*nOff; if ( nWidth < 1 ) nWidth = 1; diff --git a/svtools/source/control/taskstat.cxx b/svtools/source/control/taskstat.cxx index 60e52ae1c4db..acba171d8ce7 100644 --- a/svtools/source/control/taskstat.cxx +++ b/svtools/source/control/taskstat.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 diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx index b021cde67381..1ac3b9d2c197 100644 --- a/svtools/source/control/toolbarmenu.cxx +++ b/svtools/source/control/toolbarmenu.cxx @@ -98,7 +98,7 @@ ToolbarMenuEntry::ToolbarMenuEntry( ToolbarMenu& rMenu, int nEntryId, const Stri : mrMenu( rMenu ) { init( nEntryId, nBits ); - + maText = rText; mbHasText = true; } @@ -288,7 +288,7 @@ sal_Int32 ToolbarMenu_Impl::getAccessibleChildCount() throw (RuntimeException) } // -------------------------------------------------------------------- - + Reference< XAccessible > ToolbarMenu_Impl::getAccessibleChild( sal_Int32 index ) throw (IndexOutOfBoundsException, RuntimeException) { const int nEntryCount = maEntryVector.size(); @@ -310,7 +310,7 @@ Reference< XAccessible > ToolbarMenu_Impl::getAccessibleChild( sal_Int32 index ) } // -------------------------------------------------------------------- - + Reference< XAccessible > ToolbarMenu_Impl::getAccessibleChild( Control* pControl, sal_Int32 childIndex ) throw (IndexOutOfBoundsException, RuntimeException) { const int nEntryCount = maEntryVector.size(); @@ -691,7 +691,7 @@ Size ToolbarMenu::implCalcSize() if ( aMaxImgSz.Width() ) mpImpl->mnTextPos += std::max( nExtra, 7L ); - if ( bCheckable ) + if ( bCheckable ) mpImpl->mnTextPos += 16; // set heights, calc maximum width @@ -726,7 +726,7 @@ Size ToolbarMenu::implCalcSize() } } - + aSz.Width() = nMaxTextWidth + (BORDER_X<<1); // positionate controls @@ -881,7 +881,7 @@ void ToolbarMenu::implHighlightEntry( int nHighlightEntry, bool bHighlight ) { Size aSz( GetOutputSizePixel() ); long nX = 0, nY = 0; - + const int nEntryCount = mpImpl->maEntryVector.size(); int nEntry; for( nEntry = 0; nEntry < nEntryCount; nEntry++ ) @@ -913,7 +913,7 @@ void ToolbarMenu::implHighlightEntry( int nHighlightEntry, bool bHighlight ) long nFontHeight = GetTextHeight(); aItemRect.Right() -= nFontHeight + nFontHeight/4; } - + if( IsNativeControlSupported( CTRL_MENU_POPUP, PART_ENTIRE_CONTROL ) ) { Size aPxSize( GetOutputSizePixel() ); @@ -1019,7 +1019,7 @@ void ToolbarMenu::implHighlightEntry( const MouseEvent& rMEvt, bool bMBDown ) if ( ( nMouseY >= 0 ) && ( nMouseY < aOutSz.Height() ) ) { bool bHighlighted = FALSE; - + const int nEntryCount = mpImpl->maEntryVector.size(); int nEntry; for( nEntry = 0; nEntry < nEntryCount; nEntry++ ) @@ -1100,7 +1100,7 @@ static bool implCheckSubControlCursorMove( Control* pControl, bool bUp, int& nLa const USHORT nLine = nItemPos / nColCount; nLastColumn = nItemPos - (nLine * nColCount); - + if( bUp ) { return nLine > 0; @@ -1131,7 +1131,7 @@ ToolbarMenuEntry* ToolbarMenu::implCursorUpDown( bool bUp, bool bHomeEnd ) else n = mpImpl->maEntryVector.size()-1; } - else + else { // if we have a currently selected entry and // cursor keys are used than check if this entry @@ -1314,10 +1314,10 @@ static void ImplPaintCheckBackground( Window* i_pWindow, const Rectangle& i_rRec { ImplControlValue aControlValue; ControlState nState = CTRL_STATE_PRESSED | CTRL_STATE_ENABLED; - + aControlValue.setTristateVal( BUTTONVALUE_ON ); - - bNativeOk = i_pWindow->DrawNativeControl( CTRL_TOOLBAR, PART_BUTTON, + + bNativeOk = i_pWindow->DrawNativeControl( CTRL_TOOLBAR, PART_BUTTON, i_rRect, nState, aControlValue, rtl::OUString() ); } @@ -1333,7 +1333,7 @@ static void ImplPaintCheckBackground( Window* i_pWindow, const Rectangle& i_rRec static long ImplGetNativeCheckAndRadioSize( Window* pWin, long& rCheckHeight, long& rRadioHeight, long &rMaxWidth ) { rMaxWidth = rCheckHeight = rRadioHeight = 0; - + ImplControlValue aVal; Rectangle aNativeBounds; Rectangle aNativeContent; @@ -1453,7 +1453,7 @@ void ToolbarMenu::implPaint( ToolbarMenuEntry* pThisOnly, bool bHighlighted ) SetLineColor( rSettings.GetLightColor() ); DrawLine( aRect.TopLeft(), aRect.TopRight() ); SetLineColor( rSettings.GetShadowColor() ); - DrawLine( aRect.BottomLeft(), aRect.BottomRight() ); + DrawLine( aRect.BottomLeft(), aRect.BottomRight() ); } // CheckMark @@ -1475,29 +1475,29 @@ void ToolbarMenu::implPaint( ToolbarMenuEntry* pThisOnly, bool bHighlighted ) ControlPart nPart = ((pEntry->mnBits & MIB_RADIOCHECK) ? PART_MENU_ITEM_RADIO_MARK : PART_MENU_ITEM_CHECK_MARK); - + ControlState nState = 0; - + if ( pEntry->mbChecked ) nState |= CTRL_STATE_PRESSED; - + if ( pEntry->mbEnabled ) nState |= CTRL_STATE_ENABLED; - + if ( bHighlighted ) nState |= CTRL_STATE_SELECTED; - + long nCtrlHeight = (pEntry->mnBits & MIB_RADIOCHECK) ? nCheckHeight : nRadioHeight; aTmpPos.X() = aOuterCheckRect.Left() + (aOuterCheckRect.GetWidth() - nCtrlHeight)/2; aTmpPos.Y() = aOuterCheckRect.Top() + (aOuterCheckRect.GetHeight() - nCtrlHeight)/2; - - Rectangle aCheckRect( aTmpPos, Size( nCtrlHeight, nCtrlHeight ) ); + + Rectangle aCheckRect( aTmpPos, Size( nCtrlHeight, nCtrlHeight ) ); DrawNativeControl( CTRL_MENU_POPUP, nPart, aCheckRect, nState, ImplControlValue(), OUString() ); } else if ( pEntry->mbChecked ) // by default do nothing for unchecked items { ImplPaintCheckBackground( this, aOuterCheckRect, pThisOnly && bHighlighted ); - + SymbolType eSymbol; Size aSymbolSize; if ( pEntry->mnBits & MIB_RADIOCHECK ) @@ -1708,7 +1708,7 @@ void SAL_CALL ToolbarMenu::statusChanged( const ::com::sun::star::frame::Feature class ToolbarMenuStatusListener : public svt::FrameStatusListener { -public: +public: ToolbarMenuStatusListener( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& xServiceManager, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame, ToolbarMenu& rToolbarMenu ); @@ -1721,7 +1721,7 @@ public: // -------------------------------------------------------------------- -ToolbarMenuStatusListener::ToolbarMenuStatusListener( +ToolbarMenuStatusListener::ToolbarMenuStatusListener( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& xServiceManager, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame, ToolbarMenu& rToolbarMenu ) @@ -1791,7 +1791,7 @@ const Link& ToolbarMenu::GetSelectHdl() const // -------------------------------------------------------------------- -Reference< XFrame > ToolbarMenu::GetFrame() const +Reference< XFrame > ToolbarMenu::GetFrame() const { return mpImpl->mxFrame; } diff --git a/svtools/source/control/toolbarmenuacc.cxx b/svtools/source/control/toolbarmenuacc.cxx index 938d14bc854f..efb3f19ae467 100644 --- a/svtools/source/control/toolbarmenuacc.cxx +++ b/svtools/source/control/toolbarmenuacc.cxx @@ -210,7 +210,7 @@ sal_Int32 SAL_CALL ToolbarMenuAcc::getAccessibleIndexInParent() throw (RuntimeEx { const SolarMutexGuard aSolarGuard; ThrowIfDisposed(); - + Window* pParent = mpParent->mrMenu.GetParent(); if( pParent ) { @@ -382,7 +382,7 @@ Reference< XAccessible > SAL_CALL ToolbarMenuAcc::getAccessibleAtPoint( const aw Reference< XAccessible > xRet; const Point aVclPoint( aPoint.X, aPoint.Y ); - + const int nEntryCount = mpParent->maEntryVector.size(); for( int nEntry = 0; (nEntry < nEntryCount) && !xRet.is(); nEntry++ ) { diff --git a/svtools/source/control/toolbarmenuimp.hxx b/svtools/source/control/toolbarmenuimp.hxx index 0df8c8e78045..05bee8b34c8e 100644 --- a/svtools/source/control/toolbarmenuimp.hxx +++ b/svtools/source/control/toolbarmenuimp.hxx @@ -74,7 +74,7 @@ class ToolbarMenuEntry public: ToolbarMenu& mrMenu; - int mnEntryId; + int mnEntryId; MenuItemBits mnBits; Size maSize; @@ -254,8 +254,8 @@ public: virtual sal_Int32 SAL_CALL getBackground( ) throw (::com::sun::star::uno::RuntimeException); private: - EventListenerVector mxEventListeners; - ::osl::Mutex maMutex; + EventListenerVector mxEventListeners; + ::osl::Mutex maMutex; ToolbarMenuEntry* mpParent; /** Tell all listeners that the object is dying. This callback is @@ -271,12 +271,12 @@ struct ToolbarMenu_Impl ToolbarMenu& mrMenu; ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame; - rtl::Reference< svt::FrameStatusListener > mxStatusListener; + rtl::Reference< svt::FrameStatusListener > mxStatusListener; ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxServiceManager; - rtl::Reference< ToolbarMenuAcc > mxAccessible; + rtl::Reference< ToolbarMenuAcc > mxAccessible; ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > mxOldSelection; - ToolbarMenuEntryVector maEntryVector; + ToolbarMenuEntryVector maEntryVector; int mnCheckPos; int mnImagePos; @@ -288,7 +288,7 @@ struct ToolbarMenu_Impl Size maSize; - Link maSelectHdl; + Link maSelectHdl; ToolbarMenu_Impl( ToolbarMenu& rMenu, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame ); ~ToolbarMenu_Impl(); diff --git a/svtools/source/control/urlcontrol.cxx b/svtools/source/control/urlcontrol.cxx index eeb562b2a663..edb4972aeb1d 100644 --- a/svtools/source/control/urlcontrol.cxx +++ b/svtools/source/control/urlcontrol.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 @@ -91,7 +91,7 @@ namespace svt } //......................................................................... -} // namespace svt +} // namespace svt //......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/control/valueacc.cxx b/svtools/source/control/valueacc.cxx index 6187f655ade4..677edd376312 100644 --- a/svtools/source/control/valueacc.cxx +++ b/svtools/source/control/valueacc.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 @@ -1029,13 +1029,13 @@ uno::Reference< accessibility::XAccessibleStateSet > SAL_CALL ValueItemAcc::getA // SELECTABLE pStateSet->AddState( accessibility::AccessibleStateType::SELECTABLE ); - // pStateSet->AddState( accessibility::AccessibleStateType::FOCUSABLE ); + // pStateSet->AddState( accessibility::AccessibleStateType::FOCUSABLE ); // SELECTED if( mpParent->mrParent.GetSelectItemId() == mpParent->mnId ) { pStateSet->AddState( accessibility::AccessibleStateType::SELECTED ); - // pStateSet->AddState( accessibility::AccessibleStateType::FOCUSED ); + // pStateSet->AddState( accessibility::AccessibleStateType::FOCUSED ); } } @@ -1233,7 +1233,7 @@ sal_Int32 SAL_CALL ValueItemAcc::getForeground( ) // ----------------------------------------------------------------------------- -sal_Int32 SAL_CALL ValueItemAcc::getBackground( ) +sal_Int32 SAL_CALL ValueItemAcc::getBackground( ) throw (uno::RuntimeException) { UINT32 nColor; diff --git a/svtools/source/control/valueimp.hxx b/svtools/source/control/valueimp.hxx index 1c2d1812f8ad..47ba7eb476e2 100644 --- a/svtools/source/control/valueimp.hxx +++ b/svtools/source/control/valueimp.hxx @@ -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 @@ -50,15 +50,15 @@ // - Defines - // ----------- -#define ITEM_OFFSET 4 -#define ITEM_OFFSET_DOUBLE 6 -#define NAME_LINE_OFF_X 2 -#define NAME_LINE_OFF_Y 2 -#define NAME_LINE_HEIGHT 2 -#define NAME_OFFSET 2 -#define SCRBAR_OFFSET 1 -#define VALUESET_ITEM_NONEITEM 0xFFFE -#define VALUESET_SCROLL_OFFSET 4 +#define ITEM_OFFSET 4 +#define ITEM_OFFSET_DOUBLE 6 +#define NAME_LINE_OFF_X 2 +#define NAME_LINE_OFF_Y 2 +#define NAME_LINE_HEIGHT 2 +#define NAME_OFFSET 2 +#define SCRBAR_OFFSET 1 +#define VALUESET_ITEM_NONEITEM 0xFFFE +#define VALUESET_SCROLL_OFFSET 4 // -------------------- // - ValueSetItemType - @@ -82,14 +82,14 @@ class ValueSet; struct ValueSetItem { ValueSet& mrParent; - USHORT mnId; - USHORT mnBits; - ValueSetItemType meType; - Image maImage; - Color maColor; - XubString maText; - void* mpData; - Rectangle maRect; + USHORT mnId; + USHORT mnBits; + ValueSetItemType meType; + Image maImage; + Color maColor; + XubString maText; + void* mpData; + Rectangle maRect; ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >* mpxAcc; ValueSetItem( ValueSet& rParent ); @@ -110,7 +110,7 @@ struct ValueSet_Impl { ::std::auto_ptr< ValueItemList > mpItemList; bool mbIsTransientChildrenDisabled; - Link maHighlightHdl; + Link maHighlightHdl; ValueSet_Impl() : mpItemList( ::std::auto_ptr< ValueItemList >( new ValueItemList() ) ), mbIsTransientChildrenDisabled( false ) diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index 97508e00fdc2..594cc3ea7230 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.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 @@ -51,36 +51,36 @@ void ValueSet::ImplInit() { - // Size aWinSize = GetSizePixel(); + // Size aWinSize = GetSizePixel(); mpImpl = new ValueSet_Impl; - mpNoneItem = NULL; - mpScrBar = NULL; - mnTextOffset = 0; - mnVisLines = 0; - mnLines = 0; - mnUserItemWidth = 0; - mnUserItemHeight = 0; - mnFirstLine = 0; - mnOldItemId = 0; - mnSelItemId = 0; - mnHighItemId = 0; - mnDropPos = VALUESET_ITEM_NOTFOUND; - mnCols = 0; - mnCurCol = 0; - mnUserCols = 0; - mnUserVisLines = 0; - mnSpacing = 0; - mnFrameStyle = 0; - mbFormat = TRUE; - mbHighlight = FALSE ; - mbSelection = FALSE; - mbNoSelection = TRUE; - mbDrawSelection = TRUE; - mbBlackSel = FALSE; - mbDoubleSel = FALSE; - mbScroll = FALSE; - mbDropPos = FALSE; - mbFullMode = TRUE; + mpNoneItem = NULL; + mpScrBar = NULL; + mnTextOffset = 0; + mnVisLines = 0; + mnLines = 0; + mnUserItemWidth = 0; + mnUserItemHeight = 0; + mnFirstLine = 0; + mnOldItemId = 0; + mnSelItemId = 0; + mnHighItemId = 0; + mnDropPos = VALUESET_ITEM_NOTFOUND; + mnCols = 0; + mnCurCol = 0; + mnUserCols = 0; + mnUserVisLines = 0; + mnSpacing = 0; + mnFrameStyle = 0; + mbFormat = TRUE; + mbHighlight = FALSE ; + mbSelection = FALSE; + mbNoSelection = TRUE; + mbDrawSelection = TRUE; + mbBlackSel = FALSE; + mbDoubleSel = FALSE; + mbScroll = FALSE; + mbDropPos = FALSE; + mbFullMode = TRUE; // #106446#, #106601# force mirroring of virtual device maVirDev.EnableRTL( GetParent()->IsRTLEnabled() ); @@ -232,10 +232,10 @@ void ValueSet::ImplFormatItem( ValueSetItem* pItem ) { if ( nStyle & WB_DOUBLEBORDER ) { - aRect.Left() += 2; - aRect.Top() += 2; - aRect.Right() -= 2; - aRect.Bottom() -= 2; + aRect.Left() += 2; + aRect.Top() += 2; + aRect.Right() -= 2; + aRect.Bottom() -= 2; } else { @@ -265,8 +265,8 @@ void ValueSet::ImplFormatItem( ValueSetItem* pItem ) maVirDev.SetTextFillColor(); maVirDev.SetFillColor( ( nStyle & WB_MENUSTYLEVALUESET ) ? rStyleSettings.GetMenuColor() : rStyleSettings.GetWindowColor() ); maVirDev.DrawRect( aRect ); - Point aTxtPos( aRect.Left()+2, aRect.Top() ); - long nTxtWidth = GetTextWidth( pItem->maText ); + Point aTxtPos( aRect.Left()+2, aRect.Top() ); + long nTxtWidth = GetTextWidth( pItem->maText ); if ( nStyle & WB_RADIOSEL ) { aTxtPos.X() += 4; @@ -306,9 +306,9 @@ void ValueSet::ImplFormatItem( ValueSetItem* pItem ) } else { - Size aImageSize = pItem->maImage.GetSizePixel(); - Size aRectSize = aRect.GetSize(); - Point aPos( aRect.Left(), aRect.Top() ); + Size aImageSize = pItem->maImage.GetSizePixel(); + Size aRectSize = aRect.GetSize(); + Point aPos( aRect.Left(), aRect.Top() ); aPos.X() += (aRectSize.Width()-aImageSize.Width())/2; aPos.Y() += (aRectSize.Height()-aImageSize.Height())/2; @@ -341,15 +341,15 @@ void ValueSet::ImplFormatItem( ValueSetItem* pItem ) void ValueSet::Format() { - Size aWinSize = GetOutputSizePixel(); + Size aWinSize = GetOutputSizePixel(); ULONG nItemCount = mpImpl->mpItemList->Count(); - WinBits nStyle = GetStyle(); - long nTxtHeight = GetTextHeight(); - long nOff; - long nSpace; - long nNoneHeight; - long nNoneSpace; - ScrollBar* pDelScrBar = NULL; + WinBits nStyle = GetStyle(); + long nTxtHeight = GetTextHeight(); + long nOff; + long nSpace; + long nNoneHeight; + long nNoneSpace; + ScrollBar* pDelScrBar = NULL; // Scrolling beruecksichtigen if ( nStyle & WB_VSCROLL ) @@ -462,7 +462,7 @@ void ValueSet::Format() } // Itemgroessen berechnen - long nColSpace = (mnCols-1)*nSpace; + long nColSpace = (mnCols-1)*nSpace; long nLineSpace = ((mnVisLines-1)*nSpace)+nNoneSpace; long nItemWidth; long nItemHeight; @@ -571,11 +571,11 @@ void ValueSet::Format() if ( !mpNoneItem ) mpNoneItem = new ValueSetItem( *this ); - mpNoneItem->mnId = 0; - mpNoneItem->meType = VALUESETITEM_NONE; - mpNoneItem->maRect.Left() = x; - mpNoneItem->maRect.Top() = y; - mpNoneItem->maRect.Right() = mpNoneItem->maRect.Left()+aWinSize.Width()-x-1; + mpNoneItem->mnId = 0; + mpNoneItem->meType = VALUESETITEM_NONE; + mpNoneItem->maRect.Left() = x; + mpNoneItem->maRect.Top() = y; + mpNoneItem->maRect.Right() = mpNoneItem->maRect.Left()+aWinSize.Width()-x-1; mpNoneItem->maRect.Bottom() = y+nNoneHeight-1; ImplFormatItem( mpNoneItem ); @@ -603,10 +603,10 @@ void ValueSet::Format() { const BOOL bWasEmpty = pItem->maRect.IsEmpty(); - pItem->maRect.Left() = x; - pItem->maRect.Top() = y; - pItem->maRect.Right() = pItem->maRect.Left()+nItemWidth-1; - pItem->maRect.Bottom() = pItem->maRect.Top()+nItemHeight-1; + pItem->maRect.Left() = x; + pItem->maRect.Top() = y; + pItem->maRect.Right() = pItem->maRect.Left()+nItemWidth-1; + pItem->maRect.Bottom() = pItem->maRect.Top()+nItemHeight-1; if( bWasEmpty && ImplHasAccessibleListeners() ) { @@ -643,8 +643,8 @@ void ValueSet::Format() // ScrollBar anordnen, Werte setzen und anzeigen if ( mpScrBar ) { - Point aPos( aWinSize.Width()-nScrBarWidth+SCRBAR_OFFSET, 0 ); - Size aSize( nScrBarWidth-SCRBAR_OFFSET, aWinSize.Height() ); + Point aPos( aWinSize.Width()-nScrBarWidth+SCRBAR_OFFSET, 0 ); + Size aSize( nScrBarWidth-SCRBAR_OFFSET, aWinSize.Height() ); // If a none field is visible, then we center the scrollbar if ( nStyle & WB_NONEFIELD ) { @@ -678,9 +678,9 @@ void ValueSet::ImplDrawItemText( const XubString& rText ) if ( !(GetStyle() & WB_NAMEFIELD) ) return; - Size aWinSize = GetOutputSizePixel(); - long nTxtWidth = GetTextWidth( rText ); - long nTxtOffset = mnTextOffset; + Size aWinSize = GetOutputSizePixel(); + long nTxtWidth = GetTextWidth( rText ); + long nTxtOffset = mnTextOffset; // Rechteck loeschen und Text ausgeben if ( GetStyle() & WB_FLATVALUESET ) @@ -753,8 +753,8 @@ void ValueSet::ImplDrawSelect() continue; // Selection malen - const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); - Rectangle aRect = pItem->maRect; + const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); + Rectangle aRect = pItem->maRect; Control::SetFillColor(); Color aDoubleColor( rStyleSettings.GetHighlightColor() ); @@ -799,10 +799,10 @@ void ValueSet::ImplDrawSelect() } else if ( nStyle & WB_RADIOSEL ) { - aRect.Left() += 3; - aRect.Top() += 3; - aRect.Right() -= 3; - aRect.Bottom() -= 3; + aRect.Left() += 3; + aRect.Top() += 3; + aRect.Right() -= 3; + aRect.Bottom() -= 3; if ( nStyle & WB_DOUBLEBORDER ) { aRect.Left()++; @@ -911,7 +911,7 @@ void ValueSet::ImplHideSelect( USHORT nItemId ) if ( !aRect.IsEmpty() ) { HideFocus(); - Point aPos = aRect.TopLeft(); + Point aPos = aRect.TopLeft(); Size aSize = aRect.GetSize(); DrawOutDev( aPos, aSize, aPos, aSize, maVirDev ); } @@ -944,10 +944,10 @@ void ValueSet::ImplDrawDropPos( BOOL bShow ) { if ( (mnDropPos != VALUESET_ITEM_NOTFOUND) && mpImpl->mpItemList->Count() ) { - USHORT nItemPos = mnDropPos; - USHORT nItemId1; - USHORT nItemId2 = 0; - BOOL bRight; + USHORT nItemPos = mnDropPos; + USHORT nItemId1; + USHORT nItemId2 = 0; + BOOL bRight; if ( nItemPos >= mpImpl->mpItemList->Count() ) { nItemPos = (USHORT)(mpImpl->mpItemList->Count()-1); @@ -985,8 +985,8 @@ void ValueSet::ImplDrawDropPos( BOOL bShow ) if ( bShow ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); - long nX; - long nY; + long nX; + long nY; SetLineColor( rStyleSettings.GetButtonTextColor() ); if ( !aRect1.IsEmpty() ) { @@ -1009,13 +1009,13 @@ void ValueSet::ImplDrawDropPos( BOOL bShow ) { if ( !aRect1.IsEmpty() ) { - Point aPos = aRect1.TopLeft(); + Point aPos = aRect1.TopLeft(); Size aSize = aRect1.GetSize(); DrawOutDev( aPos, aSize, aPos, aSize, maVirDev ); } if ( !aRect2.IsEmpty() ) { - Point aPos = aRect2.TopLeft(); + Point aPos = aRect2.TopLeft(); Size aSize = aRect2.GetSize(); DrawOutDev( aPos, aSize, aPos, aSize, maVirDev ); } @@ -1036,23 +1036,23 @@ void ValueSet::ImplDraw() HideFocus(); - Point aDefPos; - Size aSize = maVirDev.GetOutputSizePixel(); + Point aDefPos; + Size aSize = maVirDev.GetOutputSizePixel(); if ( mpScrBar && mpScrBar->IsVisible() ) { - Point aScrPos = mpScrBar->GetPosPixel(); - Size aScrSize = mpScrBar->GetSizePixel(); - Point aTempPos( 0, aScrPos.Y() ); - Size aTempSize( aSize.Width(), aScrPos.Y() ); + Point aScrPos = mpScrBar->GetPosPixel(); + Size aScrSize = mpScrBar->GetSizePixel(); + Point aTempPos( 0, aScrPos.Y() ); + Size aTempSize( aSize.Width(), aScrPos.Y() ); DrawOutDev( aDefPos, aTempSize, aDefPos, aTempSize, maVirDev ); - aTempSize.Width() = aScrPos.X()-1; - aTempSize.Height() = aScrSize.Height(); + aTempSize.Width() = aScrPos.X()-1; + aTempSize.Height() = aScrSize.Height(); DrawOutDev( aTempPos, aTempSize, aTempPos, aTempSize, maVirDev ); - aTempPos.Y() = aScrPos.Y()+aScrSize.Height(); - aTempSize.Width() = aSize.Width(); - aTempSize.Height() = aSize.Height()-aTempPos.Y(); + aTempPos.Y() = aScrPos.Y()+aScrSize.Height(); + aTempSize.Width() = aSize.Width(); + aTempSize.Height() = aSize.Height()-aTempPos.Y(); DrawOutDev( aTempPos, aTempSize, aTempPos, aTempSize, maVirDev ); } else @@ -1099,8 +1099,8 @@ BOOL ValueSet::ImplScroll( const Point& rPos ) if ( !mbScroll || (rPos.X() < 0) || (rPos.X() > aOutSize.Width()-nScrBarWidth) ) return FALSE; - long nScrollOffset; - USHORT nOldLine = mnFirstLine; + long nScrollOffset; + USHORT nOldLine = mnFirstLine; const Rectangle& rTopRect = mpImpl->mpItemList->GetObject( mnFirstLine*mnCols )->maRect; if ( rTopRect.GetHeight() <= 16 ) nScrollOffset = VALUESET_SCROLL_OFFSET/2; @@ -1140,7 +1140,7 @@ USHORT ValueSet::ImplGetItem( const Point& rPos, BOOL bMove ) const return VALUESET_ITEM_NONEITEM; } - Point aDefPos; + Point aDefPos; Rectangle aWinRect( aDefPos, maVirDev.GetOutputSizePixel() ); ULONG nItemCount = mpImpl->mpItemList->Count(); @@ -1811,9 +1811,9 @@ void ValueSet::InsertItem( USHORT nItemId, const Image& rImage, USHORT nPos ) "ValueSet::InsertItem(): ItemId already exists" ); ValueSetItem* pItem = new ValueSetItem( *this ); - pItem->mnId = nItemId; - pItem->meType = VALUESETITEM_IMAGE; - pItem->maImage = rImage; + pItem->mnId = nItemId; + pItem->meType = VALUESETITEM_IMAGE; + pItem->maImage = rImage; mpImpl->mpItemList->Insert( pItem, (ULONG)nPos ); mbFormat = TRUE; @@ -1830,9 +1830,9 @@ void ValueSet::InsertItem( USHORT nItemId, const Color& rColor, USHORT nPos ) "ValueSet::InsertItem(): ItemId already exists" ); ValueSetItem* pItem = new ValueSetItem( *this ); - pItem->mnId = nItemId; - pItem->meType = VALUESETITEM_COLOR; - pItem->maColor = rColor; + pItem->mnId = nItemId; + pItem->meType = VALUESETITEM_COLOR; + pItem->maColor = rColor; mpImpl->mpItemList->Insert( pItem, (ULONG)nPos ); mbFormat = TRUE; @@ -1850,10 +1850,10 @@ void ValueSet::InsertItem( USHORT nItemId, const Image& rImage, "ValueSet::InsertItem(): ItemId already exists" ); ValueSetItem* pItem = new ValueSetItem( *this ); - pItem->mnId = nItemId; - pItem->meType = VALUESETITEM_IMAGE; - pItem->maImage = rImage; - pItem->maText = rText; + pItem->mnId = nItemId; + pItem->meType = VALUESETITEM_IMAGE; + pItem->maImage = rImage; + pItem->maText = rText; mpImpl->mpItemList->Insert( pItem, (ULONG)nPos ); mbFormat = TRUE; @@ -1871,10 +1871,10 @@ void ValueSet::InsertItem( USHORT nItemId, const Color& rColor, "ValueSet::InsertItem(): ItemId already exists" ); ValueSetItem* pItem = new ValueSetItem( *this ); - pItem->mnId = nItemId; - pItem->meType = VALUESETITEM_COLOR; - pItem->maColor = rColor; - pItem->maText = rText; + pItem->mnId = nItemId; + pItem->meType = VALUESETITEM_COLOR; + pItem->maColor = rColor; + pItem->maText = rText; mpImpl->mpItemList->Insert( pItem, (ULONG)nPos ); mbFormat = TRUE; @@ -1891,8 +1891,8 @@ void ValueSet::InsertItem( USHORT nItemId, USHORT nPos ) "ValueSet::InsertItem(): ItemId already exists" ); ValueSetItem* pItem = new ValueSetItem( *this ); - pItem->mnId = nItemId; - pItem->meType = VALUESETITEM_USERDRAW; + pItem->mnId = nItemId; + pItem->meType = VALUESETITEM_USERDRAW; mpImpl->mpItemList->Insert( pItem, (ULONG)nPos ); mbFormat = TRUE; @@ -1909,8 +1909,8 @@ void ValueSet::InsertSpace( USHORT nItemId, USHORT nPos ) "ValueSet::InsertSpace(): ItemId already exists" ); ValueSetItem* pItem = new ValueSetItem( *this ); - pItem->mnId = nItemId; - pItem->meType = VALUESETITEM_SPACE; + pItem->mnId = nItemId; + pItem->meType = VALUESETITEM_SPACE; mpImpl->mpItemList->Insert( pItem, (ULONG)nPos ); mbFormat = TRUE; @@ -1932,11 +1932,11 @@ void ValueSet::RemoveItem( USHORT nItemId ) // Variablen zuruecksetzen if ( (mnHighItemId == nItemId) || (mnSelItemId == nItemId) ) { - mnCurCol = 0; - mnOldItemId = 0; - mnHighItemId = 0; - mnSelItemId = 0; - mbNoSelection = TRUE; + mnCurCol = 0; + mnOldItemId = 0; + mnHighItemId = 0; + mnSelItemId = 0; + mbNoSelection = TRUE; } mbFormat = TRUE; @@ -1970,12 +1970,12 @@ void ValueSet::CopyItems( const ValueSet& rValueSet ) } // Variablen zuruecksetzen - mnFirstLine = 0; - mnCurCol = 0; - mnOldItemId = 0; - mnHighItemId = 0; - mnSelItemId = 0; - mbNoSelection = TRUE; + mnFirstLine = 0; + mnCurCol = 0; + mnOldItemId = 0; + mnHighItemId = 0; + mnSelItemId = 0; + mbNoSelection = TRUE; mbFormat = TRUE; if ( IsReallyVisible() && IsUpdateMode() ) @@ -1989,12 +1989,12 @@ void ValueSet::Clear() ImplDeleteItems(); // Variablen zuruecksetzen - mnFirstLine = 0; - mnCurCol = 0; - mnOldItemId = 0; - mnHighItemId = 0; - mnSelItemId = 0; - mbNoSelection = TRUE; + mnFirstLine = 0; + mnCurCol = 0; + mnOldItemId = 0; + mnHighItemId = 0; + mnSelItemId = 0; + mbNoSelection = TRUE; mbFormat = TRUE; if ( IsReallyVisible() && IsUpdateMode() ) @@ -2263,9 +2263,9 @@ void ValueSet::SelectItem( USHORT nItemId ) void ValueSet::SetNoSelection() { - mbNoSelection = TRUE; - mbHighlight = FALSE; - mbSelection = FALSE; + mbNoSelection = TRUE; + mbHighlight = FALSE; + mbSelection = FALSE; if ( IsReallyVisible() && IsUpdateMode() ) ImplDraw(); @@ -2456,8 +2456,8 @@ XubString ValueSet::GetItemText( USHORT nItemId ) const void ValueSet::SetColor( const Color& rColor ) { - maColor = rColor; - mbFormat = TRUE; + maColor = rColor; + mbFormat = TRUE; if ( IsReallyVisible() && IsUpdateMode() ) ImplDraw(); } @@ -2480,10 +2480,10 @@ void ValueSet::SetExtraSpacing( USHORT nNewSpacing ) void ValueSet::StartSelection() { - mnOldItemId = mnSelItemId; - mbHighlight = TRUE; - mbSelection = TRUE; - mnHighItemId = mnSelItemId; + mnOldItemId = mnSelItemId; + mbHighlight = TRUE; + mbSelection = TRUE; + mnHighItemId = mnSelItemId; } // ----------------------------------------------------------------------- @@ -2577,11 +2577,11 @@ Size ValueSet::CalcWindowSizePixel( const Size& rItemSize, USHORT nDesireCols, } } - Size aSize( rItemSize.Width()*nCalcCols, rItemSize.Height()*nCalcLines ); - WinBits nStyle = GetStyle(); - long nTxtHeight = GetTextHeight(); - long nSpace; - long n; + Size aSize( rItemSize.Width()*nCalcCols, rItemSize.Height()*nCalcLines ); + WinBits nStyle = GetStyle(); + long nTxtHeight = GetTextHeight(); + long nSpace; + long n; if ( nStyle & WB_ITEMBORDER ) { |