Browse Source

Review changes cf. Adam: change name of local vars to not start

with 'f' prefix (used for fields in objects).
Also removed trailing space from lines that irritate Git difference listings.
tickets/20/20/1
rarified 3 years ago
parent
commit
8fa0369486
  1. 20
      Sources/Plasma/FeatureLib/pfJournalBook/pfJournalBook.cpp

20
Sources/Plasma/FeatureLib/pfJournalBook/pfJournalBook.cpp

@ -2668,14 +2668,14 @@ void pfJournalBook::IRenderPage( UInt32 page, UInt32 whichDTMap, hsBool suppress
width = (UInt16)(512 - fPageLMargin - fPageRMargin);
height = (UInt16)(512 - fPageBMargin - y);
UInt32 lastChar;
const wchar_t *fTextStr; // initialize later to avoid compile errors inside case block
int fTextStrLen;
fTextStr = chunk->fText.c_str();
fTextStrLen = chunk->fText.length();
dtMap->CalcWrappedStringSize( fTextStr, &width, &height, &lastChar, &ascent, &lastX, &lastY );
const wchar_t *chunkTextStr; // initialize later to avoid compile errors inside case block
int chunkTextStrLen;
chunkTextStr = chunk->fText.c_str();
chunkTextStrLen = chunk->fText.length();
dtMap->CalcWrappedStringSize( chunkTextStr, &width, &height, &lastChar, &ascent, &lastX, &lastY );
width = (UInt16)(512 - fPageLMargin - fPageRMargin);
if( !suppressRendering )
dtMap->DrawWrappedString( (UInt16)fPageLMargin, y, fTextStr, width, (UInt16)(512 - fPageBMargin - y), &lastX, &lastY );
dtMap->DrawWrappedString( (UInt16)fPageLMargin, y, chunkTextStr, width, (UInt16)(512 - fPageBMargin - y), &lastX, &lastY );
if( lastChar == 0 )
{
@ -2686,16 +2686,16 @@ void pfJournalBook::IRenderPage( UInt32 page, UInt32 whichDTMap, hsBool suppress
idx--;
break;
}
if( fTextStr[ lastChar ] != L'\0' )
if( chunkTextStr[ lastChar ] != L'\0' )
{
// Didn't get to render the whole paragraph in this go, so we're going to cheat
// and split the paragraph up into two so that we can handle it properly. Note:
// this changes the chunk array beyond this point, so we need to invalidate the
// cache, but that's ok 'cause if we're doing this, it's probably invalid (or empty)
// anyway
wchar_t *s = TRACKED_NEW wchar_t[fTextStrLen+1];
wcscpy(s,fTextStr);
s[fTextStrLen] = L'\0';
wchar_t *s = TRACKED_NEW wchar_t[chunkTextStrLen+1];
wcscpy(s,chunkTextStr);
s[chunkTextStrLen] = L'\0';
// Note: Makes a copy of the string
pfEsHTMLChunk *c2 = TRACKED_NEW pfEsHTMLChunk( &s[ lastChar ] );

Loading…
Cancel
Save