Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hi there,

Attached you will find my first (but not last ;-) ) two patches. I wrote a Perl script to recursively search repos for "suspicious" files. (Files with a lot of "empty line, code line, empty line, code line, ..."). As there are over 100 "suspicious" files in "filters", I will finish it later.
Should my script get pushed, too, for others to use it? And if yes, where should I place it?

Licensed under LGPLv3+ / MPL
From fdb91ef4d14af53f0643ce9680f9df9dd8926c54 Mon Sep 17 00:00:00 2001
From: Michael Koch <miko@gmx.ch>
Date: Fri, 21 Jan 2011 02:51:08 +0100
Subject: [PATCH] removed newlines

---
 .../source/ui/relationdesign/RelationTableView.cxx |   18 ------------------
 1 files changed, 0 insertions(+), 18 deletions(-)

diff --git a/dbaccess/source/ui/relationdesign/RelationTableView.cxx 
b/dbaccess/source/ui/relationdesign/RelationTableView.cxx
index 2bb3b3e..0bb53fd 100644
--- a/dbaccess/source/ui/relationdesign/RelationTableView.cxx
+++ b/dbaccess/source/ui/relationdesign/RelationTableView.cxx
@@ -28,33 +28,15 @@
 
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_dbaccess.hxx"
-
 #include "RelationTableView.hxx"
-
-
 #include "JoinExchange.hxx"
-
-
 #include <comphelper/extract.hxx>
-
-
 #include "browserids.hxx"
-
-
 #include <com/sun/star/sdbcx/XTablesSupplier.hpp>
-
-
 #include <com/sun/star/sdbc/XConnection.hpp>
-
-
 #include <com/sun/star/sdbcx/XKeysSupplier.hpp>
-
-
 #include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
-
-
 #include <com/sun/star/sdbcx/KeyType.hpp>
-
 #include <com/sun/star/container/XIndexAccess.hpp>
 #include <com/sun/star/container/XNameAccess.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
-- 
1.7.0.4

From 2b9d641352822061228ada31178ae8a834eb09ca Mon Sep 17 00:00:00 2001
From: Michael Koch <miko@gmx.ch>
Date: Fri, 21 Jan 2011 03:06:00 +0100
Subject: [PATCH] removed newlines

---
 .../source/xmlfilteradaptor/XmlFilterAdaptor.hxx   |   60 ++-----------------
 filter/source/xmlfilterdetect/fdcomp.cxx           |   65 --------------------
 filter/source/xmlfilterdetect/filterdetect.hxx     |   56 ++---------------
 3 files changed, 10 insertions(+), 171 deletions(-)

diff --git a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.hxx 
b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.hxx
index 45eb8a1..b84ae2e 100644
--- a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.hxx
+++ b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.hxx
@@ -52,135 +52,85 @@ enum FilterType
 class XmlFilterAdaptor : public cppu::WeakImplHelper5 
 
 < 
-
     com::sun::star::document::XFilter,
-
     com::sun::star::document::XExporter,
-
     com::sun::star::document::XImporter,
-
     com::sun::star::lang::XInitialization,
-
     com::sun::star::lang::XServiceInfo
-

 
 {
 
 protected:
 
-  ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMSF;
-
-  ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > mxDoc;
-
-  ::rtl::OUString msFilterName;
-
-  ::com::sun::star::uno::Sequence< ::rtl::OUString > msUserData;
-
-   ::rtl::OUString msTemplateName;
+    ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMSF;
+    ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > mxDoc;
+    ::rtl::OUString msFilterName;
+    ::com::sun::star::uno::Sequence< ::rtl::OUString > msUserData;
+    ::rtl::OUString msTemplateName;
 
     FilterType meType;
 
     sal_Bool SAL_CALL exportImpl( const ::com::sun::star::uno::Sequence< 
::com::sun::star::beans::PropertyValue >& aDescriptor ) 
-
         throw (::com::sun::star::uno::RuntimeException);
 
     sal_Bool SAL_CALL importImpl( const ::com::sun::star::uno::Sequence< 
::com::sun::star::beans::PropertyValue >& aDescriptor ) 
-
         throw (::com::sun::star::uno::RuntimeException);
 
-
-
 public:
 
     XmlFilterAdaptor( const ::com::sun::star::uno::Reference< 
::com::sun::star::lang::XMultiServiceFactory > &rxMSF)
-
         : mxMSF( rxMSF ) {}
 
     virtual ~XmlFilterAdaptor() {}
 
-
-
     // XFilter
-
     virtual sal_Bool SAL_CALL filter( const ::com::sun::star::uno::Sequence< 
::com::sun::star::beans::PropertyValue >& aDescriptor ) 
-
         throw (::com::sun::star::uno::RuntimeException);
 
     virtual void SAL_CALL cancel(  ) 
-
         throw (::com::sun::star::uno::RuntimeException);
 
-
-
     // XExporter
-
     virtual void SAL_CALL setSourceDocument( const ::com::sun::star::uno::Reference< 
::com::sun::star::lang::XComponent >& xDoc ) 
-
         throw (::com::sun::star::lang::IllegalArgumentException, 
::com::sun::star::uno::RuntimeException);
 
-
-
     // XImporter
 
     virtual void SAL_CALL setTargetDocument( const ::com::sun::star::uno::Reference< 
::com::sun::star::lang::XComponent >& xDoc ) 
-
         throw (::com::sun::star::lang::IllegalArgumentException, 
::com::sun::star::uno::RuntimeException);
 
-
-
     // XInitialization
 
     virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< 
::com::sun::star::uno::Any >& aArguments ) 
-
         throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
 
-
-
     // XServiceInfo
 
     virtual ::rtl::OUString SAL_CALL getImplementationName(  ) 
-
         throw (::com::sun::star::uno::RuntimeException);
 
     virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) 
-
         throw (::com::sun::star::uno::RuntimeException);
 
     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(  
) 
-
         throw (::com::sun::star::uno::RuntimeException);
-
 };
 
-
-
 ::rtl::OUString XmlFilterAdaptor_getImplementationName()
-
     throw ( ::com::sun::star::uno::RuntimeException );
 
-
-
 sal_Bool SAL_CALL XmlFilterAdaptor_supportsService( const ::rtl::OUString& ServiceName ) 
-
     throw ( ::com::sun::star::uno::RuntimeException );
 
-
-
 ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL 
XmlFilterAdaptor_getSupportedServiceNames(  ) 
-
     throw ( ::com::sun::star::uno::RuntimeException );
 
-
-
 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
 
 SAL_CALL XmlFilterAdaptor_createInstance( const ::com::sun::star::uno::Reference< 
::com::sun::star::lang::XMultiServiceFactory > & rSMgr)
-
     throw ( ::com::sun::star::uno::Exception );
 
-
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/xmlfilterdetect/fdcomp.cxx b/filter/source/xmlfilterdetect/fdcomp.cxx
index 2b24406..a41303f 100644
--- a/filter/source/xmlfilterdetect/fdcomp.cxx
+++ b/filter/source/xmlfilterdetect/fdcomp.cxx
@@ -28,43 +28,23 @@
 
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_filter.hxx"
-
 #include <stdio.h>
-
-
-
 #include <osl/mutex.hxx>
-
 #include <osl/thread.h>
-
 #include <cppuhelper/factory.hxx>
 
-
-
 #ifndef _COM_SUN_STAR_LANG_XSINGLESERVICEFACTORY_HPP_
-
 #include <com/sun/star/lang/XSingleServiceFactory.hpp>
-
 #endif
 
-
-
 #include "filterdetect.hxx"
 
-
-
 using namespace ::rtl;
-
 using namespace ::cppu;
-
 using namespace ::com::sun::star::uno;
-
 using namespace ::com::sun::star::lang;
-
 using namespace ::com::sun::star::registry;
 
-
-
 extern "C"
 
 {
@@ -72,109 +52,64 @@ extern "C"
 
//==================================================================================================
 
 void SAL_CALL component_getImplementationEnvironment(
-
     const sal_Char ** ppEnvTypeName, uno_Environment ** /* ppEnv */ )
-
 {
-
     *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
-
 }
 
 
//==================================================================================================
 
 sal_Bool SAL_CALL component_writeInfo(
-
     void * /* pServiceManager */, void * pRegistryKey )
-
 {
-
     if (pRegistryKey)
-
     {
-
         try
-
         {
-
             Reference< XRegistryKey > xNewKey(
-
                 reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( 
FilterDetect_getImplementationName() ) ); 
-
             xNewKey = xNewKey->createKey( OUString( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES" 
)) );
 
-            
-
             const Sequence< OUString > & rSNL = FilterDetect_getSupportedServiceNames();
-
             const OUString * pArray = rSNL.getConstArray();
 
             for ( sal_Int32 nPos = rSNL.getLength(); nPos--; )
-
                 xNewKey->createKey( pArray[nPos] );
 
-
-
             return sal_True;
-
         }
-
         catch (InvalidRegistryException &)
-
         {
-
             OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
-
         }
-
     }
-
     return sal_False;
-
 }
 
 
//==================================================================================================
 
 void * SAL_CALL component_getFactory(
-
     const sal_Char * pImplName, void * pServiceManager, void * /* pRegistryKey */ )
-
 {
-
     void * pRet = 0;
 
-    
-
     OUString implName = OUString::createFromAscii( pImplName );
 
     if ( pServiceManager && implName.equals(FilterDetect_getImplementationName()) )
-
     {
-
         Reference< XSingleServiceFactory > xFactory( createSingleFactory(
-
             reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
 
             OUString::createFromAscii( pImplName ),
-
             FilterDetect_createInstance, FilterDetect_getSupportedServiceNames() ) );
 
-        
-
         if (xFactory.is())
-
         {
-
             xFactory->acquire();
-
             pRet = xFactory.get();
-
         }
-
     }
-
     return pRet;
-
 }
 
 }
diff --git a/filter/source/xmlfilterdetect/filterdetect.hxx 
b/filter/source/xmlfilterdetect/filterdetect.hxx
index b85b36b..62f7486 100644
--- a/filter/source/xmlfilterdetect/filterdetect.hxx
+++ b/filter/source/xmlfilterdetect/filterdetect.hxx
@@ -53,116 +53,70 @@ enum FilterType
  * member calls */
 
 class FilterDetect : public cppu::WeakImplHelper3 
-
 < 
-
-
     com::sun::star::document::XExtendedFilterDetection,
-
     com::sun::star::lang::XInitialization,
-
     com::sun::star::lang::XServiceInfo
-

 
 {
   
 protected:
 
-  ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMSF;
-
-  ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > mxDoc;
-
-  ::rtl::OUString msFilterName;
-
-  ::com::sun::star::uno::Sequence< ::rtl::OUString > msUserData;
-
-   ::rtl::OUString msTemplateName;
-
-    
+    ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMSF;
+    ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > mxDoc;
+    ::rtl::OUString msFilterName;
+    ::com::sun::star::uno::Sequence< ::rtl::OUString > msUserData;
+    ::rtl::OUString msTemplateName;
 
     sal_Bool SAL_CALL exportImpl( const ::com::sun::star::uno::Sequence< 
::com::sun::star::beans::PropertyValue >& aDescriptor ) 
-
         throw (::com::sun::star::uno::RuntimeException);
 
     sal_Bool SAL_CALL importImpl( const ::com::sun::star::uno::Sequence< 
::com::sun::star::beans::PropertyValue >& aDescriptor ) 
-
         throw (::com::sun::star::uno::RuntimeException);
 
-    
-   
-
-
 public:
 
     FilterDetect( const ::com::sun::star::uno::Reference< 
::com::sun::star::lang::XMultiServiceFactory > &rxMSF)
-
         : mxMSF( rxMSF ) {}
 
     virtual ~FilterDetect() {}
 
-
-
-    
-
-
      //XExtendedFilterDetection
      virtual ::rtl::OUString SAL_CALL detect( com::sun::star::uno::Sequence< 
com::sun::star::beans::PropertyValue >& lDescriptor ) 
             throw( com::sun::star::uno::RuntimeException );
 
 
     // XInitialization
-
     virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< 
::com::sun::star::uno::Any >& aArguments ) 
-
         throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
 
-
-
     // XServiceInfo
-
     virtual ::rtl::OUString SAL_CALL getImplementationName(  ) 
-
         throw (::com::sun::star::uno::RuntimeException);
 
     virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) 
-
         throw (::com::sun::star::uno::RuntimeException);
 
     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(  
) 
-
         throw (::com::sun::star::uno::RuntimeException);
 
 };
 
-
-
 ::rtl::OUString FilterDetect_getImplementationName()
-
     throw ( ::com::sun::star::uno::RuntimeException );
 
-
-
 sal_Bool SAL_CALL FilterDetect_supportsService( const ::rtl::OUString& ServiceName ) 
-
     throw ( ::com::sun::star::uno::RuntimeException );
 
-
-
 ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL FilterDetect_getSupportedServiceNames( 
 ) 
-
     throw ( ::com::sun::star::uno::RuntimeException );
 
-
-
 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
 
 SAL_CALL FilterDetect_createInstance( const ::com::sun::star::uno::Reference< 
::com::sun::star::lang::XMultiServiceFactory > & rSMgr)
-
     throw ( ::com::sun::star::uno::Exception );
 
-
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
-- 
1.7.0.4


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.