summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorƁukasz Hryniuk <lukasz.hryniuk@wp.pl>2015-01-04 22:50:05 +0100
committerNoel Grandin <noelgrandin@gmail.com>2015-01-07 06:47:04 +0000
commit9fd89a5952a48b473cee03a2681eb5d4cd6d1742 (patch)
tree1fbf98ba46e86989826adf5d559f51c82d59a5e5 /editeng
parenta527ad98e58a7fc9af482f9088687d82e5c52cca (diff)
fdo#39440 reduce scope of local variables
Beside scope changes, it fixes lack of initialization in a few places. Change-Id: Ia09fdb9845d8ac17256330a5ec5168401c84f0f2 Reviewed-on: https://gerrit.libreoffice.org/13755 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/rtf/svxrtf.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/editeng/source/rtf/svxrtf.cxx b/editeng/source/rtf/svxrtf.cxx
index 6e76371de495..3cf999685674 100644
--- a/editeng/source/rtf/svxrtf.cxx
+++ b/editeng/source/rtf/svxrtf.cxx
@@ -454,12 +454,12 @@ void SvxRTFParser::ReadColorTable()
void SvxRTFParser::ReadFontTable()
{
- int nToken;
+ int nToken = 0;
int _nOpenBrakets = 1; // the first was already detected earlier!!
vcl::Font* pFont = new vcl::Font();
short nFontNo(0), nInsFontNo (0);
OUString sAltNm, sFntNm;
- bool bIsAltFntNm = false, bCheckNewFont;
+ bool bIsAltFntNm = false;
rtl_TextEncoding nSystemChar = lcl_GetDefaultTextEncodingForRTF();
pFont->SetCharSet( nSystemChar );
@@ -467,7 +467,7 @@ void SvxRTFParser::ReadFontTable()
while( _nOpenBrakets && IsParserWorking() )
{
- bCheckNewFont = false;
+ bool bCheckNewFont = false;
switch( ( nToken = GetNextToken() ))
{
case '}':
@@ -601,7 +601,7 @@ void SvxRTFParser::ReadOLEData()
OUString& SvxRTFParser::GetTextToEndGroup( OUString& rStr )
{
rStr.clear();
- int _nOpenBrakets = 1, nToken; // the first was already detected earlier!!
+ int _nOpenBrakets = 1, nToken = 0; // the first was already detected earlier!!
while( _nOpenBrakets && IsParserWorking() )
{
@@ -661,7 +661,7 @@ util::DateTime SvxRTFParser::GetDateTimeStamp( )
void SvxRTFParser::ReadInfo( const sal_Char* pChkForVerNo )
{
- int _nOpenBrakets = 1, nToken; // the first was already detected earlier!!
+ int _nOpenBrakets = 1, nToken = 0; // the first was already detected earlier!!
DBG_ASSERT(m_xDocProps.is(),
"SvxRTFParser::ReadInfo: no DocumentProperties");
OUString sStr, sComment;