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

loplugin:unusedmethods unused return value in include/xmloff

Change-Id: I6615a467152a50e9c65f04fd0d6c8cc128517bdb
üst 098462c6
......@@ -42,7 +42,7 @@ public:
XMLGradientStyleImport( SvXMLImport& rImport );
~XMLGradientStyleImport();
bool importXML(
void importXML(
const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList,
css::uno::Any& rValue,
OUString& rStrName );
......@@ -57,7 +57,7 @@ public:
XMLGradientStyleExport( SvXMLExport& rExport );
~XMLGradientStyleExport();
bool exportXML(
void exportXML(
const OUString& rStrName,
const css::uno::Any& rValue );
};
......
......@@ -42,7 +42,7 @@ public:
XMLHatchStyleImport( SvXMLImport& rImport );
~XMLHatchStyleImport();
bool importXML(
void importXML(
const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList,
css::uno::Any& rValue,
OUString& rStrName );
......@@ -56,7 +56,7 @@ public:
XMLHatchStyleExport( SvXMLExport& rExport );
~XMLHatchStyleExport();
bool exportXML( const OUString& rStrName, const css::uno::Any& rValue );
void exportXML( const OUString& rStrName, const css::uno::Any& rValue );
};
#endif // _XMLOFF_HATCHELEMENT_HXX
......
......@@ -38,7 +38,7 @@ public:
~XMLImageStyle();
void exportXML( const OUString& rStrName, const css::uno::Any& rValue, SvXMLExport& rExport );
bool importXML( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList, css::uno::Any& rValue, OUString& rStrName, SvXMLImport& rImport );
void importXML( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList, css::uno::Any& rValue, OUString& rStrName, SvXMLImport& rImport );
private:
......
......@@ -42,7 +42,7 @@ public:
XMLMarkerStyleImport( SvXMLImport& rImport );
~XMLMarkerStyleImport();
bool importXML(
void importXML(
const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList,
css::uno::Any& rValue,
OUString& rStrName );
......
......@@ -57,7 +57,7 @@ public:
// set the new reference and returns the new value which gives the
// Progress Bar the sam position as before
sal_Int32 ChangeReference(sal_Int32 nNewReference);
void ChangeReference(sal_Int32 nNewReference);
sal_Int32 GetReference() { return nReference; }
sal_Int32 GetValue() { return nValue; }
......
......@@ -98,7 +98,7 @@ public:
/// if the import operates in delayed mode, you can use this method
/// to obtain the value sequence for a specific event
bool GetEventSequence(
void GetEventSequence(
const OUString& rName,
css::uno::Sequence<css::beans::PropertyValue> & rSequence );
......
......@@ -36,12 +36,6 @@ public:
{
}
bool operator==( const SvI18NMapEntry_Key& r ) const
{
return nKind == r.nKind &&
aName == r.aName;
}
bool operator<( const SvI18NMapEntry_Key& r ) const
{
return nKind < r.nKind ||
......
......@@ -134,7 +134,7 @@ public:
static bool NormalizeW3URI( OUString& rName );
static bool NormalizeURI( OUString& rName );
/* deprecated */ bool AddAtIndex( sal_uInt16 nIdx, const OUString& rPrefix,
/* deprecated */ void AddAtIndex( sal_uInt16 nIdx, const OUString& rPrefix,
const OUString& rName, sal_uInt16 nKey = XML_NAMESPACE_UNKNOWN );
/* deprecated */ static sal_uInt16 GetIndexByKey( sal_uInt16 nKey );
/* deprecated */ sal_uInt16 GetIndexByPrefix( const OUString& rPrefix ) const;
......
......@@ -68,14 +68,14 @@ protected:
// the given OldFillStyleDefinitionSet) in the local maProperties. Deactivation
// is done setting theindex to -1. It returns true when actually old fill
// definitions existed and were deactivated
bool deactivateOldFillStyleDefinitions(
void deactivateOldFillStyleDefinitions(
const OldFillStyleDefinitionSet& rHashSetOfTags);
//UUUU Helper to translate new DrawingLayer FillStyle values which are name-based
// from ODF internal name to style display names which can be found in the current
// document model (using NameOrIndex Items). The change is executed on the internal
// maProperties. The return value is true when actually names were changed
bool translateNameBasedDrawingLayerFillStyleDefinitionsToStyleDisplayNames();
void translateNameBasedDrawingLayerFillStyleDefinitionsToStyleDisplayNames();
//UUUU provider for often used sets
static const OldFillStyleDefinitionSet& getStandardSet();
......
......@@ -496,7 +496,7 @@ public:
// get export flags
SvXMLExportFlags getExportFlags() const { return mnExportFlags; }
bool ExportEmbeddedOwnObject(
void ExportEmbeddedOwnObject(
css::uno::Reference<css::lang::XComponent >& rComp );
OUString GetRelativeReference(const OUString& rValue);
......
......@@ -59,7 +59,7 @@ protected:
/// Override this to add attributes to the <list-style> element.
SAL_DLLPRIVATE void AddListStyleAttributes();
SAL_DLLPRIVATE bool exportStyle( const css::uno::Reference< css::style::XStyle >& rStyle );
SAL_DLLPRIVATE void exportStyle( const css::uno::Reference< css::style::XStyle >& rStyle );
SAL_DLLPRIVATE void exportOutline();
SvXMLExport& GetExport() { return rExport; }
......
......@@ -44,7 +44,7 @@ ProgressBarHelper::~ProgressBarHelper()
{
}
sal_Int32 ProgressBarHelper::ChangeReference(sal_Int32 nNewReference)
void ProgressBarHelper::ChangeReference(sal_Int32 nNewReference)
{
if((nNewReference > 0) && (nNewReference != nReference))
{
......@@ -61,7 +61,6 @@ sal_Int32 ProgressBarHelper::ChangeReference(sal_Int32 nNewReference)
nValue = 0;
}
}
return nValue;
}
void ProgressBarHelper::SetValue(sal_Int32 nTempValue)
......
......@@ -380,11 +380,9 @@ sal_uInt16 SvXMLNamespaceMap::GetNextIndex( sal_uInt16 nOldIdx ) const
return (++aIter == aNameMap.end()) ? USHRT_MAX : (*aIter).second->nKey;
}
bool SvXMLNamespaceMap::AddAtIndex( sal_uInt16 /*nIdx*/, const OUString& rPrefix,
void SvXMLNamespaceMap::AddAtIndex( sal_uInt16 /*nIdx*/, const OUString& rPrefix,
const OUString& rName, sal_uInt16 nKey )
{
bool bRet = false;
if( XML_NAMESPACE_UNKNOWN == nKey )
nKey = GetKeyByName( rName );
......@@ -392,9 +390,7 @@ bool SvXMLNamespaceMap::AddAtIndex( sal_uInt16 /*nIdx*/, const OUString& rPrefix
if( XML_NAMESPACE_NONE != nKey && ! ( aNameHash.count ( rPrefix ) ) )
{
_Add( rPrefix, rName, nKey );
bRet = true;
}
return bRet;
}
OUString SvXMLNamespaceMap::GetAttrNameByIndex( sal_uInt16 nIdx ) const
......
......@@ -2141,7 +2141,7 @@ sal_Int64 SAL_CALL SvXMLExport::getSomething( const uno::Sequence< sal_Int8 >& r
return 0;
}
bool SvXMLExport::ExportEmbeddedOwnObject( Reference< XComponent >& rComp )
void SvXMLExport::ExportEmbeddedOwnObject( Reference< XComponent >& rComp )
{
OUString sFilterService;
......@@ -2168,7 +2168,7 @@ bool SvXMLExport::ExportEmbeddedOwnObject( Reference< XComponent >& rComp )
SAL_WARN_IF( !sFilterService.getLength(), "xmloff.core", "no export filter for own object" );
if( sFilterService.isEmpty() )
return false;
return;
Reference < XDocumentHandler > xHdl =
new XMLEmbeddedObjectExportFilter( mxHandler );
......@@ -2181,14 +2181,14 @@ bool SvXMLExport::ExportEmbeddedOwnObject( Reference< XComponent >& rComp )
UNO_QUERY);
SAL_WARN_IF( !xExporter.is(), "xmloff.core", "can't instantiate export filter component for own object" );
if( !xExporter.is() )
return false;
return;
xExporter->setSourceDocument( rComp );
Reference<XFilter> xFilter( xExporter, UNO_QUERY );
Sequence < PropertyValue > aMediaDesc( 0 );
return xFilter->filter( aMediaDesc );
xFilter->filter( aMediaDesc );
}
OUString SvXMLExport::GetRelativeReference(const OUString& rValue)
......
......@@ -157,7 +157,7 @@ void XMLEventsImportContext::SetEvents(
}
}
bool XMLEventsImportContext::GetEventSequence(
void XMLEventsImportContext::GetEventSequence(
const OUString& rName,
Sequence<PropertyValue> & rSequence )
{
......@@ -176,10 +176,7 @@ bool XMLEventsImportContext::GetEventSequence(
if (aIter != aCollectEvents.end())
{
rSequence = aIter->second;
return true;
}
return false;
}
void XMLEventsImportContext::AddEventValues(
......
......@@ -77,7 +77,7 @@ XMLGradientStyleImport::~XMLGradientStyleImport()
{
}
bool XMLGradientStyleImport::importXML(
void XMLGradientStyleImport::importXML(
const uno::Reference< xml::sax::XAttributeList >& xAttrList,
uno::Any& rValue,
OUString& rStrName )
......@@ -101,7 +101,6 @@ bool XMLGradientStyleImport::importXML(
bool bHasName = false;
bool bHasStyle = false;
bool bHasStartColor = false;
bool bHasEndColor = false;
OUString aDisplayName;
awt::Gradient aGradient;
......@@ -201,10 +200,6 @@ bool XMLGradientStyleImport::importXML(
aDisplayName );
rStrName = aDisplayName;
}
bool bRet = bHasName && bHasStyle && bHasStartColor && bHasEndColor;
return bRet;
}
// Export
......@@ -219,11 +214,10 @@ XMLGradientStyleExport::~XMLGradientStyleExport()
{
}
bool XMLGradientStyleExport::exportXML(
void XMLGradientStyleExport::exportXML(
const OUString& rStrName,
const uno::Any& rValue )
{
bool bRet = false;
awt::Gradient aGradient;
if( !rStrName.isEmpty() )
......@@ -234,11 +228,7 @@ bool XMLGradientStyleExport::exportXML(
OUStringBuffer aOut;
// Style
if( !SvXMLUnitConverter::convertEnum( aOut, aGradient.Style, pXML_GradientStyle_Enum ) )
{
bRet = false;
}
else
if( SvXMLUnitConverter::convertEnum( aOut, aGradient.Style, pXML_GradientStyle_Enum ) )
{
// Name
bool bEncoded = false;
......@@ -304,8 +294,6 @@ bool XMLGradientStyleExport::exportXML(
}
}
}
return bRet;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -68,7 +68,7 @@ XMLHatchStyleImport::~XMLHatchStyleImport()
{
}
bool XMLHatchStyleImport::importXML(
void XMLHatchStyleImport::importXML(
const uno::Reference< xml::sax::XAttributeList >& xAttrList,
uno::Any& rValue,
OUString& rStrName )
......@@ -158,10 +158,6 @@ bool XMLHatchStyleImport::importXML(
aDisplayName );
rStrName = aDisplayName;
}
bool bRet = bHasName && bHasStyle && bHasColor && bHasDist;
return bRet;
}
// Export
......@@ -175,11 +171,10 @@ XMLHatchStyleExport::~XMLHatchStyleExport()
{
}
bool XMLHatchStyleExport::exportXML(
void XMLHatchStyleExport::exportXML(
const OUString& rStrName,
const uno::Any& rValue )
{
bool bRet = false;
drawing::Hatch aHatch;
if( !rStrName.isEmpty() )
......@@ -193,11 +188,7 @@ bool XMLHatchStyleExport::exportXML(
rExport.GetMM100UnitConverter();
// Style
if( !SvXMLUnitConverter::convertEnum( aOut, aHatch.Style, pXML_HatchStyle_Enum ) )
{
bRet = false;
}
else
if( SvXMLUnitConverter::convertEnum( aOut, aHatch.Style, pXML_HatchStyle_Enum ) )
{
// Name
bool bEncoded = false;
......@@ -232,8 +223,6 @@ bool XMLHatchStyleExport::exportXML(
}
}
}
return bRet;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -99,9 +99,9 @@ void XMLImageStyle::ImpExportXML( const OUString& rStrName, const uno::Any& rVal
}
}
bool XMLImageStyle::importXML( const uno::Reference< xml::sax::XAttributeList >& xAttrList, uno::Any& rValue, OUString& rStrName, SvXMLImport& rImport )
void XMLImageStyle::importXML( const uno::Reference< xml::sax::XAttributeList >& xAttrList, uno::Any& rValue, OUString& rStrName, SvXMLImport& rImport )
{
return ImpImportXML( xAttrList, rValue, rStrName, rImport );
ImpImportXML( xAttrList, rValue, rStrName, rImport );
}
bool XMLImageStyle::ImpImportXML( const uno::Reference< xml::sax::XAttributeList >& xAttrList,
......
......@@ -48,7 +48,7 @@ XMLMarkerStyleImport::~XMLMarkerStyleImport()
{
}
bool XMLMarkerStyleImport::importXML(
void XMLMarkerStyleImport::importXML(
const uno::Reference< xml::sax::XAttributeList >& xAttrList,
uno::Any& rValue,
OUString& rStrName )
......@@ -137,8 +137,6 @@ bool XMLMarkerStyleImport::importXML(
}
delete pViewBox;
return bHasViewBox && bHasPathData;
}
// Export
......
......@@ -553,11 +553,9 @@ bool XMLPropStyleContext::doNewDrawingLayerFillStyleDefinitionsExist(
}
//UUUU
bool XMLPropStyleContext::deactivateOldFillStyleDefinitions(
void XMLPropStyleContext::deactivateOldFillStyleDefinitions(
const OldFillStyleDefinitionSet& rHashSetOfTags)
{
bool bRetval(false);
if(!rHashSetOfTags.empty() && maProperties.size())
{
const rtl::Reference< XMLPropertySetMapper >& rMapper = GetStyles()->GetImportPropertyMapper(GetFamily())->getPropertySetMapper();
......@@ -574,21 +572,16 @@ bool XMLPropStyleContext::deactivateOldFillStyleDefinitions(
{
// mark entry as inactive
a->mnIndex = -1;
bRetval = true;
}
}
}
}
}
return bRetval;
}
//UUUU
bool XMLPropStyleContext::translateNameBasedDrawingLayerFillStyleDefinitionsToStyleDisplayNames()
void XMLPropStyleContext::translateNameBasedDrawingLayerFillStyleDefinitionsToStyleDisplayNames()
{
bool bRetval(false);
if(maProperties.size())
{
const rtl::Reference< XMLPropertySetMapper >& rMapper = GetStyles()->GetImportPropertyMapper(GetFamily())->getPropertySetMapper();
......@@ -627,14 +620,11 @@ bool XMLPropStyleContext::translateNameBasedDrawingLayerFillStyleDefinitionsToSt
a->maValue >>= sStyleName;
sStyleName = GetImport().GetStyleDisplayName( aStyleFamily, sStyleName );
a->maValue <<= sStyleName;
bRetval = true;
}
}
}
}
}
return bRetval;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -696,7 +696,7 @@ void SvxXMLNumRuleExport::exportNumberingRule(
}
}
bool SvxXMLNumRuleExport::exportStyle( const Reference< XStyle >& rStyle )
void SvxXMLNumRuleExport::exportStyle( const Reference< XStyle >& rStyle )
{
Reference< XPropertySet > xPropSet( rStyle, UNO_QUERY );
Reference< XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo();
......@@ -709,7 +709,7 @@ bool SvxXMLNumRuleExport::exportStyle( const Reference< XStyle >& rStyle )
{
aAny = xPropSet->getPropertyValue( sIsPhysical );
if( !*static_cast<sal_Bool const *>(aAny.getValue()) )
return false;
return;
}
aAny = xPropSet->getPropertyValue( sNumberingRules );
......@@ -726,8 +726,6 @@ bool SvxXMLNumRuleExport::exportStyle( const Reference< XStyle >& rStyle )
}
exportNumberingRule( sName, bHidden, xNumRule );
return true;
}
void SvxXMLNumRuleExport::exportOutline()
......
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