summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-01-13 12:07:59 +0200
committerNoel Grandin <noel@peralex.com>2016-01-13 12:16:24 +0200
commit60904f1a7ed71adece23bed6072adc59e459aa5b (patch)
tree96d3a4c96aa0eba67ea734a146d7205d5daefa9e /xmloff
parent83f3cefaa3ee7740ab738f394791bc505358bac3 (diff)
loplugin:unusedmethods unused return value in xmloff/
Change-Id: Ia5a3716ca4f7eb987092837ac83a415e5c0730df
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/inc/TransGradientStyle.hxx4
-rw-r--r--xmloff/inc/XMLEmbeddedObjectImportContext.hxx2
-rw-r--r--xmloff/inc/txtflde.hxx2
-rw-r--r--xmloff/source/chart/SchXMLPlotAreaContext.cxx11
-rw-r--r--xmloff/source/chart/SchXMLPlotAreaContext.hxx2
-rw-r--r--xmloff/source/core/XMLEmbeddedObjectImportContext.cxx8
-rw-r--r--xmloff/source/draw/sdxmlimp_impl.hxx8
-rw-r--r--xmloff/source/style/TransGradientStyle.cxx18
-rw-r--r--xmloff/source/text/txtflde.cxx11
9 files changed, 13 insertions, 53 deletions
diff --git a/xmloff/inc/TransGradientStyle.hxx b/xmloff/inc/TransGradientStyle.hxx
index c2d8293ff8bc..6bf80fce1cd1 100644
--- a/xmloff/inc/TransGradientStyle.hxx
+++ b/xmloff/inc/TransGradientStyle.hxx
@@ -41,7 +41,7 @@ public:
XMLTransGradientStyleImport( SvXMLImport& rImport );
~XMLTransGradientStyleImport();
- bool importXML(
+ void importXML(
const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList,
css::uno::Any& rValue,
OUString& rStrName );
@@ -55,7 +55,7 @@ public:
XMLTransGradientStyleExport( SvXMLExport& rExport );
~XMLTransGradientStyleExport();
- bool exportXML( const OUString& rStrName, const css::uno::Any& rValue );
+ void exportXML( const OUString& rStrName, const css::uno::Any& rValue );
};
#endif // INCLUDED_XMLOFF_INC_TRANSGRADIENTSTYLE_HXX
diff --git a/xmloff/inc/XMLEmbeddedObjectImportContext.hxx b/xmloff/inc/XMLEmbeddedObjectImportContext.hxx
index f5c6cbcc57a9..b071f067e2b1 100644
--- a/xmloff/inc/XMLEmbeddedObjectImportContext.hxx
+++ b/xmloff/inc/XMLEmbeddedObjectImportContext.hxx
@@ -55,7 +55,7 @@ public:
virtual void Characters( const OUString& rChars ) override;
- bool SetComponent(
+ void SetComponent(
css::uno::Reference< css::lang::XComponent >& rComp );
};
diff --git a/xmloff/inc/txtflde.hxx b/xmloff/inc/txtflde.hxx
index 3ce56f5ec983..a064f0d3face 100644
--- a/xmloff/inc/txtflde.hxx
+++ b/xmloff/inc/txtflde.hxx
@@ -410,7 +410,7 @@ protected:
/// explode a field master name into field type and field name
- bool ExplodeFieldMasterName(
+ void ExplodeFieldMasterName(
const OUString& sMasterName, /// name as returned by SO API
OUString& sFieldType, /// out: field type
OUString& sVarName); /// out: variable name
diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
index c7f9ae3d5ad4..07e4db502694 100644
--- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx
+++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
@@ -689,11 +689,8 @@ bool SchXMLPositonAttributesHelper::isAutomatic() const
return m_bAutoSize || m_bAutoPosition;
}
-bool SchXMLPositonAttributesHelper::readPositioningAttribute( sal_uInt16 nPrefix, const OUString& rLocalName, const OUString& rValue )
+void SchXMLPositonAttributesHelper::readPositioningAttribute( sal_uInt16 nPrefix, const OUString& rLocalName, const OUString& rValue )
{
- //returns true if the attribute was proccessed
- bool bReturn = true;
-
if( XML_NAMESPACE_SVG == nPrefix )
{
if( IsXMLToken( rLocalName, XML_X ) )
@@ -720,13 +717,7 @@ bool SchXMLPositonAttributesHelper::readPositioningAttribute( sal_uInt16 nPrefix
m_aSize.Height, rValue );
m_bHasSizeHeight = true;
}
- else
- bReturn = false;
}
- else
- bReturn = false;
-
- return bReturn;
}
void SchXMLPositonAttributesHelper::readAutomaticPositioningProperties( XMLPropStyleContext* pPropStyleContext, const SvXMLStylesContext* pStylesCtxt )
diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.hxx b/xmloff/source/chart/SchXMLPlotAreaContext.hxx
index 487ab359bfab..c8066cb01f8c 100644
--- a/xmloff/source/chart/SchXMLPlotAreaContext.hxx
+++ b/xmloff/source/chart/SchXMLPlotAreaContext.hxx
@@ -60,7 +60,7 @@ public:
explicit SchXMLPositonAttributesHelper( SvXMLImport& rImporter );
~SchXMLPositonAttributesHelper();
- bool readPositioningAttribute( sal_uInt16 nPrefix, const OUString& rLocalName, const OUString& rValue );
+ void readPositioningAttribute( sal_uInt16 nPrefix, const OUString& rLocalName, const OUString& rValue );
void readAutomaticPositioningProperties( XMLPropStyleContext* pPropStyleContext, const SvXMLStylesContext* pStylesCtxt );
bool hasPosSize() const;
diff --git a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx
index 55089bfdee9d..edd01eecd0af 100644
--- a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx
+++ b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx
@@ -135,11 +135,11 @@ void XMLEmbeddedObjectImportContext_Impl::Characters( const OUString& rChars )
}
-bool XMLEmbeddedObjectImportContext::SetComponent(
+void XMLEmbeddedObjectImportContext::SetComponent(
Reference< XComponent >& rComp )
{
if( !rComp.is() || sFilterService.isEmpty() )
- return false;
+ return;
Sequence<Any> aArgs( 0 );
@@ -150,7 +150,7 @@ bool XMLEmbeddedObjectImportContext::SetComponent(
UNO_QUERY);
if( !xHandler.is() )
- return false;
+ return;
try
{
@@ -165,8 +165,6 @@ bool XMLEmbeddedObjectImportContext::SetComponent(
xImporter->setTargetDocument( rComp );
xComp = rComp; // keep ref to component only if there is a handler
-
- return true;
}
XMLEmbeddedObjectImportContext::XMLEmbeddedObjectImportContext(
diff --git a/xmloff/source/draw/sdxmlimp_impl.hxx b/xmloff/source/draw/sdxmlimp_impl.hxx
index 4a585e79e0a6..ccda6f1099db 100644
--- a/xmloff/source/draw/sdxmlimp_impl.hxx
+++ b/xmloff/source/draw/sdxmlimp_impl.hxx
@@ -143,14 +143,6 @@ enum SdXMLPresentationPlaceholderAttrTokenMap
XML_TOK_PRESENTATIONPLACEHOLDER_HEIGHT
};
-struct SdXMLltXDrawPageId
-{
- bool operator()(sal_Int32 nId1, sal_Int32 nId2 ) const
- {
- return nId1 < nId2;
- }
-};
-
class SvXMLUnitConverter;
class SvXMLTokenMap;
class SdXMLMasterStylesContext;
diff --git a/xmloff/source/style/TransGradientStyle.cxx b/xmloff/source/style/TransGradientStyle.cxx
index 39b5713f5f13..035aa2b7d545 100644
--- a/xmloff/source/style/TransGradientStyle.cxx
+++ b/xmloff/source/style/TransGradientStyle.cxx
@@ -75,12 +75,11 @@ XMLTransGradientStyleImport::~XMLTransGradientStyleImport()
{
}
-bool XMLTransGradientStyleImport::importXML(
+void XMLTransGradientStyleImport::importXML(
const uno::Reference< xml::sax::XAttributeList >& xAttrList,
uno::Any& rValue,
OUString& rStrName )
{
- bool bRet = false;
bool bHasName = false;
bool bHasStyle = false;
OUString aDisplayName;
@@ -200,10 +199,6 @@ bool XMLTransGradientStyleImport::importXML(
aDisplayName );
rStrName = aDisplayName;
}
-
- bRet = bHasName && bHasStyle;
-
- return bRet;
}
// Export
@@ -217,11 +212,10 @@ XMLTransGradientStyleExport::~XMLTransGradientStyleExport()
{
}
-bool XMLTransGradientStyleExport::exportXML(
+void XMLTransGradientStyleExport::exportXML(
const OUString& rStrName,
const uno::Any& rValue )
{
- bool bRet = false;
awt::Gradient aGradient;
if( !rStrName.isEmpty() )
@@ -232,11 +226,7 @@ bool XMLTransGradientStyleExport::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;
@@ -299,8 +289,6 @@ bool XMLTransGradientStyleExport::exportXML(
}
}
}
-
- return bRet;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx
index 2e53ecfece77..f8dde83addd4 100644
--- a/xmloff/source/text/txtflde.cxx
+++ b/xmloff/source/text/txtflde.cxx
@@ -2884,30 +2884,21 @@ void XMLTextFieldExport::ExportDataBaseElement(
// explode a field master name into field type and field name
-bool XMLTextFieldExport::ExplodeFieldMasterName(
+void XMLTextFieldExport::ExplodeFieldMasterName(
const OUString& sMasterName, OUString& sFieldType, OUString& sVarName)
{
sal_Int32 nLength = sFieldMasterPrefix.getLength();
sal_Int32 nSeparator = sMasterName.indexOf('.', nLength);
- bool bReturn = true;
-
-#ifdef DBG_UTIL
- // check for service name
- bReturn &= (0 == sFieldMasterPrefix.compareTo(sMasterName, nLength));
-#endif
// '.' found?
if (nSeparator <= nLength) {
SAL_WARN("xmloff.text", "no field var name!");
- bReturn = false;
}
else
{
sFieldType = sMasterName.copy(nLength, nSeparator-nLength);
sVarName = sMasterName.copy(nSeparator+1);
}
-
- return bReturn;
}