summaryrefslogtreecommitdiff
path: root/reportdesign
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2016-02-05 16:56:54 +0100
committerEike Rathke <erack@redhat.com>2016-02-05 17:02:47 +0100
commit599f0cbe1ddc1d54828489b389b78fdffa4ce39f (patch)
tree25173fd65460b33ef43910514559c203987a6c42 /reportdesign
parent4c4976f717b3ddce68a872dffc2079ae49c41616 (diff)
interface to new XTextSearch2 with SearchOptions2, tdf#72196
Places that had utl::TextSearch::UpgradeToSearchOptions2() introduced are worth an inspection if the new SearchAlgorithms2::WILDCARD search should be supported or at least use SearchOptions2 instead of SearchOptions to eliminate the small performance penalty that conversion involves. Change-Id: I565f73af2b551ae9ad0f488e672823dc6c5c1109
Diffstat (limited to 'reportdesign')
-rw-r--r--reportdesign/source/ui/inspection/GeometryHandler.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx
index c234c0f0a55b..da2521782993 100644
--- a/reportdesign/source/ui/inspection/GeometryHandler.cxx
+++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx
@@ -1858,13 +1858,13 @@ bool GeometryHandler::impl_isDefaultFunction_nothrow( const uno::Reference< repo
for (; aIter != aDeEnd; ++aIter)
{
aSearchOptions.searchString = aIter->m_sSearchString;
- utl::TextSearch aTextSearch(aSearchOptions);
+ utl::TextSearch aTextSearch( utl::TextSearch::UpgradeToSearchOptions2( aSearchOptions));
sal_Int32 start = 0;
sal_Int32 end = sFormula.getLength();
if ( aTextSearch.SearchForward(sFormula,&start,&end) && start == 0 && end == sFormula.getLength()) // default function found
{
aSearchOptions.searchString = "\\[[:alpha:]+([:space:]*[:alnum:]*)*\\]";
- utl::TextSearch aDataSearch(aSearchOptions);
+ utl::TextSearch aDataSearch( utl::TextSearch::UpgradeToSearchOptions2( aSearchOptions));
aDataSearch.SearchForward(sFormula,&start,&end );
++start;
_rDataField = sFormula.copy(start,end-start-1);
@@ -2075,7 +2075,7 @@ bool GeometryHandler::impl_isCounterFunction_throw(const OUString& _sQuotedFunct
aSearchOptions.algorithmType = util::SearchAlgorithms_REGEXP;
aSearchOptions.searchFlag = 0x00000100;
aSearchOptions.searchString = m_aCounterFunction.m_sSearchString;
- utl::TextSearch aTextSearch(aSearchOptions);
+ utl::TextSearch aTextSearch( utl::TextSearch::UpgradeToSearchOptions2( aSearchOptions));
sal_Int32 start = 0;
sal_Int32 end = sFormula.getLength();
if ( aTextSearch.SearchForward(sFormula,&start,&end) && start == 0 && end == sFormula.getLength()) // counter function found