summaryrefslogtreecommitdiff
path: root/sw/inc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-07-30 15:24:04 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-07-30 18:54:15 +0200
commit4bef6511332073fbe3899fa2003caf88d9f2ac49 (patch)
treedca0d58c3fc86d6c88abc2a72fd91f149a917058 /sw/inc
parentc9dcd0a6197160fdc8bf086ae4d8a78558e7d078 (diff)
loplugin:stringloop in sw
Change-Id: Ie316aee8d1e4f772dc25725b46e130c6717458c2 Reviewed-on: https://gerrit.libreoffice.org/58331 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/inc')
-rw-r--r--sw/inc/calc.hxx4
-rw-r--r--sw/inc/cellfml.hxx20
-rw-r--r--sw/inc/dbgoutsw.hxx11
3 files changed, 19 insertions, 16 deletions
diff --git a/sw/inc/calc.hxx b/sw/inc/calc.hxx
index 75112605f492..3396c506ab18 100644
--- a/sw/inc/calc.hxx
+++ b/sw/inc/calc.hxx
@@ -24,6 +24,7 @@
#include <vector>
#include <basic/sbxvar.hxx>
#include <unotools/syslocale.hxx>
+#include <rtl/ustrbuf.hxx>
#include "swdllapi.h"
class CharClass;
@@ -182,7 +183,8 @@ extern "C" typedef double (*pfCalc)(double);
class SwCalc
{
SwHashTable<SwCalcExp> m_aVarTable;
- OUString m_aVarName, m_sCurrSym;
+ OUStringBuffer m_aVarName;
+ OUString m_sCurrSym;
OUString m_sCommand;
std::vector<const SwUserFieldType*> m_aRekurStack;
SwSbxValue m_nLastLeft;
diff --git a/sw/inc/cellfml.hxx b/sw/inc/cellfml.hxx
index 2d6a64b4d3ec..3aa83b22d8ef 100644
--- a/sw/inc/cellfml.hxx
+++ b/sw/inc/cellfml.hxx
@@ -54,26 +54,26 @@ public:
class SwTableFormula
{
-typedef void (SwTableFormula:: *FnScanFormula)( const SwTable&, OUString&,
+typedef void (SwTableFormula:: *FnScanFormula)( const SwTable&, OUStringBuffer&,
OUString&, OUString*, void* ) const;
- void BoxNmsToPtr( const SwTable&, OUString&, OUString&, OUString*,
+ void BoxNmsToPtr( const SwTable&, OUStringBuffer&, OUString&, OUString*,
void* pPara ) const;
- void PtrToBoxNms( const SwTable&, OUString&, OUString&, OUString*,
+ void PtrToBoxNms( const SwTable&, OUStringBuffer&, OUString&, OUString*,
void* pPara ) const;
- void RelNmsToBoxNms( const SwTable&, OUString&, OUString&, OUString*,
+ void RelNmsToBoxNms( const SwTable&, OUStringBuffer&, OUString&, OUString*,
void* pPara ) const;
- void RelBoxNmsToPtr( const SwTable&, OUString&, OUString&, OUString*,
+ void RelBoxNmsToPtr( const SwTable&, OUStringBuffer&, OUString&, OUString*,
void* pPara ) const;
- void BoxNmsToRelNm( const SwTable&, OUString&, OUString&, OUString*,
+ void BoxNmsToRelNm( const SwTable&, OUStringBuffer&, OUString&, OUString*,
void* pPara ) const;
- void MakeFormula_( const SwTable&, OUString&, OUString&, OUString*,
+ void MakeFormula_( const SwTable&, OUStringBuffer&, OUString&, OUString*,
void* pPara ) const;
- void GetFormulaBoxes( const SwTable&, OUString&, OUString&, OUString*,
+ void GetFormulaBoxes( const SwTable&, OUStringBuffer&, OUString&, OUString*,
void* pPara ) const;
- void HasValidBoxes_( const SwTable&, OUString&, OUString&, OUString*,
+ void HasValidBoxes_( const SwTable&, OUStringBuffer&, OUString&, OUString*,
void* pPara ) const;
- void SplitMergeBoxNm_( const SwTable&, OUString&, OUString&, OUString*,
+ void SplitMergeBoxNm_( const SwTable&, OUStringBuffer&, OUString&, OUString*,
void* pPara ) const;
static void GetBoxes( const SwTableBox& rStt, const SwTableBox& rEnd,
diff --git a/sw/inc/dbgoutsw.hxx b/sw/inc/dbgoutsw.hxx
index 44dc0b2ab6ce..bc1d93f6c159 100644
--- a/sw/inc/dbgoutsw.hxx
+++ b/sw/inc/dbgoutsw.hxx
@@ -22,6 +22,7 @@
#ifdef DBG_UTIL
#include <rtl/ustring.hxx>
+#include <rtl/ustrbuf.hxx>
#include "tox.hxx"
#include <cstdio>
#include <unordered_map>
@@ -78,25 +79,25 @@ SW_DLLPUBLIC const char * dbg_out(const SwNodeRange & rRange);
template<typename tKey, typename tMember, typename fHashFunction>
OUString lcl_dbg_out(const std::unordered_map<tKey, tMember, fHashFunction> & rMap)
{
- OUString aResult("[");
+ OUStringBuffer aResult("[");
typename std::unordered_map<tKey, tMember, fHashFunction>::const_iterator aIt;
for (aIt = rMap.begin(); aIt != rMap.end(); ++aIt)
{
if (aIt != rMap.begin())
- aResult += ", ";
+ aResult.append(", ");
aResult += aIt->first;
char sBuffer[256];
sprintf(sBuffer, "(%p)", aIt->second);
- aResult += OUString(sBuffer, strlen(sBuffer), RTL_TEXTENCODING_ASCII_US);
+ aResult.appendAscii(sBuffer);
}
- aResult += "]";
+ aResult.append("]");
- return aResult;
+ return aResult.makeStringAndClear();
}
template<typename tKey, typename tMember, typename fHashFunction>