[Libreoffice-commits] core.git: xmlhelp/source xmloff/inc xmloff/source xmlscript/source xmlsecurity/inc

Noel Grandin noel.grandin at collabora.co.uk
Fri Jun 16 06:25:14 UTC 2017


 xmlhelp/source/cxxhelp/provider/urlparameter.cxx   |    3 ---
 xmlhelp/source/cxxhelp/provider/urlparameter.hxx   |    1 -
 xmloff/inc/txtfldi.hxx                             |    1 -
 xmloff/inc/txtvfldi.hxx                            |    3 ---
 xmloff/source/draw/ximp3dobject.cxx                |   20 ++------------------
 xmloff/source/draw/ximp3dobject.hxx                |    4 ----
 xmloff/source/style/PageMasterExportPropMapper.cxx |   12 ------------
 xmloff/source/table/XMLTableImport.cxx             |    5 -----
 xmloff/source/text/txtfldi.cxx                     |    2 --
 xmloff/source/text/txtvfldi.cxx                    |   12 ------------
 xmlscript/source/xmlmod_imexp/imp_share.hxx        |    5 -----
 xmlscript/source/xmlmod_imexp/xmlmod_import.cxx    |    2 --
 xmlsecurity/inc/xmlsignaturehelper.hxx             |    8 ++------
 13 files changed, 4 insertions(+), 74 deletions(-)

New commits:
commit 83f9325f0d8d643d8b3e71fa3ff76ebbd599373d
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Thu Jun 15 11:42:29 2017 +0200

    loplugin:unusedfields xmlhelp..xmlsecurity
    
    Change-Id: I7e680e1913c787ce0adad5be1f84668d57ad00b3
    Reviewed-on: https://gerrit.libreoffice.org/38821
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
index 8c2f0067e8fa..85d33f8463a1 100644
--- a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
+++ b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
@@ -119,8 +119,6 @@ OUString const & URLParameter::get_id()
                                                          get_language() );
         if( inf )
             m_aId = inf->get_id();
-
-        m_bStart = true;
     }
 
     return m_aId;
@@ -180,7 +178,6 @@ OUString const & URLParameter::get_program()
 void URLParameter::init()
 {
     m_bHelpDataFileRead = false;
-    m_bStart = false;
     m_bUseDB = true;
     m_nHitCount = 100;                // The default maximum hitcount
 }
diff --git a/xmlhelp/source/cxxhelp/provider/urlparameter.hxx b/xmlhelp/source/cxxhelp/provider/urlparameter.hxx
index 07601e48eb1a..b261eaa99e96 100644
--- a/xmlhelp/source/cxxhelp/provider/urlparameter.hxx
+++ b/xmlhelp/source/cxxhelp/provider/urlparameter.hxx
@@ -175,7 +175,6 @@ namespace chelp {
         Databases* m_pDatabases;
 
         bool m_bHelpDataFileRead;
-        bool m_bStart;
         bool m_bUseDB;
 
         OUString  m_aURL;
diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx
index 1aa9c5ac3761..e42ee3b51d96 100644
--- a/xmloff/inc/txtfldi.hxx
+++ b/xmloff/inc/txtfldi.hxx
@@ -1159,7 +1159,6 @@ class XMLScriptImportContext : public XMLTextFieldImportContext
     OUString sScriptType;
 
     bool bContentOK;
-    bool bScriptTypeOK;
 
 public:
 
diff --git a/xmloff/inc/txtvfldi.hxx b/xmloff/inc/txtvfldi.hxx
index 437657b5442b..a4c05bcd37ae 100644
--- a/xmloff/inc/txtvfldi.hxx
+++ b/xmloff/inc/txtvfldi.hxx
@@ -45,9 +45,7 @@ class XMLValueImportHelper final
 
     bool bStringType;       /// is this a string (or a float) type?
     bool bFormatOK;         /// have we read a style:data-style-name attr.?
-    bool bTypeOK;           /// have we read a value-type attribute?
     bool bStringValueOK;    /// have we read a string-value attr.?
-    bool bFloatValueOK;     /// have we read any of the float attr.s?
     bool bFormulaOK;        /// have we read the formula attribute?
 
     const bool bSetType;    /// should PrepareField set the SetExp subtype?
@@ -118,7 +116,6 @@ private:
     bool bDisplayFormula;           /// display formula?(rather than value)
     bool bDisplayNone;              /// hide field?
 
-    bool bNameOK;                   /// sName was set
     bool bFormulaOK;                /// sFormula was set
     bool bDescriptionOK;            /// sDescription was set
     bool bHelpOK;                   /// sHelp was set
diff --git a/xmloff/source/draw/ximp3dobject.cxx b/xmloff/source/draw/ximp3dobject.cxx
index b573afd2fc9f..930ce52dd326 100644
--- a/xmloff/source/draw/ximp3dobject.cxx
+++ b/xmloff/source/draw/ximp3dobject.cxx
@@ -103,9 +103,7 @@ SdXML3DCubeObjectShapeContext::SdXML3DCubeObjectShapeContext(
     uno::Reference< drawing::XShapes >& rShapes)
 :   SdXML3DObjectContext( rImport, nPrfx, rLocalName, xAttrList, rShapes ),
     maMinEdge(-2500.0, -2500.0, -2500.0),
-    maMaxEdge(2500.0, 2500.0, 2500.0),
-    mbMinEdgeUsed(false),
-    mbMaxEdgeUsed(false)
+    maMaxEdge(2500.0, 2500.0, 2500.0)
 {
     sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
     for(sal_Int16 i=0; i < nAttrCount; i++)
@@ -124,10 +122,7 @@ SdXML3DCubeObjectShapeContext::SdXML3DCubeObjectShapeContext(
                 SvXMLUnitConverter::convertB3DVector(aNewVec, sValue);
 
                 if(aNewVec != maMinEdge)
-                {
                     maMinEdge = aNewVec;
-                    mbMinEdgeUsed = true;
-                }
                 break;
             }
             case XML_TOK_3DCUBEOBJ_MAXEDGE:
@@ -136,10 +131,7 @@ SdXML3DCubeObjectShapeContext::SdXML3DCubeObjectShapeContext(
                 SvXMLUnitConverter::convertB3DVector(aNewVec, sValue);
 
                 if(aNewVec != maMaxEdge)
-                {
                     maMaxEdge = aNewVec;
-                    mbMaxEdgeUsed = true;
-                }
                 break;
             }
         }
@@ -193,9 +185,7 @@ SdXML3DSphereObjectShapeContext::SdXML3DSphereObjectShapeContext(
     uno::Reference< drawing::XShapes >& rShapes)
 :   SdXML3DObjectContext( rImport, nPrfx, rLocalName, xAttrList, rShapes ),
     maCenter(0.0, 0.0, 0.0),
-    maSphereSize(5000.0, 5000.0, 5000.0),
-    mbCenterUsed(false),
-    mbSizeUsed(false)
+    maSphereSize(5000.0, 5000.0, 5000.0)
 {
     sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
     for(sal_Int16 i=0; i < nAttrCount; i++)
@@ -214,10 +204,7 @@ SdXML3DSphereObjectShapeContext::SdXML3DSphereObjectShapeContext(
                 SvXMLUnitConverter::convertB3DVector(aNewVec, sValue);
 
                 if(aNewVec != maCenter)
-                {
                     maCenter = aNewVec;
-                    mbCenterUsed = true;
-                }
                 break;
             }
             case XML_TOK_3DSPHEREOBJ_SIZE:
@@ -226,10 +213,7 @@ SdXML3DSphereObjectShapeContext::SdXML3DSphereObjectShapeContext(
                 SvXMLUnitConverter::convertB3DVector(aNewVec, sValue);
 
                 if(aNewVec != maSphereSize)
-                {
                     maSphereSize = aNewVec;
-                    mbSizeUsed = true;
-                }
                 break;
             }
         }
diff --git a/xmloff/source/draw/ximp3dobject.hxx b/xmloff/source/draw/ximp3dobject.hxx
index 819b4a3e26ee..3c68cd1b7bbc 100644
--- a/xmloff/source/draw/ximp3dobject.hxx
+++ b/xmloff/source/draw/ximp3dobject.hxx
@@ -57,8 +57,6 @@ class SdXML3DCubeObjectShapeContext : public SdXML3DObjectContext
 {
     ::basegfx::B3DVector    maMinEdge;
     ::basegfx::B3DVector    maMaxEdge;
-    bool                    mbMinEdgeUsed;
-    bool                    mbMaxEdgeUsed;
 
 public:
 
@@ -77,8 +75,6 @@ class SdXML3DSphereObjectShapeContext : public SdXML3DObjectContext
 {
     ::basegfx::B3DVector    maCenter;
     ::basegfx::B3DVector    maSphereSize;
-    bool                    mbCenterUsed;
-    bool                    mbSizeUsed;
 
 public:
 
diff --git a/xmloff/source/style/PageMasterExportPropMapper.cxx b/xmloff/source/style/PageMasterExportPropMapper.cxx
index b66b95d22cba..d5bce493255a 100644
--- a/xmloff/source/style/PageMasterExportPropMapper.cxx
+++ b/xmloff/source/style/PageMasterExportPropMapper.cxx
@@ -64,10 +64,6 @@ static void lcl_AddState(::std::vector< XMLPropertyState >& rPropState, sal_Int3
 struct XMLPropertyStateBuffer
 {
     XMLPropertyState*       pPMMarginAll;
-    XMLPropertyState*       pPMMarginTop;
-    XMLPropertyState*       pPMMarginBottom;
-    XMLPropertyState*       pPMMarginLeft;
-    XMLPropertyState*       pPMMarginRight;
 
     XMLPropertyState*       pPMBorderAll;
     XMLPropertyState*       pPMBorderTop;
@@ -93,10 +89,6 @@ struct XMLPropertyStateBuffer
 
 XMLPropertyStateBuffer::XMLPropertyStateBuffer()
     :   pPMMarginAll( nullptr )
-    ,   pPMMarginTop( nullptr )
-    ,   pPMMarginBottom( nullptr )
-    ,   pPMMarginLeft( nullptr )
-    ,   pPMMarginRight( nullptr )
     ,
         pPMBorderAll( nullptr ),
         pPMBorderTop( nullptr ),
@@ -352,10 +344,6 @@ void XMLPageMasterExportPropMapper::ContextFilter(
         switch( nSimpleId )
         {
             case CTF_PM_MARGINALL:          pBuffer->pPMMarginAll           = pProp;    break;
-            case CTF_PM_MARGINTOP:          pBuffer->pPMMarginTop           = pProp;    break;
-            case CTF_PM_MARGINBOTTOM:       pBuffer->pPMMarginBottom        = pProp;    break;
-            case CTF_PM_MARGINLEFT:         pBuffer->pPMMarginLeft          = pProp;    break;
-            case CTF_PM_MARGINRIGHT:        pBuffer->pPMMarginRight         = pProp;    break;
             case CTF_PM_BORDERALL:          pBuffer->pPMBorderAll           = pProp;    break;
             case CTF_PM_BORDERTOP:          pBuffer->pPMBorderTop           = pProp;    break;
             case CTF_PM_BORDERBOTTOM:       pBuffer->pPMBorderBottom        = pProp;    break;
diff --git a/xmloff/source/table/XMLTableImport.cxx b/xmloff/source/table/XMLTableImport.cxx
index 46e5b7ed04f1..1ba9b665d3fd 100644
--- a/xmloff/source/table/XMLTableImport.cxx
+++ b/xmloff/source/table/XMLTableImport.cxx
@@ -60,7 +60,6 @@ namespace {
 struct ColumnInfo
 {
     OUString msStyleName;
-    bool mbVisibility;
     OUString msDefaultCellStyleName;
 };
 
@@ -404,10 +403,6 @@ SvXMLImportContext * XMLTableImportContext::ImportColumn( sal_uInt16 nPrefix, co
                 {
                     xInfo->msDefaultCellStyleName = sValue;
                 }
-                else if( IsXMLToken( aLocalName, XML_VISIBILITY ) )
-                {
-                    xInfo->mbVisibility = IsXMLToken( sValue, XML_VISIBLE );
-                }
             }
             else if ( (XML_NAMESPACE_XML == nPrefix2) &&
                  IsXMLToken(aLocalName, XML_ID)   )
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index 308ea75fc69e..392bfecf34a7 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -3503,7 +3503,6 @@ XMLScriptImportContext::XMLScriptImportContext(
     const OUString& sLocalName)
 :   XMLTextFieldImportContext(rImport, rHlp, "Script", nPrfx, sLocalName)
 ,   bContentOK(false)
-,   bScriptTypeOK(false)
 {
 }
 
@@ -3520,7 +3519,6 @@ void XMLScriptImportContext::ProcessAttribute(
 
         case XML_TOK_TEXTFIELD_LANGUAGE:
             sScriptType = sAttrValue;
-            bScriptTypeOK = true;
             break;
 
         default:
diff --git a/xmloff/source/text/txtvfldi.cxx b/xmloff/source/text/txtvfldi.cxx
index 6825a737cccf..7285cf132e33 100644
--- a/xmloff/source/text/txtvfldi.cxx
+++ b/xmloff/source/text/txtvfldi.cxx
@@ -88,7 +88,6 @@ XMLVarFieldImportContext::XMLVarFieldImportContext(
         aValueHelper(rImport, rHlp, bType, bStyle, bValue, false),
         bDisplayFormula(false),
         bDisplayNone(false),
-        bNameOK(false),
         bFormulaOK(false),
         bDescriptionOK(false),
         bHelpOK(false),
@@ -113,7 +112,6 @@ void XMLVarFieldImportContext::ProcessAttribute(
         {
         case XML_TOK_TEXTFIELD_NAME:
             sName = sAttrValue;
-            bNameOK = true;
             bValid = true;      // we assume: field with name is valid!
             break;
         case XML_TOK_TEXTFIELD_DESCRIPTION:
@@ -1104,9 +1102,7 @@ XMLValueImportHelper::XMLValueImportHelper(
 
         bStringType(false),
         bFormatOK(false),
-        bTypeOK(false),
         bStringValueOK(false),
-        bFloatValueOK(false),
         bFormulaOK(false),
 
         bSetType(bType),
@@ -1129,8 +1125,6 @@ void XMLValueImportHelper::ProcessAttribute(
                 eValueType, sAttrValue, aValueTypeMap);
 
             if (bRet) {
-                bTypeOK = true;
-
                 switch (eValueType)
                 {
                     case XML_VALUE_TYPE_STRING:
@@ -1147,7 +1141,6 @@ void XMLValueImportHelper::ProcessAttribute(
 
                     default:
                         OSL_FAIL("unknown value type");
-                        bTypeOK = false;
                 }
             }
             break;
@@ -1158,7 +1151,6 @@ void XMLValueImportHelper::ProcessAttribute(
             double fTmp;
             bool const bRet = ::sax::Converter::convertDouble(fTmp,sAttrValue);
             if (bRet) {
-                bFloatValueOK = true;
                 fValue = fTmp;
             }
             break;
@@ -1170,7 +1162,6 @@ void XMLValueImportHelper::ProcessAttribute(
             bool const bRet =
                 ::sax::Converter::convertDuration(fTmp, sAttrValue);
             if (bRet) {
-                bFloatValueOK = true;
                 fValue = fTmp;
             }
             break;
@@ -1182,7 +1173,6 @@ void XMLValueImportHelper::ProcessAttribute(
             bool bRet = rImport.GetMM100UnitConverter().
                 convertDateTime(fTmp,sAttrValue);
             if (bRet) {
-                bFloatValueOK = true;
                 fValue = fTmp;
             }
             break;
@@ -1193,7 +1183,6 @@ void XMLValueImportHelper::ProcessAttribute(
             bool bTmp(false);
             bool bRet = ::sax::Converter::convertBool(bTmp, sAttrValue);
             if (bRet) {
-                bFloatValueOK = true;
                 fValue = (bTmp ? 1.0 : 0.0);
             }
             else
@@ -1201,7 +1190,6 @@ void XMLValueImportHelper::ProcessAttribute(
                 double fTmp;
                 bRet = ::sax::Converter::convertDouble(fTmp, sAttrValue);
                 if (bRet) {
-                    bFloatValueOK = true;
                     fValue = fTmp;
                 }
             }
diff --git a/xmlscript/source/xmlmod_imexp/imp_share.hxx b/xmlscript/source/xmlmod_imexp/imp_share.hxx
index 78c4d2a54830..99260ed4c238 100644
--- a/xmlscript/source/xmlmod_imexp/imp_share.hxx
+++ b/xmlscript/source/xmlmod_imexp/imp_share.hxx
@@ -50,16 +50,11 @@ struct ModuleImport
     ModuleDescriptor& mrModuleDesc;
 
     sal_Int32 XMLNS_SCRIPT_UID;
-private:
-    sal_Int32 XMLNS_LIBRARY_UID;
-    sal_Int32 XMLNS_XLINK_UID;
 
 public:
     explicit ModuleImport(ModuleDescriptor& rModuleDesc)
         : mrModuleDesc(rModuleDesc)
         , XMLNS_SCRIPT_UID(0)
-        , XMLNS_LIBRARY_UID(0)
-        , XMLNS_XLINK_UID(0)
     {
     }
 
diff --git a/xmlscript/source/xmlmod_imexp/xmlmod_import.cxx b/xmlscript/source/xmlmod_imexp/xmlmod_import.cxx
index f97de2496bac..81ebac41f80e 100644
--- a/xmlscript/source/xmlmod_imexp/xmlmod_import.cxx
+++ b/xmlscript/source/xmlmod_imexp/xmlmod_import.cxx
@@ -97,8 +97,6 @@ void ModuleImport::startDocument(
     Reference< xml::input::XNamespaceMapping > const & xNamespaceMapping )
 {
     XMLNS_SCRIPT_UID = xNamespaceMapping->getUidByUri( XMLNS_SCRIPT_URI );
-    XMLNS_LIBRARY_UID = xNamespaceMapping->getUidByUri( XMLNS_LIBRARY_URI );
-    XMLNS_XLINK_UID = xNamespaceMapping->getUidByUri( XMLNS_XLINK_URI );
 }
 
 void ModuleImport::endDocument()
diff --git a/xmlsecurity/inc/xmlsignaturehelper.hxx b/xmlsecurity/inc/xmlsignaturehelper.hxx
index df77db92b7a8..3d0c91eb7ed8 100644
--- a/xmlsecurity/inc/xmlsignaturehelper.hxx
+++ b/xmlsecurity/inc/xmlsignaturehelper.hxx
@@ -51,24 +51,20 @@ namespace embed {
 
 struct XMLSignatureCreationResult
 {
-    sal_Int32 nSecurityId;
     css::xml::crypto::SecurityOperationStatus nSignatureCreationResult;
 
-    XMLSignatureCreationResult( sal_Int32 nId, css::xml::crypto::SecurityOperationStatus nResult )
+    XMLSignatureCreationResult( css::xml::crypto::SecurityOperationStatus nResult )
     {
-        nSecurityId = nId;
         nSignatureCreationResult = nResult;
     }
 };
 
 struct XMLSignatureVerifyResult
 {
-    sal_Int32 nSecurityId;
     css::xml::crypto::SecurityOperationStatus nSignatureVerifyResult;
 
-    XMLSignatureVerifyResult( sal_Int32 nId, css::xml::crypto::SecurityOperationStatus nResult )
+    XMLSignatureVerifyResult( css::xml::crypto::SecurityOperationStatus nResult )
     {
-        nSecurityId = nId;
         nSignatureVerifyResult = nResult;
     }
 };


More information about the Libreoffice-commits mailing list