Adding custom Dict to spell check extension of Libre office - libreoffice

I am trying to create and distribute a custom dictionary along with the primary one. I tried the steps mentioned here...
https://forum.openoffice.org/en/forum/viewtopic.php?f=7&t=33297
A user franx has provided step-by-step guide of ho to create a custom dictionary. But my question is how do I include both, primary and custom dict in the same extension. The custom dict should be installed in AppData path. For e.g.
C:\Users\Administrator\AppData\Roaming\LibreOffice\4\user\wordbook
Is this possible using .oxt file?

The "Dictionaries" sub-node of "ServiceManager" can have multiple entries.
If you already have one "HunSpellDic_mr_IN" then you can create one more "HunSpellDic_mr_IN_private" like this...
<?xml version="1.0" encoding="UTF-8"?>
<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:name="Linguistic" oor:package="org.openoffice.Office">
<node oor:name="ServiceManager">
<node oor:name="Dictionaries">
<node oor:name="HunSpellDic_mr_IN" oor:op="fuse">
<prop oor:name="Locations" oor:type="oor:string-list">
<value>%origin%/dicts/mr_IN.aff %origin%/dicts/mr_IN.dic</value>
</prop>
<prop oor:name="Format" oor:type="xs:string">
<value>DICT_SPELL</value>
</prop>
<prop oor:name="Locales" oor:type="oor:string-list">
<value>mr-IN</value>
</prop>
</node>
<node oor:name="HunSpellDic_mr_IN_private" oor:op="fuse">
<prop oor:name="Locations" oor:type="oor:string-list">
<value>%origin%/dicts/mr_IN_private.aff %origin%/dicts/mr_IN_private.dic</value>
</prop>
<prop oor:name="Format" oor:type="xs:string">
<value>DICT_SPELL</value>
</prop>
<prop oor:name="Locales" oor:type="oor:string-list">
<value>mr-IN</value>
</prop>
</node>
The actual location where the files like "*_private.dic" are stored is not known. The words from private files are still considered correct and hence the location does not matter. This will help you to group words into different categories.

Related

Alfresco permission of deployed custom workflow

How can i set the permission of a custom worflow?
I deployed a BPMN 2.0 workflow, by placing the bpmn20.xml in /alfresco/extension and also using the following workflow-context.xml
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<bean id="acme.workflowBootstrap" parent="workflowDeployer">
<property name="workflowDefinitions">
<list>
<props>
<prop key="engineId">activiti</prop>
<prop key="location">alfresco/extension/workflows/activiti/superflow.bpmn20.xml</prop>
<prop key="mimetype">text/xml</prop>
<prop key="redeploy">false</prop>
</props>
</list>
</property>
</bean>
</beans>
The workflow can by found in the Worfkflow console and can be run.
The problem remaing is, that I can only see this worfklow as admin in alfresco share. Not as admin#acme.
How can I set permission to use this workflow as different user than admin?
There is an alfresco extension project available to achieve workflow permissions https://addons.alfresco.com/addons/workflow-permissions
Configuration is done in your share custom config, using the elelement "permission-workflows" like this :
<config evaluator="string-compare" condition="Workflow">
<!-- A list of workflow definitions that are NOT displayed
<hidden-workflows>
<!-- Hide all WCM related workflows -->
<workflow name="jbpm$wcmwf:*" />
<workflow name="jbpm$wf:*" />
<workflow name="activiti$activiti*" />
<workflow name="activiti$quickStart*" />
</hidden-workflows>
<!-- A list of workflow tasks that are NOT displayed inShare -->
<hidden-tasks>
<!-- Hide all WCM related tasks -->
<task type="wcmwf:*" />
</hidden-tasks>
<permission-workflows default="allow">
<permission-workflow name="activiti$epubcreate">
<authorities>
<authority type="group">GROUP_ALFRESCO_ADMINISTRATORS</authority>
</authorities>
</permission-workflow>
</permission-workflows>
</config>
I cannot really speak to how much of the Activiti engine that is bundled with Alfresco is actually exposed. But in the stand alone Activiti product you can assign "candidate starters" to any process.
http://www.activiti.org/userguide/#_add_a_candidate_starter_to_a_process_definition
This uses the identityLinks mechanism that is also available for tasks, instances and executions.

DNN module uninstall how to remove settings from web.config

I have a DNN manifest file with this:
<configuration>
<nodes>
<node path="/configuration/appSettings" action="update" key="key" collision="overwrite">
<add key="LocalCurrencyCode" value="ARS"/>
</node>
and for uninstall I have this:
<uninstall>
<configuration>
<nodes>
<node path="/configuration/appsettings/add[#name='LocalCurrencyCode']" action="remove" />
However, when I uninstall the module the setting is not removed from web.config.
Can anyone see what I am doing wrong?
Fixed it:
<uninstall>
<configuration>
<nodes>
<node path="/configuration/appSettings/add[#key='InvoiceEmailSubject']" action="remove" />
Turns out that I needed "appSettings" because xml nodes are case sensitive. I also needed to use #key= as provided by Dexterity above.
I think you can try to replace #name with #key in <uninstall> section like this. There are no any name attribute in appsettings.
<node path="/configuration/appsettings/add[#key='LocalCurrencyCode']" action="remove" />

Email not sent in Jasper Report Scheduling

I want to schedule my jasper report so that at a particular time, it will send the report to the mentioned id. I'm using Jasper Server 4.5.0 and I have scheduled a sample report to be sent to my gmail id. However, it's not been sent to the mail id and it doesn't show any Last Ran time too.
I found it hard to setup GMail as my email server. So once I got it working I posted the details in this article.
In the spirit of keeping StackOverflow answers self-contained, here are the key settings. js.quartz.properties:
report.scheduler.web.deployment.uri=http://localhost/jasperserver
report.scheduler.mail.sender.host=smtp.gmail.com
report.scheduler.mail.sender.username=me#gmail.com
report.scheduler.mail.sender.password=mypassword
report.scheduler.mail.sender.from=me#gmail.com
report.scheduler.mail.sender.protocol=smtp
report.scheduler.mail.sender.port=587
applicationContext-report-scheduling.xml:
<property name="javaMailProperties">
<props>
<prop key="mail.smtp.auth">true</prop> <!--as indicated in JasperReports-Server-Install-Guide.pdf)-->
<prop key="mail.smtp.starttls.enable">true</prop> <!--NOT indicated in JasperReports-Server-Install-Guide.pdf-->
</props>
</property>
One observation,
If you´re going to use an email from Microsoft Exchange, you need on more line in the applicationContext-report-scheduling.xml
<props>
<prop key="mail.smtp.auth">true</prop>
<prop key="mail.smtp.starttls.enable">true</prop>
<prop key="mail.smtp.starttls.required">true</prop>
</props>
in my case works with this
first edit this arquive
/opt/jasperreports-server-cp-5.1.0/apache-tomcat/webapps/jasperserver/WEB-INF/js.quartz.properties
report.scheduler.mail.sender.host=smtp.gmail.com
report.scheduler.mail.sender.username=username#gmail.com
report.scheduler.mail.sender.password=your_password
report.scheduler.mail.sender.from=username#gmail.com
report.scheduler.mail.sender.protocol=smtps
report.scheduler.mail.sender.port=465
second edit this
opt/jasperreports-server-cp-5.1.0/apache-tomcat/webapps/jasperserver/WEB-INF/applicationContext-report-scheduling.xml
<bean id=”reportSchedulerMailSender”>
<property name=”host” value=”${report.scheduler.mail.sender.host}”/>
<property name=”username” value=”${report.scheduler.mail.sender.username}”/>
<property name=”password” value=”${report.scheduler.mail.sender.password}”/>
<property name=”protocol” value=”${report.scheduler.mail.sender.protocol}”/>
<property name=”port” value=”${report.scheduler.mail.sender.port}”/>
<property name=”javaMailProperties”>
<props>
**<prop key=”mail.smtps.auth”>true</prop>
<prop key=”mail.smtps.starttls.enable”>true</prop>**
</props>
</property>
</bean>

Spring Integration 2 with Quartz scheduler

I am new to Spring Integration.
I've configured a Spring file inbound-channel-adapter, e.g.
<file:inbound-channel-adapter channel="channel1" directory="${location}" prevent-duplicates="true" filename-pattern="*.csv">
<si:poller>
<si:interval-trigger interval="1000"/>
</si:poller>
</file:inbound-channel-adapter>
<si:service-activator input-channel="channel1" output-channel="channel2" ref="filenameGenerator" method="generate"/>
Now this is working fine.
But this needs to be deployed in a clustered environment. I want to make sure that multiple instances in the cluster do not attempt to read the same file. So will this work in such environment?
If no, can I use Quartz scheduler like this:
<file:inbound-channel-adapter channel="channel1" directory="${location}" prevent-duplicates="true" filename-pattern="*.csv">
<si:poller task-executor="taskExecutor" fixed-rate="1000"/>
</file:inbound-channel-adapter>
<si:service-activator input-channel="channel1" output-channel="channel2" ref="filenameGenerator" method="generate"/>
<bean id="taskExecutor" class="org.springframework.scheduling.quartz.SimpleThreadPoolTaskExecutor">
<property name="threadCount" value="20"/>
<property name="threadNamePrefix" value="consumer"/>
</bean>
Will this work and solve my problem??
Or do I have to use Transaction?
I hope the question is clear.
Thanks,
Adi
When multiple processes are reading from the same directory it can be
desirable to lock files to prevent them from being picked up
concurrently. To do this you can use a FileLocker
Check out the documentation around file lockers here. It seems that you can do soemthing like this:
<file:inbound-channel-adapter ... >
<file:nio-locker/>
</file:inbound-channel-adapter>
When multiple processes are reading from the same directory it can be
desirable to lock files to prevent them from being picked up
concurrently. To do this you can use a FileLocker
To ensure that a quartz-scheduled job executes once and only once within a cluster, configure a persistent, clustered quartz job schedule. Here's a sample config, for Quartz 1.6.6:
<bean id="scheduler" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<!-- Set whether any jobs defined on this SchedulerFactoryBean should
overwrite existing job definitions.
-->
<property name="overwriteExistingJobs" value="true" />
<property name="dataSource" ref="myTransactionalDataSource" />
<!-- nonTransactionalDataSource is only necessary with clustered Quartz with an XA DataSource.
-->
<property name="nonTransactionalDataSource" ref="myNonTransactionalDataSource" />
<property name="quartzProperties">
<props>
<prop key="org.quartz.jobStore.selectWithLockSQL">SELECT * FROM {0}LOCKS WITH(UPDLOCK,HOLDLOCK) WHERE LOCK_NAME = ?</prop>
<!--
Run in cluster. Quartz ensures persisted jobs are executed once within the
cluster
-->
<prop key="org.quartz.jobStore.isClustered">true</prop>
<!-- Each node in the cluster must have a unique instance id.
-->
<prop key="org.quartz.scheduler.instanceId">AUTO</prop>
<!-- Default clusterCheckinInterval is 15000
-->
<!-- <prop key="org.quartz.jobStore.clusterCheckinInterval">20000</prop>
-->
</props>
</property>
<property name="transactionManager" ref="transactionManager" />
- <!--
In Quartz 1.6.6, Quartz's ThreadPool interface is used when firing job triggers,
in org.quartz.core.QuartzSchedulerThread.
Quartz 1.x still starts some unmanaged threads, notably org.quartz.impl.jdbcjobstore.JobStoreSupport's
ClusterManager which is used when clustered=true. Quartz 2.0 should correct this problem.
-->
<property name="taskExecutor" ref="myTaskExecutor" />
</bean>

how to create a child page in jboss portal

how to create a child page in jboss portal.
I have following structure in my *pages-object.xml. I need to create a 2 pages two hold 2 portlets under Home page. Please help me achieve this
<deployment>
<if-exists>overwrite</if-exists>
<parent-ref>palm</parent-ref>
<page>
<page-name>Home</page-name>
<supported-locale>en</supported-locale>
<properties>
<property>
<name>order</name>
<value>1</value>
</property>
</properties>
</page>
</deployment>
Thanks,
Sam
To create a sub page you have to add another deployment element to the xml file, the parent-ref element should contain the concatenation of the parents parent-ref and the parents page-name, palm.Home in your example.
<deployment>
<parent-ref>palm.Home</parent-ref>
<if-exists>overwrite</if-exists>
<page>
<page-name>Child1</page-name>
<properties>
<property>
<name>order</name>
<value>1</value>
</property>
</properties>
<window>
<window-name>myWindow</window-name>
<instance-ref>myPortlet<!--Instance id of your portlet from portlet-instances.xml--></instance-ref>
<region>myRegion<!--Name of the region in your layout where this portlet should be put--></region>
<height>1</height>
</window>
</page>
</deployment>