Changeset 296 in main


Ignore:
Timestamp:
09/16/11 14:37:04 (8 years ago)
Author:
pcosquer
Message:

fix odfhandler

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/openPLM/plmapp/filehandlers/odfhandler.py

    r261 r296  
    3030from odf.meta import DocumentStatistic 
    3131from odf.style import PageLayoutProperties 
     32from odf.namespaces import FONS, METANS 
    3233 
    3334 
     
    5152            stat = doc.getElementsByType(DocumentStatistic)[0] 
    5253            page = doc.getElementsByType(PageLayoutProperties)[0] 
    53             self.nb_pages = int(stat.attributes["meta:page-count"]) 
    54             w = page.attributes['fo:page-width'] 
    55             h = page.attributes['fo:page-height'] 
     54            self.nb_pages = int(stat.getAttrNS(METANS, "page-count")) 
     55            w = page.getAttrNS(FONS, 'page-width') 
     56            h = page.getAttrNS(FONS, 'page-height') 
    5657            self.format = size_to_format(w, h) 
    5758            self._set_valid() 
Note: See TracChangeset for help on using the changeset viewer.