summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndras Timar <atimar@novell.com>2011-04-16 21:58:56 +0200
committerAndras Timar <atimar@novell.com>2011-04-16 21:59:49 +0200
commit7e85804c36887975d6b52259709f23734df45679 (patch)
tree90853d60ed7c67f654f3fb9170ce03ec9663e33a
parent0e7c42df725763092a7e1b2fa8da73f4b4b9e459 (diff)
do not ship Letter Wizard templates twice fdo#35722
-rw-r--r--wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java54
1 files changed, 1 insertions, 53 deletions
diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java
index 40797be39..fed53418e 100644
--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java
+++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java
@@ -1116,14 +1116,6 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
{
"", ""
};
- String[] nameList1 =
- {
- "", ""
- };
- String[] nameList1b =
- {
- "", ""
- };
String[] nameList2 =
{
"", ""
@@ -1146,47 +1138,13 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
sMainPath = FileAccess.deleteLastSlashfromUrl(sMainPath);
sLetterPath = sMainPath + sLetterSubPath;
- //sLetterLangPackPath = FileAccess.combinePaths(xMSF, sTemplatePath, sLetterSubPath);
XInterface xInterface = (XInterface) xMSF.createInstance("com.sun.star.ucb.SimpleFileAccess");
com.sun.star.ucb.XSimpleFileAccess xSimpleFileAccess = (com.sun.star.ucb.XSimpleFileAccess) UnoRuntime.queryInterface(com.sun.star.ucb.XSimpleFileAccess.class, xInterface);
- nameList1 = xSimpleFileAccess.getFolderContents(sMainPath, true);
nameList2 = xSimpleFileAccess.getFolderContents(sLetterPath, true);
- for (int i = 0; i < nameList1.length; i++)
- {
- String theFileName = FileAccess.getFilename(nameList1[i]);
- if (!theFileName.equalsIgnoreCase("wizard"))
- {
- sLocLetterPath = FileAccess.deleteLastSlashfromUrl(nameList1[i] + sLetterSubPath);
- try
- {
- nameList1b = xSimpleFileAccess.getFolderContents(sLocLetterPath, true);
- for (int j = 0; j < nameList1b.length; j++)
- {
- String theFileNameb = FileAccess.getFilename(nameList1b[j]);
- allPaths.add(nameList1[i] + sLetterSubPath + theFileNameb);
- }
- }
- catch (Exception e)
- {
- //if the path is invalid an exception is thrown - try the fallback below then
- }
- }
- }
for (int i = 0; i < nameList2.length; i++)
{
- boolean found = false;
- for (int t = 0; t < nameList1.length; t++)
- {
- if (FileAccess.getFilename(nameList2[i]).equalsIgnoreCase(FileAccess.getFilename(nameList1[t])))
- {
- found = true;
- }
- }
- if (!found)
- {
- allPaths.add(nameList2[i]);
- }
+ allPaths.add(nameList2[i]);
}
nameList = allPaths.toArray();
@@ -1248,12 +1206,6 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
NormsVector.add(cIsoCode);
NormsPathVector.add((String) nameList[i]);
LanguageLabelsVector.add(lc.getLanguageString(MSID));
- /*
- Norms[z] = cIsoCode;
- NormPaths[z] = (String) nameList[i];
- LanguageLabels[z] = lc.getLanguageString(MSID);
- z++;
- **/
}
}
@@ -1267,10 +1219,6 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
LanguageLabels = new String[LanguageLabelsVector.size()];
LanguageLabelsVector.toArray(LanguageLabels);
- //Norms = new String[nameList.length];
- //NormPaths = new String[nameList.length];
- //LanguageLabels = new String[Norms.length];
-
setControlProperty("lstLetterNorm", "StringItemList", LanguageLabels);
}