summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-04-25 09:59:16 +0200
committerAshod Nakashian <ashod.nakashian@collabora.co.uk>2016-07-12 22:06:19 -0400
commitc5cdfe39d3afca716e7b11f8f8e169ce378861ea (patch)
tree5b804fa2e78405afe16db734f88f24a7b9714209 /sw
parent0c4c31576fe03b3b59217bf9990b75f32d193d0d (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. Reviewed-on: https://gerrit.libreoffice.org/24391 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com> (cherry picked from commit e8fd5a07eca70912ddee45aaa34d434809b59fb7) Change-Id: Ie36a25ecba61c18f99c77c77646d6459a443cbd1
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/access/accframebase.cxx14
-rw-r--r--sw/source/core/access/accmap.cxx26
-rw-r--r--sw/source/core/access/accpara.cxx3
-rw-r--r--sw/source/core/access/accselectionhelper.cxx14
-rw-r--r--sw/source/core/crsr/callnk.cxx4
-rw-r--r--sw/source/core/doc/CntntIdxStore.cxx4
-rw-r--r--sw/source/core/doc/SwStyleNameMapper.cxx48
-rw-r--r--sw/source/core/doc/doc.cxx4
-rw-r--r--sw/source/core/doc/docredln.cxx10
-rw-r--r--sw/source/core/layout/paintfrm.cxx6
-rw-r--r--sw/source/core/swg/SwXMLBlockExport.cxx2
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx10
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx9
-rw-r--r--sw/source/filter/ww8/docxexport.cxx36
-rw-r--r--sw/source/filter/ww8/docxsdrexport.cxx23
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx6
-rw-r--r--sw/source/filter/ww8/ww8par3.cxx36
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx8
-rw-r--r--sw/source/ui/envelp/envfmt.cxx6
-rw-r--r--sw/source/uibase/docvw/SidebarWin.cxx4
-rw-r--r--sw/source/uibase/shells/txtattr.cxx6
-rw-r--r--sw/source/uibase/uno/unomailmerge.cxx4
-rw-r--r--sw/source/uibase/utlui/content.cxx136
-rw-r--r--sw/source/uibase/utlui/gloslst.cxx22
24 files changed, 185 insertions, 256 deletions
diff --git a/sw/source/core/access/accframebase.cxx b/sw/source/core/access/accframebase.cxx
index dcd7e577e0e6..937feab1d791 100644
--- a/sw/source/core/access/accframebase.cxx
+++ b/sw/source/core/access/accframebase.cxx
@@ -307,11 +307,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();
@@ -334,13 +334,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 ed9ec9db9b29..1e1532ae1b38 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -1150,7 +1150,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 )
@@ -1158,10 +1158,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())
@@ -1178,7 +1178,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 )
{
@@ -1198,10 +1198,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() )
@@ -1214,7 +1214,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 ) )
@@ -1280,8 +1280,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())
@@ -1551,8 +1551,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 7fdd058a9d63..ea545e1637f8 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -3808,8 +3808,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 e93a6c9d7014..bcdec685466b 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() == FRM_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 9b0b2947c768..cad35f8ddb05 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 b46ae0c38793..2a02b440d4cf 100644
--- a/sw/source/core/doc/SwStyleNameMapper.cxx
+++ b/sw/source/core/doc/SwStyleNameMapper.cxx
@@ -18,7 +18,7 @@
*/
#include <numeric>
-#include <boost/tuple/tuple.hpp>
+#include <tuple>
#include <SwStyleNameMapper.hxx>
#include <tools/resmgr.hxx>
@@ -312,7 +312,7 @@ const struct SwTableEntry NumRuleProgNameTable [] =
};
#undef ENTRY
-static ::std::vector<OUString>*
+::std::vector<OUString>*
lcl_NewUINameArray(sal_uInt16 nStt, sal_uInt16 const nEnd)
{
::std::vector<OUString> *const pNameArray = new ::std::vector<OUString>;
@@ -326,7 +326,7 @@ lcl_NewUINameArray(sal_uInt16 nStt, sal_uInt16 const nEnd)
return pNameArray;
}
-static ::std::vector<OUString>*
+::std::vector<OUString>*
lcl_NewProgNameArray(const SwTableEntry *pTable, sal_uInt8 const nCount)
{
::std::vector<OUString> *const pProgNameArray = new ::std::vector<OUString>;
@@ -340,7 +340,7 @@ lcl_NewProgNameArray(const SwTableEntry *pTable, sal_uInt8 const nCount)
return pProgNameArray;
}
-static OUString
+OUString
lcl_GetSpecialExtraName(const OUString& rExtraName, const bool bIsUIName )
{
const ::std::vector<OUString>& rExtraArr = bIsUIName
@@ -367,7 +367,7 @@ lcl_GetSpecialExtraName(const OUString& rExtraName, const bool bIsUIName )
return rExtraName;
}
-static bool lcl_SuffixIsUser(const OUString & rString)
+bool lcl_SuffixIsUser(const OUString & rString)
{
const sal_Unicode *pChar = rString.getStr();
sal_Int32 nLen = rString.getLength();
@@ -384,7 +384,7 @@ static bool lcl_SuffixIsUser(const OUString & rString)
return bRet;
}
-static void lcl_CheckSuffixAndDelete(OUString & rString)
+void lcl_CheckSuffixAndDelete(OUString & rString)
{
if (lcl_SuffixIsUser(rString))
{
@@ -392,11 +392,11 @@ static void lcl_CheckSuffixAndDelete(OUString & rString)
}
}
-typedef boost::tuple<sal_uInt16, sal_uInt16, const ::std::vector<OUString>& (*)() > NameArrayIndexTuple_t;
+typedef std::tuple<sal_uInt16, sal_uInt16, const std::vector<OUString>& (*)() > NameArrayIndexTuple_t;
-static sal_uInt16 lcl_AccumulateIndexCount( sal_uInt16 nSum, const NameArrayIndexTuple_t& tuple ){
+sal_uInt16 lcl_AccumulateIndexCount( sal_uInt16 nSum, const NameArrayIndexTuple_t& tuple ){
// Return running sum + (index end) - (index start)
- return nSum + boost::get<1>( tuple ) - boost::get<0>( tuple );
+ return nSum + std::get<1>( tuple ) - std::get<0>( tuple );
}
}
@@ -436,37 +436,37 @@ const NameToIdHash & SwStyleNameMapper::getHashTable ( SwGetPoolIdFromName eFlag
case nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL:
{
pHashPointer = bProgName ? &m_pParaProgMap : &m_pParaUIMap;
- vIndexes.push_back( boost::make_tuple(RES_POOLCOLL_TEXT_BEGIN, RES_POOLCOLL_TEXT_END, bProgName ? &GetTextProgNameArray : &GetTextUINameArray) );
- vIndexes.push_back( boost::make_tuple(RES_POOLCOLL_LISTS_BEGIN, RES_POOLCOLL_LISTS_END, bProgName ? &GetListsProgNameArray : &GetListsUINameArray) );
- vIndexes.push_back( boost::make_tuple(RES_POOLCOLL_EXTRA_BEGIN, RES_POOLCOLL_EXTRA_END, bProgName ? &GetExtraProgNameArray : &GetExtraUINameArray) );
- vIndexes.push_back( boost::make_tuple(RES_POOLCOLL_REGISTER_BEGIN, RES_POOLCOLL_REGISTER_END, bProgName ? &GetRegisterProgNameArray : &GetRegisterUINameArray) );
- vIndexes.push_back( boost::make_tuple(RES_POOLCOLL_DOC_BEGIN, RES_POOLCOLL_DOC_END, bProgName ? &GetDocProgNameArray : &GetDocUINameArray) );
- vIndexes.push_back( boost::make_tuple(RES_POOLCOLL_HTML_BEGIN, RES_POOLCOLL_HTML_END, bProgName ? &GetHTMLProgNameArray : &GetHTMLUINameArray) );
+ vIndexes.push_back( std::make_tuple(RES_POOLCOLL_TEXT_BEGIN, RES_POOLCOLL_TEXT_END, bProgName ? &GetTextProgNameArray : &GetTextUINameArray) );
+ vIndexes.push_back( std::make_tuple(RES_POOLCOLL_LISTS_BEGIN, RES_POOLCOLL_LISTS_END, bProgName ? &GetListsProgNameArray : &GetListsUINameArray) );
+ vIndexes.push_back( std::make_tuple(RES_POOLCOLL_EXTRA_BEGIN, RES_POOLCOLL_EXTRA_END, bProgName ? &GetExtraProgNameArray : &GetExtraUINameArray) );
+ vIndexes.push_back( std::make_tuple(RES_POOLCOLL_REGISTER_BEGIN, RES_POOLCOLL_REGISTER_END, bProgName ? &GetRegisterProgNameArray : &GetRegisterUINameArray) );
+ vIndexes.push_back( std::make_tuple(RES_POOLCOLL_DOC_BEGIN, RES_POOLCOLL_DOC_END, bProgName ? &GetDocProgNameArray : &GetDocUINameArray) );
+ vIndexes.push_back( std::make_tuple(RES_POOLCOLL_HTML_BEGIN, RES_POOLCOLL_HTML_END, bProgName ? &GetHTMLProgNameArray : &GetHTMLUINameArray) );
}
break;
case nsSwGetPoolIdFromName::GET_POOLID_CHRFMT:
{
pHashPointer = bProgName ? &m_pCharProgMap : &m_pCharUIMap;
- vIndexes.push_back( boost::make_tuple(RES_POOLCHR_NORMAL_BEGIN, RES_POOLCHR_NORMAL_END, bProgName ? &GetChrFormatProgNameArray : &GetChrFormatUINameArray) );
- vIndexes.push_back( boost::make_tuple(RES_POOLCHR_HTML_BEGIN, RES_POOLCHR_HTML_END, bProgName ? &GetHTMLChrFormatProgNameArray : &GetHTMLChrFormatUINameArray) );
+ vIndexes.push_back( std::make_tuple(RES_POOLCHR_NORMAL_BEGIN, RES_POOLCHR_NORMAL_END, bProgName ? &GetChrFormatProgNameArray : &GetChrFormatUINameArray) );
+ vIndexes.push_back( std::make_tuple(RES_POOLCHR_HTML_BEGIN, RES_POOLCHR_HTML_END, bProgName ? &GetHTMLChrFormatProgNameArray : &GetHTMLChrFormatUINameArray) );
}
break;
case nsSwGetPoolIdFromName::GET_POOLID_FRMFMT:
{
pHashPointer = bProgName ? &m_pFrameProgMap : &m_pFrameUIMap;
- vIndexes.push_back( boost::make_tuple(RES_POOLFRM_BEGIN, RES_POOLFRM_END, bProgName ? &GetFrameFormatProgNameArray : &GetFrameFormatUINameArray) );
+ vIndexes.push_back( std::make_tuple(RES_POOLFRM_BEGIN, RES_POOLFRM_END, bProgName ? &GetFrameFormatProgNameArray : &GetFrameFormatUINameArray) );
}
break;
case nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC:
{
pHashPointer = bProgName ? &m_pPageProgMap : &m_pPageUIMap;
- vIndexes.push_back( boost::make_tuple(RES_POOLPAGE_BEGIN, RES_POOLPAGE_END, bProgName ? &GetPageDescProgNameArray : &GetPageDescUINameArray) );
+ vIndexes.push_back( std::make_tuple(RES_POOLPAGE_BEGIN, RES_POOLPAGE_END, bProgName ? &GetPageDescProgNameArray : &GetPageDescUINameArray) );
}
break;
case nsSwGetPoolIdFromName::GET_POOLID_NUMRULE:
{
pHashPointer = bProgName ? &m_pNumRuleProgMap : &m_pNumRuleUIMap;
- vIndexes.push_back( boost::make_tuple(RES_POOLNUMRULE_BEGIN, RES_POOLNUMRULE_END, bProgName ? &GetNumRuleProgNameArray : &GetNumRuleUINameArray) );
+ vIndexes.push_back( std::make_tuple(RES_POOLNUMRULE_BEGIN, RES_POOLNUMRULE_END, bProgName ? &GetNumRuleProgNameArray : &GetNumRuleUINameArray) );
}
break;
}
@@ -482,13 +482,13 @@ const NameToIdHash & SwStyleNameMapper::getHashTable ( SwGetPoolIdFromName eFlag
for ( ::std::vector<NameArrayIndexTuple_t>::iterator entry = vIndexes.begin(); entry != vIndexes.end(); ++entry )
{
// Get a pointer to the function which will populate pStrings
- const ::std::vector<OUString>& (*pStringsFetchFunc)() = boost::get<2>( *entry );
+ 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 = boost::get<0>( *entry ) ; nId < boost::get<1>( *entry ) ; nId++, nIndex++ )
- (*pHash)[pStrings[nIndex]] = nId;
+ for ( nIndex = 0, nId = std::get<0>( *entry ) ; nId < std::get<1>( *entry ) ; nId++, nIndex++ )
+ (*pHash)[rStrings[nIndex]] = nId;
}
}
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index 644588e39f30..deeda828c619 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -1077,8 +1077,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 936245a4550f..4c2a77325b9b 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 683202a63037..675ef48be460 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -2165,13 +2165,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 b2ee9e05b788..299bae7cb846 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 2145dcb37012..ca19a59804cf 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -4232,9 +4232,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#
@@ -4247,12 +4247,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/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 4caf0318315e..f18858886c49 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -4736,9 +4736,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" )
{
@@ -5032,12 +5031,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 1be1c997471b..0e501c0d21f4 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -894,11 +894,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" )
@@ -973,13 +973,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;
@@ -1011,14 +1011,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 )
{
@@ -1082,14 +1082,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;
@@ -1153,14 +1153,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;
@@ -1247,13 +1247,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 6518f4f126f2..191a9b9cff49 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 4e088f1ed645..6e97113a543f 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -3846,7 +3846,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;
@@ -3883,7 +3883,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:
@@ -3994,7 +3994,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 ba0d4f03894a..1c5b24813d6f 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -1565,14 +1565,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;
/*
@@ -2318,11 +2318,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());
@@ -2330,26 +2330,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 afb28097453d..bdeb1946833d 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -531,8 +531,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;
@@ -604,8 +604,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 7d3bbb9b0dfd..cf4d0baa5642 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 285ca4a3d5cf..497e14c1361d 100644
--- a/sw/source/uibase/docvw/SidebarWin.cxx
+++ b/sw/source/uibase/docvw/SidebarWin.cxx
@@ -1163,7 +1163,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();
@@ -1174,7 +1174,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 3d004231fa01..27f3d6f9babc 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 f8ff1a5370bf..f838c40f1e6b 100644
--- a/sw/source/uibase/uno/unomailmerge.cxx
+++ b/sw/source/uibase/uno/unomailmerge.cxx
@@ -418,7 +418,7 @@ public:
}
~MailMergeExecuteFinalizer()
{
- osl::MutexGuard pMgrGuard( GetMailMergeMutex() );
+ osl::MutexGuard aMgrGuard( GetMailMergeMutex() );
m_pMailMerge->m_pMgr = nullptr;
}
@@ -836,7 +836,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 dc3c67193f23..4cc3c0871713 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -119,17 +119,17 @@ bool SwContentTree::bIsInDrag = false;
namespace
{
- static bool lcl_IsContent(const SvTreeListEntry* pEntry)
+ bool lcl_IsContent(const SvTreeListEntry* pEntry)
{
return static_cast<const SwTypeNumber*>(pEntry->GetUserData())->GetTypeId() == CTYPE_CNT;
}
- static bool lcl_IsContentType(const SvTreeListEntry* pEntry)
+ bool lcl_IsContentType(const SvTreeListEntry* pEntry)
{
return static_cast<const SwTypeNumber*>(pEntry->GetUserData())->GetTypeId() == CTYPE_CTT;
}
- static bool lcl_FindShell(SwWrtShell* pShell)
+ bool lcl_FindShell(SwWrtShell* pShell)
{
bool bFound = false;
SwView *pView = SwModule::GetFirstView();
@@ -145,7 +145,7 @@ namespace
return bFound;
}
- static bool lcl_IsUiVisibleBookmark(const IDocumentMarkAccess::pMark_t& rpMark)
+ bool lcl_IsUiVisibleBookmark(const IDocumentMarkAccess::pMark_t& rpMark)
{
return IDocumentMarkAccess::GetType(*rpMark) == IDocumentMarkAccess::MarkType::BOOKMARK;
}
@@ -217,8 +217,6 @@ SwTOXBaseContent::~SwTOXBaseContent()
{
}
-// Content type, knows it's contents and the WrtShell.
-
SwContentType::SwContentType(SwWrtShell* pShell, ContentTypeId nType, sal_uInt8 nLevel) :
SwTypeNumber(CTYPE_CTT),
pWrtShell(pShell),
@@ -457,8 +455,6 @@ SwContentType::~SwContentType()
delete pMember;
}
-// Deliver content, for that if necessary fill the list
-
const SwContent* SwContentType::GetMember(size_t nIndex)
{
if(!bDataValid || !pMember)
@@ -471,14 +467,12 @@ const SwContent* SwContentType::GetMember(size_t nIndex)
return nullptr;
}
-void SwContentType::Invalidate()
+void SwContentType::Invalidate()
{
bDataValid = false;
}
-// Fill the List of contents
-
-void SwContentType::FillMemberList(bool* pbLevelOrVisibilityChanged)
+void SwContentType::FillMemberList(bool* pbLevelOrVisibilityChanged)
{
SwContentArr* pOldMember = nullptr;
size_t nOldMemberCount = 0;
@@ -538,7 +532,7 @@ void SwContentType::FillMemberList(bool* pbLevelOrVisibilityChanged)
for(size_t i = 0; i < nMemberCount; ++i)
{
const SwFrameFormat& rTableFormat = pWrtShell->GetTableFrameFormat(i, true);
- const OUString sTableName( rTableFormat.GetName() );
+ const OUString& sTableName( rTableFormat.GetName() );
SwContent* pCnt = new SwContent(this, sTableName,
rTableFormat.FindLayoutRect(false, &aNullPt).Top() );
@@ -563,14 +557,13 @@ void SwContentType::FillMemberList(bool* pbLevelOrVisibilityChanged)
eType = FLYCNTTYPE_OLE;
else if(nContentType == ContentTypeId::GRAPHIC)
eType = FLYCNTTYPE_GRF;
+ OSL_ENSURE(nMemberCount == pWrtShell->GetFlyCount(eType, /*bIgnoreTextBoxes=*/true),
+ "MemberCount differs");
Point aNullPt;
nMemberCount = pWrtShell->GetFlyCount(eType, /*bIgnoreTextBoxes=*/true);
- std::vector<SwFrameFormat const*> formats(pWrtShell->GetFlyFrameFormats(eType, /*bIgnoreTextBoxes=*/true));
- SAL_WARN_IF(nMemberCount != formats.size(), "sw.ui", "MemberCount differs");
- nMemberCount = formats.size();
- for (size_t i = 0; i < nMemberCount; ++i)
+ for(size_t i = 0; i < nMemberCount; ++i)
{
- SwFrameFormat const*const pFrameFormat = formats[i];
+ const SwFrameFormat* pFrameFormat = pWrtShell->GetFlyNum(i,eType,/*bIgnoreTextBoxes=*/true);
const OUString sFrameName = pFrameFormat->GetName();
SwContent* pCnt;
@@ -779,8 +772,6 @@ void SwContentType::FillMemberList(bool* pbLevelOrVisibilityChanged)
}
-// TreeListBox for content indicator
-
SwContentTree::SwContentTree(vcl::Window* pParent, const ResId& rResId)
: SvTreeListBox(pParent, rResId)
, m_sSpace(OUString(" "))
@@ -885,9 +876,7 @@ OUString SwContentTree::GetEntryAltText( SvTreeListEntry* pEntry ) const
case OBJ_wegFITTEXT:
case OBJ_LINE:
case OBJ_RECT:
- //caoxueqin added custom shape
case OBJ_CUSTOMSHAPE:
- //end 2005/08/05
case OBJ_CIRC:
case OBJ_SECT:
case OBJ_CARC:
@@ -906,11 +895,10 @@ OUString SwContentTree::GetEntryAltText( SvTreeListEntry* pEntry ) const
default:
nCmpId = pTemp->GetObjIdentifier();
}
- if(nCmpId == OBJ_GRUP /*dynamic_cast< const SdrObjGroup *>( pTemp ) != nullptr*/ && pTemp->GetName() == pCnt->GetName())
+ if(nCmpId == OBJ_GRUP && pTemp->GetName() == pCnt->GetName())
{
return pTemp->GetTitle();
}
- //Commented End
}
}
}
@@ -921,13 +909,7 @@ OUString SwContentTree::GetEntryAltText( SvTreeListEntry* pEntry ) const
{
const SwFlyFrameFormat* pFrameFormat = m_pActiveShell->GetDoc()->FindFlyByName( pCnt->GetName());
if( pFrameFormat )
- {
-// SwNodeIndex aIdx( *(pFrameFormat->GetContent().GetContentIdx()), 1 );
-// const SwGrfNode* pGrfNd = aIdx.GetNode().GetGrfNode();
-// if( pGrfNd )
-// return pGrfNd->GetAlternateText();
return pFrameFormat->GetObjTitle();
- }
}
}
break;
@@ -978,9 +960,7 @@ OUString SwContentTree::GetEntryLongDescription( SvTreeListEntry* pEntry ) const
case OBJ_wegFITTEXT:
case OBJ_LINE:
case OBJ_RECT:
- //caoxueqin added custom shape
case OBJ_CUSTOMSHAPE:
- //end 2005/08/05
case OBJ_CIRC:
case OBJ_SECT:
case OBJ_CARC:
@@ -1003,7 +983,6 @@ OUString SwContentTree::GetEntryLongDescription( SvTreeListEntry* pEntry ) const
{
return pTemp->GetDescription();
}
- //Commented End
}
}
}
@@ -1302,7 +1281,7 @@ sal_IntPtr SwContentTree::GetTabPos( SvTreeListEntry* pEntry, SvLBoxTab* pTab)
// Content will be integrated into the Box only on demand.
-void SwContentTree::RequestingChildren( SvTreeListEntry* pParent )
+void SwContentTree::RequestingChildren( SvTreeListEntry* pParent )
{
// Is this a content type?
if(lcl_IsContentType(pParent))
@@ -1379,7 +1358,6 @@ void SwContentTree::RequestingChildren( SvTreeListEntry* pParent )
bool Marked = pDrawView->IsObjMarked(pObj);
if(Marked)
{
- //sEntry += String::CreateFromAscii(" *");
pChild->SetMarked(true);
}
}
@@ -1391,7 +1369,6 @@ void SwContentTree::RequestingChildren( SvTreeListEntry* pParent )
}
}
-//Get drawing Objects by content .
SdrObject* SwContentTree::GetDrawingObjectsByContent(const SwContent *pCnt)
{
SdrObject *pRetObj = nullptr;
@@ -1424,8 +1401,6 @@ SdrObject* SwContentTree::GetDrawingObjectsByContent(const SwContent *pCnt)
return pRetObj;
}
-// Expand - Remember the state for content types.
-
bool SwContentTree::Expand( SvTreeListEntry* pParent )
{
if(!m_bIsRoot || (static_cast<SwContentType*>(pParent->GetUserData())->GetType() == ContentTypeId::OUTLINE) ||
@@ -1444,7 +1419,7 @@ bool SwContentTree::Expand( SvTreeListEntry* pParent )
m_nHiddenBlock |= nOr;
if((pCntType->GetType() == ContentTypeId::OUTLINE))
{
- std::map< void*, bool > mCurrOutLineNodeMap;
+ std::map< void*, bool > aCurrOutLineNodeMap;
SwWrtShell* pShell = GetWrtShell();
bool bBool = SvTreeListBox::Expand(pParent);
@@ -1455,17 +1430,17 @@ bool SwContentTree::Expand( SvTreeListEntry* pParent )
{
sal_Int32 nPos = static_cast<SwContent*>(pChild->GetUserData())->GetYPos();
void* key = static_cast<void*>(pShell->getIDocumentOutlineNodesAccess()->getOutlineNode( nPos ));
- mCurrOutLineNodeMap.insert(std::map<void*, bool>::value_type( key, false ) );
+ aCurrOutLineNodeMap.insert(std::map<void*, bool>::value_type( key, false ) );
std::map<void*, bool>::iterator iter = mOutLineNodeMap.find( key );
if( iter != mOutLineNodeMap.end() && mOutLineNodeMap[key])
{
- mCurrOutLineNodeMap[key] = true;
+ aCurrOutLineNodeMap[key] = true;
SvTreeListBox::Expand(pChild);
}
}
pChild = Next(pChild);
}
- mOutLineNodeMap = mCurrOutLineNodeMap;
+ mOutLineNodeMap = aCurrOutLineNodeMap;
return bBool;
}
@@ -1481,8 +1456,6 @@ bool SwContentTree::Expand( SvTreeListEntry* pParent )
return SvTreeListBox::Expand(pParent);
}
-// Collapse - Remember the state for content types.
-
bool SwContentTree::Collapse( SvTreeListEntry* pParent )
{
if(!m_bIsRoot || (static_cast<SwContentType*>(pParent->GetUserData())->GetType() == ContentTypeId::OUTLINE) ||
@@ -1542,8 +1515,6 @@ IMPL_LINK_NOARG_TYPED(SwContentTree, ContentDoubleClickHdl, SvTreeListBox*, bool
return false;
}
-// Show the file
-
void SwContentTree::Display( bool bActive )
{
if(!m_bIsImageListInitialized)
@@ -1751,8 +1722,6 @@ void SwContentTree::Display( bool bActive )
m_bActiveDocModified = false;
}
-// In the Clear the content types have to be deleted, also.
-
void SwContentTree::Clear()
{
SetUpdateMode(false);
@@ -1812,7 +1781,7 @@ bool SwContentTree::FillTransferData( TransferDataContainer& rTransfer,
case ContentTypeId::POSTIT:
case ContentTypeId::INDEX:
case ContentTypeId::REFERENCE :
- // cannot inserted as URL or as koennen weder als URL noch als region
+ // cannot be inserted, neither as URL nor as region
break;
case ContentTypeId::URLFIELD:
sUrl = static_cast<SwURLFieldContent*>(pCnt)->GetURL();
@@ -1932,8 +1901,6 @@ bool SwContentTree::ToggleToRoot()
return m_bIsRoot;
}
-// Check if the displayed content is valid.
-
bool SwContentTree::HasContentChanged()
{
@@ -2147,9 +2114,6 @@ bool SwContentTree::HasContentChanged()
return bRepaint;
}
-// Before any data will be deleted, the last active entry has to be found.
-// After this the UserData will be deleted
-
void SwContentTree::FindActiveTypeAndRemoveUserData()
{
SvTreeListEntry* pEntry = FirstSelected();
@@ -2171,9 +2135,6 @@ void SwContentTree::FindActiveTypeAndRemoveUserData()
}
}
-// After a file is dropped on the Navigator,
-// the new shell will be set.
-
void SwContentTree::SetHiddenShell(SwWrtShell* pSh)
{
m_pHiddenShell = pSh;
@@ -2189,8 +2150,6 @@ void SwContentTree::SetHiddenShell(SwWrtShell* pSh)
GetParentWindow()->UpdateListBox();
}
-// Document change - set new Shell
-
void SwContentTree::SetActiveShell(SwWrtShell* pSh)
{
if(m_bIsInternalDrag)
@@ -2228,8 +2187,6 @@ void SwContentTree::SetActiveShell(SwWrtShell* pSh)
}
}
-// Set an open view as active.
-
void SwContentTree::SetConstantShell(SwWrtShell* pSh)
{
if (m_pActiveShell)
@@ -2247,7 +2204,6 @@ void SwContentTree::SetConstantShell(SwWrtShell* pSh)
}
-
void SwContentTree::Notify(SfxBroadcaster & rBC, SfxHint const& rHint)
{
SfxSimpleHint const*const pHint(dynamic_cast<SfxSimpleHint const*>(&rHint));
@@ -2272,8 +2228,6 @@ void SwContentTree::Notify(SfxBroadcaster & rBC, SfxHint const& rHint)
}
}
-// Execute commands of the Navigator
-
void SwContentTree::ExecCommand(sal_uInt16 nCmd, bool bModifier)
{
bool bMove = false;
@@ -2376,8 +2330,7 @@ void SwContentTree::ExecCommand(sal_uInt16 nCmd, bool bModifier)
pEntry = Prev(pEntry);
if(pEntry &&
(nActLevel >= static_cast<SwOutlineContent*>(pEntry->GetUserData())->GetOutlineLevel()||
- CTYPE_CNT !=
- static_cast<SwTypeNumber*>(pEntry->GetUserData())->GetTypeId()))
+ CTYPE_CNT != static_cast<SwTypeNumber*>(pEntry->GetUserData())->GetTypeId()))
{
break;
}
@@ -2423,7 +2376,7 @@ void SwContentTree::ExecCommand(sal_uInt16 nCmd, bool bModifier)
}
}
-void SwContentTree::ShowTree()
+void SwContentTree::ShowTree()
{
SvTreeListBox::Show();
}
@@ -2437,16 +2390,13 @@ void SwContentTree::Paint( vcl::RenderContext& rRenderContext,
SvTreeListBox::Paint( rRenderContext, rRect );
}
-// folded together will not be glidled
-
-void SwContentTree::HideTree()
+void SwContentTree::HideTree()
{
m_aUpdTimer.Stop();
SvTreeListBox::Hide();
}
-// No idle with focus or while dragging.
-
+/** No idle with focus or while dragging */
IMPL_LINK_NOARG_TYPED(SwContentTree, TimerUpdate, Timer *, void)
{
if (IsDisposed())
@@ -2499,8 +2449,8 @@ DragDropMode SwContentTree::NotifyStartDrag(
{
DragDropMode eMode = (DragDropMode)0;
if( m_bIsActive && m_nRootType == ContentTypeId::OUTLINE &&
- GetModel()->GetAbsPos( pEntry ) > 0
- && !GetWrtShell()->GetView().GetDocShell()->IsReadOnly())
+ GetModel()->GetAbsPos( pEntry ) > 0
+ && !GetWrtShell()->GetView().GetDocShell()->IsReadOnly())
eMode = GetDragDropMode();
else if(!m_bIsActive && GetWrtShell()->GetView().GetDocShell()->HasName())
eMode = DragDropMode::APP_COPY;
@@ -2594,7 +2544,7 @@ bool SwContentTree::NotifyAcceptDrop( SvTreeListEntry* pEntry)
// If a Ctrl + DoubleClick are executed in an open area,
// then the base function of the control is to be called.
-void SwContentTree::MouseButtonDown( const MouseEvent& rMEvt )
+void SwContentTree::MouseButtonDown( const MouseEvent& rMEvt )
{
Point aPos( rMEvt.GetPosPixel());
SvTreeListEntry* pEntry = GetEntry( aPos, true );
@@ -2606,7 +2556,7 @@ void SwContentTree::MouseButtonDown( const MouseEvent& rMEvt )
// Update immediately
-void SwContentTree::GetFocus()
+void SwContentTree::GetFocus()
{
SwView* pActView = GetParentWindow()->GetCreateView();
if(pActView)
@@ -2630,7 +2580,7 @@ void SwContentTree::GetFocus()
SvTreeListBox::GetFocus();
}
-void SwContentTree::KeyInput(const KeyEvent& rEvent)
+void SwContentTree::KeyInput(const KeyEvent& rEvent)
{
const vcl::KeyCode aCode = rEvent.GetKeyCode();
if(aCode.GetCode() == KEY_RETURN)
@@ -2765,12 +2715,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 );
- //rView.GetEditWin().GrabFocus();
+ static_cast<vcl::Window*>(&rEditWindow)->KeyInput( rKEvt );
}
}
}
@@ -2788,7 +2736,7 @@ void SwContentTree::KeyInput(const KeyEvent& rEvent)
}
-void SwContentTree::RequestHelp( const HelpEvent& rHEvt )
+void SwContentTree::RequestHelp( const HelpEvent& rHEvt )
{
bool bCallBase = true;
if( rHEvt.GetMode() & HelpEventMode::QUICK )
@@ -2904,7 +2852,7 @@ void SwContentTree::RequestHelp( const HelpEvent& rHEvt )
Window::RequestHelp( rHEvt );
}
-void SwContentTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry )
+void SwContentTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry )
{
SvTreeListEntry* pFirst = FirstSelected();
switch( nSelectedPopupEntry )
@@ -3389,7 +3337,6 @@ void SwContentTree::GotoContent(SwContent* pCnt)
for( size_t i=0; i<nCount; ++i )
{
SdrObject* pTemp = pPage->GetObj(i);
- // #i51726# - all drawing objects can be named now
if (pTemp->GetName().equals(pCnt->GetName()))
{
SdrPageView* pPV = pDrawView->GetSdrPageView();
@@ -3494,26 +3441,10 @@ void SwContentLBoxString::Paint(const Point& rPos, SvTreeListBox& rDev, vcl::Ren
rRenderContext.DrawText(rPos, GetText());
rRenderContext.SetFont(aOldFont);
}
- // IA2 CWS. MT: Removed for now (also in SvLBoxEntry) - only used in Sw/Sd/ScContentLBoxString, they should decide if they need this
- /*
- else if (rEntry.IsMarked())
- {
- rDev.DrawText( rPos, GetText() );
- XubString str;
- str = XubString::CreateFromAscii("*");
- Point rPosStar(rPos.X()-6,rPos.Y());
- Font aOldFont( rDev.GetFont());
- Font aFont(aOldFont);
- Color aCol( aOldFont.GetColor() );
- aCol.DecreaseLuminance( 200 );
- aFont.SetColor( aCol );
- rDev.SetFont( aFont );
- rDev.DrawText( rPosStar, str);
- rDev.SetFont( aOldFont );
- }
- */
else
+ {
SvLBoxString::Paint(rPos, rDev, rRenderContext, pView, rEntry);
+ }
}
void SwContentTree::DataChanged(const DataChangedEvent& rDCEvt)
@@ -3526,6 +3457,7 @@ void SwContentTree::DataChanged(const DataChangedEvent& rDCEvt)
m_bIsImageListInitialized = false;
Display(true);
}
+
SvTreeListBox::DataChanged( rDCEvt );
}
diff --git a/sw/source/uibase/utlui/gloslst.cxx b/sw/source/uibase/utlui/gloslst.cxx
index 1bfd535c8965..c73884a637d2 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