-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
1,156 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
<?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="Addons" | ||
oor:package="org.openoffice.Office"> | ||
<node oor:name="AddonUI"> | ||
<!--<node oor:name="AddonMenu"> | ||
<node oor:name="RemoveDuplicates.AddonMenu.m1" oor:op="replace"> | ||
<prop oor:name="Context" oor:type="xs:string"> | ||
<value>com.sun.star.sheet.SpreadsheetDocument</value> | ||
</prop> | ||
<prop oor:name="URL" oor:type="xs:string"> | ||
<value>vnd.sun.star.script:RemoveDuplicates.RemoveDuplicates.RemoveDuplicates?language=Basic&location=application</value> | ||
</prop> | ||
<prop oor:name="ImageIdentifier" oor:type="xs:string"> | ||
<value>%origin%/icons/image1</value> | ||
</prop> | ||
<prop oor:name="Title" oor:type="xs:string"> | ||
<value xml:lang="en-US">Remove Duplicates...</value> | ||
<value xml:lang="zh_CN">删除重复项...</value> | ||
</prop> | ||
<prop oor:name="Target" oor:type="xs:string"> | ||
<value>_self</value> | ||
</prop> | ||
</node> | ||
</node>--> | ||
<node oor:name="OfficeMenuBarMerging"> | ||
<node oor:name="vnd.actom.removeduplicates" oor:op="replace"> | ||
<node oor:name="S1" oor:op="replace"> | ||
<prop oor:name="MergePoint"> | ||
<value>.uno:DataMenu\.uno:FilterMenu</value> | ||
</prop> | ||
<prop oor:name="MergeCommand"> | ||
<value>AddAfter</value> | ||
</prop> | ||
<prop oor:name="MergeFallback"> | ||
<value>AddPath</value> | ||
</prop> | ||
<prop oor:name="ImageIdentifier" oor:type="xs:string"> | ||
<value>%origin%/icons/image1_26.png</value> | ||
</prop> | ||
<node oor:name="MenuItems"> | ||
<node oor:name="M1" oor:op="replace"> | ||
<prop oor:name="Context" oor:type="xs:string"> | ||
<value>com.sun.star.sheet.SpreadsheetDocument</value> | ||
</prop> | ||
<prop oor:name="URL" oor:type="xs:string"> | ||
<value>vnd.sun.star.script:RemoveDuplicates.RemoveDuplicates.RemoveDuplicates?language=Basic&location=application</value> | ||
</prop> | ||
<prop oor:name="Title" oor:type="xs:string"> | ||
<value xml:lang="en-US">Remove Duplicates...</value> | ||
<value xml:lang="zh_CN">删除重复项...</value> | ||
</prop> | ||
</node> | ||
</node> | ||
</node> | ||
</node> | ||
</node> | ||
<node oor:name="OfficeToolBar"> | ||
<node oor:name="vnd.actom.removeduplicates" oor:op="replace"> | ||
<node oor:name="M1" oor:op="replace"> | ||
<prop oor:name="Context" oor:type="xs:string"> | ||
<value>com.sun.star.sheet.SpreadsheetDocument</value> | ||
</prop> | ||
<prop oor:name="URL" oor:type="xs:string"> | ||
<value>vnd.sun.star.script:RemoveDuplicates.RemoveDuplicates.RemoveDuplicates?language=Basic&location=application</value> | ||
</prop> | ||
<prop oor:name="Title" oor:type="xs:string"> | ||
<value xml:lang="en-US">Remove Duplicates...</value> | ||
<value xml:lang="zh_CN">删除重复项...</value> | ||
</prop> | ||
<prop oor:name="ImageIdentifier" oor:type="xs:string"> | ||
<value>%origin%/icons/image1</value> | ||
</prop> | ||
</node> | ||
</node> | ||
</node> | ||
</node> | ||
</oor:component-data> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<manifest:manifest> | ||
<manifest:file-entry manifest:full-path="RemoveDuplicates/" manifest:media-type="application/vnd.sun.star.basic-library"/> | ||
<manifest:file-entry manifest:full-path="pkg-desc/pkg-description.txt" manifest:media-type="application/vnd.sun.star.package-bundle-description"/> | ||
<manifest:file-entry manifest:full-path="Addons.xcu" manifest:media-type="application/vnd.sun.star.configuration-data"/> | ||
</manifest:manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> | ||
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Locate" script:language="StarBasic">REM ***** BASIC ***** | ||
|
||
Dim stringLists() As String | ||
Dim language As String | ||
|
||
Function getLanguage | ||
GlobalScope.BasicLibraries.LoadLibrary("Tools") | ||
getLanguage = GetStarOfficeLocale().language + "_" + GetStarOfficeLocale().country | ||
End Function | ||
|
||
Function getText(index) | ||
getText = stringLists(index) | ||
End Function | ||
|
||
Function inArray(source, array) | ||
For i = 0 to ubound(array) | ||
If array(i) = source Then | ||
inArray = True | ||
Exit Function | ||
End If | ||
Next i | ||
inArray = False | ||
End Function | ||
|
||
Sub InitLanguage | ||
Dim languageList() | ||
languageList() = array("en", "zh_CN") | ||
language = getLanguage | ||
If not inArray(language, languageList) Then | ||
language = "en" | ||
End If | ||
Select Case language | ||
Case "en" | ||
load_en | ||
Case "zh_CN" | ||
load_zh_CN | ||
End Select | ||
End Sub | ||
|
||
Sub load_en | ||
stringLists() = array("Do not support multiselection", _ | ||
"Please select a range", _ | ||
"Column ", _ | ||
"Select ~All", _ | ||
"~Selection includes title", _ | ||
"~Please select the duplicate columns (Press Ctrl to multiselect):", _ | ||
"~OK", _ | ||
"~Cancel") | ||
End Sub | ||
|
||
Sub load_zh_CN | ||
stringLists() = array("不支持多重选择区域", _ | ||
"请选择一个区域", _ | ||
"列 ", _ | ||
"选择全部(~A)", _ | ||
"选区包含了列名(~S)", _ | ||
"请选择判断重复的列(按住Ctrl键可以多选)(~P):", _ | ||
"确定(~O)", _ | ||
"取消(~C)") | ||
End Sub | ||
</script:module> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd"> | ||
<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="Options" dlg:left="135" dlg:top="55" dlg:width="182" dlg:height="144" dlg:closeable="true" dlg:moveable="true"> | ||
<dlg:bulletinboard> | ||
<dlg:text dlg:id="OptionHint" dlg:tab-index="0" dlg:left="7" dlg:top="4" dlg:width="170" dlg:height="9" dlg:value="~Please select the duplicate columns (Press Ctrl to multiselect)"/> | ||
<dlg:checkbox dlg:id="cbTitle" dlg:tab-index="1" dlg:left="115" dlg:top="113" dlg:width="63" dlg:height="7" dlg:value="~Selection includes title" dlg:checked="true"> | ||
<script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:RemoveDuplicates.RemoveDuplicates.cbIncludeTitle?language=Basic&location=application" script:language="Script"/> | ||
</dlg:checkbox> | ||
<dlg:button dlg:id="btnSelectAll" dlg:tab-index="2" dlg:left="8" dlg:top="111" dlg:width="38" dlg:height="14" dlg:value="Select ~All"> | ||
<script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:RemoveDuplicates.RemoveDuplicates.btnSelectAllClick?language=Basic&location=application" script:language="Script"/> | ||
</dlg:button> | ||
<dlg:button dlg:id="btnOK" dlg:tab-index="3" dlg:left="100" dlg:top="129" dlg:width="38" dlg:height="14" dlg:default="true" dlg:value="~OK"> | ||
<script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:RemoveDuplicates.RemoveDuplicates.btnOKClick?language=Basic&location=application" script:language="Script"/> | ||
</dlg:button> | ||
<dlg:button dlg:id="btnCancel" dlg:tab-index="4" dlg:left="140" dlg:top="129" dlg:width="38" dlg:height="14" dlg:default="true" dlg:value="~Cancel"> | ||
<script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:RemoveDuplicates.RemoveDuplicates.btnCancelClick?language=Basic&location=application" script:language="Script"/> | ||
</dlg:button> | ||
<dlg:menulist dlg:id="lbList" dlg:tab-index="5" dlg:left="7" dlg:top="18" dlg:width="172" dlg:height="87" dlg:multiselection="true"/> | ||
</dlg:bulletinboard> | ||
</dlg:window> |
Oops, something went wrong.