[Libreoffice-commits] core.git: 2 commits - sfx2/source

Julien Nabet serval2412 at yahoo.fr
Wed Mar 30 05:06:00 UTC 2016


 sfx2/source/bastyp/fltfnc.cxx        |   23 +++++++++++++++--------
 sfx2/source/notify/eventsupplier.cxx |    8 ++------
 2 files changed, 17 insertions(+), 14 deletions(-)

New commits:
commit 1d060568ce8e7b8aa04c418e282962131801bea4
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Tue Mar 29 23:33:26 2016 +0200

    Replace MACRO_PRFIX and MACRO_POSTFIX in eventsupplier.cxx
    
    Change-Id: Ifd08a3414468e7685f55af66ed05f7a88187fa0e
    Reviewed-on: https://gerrit.libreoffice.org/23606
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>

diff --git a/sfx2/source/notify/eventsupplier.cxx b/sfx2/source/notify/eventsupplier.cxx
index 8e4e523..b232644 100644
--- a/sfx2/source/notify/eventsupplier.cxx
+++ b/sfx2/source/notify/eventsupplier.cxx
@@ -47,10 +47,6 @@
 #include <sfx2/frame.hxx>
 #include <macroloader.hxx>
 
-
-#define MACRO_PRFIX         "macro://"
-#define MACRO_POSTFIX       "()"
-
 using namespace css;
 
 
@@ -458,10 +454,10 @@ void SfxEvents_Impl::NormalizeMacro( const ::comphelper::NamedValueCollection& i
         }
         else if ( !aMacroName.isEmpty() )
         {
-            aScript = MACRO_PRFIX;
+            aScript = "macro://";
             if ( aLibrary != SfxGetpApp()->GetName() && aLibrary != "StarDesktop" && aLibrary != "application" )
                 aScript += ".";
-            aScript += "/" + aMacroName + MACRO_POSTFIX;
+            aScript += "/" + aMacroName + "()";
         }
         else
             // wrong properties
commit 709e99af4958216c75b27c07793d5140214f179d
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Tue Mar 29 23:19:11 2016 +0200

    Replace IMPL_FORWARD_LOOP in sfx2/source/bastyp/fltfnc.cxx
    
    Change-Id: Ic9eda24be82a54c3907ffe6eb749e927db87dee7
    Reviewed-on: https://gerrit.libreoffice.org/23605
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>

diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx
index a1c7b0b..04bfdb1 100644
--- a/sfx2/source/bastyp/fltfnc.cxx
+++ b/sfx2/source/bastyp/fltfnc.cxx
@@ -154,16 +154,23 @@ public:
     }
 };
 
-#define IMPL_FORWARD_LOOP( aMethod, ArgType, aArg )         \
-std::shared_ptr<const SfxFilter> SfxFilterContainer::aMethod( ArgType aArg, SfxFilterFlags nMust, SfxFilterFlags nDont ) const \
-{\
-    SfxFilterMatcher aMatch( pImpl->aName ); \
-    return aMatch.aMethod( aArg, nMust, nDont ); \
+std::shared_ptr<const SfxFilter> SfxFilterContainer::GetFilter4EA(const OUString& rEA, SfxFilterFlags nMust, SfxFilterFlags nDont) const
+{
+    SfxFilterMatcher aMatch(pImpl->aName);
+    return aMatch.GetFilter4EA(rEA, nMust, nDont);
+}
+
+std::shared_ptr<const SfxFilter> SfxFilterContainer::GetFilter4Extension(const OUString& rExt, SfxFilterFlags nMust, SfxFilterFlags nDont) const
+{
+    SfxFilterMatcher aMatch(pImpl->aName);
+    return aMatch.GetFilter4Extension(rExt, nMust, nDont);
 }
 
-IMPL_FORWARD_LOOP( GetFilter4EA, const OUString&, rEA );
-IMPL_FORWARD_LOOP( GetFilter4Extension, const OUString&, rExt );
-IMPL_FORWARD_LOOP( GetFilter4FilterName, const OUString&, rName );
+std::shared_ptr<const SfxFilter> SfxFilterContainer::GetFilter4FilterName(const OUString& rName, SfxFilterFlags nMust, SfxFilterFlags nDont) const
+{
+    SfxFilterMatcher aMatch(pImpl->aName);
+    return aMatch.GetFilter4FilterName(rName, nMust, nDont);
+}
 
 std::shared_ptr<const SfxFilter> SfxFilterContainer::GetAnyFilter( SfxFilterFlags nMust, SfxFilterFlags nDont ) const
 {


More information about the Libreoffice-commits mailing list