include/svtools/calendar.hxx | 13 svtools/source/control/calendar.cxx | 600 +++++++++++++----------------------- 2 files changed, 232 insertions(+), 381 deletions(-)
New commits: commit 7d890d0482abb8e051144d8177917c21844638c3 Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> Date: Mon May 11 10:49:31 2015 +0900 refactor "Calendar" control to use RenderContext Change-Id: I41aea2e62bb8c034d07825bd4b8776e718cd0920 diff --git a/include/svtools/calendar.hxx b/include/svtools/calendar.hxx index c7f503e..7e57510 100644 --- a/include/svtools/calendar.hxx +++ b/include/svtools/calendar.hxx @@ -232,13 +232,12 @@ private: SVT_DLLPRIVATE void ImplFormat(); using Window::ImplHitTest; SVT_DLLPRIVATE sal_uInt16 ImplHitTest( const Point& rPos, Date& rDate ) const; - SVT_DLLPRIVATE void ImplDrawSpin( bool bDrawPrev = true, bool bDrawNext = true ); - SVT_DLLPRIVATE void ImplDrawDate( long nX, long nY, - sal_uInt16 nDay, sal_uInt16 nMonth, sal_uInt16 nYear, - DayOfWeek eDayOfWeek, - bool bBack = true, bool bOther = false, - sal_uLong nToday = 0 ); - SVT_DLLPRIVATE void ImplDraw( bool bPaint = false ); + SVT_DLLPRIVATE void ImplDrawSpin(vcl::RenderContext& rRenderContext, bool bDrawPrev = true, bool bDrawNext = true); + SVT_DLLPRIVATE void ImplDrawDate(vcl::RenderContext& rRenderContext, long nX, long nY, + sal_uInt16 nDay, sal_uInt16 nMonth, sal_uInt16 nYear, + DayOfWeek eDayOfWeek, bool bBack = true, + bool bOther = false, sal_uLong nToday = 0); + SVT_DLLPRIVATE void ImplDraw(vcl::RenderContext& rRenderContext, bool bPaint = false); SVT_DLLPRIVATE void ImplUpdateDate( const Date& rDate ); SVT_DLLPRIVATE void ImplUpdateSelection( IntDateSet* pOld ); SVT_DLLPRIVATE void ImplMouseSelect( const Date& rDate, sal_uInt16 nHitTest, diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx index 02d2617..647bd11 100644 --- a/svtools/source/control/calendar.cxx +++ b/svtools/source/control/calendar.cxx @@ -603,35 +603,37 @@ sal_uInt16 Calendar::ImplHitTest( const Point& rPos, Date& rDate ) const return 0; } -static void ImplDrawSpinArrow( OutputDevice* pDev, const Rectangle& rRect, - bool bPrev ) -{ - long i; - long n; - long nLines; - long nHeight = rRect.GetHeight(); - long nWidth = rRect.GetWidth(); - if ( nWidth < nHeight ) +namespace +{ + +static void ImplDrawSpinArrow(vcl::RenderContext& rRenderContext, const Rectangle& rRect, bool bPrev) +{ + long i; + long n; + long nLines; + long nHeight = rRect.GetHeight(); + long nWidth = rRect.GetWidth(); + if (nWidth < nHeight) n = nWidth; else n = nHeight; - if ( !(n & 0x01) ) + if (!(n & 0x01)) n--; nLines = n/2; - Rectangle aRect( Point( rRect.Left()+(nWidth/2)-(nLines/2), - rRect.Top()+(nHeight/2) ), - Size( 1, 1 ) ); - if ( !bPrev ) + Rectangle aRect(Point( rRect.Left() + (nWidth / 2) - (nLines / 2), + rRect.Top() + (nHeight / 2) ), + Size(1, 1)); + if (!bPrev) { aRect.Left() += nLines; aRect.Right() += nLines; } - pDev->DrawRect( aRect ); - for ( i = 0; i < nLines; i++ ) + rRenderContext.DrawRect(aRect); + for (i = 0; i < nLines; i++) { - if ( bPrev ) + if (bPrev) { aRect.Left()++; aRect.Right()++; @@ -643,324 +645,332 @@ static void ImplDrawSpinArrow( OutputDevice* pDev, const Rectangle& rRect, } aRect.Top()--; aRect.Bottom()++; - pDev->DrawRect( aRect ); + rRenderContext.DrawRect(aRect); } } -void Calendar::ImplDrawSpin( bool bDrawPrev, bool bDrawNext ) +} //end anonymous namespace + +void Calendar::ImplDrawSpin(vcl::RenderContext& rRenderContext, bool bDrawPrev, bool bDrawNext ) { - if ( !bDrawPrev && !bDrawNext ) + if (!bDrawPrev && !bDrawNext) return; - SetLineColor(); - SetFillColor( GetSettings().GetStyleSettings().GetButtonTextColor() ); - if ( bDrawPrev ) + rRenderContext.SetLineColor(); + rRenderContext.SetFillColor(rRenderContext.GetSettings().GetStyleSettings().GetButtonTextColor()); + if (bDrawPrev) { Rectangle aOutRect = maPrevRect; aOutRect.Left() += 3; aOutRect.Top() += 3; aOutRect.Right() -= 3; aOutRect.Bottom() -= 3; - ImplDrawSpinArrow( this, aOutRect, true ); + ImplDrawSpinArrow(rRenderContext, aOutRect, true); } - if ( bDrawNext ) + if (bDrawNext) { Rectangle aOutRect = maNextRect; aOutRect.Left() += 3; aOutRect.Top() += 3; aOutRect.Right() -= 3; aOutRect.Bottom() -= 3; - ImplDrawSpinArrow( this, aOutRect, false ); + ImplDrawSpinArrow(rRenderContext, aOutRect, false); } } -void Calendar::ImplDrawDate( long nX, long nY, - sal_uInt16 nDay, sal_uInt16 nMonth, sal_uInt16 nYear, - DayOfWeek eDayOfWeek, - bool bBack, bool bOther, sal_uLong nToday ) +void Calendar::ImplDrawDate(vcl::RenderContext& rRenderContext, + long nX, long nY, + sal_uInt16 nDay, sal_uInt16 nMonth, sal_uInt16 nYear, + DayOfWeek eDayOfWeek, + bool bBack, bool bOther, sal_uLong nToday ) { - Color* pTextColor = NULL; - const OUString& rDay = maDayTexts[nDay-1]; - Rectangle aDateRect( nX, nY, nX+mnDayWidth-1, nY+mnDayHeight-1 ); + Color* pTextColor = NULL; + const OUString& rDay = maDayTexts[nDay - 1]; + Rectangle aDateRect(nX, nY, nX + mnDayWidth - 1, nY + mnDayHeight - 1); bool bSel = false; bool bFocus = false; // actual day - if ( (nDay == maCurDate.GetDay()) && - (nMonth == maCurDate.GetMonth()) && - (nYear == maCurDate.GetYear()) ) + if ((nDay == maCurDate.GetDay()) && + (nMonth == maCurDate.GetMonth()) && + (nYear == maCurDate.GetYear())) + { bFocus = true; - if ( mpSelectTable ) + } + if (mpSelectTable) { - if ( mpSelectTable->find( Date( nDay, nMonth, nYear ).GetDate() ) != mpSelectTable->end() ) + if (mpSelectTable->find(Date(nDay, nMonth, nYear).GetDate()) != mpSelectTable->end()) bSel = true; } // get textcolour - if ( bSel ) + if (bSel) pTextColor = &maSelColor; - else if ( bOther ) + else if (bOther) pTextColor = &maOtherColor; else { - if ( eDayOfWeek == SATURDAY ) + if (eDayOfWeek == SATURDAY) pTextColor = mpSaturdayColor; - else if ( eDayOfWeek == SUNDAY ) + else if (eDayOfWeek == SUNDAY) pTextColor = mpSundayColor; - if ( !pTextColor ) + if (!pTextColor) pTextColor = mpStandardColor; } - if ( bFocus ) + if (bFocus) HideFocus(); // display background - const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); - if ( bSel || bBack ) + const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); + if (bSel || bBack) { - if ( bSel ) + if (bSel) { - SetLineColor(); - SetFillColor( rStyleSettings.GetHighlightColor() ); - DrawRect( aDateRect ); + rRenderContext.SetLineColor(); + rRenderContext.SetFillColor(rStyleSettings.GetHighlightColor()); + rRenderContext.DrawRect(aDateRect); } else - Erase( aDateRect ); + rRenderContext.Erase(aDateRect); } // display text - long nTextX = nX+(mnDayWidth-GetTextWidth( rDay ))-(DAY_OFFX/2); - long nTextY = nY+(mnDayHeight-GetTextHeight())/2; - if ( pTextColor ) + long nTextX = nX + (mnDayWidth - GetTextWidth(rDay)) - (DAY_OFFX / 2); + long nTextY = nY + (mnDayHeight - GetTextHeight()) / 2; + if (pTextColor) { - Color aOldColor = GetTextColor(); - SetTextColor( *pTextColor ); - DrawText( Point( nTextX, nTextY ), rDay ); - SetTextColor( aOldColor ); + Color aOldColor = rRenderContext.GetTextColor(); + rRenderContext.SetTextColor(*pTextColor); + rRenderContext.DrawText(Point(nTextX, nTextY), rDay); + rRenderContext.SetTextColor(aOldColor); } else - DrawText( Point( nTextX, nTextY ), rDay ); + rRenderContext.DrawText(Point(nTextX, nTextY), rDay); // today - Date aTodayDate( maCurDate ); - if ( nToday ) - aTodayDate.SetDate( nToday ); + Date aTodayDate(maCurDate); + if (nToday) + aTodayDate.SetDate(nToday); else - aTodayDate = Date( Date::SYSTEM ); - if ( (nDay == aTodayDate.GetDay()) && - (nMonth == aTodayDate.GetMonth()) && - (nYear == aTodayDate.GetYear()) ) + aTodayDate = Date(Date::SYSTEM); + if ((nDay == aTodayDate.GetDay()) && + (nMonth == aTodayDate.GetMonth()) && + (nYear == aTodayDate.GetYear())) { - SetLineColor( rStyleSettings.GetWindowTextColor() ); - SetFillColor(); - DrawRect( aDateRect ); + rRenderContext.SetLineColor(rStyleSettings.GetWindowTextColor()); + rRenderContext.SetFillColor(); + rRenderContext.DrawRect(aDateRect); } // if needed do FocusRect - if ( bFocus && HasFocus() ) - ShowFocus( aDateRect ); + if (bFocus && HasFocus()) + ShowFocus(aDateRect); - if( mbDropPos && maDropDate == Date( nDay, nMonth, nYear ) ) + if (mbDropPos && maDropDate == Date(nDay, nMonth, nYear)) ImplInvertDropPos(); } -void Calendar::ImplDraw( bool bPaint ) +void Calendar::ImplDraw(vcl::RenderContext& rRenderContext, bool bPaint) { ImplFormat(); - const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); - Size aOutSize = GetOutputSizePixel(); - long i; - long j; - long nY; - long nDeltaX; - long nDeltaY; - long nDayX; - long nDayY; - sal_uLong nToday = Date( Date::SYSTEM ).GetDate(); - sal_uInt16 nDay; - sal_uInt16 nMonth; - sal_uInt16 nYear; - Date aDate = GetFirstMonth(); - DayOfWeek eStartDay = ImplGetWeekStart(); + const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); + Size aOutSize = rRenderContext.GetOutputSizePixel(); + long i; + long j; + long nY; + long nDeltaX; + long nDeltaY; + long nDayX; + long nDayY; + sal_uLong nToday = Date(Date::SYSTEM).GetDate(); + sal_uInt16 nDay; + sal_uInt16 nMonth; + sal_uInt16 nYear; + Date aDate = GetFirstMonth(); + DayOfWeek eStartDay = ImplGetWeekStart(); HideFocus(); nY = 0; - for ( i = 0; i < mnLines; i++ ) + for (i = 0; i < mnLines; i++) { // display title bar - SetLineColor(); - SetFillColor( rStyleSettings.GetFaceColor() ); - Rectangle aTitleRect( 0, nY, aOutSize.Width()-1, nY+mnDayHeight-DAY_OFFY+TITLE_BORDERY*2 ); - if ( !bPaint ) + rRenderContext.SetLineColor(); + rRenderContext.SetFillColor(rStyleSettings.GetFaceColor()); + Rectangle aTitleRect(0, nY, aOutSize.Width() - 1, nY + mnDayHeight - DAY_OFFY + TITLE_BORDERY * 2); + if (!bPaint) { - Rectangle aTempRect( 1, aTitleRect.Top()+TITLE_BORDERY, - aOutSize.Width()-2, - aTitleRect.Bottom()-TITLE_BORDERY ); - if ( !i ) + Rectangle aTempRect(1, aTitleRect.Top() + TITLE_BORDERY, + aOutSize.Width() - 2, + aTitleRect.Bottom() - TITLE_BORDERY); + if (!i) { - aTempRect.Left() = maPrevRect.Right()+1; - aTempRect.Right() = maNextRect.Left()-1; + aTempRect.Left() = maPrevRect.Right() + 1; + aTempRect.Right() = maNextRect.Left() - 1; } - DrawRect( aTempRect ); + rRenderContext.DrawRect(aTempRect); } else { - DrawRect( aTitleRect ); - Point aTopLeft1( aTitleRect.Left(), aTitleRect.Top() ); - Point aTopLeft2( aTitleRect.Left(), aTitleRect.Top()+1 ); - Point aBottomRight1( aTitleRect.Right(), aTitleRect.Bottom() ); - Point aBottomRight2( aTitleRect.Right(), aTitleRect.Bottom()-1 ); - SetLineColor( rStyleSettings.GetDarkShadowColor() ); - DrawLine( aTopLeft1, Point( aBottomRight1.X(), aTopLeft1.Y() ) ); - SetLineColor( rStyleSettings.GetLightColor() ); - DrawLine( aTopLeft2, Point( aBottomRight2.X(), aTopLeft2.Y() ) ); - DrawLine( aTopLeft2, Point( aTopLeft2.X(), aBottomRight2.Y() ) ); - SetLineColor( rStyleSettings.GetShadowColor() ); - DrawLine( Point( aTopLeft2.X(), aBottomRight2.Y() ), aBottomRight2 ); - DrawLine( Point( aBottomRight2.X(), aTopLeft2.Y() ), aBottomRight2 ); - SetLineColor( rStyleSettings.GetDarkShadowColor() ); - DrawLine( Point( aTopLeft1.X(), aBottomRight1.Y() ), aBottomRight1 ); + rRenderContext.DrawRect(aTitleRect); + Point aTopLeft1(aTitleRect.Left(), aTitleRect.Top()); + Point aTopLeft2(aTitleRect.Left(), aTitleRect.Top() + 1); + Point aBottomRight1(aTitleRect.Right(), aTitleRect.Bottom()); + Point aBottomRight2(aTitleRect.Right(), aTitleRect.Bottom() - 1); + rRenderContext.SetLineColor(rStyleSettings.GetDarkShadowColor()); + rRenderContext.DrawLine(aTopLeft1, Point(aBottomRight1.X(), aTopLeft1.Y())); + rRenderContext.SetLineColor(rStyleSettings.GetLightColor() ); + rRenderContext.DrawLine(aTopLeft2, Point(aBottomRight2.X(), aTopLeft2.Y())); + rRenderContext.DrawLine(aTopLeft2, Point(aTopLeft2.X(), aBottomRight2.Y())); + rRenderContext.SetLineColor(rStyleSettings.GetShadowColor() ); + rRenderContext.DrawLine(Point(aTopLeft2.X(), aBottomRight2.Y()), aBottomRight2); + rRenderContext.DrawLine(Point(aBottomRight2.X(), aTopLeft2.Y()), aBottomRight2); + rRenderContext.SetLineColor(rStyleSettings.GetDarkShadowColor()); + rRenderContext.DrawLine(Point(aTopLeft1.X(), aBottomRight1.Y()), aBottomRight1); } - Point aSepPos1( 0, aTitleRect.Top()+TITLE_BORDERY ); - Point aSepPos2( 0, aTitleRect.Bottom()-TITLE_BORDERY ); - for ( j = 0; j < mnMonthPerLine-1; j++ ) + Point aSepPos1(0, aTitleRect.Top() + TITLE_BORDERY); + Point aSepPos2(0, aTitleRect.Bottom() - TITLE_BORDERY); + for (j = 0; j < mnMonthPerLine-1; j++) { aSepPos1.X() += mnMonthWidth-1; aSepPos2.X() = aSepPos1.X(); - SetLineColor( rStyleSettings.GetShadowColor() ); - DrawLine( aSepPos1, aSepPos2 ); + rRenderContext.SetLineColor(rStyleSettings.GetShadowColor()); + rRenderContext.DrawLine(aSepPos1, aSepPos2); aSepPos1.X()++; aSepPos2.X() = aSepPos1.X(); - SetLineColor( rStyleSettings.GetLightColor() ); - DrawLine( aSepPos1, aSepPos2 ); + rRenderContext.SetLineColor(rStyleSettings.GetLightColor()); + rRenderContext.DrawLine(aSepPos1, aSepPos2); } long nX = 0; - for ( j = 0; j < mnMonthPerLine; j++ ) + for (j = 0; j < mnMonthPerLine; j++) { nMonth = aDate.GetMonth(); nYear = aDate.GetYear(); // display month in title bar nDeltaX = nX; - nDeltaY = nY+TITLE_BORDERY; - OUString aMonthText( maCalendarWrapper.getDisplayName( - i18n::CalendarDisplayIndex::MONTH, nMonth-1, 1)); + nDeltaY = nY + TITLE_BORDERY; + OUString aMonthText(maCalendarWrapper.getDisplayName(i18n::CalendarDisplayIndex::MONTH, nMonth - 1, 1)); aMonthText += " "; aMonthText += OUString::number(nYear); - long nMonthTextWidth = GetTextWidth( aMonthText ); + long nMonthTextWidth = rRenderContext.GetTextWidth(aMonthText); long nMonthOffX1 = 0; long nMonthOffX2 = 0; - if ( i == 0 ) + if (i == 0) { - if ( j == 0 ) - nMonthOffX1 = maPrevRect.Right()+1; - if ( j == mnMonthPerLine-1 ) - nMonthOffX2 = aOutSize.Width()-maNextRect.Left()+1; + if (j == 0) + nMonthOffX1 = maPrevRect.Right() + 1; + if (j == mnMonthPerLine - 1) + nMonthOffX2 = aOutSize.Width() - maNextRect.Left() + 1; } - long nMaxMonthWidth = mnMonthWidth-nMonthOffX1-nMonthOffX2-4; - if ( nMonthTextWidth > nMaxMonthWidth ) + long nMaxMonthWidth = mnMonthWidth - nMonthOffX1 - nMonthOffX2 - 4; + if (nMonthTextWidth > nMaxMonthWidth) { // Abbreviated month name. - aMonthText = maCalendarWrapper.getDisplayName( - i18n::CalendarDisplayIndex::MONTH, nMonth-1, 0); + aMonthText = maCalendarWrapper.getDisplayName(i18n::CalendarDisplayIndex::MONTH, nMonth - 1, 0); aMonthText += " "; aMonthText += OUString::number(nYear); - nMonthTextWidth = GetTextWidth( aMonthText ); + nMonthTextWidth = rRenderContext.GetTextWidth(aMonthText); } - long nTempOff = (mnMonthWidth-nMonthTextWidth+1)/2; - if ( nTempOff < nMonthOffX1 ) - nDeltaX += nMonthOffX1+1; + long nTempOff = (mnMonthWidth - nMonthTextWidth + 1) / 2; + if (nTempOff < nMonthOffX1) + nDeltaX += nMonthOffX1 + 1; else { - if ( nTempOff+nMonthTextWidth > mnMonthWidth-nMonthOffX2 ) - nDeltaX += mnMonthWidth-nMonthOffX2-nMonthTextWidth; + if (nTempOff + nMonthTextWidth > mnMonthWidth - nMonthOffX2) + nDeltaX += mnMonthWidth - nMonthOffX2 - nMonthTextWidth; else nDeltaX += nTempOff; } - SetTextColor( rStyleSettings.GetButtonTextColor() ); - DrawText( Point( nDeltaX, nDeltaY ), aMonthText ); - SetTextColor( rStyleSettings.GetWindowTextColor() ); + rRenderContext.SetTextColor(rStyleSettings.GetButtonTextColor()); + rRenderContext.DrawText(Point(nDeltaX, nDeltaY), aMonthText); + rRenderContext.SetTextColor(rStyleSettings.GetWindowTextColor()); // display week bar - if ( bPaint ) + if (bPaint) { - nDayX = nX+mnDaysOffX; - nDayY = nY+mnWeekDayOffY; + nDayX = nX + mnDaysOffX; + nDayY = nY + mnWeekDayOffY; nDeltaY = nDayY + mnDayHeight; - SetLineColor( rStyleSettings.GetWindowTextColor() ); - Point aStartPos( nDayX, nDeltaY ); - if ( mnWinStyle & WB_WEEKNUMBER ) - aStartPos.X() -= WEEKNUMBER_OFFX-2; - DrawLine( aStartPos, Point( nDayX+(7*mnDayWidth), nDeltaY ) ); - DrawTextArray( Point( nDayX+mnDayOfWeekAry[0], nDayY ), maDayOfWeekText, &(mnDayOfWeekAry[1]) ); + rRenderContext.SetLineColor(rStyleSettings.GetWindowTextColor()); + Point aStartPos(nDayX, nDeltaY); + if (mnWinStyle & WB_WEEKNUMBER) + aStartPos.X() -= WEEKNUMBER_OFFX - 2; + rRenderContext.DrawLine(aStartPos, Point(nDayX + (7 * mnDayWidth), nDeltaY)); + rRenderContext.DrawTextArray(Point(nDayX + mnDayOfWeekAry[0], nDayY), maDayOfWeekText, &(mnDayOfWeekAry[1])); } // display weeknumbers - if ( mnWinStyle & WB_WEEKNUMBER ) + if (mnWinStyle & WB_WEEKNUMBER) { - nDayX = nX+mnDaysOffX; - nDayY = nY+mnWeekDayOffY; + nDayX = nX + mnDaysOffX; + nDayY = nY + mnWeekDayOffY; nDeltaY = nDayY + mnDayHeight; - long nMonthHeight = mnDayHeight*6; - if ( bPaint ) - DrawLine( Point( nDayX-WEEKNUMBER_OFFX+2, nDeltaY ), Point( nDayX-WEEKNUMBER_OFFX+2, nDeltaY+nMonthHeight ) ); + long nMonthHeight = mnDayHeight * 6; + if (bPaint) + { + rRenderContext.DrawLine(Point(nDayX - WEEKNUMBER_OFFX + 2, nDeltaY), + Point(nDayX - WEEKNUMBER_OFFX + 2, nDeltaY + nMonthHeight)); + } else - Erase( Rectangle( nDayX-mnWeekWidth-WEEKNUMBER_OFFX, nDeltaY, nDayX-WEEKNUMBER_OFFX-1, nDeltaY+nMonthHeight ) ); - - vcl::Font aOldFont = GetFont(); + { + rRenderContext.Erase(Rectangle(nDayX - mnWeekWidth - WEEKNUMBER_OFFX, nDeltaY, + nDayX - WEEKNUMBER_OFFX - 1, nDeltaY + nMonthHeight)); + } + vcl::Font aOldFont = rRenderContext.GetFont(); vcl::Font aTempFont = aOldFont; - ImplGetWeekFont( aTempFont ); - SetFont( aTempFont ); + ImplGetWeekFont(aTempFont); + rRenderContext.SetFont(aTempFont); nDayX -= mnWeekWidth; - nDayY = nY+mnDaysOffY; - maCalendarWrapper.setGregorianDateTime( aDate); - for ( sal_uInt16 nWeekCount = 0; nWeekCount < 6; nWeekCount++ ) + nDayY = nY + mnDaysOffY; + maCalendarWrapper.setGregorianDateTime(aDate); + for (sal_uInt16 nWeekCount = 0; nWeekCount < 6; ++nWeekCount) { - sal_Int32 nWeek = maCalendarWrapper.getValue( i18n::CalendarFieldIndex::WEEK_OF_YEAR); + sal_Int32 nWeek = maCalendarWrapper.getValue(i18n::CalendarFieldIndex::WEEK_OF_YEAR); OUString aWeekText(OUString::number(nWeek)); - long nOffX = (mnWeekWidth-WEEKNUMBER_OFFX)-GetTextWidth( aWeekText ); - long nOffY = (mnDayHeight-GetTextHeight())/2; - DrawText( Point( nDayX+nOffX, nDayY+nOffY ), aWeekText ); + long nOffX = (mnWeekWidth - WEEKNUMBER_OFFX) - rRenderContext.GetTextWidth(aWeekText); + long nOffY = (mnDayHeight - GetTextHeight()) / 2; + rRenderContext.DrawText(Point(nDayX + nOffX, nDayY + nOffY), aWeekText); nDayY += mnDayHeight; - maCalendarWrapper.addValue( i18n::CalendarFieldIndex::DAY_OF_MONTH, 7); + maCalendarWrapper.addValue(i18n::CalendarFieldIndex::DAY_OF_MONTH, 7); } - SetFont( aOldFont ); + rRenderContext.SetFont(aOldFont); } // display days sal_uInt16 nDaysInMonth = aDate.GetDaysInMonth(); - nDayX = nX+mnDaysOffX; - nDayY = nY+mnDaysOffY; - if ( !bPaint ) + nDayX = nX + mnDaysOffX; + nDayY = nY + mnDaysOffY; + if (!bPaint) { - Rectangle aClearRect( nDayX, nDayY, - nDayX+(7*mnDayWidth)-1, nDayY+(6*mnDayHeight)-1 ); - Erase( aClearRect ); + Rectangle aClearRect(nDayX, nDayY, + nDayX + (7 * mnDayWidth) - 1, nDayY + (6 * mnDayHeight) - 1); + rRenderContext.Erase(aClearRect); } - sal_uInt16 nDayIndex = (sal_uInt16)aDate.GetDayOfWeek(); - nDayIndex = (nDayIndex+(7-(sal_uInt16)eStartDay)) % 7; - if ( (i == 0) && (j == 0) ) + sal_uInt16 nDayIndex = (sal_uInt16) aDate.GetDayOfWeek(); + nDayIndex = (nDayIndex + (7 - (sal_uInt16)eStartDay)) % 7; + if (i == 0 && j == 0) { Date aTempDate = aDate; aTempDate -= nDayIndex; - for ( nDay = 0; nDay < nDayIndex; nDay++ ) + for (nDay = 0; nDay < nDayIndex; ++nDay) { - nDeltaX = nDayX + (nDay*mnDayWidth); - ImplDrawDate( nDeltaX, nDayY, nDay+aTempDate.GetDay(), - aTempDate.GetMonth(), aTempDate.GetYear(), - (DayOfWeek)((nDay+(sal_uInt16)eStartDay)%7), false, true, nToday ); + nDeltaX = nDayX + (nDay * mnDayWidth); + ImplDrawDate(rRenderContext, nDeltaX, nDayY, nDay + aTempDate.GetDay(), + aTempDate.GetMonth(), aTempDate.GetYear(), + (DayOfWeek)((nDay + (sal_uInt16)eStartDay) % 7), false, true, nToday); } } - for ( nDay = 1; nDay <= nDaysInMonth; nDay++ ) + for (nDay = 1; nDay <= nDaysInMonth; nDay++) { - nDeltaX = nDayX + (nDayIndex*mnDayWidth); - ImplDrawDate( nDeltaX, nDayY, nDay, nMonth, nYear, - (DayOfWeek)((nDayIndex+(sal_uInt16)eStartDay)%7), - false, false, nToday ); - if ( nDayIndex == 6 ) + nDeltaX = nDayX + (nDayIndex * mnDayWidth); + ImplDrawDate(rRenderContext, nDeltaX, nDayY, nDay, nMonth, nYear, + (DayOfWeek)((nDayIndex + (sal_uInt16)eStartDay) % 7), + false, false, nToday); + if (nDayIndex == 6) { nDayIndex = 0; nDayY += mnDayHeight; @@ -968,21 +978,21 @@ void Calendar::ImplDraw( bool bPaint ) else nDayIndex++; } - if ( (i == mnLines-1) && (j == mnMonthPerLine-1) ) + if ((i == mnLines - 1) && (j == mnMonthPerLine - 1)) { sal_uInt16 nWeekDay = (sal_uInt16)aDate.GetDayOfWeek(); - nWeekDay = (nWeekDay+(7-(sal_uInt16)eStartDay)) % 7; - sal_uInt16 nDayCount = 42-nDaysInMonth-nWeekDay; + nWeekDay = (nWeekDay + (7 - (sal_uInt16)eStartDay)) % 7; + sal_uInt16 nDayCount = 42 - nDaysInMonth - nWeekDay; Date aTempDate = aDate; aTempDate += nDaysInMonth; - for ( nDay = 1; nDay <= nDayCount; nDay++ ) + for (nDay = 1; nDay <= nDayCount; ++nDay) { - nDeltaX = nDayX + (nDayIndex*mnDayWidth); - ImplDrawDate( nDeltaX, nDayY, nDay, - aTempDate.GetMonth(), aTempDate.GetYear(), - (DayOfWeek)((nDayIndex+(sal_uInt16)eStartDay)%7), - false, true, nToday ); - if ( nDayIndex == 6 ) + nDeltaX = nDayX + (nDayIndex * mnDayWidth); + ImplDrawDate(rRenderContext, nDeltaX, nDayY, nDay, + aTempDate.GetMonth(), aTempDate.GetYear(), + (DayOfWeek)((nDayIndex + (sal_uInt16)eStartDay) % 7), + false, true, nToday); + if (nDayIndex == 6) { nDayIndex = 0; nDayY += mnDayHeight; @@ -1000,21 +1010,18 @@ void Calendar::ImplDraw( bool bPaint ) } // draw spin buttons - if ( bPaint ) - ImplDrawSpin(); + if (bPaint) + ImplDrawSpin(rRenderContext); } void Calendar::ImplUpdateDate( const Date& rDate ) { - if ( IsReallyVisible() && IsUpdateMode() ) + if (IsReallyVisible() && IsUpdateMode()) { - Rectangle aDateRect( GetDateRect( rDate ) ); - if ( !aDateRect.IsEmpty() ) + Rectangle aDateRect(GetDateRect(rDate)); + if (!aDateRect.IsEmpty()) { - bool bOther = (rDate < GetFirstMonth()) || (rDate > GetLastMonth()); - ImplDrawDate( aDateRect.Left(), aDateRect.Top(), - rDate.GetDay(), rDate.GetMonth(), rDate.GetYear(), - rDate.GetDayOfWeek(), true, bOther ); + Invalidate(aDateRect); } } } @@ -1156,24 +1163,19 @@ void Calendar::ImplMouseSelect( const Date& rDate, sal_uInt16 nHitTest, void Calendar::ImplUpdate( bool bCalcNew ) { - if ( IsReallyVisible() && IsUpdateMode() ) + if (IsReallyVisible() && IsUpdateMode()) { - if ( bCalcNew && !mbCalc ) + if (bCalcNew && !mbCalc) + { Invalidate(); - else if ( !mbFormat && !mbCalc ) + } + else if (!mbFormat && !mbCalc) { - if ( mbDirect ) - { - mbFormat = true; - ImplDraw( false ); - return; - } - else - Invalidate(); + Invalidate(); } } - if ( bCalcNew ) + if (bCalcNew) mbCalc = true; mbFormat = true; } @@ -1564,9 +1566,9 @@ void Calendar::KeyInput( const KeyEvent& rKEvt ) } } -void Calendar::Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& ) +void Calendar::Paint( vcl::RenderContext& rRenderContext, const Rectangle& ) { - ImplDraw( true ); + ImplDraw(rRenderContext, true); } void Calendar::GetFocus() commit 279c665ac1ecb60cb1450691ce3449590041b307 Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> Date: Mon May 11 10:13:43 2015 +0900 remove whitespace Change-Id: I70ee031eb55d10aa47e24714b839f5eb4d9a3109 diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx index b435f90..02d2617 100644 --- a/svtools/source/control/calendar.cxx +++ b/svtools/source/control/calendar.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include <rtl/strbuf.hxx> #include <vcl/svapp.hxx> #include <vcl/help.hxx> @@ -39,7 +38,6 @@ #include <svtools/calendar.hxx> #include <boost/scoped_ptr.hpp> - #define DAY_OFFX 4 #define DAY_OFFY 2 #define MONTH_BORDERX 4 @@ -62,8 +60,6 @@ using namespace ::com::sun::star; - - static void ImplCalendarSelectDate( IntDateSet* pTable, const Date& rDate, bool bSelect ) { if ( bSelect ) @@ -72,8 +68,6 @@ static void ImplCalendarSelectDate( IntDateSet* pTable, const Date& rDate, bool pTable->erase( rDate.GetDate() ); } - - static void ImplCalendarSelectDateRange( IntDateSet* pTable, const Date& rStartDate, const Date& rEndDate, @@ -112,8 +106,6 @@ static void ImplCalendarSelectDateRange( IntDateSet* pTable, } } - - static void ImplCalendarUnSelectDateRange( IntDateSet* pTable, IntDateSet* pOldTable, const Date& rStartDate, @@ -150,15 +142,11 @@ static void ImplCalendarUnSelectDateRange( IntDateSet* pTable, } } - - inline void ImplCalendarClearSelectDate( IntDateSet* pTable ) { pTable->clear(); } - - void Calendar::ImplInit( WinBits nWinStyle ) { mpSelectTable = new IntDateSet; @@ -225,8 +213,6 @@ void Calendar::ImplInit( WinBits nWinStyle ) ImplInitSettings(); } - - void Calendar::ImplInitSettings() { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); @@ -236,8 +222,6 @@ void Calendar::ImplInitSettings() SetBackground( Wallpaper( rStyleSettings.GetFieldColor() ) ); } - - Calendar::Calendar( vcl::Window* pParent, WinBits nWinStyle ) : Control( pParent, nWinStyle & (WB_TABSTOP | WB_GROUP | WB_BORDER | WB_3DLOOK | WB_RANGESELECT | WB_MULTISELECT) ), maCalendarWrapper( Application::GetAppLocaleDataWrapper().getComponentContext() ), @@ -253,8 +237,6 @@ Calendar::Calendar( vcl::Window* pParent, WinBits nWinStyle ) : ImplInit( nWinStyle ); } - - Calendar::~Calendar() { disposeOnce(); @@ -272,8 +254,6 @@ void Calendar::dispose() Control::dispose(); } - - DayOfWeek Calendar::ImplGetWeekStart() const { // Map i18n::Weekdays to Date DayOfWeek @@ -309,8 +289,6 @@ DayOfWeek Calendar::ImplGetWeekStart() const return eDay; } - - void Calendar::ImplGetWeekFont( vcl::Font& rFont ) const { // weeknumber is displayed in WEEKNUMBER_HEIGHT%-Fontheight @@ -321,8 +299,6 @@ void Calendar::ImplGetWeekFont( vcl::Font& rFont ) const rFont.SetWeight( WEIGHT_NORMAL ); } - - void Calendar::ImplFormat() { if ( !mbFormat ) @@ -500,8 +476,6 @@ void Calendar::ImplFormat() mbFormat = false; } - - sal_uInt16 Calendar::ImplHitTest( const Point& rPos, Date& rDate ) const { if ( mbFormat ) @@ -629,8 +603,6 @@ sal_uInt16 Calendar::ImplHitTest( const Point& rPos, Date& rDate ) const return 0; } - - static void ImplDrawSpinArrow( OutputDevice* pDev, const Rectangle& rRect, bool bPrev ) { @@ -675,8 +647,6 @@ static void ImplDrawSpinArrow( OutputDevice* pDev, const Rectangle& rRect, } } - - void Calendar::ImplDrawSpin( bool bDrawPrev, bool bDrawNext ) { if ( !bDrawPrev && !bDrawNext ) @@ -704,8 +674,6 @@ void Calendar::ImplDrawSpin( bool bDrawPrev, bool bDrawNext ) } } - - void Calendar::ImplDrawDate( long nX, long nY, sal_uInt16 nDay, sal_uInt16 nMonth, sal_uInt16 nYear, DayOfWeek eDayOfWeek, @@ -796,8 +764,6 @@ void Calendar::ImplDrawDate( long nX, long nY, ImplInvertDropPos(); } - - void Calendar::ImplDraw( bool bPaint ) { ImplFormat(); @@ -1038,8 +1004,6 @@ void Calendar::ImplDraw( bool bPaint ) ImplDrawSpin(); } - - void Calendar::ImplUpdateDate( const Date& rDate ) { if ( IsReallyVisible() && IsUpdateMode() ) @@ -1055,8 +1019,6 @@ void Calendar::ImplUpdateDate( const Date& rDate ) } } - - void Calendar::ImplUpdateSelection( IntDateSet* pOld ) { IntDateSet* pNew = mpSelectTable; @@ -1082,8 +1044,6 @@ void Calendar::ImplUpdateSelection( IntDateSet* pOld ) } } - - void Calendar::ImplMouseSelect( const Date& rDate, sal_uInt16 nHitTest, bool bMove, bool bExpand, bool bExtended ) { @@ -1194,8 +1154,6 @@ void Calendar::ImplMouseSelect( const Date& rDate, sal_uInt16 nHitTest, } } - - void Calendar::ImplUpdate( bool bCalcNew ) { if ( IsReallyVisible() && IsUpdateMode() ) @@ -1220,8 +1178,6 @@ void Calendar::ImplUpdate( bool bCalcNew ) mbFormat = true; } - - void Calendar::ImplInvertDropPos() { Rectangle aRect = GetDateRect( maDropDate );//this is one Pixel to width and one to heigh @@ -1230,8 +1186,6 @@ void Calendar::ImplInvertDropPos() Invert( aRect ); } - - void Calendar::ImplScroll( bool bPrev ) { Date aNewFirstMonth = GetFirstMonth(); @@ -1247,8 +1201,6 @@ void Calendar::ImplScroll( bool bPrev ) mbDirect = false; } - - void Calendar::ImplShowMenu( const Point& rPos, const Date& rDate ) { EndSelection(); @@ -1312,8 +1264,6 @@ void Calendar::ImplShowMenu( const Point& rPos, const Date& rDate ) } } - - void Calendar::ImplTracking( const Point& rPos, bool bRepeat ) { Date aTempDate = maCurDate; @@ -1335,8 +1285,6 @@ void Calendar::ImplTracking( const Point& rPos, bool bRepeat ) ImplMouseSelect( aTempDate, nHitTest, true, false, false ); } - - void Calendar::ImplEndTracking( bool bCancel ) { bool bSelection = mbSelection; @@ -1402,8 +1350,6 @@ void Calendar::ImplEndTracking( bool bCancel ) } } - - IMPL_LINK_NOARG_TYPED( Calendar, ScrollHdl, Timer*, void ) { bool bPrevIn = (mnDragScrollHitTest & CALENDAR_HITTEST_PREV) != 0; @@ -1416,8 +1362,6 @@ IMPL_LINK_NOARG_TYPED( Calendar, ScrollHdl, Timer*, void ) } } - - void Calendar::MouseButtonDown( const MouseEvent& rMEvt ) { if ( rMEvt.IsLeft() && !mbMenuDown ) @@ -1479,8 +1423,6 @@ void Calendar::MouseButtonDown( const MouseEvent& rMEvt ) Control::MouseButtonDown( rMEvt ); } - - void Calendar::MouseButtonUp( const MouseEvent& rMEvt ) { if ( rMEvt.IsLeft() && mbSelection ) @@ -1489,8 +1431,6 @@ void Calendar::MouseButtonUp( const MouseEvent& rMEvt ) Control::MouseButtonUp( rMEvt ); } - - void Calendar::MouseMove( const MouseEvent& rMEvt ) { if ( mbSelection && rMEvt.GetButtons() ) @@ -1499,8 +1439,6 @@ void Calendar::MouseMove( const MouseEvent& rMEvt ) Control::MouseMove( rMEvt ); } - - void Calendar::Tracking( const TrackingEvent& rTEvt ) { Point aMousePos = rTEvt.GetMouseEvent().GetPosPixel(); @@ -1511,8 +1449,6 @@ void Calendar::Tracking( const TrackingEvent& rTEvt ) ImplTracking( aMousePos, rTEvt.IsTrackingRepeat() ); } - - void Calendar::KeyInput( const KeyEvent& rKEvt ) { Date aNewDate = maCurDate; @@ -1628,39 +1564,29 @@ void Calendar::KeyInput( const KeyEvent& rKEvt ) } } - - void Calendar::Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& ) { ImplDraw( true ); } - - void Calendar::GetFocus() { ImplUpdateDate( maCurDate ); Control::GetFocus(); } - - void Calendar::LoseFocus() { HideFocus(); Control::LoseFocus(); } - - void Calendar::Resize() { ImplUpdate( true ); Control::Resize(); } - - void Calendar::RequestHelp( const HelpEvent& rHEvt ) { if ( rHEvt.GetMode() & (HelpEventMode::QUICK | HelpEventMode::BALLOON) ) @@ -1708,8 +1634,6 @@ void Calendar::RequestHelp( const HelpEvent& rHEvt ) Control::RequestHelp( rHEvt ); } - - void Calendar::Command( const CommandEvent& rCEvt ) { if ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU ) @@ -1755,8 +1679,6 @@ void Calendar::Command( const CommandEvent& rCEvt ) Control::Command( rCEvt ); } - - void Calendar::StateChanged( StateChangedType nType ) { Control::StateChanged( nType ); @@ -1765,8 +1687,6 @@ void Calendar::StateChanged( StateChangedType nType ) ImplFormat(); } - - void Calendar::DataChanged( const DataChangedEvent& rDCEvt ) { Control::DataChanged( rDCEvt ); @@ -1781,43 +1701,31 @@ void Calendar::DataChanged( const DataChangedEvent& rDCEvt ) } } - - void Calendar::SelectionChanging() { maSelectionChangingHdl.Call( this ); } - - void Calendar::DateRangeChanged() { maDateRangeChangedHdl.Call( this ); } - - void Calendar::RequestDateInfo() { maRequestDateInfoHdl.Call( this ); } - - void Calendar::DoubleClick() { maDoubleClickHdl.Call( this ); } - - void Calendar::Select() { maSelectHdl.Call( this ); } - - void Calendar::SelectDate( const Date& rDate, bool bSelect ) { if ( !rDate.IsValidAndGregorian() ) @@ -1834,8 +1742,6 @@ void Calendar::SelectDate( const Date& rDate, bool bSelect ) ImplUpdateSelection( pOldSel.get() ); } - - void Calendar::SetNoSelection() { boost::scoped_ptr<IntDateSet> pOldSel; @@ -1849,15 +1755,11 @@ void Calendar::SetNoSelection() ImplUpdateSelection( pOldSel.get() ); } - - bool Calendar::IsDateSelected( const Date& rDate ) const { return mpSelectTable->find( rDate.GetDate() ) != mpSelectTable->end(); } - - Date Calendar::GetFirstSelectedDate() const { if ( !mpSelectTable->empty() ) @@ -1869,8 +1771,6 @@ Date Calendar::GetFirstSelectedDate() const } } - - void Calendar::SetCurDate( const Date& rNewDate ) { if ( !rNewDate.IsValidAndGregorian() ) @@ -1927,8 +1827,6 @@ void Calendar::SetCurDate( const Date& rNewDate ) } } - - void Calendar::SetFirstDate( const Date& rNewFirstDate ) { if ( maFirstDate != rNewFirstDate ) @@ -1939,8 +1837,6 @@ void Calendar::SetFirstDate( const Date& rNewFirstDate ) } } - - Date Calendar::GetFirstMonth() const { if ( maFirstDate.GetDay() > 1 ) @@ -1954,8 +1850,6 @@ Date Calendar::GetFirstMonth() const return maFirstDate; } - - Date Calendar::GetLastMonth() const { Date aDate = GetFirstMonth(); @@ -1966,8 +1860,6 @@ Date Calendar::GetLastMonth() const return aDate; } - - sal_uInt16 Calendar::GetMonthCount() const { if ( mbFormat ) @@ -1976,8 +1868,6 @@ sal_uInt16 Calendar::GetMonthCount() const return (sal_uInt16)(mnMonthPerLine*mnLines); } - - bool Calendar::GetDate( const Point& rPos, Date& rDate ) const { Date aDate = maCurDate; @@ -1991,8 +1881,6 @@ bool Calendar::GetDate( const Point& rPos, Date& rDate ) const return false; } - - Rectangle Calendar::GetDateRect( const Date& rDate ) const { Rectangle aRect; @@ -2093,8 +1981,6 @@ Rectangle Calendar::GetDateRect( const Date& rDate ) const return aRect; } - - void Calendar::StartSelection() { if ( mpOldSelectTable ) @@ -2105,8 +1991,6 @@ void Calendar::StartSelection() mbSelection = true; } - - void Calendar::EndSelection() { if ( mbDrag || mbSpinDown || mbSelection ) @@ -2123,8 +2007,6 @@ void Calendar::EndSelection() } } - - Size Calendar::CalcWindowSizePixel( long nCalcMonthPerLine, long nCalcLines ) const { @@ -2174,8 +2056,6 @@ Size Calendar::CalcWindowSizePixel( long nCalcMonthPerLine, return aSize; } - - #define CALFIELD_EXTRA_BUTTON_WIDTH 14 #define CALFIELD_EXTRA_BUTTON_HEIGHT 8 #define CALFIELD_SEP_X 6 @@ -2183,8 +2063,6 @@ Size Calendar::CalcWindowSizePixel( long nCalcMonthPerLine, #define CALFIELD_BORDER_YTOP 4 #define CALFIELD_BORDER_Y 5 - - class ImplCFieldFloatWin : public FloatingWindow { private: @@ -2208,8 +2086,6 @@ public: virtual bool Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE; }; - - ImplCFieldFloatWin::ImplCFieldFloatWin( vcl::Window* pParent ) : FloatingWindow( pParent, WB_BORDER | WB_SYSTEMWINDOW | WB_NOSHADOW ) { @@ -2219,8 +2095,6 @@ ImplCFieldFloatWin::ImplCFieldFloatWin( vcl::Window* pParent ) : mpFixedLine = NULL; } - - ImplCFieldFloatWin::~ImplCFieldFloatWin() { disposeOnce(); @@ -2235,8 +2109,6 @@ void ImplCFieldFloatWin::dispose() FloatingWindow::dispose(); } - - PushButton* ImplCFieldFloatWin::EnableTodayBtn( bool bEnable ) { if ( bEnable ) @@ -2263,8 +2135,6 @@ PushButton* ImplCFieldFloatWin::EnableTodayBtn( bool bEnable ) return mpTodayBtn; } - - PushButton* ImplCFieldFloatWin::EnableNoneBtn( bool bEnable ) { if ( bEnable ) @@ -2291,8 +2161,6 @@ PushButton* ImplCFieldFloatWin::EnableNoneBtn( bool bEnable ) return mpNoneBtn; } - - void ImplCFieldFloatWin::ArrangeButtons() { long nBtnHeight = 0; @@ -2353,8 +2221,6 @@ void ImplCFieldFloatWin::ArrangeButtons() } } - - bool ImplCFieldFloatWin::Notify( NotifyEvent& rNEvt ) { if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) @@ -2394,8 +2260,6 @@ void CalendarField::dispose() DateField::dispose(); } - - IMPL_LINK( CalendarField, ImplSelectHdl, Calendar*, pCalendar ) { if ( !pCalendar->IsTravelSelect() ) @@ -2415,8 +2279,6 @@ IMPL_LINK( CalendarField, ImplSelectHdl, Calendar*, pCalendar ) return 0; } - - IMPL_LINK( CalendarField, ImplClickHdl, PushButton*, pBtn ) { mpFloatWin->EndPopupMode(); @@ -2447,8 +2309,6 @@ IMPL_LINK( CalendarField, ImplClickHdl, PushButton*, pBtn ) return 0; } - - IMPL_LINK_NOARG(CalendarField, ImplPopupModeEndHdl) { EndDropDown(); @@ -2457,15 +2317,11 @@ IMPL_LINK_NOARG(CalendarField, ImplPopupModeEndHdl) return 0; } - - void CalendarField::Select() { maSelectHdl.Call( this ); } - - bool CalendarField::ShowDropDown( bool bShow ) { if ( bShow ) @@ -2514,15 +2370,11 @@ bool CalendarField::ShowDropDown( bool bShow ) return true; } - - VclPtr<Calendar> CalendarField::CreateCalendar( vcl::Window* pParent ) { return VclPtr<Calendar>::Create( pParent, mnCalendarStyle | WB_TABSTOP ); } - - Calendar* CalendarField::GetCalendar() { if ( !mpFloatWin ) @@ -2537,8 +2389,6 @@ Calendar* CalendarField::GetCalendar() return mpCalendar; } - - void CalendarField::StateChanged( StateChangedType nStateChange ) { DateField::StateChanged( nStateChange );
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits