[Libreoffice-commits] .: 3 commits - binfilter/bf_xmloff filter/source lotuswordpro/source

Caolán McNamara caolan at kemper.freedesktop.org
Sun Feb 13 13:21:01 PST 2011


 binfilter/bf_xmloff/source/text/xmloff_XMLTextMasterStylesContext.cxx |   18 +--
 binfilter/bf_xmloff/source/text/xmloff_XMLTextNumRuleInfo.cxx         |    2 
 binfilter/bf_xmloff/source/text/xmloff_XMLTextPropertySetContext.cxx  |   34 +++---
 binfilter/bf_xmloff/source/text/xmloff_XMLTextShapeImportHelper.cxx   |    2 
 binfilter/bf_xmloff/source/text/xmloff_XMLTextShapeStyleContext.cxx   |   54 +++++-----
 binfilter/bf_xmloff/source/text/xmloff_XMLTextTableContext.cxx        |    4 
 filter/source/config/cache/filtercache.cxx                            |    5 
 lotuswordpro/source/filter/lwpfoundry.cxx                             |    4 
 8 files changed, 62 insertions(+), 61 deletions(-)

New commits:
commit 441e1c950d9f7189a71ca2ffe524a507bd4f13a8
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Feb 13 20:39:55 2011 +0000

    WaE: variable set but unused

diff --git a/filter/source/config/cache/filtercache.cxx b/filter/source/config/cache/filtercache.cxx
index acb2656..1678693 100644
--- a/filter/source/config/cache/filtercache.cxx
+++ b/filter/source/config/cache/filtercache.cxx
@@ -1927,10 +1927,7 @@ CacheItemList::iterator FilterCache::impl_loadItemOnDemand(      EItemType
 
     if (bItemInConfig)
     {
-        CacheItem aItem;
-        CacheItem::iterator pDbgTest = aItem.find(PROPNAME_NAME);
-        aItem = impl_loadItem(xSet, eType, sItem, E_READ_ALL);
-        (*pList)[sItem] = aItem;
+        (*pList)[sItem] = impl_loadItem(xSet, eType, sItem, E_READ_ALL);
         _FILTER_CONFIG_LOG_2_("impl_loadItemOnDemand(%d, \"%s\") ... OK", (int)eType, _FILTER_CONFIG_TO_ASCII_(sItem).getStr())
     }
     else
commit 2481081fa0306ca97f5983152e0e4a98563ee782
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Feb 13 12:29:17 2011 +0000

    cppcheck: init member variable

diff --git a/lotuswordpro/source/filter/lwpfoundry.cxx b/lotuswordpro/source/filter/lwpfoundry.cxx
index ef204b5..b40ff7d 100644
--- a/lotuswordpro/source/filter/lwpfoundry.cxx
+++ b/lotuswordpro/source/filter/lwpfoundry.cxx
@@ -538,7 +538,9 @@ LwpListList* LwpOrderedObjectManager::GetNextActiveListList(LwpListList * pLast)
 }
 
 LwpStyleManager::LwpStyleManager()
-{}
+    : m_pFoundry(0)
+{
+}
 
 LwpStyleManager::~LwpStyleManager()
 {
commit d5abc6b9370cbd8fcb8caf6cadcf655fec7c96f8
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Feb 13 12:05:35 2011 +0000

    WaE: throw out some warnings

diff --git a/binfilter/bf_xmloff/source/text/xmloff_XMLTextMasterStylesContext.cxx b/binfilter/bf_xmloff/source/text/xmloff_XMLTextMasterStylesContext.cxx
index dc14635..6919e7f 100644
--- a/binfilter/bf_xmloff/source/text/xmloff_XMLTextMasterStylesContext.cxx
+++ b/binfilter/bf_xmloff/source/text/xmloff_XMLTextMasterStylesContext.cxx
@@ -53,10 +53,10 @@ sal_Bool XMLTextMasterStylesContext::InsertStyleFamily( sal_uInt16 ) const
 }
 
 XMLTextMasterStylesContext::XMLTextMasterStylesContext(
-        SvXMLImport& rImport,
+        SvXMLImport& rInImport,
         sal_uInt16 nPrfx, const OUString& rLName,
         const Reference< XAttributeList > & xAttrList ) :
-    SvXMLStylesContext( rImport, nPrfx, rLName, xAttrList )
+    SvXMLStylesContext( rInImport, nPrfx, rLName, xAttrList )
 {
 }
 
@@ -65,17 +65,17 @@ XMLTextMasterStylesContext::~XMLTextMasterStylesContext()
 }
 
 SvXMLStyleContext *XMLTextMasterStylesContext::CreateStyleChildContext(
-        sal_uInt16 nPrefix,
+        sal_uInt16 nInPrefix,
         const OUString& rLocalName,
         const Reference< XAttributeList > & xAttrList )
 {
     SvXMLStyleContext *pContext = 0;
 
-    if( XML_NAMESPACE_STYLE == nPrefix &&
+    if( XML_NAMESPACE_STYLE == nInPrefix &&
         IsXMLToken( rLocalName, XML_MASTER_PAGE ) &&
          InsertStyleFamily( XML_STYLE_FAMILY_MASTER_PAGE ) )
         pContext = new XMLTextMasterPageContext(
-                        GetImport(), nPrefix, rLocalName,
+                        GetImport(), nInPrefix, rLocalName,
                           xAttrList,
                         !GetImport().GetTextImport()->IsInsertMode() );
 
@@ -85,10 +85,10 @@ SvXMLStyleContext *XMLTextMasterStylesContext::CreateStyleChildContext(
 }
 
 SvXMLStyleContext *XMLTextMasterStylesContext::CreateStyleStyleChildContext(
-        sal_uInt16 nFamily,
-        sal_uInt16 nPrefix,
-        const OUString& rLocalName,
-        const Reference< XAttributeList > & xAttrList )
+        sal_uInt16 /*nFamily*/,
+        sal_uInt16 /*nInPrefix*/,
+        const OUString& /*rLocalName*/,
+        const Reference< XAttributeList > & /*xAttrList*/ )
 {
     return 0;
 }
diff --git a/binfilter/bf_xmloff/source/text/xmloff_XMLTextNumRuleInfo.cxx b/binfilter/bf_xmloff/source/text/xmloff_XMLTextNumRuleInfo.cxx
index f08eb00..1c0713d 100644
--- a/binfilter/bf_xmloff/source/text/xmloff_XMLTextNumRuleInfo.cxx
+++ b/binfilter/bf_xmloff/source/text/xmloff_XMLTextNumRuleInfo.cxx
@@ -126,7 +126,7 @@ void XMLTextNumRuleInfo::Set(
 
             if( rProp.Name == sNumberingType )
             {
-                sal_Int16 nType;
+                sal_Int16 nType(0);
                 rProp.Value >>= nType;
                 if( NumberingType::CHAR_SPECIAL != nType &&
                     NumberingType::BITMAP != nType )
diff --git a/binfilter/bf_xmloff/source/text/xmloff_XMLTextPropertySetContext.cxx b/binfilter/bf_xmloff/source/text/xmloff_XMLTextPropertySetContext.cxx
index 1253394..410add0 100644
--- a/binfilter/bf_xmloff/source/text/xmloff_XMLTextPropertySetContext.cxx
+++ b/binfilter/bf_xmloff/source/text/xmloff_XMLTextPropertySetContext.cxx
@@ -43,13 +43,13 @@ using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star;
 
 XMLTextPropertySetContext::XMLTextPropertySetContext(
-                 SvXMLImport& rImport, sal_uInt16 nPrfx,
+                 SvXMLImport& rInImport, sal_uInt16 nPrfx,
                  const OUString& rLName,
                  const Reference< xml::sax::XAttributeList > & xAttrList,
                  ::std::vector< XMLPropertyState > &rProps,
                  const UniReference < SvXMLImportPropertyMapper > &rMap,
                  OUString& rDCTextStyleName ) :
-    SvXMLPropertySetContext( rImport, nPrfx, rLName, xAttrList, rProps, rMap ),
+    SvXMLPropertySetContext( rInImport, nPrfx, rLName, xAttrList, rProps, rMap ),
     rDropCapTextStyleName( rDCTextStyleName )
 {
 }
@@ -59,10 +59,10 @@ XMLTextPropertySetContext::~XMLTextPropertySetContext()
 }
     
 SvXMLImportContext *XMLTextPropertySetContext::CreateChildContext(
-                   sal_uInt16 nPrefix,
+                   sal_uInt16 nInPrefix,
                    const OUString& rLocalName,
                    const Reference< xml::sax::XAttributeList > & xAttrList,
-                   ::std::vector< XMLPropertyState > &rProperties,
+                   ::std::vector< XMLPropertyState > &rInProperties,
                    const XMLPropertyState& rProp )
 {
     SvXMLImportContext *pContext = 0;
@@ -71,18 +71,18 @@ SvXMLImportContext *XMLTextPropertySetContext::CreateChildContext(
                     ->GetEntryContextId( rProp.mnIndex ) )
     {
     case CTF_TABSTOP:
-        pContext = new SvxXMLTabStopImportContext( GetImport(), nPrefix,
+        pContext = new SvxXMLTabStopImportContext( GetImport(), nInPrefix,
                                                    rLocalName, rProp,
-                                                   rProperties );
+                                                   rInProperties );
         break;
     case CTF_TEXTCOLUMNS:
 #ifndef SVX_LIGHT
-        pContext = new XMLTextColumnsContext( GetImport(), nPrefix,
+        pContext = new XMLTextColumnsContext( GetImport(), nInPrefix,
                                                    rLocalName, xAttrList, rProp,
-                                                   rProperties );
+                                                   rInProperties );
 #else
         // create default context to skip content
-        pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
+        pContext = new SvXMLImportContext( GetImport(), nInPrefix, rLocalName );
 #endif // #ifndef SVX_LIGHT
         break;
 
@@ -93,11 +93,11 @@ SvXMLImportContext *XMLTextPropertySetContext::CreateChildContext(
                             ->GetEntryContextId( rProp.mnIndex-2 ),
                         "invalid property map!");
             XMLTextDropCapImportContext *pDCContext =
-                new XMLTextDropCapImportContext( GetImport(), nPrefix,
+                new XMLTextDropCapImportContext( GetImport(), nInPrefix,
                                                         rLocalName, xAttrList,
                                                         rProp,
                                                         rProp.mnIndex-2,
-                                                        rProperties );
+                                                        rInProperties );
             rDropCapTextStyleName = pDCContext->GetStyleName();
         pContext = pDCContext;
         }
@@ -122,33 +122,33 @@ SvXMLImportContext *XMLTextPropertySetContext::CreateChildContext(
             nTranspIndex = rProp.mnIndex-3;
 
         pContext = 
-            new XMLBackgroundImageContext( GetImport(), nPrefix,
+            new XMLBackgroundImageContext( GetImport(), nInPrefix,
                                            rLocalName, xAttrList,
                                            rProp,
                                            rProp.mnIndex-2,
                                            rProp.mnIndex-1,
                                            nTranspIndex,
-                                           rProperties );
+                                           rInProperties );
     }
     break;
 #ifndef SVX_LIGHT
     case CTF_SECTION_FOOTNOTE_END:
         pContext = new XMLSectionFootnoteConfigImport( 
-            GetImport(), nPrefix, rLocalName, rProperties, 
+            GetImport(), nInPrefix, rLocalName, rInProperties,
             xMapper->getPropertySetMapper(), rProp.mnIndex);
         break;
     case CTF_SECTION_ENDNOTE_END:
         pContext = new XMLSectionFootnoteConfigImport( 
-            GetImport(), nPrefix, rLocalName, rProperties, 
+            GetImport(), nInPrefix, rLocalName, rInProperties,
             xMapper->getPropertySetMapper(), rProp.mnIndex);
         break;
 #endif // #ifndef SVX_LIGHT
     }
     
     if( !pContext )
-        pContext = SvXMLPropertySetContext::CreateChildContext( nPrefix, rLocalName,
+        pContext = SvXMLPropertySetContext::CreateChildContext( nInPrefix, rLocalName,
                                                             xAttrList, 
-                                                            rProperties, rProp );
+                                                            rInProperties, rProp );
     
     return pContext;
 }
diff --git a/binfilter/bf_xmloff/source/text/xmloff_XMLTextShapeImportHelper.cxx b/binfilter/bf_xmloff/source/text/xmloff_XMLTextShapeImportHelper.cxx
index 7cb0e2d..c882a0d 100644
--- a/binfilter/bf_xmloff/source/text/xmloff_XMLTextShapeImportHelper.cxx
+++ b/binfilter/bf_xmloff/source/text/xmloff_XMLTextShapeImportHelper.cxx
@@ -155,6 +155,8 @@ void XMLTextShapeImportHelper::addShape(
         aAny <<= nY;
         xPropSet->setPropertyValue( sVertOrientPosition, aAny );
         break;
+    default:
+        break;
     }
 }
 }//end of namespace binfilter
diff --git a/binfilter/bf_xmloff/source/text/xmloff_XMLTextShapeStyleContext.cxx b/binfilter/bf_xmloff/source/text/xmloff_XMLTextShapeStyleContext.cxx
index c8a779e..7a3649d 100644
--- a/binfilter/bf_xmloff/source/text/xmloff_XMLTextShapeStyleContext.cxx
+++ b/binfilter/bf_xmloff/source/text/xmloff_XMLTextShapeStyleContext.cxx
@@ -49,7 +49,7 @@ using namespace ::binfilter::xmloff::token;
 class XMLTextShapePropertySetContext_Impl : public XMLShapePropertySetContext
 {
 public:
-    XMLTextShapePropertySetContext_Impl( SvXMLImport& rImport, sal_uInt16 nPrfx,
+    XMLTextShapePropertySetContext_Impl( SvXMLImport& rInImport, sal_uInt16 nPrfx,
         const OUString& rLName,
         const Reference< XAttributeList >& xAttrList,
         ::std::vector< XMLPropertyState > &rProps,
@@ -57,7 +57,7 @@ public:
 
     virtual ~XMLTextShapePropertySetContext_Impl();
 
-    virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+    virtual SvXMLImportContext *CreateChildContext( USHORT nInPrefix,
         const OUString& rLocalName,
         const Reference< XAttributeList >& xAttrList,
         ::std::vector< XMLPropertyState > &rProperties,
@@ -65,12 +65,12 @@ public:
 };
 
 XMLTextShapePropertySetContext_Impl::XMLTextShapePropertySetContext_Impl(
-                 SvXMLImport& rImport, sal_uInt16 nPrfx,
+                 SvXMLImport& rInImport, sal_uInt16 nPrfx,
                  const OUString& rLName,
                  const Reference< XAttributeList > & xAttrList,
                  ::std::vector< XMLPropertyState > &rProps,
                  const UniReference < SvXMLImportPropertyMapper > &rMap ) :
-    XMLShapePropertySetContext( rImport, nPrfx, rLName, xAttrList, rProps,
+    XMLShapePropertySetContext( rInImport, nPrfx, rLName, xAttrList, rProps,
                                 rMap )
 {
 }
@@ -80,10 +80,10 @@ XMLTextShapePropertySetContext_Impl::~XMLTextShapePropertySetContext_Impl()
 }
 
 SvXMLImportContext *XMLTextShapePropertySetContext_Impl::CreateChildContext(
-                   sal_uInt16 nPrefix,
+                   sal_uInt16 nInPrefix,
                    const OUString& rLocalName,
                    const Reference< XAttributeList > & xAttrList,
-                   ::std::vector< XMLPropertyState > &rProperties,
+                   ::std::vector< XMLPropertyState > &rInProperties,
                    const XMLPropertyState& rProp )
 {
     SvXMLImportContext *pContext = 0;
@@ -92,9 +92,9 @@ SvXMLImportContext *XMLTextShapePropertySetContext_Impl::CreateChildContext(
                     ->GetEntryContextId( rProp.mnIndex ) )
     {
     case CTF_TEXTCOLUMNS:
-        pContext = new XMLTextColumnsContext( GetImport(), nPrefix,
+        pContext = new XMLTextColumnsContext( GetImport(), nInPrefix,
                                                    rLocalName, xAttrList, rProp,
-                                                   rProperties );
+                                                   rInProperties );
         break;
 
     case CTF_BACKGROUND_URL:
@@ -108,7 +108,7 @@ SvXMLImportContext *XMLTextShapePropertySetContext_Impl::CreateChildContext(
                         ->GetEntryContextId( rProp.mnIndex-1 ),
                     "invalid property map!");
         pContext = 
-            new XMLBackgroundImageContext( GetImport(), nPrefix,
+            new XMLBackgroundImageContext( GetImport(), nInPrefix,
                                            rLocalName, xAttrList,
                                            rProp,
                                            rProp.mnIndex-2,
@@ -120,7 +120,7 @@ SvXMLImportContext *XMLTextShapePropertySetContext_Impl::CreateChildContext(
     
     if( !pContext )
         pContext = XMLShapePropertySetContext::CreateChildContext(
-                        nPrefix, rLocalName, xAttrList, rProperties, rProp );
+                        nInPrefix, rLocalName, xAttrList, rProperties, rProp );
     
     return pContext;
 }
@@ -145,15 +145,15 @@ void XMLTextShapeStyleContext::SetAttribute( sal_uInt16 nPrefixKey,
 
 TYPEINIT1( XMLTextShapeStyleContext, XMLShapeStyleContext );
 
-XMLTextShapeStyleContext::XMLTextShapeStyleContext( SvXMLImport& rImport,
+XMLTextShapeStyleContext::XMLTextShapeStyleContext( SvXMLImport& rInImport,
         sal_uInt16 nPrfx, const OUString& rLName,
         const Reference< XAttributeList > & xAttrList,
-        SvXMLStylesContext& rStyles, sal_uInt16 nFamily,
-        sal_Bool bDefaultStyle ) :
-    XMLShapeStyleContext( rImport, nPrfx, rLName, xAttrList, rStyles,
-                          nFamily ),
-    bAutoUpdate( sal_False ),
-    sIsAutoUpdate( RTL_CONSTASCII_USTRINGPARAM( "IsAutoUpdate" ) )
+        SvXMLStylesContext& rStyles, sal_uInt16 nInFamily,
+        sal_Bool /*bDefaultStyle*/ ) :
+    XMLShapeStyleContext( rInImport, nPrfx, rLName, xAttrList, rStyles,
+                          nInFamily ),
+    sIsAutoUpdate( RTL_CONSTASCII_USTRINGPARAM( "IsAutoUpdate" ) ),
+    bAutoUpdate( sal_False )
 {
 }
 
@@ -162,13 +162,13 @@ XMLTextShapeStyleContext::~XMLTextShapeStyleContext()
 }
 
 SvXMLImportContext *XMLTextShapeStyleContext::CreateChildContext(
-        sal_uInt16 nPrefix,
+        sal_uInt16 nInPrefix,
         const OUString& rLocalName,
         const Reference< XAttributeList > & xAttrList )
 {
     SvXMLImportContext *pContext = 0;
 
-    if( XML_NAMESPACE_STYLE == nPrefix &&
+    if( XML_NAMESPACE_STYLE == nInPrefix &&
         IsXMLToken( rLocalName, XML_PROPERTIES ) )
     {
         UniReference < SvXMLImportPropertyMapper > xImpPrMap =
@@ -176,22 +176,22 @@ SvXMLImportContext *XMLTextShapeStyleContext::CreateChildContext(
         if( xImpPrMap.is() )
         {		
             pContext = new XMLTextShapePropertySetContext_Impl(
-                    GetImport(), nPrefix, rLocalName, xAttrList,
+                    GetImport(), nInPrefix, rLocalName, xAttrList,
                     GetProperties(), xImpPrMap );
         }
     }
-    else if ( (XML_NAMESPACE_OFFICE == nPrefix) &&
+    else if ( (XML_NAMESPACE_OFFICE == nInPrefix) &&
               IsXMLToken( rLocalName, XML_EVENTS ) )
     {
         // create and remember events import context 
         // (for delayed processing of events)
-        pContext = new XMLEventsImportContext( GetImport(), nPrefix,
+        pContext = new XMLEventsImportContext( GetImport(), nInPrefix,
                                                    rLocalName);
         xEventContext = pContext;
     }
         
     if( !pContext )
-        pContext = XMLShapeStyleContext::CreateChildContext( nPrefix, rLocalName,
+        pContext = XMLShapeStyleContext::CreateChildContext( nInPrefix, rLocalName,
                                                           xAttrList );
 
     return pContext;
@@ -200,11 +200,11 @@ SvXMLImportContext *XMLTextShapeStyleContext::CreateChildContext(
 void XMLTextShapeStyleContext::CreateAndInsert( sal_Bool bOverwrite )
 {
     XMLShapeStyleContext::CreateAndInsert( bOverwrite );
-    Reference < XStyle > xStyle = GetStyle();
-    if( !xStyle.is() || !(bOverwrite || IsNew()) )
+    Reference < XStyle > xLclStyle = GetStyle();
+    if( !xLclStyle.is() || !(bOverwrite || IsNew()) )
         return;
     
-    Reference < XPropertySet > xPropSet( xStyle, UNO_QUERY );
+    Reference < XPropertySet > xPropSet( xLclStyle, UNO_QUERY );
     Reference< XPropertySetInfo > xPropSetInfo =
                 xPropSet->getPropertySetInfo();
     if( xPropSetInfo->hasPropertyByName( sIsAutoUpdate ) )
@@ -219,7 +219,7 @@ void XMLTextShapeStyleContext::CreateAndInsert( sal_Bool bOverwrite )
     if( xEventContext.Is() )
     {
         // set event suppplier and release reference to context
-        Reference<XEventsSupplier> xEventsSupplier(xStyle, UNO_QUERY);
+        Reference<XEventsSupplier> xEventsSupplier(xLclStyle, UNO_QUERY);
         ((XMLEventsImportContext *)&xEventContext)->SetEvents(xEventsSupplier);
         xEventContext = 0;
     }
diff --git a/binfilter/bf_xmloff/source/text/xmloff_XMLTextTableContext.cxx b/binfilter/bf_xmloff/source/text/xmloff_XMLTextTableContext.cxx
index 400bfa4..4e30bea 100644
--- a/binfilter/bf_xmloff/source/text/xmloff_XMLTextTableContext.cxx
+++ b/binfilter/bf_xmloff/source/text/xmloff_XMLTextTableContext.cxx
@@ -37,9 +37,9 @@ using namespace ::com::sun::star::text;
 TYPEINIT1( XMLTextTableContext, SvXMLImportContext );
 
 XMLTextTableContext::XMLTextTableContext(
-        SvXMLImport& rImport,
+        SvXMLImport& rInImport,
         sal_uInt16 nPrfx, const OUString& rLName ) :
-    SvXMLImportContext( rImport, nPrfx, rLName )
+    SvXMLImportContext( rInImport, nPrfx, rLName )
 {
 }
 


More information about the Libreoffice-commits mailing list