diff options
author | Noel Grandin <noel@peralex.com> | 2016-04-25 09:59:16 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-04-26 10:55:58 +0000 |
commit | e8fd5a07eca70912ddee45aaa34d434809b59fb7 (patch) | |
tree | d5dc890d12987cad73f5e64301f823ba23a97f2d | |
parent | e6adb3e8b4de3c0f78d249b83de19b849ef65b59 (diff) |
update loplugin stylepolice to check local pointers vars
are actually pointer vars.
Also convert from regex to normal code, so we can enable this
plugin all the time.
Change-Id: Ie36a25ecba61c18f99c77c77646d6459a443cbd1
Reviewed-on: https://gerrit.libreoffice.org/24391
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
116 files changed, 1092 insertions, 1044 deletions
diff --git a/basctl/source/basicide/breakpoint.cxx b/basctl/source/basicide/breakpoint.cxx index 31321fecbf88..411b99475d6d 100644 --- a/basctl/source/basicide/breakpoint.cxx +++ b/basctl/source/basicide/breakpoint.cxx @@ -42,8 +42,8 @@ BreakPointList::~BreakPointList() void BreakPointList::reset() { - for (BreakPoint* maBreakPoint : maBreakPoints) - delete maBreakPoint; + for (BreakPoint* pBreakPoint : maBreakPoints) + delete pBreakPoint; maBreakPoints.clear(); } diff --git a/basegfx/source/polygon/b2dpolypolygon.cxx b/basegfx/source/polygon/b2dpolypolygon.cxx index 2f7106608f50..bfaaedec6f6e 100644 --- a/basegfx/source/polygon/b2dpolypolygon.cxx +++ b/basegfx/source/polygon/b2dpolypolygon.cxx @@ -105,9 +105,9 @@ public: void setClosed(bool bNew) { - for(basegfx::B2DPolygon & maPolygon : maPolygons) + for(basegfx::B2DPolygon & rPolygon : maPolygons) { - maPolygon.setClosed(bNew); + rPolygon.setClosed(bNew); } } diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 85ae94f3f33c..f96f03af197f 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -1761,10 +1761,10 @@ void SbModule::GetCodeCompleteDataFromParse(CodeCompleteDataCache& aCache) if( (pSymDef->GetType() != SbxEMPTY) && (pSymDef->GetType() != SbxNULL) ) aCache.InsertGlobalVar( pSymDef->GetName(), pParser->aGblStrings.Find(pSymDef->GetTypeId()) ); - SbiSymPool& pChildPool = pSymDef->GetPool(); - for(sal_uInt16 j = 0; j < pChildPool.GetSize(); ++j ) + SbiSymPool& rChildPool = pSymDef->GetPool(); + for(sal_uInt16 j = 0; j < rChildPool.GetSize(); ++j ) { - SbiSymDef* pChildSymDef = pChildPool.Get(j); + SbiSymDef* pChildSymDef = rChildPool.Get(j); //std::cerr << "j: " << j << ", type: " << pChildSymDef->GetType() << "; name:" << pChildSymDef->GetName() << std::endl; if( (pChildSymDef->GetType() != SbxEMPTY) && (pChildSymDef->GetType() != SbxNULL) ) aCache.InsertLocalVar( pSymDef->GetName(), pChildSymDef->GetName(), pParser->aGblStrings.Find(pChildSymDef->GetTypeId()) ); diff --git a/chart2/source/model/main/BaseCoordinateSystem.cxx b/chart2/source/model/main/BaseCoordinateSystem.cxx index 593000023201..755cadfa3af7 100644 --- a/chart2/source/model/main/BaseCoordinateSystem.cxx +++ b/chart2/source/model/main/BaseCoordinateSystem.cxx @@ -184,8 +184,8 @@ BaseCoordinateSystem::~BaseCoordinateSystem() { try { - for(tAxisVecVecType::value_type & m_aAllAxi : m_aAllAxis) - ModifyListenerHelper::removeListenerFromAllElements( m_aAllAxi, m_xModifyEventForwarder ); + for(tAxisVecVecType::value_type & i : m_aAllAxis) + ModifyListenerHelper::removeListenerFromAllElements( i, m_xModifyEventForwarder ); ModifyListenerHelper::removeListenerFromAllElements( m_aChartTypes, m_xModifyEventForwarder ); } catch( const uno::Exception & ex ) diff --git a/comphelper/source/misc/threadpool.cxx b/comphelper/source/misc/threadpool.cxx index ddc1502fda00..403612289bae 100644 --- a/comphelper/source/misc/threadpool.cxx +++ b/comphelper/source/misc/threadpool.cxx @@ -102,8 +102,8 @@ ThreadPool::ThreadPool( sal_Int32 nWorkers ) : maTasksComplete.set(); osl::MutexGuard aGuard( maGuard ); - for(rtl::Reference<ThreadWorker> & maWorker : maWorkers) - maWorker->launch(); + for(rtl::Reference<ThreadWorker> & rpWorker : maWorkers) + rpWorker->launch(); } ThreadPool::~ThreadPool() @@ -154,8 +154,8 @@ void ThreadPool::pushTask( ThreadTask *pTask ) maTasks.insert( maTasks.begin(), pTask ); // horrible beyond belief: - for(rtl::Reference<ThreadWorker> & maWorker : maWorkers) - maWorker->signalNewWork(); + for(rtl::Reference<ThreadWorker> & rpWorker : maWorkers) + rpWorker->signalNewWork(); maTasksComplete.reset(); } diff --git a/compilerplugins/clang/store/stylepolice.cxx b/compilerplugins/clang/store/stylepolice.cxx deleted file mode 100644 index 96b5f72c00a7..000000000000 --- a/compilerplugins/clang/store/stylepolice.cxx +++ /dev/null @@ -1,80 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#include <regex> -#include <string> -#include <set> - -#include "compat.hxx" -#include "plugin.hxx" - -// Check for some basic naming mismatches which make the code harder to read - -namespace { - -static const std::regex aMemberRegex("^m([abnprsx]?[A-Z]|[_][a-zA-Z])"); - -class StylePolice : - public RecursiveASTVisitor<StylePolice>, public loplugin::Plugin -{ -public: - explicit StylePolice(InstantiationData const & data): Plugin(data) {} - - virtual void run() override { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); } - - bool VisitVarDecl(const VarDecl *); -private: - StringRef getFilename(SourceLocation loc); -}; - -StringRef StylePolice::getFilename(SourceLocation loc) -{ - SourceLocation spellingLocation = compiler.getSourceManager().getSpellingLoc(loc); - StringRef name { compiler.getSourceManager().getFilename(spellingLocation) }; - return name; -} - -bool StylePolice::VisitVarDecl(const VarDecl * varDecl) -{ - if (ignoreLocation(varDecl)) { - return true; - } - StringRef aFileName = getFilename(varDecl->getLocStart()); - std::string name = varDecl->getName(); - - // these names appear to be taken from some scientific paper - if (aFileName == SRCDIR "/scaddins/source/analysis/bessel.cxx" ) { - return true; - } - // lots of places where we are storing a "method id" here - if (aFileName.startswith(SRCDIR "/connectivity/source/drivers/jdbc") && name.compare(0,3,"mID") == 0) { - return true; - } - - if (!varDecl->isLocalVarDecl()) { - return true; - } - - if (std::regex_search(name, aMemberRegex)) - { - report( - DiagnosticsEngine::Warning, - "this local variable follows our member field naming convention, which is confusing", - varDecl->getLocation()) - << varDecl->getType() << varDecl->getSourceRange(); - } - return true; -} - - -loplugin::Plugin::Registration< StylePolice > X("stylepolice"); - -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/compilerplugins/clang/stylepolice.cxx b/compilerplugins/clang/stylepolice.cxx new file mode 100644 index 000000000000..93b1fcea5a57 --- /dev/null +++ b/compilerplugins/clang/stylepolice.cxx @@ -0,0 +1,142 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include <regex> +#include <string> +#include <set> + +#include "compat.hxx" +#include "plugin.hxx" + +// Check for some basic naming mismatches which make the code harder to read + +namespace { + +class StylePolice : + public RecursiveASTVisitor<StylePolice>, public loplugin::Plugin +{ +public: + explicit StylePolice(InstantiationData const & data): Plugin(data) {} + + virtual void run() override { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); } + + bool VisitVarDecl(const VarDecl *); +private: + StringRef getFilename(SourceLocation loc); +}; + +StringRef StylePolice::getFilename(SourceLocation loc) +{ + SourceLocation spellingLocation = compiler.getSourceManager().getSpellingLoc(loc); + StringRef name { compiler.getSourceManager().getFilename(spellingLocation) }; + return name; +} + +bool startswith(const std::string& rStr, const char* pSubStr) { + return rStr.compare(0, strlen(pSubStr), pSubStr) == 0; +} +bool isUpperLetter(char c) { + return c >= 'A' && c <= 'Z'; +} +bool isLowerLetter(char c) { + return c >= 'a' && c <= 'z'; +} +bool isIdentifierLetter(char c) { + return isUpperLetter(c) || isLowerLetter(c); +} +bool matchPointerVar(const std::string& s) { + return s.size() > 2 && s[0] == 'p' && isUpperLetter(s[1]); +} +bool matchMember(const std::string& s) { + return s.size() > 3 && s[0] == 'm' + && ( ( strchr("abnprsx", s[1]) && isUpperLetter(s[2]) ) + || ( s[1] == '_' && isIdentifierLetter(s[2]) ) ); +} + +bool StylePolice::VisitVarDecl(const VarDecl * varDecl) +{ + if (ignoreLocation(varDecl)) { + return true; + } + StringRef aFileName = getFilename(varDecl->getLocStart()); + std::string name = varDecl->getName(); + + if (!varDecl->isLocalVarDecl()) { + return true; + } + + if (matchMember(name)) + { + // these names appear to be taken from some scientific paper + if (aFileName == SRCDIR "/scaddins/source/analysis/bessel.cxx" ) { + } + // lots of places where we are storing a "method id" here + else if (aFileName.startswith(SRCDIR "/connectivity/source/drivers/jdbc") && name.compare(0,3,"mID") == 0) { + } + else { + report( + DiagnosticsEngine::Warning, + "this local variable follows our member field naming convention, which is confusing", + varDecl->getLocation()) + << varDecl->getType() << varDecl->getSourceRange(); + } + } + + QualType qt = varDecl->getType().getDesugaredType(compiler.getASTContext()).getCanonicalType(); + qt = qt.getNonReferenceType(); + std::string typeName = qt.getAsString(); + if (startswith(typeName, "const ")) + typeName = typeName.substr(6); + if (startswith(typeName, "class ")) + typeName = typeName.substr(6); + std::string aOriginalTypeName = varDecl->getType().getAsString(); + if (!qt->isPointerType() && !qt->isArrayType() && !qt->isFunctionPointerType() && !qt->isMemberPointerType() + && matchPointerVar(name) + && !startswith(typeName, "boost::intrusive_ptr") + && !startswith(typeName, "boost::optional") + && !startswith(typeName, "boost::shared_ptr") + && !startswith(typeName, "com::sun::star::uno::Reference") + && !startswith(typeName, "cppu::OInterfaceIteratorHelper") + && !startswith(typeName, "formula::FormulaCompiler::CurrentFactor") + && aOriginalTypeName != "GLXPixmap" + && !startswith(typeName, "rtl::Reference") + && !startswith(typeName, "ScopedVclPtr") + && !startswith(typeName, "std::mem_fun") + && !startswith(typeName, "std::shared_ptr") + && !startswith(typeName, "shared_ptr") // weird issue in slideshow + && !startswith(typeName, "std::unique_ptr") + && !startswith(typeName, "unique_ptr") // weird issue in include/vcl/threadex.hxx + && !startswith(typeName, "std::weak_ptr") + && !startswith(typeName, "struct _LOKDocViewPrivate") + && !startswith(typeName, "sw::UnoCursorPointer") + && !startswith(typeName, "tools::SvRef") + && !startswith(typeName, "VclPtr") + && !startswith(typeName, "vcl::ScopedBitmapAccess") + // lots of the code seems to regard iterator objects as being "pointer-like" + && typeName.find("iterator<") == std::string::npos + && aOriginalTypeName != "sal_IntPtr" ) + { + if (aFileName.startswith(SRCDIR "/bridges/") ) { + } else if (aFileName.startswith(SRCDIR "/vcl/source/fontsubset/sft.cxx") ) { + } else { + report( + DiagnosticsEngine::Warning, + "this local variable of type '%0' follows our pointer naming convention, but it is not a pointer, %1", + varDecl->getLocation()) + << typeName << aOriginalTypeName << varDecl->getSourceRange(); + } + } + return true; +} + +loplugin::Plugin::Registration< StylePolice > X("stylepolice"); + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/options/personalization.cxx b/cui/source/options/personalization.cxx index 799da445cfc5..d7816883cfa1 100644 --- a/cui/source/options/personalization.cxx +++ b/cui/source/options/personalization.cxx @@ -131,11 +131,11 @@ IMPL_LINK_TYPED( SelectPersonaDialog, SearchPersonas, Button*, pButton, void ) searchTerm = m_pEdit->GetText(); else { - for(VclPtr<PushButton> & m_vSearchSuggestion : m_vSearchSuggestions) + for(VclPtr<PushButton> & i : m_vSearchSuggestions) { - if( pButton == m_vSearchSuggestion ) + if( pButton == i ) { - searchTerm = m_vSearchSuggestion->GetDisplayText(); + searchTerm = i->GetDisplayText(); break; } } @@ -288,8 +288,8 @@ void SvxPersonalizationTabPage::dispose() m_pDefaultPersona.clear(); m_pOwnPersona.clear(); m_pSelectPersona.clear(); - for (VclPtr<PushButton> & m_vDefaultPersonaImage : m_vDefaultPersonaImages) - m_vDefaultPersonaImage.clear(); + for (VclPtr<PushButton> & i : m_vDefaultPersonaImages) + i.clear(); m_pExtensionPersonaPreview.clear(); m_pPersonaList.clear(); m_pExtensionLabel.clear(); diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index 1450f6798607..6cf6e03deea8 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -1997,21 +1997,18 @@ VectorOfNodes OfaTreeOptionsDialog::LoadNodes( bool bAlreadyOpened = false; if ( pNode->m_aGroupedLeaves.size() > 0 ) { - for (std::vector<OptionsLeaf*> & m_aGroupedLeave : pNode->m_aGroupedLeaves) + for (std::vector<OptionsLeaf*> & rGroup : pNode->m_aGroupedLeaves) { - if ( m_aGroupedLeave.size() > 0 && - m_aGroupedLeave[0]->m_sGroupId - == sLeafGrpId ) + if ( rGroup.size() > 0 && + rGroup[0]->m_sGroupId == sLeafGrpId ) { sal_uInt32 l = 0; - for ( ; l < m_aGroupedLeave.size(); ++l ) + for ( ; l < rGroup.size(); ++l ) { - if ( m_aGroupedLeave[l]-> - m_nGroupIndex >= nLeafGrpIdx ) + if ( rGroup[l]->m_nGroupIndex >= nLeafGrpIdx ) break; } - m_aGroupedLeave.insert( - m_aGroupedLeave.begin() + l, pLeaf ); + rGroup.insert( rGroup.begin() + l, pLeaf ); bAlreadyOpened = true; break; } diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx index d1863990e9b7..61c508da0df4 100644 --- a/dbaccess/source/filter/xml/xmlExport.cxx +++ b/dbaccess/source/filter/xml/xmlExport.cxx @@ -498,9 +498,9 @@ void ODBExport::exportApplicationConnectionSettings(const TSettingsMap& _aSettin ,XML_MAX_ROW_COUNT ,XML_SUPPRESS_VERSION_COLUMNS }; - for (::xmloff::token::XMLTokenEnum pSetting : pSettings) + for (::xmloff::token::XMLTokenEnum i : pSettings) { - TSettingsMap::const_iterator aFind = _aSettings.find(pSetting); + TSettingsMap::const_iterator aFind = _aSettings.find(i); if ( aFind != _aSettings.end() ) AddAttribute(XML_NAMESPACE_DB, aFind->first,aFind->second); } @@ -531,9 +531,9 @@ void ODBExport::exportDriverSettings(const TSettingsMap& _aSettings) ,XML_IS_FIRST_ROW_HEADER_LINE ,XML_PARAMETER_NAME_SUBSTITUTION }; - for (::xmloff::token::XMLTokenEnum pSetting : pSettings) + for (::xmloff::token::XMLTokenEnum nSetting : pSettings) { - TSettingsMap::const_iterator aFind = _aSettings.find(pSetting); + TSettingsMap::const_iterator aFind = _aSettings.find(nSetting); if ( aFind != _aSettings.end() ) AddAttribute(XML_NAMESPACE_DB, aFind->first,aFind->second); } diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx index aaabfb2bb024..bc019394e32e 100644 --- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx +++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx @@ -212,8 +212,8 @@ OAppDetailPageHelper::OAppDetailPageHelper(vcl::Window* _pParent,OAppBorderWindo m_xWindow = VCLUnoHelper::GetInterface( m_pTablePreview ); SetUniqueId(UID_APP_DETAILPAGE_HELPER); - for (VclPtr<DBTreeListBox> & m_pList : m_pLists) - m_pList = nullptr; + for (VclPtr<DBTreeListBox> & rpBox : m_pLists) + rpBox = nullptr; ImplInitSettings(); } @@ -235,14 +235,14 @@ void OAppDetailPageHelper::dispose() OSL_FAIL("Exception thrown while disposing preview frame!"); } - for (VclPtr<DBTreeListBox> & m_pList : m_pLists) + for (VclPtr<DBTreeListBox> & rpBox : m_pLists) { - if ( m_pList ) + if ( rpBox ) { - m_pList->clearCurrentSelection(); - m_pList->Hide(); - m_pList->clearCurrentSelection(); // why a second time? - m_pList.disposeAndClear(); + rpBox->clearCurrentSelection(); + rpBox->Hide(); + rpBox->clearCurrentSelection(); // why a second time? + rpBox.disposeAndClear(); } } m_aMenu.reset(); @@ -764,10 +764,10 @@ DBTreeListBox* OAppDetailPageHelper::createTree( DBTreeListBox* _pTreeView, cons void OAppDetailPageHelper::clearPages() { showPreview(nullptr); - for (VclPtr<DBTreeListBox> & m_pList : m_pLists) + for (VclPtr<DBTreeListBox> & rpBox : m_pLists) { - if ( m_pList ) - m_pList->Clear(); + if ( rpBox ) + rpBox->Clear(); } } @@ -1156,9 +1156,9 @@ IMPL_LINK_NOARG_TYPED(OAppDetailPageHelper, OnDropdownClickHdl, ToolBox*, void) , SID_DB_APP_VIEW_DOCINFO_PREVIEW }; - for(unsigned short pAction : pActions) + for(unsigned short nAction : pActions) { - aMenu->CheckItem(pAction,m_aMenu->IsItemChecked(pAction)); + aMenu->CheckItem(nAction,m_aMenu->IsItemChecked(nAction)); } aMenu->EnableItem( SID_DB_APP_VIEW_DOCINFO_PREVIEW, getBorderWin().getView()->getAppController().isCommandEnabled(SID_DB_APP_VIEW_DOCINFO_PREVIEW) ); diff --git a/dbaccess/source/ui/dlg/advancedsettings.cxx b/dbaccess/source/ui/dlg/advancedsettings.cxx index 69b70bb72665..e6d7160e8b8c 100644 --- a/dbaccess/source/ui/dlg/advancedsettings.cxx +++ b/dbaccess/source/ui/dlg/advancedsettings.cxx @@ -194,9 +194,9 @@ namespace dbaui { std::addressof(m_pRespectDriverResultSetType), "resulttype", DSID_RESPECTRESULTSETTYPE, false } }; - for ( const BooleanSettingDesc& pCopy : aSettings ) + for ( const BooleanSettingDesc& rDesc : aSettings ) { - m_aBooleanSettings.push_back( pCopy ); + m_aBooleanSettings.push_back( rDesc ); } } diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx index c73e680f5063..93bde3decb7f 100644 --- a/desktop/qa/desktop_lib/test_desktop_lib.cxx +++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx @@ -774,10 +774,10 @@ void DesktopLOKTest::testSheetOperations() CPPUNIT_ASSERT_EQUAL(pDocument->pClass->getParts(pDocument), 6); - std::vector<OString> pExpected = { "FirstSheet", "Renamed", "Sheet3", "Sheet4", "Sheet5", "LastSheet" }; + std::vector<OString> aExpected = { "FirstSheet", "Renamed", "Sheet3", "Sheet4", "Sheet5", "LastSheet" }; for (int i = 0; i < 6; ++i) { - CPPUNIT_ASSERT_EQUAL(pExpected[i], OString(pDocument->pClass->getPartName(pDocument, i))); + CPPUNIT_ASSERT_EQUAL(aExpected[i], OString(pDocument->pClass->getPartName(pDocument, i))); } comphelper::LibreOfficeKit::setActive(false); @@ -831,13 +831,13 @@ void DesktopLOKTest::testSheetSelections() { char* pUsedMimeType = nullptr; char* pCopiedContent = pDocument->pClass->getTextSelection(pDocument, nullptr, &pUsedMimeType); - std::vector<int> pExpected = {5, 6, 7, 8, 9}; + std::vector<int> aExpected = {5, 6, 7, 8, 9}; std::istringstream iss(pCopiedContent); - for (size_t i = 0; i < pExpected.size(); i++) + for (size_t i = 0; i < aExpected.size(); i++) { std::string token; iss >> token; - CPPUNIT_ASSERT_EQUAL(pExpected[i], std::stoi(token)); + CPPUNIT_ASSERT_EQUAL(aExpected[i], std::stoi(token)); } free(pUsedMimeType); @@ -877,13 +877,13 @@ void DesktopLOKTest::testSheetSelections() { char* pUsedMimeType = nullptr; char* pCopiedContent = pDocument->pClass->getTextSelection(pDocument, nullptr, &pUsedMimeType); - std::vector<int> pExpected = { 8 }; + std::vector<int> aExpected = { 8 }; std::istringstream iss(pCopiedContent); - for (size_t i = 0; i < pExpected.size(); i++) + for (size_t i = 0; i < aExpected.size(); i++) { std::string token; iss >> token; - CPPUNIT_ASSERT_EQUAL(pExpected[i], std::stoi(token)); + CPPUNIT_ASSERT_EQUAL(aExpected[i], std::stoi(token)); } free(pUsedMimeType); diff --git a/drawinglayer/source/animation/animationtiming.cxx b/drawinglayer/source/animation/animationtiming.cxx index 3d6b432c05a2..72400c1cd5dd 100644 --- a/drawinglayer/source/animation/animationtiming.cxx +++ b/drawinglayer/source/animation/animationtiming.cxx @@ -178,9 +178,9 @@ namespace drawinglayer AnimationEntryList::~AnimationEntryList() { - for(AnimationEntry* maEntrie : maEntries) + for(AnimationEntry* i : maEntries) { - delete maEntrie; + delete i; } } @@ -188,9 +188,9 @@ namespace drawinglayer { AnimationEntryList* pNew = new AnimationEntryList(); - for(AnimationEntry* maEntrie : maEntries) + for(AnimationEntry* i : maEntries) { - pNew->append(*maEntrie); + pNew->append(*i); } return pNew; @@ -281,9 +281,9 @@ namespace drawinglayer { AnimationEntryLoop* pNew = new AnimationEntryLoop(mnRepeat); - for(AnimationEntry* maEntrie : maEntries) + for(AnimationEntry* i : maEntries) { - pNew->append(*maEntrie); + pNew->append(*i); } return pNew; diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx index 7ac78d69dd70..38d749b581fe 100644 --- a/editeng/source/editeng/editdoc.cxx +++ b/editeng/source/editeng/editdoc.cxx @@ -803,9 +803,9 @@ void ParaPortionList::Reset() long ParaPortionList::GetYOffset(const ParaPortion* pPPortion) const { long nHeight = 0; - for (const auto & maPortion : maPortions) + for (const auto & rPortion : maPortions) { - const ParaPortion* pTmpPortion = maPortion.get(); + const ParaPortion* pTmpPortion = rPortion.get(); if ( pTmpPortion == pPPortion ) return nHeight; nHeight += pTmpPortion->GetHeight(); diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index e3552f79bbc2..2a261aebd244 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -1794,16 +1794,16 @@ static bool lcl_FindAbbreviation(const SvStringsISortDtor* pList, const OUString if( nPos < pList->size() ) { OUString sLowerWord(sWord.toAsciiLowerCase()); - OUString pAbk; + OUString sAbr; for( sal_uInt16 n = nPos; n < pList->size() && - '~' == ( pAbk = (*pList)[ n ])[ 0 ]; + '~' == ( sAbr = (*pList)[ n ])[ 0 ]; ++n ) { // ~ and ~. are not allowed! - if( 2 < pAbk.getLength() && pAbk.getLength() - 1 <= sWord.getLength() ) + if( 2 < sAbr.getLength() && sAbr.getLength() - 1 <= sWord.getLength() ) { - OUString sLowerAbk(pAbk.toAsciiLowerCase()); + OUString sLowerAbk(sAbr.toAsciiLowerCase()); for (sal_Int32 i = sLowerAbk.getLength(), ii = sLowerWord.getLength(); i;) { if( !--i ) // agrees diff --git a/extensions/source/scanner/grid.cxx b/extensions/source/scanner/grid.cxx index 40234aec61dd..41917afe421b 100644 --- a/extensions/source/scanner/grid.cxx +++ b/extensions/source/scanner/grid.cxx @@ -519,9 +519,9 @@ void GridWindow::drawNew(vcl::RenderContext& rRenderContext) void GridWindow::drawHandles(vcl::RenderContext& rRenderContext) { - for(impHandle & m_aHandle : m_aHandles) + for(impHandle & rHandle : m_aHandles) { - m_aHandle.draw(rRenderContext, m_aMarkerBitmap); + rHandle.draw(rRenderContext, m_aMarkerBitmap); } } diff --git a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx index d177204a726d..88d829dead0b 100644 --- a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx +++ b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx @@ -137,7 +137,7 @@ bool SAL_CALL XmlFilterAdaptor::importImpl( const Sequence< css::beans::Property Reference< XStyleFamiliesSupplier > xstylefamiliessupplier(mxDoc, UNO_QUERY); Reference< XStyleLoader > xstyleLoader (xstylefamiliessupplier->getStyleFamilies(), UNO_QUERY); if(xstyleLoader.is()){ - Sequence<css::beans::PropertyValue> pValue=xstyleLoader->getStyleLoaderOptions(); + Sequence<css::beans::PropertyValue> aValue = xstyleLoader->getStyleLoaderOptions(); //Load the Styles from the Template URL Supplied in the TypeDetection file if(!comphelper::isFileUrl(msTemplateName)) @@ -148,7 +148,7 @@ bool SAL_CALL XmlFilterAdaptor::importImpl( const Sequence< css::beans::Property msTemplateName=PathString.concat(msTemplateName); } - xstyleLoader->loadStylesFromURL(msTemplateName,pValue); + xstyleLoader->loadStylesFromURL(msTemplateName,aValue); } } diff --git a/filter/source/xsltfilter/OleHandler.cxx b/filter/source/xsltfilter/OleHandler.cxx index d9f72be2b7f8..d79cd01713a1 100644 --- a/filter/source/xsltfilter/OleHandler.cxx +++ b/filter/source/xsltfilter/OleHandler.cxx @@ -108,17 +108,17 @@ namespace XSLT return "Not Found:";// + streamName; } //The first four byte are the length of the uncompressed data - Sequence<sal_Int8> pLength(4); + Sequence<sal_Int8> aLength(4); Reference<XSeekable> xSeek(subStream, UNO_QUERY); xSeek->seek(0); //Get the uncompressed length - int readbytes = subStream->readBytes(pLength, 4); + int readbytes = subStream->readBytes(aLength, 4); if (4 != readbytes) { return "Can not read the length."; } - int oleLength = (pLength[0] << 0) + (pLength[1] << 8) - + (pLength[2] << 16) + (pLength[3] << 24); + int oleLength = (aLength[0] << 0) + (aLength[1] << 8) + + (aLength[2] << 16) + (aLength[3] << 24); Sequence<sal_Int8> content(oleLength); //Read all bytes. The compressed length should less then the uncompressed length readbytes = subStream->readBytes(content, oleLength); diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx index 28332ed8802c..caa60fd924ff 100644 --- a/formula/source/core/api/token.cxx +++ b/formula/source/core/api/token.cxx @@ -1615,10 +1615,10 @@ const FormulaToken* FormulaTokenIterator::PeekNextOperator() } if (!t && maStack.size() > 1) { - FormulaTokenIterator::Item pHere = maStack.back(); + FormulaTokenIterator::Item aHere = maStack.back(); maStack.pop_back(); t = PeekNextOperator(); - maStack.push_back(pHere); + maStack.push_back(aHere); } return t; } diff --git a/helpcompiler/source/HelpIndexer_main.cxx b/helpcompiler/source/HelpIndexer_main.cxx index 85ff29a39b9d..82822d897445 100644 --- a/helpcompiler/source/HelpIndexer_main.cxx +++ b/helpcompiler/source/HelpIndexer_main.cxx @@ -20,9 +20,9 @@ int main(int argc, char **argv) { try { - const std::string pLang("-lang"); - const std::string pModule("-mod"); - const std::string pDir("-dir"); + const std::string aLang("-lang"); + const std::string aModule("-mod"); + const std::string aDir("-dir"); std::string lang; std::string module; @@ -30,19 +30,19 @@ int main(int argc, char **argv) bool error = false; for (int i = 1; i < argc; ++i) { - if (pLang.compare(argv[i]) == 0) { + if (aLang.compare(argv[i]) == 0) { if (i + 1 < argc) { lang = argv[++i]; } else { error = true; } - } else if (pModule.compare(argv[i]) == 0) { + } else if (aModule.compare(argv[i]) == 0) { if (i + 1 < argc) { module = argv[++i]; } else { error = true; } - } else if (pDir.compare(argv[i]) == 0) { + } else if (aDir.compare(argv[i]) == 0) { if (i + 1 < argc) { dir = argv[++i]; } else { diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx index 8f63eed4ea4f..f36352ebb781 100644 --- a/hwpfilter/source/hwpreader.cxx +++ b/hwpfilter/source/hwpreader.cxx @@ -954,43 +954,43 @@ void HwpReader::makeMasterStyles() int i; int nMax = hwpfile.getMaxSettedPage(); - std::deque<PageSetting> pSet(nMax + 1); + std::deque<PageSetting> aSet(nMax + 1); for( i = 0 ; i < hwpfile.getPageNumberCount() ; i++ ) { ShowPageNum *pn = hwpfile.getPageNumber(i); - pSet[pn->m_nPageNumber].pagenumber = pn; - pSet[pn->m_nPageNumber].bIsSet = true; + aSet[pn->m_nPageNumber].pagenumber = pn; + aSet[pn->m_nPageNumber].bIsSet = true; } for( i = 0 ; i < hwpfile.getHeaderFooterCount() ; i++ ) { HeaderFooter* hf = hwpfile.getHeaderFooter(i); - pSet[hf->m_nPageNumber].bIsSet = true; + aSet[hf->m_nPageNumber].bIsSet = true; if( hf->type == 0 ) // header { switch( hf->where ) { case 0 : - pSet[hf->m_nPageNumber].header = hf; - pSet[hf->m_nPageNumber].header_even = nullptr; - pSet[hf->m_nPageNumber].header_odd = nullptr; + aSet[hf->m_nPageNumber].header = hf; + aSet[hf->m_nPageNumber].header_even = nullptr; + aSet[hf->m_nPageNumber].header_odd = nullptr; break; case 1: - pSet[hf->m_nPageNumber].header_even = hf; - if( pSet[hf->m_nPageNumber].header ) + aSet[hf->m_nPageNumber].header_even = hf; + if( aSet[hf->m_nPageNumber].header ) { - pSet[hf->m_nPageNumber].header_odd = - pSet[hf->m_nPageNumber].header; - pSet[hf->m_nPageNumber].header = nullptr; + aSet[hf->m_nPageNumber].header_odd = + aSet[hf->m_nPageNumber].header; + aSet[hf->m_nPageNumber].header = nullptr; } break; case 2: - pSet[hf->m_nPageNumber].header_odd = hf; - if( pSet[hf->m_nPageNumber].header ) + aSet[hf->m_nPageNumber].header_odd = hf; + if( aSet[hf->m_nPageNumber].header ) { - pSet[hf->m_nPageNumber].header_even = - pSet[hf->m_nPageNumber].header; - pSet[hf->m_nPageNumber].header = nullptr; + aSet[hf->m_nPageNumber].header_even = + aSet[hf->m_nPageNumber].header; + aSet[hf->m_nPageNumber].header = nullptr; } break; } @@ -1000,26 +1000,26 @@ void HwpReader::makeMasterStyles() switch( hf->where ) { case 0 : - pSet[hf->m_nPageNumber].footer = hf; - pSet[hf->m_nPageNumber].footer_even = nullptr; - pSet[hf->m_nPageNumber].footer_odd = nullptr; + aSet[hf->m_nPageNumber].footer = hf; + aSet[hf->m_nPageNumber].footer_even = nullptr; + aSet[hf->m_nPageNumber].footer_odd = nullptr; break; case 1: - pSet[hf->m_nPageNumber].footer_even = hf; - if( pSet[hf->m_nPageNumber].footer ) + aSet[hf->m_nPageNumber].footer_even = hf; + if( aSet[hf->m_nPageNumber].footer ) { - pSet[hf->m_nPageNumber].footer_odd = - pSet[hf->m_nPageNumber].footer; - pSet[hf->m_nPageNumber].footer = nullptr; + aSet[hf->m_nPageNumber].footer_odd = + aSet[hf->m_nPageNumber].footer; + aSet[hf->m_nPageNumber].footer = nullptr; } break; case 2: - pSet[hf->m_nPageNumber].footer_odd = hf; - if( pSet[hf->m_nPageNumber].footer ) + aSet[hf->m_nPageNumber].footer_odd = hf; + if( aSet[hf->m_nPageNumber].footer ) { - pSet[hf->m_nPageNumber].footer_even = - pSet[hf->m_nPageNumber].footer; - pSet[hf->m_nPageNumber].footer = nullptr; + aSet[hf->m_nPageNumber].footer_even = + aSet[hf->m_nPageNumber].footer; + aSet[hf->m_nPageNumber].footer = nullptr; } break; } @@ -1046,47 +1046,47 @@ void HwpReader::makeMasterStyles() rstartEl("style:master-page", rList); pList->clear(); - if( pSet[i].bIsSet ) /* If you've changed the current setting */ + if( aSet[i].bIsSet ) /* If you've changed the current setting */ { - if( !pSet[i].pagenumber ){ + if( !aSet[i].pagenumber ){ if( pPrevSet && pPrevSet->pagenumber ) - pSet[i].pagenumber = pPrevSet->pagenumber; + aSet[i].pagenumber = pPrevSet->pagenumber; } - if( pSet[i].pagenumber ) + if( aSet[i].pagenumber ) { - if( pSet[i].pagenumber->where == 7 && pSet[i].header ) + if( aSet[i].pagenumber->where == 7 && aSet[i].header ) { - pSet[i].header_even = pSet[i].header; - pSet[i].header_odd = pSet[i].header; - pSet[i].header = nullptr; + aSet[i].header_even = aSet[i].header; + aSet[i].header_odd = aSet[i].header; + aSet[i].header = nullptr; } - if( pSet[i].pagenumber->where == 8 && pSet[i].footer ) + if( aSet[i].pagenumber->where == 8 && aSet[i].footer ) { - pSet[i].footer_even = pSet[i].footer; - pSet[i].footer_odd = pSet[i].footer; - pSet[i].footer = nullptr; + aSet[i].footer_even = aSet[i].footer; + aSet[i].footer_odd = aSet[i].footer; + aSet[i].footer = nullptr; } } - if( !pSet[i].header_even && pPrevSet && pPrevSet->header_even ) + if( !aSet[i].header_even && pPrevSet && pPrevSet->header_even ) { - pSet[i].header_even = pPrevSet->header_even; + aSet[i].header_even = pPrevSet->header_even; } - if( !pSet[i].header_odd && pPrevSet && pPrevSet->header_odd ) + if( !aSet[i].header_odd && pPrevSet && pPrevSet->header_odd ) { - pSet[i].header_odd = pPrevSet->header_odd; + aSet[i].header_odd = pPrevSet->header_odd; } - if( !pSet[i].footer_even && pPrevSet && pPrevSet->footer_even ) + if( !aSet[i].footer_even && pPrevSet && pPrevSet->footer_even ) { - pSet[i].footer_even = pPrevSet->footer_even; + aSet[i].footer_even = pPrevSet->footer_even; } - if( !pSet[i].footer_odd && pPrevSet && pPrevSet->footer_odd ) + if( !aSet[i].footer_odd && pPrevSet && pPrevSet->footer_odd ) { - pSet[i].footer_odd = pPrevSet->footer_odd; + aSet[i].footer_odd = pPrevSet->footer_odd; } - pPage = &pSet[i]; - pPrevSet = &pSet[i]; + pPage = &aSet[i]; + pPrevSet = &aSet[i]; } else if( pPrevSet ) /* If the previous setting exists */ { diff --git a/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx b/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx index 5f8be77189ba..718902caba6f 100644 --- a/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx +++ b/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx @@ -64,8 +64,8 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) return -1; } - jfw::JavaInfoGuard pInfo; - errcode = jfw_getSelectedJRE(&pInfo.info); + jfw::JavaInfoGuard aInfo; + errcode = jfw_getSelectedJRE(&aInfo.info); if (errcode != JFW_E_NONE && errcode != JFW_E_INVALID_SETTINGS) { @@ -73,19 +73,19 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) return -1; } - if (pInfo.info == nullptr) + if (aInfo.info == nullptr) { - if (!findAndSelect(&pInfo.info)) + if (!findAndSelect(&aInfo.info)) return -1; } else { //check if the JRE was not uninstalled sal_Bool bExist = false; - errcode = jfw_existJRE(pInfo.info, &bExist); + errcode = jfw_existJRE(aInfo.info, &bExist); if (errcode == JFW_E_NONE) { - if (!bExist && !findAndSelect(&pInfo.info)) + if (!bExist && !findAndSelect(&aInfo.info)) return -1; } else @@ -95,7 +95,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) } } - OString sPaths = getLD_LIBRARY_PATH(pInfo.info->arVendorData); + OString sPaths = getLD_LIBRARY_PATH(aInfo.info->arVendorData); fprintf(stdout, "%s\n", sPaths.getStr()); } catch (const std::exception&) diff --git a/l10ntools/source/helpmerge.cxx b/l10ntools/source/helpmerge.cxx index c5fda0522c8b..d6ad3af727c0 100644 --- a/l10ntools/source/helpmerge.cxx +++ b/l10ntools/source/helpmerge.cxx @@ -169,8 +169,8 @@ bool HelpParser::MergeSingleFile( XMLFile* file , MergeDataFile* pMergeDataFile file->Extract(); XMLHashMap* aXMLStrHM = file->GetStrings(); - static ResData pResData("",""); - pResData.sResTyp = "help"; + static ResData s_ResData("",""); + s_ResData.sResTyp = "help"; std::vector<OString> order = file->getOrder(); std::vector<OString>::iterator pos; @@ -186,10 +186,10 @@ bool HelpParser::MergeSingleFile( XMLFile* file , MergeDataFile* pMergeDataFile printf("DBG: sHelpFile = %s\n",sHelpFile.getStr() ); #endif - pResData.sGId = posm->first; - pResData.sFilename = sHelpFile; + s_ResData.sGId = posm->first; + s_ResData.sFilename = sHelpFile; - ProcessHelp( aLangHM , sLanguage, &pResData , pMergeDataFile ); + ProcessHelp( aLangHM , sLanguage, &s_ResData , pMergeDataFile ); } file->Write(sPath); diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx index 4bbd7a012165..ed5c6757dfc8 100644 --- a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx +++ b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx @@ -283,15 +283,15 @@ Sequence < Reference < css::linguistic2::XMeaning > > SAL_CALL Thesaurus::queryM uno::Reference< XLinguServiceManager2 > xLngSvcMgr( GetLngSvcMgr_Impl() ); uno::Reference< XSpellChecker1 > xSpell; - OUString rTerm(qTerm); - OUString pTerm(qTerm); + OUString aRTerm(qTerm); + OUString aPTerm(qTerm); CapType ct = CapType::UNKNOWN; sal_Int32 stem = 0; sal_Int32 stem2 = 0; sal_Int16 nLanguage = LinguLocaleToLanguage( rLocale ); - if (LinguIsUnspecified( nLanguage) || rTerm.isEmpty()) + if (LinguIsUnspecified( nLanguage) || aRTerm.isEmpty()) return noMeanings; if (!hasLocale( rLocale )) @@ -363,8 +363,8 @@ Sequence < Reference < css::linguistic2::XMeaning > > SAL_CALL Thesaurus::queryM { // convert word to all lower case for searching if (!stem) - ct = capitalType(rTerm, pCC); - OUString nTerm(makeLowerCase(rTerm, pCC)); + ct = capitalType(aRTerm, pCC); + OUString nTerm(makeLowerCase(aRTerm, pCC)); OString aTmp( OU2ENC(nTerm, eEnc) ); nmean = pTH->Lookup(aTmp.getStr(),aTmp.getLength(),&pmean); @@ -378,7 +378,7 @@ Sequence < Reference < css::linguistic2::XMeaning > > SAL_CALL Thesaurus::queryM if (stem) { xTmpRes2 = xSpell->spell( "<?xml?><query type='analyze'><word>" + - pTerm + "</word></query>", nLanguage, rProperties ); + aPTerm + "</word></query>", nLanguage, rProperties ); if (xTmpRes2.is()) { Sequence<OUString>seq = xTmpRes2->getAlternatives(); @@ -443,7 +443,7 @@ Sequence < Reference < css::linguistic2::XMeaning > > SAL_CALL Thesaurus::queryM OUString aAlt( cTerm + catst); pStr[i] = aAlt; } - Meaning * pMn = new Meaning(rTerm); + Meaning * pMn = new Meaning(aRTerm); OUString dTerm(pe->defn,strlen(pe->defn),eEnc ); pMn->SetMeaning(dTerm); pMn->SetSynonyms(aStr); @@ -471,31 +471,31 @@ Sequence < Reference < css::linguistic2::XMeaning > > SAL_CALL Thesaurus::queryM return noMeanings; Reference< XSpellAlternatives > xTmpRes; xTmpRes = xSpell->spell( "<?xml?><query type='stem'><word>" + - rTerm + "</word></query>", nLanguage, rProperties ); + aRTerm + "</word></query>", nLanguage, rProperties ); if (xTmpRes.is()) { Sequence<OUString>seq = xTmpRes->getAlternatives(); if (seq.getLength() > 0) { - rTerm = seq[0]; // XXX Use only the first stem + aRTerm = seq[0]; // XXX Use only the first stem continue; } } // stem the last word of the synonym (for categories after affixation) - rTerm = rTerm.trim(); - sal_Int32 pos = rTerm.lastIndexOf(' '); + aRTerm = aRTerm.trim(); + sal_Int32 pos = aRTerm.lastIndexOf(' '); if (!pos) return noMeanings; xTmpRes = xSpell->spell( "<?xml?><query type='stem'><word>" + - rTerm.copy(pos + 1) + "</word></query>", nLanguage, rProperties ); + aRTerm.copy(pos + 1) + "</word></query>", nLanguage, rProperties ); if (xTmpRes.is()) { Sequence<OUString>seq = xTmpRes->getAlternatives(); if (seq.getLength() > 0) { - pTerm = rTerm.copy(pos + 1); - rTerm = rTerm.copy(0, pos + 1) + seq[0]; + aPTerm = aRTerm.copy(pos + 1); + aRTerm = aRTerm.copy(0, pos + 1) + seq[0]; #if 0 for (int i = 0; i < seq.getLength(); i++) { diff --git a/lotuswordpro/source/filter/lwplayout.cxx b/lotuswordpro/source/filter/lwplayout.cxx index e5c8c1d3d851..c70153c02991 100644 --- a/lotuswordpro/source/filter/lwplayout.cxx +++ b/lotuswordpro/source/filter/lwplayout.cxx @@ -1656,12 +1656,12 @@ XFColumnSep* LwpLayout::GetColumnSep() return nullptr; } - LwpBorderStuff& pBorderStuff = pLayoutGutters->GetBorderStuff(); + LwpBorderStuff& rBorderStuff = pLayoutGutters->GetBorderStuff(); LwpBorderStuff::BorderType eType = LwpBorderStuff::LEFT; - LwpColor aColor = pBorderStuff.GetSideColor(eType); - double fWidth = pBorderStuff.GetSideWidth(eType); - //sal_uInt16 nType = pBorderStuff->GetSideType(eType); + LwpColor aColor = rBorderStuff.GetSideColor(eType); + double fWidth = rBorderStuff.GetSideWidth(eType); + //sal_uInt16 nType = rBorderStuff->GetSideType(eType); XFColumnSep* pColumnSep = new XFColumnSep(); XFColor aXFColor(aColor.To24Color()); diff --git a/mysqlc/source/mysqlc_databasemetadata.cxx b/mysqlc/source/mysqlc_databasemetadata.cxx index b83674b57143..85cffebf2050 100644 --- a/mysqlc/source/mysqlc_databasemetadata.cxx +++ b/mysqlc/source/mysqlc_databasemetadata.cxx @@ -1333,13 +1333,13 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getProcedures( std::string cat(catalog.hasValue()? rtl::OUStringToOString(getStringFromAny(catalog), m_rConnection.getConnectionEncoding()).getStr():""), sPattern(rtl::OUStringToOString(schemaPattern, m_rConnection.getConnectionEncoding()).getStr()), - pNamePattern(rtl::OUStringToOString(procedureNamePattern, m_rConnection.getConnectionEncoding()).getStr()); + procNamePattern(rtl::OUStringToOString(procedureNamePattern, m_rConnection.getConnectionEncoding()).getStr()); try { boost::scoped_ptr< sql::ResultSet> rset( meta->getProcedures(cat, sPattern.compare("")? sPattern:wild, - pNamePattern.compare("")? pNamePattern:wild)); + procNamePattern.compare("")? procNamePattern:wild)); rtl_TextEncoding encoding = m_rConnection.getConnectionEncoding(); sql::ResultSetMetaData * rs_meta = rset->getMetaData(); @@ -1631,8 +1631,8 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges( Reference< XResultSet > SAL_CALL ODatabaseMetaData::getCrossReference( const Any& primaryCatalog, - const rtl::OUString& primarySchema, - const rtl::OUString& primaryTable, + const rtl::OUString& primarySchema_, + const rtl::OUString& primaryTable_, const Any& foreignCatalog, const rtl::OUString& foreignSchema, const rtl::OUString& foreignTable) @@ -1644,14 +1644,14 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getCrossReference( std::string primaryCat(primaryCatalog.hasValue()? rtl::OUStringToOString(getStringFromAny(primaryCatalog), m_rConnection.getConnectionEncoding()).getStr():""), foreignCat(foreignCatalog.hasValue()? rtl::OUStringToOString(getStringFromAny(foreignCatalog), m_rConnection.getConnectionEncoding()).getStr():""), - pSchema(rtl::OUStringToOString(primarySchema, m_rConnection.getConnectionEncoding()).getStr()), - pTable(rtl::OUStringToOString(primaryTable, m_rConnection.getConnectionEncoding()).getStr()), + primarySchema(rtl::OUStringToOString(primarySchema_, m_rConnection.getConnectionEncoding()).getStr()), + primaryTable(rtl::OUStringToOString(primaryTable_, m_rConnection.getConnectionEncoding()).getStr()), fSchema(rtl::OUStringToOString(foreignSchema, m_rConnection.getConnectionEncoding()).getStr()), fTable(rtl::OUStringToOString(foreignTable, m_rConnection.getConnectionEncoding()).getStr()); try { rtl_TextEncoding encoding = m_rConnection.getConnectionEncoding(); - boost::scoped_ptr< sql::ResultSet> rset( meta->getCrossReference(primaryCat, pSchema, pTable, foreignCat, fSchema, fTable)); + boost::scoped_ptr< sql::ResultSet> rset( meta->getCrossReference(primaryCat, primarySchema, primaryTable, foreignCat, fSchema, fTable)); sql::ResultSetMetaData * rs_meta = rset->getMetaData(); sal_uInt32 columns = rs_meta->getColumnCount(); while (rset->next()) { diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx index 40bd20a469d1..a3cd57606e8e 100644 --- a/oox/source/core/xmlfilterbase.cxx +++ b/oox/source/core/xmlfilterbase.cxx @@ -785,8 +785,8 @@ writeCustomProperties( XmlFilterBase& rSelf, const Reference< XDocumentPropertie { OUStringBuffer buf; ::sax::Converter::convertDuration( buf, aDuration ); - OUString pDuration = buf.makeStringAndClear(); - writeElement( pAppProps, FSNS( XML_vt, XML_lpwstr ), pDuration ); + OUString aDurationStr = buf.makeStringAndClear(); + writeElement( pAppProps, FSNS( XML_vt, XML_lpwstr ), aDurationStr ); } else if ( ( aprop[n].Value ) >>= aDateTime ) writeElement( pAppProps, FSNS( XML_vt, XML_filetime ), aDateTime ); diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx index 5e50ce7a00be..51b58da1a6aa 100644 --- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx +++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx @@ -83,8 +83,8 @@ void LayoutAtom::dump(int level) OSL_TRACE( "level = %d - %s of type %s", level, OUSTRING_TO_CSTR( msName ), typeid(*this).name() ); - const std::vector<LayoutAtomPtr>& pChildren=getChildren(); - std::for_each( pChildren.begin(), pChildren.end(), + const std::vector<LayoutAtomPtr>& rChildren=getChildren(); + std::for_each( rChildren.begin(), rChildren.end(), [level] (LayoutAtomPtr const& pAtom) { pAtom->dump(level + 1); } ); } @@ -581,8 +581,8 @@ public: void ShapeCreationVisitor::defaultVisit(LayoutAtom& rAtom) { - const std::vector<LayoutAtomPtr>& pChildren=rAtom.getChildren(); - std::for_each( pChildren.begin(), pChildren.end(), + const std::vector<LayoutAtomPtr>& rChildren=rAtom.getChildren(); + std::for_each( rChildren.begin(), rChildren.end(), [this] (LayoutAtomPtr const& pAtom) { pAtom->accept(*this); } ); } @@ -598,7 +598,7 @@ void ShapeCreationVisitor::visit(AlgAtom& rAtom) void ShapeCreationVisitor::visit(ForEachAtom& rAtom) { - const std::vector<LayoutAtomPtr>& pChildren=rAtom.getChildren(); + const std::vector<LayoutAtomPtr>& rChildren=rAtom.getChildren(); sal_Int32 nChildren=1; if( rAtom.iterator().mnPtType == XML_node ) @@ -607,7 +607,7 @@ void ShapeCreationVisitor::visit(ForEachAtom& rAtom) // attribute that is contained in diagram's // getPointsPresNameMap() ShallowPresNameVisitor aVisitor(mrDgm); - std::for_each( pChildren.begin(), pChildren.end(), + std::for_each( rChildren.begin(), rChildren.end(), [&] (LayoutAtomPtr const& pAtom) { pAtom->accept(aVisitor); } ); nChildren = aVisitor.getCount(); } @@ -621,7 +621,7 @@ void ShapeCreationVisitor::visit(ForEachAtom& rAtom) for( mnCurrIdx=0; mnCurrIdx<nCnt && nStep>0; mnCurrIdx+=nStep ) { // TODO there is likely some conditions - std::for_each( pChildren.begin(), pChildren.end(), + std::for_each( rChildren.begin(), rChildren.end(), [this] (LayoutAtomPtr const& pAtom) { pAtom->accept(*this); } ); } @@ -688,8 +688,8 @@ void ShapeCreationVisitor::visit(LayoutNode& rAtom) void ShapeLayoutingVisitor::defaultVisit(LayoutAtom& rAtom) { // visit all children, one of them needs to be the layout algorithm - const std::vector<LayoutAtomPtr>& pChildren=rAtom.getChildren(); - std::for_each( pChildren.begin(), pChildren.end(), + const std::vector<LayoutAtomPtr>& rChildren=rAtom.getChildren(); + std::for_each( rChildren.begin(), rChildren.end(), [this] (LayoutAtomPtr const& pAtom) { pAtom->accept(*this); } ); } @@ -727,8 +727,8 @@ void ShallowPresNameVisitor::defaultVisit(LayoutAtom& rAtom) { // visit all children, at least one of them needs to have proper // name set - const std::vector<LayoutAtomPtr>& pChildren=rAtom.getChildren(); - std::for_each( pChildren.begin(), pChildren.end(), + const std::vector<LayoutAtomPtr>& rChildren=rAtom.getChildren(); + std::for_each( rChildren.begin(), rChildren.end(), [this] (LayoutAtomPtr const& pAtom) { pAtom->accept(*this); } ); } diff --git a/oox/source/drawingml/effectproperties.cxx b/oox/source/drawingml/effectproperties.cxx index 3ec31e0f8b03..2dd529b834cb 100644 --- a/oox/source/drawingml/effectproperties.cxx +++ b/oox/source/drawingml/effectproperties.cxx @@ -73,9 +73,9 @@ void EffectProperties::pushToPropMap( PropertyMap& rPropMap, css::beans::PropertyValue Effect::getEffect() { - css::beans::PropertyValue pRet; + css::beans::PropertyValue aRet; if( msName.isEmpty() ) - return pRet; + return aRet; css::uno::Sequence< css::beans::PropertyValue > aSeq( maAttribs.size() ); sal_uInt32 i = 0; @@ -86,10 +86,10 @@ css::beans::PropertyValue Effect::getEffect() i++; } - pRet.Name = msName; - pRet.Value = css::uno::Any( aSeq ); + aRet.Name = msName; + aRet.Value = css::uno::Any( aSeq ); - return pRet; + return aRet; } } // namespace drawingml diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx index a86d7c0237e2..338b8233dff6 100644 --- a/oox/source/drawingml/fillproperties.cxx +++ b/oox/source/drawingml/fillproperties.cxx @@ -772,9 +772,9 @@ bool ArtisticEffectProperties::isEmpty() const css::beans::PropertyValue ArtisticEffectProperties::getEffect() { - css::beans::PropertyValue pRet; + css::beans::PropertyValue aRet; if( msName.isEmpty() ) - return pRet; + return aRet; css::uno::Sequence< css::beans::PropertyValue > aSeq( maAttribs.size() + 1 ); sal_uInt32 i = 0; @@ -797,10 +797,10 @@ css::beans::PropertyValue ArtisticEffectProperties::getEffect() aSeq[i].Value = uno::makeAny( aGraphicSeq ); } - pRet.Name = msName; - pRet.Value = css::uno::Any( aSeq ); + aRet.Name = msName; + aRet.Value = css::uno::Any( aSeq ); - return pRet; + return aRet; } void ArtisticEffectProperties::assignUsed( const ArtisticEffectProperties& rSourceProps ) diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index 29e439958349..fb5a30a2c649 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -1221,8 +1221,8 @@ Reference < XShape > Shape::renderDiagramToGraphic( XmlFilterBase& rFilterBase ) return xShape; // Stream in which to place the rendered shape - SvMemoryStream pTempStream; - Reference < io::XStream > xStream( new utl::OStreamWrapper( pTempStream ) ); + SvMemoryStream aTempStream; + Reference < io::XStream > xStream( new utl::OStreamWrapper( aTempStream ) ); Reference < io::XOutputStream > xOutputStream( xStream->getOutputStream() ); // Rendering format @@ -1258,11 +1258,11 @@ Reference < XShape > Shape::renderDiagramToGraphic( XmlFilterBase& rFilterBase ) xGraphicExporter->setSourceDocument( xSourceDoc ); xGraphicExporter->filter( aDescriptor ); - pTempStream.Seek( STREAM_SEEK_TO_BEGIN ); + aTempStream.Seek( STREAM_SEEK_TO_BEGIN ); Graphic aGraphic; GraphicFilter aFilter( false ); - if ( aFilter.ImportGraphic( aGraphic, "", pTempStream, GRFILTER_FORMAT_NOTFOUND, nullptr, GraphicFilterImportFlags::NONE, static_cast < Sequence < PropertyValue >* > ( nullptr ) ) != GRFILTER_OK ) + if ( aFilter.ImportGraphic( aGraphic, "", aTempStream, GRFILTER_FORMAT_NOTFOUND, nullptr, GraphicFilterImportFlags::NONE, static_cast < Sequence < PropertyValue >* > ( nullptr ) ) != GRFILTER_OK ) { SAL_WARN( "oox.drawingml", OSL_THIS_FUNC << "Unable to import rendered stream into graphic object" ); @@ -1409,10 +1409,10 @@ void Shape::finalizeXShape( XmlFilterBase& rFilter, const Reference< XShapes >& void Shape::putPropertyToGrabBag( const OUString& sPropertyName, const Any& aPropertyValue ) { - PropertyValue pNewProperty; - pNewProperty.Name = sPropertyName; - pNewProperty.Value = aPropertyValue; - putPropertyToGrabBag( pNewProperty ); + PropertyValue aNewProperty; + aNewProperty.Name = sPropertyName; + aNewProperty.Value = aPropertyValue; + putPropertyToGrabBag( aNewProperty ); } void Shape::putPropertyToGrabBag( const PropertyValue& pProperty ) diff --git a/oox/source/drawingml/textparagraphproperties.cxx b/oox/source/drawingml/textparagraphproperties.cxx index 9627333164a4..20b9d3881c07 100644 --- a/oox/source/drawingml/textparagraphproperties.cxx +++ b/oox/source/drawingml/textparagraphproperties.cxx @@ -519,8 +519,8 @@ void TextParagraphProperties::dump() const xStart->gotoEnd( true ); Reference< XPropertySet > xPropSet( xRange, UNO_QUERY ); pushToPropSet( nullptr, xPropSet, emptyMap, nullptr, false, 0 ); - PropertySet pSet( xPropSet ); - pSet.dump(); + PropertySet aPropSet( xPropSet ); + aPropSet.dump(); } #endif } } diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 6c4de9bc5ee9..87dd2e14b56f 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -1824,12 +1824,12 @@ void DrawingML::WriteParagraphNumbering( const Reference< XPropertySet >& rXProp FSEND ); } - OUString pAutoNumType = GetAutoNumType( nNumberingType, bSDot, bPBehind, bPBoth ); + OUString aAutoNumType = GetAutoNumType( nNumberingType, bSDot, bPBehind, bPBoth ); - if (!pAutoNumType.isEmpty()) + if (!aAutoNumType.isEmpty()) { mpFS->singleElementNS(XML_a, XML_buAutoNum, - XML_type, OUStringToOString(pAutoNumType, RTL_TEXTENCODING_UTF8).getStr(), + XML_type, OUStringToOString(aAutoNumType, RTL_TEXTENCODING_UTF8).getStr(), XML_startAt, nStartWith > 1 ? IS(nStartWith) : nullptr, FSEND); } diff --git a/oox/source/ppt/timenodelistcontext.cxx b/oox/source/ppt/timenodelistcontext.cxx index c5ddf7654396..15925d911a60 100644 --- a/oox/source/ppt/timenodelistcontext.cxx +++ b/oox/source/ppt/timenodelistcontext.cxx @@ -433,9 +433,9 @@ namespace oox { namespace ppt { //xParentNode if( isCurrentElement( mnElement ) ) { - NodePropertyMap & pProps(mpNode->getNodeProperties()); - pProps[ NP_DIRECTION ] = makeAny( mnDir == XML_cw ); - pProps[ NP_COLORINTERPOLATION ] = makeAny( mnColorSpace == XML_hsl ? AnimationColorSpace::HSL : AnimationColorSpace::RGB ); + NodePropertyMap & rProps(mpNode->getNodeProperties()); + rProps[ NP_DIRECTION ] = makeAny( mnDir == XML_cw ); + rProps[ NP_COLORINTERPOLATION ] = makeAny( mnColorSpace == XML_hsl ? AnimationColorSpace::HSL : AnimationColorSpace::RGB ); const GraphicHelper& rGraphicHelper = getFilter().getGraphicHelper(); if( maToClr.isUsed() ) mpNode->setTo( Any( maToClr.getColor( rGraphicHelper ) ) ); diff --git a/opencl/source/openclwrapper.cxx b/opencl/source/openclwrapper.cxx index b17dc3ef9b55..701317881a78 100644 --- a/opencl/source/openclwrapper.cxx +++ b/opencl/source/openclwrapper.cxx @@ -703,8 +703,8 @@ bool switchOpenCLDevice(const OUString* pDevice, bool bAutoSelect, bool bForceEv rtl::Bootstrap::expandMacros(url); OUString path; osl::FileBase::getSystemPathFromFileURL(url,path); - ds_device pSelectedDevice = getDeviceSelection(path, bForceEvaluation); - pDeviceId = pSelectedDevice.aDeviceID; + ds_device aSelectedDevice = getDeviceSelection(path, bForceEvaluation); + pDeviceId = aSelectedDevice.aDeviceID; } diff --git a/pyuno/source/module/pyuno_module.cxx b/pyuno/source/module/pyuno_module.cxx index b574109ccfa0..8da500e6241e 100644 --- a/pyuno/source/module/pyuno_module.cxx +++ b/pyuno/source/module/pyuno_module.cxx @@ -170,11 +170,11 @@ void fillStruct( for( int i = 0 ; i < remainingPosInitialisers && i < nMembers ; i ++ ) { const int tupleIndex = state.getCntConsumed(); - const OUString pMemberName (pCompType->ppMemberNames[i]); - state.setInitialised(pMemberName, tupleIndex); + const OUString& rMemberName (pCompType->ppMemberNames[i]); + state.setInitialised(rMemberName, tupleIndex); PyObject *element = PyTuple_GetItem( initializer, tupleIndex ); Any a = runtime.pyObject2Any( element, ACCEPT_UNO_ANY ); - inv->setValue( pMemberName, a ); + inv->setValue( rMemberName, a ); } } if ( PyTuple_Size( initializer ) > 0 ) diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx index 26501d9a2c6d..69ec26e9cdde 100644 --- a/sal/qa/osl/file/osl_File.cxx +++ b/sal/qa/osl/file/osl_File.cxx @@ -1257,20 +1257,12 @@ namespace osl_FileStatus createTestDirectory( aTmpName3 ); createTestFile( aTmpName4 ); - Directory pDir( aTmpName3 ); - nError1 = pDir.open(); - CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 ); - nError1 = pDir.getNextItem( rItem ); - CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 ); - pDir.close(); - /* Directory aDir( aTmpName3 ); nError1 = aDir.open(); CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 ); - nError1 = aDir.getNextItem( rItem, 0 ); + nError1 = aDir.getNextItem( rItem ); CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 ); aDir.close(); - */ } void tearDown() override diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index d10ac5bbdff5..87e5e11c107b 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -6086,18 +6086,18 @@ void Test::testFormulaWizardSubformula() m_pDoc->SetString(ScAddress(1,1,0), "=1/0"); // B2 m_pDoc->SetString(ScAddress(1,2,0), "=gibberish"); // B3 - ScSimpleFormulaCalculator pFCell1( m_pDoc, ScAddress(0,0,0), "=B1:B3", true ); - sal_uInt16 nErrCode = pFCell1.GetErrCode(); - CPPUNIT_ASSERT( nErrCode == 0 || pFCell1.IsMatrix() ); - CPPUNIT_ASSERT_EQUAL( OUString("{1;#DIV/0!;#NAME?}"), pFCell1.GetString().getString() ); + ScSimpleFormulaCalculator aFCell1( m_pDoc, ScAddress(0,0,0), "=B1:B3", true ); + sal_uInt16 nErrCode = aFCell1.GetErrCode(); + CPPUNIT_ASSERT( nErrCode == 0 || aFCell1.IsMatrix() ); + CPPUNIT_ASSERT_EQUAL( OUString("{1;#DIV/0!;#NAME?}"), aFCell1.GetString().getString() ); m_pDoc->SetString(ScAddress(1,0,0), "=NA()"); // B1 m_pDoc->SetString(ScAddress(1,1,0), "2"); // B2 m_pDoc->SetString(ScAddress(1,2,0), "=1+2"); // B3 - ScSimpleFormulaCalculator pFCell2( m_pDoc, ScAddress(0,0,0), "=B1:B3", true ); - nErrCode = pFCell2.GetErrCode(); - CPPUNIT_ASSERT( nErrCode == 0 || pFCell2.IsMatrix() ); - CPPUNIT_ASSERT_EQUAL( OUString("{#N/A;2;3}"), pFCell2.GetString().getString() ); + ScSimpleFormulaCalculator aFCell2( m_pDoc, ScAddress(0,0,0), "=B1:B3", true ); + nErrCode = aFCell2.GetErrCode(); + CPPUNIT_ASSERT( nErrCode == 0 || aFCell2.IsMatrix() ); + CPPUNIT_ASSERT_EQUAL( OUString("{#N/A;2;3}"), aFCell2.GetString().getString() ); m_pDoc->DeleteTab(0); } diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx index 26b98ac54f50..4e33efa16417 100644 --- a/sc/source/core/tool/scmatrix.cxx +++ b/sc/source/core/tool/scmatrix.cxx @@ -1110,9 +1110,9 @@ public: WalkElementBlocksMultipleValues(bool bTextAsZero, const std::vector<std::unique_ptr<Op>>& aOp) : maOp(aOp), mbFirst(true), mbTextAsZero(bTextAsZero) { - for (const auto& pOp : maOp) + for (const auto& rpOp : maOp) { - maRes.emplace_back(pOp->mInitVal, pOp->mInitVal, 0); + maRes.emplace_back(rpOp->mInitVal, rpOp->mInitVal, 0); } maRes.emplace_back(0.0, 0.0, 0); // count } diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx index 665bf4123ca6..13e232c77639 100644 --- a/sc/source/filter/excel/xestyle.cxx +++ b/sc/source/filter/excel/xestyle.cxx @@ -661,12 +661,12 @@ sal_uInt32 XclExpPaletteImpl::GetLeastUsedListColor() const for( sal_uInt32 nIdx = 0, nCount = mxColorList->size(); nIdx < nCount; ++nIdx ) { - XclListColor& pEntry = *mxColorList->at( nIdx ).get(); + XclListColor& rEntry = *mxColorList->at( nIdx ).get(); // ignore the base colors - if( !pEntry.IsBaseColor() && (pEntry.GetWeighting() < nMinW) ) + if( !rEntry.IsBaseColor() && (rEntry.GetWeighting() < nMinW) ) { nFound = nIdx; - nMinW = pEntry.GetWeighting(); + nMinW = rEntry.GetWeighting(); } } return nFound; diff --git a/sc/source/filter/excel/xetable.cxx b/sc/source/filter/excel/xetable.cxx index 0302c9eeb400..867d5b8de155 100644 --- a/sc/source/filter/excel/xetable.cxx +++ b/sc/source/filter/excel/xetable.cxx @@ -2146,20 +2146,20 @@ void XclExpRowBuffer::Finalize( XclExpDefaultRowData& rDefRowData, const ScfUInt else { comphelper::ThreadPool &rPool = comphelper::ThreadPool::getSharedOptimalPool(); - std::vector<RowFinalizeTask*> pTasks(nThreads, nullptr); + std::vector<RowFinalizeTask*> aTasks(nThreads, nullptr); for ( size_t i = 0; i < nThreads; i++ ) - pTasks[ i ] = new RowFinalizeTask( rColXFIndexes, i == 0 ); + aTasks[ i ] = new RowFinalizeTask( rColXFIndexes, i == 0 ); RowMap::iterator itr, itrBeg = maRowMap.begin(), itrEnd = maRowMap.end(); size_t nIdx = 0; for ( itr = itrBeg; itr != itrEnd; ++itr, ++nIdx ) - pTasks[ nIdx % nThreads ]->push_back( itr->second.get() ); + aTasks[ nIdx % nThreads ]->push_back( itr->second.get() ); for ( size_t i = 1; i < nThreads; i++ ) - rPool.pushTask( pTasks[ i ] ); + rPool.pushTask( aTasks[ i ] ); // Progress bar updates must be synchronous to avoid deadlock - pTasks[0]->doWork(); + aTasks[0]->doWork(); rPool.waitUntilEmpty(); } diff --git a/sc/source/ui/dbgui/PivotLayoutDialog.cxx b/sc/source/ui/dbgui/PivotLayoutDialog.cxx index d1bc0232708c..681758c3ec10 100644 --- a/sc/source/ui/dbgui/PivotLayoutDialog.cxx +++ b/sc/source/ui/dbgui/PivotLayoutDialog.cxx @@ -579,25 +579,25 @@ void ScPivotLayoutDialog::ApplyLabelData(ScDPSaveData& rSaveData) for (it = rLabelDataVector.begin(); it != rLabelDataVector.end(); ++it) { - const ScDPLabelData& pLabelData = *it->get(); + const ScDPLabelData& rLabelData = *it->get(); - OUString aUnoName = ScDPUtil::createDuplicateDimensionName(pLabelData.maName, pLabelData.mnDupCount); + OUString aUnoName = ScDPUtil::createDuplicateDimensionName(rLabelData.maName, rLabelData.mnDupCount); ScDPSaveDimension* pSaveDimensions = rSaveData.GetExistingDimensionByName(aUnoName); if (pSaveDimensions == nullptr) continue; - pSaveDimensions->SetUsedHierarchy(pLabelData.mnUsedHier); - pSaveDimensions->SetShowEmpty(pLabelData.mbShowAll); - pSaveDimensions->SetRepeatItemLabels(pLabelData.mbRepeatItemLabels); - pSaveDimensions->SetSortInfo(&pLabelData.maSortInfo); - pSaveDimensions->SetLayoutInfo(&pLabelData.maLayoutInfo); - pSaveDimensions->SetAutoShowInfo(&pLabelData.maShowInfo); + pSaveDimensions->SetUsedHierarchy(rLabelData.mnUsedHier); + pSaveDimensions->SetShowEmpty(rLabelData.mbShowAll); + pSaveDimensions->SetRepeatItemLabels(rLabelData.mbRepeatItemLabels); + pSaveDimensions->SetSortInfo(&rLabelData.maSortInfo); + pSaveDimensions->SetLayoutInfo(&rLabelData.maLayoutInfo); + pSaveDimensions->SetAutoShowInfo(&rLabelData.maShowInfo); - bool bManualSort = (pLabelData.maSortInfo.Mode == DataPilotFieldSortMode::MANUAL); + bool bManualSort = (rLabelData.maSortInfo.Mode == DataPilotFieldSortMode::MANUAL); std::vector<ScDPLabelData::Member>::const_iterator itMember; - for (itMember = pLabelData.maMembers.begin(); itMember != pLabelData.maMembers.end(); ++itMember) + for (itMember = rLabelData.maMembers.begin(); itMember != rLabelData.maMembers.end(); ++itMember) { const ScDPLabelData::Member& rLabelMember = *itMember; ScDPSaveMember* pMember = pSaveDimensions->GetMemberByName(rLabelMember.maName); diff --git a/sc/source/ui/optdlg/calcoptionsdlg.cxx b/sc/source/ui/optdlg/calcoptionsdlg.cxx index d9c7ddbd2bc1..a62900cb366f 100644 --- a/sc/source/ui/optdlg/calcoptionsdlg.cxx +++ b/sc/source/ui/optdlg/calcoptionsdlg.cxx @@ -318,9 +318,9 @@ struct OpenCLTester mbOldAutoCalc = mpDoc->GetAutoCalc(); mpDoc->SetAutoCalc(false); mpOldCalcConfig = ScInterpreter::GetGlobalConfig(); - ScCalcConfig pConfig(mpOldCalcConfig); - pConfig.mnOpenCLMinimumFormulaGroupSize = 20; - ScInterpreter::SetGlobalConfig(pConfig); + ScCalcConfig aConfig(mpOldCalcConfig); + aConfig.mnOpenCLMinimumFormulaGroupSize = 20; + ScInterpreter::SetGlobalConfig(aConfig); mpDoc->SetString(ScAddress(0,0,0), "Result:"); } diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx index fb3e9cba428d..18f40388d8ee 100644 --- a/sc/source/ui/view/preview.cxx +++ b/sc/source/ui/view/preview.cxx @@ -1186,8 +1186,8 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt ) const SfxPoolItem* pItem = nullptr; if ( rStyleSet.GetItemState( ATTR_PAGE_HEADERSET, false, &pItem ) == SfxItemState::SET ) { - const SfxItemSet& pHeaderSet = static_cast<const SvxSetItem*>(pItem)->GetItemSet(); - Size aHeaderSize = static_cast<const SvxSizeItem&>(pHeaderSet.Get(ATTR_PAGE_SIZE)).GetSize(); + const SfxItemSet& rHeaderSet = static_cast<const SvxSetItem*>(pItem)->GetItemSet(); + Size aHeaderSize = static_cast<const SvxSizeItem&>(rHeaderSet.Get(ATTR_PAGE_SIZE)).GetSize(); aHeaderSize.Height() = (long)( aButtonUpPt.Y() / HMM_PER_TWIPS + aOffset.Y() / HMM_PER_TWIPS - aULItem.GetUpper()); aHeaderSize.Height() = aHeaderSize.Height() * 100 / mnScale; SvxSetItem aNewHeader( static_cast<const SvxSetItem&>(rStyleSet.Get(ATTR_PAGE_HEADERSET)) ); @@ -1201,8 +1201,8 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt ) const SfxPoolItem* pItem = nullptr; if( rStyleSet.GetItemState( ATTR_PAGE_FOOTERSET, false, &pItem ) == SfxItemState::SET ) { - const SfxItemSet& pFooterSet = static_cast<const SvxSetItem*>(pItem)->GetItemSet(); - Size aFooterSize = static_cast<const SvxSizeItem&>(pFooterSet.Get(ATTR_PAGE_SIZE)).GetSize(); + const SfxItemSet& rFooterSet = static_cast<const SvxSetItem*>(pItem)->GetItemSet(); + Size aFooterSize = static_cast<const SvxSizeItem&>(rFooterSet.Get(ATTR_PAGE_SIZE)).GetSize(); aFooterSize.Height() = (long)( nHeight - aButtonUpPt.Y() / HMM_PER_TWIPS - aOffset.Y() / HMM_PER_TWIPS - aULItem.GetLower() ); aFooterSize.Height() = aFooterSize.Height() * 100 / mnScale; SvxSetItem aNewFooter( static_cast<const SvxSetItem&>(rStyleSet.Get(ATTR_PAGE_FOOTERSET)) ); diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx index fdc5c8fa229f..68f3b91feb4d 100644 --- a/sd/source/core/drawdoc2.cxx +++ b/sd/source/core/drawdoc2.cxx @@ -251,11 +251,11 @@ void SdDrawDocument::UpdatePageRelativeURLs(const OUString& rOldName, const OUSt if (rNewName.isEmpty()) return; - SfxItemPool& pPool(GetPool()); - sal_uInt32 nCount = pPool.GetItemCount2(EE_FEATURE_FIELD); + SfxItemPool& rPool(GetPool()); + sal_uInt32 nCount = rPool.GetItemCount2(EE_FEATURE_FIELD); for (sal_uInt32 nOff = 0; nOff < nCount; nOff++) { - const SfxPoolItem *pItem = pPool.GetItem2(EE_FEATURE_FIELD, nOff); + const SfxPoolItem *pItem = rPool.GetItem2(EE_FEATURE_FIELD, nOff); const SvxFieldItem* pFldItem = dynamic_cast< const SvxFieldItem * > (pItem); if(pFldItem) @@ -295,11 +295,11 @@ void SdDrawDocument::UpdatePageRelativeURLs(SdPage* pPage, sal_uInt16 nPos, sal_ { bool bNotes = (pPage->GetPageKind() == PK_NOTES); - SfxItemPool& pPool(GetPool()); - sal_uInt32 nCount = pPool.GetItemCount2(EE_FEATURE_FIELD); + SfxItemPool& rPool(GetPool()); + sal_uInt32 nCount = rPool.GetItemCount2(EE_FEATURE_FIELD); for (sal_uInt32 nOff = 0; nOff < nCount; nOff++) { - const SfxPoolItem *pItem = pPool.GetItem2(EE_FEATURE_FIELD, nOff); + const SfxPoolItem *pItem = rPool.GetItem2(EE_FEATURE_FIELD, nOff); const SvxFieldItem* pFldItem; if ((pFldItem = dynamic_cast< const SvxFieldItem * > (pItem)) != nullptr) diff --git a/sd/source/ui/dlg/morphdlg.cxx b/sd/source/ui/dlg/morphdlg.cxx index 40fe770c9929..bd3704be59a9 100644 --- a/sd/source/ui/dlg/morphdlg.cxx +++ b/sd/source/ui/dlg/morphdlg.cxx @@ -45,9 +45,9 @@ MorphDlg::MorphDlg( vcl::Window* pParent, const SdrObject* pObj1, const SdrObjec LoadSettings(); - SfxItemPool & pPool = pObj1->GetObjectItemPool(); - SfxItemSet aSet1( pPool ); - SfxItemSet aSet2( pPool ); + SfxItemPool & rPool = pObj1->GetObjectItemPool(); + SfxItemSet aSet1( rPool ); + SfxItemSet aSet2( rPool ); aSet1.Put(pObj1->GetMergedItemSet()); aSet2.Put(pObj2->GetMergedItemSet()); diff --git a/sd/source/ui/func/fuchar.cxx b/sd/source/ui/func/fuchar.cxx index e3f6b9c94dd2..87c896c49576 100644 --- a/sd/source/ui/func/fuchar.cxx +++ b/sd/source/ui/func/fuchar.cxx @@ -109,19 +109,19 @@ void FuChar::DoExecute( SfxRequest& rReq ) if( nResult == RET_OK ) { const SfxItemSet* pOutputSet = pDlg->GetOutputItemSet(); - SfxItemSet pOtherSet( *pOutputSet ); + SfxItemSet aOtherSet( *pOutputSet ); // and now the reverse process - const SvxBrushItem* pBrushItem= static_cast<const SvxBrushItem*>(pOtherSet.GetItem( SID_ATTR_BRUSH_CHAR )); + const SvxBrushItem* pBrushItem= static_cast<const SvxBrushItem*>(aOtherSet.GetItem( SID_ATTR_BRUSH_CHAR )); if ( pBrushItem ) { SvxBackgroundColorItem aBackColorItem( pBrushItem->GetColor(), EE_CHAR_BKGCOLOR ); - pOtherSet.ClearItem( SID_ATTR_BRUSH_CHAR ); - pOtherSet.Put( aBackColorItem ); + aOtherSet.ClearItem( SID_ATTR_BRUSH_CHAR ); + aOtherSet.Put( aBackColorItem ); } - rReq.Done( pOtherSet ); + rReq.Done( aOtherSet ); pArgs = rReq.GetArgs(); } } diff --git a/sd/source/ui/func/fumorph.cxx b/sd/source/ui/func/fumorph.cxx index bede93a36388..46893b6fc2f2 100644 --- a/sd/source/ui/func/fumorph.cxx +++ b/sd/source/ui/func/fumorph.cxx @@ -342,14 +342,14 @@ void FuMorph::ImpInsertPolygons( long nStartLineWidth = 0; long nEndLineWidth = 0; SdrPageView* pPageView = mpView->GetSdrPageView(); - SfxItemPool & pPool = pObj1->GetObjectItemPool(); - SfxItemSet aSet1( pPool,SDRATTR_START,SDRATTR_NOTPERSIST_FIRST-1,EE_ITEMS_START,EE_ITEMS_END,0 ); + SfxItemPool & rPool = pObj1->GetObjectItemPool(); + SfxItemSet aSet1( rPool,SDRATTR_START,SDRATTR_NOTPERSIST_FIRST-1,EE_ITEMS_START,EE_ITEMS_END,0 ); SfxItemSet aSet2( aSet1 ); - bool bLineColor = false; - bool bFillColor = false; - bool bLineWidth = false; - bool bIgnoreLine = false; - bool bIgnoreFill = false; + bool bLineColor = false; + bool bFillColor = false; + bool bLineWidth = false; + bool bIgnoreLine = false; + bool bIgnoreFill = false; aSet1.Put(pObj1->GetMergedItemSet()); aSet2.Put(pObj2->GetMergedItemSet()); diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx index 20e762cbc4ed..4282999db6e0 100644 --- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx +++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx @@ -86,34 +86,34 @@ namespace std::vector<char> lcl_escapeLineFeeds(const char* const i_pStr) { size_t nLength(strlen(i_pStr)); - std::vector<char> pBuffer; - pBuffer.reserve(2*nLength+1); + std::vector<char> aBuffer; + aBuffer.reserve(2*nLength+1); const char* pRead = i_pStr; while( nLength-- ) { if( *pRead == '\r' ) { - pBuffer.push_back('\\'); - pBuffer.push_back('r'); + aBuffer.push_back('\\'); + aBuffer.push_back('r'); } else if( *pRead == '\n' ) { - pBuffer.push_back('\\'); - pBuffer.push_back('n'); + aBuffer.push_back('\\'); + aBuffer.push_back('n'); } else if( *pRead == '\\' ) { - pBuffer.push_back('\\'); - pBuffer.push_back('\\'); + aBuffer.push_back('\\'); + aBuffer.push_back('\\'); } else - pBuffer.push_back(*pRead); + aBuffer.push_back(*pRead); pRead++; } - pBuffer.push_back(0); + aBuffer.push_back(0); - return pBuffer; + return aBuffer; } } @@ -572,14 +572,14 @@ void PDFOutDev::processLink(Link* link, Catalog*) { const char* pURI = static_cast<LinkURI*>(pAction)->getURI()->getCString(); - std::vector<char> pEsc( lcl_escapeLineFeeds(pURI) ); + std::vector<char> aEsc( lcl_escapeLineFeeds(pURI) ); printf( "drawLink %f %f %f %f %s\n", normalize(x1), normalize(y1), normalize(x2), normalize(y2), - pEsc.data() ); + aEsc.data() ); } } @@ -765,7 +765,7 @@ void PDFOutDev::updateFont(GfxState *state) aFont = it->second; - std::vector<char> pEsc( lcl_escapeLineFeeds(aFont.familyName.getCString()) ); + std::vector<char> aEsc( lcl_escapeLineFeeds(aFont.familyName.getCString()) ); printf( " %d %d %d %d %f %d %s", aFont.isEmbedded, aFont.isBold, @@ -773,7 +773,7 @@ void PDFOutDev::updateFont(GfxState *state) aFont.isUnderline, normalize(state->getTransformedFontSize()), nEmbedSize, - pEsc.data() ); + aEsc.data() ); } printf( "\n" ); @@ -918,8 +918,8 @@ void PDFOutDev::drawChar(GfxState *state, double x, double y, for( int i=0; i<uLen; ++i ) { buf[ m_pUtf8Map->mapUnicode(u[i], buf, sizeof(buf)-1) ] = 0; - std::vector<char> pEsc( lcl_escapeLineFeeds(buf) ); - printf( "%s", pEsc.data() ); + std::vector<char> aEsc( lcl_escapeLineFeeds(buf) ); + printf( "%s", aEsc.data() ); } printf( "\n" ); diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx index e2a00eda4538..de80bc8c8058 100644 --- a/sfx2/source/appl/appopen.cxx +++ b/sfx2/source/appl/appopen.cxx @@ -592,7 +592,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq ) if ( !pFileNameItem ) { // get FileName from dialog - std::vector<OUString> pURLList; + std::vector<OUString> aURLList; OUString aFilter; SfxItemSet* pSet = nullptr; OUString aPath; @@ -630,12 +630,12 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq ) sal_uIntPtr nErr = sfx2::FileOpenDialog_Impl( ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION, - SFXWB_MULTISELECTION, OUString(), pURLList, + SFXWB_MULTISELECTION, OUString(), aURLList, aFilter, pSet, &aPath, nDialog, sStandardDir, aBlackList ); if ( nErr == ERRCODE_ABORT ) { - pURLList.clear(); + aURLList.clear(); return; } @@ -646,7 +646,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq ) rReq.AppendItem( SfxStringItem( SID_REFERER, "private:user" ) ); delete pSet; - if(!pURLList.empty()) + if(!aURLList.empty()) { if ( nSID == SID_OPENTEMPLATE ) rReq.AppendItem( SfxBoolItem( SID_TEMPLATE, false ) ); @@ -683,7 +683,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq ) rReq.AppendItem(SfxStringItem(SID_DOC_SERVICE, aDocService)); } - for(std::vector<OUString>::const_iterator i = pURLList.begin(); i != pURLList.end(); ++i) + for(std::vector<OUString>::const_iterator i = aURLList.begin(); i != aURLList.end(); ++i) { rReq.RemoveItem( SID_FILE_NAME ); rReq.AppendItem( SfxStringItem( SID_FILE_NAME, *i ) ); @@ -715,10 +715,10 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq ) } } - pURLList.clear(); + aURLList.clear(); return; } - pURLList.clear(); + aURLList.clear(); } bool bHyperlinkUsed = false; diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx index ccf5c2f81048..bf96cf182904 100644 --- a/sfx2/source/control/bindings.cxx +++ b/sfx2/source/control/bindings.cxx @@ -1889,27 +1889,27 @@ SfxItemState SfxBindings::QueryState( sal_uInt16 nSlot, std::unique_ptr<SfxPoolI else { css::uno::Any aAny = pBind->GetStatus().State; - css::uno::Type pType = aAny.getValueType(); + css::uno::Type aType = aAny.getValueType(); - if ( pType == cppu::UnoType<bool>::get() ) + if ( aType == cppu::UnoType<bool>::get() ) { bool bTemp = false; aAny >>= bTemp ; rpState.reset(new SfxBoolItem( nSlot, bTemp )); } - else if ( pType == ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get() ) + else if ( aType == ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get() ) { sal_uInt16 nTemp = 0; aAny >>= nTemp ; rpState.reset(new SfxUInt16Item( nSlot, nTemp )); } - else if ( pType == cppu::UnoType<sal_uInt32>::get() ) + else if ( aType == cppu::UnoType<sal_uInt32>::get() ) { sal_uInt32 nTemp = 0; aAny >>= nTemp ; rpState.reset(new SfxUInt32Item( nSlot, nTemp )); } - else if ( pType == cppu::UnoType<OUString>::get() ) + else if ( aType == cppu::UnoType<OUString>::get() ) { OUString sTemp ; aAny >>= sTemp ; diff --git a/sfx2/source/control/querystatus.cxx b/sfx2/source/control/querystatus.cxx index 3e10e9e6cb03..2f939a7ea4ce 100644 --- a/sfx2/source/control/querystatus.cxx +++ b/sfx2/source/control/querystatus.cxx @@ -109,40 +109,40 @@ throw( RuntimeException, std::exception ) if ( rEvent.IsEnabled ) { m_eState = SfxItemState::DEFAULT; - css::uno::Type pType = rEvent.State.getValueType(); + css::uno::Type aType = rEvent.State.getValueType(); - if ( pType == cppu::UnoType<bool>::get() ) + if ( aType == cppu::UnoType<bool>::get() ) { bool bTemp = false; rEvent.State >>= bTemp ; m_pItem = new SfxBoolItem( m_nSlotID, bTemp ); } - else if ( pType == ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get() ) + else if ( aType == ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get() ) { sal_uInt16 nTemp = 0; rEvent.State >>= nTemp ; m_pItem = new SfxUInt16Item( m_nSlotID, nTemp ); } - else if ( pType == cppu::UnoType<sal_uInt32>::get() ) + else if ( aType == cppu::UnoType<sal_uInt32>::get() ) { sal_uInt32 nTemp = 0; rEvent.State >>= nTemp ; m_pItem = new SfxUInt32Item( m_nSlotID, nTemp ); } - else if ( pType == cppu::UnoType<OUString>::get() ) + else if ( aType == cppu::UnoType<OUString>::get() ) { OUString sTemp ; rEvent.State >>= sTemp ; m_pItem = new SfxStringItem( m_nSlotID, sTemp ); } - else if ( pType == cppu::UnoType< css::frame::status::ItemStatus>::get() ) + else if ( aType == cppu::UnoType< css::frame::status::ItemStatus>::get() ) { ItemStatus aItemStatus; rEvent.State >>= aItemStatus; m_eState = (SfxItemState) aItemStatus.State; m_pItem = new SfxVoidItem( m_nSlotID ); } - else if ( pType == cppu::UnoType< css::frame::status::Visibility>::get() ) + else if ( aType == cppu::UnoType< css::frame::status::Visibility>::get() ) { Visibility aVisibilityStatus; rEvent.State >>= aVisibilityStatus; diff --git a/sfx2/source/control/sfxstatuslistener.cxx b/sfx2/source/control/sfxstatuslistener.cxx index 4e6567ecb186..dab426adf6b2 100644 --- a/sfx2/source/control/sfxstatuslistener.cxx +++ b/sfx2/source/control/sfxstatuslistener.cxx @@ -168,45 +168,45 @@ throw( RuntimeException, std::exception ) if ( rEvent.IsEnabled ) { eState = SfxItemState::DEFAULT; - css::uno::Type pType = rEvent.State.getValueType(); + css::uno::Type aType = rEvent.State.getValueType(); - if ( pType == ::cppu::UnoType<void>::get() ) + if ( aType == ::cppu::UnoType<void>::get() ) { pItem = new SfxVoidItem( m_nSlotID ); eState = SfxItemState::UNKNOWN; } - else if ( pType == cppu::UnoType< bool >::get() ) + else if ( aType == cppu::UnoType< bool >::get() ) { bool bTemp = false; rEvent.State >>= bTemp ; pItem = new SfxBoolItem( m_nSlotID, bTemp ); } - else if ( pType == cppu::UnoType< ::cppu::UnoUnsignedShortType >::get() ) + else if ( aType == cppu::UnoType< ::cppu::UnoUnsignedShortType >::get() ) { sal_uInt16 nTemp = 0; rEvent.State >>= nTemp ; pItem = new SfxUInt16Item( m_nSlotID, nTemp ); } - else if ( pType == cppu::UnoType<sal_uInt32>::get() ) + else if ( aType == cppu::UnoType<sal_uInt32>::get() ) { sal_uInt32 nTemp = 0; rEvent.State >>= nTemp ; pItem = new SfxUInt32Item( m_nSlotID, nTemp ); } - else if ( pType == cppu::UnoType<OUString>::get() ) + else if ( aType == cppu::UnoType<OUString>::get() ) { OUString sTemp ; rEvent.State >>= sTemp ; pItem = new SfxStringItem( m_nSlotID, sTemp ); } - else if ( pType == cppu::UnoType< css::frame::status::ItemStatus >::get() ) + else if ( aType == cppu::UnoType< css::frame::status::ItemStatus >::get() ) { ItemStatus aItemStatus; rEvent.State >>= aItemStatus; eState = (SfxItemState) aItemStatus.State; pItem = new SfxVoidItem( m_nSlotID ); } - else if ( pType == cppu::UnoType< css::frame::status::Visibility >::get() ) + else if ( aType == cppu::UnoType< css::frame::status::Visibility >::get() ) { Visibility aVisibilityStatus; rEvent.State >>= aVisibilityStatus; diff --git a/sfx2/source/control/statcach.cxx b/sfx2/source/control/statcach.cxx index 6b1a9e8cb949..d5165c43db6e 100644 --- a/sfx2/source/control/statcach.cxx +++ b/sfx2/source/control/statcach.cxx @@ -95,26 +95,26 @@ void SAL_CALL BindDispatch_Impl::statusChanged( const css::frame::FeatureStateE eState = SfxItemState::DEFAULT; css::uno::Any aAny = aStatus.State; - css::uno::Type pType = aAny.getValueType(); - if ( pType == cppu::UnoType< bool >::get() ) + css::uno::Type aType = aAny.getValueType(); + if ( aType == cppu::UnoType< bool >::get() ) { bool bTemp = false; aAny >>= bTemp ; pItem = new SfxBoolItem( nId, bTemp ); } - else if ( pType == ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get() ) + else if ( aType == ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get() ) { sal_uInt16 nTemp = 0; aAny >>= nTemp ; pItem = new SfxUInt16Item( nId, nTemp ); } - else if ( pType == cppu::UnoType<sal_uInt32>::get() ) + else if ( aType == cppu::UnoType<sal_uInt32>::get() ) { sal_uInt32 nTemp = 0; aAny >>= nTemp ; pItem = new SfxUInt32Item( nId, nTemp ); } - else if ( pType == cppu::UnoType<OUString>::get() ) + else if ( aType == cppu::UnoType<OUString>::get() ) { OUString sTemp ; aAny >>= sTemp ; diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index 95503364f612..b22e843075c1 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -156,27 +156,27 @@ void SAL_CALL SfxUnoControllerItem::statusChanged(const css::frame::FeatureState if ( rEvent.IsEnabled ) { eState = SfxItemState::DEFAULT; - css::uno::Type pType = rEvent.State.getValueType(); + css::uno::Type aType = rEvent.State.getValueType(); - if ( pType == cppu::UnoType< bool >::get() ) + if ( aType == cppu::UnoType< bool >::get() ) { bool bTemp = false; rEvent.State >>= bTemp ; pItem = new SfxBoolItem( pCtrlItem->GetId(), bTemp ); } - else if ( pType == cppu::UnoType< ::cppu::UnoUnsignedShortType >::get() ) + else if ( aType == cppu::UnoType< ::cppu::UnoUnsignedShortType >::get() ) { sal_uInt16 nTemp = 0; rEvent.State >>= nTemp ; pItem = new SfxUInt16Item( pCtrlItem->GetId(), nTemp ); } - else if ( pType == cppu::UnoType<sal_uInt32>::get() ) + else if ( aType == cppu::UnoType<sal_uInt32>::get() ) { sal_uInt32 nTemp = 0; rEvent.State >>= nTemp ; pItem = new SfxUInt32Item( pCtrlItem->GetId(), nTemp ); } - else if ( pType == cppu::UnoType<OUString>::get() ) + else if ( aType == cppu::UnoType<OUString>::get() ) { OUString sTemp ; rEvent.State >>= sTemp ; diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index b6a72e86550e..8bd00e61d4ec 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -162,14 +162,14 @@ OUString ConvertDateTime_Impl( const OUString& rName, { Date aD(uDT); tools::Time aT(uDT); - const OUString pDelim ( ", " ); + const OUString aDelim( ", " ); OUString aStr( rWrapper.getDate( aD ) ); - aStr += pDelim; + aStr += aDelim; aStr += rWrapper.getTime( aT ); OUString aAuthor = comphelper::string::stripStart(rName, ' '); if (!aAuthor.isEmpty()) { - aStr += pDelim; + aStr += aDelim; aStr += aAuthor; } return aStr; diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index 6347ae962613..e7507c619fcf 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -777,10 +777,10 @@ bool ModelData_Impl::CheckFilterOptionsDialogExistence() while ( xFilterEnum->hasMoreElements() ) { - uno::Sequence< beans::PropertyValue > pProps; - if ( xFilterEnum->nextElement() >>= pProps ) + uno::Sequence< beans::PropertyValue > aProps; + if ( xFilterEnum->nextElement() >>= aProps ) { - ::comphelper::SequenceAsHashMap aPropsHM( pProps ); + ::comphelper::SequenceAsHashMap aPropsHM( aProps ); OUString aUIServName = aPropsHM.getUnpackedValueOrDefault( "UIComponent", OUString() ); diff --git a/sfx2/source/statbar/stbitem.cxx b/sfx2/source/statbar/stbitem.cxx index 693d164c402f..3c34c6013649 100644 --- a/sfx2/source/statbar/stbitem.cxx +++ b/sfx2/source/statbar/stbitem.cxx @@ -252,38 +252,38 @@ throw ( css::uno::RuntimeException, std::exception ) if ( rEvent.IsEnabled ) { eState = SfxItemState::DEFAULT; - uno::Type pType = rEvent.State.getValueType(); + uno::Type aType = rEvent.State.getValueType(); - if ( pType == cppu::UnoType<void>::get() ) + if ( aType == cppu::UnoType<void>::get() ) { pItem = new SfxVoidItem( nSlotID ); eState = SfxItemState::UNKNOWN; } - else if ( pType == cppu::UnoType<bool>::get() ) + else if ( aType == cppu::UnoType<bool>::get() ) { bool bTemp = false; rEvent.State >>= bTemp ; pItem = new SfxBoolItem( nSlotID, bTemp ); } - else if ( pType == ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get() ) + else if ( aType == ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get() ) { sal_uInt16 nTemp = 0; rEvent.State >>= nTemp ; pItem = new SfxUInt16Item( nSlotID, nTemp ); } - else if ( pType == cppu::UnoType<sal_uInt32>::get() ) + else if ( aType == cppu::UnoType<sal_uInt32>::get() ) { sal_uInt32 nTemp = 0; rEvent.State >>= nTemp ; pItem = new SfxUInt32Item( nSlotID, nTemp ); } - else if ( pType == cppu::UnoType<OUString>::get() ) + else if ( aType == cppu::UnoType<OUString>::get() ) { OUString sTemp ; rEvent.State >>= sTemp ; pItem = new SfxStringItem( nSlotID, sTemp ); } - else if ( pType == cppu::UnoType< css::frame::status::ItemStatus>::get() ) + else if ( aType == cppu::UnoType< css::frame::status::ItemStatus>::get() ) { frame::status::ItemStatus aItemStatus; rEvent.State >>= aItemStatus; diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx index 3e2855b7d94f..d036ad1cdaec 100644 --- a/sfx2/source/toolbox/tbxitem.cxx +++ b/sfx2/source/toolbox/tbxitem.cxx @@ -477,38 +477,38 @@ throw ( css::uno::RuntimeException, std::exception ) if ( rEvent.IsEnabled ) { eState = SfxItemState::DEFAULT; - css::uno::Type pType = rEvent.State.getValueType(); + css::uno::Type aType = rEvent.State.getValueType(); - if ( pType == cppu::UnoType<void>::get() ) + if ( aType == cppu::UnoType<void>::get() ) { pItem = new SfxVoidItem( nSlotId ); eState = SfxItemState::UNKNOWN; } - else if ( pType == cppu::UnoType<bool>::get() ) + else if ( aType == cppu::UnoType<bool>::get() ) { bool bTemp = false; rEvent.State >>= bTemp ; pItem = new SfxBoolItem( nSlotId, bTemp ); } - else if ( pType == ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get()) + else if ( aType == ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get()) { sal_uInt16 nTemp = 0; rEvent.State >>= nTemp ; pItem = new SfxUInt16Item( nSlotId, nTemp ); } - else if ( pType == cppu::UnoType<sal_uInt32>::get() ) + else if ( aType == cppu::UnoType<sal_uInt32>::get() ) { sal_uInt32 nTemp = 0; rEvent.State >>= nTemp ; pItem = new SfxUInt32Item( nSlotId, nTemp ); } - else if ( pType == cppu::UnoType<OUString>::get() ) + else if ( aType == cppu::UnoType<OUString>::get() ) { OUString sTemp ; rEvent.State >>= sTemp ; pItem = new SfxStringItem( nSlotId, sTemp ); } - else if ( pType == cppu::UnoType< css::frame::status::ItemStatus>::get() ) + else if ( aType == cppu::UnoType< css::frame::status::ItemStatus>::get() ) { ItemStatus aItemStatus; rEvent.State >>= aItemStatus; @@ -521,7 +521,7 @@ throw ( css::uno::RuntimeException, std::exception ) eState = tmpState; pItem = new SfxVoidItem( nSlotId ); } - else if ( pType == cppu::UnoType< css::frame::status::Visibility>::get() ) + else if ( aType == cppu::UnoType< css::frame::status::Visibility>::get() ) { Visibility aVisibilityStatus; rEvent.State >>= aVisibilityStatus; @@ -811,38 +811,38 @@ throw ( css::uno::RuntimeException, std::exception ) if ( rEvent.IsEnabled ) { eState = SfxItemState::DEFAULT; - css::uno::Type pType = rEvent.State.getValueType(); + css::uno::Type aType = rEvent.State.getValueType(); - if ( pType == cppu::UnoType<void>::get() ) + if ( aType == cppu::UnoType<void>::get() ) { pItem = new SfxVoidItem( nSlotId ); eState = SfxItemState::UNKNOWN; } - else if ( pType == cppu::UnoType<bool>::get() ) + else if ( aType == cppu::UnoType<bool>::get() ) { bool bTemp = false; rEvent.State >>= bTemp ; pItem = new SfxBoolItem( nSlotId, bTemp ); } - else if ( pType == ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get()) + else if ( aType == ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get()) { sal_uInt16 nTemp = 0; rEvent.State >>= nTemp ; pItem = new SfxUInt16Item( nSlotId, nTemp ); } - else if ( pType == cppu::UnoType<sal_uInt32>::get() ) + else if ( aType == cppu::UnoType<sal_uInt32>::get() ) { sal_uInt32 nTemp = 0; rEvent.State >>= nTemp ; pItem = new SfxUInt32Item( nSlotId, nTemp ); } - else if ( pType == cppu::UnoType<OUString>::get() ) + else if ( aType == cppu::UnoType<OUString>::get() ) { OUString sTemp ; rEvent.State >>= sTemp ; pItem = new SfxStringItem( nSlotId, sTemp ); } - else if ( pType == cppu::UnoType< css::frame::status::ItemStatus>::get() ) + else if ( aType == cppu::UnoType< css::frame::status::ItemStatus>::get() ) { ItemStatus aItemStatus; rEvent.State >>= aItemStatus; @@ -855,7 +855,7 @@ throw ( css::uno::RuntimeException, std::exception ) eState = tmpState; pItem = new SfxVoidItem( nSlotId ); } - else if ( pType == cppu::UnoType< css::frame::status::Visibility>::get() ) + else if ( aType == cppu::UnoType< css::frame::status::Visibility>::get() ) { Visibility aVisibilityStatus; rEvent.State >>= aVisibilityStatus; diff --git a/slideshow/source/engine/shapes/drawshapesubsetting.cxx b/slideshow/source/engine/shapes/drawshapesubsetting.cxx index 3c3e1d7881c5..588f6cc47613 100644 --- a/slideshow/source/engine/shapes/drawshapesubsetting.cxx +++ b/slideshow/source/engine/shapes/drawshapesubsetting.cxx @@ -394,8 +394,8 @@ namespace slideshow // the whole shape set // determine new subset range - for( const auto& pShape : maSubsetShapes ) - updateSubsetBounds( pShape ); + for( const auto& rSubsetShape : maSubsetShapes ) + updateSubsetBounds( rSubsetShape ); updateSubsets(); diff --git a/slideshow/source/engine/transitions/slidechangebase.cxx b/slideshow/source/engine/transitions/slidechangebase.cxx index a13dd27be25f..cdc1d22134c8 100644 --- a/slideshow/source/engine/transitions/slidechangebase.cxx +++ b/slideshow/source/engine/transitions/slidechangebase.cxx @@ -446,12 +446,12 @@ void SlideChangeBase::viewsChanged() if( mbFinished ) return; - for( auto& pView : maViewData ) + for( auto& rView : maViewData ) { // clear stale info (both bitmaps and sprites prolly need a // resize) - clearViewEntry( pView ); - addSprites( pView ); + clearViewEntry( rView ); + addSprites( rView ); } } diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx index 33d2f5272bfe..704be0047579 100644 --- a/sot/source/sdstor/ucbstorage.cxx +++ b/sot/source/sdstor/ucbstorage.cxx @@ -837,9 +837,9 @@ sal_uInt64 UCBStorageStream_Impl::ReadSourceWriteTemporary(sal_uInt64 aLength) sal_uLong aReaded = 32000; - for (sal_uInt64 pInd = 0; pInd < aLength && aReaded == 32000 ; pInd += 32000) + for (sal_uInt64 nInd = 0; nInd < aLength && aReaded == 32000 ; nInd += 32000) { - sal_uLong aToCopy = min( aLength - pInd, 32000 ); + sal_uLong aToCopy = min( aLength - nInd, 32000 ); aReaded = m_rSource->readBytes( aData, aToCopy ); aResult += m_pStream->Write( aData.getArray(), aReaded ); } diff --git a/starmath/source/cursor.cxx b/starmath/source/cursor.cxx index 47144abad9cc..447fdc4a261d 100644 --- a/starmath/source/cursor.cxx +++ b/starmath/source/cursor.cxx @@ -706,9 +706,9 @@ void SmCursor::InsertBrackets(SmBracketType eBracketType) { //Insert into line pLineList->insert(it, pBrace); //Patch line (I think this is good enough) - SmCaretPos pAfter = PatchLineList(pLineList, it); + SmCaretPos aAfter = PatchLineList(pLineList, it); if( !PosAfterInsert.IsValid() ) - PosAfterInsert = pAfter; + PosAfterInsert = aAfter; //Finish editing FinishEdit(pLineList, pLineParent, nParentIndex, PosAfterInsert); diff --git a/starmath/source/visitors.cxx b/starmath/source/visitors.cxx index 71c0752a6b64..f9868db849e4 100644 --- a/starmath/source/visitors.cxx +++ b/starmath/source/visitors.cxx @@ -211,9 +211,9 @@ void SmCaretDrawingVisitor::Visit( SmTextNode* pNode ) } //Underline the line - Point pLeft( left_line, top + height ); - Point pRight( right_line, top + height ); - mrDev.DrawLine( pLeft, pRight ); + Point aLeft( left_line, top + height ); + Point aRight( right_line, top + height ); + mrDev.DrawLine( aLeft, aRight ); } void SmCaretDrawingVisitor::DefaultVisit( SmNode* pNode ) @@ -241,9 +241,9 @@ void SmCaretDrawingVisitor::DefaultVisit( SmNode* pNode ) } //Underline the line - Point pLeft( left_line, top + height ); - Point pRight( right_line, top + height ); - mrDev.DrawLine( pLeft, pRight ); + Point aLeft( left_line, top + height ); + Point aRight( right_line, top + height ); + mrDev.DrawLine( aLeft, aRight ); } // SmCaretPos2LineVisitor diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx index 1fb04ea16a89..e37023b1d191 100644 --- a/stoc/source/javavm/javavm.cxx +++ b/stoc/source/javavm/javavm.cxx @@ -788,14 +788,14 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId) //we search another one. As long as there is a javaldx, we should //never come into this situation. javaldx checks always if the JRE //still exist. - jfw::JavaInfoGuard pJavaInfo; - if (JFW_E_NONE == jfw_getSelectedJRE(&pJavaInfo.info)) + jfw::JavaInfoGuard aJavaInfo; + if (JFW_E_NONE == jfw_getSelectedJRE(&aJavaInfo.info)) { sal_Bool bExist = false; - if (JFW_E_NONE == jfw_existJRE(pJavaInfo.info, &bExist)) + if (JFW_E_NONE == jfw_existJRE(aJavaInfo.info, &bExist)) { if (!bExist - && ! (pJavaInfo.info->nRequirements & JFW_REQUIRE_NEEDRESTART)) + && ! (aJavaInfo.info->nRequirements & JFW_REQUIRE_NEEDRESTART)) { info.clear(); javaFrameworkError errFind = jfw_findAndSelectJRE( diff --git a/svtools/source/config/fontsubstconfig.cxx b/svtools/source/config/fontsubstconfig.cxx index 6ebf935802cb..742aa45ac99e 100644 --- a/svtools/source/config/fontsubstconfig.cxx +++ b/svtools/source/config/fontsubstconfig.cxx @@ -121,15 +121,15 @@ void SvtFontSubstConfig::ImplCommit() { OUString sPrefix = sNode + "/_" + OUString::number(i) + "/"; - SubstitutionStruct& pSubst = pImpl->aSubstArr[i]; + SubstitutionStruct& rSubst = pImpl->aSubstArr[i]; pSetValues[nSetValue].Name = sPrefix; pSetValues[nSetValue].Name += sReplaceFont; - pSetValues[nSetValue++].Value <<= pSubst.sFont; + pSetValues[nSetValue++].Value <<= rSubst.sFont; pSetValues[nSetValue].Name = sPrefix; pSetValues[nSetValue].Name += sSubstituteFont; - pSetValues[nSetValue++].Value <<= pSubst.sReplaceBy; + pSetValues[nSetValue++].Value <<= rSubst.sReplaceBy; pSetValues[nSetValue].Name = sPrefix; pSetValues[nSetValue].Name += sAlways; - pSetValues[nSetValue++].Value.setValue(&pSubst.bReplaceAlways, rBoolType); + pSetValues[nSetValue++].Value.setValue(&rSubst.bReplaceAlways, rBoolType); pSetValues[nSetValue].Name = sPrefix; pSetValues[nSetValue].Name += sOnScreenOnly; - pSetValues[nSetValue++].Value.setValue(&pSubst.bReplaceOnScreenOnly, rBoolType); + pSetValues[nSetValue++].Value.setValue(&rSubst.bReplaceOnScreenOnly, rBoolType); } ReplaceSetProperties(sNode, aSetValues); } diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx index b8a1e0c48fb7..45bcf70c3551 100644 --- a/svx/source/accessibility/AccessibleShape.cxx +++ b/svx/source/accessibility/AccessibleShape.cxx @@ -422,11 +422,11 @@ uno::Reference<XAccessibleStateSet> SAL_CALL css::uno::Reference<XAccessibleStateSet> rState = xTempAccContext->getAccessibleStateSet(); if( rState.is() ) { - css::uno::Sequence<short> pStates = rState->getStates(); - int count = pStates.getLength(); + css::uno::Sequence<short> aStates = rState->getStates(); + int count = aStates.getLength(); for( int iIndex = 0;iIndex < count;iIndex++ ) { - if( pStates[iIndex] == AccessibleStateType::EDITABLE ) + if( aStates[iIndex] == AccessibleStateType::EDITABLE ) { pStateSet->AddState (AccessibleStateType::EDITABLE); pStateSet->AddState (AccessibleStateType::RESIZABLE); @@ -465,11 +465,11 @@ uno::Reference<XAccessibleStateSet> SAL_CALL css::uno::Reference<XAccessibleStateSet> rState = xTempAccContext->getAccessibleStateSet(); if( rState.is() ) { - css::uno::Sequence<short> pStates = rState->getStates(); - int count = pStates.getLength(); + css::uno::Sequence<short> aStates = rState->getStates(); + int count = aStates.getLength(); for( int iIndex = 0;iIndex < count;iIndex++ ) { - if( pStates[iIndex] == AccessibleStateType::EDITABLE ) + if( aStates[iIndex] == AccessibleStateType::EDITABLE ) { pStateSet->AddState (AccessibleStateType::EDITABLE); pStateSet->AddState (AccessibleStateType::RESIZABLE); @@ -847,11 +847,11 @@ throw ( IndexOutOfBoundsException, if( !pRState.is() ) return false; - uno::Sequence<short> pStates = pRState->getStates(); - int nCount = pStates.getLength(); + uno::Sequence<short> aStates = pRState->getStates(); + int nCount = aStates.getLength(); for( int i = 0; i < nCount; i++ ) { - if(pStates[i] == AccessibleStateType::SELECTED) + if(aStates[i] == AccessibleStateType::SELECTED) return true; } return false; diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx index bc0163f89c08..db445e009491 100644 --- a/svx/source/dialog/dlgctrl.cxx +++ b/svx/source/dialog/dlgctrl.cxx @@ -964,11 +964,11 @@ void SvxPixelCtl::KeyInput( const KeyEvent& rKEvt ) if( !bIsMod ) { - Point pRepaintPoint( aRectSize.Width() *( aFocusPosition.getX() - 1)/ nLines - 1, + Point aRepaintPoint( aRectSize.Width() *( aFocusPosition.getX() - 1)/ nLines - 1, aRectSize.Height() *( aFocusPosition.getY() - 1)/ nLines -1 ); Size aRepaintSize( aRectSize.Width() *3/ nLines + 2,aRectSize.Height() *3/ nLines + 2); - Rectangle aRepaintRect( pRepaintPoint, aRepaintSize ); + Rectangle aRepaintRect( aRepaintPoint, aRepaintSize ); bool bFocusPosChanged=false; switch(nCode) { diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx index 3866c24b394c..e4c4b874776c 100644 --- a/svx/source/dialog/docrecovery.cxx +++ b/svx/source/dialog/docrecovery.cxx @@ -652,11 +652,11 @@ SaveDialog::SaveDialog(vcl::Window* pParent, RecoveryCore* pCore) // fill listbox with current open documents m_pFileListLB->Clear(); - TURLList& pURLs = m_pCore->getURLListAccess(); + TURLList& rURLs = m_pCore->getURLListAccess(); TURLList::const_iterator pIt; - for ( pIt = pURLs.begin(); - pIt != pURLs.end() ; + for ( pIt = rURLs.begin(); + pIt != rURLs.end() ; ++pIt ) { const TURLInfo& rInfo = *pIt; @@ -898,10 +898,10 @@ RecoveryDialog::RecoveryDialog(vcl::Window* pParent, RecoveryCore* pCore) m_pCancelBtn->SetClickHdl( LINK( this, RecoveryDialog, CancelButtonHdl ) ); // fill list box first time - TURLList& pURLList = m_pCore->getURLListAccess(); + TURLList& rURLList = m_pCore->getURLListAccess(); TURLList::const_iterator pIt; - for ( pIt = pURLList.begin(); - pIt != pURLList.end() ; + for ( pIt = rURLList.begin(); + pIt != rURLList.end() ; ++pIt ) { const TURLInfo& rInfo = *pIt; @@ -1275,10 +1275,10 @@ void BrokenRecoveryDialog::dispose() void BrokenRecoveryDialog::impl_refresh() { m_bExecutionNeeded = false; - TURLList& pURLList = m_pCore->getURLListAccess(); + TURLList& rURLList = m_pCore->getURLListAccess(); TURLList::const_iterator pIt; - for ( pIt = pURLList.begin(); - pIt != pURLList.end() ; + for ( pIt = rURLList.begin(); + pIt != rURLList.end() ; ++pIt ) { const TURLInfo& rInfo = *pIt; diff --git a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx index cbb4f7a75622..5a7374fe7cc2 100644 --- a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx +++ b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx @@ -1025,24 +1025,24 @@ void AreaPropertyPanelBase::Update() { const OUString aString(mpFillGradientItem->GetName()); mpLbFillAttr->SelectEntry(aString); - const XGradient pGradient = mpFillGradientItem->GetGradientValue(); - mpLbFillGradFrom->SelectEntry(pGradient.GetStartColor()); + const XGradient aGradient = mpFillGradientItem->GetGradientValue(); + mpLbFillGradFrom->SelectEntry(aGradient.GetStartColor()); if(mpLbFillGradFrom->GetSelectEntryCount() == 0) { - mpLbFillGradFrom->InsertEntry(pGradient.GetStartColor(), OUString()); - mpLbFillGradFrom->SelectEntry(pGradient.GetStartColor()); + mpLbFillGradFrom->InsertEntry(aGradient.GetStartColor(), OUString()); + mpLbFillGradFrom->SelectEntry(aGradient.GetStartColor()); } - mpLbFillGradTo->SelectEntry(pGradient.GetEndColor()); + mpLbFillGradTo->SelectEntry(aGradient.GetEndColor()); if(mpLbFillGradTo->GetSelectEntryCount() == 0) { - mpLbFillGradTo->InsertEntry(pGradient.GetEndColor(), OUString()); - mpLbFillGradTo->SelectEntry(pGradient.GetEndColor()); + mpLbFillGradTo->InsertEntry(aGradient.GetEndColor(), OUString()); + mpLbFillGradTo->SelectEntry(aGradient.GetEndColor()); } - mpGradientStyle->SelectEntryPos(sal::static_int_cast< sal_Int32 >( pGradient.GetGradientStyle() )); + mpGradientStyle->SelectEntryPos(sal::static_int_cast< sal_Int32 >( aGradient.GetGradientStyle() )); if(mpGradientStyle->GetSelectEntryPos() == GradientStyle_RADIAL) mpMTRAngle->Disable(); else - mpMTRAngle->SetValue( pGradient.GetAngle() /10 ); + mpMTRAngle->SetValue( aGradient.GetAngle() /10 ); } else { diff --git a/svx/source/table/accessiblecell.cxx b/svx/source/table/accessiblecell.cxx index 12c6ddedf408..3c6491caabd1 100644 --- a/svx/source/table/accessiblecell.cxx +++ b/svx/source/table/accessiblecell.cxx @@ -228,11 +228,11 @@ Reference<XAccessibleStateSet> SAL_CALL AccessibleCell::getAccessibleStateSet() css::uno::Reference<XAccessibleStateSet> rState = xTempAccContext->getAccessibleStateSet(); if( rState.is() ) { - css::uno::Sequence<short> pStates = rState->getStates(); - int count = pStates.getLength(); + css::uno::Sequence<short> aStates = rState->getStates(); + int count = aStates.getLength(); for( int iIndex = 0;iIndex < count;iIndex++ ) { - if( pStates[iIndex] == AccessibleStateType::EDITABLE ) + if( aStates[iIndex] == AccessibleStateType::EDITABLE ) { pStateSet->AddState (AccessibleStateType::EDITABLE); pStateSet->AddState (AccessibleStateType::RESIZABLE); diff --git a/svx/source/table/tablerow.cxx b/svx/source/table/tablerow.cxx index 5070e0cf32c6..6984a8047544 100644 --- a/svx/source/table/tablerow.cxx +++ b/svx/source/table/tablerow.cxx @@ -149,7 +149,7 @@ void TableRow::removeColumns( sal_Int32 nIndex, sal_Int32 nCount ) } } -TableModelRef const & TableRow::getModel() const +const TableModelRef& TableRow::getModel() const { return mxTableModel; } diff --git a/svx/source/table/tablerow.hxx b/svx/source/table/tablerow.hxx index 9ecc6ef1cf9d..a6719c8564b1 100644 --- a/svx/source/table/tablerow.hxx +++ b/svx/source/table/tablerow.hxx @@ -48,7 +48,7 @@ public: void insertColumns( sal_Int32 nIndex, sal_Int32 nCount, CellVector::iterator* pIter = nullptr ); void removeColumns( sal_Int32 nIndex, sal_Int32 nCount ); /// Reference to the table model containing this row. - TableModelRef const & getModel() const; + const TableModelRef& getModel() const; // XCellRange virtual css::uno::Reference< css::table::XCell > SAL_CALL getCellByPosition( sal_Int32 nColumn, sal_Int32 nRow ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 38a2f1f9b96b..46538e29f359 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -1905,9 +1905,9 @@ SvxCurrencyList_Impl::SvxCurrencyList_Impl( bIsSymbol = true; sal_uInt16 nDefaultFormat = aFormatter.GetCurrencyFormatStrings( aStringsDtor, aCurrencyEntry, bIsSymbol ); - OUString& pFormatStr = aStringsDtor[ nDefaultFormat ]; - m_aFormatEntries.push_back( pFormatStr ); - if( pFormatStr == m_rSelectedFormat ) + const OUString& rFormatStr = aStringsDtor[ nDefaultFormat ]; + m_aFormatEntries.push_back( rFormatStr ); + if( rFormatStr == m_rSelectedFormat ) nSelectedPos = nPos; ++nPos; } diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx index 8aa36cd1be9f..0deeae571dc2 100644 --- a/svx/source/xml/xmlgrhlp.cxx +++ b/svx/source/xml/xmlgrhlp.cxx @@ -283,10 +283,10 @@ const GraphicObject& SvXMLGraphicOutputStream::GetGraphicObject() mpOStm->Seek( 0 ); sal_uInt16 nFormat = GRFILTER_FORMAT_DONTKNOW; - sal_uInt16 pDeterminedFormat = GRFILTER_FORMAT_DONTKNOW; - GraphicFilter::GetGraphicFilter().ImportGraphic( aGraphic, "", *mpOStm ,nFormat,&pDeterminedFormat ); + sal_uInt16 nDeterminedFormat = GRFILTER_FORMAT_DONTKNOW; + GraphicFilter::GetGraphicFilter().ImportGraphic( aGraphic, "", *mpOStm ,nFormat,&nDeterminedFormat ); - if (pDeterminedFormat == GRFILTER_FORMAT_DONTKNOW) + if (nDeterminedFormat == GRFILTER_FORMAT_DONTKNOW) { //Read the first two byte to check whether it is a gzipped stream, is so it may be in wmz or emz format //unzip them and try again @@ -327,7 +327,7 @@ const GraphicObject& SvXMLGraphicOutputStream::GetGraphicObject() if (nStreamLen_) { pDest->Seek(0L); - GraphicFilter::GetGraphicFilter().ImportGraphic( aGraphic, "", *pDest ,nFormat,&pDeterminedFormat ); + GraphicFilter::GetGraphicFilter().ImportGraphic( aGraphic, "", *pDest ,nFormat,&nDeterminedFormat ); } } } diff --git a/sw/source/core/access/accframebase.cxx b/sw/source/core/access/accframebase.cxx index 0dd08e34ea56..9cf0253601ca 100644 --- a/sw/source/core/access/accframebase.cxx +++ b/sw/source/core/access/accframebase.cxx @@ -309,11 +309,11 @@ bool SwAccessibleFrameBase::GetSelectedState( ) // SELETED. SwFlyFrame* pFlyFrame = getFlyFrame(); const SwFrameFormat *pFrameFormat = pFlyFrame->GetFormat(); - const SwFormatAnchor& pAnchor = pFrameFormat->GetAnchor(); - const SwPosition *pPos = pAnchor.GetContentAnchor(); + const SwFormatAnchor& rAnchor = pFrameFormat->GetAnchor(); + const SwPosition *pPos = rAnchor.GetContentAnchor(); if( !pPos ) return false; - int pIndex = pPos->nContent.GetIndex(); + int nIndex = pPos->nContent.GetIndex(); if( pPos->nNode.GetNode().GetTextNode() ) { SwPaM* pCursor = GetCursor(); @@ -336,13 +336,13 @@ bool SwAccessibleFrameBase::GetSelectedState( ) sal_uLong nEndIndex = pEnd->nNode.GetIndex(); if( ( nHere >= nStartIndex ) && (nHere <= nEndIndex) ) { - if( pAnchor.GetAnchorId() == FLY_AS_CHAR ) + if( rAnchor.GetAnchorId() == FLY_AS_CHAR ) { - if( ((nHere == nStartIndex) && (pIndex >= pStart->nContent.GetIndex())) || (nHere > nStartIndex) ) - if( ((nHere == nEndIndex) && (pIndex < pEnd->nContent.GetIndex())) || (nHere < nEndIndex) ) + if( ((nHere == nStartIndex) && (nIndex >= pStart->nContent.GetIndex())) || (nHere > nStartIndex) ) + if( ((nHere == nEndIndex) && (nIndex < pEnd->nContent.GetIndex())) || (nHere < nEndIndex) ) return true; } - else if( pAnchor.GetAnchorId() == FLY_AT_PARA ) + else if( rAnchor.GetAnchorId() == FLY_AT_PARA ) { if( ((nHere > nStartIndex) || pStart->nContent.GetIndex() ==0 ) && (nHere < nEndIndex ) ) diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx index 0f1f9d255fdc..7449a394c87b 100644 --- a/sw/source/core/access/accmap.cxx +++ b/sw/source/core/access/accmap.cxx @@ -1156,7 +1156,7 @@ void SwAccessibleMap::InvalidateShapeInParaSelection() { while( aIter != aEndIter ) { - SwAccessibleChild pFrame( (*aIter).first ); + SwAccessibleChild aFrame( (*aIter).first ); const SwFrameFormat *pFrameFormat = (*aIter).first ? ::FindFrameFormat( (*aIter).first ) : nullptr; if( !pFrameFormat ) @@ -1164,10 +1164,10 @@ void SwAccessibleMap::InvalidateShapeInParaSelection() ++aIter; continue; } - const SwFormatAnchor& pAnchor = pFrameFormat->GetAnchor(); - const SwPosition *pPos = pAnchor.GetContentAnchor(); + const SwFormatAnchor& rAnchor = pFrameFormat->GetAnchor(); + const SwPosition *pPos = rAnchor.GetContentAnchor(); - if(pAnchor.GetAnchorId() == FLY_AT_PAGE) + if(rAnchor.GetAnchorId() == FLY_AT_PAGE) { uno::Reference < XAccessible > xAcc( (*aIter).second ); if(xAcc.is()) @@ -1184,7 +1184,7 @@ void SwAccessibleMap::InvalidateShapeInParaSelection() } if( pPos->nNode.GetNode().GetTextNode() ) { - int pIndex = pPos->nContent.GetIndex(); + int nIndex = pPos->nContent.GetIndex(); bool bMarked = false; if( pCursor != nullptr ) { @@ -1204,10 +1204,10 @@ void SwAccessibleMap::InvalidateShapeInParaSelection() sal_uLong nEndIndex = pEnd->nNode.GetIndex(); if( ( nHere >= nStartIndex ) && (nHere <= nEndIndex) ) { - if( pAnchor.GetAnchorId() == FLY_AS_CHAR ) + if( rAnchor.GetAnchorId() == FLY_AS_CHAR ) { - if( ( ((nHere == nStartIndex) && (pIndex >= pStart->nContent.GetIndex())) || (nHere > nStartIndex) ) - &&( ((nHere == nEndIndex) && (pIndex < pEnd->nContent.GetIndex())) || (nHere < nEndIndex) ) ) + if( ( ((nHere == nStartIndex) && (nIndex >= pStart->nContent.GetIndex())) || (nHere > nStartIndex) ) + &&( ((nHere == nEndIndex) && (nIndex < pEnd->nContent.GetIndex())) || (nHere < nEndIndex) ) ) { uno::Reference < XAccessible > xAcc( (*aIter).second ); if( xAcc.is() ) @@ -1220,7 +1220,7 @@ void SwAccessibleMap::InvalidateShapeInParaSelection() static_cast < ::accessibility::AccessibleShape* >(xAcc.get())->ResetState( AccessibleStateType::SELECTED ); } } - else if( pAnchor.GetAnchorId() == FLY_AT_PARA ) + else if( rAnchor.GetAnchorId() == FLY_AT_PARA ) { if( ((nHere > nStartIndex) || pStart->nContent.GetIndex() ==0 ) && (nHere < nEndIndex ) ) @@ -1286,8 +1286,8 @@ void SwAccessibleMap::InvalidateShapeInParaSelection() const SwFrameFormat *pFrameFormat = pFlyFrame->GetFormat(); if (pFrameFormat) { - const SwFormatAnchor& pAnchor = pFrameFormat->GetAnchor(); - if( pAnchor.GetAnchorId() == FLY_AS_CHAR ) + const SwFormatAnchor& rAnchor = pFrameFormat->GetAnchor(); + if( rAnchor.GetAnchorId() == FLY_AS_CHAR ) { uno::Reference< XAccessible > xAccParent = pAccFrame->getAccessibleParent(); if (xAccParent.is()) @@ -1557,8 +1557,8 @@ void SwAccessibleMap::DoInvalidateShapeSelection(bool bInvalidateFocusMode /*=fa SwFrameFormat *pFrameFormat = pObj ? FindFrameFormat( pObj ) : nullptr; if (pFrameFormat) { - const SwFormatAnchor& pAnchor = pFrameFormat->GetAnchor(); - if( pAnchor.GetAnchorId() == FLY_AS_CHAR ) + const SwFormatAnchor& rAnchor = pFrameFormat->GetAnchor(); + if( rAnchor.GetAnchorId() == FLY_AS_CHAR ) { uno::Reference< XAccessible > xPara = pAccShape->getAccessibleParent(); if (xPara.is()) diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx index 825876c812fb..e8b502a31fc9 100644 --- a/sw/source/core/access/accpara.cxx +++ b/sw/source/core/access/accpara.cxx @@ -3817,8 +3817,7 @@ sal_Int16 SAL_CALL SwAccessibleParagraph::getAccessibleRole() throw (css::uno::R sal_Int32 SwAccessibleParagraph::GetRealHeadingLevel() { uno::Reference< css::beans::XPropertySet > xPortion = CreateUnoPortion( 0, 0 ); - OUString pString = "ParaStyleName"; - uno::Any styleAny = xPortion->getPropertyValue( pString ); + uno::Any styleAny = xPortion->getPropertyValue( "ParaStyleName" ); OUString sValue; if (styleAny >>= sValue) { diff --git a/sw/source/core/access/accselectionhelper.cxx b/sw/source/core/access/accselectionhelper.cxx index dd674de28d30..8827404d44a5 100644 --- a/sw/source/core/access/accselectionhelper.cxx +++ b/sw/source/core/access/accselectionhelper.cxx @@ -125,11 +125,11 @@ static bool lcl_getSelectedState(const SwAccessibleChild& aChild, Reference<XAccessibleStateSet> pRStateSet = pRContext->getAccessibleStateSet(); if( pRStateSet.is() ) { - Sequence<short> pStates = pRStateSet->getStates(); - sal_Int32 count = pStates.getLength(); + Sequence<short> aStates = pRStateSet->getStates(); + sal_Int32 count = aStates.getLength(); for( sal_Int32 i = 0; i < count; i++ ) { - if( pStates[i] == AccessibleStateType::SELECTED) + if( aStates[i] == AccessibleStateType::SELECTED) return true; } } @@ -300,11 +300,11 @@ Reference<XAccessible> SwAccessibleSelectionHelper::getSelectedAccessibleChild( const SwFrameFormat *pFrameFormat = pFlyFrame->GetFormat(); if (pFrameFormat) { - const SwFormatAnchor& pAnchor = pFrameFormat->GetAnchor(); - if( pAnchor.GetAnchorId() == FLY_AS_CHAR ) + const SwFormatAnchor& rAnchor = pFrameFormat->GetAnchor(); + if( rAnchor.GetAnchorId() == FLY_AS_CHAR ) { - const SwFrame *pParaFrame = SwAccessibleFrame::GetParent( SwAccessibleChild(pFlyFrame), m_rContext.IsInPagePreview() ); - aChild = pParaFrame; + const SwFrame *pParaFrame = SwAccessibleFrame::GetParent( SwAccessibleChild(pFlyFrame), m_rContext.IsInPagePreview() ); + aChild = pParaFrame; } } } diff --git a/sw/source/core/crsr/callnk.cxx b/sw/source/core/crsr/callnk.cxx index de9853bc94b6..6e97ba4f04ab 100644 --- a/sw/source/core/crsr/callnk.cxx +++ b/sw/source/core/crsr/callnk.cxx @@ -95,8 +95,8 @@ static void lcl_notifyRow(const SwContentNode* pNode, SwCursorShell& rShell) { if (pContent->GetType() == SwFrameType::Tab) { - SwFormatFrameSize pSize = pLine->GetFrameFormat()->GetFrameSize(); - pRow->ModifyNotification(nullptr, &pSize); + SwFormatFrameSize aSize = pLine->GetFrameFormat()->GetFrameSize(); + pRow->ModifyNotification(nullptr, &aSize); return; } } diff --git a/sw/source/core/doc/CntntIdxStore.cxx b/sw/source/core/doc/CntntIdxStore.cxx index bd827289f405..5cb63da189d2 100644 --- a/sw/source/core/doc/CntntIdxStore.cxx +++ b/sw/source/core/doc/CntntIdxStore.cxx @@ -264,9 +264,9 @@ void ContentIdxStoreImpl::RestoreBkmks(SwDoc* pDoc, updater_t& rUpdater) void ContentIdxStoreImpl::SaveRedlines(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nContent) { - SwRedlineTable const & pRedlineTable = pDoc->getIDocumentRedlineAccess().GetRedlineTable(); + SwRedlineTable const & rRedlineTable = pDoc->getIDocumentRedlineAccess().GetRedlineTable(); long int nIdx = 0; - for (const SwRangeRedline* pRdl : pRedlineTable) + for (const SwRangeRedline* pRdl : rRedlineTable) { int nPointPos = lcl_RelativePosition( *pRdl->GetPoint(), nNode, nContent ); int nMarkPos = pRdl->HasMark() ? lcl_RelativePosition( *pRdl->GetMark(), nNode, nContent ) : diff --git a/sw/source/core/doc/SwStyleNameMapper.cxx b/sw/source/core/doc/SwStyleNameMapper.cxx index 1e5ac689e0ae..2a02b440d4cf 100644 --- a/sw/source/core/doc/SwStyleNameMapper.cxx +++ b/sw/source/core/doc/SwStyleNameMapper.cxx @@ -485,10 +485,10 @@ const NameToIdHash & SwStyleNameMapper::getHashTable ( SwGetPoolIdFromName eFlag const ::std::vector<OUString>& (*pStringsFetchFunc)() = std::get<2>( *entry ); if ( pStringsFetchFunc ) { - const ::std::vector<OUString>& pStrings = pStringsFetchFunc(); + const ::std::vector<OUString>& rStrings = pStringsFetchFunc(); sal_uInt16 nIndex, nId; for ( nIndex = 0, nId = std::get<0>( *entry ) ; nId < std::get<1>( *entry ) ; nId++, nIndex++ ) - (*pHash)[pStrings[nIndex]] = nId; + (*pHash)[rStrings[nIndex]] = nId; } } diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index 3462e97f08f2..2c54cfe95b9d 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -1123,8 +1123,8 @@ sal_uInt16 SwDoc::GetRefMarks( std::vector<OUString>* pNames ) const { if( pNames ) { - OUString pTmp(static_cast<const SwFormatRefMark*>(pItem)->GetRefName()); - pNames->insert(pNames->begin() + nCount, pTmp); + OUString aTmp(static_cast<const SwFormatRefMark*>(pItem)->GetRefName()); + pNames->insert(pNames->begin() + nCount, aTmp); } ++nCount; } diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx index eb955f673b14..1f9e8eff90d7 100644 --- a/sw/source/core/doc/docredln.cxx +++ b/sw/source/core/doc/docredln.cxx @@ -146,8 +146,8 @@ bool SwExtraRedlineTable::DeleteAllTableRedlines( SwDoc* pDoc, const SwTable& rT if (pTableCellRedline) { const SwTableBox *pRedTabBox = &pTableCellRedline->GetTableBox(); - const SwTable& pRedTable = pRedTabBox->GetSttNd()->FindTableNode()->GetTable(); - if ( &pRedTable == &rTable ) + const SwTable& rRedTable = pRedTabBox->GetSttNd()->FindTableNode()->GetTable(); + if ( &rRedTable == &rTable ) { // Redline for this table const SwRedlineData& aRedlineData = pTableCellRedline->GetRedlineData(); @@ -169,9 +169,9 @@ bool SwExtraRedlineTable::DeleteAllTableRedlines( SwDoc* pDoc, const SwTable& rT if (pTableRowRedline) { const SwTableLine *pRedTabLine = &pTableRowRedline->GetTableLine(); - const SwTableBoxes &pRedTabBoxes = pRedTabLine->GetTabBoxes(); - const SwTable& pRedTable = pRedTabBoxes[0]->GetSttNd()->FindTableNode()->GetTable(); - if ( &pRedTable == &rTable ) + const SwTableBoxes &rRedTabBoxes = pRedTabLine->GetTabBoxes(); + const SwTable& rRedTable = rRedTabBoxes[0]->GetSttNd()->FindTableNode()->GetTable(); + if ( &rRedTable == &rTable ) { // Redline for this table const SwRedlineData& aRedlineData = pTableRowRedline->GetRedlineData(); diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index b7e89b472ea5..b9ab3aa3c7e5 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -2157,13 +2157,13 @@ void DrawGraphic( GraphicObject *pGrf = const_cast<GraphicObject*>(pBrush->GetGraphicObject()); if ( bConsiderBackgroundTransparency ) { - GraphicAttr pGrfAttr = pGrf->GetAttr(); - if ( (pGrfAttr.GetTransparency() != 0) && + GraphicAttr aGrfAttr = pGrf->GetAttr(); + if ( (aGrfAttr.GetTransparency() != 0) && (pBrush->GetColor() == COL_TRANSPARENT) ) { bTransparentGrfWithNoFillBackgrd = true; - nGrfTransparency = pGrfAttr.GetTransparency(); + nGrfTransparency = aGrfAttr.GetTransparency(); } } if ( pGrf->IsTransparent() ) diff --git a/sw/source/core/swg/SwXMLBlockExport.cxx b/sw/source/core/swg/SwXMLBlockExport.cxx index 1c6aadeac4e6..0a20e999790a 100644 --- a/sw/source/core/swg/SwXMLBlockExport.cxx +++ b/sw/source/core/swg/SwXMLBlockExport.cxx @@ -52,7 +52,7 @@ sal_uInt32 SwXMLBlockListExport::exportDoc(enum XMLTokenEnum ) XML_LIST_NAME, OUString (rBlockList.GetName())); { - SvXMLElementExport pRoot (*this, XML_NAMESPACE_BLOCKLIST, XML_BLOCK_LIST, true, true); + SvXMLElementExport aRoot (*this, XML_NAMESPACE_BLOCKLIST, XML_BLOCK_LIST, true, true); sal_uInt16 nBlocks= rBlockList.GetCount(); for ( sal_uInt16 i = 0; i < nBlocks; i++) { diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index 009d5660fe3e..07e6027f43c1 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -4223,9 +4223,9 @@ namespace { { mrTextNode.RemoveFromList(); - const SwNumRuleItem& pNumRuleItem = + const SwNumRuleItem& rNumRuleItem = dynamic_cast<const SwNumRuleItem&>(pItem); - if ( !pNumRuleItem.GetValue().isEmpty() ) + if ( !rNumRuleItem.GetValue().isEmpty() ) { mbAddTextNodeToList = true; // #i105562# @@ -4238,12 +4238,12 @@ namespace { // handle RES_PARATR_LIST_ID case RES_PARATR_LIST_ID: { - const SfxStringItem& pListIdItem = + const SfxStringItem& rListIdItem = dynamic_cast<const SfxStringItem&>(pItem); - OSL_ENSURE( pListIdItem.GetValue().getLength() > 0, + OSL_ENSURE( rListIdItem.GetValue().getLength() > 0, "<HandleSetAttrAtTextNode(..)> - empty list id attribute not excepted. Serious defect." ); const OUString sListIdOfTextNode = rTextNode.GetListId(); - if ( pListIdItem.GetValue() != sListIdOfTextNode ) + if ( rListIdItem.GetValue() != sListIdOfTextNode ) { mbAddTextNodeToList = true; if ( mrTextNode.IsInList() ) diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index 4c9a42176bb7..edee1e0c5519 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -1018,10 +1018,10 @@ public: { m_vPropertyValues.clear(); } void Apply(SwXStyle& rStyle) { - for(auto& pPropertyPair : m_vPropertyValues) + for(const auto& rPropertyPair : m_vPropertyValues) { - if(pPropertyPair.second.hasValue()) - rStyle.setPropertyValue(pPropertyPair.first, pPropertyPair.second); + if(rPropertyPair.second.hasValue()) + rStyle.setPropertyValue(rPropertyPair.first, rPropertyPair.second); } } static void GetProperty(const OUString &rPropertyName, const uno::Reference < beans::XPropertySet > &rxPropertySet, uno::Any& rAny ) @@ -1588,34 +1588,34 @@ void SwXStyle::SetPropertyValue<FN_UNO_NUM_RULES>(const SfxItemPropertySimpleEnt if(!pFormat) continue; SwNumFormat aFormat(*pFormat); - const auto pCharName(pSwXRules->GetNewCharStyleNames()[i]); - if(!pCharName.isEmpty() - && !SwXNumberingRules::isInvalidStyle(pCharName) - && (!pFormat->GetCharFormat() || pFormat->GetCharFormat()->GetName() != pCharName)) + const auto& rCharName(pSwXRules->GetNewCharStyleNames()[i]); + if(!rCharName.isEmpty() + && !SwXNumberingRules::isInvalidStyle(rCharName) + && (!pFormat->GetCharFormat() || pFormat->GetCharFormat()->GetName() != rCharName)) { auto pCharFormatIt(std::find_if(m_pDoc->GetCharFormats()->begin(), m_pDoc->GetCharFormats()->end(), - [&pCharName] (SwCharFormat* pF) { return pF->GetName() == pCharName; })); + [&rCharName] (SwCharFormat* pF) { return pF->GetName() == rCharName; })); if(pCharFormatIt != m_pDoc->GetCharFormats()->end()) aFormat.SetCharFormat(*pCharFormatIt); else if(m_pBasePool) { - auto pBase(static_cast<SfxStyleSheetBasePool*>(m_pBasePool)->Find(pCharName, SFX_STYLE_FAMILY_CHAR)); + auto pBase(static_cast<SfxStyleSheetBasePool*>(m_pBasePool)->Find(rCharName, SFX_STYLE_FAMILY_CHAR)); if(!pBase) - pBase = &m_pBasePool->Make(pCharName, SFX_STYLE_FAMILY_CHAR); + pBase = &m_pBasePool->Make(rCharName, SFX_STYLE_FAMILY_CHAR); aFormat.SetCharFormat(static_cast<SwDocStyleSheet*>(pBase)->GetCharFormat()); } else aFormat.SetCharFormat(nullptr); } // same for fonts: - const auto pBulletName(pSwXRules->GetBulletFontNames()[i]); - if(!pBulletName.isEmpty() - && !SwXNumberingRules::isInvalidStyle(pBulletName) - && (!pFormat->GetBulletFont() || pFormat->GetBulletFont()->GetFamilyName() != pBulletName)) + const auto& rBulletName(pSwXRules->GetBulletFontNames()[i]); + if(!rBulletName.isEmpty() + && !SwXNumberingRules::isInvalidStyle(rBulletName) + && (!pFormat->GetBulletFont() || pFormat->GetBulletFont()->GetFamilyName() != rBulletName)) { const auto pFontListItem(static_cast<const SvxFontListItem*>(m_pDoc->GetDocShell()->GetItem(SID_ATTR_CHAR_FONTLIST))); const auto pList(pFontListItem->GetFontList()); - FontMetric aFontInfo(pList->Get(pBulletName, WEIGHT_NORMAL, ITALIC_NONE)); + FontMetric aFontInfo(pList->Get(rBulletName, WEIGHT_NORMAL, ITALIC_NONE)); vcl::Font aFont(aFontInfo); aFormat.SetBulletFont(&aFont); } diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index caccb2dd038a..b3fbaacb6af7 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -4742,9 +4742,8 @@ void DocxAttributeOutput::WriteOLE( SwOLENode& rNode, const Size& rSize, const S { // get interoperability information about embedded objects uno::Reference< beans::XPropertySet > xPropSet( m_rExport.m_pDoc->GetDocShell()->GetBaseModel(), uno::UNO_QUERY_THROW ); - OUString pName = UNO_NAME_MISC_OBJ_INTEROPGRABBAG; uno::Sequence< beans::PropertyValue > aGrabBag, aObjectsInteropList,aObjectInteropAttributes; - xPropSet->getPropertyValue( pName ) >>= aGrabBag; + xPropSet->getPropertyValue( UNO_NAME_MISC_OBJ_INTEROPGRABBAG ) >>= aGrabBag; for( sal_Int32 i=0; i < aGrabBag.getLength(); ++i ) if ( aGrabBag[i].Name == "EmbeddedObjects" ) { @@ -5038,12 +5037,12 @@ bool DocxAttributeOutput::IsDiagram( const SdrObject* sdrObject ) // if the shape doesn't have the InteropGrabBag property, it's not a diagram uno::Reference< beans::XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo(); - OUString pName = UNO_NAME_MISC_OBJ_INTEROPGRABBAG; - if ( !xPropSetInfo->hasPropertyByName( pName ) ) + OUString aName = UNO_NAME_MISC_OBJ_INTEROPGRABBAG; + if ( !xPropSetInfo->hasPropertyByName( aName ) ) return false; uno::Sequence< beans::PropertyValue > propList; - xPropSet->getPropertyValue( pName ) >>= propList; + xPropSet->getPropertyValue( aName ) >>= propList; for ( sal_Int32 nProp=0; nProp < propList.getLength(); ++nProp ) { // if we find any of the diagram components, it's a diagram diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index 0ccfe9c375a6..b23506ec4a1c 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -882,11 +882,11 @@ void DocxExport::WriteSettings() uno::Reference< beans::XPropertySet > xPropSet( m_pDoc->GetDocShell()->GetBaseModel(), uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo(); - OUString pName = UNO_NAME_MISC_OBJ_INTEROPGRABBAG; - if ( xPropSetInfo->hasPropertyByName( pName ) ) + OUString aGrabBagName = UNO_NAME_MISC_OBJ_INTEROPGRABBAG; + if ( xPropSetInfo->hasPropertyByName( aGrabBagName ) ) { uno::Sequence< beans::PropertyValue > propList; - xPropSet->getPropertyValue( pName ) >>= propList; + xPropSet->getPropertyValue( aGrabBagName ) >>= propList; for( sal_Int32 i=0; i < propList.getLength(); ++i ) { if ( propList[i].Name == "ThemeFontLangProps" ) @@ -961,13 +961,13 @@ void DocxExport::WriteTheme() uno::Reference< beans::XPropertySet > xPropSet( m_pDoc->GetDocShell()->GetBaseModel(), uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo(); - OUString pName = UNO_NAME_MISC_OBJ_INTEROPGRABBAG; - if ( !xPropSetInfo->hasPropertyByName( pName ) ) + OUString aName = UNO_NAME_MISC_OBJ_INTEROPGRABBAG; + if ( !xPropSetInfo->hasPropertyByName( aName ) ) return; uno::Reference<xml::dom::XDocument> themeDom; uno::Sequence< beans::PropertyValue > propList; - xPropSet->getPropertyValue( pName ) >>= propList; + xPropSet->getPropertyValue( aName ) >>= propList; for ( sal_Int32 nProp=0; nProp < propList.getLength(); ++nProp ) { OUString propName = propList[nProp].Name; @@ -999,14 +999,14 @@ void DocxExport::WriteGlossary() uno::Reference< beans::XPropertySet > xPropSet( m_pDoc->GetDocShell()->GetBaseModel(), uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo(); - OUString pName = UNO_NAME_MISC_OBJ_INTEROPGRABBAG; - if ( !xPropSetInfo->hasPropertyByName( pName ) ) + OUString aName = UNO_NAME_MISC_OBJ_INTEROPGRABBAG; + if ( !xPropSetInfo->hasPropertyByName( aName ) ) return; uno::Reference<xml::dom::XDocument> glossaryDocDom; uno::Sequence< uno::Sequence< uno::Any> > glossaryDomList; uno::Sequence< beans::PropertyValue > propList; - xPropSet->getPropertyValue( pName ) >>= propList; + xPropSet->getPropertyValue( aName ) >>= propList; sal_Int32 collectedProperties = 0; for ( sal_Int32 nProp=0; nProp < propList.getLength(); ++nProp ) { @@ -1070,14 +1070,14 @@ void DocxExport::WriteCustomXml() uno::Reference< beans::XPropertySet > xPropSet( m_pDoc->GetDocShell()->GetBaseModel(), uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo(); - OUString pName = UNO_NAME_MISC_OBJ_INTEROPGRABBAG; - if ( !xPropSetInfo->hasPropertyByName( pName ) ) + OUString aName = UNO_NAME_MISC_OBJ_INTEROPGRABBAG; + if ( !xPropSetInfo->hasPropertyByName( aName ) ) return; uno::Sequence<uno::Reference<xml::dom::XDocument> > customXmlDomlist; uno::Sequence<uno::Reference<xml::dom::XDocument> > customXmlDomPropslist; uno::Sequence< beans::PropertyValue > propList; - xPropSet->getPropertyValue( pName ) >>= propList; + xPropSet->getPropertyValue( aName ) >>= propList; for ( sal_Int32 nProp=0; nProp < propList.getLength(); ++nProp ) { OUString propName = propList[nProp].Name; @@ -1141,14 +1141,14 @@ void DocxExport::WriteActiveX() uno::Reference< beans::XPropertySet > xPropSet( m_pDoc->GetDocShell()->GetBaseModel(), uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo(); - OUString pName = UNO_NAME_MISC_OBJ_INTEROPGRABBAG; - if ( !xPropSetInfo->hasPropertyByName( pName ) ) + OUString aName = UNO_NAME_MISC_OBJ_INTEROPGRABBAG; + if ( !xPropSetInfo->hasPropertyByName( aName ) ) return; uno::Sequence<uno::Reference<xml::dom::XDocument> > activeXDomlist; uno::Sequence<uno::Reference<io::XInputStream> > activeXBinList; uno::Sequence< beans::PropertyValue > propList; - xPropSet->getPropertyValue( pName ) >>= propList; + xPropSet->getPropertyValue( aName ) >>= propList; for ( sal_Int32 nProp=0; nProp < propList.getLength(); ++nProp ) { OUString propName = propList[nProp].Name; @@ -1235,13 +1235,13 @@ void DocxExport::WriteEmbeddings() uno::Reference< beans::XPropertySet > xPropSet( m_pDoc->GetDocShell()->GetBaseModel(), uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo(); - OUString pName = UNO_NAME_MISC_OBJ_INTEROPGRABBAG; - if ( !xPropSetInfo->hasPropertyByName( pName ) ) + OUString aName = UNO_NAME_MISC_OBJ_INTEROPGRABBAG; + if ( !xPropSetInfo->hasPropertyByName( aName ) ) return; uno::Sequence< beans::PropertyValue > embeddingsList; uno::Sequence< beans::PropertyValue > propList; - xPropSet->getPropertyValue( pName ) >>= propList; + xPropSet->getPropertyValue( aName ) >>= propList; for ( sal_Int32 nProp=0; nProp < propList.getLength(); ++nProp ) { OUString propName = propList[nProp].Name; diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx index 7751927efcb0..5d60ca611f13 100644 --- a/sw/source/filter/ww8/docxsdrexport.cxx +++ b/sw/source/filter/ww8/docxsdrexport.cxx @@ -287,8 +287,8 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrameFormat* pFrameFormat, cons m_pImpl->m_bParagraphHasDrawing = true; m_pImpl->m_pSerializer->startElementNS(XML_w, XML_drawing, FSEND); - const SvxLRSpaceItem pLRSpaceItem = pFrameFormat->GetLRSpace(false); - const SvxULSpaceItem pULSpaceItem = pFrameFormat->GetULSpace(false); + const SvxLRSpaceItem aLRSpaceItem = pFrameFormat->GetLRSpace(false); + const SvxULSpaceItem aULSpaceItem = pFrameFormat->GetULSpace(false); bool isAnchor; @@ -364,10 +364,10 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrameFormat* pFrameFormat, cons lclMovePositionWithRotation(aPos, rSize, pObj->GetRotateAngle()); } attrList->add(XML_behindDoc, bOpaque ? "0" : "1"); - attrList->add(XML_distT, OString::number(TwipsToEMU(pULSpaceItem.GetUpper()) - nTopExt).getStr()); - attrList->add(XML_distB, OString::number(TwipsToEMU(pULSpaceItem.GetLower()) - nBottomExt).getStr()); - attrList->add(XML_distL, OString::number(TwipsToEMU(pLRSpaceItem.GetLeft()) - nLeftExt).getStr()); - attrList->add(XML_distR, OString::number(TwipsToEMU(pLRSpaceItem.GetRight()) - nRightExt).getStr()); + attrList->add(XML_distT, OString::number(TwipsToEMU(aULSpaceItem.GetUpper()) - nTopExt).getStr()); + attrList->add(XML_distB, OString::number(TwipsToEMU(aULSpaceItem.GetLower()) - nBottomExt).getStr()); + attrList->add(XML_distL, OString::number(TwipsToEMU(aLRSpaceItem.GetLeft()) - nLeftExt).getStr()); + attrList->add(XML_distR, OString::number(TwipsToEMU(aLRSpaceItem.GetRight()) - nRightExt).getStr()); attrList->add(XML_simplePos, "0"); attrList->add(XML_locked, "0"); attrList->add(XML_layoutInCell, "1"); @@ -556,10 +556,10 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrameFormat* pFrameFormat, cons else { sax_fastparser::FastAttributeList* aAttrList = sax_fastparser::FastSerializerHelper::createAttrList(); - aAttrList->add(XML_distT, OString::number(TwipsToEMU(pULSpaceItem.GetUpper())).getStr()); - aAttrList->add(XML_distB, OString::number(TwipsToEMU(pULSpaceItem.GetLower())).getStr()); - aAttrList->add(XML_distL, OString::number(TwipsToEMU(pLRSpaceItem.GetLeft())).getStr()); - aAttrList->add(XML_distR, OString::number(TwipsToEMU(pLRSpaceItem.GetRight())).getStr()); + aAttrList->add(XML_distT, OString::number(TwipsToEMU(aULSpaceItem.GetUpper())).getStr()); + aAttrList->add(XML_distB, OString::number(TwipsToEMU(aULSpaceItem.GetLower())).getStr()); + aAttrList->add(XML_distL, OString::number(TwipsToEMU(aLRSpaceItem.GetLeft())).getStr()); + aAttrList->add(XML_distR, OString::number(TwipsToEMU(aLRSpaceItem.GetRight())).getStr()); const SdrObject* pObj = pFrameFormat->FindRealSdrObject(); if (pObj != nullptr) { @@ -1120,9 +1120,8 @@ void DocxSdrExport::writeDiagram(const SdrObject* sdrObject, const SwFrameFormat uno::Sequence< uno::Any > diagramDrawing; // retrieve the doms from the GrabBag - OUString pName = UNO_NAME_MISC_OBJ_INTEROPGRABBAG; uno::Sequence< beans::PropertyValue > propList; - xPropSet->getPropertyValue(pName) >>= propList; + xPropSet->getPropertyValue(UNO_NAME_MISC_OBJ_INTEROPGRABBAG) >>= propList; for (sal_Int32 nProp=0; nProp < propList.getLength(); ++nProp) { OUString propName = propList[nProp].Name; diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index 39b4a68fc5ae..73bf75704009 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -3843,7 +3843,7 @@ void RtfAttributeOutput::FlyFrameGraphic(const SwFlyFrameFormat* pFlyFrameFormat if (rGraphic.GetType()==GRAPHIC_NONE) return; - ConvertDataFormat pConvertDestinationFormat = ConvertDataFormat::WMF; + ConvertDataFormat aConvertDestinationFormat = ConvertDataFormat::WMF; const sal_Char* pConvertDestinationBLIPType = OOO_STRING_SVTOOLS_RTF_WMETAFILE; GfxLink aGraphicLink; @@ -3880,7 +3880,7 @@ void RtfAttributeOutput::FlyFrameGraphic(const SwFlyFrameFormat* pFlyFrameFormat break; case GFX_LINK_TYPE_NATIVE_GIF: // GIF is not supported by RTF, but we override default conversion to WMF, PNG seems fits better here. - pConvertDestinationFormat = ConvertDataFormat::PNG; + aConvertDestinationFormat = ConvertDataFormat::PNG; pConvertDestinationBLIPType = OOO_STRING_SVTOOLS_RTF_PNGBLIP; break; default: @@ -3991,7 +3991,7 @@ void RtfAttributeOutput::FlyFrameGraphic(const SwFlyFrameFormat* pFlyFrameFormat else { aStream.Seek(0); - if (GraphicConverter::Export(aStream, rGraphic, pConvertDestinationFormat) != ERRCODE_NONE) + if (GraphicConverter::Export(aStream, rGraphic, aConvertDestinationFormat) != ERRCODE_NONE) SAL_WARN("sw.rtf", "failed to export the graphic"); pBLIPType = pConvertDestinationBLIPType; aStream.Seek(STREAM_SEEK_TO_END); diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index b908572e65c5..efc41222338c 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -1566,14 +1566,14 @@ SwNumRule* WW8ListManager::GetNumRuleForActivation(sal_uInt16 nLFOPosition, // #i25545# // #i100132# - a number format does not have to exist on given list level - SwNumFormat pFormat(rLFOInfo.pNumRule->Get(nLevel)); + SwNumFormat aFormat(rLFOInfo.pNumRule->Get(nLevel)); if (rReader.IsRightToLeft() && nLastLFOPosition != nLFOPosition) { - if ( pFormat.GetNumAdjust() == SVX_ADJUST_RIGHT) - pFormat.SetNumAdjust(SVX_ADJUST_LEFT); - else if ( pFormat.GetNumAdjust() == SVX_ADJUST_LEFT) - pFormat.SetNumAdjust(SVX_ADJUST_RIGHT); - rLFOInfo.pNumRule->Set(nLevel, pFormat); + if ( aFormat.GetNumAdjust() == SVX_ADJUST_RIGHT) + aFormat.SetNumAdjust(SVX_ADJUST_LEFT); + else if ( aFormat.GetNumAdjust() == SVX_ADJUST_LEFT) + aFormat.SetNumAdjust(SVX_ADJUST_RIGHT); + rLFOInfo.pNumRule->Set(nLevel, aFormat); } nLastLFOPosition = nLFOPosition; /* @@ -2316,11 +2316,11 @@ awt::Size SwWW8ImplReader::MiserableDropDownFormHack(const OUString &rString, { case RES_CHRATR_COLOR: { - OUString pNm; - if (xPropSetInfo->hasPropertyByName(pNm = "TextColor")) + OUString aNm; + if (xPropSetInfo->hasPropertyByName(aNm = "TextColor")) { aTmp <<= (sal_Int32)static_cast<const SvxColorItem*>(pItem)->GetValue().GetColor(); - rPropSet->setPropertyValue(pNm, aTmp); + rPropSet->setPropertyValue(aNm, aTmp); } } aFont.SetColor(static_cast<const SvxColorItem*>(pItem)->GetValue()); @@ -2328,26 +2328,26 @@ awt::Size SwWW8ImplReader::MiserableDropDownFormHack(const OUString &rString, case RES_CHRATR_FONT: { const SvxFontItem *pFontItem = static_cast<const SvxFontItem *>(pItem); - OUString pNm; - if (xPropSetInfo->hasPropertyByName(pNm = "FontStyleName")) + OUString aNm; + if (xPropSetInfo->hasPropertyByName(aNm = "FontStyleName")) { aTmp <<= OUString( pFontItem->GetStyleName()); - rPropSet->setPropertyValue( pNm, aTmp ); + rPropSet->setPropertyValue( aNm, aTmp ); } - if (xPropSetInfo->hasPropertyByName(pNm = "FontFamily")) + if (xPropSetInfo->hasPropertyByName(aNm = "FontFamily")) { aTmp <<= (sal_Int16)pFontItem->GetFamily(); - rPropSet->setPropertyValue( pNm, aTmp ); + rPropSet->setPropertyValue( aNm, aTmp ); } - if (xPropSetInfo->hasPropertyByName(pNm = "FontCharset")) + if (xPropSetInfo->hasPropertyByName(aNm = "FontCharset")) { aTmp <<= (sal_Int16)pFontItem->GetCharSet(); - rPropSet->setPropertyValue( pNm, aTmp ); + rPropSet->setPropertyValue( aNm, aTmp ); } - if (xPropSetInfo->hasPropertyByName(pNm = "FontPitch")) + if (xPropSetInfo->hasPropertyByName(aNm = "FontPitch")) { aTmp <<= (sal_Int16)pFontItem->GetPitch(); - rPropSet->setPropertyValue( pNm, aTmp ); + rPropSet->setPropertyValue( aNm, aTmp ); } aTmp <<= OUString( pFontItem->GetFamilyName()); diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx index 5d0939d4b49e..e192acd6556e 100644 --- a/sw/source/filter/ww8/ww8par5.cxx +++ b/sw/source/filter/ww8/ww8par5.cxx @@ -534,8 +534,8 @@ sal_uInt16 SwWW8ImplReader::End_Field() aFieldPam, m_aFieldStack.back().GetBookmarkName(), ODF_FORMTEXT ) ); OSL_ENSURE(pFieldmark!=nullptr, "hmmm; why was the bookmark not created?"); if (pFieldmark!=nullptr) { - const IFieldmark::parameter_map_t& pParametersToAdd = m_aFieldStack.back().getParameters(); - pFieldmark->GetParameters()->insert(pParametersToAdd.begin(), pParametersToAdd.end()); + const IFieldmark::parameter_map_t& rParametersToAdd = m_aFieldStack.back().getParameters(); + pFieldmark->GetParameters()->insert(rParametersToAdd.begin(), rParametersToAdd.end()); } } break; @@ -607,8 +607,8 @@ sal_uInt16 SwWW8ImplReader::End_Field() ODF_UNHANDLED ); if ( pFieldmark ) { - const IFieldmark::parameter_map_t& pParametersToAdd = m_aFieldStack.back().getParameters(); - pFieldmark->GetParameters()->insert(pParametersToAdd.begin(), pParametersToAdd.end()); + const IFieldmark::parameter_map_t& rParametersToAdd = m_aFieldStack.back().getParameters(); + pFieldmark->GetParameters()->insert(rParametersToAdd.begin(), rParametersToAdd.end()); OUString sFieldId = OUString::number( m_aFieldStack.back().mnFieldId ); pFieldmark->GetParameters()->insert( std::pair< OUString, uno::Any > ( diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx index 7fb511a6f66d..d7cccbf14e8e 100644 --- a/sw/source/ui/envelp/envfmt.cxx +++ b/sw/source/ui/envelp/envfmt.cxx @@ -370,10 +370,10 @@ SfxItemSet *SwEnvFormatPage::GetCollItemSet(SwTextFormatColl* pColl, bool bSende }; // BruteForce merge because MergeRange in SvTools is buggy: - std::vector<sal_uInt16> pVec = ::lcl_convertRangesToList(pRanges); + std::vector<sal_uInt16> aVec2 = ::lcl_convertRangesToList(pRanges); std::vector<sal_uInt16> aVec = ::lcl_convertRangesToList(aRanges); - pVec.insert(pVec.end(), aVec.begin(), aVec.end()); - std::unique_ptr<sal_uInt16[]> pNewRanges(::lcl_convertListToRanges(pVec)); + aVec2.insert(aVec2.end(), aVec.begin(), aVec.end()); + std::unique_ptr<sal_uInt16[]> pNewRanges(::lcl_convertListToRanges(aVec2)); pAddrSet = new SfxItemSet(GetParentSwEnvDlg()->pSh->GetView().GetCurShell()->GetPool(), pNewRanges.get()); diff --git a/sw/source/uibase/docvw/SidebarWin.cxx b/sw/source/uibase/docvw/SidebarWin.cxx index 58f5b4409547..acac39f59642 100644 --- a/sw/source/uibase/docvw/SidebarWin.cxx +++ b/sw/source/uibase/docvw/SidebarWin.cxx @@ -1156,7 +1156,7 @@ void SwSidebarWin::SetReadonly(bool bSet) void SwSidebarWin::SetLanguage(const SvxLanguageItem& rNewItem) { - Link<LinkParamNone*,void> pLink = Engine()->GetModifyHdl(); + Link<LinkParamNone*,void> aLink = Engine()->GetModifyHdl(); Engine()->SetModifyHdl( Link<LinkParamNone*,void>() ); ESelection aOld = GetOutlinerView()->GetSelection(); @@ -1167,7 +1167,7 @@ void SwSidebarWin::SetLanguage(const SvxLanguageItem& rNewItem) GetOutlinerView()->SetAttribs( aEditAttr ); GetOutlinerView()->SetSelection(aOld); - Engine()->SetModifyHdl( pLink ); + Engine()->SetModifyHdl( aLink ); const SwViewOption* pVOpt = mrView.GetWrtShellPtr()->GetViewOptions(); EEControlBits nCntrl = Engine()->GetControlWord(); diff --git a/sw/source/uibase/shells/txtattr.cxx b/sw/source/uibase/shells/txtattr.cxx index 43d4eef57fd5..a6532d604250 100644 --- a/sw/source/uibase/shells/txtattr.cxx +++ b/sw/source/uibase/shells/txtattr.cxx @@ -635,15 +635,15 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet) { std::vector<std::pair< const SfxPoolItem*, std::unique_ptr<SwPaM> >> vFontHeight = rSh.GetItemWithPaM( RES_CHRATR_FONTSIZE ); - for ( std::pair< const SfxPoolItem*, std::unique_ptr<SwPaM>>& pIt : vFontHeight ) + for ( const std::pair< const SfxPoolItem*, std::unique_ptr<SwPaM>>& aIt : vFontHeight ) { - if (!pIt.first) + if (!aIt.first) { rSet.DisableItem(FN_GROW_FONT_SIZE); rSet.DisableItem(FN_SHRINK_FONT_SIZE); break; } - pSize = static_cast<const SvxFontHeightItem*>( pIt.first ); + pSize = static_cast<const SvxFontHeightItem*>( aIt.first ); sal_uInt32 nSize = pSize->GetHeight(); if( nSize == nFontMaxSz ) rSet.DisableItem( FN_GROW_FONT_SIZE ); diff --git a/sw/source/uibase/uno/unomailmerge.cxx b/sw/source/uibase/uno/unomailmerge.cxx index bdf0fbb33bf5..3c335f6ea779 100644 --- a/sw/source/uibase/uno/unomailmerge.cxx +++ b/sw/source/uibase/uno/unomailmerge.cxx @@ -420,7 +420,7 @@ public: } ~MailMergeExecuteFinalizer() { - osl::MutexGuard pMgrGuard( GetMailMergeMutex() ); + osl::MutexGuard aMgrGuard( GetMailMergeMutex() ); m_pMailMerge->m_pMgr = nullptr; } @@ -838,7 +838,7 @@ void SAL_CALL SwXMailMerge::cancel() throw (css::uno::RuntimeException, std::exc { // Cancel may be called from a second thread, so this protects from m_pMgr /// cleanup in the execute function. - osl::MutexGuard pMgrGuard( GetMailMergeMutex() ); + osl::MutexGuard aMgrGuard( GetMailMergeMutex() ); if (m_pMgr) m_pMgr->MergeCancel(); } diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 165289ba089d..072d82b3f1c0 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -2711,10 +2711,10 @@ void SwContentTree::KeyInput(const KeyEvent& rEvent) } if ( !hasObjectMarked ) { - SwEditWin& pEditWindow = m_pActiveShell->GetView().GetEditWin(); + SwEditWin& rEditWindow = m_pActiveShell->GetView().GetEditWin(); vcl::KeyCode tempKeycode( KEY_ESCAPE ); KeyEvent rKEvt( 0 , tempKeycode ); - static_cast<vcl::Window*>(&pEditWindow)->KeyInput( rKEvt ); + static_cast<vcl::Window*>(&rEditWindow)->KeyInput( rKEvt ); } } } diff --git a/sw/source/uibase/utlui/gloslst.cxx b/sw/source/uibase/utlui/gloslst.cxx index 94678dee00ac..21fa08f59d04 100644 --- a/sw/source/uibase/utlui/gloslst.cxx +++ b/sw/source/uibase/utlui/gloslst.cxx @@ -137,11 +137,11 @@ bool SwGlossaryList::GetShortName(const OUString& rLongName, if(rLongName != sLong) continue; - TripleString pTriple; - pTriple.sGroup = pGroup->sName; - pTriple.sBlock = sLong; - pTriple.sShort = pGroup->sShortNames.getToken(j, STRING_DELIM); - aTripleStrings.push_back(pTriple); + TripleString aTriple; + aTriple.sGroup = pGroup->sName; + aTriple.sBlock = sLong; + aTriple.sShort = pGroup->sShortNames.getToken(j, STRING_DELIM); + aTripleStrings.push_back(aTriple); } } @@ -149,9 +149,9 @@ bool SwGlossaryList::GetShortName(const OUString& rLongName, nCount = aTripleStrings.size(); if(1 == nCount) { - const TripleString& pTriple(aTripleStrings.front()); - rShortName = pTriple.sShort; - rGroupName = pTriple.sGroup; + const TripleString& rTriple(aTripleStrings.front()); + rShortName = rTriple.sShort; + rGroupName = rTriple.sGroup; bRet = true; } else if(1 < nCount) @@ -168,9 +168,9 @@ bool SwGlossaryList::GetShortName(const OUString& rLongName, if(RET_OK == aDlg->Execute() && LISTBOX_ENTRY_NOTFOUND != rLB.GetSelectEntryPos()) { - const TripleString& pTriple(aTripleStrings[rLB.GetSelectEntryPos()]); - rShortName = pTriple.sShort; - rGroupName = pTriple.sGroup; + const TripleString& rTriple(aTripleStrings[rLB.GetSelectEntryPos()]); + rShortName = rTriple.sShort; + rGroupName = rTriple.sGroup; bRet = true; } else diff --git a/tools/source/ref/errinf.cxx b/tools/source/ref/errinf.cxx index 07e59f0fd773..32bfb80b4659 100644 --- a/tools/source/ref/errinf.cxx +++ b/tools/source/ref/errinf.cxx @@ -70,17 +70,17 @@ EDcrData::EDcrData() void DynamicErrorInfo_Impl::RegisterEDcr(DynamicErrorInfo *pDcr) { // Register dynamic identifier - EDcrData& pData = TheEDcrData::get(); - lErrId = (((sal_uIntPtr)pData.nNextDcr + 1) << ERRCODE_DYNAMIC_SHIFT) + + EDcrData& rData = TheEDcrData::get(); + lErrId = (((sal_uIntPtr)rData.nNextDcr + 1) << ERRCODE_DYNAMIC_SHIFT) + pDcr->GetErrorCode(); - if(pData.ppDcr[pData.nNextDcr]) + if(rData.ppDcr[rData.nNextDcr]) { - delete pData.ppDcr[pData.nNextDcr]; + delete rData.ppDcr[rData.nNextDcr]; } - pData.ppDcr[pData.nNextDcr] = pDcr; - if(++pData.nNextDcr>=ERRCODE_DYNAMIC_COUNT) - pData.nNextDcr=0; + rData.ppDcr[rData.nNextDcr] = pDcr; + if(++rData.nNextDcr>=ERRCODE_DYNAMIC_COUNT) + rData.nNextDcr=0; } void DynamicErrorInfo_Impl::UnRegisterEDcr(DynamicErrorInfo *pDcr) @@ -187,9 +187,9 @@ ErrorContext *ErrorContext::GetContext() ErrorHandler::ErrorHandler() : pImpl(new ErrorHandler_Impl) { - EDcrData &pData = TheEDcrData::get(); - pData.errorHandlers.insert(pData.errorHandlers.begin(), this); - if(!pData.pDsp) + EDcrData &rData = TheEDcrData::get(); + rData.errorHandlers.insert(rData.errorHandlers.begin(), this); + if(!rData.pDsp) RegisterDisplay(&aDspFunc); } @@ -206,16 +206,16 @@ vcl::Window* ErrorContext::GetParent() void ErrorHandler::RegisterDisplay(WindowDisplayErrorFunc *aDsp) { - EDcrData &pData = TheEDcrData::get(); - pData.bIsWindowDsp = true; - pData.pDsp = reinterpret_cast< DisplayFnPtr >(aDsp); + EDcrData &rData = TheEDcrData::get(); + rData.bIsWindowDsp = true; + rData.pDsp = reinterpret_cast< DisplayFnPtr >(aDsp); } void ErrorHandler::RegisterDisplay(BasicDisplayErrorFunc *aDsp) { - EDcrData &pData = TheEDcrData::get(); - pData.bIsWindowDsp = false; - pData.pDsp = reinterpret_cast< DisplayFnPtr >(aDsp); + EDcrData &rData = TheEDcrData::get(); + rData.bIsWindowDsp = false; + rData.pDsp = reinterpret_cast< DisplayFnPtr >(aDsp); } /** Handles an error. @@ -243,14 +243,14 @@ sal_uInt16 ErrorHandler::HandleError_Impl( OUString aAction; if(!lId || lId == ERRCODE_ABORT) return 0; - EDcrData &pData = TheEDcrData::get(); + EDcrData &rData = TheEDcrData::get(); vcl::Window *pParent = nullptr; ErrorInfo *pInfo = ErrorInfo::GetErrorInfo(lId); - if (!pData.contexts.empty()) + if (!rData.contexts.empty()) { - pData.contexts.front()->GetString(pInfo->GetErrorCode(), aAction); + rData.contexts.front()->GetString(pInfo->GetErrorCode(), aAction); // Remove parent from context - for(ErrorContext *pCtx : pData.contexts) + for(ErrorContext *pCtx : rData.contexts) if(pCtx->GetParent()) { pParent=pCtx->GetParent(); @@ -282,7 +282,7 @@ sal_uInt16 ErrorHandler::HandleError_Impl( } else { - if(!pData.pDsp) + if(!rData.pDsp) { OStringBuffer aStr("Action: "); aStr.append(OUStringToOString(aAction, RTL_TEXTENCODING_ASCII_US)); @@ -293,16 +293,16 @@ sal_uInt16 ErrorHandler::HandleError_Impl( else { delete pInfo; - if(!pData.bIsWindowDsp) + if(!rData.bIsWindowDsp) { - (*reinterpret_cast<BasicDisplayErrorFunc*>(pData.pDsp))(aErr,aAction); + (*reinterpret_cast<BasicDisplayErrorFunc*>(rData.pDsp))(aErr,aAction); return 0; } else { if (nFlags != USHRT_MAX) nErrFlags = nFlags; - return (*reinterpret_cast<WindowDisplayErrorFunc*>(pData.pDsp))( + return (*reinterpret_cast<WindowDisplayErrorFunc*>(rData.pDsp))( pParent, nErrFlags, aErr, aAction); } } diff --git a/vbahelper/source/vbahelper/vbalineformat.cxx b/vbahelper/source/vbahelper/vbalineformat.cxx index 9d83d7059e6c..3f418205672b 100644 --- a/vbahelper/source/vbahelper/vbalineformat.cxx +++ b/vbahelper/source/vbahelper/vbalineformat.cxx @@ -350,64 +350,64 @@ ScVbaLineFormat::setDashStyle( sal_Int32 _dashstyle ) throw (uno::RuntimeExcepti else { m_xPropertySet->setPropertyValue( "LineStyle" , uno::makeAny( drawing::LineStyle_DASH ) ); - drawing::LineDash pLineDash; + drawing::LineDash aLineDash; Millimeter aMillimeter( m_nLineWeight ); sal_Int32 nPixel = static_cast< sal_Int32 >( aMillimeter.getInHundredthsOfOneMillimeter() ); switch( _dashstyle ) { case office::MsoLineDashStyle::msoLineDashDot: - pLineDash.Dots = 1; - pLineDash.DotLen = nPixel; - pLineDash.Dashes = 1; - pLineDash.DashLen = 5 * nPixel; - pLineDash.Distance = 4 * nPixel; + aLineDash.Dots = 1; + aLineDash.DotLen = nPixel; + aLineDash.Dashes = 1; + aLineDash.DashLen = 5 * nPixel; + aLineDash.Distance = 4 * nPixel; break; case office::MsoLineDashStyle::msoLineLongDashDot: - pLineDash.Dots = 1; - pLineDash.DotLen = nPixel; - pLineDash.Dashes = 1; - pLineDash.DashLen = 10 * nPixel; - pLineDash.Distance = 4 * nPixel; + aLineDash.Dots = 1; + aLineDash.DotLen = nPixel; + aLineDash.Dashes = 1; + aLineDash.DashLen = 10 * nPixel; + aLineDash.Distance = 4 * nPixel; break; case office::MsoLineDashStyle::msoLineDash: - pLineDash.Dots = 0; - pLineDash.DotLen = 0; - pLineDash.Dashes = 1; - pLineDash.DashLen = 6 * nPixel; - pLineDash.Distance = 4 * nPixel; + aLineDash.Dots = 0; + aLineDash.DotLen = 0; + aLineDash.Dashes = 1; + aLineDash.DashLen = 6 * nPixel; + aLineDash.Distance = 4 * nPixel; break; case office::MsoLineDashStyle::msoLineDashDotDot: - pLineDash.Dots = 2; - pLineDash.DotLen = nPixel; - pLineDash.Dashes = 1; - pLineDash.DashLen = 10 * nPixel; - pLineDash.Distance = 3 * nPixel; + aLineDash.Dots = 2; + aLineDash.DotLen = nPixel; + aLineDash.Dashes = 1; + aLineDash.DashLen = 10 * nPixel; + aLineDash.Distance = 3 * nPixel; break; case office::MsoLineDashStyle::msoLineLongDash: - pLineDash.Dots = 0; - pLineDash.DotLen = 0; - pLineDash.Dashes = 1; - pLineDash.DashLen = 10 * nPixel; - pLineDash.Distance = 4 * nPixel; + aLineDash.Dots = 0; + aLineDash.DotLen = 0; + aLineDash.Dashes = 1; + aLineDash.DashLen = 10 * nPixel; + aLineDash.Distance = 4 * nPixel; break; case office::MsoLineDashStyle::msoLineSquareDot: - pLineDash.Dots = 1; - pLineDash.DotLen = nPixel; - pLineDash.Dashes = 0; - pLineDash.DashLen = 0; - pLineDash.Distance = nPixel; + aLineDash.Dots = 1; + aLineDash.DotLen = nPixel; + aLineDash.Dashes = 0; + aLineDash.DashLen = 0; + aLineDash.Distance = nPixel; break; case office::MsoLineDashStyle::msoLineRoundDot: - pLineDash.Dots = 1; - pLineDash.DotLen = nPixel; - pLineDash.Dashes = 0; - pLineDash.DashLen = 0; - pLineDash.Distance = nPixel; + aLineDash.Dots = 1; + aLineDash.DotLen = nPixel; + aLineDash.Dashes = 0; + aLineDash.DashLen = 0; + aLineDash.Distance = nPixel; break; default: throw uno::RuntimeException( "this MsoLineDashStyle is not supported." ); } - m_xPropertySet->setPropertyValue( "LineDash" , uno::makeAny( pLineDash ) ); + m_xPropertySet->setPropertyValue( "LineDash" , uno::makeAny( aLineDash ) ); } } diff --git a/vcl/opengl/texture.cxx b/vcl/opengl/texture.cxx index 38ff8f7bd3fb..232b2cd002f0 100644 --- a/vcl/opengl/texture.cxx +++ b/vcl/opengl/texture.cxx @@ -514,9 +514,9 @@ void OpenGLTexture::Unbind() void OpenGLTexture::SaveToFile(const OUString& rFileName) { - std::vector<sal_uInt8> pBuffer(GetWidth() * GetHeight() * 4); - Read(GL_BGRA, GL_UNSIGNED_BYTE, pBuffer.data()); - BitmapEx aBitmap = OpenGLHelper::ConvertBGRABufferToBitmapEx(pBuffer.data(), GetWidth(), GetHeight()); + std::vector<sal_uInt8> aBuffer(GetWidth() * GetHeight() * 4); + Read(GL_BGRA, GL_UNSIGNED_BYTE, aBuffer.data()); + BitmapEx aBitmap = OpenGLHelper::ConvertBGRABufferToBitmapEx(aBuffer.data(), GetWidth(), GetHeight()); try { vcl::PNGWriter aWriter(aBitmap); diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx index 9b973be74dff..9b72256e07fc 100644 --- a/vcl/source/app/help.cxx +++ b/vcl/source/app/help.cxx @@ -668,10 +668,10 @@ void ImplSetHelpWindowPos( vcl::Window* pHelpWin, sal_uInt16 nHelpWinStyle, Quic if( aHelpRect.IsInside( aMousePos ) ) { Point delta(2,2); - Point pSize( aSz.Width(), aSz.Height() ); - Point pTest( aMousePos - pSize - delta ); - if( pTest.X() > aScreenRect.Left() && pTest.Y() > aScreenRect.Top() ) - aPos = pTest; + Point aSize( aSz.Width(), aSz.Height() ); + Point aTest( aMousePos - aSize - delta ); + if( aTest.X() > aScreenRect.Left() && aTest.Y() > aScreenRect.Top() ) + aPos = aTest; else aPos = aMousePos + delta; } diff --git a/vcl/source/bitmap/BitmapProcessor.cxx b/vcl/source/bitmap/BitmapProcessor.cxx index 4d1500049592..a80e36693b68 100644 --- a/vcl/source/bitmap/BitmapProcessor.cxx +++ b/vcl/source/bitmap/BitmapProcessor.cxx @@ -137,9 +137,9 @@ void BitmapProcessor::colorizeImage(BitmapEx& rBitmapEx, Color aColor) BitmapColor aBitmapColor; const long nW = pWriteAccess->Width(); const long nH = pWriteAccess->Height(); - std::vector<sal_uInt8> pMapR(256); - std::vector<sal_uInt8> pMapG(256); - std::vector<sal_uInt8> pMapB(256); + std::vector<sal_uInt8> aMapR(256); + std::vector<sal_uInt8> aMapG(256); + std::vector<sal_uInt8> aMapB(256); long nX; long nY; @@ -149,9 +149,9 @@ void BitmapProcessor::colorizeImage(BitmapEx& rBitmapEx, Color aColor) for (nX = 0; nX < 256; ++nX) { - pMapR[nX] = MinMax((nX + cR) / 2, 0, 255); - pMapG[nX] = MinMax((nX + cG) / 2, 0, 255); - pMapB[nX] = MinMax((nX + cB) / 2, 0, 255); + aMapR[nX] = MinMax((nX + cR) / 2, 0, 255); + aMapG[nX] = MinMax((nX + cG) / 2, 0, 255); + aMapB[nX] = MinMax((nX + cB) / 2, 0, 255); } if (pWriteAccess->HasPalette()) @@ -159,9 +159,9 @@ void BitmapProcessor::colorizeImage(BitmapEx& rBitmapEx, Color aColor) for (sal_uInt16 i = 0, nCount = pWriteAccess->GetPaletteEntryCount(); i < nCount; i++) { const BitmapColor& rCol = pWriteAccess->GetPaletteColor(i); - aBitmapColor.SetRed(pMapR[rCol.GetRed()]); - aBitmapColor.SetGreen(pMapG[rCol.GetGreen()]); - aBitmapColor.SetBlue(pMapB[rCol.GetBlue()]); + aBitmapColor.SetRed(aMapR[rCol.GetRed()]); + aBitmapColor.SetGreen(aMapG[rCol.GetGreen()]); + aBitmapColor.SetBlue(aMapB[rCol.GetBlue()]); pWriteAccess->SetPaletteColor(i, aBitmapColor); } } @@ -173,9 +173,9 @@ void BitmapProcessor::colorizeImage(BitmapEx& rBitmapEx, Color aColor) for (nX = 0; nX < nW; ++nX) { - *pScan = pMapB[*pScan]; pScan++; - *pScan = pMapG[*pScan]; pScan++; - *pScan = pMapR[*pScan]; pScan++; + *pScan = aMapB[*pScan]; pScan++; + *pScan = aMapG[*pScan]; pScan++; + *pScan = aMapR[*pScan]; pScan++; } } } @@ -186,9 +186,9 @@ void BitmapProcessor::colorizeImage(BitmapEx& rBitmapEx, Color aColor) for (nX = 0; nX < nW; ++nX) { aBitmapColor = pWriteAccess->GetPixel(nY, nX); - aBitmapColor.SetRed(pMapR[aBitmapColor.GetRed()]); - aBitmapColor.SetGreen(pMapG[aBitmapColor.GetGreen()]); - aBitmapColor.SetBlue(pMapB[aBitmapColor.GetBlue()]); + aBitmapColor.SetRed(aMapR[aBitmapColor.GetRed()]); + aBitmapColor.SetGreen(aMapG[aBitmapColor.GetGreen()]); + aBitmapColor.SetBlue(aMapB[aBitmapColor.GetBlue()]); pWriteAccess->SetPixel(nY, nX, aBitmapColor); } } diff --git a/vcl/source/bitmap/BitmapTools.cxx b/vcl/source/bitmap/BitmapTools.cxx index f476ca0065e7..cb016c3306a3 100644 --- a/vcl/source/bitmap/BitmapTools.cxx +++ b/vcl/source/bitmap/BitmapTools.cxx @@ -35,11 +35,11 @@ void BitmapTools::loadFromSvg(SvStream& rStream, const OUString& sPath, BitmapEx const uno::Reference<graphic::XSvgParser> xSvgParser = graphic::SvgTools::create(xContext); sal_Size nSize = rStream.remainingSize(); - std::vector<sal_Int8> pBuffer(nSize + 1); - rStream.Read(pBuffer.data(), nSize); - pBuffer[nSize] = 0; + std::vector<sal_Int8> aBuffer(nSize + 1); + rStream.Read(aBuffer.data(), nSize); + aBuffer[nSize] = 0; - uno::Sequence<sal_Int8> aData(pBuffer.data(), nSize + 1); + uno::Sequence<sal_Int8> aData(aBuffer.data(), nSize + 1); uno::Reference<io::XInputStream> aInputStream(new comphelper::SequenceInputStream(aData)); Primitive2DSequence aPrimitiveSequence = xSvgParser->getDecomposition(aInputStream, sPath); diff --git a/vcl/source/edit/textdata.cxx b/vcl/source/edit/textdata.cxx index a3b32c8287c8..841e5cc78433 100644 --- a/vcl/source/edit/textdata.cxx +++ b/vcl/source/edit/textdata.cxx @@ -164,9 +164,9 @@ sal_uInt16 TEParaPortion::GetLineNumber( sal_Int32 nChar, bool bInclEnd ) { for ( size_t nLine = 0; nLine < maLines.size(); nLine++ ) { - TextLine& pLine = maLines[ nLine ]; - if ( ( bInclEnd && ( pLine.GetEnd() >= nChar ) ) || - ( pLine.GetEnd() > nChar ) ) + TextLine& rLine = maLines[ nLine ]; + if ( ( bInclEnd && ( rLine.GetEnd() >= nChar ) ) || + ( rLine.GetEnd() > nChar ) ) { return nLine; } @@ -184,10 +184,10 @@ void TEParaPortion::CorrectValuesBehindLastFormattedLine( sal_uInt16 nLastFormat DBG_ASSERT( nLines, "CorrectPortionNumbersFromLine: Leere Portion?" ); if ( nLastFormattedLine < ( nLines - 1 ) ) { - const TextLine& pLastFormatted = maLines[ nLastFormattedLine ]; - const TextLine& pUnformatted = maLines[ nLastFormattedLine+1 ]; - short nPortionDiff = pUnformatted.GetStartPortion() - pLastFormatted.GetEndPortion(); - sal_Int32 nTextDiff = pUnformatted.GetStart() - pLastFormatted.GetEnd(); + const TextLine& rLastFormatted = maLines[ nLastFormattedLine ]; + const TextLine& rUnformatted = maLines[ nLastFormattedLine+1 ]; + short nPortionDiff = rUnformatted.GetStartPortion() - rLastFormatted.GetEndPortion(); + sal_Int32 nTextDiff = rUnformatted.GetStart() - rLastFormatted.GetEnd(); nTextDiff++; // LastFormatted.GetEnd() was inclusive => subtracted one too much! // The first unformatted one has to start exactly one portion past the last @@ -199,15 +199,15 @@ void TEParaPortion::CorrectValuesBehindLastFormattedLine( sal_uInt16 nLastFormat { for ( sal_uInt16 nL = nLastFormattedLine+1; nL < nLines; nL++ ) { - TextLine& pLine = maLines[ nL ]; + TextLine& rLine = maLines[ nL ]; - pLine.GetStartPortion() = pLine.GetStartPortion() + nPDiff; - pLine.GetEndPortion() = pLine.GetEndPortion() + nPDiff; + rLine.GetStartPortion() = rLine.GetStartPortion() + nPDiff; + rLine.GetEndPortion() = rLine.GetEndPortion() + nPDiff; - pLine.GetStart() = pLine.GetStart() + nTDiff; - pLine.GetEnd() = pLine.GetEnd() + nTDiff; + rLine.GetStart() = rLine.GetStart() + nTDiff; + rLine.GetEnd() = rLine.GetEnd() + nTDiff; - pLine.SetValid(); + rLine.SetValid(); } } } diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx index 40a47719a242..af3425b30d9d 100644 --- a/vcl/source/edit/texteng.cxx +++ b/vcl/source/edit/texteng.cxx @@ -270,8 +270,8 @@ OUString TextEngine::GetTextLines( LineEnd aSeparator ) const const size_t nLines = pTEParaPortion->GetLines().size(); for ( size_t nL = 0; nL < nLines; ++nL ) { - TextLine& pLine = pTEParaPortion->GetLines()[nL]; - aText += pTEParaPortion->GetNode()->GetText().copy( pLine.GetStart(), pLine.GetEnd() - pLine.GetStart() ); + TextLine& rLine = pTEParaPortion->GetLines()[nL]; + aText += pTEParaPortion->GetNode()->GetText().copy( rLine.GetStart(), rLine.GetEnd() - rLine.GetStart() ); if ( pSep && ( ( (nP+1) < nParas ) || ( (nL+1) < nLines ) ) ) aText += pSep; } @@ -895,14 +895,14 @@ Rectangle TextEngine::GetEditCursor( const TextPaM& rPaM, bool bSpecial, bool bP TextLine* pLine = nullptr; for ( size_t nLine = 0; nLine < pPortion->GetLines().size(); nLine++ ) { - TextLine& pTmpLine = pPortion->GetLines()[ nLine ]; - if ( ( pTmpLine.GetStart() == rPaM.GetIndex() ) || ( pTmpLine.IsIn( rPaM.GetIndex(), bSpecial ) ) ) + TextLine& rTmpLine = pPortion->GetLines()[ nLine ]; + if ( ( rTmpLine.GetStart() == rPaM.GetIndex() ) || ( rTmpLine.IsIn( rPaM.GetIndex(), bSpecial ) ) ) { - pLine = &pTmpLine; + pLine = &rTmpLine; break; } - nCurIndex = nCurIndex + pTmpLine.GetLen(); + nCurIndex = nCurIndex + rTmpLine.GetLen(); nY += mnCharHeight; } if ( !pLine ) @@ -1076,11 +1076,11 @@ sal_Int32 TextEngine::ImpFindIndex( sal_uInt32 nPortion, const Point& rPosInPara sal_uInt16 nLine; for ( nLine = 0; nLine < pPortion->GetLines().size(); nLine++ ) { - TextLine& pTmpLine = pPortion->GetLines()[ nLine ]; + TextLine& rmpLine = pPortion->GetLines()[ nLine ]; nY += mnCharHeight; if ( nY > rPosInPara.Y() ) // that's it { - pLine = &pTmpLine; + pLine = &rmpLine; break; // correct Y-Position not needed } } @@ -1103,15 +1103,15 @@ sal_Int32 TextEngine::GetCharPos( sal_uInt32 nPortion, sal_uInt16 nLine, long nX { TEParaPortion* pPortion = mpTEParaPortions->GetObject( nPortion ); - TextLine& pLine = pPortion->GetLines()[ nLine ]; + TextLine& rLine = pPortion->GetLines()[ nLine ]; - sal_Int32 nCurIndex = pLine.GetStart(); + sal_Int32 nCurIndex = rLine.GetStart(); - long nTmpX = pLine.GetStartX(); + long nTmpX = rLine.GetStartX(); if ( nXPos <= nTmpX ) return nCurIndex; - for ( sal_uInt16 i = pLine.GetStartPortion(); i <= pLine.GetEndPortion(); i++ ) + for ( sal_uInt16 i = rLine.GetStartPortion(); i <= rLine.GetEndPortion(); i++ ) { TETextPortion* pTextPortion = pPortion->GetTextPortions()[ i ]; nTmpX += pTextPortion->GetWidth(); @@ -1165,8 +1165,8 @@ long TextEngine::CalcTextWidth( sal_uInt32 nPara ) for ( auto nLine = pPortion->GetLines().size(); nLine; ) { long nLineWidth = 0; - TextLine& pLine = pPortion->GetLines()[ --nLine ]; - for ( sal_uInt16 nTP = pLine.GetStartPortion(); nTP <= pLine.GetEndPortion(); nTP++ ) + TextLine& rLine = pPortion->GetLines()[ --nLine ]; + for ( sal_uInt16 nTP = rLine.GetStartPortion(); nTP <= rLine.GetEndPortion(); nTP++ ) { TETextPortion* pTextPortion = pPortion->GetTextPortions()[ nTP ]; nLineWidth += pTextPortion->GetWidth(); @@ -1274,8 +1274,8 @@ Range TextEngine::GetInvalidYOffsets( sal_uInt32 nPortion ) sal_uInt16 nLine; for ( nLine = 0; nLine < nLines; nLine++ ) { - TextLine& pL = pTEParaPortion->GetLines()[ nLine ]; - if ( pL.IsInvalid() ) + TextLine& rL = pTEParaPortion->GetLines()[ nLine ]; + if ( rL.IsInvalid() ) { nFirstInvalid = nLine; break; @@ -1284,8 +1284,8 @@ Range TextEngine::GetInvalidYOffsets( sal_uInt32 nPortion ) for ( nLastInvalid = nFirstInvalid; nLastInvalid < nLines; nLastInvalid++ ) { - TextLine& pL = pTEParaPortion->GetLines()[ nLine ]; - if ( pL.IsValid() ) + TextLine& rL = pTEParaPortion->GetLines()[ nLine ]; + if ( rL.IsValid() ) break; } @@ -1942,18 +1942,18 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectan { // for all lines of the paragraph sal_Int32 nIndex = 0; - for ( auto &pLine : pPortion->GetLines() ) + for ( auto & rLine : pPortion->GetLines() ) { - Point aTmpPos( rStartPos.X() + pLine.GetStartX(), nY ); + Point aTmpPos( rStartPos.X() + rLine.GetStartX(), nY ); if ( ( !pPaintArea || ( ( nY + mnCharHeight ) > pPaintArea->Top() ) ) && ( !pPaintRange || ( - ( TextPaM( nPara, pLine.GetStart() ) < pPaintRange->GetEnd() ) && - ( TextPaM( nPara, pLine.GetEnd() ) > pPaintRange->GetStart() ) ) ) ) + ( TextPaM( nPara, rLine.GetStart() ) < pPaintRange->GetEnd() ) && + ( TextPaM( nPara, rLine.GetEnd() ) > pPaintRange->GetStart() ) ) ) ) { // for all Portions of the line - nIndex = pLine.GetStart(); - for ( sal_uInt16 y = pLine.GetStartPortion(); y <= pLine.GetEndPortion(); y++ ) + nIndex = rLine.GetStart(); + for ( sal_uInt16 y = rLine.GetStartPortion(); y <= rLine.GetEndPortion(); y++ ) { OSL_ENSURE(pPortion->GetTextPortions().size(), "ImpPaint: Line without Textportion!"); @@ -1963,7 +1963,7 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectan ImpInitLayoutMode( pOutDev /*, pTextPortion->IsRightToLeft() */); long nTxtWidth = pTextPortion->GetWidth(); - aTmpPos.X() = rStartPos.X() + ImpGetOutputOffset( nPara, &pLine, nIndex, nIndex ); + aTmpPos.X() = rStartPos.X() + ImpGetOutputOffset( nPara, &rLine, nIndex, nIndex ); // only print if starting in the visible region if ( ( ( aTmpPos.X() + nTxtWidth ) >= 0 ) @@ -2015,7 +2015,7 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectan { const sal_Int32 nL = pSelStart->GetIndex() - nTmpIndex; pOutDev->SetFont( aFont); - aPos.X() = rStartPos.X() + ImpGetOutputOffset( nPara, &pLine, nTmpIndex, nTmpIndex+nL ); + aPos.X() = rStartPos.X() + ImpGetOutputOffset( nPara, &rLine, nTmpIndex, nTmpIndex+nL ); pOutDev->DrawText( aPos, pPortion->GetNode()->GetText(), nTmpIndex, nL ); nTmpIndex = nTmpIndex + nL; @@ -2029,7 +2029,7 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectan Color aOldTextColor = pOutDev->GetTextColor(); pOutDev->SetTextColor( rStyleSettings.GetHighlightTextColor() ); pOutDev->SetTextFillColor( rStyleSettings.GetHighlightColor() ); - aPos.X() = rStartPos.X() + ImpGetOutputOffset( nPara, &pLine, nTmpIndex, nTmpIndex+nL ); + aPos.X() = rStartPos.X() + ImpGetOutputOffset( nPara, &rLine, nTmpIndex, nTmpIndex+nL ); pOutDev->DrawText( aPos, pPortion->GetNode()->GetText(), nTmpIndex, nL ); pOutDev->SetTextColor( aOldTextColor ); pOutDev->SetTextFillColor(); @@ -2040,7 +2040,7 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectan if ( nTmpIndex < nEnd ) { nL = nEnd-nTmpIndex; - aPos.X() = rStartPos.X() + ImpGetOutputOffset( nPara, &pLine, nTmpIndex, nTmpIndex+nL ); + aPos.X() = rStartPos.X() + ImpGetOutputOffset( nPara, &rLine, nTmpIndex, nTmpIndex+nL ); pOutDev->DrawText( aPos, pPortion->GetNode()->GetText(), nTmpIndex, nEnd-nTmpIndex ); } bDone = true; @@ -2048,7 +2048,7 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectan } if ( !bDone ) { - aPos.X() = rStartPos.X() + ImpGetOutputOffset( nPara, &pLine, nTmpIndex, nEnd ); + aPos.X() = rStartPos.X() + ImpGetOutputOffset( nPara, &rLine, nTmpIndex, nEnd ); pOutDev->DrawText( aPos, pPortion->GetNode()->GetText(), nTmpIndex, nEnd-nTmpIndex ); } } diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx index 038f122bd83d..daaf4f480b29 100644 --- a/vcl/source/edit/textview.cxx +++ b/vcl/source/edit/textview.cxx @@ -367,9 +367,9 @@ void TextView::ImpHighlight( const TextSelection& rSel ) // iterate over all lines for ( sal_uInt16 nLine = nStartLine; nLine <= nEndLine; nLine++ ) { - TextLine& pLine = pTEParaPortion->GetLines()[ nLine ]; - sal_Int32 nStartIndex = pLine.GetStart(); - sal_Int32 nEndIndex = pLine.GetEnd(); + TextLine& rLine = pTEParaPortion->GetLines()[ nLine ]; + sal_Int32 nStartIndex = rLine.GetStart(); + sal_Int32 nEndIndex = rLine.GetEnd(); if ( ( nPara == nStartPara ) && ( nLine == nStartLine ) ) nStartIndex = aSel.GetStart().GetIndex(); if ( ( nPara == nEndPara ) && ( nLine == nEndLine ) ) @@ -970,9 +970,9 @@ void TextView::Command( const CommandEvent& rCEvt ) TEParaPortion* pParaPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( aPaM.GetPara() ); sal_uInt16 nLine = pParaPortion->GetLineNumber( aPaM.GetIndex(), true ); - TextLine& pLine = pParaPortion->GetLines()[ nLine ]; - if ( nInputEnd > pLine.GetEnd() ) - nInputEnd = pLine.GetEnd(); + TextLine& rLine = pParaPortion->GetLines()[ nLine ]; + if ( nInputEnd > rLine.GetEnd() ) + nInputEnd = rLine.GetEnd(); Rectangle aR2 = mpImpl->mpTextEngine->PaMtoEditCursor( TextPaM( aPaM.GetPara(), nInputEnd ) ); long nWidth = aR2.Left()-aR1.Right(); @@ -1462,8 +1462,8 @@ TextPaM TextView::CursorUp( const TextPaM& rPaM ) // If we need to go to the end of a line that was wrapped automatically, // the cursor ends up at the beginning of the 2nd line // Problem: Last character of an automatically wrapped line = Cursor - TextLine& pLine = pPPortion->GetLines()[ nLine - 1 ]; - if ( aPaM.GetIndex() && ( aPaM.GetIndex() == pLine.GetEnd() ) ) + TextLine& rLine = pPPortion->GetLines()[ nLine - 1 ]; + if ( aPaM.GetIndex() && ( aPaM.GetIndex() == rLine.GetEnd() ) ) --aPaM.GetIndex(); } else if ( rPaM.GetPara() ) // previous paragraph @@ -1497,8 +1497,8 @@ TextPaM TextView::CursorDown( const TextPaM& rPaM ) aPaM.GetIndex() = mpImpl->mpTextEngine->GetCharPos( rPaM.GetPara(), nLine+1, nX ); // special case CursorUp - TextLine& pLine = pPPortion->GetLines()[ nLine + 1 ]; - if ( ( aPaM.GetIndex() == pLine.GetEnd() ) && ( aPaM.GetIndex() > pLine.GetStart() ) && aPaM.GetIndex() < pPPortion->GetNode()->GetText().getLength() ) + TextLine& rLine = pPPortion->GetLines()[ nLine + 1 ]; + if ( ( aPaM.GetIndex() == rLine.GetEnd() ) && ( aPaM.GetIndex() > rLine.GetStart() ) && aPaM.GetIndex() < pPPortion->GetNode()->GetText().getLength() ) --aPaM.GetIndex(); } else if ( rPaM.GetPara() < ( mpImpl->mpTextEngine->mpDoc->GetNodes().size() - 1 ) ) // next paragraph @@ -1506,8 +1506,8 @@ TextPaM TextView::CursorDown( const TextPaM& rPaM ) aPaM.GetPara()++; pPPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( aPaM.GetPara() ); aPaM.GetIndex() = mpImpl->mpTextEngine->GetCharPos( aPaM.GetPara(), 0, nX+1 ); - TextLine& pLine = pPPortion->GetLines().front(); - if ( ( aPaM.GetIndex() == pLine.GetEnd() ) && ( aPaM.GetIndex() > pLine.GetStart() ) && ( pPPortion->GetLines().size() > 1 ) ) + TextLine& rLine = pPPortion->GetLines().front(); + if ( ( aPaM.GetIndex() == rLine.GetEnd() ) && ( aPaM.GetIndex() > rLine.GetStart() ) && ( pPPortion->GetLines().size() > 1 ) ) --aPaM.GetIndex(); } @@ -1520,8 +1520,8 @@ TextPaM TextView::CursorStartOfLine( const TextPaM& rPaM ) TEParaPortion* pPPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( rPaM.GetPara() ); sal_uInt16 nLine = pPPortion->GetLineNumber( aPaM.GetIndex(), false ); - TextLine& pLine = pPPortion->GetLines()[ nLine ]; - aPaM.GetIndex() = pLine.GetStart(); + TextLine& rLine = pPPortion->GetLines()[ nLine ]; + aPaM.GetIndex() = rLine.GetStart(); return aPaM; } @@ -1532,10 +1532,10 @@ TextPaM TextView::CursorEndOfLine( const TextPaM& rPaM ) TEParaPortion* pPPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( rPaM.GetPara() ); sal_uInt16 nLine = pPPortion->GetLineNumber( aPaM.GetIndex(), false ); - TextLine& pLine = pPPortion->GetLines()[ nLine ]; - aPaM.GetIndex() = pLine.GetEnd(); + TextLine& rLine = pPPortion->GetLines()[ nLine ]; + aPaM.GetIndex() = rLine.GetEnd(); - if ( pLine.GetEnd() > pLine.GetStart() ) // empty line + if ( rLine.GetEnd() > rLine.GetStart() ) // empty line { sal_Unicode cLastChar = pPPortion->GetNode()->GetText()[ aPaM.GetIndex()-1 ]; if ( ( cLastChar == ' ' ) && ( aPaM.GetIndex() != pPPortion->GetNode()->GetText().getLength() ) ) diff --git a/vcl/source/filter/ixpm/xpmread.cxx b/vcl/source/filter/ixpm/xpmread.cxx index d4853b496b41..b757709be118 100644 --- a/vcl/source/filter/ixpm/xpmread.cxx +++ b/vcl/source/filter/ixpm/xpmread.cxx @@ -575,7 +575,7 @@ bool XPMReader::ImplCompare( sal_uInt8 const * pSource, sal_uInt8 const * pDest, bool XPMReader::ImplGetPara ( sal_uLong nNumb ) { sal_uInt8 nByte; - sal_uLong pSize = 0; + sal_uLong nSize = 0; sal_uInt8* pPtr = mpStringBuf; sal_uLong nCount = 0; @@ -591,7 +591,7 @@ bool XPMReader::ImplGetPara ( sal_uLong nNumb ) nCount = 0xffffffff; } - while ( pSize < mnStringSize ) + while ( nSize < mnStringSize ) { nByte = *pPtr; @@ -616,7 +616,7 @@ bool XPMReader::ImplGetPara ( sal_uLong nNumb ) nCount++; } } - pSize++; + nSize++; pPtr++; } return ( ( nCount == nNumb ) && ( mpPara ) ); diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx index 5b6902c30244..46826ad50362 100644 --- a/vcl/source/gdi/bitmap3.cxx +++ b/vcl/source/gdi/bitmap3.cxx @@ -709,9 +709,9 @@ bool Bitmap::ImplConvertDown(sal_uInt16 nBitCount, Color* pExtColor) InverseColorMap aColorMap(aPalette); BitmapColor aColor; ImpErrorQuad aErrQuad; - std::vector<ImpErrorQuad> pErrQuad1(nWidth); - std::vector<ImpErrorQuad> pErrQuad2(nWidth); - ImpErrorQuad* pQLine1 = pErrQuad1.data(); + std::vector<ImpErrorQuad> aErrQuad1(nWidth); + std::vector<ImpErrorQuad> aErrQuad2(nWidth); + ImpErrorQuad* pQLine1 = aErrQuad1.data(); ImpErrorQuad* pQLine2 = nullptr; long nYTmp = 0L; sal_uInt8 cIndex; @@ -735,7 +735,7 @@ bool Bitmap::ImplConvertDown(sal_uInt16 nBitCount, Color* pExtColor) for (long nY = 0L; nY < std::min(nHeight, 2L); nY++, nYTmp++) { - pQLine2 = !nY ? pErrQuad1.data() : pErrQuad2.data(); + pQLine2 = !nY ? aErrQuad1.data() : aErrQuad2.data(); for (long nX = 0L; nX < nWidth; nX++) { if (pReadAcc->HasPalette()) @@ -773,7 +773,7 @@ bool Bitmap::ImplConvertDown(sal_uInt16 nBitCount, Color* pExtColor) // Refill/copy row buffer pQLine1 = pQLine2; - pQLine2 = (bQ1 = !bQ1) ? pErrQuad2.data() : pErrQuad1.data(); + pQLine2 = (bQ1 = !bQ1) ? aErrQuad2.data() : aErrQuad1.data(); if (nYTmp < nHeight) { diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 4ee03669a4fd..7595aeae07bb 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -2101,11 +2101,11 @@ bool PDFWriterImpl::compressStream( SvMemoryStream* pStream ) pStream->Seek( STREAM_SEEK_TO_END ); sal_uLong nEndPos = pStream->Tell(); pStream->Seek( STREAM_SEEK_TO_BEGIN ); - ZCodec pCodec( 0x4000, 0x4000 ); + ZCodec aCodec( 0x4000, 0x4000 ); SvMemoryStream aStream; - pCodec.BeginCompression(); - pCodec.Write( aStream, static_cast<const sal_uInt8*>(pStream->GetData()), nEndPos ); - pCodec.EndCompression(); + aCodec.BeginCompression(); + aCodec.Write( aStream, static_cast<const sal_uInt8*>(pStream->GetData()), nEndPos ); + aCodec.EndCompression(); nEndPos = aStream.Tell(); pStream->Seek( STREAM_SEEK_TO_BEGIN ); aStream.Seek( STREAM_SEEK_TO_BEGIN ); @@ -3748,11 +3748,11 @@ sal_Int32 PDFWriterImpl::createToUnicodeCMap( sal_uInt8* pEncoding, "end\n" "end\n" ); #ifndef DEBUG_DISABLE_PDFCOMPRESSION - ZCodec pCodec( 0x4000, 0x4000 ); + ZCodec aCodec( 0x4000, 0x4000 ); SvMemoryStream aStream; - pCodec.BeginCompression(); - pCodec.Write( aStream, reinterpret_cast<const sal_uInt8*>(aContents.getStr()), aContents.getLength() ); - pCodec.EndCompression(); + aCodec.BeginCompression(); + aCodec.Write( aStream, reinterpret_cast<const sal_uInt8*>(aContents.getStr()), aContents.getLength() ); + aCodec.EndCompression(); #endif #if OSL_DEBUG_LEVEL > 1 diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx index be145fab7cf6..b19c625de95f 100644 --- a/vcl/source/window/splitwin.cxx +++ b/vcl/source/window/splitwin.cxx @@ -341,19 +341,19 @@ static ImplSplitSet* ImplFindSet( ImplSplitSet* pSet, sal_uInt16 nId ) sal_uInt16 i; size_t nItems = pSet->mpItems.size(); - ImplSplitItems& pItems = pSet->mpItems; + ImplSplitItems& rItems = pSet->mpItems; for ( i = 0; i < nItems; i++ ) { - if ( pItems[i]->mnId == nId ) - return pItems[i]->mpSet; + if ( rItems[i]->mnId == nId ) + return rItems[i]->mpSet; } for ( i = 0; i < nItems; i++ ) { - if ( pItems[i]->mpSet ) + if ( rItems[i]->mpSet ) { - ImplSplitSet* pFindSet = ImplFindSet( pItems[i]->mpSet, nId ); + ImplSplitSet* pFindSet = ImplFindSet( rItems[i]->mpSet, nId ); if ( pFindSet ) return pFindSet; } @@ -366,11 +366,11 @@ static ImplSplitSet* ImplFindItem( ImplSplitSet* pSet, sal_uInt16 nId, sal_uInt1 { sal_uInt16 i; size_t nItems = pSet->mpItems.size(); - ImplSplitItems& pItems = pSet->mpItems; + ImplSplitItems& rItems = pSet->mpItems; for ( i = 0; i < nItems; i++ ) { - if ( pItems[i]->mnId == nId ) + if ( rItems[i]->mnId == nId ) { rPos = i; return pSet; @@ -379,9 +379,9 @@ static ImplSplitSet* ImplFindItem( ImplSplitSet* pSet, sal_uInt16 nId, sal_uInt1 for ( i = 0; i < nItems; i++ ) { - if ( pItems[i]->mpSet ) + if ( rItems[i]->mpSet ) { - ImplSplitSet* pFindSet = ImplFindItem( pItems[i]->mpSet, nId, rPos ); + ImplSplitSet* pFindSet = ImplFindItem( rItems[i]->mpSet, nId, rPos ); if ( pFindSet ) return pFindSet; } @@ -394,17 +394,17 @@ static sal_uInt16 ImplFindItem( ImplSplitSet* pSet, vcl::Window* pWindow ) { sal_uInt16 i; size_t nItems = pSet->mpItems.size(); - ImplSplitItems& pItems = pSet->mpItems; + ImplSplitItems& rItems = pSet->mpItems; for ( i = 0; i < nItems; i++ ) { - if ( pItems[i]->mpWindow == pWindow ) - return pItems[i]->mnId; + if ( rItems[i]->mpWindow == pWindow ) + return rItems[i]->mnId; else { - if ( pItems[i]->mpSet ) + if ( rItems[i]->mpSet ) { - sal_uInt16 nId = ImplFindItem( pItems[i]->mpSet, pWindow ); + sal_uInt16 nId = ImplFindItem( rItems[i]->mpSet, pWindow ); if ( nId ) return nId; } @@ -419,14 +419,14 @@ static sal_uInt16 ImplFindItem( ImplSplitSet* pSet, const Point& rPos, { sal_uInt16 i; size_t nItems = pSet->mpItems.size(); - ImplSplitItems& pItems = pSet->mpItems; + ImplSplitItems& rItems = pSet->mpItems; for ( i = 0; i < nItems; i++ ) { - if ( pItems[i]->mnWidth && pItems[i]->mnHeight ) + if ( rItems[i]->mnWidth && rItems[i]->mnHeight ) { - Point aPoint( pItems[i]->mnLeft, pItems[i]->mnTop ); - Size aSize( pItems[i]->mnWidth, pItems[i]->mnHeight ); + Point aPoint( rItems[i]->mnLeft, rItems[i]->mnTop ); + Size aSize( rItems[i]->mnWidth, rItems[i]->mnHeight ); Rectangle aRect( aPoint, aSize ); if ( bRows ) { @@ -445,13 +445,13 @@ static sal_uInt16 ImplFindItem( ImplSplitSet* pSet, const Point& rPos, if ( aRect.IsInside( rPos ) ) { - if ( pItems[i]->mpSet && !pItems[i]->mpSet->mpItems.empty() ) + if ( rItems[i]->mpSet && !rItems[i]->mpSet->mpItems.empty() ) { - return ImplFindItem( pItems[i]->mpSet, rPos, - !(pItems[i]->mnBits & SplitWindowItemFlags::ColSet) ); + return ImplFindItem( rItems[i]->mpSet, rPos, + !(rItems[i]->mnBits & SplitWindowItemFlags::ColSet) ); } else - return pItems[i]->mnId; + return rItems[i]->mnId; } } } @@ -477,14 +477,14 @@ static void ImplCalcSet( ImplSplitSet* pSet, long nCalcSize; long nPos; long nMaxPos; - ImplSplitItems& pItems = pSet->mpItems; + ImplSplitItems& rItems = pSet->mpItems; bool bEmpty; // get number of visible items nVisItems = 0; for ( i = 0; i < nItems; i++ ) { - if ( !(pItems[i]->mnBits & SplitWindowItemFlags::Invisible) ) + if ( !(rItems[i]->mnBits & SplitWindowItemFlags::Invisible) ) nVisItems++; } @@ -504,14 +504,14 @@ static void ImplCalcSet( ImplSplitSet* pSet, long nCurSize = 0; for ( i = 0; i < nItems; i++ ) { - if ( !(pItems[i]->mnBits & SplitWindowItemFlags::Invisible) ) + if ( !(rItems[i]->mnBits & SplitWindowItemFlags::Invisible) ) { - if ( pItems[i]->mnBits & SplitWindowItemFlags::RelativeSize ) - nRelCount += pItems[i]->mnSize; - else if ( pItems[i]->mnBits & SplitWindowItemFlags::PercentSize ) - nPercent += pItems[i]->mnSize; + if ( rItems[i]->mnBits & SplitWindowItemFlags::RelativeSize ) + nRelCount += rItems[i]->mnSize; + else if ( rItems[i]->mnBits & SplitWindowItemFlags::PercentSize ) + nPercent += rItems[i]->mnSize; else - nAbsSize += pItems[i]->mnSize; + nAbsSize += rItems[i]->mnSize; } } // map relative values to percentages (percentage here one tenth of a procent) @@ -537,25 +537,25 @@ static void ImplCalcSet( ImplSplitSet* pSet, long nSizeDelta = nCalcSize-nAbsSize; for ( i = 0; i < nItems; i++ ) { - if ( pItems[i]->mnBits & SplitWindowItemFlags::Invisible ) - pItems[i]->mnPixSize = 0; - else if ( pItems[i]->mnBits & SplitWindowItemFlags::RelativeSize ) + if ( rItems[i]->mnBits & SplitWindowItemFlags::Invisible ) + rItems[i]->mnPixSize = 0; + else if ( rItems[i]->mnBits & SplitWindowItemFlags::RelativeSize ) { if ( nSizeDelta <= 0 ) - pItems[i]->mnPixSize = 0; + rItems[i]->mnPixSize = 0; else - pItems[i]->mnPixSize = (nSizeDelta*pItems[i]->mnSize*nRelPercent)/nPercent; + rItems[i]->mnPixSize = (nSizeDelta*rItems[i]->mnSize*nRelPercent)/nPercent; } - else if ( pItems[i]->mnBits & SplitWindowItemFlags::PercentSize ) + else if ( rItems[i]->mnBits & SplitWindowItemFlags::PercentSize ) { if ( nSizeDelta <= 0 ) - pItems[i]->mnPixSize = 0; + rItems[i]->mnPixSize = 0; else - pItems[i]->mnPixSize = (nSizeDelta*pItems[i]->mnSize*nPercentFactor)/nPercent; + rItems[i]->mnPixSize = (nSizeDelta*rItems[i]->mnSize*nPercentFactor)/nPercent; } else - pItems[i]->mnPixSize = pItems[i]->mnSize; - nCurSize += pItems[i]->mnPixSize; + rItems[i]->mnPixSize = rItems[i]->mnSize; + nCurSize += rItems[i]->mnPixSize; } pSet->mbCalcPix = false; @@ -572,12 +572,12 @@ static void ImplCalcSet( ImplSplitSet* pSet, // first resize absolute items relative for ( i = 0; i < nItems; i++ ) { - if ( !(pItems[i]->mnBits & SplitWindowItemFlags::Invisible) ) + if ( !(rItems[i]->mnBits & SplitWindowItemFlags::Invisible) ) { - if ( !(pItems[i]->mnBits & (SplitWindowItemFlags::RelativeSize | SplitWindowItemFlags::PercentSize)) ) + if ( !(rItems[i]->mnBits & (SplitWindowItemFlags::RelativeSize | SplitWindowItemFlags::PercentSize)) ) { nAbsItems++; - nSizeWinSize += pItems[i]->mnPixSize; + nSizeWinSize += rItems[i]->mnPixSize; } } } @@ -586,12 +586,12 @@ static void ImplCalcSet( ImplSplitSet* pSet, { for ( i = 0; i < nItems; i++ ) { - if ( !(pItems[i]->mnBits & SplitWindowItemFlags::Invisible) ) + if ( !(rItems[i]->mnBits & SplitWindowItemFlags::Invisible) ) { - if ( !(pItems[i]->mnBits & (SplitWindowItemFlags::RelativeSize | SplitWindowItemFlags::PercentSize)) ) + if ( !(rItems[i]->mnBits & (SplitWindowItemFlags::RelativeSize | SplitWindowItemFlags::PercentSize)) ) { - pItems[i]->mnPixSize += (nSizeDelta*pItems[i]->mnPixSize)/nSizeWinSize; - nNewSizeWinSize += pItems[i]->mnPixSize; + rItems[i]->mnPixSize += (nSizeDelta*rItems[i]->mnPixSize)/nSizeWinSize; + nNewSizeWinSize += rItems[i]->mnPixSize; } } } @@ -609,28 +609,28 @@ static void ImplCalcSet( ImplSplitSet* pSet, { for ( i = 0; i < nItems; i++ ) { - pItems[i]->mbSubSize = false; + rItems[i]->mbSubSize = false; if ( j >= 2 ) - pItems[i]->mbSubSize = true; + rItems[i]->mbSubSize = true; else { - if ( !(pItems[i]->mnBits & SplitWindowItemFlags::Invisible) ) + if ( !(rItems[i]->mnBits & SplitWindowItemFlags::Invisible) ) { - if ( (nSizeDelta > 0) || pItems[i]->mnPixSize ) + if ( (nSizeDelta > 0) || rItems[i]->mnPixSize ) { if ( j >= 1 ) - pItems[i]->mbSubSize = true; + rItems[i]->mbSubSize = true; else { - if ( (j == 0) && (pItems[i]->mnBits & (SplitWindowItemFlags::RelativeSize | SplitWindowItemFlags::PercentSize)) ) - pItems[i]->mbSubSize = true; + if ( (j == 0) && (rItems[i]->mnBits & (SplitWindowItemFlags::RelativeSize | SplitWindowItemFlags::PercentSize)) ) + rItems[i]->mbSubSize = true; } } } } - if ( pItems[i]->mbSubSize ) + if ( rItems[i]->mbSubSize ) nCalcItems++; } @@ -643,11 +643,11 @@ static void ImplCalcSet( ImplSplitSet* pSet, nMins = 0; for ( i = 0; i < nItems; i++ ) { - if ( pItems[i]->mnBits & SplitWindowItemFlags::Invisible ) + if ( rItems[i]->mnBits & SplitWindowItemFlags::Invisible ) nMins++; - else if ( pItems[i]->mbSubSize ) + else if ( rItems[i]->mbSubSize ) { - long* pSize = &(pItems[i]->mnPixSize); + long* pSize = &(rItems[i]->mnPixSize); long nTempErr; if ( nErrorSum ) @@ -708,24 +708,24 @@ static void ImplCalcSet( ImplSplitSet* pSet, // order windows and adept values for ( i = 0; i < nItems; i++ ) { - pItems[i]->mnOldSplitPos = pItems[i]->mnSplitPos; - pItems[i]->mnOldSplitSize = pItems[i]->mnSplitSize; - pItems[i]->mnOldWidth = pItems[i]->mnWidth; - pItems[i]->mnOldHeight = pItems[i]->mnHeight; + rItems[i]->mnOldSplitPos = rItems[i]->mnSplitPos; + rItems[i]->mnOldSplitSize = rItems[i]->mnSplitSize; + rItems[i]->mnOldWidth = rItems[i]->mnWidth; + rItems[i]->mnOldHeight = rItems[i]->mnHeight; - if ( pItems[i]->mnBits & SplitWindowItemFlags::Invisible ) + if ( rItems[i]->mnBits & SplitWindowItemFlags::Invisible ) bEmpty = true; else { bEmpty = false; if ( bDown ) { - if ( nPos+pItems[i]->mnPixSize > nMaxPos ) + if ( nPos+rItems[i]->mnPixSize > nMaxPos ) bEmpty = true; } else { - nPos -= pItems[i]->mnPixSize; + nPos -= rItems[i]->mnPixSize; if ( nPos < nMaxPos ) bEmpty = true; } @@ -733,85 +733,85 @@ static void ImplCalcSet( ImplSplitSet* pSet, if ( bEmpty ) { - pItems[i]->mnWidth = 0; - pItems[i]->mnHeight = 0; - pItems[i]->mnSplitSize = 0; + rItems[i]->mnWidth = 0; + rItems[i]->mnHeight = 0; + rItems[i]->mnSplitSize = 0; } else { if ( bRows ) { - pItems[i]->mnLeft = nSetLeft; - pItems[i]->mnTop = nPos; - pItems[i]->mnWidth = nSetWidth; - pItems[i]->mnHeight = pItems[i]->mnPixSize; + rItems[i]->mnLeft = nSetLeft; + rItems[i]->mnTop = nPos; + rItems[i]->mnWidth = nSetWidth; + rItems[i]->mnHeight = rItems[i]->mnPixSize; } else { - pItems[i]->mnLeft = nPos; - pItems[i]->mnTop = nSetTop; - pItems[i]->mnWidth = pItems[i]->mnPixSize; - pItems[i]->mnHeight = nSetHeight; + rItems[i]->mnLeft = nPos; + rItems[i]->mnTop = nSetTop; + rItems[i]->mnWidth = rItems[i]->mnPixSize; + rItems[i]->mnHeight = nSetHeight; } if ( i > nItems-1 ) - pItems[i]->mnSplitSize = 0; + rItems[i]->mnSplitSize = 0; else { - pItems[i]->mnSplitSize = pSet->mnSplitSize; + rItems[i]->mnSplitSize = pSet->mnSplitSize; if ( bDown ) { - pItems[i]->mnSplitPos = nPos+pItems[i]->mnPixSize; - if ( pItems[i]->mnSplitPos+pItems[i]->mnSplitSize > nMaxPos ) - pItems[i]->mnSplitSize = nMaxPos-pItems[i]->mnSplitPos; + rItems[i]->mnSplitPos = nPos+rItems[i]->mnPixSize; + if ( rItems[i]->mnSplitPos+rItems[i]->mnSplitSize > nMaxPos ) + rItems[i]->mnSplitSize = nMaxPos-rItems[i]->mnSplitPos; } else { - pItems[i]->mnSplitPos = nPos-pSet->mnSplitSize; - if ( pItems[i]->mnSplitPos < nMaxPos ) - pItems[i]->mnSplitSize = pItems[i]->mnSplitPos+pSet->mnSplitSize-nMaxPos; + rItems[i]->mnSplitPos = nPos-pSet->mnSplitSize; + if ( rItems[i]->mnSplitPos < nMaxPos ) + rItems[i]->mnSplitSize = rItems[i]->mnSplitPos+pSet->mnSplitSize-nMaxPos; } } } - if ( !(pItems[i]->mnBits & SplitWindowItemFlags::Invisible) ) + if ( !(rItems[i]->mnBits & SplitWindowItemFlags::Invisible) ) { if ( !bDown ) nPos -= pSet->mnSplitSize; else - nPos += pItems[i]->mnPixSize+pSet->mnSplitSize; + nPos += rItems[i]->mnPixSize+pSet->mnSplitSize; } } // calculate Sub-Set's for ( i = 0; i < nItems; i++ ) { - if ( pItems[i]->mpSet && pItems[i]->mnWidth && pItems[i]->mnHeight ) + if ( rItems[i]->mpSet && rItems[i]->mnWidth && rItems[i]->mnHeight ) { - ImplCalcSet( pItems[i]->mpSet, - pItems[i]->mnLeft, pItems[i]->mnTop, - pItems[i]->mnWidth, pItems[i]->mnHeight, - !(pItems[i]->mnBits & SplitWindowItemFlags::ColSet) ); + ImplCalcSet( rItems[i]->mpSet, + rItems[i]->mnLeft, rItems[i]->mnTop, + rItems[i]->mnWidth, rItems[i]->mnHeight, + !(rItems[i]->mnBits & SplitWindowItemFlags::ColSet) ); } } // set fixed for ( i = 0; i < nItems; i++ ) { - pItems[i]->mbFixed = false; - if ( pItems[i]->mnBits & SplitWindowItemFlags::Fixed ) - pItems[i]->mbFixed = true; + rItems[i]->mbFixed = false; + if ( rItems[i]->mnBits & SplitWindowItemFlags::Fixed ) + rItems[i]->mbFixed = true; else { // this item is also fixed if Child-Set is available, // if a child is fixed - if ( pItems[i]->mpSet ) + if ( rItems[i]->mpSet ) { - for ( j = 0; j < pItems[i]->mpSet->mpItems.size(); j++ ) + for ( j = 0; j < rItems[i]->mpSet->mpItems.size(); j++ ) { - if ( pItems[i]->mpSet->mpItems[j]->mbFixed ) + if ( rItems[i]->mpSet->mpItems[j]->mbFixed ) { - pItems[i]->mbFixed = true; + rItems[i]->mbFixed = true; break; } } @@ -825,63 +825,63 @@ void SplitWindow::ImplCalcSet2( SplitWindow* pWindow, ImplSplitSet* pSet, bool b { sal_uInt16 i; size_t nItems = pSet->mpItems.size(); - ImplSplitItems& pItems = pSet->mpItems; + ImplSplitItems& rItems = pSet->mpItems; if ( pWindow->IsReallyVisible() && pWindow->IsUpdateMode() && pWindow->mbInvalidate ) { for ( i = 0; i < nItems; i++ ) { - if ( pItems[i]->mnSplitSize ) + if ( rItems[i]->mnSplitSize ) { // invalidate all, if applicable or only a small part - if ( (pItems[i]->mnOldSplitPos != pItems[i]->mnSplitPos) || - (pItems[i]->mnOldSplitSize != pItems[i]->mnSplitSize) || - (pItems[i]->mnOldWidth != pItems[i]->mnWidth) || - (pItems[i]->mnOldHeight != pItems[i]->mnHeight) ) + if ( (rItems[i]->mnOldSplitPos != rItems[i]->mnSplitPos) || + (rItems[i]->mnOldSplitSize != rItems[i]->mnSplitSize) || + (rItems[i]->mnOldWidth != rItems[i]->mnWidth) || + (rItems[i]->mnOldHeight != rItems[i]->mnHeight) ) { Rectangle aRect; // invalidate old rectangle if ( bRows ) { - aRect.Left() = pItems[i]->mnLeft; - aRect.Right() = pItems[i]->mnLeft+pItems[i]->mnOldWidth-1; - aRect.Top() = pItems[i]->mnOldSplitPos; - aRect.Bottom() = aRect.Top() + pItems[i]->mnOldSplitSize; + aRect.Left() = rItems[i]->mnLeft; + aRect.Right() = rItems[i]->mnLeft+rItems[i]->mnOldWidth-1; + aRect.Top() = rItems[i]->mnOldSplitPos; + aRect.Bottom() = aRect.Top() + rItems[i]->mnOldSplitSize; } else { - aRect.Top() = pItems[i]->mnTop; - aRect.Bottom() = pItems[i]->mnTop+pItems[i]->mnOldHeight-1; - aRect.Left() = pItems[i]->mnOldSplitPos; - aRect.Right() = aRect.Left() + pItems[i]->mnOldSplitSize; + aRect.Top() = rItems[i]->mnTop; + aRect.Bottom() = rItems[i]->mnTop+rItems[i]->mnOldHeight-1; + aRect.Left() = rItems[i]->mnOldSplitPos; + aRect.Right() = aRect.Left() + rItems[i]->mnOldSplitSize; } pWindow->Invalidate( aRect ); // invalidate new rectangle if ( bRows ) { - aRect.Left() = pItems[i]->mnLeft; - aRect.Right() = pItems[i]->mnLeft+pItems[i]->mnWidth-1; - aRect.Top() = pItems[i]->mnSplitPos; - aRect.Bottom() = aRect.Top() + pItems[i]->mnSplitSize; + aRect.Left() = rItems[i]->mnLeft; + aRect.Right() = rItems[i]->mnLeft+rItems[i]->mnWidth-1; + aRect.Top() = rItems[i]->mnSplitPos; + aRect.Bottom() = aRect.Top() + rItems[i]->mnSplitSize; } else { - aRect.Top() = pItems[i]->mnTop; - aRect.Bottom() = pItems[i]->mnTop+pItems[i]->mnHeight-1; - aRect.Left() = pItems[i]->mnSplitPos; - aRect.Right() = aRect.Left() + pItems[i]->mnSplitSize; + aRect.Top() = rItems[i]->mnTop; + aRect.Bottom() = rItems[i]->mnTop+rItems[i]->mnHeight-1; + aRect.Left() = rItems[i]->mnSplitPos; + aRect.Right() = aRect.Left() + rItems[i]->mnSplitSize; } pWindow->Invalidate( aRect ); // invalidate complete set, as these areas // are not cluttered by windows - if ( pItems[i]->mpSet && pItems[i]->mpSet->mpItems.empty() ) + if ( rItems[i]->mpSet && rItems[i]->mpSet->mpItems.empty() ) { - aRect.Left() = pItems[i]->mnLeft; - aRect.Top() = pItems[i]->mnTop; - aRect.Right() = pItems[i]->mnLeft+pItems[i]->mnWidth-1; - aRect.Bottom() = pItems[i]->mnTop+pItems[i]->mnHeight-1; + aRect.Left() = rItems[i]->mnLeft; + aRect.Top() = rItems[i]->mnTop; + aRect.Right() = rItems[i]->mnLeft+rItems[i]->mnWidth-1; + aRect.Bottom() = rItems[i]->mnTop+rItems[i]->mnHeight-1; pWindow->Invalidate( aRect ); } } @@ -892,36 +892,36 @@ void SplitWindow::ImplCalcSet2( SplitWindow* pWindow, ImplSplitSet* pSet, bool b // position windows for ( i = 0; i < nItems; i++ ) { - if ( pItems[i]->mpSet ) + if ( rItems[i]->mpSet ) { bool bTempHide = bHide; - if ( !pItems[i]->mnWidth || !pItems[i]->mnHeight ) + if ( !rItems[i]->mnWidth || !rItems[i]->mnHeight ) bTempHide = true; - ImplCalcSet2( pWindow, pItems[i]->mpSet, bTempHide, - !(pItems[i]->mnBits & SplitWindowItemFlags::ColSet) ); + ImplCalcSet2( pWindow, rItems[i]->mpSet, bTempHide, + !(rItems[i]->mnBits & SplitWindowItemFlags::ColSet) ); } else { - if ( pItems[i]->mnWidth && pItems[i]->mnHeight && !bHide ) + if ( rItems[i]->mnWidth && rItems[i]->mnHeight && !bHide ) { - Point aPos( pItems[i]->mnLeft, pItems[i]->mnTop ); - Size aSize( pItems[i]->mnWidth, pItems[i]->mnHeight ); - pItems[i]->mpWindow->SetPosSizePixel( aPos, aSize ); + Point aPos( rItems[i]->mnLeft, rItems[i]->mnTop ); + Size aSize( rItems[i]->mnWidth, rItems[i]->mnHeight ); + rItems[i]->mpWindow->SetPosSizePixel( aPos, aSize ); } else - pItems[i]->mpWindow->Hide(); + rItems[i]->mpWindow->Hide(); } } // show windows and reset flag for ( i = 0; i < nItems; i++ ) { - if ( pItems[i]->mpWindow && pItems[i]->mnWidth && pItems[i]->mnHeight && !bHide ) - pItems[i]->mpWindow->Show(); + if ( rItems[i]->mpWindow && rItems[i]->mnWidth && rItems[i]->mnHeight && !bHide ) + rItems[i]->mpWindow->Show(); } } -static void ImplCalcLogSize( ImplSplitItems pItems, size_t nItems ) +static void ImplCalcLogSize( ImplSplitItems rItems, size_t nItems ) { // update original sizes size_t i; @@ -930,30 +930,30 @@ static void ImplCalcLogSize( ImplSplitItems pItems, size_t nItems ) for ( i = 0; i < nItems; i++ ) { - if ( pItems[i]->mnBits & SplitWindowItemFlags::RelativeSize ) - nRelSize += pItems[i]->mnPixSize; - else if ( pItems[i]->mnBits & SplitWindowItemFlags::PercentSize ) - nPerSize += pItems[i]->mnPixSize; + if ( rItems[i]->mnBits & SplitWindowItemFlags::RelativeSize ) + nRelSize += rItems[i]->mnPixSize; + else if ( rItems[i]->mnBits & SplitWindowItemFlags::PercentSize ) + nPerSize += rItems[i]->mnPixSize; } nPerSize += nRelSize; for ( i = 0; i < nItems; i++ ) { - if ( pItems[i]->mnBits & SplitWindowItemFlags::RelativeSize ) + if ( rItems[i]->mnBits & SplitWindowItemFlags::RelativeSize ) { if ( nRelSize ) - pItems[i]->mnSize = (pItems[i]->mnPixSize+(nRelSize/2))/nRelSize; + rItems[i]->mnSize = (rItems[i]->mnPixSize+(nRelSize/2))/nRelSize; else - pItems[i]->mnSize = 1; + rItems[i]->mnSize = 1; } - else if ( pItems[i]->mnBits & SplitWindowItemFlags::PercentSize ) + else if ( rItems[i]->mnBits & SplitWindowItemFlags::PercentSize ) { if ( nPerSize ) - pItems[i]->mnSize = (pItems[i]->mnPixSize*100)/nPerSize; + rItems[i]->mnSize = (rItems[i]->mnPixSize*100)/nPerSize; else - pItems[i]->mnSize = 1; + rItems[i]->mnSize = 1; } else - pItems[i]->mnSize = pItems[i]->mnPixSize; + rItems[i]->mnSize = rItems[i]->mnPixSize; } } @@ -990,7 +990,7 @@ void SplitWindow::ImplDrawBack(vcl::RenderContext& rRenderContext, ImplSplitSet* { sal_uInt16 i; size_t nItems = pSet->mpItems.size(); - ImplSplitItems& pItems = pSet->mpItems; + ImplSplitItems& rItems = pSet->mpItems; // also draw background for mainset if (pSet->mnId == 0) @@ -1007,13 +1007,13 @@ void SplitWindow::ImplDrawBack(vcl::RenderContext& rRenderContext, ImplSplitSet* for (i = 0; i < nItems; i++) { - pSet = pItems[i]->mpSet; + pSet = rItems[i]->mpSet; if (pSet) { if (pSet->mpBitmap || pSet->mpWallpaper) { - Point aPoint(pItems[i]->mnLeft, pItems[i]->mnTop); - Size aSize(pItems[i]->mnWidth, pItems[i]->mnHeight); + Point aPoint(rItems[i]->mnLeft, rItems[i]->mnTop); + Size aSize(rItems[i]->mnWidth, rItems[i]->mnHeight); Rectangle aRect(aPoint, aSize); ImplDrawBack(rRenderContext, aRect, pSet->mpWallpaper, pSet->mpBitmap); } @@ -1022,8 +1022,8 @@ void SplitWindow::ImplDrawBack(vcl::RenderContext& rRenderContext, ImplSplitSet* for (i = 0; i < nItems; i++) { - if (pItems[i]->mpSet) - ImplDrawBack(rRenderContext, pItems[i]->mpSet); + if (rItems[i]->mpSet) + ImplDrawBack(rRenderContext, rItems[i]->mpSet); } } @@ -1037,21 +1037,21 @@ static void ImplDrawSplit(vcl::RenderContext& rRenderContext, ImplSplitSet* pSet long nPos; long nTop; long nBottom; - ImplSplitItems& pItems = pSet->mpItems; + ImplSplitItems& rItems = pSet->mpItems; const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); for (i = 0; i < nItems-1; i++) { - if (pItems[i]->mnSplitSize) + if (rItems[i]->mnSplitSize) { - nPos = pItems[i]->mnSplitPos; + nPos = rItems[i]->mnSplitPos; - long nItemSplitSize = pItems[i]->mnSplitSize; + long nItemSplitSize = rItems[i]->mnSplitSize; long nSplitSize = pSet->mnSplitSize; if (bRows) { - nTop = pItems[i]->mnLeft; - nBottom = pItems[i]->mnLeft+pItems[i]->mnWidth-1; + nTop = rItems[i]->mnLeft; + nBottom = rItems[i]->mnLeft+rItems[i]->mnWidth-1; if (bFlat) nPos--; @@ -1082,8 +1082,8 @@ static void ImplDrawSplit(vcl::RenderContext& rRenderContext, ImplSplitSet* pSet } else { - nTop = pItems[i]->mnTop; - nBottom = pItems[i]->mnTop+pSet->mpItems[i]->mnHeight-1; + nTop = rItems[i]->mnTop; + nBottom = rItems[i]->mnTop+pSet->mpItems[i]->mnHeight-1; if (bFlat) nPos--; @@ -1116,9 +1116,9 @@ static void ImplDrawSplit(vcl::RenderContext& rRenderContext, ImplSplitSet* pSet for (i = 0; i < nItems; i++) { - if (pItems[i]->mpSet && pItems[i]->mnWidth && pItems[i]->mnHeight) + if (rItems[i]->mpSet && rItems[i]->mnWidth && rItems[i]->mnHeight) { - ImplDrawSplit(rRenderContext, pItems[i]->mpSet, !(pItems[i]->mnBits & SplitWindowItemFlags::ColSet), bFlat); + ImplDrawSplit(rRenderContext, rItems[i]->mpSet, !(rItems[i]->mnBits & SplitWindowItemFlags::ColSet), bFlat); } } } @@ -1138,7 +1138,7 @@ sal_uInt16 SplitWindow::ImplTestSplit( ImplSplitSet* pSet, const Point& rPos, long nPos; long nTop; long nBottom; - ImplSplitItems& pItems = pSet->mpItems; + ImplSplitItems& rItems = pSet->mpItems; if ( bRows ) { @@ -1153,24 +1153,24 @@ sal_uInt16 SplitWindow::ImplTestSplit( ImplSplitSet* pSet, const Point& rPos, for ( i = 0; i < nItems-1; i++ ) { - if ( pItems[i]->mnSplitSize ) + if ( rItems[i]->mnSplitSize ) { if ( bRows ) { - nTop = pItems[i]->mnLeft; - nBottom = pItems[i]->mnLeft+pItems[i]->mnWidth-1; + nTop = rItems[i]->mnLeft; + nBottom = rItems[i]->mnLeft+rItems[i]->mnWidth-1; } else { - nTop = pItems[i]->mnTop; - nBottom = pItems[i]->mnTop+pItems[i]->mnHeight-1; + nTop = rItems[i]->mnTop; + nBottom = rItems[i]->mnTop+rItems[i]->mnHeight-1; } - nPos = pItems[i]->mnSplitPos; + nPos = rItems[i]->mnSplitPos; if ( (nMPos1 >= nTop) && (nMPos1 <= nBottom) && - (nMPos2 >= nPos) && (nMPos2 <= nPos+pItems[i]->mnSplitSize) ) + (nMPos2 >= nPos) && (nMPos2 <= nPos+rItems[i]->mnSplitSize) ) { - if ( !pItems[i]->mbFixed && !pItems[i+1]->mbFixed ) + if ( !rItems[i]->mbFixed && !rItems[i+1]->mbFixed ) { rMouseOff = nMPos2-nPos; *ppFoundSet = pSet; @@ -1188,11 +1188,11 @@ sal_uInt16 SplitWindow::ImplTestSplit( ImplSplitSet* pSet, const Point& rPos, for ( i = 0; i < nItems; i++ ) { - if ( pItems[i]->mpSet ) + if ( rItems[i]->mpSet ) { - nSplitTest = ImplTestSplit( pItems[i]->mpSet, rPos, + nSplitTest = ImplTestSplit( rItems[i]->mpSet, rPos, rMouseOff, ppFoundSet, rFoundPos, - !(pItems[i]->mnBits & SplitWindowItemFlags::ColSet) ); + !(rItems[i]->mnBits & SplitWindowItemFlags::ColSet) ); if ( nSplitTest ) return nSplitTest; } @@ -2175,13 +2175,13 @@ void SplitWindow::ImplStartSplit( const MouseEvent& rMEvt ) } else { - ImplSplitItems& pItems = mpSplitSet->mpItems; + ImplSplitItems& rItems = mpSplitSet->mpItems; sal_uInt16 nItems = mpSplitSet->mpItems.size(); mpLastSizes = new long[nItems*2]; for ( sal_uInt16 i = 0; i < nItems; i++ ) { - mpLastSizes[i*2] = pItems[i]->mnSize; - mpLastSizes[i*2+1] = pItems[i]->mnPixSize; + mpLastSizes[i*2] = rItems[i]->mnSize; + mpLastSizes[i*2+1] = rItems[i]->mnPixSize; } } mnMStartPos = mnMSplitPos; @@ -2416,12 +2416,12 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt ) { if ( rTEvt.IsTrackingCanceled() ) { - ImplSplitItems& pItems = mpSplitSet->mpItems; - size_t nItems = pItems.size(); + ImplSplitItems& rItems = mpSplitSet->mpItems; + size_t nItems = rItems.size(); for ( size_t i = 0; i < nItems; i++ ) { - pItems[i]->mnSize = mpLastSizes[i*2]; - pItems[i]->mnPixSize = mpLastSizes[i*2+1]; + rItems[i]->mnSize = mpLastSizes[i*2]; + rItems[i]->mnPixSize = mpLastSizes[i*2+1]; } ImplUpdate(); Split(); @@ -2782,19 +2782,19 @@ void SplitWindow::SplitItem( sal_uInt16 nId, long nNewSize, return; size_t nItems = pSet->mpItems.size(); - ImplSplitItems& pItems = pSet->mpItems; + ImplSplitItems& rItems = pSet->mpItems; // When there is an explicit minimum or maximum size then move nNewSize // into that range (when it is not yet already in it.) - nNewSize = ValidateSize(nNewSize, pItems[nPos]); + nNewSize = ValidateSize(nNewSize, rItems[nPos]); if ( mbCalc ) { - pItems[nPos]->mnSize = nNewSize; + rItems[nPos]->mnSize = nNewSize; return; } - long nDelta = nNewSize-pItems[nPos]->mnPixSize; + long nDelta = nNewSize-rItems[nPos]->mnPixSize; if ( !nDelta ) return; @@ -2803,7 +2803,7 @@ void SplitWindow::SplitItem( sal_uInt16 nId, long nNewSize, sal_uInt16 nMax = nItems; for (size_t i = 0; i < nItems; ++i) { - if ( pItems[i]->mbFixed ) + if ( rItems[i]->mbFixed ) { if ( i < nPos ) nMin = i+1; @@ -2867,7 +2867,7 @@ void SplitWindow::SplitItem( sal_uInt16 nId, long nNewSize, { if ( nTempDelta ) { - pItems[n]->mnPixSize++; + rItems[n]->mnPixSize++; nTempDelta++; } n++; @@ -2877,7 +2877,7 @@ void SplitWindow::SplitItem( sal_uInt16 nId, long nNewSize, while ( nTempDelta ); } else - pItems[nPos+1]->mnPixSize -= nDelta; + rItems[nPos+1]->mnPixSize -= nDelta; } if ( bSmall ) @@ -2889,9 +2889,9 @@ void SplitWindow::SplitItem( sal_uInt16 nId, long nNewSize, n = nPos+1; do { - if ( nDelta && pItems[n-1]->mnPixSize ) + if ( nDelta && rItems[n-1]->mnPixSize ) { - pItems[n-1]->mnPixSize--; + rItems[n-1]->mnPixSize--; nDelta++; } @@ -2906,14 +2906,14 @@ void SplitWindow::SplitItem( sal_uInt16 nId, long nNewSize, n = nPos+1; do { - if ( pItems[n-1]->mnPixSize+nDelta < 0 ) + if ( rItems[n-1]->mnPixSize+nDelta < 0 ) { - nDelta += pItems[n-1]->mnPixSize; - pItems[n-1]->mnPixSize = 0; + nDelta += rItems[n-1]->mnPixSize; + rItems[n-1]->mnPixSize = 0; } else { - pItems[n-1]->mnPixSize += nDelta; + rItems[n-1]->mnPixSize += nDelta; break; } n--; @@ -2936,7 +2936,7 @@ void SplitWindow::SplitItem( sal_uInt16 nId, long nNewSize, { if ( nTempDelta ) { - pItems[n-1]->mnPixSize++; + rItems[n-1]->mnPixSize++; nTempDelta--; } n--; @@ -2946,7 +2946,7 @@ void SplitWindow::SplitItem( sal_uInt16 nId, long nNewSize, while ( nTempDelta ); } else - pItems[nPos]->mnPixSize += nDelta; + rItems[nPos]->mnPixSize += nDelta; } if ( bSmall ) @@ -2958,9 +2958,9 @@ void SplitWindow::SplitItem( sal_uInt16 nId, long nNewSize, n = nPos+1; do { - if ( nDelta && pItems[n]->mnPixSize ) + if ( nDelta && rItems[n]->mnPixSize ) { - pItems[n]->mnPixSize--; + rItems[n]->mnPixSize--; nDelta--; } @@ -2975,14 +2975,14 @@ void SplitWindow::SplitItem( sal_uInt16 nId, long nNewSize, n = nPos+1; do { - if ( pItems[n]->mnPixSize-nDelta < 0 ) + if ( rItems[n]->mnPixSize-nDelta < 0 ) { - nDelta -= pItems[n]->mnPixSize; - pItems[n]->mnPixSize = 0; + nDelta -= rItems[n]->mnPixSize; + rItems[n]->mnPixSize = 0; } else { - pItems[n]->mnPixSize -= nDelta; + rItems[n]->mnPixSize -= nDelta; break; } n++; @@ -2993,7 +2993,7 @@ void SplitWindow::SplitItem( sal_uInt16 nId, long nNewSize, } // update original sizes - ImplCalcLogSize( pItems, nItems ); + ImplCalcLogSize( rItems, nItems ); ImplUpdate(); } @@ -3048,35 +3048,35 @@ long SplitWindow::GetItemSize( sal_uInt16 nId, SplitWindowItemFlags nBits ) cons SplitWindowItemFlags nTempBits; sal_uInt16 i; nItems = pSet->mpItems.size(); - ImplSplitItems& pItems = pSet->mpItems; + ImplSplitItems& rItems = pSet->mpItems; for ( i = 0; i < nItems; i++ ) { if ( i == nPos ) nTempBits = nBits; else - nTempBits = pItems[i]->mnBits; + nTempBits = rItems[i]->mnBits; if ( nTempBits & SplitWindowItemFlags::RelativeSize ) - nRelSize += pItems[i]->mnPixSize; + nRelSize += rItems[i]->mnPixSize; else if ( nTempBits & SplitWindowItemFlags::PercentSize ) - nPerSize += pItems[i]->mnPixSize; + nPerSize += rItems[i]->mnPixSize; } nPerSize += nRelSize; if ( nBits & SplitWindowItemFlags::RelativeSize ) { if ( nRelSize ) - return (pItems[nPos]->mnPixSize+(nRelSize/2))/nRelSize; + return (rItems[nPos]->mnPixSize+(nRelSize/2))/nRelSize; else return 1; } else if ( nBits & SplitWindowItemFlags::PercentSize ) { if ( nPerSize ) - return (pItems[nPos]->mnPixSize*100)/nPerSize; + return (rItems[nPos]->mnPixSize*100)/nPerSize; else return 1; } else - return pItems[nPos]->mnPixSize; + return rItems[nPos]->mnPixSize; } } else diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 099ed6cbe0c3..e3cadff891f2 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -1217,20 +1217,20 @@ void DomainMapper_Impl::appendTextPortion( const OUString& rString, const Proper try { // If we are in comments, then disable CharGrabBag, comment text doesn't support that. - uno::Sequence< beans::PropertyValue > pValues = pPropertyMap->GetPropertyValues(/*bCharGrabBag=*/!m_bIsInComments); - sal_Int32 len = pValues.getLength(); + uno::Sequence< beans::PropertyValue > aValues = pPropertyMap->GetPropertyValues(/*bCharGrabBag=*/!m_bIsInComments); + sal_Int32 len = aValues.getLength(); if (m_bStartTOC || m_bStartIndex || m_bStartBibliography) for( int i =0; i < len; ++i ) { - if (pValues[i].Name == "CharHidden") - pValues[i].Value = uno::makeAny(false); + if (aValues[i].Name == "CharHidden") + aValues[i].Value = uno::makeAny(false); } uno::Reference< text::XTextRange > xTextRange; if (m_aTextAppendStack.top().xInsertPosition.is()) { - xTextRange = xTextAppend->insertTextPortion(rString, pValues, m_aTextAppendStack.top().xInsertPosition); + xTextRange = xTextAppend->insertTextPortion(rString, aValues, m_aTextAppendStack.top().xInsertPosition); m_aTextAppendStack.top().xCursor->gotoRange(xTextRange->getEnd(), true); } else @@ -1239,7 +1239,7 @@ void DomainMapper_Impl::appendTextPortion( const OUString& rString, const Proper { if(m_bInHeaderFooterImport && !m_bStartTOCHeaderFooter) { - xTextRange = xTextAppend->appendTextPortion(rString, pValues); + xTextRange = xTextAppend->appendTextPortion(rString, aValues); } else { @@ -1251,7 +1251,7 @@ void DomainMapper_Impl::appendTextPortion( const OUString& rString, const Proper { if (m_bStartIndex || m_bStartBibliography || m_bStartGenericField) xTOCTextCursor->goLeft(1, false); - xTextRange = xTextAppend->insertTextPortion(rString, pValues, xTOCTextCursor); + xTextRange = xTextAppend->insertTextPortion(rString, aValues, xTOCTextCursor); SAL_WARN_IF(!xTextRange.is(), "writerfilter.dmapper", "insertTextPortion failed"); if (!xTextRange.is()) throw uno::Exception("insertTextPortion failed", nullptr); @@ -1261,7 +1261,7 @@ void DomainMapper_Impl::appendTextPortion( const OUString& rString, const Proper } else { - xTextRange = xTextAppend->appendTextPortion(rString, pValues); + xTextRange = xTextAppend->appendTextPortion(rString, aValues); xTOCTextCursor = xTextAppend->createTextCursor(); xTOCTextCursor->gotoRange(xTextRange->getEnd(), false); } @@ -1269,7 +1269,7 @@ void DomainMapper_Impl::appendTextPortion( const OUString& rString, const Proper } } else - xTextRange = xTextAppend->appendTextPortion(rString, pValues); + xTextRange = xTextAppend->appendTextPortion(rString, aValues); } CheckRedline( xTextRange ); diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx index df9b3f6d3773..f97fe259aa66 100644 --- a/writerfilter/source/dmapper/GraphicImport.cxx +++ b/writerfilter/source/dmapper/GraphicImport.cxx @@ -464,9 +464,9 @@ void GraphicImport::handleWrapTextValue(sal_uInt32 nVal) void GraphicImport::putPropertyToFrameGrabBag( const OUString& sPropertyName, const uno::Any& aPropertyValue ) { - beans::PropertyValue pProperty; - pProperty.Name = sPropertyName; - pProperty.Value = aPropertyValue; + beans::PropertyValue aProperty; + aProperty.Name = sPropertyName; + aProperty.Value = aPropertyValue; if (!m_xShape.is()) return; @@ -492,7 +492,7 @@ void GraphicImport::putPropertyToFrameGrabBag( const OUString& sPropertyName, co uno::Sequence<beans::PropertyValue> aTmp; xSet->getPropertyValue(aGrabBagPropName) >>= aTmp; std::vector<beans::PropertyValue> aGrabBag(comphelper::sequenceToContainer<std::vector<beans::PropertyValue> >(aTmp)); - aGrabBag.push_back(pProperty); + aGrabBag.push_back(aProperty); xSet->setPropertyValue(aGrabBagPropName, uno::makeAny(comphelper::containerToSequence(aGrabBag))); } |