summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-01-15 09:36:20 +0200
committerNoel Grandin <noel@peralex.com>2016-01-15 09:36:42 +0200
commited373ea7efd34ca6baab8ddbf809e6f2a06f1a9e (patch)
treeee982f66e33240dcf8472eae9a5fbcec4d4a7a5e /xmloff
parent098462c6f69c40422c74cef8f052b7b1ff0c90e8 (diff)
loplugin:unusedmethods unused return value in include/xmloff
Change-Id: I6615a467152a50e9c65f04fd0d6c8cc128517bdb
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/core/ProgressBarHelper.cxx3
-rw-r--r--xmloff/source/core/nmspmap.cxx6
-rw-r--r--xmloff/source/core/xmlexp.cxx8
-rw-r--r--xmloff/source/script/XMLEventsImportContext.cxx5
-rw-r--r--xmloff/source/style/GradientStyle.cxx18
-rw-r--r--xmloff/source/style/HatchStyle.cxx17
-rw-r--r--xmloff/source/style/ImageStyle.cxx4
-rw-r--r--xmloff/source/style/MarkerStyle.cxx4
-rw-r--r--xmloff/source/style/prstylei.cxx14
-rw-r--r--xmloff/source/style/xmlnume.cxx6
10 files changed, 20 insertions, 65 deletions
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()