Kaydet (Commit) 69a4c662 authored tarafından Matteo Casalin's avatar Matteo Casalin

sal_uInt16 to sal_Int32

Change-Id: I19785cc516daf03aee8783a23399929785d30c5f
üst 7c7124a5
...@@ -163,7 +163,7 @@ TextNode::TextNode( const OUString& rText ) : ...@@ -163,7 +163,7 @@ TextNode::TextNode( const OUString& rText ) :
{ {
} }
void TextNode::ExpandAttribs( sal_uInt16 nIndex, sal_uInt16 nNew ) void TextNode::ExpandAttribs( sal_Int32 nIndex, sal_Int32 nNew )
{ {
if ( !nNew ) if ( !nNew )
return; return;
...@@ -227,13 +227,13 @@ void TextNode::ExpandAttribs( sal_uInt16 nIndex, sal_uInt16 nNew ) ...@@ -227,13 +227,13 @@ void TextNode::ExpandAttribs( sal_uInt16 nIndex, sal_uInt16 nNew )
maCharAttribs.ResortAttribs(); maCharAttribs.ResortAttribs();
} }
void TextNode::CollapsAttribs( sal_uInt16 nIndex, sal_uInt16 nDeleted ) void TextNode::CollapsAttribs( sal_Int32 nIndex, sal_Int32 nDeleted )
{ {
if ( !nDeleted ) if ( !nDeleted )
return; return;
bool bResort = false; bool bResort = false;
sal_uInt16 nEndChanges = nIndex+nDeleted; const sal_Int32 nEndChanges = nIndex+nDeleted;
for ( sal_uInt16 nAttr = 0; nAttr < maCharAttribs.Count(); nAttr++ ) for ( sal_uInt16 nAttr = 0; nAttr < maCharAttribs.Count(); nAttr++ )
{ {
...@@ -289,25 +289,25 @@ void TextNode::CollapsAttribs( sal_uInt16 nIndex, sal_uInt16 nDeleted ) ...@@ -289,25 +289,25 @@ void TextNode::CollapsAttribs( sal_uInt16 nIndex, sal_uInt16 nDeleted )
maCharAttribs.ResortAttribs(); maCharAttribs.ResortAttribs();
} }
void TextNode::InsertText( sal_uInt16 nPos, const OUString& rText ) void TextNode::InsertText( sal_Int32 nPos, const OUString& rText )
{ {
maText = maText.replaceAt( nPos, 0, rText ); maText = maText.replaceAt( nPos, 0, rText );
ExpandAttribs( nPos, rText.getLength() ); ExpandAttribs( nPos, rText.getLength() );
} }
void TextNode::InsertText( sal_uInt16 nPos, sal_Unicode c ) void TextNode::InsertText( sal_Int32 nPos, sal_Unicode c )
{ {
maText = maText.replaceAt( nPos, 0, OUString(c) ); maText = maText.replaceAt( nPos, 0, OUString(c) );
ExpandAttribs( nPos, 1 ); ExpandAttribs( nPos, 1 );
} }
void TextNode::RemoveText( sal_uInt16 nPos, sal_uInt16 nChars ) void TextNode::RemoveText( sal_Int32 nPos, sal_Int32 nChars )
{ {
maText = maText.replaceAt( nPos, nChars, "" ); maText = maText.replaceAt( nPos, nChars, "" );
CollapsAttribs( nPos, nChars ); CollapsAttribs( nPos, nChars );
} }
TextNode* TextNode::Split( sal_uInt16 nPos, bool bKeepEndingAttribs ) TextNode* TextNode::Split( sal_Int32 nPos, bool bKeepEndingAttribs )
{ {
OUString aNewText; OUString aNewText;
if ( nPos < maText.getLength() ) if ( nPos < maText.getLength() )
......
...@@ -69,8 +69,8 @@ private: ...@@ -69,8 +69,8 @@ private:
TextNode( const TextNode& ) {;} TextNode( const TextNode& ) {;}
protected: protected:
void ExpandAttribs( sal_uInt16 nIndex, sal_uInt16 nNewChars ); void ExpandAttribs( sal_Int32 nIndex, sal_Int32 nNewChars );
void CollapsAttribs( sal_uInt16 nIndex, sal_uInt16 nDelChars ); void CollapsAttribs( sal_Int32 nIndex, sal_Int32 nDelChars );
public: public:
TextNode( const OUString& rText ); TextNode( const OUString& rText );
...@@ -81,11 +81,11 @@ public: ...@@ -81,11 +81,11 @@ public:
const TextCharAttribList& GetCharAttribs() const { return maCharAttribs; } const TextCharAttribList& GetCharAttribs() const { return maCharAttribs; }
TextCharAttribList& GetCharAttribs() { return maCharAttribs; } TextCharAttribList& GetCharAttribs() { return maCharAttribs; }
void InsertText( sal_uInt16 nPos, const OUString& rText ); void InsertText( sal_Int32 nPos, const OUString& rText );
void InsertText( sal_uInt16 nPos, sal_Unicode c ); void InsertText( sal_Int32 nPos, sal_Unicode c );
void RemoveText( sal_uInt16 nPos, sal_uInt16 nChars ); void RemoveText( sal_Int32 nPos, sal_Int32 nChars );
TextNode* Split( sal_uInt16 nPos, bool bKeepEndigAttribs ); TextNode* Split( sal_Int32 nPos, bool bKeepEndigAttribs );
void Append( const TextNode& rNode ); void Append( const TextNode& rNode );
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment