[Libreoffice-commits] .: patches/dev300
Michael Meeks
michael at kemper.freedesktop.org
Fri Apr 1 04:38:01 PDT 2011
patches/dev300/apply | 17
patches/dev300/cygwin-make-ver.diff | 13
patches/dev300/gui-sw-scroll.diff | 28 -
patches/dev300/sc-standard-filter-options-ods-hack.diff | 188 ------
patches/dev300/sc-standard-filter-options.diff | 439 ----------------
5 files changed, 1 insertion(+), 684 deletions(-)
New commits:
commit d290e20f3dadcf6b297d91d5b59b2a6763b26ac9
Author: Michael Meeks <michael.meeks at novell.com>
Date: Fri Apr 1 12:37:07 2011 +0100
remove more obsolete patches
diff --git a/patches/dev300/apply b/patches/dev300/apply
index f84b624..7bfab9b 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -147,11 +147,6 @@ cli-mono-common.diff
[ CliComponent ]
cli-component.diff
-[ BuildBits ]
-
-# Upgraded internal ICU to 4.2.1
-icu-4.2.1.diff, cbosdo
-
[ TemporaryHacks ]
# add idl target to toplevel makefile
@@ -207,8 +202,6 @@ speed-sal-fewer-lstats.diff, i#89730, jholesov
#FIXME src680: font_list_box_cjk.diff, i#73003, Fong Lin
[ FixesNotForUpstream ]
-# Make the scroll-wheel / page popup more sane
-gui-sw-scroll.diff, i#20826, michael
# Tell the desktop we support the VFS
uses-vfs.diff, i#43504, michael
@@ -1232,18 +1225,10 @@ dont-check-fqdn.diff
# part of the code
win32-quickstarter-exit.diff, i#73550, tml
novell-win32-avoid-premature-shutdown.diff, n#269146, tml
-# some versions of make don't like us
-cygwin-make-ver.diff, i#68283, michael
# Provides a great speed-up for a mail merge operation : 7x faster
sw-mailmerge-faster.diff, i#40827, mloiseleur
-# Improves the standard filter options and menu. bxc #62187 #62495
-sc-standard-filter-options.diff, i#35579, michael
-
-# Saves and loads the standard filters in ods
-sc-standard-filter-options-ods-hack.diff, i#35579, jonp
-
# hyperlink issue with numeric slide names in Impress
sd-update-relative-links.diff, n#355674, i#55224, rodo
@@ -1599,7 +1584,7 @@ oox-pptx-export-update-to-ooo320.diff, rodo
# xlsx-shared-oox-chart-export-part1-pptx-part.diff
[ PieceBits ]
-SectionOwner => michael
+SectionOwner => pmladek
# Experimental piece-wise source code split for build
# zipintro is not kind to us ...
piece-desktop.diff
diff --git a/patches/dev300/cygwin-make-ver.diff b/patches/dev300/cygwin-make-ver.diff
deleted file mode 100644
index cf9844b..0000000
--- a/patches/dev300/cygwin-make-ver.diff
+++ /dev/null
@@ -1,13 +0,0 @@
---- configure.in
-+++ configure.in
-@@ -1232,6 +1232,10 @@
- break
- fi
- done
-+$GNUMAKE --version 2> /dev/null | grep ' 3.81' 2>&1 > /dev/null
-+if test $? -ne 0; then
-+ AC_MSG_WARN("gmake 3.81 cannot build mozilla - please use 3.80")
-+fi
- AC_MSG_RESULT($GNUMAKE)
-
- AC_MSG_CHECKING([the GNU make version])
diff --git a/patches/dev300/gui-sw-scroll.diff b/patches/dev300/gui-sw-scroll.diff
deleted file mode 100644
index 3736052..0000000
--- a/patches/dev300/gui-sw-scroll.diff
+++ /dev/null
@@ -1,28 +0,0 @@
----
- sw/source/ui/uiview/viewport.cxx | 3 ++-
- 1 files changed, 2 insertions(+), 1 deletions(-)
-
-diff --git sw/source/ui/uiview/viewport.cxx sw/source/ui/uiview/viewport.cxx
-index d47436a..579aea6 100644
---- sw/source/ui/uiview/viewport.cxx
-+++ sw/source/ui/uiview/viewport.cxx
-@@ -719,6 +719,7 @@ IMPL_LINK( SwView, ScrollHdl, SwScrollbar *, pScrollbar )
- //Hier wieder auskommentieren wenn das mitscrollen nicht gewuenscht ist.
- // JP 21.07.00: the end scrollhandler invalidate the FN_STAT_PAGE,
- // so we dont must do it agin.
-+ long nOldPge = nPgNum;
- EndScrollHdl(pScrollbar);
-
- Point aPos( aVisArea.TopLeft() );
-@@ -738,7 +739,7 @@ IMPL_LINK( SwView, ScrollHdl, SwScrollbar *, pScrollbar )
- //QuickHelp:
- if( pWrtShell->GetPageCnt() > 1 && Help::IsQuickHelpEnabled() )
- {
-- if( !nPgNum || nPgNum != nPhNum )
-+ if( !nOldPge || nOldPge != nPhNum )
- {
- Rectangle aRect;
- aRect.Left() = pScrollbar->GetParent()->OutputToScreenPixel(
---
-1.7.0.1
-
diff --git a/patches/dev300/sc-standard-filter-options-ods-hack.diff b/patches/dev300/sc-standard-filter-options-ods-hack.diff
deleted file mode 100644
index a9cae42..0000000
--- a/patches/dev300/sc-standard-filter-options-ods-hack.diff
+++ /dev/null
@@ -1,188 +0,0 @@
-Index: xmloff/inc/xmloff/xmltoken.hxx
-===================================================================
-RCS file: /cvs/xml/xmloff/inc/xmloff/xmltoken.hxx,v
-retrieving revision 1.6
-diff -u -p -r1.6 xmltoken.hxx
---- xmloff/inc/xmloff/xmltoken.hxx 6 Jul 2007 12:20:12 -0000 1.6
-+++ xmloff/inc/xmloff/xmltoken.hxx 9 Aug 2007 18:29:21 -0000
-@@ -283,6 +283,7 @@ namespace xmloff { namespace token {
- XML_BASE_CELL_ADDRESS,
- XML_BASELINE,
- XML_BEFORE_DATE_TIME,
-+ XML_BEGINS,
- XML_BELOW,
- XML_BETWEEN_DATE_TIMES,
- XML_BEVEL,
-@@ -447,6 +448,7 @@ namespace xmloff { namespace token {
- XML_CONSECUTIVE_NUMBERING,
- XML_CONSOLIDATION,
- XML_CONSTANT,
-+ XML_CONTAINS,
- XML_CONTAINS_ERROR,
- XML_CONTAINS_HEADER,
- XML_CONTENT,
-@@ -666,6 +668,7 @@ namespace xmloff { namespace token {
- XML_ENDNOTE_CITATION,
- XML_ENDNOTE_REF,
- XML_ENDNOTES_CONFIGURATION,
-+ XML_ENDS,
- XML_ENGRAVED,
- XML_EQ,
- XML_EQUAL_AUTHOR,
-@@ -1229,6 +1232,7 @@ namespace xmloff { namespace token {
- XML_NORMALS_DIRECTION,
- XML_NORMALS_KIND,
- XML_NOT,
-+ XML_NOT_CONTAINS,
- XML_NOT_EQUAL_DATE,
- XML_NOTE,
- XML_NOTES,
-Index: xmloff/source/core/xmltoken.cxx
-===================================================================
-RCS file: /cvs/xml/xmloff/source/core/xmltoken.cxx,v
-retrieving revision 1.109
-diff -u -p -r1.109 xmltoken.cxx
---- xmloff/source/core/xmltoken.cxx 6 Jul 2007 12:21:09 -0000 1.109
-+++ xmloff/source/core/xmltoken.cxx 9 Aug 2007 18:29:22 -0000
-@@ -291,6 +291,7 @@ namespace xmloff { namespace token {
- TOKEN( "base-cell-address", XML_BASE_CELL_ADDRESS ),
- TOKEN( "baseline", XML_BASELINE ),
- TOKEN( "before-date-time", XML_BEFORE_DATE_TIME ),
-+ TOKEN( "begins", XML_BEGINS),
- TOKEN( "below", XML_BELOW ),
- TOKEN( "between-date-times", XML_BETWEEN_DATE_TIMES ),
- TOKEN( "bevel", XML_BEVEL ),
-@@ -455,6 +456,7 @@ namespace xmloff { namespace token {
- TOKEN( "consecutive-numbering", XML_CONSECUTIVE_NUMBERING ),
- TOKEN( "consolidation", XML_CONSOLIDATION ),
- TOKEN( "constant", XML_CONSTANT ),
-+ TOKEN( "contains", XML_CONTAINS ),
- TOKEN( "contains-error", XML_CONTAINS_ERROR ),
- TOKEN( "contains-header", XML_CONTAINS_HEADER ),
- TOKEN( "content", XML_CONTENT ),
-@@ -674,6 +676,7 @@ namespace xmloff { namespace token {
- TOKEN( "endnote-citation", XML_ENDNOTE_CITATION ),
- TOKEN( "endnote-ref", XML_ENDNOTE_REF ),
- TOKEN( "endnotes-configuration", XML_ENDNOTES_CONFIGURATION ),
-+ TOKEN( "ends", XML_ENDS ),
- TOKEN( "engraved", XML_ENGRAVED ),
- TOKEN( "eq", XML_EQ ),
- TOKEN( "equal-author", XML_EQUAL_AUTHOR ),
-@@ -1237,6 +1240,7 @@ namespace xmloff { namespace token {
- TOKEN( "normals-direction", XML_NORMALS_DIRECTION ),
- TOKEN( "normals-kind", XML_NORMALS_KIND ),
- TOKEN( "not", XML_NOT ),
-+ TOKEN( "!contains", XML_NOT_CONTAINS ),
- TOKEN( "not-equal-date", XML_NOT_EQUAL_DATE ),
- TOKEN( "note", XML_NOTE ),
- TOKEN( "notes", XML_NOTES ),
-Index: sc/source/filter/xml/XMLExportDataPilot.cxx
-===================================================================
-RCS file: /cvs/sc/sc/source/filter/xml/XMLExportDataPilot.cxx,v
-retrieving revision 1.27
-diff -u -p -r1.27 XMLExportDataPilot.cxx
---- sc/source/filter/xml/XMLExportDataPilot.cxx 6 Jul 2007 12:40:04 -0000 1.27
-+++ sc/source/filter/xml/XMLExportDataPilot.cxx 9 Aug 2007 18:29:25 -0000
-@@ -196,6 +196,14 @@ rtl::OUString ScXMLExportDataPilot::getD
- return GetXMLToken(XML_TOP_PERCENT);
- case SC_TOPVAL :
- return GetXMLToken(XML_TOP_VALUES);
-+ case SC_BEGINS_WITH:
-+ return GetXMLToken(XML_BEGINS);
-+ case SC_ENDS_WITH:
-+ return GetXMLToken(XML_ENDS);
-+ case SC_CONTAINS:
-+ return GetXMLToken(XML_CONTAINS);
-+ case SC_DOES_NOT_CONTAIN:
-+ return GetXMLToken(XML_NOT_CONTAINS);
- default:
- DBG_ERROR("This FilterOperator is not supported.");
- }
-Index: sc/source/filter/xml/XMLExportDatabaseRanges.cxx
-===================================================================
-RCS file: /cvs/sc/sc/source/filter/xml/XMLExportDatabaseRanges.cxx,v
-retrieving revision 1.22
-diff -u -p -r1.22 XMLExportDatabaseRanges.cxx
---- sc/source/filter/xml/XMLExportDatabaseRanges.cxx 22 May 2007 20:02:49 -0000 1.22
-+++ sc/source/filter/xml/XMLExportDatabaseRanges.cxx 9 Aug 2007 18:29:26 -0000
-@@ -301,6 +301,14 @@ rtl::OUString ScXMLExportDatabaseRanges:
- {
- // added to avoid warnings
- }
-+ case 100+SC_BEGINS_WITH:
-+ return GetXMLToken(XML_BEGINS);
-+ case 100+SC_ENDS_WITH:
-+ return GetXMLToken(XML_ENDS);
-+ case 100+SC_CONTAINS:
-+ return GetXMLToken(XML_CONTAINS);
-+ case 100+SC_DOES_NOT_CONTAIN:
-+ return GetXMLToken(XML_NOT_CONTAINS);
- }
- return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("="));
- }
-Index: sc/source/filter/xml/xmlfilti.cxx
-===================================================================
-RCS file: /cvs/sc/sc/source/filter/xml/xmlfilti.cxx,v
-retrieving revision 1.16
-diff -u -p -r1.16 xmlfilti.cxx
---- sc/source/filter/xml/xmlfilti.cxx 22 May 2007 20:04:07 -0000 1.16
-+++ sc/source/filter/xml/xmlfilti.cxx 9 Aug 2007 18:29:26 -0000
-@@ -386,6 +386,14 @@ void ScXMLConditionContext::getOperatorX
- aFilterOperator = sheet::FilterOperator_TOP_PERCENT;
- else if (IsXMLToken(sTempOperator, XML_TOP_VALUES))
- aFilterOperator = sheet::FilterOperator_TOP_VALUES;
-+ else if (IsXMLToken(sTempOperator, XML_BEGINS))
-+ aFilterOperator = (sheet::FilterOperator) (100+SC_BEGINS_WITH);
-+ else if (IsXMLToken(sTempOperator, XML_ENDS))
-+ aFilterOperator = (sheet::FilterOperator) (100+SC_ENDS_WITH);
-+ else if (IsXMLToken(sTempOperator, XML_CONTAINS))
-+ aFilterOperator = (sheet::FilterOperator) (100+SC_CONTAINS);
-+ else if (IsXMLToken(sTempOperator, XML_NOT_CONTAINS))
-+ aFilterOperator = (sheet::FilterOperator) (100+SC_DOES_NOT_CONTAIN);
- }
-
- void ScXMLConditionContext::EndElement()
-@@ -751,6 +759,14 @@ void ScXMLDPConditionContext::getOperato
- aFilterOperator = SC_TOPPERC;
- else if (IsXMLToken(sTempOperator, XML_TOP_VALUES))
- aFilterOperator = SC_TOPVAL;
-+ else if (IsXMLToken(sTempOperator, XML_BEGINS))
-+ aFilterOperator = SC_BEGINS_WITH;
-+ else if (IsXMLToken(sTempOperator, XML_ENDS))
-+ aFilterOperator = SC_ENDS_WITH;
-+ else if (IsXMLToken(sTempOperator, XML_CONTAINS))
-+ aFilterOperator = SC_CONTAINS;
-+ else if (IsXMLToken(sTempOperator, XML_NOT_CONTAINS))
-+ aFilterOperator = SC_DOES_NOT_CONTAIN;
- }
-
- void ScXMLDPConditionContext::EndElement()
-Index: sc/source/ui/unoobj/datauno.cxx
-===================================================================
-RCS file: /cvs/sc/sc/source/ui/unoobj/datauno.cxx,v
-retrieving revision 1.28
-diff -u -p -r1.28 datauno.cxx
---- sc/source/ui/unoobj/datauno.cxx 5 Mar 2007 14:45:54 -0000 1.28
-+++ sc/source/ui/unoobj/datauno.cxx 9 Aug 2007 18:29:27 -0000
-@@ -1180,6 +1180,10 @@ uno::Sequence<sheet::TableFilterField> S
- case SC_BOTVAL: aField.Operator = sheet::FilterOperator_BOTTOM_VALUES; break;
- case SC_TOPPERC: aField.Operator = sheet::FilterOperator_TOP_PERCENT; break;
- case SC_BOTPERC: aField.Operator = sheet::FilterOperator_BOTTOM_PERCENT; break;
-+ case SC_BEGINS_WITH: aField.Operator = (sheet::FilterOperator) (100+SC_BEGINS_WITH); break;
-+ case SC_ENDS_WITH: aField.Operator = (sheet::FilterOperator) (100+SC_ENDS_WITH); break;
-+ case SC_CONTAINS: aField.Operator = (sheet::FilterOperator) (100+SC_CONTAINS); break;
-+ case SC_DOES_NOT_CONTAIN: aField.Operator = (sheet::FilterOperator) (100+SC_DOES_NOT_CONTAIN); break;
- default:
- DBG_ERROR("Falscher Filter-enum");
- aField.Operator = sheet::FilterOperator_EMPTY;
-@@ -1234,6 +1238,10 @@ void SAL_CALL ScFilterDescriptorBase::se
- case sheet::FilterOperator_BOTTOM_VALUES: rEntry.eOp = SC_BOTVAL; break;
- case sheet::FilterOperator_TOP_PERCENT: rEntry.eOp = SC_TOPPERC; break;
- case sheet::FilterOperator_BOTTOM_PERCENT: rEntry.eOp = SC_BOTPERC; break;
-+ case 100+SC_BEGINS_WITH: rEntry.eOp = SC_BEGINS_WITH; break;
-+ case 100+SC_ENDS_WITH: rEntry.eOp = SC_ENDS_WITH; break;
-+ case 100+SC_CONTAINS: rEntry.eOp = SC_CONTAINS; break;
-+ case 100+SC_DOES_NOT_CONTAIN: rEntry.eOp = SC_DOES_NOT_CONTAIN; break;
- case sheet::FilterOperator_EMPTY:
- {
- rEntry.eOp = SC_EQUAL;
diff --git a/patches/dev300/sc-standard-filter-options.diff b/patches/dev300/sc-standard-filter-options.diff
deleted file mode 100644
index 934ddd4..0000000
--- a/patches/dev300/sc-standard-filter-options.diff
+++ /dev/null
@@ -1,439 +0,0 @@
-diff --git sc/inc/global.hxx sc/inc/global.hxx
-index f084b61..c6ab232 100644
---- sc/inc/global.hxx
-+++ sc/inc/global.hxx
-@@ -728,7 +728,11 @@ enum ScQueryOp
- SC_TOPVAL,
- SC_BOTVAL,
- SC_TOPPERC,
-- SC_BOTPERC
-+ SC_BOTPERC,
-+ SC_CONTAINS,
-+ SC_DOES_NOT_CONTAIN,
-+ SC_BEGINS_WITH,
-+ SC_ENDS_WITH
- };
-
- // -----------------------------------------------------------------------
-diff --git sc/source/core/data/table3.cxx sc/source/core/data/table3.cxx
-index eb3640a..c690b3e 100644
---- sc/source/core/data/table3.cxx
-+++ sc/source/core/data/table3.cxx
-@@ -31,6 +31,7 @@
- // MARKER(update_precomp.py): autogen include statement, do not remove
- #include "precompiled_sc.hxx"
-
-+#include <i18nutil/unicode.hxx>
- #include <rtl/math.hxx>
- #include <unotools/textsearch.hxx>
- #include <svtools/zforlist.hxx>
-@@ -928,6 +929,29 @@ BOOL ScTable::DoSubTotals( ScSubTotalParam& rParam )
- return bSpaceLeft;
- }
-
-+static BOOL HasNonWSInRange (const String& s, int start, int end)
-+{
-+ for (int i = start; i < end; ++i)
-+ {
-+ if (!unicode::isSpace(s.GetChar(i)))
-+ return TRUE;
-+ }
-+ return FALSE;
-+}
-+
-+static BOOL IsMatch (BOOL bMatchWholeCell, ScQueryOp eOp, const String& s, int nMatchStart, int nMatchEnd)
-+{
-+ BOOL bBegin = HasNonWSInRange(s, 0, nMatchStart);
-+ BOOL bEnd = HasNonWSInRange(s, nMatchEnd, s.Len());
-+
-+ if (bMatchWholeCell && (bBegin || bEnd))
-+ return FALSE;
-+ else if (eOp == SC_BEGINS_WITH && bBegin)
-+ return FALSE;
-+ else if (eOp == SC_ENDS_WITH && bEnd)
-+ return FALSE;
-+ return TRUE;
-+}
-
- BOOL ScTable::ValidQuery(SCROW nRow, const ScQueryParam& rParam,
- BOOL* pSpecial /* =NULL */ , ScBaseCell* pCell /* =NULL */ ,
-@@ -1021,13 +1045,22 @@ BOOL ScTable::ValidQuery(SCROW nRow, const ScQueryParam& rParam,
- }
- }
- }
-- else if ( (rEntry.eOp == SC_EQUAL || rEntry.eOp == SC_NOT_EQUAL) ||
-+ else if ( (rEntry.eOp == SC_CONTAINS || rEntry.eOp == SC_DOES_NOT_CONTAIN ||
-+ rEntry.eOp == SC_BEGINS_WITH || rEntry.eOp == SC_ENDS_WITH ||
-+ rEntry.eOp == SC_EQUAL || rEntry.eOp == SC_NOT_EQUAL) ||
- (rEntry.bQueryByString && (pCell ? pCell->HasStringData() :
- HasStringData(
- static_cast<SCCOL>(rEntry.nField),
- nRow))))
- { // by String
- String aCellStr;
-+
-+ // Contains and Does not contain is similar to EQUAL and NOT EQUAL
-+ // but with bMatchWholeCell set to false
-+ if( rEntry.eOp == SC_CONTAINS || rEntry.eOp == SC_DOES_NOT_CONTAIN ||
-+ rEntry.eOp == SC_BEGINS_WITH || rEntry.eOp == SC_ENDS_WITH )
-+ bMatchWholeCell = FALSE;
-+
- if ( pCell )
- {
- if (pCell->GetCellType() != CELLTYPE_NOTE)
-@@ -1040,7 +1073,9 @@ BOOL ScTable::ValidQuery(SCROW nRow, const ScQueryParam& rParam,
- GetInputString( static_cast<SCCOL>(rEntry.nField), nRow, aCellStr );
-
- BOOL bRealRegExp = (rParam.bRegExp && ((rEntry.eOp == SC_EQUAL)
-- || (rEntry.eOp == SC_NOT_EQUAL)));
-+ || (rEntry.eOp == SC_NOT_EQUAL) || (rEntry.eOp == SC_CONTAINS)
-+ || (rEntry.eOp == SC_DOES_NOT_CONTAIN) || (rEntry.eOp == SC_BEGINS_WITH)
-+ || (rEntry.eOp == SC_ENDS_WITH)));
- BOOL bTestRegExp = (pbTestEqualCondition && rParam.bRegExp
- && ((rEntry.eOp == SC_LESS_EQUAL)
- || (rEntry.eOp == SC_GREATER_EQUAL)));
-@@ -1051,17 +1086,21 @@ BOOL ScTable::ValidQuery(SCROW nRow, const ScQueryParam& rParam,
- BOOL bMatch = (BOOL) rEntry.GetSearchTextPtr( rParam.bCaseSens )
- ->SearchFrwrd( aCellStr, &nStart, &nEnd );
- // from 614 on, nEnd is behind the found text
-- if ( bMatch && bMatchWholeCell
-- && (nStart != 0 || nEnd != aCellStr.Len()) )
-- bMatch = FALSE; // RegExp must match entire cell string
-+ if ( bMatch )
-+ {
-+ bMatch = IsMatch(bMatchWholeCell, rEntry.eOp, aCellStr, nStart, nEnd);
-+ }
- if ( bRealRegExp )
-- bOk = ((rEntry.eOp == SC_NOT_EQUAL) ? !bMatch : bMatch);
-+ bOk = ( ( rEntry.eOp == SC_NOT_EQUAL ||
-+ rEntry.eOp == SC_DOES_NOT_CONTAIN ) ? !bMatch : bMatch );
- else
- bTestEqual = bMatch;
- }
- if ( !bRealRegExp )
- {
-- if ( rEntry.eOp == SC_EQUAL || rEntry.eOp == SC_NOT_EQUAL )
-+ if ( rEntry.eOp == SC_EQUAL || rEntry.eOp == SC_NOT_EQUAL ||
-+ rEntry.eOp == SC_CONTAINS || rEntry.eOp == SC_DOES_NOT_CONTAIN ||
-+ rEntry.eOp == SC_BEGINS_WITH || rEntry.eOp == SC_ENDS_WITH )
- {
- if ( !rEntry.bQueryByString && rEntry.pStr->Len() == 0 )
- {
-@@ -1070,8 +1109,6 @@ BOOL ScTable::ValidQuery(SCROW nRow, const ScQueryParam& rParam,
- // don't find any string (isEqual would find empty string results in formula cells).
- bOk = FALSE;
- }
-- else if ( bMatchWholeCell )
-- bOk = pTransliteration->isEqual( aCellStr, *rEntry.pStr );
- else
- {
- String aCell( pTransliteration->transliterate(
-@@ -1080,9 +1117,14 @@ BOOL ScTable::ValidQuery(SCROW nRow, const ScQueryParam& rParam,
- String aQuer( pTransliteration->transliterate(
- *rEntry.pStr, ScGlobal::eLnge, 0, rEntry.pStr->Len(),
- NULL ) );
-- bOk = (aCell.Search( aQuer ) != STRING_NOTFOUND);
-+ xub_StrLen nPos = aCell.Search( aQuer );
-+ bOk = ( nPos != STRING_NOTFOUND );
-+ if ( bOk )
-+ {
-+ bOk = IsMatch(bMatchWholeCell, rEntry.eOp, aCell, nPos, nPos+aQuer.Len());
-+ }
- }
-- if ( rEntry.eOp == SC_NOT_EQUAL )
-+ if ( rEntry.eOp == SC_NOT_EQUAL || rEntry.eOp == SC_DOES_NOT_CONTAIN )
- bOk = !bOk;
- }
- else
-diff --git sc/source/filter/excel/excimp8.cxx sc/source/filter/excel/excimp8.cxx
-index d0d132c..a23eb24 100644
---- sc/source/filter/excel/excimp8.cxx
-+++ sc/source/filter/excel/excimp8.cxx
-@@ -426,6 +426,72 @@ void XclImpAutoFilterData::InsertQueryParam()
- }
- }
-
-+static void ExcelQueryToOooQuery( ScQueryEntry& rEntry, ScQueryParam& rParam )
-+{
-+ if( rEntry.pStr == NULL )
-+ return;
-+ if( rEntry.eOp != SC_EQUAL && rEntry.eOp != SC_NOT_EQUAL )
-+ return;
-+ xub_StrLen nLen = rEntry.pStr->Len();
-+ if( nLen == 0 )
-+ return;
-+ BOOL bRegExp = FALSE;
-+ for( int i = 0; i < nLen; ++i )
-+ {
-+ sal_Unicode c = rEntry.pStr->GetChar( i );
-+ if( c == '*' )
-+ {
-+ if( rEntry.eOp == SC_NOT_EQUAL )
-+ {
-+ bRegExp = TRUE;
-+ rEntry.eOp = SC_DOES_NOT_CONTAIN;
-+ }
-+ else if( rEntry.eOp == SC_DOES_NOT_CONTAIN )
-+ ; // ignore
-+ else if( i == 0 )
-+ rEntry.eOp = SC_ENDS_WITH;
-+ else if( i == nLen-1 )
-+ rEntry.eOp = rEntry.eOp == SC_ENDS_WITH ? SC_CONTAINS : SC_BEGINS_WITH;
-+ else
-+ bRegExp = TRUE;
-+ }
-+ else if( c == '?' )
-+ bRegExp = TRUE;
-+ }
-+ if( rEntry.pStr->GetChar( 0 ) == '*' )
-+ rEntry.pStr->Erase( 0, 1 );
-+ nLen = rEntry.pStr->Len();
-+ if( nLen > 0 && rEntry.pStr->GetChar( nLen-1 ) == '*' )
-+ {
-+ rEntry.pStr->Erase( nLen-1, 1 );
-+ --nLen;
-+ }
-+ if( bRegExp )
-+ {
-+ rParam.bRegExp = TRUE;
-+ for( int i = 0; i < nLen; ++i )
-+ {
-+ sal_Unicode c = rEntry.pStr->GetChar( i );
-+ switch( c ) {
-+ case '*':
-+ rEntry.pStr->ReplaceAscii( i, 1, ".*" );
-+ ++i;
-+ ++nLen;
-+ break;
-+ case '.':
-+ rEntry.pStr->InsertAscii( "\\", i );
-+ ++i;
-+ ++nLen;
-+ break;
-+ case '?':
-+ rEntry.pStr->ReplaceAscii( i, 1, "." );
-+ break;
-+ default: break;
-+ }
-+ }
-+ }
-+}
-+
- void XclImpAutoFilterData::ReadAutoFilter( XclImpStream& rStrm )
- {
- UINT16 nCol, nFlags;
-@@ -463,14 +529,14 @@ void XclImpAutoFilterData::ReadAutoFilter( XclImpStream& rStrm )
- BOOL bIgnore;
-
- UINT8 nStrLen[ 2 ] = { 0, 0 };
-- String* pEntryStr[ 2 ] = { NULL, NULL };
-+ ScQueryEntry *pQueryEntries[ 2 ] = { NULL, NULL };
-
- for( nE = 0; nE < 2; nE++ )
- {
- if( nFirstEmpty < nCount )
- {
- ScQueryEntry& aEntry = aParam.GetEntry( nFirstEmpty );
-- pEntryStr[ nE ] = aEntry.pStr;
-+ pQueryEntries[ nE ] = &aEntry;
- bIgnore = FALSE;
-
- rStrm >> nType >> nOper;
-@@ -558,8 +624,11 @@ void XclImpAutoFilterData::ReadAutoFilter( XclImpStream& rStrm )
- }
-
- for( nE = 0; nE < 2; nE++ )
-- if( nStrLen[ nE ] && pEntryStr[ nE ] )
-- pEntryStr[ nE ]->Assign( rStrm.ReadUniString( nStrLen[ nE ] ) );
-+ if( nStrLen[ nE ] && pQueryEntries[ nE ] )
-+ {
-+ pQueryEntries[ nE ]->pStr->Assign ( rStrm.ReadUniString( nStrLen[ nE ] ) );
-+ ExcelQueryToOooQuery( *pQueryEntries[ nE ], aParam );
-+ }
- }
- }
-
-diff --git sc/source/filter/excel/excrecds.cxx sc/source/filter/excel/excrecds.cxx
-index 1a4e746..6868f7b 100644
---- sc/source/filter/excel/excrecds.cxx
-+++ sc/source/filter/excel/excrecds.cxx
-@@ -693,13 +693,52 @@ BOOL XclExpAutofilter::AddCondition( ScQueryConnect eConn, UINT8 nType, UINT8 nO
- return TRUE;
- }
-
--BOOL XclExpAutofilter::AddEntry( const ScQueryEntry& rEntry )
-+static String OooQueryToExcelQuery( const ScQueryEntry& rEntry, const ScQueryParam& rParam )
-+{
-+ String aStr (*rEntry.pStr);
-+ BOOL bHaveRegex = rParam.bRegExp;
-+ if( bHaveRegex ) {
-+ xub_StrLen nLen = aStr.Len();
-+ for( int i = 0; i < nLen; ++i ) {
-+ sal_Unicode c = aStr.GetChar( i );
-+ if( c == '.' ) {
-+ if( i+1 < nLen && aStr.GetChar( i+1 ) == '*' ) {
-+ aStr.ReplaceAscii( i, 2, "*" );
-+ --nLen;
-+ }
-+ else
-+ aStr.ReplaceAscii( i, 1, "?" );
-+ }
-+ else if( c == '\\' ) {
-+ aStr.Erase( i, 1 );
-+ --nLen;
-+ }
-+ }
-+ }
-+ if( rEntry.eOp == SC_ENDS_WITH || rEntry.eOp == SC_CONTAINS || rEntry.eOp == SC_DOES_NOT_CONTAIN )
-+ aStr.InsertAscii( "*" , 0 );
-+ if( rEntry.eOp == SC_BEGINS_WITH || rEntry.eOp == SC_CONTAINS || rEntry.eOp == SC_DOES_NOT_CONTAIN )
-+ aStr.AppendAscii( "*" );
-+ return aStr;
-+}
-+
-+BOOL XclExpAutofilter::AddEntry( const ScQueryEntry& rEntry, const ScQueryParam& rParam )
- {
- BOOL bConflict = FALSE;
- String sText;
-
-+ ScQueryOp eOp = rEntry.eOp;
- if( rEntry.pStr )
-- sText.Assign( *rEntry.pStr );
-+ {
-+ if (eOp != SC_BEGINS_WITH && eOp != SC_ENDS_WITH &&
-+ eOp != SC_CONTAINS && eOp != SC_DOES_NOT_CONTAIN)
-+ sText.Assign( *rEntry.pStr );
-+ else
-+ {
-+ sText.Assign( OooQueryToExcelQuery( rEntry, rParam ) );
-+ eOp = eOp == SC_DOES_NOT_CONTAIN ? SC_NOT_EQUAL : SC_EQUAL;
-+ }
-+ }
-
- BOOL bLen = sText.Len() > 0;
-
-@@ -718,7 +757,7 @@ BOOL XclExpAutofilter::AddEntry( const ScQueryEntry& rEntry )
-
- // top10 flags
- UINT16 nNewFlags = 0x0000;
-- switch( rEntry.eOp )
-+ switch( eOp )
- {
- case SC_TOPVAL:
- nNewFlags = (EXC_AFFLAG_TOP10 | EXC_AFFLAG_TOP10TOP);
-@@ -751,7 +790,7 @@ BOOL XclExpAutofilter::AddEntry( const ScQueryEntry& rEntry )
- UINT8 nType = bIsNum ? EXC_AFTYPE_DOUBLE : EXC_AFTYPE_STRING;
- UINT8 nOper = EXC_AFOPER_NONE;
-
-- switch( rEntry.eOp )
-+ switch( eOp )
- {
- case SC_EQUAL: nOper = EXC_AFOPER_EQUAL; break;
- case SC_LESS: nOper = EXC_AFOPER_LESS; break;
-@@ -900,7 +939,7 @@ ExcAutoFilterRecs::ExcAutoFilterRecs( const XclExpRoot& rRoot, SCTAB nTab ) :
- bConflict = (nEntry == 1) && (rEntry.eConnect == SC_OR) &&
- (nFirstField != rEntry.nField);
- if( !bConflict )
-- bConflict = pFilter->AddEntry( rEntry );
-+ bConflict = pFilter->AddEntry( rEntry, aParam );
- }
- }
-
-diff --git sc/source/filter/inc/excrecds.hxx sc/source/filter/inc/excrecds.hxx
-index 217c30c..048a910 100644
---- sc/source/filter/inc/excrecds.hxx
-+++ sc/source/filter/inc/excrecds.hxx
-@@ -442,7 +442,7 @@ public:
- inline BOOL HasCondition() const { return !aCond[ 0 ].IsEmpty(); }
- inline BOOL HasTop10() const { return ::get_flag( nFlags, EXC_AFFLAG_TOP10 ); }
-
-- BOOL AddEntry( const ScQueryEntry& rEntry );
-+ BOOL AddEntry( const ScQueryEntry& rEntry, const ScQueryParam& rParam );
-
- virtual void SaveXml( XclExpXmlStream& rStrm );
- };
-diff --git sc/source/ui/src/filter.src sc/source/ui/src/filter.src
-index 5eedbb7..d9f1fe1 100644
---- sc/source/ui/src/filter.src
-+++ sc/source/ui/src/filter.src
-@@ -121,16 +121,20 @@ ModelessDialog RID_SCDLG_FILTER
- DropDown = TRUE ;
- stringlist [ en-US ] =
- {
-- < "=" ; Default ; > ;
-+ < "Equals" ; Default ; > ;
- < "<" ; Default ; > ;
- < ">" ; Default ; > ;
- < "<=" ; Default ; > ;
- < ">=" ; Default ; > ;
-- < "<>" ; Default ; > ;
-+ < "Not equals" ; Default ; > ;
- < "Largest" ; Default ; > ;
- < "Smallest" ; Default ; > ;
- < "Largest %" ; Default ; > ;
- < "Smallest %" ; Default ; > ;
-+ < "Contains" ; Default ; > ;
-+ < "Does not Contain" ; Default ; > ;
-+ < "Begins with" ; Default ; > ;
-+ < "Ends with" ; Default ; > ;
- };
- };
- ListBox LB_COND2
-@@ -142,16 +146,20 @@ ModelessDialog RID_SCDLG_FILTER
- DropDown = TRUE ;
- stringlist [ en-US ] =
- {
-- < "=" ; Default ; > ;
-+ < "Equals" ; Default ; > ;
- < "<" ; Default ; > ;
- < ">" ; Default ; > ;
- < "<=" ; Default ; > ;
- < ">=" ; Default ; > ;
-- < "<>" ; Default ; > ;
-+ < "Not equals" ; Default ; > ;
- < "Largest" ; Default ; > ;
- < "Smallest" ; Default ; > ;
- < "Largest %" ; Default ; > ;
- < "Smallest %" ; Default ; > ;
-+ < "Contains" ; Default ; > ;
-+ < "Does not Contain" ; Default ; > ;
-+ < "Begins with" ; Default ; > ;
-+ < "Ends with" ; Default ; > ;
- };
- };
- ListBox LB_COND3
-@@ -163,16 +171,20 @@ ModelessDialog RID_SCDLG_FILTER
- DropDown = TRUE ;
- stringlist [ en-US ] =
- {
-- < "=" ; Default ; > ;
-+ < "Equals" ; Default ; > ;
- < "<" ; Default ; > ;
- < ">" ; Default ; > ;
- < "<=" ; Default ; > ;
- < ">=" ; Default ; > ;
-- < "<>" ; Default ; > ;
-+ < "Not equals" ; Default ; > ;
- < "Largest" ; Default ; > ;
- < "Smallest" ; Default ; > ;
- < "Largest %" ; Default ; > ;
- < "Smallest %" ; Default ; > ;
-+ < "Contains" ; Default ; > ;
-+ < "Does not Contain" ; Default ; > ;
-+ < "Begins with" ; Default ; > ;
-+ < "Ends with" ; Default ; > ;
- };
- };
- ComboBox ED_VAL1
-diff --git sc/util/makefile.mk sc/util/makefile.mk
-index 9d2706a..b420951 100644
---- sc/util/makefile.mk
-+++ sc/util/makefile.mk
-@@ -94,6 +94,7 @@ SHL1STDLIBS= \
- $(VOSLIB) \
- $(SALLIB) \
- $(TOOLSLIB) \
-+ $(I18NUTILLIB) \
- $(I18NISOLANGLIB) \
- $(UNOTOOLSLIB) \
- $(SOTLIB) \
More information about the Libreoffice-commits
mailing list