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

Stephan Bergmann sbergman at redhat.com
Mon Apr 14 03:26:04 PDT 2014


 filter/source/flash/swfdialog.cxx        |    1 
 filter/source/flash/swffilter.cxx        |    1 
 filter/source/flash/swfuno.cxx           |   13 ------
 filter/source/flash/swfuno.hxx           |   63 +++++++++++++++++++++++++++++++
 filter/source/flash/swfwriter1.cxx       |    1 
 filter/source/graphicfilter/eps/eps.cxx  |   12 -----
 filter/source/graphicfilter/icgm/cgm.cxx |    6 --
 filter/source/msfilter/msdffimp.cxx      |    9 ----
 filter/source/msfilter/services.cxx      |   15 -------
 filter/source/msfilter/svdfppt.cxx       |   23 -----------
 filter/source/placeware/filter.cxx       |    1 
 filter/source/placeware/filter.hxx       |   55 +++++++++++++++++++++++++++
 filter/source/placeware/uno.cxx          |    9 ----
 filter/source/svg/svgexport.cxx          |   16 -------
 include/filter/msfilter/msvbahelper.hxx  |    8 +++
 15 files changed, 134 insertions(+), 99 deletions(-)

New commits:
commit 52494aad920c713e17cd2c5e452a5e634f1bd2e7
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Apr 14 12:25:30 2014 +0200

    Clean up function declarations and some unused functions
    
    Change-Id: I68b488d45c77ebf82029bfede98dca2400e02f2f

diff --git a/filter/source/flash/swfdialog.cxx b/filter/source/flash/swfdialog.cxx
index 9a7b5af..89dcfaf 100644
--- a/filter/source/flash/swfdialog.cxx
+++ b/filter/source/flash/swfdialog.cxx
@@ -19,6 +19,7 @@
 
 
 #include "swfdialog.hxx"
+#include "swfuno.hxx"
 #include "impswfdialog.hxx"
 #include <vcl/svapp.hxx>
 #include <vcl/dialog.hxx>
diff --git a/filter/source/flash/swffilter.cxx b/filter/source/flash/swffilter.cxx
index 1aeac4f..7cf9fd9 100644
--- a/filter/source/flash/swffilter.cxx
+++ b/filter/source/flash/swffilter.cxx
@@ -43,6 +43,7 @@
 #include <osl/file.hxx>
 
 #include "swfexporter.hxx"
+#include "swfuno.hxx"
 
 #include <string.h>
 
diff --git a/filter/source/flash/swfuno.cxx b/filter/source/flash/swfuno.cxx
index ec93520..5c4066b 100644
--- a/filter/source/flash/swfuno.cxx
+++ b/filter/source/flash/swfuno.cxx
@@ -24,23 +24,14 @@
 #include <cppuhelper/factory.hxx>
 #include <com/sun/star/lang/XSingleServiceFactory.hpp>
 
+#include <swfuno.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;
 
-namespace swf {
-extern OUString FlashExportFilter_getImplementationName() throw ( RuntimeException );
-extern sal_Bool SAL_CALL FlashExportFilter_supportsService( const OUString& ServiceName ) throw ( RuntimeException );
-extern Sequence< OUString > SAL_CALL FlashExportFilter_getSupportedServiceNames()  throw ( RuntimeException );
-extern Reference< XInterface > SAL_CALL FlashExportFilter_createInstance( const Reference< XMultiServiceFactory > & rSMgr) throw ( Exception );
-}
-
-extern OUString SWFDialog_getImplementationName () throw (com::sun::star::uno::RuntimeException);
-extern com::sun::star::uno::Sequence< OUString > SAL_CALL SWFDialog_getSupportedServiceNames() throw (com::sun::star::uno::RuntimeException);
-extern com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL SWFDialog_createInstance( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > & rSMgr) throw( com::sun::star::uno::Exception );
-
 using namespace ::swf;
 
 extern "C"
diff --git a/filter/source/flash/swfuno.hxx b/filter/source/flash/swfuno.hxx
new file mode 100644
index 0000000..1d57453
--- /dev/null
+++ b/filter/source/flash/swfuno.hxx
@@ -0,0 +1,63 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_FILTER_SOURCE_FLASH_SWFUNO_HXX
+#define INCLUDED_FILTER_SOURCE_FLASH_SWFUNO_HXX
+
+#include <sal/config.h>
+
+#include <com/sun/star/uno/Exception.hpp>
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/RuntimeException.hpp>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <rtl/ustring.hxx>
+#include <sal/types.h>
+
+namespace com { namespace sun { namespace star {
+    namespace lang { class XMultiSerivceFactory; }
+    namespace uno { class XInterface; }
+} } }
+
+namespace swf {
+
+OUString FlashExportFilter_getImplementationName()
+    throw (css::uno::RuntimeException);
+
+css::uno::Sequence<OUString> SAL_CALL
+FlashExportFilter_getSupportedServiceNames() throw (css::uno::RuntimeException);
+
+css::uno::Reference<css::uno::XInterface> SAL_CALL
+FlashExportFilter_createInstance(
+    css::uno::Reference<css::lang::XMultiServiceFactory> const & rSMgr)
+    throw (css::uno::Exception);
+
+}
+
+OUString SWFDialog_getImplementationName () throw (css::uno::RuntimeException);
+
+css::uno::Sequence<OUString> SAL_CALL SWFDialog_getSupportedServiceNames()
+    throw (css::uno::RuntimeException);
+
+css::uno::Reference<css::uno::XInterface> SAL_CALL SWFDialog_createInstance(
+    css::uno::Reference<css::lang::XMultiServiceFactory> const & rSMgr)
+    throw(css::uno::Exception);
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx
index 25b1fb5..c8bc2e8 100644
--- a/filter/source/flash/swfwriter1.cxx
+++ b/filter/source/flash/swfwriter1.cxx
@@ -47,7 +47,6 @@ using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::io;
 using namespace ::com::sun::star::beans;
 
-extern sal_uInt16 getMaxBitsUnsigned( sal_uInt32 nValue );
 extern sal_uInt16 getMaxBitsSigned( sal_Int32 nValue );
 
 static MapMode aTWIPSMode( MAP_TWIP );
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx
index be8dcd8..9e5d1aa 100644
--- a/filter/source/graphicfilter/eps/eps.cxx
+++ b/filter/source/graphicfilter/eps/eps.cxx
@@ -196,7 +196,6 @@ private:
     void                ImplTranslate( const double& fX, const double& fY, sal_uInt32 nMode = PS_RET );
     void                ImplScale( const double& fX, const double& fY, sal_uInt32 nMode = PS_RET );
 
-    void                ImplWriteLine( const Polygon & rPolygon );
     void                ImplAddPath( const Polygon & rPolygon );
     void                ImplWriteLineInfo( double fLineWidth, double fMiterLimit, SvtGraphicStroke::CapType eLineCap,
                                     SvtGraphicStroke::JoinType eJoinType, SvtGraphicStroke::DashArray& rDashArray );
@@ -222,7 +221,6 @@ private:
     inline void         ImplWriteLineColor( sal_uLong nMode = PS_RET );
     inline void         ImplWriteFillColor( sal_uLong nMode = PS_RET );
     inline void         ImplWriteTextColor( sal_uLong nMode = PS_RET );
-    inline void         ImplWriteTextFillColor( sal_uLong nMode = PS_RET );
     void                ImplWriteColor( sal_uLong nMode );
 
     double              ImplGetScaling( const MapMode& );
@@ -2304,16 +2302,6 @@ inline void PSWriter::ImplWriteTextColor( sal_uLong nMode )
         ImplWriteColor( nMode );
     }
 }
-inline void PSWriter::ImplWriteTextFillColor( sal_uLong nMode )
-{
-    if ( aColor != aTextFillColor )
-    {
-        aColor = aTextFillColor;
-        ImplWriteColor( nMode );
-    }
-}
-
-
 
 void PSWriter::ImplWriteColor( sal_uLong nMode )
 {
diff --git a/filter/source/graphicfilter/icgm/cgm.cxx b/filter/source/graphicfilter/icgm/cgm.cxx
index 0b1882f..a89fd3b 100644
--- a/filter/source/graphicfilter/icgm/cgm.cxx
+++ b/filter/source/graphicfilter/icgm/cgm.cxx
@@ -691,12 +691,6 @@ sal_Bool CGM::Write( SvStream& rIStm )
     return mbStatus;
 };
 
-SvStream& operator>>( SvStream& rOStm, CGM& /*rCGM*/ )
-{
-
-    return rOStm;
-};
-
 // GraphicImport - the exported function
 extern "C" SAL_DLLPUBLIC_EXPORT sal_uInt32 SAL_CALL
 ImportCGM( OUString& rFileName, uno::Reference< frame::XModel > & rXModel, sal_uInt32 nMode, void* pProgressBar )
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 8d6457b..574cfb7 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -1086,15 +1086,6 @@ void GetShadeColors( const SvxMSDffManager& rManager, const DffPropertyReader& r
     rIn.Seek( nPos );
 }
 
-struct QuantErr
-{
-    double  fRed;
-    double  fGreen;
-    double  fBlue;
-
-    QuantErr() : fRed( 0.0 ), fGreen( 0.0 ), fBlue( 0.0 ){};
-};
-
 void ApplyRectangularGradientAsBitmap( const SvxMSDffManager& rManager, SvStream& rIn, SfxItemSet& rSet, const std::vector< ShadeColor >& rShadeColors, const DffObjData& rObjData, sal_Int32 nFix16Angle )
 {
     Size aBitmapSizePixel( static_cast< sal_Int32 >( ( rObjData.aBoundRect.GetWidth() / 2540.0 ) * 90.0 ),      // we will create a bitmap with 90 dpi
diff --git a/filter/source/msfilter/services.cxx b/filter/source/msfilter/services.cxx
index 87ea385..ec63f50 100644
--- a/filter/source/msfilter/services.cxx
+++ b/filter/source/msfilter/services.cxx
@@ -18,23 +18,10 @@
  */
 
 #include <cppuhelper/implementationentry.hxx>
+#include <filter/msfilter/msvbahelper.hxx>
 
 using namespace ::com::sun::star::uno;
 
-// Declare static functions providing service information =====================
-
-#define DECLARE_FUNCTIONS( className )                                                  \
-extern OUString SAL_CALL className##_getImplementationName() throw();                   \
-extern Sequence< OUString > SAL_CALL className##_getSupportedServiceNames() throw();    \
-extern Reference< XInterface > SAL_CALL className##_createInstance(                     \
-    const Reference< XComponentContext >& rxContext ) throw (Exception)
-
-namespace ooo { namespace vba { DECLARE_FUNCTIONS( VBAMacroResolver ); } }
-
-#undef DECLARE_FUNCTIONS
-
-
-
 namespace {
 
 #define IMPLEMENTATION_ENTRY( className ) \
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 0a875ff..aa9ad1e 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -5254,29 +5254,6 @@ PPTStyleTextPropReader::~PPTStyleTextPropReader()
         delete *it;
 }
 
-struct FieldEntry
-{
-    sal_uInt32  nFieldType;
-    sal_uInt32  nFieldStartPos;
-    sal_uInt32  nFieldEndPos;
-    OUString    aFieldUrl;
-
-    FieldEntry( sal_uInt32 nType, sal_uInt32 nStart, sal_uInt32 nEnd )
-    {
-        nFieldType = nType;
-        nFieldStartPos = nStart;
-        nFieldEndPos = nEnd;
-    }
-    FieldEntry( FieldEntry& rFieldEntry )
-    {
-        nFieldType = rFieldEntry.nFieldType;
-        nFieldStartPos = rFieldEntry.nFieldStartPos;
-        nFieldEndPos = rFieldEntry.nFieldEndPos;
-        aFieldUrl = rFieldEntry.aFieldUrl;
-    }
-};
-
-
 PPTPortionObj::PPTPortionObj( const PPTStyleSheet& rStyleSheet, sal_uInt32 nInstance, sal_uInt32 nDepth ) :
     PPTCharPropSet  ( 0 ),
     mrStyleSheet    ( rStyleSheet ),
diff --git a/filter/source/placeware/filter.cxx b/filter/source/placeware/filter.cxx
index d09e49cd..e4064cf 100644
--- a/filter/source/placeware/filter.cxx
+++ b/filter/source/placeware/filter.cxx
@@ -26,6 +26,7 @@
 #include <comphelper/processfactory.hxx>
 
 #include "exporter.hxx"
+#include "filter.hxx"
 
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
diff --git a/filter/source/placeware/filter.hxx b/filter/source/placeware/filter.hxx
new file mode 100644
index 0000000..d76c040
--- /dev/null
+++ b/filter/source/placeware/filter.hxx
@@ -0,0 +1,55 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_FILTER_SOURCE_PLACEWARE_FILTER_HXX
+#define INCLUDED_FILTER_SOURCE_PLACEWARE_FILTER_HXX
+
+#include <sal/config.h>
+
+#include <com/sun/star/uno/Exception.hpp>
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/RuntimeException.hpp>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <rtl/ustring.hxx>
+#include <sal/types.h>
+
+namespace com { namespace sun { namespace star {
+    namespace lang { class XMultiSerivceFactory; }
+    namespace uno { class XInterface; }
+} } }
+
+namespace pwp {
+
+OUString PlaceWareExportFilter_getImplementationName()
+    throw (css::uno::RuntimeException);
+
+css::uno::Sequence<OUString> SAL_CALL
+PlaceWareExportFilter_getSupportedServiceNames()
+    throw (css::uno::RuntimeException);
+
+css::uno::Reference<css::uno::XInterface> SAL_CALL
+PlaceWareExportFilter_createInstance(
+    css::uno::Reference<css::lang::XMultiServiceFactory> const & rSMgr)
+    throw (css::uno::Exception);
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/placeware/uno.cxx b/filter/source/placeware/uno.cxx
index ecb8de0..fba1033 100644
--- a/filter/source/placeware/uno.cxx
+++ b/filter/source/placeware/uno.cxx
@@ -25,19 +25,14 @@
 #include <cppuhelper/factory.hxx>
 #include <com/sun/star/lang/XSingleServiceFactory.hpp>
 
+#include <filter.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;
 
-namespace pwp {
-extern OUString PlaceWareExportFilter_getImplementationName() throw ( RuntimeException );
-extern sal_Bool SAL_CALL PlaceWareExportFilter_supportsService( const OUString& ServiceName ) throw ( RuntimeException );
-extern Sequence< OUString > SAL_CALL PlaceWareExportFilter_getSupportedServiceNames()  throw ( RuntimeException );
-extern Reference< XInterface > SAL_CALL PlaceWareExportFilter_createInstance( const Reference< XMultiServiceFactory > & rSMgr) throw ( Exception );
-}
-
 using namespace ::pwp;
 
 extern "C"
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index 9b7e2c4..87d78ed 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -197,22 +197,6 @@ public:
     virtual ~FooterField() {}
 };
 
-class HeaderField : public FixedTextField
-{
-public:
-    HeaderField() {}
-    virtual OUString getClassName() const SAL_OVERRIDE
-    {
-        return OUString( "HeaderField" );
-    }
-    virtual void growCharSet( SVGFilter::UCharSetMapMap & aTextFieldCharSets ) const SAL_OVERRIDE
-    {
-        static const OUString sFieldId = aOOOAttrHeaderField;
-        implGrowCharSet( aTextFieldCharSets, text, sFieldId );
-    }
-    virtual ~HeaderField() {}
-};
-
 class VariableTextField : public TextField
 {
 public:
diff --git a/include/filter/msfilter/msvbahelper.hxx b/include/filter/msfilter/msvbahelper.hxx
index d359314..7fbe36d 100644
--- a/include/filter/msfilter/msvbahelper.hxx
+++ b/include/filter/msfilter/msvbahelper.hxx
@@ -96,7 +96,15 @@ private:
     OUString            maProjectName;
 };
 
+OUString SAL_CALL VBAMacroResolver_getImplementationName();
 
+css::uno::Sequence<OUString> SAL_CALL
+VBAMacroResolver_getSupportedServiceNames();
+
+css::uno::Reference<css::uno::XInterface> SAL_CALL
+VBAMacroResolver_createInstance(
+    css::uno::Reference<css::uno::XComponentContext > const & rxContext)
+    throw (css::uno::Exception);
 
 } // namespace vba
 } // namespace ooo


More information about the Libreoffice-commits mailing list