summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-03-05 18:03:25 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-03-07 05:57:17 +0000
commit70f87284c6ce77a49b1fac1431cea206f4b1dfa9 (patch)
treef979810ab0761169d094385940612aa1477056d6 /sw
parent37a6bafea8416541d7d250d66a9e951400b197a3 (diff)
improve defaultparams loplugin
to catch calling params with defaults like "= OUSString()" Change-Id: Iad060e318ed492c22f8be44e326174fe6d28fff9 Reviewed-on: https://gerrit.libreoffice.org/22932 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/doc.cxx4
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx2
2 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index 873df0de487b..1e15fe7a9c38 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -703,7 +703,7 @@ void SwDoc::CalculatePagesForPrinting(
// 1 -> print range according to PageRange
// 2 -> print selection
if (1 == nContent)
- aPageRange = rOptions.getStringValue( "PageRange", OUString() );
+ aPageRange = rOptions.getStringValue( "PageRange" );
if (2 == nContent)
{
// note that printing selections is actually implemented by copying
@@ -930,7 +930,7 @@ void SwDoc::CalculatePagePairsForProspectPrinting(
// 2 -> print selection
const sal_Int64 nContent = rOptions.getIntValue( "PrintContent", 0 );
if (nContent == 1)
- aPageRange = rOptions.getStringValue( "PageRange", OUString() );
+ aPageRange = rOptions.getStringValue( "PageRange" );
if (aPageRange.isEmpty()) // empty string -> print all
{
// set page range to print to 'all pages'
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index 853001f2cd08..c0896262989d 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -2979,7 +2979,7 @@ void SAL_CALL SwXTextDocument::render(
if(pVwSh && pOut && m_pRenderData->HasSwPrtOptions())
{
- const OUString aPageRange = m_pPrintUIOptions->getStringValue( "PageRange", OUString() );
+ const OUString aPageRange = m_pPrintUIOptions->getStringValue( "PageRange" );
const bool bFirstPage = m_pPrintUIOptions->getBoolValue( "IsFirstPage" );
bool bIsSkipEmptyPages = !m_pPrintUIOptions->IsPrintEmptyPages( bIsPDFExport );