[Libreoffice-commits] .: Branch 'feature/gsoc2011_wizards' - wizards/com
Xisco Fauli
xfauli at kemper.freedesktop.org
Mon Jul 25 12:37:16 PDT 2011
wizards/com/sun/star/wizards/common/Helper.py | 30 +-------------------------
1 file changed, 2 insertions(+), 28 deletions(-)
New commits:
commit 0853909e506928782e6958b681734aa599c926aa
Author: Xisco Fauli <anistenis at gmail.com>
Date: Mon Jul 25 21:36:52 2011 +0200
Remove unused method
diff --git a/wizards/com/sun/star/wizards/common/Helper.py b/wizards/com/sun/star/wizards/common/Helper.py
index 83c34fb..fa0793a 100644
--- a/wizards/com/sun/star/wizards/common/Helper.py
+++ b/wizards/com/sun/star/wizards/common/Helper.py
@@ -6,14 +6,6 @@ from NumberFormatter import NumberFormatter
class Helper(object):
- def convertUnoDatetoInteger(self, DateValue):
- oCal = java.util.Calendar.getInstance()
- oCal.set(DateValue.Year, DateValue.Month, DateValue.Day)
- dTime = oCal.getTime()
- lTime = dTime.getTime()
- lDate = lTime / (3600 * 24000)
- return lDate
-
@classmethod
def setUnoPropertyValue(self, xPSet, PropertyName, PropertyValue):
try:
@@ -28,10 +20,10 @@ class Helper(object):
@classmethod
def getUnoObjectbyName(self, xName, ElementName):
try:
- if xName.hasByName(ElementName) == True:
+ if xName.hasByName(ElementName):
return xName.getByName(ElementName)
else:
- raise RuntimeException();
+ raise RuntimeException()
except Exception, exception:
traceback.print_exc()
@@ -47,24 +39,6 @@ class Helper(object):
raise RuntimeException()
@classmethod
- def getPropertyValuefromAny(self, CurPropertyValue, PropertyName):
- try:
- if CurPropertyValue is not None:
- MaxCount = len(CurPropertyValue)
- i = 0
- while i < MaxCount:
- if CurPropertyValue[i] is not None:
- aValue = CurPropertyValue[i]
- if aValue is not None and aValue.Name == PropertyName:
- return aValue.Value
-
- i += 1
- return None
- except Exception, exception:
- traceback.print_exc()
- return None
-
- @classmethod
def getUnoPropertyValue(self, xPSet, PropertyName):
try:
if xPSet is not None:
More information about the Libreoffice-commits
mailing list