Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
kovidgoyal committed Sep 24, 2013
1 parent 4518d78 commit dc18dbd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/calibre/ebooks/docx/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@

class Settings(object):

def __init__(self, root):
def __init__(self):
self.default_tab_stop = 720 / 20

def __call__(self, root):
for dts in XPath('//w:defaultTabStop[@w:val]')(root):
try:
self.default_tab_stop = int(get(dts, 'w:val')) / 20
Expand Down
3 changes: 2 additions & 1 deletion src/calibre/ebooks/docx/to_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def __init__(self, path_or_stream, dest_dir=None, log=None, detect_cover=True, n
self.mi = self.docx.metadata
self.body = BODY()
self.theme = Theme()
self.settings = Settings()
self.tables = Tables()
self.fields = Fields()
self.styles = Styles(self.tables)
Expand Down Expand Up @@ -267,7 +268,7 @@ def get_name(rtype, defname):
except KeyError:
self.log.warn('Settings %s do not exist' % sename)
else:
self.settings = Settings(fromstring(seraw))
self.settings(fromstring(seraw))

if foname is not None:
try:
Expand Down

0 comments on commit dc18dbd

Please sign in to comment.