From acf0ae3fdec65df75f4983d2b943582f9ab99fa2 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 29 Apr 2013 17:01:07 +0200 Subject: Fix passiv'ization of Lightproof.py UNO components ...and some light clean up. Change-Id: I33da2fa452557d9c8c22419fafdc9d221859c320 --- pt_BR/Lightproof.components | 18 ++++++++++++++++++ pt_BR/Lightproof.py | 7 ++++--- pt_BR/META-INF/manifest.xml | 2 +- 3 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 pt_BR/Lightproof.components (limited to 'pt_BR') diff --git a/pt_BR/Lightproof.components b/pt_BR/Lightproof.components new file mode 100644 index 0000000..d2a9332 --- /dev/null +++ b/pt_BR/Lightproof.components @@ -0,0 +1,18 @@ + + + + + + + + + + diff --git a/pt_BR/Lightproof.py b/pt_BR/Lightproof.py index fdf9f71..aa759d1 100644 --- a/pt_BR/Lightproof.py +++ b/pt_BR/Lightproof.py @@ -314,11 +314,12 @@ class Lightproof( unohelper.Base, XProofreader, XServiceInfo, XServiceName, XSer g_ImplementationHelper = unohelper.ImplementationHelper() g_ImplementationHelper.addImplementation( Lightproof, \ "org.libreoffice.comp.pyuno.Lightproof." + pkg, - ("com.sun.star.linguistic2.Proofreader",),) + ("com.sun.star.linguistic2.Proofreader",)) g_ImplementationHelper.addImplementation( lightproof_handler_pt_BR.LightproofOptionsEventHandler, \ "org.libreoffice.comp.pyuno.LightproofOptionsEventHandler." + pkg, - ("com.sun.star.awt.XContainerWindowEventHandler",),) + ()) + # pattern matching for common English abbreviations abbrev = re.compile("(?i)\\b([a-z]|acct|approx|appt|apr|apt|assoc|asst|aug|ave|avg|co(nt|rp)?|ct|dec|defn|dept|dr|eg|equip|esp|est|etc|excl|ext|feb|fri|ft|govt?|hrs?|ib(id)?|ie|in(c|t)?|jan|jr|jul|lit|ln|mar|max|mi(n|sc)?|mon|Mrs?|mun|natl?|neg?|no(rm|s|v)?|nw|obj|oct|org|orig|pl|pos|prev|proj|psi|qty|rd|rec|rel|reqd?|resp|rev|sat|sci|se(p|pt)?|spec(if)?|sq|sr|st|subj|sun|sw|temp|thurs|tot|tues|univ|var|vs)\\.") @@ -18887,4 +18888,4 @@ def measurement(mnum, min, mout, mstr, decimal, remove): m = calc("CONVERT_ADD", (float(eval(mnum.replace(remove, "").replace(decimal, ".").replace(u"\u2212", "-"))), min, mout)) a = list(set([str(calc("ROUND", (m, 0)))[:-2], str(calc("ROUND", (m, 1))), str(calc("ROUND", (m, 2))), str(m)])) # remove duplicated rounded items a.sort(lambda x, y: len(x) - len(y)) # sort by string length - return (mstr + "\n").join(a).replace(".", decimal).replace("-", u"\u2212") + mstr \ No newline at end of file + return (mstr + "\n").join(a).replace(".", decimal).replace("-", u"\u2212") + mstr diff --git a/pt_BR/META-INF/manifest.xml b/pt_BR/META-INF/manifest.xml index 83fc1b9..befaddf 100644 --- a/pt_BR/META-INF/manifest.xml +++ b/pt_BR/META-INF/manifest.xml @@ -4,7 +4,7 @@ - + -- cgit