projects
/
platform
/
core
/
uifw
/
dali-toolkit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix Klocwork issues.
[platform/core/uifw/dali-toolkit.git]
/
dali-toolkit
/
internal
/
text
/
bidirectional-support.cpp
diff --git
a/dali-toolkit/internal/text/bidirectional-support.cpp
b/dali-toolkit/internal/text/bidirectional-support.cpp
index
c982018
..
aff18be
100644
(file)
--- a/
dali-toolkit/internal/text/bidirectional-support.cpp
+++ b/
dali-toolkit/internal/text/bidirectional-support.cpp
@@
-20,7
+20,7
@@
// EXTERNAL INCLUDES
#include <memory.h>
// EXTERNAL INCLUDES
#include <memory.h>
-#include <dali/
public
-api/text-abstraction/bidirectional-support.h>
+#include <dali/
devel
-api/text-abstraction/bidirectional-support.h>
namespace Dali
{
namespace Dali
{
@@
-162,15
+162,8
@@
void SetBidirectionalInfo( const Vector<Character>& text,
}
}
}
}
-void ReplaceBidirectionalInfo( LogicalModel& model,
- CharacterIndex characterIndex,
- Length numberOfCharactersToRemove,
- Length numberOfCharactersToInsert )
-{
-}
-
void ReorderLines( const Vector<BidirectionalParagraphInfoRun>& bidirectionalInfo,
void ReorderLines( const Vector<BidirectionalParagraphInfoRun>& bidirectionalInfo,
-
const
Vector<LineRun>& lineRuns,
+ Vector<LineRun>& lineRuns,
Vector<BidirectionalLineInfoRun>& lineInfoRuns )
{
// Handle to the bidirectional info module in text-abstraction.
Vector<BidirectionalLineInfoRun>& lineInfoRuns )
{
// Handle to the bidirectional info module in text-abstraction.
@@
-202,12
+195,15
@@
void ReorderLines( const Vector<BidirectionalParagraphInfoRun>& bidirectionalInf
lineIndex = firstLine + numberOfLines;
// Traverse the lines and reorder them
lineIndex = firstLine + numberOfLines;
// Traverse the lines and reorder them
- for( Vector<LineRun>::
Const
Iterator lineIt = lineRuns.Begin() + firstLine,
+ for( Vector<LineRun>::Iterator lineIt = lineRuns.Begin() + firstLine,
endLineIt = lineRuns.Begin() + firstLine + numberOfLines;
lineIt != endLineIt;
++lineIt )
{
endLineIt = lineRuns.Begin() + firstLine + numberOfLines;
lineIt != endLineIt;
++lineIt )
{
- const LineRun& line = *lineIt;
+ LineRun& line = *lineIt;
+
+ // Sets the paragraph's direction.
+ line.direction = direction;
// Creates a bidirectional info for the line run.
BidirectionalLineInfoRun lineInfoRun;
// Creates a bidirectional info for the line run.
BidirectionalLineInfoRun lineInfoRun;
@@
-219,11
+215,14
@@
void ReorderLines( const Vector<BidirectionalParagraphInfoRun>& bidirectionalInf
// The memory is freed after the visual to logical to visual conversion tables are built in the logical model.
lineInfoRun.visualToLogicalMap = reinterpret_cast<CharacterIndex*>( malloc( line.characterRun.numberOfCharacters * sizeof( CharacterIndex ) ) );
// The memory is freed after the visual to logical to visual conversion tables are built in the logical model.
lineInfoRun.visualToLogicalMap = reinterpret_cast<CharacterIndex*>( malloc( line.characterRun.numberOfCharacters * sizeof( CharacterIndex ) ) );
- // Reorders the line.
- bidirectionalSupport.Reorder( paragraphInfo.bidirectionalInfoIndex,
- line.characterRun.characterIndex - paragraphInfo.characterRun.characterIndex,
- line.characterRun.numberOfCharacters,
- lineInfoRun.visualToLogicalMap );
+ if( NULL != lineInfoRun.visualToLogicalMap )
+ {
+ // Reorders the line.
+ bidirectionalSupport.Reorder( paragraphInfo.bidirectionalInfoIndex,
+ line.characterRun.characterIndex - paragraphInfo.characterRun.characterIndex,
+ line.characterRun.numberOfCharacters,
+ lineInfoRun.visualToLogicalMap );
+ }
// Push the run into the vector.
lineInfoRuns.PushBack( lineInfoRun );
// Push the run into the vector.
lineInfoRuns.PushBack( lineInfoRun );
@@
-231,14
+230,6
@@
void ReorderLines( const Vector<BidirectionalParagraphInfoRun>& bidirectionalInf
}
}
}
}
-void ReorderLines( LogicalModel& logicalModel,
- const VisualModel& visualModel,
- CharacterIndex characterIndex,
- Length numberOfCharactersToRemove,
- Length numberOfCharactersToInsert )
-{
-}
-
bool GetMirroredText( const Vector<Character>& text,
Vector<Character>& mirroredText )
{
bool GetMirroredText( const Vector<Character>& text,
Vector<Character>& mirroredText )
{