[Libreoffice-commits] .: filter/inc filter/Library_msfilter.mk filter/Package_inc.mk filter/source sc/source sd/source sw/source

Michael Meeks michael at kemper.freedesktop.org
Fri Feb 24 02:47:17 PST 2012


 filter/Library_msfilter.mk                    |    1 
 filter/Package_inc.mk                         |    1 
 filter/inc/filter/msfilter/msdffimp.hxx       |    7 
 filter/inc/filter/msfilter/msfiltertracer.hxx |   97 ----------
 filter/inc/filter/msfilter/svdfppt.hxx        |    4 
 filter/source/msfilter/msdffimp.cxx           |   26 --
 filter/source/msfilter/msfiltertracer.cxx     |  230 --------------------------
 filter/source/msfilter/svdfppt.cxx            |   20 --
 sc/source/filter/excel/xiescher.cxx           |    2 
 sc/source/filter/excel/xltracer.cxx           |   13 -
 sc/source/filter/inc/xltracer.hxx             |    7 
 sd/source/filter/ppt/pptin.cxx                |   17 -
 sd/source/filter/ppt/pptin.hxx                |    3 
 sd/source/filter/sdpptwrp.cxx                 |    1 
 sw/source/filter/ww8/tracer.cxx               |   76 --------
 sw/source/filter/ww8/tracer.hxx               |    3 
 sw/source/filter/ww8/ww8par.cxx               |    3 
 17 files changed, 16 insertions(+), 495 deletions(-)

New commits:
commit 168fc5c022538d287293bf933adde4b98c6aca37
Author: Szabolcs Dezsi <dezsiszabi at hotmail.com>
Date:   Fri Feb 24 11:43:42 2012 +0100

    Removed MSFilterTracer and all references to it

diff --git a/filter/Library_msfilter.mk b/filter/Library_msfilter.mk
index 316a47d..e454dfb 100644
--- a/filter/Library_msfilter.mk
+++ b/filter/Library_msfilter.mk
@@ -64,7 +64,6 @@ $(eval $(call gb_Library_add_exception_objects,msfilter,\
 	filter/source/msfilter/eschesdo \
 	filter/source/msfilter/mscodec \
 	filter/source/msfilter/msdffimp \
-	filter/source/msfilter/msfiltertracer \
 	filter/source/msfilter/msocximex \
 	filter/source/msfilter/msoleexp \
 	filter/source/msfilter/mstoolbar \
diff --git a/filter/Package_inc.mk b/filter/Package_inc.mk
index af2ade6..27a6c45 100644
--- a/filter/Package_inc.mk
+++ b/filter/Package_inc.mk
@@ -24,7 +24,6 @@ $(eval $(call gb_Package_add_file,filter_inc,inc/filter/msfilter/countryid.hxx,f
 $(eval $(call gb_Package_add_file,filter_inc,inc/filter/msfilter/escherex.hxx,filter/msfilter/escherex.hxx))
 $(eval $(call gb_Package_add_file,filter_inc,inc/filter/msfilter/mscodec.hxx,filter/msfilter/mscodec.hxx))
 $(eval $(call gb_Package_add_file,filter_inc,inc/filter/msfilter/msdffimp.hxx,filter/msfilter/msdffimp.hxx))
-$(eval $(call gb_Package_add_file,filter_inc,inc/filter/msfilter/msfiltertracer.hxx,filter/msfilter/msfiltertracer.hxx))
 $(eval $(call gb_Package_add_file,filter_inc,inc/filter/msfilter/msocximex.hxx,filter/msfilter/msocximex.hxx))
 $(eval $(call gb_Package_add_file,filter_inc,inc/filter/msfilter/msoleexp.hxx,filter/msfilter/msoleexp.hxx))
 $(eval $(call gb_Package_add_file,filter_inc,inc/filter/msfilter/mstoolbar.hxx,filter/msfilter/mstoolbar.hxx))
diff --git a/filter/inc/filter/msfilter/msdffimp.hxx b/filter/inc/filter/msfilter/msdffimp.hxx
index 1616adb..be40fda 100644
--- a/filter/inc/filter/msfilter/msdffimp.hxx
+++ b/filter/inc/filter/msfilter/msdffimp.hxx
@@ -37,7 +37,6 @@
 #include <tools/gen.hxx>
 #include <tools/table.hxx>
 #include <svx/msdffdef.hxx>
-#include <filter/msfilter/msfiltertracer.hxx>
 #include <vcl/graph.hxx>
 #include <string.h>
 #include <map>
@@ -576,7 +575,6 @@ public:
     DffRecordManager    maShapeRecords;
     ColorData           mnDefaultColor;
 
-    MSFilterTracer*     mpTracer;
     sal_Bool            mbTracing;
 
     Color MSO_TEXT_CLR_ToColor( sal_uInt32 nColorCode ) const;
@@ -619,12 +617,11 @@ public:
                      long      nApplicationScale    =  0,
                      ColorData mnDefaultColor_      =  COL_DEFAULT,
                      sal_uLong     nDefaultFontHeight_  = 24,
-                     SvStream* pStData2_            =  0,
-                     MSFilterTracer* pTracer        = NULL );
+                     SvStream* pStData2_            =  0 );
 
     // in PPT werden die Parameter DGGContainerOffset und PicStream
     // mit Hilfe einer Init Routine Uebergeben.
-    SvxMSDffManager( SvStream& rStCtrl, const String& rBaseURL, MSFilterTracer* pTracer );
+    SvxMSDffManager( SvStream& rStCtrl, const String& rBaseURL );
     void InitSvxMSDffManager(sal_uInt32 nOffsDgg_, SvStream* pStData_, sal_uInt32 nSvxMSDffOLEConvFlags);
     void SetDgContainer( SvStream& rSt );
 
diff --git a/filter/inc/filter/msfilter/msfiltertracer.hxx b/filter/inc/filter/msfilter/msfiltertracer.hxx
deleted file mode 100644
index e8fd049..0000000
--- a/filter/inc/filter/msfilter/msfiltertracer.hxx
+++ /dev/null
@@ -1,97 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org.  If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _MS_FILTERTRACER_HXX
-#define _MS_FILTERTRACER_HXX
-
-#include <rtl/ustring.hxx>
-#include <tools/stream.hxx>
-#include <xmloff/attrlist.hxx>
-#include <com/sun/star/uno/Any.h>
-#include <com/sun/star/uno/Reference.h>
-#include <com/sun/star/util/XTextSearch.hpp>
-#include <com/sun/star/util/SearchResult.hpp>
-#include <com/sun/star/util/logging/XLogger.hpp>
-#include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/xml/sax/XAttributeList.hpp>
-#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
-#include "filter/msfilter/msfilterdllapi.h"
-
-class FilterConfigItem;
-class MSFILTER_DLLPUBLIC MSFilterTracer
-{
-        FilterConfigItem*   mpCfgItem;
-        SvXMLAttributeList* mpAttributeList;
-        SvStream*           mpStream;
-        sal_Bool            mbEnabled;
-
-        ::com::sun::star::util::SearchOptions maSearchOptions;
-        ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >               mxFilterTracer;
-        ::com::sun::star::uno::Reference< ::com::sun::star::util::XTextSearch >             mxTextSearch;
-
-        ::com::sun::star::uno::Reference< ::com::sun::star::util::logging::XLogger >        mxLogger;
-        ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler >    mxHandler;
-
-    public :
-
-        /* The first parameter is expecting the path of the configuration file.
-           The second parameter can be used to override properties of the configuration
-           file. A "DocumentURL" property can be set in the property
-           sequence to provide the current url of the document.
-           If the "Path" property is not set in the configuration file, then the path
-           of the "DocumentURL" property is used instead. If both are not set, the
-           application path is used instead.
-           If the "Name" property is not set in the configuration file, then the name
-           of the "DocumentURL" property is used instead. If both are not set, the
-           name "tracer* is used.
-           The file extension will always be "log" */
-
-        MSFilterTracer( const ::rtl::OUString& rConfigurationPath,
-            ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pConfigData = NULL );
-        ~MSFilterTracer();
-
-        void StartTracing();
-        void EndTracing();
-
-        inline sal_Bool IsEnabled() const { return mbEnabled; }
-
-        void EndElement( const ::rtl::OUString& rName );
-
-        void Trace( const ::rtl::OUString& rElementID, const ::rtl::OUString& rMessage );
-        void AddAttribute( const ::rtl::OUString &sName , const ::rtl::OUString &sValue );
-        void RemoveAttribute( const ::rtl::OUString& sName );
-        void ClearAttributes();
-
-        /* initially all properties of the configuration file and the
-           properties which are given to the c'tor can be retrieved */
-        ::com::sun::star::uno::Any GetProperty( const ::rtl::OUString& rPropName, const ::com::sun::star::uno::Any* pDefault = NULL ) const;
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/inc/filter/msfilter/svdfppt.hxx b/filter/inc/filter/msfilter/svdfppt.hxx
index 6980917..f1ac113 100644
--- a/filter/inc/filter/msfilter/svdfppt.hxx
+++ b/filter/inc/filter/msfilter/svdfppt.hxx
@@ -39,7 +39,6 @@
 #include <editeng/editdata.hxx>
 #include <filter/msfilter/msdffimp.hxx>
 #include <filter/msfilter/msocximex.hxx>
-#include <filter/msfilter/msfiltertracer.hxx>
 #include <editeng/eeitem.hxx>
 #define ITEMID_FIELD EE_FEATURE_FIELD
 #include <editeng/flditem.hxx>
@@ -92,10 +91,9 @@ struct MSFILTER_DLLPUBLIC PowerPointImportParam
 {
     SvStream&           rDocStream;
     sal_uInt32          nImportFlags;
-    MSFilterTracer*     pTracer;
     PptCurrentUserAtom  aCurrentUserAtom;
 
-    PowerPointImportParam( SvStream& rDocStream, sal_uInt32 nImportFlags, MSFilterTracer* pTracer );
+    PowerPointImportParam( SvStream& rDocStream, sal_uInt32 nImportFlags );
 };
 
 struct SdHyperlinkEntry
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index a39a556..d70420f 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -4493,11 +4493,6 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
     if( pShapeId )
         *pShapeId = aObjData.nShapeId;
 
-    if ( mbTracing )
-        mpTracer->AddAttribute( aObjData.nSpFlags & SP_FGROUP
-                                ? rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "GroupShape" ))
-                                : rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Shape" )),
-                                rtl::OUString::valueOf( (sal_Int32)aObjData.nShapeId ) );
     aObjData.bOpt = maShapeRecords.SeekToContent( rSt, DFF_msofbtOPT, SEEK_FROM_CURRENT_AND_RESTART );
     if ( aObjData.bOpt )
     {
@@ -5056,10 +5051,6 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
         pRet->SetPrintable( ( nGroupProperties & 1 ) != 0 );
     }
 
-    if ( mbTracing )
-        mpTracer->RemoveAttribute( aObjData.nSpFlags & SP_FGROUP
-                                    ? rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "GroupShape" ))
-                                    : rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Shape" )) );
     return pRet;
 }
 
@@ -5786,8 +5777,7 @@ SvxMSDffManager::SvxMSDffManager(SvStream& rStCtrl_,
                                  long      nApplicationScale,
                                  ColorData mnDefaultColor_,
                                  sal_uLong     nDefaultFontHeight_,
-                                 SvStream* pStData2_,
-                                 MSFilterTracer* pTracer )
+                                 SvStream* pStData2_ )
     :DffPropertyReader( *this ),
      pFormModel( NULL ),
      pBLIPInfos( new SvxMSDffBLIPInfos  ),
@@ -5807,14 +5797,8 @@ SvxMSDffManager::SvxMSDffManager(SvStream& rStCtrl_,
      nSvxMSDffSettings( 0 ),
      nSvxMSDffOLEConvFlags( 0 ),
      mnDefaultColor( mnDefaultColor_),
-     mpTracer( pTracer ),
      mbTracing( sal_False )
 {
-    if ( mpTracer )
-    {
-        uno::Any aAny( mpTracer->GetProperty( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "On" )) ) );
-        aAny >>= mbTracing;
-    }
     SetModel( pSdrModel_, nApplicationScale );
 
     // FilePos des/der Stream(s) merken
@@ -5840,7 +5824,7 @@ SvxMSDffManager::SvxMSDffManager(SvStream& rStCtrl_,
         pStData->Seek( nOldPosData );
 }
 
-SvxMSDffManager::SvxMSDffManager( SvStream& rStCtrl_, const String& rBaseURL, MSFilterTracer* pTracer )
+SvxMSDffManager::SvxMSDffManager( SvStream& rStCtrl_, const String& rBaseURL )
     :DffPropertyReader( *this ),
      pFormModel( NULL ),
      pBLIPInfos(   new SvxMSDffBLIPInfos  ),
@@ -5858,14 +5842,8 @@ SvxMSDffManager::SvxMSDffManager( SvStream& rStCtrl_, const String& rBaseURL, MS
      nSvxMSDffSettings( 0 ),
      nSvxMSDffOLEConvFlags( 0 ),
      mnDefaultColor( COL_DEFAULT ),
-     mpTracer( pTracer ),
      mbTracing( sal_False )
 {
-    if ( mpTracer )
-    {
-        uno::Any aAny( mpTracer->GetProperty( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "On" )) ) );
-        aAny >>= mbTracing;
-    }
     SetModel( NULL, 0 );
 }
 
diff --git a/filter/source/msfilter/msfiltertracer.cxx b/filter/source/msfilter/msfiltertracer.cxx
deleted file mode 100644
index c54ec6c..0000000
--- a/filter/source/msfilter/msfiltertracer.cxx
+++ /dev/null
@@ -1,230 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org.  If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include <filter/msfilter/msfiltertracer.hxx>
-#include <vcl/svapp.hxx>
-#include <tools/urlobj.hxx>
-#include <com/sun/star/uno/Sequence.h>
-#include <com/sun/star/util/logging/LogLevel.hpp>
-#include <com/sun/star/util/SearchAlgorithms.hpp>
-#include <com/sun/star/util/SearchFlags.hpp>
-#include <comphelper/processfactory.hxx>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/io/XActiveDataSource.hpp>
-#include <svtools/FilterConfigItem.hxx>
-#include <unotools/localfilehelper.hxx>
-#include <unotools/streamwrap.hxx>
-#include <unotools/ucbstreamhelper.hxx>
-
-
-using namespace ::com::sun::star;
-
-MSFilterTracer::MSFilterTracer( const ::rtl::OUString& rConfigPath, uno::Sequence< beans::PropertyValue >* pConfigData ) :
-    mpCfgItem( new FilterConfigItem( rConfigPath, pConfigData ) ),
-    mpAttributeList( new SvXMLAttributeList() ),
-    mpStream( NULL ),
-    mbEnabled( sal_False )  // will be set to true in StartTracing()
-{
-    if ( mpCfgItem->ReadBool( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "On" )), sal_False ) )
-    {
-        uno::Reference< lang::XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() );
-        if ( xMgr.is() )
-        {
-            /* the following methods try to read a property, if it is not available it will put the second
-            parameter as default into the property sequence of the FilterConfigItem. It means we ensure that
-            the property is available by trying to read it (the return value of the method is ignored) */
-            ::rtl::OUString aEmptyString;
-            mpCfgItem->ReadInt32( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LogLevel" )), util::logging::LogLevel::ALL );
-            mpCfgItem->ReadString( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ClassFilter" )), aEmptyString );
-            mpCfgItem->ReadString( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MethodFilter" )), aEmptyString );
-            mpCfgItem->ReadString( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MessageFilter" )), aEmptyString );
-            util::SearchAlgorithms eSearchAlgorithm = (util::SearchAlgorithms)
-                mpCfgItem->ReadInt32( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SearchAlgorithm" )), util::SearchAlgorithms_ABSOLUTE );
-
-            // creating the name of the log file
-            rtl::OUString aPath( mpCfgItem->ReadString( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Path" )), aEmptyString ) );
-            rtl::OUString aName( mpCfgItem->ReadString( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Name" )), aEmptyString ) );
-            rtl::OUString aDocumentURL( mpCfgItem->ReadString( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DocumentURL" )), aEmptyString ) );
-            INetURLObject aLogFile( aDocumentURL );
-            if ( !aLogFile.GetMainURL( INetURLObject::NO_DECODE ).isEmpty() )
-            {
-                if ( !aPath.isEmpty() )
-                {
-                    String aOldName( aLogFile.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::NO_DECODE ) );
-                    aLogFile = INetURLObject( aPath );
-                    aLogFile.insertName( aOldName );
-                }
-                if ( !aName.isEmpty() )
-                    aLogFile.setName( aName );
-            }
-            else
-            {
-                if ( !aPath.isEmpty() )
-                    aLogFile = INetURLObject( aPath );
-                else
-                {
-                    rtl::OUString aURLStr;
-                    if( ::utl::LocalFileHelper::ConvertPhysicalNameToURL( Application::GetAppFileName(), aURLStr ) )
-                    {
-                        aLogFile = INetURLObject(aURLStr);
-                        aLogFile .removeSegment();
-                        aLogFile .removeFinalSlash();
-                    }
-                }
-                if ( aName.isEmpty() )
-                    aName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "tracer" ));
-                aLogFile.insertName( aName );
-            }
-            aLogFile.setExtension( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "log" )) );
-
-            // creating the file stream
-            mpStream = ::utl::UcbStreamHelper::CreateStream( aLogFile.GetMainURL( INetURLObject::NO_DECODE ), STREAM_WRITE | STREAM_TRUNC | STREAM_SHARE_DENYNONE );
-            if ( mpStream && !mpStream->GetError() )
-            {
-                // creating a wrapper for our stream
-                utl::OOutputStreamWrapper* pHelper = new ::utl::OOutputStreamWrapper( *mpStream );
-                uno::Reference< io::XOutputStream > xOutputStream( pHelper );
-
-                // instanciating the DocumentHandler, then setting the OutputStream
-                mxHandler = uno::Reference< xml::sax::XDocumentHandler >( xMgr->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.sax.Writer" )) ), uno::UNO_QUERY );
-                uno::Reference< io::XActiveDataSource > xDocSrc( mxHandler, uno::UNO_QUERY );
-                xDocSrc->setOutputStream( xOutputStream );
-                mxHandler->startDocument();
-                mxHandler->ignorableWhitespace ( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " " )) );
-
-                // writing the "DocumentHandler" property, so the FilterTracer component
-                // will use it for the output
-                uno::Any aAny;
-                aAny <<= xDocSrc;
-                mpCfgItem->WriteAny( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DocumentHandler" )), aAny );
-
-                SvXMLAttributeList* pAttrList = new SvXMLAttributeList;
-                pAttrList->AddAttribute( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DocumentURL" )), aDocumentURL );
-                uno::Reference < xml::sax::XAttributeList > xAttributeList(pAttrList);
-                mxHandler->startElement( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Document" )), xAttributeList );
-            }
-
-            uno::Sequence< uno::Any > aArgument( 1 );
-            uno::Sequence< beans::PropertyValue > aPropValues( mpCfgItem->GetFilterData() );
-            aArgument[ 0 ] <<= aPropValues;
-            mxFilterTracer = xMgr->createInstanceWithArguments( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.FilterTracer" )), aArgument );
-            if ( mxFilterTracer.is() )
-            {
-                mxTextSearch = uno::Reference< util::XTextSearch >( mxFilterTracer, uno::UNO_QUERY );
-                mxLogger = uno::Reference< util::logging::XLogger >( mxFilterTracer, uno::UNO_QUERY );
-                if ( mxTextSearch.is() )
-                {
-                    maSearchOptions.algorithmType = eSearchAlgorithm;
-                    mxTextSearch->setOptions( maSearchOptions );
-                }
-            }
-        }
-    }
-}
-
-MSFilterTracer::~MSFilterTracer()
-{
-    mxLogger = NULL;
-    mxFilterTracer = NULL;
-    if ( mxHandler.is() )
-    {
-        mxHandler->ignorableWhitespace ( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " " )) );
-        mxHandler->endElement( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Document" )) );
-        mxHandler->ignorableWhitespace ( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " " )) );
-        mxHandler->endDocument();
-        mxHandler = NULL;
-    }
-    delete mpAttributeList;
-    delete mpCfgItem;
-    delete mpStream;
-}
-
-void MSFilterTracer::StartTracing()
-{
-    mbEnabled = mpCfgItem->ReadBool( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "On" )), sal_False );
-}
-
-void MSFilterTracer::EndTracing()
-{
-    mbEnabled = sal_False;
-}
-
-void MSFilterTracer::Trace( const rtl::OUString& rElement, const rtl::OUString& rMessage )
-{
-    if ( mbEnabled && mxLogger.is() )
-    {
-        sal_Bool bFilter = sal_False;
-        if ( !rMessage.isEmpty() && mxTextSearch.is() )
-        {
-            maSearchOptions.searchString = rMessage;
-            mxTextSearch->setOptions(  maSearchOptions );
-            util::SearchResult aSearchResult = mxTextSearch->searchForward( rMessage, 0, rMessage.getLength() );
-            bFilter = aSearchResult.subRegExpressions != 0;
-        }
-        if ( !bFilter )
-        {
-            uno::Reference < xml::sax::XAttributeList > xAttrList( new SvXMLAttributeList( *mpAttributeList ) );
-            if ( mxHandler.is() )
-                mxHandler->startElement( rElement, xAttrList );
-            if ( !rMessage.isEmpty() )
-            {
-                rtl::OUString aEmpty;
-                mxLogger->logp( 0, aEmpty, aEmpty, rMessage );
-            }
-            if ( mxHandler.is() )
-                mxHandler->endElement( rElement );
-        }
-    }
-}
-
-void MSFilterTracer::AddAttribute( const ::rtl::OUString& sName , const ::rtl::OUString& sValue )
-{
-    if ( mbEnabled )
-        mpAttributeList->AddAttribute( sName, sValue );
-}
-void MSFilterTracer::ClearAttributes()
-{
-    if ( mbEnabled )
-        mpAttributeList->Clear();
-}
-
-void MSFilterTracer::RemoveAttribute( const ::rtl::OUString& sName )
-{
-    if ( mbEnabled )
-        mpAttributeList->RemoveAttribute( sName );
-}
-
-uno::Any MSFilterTracer::GetProperty( const rtl::OUString& rPropName, const uno::Any* pDefault ) const
-{
-    uno::Any aDefault;
-    if ( pDefault )
-        aDefault = *pDefault;
-    return mpCfgItem->ReadAny( rPropName, aDefault );
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 2b9f19f..930de77 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -165,10 +165,9 @@ using namespace drawing             ;
 using namespace container           ;
 using namespace table               ;
 
-PowerPointImportParam::PowerPointImportParam( SvStream& rDocStrm, sal_uInt32 nFlags, MSFilterTracer* pT ) :
+PowerPointImportParam::PowerPointImportParam( SvStream& rDocStrm, sal_uInt32 nFlags ) :
     rDocStream      ( rDocStrm ),
-    nImportFlags    ( nFlags ),
-    pTracer         ( pT )
+    nImportFlags    ( nFlags )
 {
 }
 
@@ -520,7 +519,7 @@ PptSlidePersistEntry::~PptSlidePersistEntry()
 };
 
 SdrEscherImport::SdrEscherImport( PowerPointImportParam& rParam, const String& rBaseURL ) :
-    SvxMSDffManager         ( rParam.rDocStream, rBaseURL, rParam.pTracer ),
+    SvxMSDffManager         ( rParam.rDocStream, rBaseURL ),
     pFonts                  ( NULL ),
     nStreamLen              ( 0 ),
     nTextStylesIndex        ( 0xffff ),
@@ -2146,9 +2145,6 @@ sal_Bool SdrPowerPointImport::ReadFontCollection()
                 aFont.SetPitch( pFont->ePitch );
                 aFont.SetHeight( 100 );
 
-                if ( mbTracing && !pFont->bAvailable )
-                    mpTracer->Trace( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "sd1000" )), pFont->aName );
-
                 // following block is necessary, because our old PowerPoint export did not set the
                 // correct charset
                 if ( pFont->aName.EqualsIgnoreCaseAscii( "Wingdings" ) ||
@@ -2740,12 +2736,6 @@ void SdrPowerPointImport::ImportPage( SdrPage* pRet, const PptSlidePersistEntry*
     DffRecordHeader aPageHd;
     if ( SeekToAktPage( &aPageHd ) )
     {
-        if ( mbTracing )
-            mpTracer->AddAttribute( eAktPageKind == PPT_SLIDEPAGE
-                                    ? rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Page" ))
-                                    : rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "NotesPage" )),
-                                    rtl::OUString::valueOf( (sal_Int32)nAktPageNum + 1 ) );
-
         rSlidePersist.pHeaderFooterEntry = new HeaderFooterEntry( pMasterPersist );
         ProcessData aProcessData( rSlidePersist, (SdPage*)pRet );
         while ( ( rStCtrl.GetError() == 0 ) && ( rStCtrl.Tell() < aPageHd.GetRecEndFilePos() ) )
@@ -2935,10 +2925,6 @@ void SdrPowerPointImport::ImportPage( SdrPage* pRet, const PptSlidePersistEntry*
         }
         if ( rSlidePersist.pSolverContainer )
             SolveSolver( *rSlidePersist.pSolverContainer );
-        if ( mbTracing )
-            mpTracer->RemoveAttribute( eAktPageKind == PPT_SLIDEPAGE
-                                        ? rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Page" ))
-                                        : rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "NotesPage" )) );
     }
     rStCtrl.Seek( nMerk );
 }
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index ee1a37e..f049f25 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -3132,7 +3132,7 @@ void XclImpSolverContainer::UpdateConnection( sal_uInt32 nDffShapeId, SdrObject*
 // ----------------------------------------------------------------------------
 
 XclImpSimpleDffConverter::XclImpSimpleDffConverter( const XclImpRoot& rRoot, SvStream& rDffStrm ) :
-    SvxMSDffManager( rDffStrm, rRoot.GetBasePath(), 0, 0, rRoot.GetDoc().GetDrawLayer(), 1440, COL_DEFAULT, 24, 0, &rRoot.GetTracer().GetBaseTracer() ),
+    SvxMSDffManager( rDffStrm, rRoot.GetBasePath(), 0, 0, rRoot.GetDoc().GetDrawLayer(), 1440, COL_DEFAULT, 24, 0 ),
     XclImpRoot( rRoot )
 {
     SetSvxMSDffSettings( SVXMSDFF_SETTINGS_CROP_BITMAPS | SVXMSDFF_SETTINGS_IMPORT_EXCEL );
diff --git a/sc/source/filter/excel/xltracer.cxx b/sc/source/filter/excel/xltracer.cxx
index 34ed83a..586d47f 100644
--- a/sc/source/filter/excel/xltracer.cxx
+++ b/sc/source/filter/excel/xltracer.cxx
@@ -29,7 +29,7 @@
 
 // ============================================================================
 #include "xltracer.hxx"
-#include <filter/msfilter/msfiltertracer.hxx>
+#include <com/sun/star/beans/PropertyValue.hpp>
 #include "address.hxx"
 
 using ::rtl::OUString;
@@ -83,29 +83,18 @@ XclTracer::XclTracer( const String& rDocUrl, const OUString& rConfigPath ) :
     Sequence< PropertyValue > aConfigData( 1 );
     aConfigData[ 0 ].Name = CREATE_OUSTRING( "DocumentURL" );
     aConfigData[ 0 ].Value <<= OUString( rDocUrl );
-    mpTracer.reset( new MSFilterTracer( rConfigPath, &aConfigData ) );
-    mpTracer->StartTracing();
-    mbEnabled = mpTracer->IsEnabled();
 }
 
 XclTracer::~XclTracer()
 {
-    mpTracer->EndTracing();
 }
 
 void XclTracer::AddAttribute( const OUString& rName, const OUString& rValue )
 {
-    if( mbEnabled )
-        mpTracer->AddAttribute( rName, rValue );
 }
 
 void XclTracer::Trace( const OUString& rElementID, const OUString& rMessage )
 {
-    if( mbEnabled )
-    {
-        mpTracer->Trace( rElementID, rMessage );
-        mpTracer->ClearAttributes();
-    }
 }
 
 void XclTracer::TraceLog( XclTracerId eProblem, sal_Int32 nValue )
diff --git a/sc/source/filter/inc/xltracer.hxx b/sc/source/filter/inc/xltracer.hxx
index ba177fd..7186569 100644
--- a/sc/source/filter/inc/xltracer.hxx
+++ b/sc/source/filter/inc/xltracer.hxx
@@ -83,8 +83,6 @@ struct XclTracerDetails
 
 // ============================================================================
 
-class MSFilterTracer;
-
 /** This class wraps an MSFilterTracer to create trace logs for import/export filters. */
 class XclTracer
 {
@@ -129,12 +127,7 @@ public:
     void                        TraceObjectNotPrintable();
     void                        TraceDVType(bool bType);
 
-    /** Returns the SVX filter tracer for usage in external code (i.e. Escher). */
-    inline MSFilterTracer&      GetBaseTracer() { return *mpTracer; }
-
 private:
-    typedef ::std::auto_ptr< MSFilterTracer > MSFilterTracerPtr;
-    MSFilterTracerPtr           mpTracer;
     bool                        mbEnabled;
     typedef ::std::vector< bool >     BoolVec;
     /** array of flags corresponding to each entry in the XclTracerDetails table. */
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index af5dd14..4fc9e71 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -1,4 +1,4 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*	 -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -112,7 +112,7 @@ lcl_getUnoCtx()
     return aCtx.getUNOContext();
 }
 
-SdPPTImport::SdPPTImport( SdDrawDocument* pDocument, SvStream& rDocStream, SvStorage& rStorage, SfxMedium& rMedium, MSFilterTracer* pTracer )
+SdPPTImport::SdPPTImport( SdDrawDocument* pDocument, SvStream& rDocStream, SvStorage& rStorage, SfxMedium& rMedium )
 {
 
     sal_uInt32 nImportFlags = 0;
@@ -144,7 +144,7 @@ SdPPTImport::SdPPTImport( SdDrawDocument* pDocument, SvStream& rDocStream, SvSto
     delete pSummaryInformation;
 #endif
 
-    PowerPointImportParam aParam( rDocStream, nImportFlags, pTracer );
+    PowerPointImportParam aParam( rDocStream, nImportFlags );
     SvStream* pCurrentUserStream = rStorage.OpenSotStream( String( RTL_CONSTASCII_USTRINGPARAM( "Current User" ) ), STREAM_STD_READ );
     if( pCurrentUserStream )
     {
@@ -761,9 +761,6 @@ sal_Bool ImplSdPPTImport::Import()
                 DffRecordHeader aPageHd;
                 if ( SeekToAktPage( &aPageHd ) )
                 {
-                    if ( mbTracing )
-                        mpTracer->AddAttribute( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "MasterPage" )), rtl::OUString::valueOf( (sal_Int32) (nAktPageNum + 1) ) );
-
                     while( ( rStCtrl.GetError() == 0 ) && ( rStCtrl.Tell() < aPageHd.GetRecEndFilePos() ) )
                     {
                         DffRecordHeader aHd;
@@ -839,8 +836,6 @@ sal_Bool ImplSdPPTImport::Import()
                         }
                         aHd.SeekToEndOfRecord( rStCtrl );
                     }
-                    if ( mbTracing )
-                        mpTracer->RemoveAttribute( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "MasterPage" )) );
                 }
                 rStCtrl.Seek( nFPosMerk );
                 ImportPageEffect( (SdPage*)pMPage, bNewAnimationsUsed );
@@ -2728,13 +2723,9 @@ extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL ImportPPT( const ::rtl::OUStri
 {
     sal_Bool bRet = sal_False;
 
-    MSFilterTracer aTracer( rConfigPath, pConfigData );
-    aTracer.StartTracing();
-
-    SdPPTImport* pImport = new SdPPTImport( pDocument, rDocStream, rStorage, rMedium, &aTracer );
+    SdPPTImport* pImport = new SdPPTImport( pDocument, rDocStream, rStorage, rMedium );
     bRet = pImport->Import();
 
-    aTracer.EndTracing();
     delete pImport;
 
     return bRet;
diff --git a/sd/source/filter/ppt/pptin.hxx b/sd/source/filter/ppt/pptin.hxx
index 39bd874..db36046 100644
--- a/sd/source/filter/ppt/pptin.hxx
+++ b/sd/source/filter/ppt/pptin.hxx
@@ -33,7 +33,6 @@
 #include <svx/msdffdef.hxx>
 #include <diadef.h>
 #include <svx/svdtypes.hxx>
-#include <filter/msfilter/msfiltertracer.hxx>
 #include <com/sun/star/uno/Any.h>
 #include <boost/shared_ptr.hpp>
 
@@ -97,7 +96,7 @@ class SdPPTImport
 
     public:
 
-        SdPPTImport( SdDrawDocument* pDoc, SvStream& rDocStream, SvStorage& rStorage, SfxMedium& rMed, MSFilterTracer* pTracer = NULL );
+        SdPPTImport( SdDrawDocument* pDoc, SvStream& rDocStream, SvStorage& rStorage, SfxMedium& rMed );
         ~SdPPTImport();
 
         sal_Bool Import();
diff --git a/sd/source/filter/sdpptwrp.cxx b/sd/source/filter/sdpptwrp.cxx
index af3887d..db0826f 100644
--- a/sd/source/filter/sdpptwrp.cxx
+++ b/sd/source/filter/sdpptwrp.cxx
@@ -39,7 +39,6 @@
 #include "ppt/pptin.hxx"
 #include "drawdoc.hxx"
 #include <tools/urlobj.hxx>
-#include <filter/msfilter/msfiltertracer.hxx>
 
 // --------------
 // - Namespaces -
diff --git a/sw/source/filter/ww8/tracer.cxx b/sw/source/filter/ww8/tracer.cxx
index d9b2fc4..a0009b2 100644
--- a/sw/source/filter/ww8/tracer.cxx
+++ b/sw/source/filter/ww8/tracer.cxx
@@ -29,7 +29,6 @@
 
 #include <tools/urlobj.hxx>         //INetURLObject
 #include <sfx2/docfile.hxx>         //SfxMedium
-#include <filter/msfilter/msfiltertracer.hxx>   //MSFilterTracer
 #include "tracer.hxx"               //sw::log::Tracer
 
 using rtl::OUString;
@@ -42,7 +41,6 @@ namespace sw
     namespace log
     {
         Tracer::Tracer(const SfxMedium &rMed)
-            : mpTrace(0)
         {
             using namespace ::com::sun::star::uno;
             using namespace ::com::sun::star::beans;
@@ -54,87 +52,16 @@ namespace sw
             aPropValue.Name = C2O("DocumentURL");
             aConfig[0] = aPropValue;
             OUString aTraceConfigPath(CAU("Office.Tracing/Import/Word"));
-            mpTrace = new MSFilterTracer(aTraceConfigPath, &aConfig);
-            if (mpTrace)
-                mpTrace->StartTracing();
         }
 
         Tracer::~Tracer()
         {
-            if (mpTrace)
-            {
-                mpTrace->EndTracing();
-                delete mpTrace;
-            }
         }
 
         void Tracer::Log(Problem eProblem)
         {
-            if (!mpTrace)
-                return;
-
             OUString sID(CAU("sw"));
             sID += rtl::OUString::valueOf(static_cast<sal_Int32>(eProblem));
-            switch (eProblem)
-            {
-                case ePrinterMetrics:
-                    mpTrace->Trace(sID, COMMENT("PrinterMetrics"));
-                    break;
-                case eExtraLeading:
-                    mpTrace->Trace(sID, COMMENT("Extra Leading"));
-                    break;
-                case eTabStopDistance:
-                    mpTrace->Trace(sID, COMMENT("Minimum Tab Distance"));
-                    break;
-                case eDontUseHTMLAutoSpacing:
-                    mpTrace->Trace(sID, COMMENT("HTML AutoSpacing"));
-                    break;
-                case eAutoWidthFrame:
-                    mpTrace->Trace(sID, COMMENT("AutoWidth"));
-                    break;
-                case eRowCanSplit:
-                    mpTrace->Trace(sID, COMMENT("Splitable Row"));
-                    break;
-                case eSpacingBetweenCells:
-                    mpTrace->Trace(sID, COMMENT("Spacing Between Cells"));
-                    break;
-                case eTabInNumbering:
-                    mpTrace->Trace(sID, COMMENT("Tab In Numbering"));
-                    break;
-                case eNegativeVertPlacement:
-                    mpTrace->Trace(sID,
-                        COMMENT("Negative Vertical Placement"));
-                    break;
-                case eAutoColorBg:
-                    mpTrace->Trace(sID,
-                        COMMENT("Bad Background for Autocolour"));
-                    break;
-                case eTooWideAsChar:
-                    mpTrace->Trace(sID,
-                        COMMENT("Inline wider than TextArea"));
-                    break;
-                case eAnimatedText:
-                    mpTrace->Trace(sID,
-                        COMMENT("Animated Text"));
-                    break;
-                case eDontAddSpaceForEqualStyles:
-                    mpTrace->Trace(sID,
-                        COMMENT("Don't Add Space between Equal Style"));
-                    break;
-                case eBorderDistOutside:
-                    mpTrace->Trace(sID,
-                        COMMENT("Word draws the border outside"));
-                    break;
-                case eContainsVisualBasic:
-                    mpTrace->Trace(sID, COMMENT("Contains VBA"));
-                    break;
-                case eContainsWordBasic:
-                    mpTrace->Trace(sID, COMMENT("Contains Word Basic"));
-                    break;
-                default:
-                    mpTrace->Trace(sID, COMMENT("UNKNOWN"));
-                    break;
-            }
         }
 
         rtl::OUString Tracer::GetContext(Environment eContext) const
@@ -188,18 +115,15 @@ namespace sw
 
         void Tracer::EnterEnvironment(Environment eContext)
         {
-            mpTrace->AddAttribute(GetContext(eContext), GetDetails(eContext));
         }
 
         void Tracer::EnterEnvironment(Environment eContext,
             const rtl::OUString &rDetails)
         {
-            mpTrace->AddAttribute(GetContext(eContext), rDetails);
         }
 
         void Tracer::LeaveEnvironment(Environment eContext)
         {
-            mpTrace->RemoveAttribute(GetContext(eContext));
         }
     }
 }
diff --git a/sw/source/filter/ww8/tracer.hxx b/sw/source/filter/ww8/tracer.hxx
index df6d7c4..60923d5 100644
--- a/sw/source/filter/ww8/tracer.hxx
+++ b/sw/source/filter/ww8/tracer.hxx
@@ -31,7 +31,6 @@
 
 #include <rtl/ustring.hxx>      //rtl::OUString
 
-class MSFilterTracer;
 class SfxMedium;
 
 namespace sw
@@ -71,12 +70,10 @@ namespace sw
         class Tracer
         {
         private:
-            MSFilterTracer *mpTrace;
             rtl::OUString GetContext(Environment eContext) const;
             rtl::OUString GetDetails(Environment eContext) const;
         public:
             Tracer(const SfxMedium &rMedium);
-            MSFilterTracer *GetTrace() const { return mpTrace; }
             void EnterEnvironment(Environment eContext);
             void EnterEnvironment(Environment eContext,
                 const rtl::OUString &rDetails);
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index a50a8ff..5d2fa42 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -310,8 +310,7 @@ Sttb::getStringAtIndex( sal_uInt32 index )
 
 SwMSDffManager::SwMSDffManager( SwWW8ImplReader& rRdr )
     : SvxMSDffManager(*rRdr.pTableStream, rRdr.GetBaseURL(), rRdr.pWwFib->fcDggInfo,
-        rRdr.pDataStream, 0, 0, COL_WHITE, 12, rRdr.pStrm,
-        rRdr.maTracer.GetTrace()),
+        rRdr.pDataStream, 0, 0, COL_WHITE, 12, rRdr.pStrm),
     rReader(rRdr), pFallbackStream(0)
 {
     SetSvxMSDffSettings( GetSvxMSDffSettings() );


More information about the Libreoffice-commits mailing list