diff options
author | Noel Grandin <noel@peralex.com> | 2016-04-20 10:34:01 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-04-21 08:32:47 +0200 |
commit | 5abc669599001bf888b97c4d3c2715e1fb7523b9 (patch) | |
tree | 2407c6fc040a795e6ffc69de02ba940285c04c7f /sfx2/source/doc/doctempl.cxx | |
parent | 5bb308a9ad16f6002486a60e4a753693818580b6 (diff) |
new plugin stylepolice
check for local variables which follow our member field naming
convention, which is highly confusing
Change-Id: Idacedf7145d09843e96a584237b385f7662eea10
Diffstat (limited to 'sfx2/source/doc/doctempl.cxx')
-rw-r--r-- | sfx2/source/doc/doctempl.cxx | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx index 50cdd58003a0..2ca537f04433 100644 --- a/sfx2/source/doc/doctempl.cxx +++ b/sfx2/source/doc/doctempl.cxx @@ -296,7 +296,7 @@ OUString SfxDocumentTemplates::GetFullRegionName } -const OUString& SfxDocumentTemplates::GetRegionName +OUString SfxDocumentTemplates::GetRegionName ( sal_uInt16 nIdx // vcl::Region Index ) const @@ -311,7 +311,7 @@ const OUString& SfxDocumentTemplates::GetRegionName */ { - static OUString maTmpString; + OUString aTmpString; DocTemplLocker_Impl aLocker( *pImp ); @@ -320,14 +320,10 @@ const OUString& SfxDocumentTemplates::GetRegionName RegionData_Impl *pData = pImp->GetRegion( nIdx ); if ( pData ) - maTmpString = pData->GetTitle(); - else - maTmpString.clear(); + aTmpString = pData->GetTitle(); } - else - maTmpString.clear(); - return maTmpString; + return aTmpString; } @@ -383,7 +379,7 @@ sal_uInt16 SfxDocumentTemplates::GetCount } -const OUString& SfxDocumentTemplates::GetName +OUString SfxDocumentTemplates::GetName ( sal_uInt16 nRegion, // vcl::Region Index, in which the entry lies sal_uInt16 nIdx // Index of the entry @@ -401,7 +397,7 @@ const OUString& SfxDocumentTemplates::GetName { DocTemplLocker_Impl aLocker( *pImp ); - static OUString maTmpString; + OUString aTmpString; if ( pImp->Construct() ) { @@ -412,14 +408,10 @@ const OUString& SfxDocumentTemplates::GetName pEntry = pRegion->GetEntry( nIdx ); if ( pEntry ) - maTmpString = pEntry->GetTitle(); - else - maTmpString.clear(); + aTmpString = pEntry->GetTitle(); } - else - maTmpString.clear(); - return maTmpString; + return aTmpString; } |