mod: code cleanup for readers

closes #26
This commit is contained in:
Qingping Hou
2012-03-05 09:58:19 +08:00
parent b318ca08e3
commit 50d5604c79
3 changed files with 34 additions and 72 deletions

View File

@@ -14,13 +14,5 @@ end
-- open a PDF file and its settings store
function PDFReader:open(filename, password)
self.doc = pdf.openDocument(filename, password or "")
if self.doc ~= nil then
self.settings = DocSettings:open(filename)
local gamma = self.settings:readsetting("gamma")
if gamma then
self.globalgamma = gamma
end
return true
end
return false
return self:loadSettings(filename)
end