diff options
author | Xisco Fauli <anistenis@gmail.com> | 2012-10-21 21:55:55 +0200 |
---|---|---|
committer | xisco <xisco@xisco-laptop.(none)> | 2012-10-23 01:13:18 +0200 |
commit | 62423956c33dec9dab66971eafee6df4e7212dd9 (patch) | |
tree | d8a51b0b9224698754ed64a2ce7a91a8f698c42e | |
parent | ce6995cee86988a8a3c43b845845d5b2723ef14a (diff) |
pywizards: unused method
Change-Id: I2664413d974c1e6a8b84d1807ffe982008e5aae9
-rw-r--r-- | wizards/com/sun/star/wizards/text/TextDocument.py | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/wizards/com/sun/star/wizards/text/TextDocument.py b/wizards/com/sun/star/wizards/text/TextDocument.py index 6570aa4387f6..df0de967f971 100644 --- a/wizards/com/sun/star/wizards/text/TextDocument.py +++ b/wizards/com/sun/star/wizards/text/TextDocument.py @@ -172,38 +172,6 @@ class TextDocument(object): xTextCursor = oCursorContainer.createTextCursor() return xTextCursor - # Todo: This method is unsecure because the last index is not necessarily the last section - # Todo: This Routine should be modified, because I cannot rely on the last Table in the document to be the last in the TextTables sequence - # to make it really safe you must acquire the Tablenames before the insertion and after the insertion of the new Table. By comparing the - # two sequences of tablenames you can find out the tablename of the last inserted Table - # Todo: This method is unsecure because the last index is not necessarily the last section - - def getCharWidth(self, ScaleString): - iScale = 200 - TextDocument.xTextDocument.lockControllers() - iScaleLen = ScaleString.length() - xTextCursor = createTextCursor(TextDocument.xTextDocument.Text) - xTextCursor.gotoStart(False) - com.sun.star.wizards.common.Helper.setUnoPropertyValue( - xTextCursor, "PageDescName", "First Page") - xTextCursor.String = ScaleString - xViewCursor = TextDocument.xTextDocument.CurrentController - xTextViewCursor = xViewCursor.ViewCursor - xTextViewCursor.gotoStart(False) - iFirstPos = xTextViewCursor.Position.X - xTextViewCursor.gotoEnd(False) - iLastPos = xTextViewCursor.Position.X - iScale = (iLastPos - iFirstPos) / iScaleLen - xTextCursor.gotoStart(False) - xTextCursor.gotoEnd(True) - xTextCursor.String = "" - unlockallControllers() - return iScale - - def unlockallControllers(self): - while TextDocument.xTextDocument.hasControllersLocked(): - TextDocument.xTextDocument.unlockControllers() - def refresh(self): TextDocument.xTextDocument.refresh() |