summaryrefslogtreecommitdiff
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
parent36a0d3a959604b5c5af4adb17ca10a1d85542846 (diff)
Fix passiv'ization of Lightproof.py UNO components
...and some light clean up. Change-Id: I33da2fa452557d9c8c22419fafdc9d221859c320
-rw-r--r--Dictionary_en.mk1
-rw-r--r--Dictionary_hu.mk1
-rw-r--r--Dictionary_pt-BR.mk1
-rw-r--r--Dictionary_ru.mk1
-rw-r--r--en/Lightproof.components18
-rw-r--r--en/Lightproof.py4
-rw-r--r--en/META-INF/manifest.xml4
-rw-r--r--hu_HU/Lightproof.components18
-rw-r--r--hu_HU/Lightproof.py4
-rw-r--r--hu_HU/META-INF/manifest.xml4
-rw-r--r--pt_BR/Lightproof.components18
-rw-r--r--pt_BR/Lightproof.py7
-rw-r--r--pt_BR/META-INF/manifest.xml2
-rw-r--r--ru_RU/Lightproof.components18
-rw-r--r--ru_RU/Lightproof.py4
-rw-r--r--ru_RU/META-INF/manifest.xml4
16 files changed, 93 insertions, 16 deletions
diff --git a/Dictionary_en.mk b/Dictionary_en.mk
index 48855c2..8630f42 100644
--- a/Dictionary_en.mk
+++ b/Dictionary_en.mk
@@ -24,6 +24,7 @@ $(eval $(call gb_Dictionary_add_root_files,dict-en,\
dictionaries/en/hyph_en_GB.dic \
dictionaries/en/hyph_en_US.dic \
dictionaries/en/license.txt \
+ dictionaries/en/Lightproof.components \
dictionaries/en/Lightproof.py \
dictionaries/en/Linguistic.xcu \
dictionaries/en/README_en_AU.txt \
diff --git a/Dictionary_hu.mk b/Dictionary_hu.mk
index bb35233..7a52e59 100644
--- a/Dictionary_hu.mk
+++ b/Dictionary_hu.mk
@@ -13,6 +13,7 @@ $(eval $(call gb_Dictionary_add_root_files,dict-hu,\
dictionaries/hu_HU/hu_HU.aff \
dictionaries/hu_HU/hu_HU.dic \
dictionaries/hu_HU/hyph_hu_HU.dic \
+ dictionaries/hu_HU/Lightproof.components \
dictionaries/hu_HU/Lightproof.py \
dictionaries/hu_HU/Linguistic.xcu \
dictionaries/hu_HU/README_hu_HU.txt \
diff --git a/Dictionary_pt-BR.mk b/Dictionary_pt-BR.mk
index 1d8e83b..769b7e8 100644
--- a/Dictionary_pt-BR.mk
+++ b/Dictionary_pt-BR.mk
@@ -13,6 +13,7 @@ $(eval $(call gb_Dictionary_add_root_files,dict-pt-BR,\
dictionaries/pt_BR/hyph_pt_BR.dic \
dictionaries/pt_BR/pt_BR.aff \
dictionaries/pt_BR/pt_BR.dic \
+ dictionaries/pt_BR/Lightproof.components \
dictionaries/pt_BR/Lightproof.py \
dictionaries/pt_BR/Linguistic.xcu \
dictionaries/pt_BR/README_Lightproof_pt_BR.txt \
diff --git a/Dictionary_ru.mk b/Dictionary_ru.mk
index 8c925c4..b2b42f9 100644
--- a/Dictionary_ru.mk
+++ b/Dictionary_ru.mk
@@ -11,6 +11,7 @@ $(eval $(call gb_Dictionary_Dictionary,dict-ru,dictionaries/ru_RU))
$(eval $(call gb_Dictionary_add_root_files,dict-ru,\
dictionaries/ru_RU/hyph_ru_RU.dic \
+ dictionaries/ru_RU/Lightproof.components \
dictionaries/ru_RU/Lightproof.py \
dictionaries/ru_RU/Linguistic.xcu \
dictionaries/ru_RU/README_Lightproof_ru_RU.txt \
diff --git a/en/Lightproof.components b/en/Lightproof.components
new file mode 100644
index 0000000..8c3446f
--- /dev/null
+++ b/en/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.en">
+ <service name="com.sun.star.linguistic2.Proofreader"/>
+ </implementation>
+ <implementation
+ name="org.libreoffice.comp.pyuno.LightproofOptionsEventHandler.en"/>
+ </component>
+</components>
diff --git a/en/Lightproof.py b/en/Lightproof.py
index dae4b20..e2974fd 100644
--- a/en/Lightproof.py
+++ b/en/Lightproof.py
@@ -148,8 +148,8 @@ 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_en.LightproofOptionsEventHandler, \
"org.libreoffice.comp.pyuno.LightproofOptionsEventHandler." + pkg,
- ("com.sun.star.awt.XContainerWindowEventHandler",),)
+ ())
diff --git a/en/META-INF/manifest.xml b/en/META-INF/manifest.xml
index 9a1b9c3..f8d630a 100644
--- a/en/META-INF/manifest.xml
+++ b/en/META-INF/manifest.xml
@@ -7,8 +7,8 @@
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" />
diff --git a/hu_HU/Lightproof.components b/hu_HU/Lightproof.components
new file mode 100644
index 0000000..7af6868
--- /dev/null
+++ b/hu_HU/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.hu_HU">
+ <service name="com.sun.star.linguistic2.Proofreader"/>
+ </implementation>
+ <implementation
+ name="org.libreoffice.comp.pyuno.LightproofOptionsEventHandler.hu_HU"/>
+ </component>
+</components>
diff --git a/hu_HU/Lightproof.py b/hu_HU/Lightproof.py
index 45368ee..74af535 100644
--- a/hu_HU/Lightproof.py
+++ b/hu_HU/Lightproof.py
@@ -148,8 +148,8 @@ 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_hu_HU.LightproofOptionsEventHandler, \
"org.libreoffice.comp.pyuno.LightproofOptionsEventHandler." + pkg,
- ("com.sun.star.awt.XContainerWindowEventHandler",),)
+ ())
diff --git a/hu_HU/META-INF/manifest.xml b/hu_HU/META-INF/manifest.xml
index a9ff14b..87487ed 100644
--- a/hu_HU/META-INF/manifest.xml
+++ b/hu_HU/META-INF/manifest.xml
@@ -7,8 +7,8 @@
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" />
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>
diff --git a/ru_RU/Lightproof.components b/ru_RU/Lightproof.components
new file mode 100644
index 0000000..aafb44e
--- /dev/null
+++ b/ru_RU/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.ru_RU">
+ <service name="com.sun.star.linguistic2.Proofreader"/>
+ </implementation>
+ <implementation
+ name="org.libreoffice.comp.pyuno.LightproofOptionsEventHandler.ru_RU"/>
+ </component>
+</components>
diff --git a/ru_RU/Lightproof.py b/ru_RU/Lightproof.py
index cb0521e..229b704 100644
--- a/ru_RU/Lightproof.py
+++ b/ru_RU/Lightproof.py
@@ -148,8 +148,8 @@ 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_ru_RU.LightproofOptionsEventHandler, \
"org.libreoffice.comp.pyuno.LightproofOptionsEventHandler." + pkg,
- ("com.sun.star.awt.XContainerWindowEventHandler",),)
+ ())
diff --git a/ru_RU/META-INF/manifest.xml b/ru_RU/META-INF/manifest.xml
index 9a1b9c3..f8d630a 100644
--- a/ru_RU/META-INF/manifest.xml
+++ b/ru_RU/META-INF/manifest.xml
@@ -7,8 +7,8 @@
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" />