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




Code cleanup in msfilter
From 02e66a13b66ed968f8ddcf1b1d8cae4979bb8b85 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Wed, 26 Jan 2011 21:34:37 +0000
Subject: [PATCH] WaE: mark this dir as warnings free

---
 binfilter/bf_xmloff/source/meta/makefile.mk        |    2 -
 .../source/meta/xmloff_MetaExportComponent.cxx     |    2 +-
 .../source/meta/xmloff_MetaImportComponent.cxx     |   16 +++---
 .../bf_xmloff/source/meta/xmloff_xmlmetai.cxx      |   66 ++++++++++----------
 4 files changed, 42 insertions(+), 44 deletions(-)

diff --git a/binfilter/bf_xmloff/source/meta/makefile.mk 
b/binfilter/bf_xmloff/source/meta/makefile.mk
index 9ffd9c4..3f5ecb7 100644
--- a/binfilter/bf_xmloff/source/meta/makefile.mk
+++ b/binfilter/bf_xmloff/source/meta/makefile.mk
@@ -25,8 +25,6 @@
 #
 #*************************************************************************
 
-EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
-
 PRJ=..$/..$/..
 
 PRJNAME=binfilter
diff --git a/binfilter/bf_xmloff/source/meta/xmloff_MetaExportComponent.cxx 
b/binfilter/bf_xmloff/source/meta/xmloff_MetaExportComponent.cxx
index 5d6ccac..5b01403 100644
--- a/binfilter/bf_xmloff/source/meta/xmloff_MetaExportComponent.cxx
+++ b/binfilter/bf_xmloff/source/meta/xmloff_MetaExportComponent.cxx
@@ -51,7 +51,7 @@ XMLMetaExportComponent::~XMLMetaExportComponent()
 {
 }
 
-sal_uInt32 XMLMetaExportComponent::exportDoc( enum XMLTokenEnum eClass )
+sal_uInt32 XMLMetaExportComponent::exportDoc( enum XMLTokenEnum )
 {
     GetDocHandler()->startDocument();
     {
diff --git a/binfilter/bf_xmloff/source/meta/xmloff_MetaImportComponent.cxx 
b/binfilter/bf_xmloff/source/meta/xmloff_MetaImportComponent.cxx
index bdec3fe..75bbc33 100644
--- a/binfilter/bf_xmloff/source/meta/xmloff_MetaImportComponent.cxx
+++ b/binfilter/bf_xmloff/source/meta/xmloff_MetaImportComponent.cxx
@@ -59,11 +59,11 @@ public:
     virtual void EndElement();
 };
 
-SvXMLMetaDocumentContext::SvXMLMetaDocumentContext(SvXMLImport& rImport,
+SvXMLMetaDocumentContext::SvXMLMetaDocumentContext(SvXMLImport& rInImport,
                         USHORT nPrfx, const ::rtl::OUString& rLName,
-                        const uno::Reference<xml::sax::XAttributeList>& xAttrList,
+                        const uno::Reference<xml::sax::XAttributeList>& /*xAttrList*/,
                         const uno::Reference<document::XDocumentInfo>& rDocInfo) :
-    SvXMLImportContext( rImport, nPrfx, rLName ),
+    SvXMLImportContext( rInImport, nPrfx, rLName ),
     xDocInfo(rDocInfo)
 {
     // here are no attributes
@@ -73,19 +73,19 @@ SvXMLMetaDocumentContext::~SvXMLMetaDocumentContext()
 {
 }
 
-SvXMLImportContext *SvXMLMetaDocumentContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *SvXMLMetaDocumentContext::CreateChildContext( USHORT nInPrefix,
                                      const ::rtl::OUString& rLocalName,
                                      const ::com::sun::star::uno::Reference<
-                                          ::com::sun::star::xml::sax::XAttributeList>& xAttrList )
+                                          ::com::sun::star::xml::sax::XAttributeList>& 
/*xAttrList*/ )
 {
-    if (  (XML_NAMESPACE_OFFICE == nPrefix) &&
+    if (  (XML_NAMESPACE_OFFICE == nInPrefix) &&
          IsXMLToken(rLocalName, XML_META) )
     {
-        return new SfxXMLMetaContext(GetImport(), nPrefix, rLocalName, xDocInfo);
+        return new SfxXMLMetaContext(GetImport(), nInPrefix, rLocalName, xDocInfo);
     }
     else
     {
-        return new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
+        return new SvXMLImportContext( GetImport(), nInPrefix, rLocalName );
     }
 }
 
diff --git a/binfilter/bf_xmloff/source/meta/xmloff_xmlmetai.cxx 
b/binfilter/bf_xmloff/source/meta/xmloff_xmlmetai.cxx
index 276f88a..49a8f24 100644
--- a/binfilter/bf_xmloff/source/meta/xmloff_xmlmetai.cxx
+++ b/binfilter/bf_xmloff/source/meta/xmloff_xmlmetai.cxx
@@ -79,7 +79,7 @@ private:
     ::rtl::OUString       sFieldName;     // for <meta:user-defined>
 
 public:
-    SfxXMLMetaElementContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
+    SfxXMLMetaElementContext( SvXMLImport& rInImport, sal_uInt16 nPrfx,
                                 const ::rtl::OUString& rLName,
                                 const uno::Reference<
                                     xml::sax::XAttributeList>& xAttrList,
@@ -376,11 +376,11 @@ sal_Bool SfxXMLMetaElementContext::ParseISODurationString(
 
 //-------------------------------------------------------------------------
 
-SfxXMLMetaElementContext::SfxXMLMetaElementContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
+SfxXMLMetaElementContext::SfxXMLMetaElementContext( SvXMLImport& rInImport, sal_uInt16 nPrfx,
                                     const ::rtl::OUString& rLName,
                                     const uno::Reference<xml::sax::XAttributeList>& xAttrList,
                                     SfxXMLMetaContext& rParentContext, sal_uInt16 nType ) :
-    SvXMLImportContext( rImport, nPrfx, rLName ),
+    SvXMLImportContext( rInImport, nPrfx, rLName ),
     rParent( rParentContext ),
     nElementType( nType )
 {
@@ -398,13 +398,13 @@ SfxXMLMetaElementContext::SfxXMLMetaElementContext( SvXMLImport& rImport, 
sal_uI
             for( sal_Int16 i=0; i < nAttrCount; i++ )
             {
                 ::rtl::OUString sAttrName = xAttrList->getNameByIndex( i );
-                ::rtl::OUString aLocalName;
-                sal_uInt16 nPrefix = rImport.GetNamespaceMap().GetKeyByAttrName(
-                                                    sAttrName, &aLocalName );
+                ::rtl::OUString aLclLocalName;
+                sal_uInt16 nLclPrefix = rInImport.GetNamespaceMap().GetKeyByAttrName(
+                                                    sAttrName, &aLclLocalName );
                 ::rtl::OUString sValue = xAttrList->getValueByIndex( i );
 
                 SvXMLTokenMap aTokenMap( aMetaTemplateTokenMap );
-                switch( aTokenMap.Get( nPrefix, aLocalName ) )
+                switch( aTokenMap.Get( nLclPrefix, aLclLocalName ) )
                 {
                 case XML_TOK_META_TEMPLATE_HREF:
                     aPropAny <<= GetImport().GetAbsoluteReference(sValue);
@@ -452,14 +452,14 @@ SfxXMLMetaElementContext::SfxXMLMetaElementContext( SvXMLImport& rImport, 
sal_uI
             for( sal_Int16 i=0; i < nAttrCount; i++ )
             {
                 ::rtl::OUString sAttrName = xAttrList->getNameByIndex( i );
-                ::rtl::OUString aLocalName;
-                sal_uInt16 nPrefix = rImport.GetNamespaceMap().GetKeyByAttrName(
-                                                    sAttrName, &aLocalName );
+                ::rtl::OUString aLclLocalName;
+                sal_uInt16 nLclPrefix = rInImport.GetNamespaceMap().GetKeyByAttrName(
+                                                    sAttrName, &aLclLocalName );
                 ::rtl::OUString sValue = xAttrList->getValueByIndex( i );
 
                 SvXMLTokenMap aTokenMap( aMetaReloadTokenMap );
                 uno::Any aAny;
-                switch( aTokenMap.Get( nPrefix, aLocalName ) )
+                switch( aTokenMap.Get( nLclPrefix, aLclLocalName ) )
                 {
                     case XML_TOK_META_RELOAD_HREF:
                         aPropAny <<= GetImport().GetAbsoluteReference(sValue);
@@ -495,11 +495,11 @@ SfxXMLMetaElementContext::SfxXMLMetaElementContext( SvXMLImport& rImport, 
sal_uI
             for( sal_Int16 i=0; i < nAttrCount; i++ )
             {
                 ::rtl::OUString sAttrName = xAttrList->getNameByIndex( i );
-                ::rtl::OUString aLocalName;
-                sal_uInt16 nPrefix = rImport.GetNamespaceMap().GetKeyByAttrName(
-                                                    sAttrName, &aLocalName );
-                if ( nPrefix == XML_NAMESPACE_OFFICE &&
-                     IsXMLToken(aLocalName, XML_TARGET_FRAME_NAME) )
+                ::rtl::OUString aLclLocalName;
+                sal_uInt16 nLclPrefix = rInImport.GetNamespaceMap().GetKeyByAttrName(
+                                                    sAttrName, &aLclLocalName );
+                if ( nLclPrefix == XML_NAMESPACE_OFFICE &&
+                     IsXMLToken(aLclLocalName, XML_TARGET_FRAME_NAME) )
                 {
                     ::rtl::OUString sValue = xAttrList->getValueByIndex( i );
                     aPropAny <<= sValue;
@@ -518,11 +518,11 @@ SfxXMLMetaElementContext::SfxXMLMetaElementContext( SvXMLImport& rImport, 
sal_uI
         for( INT16 i=0; i < nAttrCount; i++ )
         {
             ::rtl::OUString sAttrName = xAttrList->getNameByIndex( i );
-            ::rtl::OUString aLocalName;
-            sal_uInt16 nPrefix = rImport.GetNamespaceMap().GetKeyByAttrName(
-                                                sAttrName, &aLocalName );
-            if ( nPrefix == XML_NAMESPACE_META &&
-                 IsXMLToken(aLocalName, XML_NAME) )
+            ::rtl::OUString aLclLocalName;
+            sal_uInt16 nLclPrefix = rInImport.GetNamespaceMap().GetKeyByAttrName(
+                                                sAttrName, &aLclLocalName );
+            if ( nLclPrefix == XML_NAMESPACE_META &&
+                 IsXMLToken(aLclLocalName, XML_NAME) )
             {
                 sFieldName = xAttrList->getValueByIndex( i );
             }
@@ -537,25 +537,25 @@ SfxXMLMetaElementContext::~SfxXMLMetaElementContext()
     rParent.ReleaseRef();
 }
 
-SvXMLImportContext* SfxXMLMetaElementContext::CreateChildContext( sal_uInt16 nPrefix,
+SvXMLImportContext* SfxXMLMetaElementContext::CreateChildContext( sal_uInt16 nInPrefix,
                                      const ::rtl::OUString& rLName,
                                      const uno::Reference<xml::sax::XAttributeList>& xAttrList )
 {
     SvXMLImportContext* pContext = NULL;
 
     if ( nElementType == XML_TOK_META_KEYWORDS &&
-         nPrefix == XML_NAMESPACE_META &&
+         nInPrefix == XML_NAMESPACE_META &&
          IsXMLToken(rLName, XML_KEYWORD) )
     {
         //  <office:keyword> inside of <office:keywords>
-        pContext = new SfxXMLMetaElementContext( GetImport(), nPrefix, rLName,
+        pContext = new SfxXMLMetaElementContext( GetImport(), nInPrefix, rLName,
                                     xAttrList, rParent, XML_TOK_META_KEYWORD );
     }
 
     if ( !pContext )
     {
         //  default context to ignore unknown elements
-        pContext = new SvXMLImportContext( GetImport(), nPrefix, rLName );
+        pContext = new SvXMLImportContext( GetImport(), nInPrefix, rLName );
     }
     return pContext;
 }
@@ -699,10 +699,10 @@ void SfxXMLMetaElementContext::Characters( const ::rtl::OUString& rChars )
 //  context for <office:meta> element
 //
 
-SfxXMLMetaContext::SfxXMLMetaContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
+SfxXMLMetaContext::SfxXMLMetaContext( SvXMLImport& rInImport, sal_uInt16 nPrfx,
                                     const ::rtl::OUString& rLName,
                                     const uno::Reference<frame::XModel>& rDocModel ) :
-    SvXMLImportContext( rImport, nPrfx, rLName ),
+    SvXMLImportContext( rInImport, nPrfx, rLName ),
     xDocProp( rDocModel, uno::UNO_QUERY ),
     pTokenMap( NULL ),
     nUserKeys( 0 )
@@ -719,10 +719,10 @@ SfxXMLMetaContext::SfxXMLMetaContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
 #endif
 }
 
-SfxXMLMetaContext::SfxXMLMetaContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
+SfxXMLMetaContext::SfxXMLMetaContext( SvXMLImport& rInImport, sal_uInt16 nPrfx,
                                     const ::rtl::OUString& rLName,
                                     const uno::Reference<document::XDocumentInfo>&     rDocInfo ) :
-    SvXMLImportContext( rImport, nPrfx, rLName ),
+    SvXMLImportContext( rInImport, nPrfx, rLName ),
     xDocInfo( rDocInfo ),
     xInfoProp( rDocInfo, uno::UNO_QUERY ),
     pTokenMap ( NULL ),
@@ -739,7 +739,7 @@ SfxXMLMetaContext::~SfxXMLMetaContext()
     delete pTokenMap;
 }
 
-SvXMLImportContext* SfxXMLMetaContext::CreateChildContext( sal_uInt16 nPrefix,
+SvXMLImportContext* SfxXMLMetaContext::CreateChildContext( sal_uInt16 nInPrefix,
                                     const ::rtl::OUString& rLName,
                                     const uno::Reference<xml::sax::XAttributeList>& xAttrList )
 {
@@ -748,15 +748,15 @@ SvXMLImportContext* SfxXMLMetaContext::CreateChildContext( sal_uInt16 nPrefix,
     if (!pTokenMap)
         pTokenMap = new SvXMLTokenMap( aMetaElemTokenMap );
 
-    sal_uInt16 nToken = pTokenMap->Get( nPrefix, rLName );
+    sal_uInt16 nToken = pTokenMap->Get( nInPrefix, rLName );
     if ( nToken != XML_TOK_UNKNOWN )
         pContext = new SfxXMLMetaElementContext( GetImport(),
-                                nPrefix, rLName, xAttrList, *this, nToken );
+                                nInPrefix, rLName, xAttrList, *this, nToken );
 
     if ( !pContext )
     {
         //  default context to ignore unknown elements
-        pContext = new SvXMLImportContext( GetImport(), nPrefix, rLName );
+        pContext = new SvXMLImportContext( GetImport(), nInPrefix, rLName );
     }
     return pContext;
 }
-- 
1.7.1


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.