[Libreoffice-commits] .: wizards/com
Andras Timar
timar at kemper.freedesktop.org
Sat Apr 16 13:02:50 PDT 2011
wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java | 54 ----------
1 file changed, 1 insertion(+), 53 deletions(-)
New commits:
commit 7e85804c36887975d6b52259709f23734df45679
Author: Andras Timar <atimar at novell.com>
Date: Sat Apr 16 21:58:56 2011 +0200
do not ship Letter Wizard templates twice fdo#35722
diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java
index 40797be..fed5341 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);
}
More information about the Libreoffice-commits
mailing list