Kaydet (Commit) 83f9325f authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:unusedfields xmlhelp..xmlsecurity

Change-Id: I7e680e1913c787ce0adad5be1f84668d57ad00b3
Reviewed-on: https://gerrit.libreoffice.org/38821Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 9e425891
...@@ -119,8 +119,6 @@ OUString const & URLParameter::get_id() ...@@ -119,8 +119,6 @@ OUString const & URLParameter::get_id()
get_language() ); get_language() );
if( inf ) if( inf )
m_aId = inf->get_id(); m_aId = inf->get_id();
m_bStart = true;
} }
return m_aId; return m_aId;
...@@ -180,7 +178,6 @@ OUString const & URLParameter::get_program() ...@@ -180,7 +178,6 @@ OUString const & URLParameter::get_program()
void URLParameter::init() void URLParameter::init()
{ {
m_bHelpDataFileRead = false; m_bHelpDataFileRead = false;
m_bStart = false;
m_bUseDB = true; m_bUseDB = true;
m_nHitCount = 100; // The default maximum hitcount m_nHitCount = 100; // The default maximum hitcount
} }
......
...@@ -175,7 +175,6 @@ namespace chelp { ...@@ -175,7 +175,6 @@ namespace chelp {
Databases* m_pDatabases; Databases* m_pDatabases;
bool m_bHelpDataFileRead; bool m_bHelpDataFileRead;
bool m_bStart;
bool m_bUseDB; bool m_bUseDB;
OUString m_aURL; OUString m_aURL;
......
...@@ -1159,7 +1159,6 @@ class XMLScriptImportContext : public XMLTextFieldImportContext ...@@ -1159,7 +1159,6 @@ class XMLScriptImportContext : public XMLTextFieldImportContext
OUString sScriptType; OUString sScriptType;
bool bContentOK; bool bContentOK;
bool bScriptTypeOK;
public: public:
......
...@@ -45,9 +45,7 @@ class XMLValueImportHelper final ...@@ -45,9 +45,7 @@ class XMLValueImportHelper final
bool bStringType; /// is this a string (or a float) type? bool bStringType; /// is this a string (or a float) type?
bool bFormatOK; /// have we read a style:data-style-name attr.? 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 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? bool bFormulaOK; /// have we read the formula attribute?
const bool bSetType; /// should PrepareField set the SetExp subtype? const bool bSetType; /// should PrepareField set the SetExp subtype?
...@@ -118,7 +116,6 @@ private: ...@@ -118,7 +116,6 @@ private:
bool bDisplayFormula; /// display formula?(rather than value) bool bDisplayFormula; /// display formula?(rather than value)
bool bDisplayNone; /// hide field? bool bDisplayNone; /// hide field?
bool bNameOK; /// sName was set
bool bFormulaOK; /// sFormula was set bool bFormulaOK; /// sFormula was set
bool bDescriptionOK; /// sDescription was set bool bDescriptionOK; /// sDescription was set
bool bHelpOK; /// sHelp was set bool bHelpOK; /// sHelp was set
......
...@@ -103,9 +103,7 @@ SdXML3DCubeObjectShapeContext::SdXML3DCubeObjectShapeContext( ...@@ -103,9 +103,7 @@ SdXML3DCubeObjectShapeContext::SdXML3DCubeObjectShapeContext(
uno::Reference< drawing::XShapes >& rShapes) uno::Reference< drawing::XShapes >& rShapes)
: SdXML3DObjectContext( rImport, nPrfx, rLocalName, xAttrList, rShapes ), : SdXML3DObjectContext( rImport, nPrfx, rLocalName, xAttrList, rShapes ),
maMinEdge(-2500.0, -2500.0, -2500.0), maMinEdge(-2500.0, -2500.0, -2500.0),
maMaxEdge(2500.0, 2500.0, 2500.0), maMaxEdge(2500.0, 2500.0, 2500.0)
mbMinEdgeUsed(false),
mbMaxEdgeUsed(false)
{ {
sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
for(sal_Int16 i=0; i < nAttrCount; i++) for(sal_Int16 i=0; i < nAttrCount; i++)
...@@ -124,10 +122,7 @@ SdXML3DCubeObjectShapeContext::SdXML3DCubeObjectShapeContext( ...@@ -124,10 +122,7 @@ SdXML3DCubeObjectShapeContext::SdXML3DCubeObjectShapeContext(
SvXMLUnitConverter::convertB3DVector(aNewVec, sValue); SvXMLUnitConverter::convertB3DVector(aNewVec, sValue);
if(aNewVec != maMinEdge) if(aNewVec != maMinEdge)
{
maMinEdge = aNewVec; maMinEdge = aNewVec;
mbMinEdgeUsed = true;
}
break; break;
} }
case XML_TOK_3DCUBEOBJ_MAXEDGE: case XML_TOK_3DCUBEOBJ_MAXEDGE:
...@@ -136,10 +131,7 @@ SdXML3DCubeObjectShapeContext::SdXML3DCubeObjectShapeContext( ...@@ -136,10 +131,7 @@ SdXML3DCubeObjectShapeContext::SdXML3DCubeObjectShapeContext(
SvXMLUnitConverter::convertB3DVector(aNewVec, sValue); SvXMLUnitConverter::convertB3DVector(aNewVec, sValue);
if(aNewVec != maMaxEdge) if(aNewVec != maMaxEdge)
{
maMaxEdge = aNewVec; maMaxEdge = aNewVec;
mbMaxEdgeUsed = true;
}
break; break;
} }
} }
...@@ -193,9 +185,7 @@ SdXML3DSphereObjectShapeContext::SdXML3DSphereObjectShapeContext( ...@@ -193,9 +185,7 @@ SdXML3DSphereObjectShapeContext::SdXML3DSphereObjectShapeContext(
uno::Reference< drawing::XShapes >& rShapes) uno::Reference< drawing::XShapes >& rShapes)
: SdXML3DObjectContext( rImport, nPrfx, rLocalName, xAttrList, rShapes ), : SdXML3DObjectContext( rImport, nPrfx, rLocalName, xAttrList, rShapes ),
maCenter(0.0, 0.0, 0.0), maCenter(0.0, 0.0, 0.0),
maSphereSize(5000.0, 5000.0, 5000.0), maSphereSize(5000.0, 5000.0, 5000.0)
mbCenterUsed(false),
mbSizeUsed(false)
{ {
sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
for(sal_Int16 i=0; i < nAttrCount; i++) for(sal_Int16 i=0; i < nAttrCount; i++)
...@@ -214,10 +204,7 @@ SdXML3DSphereObjectShapeContext::SdXML3DSphereObjectShapeContext( ...@@ -214,10 +204,7 @@ SdXML3DSphereObjectShapeContext::SdXML3DSphereObjectShapeContext(
SvXMLUnitConverter::convertB3DVector(aNewVec, sValue); SvXMLUnitConverter::convertB3DVector(aNewVec, sValue);
if(aNewVec != maCenter) if(aNewVec != maCenter)
{
maCenter = aNewVec; maCenter = aNewVec;
mbCenterUsed = true;
}
break; break;
} }
case XML_TOK_3DSPHEREOBJ_SIZE: case XML_TOK_3DSPHEREOBJ_SIZE:
...@@ -226,10 +213,7 @@ SdXML3DSphereObjectShapeContext::SdXML3DSphereObjectShapeContext( ...@@ -226,10 +213,7 @@ SdXML3DSphereObjectShapeContext::SdXML3DSphereObjectShapeContext(
SvXMLUnitConverter::convertB3DVector(aNewVec, sValue); SvXMLUnitConverter::convertB3DVector(aNewVec, sValue);
if(aNewVec != maSphereSize) if(aNewVec != maSphereSize)
{
maSphereSize = aNewVec; maSphereSize = aNewVec;
mbSizeUsed = true;
}
break; break;
} }
} }
......
...@@ -57,8 +57,6 @@ class SdXML3DCubeObjectShapeContext : public SdXML3DObjectContext ...@@ -57,8 +57,6 @@ class SdXML3DCubeObjectShapeContext : public SdXML3DObjectContext
{ {
::basegfx::B3DVector maMinEdge; ::basegfx::B3DVector maMinEdge;
::basegfx::B3DVector maMaxEdge; ::basegfx::B3DVector maMaxEdge;
bool mbMinEdgeUsed;
bool mbMaxEdgeUsed;
public: public:
...@@ -77,8 +75,6 @@ class SdXML3DSphereObjectShapeContext : public SdXML3DObjectContext ...@@ -77,8 +75,6 @@ class SdXML3DSphereObjectShapeContext : public SdXML3DObjectContext
{ {
::basegfx::B3DVector maCenter; ::basegfx::B3DVector maCenter;
::basegfx::B3DVector maSphereSize; ::basegfx::B3DVector maSphereSize;
bool mbCenterUsed;
bool mbSizeUsed;
public: public:
......
...@@ -64,10 +64,6 @@ static void lcl_AddState(::std::vector< XMLPropertyState >& rPropState, sal_Int3 ...@@ -64,10 +64,6 @@ static void lcl_AddState(::std::vector< XMLPropertyState >& rPropState, sal_Int3
struct XMLPropertyStateBuffer struct XMLPropertyStateBuffer
{ {
XMLPropertyState* pPMMarginAll; XMLPropertyState* pPMMarginAll;
XMLPropertyState* pPMMarginTop;
XMLPropertyState* pPMMarginBottom;
XMLPropertyState* pPMMarginLeft;
XMLPropertyState* pPMMarginRight;
XMLPropertyState* pPMBorderAll; XMLPropertyState* pPMBorderAll;
XMLPropertyState* pPMBorderTop; XMLPropertyState* pPMBorderTop;
...@@ -93,10 +89,6 @@ struct XMLPropertyStateBuffer ...@@ -93,10 +89,6 @@ struct XMLPropertyStateBuffer
XMLPropertyStateBuffer::XMLPropertyStateBuffer() XMLPropertyStateBuffer::XMLPropertyStateBuffer()
: pPMMarginAll( nullptr ) : pPMMarginAll( nullptr )
, pPMMarginTop( nullptr )
, pPMMarginBottom( nullptr )
, pPMMarginLeft( nullptr )
, pPMMarginRight( nullptr )
, ,
pPMBorderAll( nullptr ), pPMBorderAll( nullptr ),
pPMBorderTop( nullptr ), pPMBorderTop( nullptr ),
...@@ -352,10 +344,6 @@ void XMLPageMasterExportPropMapper::ContextFilter( ...@@ -352,10 +344,6 @@ void XMLPageMasterExportPropMapper::ContextFilter(
switch( nSimpleId ) switch( nSimpleId )
{ {
case CTF_PM_MARGINALL: pBuffer->pPMMarginAll = pProp; break; 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_BORDERALL: pBuffer->pPMBorderAll = pProp; break;
case CTF_PM_BORDERTOP: pBuffer->pPMBorderTop = pProp; break; case CTF_PM_BORDERTOP: pBuffer->pPMBorderTop = pProp; break;
case CTF_PM_BORDERBOTTOM: pBuffer->pPMBorderBottom = pProp; break; case CTF_PM_BORDERBOTTOM: pBuffer->pPMBorderBottom = pProp; break;
......
...@@ -60,7 +60,6 @@ namespace { ...@@ -60,7 +60,6 @@ namespace {
struct ColumnInfo struct ColumnInfo
{ {
OUString msStyleName; OUString msStyleName;
bool mbVisibility;
OUString msDefaultCellStyleName; OUString msDefaultCellStyleName;
}; };
...@@ -404,10 +403,6 @@ SvXMLImportContext * XMLTableImportContext::ImportColumn( sal_uInt16 nPrefix, co ...@@ -404,10 +403,6 @@ SvXMLImportContext * XMLTableImportContext::ImportColumn( sal_uInt16 nPrefix, co
{ {
xInfo->msDefaultCellStyleName = sValue; xInfo->msDefaultCellStyleName = sValue;
} }
else if( IsXMLToken( aLocalName, XML_VISIBILITY ) )
{
xInfo->mbVisibility = IsXMLToken( sValue, XML_VISIBLE );
}
} }
else if ( (XML_NAMESPACE_XML == nPrefix2) && else if ( (XML_NAMESPACE_XML == nPrefix2) &&
IsXMLToken(aLocalName, XML_ID) ) IsXMLToken(aLocalName, XML_ID) )
......
...@@ -3503,7 +3503,6 @@ XMLScriptImportContext::XMLScriptImportContext( ...@@ -3503,7 +3503,6 @@ XMLScriptImportContext::XMLScriptImportContext(
const OUString& sLocalName) const OUString& sLocalName)
: XMLTextFieldImportContext(rImport, rHlp, "Script", nPrfx, sLocalName) : XMLTextFieldImportContext(rImport, rHlp, "Script", nPrfx, sLocalName)
, bContentOK(false) , bContentOK(false)
, bScriptTypeOK(false)
{ {
} }
...@@ -3520,7 +3519,6 @@ void XMLScriptImportContext::ProcessAttribute( ...@@ -3520,7 +3519,6 @@ void XMLScriptImportContext::ProcessAttribute(
case XML_TOK_TEXTFIELD_LANGUAGE: case XML_TOK_TEXTFIELD_LANGUAGE:
sScriptType = sAttrValue; sScriptType = sAttrValue;
bScriptTypeOK = true;
break; break;
default: default:
......
...@@ -88,7 +88,6 @@ XMLVarFieldImportContext::XMLVarFieldImportContext( ...@@ -88,7 +88,6 @@ XMLVarFieldImportContext::XMLVarFieldImportContext(
aValueHelper(rImport, rHlp, bType, bStyle, bValue, false), aValueHelper(rImport, rHlp, bType, bStyle, bValue, false),
bDisplayFormula(false), bDisplayFormula(false),
bDisplayNone(false), bDisplayNone(false),
bNameOK(false),
bFormulaOK(false), bFormulaOK(false),
bDescriptionOK(false), bDescriptionOK(false),
bHelpOK(false), bHelpOK(false),
...@@ -113,7 +112,6 @@ void XMLVarFieldImportContext::ProcessAttribute( ...@@ -113,7 +112,6 @@ void XMLVarFieldImportContext::ProcessAttribute(
{ {
case XML_TOK_TEXTFIELD_NAME: case XML_TOK_TEXTFIELD_NAME:
sName = sAttrValue; sName = sAttrValue;
bNameOK = true;
bValid = true; // we assume: field with name is valid! bValid = true; // we assume: field with name is valid!
break; break;
case XML_TOK_TEXTFIELD_DESCRIPTION: case XML_TOK_TEXTFIELD_DESCRIPTION:
...@@ -1104,9 +1102,7 @@ XMLValueImportHelper::XMLValueImportHelper( ...@@ -1104,9 +1102,7 @@ XMLValueImportHelper::XMLValueImportHelper(
bStringType(false), bStringType(false),
bFormatOK(false), bFormatOK(false),
bTypeOK(false),
bStringValueOK(false), bStringValueOK(false),
bFloatValueOK(false),
bFormulaOK(false), bFormulaOK(false),
bSetType(bType), bSetType(bType),
...@@ -1129,8 +1125,6 @@ void XMLValueImportHelper::ProcessAttribute( ...@@ -1129,8 +1125,6 @@ void XMLValueImportHelper::ProcessAttribute(
eValueType, sAttrValue, aValueTypeMap); eValueType, sAttrValue, aValueTypeMap);
if (bRet) { if (bRet) {
bTypeOK = true;
switch (eValueType) switch (eValueType)
{ {
case XML_VALUE_TYPE_STRING: case XML_VALUE_TYPE_STRING:
...@@ -1147,7 +1141,6 @@ void XMLValueImportHelper::ProcessAttribute( ...@@ -1147,7 +1141,6 @@ void XMLValueImportHelper::ProcessAttribute(
default: default:
OSL_FAIL("unknown value type"); OSL_FAIL("unknown value type");
bTypeOK = false;
} }
} }
break; break;
...@@ -1158,7 +1151,6 @@ void XMLValueImportHelper::ProcessAttribute( ...@@ -1158,7 +1151,6 @@ void XMLValueImportHelper::ProcessAttribute(
double fTmp; double fTmp;
bool const bRet = ::sax::Converter::convertDouble(fTmp,sAttrValue); bool const bRet = ::sax::Converter::convertDouble(fTmp,sAttrValue);
if (bRet) { if (bRet) {
bFloatValueOK = true;
fValue = fTmp; fValue = fTmp;
} }
break; break;
...@@ -1170,7 +1162,6 @@ void XMLValueImportHelper::ProcessAttribute( ...@@ -1170,7 +1162,6 @@ void XMLValueImportHelper::ProcessAttribute(
bool const bRet = bool const bRet =
::sax::Converter::convertDuration(fTmp, sAttrValue); ::sax::Converter::convertDuration(fTmp, sAttrValue);
if (bRet) { if (bRet) {
bFloatValueOK = true;
fValue = fTmp; fValue = fTmp;
} }
break; break;
...@@ -1182,7 +1173,6 @@ void XMLValueImportHelper::ProcessAttribute( ...@@ -1182,7 +1173,6 @@ void XMLValueImportHelper::ProcessAttribute(
bool bRet = rImport.GetMM100UnitConverter(). bool bRet = rImport.GetMM100UnitConverter().
convertDateTime(fTmp,sAttrValue); convertDateTime(fTmp,sAttrValue);
if (bRet) { if (bRet) {
bFloatValueOK = true;
fValue = fTmp; fValue = fTmp;
} }
break; break;
...@@ -1193,7 +1183,6 @@ void XMLValueImportHelper::ProcessAttribute( ...@@ -1193,7 +1183,6 @@ void XMLValueImportHelper::ProcessAttribute(
bool bTmp(false); bool bTmp(false);
bool bRet = ::sax::Converter::convertBool(bTmp, sAttrValue); bool bRet = ::sax::Converter::convertBool(bTmp, sAttrValue);
if (bRet) { if (bRet) {
bFloatValueOK = true;
fValue = (bTmp ? 1.0 : 0.0); fValue = (bTmp ? 1.0 : 0.0);
} }
else else
...@@ -1201,7 +1190,6 @@ void XMLValueImportHelper::ProcessAttribute( ...@@ -1201,7 +1190,6 @@ void XMLValueImportHelper::ProcessAttribute(
double fTmp; double fTmp;
bRet = ::sax::Converter::convertDouble(fTmp, sAttrValue); bRet = ::sax::Converter::convertDouble(fTmp, sAttrValue);
if (bRet) { if (bRet) {
bFloatValueOK = true;
fValue = fTmp; fValue = fTmp;
} }
} }
......
...@@ -50,16 +50,11 @@ struct ModuleImport ...@@ -50,16 +50,11 @@ struct ModuleImport
ModuleDescriptor& mrModuleDesc; ModuleDescriptor& mrModuleDesc;
sal_Int32 XMLNS_SCRIPT_UID; sal_Int32 XMLNS_SCRIPT_UID;
private:
sal_Int32 XMLNS_LIBRARY_UID;
sal_Int32 XMLNS_XLINK_UID;
public: public:
explicit ModuleImport(ModuleDescriptor& rModuleDesc) explicit ModuleImport(ModuleDescriptor& rModuleDesc)
: mrModuleDesc(rModuleDesc) : mrModuleDesc(rModuleDesc)
, XMLNS_SCRIPT_UID(0) , XMLNS_SCRIPT_UID(0)
, XMLNS_LIBRARY_UID(0)
, XMLNS_XLINK_UID(0)
{ {
} }
......
...@@ -97,8 +97,6 @@ void ModuleImport::startDocument( ...@@ -97,8 +97,6 @@ void ModuleImport::startDocument(
Reference< xml::input::XNamespaceMapping > const & xNamespaceMapping ) Reference< xml::input::XNamespaceMapping > const & xNamespaceMapping )
{ {
XMLNS_SCRIPT_UID = xNamespaceMapping->getUidByUri( XMLNS_SCRIPT_URI ); 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() void ModuleImport::endDocument()
......
...@@ -51,24 +51,20 @@ namespace embed { ...@@ -51,24 +51,20 @@ namespace embed {
struct XMLSignatureCreationResult struct XMLSignatureCreationResult
{ {
sal_Int32 nSecurityId;
css::xml::crypto::SecurityOperationStatus nSignatureCreationResult; css::xml::crypto::SecurityOperationStatus nSignatureCreationResult;
XMLSignatureCreationResult( sal_Int32 nId, css::xml::crypto::SecurityOperationStatus nResult ) XMLSignatureCreationResult( css::xml::crypto::SecurityOperationStatus nResult )
{ {
nSecurityId = nId;
nSignatureCreationResult = nResult; nSignatureCreationResult = nResult;
} }
}; };
struct XMLSignatureVerifyResult struct XMLSignatureVerifyResult
{ {
sal_Int32 nSecurityId;
css::xml::crypto::SecurityOperationStatus nSignatureVerifyResult; css::xml::crypto::SecurityOperationStatus nSignatureVerifyResult;
XMLSignatureVerifyResult( sal_Int32 nId, css::xml::crypto::SecurityOperationStatus nResult ) XMLSignatureVerifyResult( css::xml::crypto::SecurityOperationStatus nResult )
{ {
nSecurityId = nId;
nSignatureVerifyResult = nResult; nSignatureVerifyResult = nResult;
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment