summaryrefslogtreecommitdiff
path: root/xmloff/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-06-15 11:42:29 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-06-16 08:24:49 +0200
commit83f9325f0d8d643d8b3e71fa3ff76ebbd599373d (patch)
treeae330b657da35b82964cfac41f16e69acbc7c5b5 /xmloff/source
parent9e425891f79a834abb03e3d69ee0c3665944faaa (diff)
loplugin:unusedfields xmlhelp..xmlsecurity
Change-Id: I7e680e1913c787ce0adad5be1f84668d57ad00b3 Reviewed-on: https://gerrit.libreoffice.org/38821 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff/source')
-rw-r--r--xmloff/source/draw/ximp3dobject.cxx20
-rw-r--r--xmloff/source/draw/ximp3dobject.hxx4
-rw-r--r--xmloff/source/style/PageMasterExportPropMapper.cxx12
-rw-r--r--xmloff/source/table/XMLTableImport.cxx5
-rw-r--r--xmloff/source/text/txtfldi.cxx2
-rw-r--r--xmloff/source/text/txtvfldi.cxx12
6 files changed, 2 insertions, 53 deletions
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;
}
}