sc/source/core/data/conditio.cxx | 36 +++++++++++++++---------- sc/source/ui/condformat/condformatdlgentry.cxx | 4 ++ sc/source/ui/condformat/condformathelper.cxx | 4 ++ sc/source/ui/inc/condformatdlg.hxx | 2 - tools/inc/tools/date.hxx | 2 - tools/source/datetime/tdate.cxx | 2 - 6 files changed, 32 insertions(+), 18 deletions(-)
New commits: commit f3df19b23d80a23e8f42cf766499b1a23ecfe923 Author: Markus Mohrhard <[email protected]> Date: Mon Dec 17 23:53:38 2012 +0100 first check that the number of cells has not been reached yet, fdo#58346 Change-Id: I0fea5719f524584acdbbc560c47b3c427c174845 diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx index 2b4fa0c..2b58f33 100644 --- a/sc/source/core/data/conditio.cxx +++ b/sc/source/core/data/conditio.cxx @@ -865,10 +865,10 @@ bool ScConditionEntry::IsTopNElement( double nArg ) const for(ScConditionEntryCache::ValueCacheType::const_reverse_iterator itr = mpCache->maValues.rbegin(), itrEnd = mpCache->maValues.rend(); itr != itrEnd; ++itr) { - if(itr->first <= nArg) - return true; if(nCells >= nVal1) return false; + if(itr->first <= nArg) + return true; nCells += itr->second; } @@ -886,10 +886,10 @@ bool ScConditionEntry::IsBottomNElement( double nArg ) const for(ScConditionEntryCache::ValueCacheType::const_iterator itr = mpCache->maValues.begin(), itrEnd = mpCache->maValues.end(); itr != itrEnd; ++itr) { - if(itr->first >= nArg) - return true; if(nCells >= nVal1) return false; + if(itr->first >= nArg) + return true; nCells += itr->second; } @@ -905,10 +905,10 @@ bool ScConditionEntry::IsTopNPercent( double nArg ) const for(ScConditionEntryCache::ValueCacheType::const_reverse_iterator itr = mpCache->maValues.rbegin(), itrEnd = mpCache->maValues.rend(); itr != itrEnd; ++itr) { - if(itr->first <= nArg) - return true; if(nCells >= nLimitCells) return false; + if(itr->first <= nArg) + return true; nCells += itr->second; } @@ -924,10 +924,10 @@ bool ScConditionEntry::IsBottomNPercent( double nArg ) const for(ScConditionEntryCache::ValueCacheType::const_iterator itr = mpCache->maValues.begin(), itrEnd = mpCache->maValues.end(); itr != itrEnd; ++itr) { - if(itr->first >= nArg) - return true; if(nCells >= nLimitCells) return false; + if(itr->first >= nArg) + return true; nCells += itr->second; } commit 92a8be9fb4877d43e099c99d067bd3f06397d212 Author: Markus Mohrhard <[email protected]> Date: Mon Dec 17 22:58:26 2012 +0100 UI does not update correctly for icon sets, fdo#58308 Change-Id: Iceeab1ea3624fbefa8cb626899262e857b445ac1 diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx index 36b8ddb..3fc1612 100644 --- a/sc/source/ui/condformat/condformatdlgentry.cxx +++ b/sc/source/ui/condformat/condformatdlgentry.cxx @@ -1354,9 +1354,13 @@ IMPL_LINK_NOARG( ScIconSetFrmtEntry, IconSetTypeHdl ) Point aPos = maEntries[0].GetPosPixel(); aPos.Y() += maEntries[0].GetSizePixel().Height() * i * 1.2; maEntries[i].SetPosPixel( aPos ); + maEntries[i].Show(); } maEntries.back().SetLastEntry(); + SetHeight(); + static_cast<ScCondFormatList*>(GetParent())->RecalcAll(); + return 0; } diff --git a/sc/source/ui/inc/condformatdlg.hxx b/sc/source/ui/inc/condformatdlg.hxx index 5541c49..262a976 100644 --- a/sc/source/ui/inc/condformatdlg.hxx +++ b/sc/source/ui/inc/condformatdlg.hxx @@ -78,7 +78,6 @@ private: ScAddress maPos; ScRangeList maRanges; - void RecalcAll(); void DoScroll(long nDiff); public: @@ -86,6 +85,7 @@ public: const ScRangeList& rRanges, const ScAddress& rPos, condformat::dialog::ScCondFormatDialogType eType); ScConditionalFormat* GetConditionalFormat() const; + void RecalcAll(); DECL_LINK( AddBtnHdl, void* ); DECL_LINK( RemoveBtnHdl, void* ); commit 2f0bc524daf8ed27a8f9fbb2cdb31460d5be077d Author: Markus Mohrhard <[email protected]> Date: Mon Dec 17 22:57:35 2012 +0100 workaround FORMULA is not part of the condition is in the UI Change-Id: I6c51ecfbddeeaed3f8747cde90996f7e236a0afd diff --git a/sc/source/ui/condformat/condformathelper.cxx b/sc/source/ui/condformat/condformathelper.cxx index 67a175d..b594910 100644 --- a/sc/source/ui/condformat/condformathelper.cxx +++ b/sc/source/ui/condformat/condformathelper.cxx @@ -153,6 +153,10 @@ rtl::OUString ScCondFormatHelper::GetExpression( ScCondFormatEntryType eType, sa aBuffer.append(rtl::OUString(" ")); if(eType == CONDITION) { + // workaround missing FORMULA option in the conditions case + // FORMULA is handled later + if(nIndex > 9) + ++nIndex; aBuffer.append(getExpression(nIndex)); if(nIndex <= 7 || nIndex >= 19) { commit a8406aa3e0225989d57b185958b0c43b1304ec4a Author: Markus Mohrhard <[email protected]> Date: Mon Dec 17 21:41:22 2012 +0100 fix the month date formats, related fdo#58340 Change-Id: If9f716fd2d2f5a8488451121067ee068673b3b7a diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx index e02f89e..2b4fa0c 100644 --- a/sc/source/core/data/conditio.cxx +++ b/sc/source/core/data/conditio.cxx @@ -1705,7 +1705,12 @@ bool ScCondDateFormatEntry::IsValid( const ScAddress& rPos ) const } break; case condformat::LASTMONTH: - if( rActDate.GetYear() == aCellDate.GetYear() ) + if( rActDate.GetMonth() == 1 ) + { + if( aCellDate.GetMonth() == 12 && rActDate.GetYear() == aCellDate.GetYear() + 1 ) + return true; + } + else if( rActDate.GetYear() == aCellDate.GetYear() ) { if( rActDate.GetMonth() == aCellDate.GetMonth() + 1) return true; @@ -1719,7 +1724,12 @@ bool ScCondDateFormatEntry::IsValid( const ScAddress& rPos ) const } break; case condformat::NEXTMONTH: - if( rActDate.GetYear() == aCellDate.GetYear() ) + if( rActDate.GetMonth() == 12 ) + { + if( aCellDate.GetMonth() == 1 && rActDate.GetYear() == aCellDate.GetYear() - 1 ) + return true; + } + else if( rActDate.GetYear() == aCellDate.GetYear() ) { if( rActDate.GetMonth() == aCellDate.GetMonth() - 1) return true; commit 5c0e79f821260f0b72f35af74bb47f7ff91d5954 Author: Markus Mohrhard <[email protected]> Date: Mon Dec 17 21:39:26 2012 +0100 remove unused ifndef Change-Id: I759d2c7cea6a27fe676d1c1a17586445aa013ee9 diff --git a/tools/inc/tools/date.hxx b/tools/inc/tools/date.hxx index 42c7c16..22586c4 100644 --- a/tools/inc/tools/date.hxx +++ b/tools/inc/tools/date.hxx @@ -131,10 +131,8 @@ public: Date& operator -=( long nDays ); Date& operator ++(); Date& operator --(); -#ifndef MPW33 Date operator ++( int ); Date operator --( int ); -#endif TOOLS_DLLPUBLIC friend Date operator +( const Date& rDate, long nDays ); TOOLS_DLLPUBLIC friend Date operator -( const Date& rDate, long nDays ); diff --git a/tools/source/datetime/tdate.cxx b/tools/source/datetime/tdate.cxx index d1a6c94..f85e751 100644 --- a/tools/source/datetime/tdate.cxx +++ b/tools/source/datetime/tdate.cxx @@ -466,7 +466,6 @@ Date& Date::operator --() return *this; } -#ifndef MPW33 Date Date::operator ++( int ) { Date aOldDate = *this; @@ -480,7 +479,6 @@ Date Date::operator --( int ) Date::operator--(); return aOldDate; } -#endif Date operator +( const Date& rDate, long nDays ) { commit 6e4348d0f60f2b6b3ad71eaa8777ef8f98694298 Author: Markus Mohrhard <[email protected]> Date: Sat Dec 15 19:53:26 2012 +0100 checking for the month is wrong, related fdo#58340 Change-Id: I9920e8ad84da58f32a61a4bd864ea80b011ad746 diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx index a684e63..e02f89e 100644 --- a/sc/source/core/data/conditio.cxx +++ b/sc/source/core/data/conditio.cxx @@ -1684,21 +1684,21 @@ bool ScCondDateFormatEntry::IsValid( const ScAddress& rPos ) const return true; break; case condformat::LASTWEEK: - if( rActDate.GetYear() == aCellDate.GetYear() && rActDate.GetMonth() == aCellDate.GetMonth() ) + if( rActDate.GetYear() == aCellDate.GetYear() ) { if( rActDate.GetWeekOfYear( SUNDAY ) == aCellDate.GetWeekOfYear( SUNDAY ) + 1 ) return true; } break; case condformat::THISWEEK: - if( rActDate.GetYear() == aCellDate.GetYear() && rActDate.GetMonth() == aCellDate.GetMonth() ) + if( rActDate.GetYear() == aCellDate.GetYear() ) { if( rActDate.GetWeekOfYear( SUNDAY ) == aCellDate.GetWeekOfYear( SUNDAY ) ) return true; } break; case condformat::NEXTWEEK: - if( rActDate.GetYear() == aCellDate.GetYear() && rActDate.GetMonth() == aCellDate.GetMonth() ) + if( rActDate.GetYear() == aCellDate.GetYear() ) { if( rActDate.GetWeekOfYear( SUNDAY ) == aCellDate.GetWeekOfYear( SUNDAY ) - 1 ) return true; _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
