More styling issues

This commit is contained in:
Felipe Polo-Wood 2013-12-30 13:19:50 -05:00
parent 1a83a0a557
commit b495c47a5a
8 changed files with 21 additions and 22 deletions

View File

@ -470,8 +470,7 @@ class ImpressDocument(PresentationDocument):
shape_type = shape.getShapeType()
if shape.supportsService("com.sun.star.drawing.Text"):
# if they requested title, make sure it is the title
if text_type!=TextType.Title or \
shape_type == "com.sun.star.presentation.TitleTextShape":
if text_type != TextType.Title or shape_type == "com.sun.star.presentation.TitleTextShape":
text += shape.getString() + '\n'
return text

View File

@ -27,7 +27,7 @@
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
###############################################################################
"""
This modul is for controlling powerpiont. PPT API documentation:
This module is for controlling powerpoint. PPT API documentation:
`http://msdn.microsoft.com/en-us/library/aa269321(office.10).aspx`_
"""
import os
@ -343,6 +343,7 @@ class PowerpointDocument(PresentationDocument):
self.save_titles_and_notes(titles, notes)
return
def _get_text_from_shapes(shapes):
"""
Returns any text extracted from the shapes on a presentation slide.
@ -381,4 +382,3 @@ if os.name == "nt":
def OnSlideShowOnPrevious(self, hwnd):
#print("SS GoBack")
return

View File

@ -27,8 +27,7 @@
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
###############################################################################
"""
These declarations have been extracted from the interface file created by
makepy
These declarations have been extracted from the interface file created by makepy
"""
class constants:
ppPlaceholderBody =2 # from enum PpPlaceholderType

View File

@ -170,7 +170,7 @@ class PptviewDocument(PresentationDocument):
with zip_file.open('ppt/presentation.xml') as pres:
tree = ElementTree.parse(pres)
nodes = tree.getroot().findall(".//p:sldIdLst/p:sldId", namespaces=namespaces)
print ("slide count: " + str(len(nodes)))
#print("slide count: " + str(len(nodes)))
# initialize the lists
titles = ['' for i in range(len(nodes))]
notes = ['' for i in range(len(nodes))]

View File

@ -247,8 +247,7 @@ class PresentationDocument(object):
``slide_no``
The slide an image is required for, starting at 1
"""
path = os.path.join(self.get_thumbnail_folder(),
self.controller.thumbnail_prefix + str(slide_no) + '.png')
path = os.path.join(self.get_thumbnail_folder(), self.controller.thumbnail_prefix + str(slide_no) + '.png')
if os.path.isfile(path) or not check_exists:
return path
else:
@ -478,6 +477,7 @@ class PresentationController(object):
plugin_manager = property(_get_plugin_manager)
class TextType(object):
"""
Type Enumeration for Types of Text to request

View File

@ -513,9 +513,9 @@ class HttpRouter(object):
if current_item.is_capable(ItemCapabilities.HasThumbnails):
# If the file is under our app directory tree send the
# portion after the match
dataPath = AppLocation.get_data_path()
if frame['image'][0:len(dataPath)] == dataPath:
item['img'] = urllib.request.pathname2url(frame['image'][len(dataPath):])
data_path = AppLocation.get_data_path()
if frame['image'][0:len(data_path)] == data_path:
item['img'] = urllib.request.pathname2url(frame['image'][len(data_path):])
item['text'] = str(frame['title'])
item['html'] = str(frame['title'])
item['selected'] = (self.live_controller.selected_row == index)

View File

@ -37,6 +37,7 @@ from openlp.plugins.presentations.lib.powerpointcontroller import \
TEST_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', 'resources'))
class TestLibModule(TestCase):
def setUp(self):