Author: damjan
Date: Sun Nov  8 14:34:28 2015
New Revision: 1713229

URL: http://svn.apache.org/viewvc?rev=1713229&view=rev
Log:
Use UIConsts constants for offsets to resource IDs in main/wizards.


Modified:
    openoffice/trunk/main/wizards/com/sun/star/wizards/common/FileAccess.java
    
openoffice/trunk/main/wizards/com/sun/star/wizards/common/TerminateWizardException.java
    
openoffice/trunk/main/wizards/com/sun/star/wizards/ui/AggregateComponent.java
    openoffice/trunk/main/wizards/com/sun/star/wizards/ui/FilterComponent.java

Modified: 
openoffice/trunk/main/wizards/com/sun/star/wizards/common/FileAccess.java
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/wizards/com/sun/star/wizards/common/FileAccess.java?rev=1713229&r1=1713228&r2=1713229&view=diff
==============================================================================
--- openoffice/trunk/main/wizards/com/sun/star/wizards/common/FileAccess.java 
(original)
+++ openoffice/trunk/main/wizards/com/sun/star/wizards/common/FileAccess.java 
Sun Nov  8 14:34:28 2015
@@ -22,10 +22,6 @@
 
 package com.sun.star.wizards.common;
 
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.lang.Locale;
-import com.sun.star.uno.Exception;
-import com.sun.star.util.XMacroExpander;
 // import com.sun.star.wizards.common.NoValidPathException;
 import java.io.File;
 import java.util.ArrayList;
@@ -33,17 +29,25 @@ import java.util.Arrays;
 import java.util.Vector;
 
 import com.sun.star.awt.VclWindowPeerAttribute;
+import com.sun.star.beans.PropertyValue;
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.document.XDocumentProperties;
 import com.sun.star.io.XActiveDataSink;
 import com.sun.star.io.XInputStream;
 // import com.sun.star.io.XStream;
 import com.sun.star.io.XTextInputStream;
+import com.sun.star.lang.Locale;
 import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.ucb.*;
+import com.sun.star.ucb.CommandAbortedException;
+import com.sun.star.ucb.XFileIdentifierConverter;
+import com.sun.star.ucb.XSimpleFileAccess;
+import com.sun.star.ucb.XSimpleFileAccess2;
+import com.sun.star.uno.Exception;
 import com.sun.star.uno.UnoRuntime;
 import com.sun.star.uno.XInterface;
 import com.sun.star.util.DateTime;
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.document.XDocumentProperties;
+import com.sun.star.util.XMacroExpander;
+import com.sun.star.wizards.ui.UIConsts;
 
 /**
  * This class delivers static convenience methods
@@ -471,9 +475,9 @@ public class FileAccess
         try
         {
             Resource oResource = new Resource(xMSF, "ImportWizard", "imp");
-            sNoDirCreation = oResource.getResText(1050);
-            String sMsgDirNotThere = oResource.getResText(1051);
-            String sQueryForNewCreation = oResource.getResText(1052);
+            sNoDirCreation = oResource.getResText(UIConsts.RID_DB_COMMON + 50);
+            String sMsgDirNotThere = 
oResource.getResText(UIConsts.RID_DB_COMMON + 51);
+            String sQueryForNewCreation = 
oResource.getResText(UIConsts.RID_DB_COMMON + 52);
             String OSPath = JavaTools.convertfromURLNotation(Path);
             String sQueryMessage = JavaTools.replaceSubString(sMsgDirNotThere, 
OSPath, "%1");
             sQueryMessage = sQueryMessage + (char) 13 + sQueryForNewCreation;

Modified: 
openoffice/trunk/main/wizards/com/sun/star/wizards/common/TerminateWizardException.java
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/wizards/com/sun/star/wizards/common/TerminateWizardException.java?rev=1713229&r1=1713228&r2=1713229&view=diff
==============================================================================
--- 
openoffice/trunk/main/wizards/com/sun/star/wizards/common/TerminateWizardException.java
 (original)
+++ 
openoffice/trunk/main/wizards/com/sun/star/wizards/common/TerminateWizardException.java
 Sun Nov  8 14:34:28 2015
@@ -24,6 +24,7 @@ package com.sun.star.wizards.common;
 
 // import com.sun.star.wizards.common.Resource;
 import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.wizards.ui.UIConsts;
 
 public class TerminateWizardException extends Exception
 {
@@ -31,7 +32,7 @@ public class TerminateWizardException ex
     public TerminateWizardException(XMultiServiceFactory xMSF)
     {
         Resource oResource = new Resource(xMSF, "AutoPilot", "dbw");
-        String sErrorMessage = oResource.getResText(1006);
+        String sErrorMessage = oResource.getResText(UIConsts.RID_DB_COMMON + 
6);
         SystemDialog.showMessageBox(xMSF, "ErrorBox", 
com.sun.star.awt.VclWindowPeerAttribute.OK, sErrorMessage);
         printStackTrace(System.out);
     }

Modified: 
openoffice/trunk/main/wizards/com/sun/star/wizards/ui/AggregateComponent.java
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/wizards/com/sun/star/wizards/ui/AggregateComponent.java?rev=1713229&r1=1713228&r2=1713229&view=diff
==============================================================================
--- 
openoffice/trunk/main/wizards/com/sun/star/wizards/ui/AggregateComponent.java 
(original)
+++ 
openoffice/trunk/main/wizards/com/sun/star/wizards/ui/AggregateComponent.java 
Sun Nov  8 14:34:28 2015
@@ -200,14 +200,13 @@ public class AggregateComponent extends
     {
         if (i == 0)
         {
-            int BaseID = 2300;
-            soptDetailQuery = CurUnoDialog.m_oResource.getResText(BaseID + 11);
-            soptSummaryQuery = CurUnoDialog.m_oResource.getResText(BaseID + 
12);
-            slblAggregate = CurUnoDialog.m_oResource.getResText(BaseID + 16);
-            slblFieldNames = CurUnoDialog.m_oResource.getResText(BaseID + 17);
-            sFunctions = CurUnoDialog.m_oResource.getResArray(BaseID + 40, 4);
+            soptDetailQuery = 
CurUnoDialog.m_oResource.getResText(UIConsts.RID_QUERY + 11);
+            soptSummaryQuery = 
CurUnoDialog.m_oResource.getResText(UIConsts.RID_QUERY + 12);
+            slblAggregate = 
CurUnoDialog.m_oResource.getResText(UIConsts.RID_QUERY + 16);
+            slblFieldNames = 
CurUnoDialog.m_oResource.getResText(UIConsts.RID_QUERY + 17);
+            sFunctions = 
CurUnoDialog.m_oResource.getResArray(UIConsts.RID_QUERY + 40, 4);
 
-            sDuplicateAggregateFunction = 
CurUnoDialog.m_oResource.getResText(BaseID + 90);
+            sDuplicateAggregateFunction = 
CurUnoDialog.m_oResource.getResText(UIConsts.RID_QUERY + 90);
         }
         if (ControlRowVector == null)
         {

Modified: 
openoffice/trunk/main/wizards/com/sun/star/wizards/ui/FilterComponent.java
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/wizards/com/sun/star/wizards/ui/FilterComponent.java?rev=1713229&r1=1713228&r2=1713229&view=diff
==============================================================================
--- openoffice/trunk/main/wizards/com/sun/star/wizards/ui/FilterComponent.java 
(original)
+++ openoffice/trunk/main/wizards/com/sun/star/wizards/ui/FilterComponent.java 
Sun Nov  8 14:34:28 2015
@@ -66,7 +66,6 @@ public class FilterComponent
     private String slblOperators;
     private String slblValue;
     WizardDialog CurUnoDialog;
-    private int BaseID = 2300;
     private String sIncSuffix;
     private ControlRow[] oControlRows;
     private String sDuplicateCondition;
@@ -405,14 +404,14 @@ public class FilterComponent
         boolean bEnabled;
         sIncSuffix = 
com.sun.star.wizards.common.Desktop.getIncrementSuffix(CurUnoDialog.getDlgNameAccess(),
 "optMatchAll");
 
-        String soptMatchAll = CurUnoDialog.m_oResource.getResText(BaseID + 9);
-        String soptMatchAny = CurUnoDialog.m_oResource.getResText(BaseID + 10);
-        slblFieldNames = CurUnoDialog.m_oResource.getResText(BaseID + 17);
-        slblOperators = CurUnoDialog.m_oResource.getResText(BaseID + 24);
-        slblValue = CurUnoDialog.m_oResource.getResText(BaseID + 25);
-        sLogicOperators = CurUnoDialog.m_oResource.getResArray(BaseID + 26, 10 
/* 7 */); // =, <>, <, >, <=, >=, like, !like, is null, !is null
+        String soptMatchAll = 
CurUnoDialog.m_oResource.getResText(UIConsts.RID_QUERY + 9);
+        String soptMatchAny = 
CurUnoDialog.m_oResource.getResText(UIConsts.RID_QUERY + 10);
+        slblFieldNames = 
CurUnoDialog.m_oResource.getResText(UIConsts.RID_QUERY + 17);
+        slblOperators = CurUnoDialog.m_oResource.getResText(UIConsts.RID_QUERY 
+ 24);
+        slblValue = CurUnoDialog.m_oResource.getResText(UIConsts.RID_QUERY + 
25);
+        sLogicOperators = 
CurUnoDialog.m_oResource.getResArray(UIConsts.RID_QUERY + 26, 10 /* 7 */); // 
=, <>, <, >, <=, >=, like, !like, is null, !is null
 
-        sDuplicateCondition = CurUnoDialog.m_oResource.getResText(BaseID + 89);
+        sDuplicateCondition = 
CurUnoDialog.m_oResource.getResText(UIConsts.RID_QUERY + 89);
 
         // create Radiobuttons
         // * match all


Reply via email to