summaryrefslogtreecommitdiff
path: root/pt_BR
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-04-29 17:01:07 +0200
committerStephan Bergmann <sbergman@redhat.com>2013-04-29 17:01:07 +0200
commitacf0ae3fdec65df75f4983d2b943582f9ab99fa2 (patch)
tree48073587b6a926a8f163d84d1be44e72237e259b /pt_BR
parent36a0d3a959604b5c5af4adb17ca10a1d85542846 (diff)
Fix passiv'ization of Lightproof.py UNO components
...and some light clean up. Change-Id: I33da2fa452557d9c8c22419fafdc9d221859c320
Diffstat (limited to 'pt_BR')
-rw-r--r--pt_BR/Lightproof.components18
-rw-r--r--pt_BR/Lightproof.py7
-rw-r--r--pt_BR/META-INF/manifest.xml2
3 files changed, 23 insertions, 4 deletions
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+-->
+<components xmlns="http://openoffice.org/2010/uno-components">
+ <component loader="com.sun.star.loader.Python" uri="./Lightproof.py">
+ <implementation name="org.libreoffice.comp.pyuno.Lightproof.pt_BR">
+ <service name="com.sun.star.linguistic2.Proofreader"/>
+ </implementation>
+ <implementation
+ name="org.libreoffice.comp.pyuno.LightproofOptionsEventHandler.pt_BR"/>
+ </component>
+</components>
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 @@
<manifest:file-entry manifest:media-type="application/vnd.sun.star.configuration-data" manifest:full-path="dictionaries.xcu"/>
<manifest:file-entry manifest:full-path="dialog/OptionsDialog.xcs" manifest:media-type="application/vnd.sun.star.configuration-schema"/>
<manifest:file-entry manifest:full-path="dialog/OptionsDialog.xcu" manifest:media-type="application/vnd.sun.star.configuration-data"/>
- <manifest:file-entry manifest:media-type="application/vnd.sun.star.uno-component;type=Python" manifest:full-path="Lightproof.py"/>
+ <manifest:file-entry manifest:media-type="application/vnd.sun.star.uno-components" manifest:full-path="Lightproof.components"/>
<manifest:file-entry manifest:media-type="application/vnd.sun.star.configuration-data" manifest:full-path="Linguistic.xcu"/>
<manifest:file-entry manifest:media-type="application/vnd.sun.star.package-bundle-description" manifest:full-path="package-description.txt"/>
</manifest:manifest>