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

loplugin:unusedmethods unused return value in xmloff/

Change-Id: Ia5a3716ca4f7eb987092837ac83a415e5c0730df
üst 83f3cefa
......@@ -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
......
......@@ -55,7 +55,7 @@ public:
virtual void Characters( const OUString& rChars ) override;
bool SetComponent(
void SetComponent(
css::uno::Reference< css::lang::XComponent >& rComp );
};
......
......@@ -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
......
......@@ -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 )
......
......@@ -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;
......
......@@ -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(
......
......@@ -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;
......
......@@ -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: */
......@@ -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;
}
......
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