diff options
author | Noel <noelgrandin@gmail.com> | 2020-09-30 09:38:25 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-09-30 12:32:18 +0200 |
commit | 9373320fc88c1582a2ad25bda9c5264c7c58a97e (patch) | |
tree | ee2df8944d7af2080498b991ed46429e0a020947 /sw/source/core/unocore | |
parent | 37b81dd54a915223780a6b5efa54ce45db332604 (diff) |
loplugin:reducevarscope in sw
Change-Id: Ifed7220c6acf7049b2985f1911a806b37a54d794
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103646
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core/unocore')
-rw-r--r-- | sw/source/core/unocore/unochart.cxx | 3 | ||||
-rw-r--r-- | sw/source/core/unocore/unoframe.cxx | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx index 42c4b9876c53..666ed4a3dd57 100644 --- a/sw/source/core/unocore/unochart.cxx +++ b/sw/source/core/unocore/unochart.cxx @@ -279,14 +279,13 @@ static bool GetTableAndCellsFromRangeRep( // parse range representation for table name and cell/range names // accepted format sth like: "Table1.A2:C5" , "Table2.A2.1:B3.2" OUString aTableName; // table name - OUString aRange; // cell range OUString aStartCell; // name of top left cell OUString aEndCell; // name of bottom right cell sal_Int32 nIdx = rRangeRepresentation.indexOf( '.' ); if (nIdx >= 0) { aTableName = rRangeRepresentation.copy( 0, nIdx ); - aRange = rRangeRepresentation.copy( nIdx + 1 ); + OUString aRange = rRangeRepresentation.copy( nIdx + 1 ); // cell range sal_Int32 nPos = aRange.indexOf( ':' ); if (nPos >= 0) // a cell-range like "Table1.A2:D4" { diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index 5c7bffdc8663..e8461393ea6f 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -2462,7 +2462,6 @@ void SwXFrame::setPropertyToDefault( const OUString& rPropertyName ) if ( pEntry->nFlags & beans::PropertyAttribute::READONLY) throw uno::RuntimeException("setPropertyToDefault: property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); - bool bNextFrame; if(OWN_ATTR_FILLBMP_MODE == pEntry->nWID) { SwDoc* pDoc = pFormat->GetDoc(); @@ -2521,7 +2520,7 @@ void SwXFrame::setPropertyToDefault( const OUString& rPropertyName ) } else { - bNextFrame = rPropertyName == UNO_NAME_CHAIN_NEXT_NAME; + bool bNextFrame = rPropertyName == UNO_NAME_CHAIN_NEXT_NAME; if( bNextFrame || rPropertyName == UNO_NAME_CHAIN_PREV_NAME ) { SwDoc* pDoc = pFormat->GetDoc(); |