| 2153 | |
| 2154 | #if BUILD_LITE!=1 |
| 2155 | lUInt32 ldomDataStorageManager::allocText( lUInt32 dataIndex, lUInt32 parentIndex, const lString8 & text ) |
| 2156 | { |
| 2157 | if ( !_activeChunk ) { |
| 2158 | _activeChunk = new ldomTextStorageChunk(this, _chunks.length()); |
| 2159 | _chunks.add( _activeChunk ); |
| 2160 | getChunk( (_chunks.length()-1)<<16 ); |
| 2161 | compact( 0 ); |
| 2162 | } |
| 2163 | int offset = _activeChunk->addText( dataIndex, parentIndex, text ); |
| 2164 | if ( offset<0 ) { |
| 2165 | // no space in current chunk, add one more chunk |
| 2166 | //_activeChunk->compact(); |
| 2167 | _activeChunk = new ldomTextStorageChunk(this, _chunks.length()); |
| 2168 | _chunks.add( _activeChunk ); |
| 2169 | getChunk( (_chunks.length()-1)<<16 ); |
| 2170 | compact( 0 ); |
| 2171 | offset = _activeChunk->addText( dataIndex, parentIndex, text ); |
| 2172 | if ( offset<0 ) |
| 2173 | crFatalError(1001, "Unexpected error while allocation of text"); |
| 2174 | } |
| 2175 | return offset | (_activeChunk->getIndex()<<16); |
| 2176 | } |
| 2177 | |
| 2178 | lUInt32 ldomDataStorageManager::allocElem( lUInt32 dataIndex, lUInt32 parentIndex, int childCount, int attrCount ) |
| 2179 | { |
no test coverage detected