diff --git a/source/diff.py b/source/diff.py index 3cbca4c..023080e 100644 --- a/source/diff.py +++ b/source/diff.py @@ -33,17 +33,9 @@ class LOWriter(LODocument): chart.doc = self return chart - def insert_content(self, cursor, data, replace=False): - self.text.insertTextContent(cursor, data, replace) - return - # ~ f = doc.createInstance('com.sun.star.text.TextFrame') # ~ f.setSize(Size(10000, 500)) - def select(self, text): - self._cc.select(text) - return - def search(self, options): descriptor = self.obj.createSearchDescriptor() descriptor.setSearchString(options.get('Search', '')) diff --git a/source/easymacro2.py b/source/easymacro2.py index 45ee6f6..5c08860 100644 --- a/source/easymacro2.py +++ b/source/easymacro2.py @@ -2909,11 +2909,17 @@ class LOWriter(LODocument): def goto_start(self): self.view_cursor.gotoStart(False) - return cursor + return def goto_end(self): self.view_cursor.gotoEnd(False) - return cursor + return + + def select(self, text): + if hasattr(text, 'obj'): + text = text.obj + self._cc.select(text) + return class LOShape(LOBaseObject):