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 /sw/source/filter/ww8/ww8par3.cxx | |
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>
Diffstat (limited to 'sw/source/filter/ww8/ww8par3.cxx')
-rw-r--r-- | sw/source/filter/ww8/ww8par3.cxx | 36 |
1 files changed, 18 insertions, 18 deletions
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()); |