[Libreoffice-commits] core.git: 2 commits - canvas/source chart2/source compilerplugins/clang connectivity/source dbaccess/source editeng/source filter/source helpcompiler/source hwpfilter/source i18npool/source i18nutil/source idl/source linguistic/source lotuswordpro/source oox/source sc/qa sc/source sd/qa sd/source sfx2/source svtools/source svx/source sw/qa sw/source test/source toolkit/source ucb/source unoxml/source vcl/source writerperfect/inc writerperfect/source xmloff/source

Noel Grandin noel at peralex.com
Thu Apr 28 09:31:39 UTC 2016


 canvas/source/vcl/canvasbitmaphelper.cxx                                |    6 
 canvas/source/vcl/canvashelper.cxx                                      |    6 
 chart2/source/controller/sidebar/ChartAreaPanel.cxx                     |   12 -
 chart2/source/inc/CloneHelper.hxx                                       |   12 -
 chart2/source/model/main/Axis.cxx                                       |    4 
 chart2/source/model/main/BaseCoordinateSystem.cxx                       |    4 
 chart2/source/model/main/ChartModel.cxx                                 |   10 
 chart2/source/model/main/DataSeries.cxx                                 |    4 
 chart2/source/model/main/Diagram.cxx                                    |    8 
 chart2/source/model/main/Title.cxx                                      |    2 
 chart2/source/model/template/ChartType.cxx                              |    2 
 chart2/source/tools/DataSourceHelper.cxx                                |    4 
 chart2/source/tools/ErrorBar.cxx                                        |    2 
 chart2/source/tools/ImplOPropertySet.cxx                                |    2 
 chart2/source/tools/RegressionCurveModel.cxx                            |    2 
 compilerplugins/clang/stylepolice.cxx                                   |   69 +++++-
 connectivity/source/commontools/dbconversion.cxx                        |   46 ++--
 connectivity/source/drivers/file/FPreparedStatement.cxx                 |    6 
 connectivity/source/drivers/file/FResultSet.cxx                         |    8 
 connectivity/source/drivers/file/FStatement.cxx                         |    8 
 connectivity/source/drivers/jdbc/PreparedStatement.cxx                  |    4 
 connectivity/source/drivers/jdbc/ResultSet.cxx                          |    4 
 connectivity/source/drivers/mork/MPreparedStatement.cxx                 |    6 
 connectivity/source/drivers/mork/MQueryHelper.cxx                       |   26 +-
 connectivity/source/drivers/mork/MResultSet.cxx                         |   10 
 connectivity/source/drivers/mork/MStatement.cxx                         |   10 
 dbaccess/source/ui/dlg/adminpages.cxx                                   |    8 
 dbaccess/source/ui/querydesign/querycontroller.cxx                      |    4 
 editeng/source/editeng/eehtml.cxx                                       |    5 
 filter/source/flash/swffilter.cxx                                       |   12 -
 helpcompiler/source/HelpCompiler.cxx                                    |    4 
 helpcompiler/source/HelpLinker.cxx                                      |   19 -
 hwpfilter/source/hinfo.cxx                                              |   12 -
 i18npool/source/breakiterator/breakiteratorImpl.cxx                     |   10 
 i18npool/source/breakiterator/breakiterator_unicode.cxx                 |    4 
 i18npool/source/breakiterator/xdictionary.cxx                           |   18 -
 i18npool/source/calendar/calendarImpl.cxx                               |    4 
 i18npool/source/characterclassification/characterclassificationImpl.cxx |    8 
 i18npool/source/collator/collatorImpl.cxx                               |    8 
 i18npool/source/inputchecker/inputsequencechecker.cxx                   |    8 
 i18npool/source/localedata/localedata.cxx                               |   37 +--
 i18npool/source/nativenumber/nativenumbersupplier.cxx                   |    4 
 i18nutil/source/utility/oneToOneMapping.cxx                             |    8 
 idl/source/objects/object.cxx                                           |    8 
 idl/source/prj/parser.cxx                                               |    6 
 linguistic/source/dicimp.cxx                                            |    4 
 linguistic/source/dlistimp.cxx                                          |    6 
 linguistic/source/iprcache.cxx                                          |    8 
 linguistic/source/misc.cxx                                              |    4 
 lotuswordpro/source/filter/lwpdrawobj.cxx                               |   18 -
 lotuswordpro/source/filter/lwplayout.cxx                                |    6 
 lotuswordpro/source/filter/lwprowlayout.cxx                             |    4 
 lotuswordpro/source/filter/lwpsortopt.cxx                               |    4 
 lotuswordpro/source/filter/xfilter/xfliststyle.cxx                      |    8 
 oox/source/drawingml/fillpropertiesgroupcontext.cxx                     |    6 
 oox/source/ole/olehelper.cxx                                            |    4 
 sc/qa/extras/macros-test.cxx                                            |   18 -
 sc/qa/extras/recordchanges-test.cxx                                     |   12 -
 sc/qa/extras/scannotationobj.cxx                                        |   10 
 sc/qa/extras/sccondformats.cxx                                          |    8 
 sc/qa/unit/subsequent_export-test.cxx                                   |   16 -
 sc/source/core/tool/interpr8.cxx                                        |   36 +--
 sc/source/filter/excel/excdoc.cxx                                       |    4 
 sc/source/filter/excel/xelink.cxx                                       |    8 
 sc/source/filter/excel/xichart.cxx                                      |   16 -
 sc/source/filter/xml/xmlexprt.cxx                                       |   68 +++---
 sc/source/ui/unoobj/warnpassword.cxx                                    |    4 
 sc/source/ui/vba/vbacomment.cxx                                         |    4 
 sc/source/ui/vba/vbanames.cxx                                           |    8 
 sd/qa/unit/misc-tests.cxx                                               |   16 -
 sd/qa/unit/sdmodeltestbase.hxx                                          |    2 
 sd/source/core/CustomAnimationEffect.cxx                                |   18 -
 sfx2/source/doc/sfxbasemodel.cxx                                        |    4 
 svtools/source/misc/embedhlp.cxx                                        |   18 -
 svx/source/svdraw/svdoashp.cxx                                          |    6 
 svx/source/svdraw/svdograf.cxx                                          |    6 
 sw/qa/core/macros-test.cxx                                              |    2 
 sw/qa/extras/ooxmlexport/ooxmlexport2.cxx                               |    4 
 sw/qa/extras/ooxmlimport/ooxmlimport.cxx                                |    6 
 sw/qa/extras/uiwriter/uiwriter.cxx                                      |   10 
 sw/source/filter/ww8/wrtw8nds.cxx                                       |    4 
 test/source/sheet/datapilotfield.cxx                                    |  102 +++++-----
 test/source/sheet/xdatabaserange.cxx                                    |   36 +--
 test/source/sheet/xnamedrange.cxx                                       |   16 -
 test/source/sheet/xnamedranges.cxx                                      |    4 
 test/source/sheet/xsheetannotation.cxx                                  |   16 -
 test/source/sheet/xsheetannotations.cxx                                 |   76 +++----
 test/source/sheet/xspreadsheets2.cxx                                    |    4 
 toolkit/source/controls/controlmodelcontainerbase.cxx                   |    5 
 ucb/source/ucp/file/shell.cxx                                           |   24 +-
 unoxml/source/dom/attr.cxx                                              |    6 
 unoxml/source/dom/attributesmap.cxx                                     |   12 -
 unoxml/source/dom/document.cxx                                          |   48 ++--
 unoxml/source/dom/element.cxx                                           |   80 +++----
 unoxml/source/dom/entity.cxx                                            |    4 
 unoxml/source/dom/entityreference.cxx                                   |    4 
 unoxml/source/dom/node.cxx                                              |   10 
 unoxml/source/dom/notation.cxx                                          |    4 
 unoxml/source/xpath/xpathapi.cxx                                        |   12 -
 vcl/source/components/dtranscomp.cxx                                    |    4 
 vcl/source/gdi/bitmapex.cxx                                             |   26 +-
 vcl/source/gdi/pdfwriter_impl.cxx                                       |    6 
 writerperfect/inc/ImportFilter.hxx                                      |    4 
 writerperfect/source/common/WPXSvInputStream.cxx                        |    8 
 writerperfect/source/writer/WordPerfectImportFilter.cxx                 |    4 
 xmloff/source/draw/sdxmlexp.cxx                                         |    8 
 xmloff/source/draw/shapeexport.cxx                                      |   66 +++---
 xmloff/source/draw/ximp3dobject.cxx                                     |    6 
 xmloff/source/draw/ximp3dscene.cxx                                      |   10 
 xmloff/source/style/XMLPageExport.cxx                                   |   14 -
 xmloff/source/style/styleexp.cxx                                        |    8 
 xmloff/source/table/XMLTableExport.cxx                                  |   18 -
 xmloff/source/text/txtparae.cxx                                         |   56 ++---
 113 files changed, 788 insertions(+), 757 deletions(-)

New commits:
commit 91adb929d747ef1434fb1732fdbf51283fda78e8
Author: Noel Grandin <noel at peralex.com>
Date:   Thu Apr 28 10:24:35 2016 +0200

    clang-tidy modernize-loop-convert in h-l/*
    
    Change-Id: I843528327b25d18476f8959cabba16371213a48a
    Reviewed-on: https://gerrit.libreoffice.org/24460
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/helpcompiler/source/HelpCompiler.cxx b/helpcompiler/source/HelpCompiler.cxx
index c25b69b..91458e0 100644
--- a/helpcompiler/source/HelpCompiler.cxx
+++ b/helpcompiler/source/HelpCompiler.cxx
@@ -460,9 +460,9 @@ bool HelpCompiler::compile()
     std::string title;
     // returns a clone of the document with switch-cases resolved
     std::string appl = module.substr(1);
-    for (size_t i = 0; i < appl.length(); ++i)
+    for (char & i : appl)
     {
-        appl[i]=toupper(appl[i]);
+        i=toupper(i);
     }
     xmlNodePtr docResolved = clone(xmlDocGetRootElement(docResolvedOrg), appl);
     myparser aparser(documentId, fileName, title);
diff --git a/helpcompiler/source/HelpLinker.cxx b/helpcompiler/source/HelpLinker.cxx
index 95821f1..dcf195b 100644
--- a/helpcompiler/source/HelpLinker.cxx
+++ b/helpcompiler/source/HelpLinker.cxx
@@ -210,9 +210,8 @@ namespace URLEncoder
         static const char hex[17] = "0123456789ABCDEF";
 
         std::string result;
-        for (size_t i=0; i < rIn.length(); ++i)
+        for (char c : rIn)
         {
-            unsigned char c = rIn[i];
             if (isalnum (c) || strchr (good, c))
                 result += c;
             else {
@@ -242,21 +241,21 @@ void HelpLinker::addBookmark( FILE* pFile_DBHelp, std::string thishid,
     std::vector<unsigned char> dataB(dataLen);
     size_t i = 0;
     dataB[i++] = static_cast<unsigned char>(fileLen);
-    for (size_t j = 0; j < fileB.length(); ++j)
-        dataB[i++] = static_cast<unsigned char>(fileB[j]);
+    for (char j : fileB)
+        dataB[i++] = static_cast<unsigned char>(j);
     if (!anchorB.empty())
     {
         dataB[i++] = '#';
-        for (size_t j = 0; j < anchorB.length(); ++j)
-            dataB[i++] = anchorB[j];
+        for (char j : anchorB)
+            dataB[i++] = j;
     }
     dataB[i++] = static_cast<unsigned char>(jarfileB.length());
-    for (size_t j = 0; j < jarfileB.length(); ++j)
-        dataB[i++] = jarfileB[j];
+    for (char j : jarfileB)
+        dataB[i++] = j;
 
     dataB[i++] = static_cast<unsigned char>(titleB.length());
-    for (size_t j = 0; j < titleB.length(); ++j)
-        dataB[i++] = titleB[j];
+    for (char j : titleB)
+        dataB[i++] = j;
 
     if( pFile_DBHelp != nullptr )
     {
diff --git a/hwpfilter/source/hinfo.cxx b/hwpfilter/source/hinfo.cxx
index 241ab2f..2e5d4b1 100644
--- a/hwpfilter/source/hinfo.cxx
+++ b/hwpfilter/source/hinfo.cxx
@@ -140,11 +140,11 @@ void HWPInfo::Read(HWPFile & hwpf)
     hwpf.Read1b(&fnchar, 1);
     hwpf.Read1b(&fnlinetype, 1);
 // border layout
-    for (int ii = 0; ii < 4; ++ii)
+    for (int & ii : bordermargin)
     {
         if (!hwpf.Read2b(tmp16))
             return;
-        bordermargin[ii] = tmp16;
+        ii = tmp16;
     }
     hwpf.Read2b(&borderline, 1);
 
@@ -217,13 +217,13 @@ void ParaShape::Read(HWPFile & hwpf)
 
     hwpf.Read1b(&condense, 1);
     hwpf.Read1b(&arrange_type, 1);
-    for (int ii = 0; ii < MAXTABS; ii++)
+    for (TabSet & tab : tabs)
     {
-        hwpf.Read1b(&tabs[ii].type, 1);
-        hwpf.Read1b(&tabs[ii].dot_continue, 1);
+        hwpf.Read1b(&tab.type, 1);
+        hwpf.Read1b(&tab.dot_continue, 1);
         if (!hwpf.Read2b(tmp16))
             return;
-        tabs[ii].position = tmp16;
+        tab.position = tmp16;
     }
     hwpf.Read1b(&coldef.ncols, 1);
     hwpf.Read1b(&coldef.separator, 1);
diff --git a/i18npool/source/breakiterator/breakiteratorImpl.cxx b/i18npool/source/breakiterator/breakiteratorImpl.cxx
index 7fa79cf..33ac586 100644
--- a/i18npool/source/breakiterator/breakiteratorImpl.cxx
+++ b/i18npool/source/breakiterator/breakiteratorImpl.cxx
@@ -39,8 +39,8 @@ BreakIteratorImpl::BreakIteratorImpl()
 BreakIteratorImpl::~BreakIteratorImpl()
 {
     // Clear lookuptable
-    for (size_t l = 0; l < lookupTable.size(); l++)
-        delete lookupTable[l];
+    for (lookupTableItem* p : lookupTable)
+        delete p;
     lookupTable.clear();
 }
 
@@ -526,8 +526,7 @@ sal_Int16  BreakIteratorImpl::getScriptClass(sal_uInt32 currentChar)
 bool SAL_CALL BreakIteratorImpl::createLocaleSpecificBreakIterator(const OUString& aLocaleName) throw( RuntimeException )
 {
     // to share service between same Language but different Country code, like zh_CN and zh_TW
-    for (size_t l = 0; l < lookupTable.size(); l++) {
-        lookupTableItem *listItem = lookupTable[l];
+    for (lookupTableItem* listItem : lookupTable) {
         if (aLocaleName == listItem->aLocale.Language) {
             xBI = listItem->xBI;
             return true;
@@ -555,8 +554,7 @@ BreakIteratorImpl::getLocaleSpecificBreakIterator(const Locale& rLocale) throw (
     else if (m_xContext.is()) {
         aLocale = rLocale;
 
-        for (size_t i = 0; i < lookupTable.size(); i++) {
-            lookupTableItem *listItem = lookupTable[i];
+        for (lookupTableItem* listItem : lookupTable) {
             if (rLocale == listItem->aLocale)
                 return xBI = listItem->xBI;
         }
diff --git a/i18npool/source/breakiterator/breakiterator_unicode.cxx b/i18npool/source/breakiterator/breakiterator_unicode.cxx
index f061d11..8707dd45 100644
--- a/i18npool/source/breakiterator/breakiterator_unicode.cxx
+++ b/i18npool/source/breakiterator/breakiterator_unicode.cxx
@@ -52,8 +52,8 @@ BreakIterator_Unicode::~BreakIterator_Unicode()
     delete character.aBreakIterator;
     delete sentence.aBreakIterator;
     delete line.aBreakIterator;
-    for (size_t i = 0; i < SAL_N_ELEMENTS(words); i++)
-        delete words[i].aBreakIterator;
+    for (BI_Data & word : words)
+        delete word.aBreakIterator;
 }
 
 /*
diff --git a/i18npool/source/breakiterator/xdictionary.cxx b/i18npool/source/breakiterator/xdictionary.cxx
index 536b67e..551ce85 100644
--- a/i18npool/source/breakiterator/xdictionary.cxx
+++ b/i18npool/source/breakiterator/xdictionary.cxx
@@ -115,18 +115,18 @@ xdictionary::xdictionary(const sal_Char *lang) :
 
 #endif
 
-    for (sal_Int32 i = 0; i < CACHE_MAX; i++)
-        cache[i].size = 0;
+    for (WordBreakCache & i : cache)
+        i.size = 0;
 
     japaneseWordBreak = false;
 }
 
 xdictionary::~xdictionary()
 {
-    for (sal_Int32 i = 0; i < CACHE_MAX; i++) {
-        if (cache[i].size > 0) {
-            delete [] cache[i].contents;
-            delete [] cache[i].wordboundary;
+    for (WordBreakCache & i : cache) {
+        if (i.size > 0) {
+            delete [] i.contents;
+            delete [] i.wordboundary;
         }
     }
 }
@@ -147,11 +147,11 @@ void xdictionary::initDictionaryData(const sal_Char *pLang)
     static std::vector< datacache > aLoadedCache;
 
     osl::MutexGuard aGuard( osl::Mutex::getGlobalMutex() );
-    for( size_t i = 0; i < aLoadedCache.size(); ++i )
+    for(datacache & i : aLoadedCache)
     {
-        if( !strcmp( pLang, aLoadedCache[ i ].maLang.getStr() ) )
+        if( !strcmp( pLang, i.maLang.getStr() ) )
         {
-            data = aLoadedCache[ i ].maData;
+            data = i.maData;
             return;
         }
     }
diff --git a/i18npool/source/calendar/calendarImpl.cxx b/i18npool/source/calendar/calendarImpl.cxx
index 67a82db..48c4ad2 100644
--- a/i18npool/source/calendar/calendarImpl.cxx
+++ b/i18npool/source/calendar/calendarImpl.cxx
@@ -36,8 +36,8 @@ CalendarImpl::CalendarImpl(const Reference< XComponentContext > &rxContext) : m_
 CalendarImpl::~CalendarImpl()
 {
     // Clear lookuptable
-    for (size_t l = 0; l < lookupTable.size(); l++)
-        delete lookupTable[l];
+    for (lookupTableItem* p : lookupTable)
+        delete p;
     lookupTable.clear();
 }
 
diff --git a/i18npool/source/characterclassification/characterclassificationImpl.cxx b/i18npool/source/characterclassification/characterclassificationImpl.cxx
index be40da7..41aa591 100644
--- a/i18npool/source/characterclassification/characterclassificationImpl.cxx
+++ b/i18npool/source/characterclassification/characterclassificationImpl.cxx
@@ -36,8 +36,8 @@ CharacterClassificationImpl::CharacterClassificationImpl(
 
 CharacterClassificationImpl::~CharacterClassificationImpl() {
         // Clear lookuptable
-        for (size_t l = 0; l < lookupTable.size(); l++)
-            delete lookupTable[l];
+        for (lookupTableItem* p : lookupTable)
+            delete p;
         lookupTable.clear();
 }
 
@@ -160,8 +160,8 @@ CharacterClassificationImpl::getLocaleSpecificCharacterClassification(const Loca
     if (cachedItem && cachedItem->equals(rLocale))
         return cachedItem->xCI;
     else {
-        for (size_t i = 0; i < lookupTable.size(); i++) {
-            cachedItem = lookupTable[i];
+        for (lookupTableItem* i : lookupTable) {
+            cachedItem = i;
             if (cachedItem->equals(rLocale))
                 return cachedItem->xCI;
         }
diff --git a/i18npool/source/collator/collatorImpl.cxx b/i18npool/source/collator/collatorImpl.cxx
index 874e346..8b4919a 100644
--- a/i18npool/source/collator/collatorImpl.cxx
+++ b/i18npool/source/collator/collatorImpl.cxx
@@ -40,8 +40,8 @@ CollatorImpl::CollatorImpl( const Reference < XComponentContext >& rxContext ) :
 CollatorImpl::~CollatorImpl()
 {
     // Clear lookuptable
-    for (size_t l = 0; l < lookupTable.size(); l++)
-        delete lookupTable[l];
+    for (lookupTableItem* p : lookupTable)
+        delete p;
     lookupTable.clear();
 }
 
@@ -170,8 +170,8 @@ void SAL_CALL
 CollatorImpl::loadCachedCollator(const lang::Locale& rLocale, const OUString& rSortAlgorithm)
     throw(RuntimeException)
 {
-    for (size_t i = 0; i < lookupTable.size(); i++) {
-        cachedItem = lookupTable[i];
+    for (lookupTableItem* i : lookupTable) {
+        cachedItem = i;
         if (cachedItem->equals(rLocale, rSortAlgorithm)) {
             return;
         }
diff --git a/i18npool/source/inputchecker/inputsequencechecker.cxx b/i18npool/source/inputchecker/inputsequencechecker.cxx
index b1e71c1..69c8525 100644
--- a/i18npool/source/inputchecker/inputsequencechecker.cxx
+++ b/i18npool/source/inputchecker/inputsequencechecker.cxx
@@ -43,8 +43,8 @@ InputSequenceCheckerImpl::InputSequenceCheckerImpl(const char *pServiceName)
 InputSequenceCheckerImpl::~InputSequenceCheckerImpl()
 {
     // Clear lookuptable
-    for (size_t l = 0; l < lookupTable.size(); l++)
-        delete lookupTable[l];
+    for (lookupTableItem* p : lookupTable)
+        delete p;
 
     lookupTable.clear();
 }
@@ -111,8 +111,8 @@ InputSequenceCheckerImpl::getInputSequenceChecker(sal_Char* rLanguage) throw (Ru
         return cachedItem->xISC;
     }
     else {
-        for (size_t l = 0; l < lookupTable.size(); l++) {
-            cachedItem = lookupTable[l];
+        for (lookupTableItem* l : lookupTable) {
+            cachedItem = l;
             if (cachedItem->aLanguage == rLanguage)
                 return cachedItem->xISC;
         }
diff --git a/i18npool/source/localedata/localedata.cxx b/i18npool/source/localedata/localedata.cxx
index d8f5ed0..bfb59aa 100644
--- a/i18npool/source/localedata/localedata.cxx
+++ b/i18npool/source/localedata/localedata.cxx
@@ -484,26 +484,25 @@ oslGenericFunction SAL_CALL lcl_LookupTableHelper::getFunctionSymbolByName(
             aFallback = LocaleDataImpl::getFirstLocaleServiceName( aFbLocale);
     }
 
-    for ( sal_Int16 i = 0; i < nbOfLocales; i++)
+    for (const auto & i : aLibTable)
     {
-        if (localeName.equalsAscii(aLibTable[i].pLocale) ||
-                (bFallback && aFallback.equalsAscii(aLibTable[i].pLocale)))
+        if (localeName.equalsAscii(i.pLocale) ||
+                (bFallback && aFallback.equalsAscii(i.pLocale)))
         {
 #ifndef DISABLE_DYNLOADING
             OUStringBuffer aBuf(sal::static_int_cast<int>(
-                        strlen(aLibTable[i].pLocale) + 1 + strlen(pFunction)));
+                        strlen(i.pLocale) + 1 + strlen(pFunction)));
             {
                 ::osl::MutexGuard aGuard( maMutex );
-                for (size_t l = 0; l < maLookupTable.size(); l++)
+                for (LocaleDataLookupTableItem* pCurrent : maLookupTable)
                 {
-                    LocaleDataLookupTableItem* pCurrent = maLookupTable[l];
-                    if (pCurrent->dllName == aLibTable[i].pLib)
+                    if (pCurrent->dllName == i.pLib)
                     {
                         OSL_ASSERT( pOutCachedItem );
                         if( pOutCachedItem )
                         {
                             (*pOutCachedItem) = new LocaleDataLookupTableItem( *pCurrent );
-                            (*pOutCachedItem)->localeName = aLibTable[i].pLocale;
+                            (*pOutCachedItem)->localeName = i.pLocale;
                             return (*pOutCachedItem)->module->getFunctionSymbol(
                                     aBuf.appendAscii( pFunction).append( cUnder).
                                     appendAscii( (*pOutCachedItem)->localeName).makeStringAndClear());
@@ -515,17 +514,17 @@ oslGenericFunction SAL_CALL lcl_LookupTableHelper::getFunctionSymbolByName(
             }
             // Library not loaded, load it and add it to the list.
 #ifdef SAL_DLLPREFIX
-            aBuf.ensureCapacity(strlen(aLibTable[i].pLib) + 6);    // mostly "lib*.so"
-            aBuf.append( SAL_DLLPREFIX ).appendAscii(aLibTable[i].pLib).append( SAL_DLLEXTENSION );
+            aBuf.ensureCapacity(strlen(i.pLib) + 6);    // mostly "lib*.so"
+            aBuf.append( SAL_DLLPREFIX ).appendAscii(i.pLib).append( SAL_DLLEXTENSION );
 #else
-            aBuf.ensureCapacity(strlen(aLibTable[i].pLib) + 4);    // mostly "*.dll"
-            aBuf.appendAscii(aLibTable[i].pLib).appendAscii( SAL_DLLEXTENSION );
+            aBuf.ensureCapacity(strlen(i.pLib) + 4);    // mostly "*.dll"
+            aBuf.appendAscii(i.pLib).appendAscii( SAL_DLLEXTENSION );
 #endif
             osl::Module *module = new osl::Module();
             if ( module->loadRelative(&thisModule, aBuf.makeStringAndClear()) )
             {
                 ::osl::MutexGuard aGuard( maMutex );
-                LocaleDataLookupTableItem* pNewItem = new LocaleDataLookupTableItem(aLibTable[i].pLib, module, aLibTable[i].pLocale);
+                LocaleDataLookupTableItem* pNewItem = new LocaleDataLookupTableItem(i.pLib, module, i.pLocale);
                 maLookupTable.push_back(pNewItem);
                 OSL_ASSERT( pOutCachedItem );
                 if( pOutCachedItem )
@@ -844,15 +843,15 @@ LocaleDataImpl::getAllFormats( const Locale& rLocale ) throw(RuntimeException, s
 
     Sequence< FormatElement > seq(formatCount);
     sal_Int32 f = 0;
-    for (int s = 0; s < SECTIONS; ++s)
+    for (FormatSection & s : section)
     {
-        sal_Unicode const * const * const formatArray = section[s].formatArray;
+        sal_Unicode const * const * const formatArray = s.formatArray;
         if ( formatArray )
         {
-            for (int i = 0, nOff = 0; i < section[s].formatCount; ++i, nOff += 7, ++f)
+            for (int i = 0, nOff = 0; i < s.formatCount; ++i, nOff += 7, ++f)
             {
                 FormatElement elem(
-                        OUString(formatArray[nOff]).replaceAll(section[s].from, section[s].to),
+                        OUString(formatArray[nOff]).replaceAll(s.from, s.to),
                         formatArray[nOff + 1],
                         formatArray[nOff + 2],
                         formatArray[nOff + 3],
@@ -1468,8 +1467,8 @@ LocaleDataImpl::getAllInstalledLocaleNames() throw(RuntimeException, std::except
     Sequence< lang::Locale > seq( nbOfLocales );
     sal_Int16 nInstalled = 0;
 
-    for( sal_Int16 i=0; i<nbOfLocales; i++ ) {
-        OUString name = OUString::createFromAscii( aLibTable[i].pLocale );
+    for(const auto & i : aLibTable) {
+        OUString name = OUString::createFromAscii( i.pLocale );
 
         // Check if the locale is really available and not just in the table,
         // don't allow fall backs.
diff --git a/i18npool/source/nativenumber/nativenumbersupplier.cxx b/i18npool/source/nativenumber/nativenumbersupplier.cxx
index 2d7b254..6aa76d6 100644
--- a/i18npool/source/nativenumber/nativenumbersupplier.cxx
+++ b/i18npool/source/nativenumber/nativenumbersupplier.cxx
@@ -615,9 +615,9 @@ OUString SAL_CALL NativeNumberSupplierService::getNativeNumberString(const OUStr
 sal_Unicode SAL_CALL NativeNumberSupplierService::getNativeNumberChar( const sal_Unicode inChar, const Locale& rLocale, sal_Int16 nNativeNumberMode ) throw(css::uno::RuntimeException)
 {
     if (nNativeNumberMode == NativeNumberMode::NATNUM0) { // Ascii
-        for (sal_Int16 i = 0; i < NumberChar_Count; i++)
+        for (const auto & i : NumberChar)
             for (sal_Int16 j = 0; j < 10; j++)
-                if (inChar == NumberChar[i][j])
+                if (inChar == i[j])
                     return j;
         return inChar;
     }
diff --git a/i18nutil/source/utility/oneToOneMapping.cxx b/i18nutil/source/utility/oneToOneMapping.cxx
index 10d4a0a..bef181b 100644
--- a/i18nutil/source/utility/oneToOneMapping.cxx
+++ b/i18nutil/source/utility/oneToOneMapping.cxx
@@ -69,8 +69,8 @@ oneToOneMappingWithFlag::~oneToOneMappingWithFlag()
 {
     if( mbHasIndex )
     {
-        for (size_t i = 0; i < SAL_N_ELEMENTS(mpIndex); ++i)
-            delete [] mpIndex[i];
+        for (UnicodePairWithFlag** i : mpIndex)
+            delete [] i;
     }
 }
 
@@ -80,8 +80,8 @@ void oneToOneMappingWithFlag::makeIndex()
     {
         int current = -1;
 
-        for (size_t i = 0; i < SAL_N_ELEMENTS(mpIndex); ++i)
-            mpIndex[i] = nullptr;
+        for (UnicodePairWithFlag**& i : mpIndex)
+            i = nullptr;
 
         for( size_t k = 0; k < mnSize; k++ )
         {
diff --git a/linguistic/source/dicimp.cxx b/linguistic/source/dicimp.cxx
index 2df71c0..80e424d 100644
--- a/linguistic/source/dicimp.cxx
+++ b/linguistic/source/dicimp.cxx
@@ -470,9 +470,9 @@ sal_uLong DictionaryNeo::saveEntries(const OUString &rURL)
     pStream->WriteLine(OString("---"));
     if (0 != (nErr = pStream->GetError()))
         return nErr;
-    for (size_t i = 0;  i < aEntries.size();  i++)
+    for (Reference<XDictionaryEntry> & aEntrie : aEntries)
     {
-        OString aOutStr = formatForSave(aEntries[i], eEnc);
+        OString aOutStr = formatForSave(aEntrie, eEnc);
         pStream->WriteLine (aOutStr);
         if (0 != (nErr = pStream->GetError()))
             break;
diff --git a/linguistic/source/dlistimp.cxx b/linguistic/source/dlistimp.cxx
index 0bf680b..bba17f9 100644
--- a/linguistic/source/dlistimp.cxx
+++ b/linguistic/source/dlistimp.cxx
@@ -626,10 +626,10 @@ void DicList::CreateDicList()
     // look for dictionaries
     const OUString aWriteablePath( GetDictionaryWriteablePath() );
     std::vector< OUString > aPaths( GetDictionaryPaths() );
-    for (size_t i = 0;  i < aPaths.size();  ++i)
+    for (OUString & aPath : aPaths)
     {
-        const bool bIsWriteablePath = (aPaths[i] == aWriteablePath);
-        SearchForDictionaries( aDicList, aPaths[i], bIsWriteablePath );
+        const bool bIsWriteablePath = (aPath == aWriteablePath);
+        SearchForDictionaries( aDicList, aPath, bIsWriteablePath );
     }
 
     // create IgnoreAllList dictionary with empty URL (non persistent)
diff --git a/linguistic/source/iprcache.cxx b/linguistic/source/iprcache.cxx
index e5b38c0..fbcbb44 100644
--- a/linguistic/source/iprcache.cxx
+++ b/linguistic/source/iprcache.cxx
@@ -63,10 +63,10 @@ static void lcl_AddAsPropertyChangeListener(
 {
     if (xListener.is() && rPropSet.is())
     {
-        for (int i = 0;  i < NUM_FLUSH_PROPS;  ++i)
+        for (auto& aFlushPropertie : aFlushProperties)
         {
             rPropSet->addPropertyChangeListener(
-                    OUString::createFromAscii(aFlushProperties[i].pPropName), xListener );
+                    OUString::createFromAscii(aFlushPropertie.pPropName), xListener );
         }
     }
 }
@@ -78,10 +78,10 @@ static void lcl_RemoveAsPropertyChangeListener(
 {
     if (xListener.is() && rPropSet.is())
     {
-        for (int i = 0;  i < NUM_FLUSH_PROPS;  ++i)
+        for (auto& aFlushPropertie : aFlushProperties)
         {
             rPropSet->removePropertyChangeListener(
-                    OUString::createFromAscii(aFlushProperties[i].pPropName), xListener );
+                    OUString::createFromAscii(aFlushPropertie.pPropName), xListener );
         }
     }
 }
diff --git a/linguistic/source/misc.cxx b/linguistic/source/misc.cxx
index 4cb427d..1edcdf1 100644
--- a/linguistic/source/misc.cxx
+++ b/linguistic/source/misc.cxx
@@ -680,16 +680,14 @@ static const sal_uInt32 the_aDigitZeroes [] =
 
 bool HasDigits( const OUString &rText )
 {
-    static const int nNumDigitZeroes = SAL_N_ELEMENTS(the_aDigitZeroes);
     const sal_Int32 nLen = rText.getLength();
 
     sal_Int32 i = 0;
     while (i < nLen) // for all characters ...
     {
         const sal_uInt32 nCodePoint = rText.iterateCodePoints( &i );    // handle unicode surrogates correctly...
-        for (int j = 0; j < nNumDigitZeroes; ++j)   // ... check in all 0..9 ranges
+        for (unsigned int nDigitZero : the_aDigitZeroes)   // ... check in all 0..9 ranges
         {
-            sal_uInt32 nDigitZero = the_aDigitZeroes[ j ];
             if (nDigitZero > nCodePoint)
                 break;
             if (/*nDigitZero <= nCodePoint &&*/ nCodePoint <= nDigitZero + 9)
diff --git a/lotuswordpro/source/filter/lwpdrawobj.cxx b/lotuswordpro/source/filter/lwpdrawobj.cxx
index 82e1fc5..cab4dd2 100644
--- a/lotuswordpro/source/filter/lwpdrawobj.cxx
+++ b/lotuswordpro/source/filter/lwpdrawobj.cxx
@@ -835,10 +835,10 @@ void LwpDrawEllipse::Read()
 {
     ReadClosedObjStyle();
 
-    for (sal_uInt8 nC = 0; nC < 13; nC++)
+    for (SdwPoint & nC : m_aVector)
     {
-        m_pStream->ReadInt16( m_aVector[nC].x );
-        m_pStream->ReadInt16( m_aVector[nC].y );
+        m_pStream->ReadInt16( nC.x );
+        m_pStream->ReadInt16( nC.y );
     }
 }
 
@@ -914,10 +914,10 @@ void LwpDrawArc::Read()
     m_pStream->ReadUChar( m_aArcRec.aPenColor.unused );
     m_pStream->ReadUChar( m_aArcRec.nLineEnd );
 
-    for (sal_uInt8 nC = 0; nC < 4; nC++)
+    for (SdwPoint & nC : m_aVector)
     {
-        m_pStream->ReadInt16( m_aVector[nC].x );
-        m_pStream->ReadInt16( m_aVector[nC].y );
+        m_pStream->ReadInt16( nC.x );
+        m_pStream->ReadInt16( nC.y );
     }
 }
 
@@ -1194,10 +1194,10 @@ void LwpDrawTextArt::CreateFWPath(XFDrawPath* pPath)
 
 void LwpDrawTextArt::Read()
 {
-    for (sal_uInt8 nC = 0; nC < 4; nC++)
+    for (SdwPoint & nC : m_aVector)
     {
-        m_pStream->ReadInt16( m_aVector[nC].x );
-        m_pStream->ReadInt16( m_aVector[nC].y );
+        m_pStream->ReadInt16( nC.x );
+        m_pStream->ReadInt16( nC.y );
     }
 
     ReadClosedObjStyle();
diff --git a/lotuswordpro/source/filter/lwplayout.cxx b/lotuswordpro/source/filter/lwplayout.cxx
index c70153c..3e80d8a 100644
--- a/lotuswordpro/source/filter/lwplayout.cxx
+++ b/lotuswordpro/source/filter/lwplayout.cxx
@@ -826,11 +826,11 @@ XFBorders* LwpMiddleLayout::GetXFBorders()
         LwpBorderStuff::BorderType pType[] = { LwpBorderStuff::LEFT, LwpBorderStuff::RIGHT,
             LwpBorderStuff::TOP, LwpBorderStuff::BOTTOM };
 
-        for (sal_uInt8 nC = 0; nC < 4; nC++)
+        for (LwpBorderStuff::BorderType & nC : pType)
         {
-            if (pBorderStuff->HasSide(pType[nC]))
+            if (pBorderStuff->HasSide(nC))
             {
-                LwpParaStyle::ApplySubBorder(pBorderStuff, pType[nC], pXFBorders);
+                LwpParaStyle::ApplySubBorder(pBorderStuff, nC, pXFBorders);
             }
         }
         return pXFBorders;
diff --git a/lotuswordpro/source/filter/lwprowlayout.cxx b/lotuswordpro/source/filter/lwprowlayout.cxx
index 906c09c..a936f0e 100644
--- a/lotuswordpro/source/filter/lwprowlayout.cxx
+++ b/lotuswordpro/source/filter/lwprowlayout.cxx
@@ -445,10 +445,8 @@ void LwpRowLayout::CollectMergeInfo()
  */
 void LwpRowLayout::SetCellSplit(sal_uInt16 nEffectRows)
 {
-    LwpConnectedCellLayout* pConnCell;
-    for (size_t i=0; i<m_ConnCellList.size(); i++)
+    for (LwpConnectedCellLayout* pConnCell : m_ConnCellList)
     {
-        pConnCell = m_ConnCellList[i];
         sal_uInt16 nRowSpan = pConnCell->GetRowID()+pConnCell->GetNumrows();
         if ( nRowSpan > nEffectRows )
         {
diff --git a/lotuswordpro/source/filter/lwpsortopt.cxx b/lotuswordpro/source/filter/lwpsortopt.cxx
index 886bac5..e740ec9 100644
--- a/lotuswordpro/source/filter/lwpsortopt.cxx
+++ b/lotuswordpro/source/filter/lwpsortopt.cxx
@@ -79,9 +79,9 @@ void LwpSortOption::Read(LwpObjectStream *pStrm)
     m_nCount = pStrm->QuickReaduInt16();
     m_nFlags = pStrm->QuickReaduInt16();
     m_nText = pStrm->QuickReaduInt8();
-    for(sal_uInt8 i=0; i<3; i++)
+    for(LwpSortKey & key : m_Keys)
     {
-        m_Keys[i].Read(pStrm);
+        key.Read(pStrm);
     }
     pStrm->SkipExtra();
 }
diff --git a/lotuswordpro/source/filter/xfilter/xfliststyle.cxx b/lotuswordpro/source/filter/xfilter/xfliststyle.cxx
index 7f7e868..b989875 100644
--- a/lotuswordpro/source/filter/xfilter/xfliststyle.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfliststyle.cxx
@@ -209,10 +209,9 @@ XFListStyle& XFListStyle::operator=(const XFListStyle& other)
 
 XFListStyle::~XFListStyle()
 {
-    for( int i=0; i<10; i++ )
+    for(XFListLevel* p : m_pListLevels)
     {
-        if( m_pListLevels[i] )
-            delete m_pListLevels[i];
+        delete p;
     }
 }
 
@@ -318,9 +317,8 @@ void XFListStyle::ToXml(IXFStream *pStrm)
         pAttrList->AddAttribute("style:parent-style-name",GetParentStyleName());
     pStrm->StartElement( "text:list-style" );
 
-    for( int i=0; i<10; i++ )
+    for(XFListLevel* pLevel : m_pListLevels)
     {
-        XFListLevel *pLevel = m_pListLevels[i];
         if( pLevel )
             pLevel->ToXml(pStrm);
     }
commit 43b4903db3e925c652e25c34362490f8adc9c5ec
Author: Noel Grandin <noel at peralex.com>
Date:   Wed Apr 27 09:22:13 2016 +0200

    teach stylepolice plugin about ref-counted-pointer naming
    
    Change-Id: I6e91d22fc1826038c05ddb6fc065563c6a250752
    Reviewed-on: https://gerrit.libreoffice.org/24459
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/canvas/source/vcl/canvasbitmaphelper.cxx b/canvas/source/vcl/canvasbitmaphelper.cxx
index 6f5340f..3f388e1 100644
--- a/canvas/source/vcl/canvasbitmaphelper.cxx
+++ b/canvas/source/vcl/canvasbitmaphelper.cxx
@@ -533,11 +533,11 @@ namespace vclcanvas
         if( !mpOutDev.get() )
             return rendering::IntegerBitmapLayout(); // we're disposed
 
-        rendering::IntegerBitmapLayout xBitmapLayout( ::canvas::tools::getStdMemoryLayout(getSize()) );
+        rendering::IntegerBitmapLayout aBitmapLayout( ::canvas::tools::getStdMemoryLayout(getSize()) );
         if ( !hasAlpha() )
-            xBitmapLayout.ColorSpace = canvas::tools::getStdColorSpaceWithoutAlpha();
+            aBitmapLayout.ColorSpace = canvas::tools::getStdColorSpaceWithoutAlpha();
 
-        return xBitmapLayout;
+        return aBitmapLayout;
     }
 
     BitmapEx CanvasBitmapHelper::getBitmap() const
diff --git a/canvas/source/vcl/canvashelper.cxx b/canvas/source/vcl/canvashelper.cxx
index b294b73..79785aa1 100644
--- a/canvas/source/vcl/canvashelper.cxx
+++ b/canvas/source/vcl/canvashelper.cxx
@@ -1190,11 +1190,11 @@ namespace vclcanvas
         if( !mpOutDev.get() )
             return rendering::IntegerBitmapLayout(); // we're disposed
 
-        rendering::IntegerBitmapLayout xBitmapLayout( ::canvas::tools::getStdMemoryLayout(getSize()) );
+        rendering::IntegerBitmapLayout aBitmapLayout( ::canvas::tools::getStdMemoryLayout(getSize()) );
         if ( !mbHaveAlpha )
-            xBitmapLayout.ColorSpace = canvas::tools::getStdColorSpaceWithoutAlpha();
+            aBitmapLayout.ColorSpace = canvas::tools::getStdColorSpaceWithoutAlpha();
 
-        return xBitmapLayout;
+        return aBitmapLayout;
     }
 
     int CanvasHelper::setupOutDevState( const rendering::ViewState&     viewState,
diff --git a/chart2/source/controller/sidebar/ChartAreaPanel.cxx b/chart2/source/controller/sidebar/ChartAreaPanel.cxx
index 389120b..85c9ec2 100644
--- a/chart2/source/controller/sidebar/ChartAreaPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartAreaPanel.cxx
@@ -413,8 +413,8 @@ void ChartAreaPanel::updateData()
     {
        OUString aGradientName;
        xPropSet->getPropertyValue("FillGradientName") >>= aGradientName;
-       XGradient xGradient = getXGradientForName(mxModel, aGradientName);
-       XFillGradientItem aGradientItem(aGradientName, xGradient);
+       XGradient aGradient = getXGradientForName(mxModel, aGradientName);
+       XFillGradientItem aGradientItem(aGradientName, aGradient);
        updateFillGradient(false, true, &aGradientItem);
     }
 
@@ -422,8 +422,8 @@ void ChartAreaPanel::updateData()
     {
         OUString aHatchName;
         xPropSet->getPropertyValue("FillHatchName") >>= aHatchName;
-        XHatch xHatch = getXHatchFromName(mxModel, aHatchName);
-        XFillHatchItem aHatchItem(aHatchName, xHatch);
+        XHatch aHatch = getXHatchFromName(mxModel, aHatchName);
+        XFillHatchItem aHatchItem(aHatchName, aHatch);
         updateFillHatch(false, true, &aHatchItem);
     }
 
@@ -431,8 +431,8 @@ void ChartAreaPanel::updateData()
     {
         OUString aBitmapName;
         xPropSet->getPropertyValue("FillBitmapName") >>= aBitmapName;
-        GraphicObject xBitmap = getXBitmapFromName(mxModel, aBitmapName);
-        XFillBitmapItem aBitmapItem(aBitmapName, xBitmap);
+        GraphicObject aBitmap = getXBitmapFromName(mxModel, aBitmapName);
+        XFillBitmapItem aBitmapItem(aBitmapName, aBitmap);
         XFillBitmapItem* pBitmapItem = nullptr;
         DrawModelWrapper* pModelWrapper = nullptr;
         try
diff --git a/chart2/source/inc/CloneHelper.hxx b/chart2/source/inc/CloneHelper.hxx
index 7f01b04..dfe5823 100644
--- a/chart2/source/inc/CloneHelper.hxx
+++ b/chart2/source/inc/CloneHelper.hxx
@@ -35,9 +35,9 @@ namespace CloneHelper
 template< class Interface >
     struct CreateRefClone : public ::std::unary_function< Interface, Interface >
 {
-    Interface operator() ( const Interface & xOther )
+    css::uno::Reference<Interface> operator() ( const css::uno::Reference<Interface> & xOther )
     {
-        Interface xResult;
+        css::uno::Reference<Interface> xResult;
         css::uno::Reference< css::util::XCloneable >
               xCloneable( xOther, css::uno::UNO_QUERY );
         if( xCloneable.is())
@@ -50,8 +50,8 @@ template< class Interface >
 /// clones a vector of UNO-References
 template< class Interface >
     void CloneRefVector(
-        const ::std::vector< Interface > & rSource,
-        ::std::vector< Interface > & rDestination )
+        const ::std::vector< css::uno::Reference< Interface > > & rSource,
+        ::std::vector< css::uno::Reference< Interface > > & rDestination )
 {
     ::std::transform( rSource.begin(), rSource.end(),
                       ::std::back_inserter( rDestination ),
@@ -61,8 +61,8 @@ template< class Interface >
 /// clones a UNO-sequence of UNO-References
 template< class Interface >
     void CloneRefSequence(
-        const css::uno::Sequence< Interface > & rSource,
-        css::uno::Sequence< Interface > & rDestination )
+        const css::uno::Sequence< css::uno::Reference<Interface> > & rSource,
+        css::uno::Sequence< css::uno::Reference<Interface> > & rDestination )
 {
     rDestination.realloc( rSource.getLength());
     ::std::transform( rSource.getConstArray(), rSource.getConstArray() + rSource.getLength(),
diff --git a/chart2/source/model/main/Axis.cxx b/chart2/source/model/main/Axis.cxx
index df943dc..5f97ee4 100644
--- a/chart2/source/model/main/Axis.cxx
+++ b/chart2/source/model/main/Axis.cxx
@@ -371,7 +371,7 @@ Axis::Axis( const Axis & rOther ) :
     m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder()),
     m_aScaleData( rOther.m_aScaleData )
 {
-    m_xGrid.set( CloneHelper::CreateRefClone< Reference< beans::XPropertySet > >()( rOther.m_xGrid ));
+    m_xGrid.set( CloneHelper::CreateRefClone< beans::XPropertySet >()( rOther.m_xGrid ));
     if( m_xGrid.is())
         ModifyListenerHelper::addListener( m_xGrid, m_xModifyEventForwarder );
 
@@ -382,7 +382,7 @@ Axis::Axis( const Axis & rOther ) :
         lcl_CloneSubGrids( rOther.m_aSubGridProperties, m_aSubGridProperties );
     ModifyListenerHelper::addListenerToAllSequenceElements( m_aSubGridProperties, m_xModifyEventForwarder );
 
-    m_xTitle.set( CloneHelper::CreateRefClone< Reference< chart2::XTitle > >()( rOther.m_xTitle ));
+    m_xTitle.set( CloneHelper::CreateRefClone< chart2::XTitle >()( rOther.m_xTitle ));
     if( m_xTitle.is())
         ModifyListenerHelper::addListener( m_xTitle, m_xModifyEventForwarder );
 }
diff --git a/chart2/source/model/main/BaseCoordinateSystem.cxx b/chart2/source/model/main/BaseCoordinateSystem.cxx
index 755cadf..d3eeedf 100644
--- a/chart2/source/model/main/BaseCoordinateSystem.cxx
+++ b/chart2/source/model/main/BaseCoordinateSystem.cxx
@@ -172,8 +172,8 @@ BaseCoordinateSystem::BaseCoordinateSystem(
     m_aAllAxis.resize(rSource.m_aAllAxis.size());
     tAxisVecVecType::size_type nN=0;
     for( nN=0; nN<m_aAllAxis.size(); nN++ )
-        CloneHelper::CloneRefVector< Reference< chart2::XAxis > >( rSource.m_aAllAxis[nN], m_aAllAxis[nN] );
-    CloneHelper::CloneRefVector< Reference< chart2::XChartType > >( rSource.m_aChartTypes, m_aChartTypes );
+        CloneHelper::CloneRefVector<chart2::XAxis>( rSource.m_aAllAxis[nN], m_aAllAxis[nN] );
+    CloneHelper::CloneRefVector<chart2::XChartType>( rSource.m_aChartTypes, m_aChartTypes );
 
     for( nN=0; nN<m_aAllAxis.size(); nN++ )
         ModifyListenerHelper::addListenerToAllElements( m_aAllAxis[nN], m_xModifyEventForwarder );
diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx
index 2228337..48ec543 100644
--- a/chart2/source/model/main/ChartModel.cxx
+++ b/chart2/source/model/main/ChartModel.cxx
@@ -168,11 +168,11 @@ ChartModel::ChartModel( const ChartModel & rOther )
         m_xOldModelAgg->setDelegator( *this );
 
         Reference< util::XModifyListener > xListener;
-        Reference< chart2::XTitle > xNewTitle = CreateRefClone< Reference< chart2::XTitle > >()( rOther.m_xTitle );
-        Reference< chart2::XDiagram > xNewDiagram = CreateRefClone< Reference< chart2::XDiagram > >()( rOther.m_xDiagram );
-        Reference< beans::XPropertySet > xNewPageBackground = CreateRefClone< Reference< beans::XPropertySet > >()( rOther.m_xPageBackground );
-        Reference< chart2::XChartTypeManager > xChartTypeManager = CreateRefClone< Reference< chart2::XChartTypeManager > >()( rOther.m_xChartTypeManager );
-        Reference< container::XNameAccess > xXMLNamespaceMap = CreateRefClone< Reference< container::XNameAccess > >()( rOther.m_xXMLNamespaceMap );
+        Reference< chart2::XTitle > xNewTitle = CreateRefClone< chart2::XTitle >()( rOther.m_xTitle );
+        Reference< chart2::XDiagram > xNewDiagram = CreateRefClone< chart2::XDiagram >()( rOther.m_xDiagram );
+        Reference< beans::XPropertySet > xNewPageBackground = CreateRefClone< beans::XPropertySet >()( rOther.m_xPageBackground );
+        Reference< chart2::XChartTypeManager > xChartTypeManager = CreateRefClone< chart2::XChartTypeManager >()( rOther.m_xChartTypeManager );
+        Reference< container::XNameAccess > xXMLNamespaceMap = CreateRefClone< container::XNameAccess >()( rOther.m_xXMLNamespaceMap );
 
         {
             MutexGuard aGuard( m_aModelMutex );
diff --git a/chart2/source/model/main/DataSeries.cxx b/chart2/source/model/main/DataSeries.cxx
index cf9cae2..d016f21 100644
--- a/chart2/source/model/main/DataSeries.cxx
+++ b/chart2/source/model/main/DataSeries.cxx
@@ -139,12 +139,12 @@ DataSeries::DataSeries( const DataSeries & rOther ) :
 {
     if( ! rOther.m_aDataSequences.empty())
     {
-        CloneHelper::CloneRefVector< tDataSequenceContainer::value_type >(
+        CloneHelper::CloneRefVector<css::chart2::data::XLabeledDataSequence>(
             rOther.m_aDataSequences, m_aDataSequences );
         ModifyListenerHelper::addListenerToAllElements( m_aDataSequences, m_xModifyEventForwarder );
     }
 
-    CloneHelper::CloneRefVector< Reference< chart2::XRegressionCurve > >( rOther.m_aRegressionCurves, m_aRegressionCurves );
+    CloneHelper::CloneRefVector< chart2::XRegressionCurve >( rOther.m_aRegressionCurves, m_aRegressionCurves );
     ModifyListenerHelper::addListenerToAllElements( m_aRegressionCurves, m_xModifyEventForwarder );
 
     // add as listener to XPropertySet properties
diff --git a/chart2/source/model/main/Diagram.cxx b/chart2/source/model/main/Diagram.cxx
index 8a2b352..f1ef40f 100644
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
@@ -333,10 +333,10 @@ Diagram::Diagram( const Diagram & rOther ) :
         lcl_CloneCoordinateSystems( rOther.m_aCoordSystems, m_aCoordSystems );
     ModifyListenerHelper::addListenerToAllElements( m_aCoordSystems, m_xModifyEventForwarder );
 
-    m_xWall.set( CloneHelper::CreateRefClone< Reference< beans::XPropertySet > >()( rOther.m_xWall ));
-    m_xFloor.set( CloneHelper::CreateRefClone< Reference< beans::XPropertySet > >()( rOther.m_xFloor ));
-    m_xTitle.set( CloneHelper::CreateRefClone< Reference< chart2::XTitle > >()( rOther.m_xTitle ));
-    m_xLegend.set( CloneHelper::CreateRefClone< Reference< chart2::XLegend > >()( rOther.m_xLegend ));
+    m_xWall.set( CloneHelper::CreateRefClone< beans::XPropertySet >()( rOther.m_xWall ));
+    m_xFloor.set( CloneHelper::CreateRefClone< beans::XPropertySet >()( rOther.m_xFloor ));
+    m_xTitle.set( CloneHelper::CreateRefClone< chart2::XTitle >()( rOther.m_xTitle ));
+    m_xLegend.set( CloneHelper::CreateRefClone< chart2::XLegend >()( rOther.m_xLegend ));
 
     ModifyListenerHelper::addListener( m_xWall, m_xModifyEventForwarder );
     ModifyListenerHelper::addListener( m_xFloor, m_xModifyEventForwarder );
diff --git a/chart2/source/model/main/Title.cxx b/chart2/source/model/main/Title.cxx
index a0b7bdf..9b620c0 100644
--- a/chart2/source/model/main/Title.cxx
+++ b/chart2/source/model/main/Title.cxx
@@ -243,7 +243,7 @@ Title::Title( const Title & rOther ) :
         ::property::OPropertySet( rOther, m_aMutex ),
         m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder())
 {
-    CloneHelper::CloneRefSequence< uno::Reference< chart2::XFormattedString > >(
+    CloneHelper::CloneRefSequence<chart2::XFormattedString>(
         rOther.m_aStrings, m_aStrings );
     ModifyListenerHelper::addListenerToAllElements(
         ContainerHelper::SequenceToVector( m_aStrings ), m_xModifyEventForwarder );
diff --git a/chart2/source/model/template/ChartType.cxx b/chart2/source/model/template/ChartType.cxx
index 7b020dc..7bbe32b 100644
--- a/chart2/source/model/template/ChartType.cxx
+++ b/chart2/source/model/template/ChartType.cxx
@@ -57,7 +57,7 @@ ChartType::ChartType( const ChartType & rOther ) :
 {
     {
         SolarMutexGuard g; // access to rOther.m_aDataSeries
-        CloneHelper::CloneRefVector<Reference<chart2::XDataSeries> >(
+        CloneHelper::CloneRefVector<css::chart2::XDataSeries>(
                 rOther.m_aDataSeries, m_aDataSeries);
     }
     ModifyListenerHelper::addListenerToAllElements( m_aDataSeries, m_xModifyEventForwarder );
diff --git a/chart2/source/tools/DataSourceHelper.cxx b/chart2/source/tools/DataSourceHelper.cxx
index 6528d78..11a6c76 100644
--- a/chart2/source/tools/DataSourceHelper.cxx
+++ b/chart2/source/tools/DataSourceHelper.cxx
@@ -239,9 +239,9 @@ uno::Reference< chart2::data::XDataSource > DataSourceHelper::pressUsedDataIntoR
     if( xCategories.is() )
         aResultVector.push_back( xCategories );
 
-    ::std::vector< Reference< chart2::XDataSeries > > xSeriesVector( DiagramHelper::getDataSeriesFromDiagram( xDiagram ) );
+    ::std::vector< Reference< chart2::XDataSeries > > aSeriesVector( DiagramHelper::getDataSeriesFromDiagram( xDiagram ) );
     uno::Reference< chart2::data::XDataSource > xSeriesSource(
-        DataSeriesHelper::getDataSource( comphelper::containerToSequence(xSeriesVector) ) );
+        DataSeriesHelper::getDataSource( comphelper::containerToSequence(aSeriesVector) ) );
     Sequence< Reference< chart2::data::XLabeledDataSequence > > aDataSeqences( xSeriesSource->getDataSequences() );
 
     //the first x-values is always the next sequence //todo ... other x-values get lost for old format
diff --git a/chart2/source/tools/ErrorBar.cxx b/chart2/source/tools/ErrorBar.cxx
index d35c6fa..8833074 100644
--- a/chart2/source/tools/ErrorBar.cxx
+++ b/chart2/source/tools/ErrorBar.cxx
@@ -116,7 +116,7 @@ ErrorBar::ErrorBar( const ErrorBar & rOther ) :
     if( ! rOther.m_aDataSequences.empty())
     {
         if( lcl_isInternalData( rOther.m_aDataSequences.front()))
-            CloneHelper::CloneRefVector< tDataSequenceContainer::value_type >(
+            CloneHelper::CloneRefVector< css::chart2::data::XLabeledDataSequence >(
                 rOther.m_aDataSequences, m_aDataSequences );
         else
             m_aDataSequences = rOther.m_aDataSequences;
diff --git a/chart2/source/tools/ImplOPropertySet.cxx b/chart2/source/tools/ImplOPropertySet.cxx
index 3fe1e94..f86fe80 100644
--- a/chart2/source/tools/ImplOPropertySet.cxx
+++ b/chart2/source/tools/ImplOPropertySet.cxx
@@ -100,7 +100,7 @@ ImplOPropertySet::ImplOPropertySet( const ImplOPropertySet & rOther )
     ::std::copy( rOther.m_aProperties.begin(), rOther.m_aProperties.end(),
                  ::std::inserter( m_aProperties, m_aProperties.begin() ));
     cloneInterfaceProperties();
-    m_xStyle.set( ::chart::CloneHelper::CreateRefClone< Reference< style::XStyle > >()( rOther.m_xStyle ));
+    m_xStyle.set( ::chart::CloneHelper::CreateRefClone< style::XStyle >()( rOther.m_xStyle ));
 }
 
 beans::PropertyState ImplOPropertySet::GetPropertyStateByHandle( sal_Int32 nHandle ) const
diff --git a/chart2/source/tools/RegressionCurveModel.cxx b/chart2/source/tools/RegressionCurveModel.cxx
index 185354c..0133ff0 100644
--- a/chart2/source/tools/RegressionCurveModel.cxx
+++ b/chart2/source/tools/RegressionCurveModel.cxx
@@ -206,7 +206,7 @@ RegressionCurveModel::RegressionCurveModel( const RegressionCurveModel & rOther
     m_eRegressionCurveType( rOther.m_eRegressionCurveType ),
     m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder())
 {
-    m_xEquationProperties.set( CloneHelper::CreateRefClone< uno::Reference< beans::XPropertySet > >()( rOther.m_xEquationProperties ));
+    m_xEquationProperties.set( CloneHelper::CreateRefClone< beans::XPropertySet >()( rOther.m_xEquationProperties ));
     ModifyListenerHelper::addListener( m_xEquationProperties, m_xModifyEventForwarder );
 }
 
diff --git a/compilerplugins/clang/stylepolice.cxx b/compilerplugins/clang/stylepolice.cxx
index 3ae718c..c6f0e16 100644
--- a/compilerplugins/clang/stylepolice.cxx
+++ b/compilerplugins/clang/stylepolice.cxx
@@ -15,6 +15,10 @@
 #include "plugin.hxx"
 
 // Check for some basic naming mismatches which make the code harder to read
+//
+// This plugin is deliberately fairly lax, and only targets the most egregeriously faulty code,
+// since we have a broad range of styles in our code and we don't want to generate unnecessary
+// churn.
 
 namespace {
 
@@ -53,6 +57,9 @@ bool isIdentifierLetter(char c) {
 bool matchPointerVar(const std::string& s) {
     return s.size() > 2 && s[0] == 'p' && isUpperLetter(s[1]);
 }
+bool matchRefCountedPointerVar(const std::string& s) {
+    return s.size() > 2 && s[0] == 'x' && isUpperLetter(s[1]);
+}
 bool matchMember(const std::string& s) {
     return s.size() > 3 && s[0] == 'm'
         && (   ( strchr("abnprsx", s[1]) && isUpperLetter(s[2]) )
@@ -95,7 +102,12 @@ bool StylePolice::VisitVarDecl(const VarDecl * varDecl)
         typeName = typeName.substr(6);
     if (startswith(typeName, "class "))
         typeName = typeName.substr(6);
+    if (startswith(typeName, "struct "))
+        typeName = typeName.substr(7);
     std::string aOriginalTypeName = varDecl->getType().getAsString();
+    if (startswith(aOriginalTypeName, "const "))
+        aOriginalTypeName = aOriginalTypeName.substr(6);
+
     if (!qt->isPointerType() && !qt->isArrayType() && !qt->isFunctionPointerType() && !qt->isMemberPointerType()
         && matchPointerVar(name)
         && !startswith(typeName, "boost::intrusive_ptr")
@@ -107,17 +119,11 @@ bool StylePolice::VisitVarDecl(const VarDecl * varDecl)
         && aOriginalTypeName != "GLXPixmap"
         && !startswith(typeName, "rtl::Reference")
         && !startswith(typeName, "ScopedVclPtr")
-        && !startswith(typeName, "std::mem_fun")
-        && !startswith(typeName, "std::__1::mem_fun")
-        && !startswith(typeName, "std::shared_ptr")
-        && !startswith(typeName, "std::__1::shared_ptr")
-        && !startswith(typeName, "shared_ptr") // weird issue in slideshow
-        && !startswith(typeName, "std::unique_ptr")
-        && !startswith(typeName, "std::__1::unique_ptr")
-        && !startswith(typeName, "unique_ptr") // weird issue in include/vcl/threadex.hxx
-        && !startswith(typeName, "std::weak_ptr")
-        && !startswith(typeName, "std::__1::weak_ptr")
-        && !startswith(typeName, "struct _LOKDocViewPrivate")
+        && typeName.find("::mem_fun") == std::string::npos
+        && typeName.find("shared_ptr") == std::string::npos
+        && typeName.find("unique_ptr") == std::string::npos
+        && typeName.find("::weak_ptr") == std::string::npos
+        && !startswith(typeName, "_LOKDocViewPrivate")
         && !startswith(typeName, "sw::UnoCursorPointer")
         && !startswith(typeName, "tools::SvRef")
         && !startswith(typeName, "VclPtr")
@@ -138,6 +144,47 @@ bool StylePolice::VisitVarDecl(const VarDecl * varDecl)
                  << typeName << aOriginalTypeName << varDecl->getSourceRange();
         }
     }
+
+
+    if (matchRefCountedPointerVar(name)
+        && !startswith(typeName, "boost::intrusive_ptr")
+        && !startswith(typeName, "com::sun::star::uno::Reference")
+        && !startswith(typeName, "com::sun::star::uno::Sequence")
+        && !startswith(typeName, "com::sun::star::uno::WeakReference")
+        && !startswith(typeName, "drawinglayer::primitive2d::Primitive2DContainer")
+        && !startswith(typeName, "drawinglayer::primitive3d::Primitive3DContainer")
+        && !startswith(typeName, "jfw::CXPathObjectPtr")
+        && !startswith(typeName, "_LOKDocViewPrivate")
+        && !startswith(typeName, "oox::dump::BinaryInputStreamRef")
+        && !startswith(typeName, "oox::drawingml::chart::ModelRef")
+        && !startswith(typeName, "rtl::Reference")
+        && !startswith(typeName, "Reference")
+        && !startswith(typeName, "SfxObjectShellLock")
+        && !startswith(typeName, "store::PageHolderObject")
+        && !startswith(typeName, "store::ResourceHolder")
+        && !startswith(typeName, "store::OStoreHandle")
+        && typeName.find("unique_ptr") == std::string::npos
+        && typeName.find("shared_ptr") == std::string::npos
+        && !startswith(typeName, "ScopedVclPtr")
+        && !startswith(typeName, "svt::EmbeddedObjectRef")
+        && !startswith(typeName, "tools::SvRef")
+        && !startswith(typeName, "tools::WeakReference")
+        && !startswith(typeName, "utl::SharedUNOComponent")
+        && !startswith(typeName, "VclPtr")
+        && !startswith(typeName, "vcl::DeleteOnDeinit")
+        && !startswith(typeName, "vcl::DeleteUnoReferenceOnDeinit")
+        // there are lots of coordinate/position vars that start with "x"
+        && !qt->isArithmeticType()
+        )
+    {
+            report(
+                DiagnosticsEngine::Warning,
+                "this local variable of type '%0' follows our ref-counted-pointer naming convention, but it is not a ref-counted-pointer, %1",
+                varDecl->getLocation())
+                 << typeName << aOriginalTypeName << varDecl->getSourceRange();
+    }
+
+
     return true;
 }
 
diff --git a/connectivity/source/commontools/dbconversion.cxx b/connectivity/source/commontools/dbconversion.cxx
index b95cafa..1646b64 100644
--- a/connectivity/source/commontools/dbconversion.cxx
+++ b/connectivity/source/commontools/dbconversion.cxx
@@ -339,33 +339,33 @@ namespace dbtools
         else
             nSign = 1;
 
-        css::util::Time xRet;
+        css::util::Time aRet;
         // normalize time
         // we have to sal_Int32 here because otherwise we get an overflow
         sal_Int64 nNanoSeconds      = nNS;
         sal_Int32 nSeconds          = nNanoSeconds / nanoSecInSec;
         sal_Int32 nMinutes          = nSeconds / secInMin;
 
-        xRet.NanoSeconds            = nNanoSeconds % nanoSecInSec;
-        xRet.Seconds                = nSeconds % secInMin;
-        xRet.Hours                  = nMinutes / minInHour;
-        xRet.Minutes                = nMinutes % minInHour;
+        aRet.NanoSeconds            = nNanoSeconds % nanoSecInSec;
+        aRet.Seconds                = nSeconds % secInMin;
+        aRet.Hours                  = nMinutes / minInHour;
+        aRet.Minutes                = nMinutes % minInHour;
 
         // assemble time
         sal_Int64 nTime = nSign *
-                          (xRet.NanoSeconds +
-                           xRet.Seconds * secMask +
-                           xRet.Minutes * minMask +
-                           xRet.Hours   * hourMask);
+                          (aRet.NanoSeconds +
+                           aRet.Seconds * secMask +
+                           aRet.Minutes * minMask +
+                           aRet.Hours   * hourMask);
 
         if(nTime < 0)
         {
-            xRet.NanoSeconds  = nanoSecInSec-1;
-            xRet.Seconds      = secInMin-1;
-            xRet.Minutes      = minInHour-1;
-            xRet.Hours        = 23;
+            aRet.NanoSeconds  = nanoSecInSec-1;
+            aRet.Seconds      = secInMin-1;
+            aRet.Minutes      = minInHour-1;
+            aRet.Hours        = 23;
         }
-        return xRet;
+        return aRet;
     }
 
     css::util::DateTime DBTypeConversion::toDateTime(double dVal, const css::util::Date& _rNullDate)
@@ -377,19 +377,19 @@ namespace dbtools
         // 12:59:59.999999790
         css::util::Time aTime = toTime(dVal, 6);
 
-        css::util::DateTime xRet;
+        css::util::DateTime aRet;
 
-        xRet.Day          = aDate.Day;
-        xRet.Month        = aDate.Month;
-        xRet.Year         = aDate.Year;
+        aRet.Day          = aDate.Day;
+        aRet.Month        = aDate.Month;
+        aRet.Year         = aDate.Year;
 
-        xRet.NanoSeconds  = aTime.NanoSeconds;
-        xRet.Minutes      = aTime.Minutes;
-        xRet.Seconds      = aTime.Seconds;
-        xRet.Hours        = aTime.Hours;
+        aRet.NanoSeconds  = aTime.NanoSeconds;
+        aRet.Minutes      = aTime.Minutes;
+        aRet.Seconds      = aTime.Seconds;
+        aRet.Hours        = aTime.Hours;
 
 
-        return xRet;
+        return aRet;
     }
 
     css::util::Date DBTypeConversion::toDate(const OUString& _sSQLString)
diff --git a/connectivity/source/drivers/file/FPreparedStatement.cxx b/connectivity/source/drivers/file/FPreparedStatement.cxx
index b5d8d51..65806cd 100644
--- a/connectivity/source/drivers/file/FPreparedStatement.cxx
+++ b/connectivity/source/drivers/file/FPreparedStatement.cxx
@@ -487,10 +487,10 @@ void OPreparedStatement::describeParameter()
     if ( !aParseNodes.empty() )
     {
         //  m_xParamColumns = new OSQLColumns();
-        const OSQLTables& xTabs = m_aSQLIterator.getTables();
-        if( !xTabs.empty() )
+        const OSQLTables& rTabs = m_aSQLIterator.getTables();
+        if( !rTabs.empty() )
         {
-            OSQLTable xTable = xTabs.begin()->second;
+            OSQLTable xTable = rTabs.begin()->second;
             ::std::vector< OSQLParseNode*>::const_iterator aIter = aParseNodes.begin();
             for (;aIter != aParseNodes.end();++aIter )
             {
diff --git a/connectivity/source/drivers/file/FResultSet.cxx b/connectivity/source/drivers/file/FResultSet.cxx
index 257f839..1903d58 100644
--- a/connectivity/source/drivers/file/FResultSet.cxx
+++ b/connectivity/source/drivers/file/FResultSet.cxx
@@ -1182,14 +1182,14 @@ bool OResultSet::OpenImpl()
     OSL_ENSURE(m_pSQLAnalyzer,"No analyzer set with setSqlAnalyzer!");
     if(!m_pTable)
     {
-        const OSQLTables& xTabs = m_aSQLIterator.getTables();
-        if (xTabs.empty() || !xTabs.begin()->second.is())
+        const OSQLTables& rTabs = m_aSQLIterator.getTables();
+        if (rTabs.empty() || !rTabs.begin()->second.is())
             lcl_throwError(STR_QUERY_TOO_COMPLEX,*this);
 
-        if ( xTabs.size() > 1 || m_aSQLIterator.hasErrors() )
+        if ( rTabs.size() > 1 || m_aSQLIterator.hasErrors() )
             lcl_throwError(STR_QUERY_MORE_TABLES,*this);
 
-        OSQLTable xTable = xTabs.begin()->second;
+        OSQLTable xTable = rTabs.begin()->second;
         m_xColumns = m_aSQLIterator.getSelectColumns();
 
         m_xColNames = xTable->getColumns();
diff --git a/connectivity/source/drivers/file/FStatement.cxx b/connectivity/source/drivers/file/FStatement.cxx
index 1a50039..f374b82 100644
--- a/connectivity/source/drivers/file/FStatement.cxx
+++ b/connectivity/source/drivers/file/FStatement.cxx
@@ -394,14 +394,14 @@ void OStatement_Base::construct(const OUString& sql)  throw(SQLException, Runtim
     {
         m_aSQLIterator.setParseTree(m_pParseTree);
         m_aSQLIterator.traverseAll();
-        const OSQLTables& xTabs = m_aSQLIterator.getTables();
+        const OSQLTables& rTabs = m_aSQLIterator.getTables();
 
         // sanity checks
-        if ( xTabs.empty() )
+        if ( rTabs.empty() )
             // no tables -> nothing to operate on -> error
             m_pConnection->throwGenericSQLException(STR_QUERY_NO_TABLE,*this);
 
-        if ( xTabs.size() > 1 || m_aSQLIterator.hasErrors() )
+        if ( rTabs.size() > 1 || m_aSQLIterator.hasErrors() )
             // more than one table -> can't operate on them -> error
             m_pConnection->throwGenericSQLException(STR_QUERY_MORE_TABLES,*this);
 
@@ -421,7 +421,7 @@ void OStatement_Base::construct(const OUString& sql)  throw(SQLException, Runtim
         }
 
         // at this moment we support only one table per select statement
-        Reference< ::com::sun::star::lang::XUnoTunnel> xTunnel(xTabs.begin()->second,UNO_QUERY);
+        Reference< ::com::sun::star::lang::XUnoTunnel> xTunnel(rTabs.begin()->second,UNO_QUERY);
         if(xTunnel.is())
         {
             if(m_pTable)
diff --git a/connectivity/source/drivers/jdbc/PreparedStatement.cxx b/connectivity/source/drivers/jdbc/PreparedStatement.cxx
index adc7aa4..df0ee8a 100644
--- a/connectivity/source/drivers/jdbc/PreparedStatement.cxx
+++ b/connectivity/source/drivers/jdbc/PreparedStatement.cxx
@@ -433,7 +433,7 @@ void SAL_CALL java_sql_PreparedStatement::setBytes( sal_Int32 parameterIndex, co
         static jmethodID mID(nullptr);
         obtainMethodId_throwSQL(t.pEnv, cMethodName,cSignature, mID);
         jbyteArray pByteArray = t.pEnv->NewByteArray(x.getLength());
-        jbyte * xData = reinterpret_cast<jbyte *>(
+        jbyte * pData = reinterpret_cast<jbyte *>(
             const_cast<sal_Int8 *>(x.getConstArray()));
             // 4th param of Set*ArrayRegion changed from pointer to non-const to
             // pointer to const between <http://docs.oracle.com/javase/6/docs/
@@ -441,7 +441,7 @@ void SAL_CALL java_sql_PreparedStatement::setBytes( sal_Int32 parameterIndex, co
             // <http://docs.oracle.com/javase/7/docs/technotes/guides/jni/spec/
             // functions.html#wp22933>; work around that difference in a way
             // that doesn't trigger loplugin:redundantcast
-        t.pEnv->SetByteArrayRegion(pByteArray,0,x.getLength(),xData);
+        t.pEnv->SetByteArrayRegion(pByteArray,0,x.getLength(),pData);
         t.pEnv->CallVoidMethod( object, mID, parameterIndex,pByteArray);
         t.pEnv->DeleteLocalRef(pByteArray);
         ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
diff --git a/connectivity/source/drivers/jdbc/ResultSet.cxx b/connectivity/source/drivers/jdbc/ResultSet.cxx
index 7ce1751..d872258 100644
--- a/connectivity/source/drivers/jdbc/ResultSet.cxx
+++ b/connectivity/source/drivers/jdbc/ResultSet.cxx
@@ -661,7 +661,7 @@ void SAL_CALL java_sql_ResultSet::updateBytes( sal_Int32 columnIndex, const ::co
 
         {
             jbyteArray aArray = t.pEnv->NewByteArray(x.getLength());
-            jbyte * xData = reinterpret_cast<jbyte *>(
+            jbyte * pData = reinterpret_cast<jbyte *>(
                 const_cast<sal_Int8 *>(x.getConstArray()));
             // 4th param of Set*ArrayRegion changed from pointer to non-const to
             // pointer to const between <http://docs.oracle.com/javase/6/docs/
@@ -669,7 +669,7 @@ void SAL_CALL java_sql_ResultSet::updateBytes( sal_Int32 columnIndex, const ::co
             // <http://docs.oracle.com/javase/7/docs/technotes/guides/jni/spec/
             // functions.html#wp22933>; work around that difference in a way
             // that doesn't trigger loplugin:redundantcast
-            t.pEnv->SetByteArrayRegion(aArray,0,x.getLength(),xData);
+            t.pEnv->SetByteArrayRegion(aArray,0,x.getLength(),pData);
             // convert parameter
             t.pEnv->CallVoidMethod( object, mID,columnIndex,aArray);
             t.pEnv->DeleteLocalRef(aArray);
diff --git a/connectivity/source/drivers/mork/MPreparedStatement.cxx b/connectivity/source/drivers/mork/MPreparedStatement.cxx
index ff59e95..51c6bdb 100644
--- a/connectivity/source/drivers/mork/MPreparedStatement.cxx
+++ b/connectivity/source/drivers/mork/MPreparedStatement.cxx
@@ -443,10 +443,10 @@ void OPreparedStatement::describeParameter()
     if(!aParseNodes.empty())
     {
         m_xParamColumns = new OSQLColumns();
-        const OSQLTables& xTabs = m_pSQLIterator->getTables();
-        if(xTabs.size())
+        const OSQLTables& rTabs = m_pSQLIterator->getTables();
+        if(rTabs.size())
         {
-            OSQLTable xTable = xTabs.begin()->second;
+            OSQLTable xTable = rTabs.begin()->second;
             ::std::vector< OSQLParseNode*>::const_iterator aIter =
 aParseNodes.begin();
             for (;aIter != aParseNodes.end();++aIter )
diff --git a/connectivity/source/drivers/mork/MQueryHelper.cxx b/connectivity/source/drivers/mork/MQueryHelper.cxx
index 65c8fbb..a183dd3 100644
--- a/connectivity/source/drivers/mork/MQueryHelper.cxx
+++ b/connectivity/source/drivers/mork/MQueryHelper.cxx
@@ -158,10 +158,10 @@ bool MQueryHelper::checkRowAvailable( sal_Int32 nDBRow )
 
 bool MQueryHelper::getRowValue( ORowSetValue& rValue, sal_Int32 nDBRow,const OUString& aDBColumnName, sal_Int32 nType )
 {
-    MQueryHelperResultEntry* xResEntry = getByIndex( nDBRow );
+    MQueryHelperResultEntry* pResEntry = getByIndex( nDBRow );
 
-    OSL_ENSURE( xResEntry != nullptr, "xResEntry == NULL");
-    if (xResEntry == nullptr )
+    OSL_ENSURE( pResEntry != nullptr, "xResEntry == NULL");
+    if (pResEntry == nullptr )
     {
         rValue.setNull();
         return false;
@@ -169,7 +169,7 @@ bool MQueryHelper::getRowValue( ORowSetValue& rValue, sal_Int32 nDBRow,const OUS
     switch ( nType )
     {
         case DataType::VARCHAR:
-            rValue = xResEntry->getValue( m_rColumnAlias.getProgrammaticNameOrFallbackToUTF8Alias( aDBColumnName ) );
+            rValue = pResEntry->getValue( m_rColumnAlias.getProgrammaticNameOrFallbackToUTF8Alias( aDBColumnName ) );
             break;
 
         default:
@@ -187,30 +187,30 @@ sal_Int32 MQueryHelper::executeQuery(OConnection* xConnection, MQueryExpression
     OString oStringTable = OUStringToOString( m_aAddressbook, RTL_TEXTENCODING_UTF8 );
     std::set<int> listRecords;
     bool handleListTable = false;
-    MorkParser* xMork;
+    MorkParser* pMork;
 
     // check if we are retrieving the default table
     if (oStringTable == "AddressBook" || oStringTable == "CollectedAddressBook")
     {
-        xMork = xConnection->getMorkParser(oStringTable);
+        pMork = xConnection->getMorkParser(oStringTable);
     }
     else
     {
         // Let's try to retrieve the list in Collected Addresses book
-        xMork = xConnection->getMorkParser(OString("CollectedAddressBook"));
-        if (std::find(xMork->lists_.begin(), xMork->lists_.end(), m_aAddressbook) == xMork->lists_.end())
+        pMork = xConnection->getMorkParser(OString("CollectedAddressBook"));
+        if (std::find(pMork->lists_.begin(), pMork->lists_.end(), m_aAddressbook) == pMork->lists_.end())
         {
             // so the list is in Address book
             // TODO : manage case where an address book has been created
-            xMork = xConnection->getMorkParser(OString("AddressBook"));
+            pMork = xConnection->getMorkParser(OString("AddressBook"));
         }
         handleListTable = true;
         // retrieve row ids for that list table
         std::string listTable = oStringTable.getStr();
-        xMork->getRecordKeysForListTable(listTable, listRecords);
+        pMork->getRecordKeysForListTable(listTable, listRecords);
     }
     MorkTableMap::Map::iterator tableIter;
-    MorkTableMap *Tables = xMork->getTables( 0x80 );
+    MorkTableMap *Tables = pMork->getTables( 0x80 );
     if (!Tables)
         return -1;
     MorkRowMap *Rows = nullptr;
@@ -243,8 +243,8 @@ sal_Int32 MQueryHelper::executeQuery(OConnection* xConnection, MQueryExpression
                 for (MorkCells::const_iterator CellsIter = rowIter->second.begin();
                      CellsIter != rowIter->second.end(); ++CellsIter )
                 {
-                    std::string column = xMork->getColumn(CellsIter->first);
-                    std::string value = xMork->getValue(CellsIter->second);
+                    std::string column = pMork->getColumn(CellsIter->first);
+                    std::string value = pMork->getValue(CellsIter->second);
                     OString key(column.c_str(), static_cast<sal_Int32>(column.size()));
                     OString valueOString(value.c_str(), static_cast<sal_Int32>(value.size()));
                     OUString valueOUString = OStringToOUString( valueOString, RTL_TEXTENCODING_UTF8 );
diff --git a/connectivity/source/drivers/mork/MResultSet.cxx b/connectivity/source/drivers/mork/MResultSet.cxx
index 10b2be9..ca0e944 100644
--- a/connectivity/source/drivers/mork/MResultSet.cxx
+++ b/connectivity/source/drivers/mork/MResultSet.cxx
@@ -1005,7 +1005,7 @@ void OResultSet::fillRowData()
 
     MQueryExpression queryExpression;
 
-    OConnection* xConnection = static_cast<OConnection*>(m_pStatement->getConnection().get());
+    OConnection* pConnection = static_cast<OConnection*>(m_pStatement->getConnection().get());
     m_xColumns = m_pSQLIterator->getSelectColumns();
 
     OSL_ENSURE(m_xColumns.is(), "Need the Columns!!");
@@ -1045,7 +1045,7 @@ void OResultSet::fillRowData()
     OUString aStr(  m_pTable->getName() );
     m_aQueryHelper.setAddressbook( aStr );
 
-    sal_Int32 rv = m_aQueryHelper.executeQuery(xConnection, queryExpression);
+    sal_Int32 rv = m_aQueryHelper.executeQuery(pConnection, queryExpression);
     if ( rv == -1 ) {
         m_pStatement->getOwnConnection()->throwSQLException( STR_ERR_EXECUTING_QUERY, *this );
     }
@@ -1114,11 +1114,11 @@ void SAL_CALL OResultSet::executeQuery() throw( ::com::sun::star::sdbc::SQLExcep
     OSL_ENSURE( m_pTable, "Need a Table object");
     if(!m_pTable)
     {
-        const OSQLTables& xTabs = m_pSQLIterator->getTables();
-        if (xTabs.empty() || !xTabs.begin()->second.is())
+        const OSQLTables& rTabs = m_pSQLIterator->getTables();
+        if (rTabs.empty() || !rTabs.begin()->second.is())
             m_pStatement->getOwnConnection()->throwSQLException( STR_QUERY_TOO_COMPLEX, *this );
 
-        m_pTable = static_cast< OTable* > ((xTabs.begin()->second).get());
+        m_pTable = static_cast< OTable* > ((rTabs.begin()->second).get());
 
     }
 
diff --git a/connectivity/source/drivers/mork/MStatement.cxx b/connectivity/source/drivers/mork/MStatement.cxx
index 272f49b..f8b04da 100644
--- a/connectivity/source/drivers/mork/MStatement.cxx
+++ b/connectivity/source/drivers/mork/MStatement.cxx
@@ -140,16 +140,16 @@ OCommonStatement::StatementType OCommonStatement::parseSql( const OUString& sql
     {
         m_pSQLIterator->setParseTree(m_pParseTree);
         m_pSQLIterator->traverseAll();
-        const OSQLTables& xTabs = m_pSQLIterator->getTables();
+        const OSQLTables& rTabs = m_pSQLIterator->getTables();
 
-        if (xTabs.empty())
+        if (rTabs.empty())
         {
             getOwnConnection()->throwSQLException( STR_QUERY_AT_LEAST_ONE_TABLES, *this );
         }
 
 #if OSL_DEBUG_LEVEL > 0
         OSQLTables::const_iterator citer;
-        for( citer = xTabs.begin(); citer != xTabs.end(); ++citer ) {
+        for( citer = rTabs.begin(); citer != rTabs.end(); ++citer ) {
             OSL_TRACE("SELECT Table : %s", OUtoCStr(citer->first) );
         }
 #endif
@@ -161,9 +161,9 @@ OCommonStatement::StatementType OCommonStatement::parseSql( const OUString& sql
 
             // at this moment we support only one table per select statement
 
-            OSL_ENSURE( xTabs.begin() != xTabs.end(), "Need a Table");
+            OSL_ENSURE( rTabs.begin() != rTabs.end(), "Need a Table");
 
-            m_pTable = static_cast< OTable* > (xTabs.begin()->second.get());
+            m_pTable = static_cast< OTable* > (rTabs.begin()->second.get());
             m_xColNames     = m_pTable->getColumns();
             xNames.set(m_xColNames,UNO_QUERY);
             // set the binding of the resultrow
diff --git a/dbaccess/source/ui/dlg/adminpages.cxx b/dbaccess/source/ui/dlg/adminpages.cxx
index 91404f5..c8de4ca 100644
--- a/dbaccess/source/ui/dlg/adminpages.cxx
+++ b/dbaccess/source/ui/dlg/adminpages.cxx
@@ -240,10 +240,10 @@ namespace dbaui
             bool bShowMessage = true;
             try
             {
-                ::std::pair< Reference<XConnection>,sal_Bool> xConnection = m_pAdminDialog->createConnection();
-                bShowMessage = xConnection.second;
-                bSuccess = xConnection.first.is();
-                ::comphelper::disposeComponent(xConnection.first);
+                ::std::pair< Reference<XConnection>,sal_Bool> aConnectionPair = m_pAdminDialog->createConnection();
+                bShowMessage = aConnectionPair.second;
+                bSuccess = aConnectionPair.first.is();
+                ::comphelper::disposeComponent(aConnectionPair.first);
             }
             catch(Exception&)
             {
diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx
index 42a62c6..4f543c4 100644
--- a/dbaccess/source/ui/querydesign/querycontroller.cxx
+++ b/dbaccess/source/ui/querydesign/querycontroller.cxx
@@ -627,8 +627,8 @@ void OQueryController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >&
                         }
                         else
                         {
-                            const OSQLTables& xTabs = m_pSqlIterator->getTables();
-                            if ( m_pSqlIterator->getStatementType() != OSQLStatementType::Select || xTabs.begin() == xTabs.end() )
+                            const OSQLTables& rTabs = m_pSqlIterator->getTables();
+                            if ( m_pSqlIterator->getStatementType() != OSQLStatementType::Select || rTabs.begin() == rTabs.end() )
                             {
                                 aError = SQLException(
                                     OUString( ModuleRes( STR_QRY_NOSELECT ) ),
diff --git a/editeng/source/editeng/eehtml.cxx b/editeng/source/editeng/eehtml.cxx
index 410d99f..bee0d5d 100644
--- a/editeng/source/editeng/eehtml.cxx
+++ b/editeng/source/editeng/eehtml.cxx
@@ -103,11 +103,6 @@ SvParserState EditHTMLParser::CallParser(EditEngine* pEE, const EditPaM& rPaM)
 
 void EditHTMLParser::NextToken( int nToken )
 {
-    #ifdef DBG_UTIL
-        HTML_TOKEN_IDS xID = (HTML_TOKEN_IDS)nToken;
-        (void)xID;
-    #endif
-
     switch( nToken )
     {
     case HTML_META:
diff --git a/filter/source/flash/swffilter.cxx b/filter/source/flash/swffilter.cxx
index 182be5d..7661120 100644
--- a/filter/source/flash/swffilter.cxx
+++ b/filter/source/flash/swffilter.cxx
@@ -365,7 +365,7 @@ bool FlashExportFilter::ExportAsMultipleFiles(const Sequence< PropertyValue >& a
 
     fullpath = swfdirpath + STR("/backgroundconfig.txt");
 
-    oslFileHandle xBackgroundConfig( nullptr );
+    oslFileHandle aBackgroundConfig( nullptr );
 
     // AS: Only export the background config if we're exporting all of the pages, otherwise we'll
     //  screw it up.
@@ -373,10 +373,10 @@ bool FlashExportFilter::ExportAsMultipleFiles(const Sequence< PropertyValue >& a
     if (bExportAll)
     {
         osl_removeFile(fullpath.pData);
-        osl_openFile( fullpath.pData, &xBackgroundConfig, osl_File_OpenFlag_Create | osl_File_OpenFlag_Write );
+        osl_openFile( fullpath.pData, &aBackgroundConfig, osl_File_OpenFlag_Create | osl_File_OpenFlag_Write );
 
         sal_uInt64 bytesWritten;
-        err = osl_writeFile(xBackgroundConfig, "slides=", strlen("slides="), &bytesWritten);
+        err = osl_writeFile(aBackgroundConfig, "slides=", strlen("slides="), &bytesWritten);
     }
 
     // TODO: check for errors
@@ -435,15 +435,15 @@ bool FlashExportFilter::ExportAsMultipleFiles(const Sequence< PropertyValue >& a
             OString ASCIItemp(temp.getStr(), temp.getLength(), RTL_TEXTENCODING_ASCII_US);
 
             sal_uInt64 bytesWritten;
-            osl_writeFile(xBackgroundConfig, ASCIItemp.getStr(), ASCIItemp.getLength(), &bytesWritten);
+            osl_writeFile(aBackgroundConfig, ASCIItemp.getStr(), ASCIItemp.getLength(), &bytesWritten);
 
             if (nPage < nPageCount - 1)
-                osl_writeFile(xBackgroundConfig, "|", 1, &bytesWritten);
+                osl_writeFile(aBackgroundConfig, "|", 1, &bytesWritten);
         }
     }
 
     if (bExportAll)
-        osl_closeFile(xBackgroundConfig);
+        osl_closeFile(aBackgroundConfig);
 
     return true;
 }
diff --git a/idl/source/objects/object.cxx b/idl/source/objects/object.cxx
index d25143f..bc64658 100644
--- a/idl/source/objects/object.cxx
+++ b/idl/source/objects/object.cxx
@@ -49,14 +49,14 @@ void SvMetaClass::ReadContextSvIdl( SvIdlDataBase & rBase,
         SvMetaClass * pClass = rBase.ReadKnownClass( rInStm );
         if( !pClass )
             throw SvParseException( rInStm, "unknown imported interface" );
-        SvClassElement xEle;
-        xEle.SetClass( pClass );
-        aClassElementList.push_back( xEle );
+        SvClassElement aEle;
+        aEle.SetClass( pClass );
+        aClassElementList.push_back( aEle );
 
         rTok = rInStm.GetToken();
         if( rTok.IsString() )
         {
-            xEle.SetPrefix( rTok.GetString() );
+            aEle.SetPrefix( rTok.GetString() );
             rInStm.GetToken_Next();
         }
         return;
diff --git a/idl/source/prj/parser.cxx b/idl/source/prj/parser.cxx
index 48e7574..cb2cd8b 100644
--- a/idl/source/prj/parser.cxx
+++ b/idl/source/prj/parser.cxx
@@ -299,14 +299,14 @@ void SvIdlParser::ReadInterfaceOrShellEntry(SvMetaClass& rClass)
     if( rTok.Is( SvHash_import() ) )
     {
         SvMetaClass * pClass = ReadKnownClass();
-        SvClassElement xEle(pClass);
+        SvClassElement aEle(pClass);
         rTok = rInStm.GetToken();
         if( rTok.IsString() )
         {
-            xEle.SetPrefix( rTok.GetString() );
+            aEle.SetPrefix( rTok.GetString() );
             rInStm.GetToken_Next();
         }
-        rClass.aClassElementList.push_back( xEle );
+        rClass.aClassElementList.push_back( aEle );
         return;
     }
     else
diff --git a/oox/source/drawingml/fillpropertiesgroupcontext.cxx b/oox/source/drawingml/fillpropertiesgroupcontext.cxx
index cca0752..78d4b16 100644
--- a/oox/source/drawingml/fillpropertiesgroupcontext.cxx
+++ b/oox/source/drawingml/fillpropertiesgroupcontext.cxx
@@ -157,9 +157,9 @@ BlipContext::BlipContext( ContextHandler2Helper& rParent,
         // code rework.
         OUString aRelId = rAttribs.getString( R_TOKEN( link ), OUString() );
         OUString aTargetLink = getFilter().getAbsoluteUrl( getRelations().getExternalTargetFromRelId( aRelId ) );
-        SfxMedium xMed( aTargetLink, STREAM_STD_READ );
-        xMed.Download();
-        Reference< io::XInputStream > xInStrm = xMed.GetInputStream();
+        SfxMedium aMed( aTargetLink, STREAM_STD_READ );
+        aMed.Download();
+        Reference< io::XInputStream > xInStrm = aMed.GetInputStream();
         if ( xInStrm.is() )
             mrBlipProps.mxGraphic = getFilter().getGraphicHelper().importGraphic( xInStrm );
     }
diff --git a/oox/source/ole/olehelper.cxx b/oox/source/ole/olehelper.cxx
index 4068fa7..e20e13f 100644
--- a/oox/source/ole/olehelper.cxx
+++ b/oox/source/ole/olehelper.cxx
@@ -550,8 +550,8 @@ bool MSConvertOCXControls::WriteOCXExcelKludgeStream( const css::uno::Reference<
     SvGlobalName aName;
     OUString sId = exportHelper.getGUID();
     aName.MakeId(sId);
-    BinaryXOutputStream xOut( xOutStrm, false );
-    OleHelper::exportGuid( xOut, aName );
+    BinaryXOutputStream aOut( xOutStrm, false );
+    OleHelper::exportGuid( aOut, aName );
     exportHelper.exportControl( xOutStrm, rSize );
     return true;
 }
diff --git a/sc/qa/extras/macros-test.cxx b/sc/qa/extras/macros-test.cxx
index 60c9f1c..e216721 100644
--- a/sc/qa/extras/macros-test.cxx
+++ b/sc/qa/extras/macros-test.cxx
@@ -80,8 +80,8 @@ void ScMacrosTest::testMSP()
     SfxObjectShell* pFoundShell = SfxObjectShell::GetShellFromComponent(xComponent);
 
     CPPUNIT_ASSERT_MESSAGE("Failed to access document shell", pFoundShell);
-    ScDocShell* xDocSh = dynamic_cast<ScDocShell*>(pFoundShell);
-    CPPUNIT_ASSERT(xDocSh != nullptr);
+    ScDocShell* pDocSh = dynamic_cast<ScDocShell*>(pFoundShell);
+    CPPUNIT_ASSERT(pDocSh != nullptr);
 
     SfxObjectShell::CallXScript(
         xComponent,
@@ -92,7 +92,7 @@ void ScMacrosTest::testMSP()
 
     SAL_INFO("sc.qa", "Result is " << sResult );
     CPPUNIT_ASSERT_MESSAGE("TestMSP ( for fdo#67547) failed", sResult == "OK" );
-    xDocSh->DoClose();
+    pDocSh->DoClose();
 }
 
 void ScMacrosTest::testPasswordProtectedStarBasic()
@@ -112,8 +112,8 @@ void ScMacrosTest::testPasswordProtectedStarBasic()
     SfxObjectShell* pFoundShell = SfxObjectShell::GetShellFromComponent(xComponent);
 
     CPPUNIT_ASSERT_MESSAGE("Failed to access document shell", pFoundShell);
-    ScDocShell* xDocSh = static_cast<ScDocShell*>(pFoundShell);
-    ScDocument& rDoc = xDocSh->GetDocument();
+    ScDocShell* pDocSh = static_cast<ScDocShell*>(pFoundShell);
+    ScDocument& rDoc = pDocSh->GetDocument();
 
 
     // User defined types
@@ -147,7 +147,7 @@ void ScMacrosTest::testPasswordProtectedStarBasic()
     CPPUNIT_ASSERT_MESSAGE("Far Method script did not change the value of Sheet1.C1", aValue == "success");
 
 
-    xDocSh->DoClose();
+    pDocSh->DoClose();
 }
 
 void ScMacrosTest::testStarBasic()
@@ -167,8 +167,8 @@ void ScMacrosTest::testStarBasic()
     SfxObjectShell* pFoundShell = SfxObjectShell::GetShellFromComponent(xComponent);
 
     CPPUNIT_ASSERT_MESSAGE("Failed to access document shell", pFoundShell);
-    ScDocShell* xDocSh = static_cast<ScDocShell*>(pFoundShell);
-    ScDocument& rDoc = xDocSh->GetDocument();
+    ScDocShell* pDocSh = static_cast<ScDocShell*>(pFoundShell);
+    ScDocument& rDoc = pDocSh->GetDocument();
 
     SfxObjectShell::CallXScript(
         xComponent,
@@ -177,7 +177,7 @@ void ScMacrosTest::testStarBasic()
     double aValue;
     rDoc.GetValue(0,0,0,aValue);
     CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("script did not change the value of Sheet1.A1",2.0, aValue, 0.00001);
-    xDocSh->DoClose();
+    pDocSh->DoClose();
 }
 
 void ScMacrosTest::testVba()
diff --git a/sc/qa/extras/recordchanges-test.cxx b/sc/qa/extras/recordchanges-test.cxx
index 993841e..357023e 100644
--- a/sc/qa/extras/recordchanges-test.cxx
+++ b/sc/qa/extras/recordchanges-test.cxx
@@ -52,9 +52,9 @@ void ScRecordChangesTest::testSetRecordChanges()
     CPPUNIT_ASSERT_MESSAGE("a new document does not protect record changes", !protectionValue);
 
     // now activate recording
-    uno::Any xValue;
-    xValue <<= true;
-    xDocSettingsPropSet->setPropertyValue("RecordChanges", xValue);
+    uno::Any aValue;
+    aValue <<= true;
+    xDocSettingsPropSet->setPropertyValue("RecordChanges", aValue);
 
     CPPUNIT_ASSERT(xDocSettingsPropSet->getPropertyValue("RecordChanges") >>= recordChangesValue);
     CPPUNIT_ASSERT_MESSAGE("the document should record changes", recordChangesValue);
@@ -82,9 +82,9 @@ void ScRecordChangesTest::testCheckRecordChangesProtection()
     CPPUNIT_ASSERT_MESSAGE("the protection should be active", protectionValue);
 
     // try to de-activate recording
-    uno::Any xValue;
-    xValue <<= false;
-    xDocSettingsPropSet->setPropertyValue("RecordChanges", xValue);
+    uno::Any aValue;
+    aValue <<= false;
+    xDocSettingsPropSet->setPropertyValue("RecordChanges", aValue);
 
     CPPUNIT_ASSERT(xDocSettingsPropSet->getPropertyValue("RecordChanges") >>= recordChangesValue);
     CPPUNIT_ASSERT(xDocSettingsPropSet->getPropertyValue("IsRecordChangesProtected") >>= protectionValue);
diff --git a/sc/qa/extras/scannotationobj.cxx b/sc/qa/extras/scannotationobj.cxx
index 4aa3f23..4b4b048 100644
--- a/sc/qa/extras/scannotationobj.cxx
+++ b/sc/qa/extras/scannotationobj.cxx
@@ -88,12 +88,12 @@ uno::Reference< uno::XInterface > ScAnnontationObj::init()
     CPPUNIT_ASSERT_MESSAGE("Component not loaded",mxComponent.is());
 
     // tested annotation is in sheet 0 cell C2
-    table::CellAddress xCellAddress;
-    xCellAddress.Sheet = 0;
-    xCellAddress.Row = 1;
-    xCellAddress.Column = 2;
+    table::CellAddress aCellAddress;
+    aCellAddress.Sheet = 0;
+    aCellAddress.Row = 1;
+    aCellAddress.Column = 2;
 
-    return getAnnotation(xCellAddress);
+    return getAnnotation(aCellAddress);
 }
 
 void ScAnnontationObj::setUp()
diff --git a/sc/qa/extras/sccondformats.cxx b/sc/qa/extras/sccondformats.cxx
index 49e6c20..9f1f8c7 100644
--- a/sc/qa/extras/sccondformats.cxx
+++ b/sc/qa/extras/sccondformats.cxx
@@ -126,11 +126,11 @@ void ScConditionalFormatTest::testUndoAnchor()
     SfxObjectShell* pFoundShell = SfxObjectShell::GetShellFromComponent(xComponent);
     CPPUNIT_ASSERT_MESSAGE("Failed to access document shell", pFoundShell);
 
-    ScDocShell* xDocSh = dynamic_cast<ScDocShell*>(pFoundShell);
-    CPPUNIT_ASSERT(xDocSh);
+    ScDocShell* pDocSh = dynamic_cast<ScDocShell*>(pFoundShell);
+    CPPUNIT_ASSERT(pDocSh);
 
     // Check whether graphic imported well
-    ScDocument& rDoc = xDocSh->GetDocument();
+    ScDocument& rDoc = pDocSh->GetDocument();
     ScDrawLayer* pDrawLayer = rDoc.GetDrawLayer();
     CPPUNIT_ASSERT(pDrawLayer);
 
@@ -147,7 +147,7 @@ void ScConditionalFormatTest::testUndoAnchor()
     CPPUNIT_ASSERT_EQUAL(sal_uLong(864900), rGraphicObj.GetSizeBytes());
 
     // Get the document controller
-    ScTabViewShell* pViewShell = xDocSh->GetBestViewShell(false);
+    ScTabViewShell* pViewShell = pDocSh->GetBestViewShell(false);
     CPPUNIT_ASSERT(pViewShell);
 
     // Get the draw view of the document
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index 7b2e78f..037ed40 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -289,9 +289,7 @@ ScDocShellRef ScExportTest::saveAndReloadPassword(ScDocShell* pShell, const OUSt
     aStoreMedium.SetFilter(pExportFilter);
     SfxItemSet* pExportSet = aStoreMedium.GetItemSet();
     uno::Sequence< beans::NamedValue > aEncryptionData = comphelper::OStorageHelper::CreatePackageEncryptionData( "test" );
-    uno::Any xEncryptionData;
-    xEncryptionData <<= aEncryptionData;
-    pExportSet->Put(SfxUnoAnyItem(SID_ENCRYPTIONDATA, xEncryptionData));
+    pExportSet->Put(SfxUnoAnyItem(SID_ENCRYPTIONDATA, makeAny(aEncryptionData)));
 
     uno::Reference< embed::XStorage > xMedStorage = aStoreMedium.GetStorage();
     ::comphelper::OStorageHelper::SetCommonStorageEncryptionData( xMedStorage, aEncryptionData );
@@ -1114,18 +1112,18 @@ void ScExportTest::testRichTextCellFormat()
     CPPUNIT_ASSERT(pStyles);
 
     OString nFormatIdx = OString::number( aCellFormat.toInt32() + 1 );
-    const OString xPath1( "/x:styleSheet/x:cellXfs/x:xf[" + nFormatIdx + "]/x:alignment" );
+    const OString aXPath1( "/x:styleSheet/x:cellXfs/x:xf[" + nFormatIdx + "]/x:alignment" );
     // formatting record is set to wrap text
-    assertXPath(pStyles, xPath1, "wrapText", "true");
+    assertXPath(pStyles, aXPath1, "wrapText", "true");
 
     // see what font it references
-    const OString xPath2( "/x:styleSheet/x:cellXfs/x:xf[" + nFormatIdx +"]" );
-    OUString aFontId = getXPath(pStyles, xPath2, "fontId");
+    const OString aXPath2( "/x:styleSheet/x:cellXfs/x:xf[" + nFormatIdx +"]" );
+    OUString aFontId = getXPath(pStyles, aXPath2, "fontId");
     OString nFontIdx = OString::number( aFontId.toInt32() + 1 );
 
     // that font should be bold
-    const OString xPath3("/x:styleSheet/x:fonts/x:font[" + nFontIdx + "]/x:b");
-    assertXPath(pStyles, xPath3, "val", "true");
+    const OString aXPath3("/x:styleSheet/x:fonts/x:font[" + nFontIdx + "]/x:b");
+    assertXPath(pStyles, aXPath3, "val", "true");
 
     xDocSh->DoClose();
 }
diff --git a/sc/source/core/tool/interpr8.cxx b/sc/source/core/tool/interpr8.cxx
index 2c11734..321929a 100644
--- a/sc/source/core/tool/interpr8.cxx
+++ b/sc/source/core/tool/interpr8.cxx
@@ -1534,14 +1534,14 @@ void ScInterpreter::ScTextJoin_MS()
             pStack[ sp - 1 - i ] = p;
         }
 
-        // get xDelimiter and bSkipEmpty
-        std::vector< OUString > xDelimiter;
+        // get aDelimiters and bSkipEmpty
+        std::vector< OUString > aDelimiters;
         size_t nRefInList = 0;
         switch ( GetStackType() )
         {
             case svString:
             case svDouble:
-                xDelimiter.push_back( PopString().getString() );
+                aDelimiters.push_back( PopString().getString() );
                 break;
             case svSingleRef :
             {
@@ -1553,11 +1553,11 @@ void ScInterpreter::ScTextJoin_MS()
                 if ( !aCell.isEmpty() )
                 {
                     if ( aCell.hasString() )
-                        xDelimiter.push_back( aCell.getString( pDok ) );
+                        aDelimiters.push_back( aCell.getString( pDok ) );
                     else
                     {
                         if ( !aCell.hasEmptyValue() )
-                            xDelimiter.push_back( OUString::number( aCell.getValue() ) );
+                            aDelimiters.push_back( OUString::number( aCell.getValue() ) );
                     }
                 }
             }
@@ -1595,15 +1595,15 @@ void ScInterpreter::ScTextJoin_MS()
                         if ( !aCell.isEmpty() )
                         {
                             if ( aCell.hasString() )
-                                xDelimiter.push_back( aCell.getString( pDok ) );
+                                aDelimiters.push_back( aCell.getString( pDok ) );
                             else
                             {
                                 if ( !aCell.hasEmptyValue() )
-                                    xDelimiter.push_back( OUString::number( aCell.getValue() ) );
+                                    aDelimiters.push_back( OUString::number( aCell.getValue() ) );
                             }
                         }
                         else
-                            xDelimiter.push_back( "" );
+                            aDelimiters.push_back( "" );
                     }
                 }
             }
@@ -1628,15 +1628,15 @@ void ScInterpreter::ScTextJoin_MS()
                                 if ( !pMat->IsEmpty( j, k ) )
                                 {
                                     if ( pMat->IsString( j, k ) )
-                                        xDelimiter.push_back( pMat->GetString( j, k ).getString() );
+                                        aDelimiters.push_back( pMat->GetString( j, k ).getString() );
                                     else
                                     {
                                         if ( pMat->IsValue( j, k ) )
-                                            xDelimiter.push_back( OUString::number( pMat->GetDouble( j, k ) ) );
+                                            aDelimiters.push_back( OUString::number( pMat->GetDouble( j, k ) ) );
                                     }
                                 }
                                 else
-                                    xDelimiter.push_back( "" );
+                                    aDelimiters.push_back( "" );
                             }
                         }
                     }
@@ -1648,12 +1648,12 @@ void ScInterpreter::ScTextJoin_MS()
                 SetError( errIllegalArgument);
                 break;
         }
-        if ( xDelimiter.empty() )
+        if ( aDelimiters.empty() )
         {
             PushIllegalArgument();
             return;
         }
-        SCSIZE nSize = xDelimiter.size();
+        SCSIZE nSize = aDelimiters.size();
         bool bSkipEmpty = static_cast< bool >( GetDouble() );
         nParamCount -= 2;
 
@@ -1674,7 +1674,7 @@ void ScInterpreter::ScTextJoin_MS()
                     {
                         if ( !bFirst )
                         {
-                            aResBuf.append( xDelimiter[ nIdx ] );
+                            aResBuf.append( aDelimiters[ nIdx ] );
                             if ( nSize > 1 )
                             {
                                 if ( ++nIdx >= nSize )
@@ -1711,7 +1711,7 @@ void ScInterpreter::ScTextJoin_MS()
                     {
                         if ( !bFirst )
                         {
-                            aResBuf.append( xDelimiter[ nIdx ] );
+                            aResBuf.append( aDelimiters[ nIdx ] );
                             if ( nSize > 1 )
                             {
                                 if ( ++nIdx >= nSize )
@@ -1771,7 +1771,7 @@ void ScInterpreter::ScTextJoin_MS()
                             {
                                 if ( !bFirst )
                                 {
-                                    aResBuf.append( xDelimiter[ nIdx ] );
+                                    aResBuf.append( aDelimiters[ nIdx ] );
                                     if ( nSize > 1 )
                                     {
                                         if ( ++nIdx >= nSize )
@@ -1820,7 +1820,7 @@ void ScInterpreter::ScTextJoin_MS()
                                     {
                                         if ( !bFirst )
                                         {
-                                            aResBuf.append( xDelimiter[ nIdx ] );
+                                            aResBuf.append( aDelimiters[ nIdx ] );
                                             if ( nSize > 1 )
                                             {
                                                 if ( ++nIdx >= nSize )
@@ -1842,7 +1842,7 @@ void ScInterpreter::ScTextJoin_MS()
                     {
                         if ( !bFirst )
                         {
-                            aResBuf.append( xDelimiter[ nIdx ] );
+                            aResBuf.append( aDelimiters[ nIdx ] );
                             if ( nSize > 1 )
                             {
                                 if ( ++nIdx >= nSize )
diff --git a/sc/source/filter/excel/excdoc.cxx b/sc/source/filter/excel/excdoc.cxx
index e0819bb..a1a2a75 100644
--- a/sc/source/filter/excel/excdoc.cxx
+++ b/sc/source/filter/excel/excdoc.cxx
@@ -661,8 +661,8 @@ void ExcTable::FillAsTableXml()
 
     // list of HLINK records, generated by the cell table
     XclExpRecordRef xHyperlinks = mxCellTable->CreateRecord( EXC_ID_HLINK );
-    XclExpHyperlinkList* xHyperlinkList = dynamic_cast<XclExpHyperlinkList*>(xHyperlinks.get());
-    if( xHyperlinkList != nullptr && !xHyperlinkList->IsEmpty() )
+    XclExpHyperlinkList* pHyperlinkList = dynamic_cast<XclExpHyperlinkList*>(xHyperlinks.get());
+    if( pHyperlinkList != nullptr && !pHyperlinkList->IsEmpty() )
     {
         aRecList.AppendNewRecord( new XclExpXmlStartElementRecord( XML_hyperlinks ) );
         aRecList.AppendRecord( xHyperlinks );
diff --git a/sc/source/filter/excel/xelink.cxx b/sc/source/filter/excel/xelink.cxx
index 62f1735..4b91c2a 100644
--- a/sc/source/filter/excel/xelink.cxx
+++ b/sc/source/filter/excel/xelink.cxx
@@ -2089,13 +2089,13 @@ void XclExpSupbookBuffer::SaveXml( XclExpXmlStream& rStrm )
 
         sal_uInt16 nId = xRef->GetFileId();
         const OUString& rUrl = xRef->GetUrl();
-        ::std::pair< ::std::map< sal_uInt16, OUString >::iterator, bool > xInsert(
+        ::std::pair< ::std::map< sal_uInt16, OUString >::iterator, bool > aInsert(
                 aMap.insert( ::std::make_pair( nId, rUrl)));
-        if (!xInsert.second)
+        if (!aInsert.second)
         {
             SAL_WARN( "sc.filter", "XclExpSupbookBuffer::SaveXml: file ID already used: " << nId <<
-                    " wanted for " << rUrl << " and is " << (*xInsert.first).second <<
-                    (rUrl == (*xInsert.first).second ? " multiple Supbook not supported" : ""));
+                    " wanted for " << rUrl << " and is " << (*aInsert.first).second <<
+                    (rUrl == (*aInsert.first).second ? " multiple Supbook not supported" : ""));
             continue;
         }
 
diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx
index a9ed301..09bd891 100644
--- a/sc/source/filter/excel/xichart.cxx
+++ b/sc/source/filter/excel/xichart.cxx
@@ -2740,8 +2740,8 @@ bool XclImpChTypeGroup::HasConnectorLines() const
     // existence of connector lines (only in stacked bar charts)
     if ( !(maType.IsStacked() || maType.IsPercent()) || (maTypeInfo.meTypeCateg != EXC_CHTYPECATEG_BAR) )
         return false;
-    XclImpChLineFormatMap::const_iterator xConLine = m_ChartLines.find(EXC_CHCHARTLINE_CONNECT);
-    return (xConLine != m_ChartLines.end() && xConLine->second.HasLine());
+    XclImpChLineFormatMap::const_iterator aConLine = m_ChartLines.find(EXC_CHCHARTLINE_CONNECT);
+    return (aConLine != m_ChartLines.end() && aConLine->second.HasLine());
 }
 
 OUString XclImpChTypeGroup::GetSingleSeriesTitle() const
@@ -2817,9 +2817,9 @@ void XclImpChTypeGroup::ReadChChartLine( XclImpStream& rStrm )
     sal_uInt16 nLineId = rStrm.ReaduInt16();
     if( (rStrm.GetNextRecId() == EXC_ID_CHLINEFORMAT) && rStrm.StartNextRecord() )
     {
-        XclImpChLineFormat xLineFmt;
-        xLineFmt.ReadChLineFormat( rStrm );
-        m_ChartLines[ nLineId ] = xLineFmt;
+        XclImpChLineFormat aLineFmt;
+        aLineFmt.ReadChLineFormat( rStrm );
+        m_ChartLines[ nLineId ] = aLineFmt;
     }
 }
 
@@ -2919,11 +2919,11 @@ void XclImpChTypeGroup::CreateStockSeries( Reference< XChartType > xChartType, s
         aTypeProp.SetBoolProperty( EXC_CHPROP_SHOWFIRST, HasDropBars() );
         aTypeProp.SetBoolProperty( EXC_CHPROP_SHOWHIGHLOW, true );
         // hi-lo line format
-        XclImpChLineFormatMap::const_iterator xHiLoLine = m_ChartLines.find( EXC_CHCHARTLINE_HILO );
-        if (xHiLoLine != m_ChartLines.end())
+        XclImpChLineFormatMap::const_iterator aHiLoLine = m_ChartLines.find( EXC_CHCHARTLINE_HILO );
+        if (aHiLoLine != m_ChartLines.end())
         {
             ScfPropertySet aSeriesProp( xDataSeries );
-            xHiLoLine->second.Convert( GetChRoot(), aSeriesProp, EXC_CHOBJTYPE_HILOLINE );
+            aHiLoLine->second.Convert( GetChRoot(), aSeriesProp, EXC_CHOBJTYPE_HILOLINE );
         }
         // white dropbar format
         XclImpChDropBarMap::const_iterator itr = m_DropBars.find(EXC_CHDROPBAR_UP);
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index b38de69..2c33b96 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -1975,9 +1975,9 @@ void ScXMLExport::AddStyleFromCells(const uno::Reference<beans::XPropertySet>& x
     OUString sStyleName;
     sal_Int32 nNumberFormat(-1);
     sal_Int32 nValidationIndex(-1);
-    std::vector< XMLPropertyState > xPropStates(xCellStylesExportPropertySetMapper->Filter( xProperties ));
-    std::vector< XMLPropertyState >::iterator aItr(xPropStates.begin());
-    std::vector< XMLPropertyState >::iterator aEndItr(xPropStates.end());
+    std::vector< XMLPropertyState > aPropStates(xCellStylesExportPropertySetMapper->Filter( xProperties ));
+    std::vector< XMLPropertyState >::iterator aItr(aPropStates.begin());
+    std::vector< XMLPropertyState >::iterator aEndItr(aPropStates.end());
     sal_Int32 nCount(0);
     while (aItr != aEndItr)
     {
@@ -1992,8 +1992,8 @@ void ScXMLExport::AddStyleFromCells(const uno::Reference<beans::XPropertySet>& x
                     // if it is not the last property it is the property before the last property,
                     // so in the worst case only one property has to be copied, but in the best case no
                     // property has to be copied
-                    aItr = xPropStates.erase(aItr);
-                    aEndItr = xPropStates.end();    // old aEndItr is invalidated!
+                    aItr = aPropStates.erase(aItr);
+                    aEndItr = aPropStates.end();    // old aEndItr is invalidated!
                 }
                 break;
                 case CTF_SC_CELLSTYLE :
@@ -2027,17 +2027,17 @@ void ScXMLExport::AddStyleFromCells(const uno::Reference<beans::XPropertySet>& x
         }
     }
     if (nCount == 1) // this is the CellStyle and should be removed if alone
-        xPropStates.clear();
+        aPropStates.clear();
     if (nNumberFormat == -1)
         xProperties->getPropertyValue(SC_NUMBERFORMAT) >>= nNumberFormat;
     if (!sStyleName.isEmpty())
     {
-        if (!xPropStates.empty())
+        if (!aPropStates.empty())
         {
             sal_Int32 nIndex;
             if (pOldName)
             {
-                if (GetAutoStylePool()->AddNamed(*pOldName, XML_STYLE_FAMILY_TABLE_CELL, sStyleName, xPropStates))
+                if (GetAutoStylePool()->AddNamed(*pOldName, XML_STYLE_FAMILY_TABLE_CELL, sStyleName, aPropStates))
                 {
                     GetAutoStylePool()->RegisterName(XML_STYLE_FAMILY_TABLE_CELL, *pOldName);
                     // add to pCellStyles, so the name is found for normal sheets
@@ -2050,7 +2050,7 @@ void ScXMLExport::AddStyleFromCells(const uno::Reference<beans::XPropertySet>& x
             {
                 OUString sName;
                 bool bIsAutoStyle(true);
-                if (GetAutoStylePool()->Add(sName, XML_STYLE_FAMILY_TABLE_CELL, sStyleName, xPropStates))
+                if (GetAutoStylePool()->Add(sName, XML_STYLE_FAMILY_TABLE_CELL, sStyleName, aPropStates))
                 {
                     OUString* pTemp(new OUString(sName));
                     if (!pCellStyles->AddStyleName(pTemp, nIndex))
@@ -2107,11 +2107,11 @@ void ScXMLExport::AddStyleFromColumn(const uno::Reference<beans::XPropertySet>&
 {
     OUString SC_SCOLUMNPREFIX(XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_PREFIX);
 
-    std::vector<XMLPropertyState> xPropStates(xColumnStylesExportPropertySetMapper->Filter(xColumnProperties));
-    if(!xPropStates.empty())
+    std::vector<XMLPropertyState> aPropStates(xColumnStylesExportPropertySetMapper->Filter(xColumnProperties));
+    if(!aPropStates.empty())
     {
-        std::vector< XMLPropertyState >::iterator aItr(xPropStates.begin());
-        std::vector< XMLPropertyState >::iterator aEndItr(xPropStates.end());
+        std::vector< XMLPropertyState >::iterator aItr(aPropStates.begin());
+        std::vector< XMLPropertyState >::iterator aEndItr(aPropStates.end());
         while (aItr != aEndItr)
         {
             if (xColumnStylesPropertySetMapper->GetEntryContextId(aItr->mnIndex) == CTF_SC_ISVISIBLE)
@@ -2125,7 +2125,7 @@ void ScXMLExport::AddStyleFromColumn(const uno::Reference<beans::XPropertySet>&
         OUString sParent;
         if (pOldName)
         {
-            if (GetAutoStylePool()->AddNamed(*pOldName, XML_STYLE_FAMILY_TABLE_COLUMN, sParent, xPropStates))
+            if (GetAutoStylePool()->AddNamed(*pOldName, XML_STYLE_FAMILY_TABLE_COLUMN, sParent, aPropStates))
             {
                 GetAutoStylePool()->RegisterName(XML_STYLE_FAMILY_TABLE_COLUMN, *pOldName);
                 // add to pColumnStyles, so the name is found for normal sheets
@@ -2136,7 +2136,7 @@ void ScXMLExport::AddStyleFromColumn(const uno::Reference<beans::XPropertySet>&
         else
         {
             OUString sName;
-            if (GetAutoStylePool()->Add(sName, XML_STYLE_FAMILY_TABLE_COLUMN, sParent, xPropStates))
+            if (GetAutoStylePool()->Add(sName, XML_STYLE_FAMILY_TABLE_COLUMN, sParent, aPropStates))
             {
                 OUString* pTemp(new OUString(sName));
                 rIndex = pColumnStyles->AddStyleName(pTemp);
@@ -2152,13 +2152,13 @@ void ScXMLExport::AddStyleFromRow(const uno::Reference<beans::XPropertySet>& xRo
 {
     OUString SC_SROWPREFIX(XML_STYLE_FAMILY_TABLE_ROW_STYLES_PREFIX);
 
-    std::vector<XMLPropertyState> xPropStates(xRowStylesExportPropertySetMapper->Filter(xRowProperties));
-    if(!xPropStates.empty())
+    std::vector<XMLPropertyState> aPropStates(xRowStylesExportPropertySetMapper->Filter(xRowProperties));
+    if(!aPropStates.empty())
     {
         OUString sParent;
         if (pOldName)
         {
-            if (GetAutoStylePool()->AddNamed(*pOldName, XML_STYLE_FAMILY_TABLE_ROW, sParent, xPropStates))
+            if (GetAutoStylePool()->AddNamed(*pOldName, XML_STYLE_FAMILY_TABLE_ROW, sParent, aPropStates))
             {
                 GetAutoStylePool()->RegisterName(XML_STYLE_FAMILY_TABLE_ROW, *pOldName);
                 // add to pRowStyles, so the name is found for normal sheets
@@ -2169,7 +2169,7 @@ void ScXMLExport::AddStyleFromRow(const uno::Reference<beans::XPropertySet>& xRo
         else
         {
             OUString sName;
-            if (GetAutoStylePool()->Add(sName, XML_STYLE_FAMILY_TABLE_ROW, sParent, xPropStates))
+            if (GetAutoStylePool()->Add(sName, XML_STYLE_FAMILY_TABLE_ROW, sParent, aPropStates))
             {
                 OUString* pTemp(new OUString(sName));
                 rIndex = pRowStyles->AddStyleName(pTemp);
@@ -2305,10 +2305,10 @@ void ScXMLExport::ExportAutoStyles_()

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list