Hi All, I would like to consulate related to topic. I found that every wizards' bitmap enclosed for every language however it has no language dependent bitmaps in it. My suggestion to remove language dependency, so we can save around 1 MB of every installer. I created two patches however they are POC. Lets discuss it, then I finalize this fix. components/wizards extras/extras/source/templates/wizard/bitmap scp2 Also some of bitmaps may be removable. Thank you for advance! Best regards, KAMI
diff --git a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java index a2969df..7d68673 100644 --- a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java +++ b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java @@ -213,7 +213,7 @@ public class AgendaWizardDialogImpl extends AgendaWizardDialog try { sTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "share", "/wizard"); sUserTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "user", ""); - sBitmapPath = FileAccess.combinePaths(xMSF, sTemplatePath, "/wizard/bitmap"); + sBitmapPath = FileAccess.combinePaths(xMSF, sTemplatePath, "/../wizard/bitmap"); } catch (NoValidPathException e) { e.printStackTrace(); } @@ -302,7 +302,7 @@ public class AgendaWizardDialogImpl extends AgendaWizardDialog try { sUserTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "user"); - sBitmapPath = FileAccess.combinePaths(xMSF, sTemplatePath, "/wizard/bitmap"); + sBitmapPath = FileAccess.combinePaths(xMSF, sTemplatePath, "/../wizard/bitmap"); } catch (NoValidPathException e) { e.printStackTrace(); } diff --git a/wizards/com/sun/star/wizards/common/Desktop.java b/wizards/com/sun/star/wizards/common/Desktop.java index 9fc58ff..a9c0408 100644 --- a/wizards/com/sun/star/wizards/common/Desktop.java +++ b/wizards/com/sun/star/wizards/common/Desktop.java @@ -378,7 +378,7 @@ public class Desktop { TemplatePath = FileAccess.getOfficePath(xMSF, "Template", "share", "/wizard"); UserTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "user", ""); - BitmapPath = FileAccess.combinePaths(xMSF, TemplatePath, "/wizard/bitmap"); + BitmapPath = FileAccess.combinePaths(xMSF, TemplatePath, "/../wizard/bitmap"); WorkPath = FileAccess.getOfficePath(xMSF, "Work", "", ""); } catch (NoValidPathException nopathexception) @@ -417,7 +417,7 @@ public class Desktop { try { - String sBitmapPath = FileAccess.combinePaths(_xMSF, getTemplatePath(_xMSF), "/wizard/bitmap"); + String sBitmapPath = FileAccess.combinePaths(_xMSF, getTemplatePath(_xMSF), "/../wizard/bitmap"); return sBitmapPath; } catch (NoValidPathException nopathexception) diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java index d904bc6..63c4b0c 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java @@ -381,7 +381,7 @@ public class FaxWizardDialogImpl extends FaxWizardDialog { sTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "share", "/wizard"); sUserTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "user", ""); - sBitmapPath = FileAccess.combinePaths(xMSF, sTemplatePath, "/wizard/bitmap"); + sBitmapPath = FileAccess.combinePaths(xMSF, sTemplatePath, "/../wizard/bitmap"); } catch (NoValidPathException e) { diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java index e11d33e..c0f56cd 100644 --- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java +++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java @@ -1294,7 +1294,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog { sTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "share", "/wizard"); sUserTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "user", ""); - sBitmapPath = FileAccess.combinePaths(xMSF, sTemplatePath, "/wizard/bitmap"); + sBitmapPath = FileAccess.combinePaths(xMSF, sTemplatePath, "/../wizard/bitmap"); } catch (NoValidPathException e) { diff --git a/wizards/com/sun/star/wizards/web/FTPDialog.java b/wizards/com/sun/star/wizards/web/FTPDialog.java index fc11e17..8f5303a 100644 --- a/wizards/com/sun/star/wizards/web/FTPDialog.java +++ b/wizards/com/sun/star/wizards/web/FTPDialog.java @@ -186,7 +186,7 @@ public class FTPDialog extends UnoDialog2 implements UIConsts, WWHID publish = p; - imagesDirectory = FileAccess.connectURLs(((CGSettings) (publish.root)).soTemplateDir, "wizard/bitmap/"); + imagesDirectory = FileAccess.connectURLs(((CGSettings) (publish.root)).soTemplateDir, "../wizard/bitmap/"); //Load Resources resources = new FTPDialogResources(xmsf); diff --git a/wizards/com/sun/star/wizards/web/WWD_Startup.java b/wizards/com/sun/star/wizards/web/WWD_Startup.java index 0af1c46..a3ca1db 100644 --- a/wizards/com/sun/star/wizards/web/WWD_Startup.java +++ b/wizards/com/sun/star/wizards/web/WWD_Startup.java @@ -241,7 +241,7 @@ public abstract class WWD_Startup extends WWD_General String soTemplateDir = FileAccess.getOfficePath(xmsf, "Template", "share", "/wizard"); - String exclamationURL = FileAccess.connectURLs(soTemplateDir, "wizard/bitmap/caution_16.png"); + String exclamationURL = FileAccess.connectURLs(soTemplateDir, "../wizard/bitmap/caution_16.png"); this.drawNaviBar(); this.buildStep1(); this.buildStep2(); diff --git a/wizards/source/euro/Init.xba b/wizards/source/euro/Init.xba index 45fdafd..2de1252 100644 --- a/wizards/source/euro/Init.xba +++ b/wizards/source/euro/Init.xba @@ -550,7 +550,7 @@ Dim Isthere as Boolean InitializeLocales(oLocale) InitializeCurrencies() InitializeControls() - BitmapDir = GetOfficeSubPath("Template", "wizard/bitmap") + BitmapDir = GetOfficeSubPath("Template", "../wizard/bitmap") If BitmapDir = "" Then Stop End If diff --git a/wizards/source/formwizard/tools.xba b/wizards/source/formwizard/tools.xba index 174987e..8b40b83 100644 --- a/wizards/source/formwizard/tools.xba +++ b/wizards/source/formwizard/tools.xba @@ -304,7 +304,7 @@ End Function Function GetFormWizardPaths() as Boolean - FormPath = GetOfficeSubPath("Template","wizard/bitmap") + FormPath = GetOfficeSubPath("Template","../wizard/bitmap") If FormPath <> "" Then WebWizardPath = GetOfficeSubPath("Template","wizard/web") If WebWizardPath <> "" Then diff --git a/wizards/source/importwizard/Main.xba b/wizards/source/importwizard/Main.xba index 2c25c6a..3415d0e 100644 --- a/wizards/source/importwizard/Main.xba +++ b/wizards/source/importwizard/Main.xba @@ -274,7 +274,7 @@ End Sub Function GetImportWizardPaths() as Boolean - SOBitmapPath = GetOfficeSubPath("Template", "wizard/bitmap") + SOBitmapPath = GetOfficeSubPath("Template", "../wizard/bitmap") If SOBitmapPath <> "" Then SOWorkPath = GetPathSettings("Work", False) If SOWorkPath <> "" Then diff --git a/wizards/source/schedule/CalendarMain.xba b/wizards/source/schedule/CalendarMain.xba index bfe4912..2deb51c 100644 --- a/wizards/source/schedule/CalendarMain.xba +++ b/wizards/source/schedule/CalendarMain.xba @@ -82,7 +82,7 @@ Dim iThisMonth as Integer DlgCalModel = DlgCalendar.Model LoadLanguage(sCurLangLocale) CalInitGlobalVariablesDate() - BitmapDir = GetOfficeSubPath("Template","wizard/bitmap") + BitmapDir = GetOfficeSubPath("Template","../wizard/bitmap") DlgCalModel.imgCountry.ImageURL = BitmapDir & sBitmapFilename CalChoosenLand = -2 CalLoadOwnData() diff --git a/wizards/source/template/Samples.xba b/wizards/source/template/Samples.xba index b64ddc1..118fb37 100644 --- a/wizards/source/template/Samples.xba +++ b/wizards/source/template/Samples.xba @@ -86,7 +86,7 @@ Dim MaxIndex as Integer DialogModel = StylesDialog.Model TemplateDir = GetPathSettings("Template", False, 0) StylesDir = GetOfficeSubPath("Template", "wizard/styles/") - sQueryPath = GetOfficeSubPath("Template", "wizard/bitmap/") + sQueryPath = GetOfficeSubPath("Template", "../wizard/bitmap/") DialogModel.Title = GetResText(STYLES) DialogModel.cmdCancel.Label = GetResText(STYLES+2) DialogModel.cmdOk.Label = GetResText(STYLES+3) diff --git a/wizards/source/tutorials/Functions.xba b/wizards/source/tutorials/Functions.xba index 6524ec1..c1b464a 100644 --- a/wizards/source/tutorials/Functions.xba +++ b/wizards/source/tutorials/Functions.xba @@ -78,15 +78,15 @@ Sub setMaxMinImage(param As String) iPos = InStr(templatePath,"/") If(iPos > 0) Then If(param = "MAX") Then - bitmapPath = templatePath & "/wizard/bitmap/maximize.bmp" + bitmapPath = templatePath & "../wizard/bitmap/maximize.bmp" ElseIf(param = "MIN") Then - bitmapPath = templatePath & "/wizard/bitmap/minimize.bmp" + bitmapPath = templatePath & "../wizard/bitmap/minimize.bmp" End If Else If(param = "MAX") Then - bitmapPath = templatePath & "\wizard\bitmap\maximize.bmp" + bitmapPath = templatePath & "..\wizard\bitmap\maximize.bmp" ElseIf(param = "MIN") Then - bitmapPath = templatePath & "\wizard\bitmap\minimize.bmp" + bitmapPath = templatePath & "..\wizard\bitmap\minimize.bmp" End If End If 'printdbgInfo oCommandButton.Model diff --git a/wizards/source/tutorials/ShowInfoDialog.xba b/wizards/source/tutorials/ShowInfoDialog.xba index 4bb0f60..61c2ed9 100644 --- a/wizards/source/tutorials/ShowInfoDialog.xba +++ b/wizards/source/tutorials/ShowInfoDialog.xba @@ -148,9 +148,9 @@ sub setImage(whatever as Object) Dim bitmapPath As String iPos = InStr(templatePath,"/") if(iPos > 0) Then - bitmapPath = templatePath & "/wizard/bitmap/tutorial_background.gif" + bitmapPath = templatePath & "../wizard/bitmap/tutorial_background.gif" Else - bitmapPath = templatePath & "\wizard\bitmap\tutorial_background.gif" + bitmapPath = templatePath & "..\wizard\bitmap\tutorial_background.gif" End If dim props(0) as new com.sun.star.beans.PropertyValue diff --git a/wizards/source/webwizard/Language.xba b/wizards/source/webwizard/Language.xba index 1aa26fa..1c6b8c1 100644 --- a/wizards/source/webwizard/Language.xba +++ b/wizards/source/webwizard/Language.xba @@ -30,7 +30,7 @@ Dim TemplatePath as String If PhotosDir <> "" Then TemplatePath = GetOfficeSubPath("Template", "wizard/web/") If TemplatePath <> "" Then - SOBitmapPath = GetOfficeSubPath("Template", "wizard/bitmap") + SOBitmapPath = GetOfficeSubPath("Template", "../wizard/bitmap") If SOBitmapPath <> "" Then GetWebwizardPaths() = True Exit Function
diff --git a/scp2/source/ooo/directory_ooo.scp b/scp2/source/ooo/directory_ooo.scp index 344a51b..a0c3f80 100644 --- a/scp2/source/ooo/directory_ooo.scp +++ b/scp2/source/ooo/directory_ooo.scp @@ -975,6 +975,11 @@ Directory gid_Dir_Share_Template_Wizard DosName = "wizard"; End +Directory gid_Dir_Share_Template_Wizard_Bitmap + ParentID = gid_Dir_Share_Template_Wizard; + DosName = "bitmap"; +End + Directory gid_Dir_Share_Template_Wizard_Letter ParentID = gid_Dir_Share_Template_Wizard; DosName = "letter"; @@ -1035,11 +1040,6 @@ Directory gid_Dir_Template_Wizard DIR_IDENT_ALL_LANG(wizard); End -Directory gid_Dir_Template_Wizard_Bitmap - ParentID = gid_Dir_Template_Wizard; - DIR_IDENT_ALL_LANG(bitmap); -End - Directory gid_Dir_Template_Wizard_Web ParentID = gid_Dir_Template_Wizard; DIR_IDENT_ALL_LANG(web); diff --git a/scp2/source/ooo/file_extra_ooo.scp b/scp2/source/ooo/file_extra_ooo.scp index dbea12e..ee8c46f 100644 --- a/scp2/source/ooo/file_extra_ooo.scp +++ b/scp2/source/ooo/file_extra_ooo.scp @@ -365,10 +365,9 @@ File gid_File_Extra_Tplpresntimpr_Lang End File gid_File_Extra_Tplwizbitmap - Dir = gid_Dir_Template_Wizard_Bitmap; - TXT_FILE_BODY; - Styles = (ARCHIVE, DONT_OVERWRITE); - EXTRA_IDENT_ALL_LANG(tplwizbitmap.zip); + Dir = gid_Dir_Share_Template_Wizard_Bitmap; + ARCHIVE_TXT_FILE_BODY; + Name = "tplwizbitmap.zip"; End File gid_File_Extra_Tplwizdesktop_Lang diff --git a/scp2/source/ooo/module_hidden_ooo.scp b/scp2/source/ooo/module_hidden_ooo.scp index 69b3e7c..8c3a311 100644 --- a/scp2/source/ooo/module_hidden_ooo.scp +++ b/scp2/source/ooo/module_hidden_ooo.scp @@ -453,6 +453,7 @@ Module gid_Module_Root_Files_6 gid_File_Extra_Gallwwwgraf, gid_File_Extra_Migration, gid_File_Extra_Migration_Lang_Multi, + gid_File_Extra_Tplwizbitmap, gid_File_Extra_Tplwizletter, gid_File_Extra_Tplwizletter_en_US, gid_File_Extra_Tplwizletter_de, diff --git a/scp2/source/ooo/module_lang_template.scp b/scp2/source/ooo/module_lang_template.scp index 7ecd474..4e4b55d 100755 --- a/scp2/source/ooo/module_lang_template.scp +++ b/scp2/source/ooo/module_lang_template.scp @@ -35,7 +35,6 @@ Module gid_Module_Langpack_Basis_Template gid_File_Extra_Tpllayoutimpr_Lang, gid_File_Extra_Tplpresntimpr_Lang, gid_File_Extra_Tplwizagenda_Lang, - gid_File_Extra_Tplwizbitmap, gid_File_Extra_Tplwizdesktop_Lang, gid_File_Extra_Tplwizfax_Lang, gid_File_Extra_Tplwizletter_Lang,
Attachment:
signature.asc
Description: OpenPGP digital signature