diff options
author | Noel Grandin <noel@peralex.com> | 2016-01-15 09:36:20 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-01-15 09:36:42 +0200 |
commit | ed373ea7efd34ca6baab8ddbf809e6f2a06f1a9e (patch) | |
tree | ee982f66e33240dcf8472eae9a5fbcec4d4a7a5e | |
parent | 098462c6f69c40422c74cef8f052b7b1ff0c90e8 (diff) |
loplugin:unusedmethods unused return value in include/xmloff
Change-Id: I6615a467152a50e9c65f04fd0d6c8cc128517bdb
-rw-r--r-- | include/xmloff/GradientStyle.hxx | 4 | ||||
-rw-r--r-- | include/xmloff/HatchStyle.hxx | 4 | ||||
-rw-r--r-- | include/xmloff/ImageStyle.hxx | 2 | ||||
-rw-r--r-- | include/xmloff/MarkerStyle.hxx | 2 | ||||
-rw-r--r-- | include/xmloff/ProgressBarHelper.hxx | 2 | ||||
-rw-r--r-- | include/xmloff/XMLEventsImportContext.hxx | 2 | ||||
-rw-r--r-- | include/xmloff/i18nmap.hxx | 6 | ||||
-rw-r--r-- | include/xmloff/nmspmap.hxx | 2 | ||||
-rw-r--r-- | include/xmloff/prstylei.hxx | 4 | ||||
-rw-r--r-- | include/xmloff/xmlexp.hxx | 2 | ||||
-rw-r--r-- | include/xmloff/xmlnume.hxx | 2 | ||||
-rw-r--r-- | xmloff/source/core/ProgressBarHelper.cxx | 3 | ||||
-rw-r--r-- | xmloff/source/core/nmspmap.cxx | 6 | ||||
-rw-r--r-- | xmloff/source/core/xmlexp.cxx | 8 | ||||
-rw-r--r-- | xmloff/source/script/XMLEventsImportContext.cxx | 5 | ||||
-rw-r--r-- | xmloff/source/style/GradientStyle.cxx | 18 | ||||
-rw-r--r-- | xmloff/source/style/HatchStyle.cxx | 17 | ||||
-rw-r--r-- | xmloff/source/style/ImageStyle.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/style/MarkerStyle.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/style/prstylei.cxx | 14 | ||||
-rw-r--r-- | xmloff/source/style/xmlnume.cxx | 6 |
21 files changed, 33 insertions, 84 deletions
diff --git a/include/xmloff/GradientStyle.hxx b/include/xmloff/GradientStyle.hxx index 84fdb9be105c..58cc2e885377 100644 --- a/include/xmloff/GradientStyle.hxx +++ b/include/xmloff/GradientStyle.hxx @@ -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 ); }; diff --git a/include/xmloff/HatchStyle.hxx b/include/xmloff/HatchStyle.hxx index e5e9e403d551..6fe2dacc703b 100644 --- a/include/xmloff/HatchStyle.hxx +++ b/include/xmloff/HatchStyle.hxx @@ -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 diff --git a/include/xmloff/ImageStyle.hxx b/include/xmloff/ImageStyle.hxx index 6bf64718e7c3..62becb835fa5 100644 --- a/include/xmloff/ImageStyle.hxx +++ b/include/xmloff/ImageStyle.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: diff --git a/include/xmloff/MarkerStyle.hxx b/include/xmloff/MarkerStyle.hxx index 3779202ce658..679c4706eb34 100644 --- a/include/xmloff/MarkerStyle.hxx +++ b/include/xmloff/MarkerStyle.hxx @@ -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 ); diff --git a/include/xmloff/ProgressBarHelper.hxx b/include/xmloff/ProgressBarHelper.hxx index 7eeed4ebc7c1..521ee4cb2406 100644 --- a/include/xmloff/ProgressBarHelper.hxx +++ b/include/xmloff/ProgressBarHelper.hxx @@ -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; } diff --git a/include/xmloff/XMLEventsImportContext.hxx b/include/xmloff/XMLEventsImportContext.hxx index 5a5c1c20f582..020996553bed 100644 --- a/include/xmloff/XMLEventsImportContext.hxx +++ b/include/xmloff/XMLEventsImportContext.hxx @@ -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 ); diff --git a/include/xmloff/i18nmap.hxx b/include/xmloff/i18nmap.hxx index c790aff77060..3d97063a3b91 100644 --- a/include/xmloff/i18nmap.hxx +++ b/include/xmloff/i18nmap.hxx @@ -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 || diff --git a/include/xmloff/nmspmap.hxx b/include/xmloff/nmspmap.hxx index 36d78f766b45..7bba1a662f3e 100644 --- a/include/xmloff/nmspmap.hxx +++ b/include/xmloff/nmspmap.hxx @@ -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; diff --git a/include/xmloff/prstylei.hxx b/include/xmloff/prstylei.hxx index ba32702424ef..da5278ce3102 100644 --- a/include/xmloff/prstylei.hxx +++ b/include/xmloff/prstylei.hxx @@ -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(); diff --git a/include/xmloff/xmlexp.hxx b/include/xmloff/xmlexp.hxx index f1cf97ed074d..a6e97f7659bf 100644 --- a/include/xmloff/xmlexp.hxx +++ b/include/xmloff/xmlexp.hxx @@ -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); diff --git a/include/xmloff/xmlnume.hxx b/include/xmloff/xmlnume.hxx index d522399b9a5e..e343865494dc 100644 --- a/include/xmloff/xmlnume.hxx +++ b/include/xmloff/xmlnume.hxx @@ -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; } diff --git a/xmloff/source/core/ProgressBarHelper.cxx b/xmloff/source/core/ProgressBarHelper.cxx index d5a550acb3ba..ef7292f0fd7e 100644 --- a/xmloff/source/core/ProgressBarHelper.cxx +++ b/xmloff/source/core/ProgressBarHelper.cxx @@ -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) diff --git a/xmloff/source/core/nmspmap.cxx b/xmloff/source/core/nmspmap.cxx index c5bfce108572..fe4e74ffb138 100644 --- a/xmloff/source/core/nmspmap.cxx +++ b/xmloff/source/core/nmspmap.cxx @@ -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 diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index 389cb7eb9f33..f910b09ba792 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -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) diff --git a/xmloff/source/script/XMLEventsImportContext.cxx b/xmloff/source/script/XMLEventsImportContext.cxx index e9dfc24c0a91..3e60c2d5d769 100644 --- a/xmloff/source/script/XMLEventsImportContext.cxx +++ b/xmloff/source/script/XMLEventsImportContext.cxx @@ -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( diff --git a/xmloff/source/style/GradientStyle.cxx b/xmloff/source/style/GradientStyle.cxx index 0ad8c74c9044..3c33b463f83b 100644 --- a/xmloff/source/style/GradientStyle.cxx +++ b/xmloff/source/style/GradientStyle.cxx @@ -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: */ diff --git a/xmloff/source/style/HatchStyle.cxx b/xmloff/source/style/HatchStyle.cxx index 3dbbb45467a1..9b76e19fe25f 100644 --- a/xmloff/source/style/HatchStyle.cxx +++ b/xmloff/source/style/HatchStyle.cxx @@ -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: */ diff --git a/xmloff/source/style/ImageStyle.cxx b/xmloff/source/style/ImageStyle.cxx index 4be9fa06d041..64c76f2a08fa 100644 --- a/xmloff/source/style/ImageStyle.cxx +++ b/xmloff/source/style/ImageStyle.cxx @@ -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, diff --git a/xmloff/source/style/MarkerStyle.cxx b/xmloff/source/style/MarkerStyle.cxx index ba2a7f4f71b7..bd0f35b59b29 100644 --- a/xmloff/source/style/MarkerStyle.cxx +++ b/xmloff/source/style/MarkerStyle.cxx @@ -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 diff --git a/xmloff/source/style/prstylei.cxx b/xmloff/source/style/prstylei.cxx index 44229af18de7..f80f4e01f124 100644 --- a/xmloff/source/style/prstylei.cxx +++ b/xmloff/source/style/prstylei.cxx @@ -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: */ diff --git a/xmloff/source/style/xmlnume.cxx b/xmloff/source/style/xmlnume.cxx index 54ab42c079b5..5293539cd486 100644 --- a/xmloff/source/style/xmlnume.cxx +++ b/xmloff/source/style/xmlnume.cxx @@ -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() |