[Libreoffice-commits] .: sd/source sw/source

Stephan Bergmann sbergmann at kemper.freedesktop.org
Fri Feb 24 05:42:54 PST 2012


 sd/source/filter/ppt/pptin.cxx   |    3 +--
 sd/source/filter/sdpptwrp.cxx    |   12 ++----------
 sw/source/filter/ww8/tracer.cxx  |   13 -------------
 sw/source/filter/ww8/tracer.hxx  |    4 ----
 sw/source/filter/ww8/ww8par.cxx  |   15 ---------------
 sw/source/filter/ww8/ww8par2.cxx |   16 +---------------
 6 files changed, 4 insertions(+), 59 deletions(-)

New commits:
commit 403b0a8d059de01b7297e1e6083eb41e930d73a7
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Feb 24 14:42:18 2012 +0100

    -Werror=unused-parameter
    
    Not sure if this rather radical shrinking of sw::log::Tracer is good, though (or
    if the class already has become obsolete anyway)?

diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 4fc9e71..1f8fd68 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -2717,8 +2717,7 @@ ImplSdPPTImport::ReadFormControl( SotStorageRef& rSrc1, com::sun::star::uno::Ref
 // - exported function -
 // ---------------------
 
-extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL ImportPPT( const ::rtl::OUString& rConfigPath,
-        uno::Sequence< beans::PropertyValue >* pConfigData,
+extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL ImportPPT(
         SdDrawDocument* pDocument, SvStream& rDocStream, SvStorage& rStorage, SfxMedium& rMedium )
 {
     sal_Bool bRet = sal_False;
diff --git a/sd/source/filter/sdpptwrp.cxx b/sd/source/filter/sdpptwrp.cxx
index db0826f..2229c26 100644
--- a/sd/source/filter/sdpptwrp.cxx
+++ b/sd/source/filter/sdpptwrp.cxx
@@ -54,8 +54,7 @@ typedef sal_Bool ( __LOADONCALLAPI *ExportPPT )( const std::vector< com::sun::st
                                              Reference< XStatusIndicator > &,
                                              SvMemoryStream*, sal_uInt32 nCnvrtFlags );
 
-typedef sal_Bool ( SAL_CALL *ImportPPT )( const ::rtl::OUString&, Sequence< PropertyValue >*,
-                                          SdDrawDocument*, SvStream&, SvStorage&, SfxMedium& );
+typedef sal_Bool ( SAL_CALL *ImportPPT )( SdDrawDocument*, SvStream&, SvStorage&, SfxMedium& );
 
 typedef sal_Bool ( __LOADONCALLAPI *SaveVBA )( SfxObjectShell&, SvMemoryStream*& );
 
@@ -99,13 +98,6 @@ sal_Bool SdPPTFilter::Import()
             pDocStream->SetVersion( pStorage->GetVersion() );
             pDocStream->SetCryptMaskKey(pStorage->GetKey());
 
-            String aTraceConfigPath( RTL_CONSTASCII_USTRINGPARAM( "Office.Tracing/Import/PowerPoint" ) );
-            Sequence< PropertyValue > aConfigData( 1 );
-            PropertyValue aPropValue;
-            aPropValue.Value <<= rtl::OUString( mrMedium.GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) );
-            aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DocumentURL" ) );
-            aConfigData[ 0 ] = aPropValue;
-
             if ( pStorage->IsStream( String( RTL_CONSTASCII_USTRINGPARAM("EncryptedSummary") ) ) )
                 mrMedium.SetError( ERRCODE_SVX_READ_FILTER_PPOINT, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
             else
@@ -115,7 +107,7 @@ sal_Bool SdPPTFilter::Import()
                 {
                     ImportPPT PPTImport = reinterpret_cast< ImportPPT >( pLibrary->getFunctionSymbol( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ImportPPT" ) ) ) );
                     if ( PPTImport )
-                        bRet = PPTImport( aTraceConfigPath, &aConfigData, &mrDocument, *pDocStream, *pStorage, mrMedium );
+                        bRet = PPTImport( &mrDocument, *pDocStream, *pStorage, mrMedium );
 
                     if ( !bRet )
                         mrMedium.SetError( SVSTREAM_WRONGVERSION, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
diff --git a/sw/source/filter/ww8/tracer.cxx b/sw/source/filter/ww8/tracer.cxx
index a0009b2..0b52a34 100644
--- a/sw/source/filter/ww8/tracer.cxx
+++ b/sw/source/filter/ww8/tracer.cxx
@@ -112,19 +112,6 @@ namespace sw
             }
             return sDetails;
         }
-
-        void Tracer::EnterEnvironment(Environment eContext)
-        {
-        }
-
-        void Tracer::EnterEnvironment(Environment eContext,
-            const rtl::OUString &rDetails)
-        {
-        }
-
-        void Tracer::LeaveEnvironment(Environment eContext)
-        {
-        }
     }
 }
 
diff --git a/sw/source/filter/ww8/tracer.hxx b/sw/source/filter/ww8/tracer.hxx
index 60923d5..b51cf06 100644
--- a/sw/source/filter/ww8/tracer.hxx
+++ b/sw/source/filter/ww8/tracer.hxx
@@ -74,11 +74,7 @@ namespace sw
             rtl::OUString GetDetails(Environment eContext) const;
         public:
             Tracer(const SfxMedium &rMedium);
-            void EnterEnvironment(Environment eContext);
-            void EnterEnvironment(Environment eContext,
-                const rtl::OUString &rDetails);
             void Log(Problem eProblem);
-            void LeaveEnvironment(Environment eContext);
             ~Tracer();
         };
     }
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 5d2fa42..7b39697 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -1484,7 +1484,6 @@ void SwWW8ImplReader::Read_Tab(sal_uInt16 , const sal_uInt8* pData, short nLen)
 
 void SwWW8ImplReader::ImportDop()
 {
-    maTracer.EnterEnvironment(sw::log::eDocumentProperties);
     // correct the LastPrinted date in DocumentInfo
     uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
         mpDocShell->GetModel(), uno::UNO_QUERY_THROW);
@@ -1615,8 +1614,6 @@ void SwWW8ImplReader::ImportDop()
     const SvtFilterOptions& rOpt = SvtFilterOptions::Get();
     if (rOpt.IsUseEnhancedFields())
         rDoc.set(IDocumentSettingAccess::PROTECT_FORM, pWDop->fProtEnabled );
-
-    maTracer.LeaveEnvironment(sw::log::eDocumentProperties);
 }
 
 void SwWW8ImplReader::ImportDopTypography(const WW8DopTypography &rTypo)
@@ -2025,7 +2022,6 @@ void SwWW8ImplReader::Read_HdFt(bool bIsTitle, int nSect,
             }
         }
     }
-    maTracer.LeaveEnvironment(sw::log::eDocumentProperties);
 }
 
 bool wwSectionManager::SectionIsProtected(const wwSection &rSection) const
@@ -3442,13 +3438,6 @@ void SwWW8ImplReader::CloseAttrEnds()
 
 bool SwWW8ImplReader::ReadText(long nStartCp, long nTextLen, ManTypes nType)
 {
-    sw::log::Environment eContext = sw::log::eMainText;
-    if (nType == MAN_MAINTEXT)
-        eContext = sw::log::eMainText;
-    else
-        eContext = sw::log::eSubDoc;
-    maTracer.EnterEnvironment(eContext);
-
     bool bJoined=false;
 
     bool bStartLine = true;
@@ -3618,7 +3607,6 @@ bool SwWW8ImplReader::ReadText(long nStartCp, long nTextLen, ManTypes nType)
     CloseAttrEnds();
 
     delete pPlcxMan, pPlcxMan = 0;
-    maTracer.LeaveEnvironment(eContext);
     return bJoined;
 }
 
@@ -4615,7 +4603,6 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
         if (mbNewDoc && pStg && !pGloss) /*meaningless for a glossary, cmc*/
         {
             mpDocShell->SetIsTemplate( pWwFib->fDot ); // point at tgc record
-            maTracer.EnterEnvironment(sw::log::eMacros);
             uno::Reference< document::XDocumentInfoSupplier > xDocInfoSupp( mpDocShell->GetModel(), uno::UNO_QUERY_THROW );
             uno::Reference< document::XDocumentPropertiesSupplier > xDocPropSupp( xDocInfoSupp->getDocumentInfo(), uno::UNO_QUERY_THROW );
             uno::Reference< document::XDocumentProperties > xDocProps( xDocPropSupp->getDocumentProperties(), uno::UNO_QUERY_THROW );
@@ -4653,8 +4640,6 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
             }
 
             StoreMacroCmds();
-
-            maTracer.LeaveEnvironment(sw::log::eMacros);
         }
         ReadText(0, pWwFib->ccpText, MAN_MAINTEXT);
 
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index adb4472..17e1d19 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -3508,13 +3508,7 @@ bool SwWW8ImplReader::StartTable(WW8_CP nStartCp)
     delete pTableWFlyPara;
     delete pTableSFlyPara;
 
-    bool bSuccess = (0 != pTableDesc);
-    if (bSuccess)
-    {
-        maTracer.EnterEnvironment(sw::log::eTable, rtl::OUString::valueOf(
-            static_cast<sal_Int32>(maTableStack.size())));
-    }
-    return bSuccess;
+    return 0 != pTableDesc;
 }
 
 void SwWW8ImplReader::TabCellEnd()
@@ -3558,8 +3552,6 @@ void SwWW8ImplReader::PopTableDesc()
 
 void SwWW8ImplReader::StopTable()
 {
-    maTracer.LeaveEnvironment(sw::log::eTable);
-
     OSL_ENSURE(pTableDesc, "Panic, stop table with no table!");
     if (!pTableDesc)
         return;
@@ -3571,12 +3563,6 @@ void SwWW8ImplReader::StopTable()
     pTableDesc->FinishSwTable();
     PopTableDesc();
 
-    if (!maTableStack.empty())
-    {
-        maTracer.EnterEnvironment(sw::log::eTable, rtl::OUString::valueOf(
-            static_cast<sal_Int32>(maTableStack.size())));
-    }
-
     bReadTable = true;
     // #i101116# - Keep PaM on table end only for nested tables
     if ( nInTable > 1 )


More information about the Libreoffice-commits mailing list