[Libreoffice-commits] core.git: include/vbahelper vbahelper/source

Noel Grandin noel at peralex.com
Fri Feb 26 11:21:56 UTC 2016


 include/vbahelper/vbahelper.hxx          |    6 +++---
 vbahelper/source/vbahelper/vbahelper.cxx |   11 +++--------
 2 files changed, 6 insertions(+), 11 deletions(-)

New commits:
commit 236f3089175c601e2be36d034b3214d06be89767
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Feb 26 11:11:18 2016 +0200

    loplugin:unuseddefaultparam in include/vbahelper
    
    Change-Id: Idac2134dce40a54cc04f595464357a0f9ca71be0

diff --git a/include/vbahelper/vbahelper.hxx b/include/vbahelper/vbahelper.hxx
index d7eb4e6..c3ca394 100644
--- a/include/vbahelper/vbahelper.hxx
+++ b/include/vbahelper/vbahelper.hxx
@@ -71,8 +71,8 @@ namespace ooo
         VBAHELPER_DLLPUBLIC css::uno::Reference< css::script::XTypeConverter > getTypeConverter( const css::uno::Reference< css::uno::XComponentContext >& xContext ) throw (css::uno::RuntimeException);
 
         VBAHELPER_DLLPUBLIC void dispatchRequests( const css::uno::Reference< css::frame::XModel>& xModel, const OUString& aUrl );
-     VBAHELPER_DLLPUBLIC void dispatchRequests (const css::uno::Reference< css::frame::XModel>& xModel, const OUString & aUrl, const css::uno::Sequence< css::beans::PropertyValue >& sProps );
-        VBAHELPER_DLLPUBLIC void dispatchExecute(SfxViewShell* pView, sal_uInt16 nSlot, SfxCallMode nCall = SfxCallMode::SYNCHRON );
+        VBAHELPER_DLLPUBLIC void dispatchRequests (const css::uno::Reference< css::frame::XModel>& xModel, const OUString & aUrl, const css::uno::Sequence< css::beans::PropertyValue >& sProps );
+        VBAHELPER_DLLPUBLIC void dispatchExecute(SfxViewShell* pView, sal_uInt16 nSlot );
         VBAHELPER_DLLPUBLIC sal_Int32 OORGBToXLRGB( sal_Int32 );
         VBAHELPER_DLLPUBLIC sal_Int32 XLRGBToOORGB( sal_Int32 );
         VBAHELPER_DLLPUBLIC css::uno::Any OORGBToXLRGB( const css::uno::Any& );
@@ -97,7 +97,7 @@ namespace ooo
         VBAHELPER_DLLPUBLIC OUString extractStringFromAny( const css::uno::Any& rAny, const OUString& rDefault, bool bUppercaseBool = false ) throw (css::uno::RuntimeException);
 
         VBAHELPER_DLLPUBLIC OUString getAnyAsString( const css::uno::Any& pvargItem ) throw ( css::uno::RuntimeException );
-        VBAHELPER_DLLPUBLIC OUString VBAToRegexp(const OUString &rIn, bool bForLike = false); // needs to be in an uno service ( already this code is duplicated in basic )
+        VBAHELPER_DLLPUBLIC OUString VBAToRegexp(const OUString &rIn); // needs to be in an uno service ( already this code is duplicated in basic )
         VBAHELPER_DLLPUBLIC double getPixelTo100thMillimeterConversionFactor( const css::uno::Reference< css::awt::XDevice >& xDevice, bool bVertical);
         VBAHELPER_DLLPUBLIC double PointsToPixels( const css::uno::Reference< css::awt::XDevice >& xDevice, double fPoints, bool bVertical);
         VBAHELPER_DLLPUBLIC double PixelsToPoints( const css::uno::Reference< css::awt::XDevice >& xDevice, double fPixels, bool bVertical);
diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx
index 721c7f7..effbbf0 100644
--- a/vbahelper/source/vbahelper/vbahelper.cxx
+++ b/vbahelper/source/vbahelper/vbahelper.cxx
@@ -120,7 +120,7 @@ aNULL()
     return aNULLL;
 }
 
-void dispatchExecute(SfxViewShell* pViewShell, sal_uInt16 nSlot, SfxCallMode nCall)
+void dispatchExecute(SfxViewShell* pViewShell, sal_uInt16 nSlot)
 {
     SfxViewFrame* pViewFrame = nullptr;
     if ( pViewShell )
@@ -130,7 +130,7 @@ void dispatchExecute(SfxViewShell* pViewShell, sal_uInt16 nSlot, SfxCallMode nCa
         SfxDispatcher* pDispatcher = pViewFrame->GetDispatcher();
         if( pDispatcher )
         {
-            pDispatcher->Execute( nSlot , nCall );
+            pDispatcher->Execute( nSlot , SfxCallMode::SYNCHRON );
         }
     }
 }
@@ -554,15 +554,13 @@ bool NeedEsc(sal_Unicode cCode)
     return OUString(".^$+\\|{}()").indexOf(cCode) != -1;
 }
 
-OUString VBAToRegexp(const OUString &rIn, bool bForLike )
+OUString VBAToRegexp(const OUString &rIn)
 {
     OUStringBuffer sResult;
     const sal_Unicode *start = rIn.getStr();
     const sal_Unicode *end = start + rIn.getLength();
 
     int seenright = 0;
-    if ( bForLike )
-        sResult.append('^');
 
     while (start < end)
     {
@@ -626,9 +624,6 @@ OUString VBAToRegexp(const OUString &rIn, bool bForLike )
         }
     }
 
-    if ( bForLike )
-        sResult.append('$');
-
     return sResult.makeStringAndClear( );
 }
 


More information about the Libreoffice-commits mailing list