summaryrefslogtreecommitdiff
path: root/l10ntools/java/receditor/java/transex3/controller/EditorController.java
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-08-23 15:17:16 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-08-23 15:17:16 +0200
commite71dd58cbb6cbcf4d032db73982239badeeabf22 (patch)
treeb21dfedc3f13ef0ba966efd13da05ff38523e698 /l10ntools/java/receditor/java/transex3/controller/EditorController.java
parent510e316a6f128161e6454fe35053231bd24b5a03 (diff)
recreated tag libreoffice-3.3.0.4 which had these commits:
commit 0fce58acaa20c2e3cd99690e41da991380a0a1a9 (tag: refs/tags/libreoffice-3.3.0.4, refs/remotes/origin/libreoffice-3-3-0) Author: Petr Mladek <pmladek@suse.cz> Date: Tue Jan 18 19:01:20 2011 +0100 Version 3.3.0.4, tag libreoffice-3.3.0.4 (3.3-rc4) commit 6fc21aa74b4d2aba07d854d5d3c2f404905b40ef Author: Tor Lillqvist <tlillqvist@novell.com> Date: Tue Jan 18 16:25:52 2011 +0200 Avoid GetHelpText() call which can be quite heavy GetHelpText() can cause a quite heavy sequence of file and directory lookups. See fdo#33088. As its return value here was just passed on to ShowHelpStatusText() which doesn't do anything at all, it was completely unnecessary. The GetHelpText() calls here caused the noticeable slowdown in highlighting menu items on Windows with lots of localised help files for some bundled extensions. Signed-off-by: Caolan McNamara <caolanm@redhat.com> Signed-off-by: Michael Meeks <michael.meeks@novell.com> Signed-off-by: Thorsten Behrens <thb@documentfoundation.org> Signed-off-by: fstrba@novell.com vcl/source/window/menu.cxx | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) commit 3c2e3b6efc81c5e34c56f0f11723ed848801be35 Author: Luboš Luňák <l.lunak@suse.cz> Date: Tue Jan 18 13:11:00 2011 +0100 do not mix unrelated X11 Visuals (fdo#33108) Do not assume that there is just one generic Visual, as today's XServers are ARGB-capable and cases of both the default depth and 32bit visuals can happen. Signed-off-by: Thorsten Behrens <tbehrens@novell.com> Signed-off-by: Radek Doulik <rodo@novell.com> Signed-off-by: Michael Meeks <michael.meeks@novell.com> vcl/unx/inc/salgdi.h | 2 +- vcl/unx/source/gdi/salgdi.cxx | 17 ++++++++--------- vcl/unx/source/gdi/salgdi3.cxx | 8 -------- 3 files changed, 9 insertions(+), 18 deletions(-) commit 1c9c9180b4105626e9242e5499b67180abf4a53c Author: Andre Fischer <andre.f.fischer@oracle.com> Date: Tue Jan 18 10:41:22 2011 +0100 calc65: #i116318# Fixed the painting of axial gradients. Signed-off-by: Thorsten Behrens <tbehrens@novell.com> (cherry picked from commit ea29f32bd5bc1a937a747bd5a1f5b37f570ed25f) Signed-off-by: Michael Meeks <michael.meeks@novell.com> Signed-off-by: Petr Mladek <pmladek@suse.cz> Signed-off-by: Radek Doulik <rodo@novell.com> cppcanvas/source/mtfrenderer/implrenderer.cxx | 17 +++++++++++++++-- 1 files changed, 15 insertions(+), 2 deletions(-) commit 94ba0c5b10f8089dc549e9fc4f3085622cff65c4 Author: Luboš Luňák <l.lunak@suse.cz> Date: Wed Nov 3 15:17:33 2010 +0100 use sane scrollbar sizes when drawing bnc#619772 leads to a crash because maximum = minimum = 0, and this strange (but for whatever reason needed) '- mnVisibleSize' hack makes maximum be -1, eventually leading to a crash vcl/unx/kde4/KDESalGraphics.cxx | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 4831d49751fd5aa81901cfc0402311ff2d700056 Author: Petr Mladek <pmladek@suse.cz> Date: Tue Jan 11 22:59:37 2011 +0100 Branch libreoffice-3-3-0 This is 'libreoffice-3-3-0' - the stable branch for the 3.3.0 release. Only very safe changes, reviewed by three people are allowed. If you want to commit more complicated fix for the next 3.3.x release, please use the 'libreoffice-3-3' branch. If you want to build something cool, unstable, and risky, use master.
Notes
split repo tag: libs-gui_libreoffice-3.3.0.4
Diffstat (limited to 'l10ntools/java/receditor/java/transex3/controller/EditorController.java')
-rw-r--r--l10ntools/java/receditor/java/transex3/controller/EditorController.java82
1 files changed, 41 insertions, 41 deletions
diff --git a/l10ntools/java/receditor/java/transex3/controller/EditorController.java b/l10ntools/java/receditor/java/transex3/controller/EditorController.java
index 38462d665304..1b5f54556836 100644
--- a/l10ntools/java/receditor/java/transex3/controller/EditorController.java
+++ b/l10ntools/java/receditor/java/transex3/controller/EditorController.java
@@ -26,18 +26,18 @@ public class EditorController {
public final String[] RESTYPES = { ".src",".hrc",".xcu",".xrm",".xhp" };
public final String RECFILE = ".recommand";
// Editor View
- static transex3.view.Editor aEditor = null;
+ static transex3.view.Editor aEditor = null;
// Editor Model
- static Vector sdfstrings = new Vector();
- static HashMap hashedsdfstrings = new HashMap();
+ static Vector sdfstrings = new Vector();
+ static HashMap hashedsdfstrings = new HashMap();
int oldindex = 0;
- //HashMap hashedfilenames = new HashMap();
+ //HashMap hashedfilenames = new HashMap();
// Search for source Strings
public String fetchSourceStrings( String rootdir ){
//String outputfile = "h:\\workspace\\recommandEditor\\null2";
File tempfile = null;
-
+
try {
tempfile = File.createTempFile( "receditor" , "tmp" );
} catch (IOException e1) {
@@ -45,7 +45,7 @@ public class EditorController {
System.err.println("Can not create temp file\n");
e1.printStackTrace();
}
-
+
String outputfile = tempfile.getAbsolutePath();
try
{
@@ -78,17 +78,17 @@ public class EditorController {
findRecommandFiles( aFileArray[ cnt ] , list);
else if( aFileArray[ cnt ].isFile() && isRecommandFile( aFileArray[ cnt ] ) )
list.add( aFileArray[ cnt ]);
- }
+ }
}
}
private boolean isResourceType( File aFile ){
- String filename = aFile.getName();
- boolean isResType = false;
+ String filename = aFile.getName();
+ boolean isResType = false;
for(int cnt = 0; cnt < RESTYPES.length ; cnt++){
if( filename.endsWith( RESTYPES[ cnt ] ) )
isResType = true;
}
- return isResType;
+ return isResType;
}
private boolean isRecommandFile( File aFile ){
return aFile.getName().endsWith( RECFILE );
@@ -105,15 +105,15 @@ public class EditorController {
// Add all data to view
void updateData(){
JTable recTable =transex3.controller.EditorController.aEditor.getRectable();
-
+
SdfString aSdfString = (SdfString) sdfstrings.get( oldindex );
Vector newStrings = new Vector();
for ( int n = 1; n < recTable.getRowCount() ; n++ ){
- String lang = (String) recTable.getValueAt(n , 0 );
- String text = (String) recTable.getValueAt(n , 1 );
- String htext = (String) recTable.getValueAt(n , 2 );
- String qhtext = (String) recTable.getValueAt(n , 3 );
- String ttext = (String) recTable.getValueAt(n , 4 );
+ String lang = (String) recTable.getValueAt(n , 0 );
+ String text = (String) recTable.getValueAt(n , 1 );
+ String htext = (String) recTable.getValueAt(n , 2 );
+ String qhtext = (String) recTable.getValueAt(n , 3 );
+ String ttext = (String) recTable.getValueAt(n , 4 );
if( lang != null && text != null ){
//System.out.println("Data "+ lang + " " + text );
SdfEntity aSdfEntity = new SdfEntity();
@@ -129,7 +129,7 @@ public class EditorController {
}
public void initView(){
- Object[][] sourceStringData = new Object[ sdfstrings.size() ][ 4 ];
+ Object[][] sourceStringData = new Object[ sdfstrings.size() ][ 4 ];
Object[][] firstData = new Object[100][5];
// Set the files
Iterator aIter = sdfstrings.iterator();
@@ -161,11 +161,11 @@ public class EditorController {
counter++;
}
// Set the source srtings
-
-
+
+
//aEditor = new transex3.view.Editor( sourceStringData , filedata.toArray() );
aEditor = new transex3.view.Editor( sourceStringData , firstData );
-
+
aEditor.setBounds(100,100,800,900);
aEditor.setDefaultCloseOperation( WindowConstants.DISPOSE_ON_CLOSE );
aEditor.setVisible(true);
@@ -175,7 +175,7 @@ public class EditorController {
System.exit( 0 );
}
});
-
+
aEditor.getMiExit().addActionListener( new ActionListener(){
public void actionPerformed( ActionEvent e ){
System.exit( 0 );
@@ -219,8 +219,8 @@ public class EditorController {
public void tableChanged( TableModelEvent e ){
//System.out.println( e );
}});
-
-
+
+
aEditor.getRectable().getSelectionModel().addListSelectionListener( new ListSelectionListener(){
public void valueChanged( ListSelectionEvent e ){
JTable aTable = aEditor.getRectable();
@@ -237,29 +237,29 @@ public class EditorController {
//System.out.println("Selected = " +e.getFirstIndex()+"\n");
JTable table =transex3.controller.EditorController.aEditor.getTable();
JTable recTable =transex3.controller.EditorController.aEditor.getRectable();
- SdfString aSdfString;
+ SdfString aSdfString;
JTable aTable = aEditor.getRectable();
if( aTable.getSelectedRow() != -1 && aTable.getSelectedColumn() != -1 )
aTable.getCellEditor( aTable.getSelectedRow(), aTable.getSelectedColumn() ).stopCellEditing();
-
+
updateData();
clearAllRows( recTable );
-
+
aSdfString = (SdfString) sdfstrings.get( table.getSelectedRow() );
recTable.setValueAt( "en-US" , 0, 0 );
- recTable.setValueAt( aSdfString.getSourceString().getText() , 0, 1 );
+ recTable.setValueAt( aSdfString.getSourceString().getText() , 0, 1 );
recTable.setValueAt( aSdfString.getSourceString().getHelptext() , 0, 2 );
recTable.setValueAt( aSdfString.getSourceString().getQuickhelptext() , 0, 3 );
- recTable.setValueAt( aSdfString.getSourceString().getTitle() , 0, 4 );
+ recTable.setValueAt( aSdfString.getSourceString().getTitle() , 0, 4 );
Vector values = aSdfString.getLanguageStrings();
for( int n = 0; n < values.size() ; n++ )
{
SdfEntity aEntity = (SdfEntity) values.get( n );
- recTable.setValueAt( aEntity.getLangid() , n+1 , 0 );
- recTable.setValueAt( aEntity.getText() , n+1 , 1 );
- recTable.setValueAt( aEntity.getHelptext() , n+1 , 2 );
- recTable.setValueAt( aEntity.getQuickhelptext() , n+1 , 3 );
- recTable.setValueAt( aEntity.getTitle() , n+1 , 4 );
+ recTable.setValueAt( aEntity.getLangid() , n+1 , 0 );
+ recTable.setValueAt( aEntity.getText() , n+1 , 1 );
+ recTable.setValueAt( aEntity.getHelptext() , n+1 , 2 );
+ recTable.setValueAt( aEntity.getQuickhelptext() , n+1 , 3 );
+ recTable.setValueAt( aEntity.getTitle() , n+1 , 4 );
}
oldindex = table.getSelectedRow();
}
@@ -280,13 +280,13 @@ public class EditorController {
}
// Connect recommand strings with source strings
public void readStrings( String sourcefiles , Vector recfiles ) {
- BufferedReader aBR = null;
+ BufferedReader aBR = null;
try {
//System.out.println("DBG: sourcefiles = " +sourcefiles);
aBR = new BufferedReader( new FileReader( sourcefiles ) );
String current = aBR.readLine();
- SdfString aSdfString = null;
- SdfEntity aSdfEntity = null;
+ SdfString aSdfString = null;
+ SdfEntity aSdfEntity = null;
while( current != null ){
aSdfEntity = new SdfEntity();
aSdfEntity.setProperties( current );
@@ -296,11 +296,11 @@ public class EditorController {
//System.out.println("Put ID '"+aSdfString.getId()+"'");
sdfstrings.add( aSdfString );
current = aBR.readLine();
-
+
}
Iterator aIter=recfiles.iterator();
File aFile;
- BufferedReader aBR2 = null;
+ BufferedReader aBR2 = null;
//System.out.println("Connecting strings");
while( aIter.hasNext() ){
aFile = (File) aIter.next();
@@ -310,13 +310,13 @@ public class EditorController {
while ( current2 != null ){
SdfEntity aEntity = new SdfEntity();
aEntity.setProperties( current2 );
-
+
if( hashedsdfstrings.containsKey( aEntity.getId() ) )
{
aSdfString = (SdfString) hashedsdfstrings.get( aEntity.getId() );
aSdfString.addLanguageString( aEntity );
}
- else
+ else
{
System.out.println("DBG: Can't find source string '"+aEntity.getId()+"'" );
}
@@ -329,6 +329,6 @@ public class EditorController {
} catch ( IOException e){
e.printStackTrace();
}
-
+
}
}