summaryrefslogtreecommitdiff
path: root/vcl/unx/generic/printer
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-05-05 13:03:43 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-05-08 08:29:03 +0200
commit185ed3ddb8c01ee4465ce559e37113824f57b5c7 (patch)
tree596455ca4b9dc85666efbf06a1e1e0a3eec3ee2d /vcl/unx/generic/printer
parentd33e262a244f351febc9dbe605b05f76cb834eeb (diff)
teach loplugin:constantparam about simple constructor calls
Change-Id: I7d2a28ab5951fbdb5a427c84e9ac4c1e32ecf9f9 Reviewed-on: https://gerrit.libreoffice.org/37280 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/unx/generic/printer')
-rw-r--r--vcl/unx/generic/printer/ppdparser.cxx19
1 files changed, 6 insertions, 13 deletions
diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx
index 5d6ad5e90b13..569f424dd5b9 100644
--- a/vcl/unx/generic/printer/ppdparser.cxx
+++ b/vcl/unx/generic/printer/ppdparser.cxx
@@ -103,19 +103,18 @@ namespace psp
OUString translateValue(
const OUString& i_rKey,
- const OUString& i_rOption,
- const OUString& i_rValue
+ const OUString& i_rOption
) const;
OUString translateOption( const OUString& i_rKey,
const OUString& i_rOption ) const
{
- return translateValue( i_rKey, i_rOption, OUString() );
+ return translateValue( i_rKey, i_rOption );
}
OUString translateKey( const OUString& i_rKey ) const
{
- return translateValue( i_rKey, OUString(), OUString() );
+ return translateValue( i_rKey, OUString() );
}
};
@@ -187,24 +186,18 @@ namespace psp
OUString PPDTranslator::translateValue(
const OUString& i_rKey,
- const OUString& i_rOption,
- const OUString& i_rValue
+ const OUString& i_rOption
) const
{
OUString aResult;
- OUStringBuffer aKey( i_rKey.getLength() + i_rOption.getLength() + i_rValue.getLength() + 2 );
+ OUStringBuffer aKey( i_rKey.getLength() + i_rOption.getLength() + 2 );
aKey.append( i_rKey );
- if( !i_rOption.isEmpty() || !i_rValue.isEmpty() )
+ if( !i_rOption.isEmpty() )
{
aKey.append( ':' );
aKey.append( i_rOption );
}
- if( !i_rValue.isEmpty() )
- {
- aKey.append( ':' );
- aKey.append( i_rValue );
- }
if( !aKey.isEmpty() )
{
OUString aK( aKey.makeStringAndClear() );