src/Generic/reader/RegionDocumentSplitter.cpp
// Group the split regions as they fit (there may just be one)

Group the split regions as they fit (there may just be one)
Group the split regions as they fit ( there may just be one )
BOOST_FOREACH(RegionSource region, splitRegions) {
			int regionSize = region.first->getEndEDTOffset().value() - region.first->getStartEDTOffset().value();
			if (regionGroupSize > 0 && regionGroupSize + regionSize > _max_document_chars) {
				regionGroups.push_back(std::vector<RegionSource>(regionGroup));
				regionGroup.clear();
				regionGroupSize = 0;
			}
			regionGroup.push_back(region);
			regionGroupSize += regionSize;
		}
BOOST_FOREACH ( RegionSource region , splitRegions ) { int regionSize = region . first -> getEndEDTOffset ( ) . value ( ) - region . first -> getStartEDTOffset ( ) . value ( ) ; if ( regionGroupSize > 0 && regionGroupSize + regionSize > _max_document_chars ) { regionGroups . push_back ( std :: vector < RegionSource > ( regionGroup ) ) ; regionGroup . clear ( ) ; regionGroupSize = 0 ; } regionGroup . push_back ( region ) ; regionGroupSize += regionSize ; }
Group the split regions as they fit (there may just be one)
Group the split regions as they fit ( there may just be one )
// The current region would put this split document beyond the limit, so store the current grouping
 // Add this region to the current split document grouping
