@@ -807,8 +807,10 @@ Glib::ustring HOCRDocument::displayRoleForItem(const HOCRItem* item) const {
807807		return  _ (" Textline"  );
808808	} else  if  (itemClass == " ocrx_word"  ) {
809809		return  item->text ();
810- 	} else  if  (itemClass == " ocr_graphic"  ) {
810+ 	} else  if  (itemClass == " ocr_graphic"  || itemClass ==  " ocr_photo "  ) {
811811		return  _ (" Graphic"  );
812+ 	} else  if  (itemClass == " ocr_separator"  ) {
813+ 		return  _ (" Separator"  );
812814	}
813815	return  Glib::ustring ();
814816}
@@ -825,8 +827,10 @@ Glib::RefPtr<Gdk::Pixbuf> HOCRDocument::decorationRoleForItem(const HOCRItem* it
825827		return  Gdk::Pixbuf::create_from_resource (" /org/gnome/gimagereader/item_line.png"  );
826828	} else  if  (itemClass == " ocrx_word"  ) {
827829		return  Gdk::Pixbuf::create_from_resource (" /org/gnome/gimagereader/item_word.png"  );
828- 	} else  if  (itemClass == " ocr_graphic"  ) {
830+ 	} else  if  (itemClass == " ocr_graphic"  || itemClass ==  " ocr_photo "  ) {
829831		return  Gdk::Pixbuf::create_from_resource (" /org/gnome/gimagereader/item_halftone.png"  );
832+ 	} else  if  (itemClass == " ocr_separator"  ) {
833+ 		return  Gdk::Pixbuf::create_from_resource (" /org/gnome/gimagereader/item_separator.png"  );
830834	}
831835	auto  pixbuf = Gdk::Pixbuf::create (Gdk::COLORSPACE_RGB, false , 8 , 16 , 16 );
832836	pixbuf->fill (255 );
@@ -1097,7 +1101,7 @@ void HOCRItem::setAttribute(const Glib::ustring& name, const Glib::ustring& valu
10971101Glib::ustring HOCRItem::toHtml (int  indent) const  {
10981102	Glib::ustring cls = itemClass ();
10991103	Glib::ustring tag;
1100- 	if  (cls == " ocr_page"   || cls == " ocr_carea"   || cls == " ocr_graphic"  ) {
1104+ 	if  (cls == " ocr_page"   || cls == " ocr_carea"   || cls == " ocr_graphic"  || cls ==  " ocr_photo "  || cls ==  " ocr_separator "  ) {
11011105		tag = " div"  ;
11021106	} else  if  (cls == " ocr_par"  ) {
11031107		tag = " p"  ;
@@ -1221,7 +1225,10 @@ HOCRPage::HOCRPage(const xmlpp::Element* element, int pageId, const Glib::ustrin
12211225				delete  m_childItems.back ();
12221226				m_childItems.pop_back ();
12231227			} else  {
1224- 				item->setAttribute (" itemClass"  , " ocr_graphic"  );
1228+ 				Glib::ustring itemClass = item->itemClass ();
1229+ 				if  (itemClass != " ocr_graphic"   && itemClass != " ocr_photo"   && itemClass != " ocr_separator"  ) {
1230+ 					item->setAttribute (" itemClass"  , " ocr_graphic"  );
1231+ 				}
12251232				std::for_each (item->m_childItems .begin (), item->m_childItems .end (), [](HOCRItem * item) {
12261233					delete  item;
12271234				});
0 commit comments