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

loplugin:unusedfields in xmloff

Change-Id: I96de7fa324e3d2e3f0f133c93cf73776f4615ed3
Reviewed-on: https://gerrit.libreoffice.org/68134
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst e9986153
......@@ -22,8 +22,6 @@ namespace xmloff
{
struct XMLOFF_DLLPUBLIC AutoStyleEntry
{
OUString m_aParentName;
OUString m_aName;
std::vector<std::pair<OUString, css::uno::Any>> m_aXmlProperties;
};
......
......@@ -35,7 +35,7 @@ class XMLAnimationsExporter : public salhelper::SimpleReferenceObject
std::unique_ptr<AnimExpImpl> mpImpl;
public:
XMLAnimationsExporter( XMLShapeExport* pShapeExp );
XMLAnimationsExporter();
virtual ~XMLAnimationsExporter() override;
static void prepare( const css::uno::Reference< css::drawing::XShape >& xShape );
......
......@@ -158,14 +158,12 @@ class XMLOFF_DLLPUBLIC XMLShapeExport : public salhelper::SimpleReferenceObject
private:
SvXMLExport& mrExport;
rtl::Reference< XMLPropertyHandlerFactory > mxSdPropHdlFactory;
rtl::Reference< SvXMLExportPropertyMapper > mxPropertySetMapper;
rtl::Reference< XMLAnimationsExporter > mxAnimationsExporter;
ShapesInfos maShapesInfos;
ShapesInfos::iterator maCurrentShapesIter;
bool mbExportLayer;
ImplXMLShapeExportInfoVector maShapeInfos;
ImplXMLShapeExportInfoVector::iterator maCurrentInfo;
OUString msPresentationStylePrefix;
// #88546# possibility to switch progress bar handling on/off
......
......@@ -208,12 +208,10 @@ class XMLOFF_DLLPUBLIC SvXMLImport : public cppu::WeakImplHelper<
std::unique_ptr<XMLEventImportHelper> mpEventImportHelper;
std::unique_ptr<XMLErrors> mpXMLErrors;
rtl::Reference<StyleMap> mpStyleMap;
OUString msPackageProtocol;
SAL_DLLPRIVATE void InitCtor_();
SvXMLImportFlags const mnImportFlags;
SvXMLErrorFlags mnErrorFlags;
std::set< OUString > embeddedFontUrlsKnown;
bool isFastContext;
css::uno::Reference< css::xml::sax::XFastParser > mxParser;
......
......@@ -161,8 +161,6 @@ public:
void SetChartRangeAddress( const OUString& rAddress )
{ msChartAddress = rAddress; }
void SetTableNumberList( const OUString& rList )
{ msTableNumberList = rList; }
void InitRangeSegmentationProperties(
const css::uno::Reference< css::chart2::XChartDocument > & xChartDoc );
......@@ -259,7 +257,6 @@ public:
bool mbHasCategoryLabels; //if the categories are only automatically generated this will be false
bool mbRowSourceColumns;
OUString msChartAddress;
OUString msTableNumberList;
css::uno::Sequence< sal_Int32 > maSequenceMapping;
OUString const msCLSID;
......@@ -3610,11 +3607,6 @@ void SchXMLExport::ExportContent_()
aAny >>= sChartAddress;
maExportHelper->m_pImpl->SetChartRangeAddress( sChartAddress );
OUString sTableNumberList;
aAny = xProp->getPropertyValue( "TableNumberList" );
aAny >>= sTableNumberList;
maExportHelper->m_pImpl->SetTableNumberList( sTableNumberList );
// do not include own table if there are external addresses
bIncludeTable = sChartAddress.isEmpty();
}
......@@ -3669,8 +3661,6 @@ void SchXMLExportHelper_Impl::InitRangeSegmentationProperties( const Reference<
}
else if ( aArgs[i].Name == "SequenceMapping" )
aArgs[i].Value >>= maSequenceMapping;
else if ( aArgs[i].Name == "TableNumberList" )
aArgs[i].Value >>= msTableNumberList;
}
// #i79009# For Writer we have to export a broken version of the
......
......@@ -377,8 +377,6 @@ void SvXMLImport::InitCtor_()
GetXMLToken(XML_N_LO_EXT), XML_NAMESPACE_LO_EXT);
}
msPackageProtocol = "vnd.sun.star.Package:";
if (mxNumberFormatsSupplier.is())
mpNumImport = std::make_unique<SvXMLNumFmtHelper>(mxNumberFormatsSupplier, GetComponentContext());
......@@ -399,7 +397,6 @@ SvXMLImport::SvXMLImport(
util::MeasureUnit::MM_100TH, util::MeasureUnit::MM_100TH) ),
mnImportFlags( nImportFlags ),
mnErrorFlags(SvXMLErrorFlags::NO),
isFastContext( false ),
maNamespaceHandler( new SvXMLImportFastNamespaceHandler() ),
mbIsFormsSupported( true ),
......@@ -1817,14 +1814,6 @@ void SvXMLImport::SetError(
const OUString& rExceptionMessage,
const Reference<xml::sax::XLocator>& rLocator )
{
// maintain error flags
if ( ( nId & XMLERROR_FLAG_ERROR ) != 0 )
mnErrorFlags |= SvXMLErrorFlags::ERROR_OCCURRED;
if ( ( nId & XMLERROR_FLAG_WARNING ) != 0 )
mnErrorFlags |= SvXMLErrorFlags::WARNING_OCCURRED;
if ( ( nId & XMLERROR_FLAG_SEVERE ) != 0 )
mnErrorFlags |= SvXMLErrorFlags::DO_NOTHING;
// create error list on demand
if ( !mpXMLErrors )
mpXMLErrors = std::make_unique<XMLErrors>();
......
......@@ -226,7 +226,6 @@ class AnimExpImpl
{
public:
list<XMLEffectHint> maEffects;
rtl::Reference< XMLShapeExport > mxShapeExp;
static constexpr OUStringLiteral gsDimColor = "DimColor";
static constexpr OUStringLiteral gsDimHide = "DimHide";
......@@ -242,10 +241,9 @@ public:
static constexpr OUStringLiteral gsAnimPath = "AnimationPath";
};
XMLAnimationsExporter::XMLAnimationsExporter( XMLShapeExport* pShapeExp )
XMLAnimationsExporter::XMLAnimationsExporter()
: mpImpl( new AnimExpImpl )
{
mpImpl->mxShapeExp = pShapeExp;
}
XMLAnimationsExporter::~XMLAnimationsExporter()
......
......@@ -1770,7 +1770,7 @@ void SdXMLExport::ExportContent_()
else
{
// export old animations for ooo format
rtl::Reference< XMLAnimationsExporter > xAnimExport = new XMLAnimationsExporter( GetShapeExport().get() );
rtl::Reference< XMLAnimationsExporter > xAnimExport = new XMLAnimationsExporter();
GetShapeExport()->setAnimationsExporter( xAnimExport );
}
}
......@@ -2171,7 +2171,7 @@ void SdXMLExport::collectAutoStyles()
// prepare animations exporter if impress
if(IsImpress() && (!(getExportFlags() & SvXMLExportFlags::OASIS)) )
{
rtl::Reference< XMLAnimationsExporter > xAnimExport = new XMLAnimationsExporter( GetShapeExport().get() );
rtl::Reference< XMLAnimationsExporter > xAnimExport = new XMLAnimationsExporter();
GetShapeExport()->setAnimationsExporter( xAnimExport );
}
......
......@@ -183,8 +183,6 @@ XMLShapeExport::XMLShapeExport(SvXMLExport& rExp,
// #88546# init to sal_False
mbHandleProgressBar( false )
{
// construct PropertyHandlerFactory
mxSdPropHdlFactory = new XMLSdPropHdlFactory( mrExport.GetModel(), rExp );
// construct PropertySetMapper
mxPropertySetMapper = CreateShapePropMapper( mrExport );
if( pExtMapper )
......@@ -209,8 +207,6 @@ XMLShapeExport::XMLShapeExport(SvXMLExport& rExp,
GetPropertySetMapper(),
XML_STYLE_FAMILY_SD_PRESENTATION_PREFIX);
maCurrentInfo = maShapeInfos.end();
// create table export helper and let him add his families in time
GetShapeTableExport();
}
......@@ -552,7 +548,6 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap
}
maShapeInfos.push_back( aShapeInfo );
maCurrentInfo = maShapeInfos.begin();
// check for shape collections (group shape or 3d scene)
// and collect contained shapes style infos
......
......@@ -887,16 +887,6 @@ void SdXMLShapeContext::processAttribute( sal_uInt16 nPrefix, const OUString& rL
// draw:transform for compatibility
mnTransform.SetString(rValue, GetImport().GetMM100UnitConverter());
}
// #i68101#
else if( IsXMLToken( rLocalName, XML_TITLE ) )
{
maShapeTitle = rValue;
}
else if( IsXMLToken( rLocalName, XML_DESC ) )
{
maShapeDescription = rValue;
}
}
else if (nPrefix == XML_NAMESPACE_STYLE)
{
......
......@@ -73,10 +73,6 @@ protected:
OUString maShapeId;
OUString maLayerName;
// #i68101#
OUString maShapeTitle;
OUString maShapeDescription;
SdXMLImExTransform2D mnTransform;
css::awt::Size maSize;
sal_Int16 mnRelWidth;
......
......@@ -261,7 +261,6 @@ namespace xmloff
OUString sAttributeName = OUString::createFromAscii(_pAttributeName);
AttributeAssignment aAssignment;
aAssignment.sAttributeName = sAttributeName;
aAssignment.sPropertyName = _rPropertyName;
aAssignment.aPropertyType = _rType;
......
......@@ -276,7 +276,6 @@ namespace xmloff
// store it's instances in a map, but in a vector for faster access.
struct AttributeAssignment
{
OUString sAttributeName; // the attribute name
OUString sPropertyName; // the property name
css::uno::Type aPropertyType; // the property type
......
......@@ -604,8 +604,6 @@ std::vector<xmloff::AutoStyleEntry> SvXMLAutoStylePoolP_Impl::GetAutoStyleEntrie
{
rReturnVector.emplace_back();
xmloff::AutoStyleEntry & rEntry = rReturnVector.back();
rEntry.m_aParentName = rParent->GetParent();
rEntry.m_aName = rProperty->GetName();
for (XMLPropertyState const & rPropertyState : rProperty->GetProperties())
{
if (rPropertyState.mnIndex >= 0)
......
......@@ -346,9 +346,8 @@ void SAL_CALL XMLTransformerBase::processingInstruction( const OUString& rTarget
m_xHandler->processingInstruction( rTarget, rData );
}
void SAL_CALL XMLTransformerBase::setDocumentLocator( const Reference< XLocator >& rLocator )
void SAL_CALL XMLTransformerBase::setDocumentLocator( const Reference< XLocator >& )
{
m_xLocator = rLocator;
}
// XExtendedDocumentHandler
......
......@@ -56,7 +56,6 @@ class XMLTransformerBase : public XMLTransformer
{
friend class XMLTransformerContext;
css::uno::Reference< css::xml::sax::XLocator > m_xLocator;
css::uno::Reference< css::xml::sax::XDocumentHandler > m_xHandler; // the handlers
css::uno::Reference< css::beans::XPropertySet > m_xPropSet;
css::uno::Reference< css::i18n::XCharacterClassification > xCharClass;
......
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