summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-02-25 11:33:33 +0200
committerNoel Grandin <noel@peralex.com>2016-02-25 11:42:35 +0200
commit4fbf95deba87ed28ee8eb8442477832e46ba76c6 (patch)
tree2a1628497cc891de6ede5f5b33613e6e4deb63ef /xmloff
parentf66d734bcd994cb5fc2f38a8d9018e13385cd10c (diff)
new loplugin:unuseddefaultparams
Change-Id: I2c3e7d66be9e3883ea2801ff394948cc580d1e44
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/inc/txtflde.hxx25
-rw-r--r--xmloff/source/chart/SchXMLExport.cxx12
-rw-r--r--xmloff/source/chart/SchXMLSeries2Context.cxx9
-rw-r--r--xmloff/source/forms/formcellbinding.cxx2
-rw-r--r--xmloff/source/forms/formcellbinding.hxx3
-rw-r--r--xmloff/source/forms/propertyexport.cxx4
-rw-r--r--xmloff/source/forms/propertyexport.hxx5
-rw-r--r--xmloff/source/text/txtflde.cxx42
8 files changed, 38 insertions, 64 deletions
diff --git a/xmloff/inc/txtflde.hxx b/xmloff/inc/txtflde.hxx
index 3b50ba4ccd9d..53ddb9ee015e 100644
--- a/xmloff/inc/txtflde.hxx
+++ b/xmloff/inc/txtflde.hxx
@@ -229,9 +229,7 @@ protected:
/// export an element with string content
void ExportElement(enum ::xmloff::token::XMLTokenEnum eElement, /// element token
- const OUString& sContent, /// element content
- bool bAddSpace = false); /// add blanks around
- /// element?
+ const OUString& sContent); /// element content
/// export a macro (as used in the macro field)
void ExportMacro( const css::uno::Reference< css::beans::XPropertySet> & rPropSet,
@@ -278,16 +276,14 @@ protected:
void ProcessString(
enum ::xmloff::token::XMLTokenEnum eXmlName, /// attribute token (namespace text)
const OUString& sValue, /// attribute value
- const OUString& sDefault, /// default value; omit if equal
- sal_uInt16 nPrefix = XML_NAMESPACE_TEXT); /// attribute name prefix
+ const OUString& sDefault); /// default value; omit if equal
/// export a string attribute, omit if default
void ProcessString(
enum ::xmloff::token::XMLTokenEnum eXmlName, /// attribute token (namespace text)
sal_uInt16 nValuePrefix,
const OUString& sValue, /// attribute value
- const OUString& sDefault, /// default value; omit if equal
- sal_uInt16 nPrefix = XML_NAMESPACE_TEXT); /// attribute name prefix
+ const OUString& sDefault); /// default value; omit if equal
/// export a string attribute
void ProcessString(
@@ -300,8 +296,7 @@ protected:
void ProcessString(
enum ::xmloff::token::XMLTokenEnum eXmlName, /// attribute token (namespace text)
enum ::xmloff::token::XMLTokenEnum eValue, /// attribute value token
- enum ::xmloff::token::XMLTokenEnum eDefault, /// default value token
- sal_uInt16 nPrefix = XML_NAMESPACE_TEXT); /// attribute name prefix
+ enum ::xmloff::token::XMLTokenEnum eDefault); /// default value token
/// export a string as a sequence of paragraphs
void ProcessParagraphSequence(
@@ -314,8 +309,7 @@ protected:
/// export display attribute (value, formula, none)
void ProcessDisplay(bool bIsVisible, /// is visible?
- bool bIsCommand, /// is show command/show name?
- bool bDefault = true); /// omit, if default
+ bool bIsCommand); /// is show command/show name?
/// export all data-style related attributes
void ProcessValueAndType(
@@ -345,21 +339,18 @@ protected:
sal_Int32 nMinutes, /// date/time value in minutes
bool bIsDate, /// export as date?
bool bIsDuration, /// export as duration?
- bool bOmitDurationIfZero, /// omit zero-length durations
- sal_uInt16 nPrefix = XML_NAMESPACE_TEXT); /// attribute name prefix
+ bool bOmitDurationIfZero); /// omit zero-length durations
/// export times, dates and durations according to ISO 8601
void ProcessDateTime(
enum ::xmloff::token::XMLTokenEnum eXMLName, /// attribute token
const css::util::DateTime& rTime, /// date/time value
- bool bIsDate, /// export as date (rather than date/time)?
- sal_uInt16 nPrefix = XML_NAMESPACE_TEXT); /// attribute name prefix
+ bool bIsDate); /// export as date (rather than date/time)?
/// export time or dateTime
void ProcessTimeOrDateTime(
enum ::xmloff::token::XMLTokenEnum eXMLName, /// attribute token
- const css::util::DateTime& rTime, /// date/time value
- sal_uInt16 nPrefix = XML_NAMESPACE_TEXT); /// attribute name prefix
+ const css::util::DateTime& rTime); /// date/time value
/// export all attributes for bibliography data fields
void ProcessBibliographyData(
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
index 2fe0d19b7cad..694dd6f38f6b 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -237,9 +237,9 @@ public:
void addPosition( css::uno::Reference< css::drawing::XShape > xShape );
/// add svg size as attribute for current element
void addSize( const css::awt::Size & rSize, bool bIsOOoNamespace = false );
- void addSize( css::uno::Reference< css::drawing::XShape > xShape, bool bIsOOoNamespace = false );
+ void addSize( css::uno::Reference< css::drawing::XShape > xShape );
/// exports a string as a paragraph element
- void exportText( const OUString& rText, bool bConvertTabsLFs = false );
+ void exportText( const OUString& rText );
public:
SvXMLExport& mrExport;
@@ -3476,10 +3476,10 @@ void SchXMLExportHelper_Impl::addSize( const awt::Size & rSize, bool bIsOOoNames
mrExport.AddAttribute( bIsOOoNamespace ? XML_NAMESPACE_CHART_EXT : XML_NAMESPACE_SVG, XML_HEIGHT, msString );
}
-void SchXMLExportHelper_Impl::addSize( Reference< drawing::XShape > xShape, bool bIsOOoNamespace )
+void SchXMLExportHelper_Impl::addSize( Reference< drawing::XShape > xShape )
{
if( xShape.is())
- addSize( xShape->getSize(), bIsOOoNamespace );
+ addSize( xShape->getSize() );
}
awt::Size SchXMLExportHelper_Impl::getPageSize( const Reference< chart2::XChartDocument > & xChartDoc )
@@ -3510,9 +3510,9 @@ void SchXMLExportHelper_Impl::AddAutoStyleAttribute( const std::vector< XMLPrope
}
}
-void SchXMLExportHelper_Impl::exportText( const OUString& rText, bool bConvertTabsLFs )
+void SchXMLExportHelper_Impl::exportText( const OUString& rText )
{
- SchXMLTools::exportText( mrExport, rText, bConvertTabsLFs );
+ SchXMLTools::exportText( mrExport, rText, false/*bConvertTabsLFs*/ );
}
// class SchXMLExport
diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx
index 644052dbf1f2..3be3a2218117 100644
--- a/xmloff/source/chart/SchXMLSeries2Context.cxx
+++ b/xmloff/source/chart/SchXMLSeries2Context.cxx
@@ -179,15 +179,10 @@ void lcl_resetSymbolSizeForPointsIfNecessary( const uno::Reference< beans::XProp
void lcl_insertErrorBarLSequencesToMap(
tSchXMLLSequencesPerIndex & rInOutMap,
- const uno::Reference< beans::XPropertySet > & xSeriesProp,
- bool bYError = true )
+ const uno::Reference< beans::XPropertySet > & xSeriesProp )
{
Reference< chart2::data::XDataSource > xErrorBarSource;
- const OUString aPropName(
- bYError
- ? OUString( "ErrorBarY" )
- : OUString( "ErrorBarX" ));
- if( ( xSeriesProp->getPropertyValue( aPropName ) >>= xErrorBarSource ) &&
+ if( ( xSeriesProp->getPropertyValue( "ErrorBarY" ) >>= xErrorBarSource ) &&
xErrorBarSource.is() )
{
Sequence< Reference< chart2::data::XLabeledDataSequence > > aLSequences(
diff --git a/xmloff/source/forms/formcellbinding.cxx b/xmloff/source/forms/formcellbinding.cxx
index 486a98a3e02f..493c0d5c26a7 100644
--- a/xmloff/source/forms/formcellbinding.cxx
+++ b/xmloff/source/forms/formcellbinding.cxx
@@ -113,7 +113,7 @@ bool FormCellBindingHelper::livesInSpreadsheetDocument( const Reference< XProper
return xDocument.is();
}
-bool FormCellBindingHelper::convertStringAddress( const OUString& _rAddressDescription, CellAddress& /* [out] */ _rAddress, sal_Int16 /*_nAssumeSheet*/ ) const
+bool FormCellBindingHelper::convertStringAddress( const OUString& _rAddressDescription, CellAddress& /* [out] */ _rAddress ) const
{
Any aAddress;
return doConvertAddressRepresentations(
diff --git a/xmloff/source/forms/formcellbinding.hxx b/xmloff/source/forms/formcellbinding.hxx
index eb152cc05b42..346669500501 100644
--- a/xmloff/source/forms/formcellbinding.hxx
+++ b/xmloff/source/forms/formcellbinding.hxx
@@ -183,8 +183,7 @@ namespace xmloff
*/
bool convertStringAddress(
const OUString& _rAddressDescription,
- css::table::CellAddress& /* [out] */ _rAddress,
- sal_Int16 _nAssumeSheet = -1
+ css::table::CellAddress& /* [out] */ _rAddress
) const;
/** creates an address range object from a string representation of a cell range address
diff --git a/xmloff/source/forms/propertyexport.cxx b/xmloff/source/forms/propertyexport.cxx
index a06823d3b47f..1f145898f2e2 100644
--- a/xmloff/source/forms/propertyexport.cxx
+++ b/xmloff/source/forms/propertyexport.cxx
@@ -473,10 +473,10 @@ namespace xmloff
void OPropertyExport::exportStringSequenceAttribute(const sal_uInt16 _nAttributeNamespaceKey, const sal_Char* _pAttributeName,
const OUString& _rPropertyName,
- const sal_Unicode _aQuoteCharacter, const sal_Unicode _aListSeparator)
+ const sal_Unicode _aQuoteCharacter)
{
+ const sal_Unicode _aListSeparator = ',';
DBG_CHECK_PROPERTY( _rPropertyName, Sequence< OUString > );
- OSL_ENSURE(_aListSeparator != 0, "OPropertyExport::exportStringSequenceAttribute: invalid separator character!");
Sequence< OUString > aItems;
m_xProps->getPropertyValue( _rPropertyName ) >>= aItems;
diff --git a/xmloff/source/forms/propertyexport.hxx b/xmloff/source/forms/propertyexport.hxx
index 4af543b5251d..6ebdb3211f5e 100644
--- a/xmloff/source/forms/propertyexport.hxx
+++ b/xmloff/source/forms/propertyexport.hxx
@@ -298,15 +298,12 @@ namespace xmloff
the name of the property to ask the object for
@param _aQuoteCharacter
the character to use to quote the sequence elements with. May be 0, in this case no quoting happens
- @param _aListSeparator
- the character to use to separate the list entries
*/
void exportStringSequenceAttribute(
const sal_uInt16 _nAttributeNamespaceKey,
const sal_Char* _pAttributeName,
const OUString& _rPropertyName,
- const sal_Unicode _aQuoteCharacter = '"',
- const sal_Unicode _aListSeparator = ',');
+ const sal_Unicode _aQuoteCharacter = '"');
/** determines whether the given property is to be exported
diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx
index 9eb409623db8..a7a78eb8f58c 100644
--- a/xmloff/source/text/txtflde.cxx
+++ b/xmloff/source/text/txtflde.cxx
@@ -2227,8 +2227,7 @@ void XMLTextFieldExport::ExportElement(enum XMLTokenEnum eElementName,
}
void XMLTextFieldExport::ExportElement(enum XMLTokenEnum eElementName,
- const OUString& sContent,
- bool bAddSpace)
+ const OUString& sContent)
{
DBG_ASSERT(eElementName != XML_TOKEN_INVALID, "invalid element name!");
if (eElementName != XML_TOKEN_INVALID)
@@ -2239,7 +2238,7 @@ void XMLTextFieldExport::ExportElement(enum XMLTokenEnum eElementName,
if (SvtSaveOptions().GetODFDefaultVersion() > SvtSaveOptions::ODFVER_012)
{
SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_LO_EXT,
- eElementName, bAddSpace, bAddSpace );
+ eElementName, false, false );
// export content
GetExport().Characters(sContent);
}
@@ -2247,7 +2246,7 @@ void XMLTextFieldExport::ExportElement(enum XMLTokenEnum eElementName,
else
{
SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_TEXT,
- eElementName, bAddSpace, bAddSpace );
+ eElementName, false, false );
// export content
GetExport().Characters(sContent);
}
@@ -2426,8 +2425,7 @@ void XMLTextFieldExport::ProcessValueAndType(
/// process display related properties
void XMLTextFieldExport::ProcessDisplay(bool bIsVisible,
- bool bIsCommand,
- bool bValueDefault)
+ bool bIsCommand)
{
enum XMLTokenEnum eValue;
@@ -2441,7 +2439,7 @@ void XMLTextFieldExport::ProcessDisplay(bool bIsVisible,
}
// omit attribute if default
- if (!bValueDefault || (eValue != XML_VALUE))
+ if (eValue != XML_VALUE)
{
GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_DISPLAY, eValue);
}
@@ -2497,12 +2495,11 @@ void XMLTextFieldExport::ProcessString(enum XMLTokenEnum eName,
/// export a string attribute
void XMLTextFieldExport::ProcessString(enum XMLTokenEnum eName,
const OUString& sValue,
- const OUString& sDefault,
- sal_uInt16 nPrefix)
+ const OUString& sDefault)
{
if (sValue != sDefault)
{
- ProcessString(eName, sValue, false, nPrefix);
+ ProcessString(eName, sValue);
}
}
@@ -2510,12 +2507,11 @@ void XMLTextFieldExport::ProcessString(enum XMLTokenEnum eName,
void XMLTextFieldExport::ProcessString(enum XMLTokenEnum eName,
sal_uInt16 nValuePrefix,
const OUString& sValue,
- const OUString& sDefault,
- sal_uInt16 nPrefix)
+ const OUString& sDefault)
{
if (sValue != sDefault)
{
- ProcessString(eName, nValuePrefix, sValue, false, nPrefix);
+ ProcessString(eName, nValuePrefix, sValue);
}
}
@@ -2544,11 +2540,10 @@ void XMLTextFieldExport::ProcessString(
void XMLTextFieldExport::ProcessString(
enum XMLTokenEnum eName,
enum XMLTokenEnum eValue,
- enum XMLTokenEnum eDefault,
- sal_uInt16 nPrefix)
+ enum XMLTokenEnum eDefault)
{
if ( eValue != eDefault )
- ProcessString( eName, eValue, false, nPrefix);
+ ProcessString( eName, eValue);
}
@@ -2650,8 +2645,7 @@ void XMLTextFieldExport::ProcessDateTime(enum XMLTokenEnum eName,
/// export a date or time
void XMLTextFieldExport::ProcessDateTime(enum XMLTokenEnum eName,
const util::DateTime& rTime,
- bool bIsDate,
- sal_uInt16 nPrefix)
+ bool bIsDate)
{
OUStringBuffer aBuffer;
@@ -2670,7 +2664,7 @@ void XMLTextFieldExport::ProcessDateTime(enum XMLTokenEnum eName,
::sax::Converter::convertDateTime(aBuffer, aDateTime, nullptr);
// output attribute
- ProcessString(eName, aBuffer.makeStringAndClear(), true, nPrefix);
+ ProcessString(eName, aBuffer.makeStringAndClear(), true);
}
/// export a date, time, or duration
@@ -2678,21 +2672,19 @@ void XMLTextFieldExport::ProcessDateTime(enum XMLTokenEnum eName,
sal_Int32 nMinutes,
bool bIsDate,
bool bIsDuration,
- bool bOmitDurationIfZero,
- sal_uInt16 nPrefix)
+ bool bOmitDurationIfZero)
{
// handle bOmitDurationIfZero here, because we can precisely compare ints
if (!(bIsDuration && bOmitDurationIfZero && (nMinutes==0)))
{
ProcessDateTime(eName, (double)nMinutes / (double)(24*60),
- bIsDate, bIsDuration, bOmitDurationIfZero, nPrefix);
+ bIsDate, bIsDuration, bOmitDurationIfZero);
}
}
/// export a time or dateTime
void XMLTextFieldExport::ProcessTimeOrDateTime(enum XMLTokenEnum eName,
- const util::DateTime& rTime,
- sal_uInt16 nPrefix)
+ const util::DateTime& rTime)
{
OUStringBuffer aBuffer;
@@ -2700,7 +2692,7 @@ void XMLTextFieldExport::ProcessTimeOrDateTime(enum XMLTokenEnum eName,
::sax::Converter::convertTimeOrDateTime(aBuffer, rTime, nullptr);
// output attribute
- ProcessString(eName, aBuffer.makeStringAndClear(), true, nPrefix);
+ ProcessString(eName, aBuffer.makeStringAndClear(), true);
}