mirror of
git://anongit.freedesktop.org/libreoffice/dictionaries
synced 2025-10-05 16:13:05 +02:00
Fix passiv'ization of Lightproof.py UNO components
...and some light clean up. Change-Id: I33da2fa452557d9c8c22419fafdc9d221859c320
This commit is contained in:
@@ -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 \
|
||||
|
@@ -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 \
|
||||
|
@@ -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 \
|
||||
|
@@ -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 \
|
||||
|
18
en/Lightproof.components
Normal file
18
en/Lightproof.components
Normal file
@@ -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>
|
@@ -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",),)
|
||||
())
|
||||
|
@@ -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" />
|
||||
|
18
hu_HU/Lightproof.components
Normal file
18
hu_HU/Lightproof.components
Normal file
@@ -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>
|
@@ -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",),)
|
||||
())
|
||||
|
@@ -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" />
|
||||
|
18
pt_BR/Lightproof.components
Normal file
18
pt_BR/Lightproof.components
Normal file
@@ -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>
|
@@ -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
|
||||
return (mstr + "\n").join(a).replace(".", decimal).replace("-", u"\u2212") + mstr
|
||||
|
@@ -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>
|
||||
|
18
ru_RU/Lightproof.components
Normal file
18
ru_RU/Lightproof.components
Normal file
@@ -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>
|
@@ -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",),)
|
||||
())
|
||||
|
@@ -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" />
|
||||
|
Reference in New Issue
Block a user