[Libreoffice-commits] .: Branch 'feature/gsoc2011_wizards' - wizards/com
Xisco Fauli
xfauli at kemper.freedesktop.org
Tue Jul 12 09:33:43 PDT 2011
wizards/com/sun/star/wizards/text/TextFieldHandler.py | 38 +++---------------
1 file changed, 7 insertions(+), 31 deletions(-)
New commits:
commit a96749b3b54007a77863e2946251e154d393cc12
Author: Xisco Fauli <anistenis at gmail.com>
Date: Tue Jul 12 18:33:10 2011 +0200
method unused
diff --git a/wizards/com/sun/star/wizards/text/TextFieldHandler.py b/wizards/com/sun/star/wizards/text/TextFieldHandler.py
index 97d578d..80e1abd 100644
--- a/wizards/com/sun/star/wizards/text/TextFieldHandler.py
+++ b/wizards/com/sun/star/wizards/text/TextFieldHandler.py
@@ -89,32 +89,24 @@ class TextFieldHandler(object):
traceback.print_exc()
def __getTextFieldsByProperty(
- self, _PropertyName, _aPropertyValue, _TypeName):
+ self, _PropertyName, _aPropertyValue):
try:
xProperty = TextFieldHandler.dictTextFields[_aPropertyValue]
xPropertySet = xProperty.TextFieldMaster
if xPropertySet.PropertySetInfo.hasPropertyByName(
_PropertyName):
oValue = xPropertySet.getPropertyValue(_PropertyName)
- if _TypeName == "String":
- sValue = unicodedata.normalize(
- 'NFKD', oValue).encode('ascii','ignore')
- if sValue == _aPropertyValue:
- return xProperty
- #COMMENTED
- '''elif AnyConverter.isShort(oValue):
- if _TypeName.equals("Short"):
- iShortParam = (_aPropertyValue).shortValue()
- ishortValue = AnyConverter.toShort(oValue)
- if ishortValue == iShortParam:
- xDependentVector.append(oTextField) '''
+ sValue = unicodedata.normalize(
+ 'NFKD', oValue).encode('ascii','ignore')
+ if sValue == _aPropertyValue:
+ return xProperty
return None
except KeyError, e:
return None
def changeUserFieldContent(self, _FieldName, _FieldContent):
DependentTextFields = self.__getTextFieldsByProperty(
- PropertyNames.PROPERTY_NAME, _FieldName, "String")
+ PropertyNames.PROPERTY_NAME, _FieldName)
if DependentTextFields is not None:
DependentTextFields.TextFieldMaster.setPropertyValue("Content", _FieldContent)
self.refreshTextFields()
@@ -163,7 +155,7 @@ class TextFieldHandler(object):
def removeUserFieldByContent(self, _FieldContent):
try:
xDependentTextFields = self.__getTextFieldsByProperty(
- "Content", _FieldContent, "String")
+ "Content", _FieldContent)
if xDependentTextFields != None:
i = 0
while i < xDependentTextFields.length:
@@ -172,19 +164,3 @@ class TextFieldHandler(object):
except Exception, e:
traceback.print_exc()
-
- def changeExtendedUserFieldContent(self, UserDataPart, _FieldContent):
- try:
- xDependentTextFields = self.__getTextFieldsByProperty(
- "UserDataType", UserDataPart, "Short")
- if xDependentTextFields != None:
- i = 0
- while i < xDependentTextFields.length:
- xDependentTextFields[i].getTextFieldMaster().setPropertyValue(
- "Content", _FieldContent)
- i += 1
-
- self.refreshTextFields()
- except Exception, e:
- traceback.print_exc()
-
More information about the Libreoffice-commits
mailing list