[Libreoffice-commits] .: wizards/com wizards/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Aug 28 04:54:01 PDT 2012


 wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java      |    9 
 wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java            |   52 ++
 wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.java       |   16 
 wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java      |   79 +++-
 wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.java |   22 +
 wizards/com/sun/star/wizards/report/ReportLayouter.java              |   18 
 wizards/com/sun/star/wizards/report/ReportTextImplementation.java    |  132 ++++++
 wizards/com/sun/star/wizards/report/ReportWizard.java                |    4 
 wizards/source/formwizard/dbwizres.src                               |  191 +++++++++-
 9 files changed, 505 insertions(+), 18 deletions(-)

New commits:
commit 5eb16c1cf277a8a3514e81e64b211a2e4f4c7a8f
Author: Istvan Turi <turipista at freemail.hu>
Date:   Tue Aug 28 13:38:40 2012 +0200

    fixes to new template localization code
    
    * Crash when launching the Report Builder is now fixed.
    * Added listbox localized templates to fax, report and letter wizard.
    * Made some optimalization with the template path search.
    
    Change-Id: Ie3f91fea301427b15891411c0192f9217b39ecae

diff --git a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java
index 6cdcde5..5374f58 100644
--- a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java
+++ b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java
@@ -50,6 +50,9 @@ import com.sun.star.wizards.ui.event.DataAware;
 import com.sun.star.wizards.ui.event.RadioDataAware;
 import com.sun.star.wizards.ui.event.UnoDataAware;
 
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.uno.XInterface;
+
 /**
  * This class is the dialog implementation class -
  * there is not much business logic here - but mostley
@@ -202,10 +205,8 @@ public class AgendaWizardDialogImpl extends AgendaWizardDialog
 
     private void initializePaths() {
         try {
-            sTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "share", "/wizard");
             sUserTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "user", PropertyNames.EMPTY_STRING);
             sBitmapPath = FileAccess.combinePaths(xMSF, sTemplatePath, "/../wizard/bitmap");
-            sTemplatePath = FileAccess.combinePaths(xMSF, sTemplatePath, "/../common");
         } catch (NoValidPathException e) {
             e.printStackTrace();
         }
@@ -305,7 +306,9 @@ public class AgendaWizardDialogImpl extends AgendaWizardDialog
      */
     public boolean initializeTemplates() {
         try {
-            String sTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "share", "/wizard");
+            XInterface xPathInterface = (XInterface) xMSF.createInstance("com.sun.star.util.PathSettings");
+            XPropertySet xPropertySet = UnoRuntime.queryInterface(XPropertySet.class, xPathInterface);
+            sTemplatePath = ((String[]) xPropertySet.getPropertyValue("Template_user"))[0];
 
             //sCurrentNorm = Norms[getCurrentLetter().cp_Norm];
             String sAgendaPath = FileAccess.combinePaths(xMSF, sTemplatePath, "/../common/wizard/agenda" );
diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java
index 88b8283..43e9c5a 100644
--- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java
+++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java
@@ -65,6 +65,8 @@ import com.sun.star.wizards.common.TextElement;
 import com.sun.star.wizards.common.PlaceholderTextElement;
 
 import java.util.List;
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.uno.XInterface;
 
 public class FaxWizardDialogImpl extends FaxWizardDialog
 {
@@ -461,6 +463,45 @@ public class FaxWizardDialogImpl extends FaxWizardDialog
 
     }
 
+    private void exchangeTitlesToLocalizedOnes()
+    {
+      for(int i = 0; i < BusinessFiles[0].length; ++i)
+      {
+        if( BusinessFiles[0][i].equals("Classic Fax") )
+        {
+          BusinessFiles[0][i] = resources.resBusinessFaxClassic;
+        }
+        else if( BusinessFiles[0][i].equals("Classic Fax from Private") )
+        {
+          BusinessFiles[0][i] = resources.resBusinessFaxClassicPrivate;
+        }
+        else if( BusinessFiles[0][i].equals("Modern Fax") )
+        {
+          BusinessFiles[0][i] = resources.resBusinessFaxModern;
+        }
+        else if( BusinessFiles[0][i].equals("Modern Fax from Private") )
+        {
+          BusinessFiles[0][i] = resources.resBusinessFaxModernPrivate;
+        }
+      }
+
+      for(int i = 0; i < PrivateFiles[0].length; ++i)
+      {
+        if( PrivateFiles[0][i].equals("Bottle") )
+        {
+          PrivateFiles[0][i] = resources.resPrivateFaxBottle;
+        }
+        else if( PrivateFiles[0][i].equals("Lines") )
+        {
+          PrivateFiles[0][i] = resources.resPrivateFaxLines;
+        }
+        else if( PrivateFiles[0][i].equals("Marine") )
+        {
+          PrivateFiles[0][i] = resources.resPrivateFaxMarine;
+        }
+      }
+    }
+
     public void insertRoadmap()
     {
         addRoadmap();
@@ -530,15 +571,20 @@ public class FaxWizardDialogImpl extends FaxWizardDialog
     {
         try
         {
-            sTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "share", "/wizard");
+            XInterface xPathInterface = (XInterface) xMSF.createInstance("com.sun.star.util.PathSettings");
+            XPropertySet xPropertySet = UnoRuntime.queryInterface(XPropertySet.class, xPathInterface);
+            sTemplatePath = ((String[]) xPropertySet.getPropertyValue("Template_user"))[0];
             sUserTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "user", PropertyNames.EMPTY_STRING);
             sBitmapPath = FileAccess.combinePaths(xMSF, sTemplatePath, "/../wizard/bitmap");
-            sTemplatePath = FileAccess.combinePaths(xMSF, sTemplatePath, "/../common");
         }
         catch (NoValidPathException e)
         {
             e.printStackTrace();
         }
+        catch (Exception e)
+        {
+            e.printStackTrace();
+        }
     }
 
     public boolean initializeTemplates(XMultiServiceFactory xMSF)
@@ -552,6 +598,8 @@ public class FaxWizardDialogImpl extends FaxWizardDialog
             BusinessFiles = FileAccess.getFolderTitles(xMSF, "bus", sFaxPath);
             PrivateFiles = FileAccess.getFolderTitles(xMSF, "pri", sFaxPath);
 
+            exchangeTitlesToLocalizedOnes();
+
             setControlProperty("lstBusinessStyle", PropertyNames.STRING_ITEM_LIST, BusinessFiles[0]);
             setControlProperty("lstPrivateStyle", PropertyNames.STRING_ITEM_LIST, PrivateFiles[0]);
 
diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.java b/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.java
index b5756e8..fce209f 100644
--- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.java
+++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.java
@@ -96,6 +96,14 @@ public class FaxWizardDialogResources extends Resource
     String resConsist2PlaceHolder_value;
     String resConsist3PlaceHolder_value;
 
+    String resPrivateFaxBottle;
+    String resPrivateFaxLines;
+    String resPrivateFaxMarine;
+    String resBusinessFaxClassic;
+    String resBusinessFaxClassicPrivate;
+    String resBusinessFaxModern;
+    String resBusinessFaxModernPrivate;
+
     public FaxWizardDialogResources(XMultiServiceFactory xmsf)
     {
         super(xmsf, UNIT_NAME, MODULE_NAME);
@@ -153,6 +161,14 @@ public class FaxWizardDialogResources extends Resource
         resConsist2PlaceHolder_value = getResText(RID_FAXWIZARDDIALOG_START + 47);
         resConsist3PlaceHolder_value = getResText(RID_FAXWIZARDDIALOG_START + 48);
 
+        resPrivateFaxBottle = getResText(RID_FAXWIZARDDIALOG_START + 49);
+        resPrivateFaxLines = getResText(RID_FAXWIZARDDIALOG_START + 50);
+        resPrivateFaxMarine = getResText(RID_FAXWIZARDDIALOG_START + 51);
+        resBusinessFaxClassic = getResText(RID_FAXWIZARDDIALOG_START + 52);
+        resBusinessFaxClassicPrivate = getResText(RID_FAXWIZARDDIALOG_START + 53);
+        resBusinessFaxModern = getResText(RID_FAXWIZARDDIALOG_START + 54);
+        resBusinessFaxModernPrivate = getResText(RID_FAXWIZARDDIALOG_START + 55);
+
         loadRoadmapResources();
         loadSalutationResources();
         loadGreetingResources();
diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java
index 582d718..e17d086 100644
--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java
+++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java
@@ -70,6 +70,9 @@ import com.sun.star.wizards.text.*;
 import com.sun.star.wizards.common.TextElement;
 import com.sun.star.wizards.common.PlaceholderTextElement;
 
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.uno.XInterface;
+
 public class LetterWizardDialogImpl extends LetterWizardDialog
 {
 
@@ -1166,15 +1169,20 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
     {
         try
         {
-            sTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "share", "/wizard");
+            XInterface xPathInterface = (XInterface) xMSF.createInstance("com.sun.star.util.PathSettings");
+            XPropertySet xPropertySet = UnoRuntime.queryInterface(XPropertySet.class, xPathInterface);
+            sTemplatePath = ((String[]) xPropertySet.getPropertyValue("Template_user"))[0];
             sUserTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "user", PropertyNames.EMPTY_STRING);
             sBitmapPath = FileAccess.combinePaths(xMSF, sTemplatePath, "/../wizard/bitmap");
-            sTemplatePath = FileAccess.combinePaths(xMSF, sTemplatePath, "/../common");
         }
         catch (NoValidPathException e)
         {
             e.printStackTrace();
         }
+        catch (Exception e)
+        {
+            e.printStackTrace();
+        }
     }
 
     public boolean initializeTemplates(XMultiServiceFactory xMSF)
@@ -1182,13 +1190,16 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
 
       try
       {
-        sTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "share", "/wizard");
         String sLetterPath = FileAccess.combinePaths(xMSF, sTemplatePath, "/../common/wizard/letter");
 
         BusinessFiles = FileAccess.getFolderTitles(xMSF, "bus", sLetterPath);
         OfficialFiles = FileAccess.getFolderTitles(xMSF, "off", sLetterPath);
         PrivateFiles = FileAccess.getFolderTitles(xMSF, "pri", sLetterPath);
 
+        exchangeBusinessTitlesToLocalizedOnes();
+        exchangeOfficialTitlesToLocalizedOnes();
+        exchangePrivateTitlesToLocalizedOnes();
+
         setControlProperty("lstBusinessStyle", PropertyNames.STRING_ITEM_LIST, BusinessFiles[0]);
         setControlProperty("lstPrivOfficialStyle", PropertyNames.STRING_ITEM_LIST, OfficialFiles[0]);
         setControlProperty("lstPrivateStyle", PropertyNames.STRING_ITEM_LIST, PrivateFiles[0]);
@@ -1414,4 +1425,66 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
             e.printStackTrace();
         }
     }
+
+    private void exchangeBusinessTitlesToLocalizedOnes()
+    {
+      for(int i = 0; i < BusinessFiles[0].length; ++i)
+      {
+        if( BusinessFiles[0][i].equals("Elegant") )
+        {
+          BusinessFiles[0][i] = resources.resBusinessElegantTitle;
+        }
+        else if( BusinessFiles[0][i].equals("Modern") )
+        {
+          BusinessFiles[0][i] = resources.resBusinessModernTitle;
+        }
+        else if( BusinessFiles[0][i].equals("Office") )
+        {
+          BusinessFiles[0][i] = resources.resBusinessOfficeTitle;
+        }
+      }
+    }
+
+    private void exchangeOfficialTitlesToLocalizedOnes()
+    {
+      for(int i = 0; i < OfficialFiles[0].length; ++i)
+      {
+        if( OfficialFiles[0][i].equals("Elegant") )
+        {
+          OfficialFiles[0][i] = resources.resOfficialElegantTitle;
+        }
+        else if( OfficialFiles[0][i].equals("Modern") )
+        {
+          OfficialFiles[0][i] = resources.resOfficialModernTitle;
+        }
+        else if( OfficialFiles[0][i].equals("Office") )
+        {
+          OfficialFiles[0][i] = resources.resOfficialOfficeTitle;
+        }
+      }
+    }
+ 
+    private void exchangePrivateTitlesToLocalizedOnes()
+    {
+      for(int i = 0; i < PrivateFiles[0].length; ++i)
+      {
+        if( PrivateFiles[0][i].equals("Bottle") )
+        {
+          PrivateFiles[0][i] = resources.resPrivateBottleTitle;
+        }
+        else if( PrivateFiles[0][i].equals("Mail") )
+        {
+          PrivateFiles[0][i] = resources.resPrivateMailTitle;
+        }
+        else if( PrivateFiles[0][i].equals("Marine") )
+        {
+          PrivateFiles[0][i] = resources.resPrivateMarineTitle;
+        }
+        else if( PrivateFiles[0][i].equals("Red Line") )
+        {
+          PrivateFiles[0][i] = resources.resPrivateRedLineTitle;
+        }
+      }
+    }
+
 }
diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.java b/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.java
index 586872e..932b351 100644
--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.java
+++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.java
@@ -99,6 +99,17 @@ public class LetterWizardDialogResources extends Resource
     String resSubjectconstPlaceHolder = "#subjectconst#";
     String resSubjectconstPlaceHolder_value;
 
+    String resBusinessElegantTitle;
+    String resBusinessModernTitle;
+    String resBusinessOfficeTitle;
+    String resOfficialElegantTitle;
+    String resOfficialModernTitle;
+    String resOfficialOfficeTitle;
+    String resPrivateBottleTitle;
+    String resPrivateMailTitle;
+    String resPrivateMarineTitle;
+    String resPrivateRedLineTitle;
+
     public LetterWizardDialogResources(XMultiServiceFactory xmsf)
     {
         super(xmsf, UNIT_NAME, MODULE_NAME);
@@ -164,6 +175,17 @@ public class LetterWizardDialogResources extends Resource
 
         resSubjectconstPlaceHolder_value = getResText(RID_LETTERWIZARDDIALOG_START + 59);
 
+        resBusinessElegantTitle = getResText(RID_LETTERWIZARDDIALOG_START + 60);
+        resBusinessModernTitle = getResText(RID_LETTERWIZARDDIALOG_START + 61);
+        resBusinessOfficeTitle = getResText(RID_LETTERWIZARDDIALOG_START + 62);
+        resOfficialElegantTitle = getResText(RID_LETTERWIZARDDIALOG_START + 60);
+        resOfficialModernTitle = getResText(RID_LETTERWIZARDDIALOG_START + 61);
+        resOfficialOfficeTitle = getResText(RID_LETTERWIZARDDIALOG_START + 62);
+        resPrivateBottleTitle = getResText(RID_LETTERWIZARDDIALOG_START + 63);
+        resPrivateMailTitle = getResText(RID_LETTERWIZARDDIALOG_START + 64);
+        resPrivateMarineTitle = getResText(RID_LETTERWIZARDDIALOG_START + 65);
+        resPrivateRedLineTitle = getResText(RID_LETTERWIZARDDIALOG_START + 66);
+
         loadRoadmapResources();
         loadSalutationResources();
         loadGreetingResources();
diff --git a/wizards/com/sun/star/wizards/report/ReportLayouter.java b/wizards/com/sun/star/wizards/report/ReportLayouter.java
index 0c773dd..1d60e2f 100644
--- a/wizards/com/sun/star/wizards/report/ReportLayouter.java
+++ b/wizards/com/sun/star/wizards/report/ReportLayouter.java
@@ -68,10 +68,12 @@ public class ReportLayouter
     private XTextRange          trTitleconst, trAuthorconst, trDateconst, trPageconst;
     private TextElement         teTitleconst, teAuthorconst, teDateconst, tePageconst;
     private List<XTextRange>    constRangeList = new ArrayList<XTextRange>();
+    private boolean isBuilderInstalled;
 
-    public ReportLayouter(XMultiServiceFactory _xMSF, IReportDocument _CurReportDocument, UnoDialog _CurUnoDialog)
+    public ReportLayouter(XMultiServiceFactory _xMSF, IReportDocument _CurReportDocument, UnoDialog _CurUnoDialog, boolean _isBuilderInstalled)
     {
         m_xMSF = _xMSF;
+        isBuilderInstalled = _isBuilderInstalled;
         try
         {
             short curtabindex = (short) (100 * ReportWizard.SOTEMPLATEPAGE);
@@ -265,8 +267,11 @@ public class ReportLayouter
                         {
                             iOldContentPos = iPos;
                             CurReportDocument.liveupdate_changeContentTemplate(ContentFiles[1][iPos]);
-                            clearConstants();
-                            drawConstants();
+                            if(!isBuilderInstalled)
+                            {
+                              clearConstants();
+                              drawConstants();
+                            }
                         }
                         break;
 
@@ -276,8 +281,11 @@ public class ReportLayouter
                         {
                             iOldLayoutPos = iPos;
                             CurReportDocument.liveupdate_changeLayoutTemplate(LayoutFiles[1][iPos]/*, Desktop.getBitmapPath(m_xMSF)*/);
-                            clearConstants();
-                            drawConstants();
+                            if(!isBuilderInstalled)
+                            {
+                              clearConstants();
+                              drawConstants();
+                            }
                         }
                         break;
 
diff --git a/wizards/com/sun/star/wizards/report/ReportTextImplementation.java b/wizards/com/sun/star/wizards/report/ReportTextImplementation.java
index 9edc6b7..0616b9c 100644
--- a/wizards/com/sun/star/wizards/report/ReportTextImplementation.java
+++ b/wizards/com/sun/star/wizards/report/ReportTextImplementation.java
@@ -690,6 +690,7 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme
         {
 //                    ContentFiles = FileAccess.getFolderTitles(m_xMSF, "cnt", CurReportDocument.getReportPath());
             ContentFiles = FileAccess.getFolderTitles(getMSF(), "cnt", getReportPath());
+            exchangeContentTitlesWithLocalisedOnes(ContentFiles);
         }
         catch (com.sun.star.wizards.common.NoValidPathException e)
         {
@@ -711,6 +712,7 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme
         {
 //                    LayoutFiles = FileAccess.getFolderTitles(m_xMSF, "stl", CurReportDocument.getReportPath());
             LayoutFiles = FileAccess.getFolderTitles(getMSF(), "stl", getReportPath());
+            exchangeLayoutTitlesWithLocalisedOnes(LayoutFiles);
         }
         catch (com.sun.star.wizards.common.NoValidPathException e)
         {
@@ -745,4 +747,134 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme
     public void checkInvariants() throws java.lang.Exception
     {
     }
+
+    private void exchangeContentTitlesWithLocalisedOnes(String[][] ContentFiles)
+    {
+      for(int i = 0; i < ContentFiles[0].length; ++i)
+        {
+          if( ContentFiles[0][i].equals("Align Left - Border") )
+          {
+            ContentFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 94);
+          }
+          else if( ContentFiles[0][i].equals("Align Left - Compact") )
+          {
+            ContentFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 95);
+          }
+          else if( ContentFiles[0][i].equals("Align Left - Elegant") )
+          {
+            ContentFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 96);
+          }
+          else if( ContentFiles[0][i].equals("Align Left - Highlighted") )
+          {
+            ContentFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 97);
+          }
+          else if( ContentFiles[0][i].equals("Align Left - Modern") )
+          {
+            ContentFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 98);
+          }
+          else if( ContentFiles[0][i].equals("Align Left - Red & Blue") )
+          {
+            ContentFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 99);
+          }
+          else if( ContentFiles[0][i].equals("Default") )
+          {
+            ContentFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 100);
+          }
+          else if( ContentFiles[0][i].equals("Outline - Borders") )
+          {
+            ContentFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 101);
+          }
+          else if( ContentFiles[0][i].equals("Outline - Compact") )
+          {
+            ContentFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 102);
+          }
+          else if( ContentFiles[0][i].equals("Outline - Elegant") )
+          {
+            ContentFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 103);
+          }
+          else if( ContentFiles[0][i].equals("Outline - Highlighted") )
+          {
+            ContentFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 104);
+          }
+          else if( ContentFiles[0][i].equals("Outline - Modern") )
+          {
+            ContentFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 105);
+          }
+          else if( ContentFiles[0][i].equals("Outline - Red & Blue") )
+          {
+            ContentFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 106);
+          }
+          else if( ContentFiles[0][i].equals("Outline, indented - Borders") )
+          {
+            ContentFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 107);
+          }
+          else if( ContentFiles[0][i].equals("Outline, indented - Compact") )
+          {
+            ContentFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 108);
+          }
+          else if( ContentFiles[0][i].equals("Outline, indented - Elegant") )
+          {
+            ContentFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 109);
+          }
+          else if( ContentFiles[0][i].equals("Outline, indented - Highlighted") )
+          {
+            ContentFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 110);
+          }
+          else if( ContentFiles[0][i].equals("Outline, indented - Modern") )
+          {
+            ContentFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 111);
+          }
+          else if( ContentFiles[0][i].equals("Outline, indented - Red & Blue") )
+          {
+            ContentFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 112);
+          }
+        }
+    }
+
+    private void exchangeLayoutTitlesWithLocalisedOnes(String[][] LayoutFiles)
+    {
+        for(int i = 0; i < LayoutFiles[0].length; ++i)
+        {
+          if( LayoutFiles[0][i].equals("Bubbles") )
+          {
+            LayoutFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 113);
+          }
+          else if( LayoutFiles[0][i].equals("Cinema") )
+          {
+            LayoutFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 114);
+          }
+          else if( LayoutFiles[0][i].equals("Controlling") )
+          {
+            LayoutFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 115);
+          }
+          else if( LayoutFiles[0][i].equals("Default") )
+          {
+            LayoutFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 116);
+          }
+          else if( LayoutFiles[0][i].equals("Drafting") )
+          {
+            LayoutFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 117);
+          }
+          else if( LayoutFiles[0][i].equals("Finances") )
+          {
+            LayoutFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 118);
+          }
+          else if( LayoutFiles[0][i].equals("Flipchart") )
+          {
+            LayoutFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 119);
+          }
+          else if( LayoutFiles[0][i].equals("Formal with Company Logo") )
+          {
+            LayoutFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 120);
+          }
+          else if( LayoutFiles[0][i].equals("Generic") )
+          {
+            LayoutFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 121);
+          }
+          else if( LayoutFiles[0][i].equals("Worldmap") )
+          {
+            LayoutFiles[0][i] = m_resource.getResText(UIConsts.RID_REPORT + 122);
+          }
+        }
+    }
 }
diff --git a/wizards/com/sun/star/wizards/report/ReportWizard.java b/wizards/com/sun/star/wizards/report/ReportWizard.java
index 16bece7..78905f2 100644
--- a/wizards/com/sun/star/wizards/report/ReportWizard.java
+++ b/wizards/com/sun/star/wizards/report/ReportWizard.java
@@ -338,7 +338,7 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener
         // CurReportDocument.getDoc().xProgressBar.setValue(60);
         CurSortingComponent = new SortingComponent(this, SOSORTPAGE, 95, 30, 210, 34346);
         // CurReportDocument.getDoc().xProgressBar.setValue(70);
-        CurReportLayouter = new ReportLayouter(xMSF, m_reportDocument, this);
+        CurReportLayouter = new ReportLayouter(xMSF, m_reportDocument, this, isReportBuilderInstalled());
         // CurReportDocument.getDoc().xProgressBar.setValue(80);
         CurReportFinalizer = new ReportFinalizer(xMSF, m_reportDocument, this);
         // CurReportDocument.getDoc().xProgressBar.setValue(100);
@@ -481,7 +481,7 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener
             {
                 buildSteps();
 
-                CurReportLayouter.drawConstants();
+                if(!isReportBuilderInstalled()) CurReportLayouter.drawConstants();
 
                 m_reportDocument.checkInvariants();
 
diff --git a/wizards/source/formwizard/dbwizres.src b/wizards/source/formwizard/dbwizres.src
index c31f513..81965a9 100644
--- a/wizards/source/formwizard/dbwizres.src
+++ b/wizards/source/formwizard/dbwizres.src
@@ -21,10 +21,10 @@
 
 // db wizards
 
-#define RID_DB_FORM_WIZARD_START			2200
-#define RID_DB_QUERY_WIZARD_START			2300
+#define RID_DB_FORM_WIZARD_START	2200
+#define RID_DB_QUERY_WIZARD_START	2300
 #define RID_DB_REPORT_WIZARD_START		2400
-#define RID_DB_TABLE_WIZARD_START		2500
+#define RID_DB_TABLE_WIZARD_START	2525
 
 
 #define RID_LETTERWIZARDDIALOG_START		3000
@@ -1488,6 +1488,122 @@ String RID_DB_REPORT_WIZARD_START + 93
 {
     Text [ en-US ] = "Page:";
 };
+String RID_DB_REPORT_WIZARD_START + 94
+{
+    Text [ en-US ] = "Align Left - Border";
+};
+String RID_DB_REPORT_WIZARD_START + 95
+{
+    Text [ en-US ] = "Align Left - Compact";
+};
+String RID_DB_REPORT_WIZARD_START + 96
+{
+    Text [ en-US ] = "Align Left - Elegant";
+};
+String RID_DB_REPORT_WIZARD_START + 97
+{
+    Text [ en-US ] = "Align Left - Highlighted";
+};
+String RID_DB_REPORT_WIZARD_START + 98
+{
+    Text [ en-US ] = "Align Left - Modern";
+};
+String RID_DB_REPORT_WIZARD_START + 99
+{
+    Text [ en-US ] = "Align Left - Red & Blue";
+};
+String RID_DB_REPORT_WIZARD_START + 100
+{
+    Text [ en-US ] = "Default";
+};
+String RID_DB_REPORT_WIZARD_START + 101
+{
+    Text [ en-US ] = "Outline - Borders";
+};
+String RID_DB_REPORT_WIZARD_START + 102
+{
+    Text [ en-US ] = "Outline - Compact";
+};
+String RID_DB_REPORT_WIZARD_START + 103
+{
+    Text [ en-US ] = "Outline - Elegant";
+};
+String RID_DB_REPORT_WIZARD_START + 104
+{
+    Text [ en-US ] = "Outline - Highlighted";
+};
+String RID_DB_REPORT_WIZARD_START + 105
+{
+    Text [ en-US ] = "Outline - Modern";
+};
+String RID_DB_REPORT_WIZARD_START + 106
+{
+    Text [ en-US ] = "Outline - Red & Blue";
+};
+String RID_DB_REPORT_WIZARD_START + 107
+{
+    Text [ en-US ] = "Outline, indented - Borders";
+};
+String RID_DB_REPORT_WIZARD_START + 108
+{
+    Text [ en-US ] = "Outline, indented - Compact";
+};
+String RID_DB_REPORT_WIZARD_START + 109
+{
+    Text [ en-US ] = "Outline, indented - Elegant";
+};
+String RID_DB_REPORT_WIZARD_START + 110
+{
+    Text [ en-US ] = "Outline, indented - Highlighted";
+};
+String RID_DB_REPORT_WIZARD_START + 111
+{
+    Text [ en-US ] = "Outline, indented - Modern";
+};
+String RID_DB_REPORT_WIZARD_START + 112
+{
+    Text [ en-US ] = "Outline, indented - Red & Blue";
+};
+String RID_DB_REPORT_WIZARD_START + 113
+{
+    Text [ en-US ] = "Bubbles";
+};
+String RID_DB_REPORT_WIZARD_START + 114
+{
+    Text [ en-US ] = "Cinema";
+};
+String RID_DB_REPORT_WIZARD_START + 115
+{
+    Text [ en-US ] = "Controlling";
+};
+String RID_DB_REPORT_WIZARD_START + 116
+{
+    Text [ en-US ] = "Default";
+};
+String RID_DB_REPORT_WIZARD_START + 117
+{
+    Text [ en-US ] = "Drafting";
+};
+String RID_DB_REPORT_WIZARD_START + 118
+{
+    Text [ en-US ] = "Finances";
+};
+String RID_DB_REPORT_WIZARD_START + 119
+{
+    Text [ en-US ] = "Flipchart";
+};
+String RID_DB_REPORT_WIZARD_START + 120
+{
+    Text [ en-US ] = "Formal with Company Logo";
+};
+String RID_DB_REPORT_WIZARD_START + 121
+{
+    Text [ en-US ] = "Generic";
+};
+String RID_DB_REPORT_WIZARD_START + 122
+{
+    Text [ en-US ] = "Worldmap";
+};
 
 // ============================================================================
 
@@ -2044,6 +2160,41 @@ String RID_LETTERWIZARDDIALOG_START + 59
     Text [ en-US] = "Subject:";
 };
 
+String RID_LETTERWIZARDDIALOG_START + 60
+{
+    Text [ en-US] = "Elegant";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 61
+{
+    Text [ en-US] = "Modern";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 62
+{
+    Text [ en-US] = "Office";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 63
+{
+    Text [ en-US] = "Bottle";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 64
+{
+    Text [ en-US] = "Mail";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 65
+{
+    Text [ en-US] = "Marine";
+};
+
+String RID_LETTERWIZARDDIALOG_START + 66
+{
+    Text [ en-US] = "Red Line";
+};
+
 //====================== Letter Wizard Greeting Start
 String RID_LETTERWIZARDSALUTATION_START + 1
 {
@@ -2356,6 +2507,40 @@ String RID_FAXWIZARDDIALOG_START + 48
     Text [ en-US] = "Please inform us if transmission errors occur.";
 };
 
+String RID_FAXWIZARDDIALOG_START + 49
+{
+    Text [ en-US] = "Bottle";
+};
+
+String RID_FAXWIZARDDIALOG_START + 50
+{
+    Text [ en-US] = "Lines";
+};
+
+String RID_FAXWIZARDDIALOG_START + 51
+{
+    Text [ en-US] = "Marine";
+};
+
+String RID_FAXWIZARDDIALOG_START + 52
+{
+    Text [ en-US] = "Classic Fax";
+};
+
+String RID_FAXWIZARDDIALOG_START + 53
+{
+    Text [ en-US] = "Classic Fax from Private";
+};
+
+String RID_FAXWIZARDDIALOG_START + 54
+{
+    Text [ en-US] = "Modern Fax";
+};
+
+String RID_FAXWIZARDDIALOG_START + 55
+{
+    Text [ en-US] = "Modern Fax from Private";
+};
 
 //====================== Fax Wizard Communication Start
 String RID_FAXWIZARDCOMMUNICATION_START + 1


More information about the Libreoffice-commits mailing list