connectivity/Library_mork.mk                                |    1 +
 connectivity/source/drivers/mork/MQueryHelper.cxx           |   12 +++++++++---
 desktop/source/migration/services/oo3extensionmigration.cxx |    6 +++---
 extensions/source/bibliography/bibload.cxx                  |    4 ++--
 unotools/inc/unotools/textsearch.hxx                        |    2 ++
 unotools/source/i18n/textsearch.cxx                         |    2 ++
 6 files changed, 19 insertions(+), 8 deletions(-)

New commits:
commit 7de4f83848f6277251e48606ce2c670ea9866926
Author: Stephan Bergmann <sberg...@redhat.com>
Date:   Sun Nov 25 00:55:53 2012 +0100

    Adapt to OUString-oriented SearchForward
    
    Change-Id: I0aec0bf6d2d3010292f5dee314074457c24ee408

diff --git a/desktop/source/migration/services/oo3extensionmigration.cxx 
b/desktop/source/migration/services/oo3extensionmigration.cxx
index 8f58fcb..d994e0d 100644
--- a/desktop/source/migration/services/oo3extensionmigration.cxx
+++ b/desktop/source/migration/services/oo3extensionmigration.cxx
@@ -266,9 +266,9 @@ bool OO3ExtensionMigration::scanDescriptionXml( const 
::rtl::OUString& sDescript
                 utl::SearchParam param(m_aBlackList[i], 
utl::SearchParam::SRCH_REGEXP);
                 utl::TextSearch  ts(param, LANGUAGE_DONTKNOW);
 
-                xub_StrLen start = 0;
-                xub_StrLen end   = 
static_cast<sal_uInt16>(aExtIdentifier.getLength());
-                if (ts.SearchFrwrd(aExtIdentifier, &start, &end))
+                sal_Int32 start = 0;
+                sal_Int32 end = aExtIdentifier.getLength();
+                if (ts.SearchForward(aExtIdentifier, &start, &end))
                     return false;
             }
         }
commit db8826007035255a4b3e4a3ef0377d28415a3a93
Author: Stephan Bergmann <sberg...@redhat.com>
Date:   Sun Nov 25 00:55:16 2012 +0100

    Implement MQueryOp::RegExp functionality
    
    Change-Id: I9daf60f42dcba4e4c6444ccd8ad94258424621fe

diff --git a/connectivity/Library_mork.mk b/connectivity/Library_mork.mk
index b11cb4f..1e565e8 100644
--- a/connectivity/Library_mork.mk
+++ b/connectivity/Library_mork.mk
@@ -27,6 +27,7 @@ $(eval $(call gb_Library_use_libraries,mork, \
     dbtools \
     sal \
     salhelper \
+    utl \
        $(gb_UWINAPI) \
 ))
 
diff --git a/connectivity/source/drivers/mork/MQueryHelper.cxx 
b/connectivity/source/drivers/mork/MQueryHelper.cxx
index e02db93..0f48a6a 100644
--- a/connectivity/source/drivers/mork/MQueryHelper.cxx
+++ b/connectivity/source/drivers/mork/MQueryHelper.cxx
@@ -34,6 +34,7 @@
 #include "resource/common_res.hrc"
 
 #include <connectivity/dbexception.hxx>
+#include <unotools/textsearch.hxx>
 
 using namespace connectivity::mork;
 using namespace connectivity;
@@ -329,9 +330,14 @@ sal_Int32 MQueryHelper::executeQuery(OConnection* 
xConnection)
                     SAL_INFO("connectivity.mork", "MQueryOp::DoesNotContain; 
done");
                     
resultVector.push_back((currentValue.indexOf(searchedValue) == -1) ? sal_True : 
sal_False);
                 } else if (evStr->getCond() == MQueryOp::RegExp) {
-                    SAL_WARN("connectivity.mork", "MQueryOp::RegExp; TODO");
-                    OSL_FAIL("regexp criterion is not yet implemented");
-                    _aQuery->getError().setResId(STR_ERROR_GET_ROW);
+                    SAL_INFO("connectivity.mork", "MQueryOp::RegExp; done");
+                    utl::SearchParam param(
+                        searchedValue, utl::SearchParam::SRCH_REGEXP);
+                    utl::TextSearch ts(param, LANGUAGE_DONTKNOW);
+                    sal_Int32 start = 0;
+                    sal_Int32 end = currentValue.getLength();
+                    resultVector.push_back(
+                        ts.SearchForward(currentValue, &start, &end));
                 }
             } else if (evStr->getCond() == MQueryOp::Exists) {
                 SAL_INFO("connectivity.mork", "MQueryOp::Exists; done");
commit 5d0402cfccd7efaeb4f65c48c295af91e52df0da
Author: Stephan Bergmann <sberg...@redhat.com>
Date:   Sun Nov 25 00:53:58 2012 +0100

    Make ~SearchParam non-inline
    
    ...so clients do not need to link against tl merely because of ~String.
    
    Change-Id: I1cf1dd17c6bed96f6bea765747adbbe962a93fb1

diff --git a/unotools/inc/unotools/textsearch.hxx 
b/unotools/inc/unotools/textsearch.hxx
index 2812ee6..5e4244f 100644
--- a/unotools/inc/unotools/textsearch.hxx
+++ b/unotools/inc/unotools/textsearch.hxx
@@ -79,6 +79,8 @@ public:
 
     SearchParam( const SearchParam& );
 
+    ~SearchParam();
+
     const String&   GetSrchStr() const          { return sSrchStr; }
     const String&   GetReplaceStr() const       { return sReplaceStr; }
     SearchType      GetSrchType() const         { return m_eSrchType; }
diff --git a/unotools/source/i18n/textsearch.cxx 
b/unotools/source/i18n/textsearch.cxx
index a6f8512..770b529 100644
--- a/unotools/source/i18n/textsearch.cxx
+++ b/unotools/source/i18n/textsearch.cxx
@@ -76,6 +76,8 @@ SearchParam::SearchParam( const SearchParam& rParam )
     nTransliterationFlags = rParam.nTransliterationFlags;
 }
 
+SearchParam::~SearchParam() {}
+
 static bool lcl_Equals( const SearchOptions& rSO1, const SearchOptions& rSO2 )
 {
     return rSO1.algorithmType == rSO2.algorithmType &&
commit 8b52b40b1d5111e8fab1f13e903ab4b2c56d892c
Author: Stephan Bergmann <sberg...@redhat.com>
Date:   Sun Nov 25 00:52:19 2012 +0100

    Removing some redundancy
    
    Change-Id: I473e1d09f783b5265f07ff4a7c340c7f52088ab8

diff --git a/extensions/source/bibliography/bibload.cxx 
b/extensions/source/bibliography/bibload.cxx
index 58c1b01..f0ff55a 100644
--- a/extensions/source/bibliography/bibload.cxx
+++ b/extensions/source/bibliography/bibload.cxx
@@ -262,10 +262,10 @@ void BibliographyLoader::load(const Reference< XFrame > & 
rFrame, const rtl::OUS
         try
         {
             using namespace org::freedesktop::PackageKit;
-            Reference< XSyncDbusSessionHelper > 
xSyncDbusSessionHelper(SyncDbusSessionHelper::create(comphelper::getProcessComponentContext()),
 UNO_QUERY);
+            Reference< XSyncDbusSessionHelper > 
xSyncDbusSessionHelper(SyncDbusSessionHelper::create(comphelper::getProcessComponentContext()));
             Sequence< ::rtl::OUString > vPackages(1);
             vPackages[0] = "libreoffice-base";
-            ::rtl::OUString sInteraction("");
+            ::rtl::OUString sInteraction;
             xSyncDbusSessionHelper->InstallPackageNames(0, vPackages, 
sInteraction);
             // FIXME: notify user to restart here
         }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to