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

2022-12-12 Thread Julien Nabet (via logerrit)
 wizards/com/sun/star/wizards/common/strings.hrc |   10 +-
 wizards/source/resources/resources_en_US.properties |   10 +-
 2 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 1f77a3c5d4d71d868cad47bf0d16d6177753b79e
Author: Julien Nabet 
AuthorDate: Fri Dec 9 13:12:11 2022 +0100
Commit: Christian Lohmaier 
CommitDate: Mon Dec 12 11:29:06 2022 +

PRODUCTNAME -> %PRODUCTNAME

Spotted thanks to:
grep -nR PRODUCTNAME *|grep -v \%PRODUCTNAME|grep -v '${PRODUCTNAME}'|grep 
-v '\[PRODUCTNAME\]'|grep -v '\[FULLPRODUCTNAME\]'
suggested in tdf#152265 UI: "tip of the day: placeholder "PRODUCTNAME" in 
text of the tip"

Change-Id: I5292eeb1767404f2aa31f4b51b410a29afafcd6d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143851
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/wizards/com/sun/star/wizards/common/strings.hrc 
b/wizards/com/sun/star/wizards/common/strings.hrc
index bb3f07237961..d176df485b50 100644
--- a/wizards/com/sun/star/wizards/common/strings.hrc
+++ b/wizards/com/sun/star/wizards/common/strings.hrc
@@ -30,11 +30,11 @@ def NC_(context, string):
 
 # common section
 RID_COMMON_START_0  = NC_("RID_COMMON_START_0", "The 
directory '%1' could not be created.There may not be enough space left on 
your hard disk.")
-RID_COMMON_START_1  = NC_("RID_COMMON_START_1", "The text 
document could not be created.Please check if the module 'PRODUCTNAME 
Writer' is installed.")
-RID_COMMON_START_2  = NC_("RID_COMMON_START_2", "The 
spreadsheet could not be created.Please check if the module 'PRODUCTNAME 
Calc' is installed.")
-RID_COMMON_START_3  = NC_("RID_COMMON_START_3", "The 
presentation could not be created.Please check if the module 'PRODUCTNAME 
Impress' is installed.")
-RID_COMMON_START_4  = NC_("RID_COMMON_START_4", "The 
drawing could not be created.Please check if the module 'PRODUCTNAME Draw' 
is installed.")
-RID_COMMON_START_5  = NC_("RID_COMMON_START_5", "The 
formula could not be created.Please check if the module 'PRODUCTNAME Math' 
is installed.")
+RID_COMMON_START_1  = NC_("RID_COMMON_START_1", "The text 
document could not be created.Please check if the module '%PRODUCTNAME 
Writer' is installed.")
+RID_COMMON_START_2  = NC_("RID_COMMON_START_2", "The 
spreadsheet could not be created.Please check if the module '%PRODUCTNAME 
Calc' is installed.")
+RID_COMMON_START_3  = NC_("RID_COMMON_START_3", "The 
presentation could not be created.Please check if the module '%PRODUCTNAME 
Impress' is installed.")
+RID_COMMON_START_4  = NC_("RID_COMMON_START_4", "The 
drawing could not be created.Please check if the module '%PRODUCTNAME Draw' 
is installed.")
+RID_COMMON_START_5  = NC_("RID_COMMON_START_5", "The 
formula could not be created.Please check if the module '%PRODUCTNAME Math' 
is installed.")
 RID_COMMON_START_6  = NC_("RID_COMMON_START_6", "The files 
required could not be found.Please start the %PRODUCTNAME Setup and choose 
'Repair'.")
 RID_COMMON_START_7  = NC_("RID_COMMON_START_7", "The file 
'' already exists.Would you like to overwrite the existing file?")
 RID_COMMON_START_8  = NC_("RID_COMMON_START_8", "Yes")
diff --git a/wizards/source/resources/resources_en_US.properties 
b/wizards/source/resources/resources_en_US.properties
index 8649b2500e6a..d75cb03bdf05 100644
--- a/wizards/source/resources/resources_en_US.properties
+++ b/wizards/source/resources/resources_en_US.properties
@@ -23,11 +23,11 @@
 #  resources for com.sun.star.wizards
 #
 RID_COMMON_0=The directory '%1' could not be created.There may not be 
enough space left on your hard disk.
-RID_COMMON_1=The text document could not be created.Please check if the 
module 'PRODUCTNAME Writer' is installed.
-RID_COMMON_2=The spreadsheet could not be created.Please check if the 
module 'PRODUCTNAME Calc' is installed.
-RID_COMMON_3=The presentation could not be created.Please check if the 
module 'PRODUCTNAME Impress' is installed.
-RID_COMMON_4=The drawing could not be created.Please check if the module 
'PRODUCTNAME Draw' is installed.
-RID_COMMON_5=The formula could not be created.Please check if the module 
'PRODUCTNAME Math' is installed.
+RID_COMMON_1=The text document could not be created.Please check if the 
module '%PRODUCTNAME Writer' is installed.
+RID_COMMON_2=The spreadsheet could not be created.Please check if the 
module '%PRODUCTNAME Calc' is installed.
+RID_COMMON_3=The presentation could not be created.Please check if the 
module '%PRODUCTNAME Impress' is installed.
+RID_COMMON_4=The drawing could not be created.Please check if the module 
'%PRODUCTNAME Draw' is installed.
+RID_COMMON_5=The formula could not be created.Please check 

[Libreoffice-commits] core.git: wizards/com

2022-09-12 Thread Caolán McNamara (via logerrit)
 wizards/com/sun/star/wizards/report/DBColumn.java |   16 +---
 1 file changed, 5 insertions(+), 11 deletions(-)

New commits:
commit a6c272bff62f6ec215a11c61fd319784299a12ba
Author: Caolán McNamara 
AuthorDate: Mon Sep 12 16:04:13 2022 +0100
Commit: Caolán McNamara 
CommitDate: Mon Sep 12 20:43:47 2022 +0200

ofz#1509303 DCN: Don't Catch NullPointer Exception

this is since:

commit 8e63258a355d1b74fff89c39369e0ec72091e625
Date:   Wed Jun 25 13:32:18 2008 +

INTEGRATION: CWS rptwizard01 (1.12.68); FILE MERGED
2008/05/21 10:14:32 lla 1.12.68.3: RESYNC: (1.12-1.13); FILE MERGED
2008/04/14 09:11:53 lla 1.12.68.2: #i86092# handle nullpointer, add TODO
2008/02/14 13:00:48 lla 1.12.68.1: #i86092# changes for new Report 
Wizard

Change-Id: I6cb8938c311cf0432728ae06b08e16bffba39be3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139808
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/wizards/com/sun/star/wizards/report/DBColumn.java 
b/wizards/com/sun/star/wizards/report/DBColumn.java
index 5ca1f56a8844..22fe7e657e37 100644
--- a/wizards/com/sun/star/wizards/report/DBColumn.java
+++ b/wizards/com/sun/star/wizards/report/DBColumn.java
@@ -152,17 +152,11 @@ public class DBColumn
 XCell xCell;
 getTableColumns(TableName);
 
-XTableRows xRows = null;
-try
-{
-xRows = xTextTable.getRows();
-}
-catch (java.lang.NullPointerException e)
-{
-e.printStackTrace();
-// TODO: handle the nullpointer right
-//return;
-}
+if (xTextTable == null)
+return;
+
+XTableRows xRows = xTextTable.getRows();
+
 for (int n = 0; n < xTableColumns.getCount(); n++)
 {
 for (int m = 0; m < xRows.getCount(); m++)


[Libreoffice-commits] core.git: wizards/com

2022-06-07 Thread Noel Grandin (via logerrit)
 wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.py |   26 
+++--
 wizards/com/sun/star/wizards/common/NoValidPathException.py|   26 
+++--
 wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py   |   27 
+++---
 wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py |   25 
+++--
 wizards/com/sun/star/wizards/ui/WizardDialog.py|   27 
+++---
 5 files changed, 105 insertions(+), 26 deletions(-)

New commits:
commit e55e3e1362910a9ea38b8283f5bb2b886e803cf3
Author: Noel Grandin 
AuthorDate: Mon Jun 6 12:21:16 2022 +0200
Commit: Noel Grandin 
CommitDate: Tue Jun 7 13:37:02 2022 +0200

use more complex scheme on newer Python (>=3.7) to avoid DeprecationWarning

similiar to commit 069f0eb13f7d26ce4b854160bbb9592c25609b38

Change-Id: I08577ced705df620d99781da53b6085398f52821
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135450
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.py 
b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.py
index 15631123fbcb..9d42e6317f95 100644
--- a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.py
+++ b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.py
@@ -26,15 +26,31 @@ class AgendaWizardDialogResources(object):
 def __init__(self):
 import sys, os
 
-# imp is deprecated since Python v.3.4
-if sys.version_info >= (3,3):
+if sys.version_info < (3,4):
+import imp
+imp.load_source('strings', os.path.join(os.path.dirname(__file__), 
'../common/strings.hrc'))
+import strings
+elif sys.version_info < (3,7):
+# imp is deprecated since Python v.3.4
 from importlib.machinery import SourceFileLoader
 SourceFileLoader('strings', 
os.path.join(os.path.dirname(__file__), '../common/strings.hrc')).load_module()
+import strings
 else:
-import imp
-imp.load_source('strings', os.path.join(os.path.dirname(__file__), 
'../common/strings.hrc'))
+# have to jump through hoops since 3.7, partly because python does 
not like loading modules that do have a .py extension
+import importlib
+import importlib.util
+import importlib.machinery
+module_name = 'strings'
+path = os.path.join(os.path.dirname(__file__), 
'../common/strings.hrc')
+spec = importlib.util.spec_from_loader(
+module_name,
+importlib.machinery.SourceFileLoader(module_name, path)
+)
+module = importlib.util.module_from_spec(spec)
+spec.loader.exec_module(module)
+sys.modules[module_name] = module
+strings = module
 
-import strings
 
 self.resAgendaWizardDialog_title = 
strings.RID_AGENDAWIZARDDIALOG_START_1
 self.resoptMakeChanges_value = strings.RID_AGENDAWIZARDDIALOG_START_2
diff --git a/wizards/com/sun/star/wizards/common/NoValidPathException.py 
b/wizards/com/sun/star/wizards/common/NoValidPathException.py
index 54fb58613c09..565f67fefcee 100644
--- a/wizards/com/sun/star/wizards/common/NoValidPathException.py
+++ b/wizards/com/sun/star/wizards/common/NoValidPathException.py
@@ -24,14 +24,30 @@ class NoValidPathException(Exception):
 if xMSF:
 import sys, os
 
-# imp is deprecated since Python v.3.4
-if sys.version_info >= (3,3):
+if sys.version_info < (3,4):
+import imp
+imp.load_source('strings', 
os.path.join(os.path.dirname(__file__), '../common/strings.hrc'))
+import strings
+elif sys.version_info < (3,7):
+# imp is deprecated since Python v.3.4
 from importlib.machinery import SourceFileLoader
 SourceFileLoader('strings', 
os.path.join(os.path.dirname(__file__), '../common/strings.hrc')).load_module()
+import strings
 else:
-import imp
-imp.load_source('strings', 
os.path.join(os.path.dirname(__file__), '../common/strings.hrc'))
+# have to jump through hoops since 3.7, partly because python 
does not like loading modules that do have a .py extension
+import importlib
+import importlib.util
+import importlib.machinery
+module_name = 'strings'
+path = os.path.join(os.path.dirname(__file__), 
'../common/strings.hrc')
+spec = importlib.util.spec_from_loader(
+module_name,
+importlib.machinery.SourceFileLoader(module_name, path)
+)
+module = importlib.util.module_from_spec(spec)
+spec.loader.exec_module(module)
+ 

[Libreoffice-commits] core.git: wizards/com

2021-09-11 Thread Julien Nabet (via logerrit)
 wizards/com/sun/star/wizards/table/TableWizard.java |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 380550fb478b20deca980e5eefd7a8ce7703263d
Author: Julien Nabet 
AuthorDate: Sat Sep 11 20:42:04 2021 +0200
Commit: Julien Nabet 
CommitDate: Sun Sep 12 07:51:29 2021 +0200

Typo: bIsSuccessfull->bIsSuccessful

Change-Id: Ib811f39fea5c0e78405f805f6c278b4b529b17d8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121964
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/wizards/com/sun/star/wizards/table/TableWizard.java 
b/wizards/com/sun/star/wizards/table/TableWizard.java
index 282796a3e4ff..67e0f537fe67 100644
--- a/wizards/com/sun/star/wizards/table/TableWizard.java
+++ b/wizards/com/sun/star/wizards/table/TableWizard.java
@@ -232,7 +232,7 @@ public class TableWizard extends DatabaseObjectWizard 
implements XTextListener
 
 private boolean createTable()
 {
-boolean bIsSuccessfull = true;
+boolean bIsSuccessful = true;
 boolean bTableCreated = false;
 String schemaname = curFinalizer.getSchemaName();
 String catalogname = curFinalizer.getCatalogName();
@@ -242,19 +242,19 @@ public class TableWizard extends DatabaseObjectWizard 
implements XTextListener
 if (keyfieldnames != null && keyfieldnames.length > 0)
 {
 boolean bIsAutoIncrement = 
curPrimaryKeyHandler.isAutoIncremented();
-bIsSuccessfull = curTableDescriptor.createTable(catalogname, 
schemaname, tablename, keyfieldnames, bIsAutoIncrement);
+bIsSuccessful = curTableDescriptor.createTable(catalogname, 
schemaname, tablename, keyfieldnames, bIsAutoIncrement);
 bTableCreated = true;
 }
 }
 if (!bTableCreated)
 {
-bIsSuccessfull = curTableDescriptor.createTable(catalogname, 
schemaname, tablename);
+bIsSuccessful = curTableDescriptor.createTable(catalogname, 
schemaname, tablename);
 }
-if ((!bIsSuccessfull) && (curPrimaryKeyHandler.isAutomaticMode()))
+if ((!bIsSuccessful) && (curPrimaryKeyHandler.isAutomaticMode()))
 {
 
curTableDescriptor.dropColumnbyName(curPrimaryKeyHandler.getAutomaticFieldName());
 }
-return bIsSuccessfull;
+return bIsSuccessful;
 }
 
 @Override


[Libreoffice-commits] core.git: wizards/com

2020-09-01 Thread Andrea Gelmini (via logerrit)
 wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit e22408d15f74f3aa4be324fa00978f7041882673
Author: Andrea Gelmini 
AuthorDate: Mon Aug 31 14:50:09 2020 +0200
Commit: Julien Nabet 
CommitDate: Tue Sep 1 09:25:39 2020 +0200

Fix typo in code

It passed "make check" on Linux

Change-Id: I937be6f80272db668fff7fb77e5f7f2dd402c23e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101780
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java 
b/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java
index 6bd2ae6e8e92..289f76dd36d4 100644
--- a/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java
+++ b/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java
@@ -52,14 +52,14 @@ public class PrimaryKeyHandler implements 
XFieldSelectionListener
 private final FieldSelection curPrimaryKeySelection;
 private String[] fieldnames;
 private final TableDescriptor curTableDescriptor;
-private final boolean bAutoPrimaryKeysupportsAutoIncrmentation;
+private final boolean bAutoPrimaryKeysupportsAutoIncrementation;
 private static final String SAUTOMATICKEYFIELDNAME = "ID";
 
 public PrimaryKeyHandler(TableWizard _CurUnoDialog, TableDescriptor 
_curTableDescriptor)
 {
 this.CurUnoDialog = _CurUnoDialog;
 curTableDescriptor = _curTableDescriptor;
-bAutoPrimaryKeysupportsAutoIncrmentation = 
curTableDescriptor.oTypeInspector.isAutoIncrementationSupported();
+bAutoPrimaryKeysupportsAutoIncrementation = 
curTableDescriptor.oTypeInspector.isAutoIncrementationSupported();
 short curtabindex = (short) ((TableWizard.SOPRIMARYKEYPAGE * 100) - 
20);
 Integer IPRIMEKEYSTEP = Integer.valueOf(TableWizard.SOPRIMARYKEYPAGE);
 final String sExplanations = 
CurUnoDialog.m_oResource.getResText("RID_TABLE_26");
@@ -274,7 +274,7 @@ public class PrimaryKeyHandler implements 
XFieldSelectionListener
 {
 boolean bdoEnable = (this.chkcreatePrimaryKey.getState() == 1);
 Helper.setUnoPropertyValue(UnoDialog.getModel(optAddAutomatically), 
PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bdoEnable));
-
Helper.setUnoPropertyValue(UnoDialog.getModel(chkApplyAutoValueAutomatic), 
PropertyNames.PROPERTY_ENABLED, 
Boolean.valueOf(bAutoPrimaryKeysupportsAutoIncrmentation && bdoEnable));
+
Helper.setUnoPropertyValue(UnoDialog.getModel(chkApplyAutoValueAutomatic), 
PropertyNames.PROPERTY_ENABLED, 
Boolean.valueOf(bAutoPrimaryKeysupportsAutoIncrementation && bdoEnable));
 Helper.setUnoPropertyValue(UnoDialog.getModel(optUseExisting), 
PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bdoEnable));
 Helper.setUnoPropertyValue(UnoDialog.getModel(optUseSeveral), 
PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bdoEnable));
 //toggle subcontrols of the radiobuttons...
@@ -386,7 +386,7 @@ public class PrimaryKeyHandler implements 
XFieldSelectionListener
 try
 {
 boolean bisAutomaticMode = 
AnyConverter.toBoolean(Helper.getUnoPropertyValue(UnoDialog.getModel(optAddAutomatically),
 PropertyNames.PROPERTY_ENABLED));
-boolean bdoenable = bAutoPrimaryKeysupportsAutoIncrmentation && 
optAddAutomatically.getState() && bisAutomaticMode;
+boolean bdoenable = bAutoPrimaryKeysupportsAutoIncrementation && 
optAddAutomatically.getState() && bisAutomaticMode;
 
Helper.setUnoPropertyValue(UnoDialog.getModel(chkApplyAutoValueAutomatic), 
PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bdoenable));
 }
 catch (IllegalArgumentException e)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com xmloff/source

2020-08-23 Thread Andrea Gelmini (via logerrit)
 wizards/com/sun/star/wizards/query/QueryWizard.java |2 +-
 xmloff/source/core/unointerfacetouniqueidentifiermapper.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 2ddf7c865d78f421417a27f3266188461ee8db0d
Author: Andrea Gelmini 
AuthorDate: Sat Aug 22 18:52:32 2020 +0200
Commit: Julien Nabet 
CommitDate: Sun Aug 23 11:10:57 2020 +0200

Fix typos

Change-Id: I6e3e5df63adc7acdac7f41adc1988a734580b084
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101219
Tested-by: Julien Nabet 
Reviewed-by: Julien Nabet 

diff --git a/wizards/com/sun/star/wizards/query/QueryWizard.java 
b/wizards/com/sun/star/wizards/query/QueryWizard.java
index 6c6683a6dffb..8f460e55ef07 100644
--- a/wizards/com/sun/star/wizards/query/QueryWizard.java
+++ b/wizards/com/sun/star/wizards/query/QueryWizard.java
@@ -92,7 +92,7 @@ public class QueryWizard extends DatabaseObjectWizard
 if (m_DBMetaData.getConnection(m_wizardContext))
 {
 reslblFields = m_oResource.getResText("RID_QUERY_4");
-reslblFieldHeader = m_oResource.getResText("RID_QUERY_19"); 
//Fielnames in  AliasComponent
+reslblFieldHeader = m_oResource.getResText("RID_QUERY_19"); 
//Fieldnames in  AliasComponent
 reslblAliasHeader = m_oResource.getResText("RID_QUERY_20"); 
//Fieldtitles header in  AliasComponent
 reslblSelFields = m_oResource.getResText("RID_QUERY_50");
 reslblTables = m_oResource.getResText("RID_QUERY_3");
diff --git a/xmloff/source/core/unointerfacetouniqueidentifiermapper.cxx 
b/xmloff/source/core/unointerfacetouniqueidentifiermapper.cxx
index ce54fe971d44..4884d0ba5823 100644
--- a/xmloff/source/core/unointerfacetouniqueidentifiermapper.cxx
+++ b/xmloff/source/core/unointerfacetouniqueidentifiermapper.cxx
@@ -87,7 +87,7 @@ bool UnoInterfaceToUniqueIdentifierMapper::registerReference( 
const OUString& rI
 while(nLength--)
 {
 if( (*p < '0') || (*p > '9') )
-return true; // a custom id, that will never conflict with 
genereated id's
+return true; // a custom id, that will never conflict with 
generated id's
 p++;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2020-08-21 Thread Andrea Gelmini (via logerrit)
 wizards/com/sun/star/wizards/query/QueryWizard.java |2 +-
 wizards/com/sun/star/wizards/ui/FieldSelection.java |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 1ea59a67ddd368c34e38f0a0e293050cd25fd5a4
Author: Andrea Gelmini 
AuthorDate: Thu Aug 20 13:03:19 2020 +0200
Commit: Julien Nabet 
CommitDate: Fri Aug 21 09:58:33 2020 +0200

Fix typo in code

Change-Id: Ic3dd9e648d8006c68eb31f9577ad74e6dcbb1b1e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101102
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/wizards/com/sun/star/wizards/query/QueryWizard.java 
b/wizards/com/sun/star/wizards/query/QueryWizard.java
index e67310d96d11..6c6683a6dffb 100644
--- a/wizards/com/sun/star/wizards/query/QueryWizard.java
+++ b/wizards/com/sun/star/wizards/query/QueryWizard.java
@@ -361,7 +361,7 @@ public class QueryWizard extends DatabaseObjectWizard
 {
 m_DBMetaData.setNonAggregateFieldNames();
 
m_groupFieldSelection.initialize(m_DBMetaData.getUniqueAggregateFieldNames(), 
false, m_DBMetaData.xDBMetaData.getMaxColumnsInGroupBy());
-
m_groupFieldSelection.intializeSelectedFields(m_DBMetaData.NonAggregateFieldNames);
+
m_groupFieldSelection.initializeSelectedFields(m_DBMetaData.NonAggregateFieldNames);
 m_groupFieldSelection.setMultipleMode(false);
 setStepEnabled(SOGROUPFILTER_PAGE, 
m_aggregateComponent.isGroupingpossible() && 
m_DBMetaData.NonAggregateFieldNames.length > 0);
 }
diff --git a/wizards/com/sun/star/wizards/ui/FieldSelection.java 
b/wizards/com/sun/star/wizards/ui/FieldSelection.java
index 1f2179f08fb4..2c192ca6f4aa 100644
--- a/wizards/com/sun/star/wizards/ui/FieldSelection.java
+++ b/wizards/com/sun/star/wizards/ui/FieldSelection.java
@@ -474,7 +474,7 @@ public class FieldSelection
 
 
 
-public void intializeSelectedFields(String[] _SelectedFieldNames)
+public void initializeSelectedFields(String[] _SelectedFieldNames)
 {
 xSelectedFieldsListBox.addItems(_SelectedFieldNames, 
xSelectedFieldsListBox.getItemCount());
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2020-08-12 Thread Mike Kaganski (via logerrit)
 wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.py |   12 
--
 wizards/com/sun/star/wizards/common/NoValidPathException.py|   12 
--
 wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py   |   12 
--
 wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py |   12 
--
 wizards/com/sun/star/wizards/ui/WizardDialog.py|   12 
--
 5 files changed, 50 insertions(+), 10 deletions(-)

New commits:
commit 4cdd446b090e3b04cd36d9bd992ca020381c039e
Author: Mike Kaganski 
AuthorDate: Wed Aug 12 17:52:35 2020 +0200
Commit: Mike Kaganski 
CommitDate: Wed Aug 12 20:45:09 2020 +0200

imp is deprecated since Python v.3.4

This avoid Python warnings about this during checks

Change-Id: I6647d9c93f3c2fbc1af475f8bc45e03300ee8b79
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100518
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.py 
b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.py
index b1d53de6b4f6..15631123fbcb 100644
--- a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.py
+++ b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.py
@@ -24,8 +24,16 @@ class AgendaWizardDialogResources(object):
 SECTION_MINUTES = "MINUTES"
 
 def __init__(self):
-import imp, os
-imp.load_source('strings', os.path.join(os.path.dirname(__file__), 
'../common/strings.hrc'))
+import sys, os
+
+# imp is deprecated since Python v.3.4
+if sys.version_info >= (3,3):
+from importlib.machinery import SourceFileLoader
+SourceFileLoader('strings', 
os.path.join(os.path.dirname(__file__), '../common/strings.hrc')).load_module()
+else:
+import imp
+imp.load_source('strings', os.path.join(os.path.dirname(__file__), 
'../common/strings.hrc'))
+
 import strings
 
 self.resAgendaWizardDialog_title = 
strings.RID_AGENDAWIZARDDIALOG_START_1
diff --git a/wizards/com/sun/star/wizards/common/NoValidPathException.py 
b/wizards/com/sun/star/wizards/common/NoValidPathException.py
index 07794852710f..54fb58613c09 100644
--- a/wizards/com/sun/star/wizards/common/NoValidPathException.py
+++ b/wizards/com/sun/star/wizards/common/NoValidPathException.py
@@ -22,8 +22,16 @@ class NoValidPathException(Exception):
 # TODO: NEVER open a dialog in an exception
 from .SystemDialog import SystemDialog
 if xMSF:
-import imp, os
-imp.load_source('strings', os.path.join(os.path.dirname(__file__), 
'../common/strings.hrc'))
+import sys, os
+
+# imp is deprecated since Python v.3.4
+if sys.version_info >= (3,3):
+from importlib.machinery import SourceFileLoader
+SourceFileLoader('strings', 
os.path.join(os.path.dirname(__file__), '../common/strings.hrc')).load_module()
+else:
+import imp
+imp.load_source('strings', 
os.path.join(os.path.dirname(__file__), '../common/strings.hrc'))
+
 import strings
 SystemDialog.showErrorBox(xMSF, strings.RID_COMMON_START_21) 
#OfficePathnotavailable
 
diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py 
b/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py
index 6ee89bf9b680..a5bd469df80f 100644
--- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py
+++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py
@@ -19,8 +19,16 @@
 class FaxWizardDialogResources(object):
 
 def __init__(self):
-import imp, os
-imp.load_source('strings', os.path.join(os.path.dirname(__file__), 
'../common/strings.hrc'))
+import sys, os
+
+# imp is deprecated since Python v.3.4
+if sys.version_info >= (3,3):
+from importlib.machinery import SourceFileLoader
+SourceFileLoader('strings', 
os.path.join(os.path.dirname(__file__), '../common/strings.hrc')).load_module()
+else:
+import imp
+imp.load_source('strings', os.path.join(os.path.dirname(__file__), 
'../common/strings.hrc'))
+
 import strings
 
 self.resFaxWizardDialog_title = strings.RID_FAXWIZARDDIALOG_START_1
diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py 
b/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py
index 34a82cfd552b..19ef40c4a576 100644
--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py
+++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py
@@ -19,8 +19,16 @@
 class LetterWizardDialogResources(object):
 
 def __init__(self):
-import imp, os
-imp.load_source('strings', os.path.join(os.path.dirname(__file__), 
'../common/strings.hrc'))
+import sys, os
+
+ 

[Libreoffice-commits] core.git: wizards/com

2020-05-08 Thread Julien Nabet (via logerrit)
 wizards/com/sun/star/wizards/agenda/AgendaDocument.py   |   10 +-
 wizards/com/sun/star/wizards/common/Desktop.py  |3 ---
 wizards/com/sun/star/wizards/common/SystemDialog.py |2 +-
 wizards/com/sun/star/wizards/document/OfficeDocument.py |5 +++--
 wizards/com/sun/star/wizards/text/TextDocument.py   |4 ++--
 wizards/com/sun/star/wizards/ui/PathSelection.py|6 +++---
 wizards/com/sun/star/wizards/ui/UnoDialog2.py   |3 ++-
 wizards/com/sun/star/wizards/ui/WizardDialog.py |6 +++---
 8 files changed, 19 insertions(+), 20 deletions(-)

New commits:
commit 62f77e94702657aa25e247da71dab012e280679e
Author: Julien Nabet 
AuthorDate: Thu May 7 23:16:29 2020 +0200
Commit: Noel Grandin 
CommitDate: Fri May 8 11:01:13 2020 +0200

pyflakes3: fix some reports on wizards

Change-Id: I0fef17ccc8f110d1d8bf629737807f1bcc618b76
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93685
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/wizards/com/sun/star/wizards/agenda/AgendaDocument.py 
b/wizards/com/sun/star/wizards/agenda/AgendaDocument.py
index 5989158fcbd6..b96fe44cf150 100644
--- a/wizards/com/sun/star/wizards/agenda/AgendaDocument.py
+++ b/wizards/com/sun/star/wizards/agenda/AgendaDocument.py
@@ -473,13 +473,13 @@ class AgendaDocument(TextDocument):
 itemText = item.String.lstrip().lower()
 if itemText == \
 self.templateConsts.FILLIN_MINUTE_NUM:
-fillMinutesItem(item, topic[0].Value, "")
+self.fillMinutesItem(item, topic[0].Value, "")
 elif itemText == \
 self.templateConsts.FILLIN_MINUTE_TOPIC:
-fillMinutesItem(item, topic[1].Value, "")
+self.fillMinutesItem(item, topic[1].Value, "")
 elif itemText == \
 self.templateConsts.FILLIN_MINUTE_RESPONSIBLE:
-fillMinutesItem(item, topic[2].Value, "")
+self.fillMinutesItem(item, topic[2].Value, "")
 elif itemText == \
 self.templateConsts.FILLIN_MINUTE_TIME:
 topicTime = 0
@@ -499,7 +499,7 @@ class AgendaDocument(TextDocument):
 topicStartTime += topicTime * 1000
 time += str(topicStartTime)
 
-fillMinutesItem(item, time, "")
+self.fillMinutesItem(item, time, "")
 
 self.textSectionHandler.removeTextSectionbyName(
 self.templateConsts.SECTION_MINUTES)
@@ -528,7 +528,7 @@ class AgendaDocument(TextDocument):
 Range.ParaStyleName = paraStyle
 if text is None or text == "":
 if placeholder is not None and not placeholder == "":
-placeHolder = createPlaceHolder(
+placeHolder = self.createPlaceHolder(
 self.xTextDocument, placeholder,
 self.resources.resPlaceHolderHint)
 try:
diff --git a/wizards/com/sun/star/wizards/common/Desktop.py 
b/wizards/com/sun/star/wizards/common/Desktop.py
index 2715ffb75274..99c9d60d8384 100644
--- a/wizards/com/sun/star/wizards/common/Desktop.py
+++ b/wizards/com/sun/star/wizards/common/Desktop.py
@@ -22,9 +22,6 @@ from com.sun.star.frame.FrameSearchFlag import ALL
 from com.sun.star.util import URL
 from com.sun.star.i18n.KParseTokens import ANY_LETTER_OR_NUMBER, ASC_UNDERSCORE
 
-from com.sun.star.util import URL
-
-
 class Desktop(object):
 
 @classmethod
diff --git a/wizards/com/sun/star/wizards/common/SystemDialog.py 
b/wizards/com/sun/star/wizards/common/SystemDialog.py
index 5dccd8231102..412029213039 100644
--- a/wizards/com/sun/star/wizards/common/SystemDialog.py
+++ b/wizards/com/sun/star/wizards/common/SystemDialog.py
@@ -113,7 +113,7 @@ class SystemDialog(object):
 if i is not None and i.Name == "UIName":
 return str(i.Value).replace("%productname%", "LibreOffice")
 
-raise NullPointerException(
+raise Exception(
 "UIName property not found for Filter " + filterName);
 except Exception:
 traceback.print_exc()
diff --git a/wizards/com/sun/star/wizards/document/OfficeDocument.py 
b/wizards/com/sun/star/wizards/document/OfficeDocument.py
index cb7c1cebeb33..1483f902da17 100644
--- a/wizards/com/sun/star/wizards/document/OfficeDocument.py
+++ b/wizards/com/sun/star/wizards/document/OfficeDocument.py
@@ -19,6 +19,7 @@ import uno
 import traceback
 from unohelper import systemPathToFileUrl, absolutize
 from ..common.Desktop import Desktop
+from ..common.SystemDialog import SystemDialog
 
 from com.sun.star.awt import 

[Libreoffice-commits] core.git: wizards/com

2020-05-06 Thread Julien Nabet (via logerrit)
 wizards/com/sun/star/wizards/agenda/AgendaDocument.py   |2 +-
 wizards/com/sun/star/wizards/agenda/TopicsControl.py|2 +-
 wizards/com/sun/star/wizards/document/OfficeDocument.py |2 +-
 wizards/com/sun/star/wizards/text/TextSectionHandler.py |2 +-
 wizards/com/sun/star/wizards/ui/UnoDialog.py|2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 1a64567a977a756771ad85783067fe056c7a9da4
Author: Julien Nabet 
AuthorDate: Wed May 6 08:33:55 2020 +0200
Commit: Xisco Faulí 
CommitDate: Wed May 6 23:50:40 2020 +0200

pyflakes3: replace IllegalArgumentException by Exception (wizards)

IllegalArgumentException doesn't exist

Change-Id: Ifea6f56d19fb58136ac5d992107ab7179ac943b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93524
Tested-by: Jenkins
Reviewed-by: Xisco Faulí 

diff --git a/wizards/com/sun/star/wizards/agenda/AgendaDocument.py 
b/wizards/com/sun/star/wizards/agenda/AgendaDocument.py
index 567a1f1ae434..5989158fcbd6 100644
--- a/wizards/com/sun/star/wizards/agenda/AgendaDocument.py
+++ b/wizards/com/sun/star/wizards/agenda/AgendaDocument.py
@@ -373,7 +373,7 @@ class AgendaDocument(TextDocument):
 self.teLocation.placeHolderText = self.agenda.cp_Location
 self.teLocation.write(self.trLocation)
 else:
-raise IllegalArgumentException ("No such title control...")
+raise Exception("No such title control...")
 except Exception:
 traceback.print_exc()
 
diff --git a/wizards/com/sun/star/wizards/agenda/TopicsControl.py 
b/wizards/com/sun/star/wizards/agenda/TopicsControl.py
index 36cfbffa41e1..6e269f6bf242 100644
--- a/wizards/com/sun/star/wizards/agenda/TopicsControl.py
+++ b/wizards/com/sun/star/wizards/agenda/TopicsControl.py
@@ -643,7 +643,7 @@ class TopicsControl(ControlScroller):
 elif tmp_switch_var1 == 3:
 return cr.timebox
 else:
-raise IllegalArgumentException ("No such column");
+raise Exception("No such column");
 
 '''getControl
 returns a control out of the given row, which is
diff --git a/wizards/com/sun/star/wizards/document/OfficeDocument.py 
b/wizards/com/sun/star/wizards/document/OfficeDocument.py
index aa6c059b6e24..cb7c1cebeb33 100644
--- a/wizards/com/sun/star/wizards/document/OfficeDocument.py
+++ b/wizards/com/sun/star/wizards/document/OfficeDocument.py
@@ -117,7 +117,7 @@ class OfficeDocument(object):
 xPeer = None
 try:
 xPeer = xToolkit.createWindow(aDescriptor)
-except IllegalArgumentException:
+except Exception:
 traceback.print_exc()
 
 #define some further properties of the frame window
diff --git a/wizards/com/sun/star/wizards/text/TextSectionHandler.py 
b/wizards/com/sun/star/wizards/text/TextSectionHandler.py
index bc63e1a9ae1c..e8d649a31462 100644
--- a/wizards/com/sun/star/wizards/text/TextSectionHandler.py
+++ b/wizards/com/sun/star/wizards/text/TextSectionHandler.py
@@ -96,7 +96,7 @@ class TextSectionHandler(object):
 xSecondTextCursor = self.xText.createTextCursor()
 xSecondTextCursor.gotoEnd(False)
 insertTextSection(GroupName, TemplateName, xSecondTextCursor)
-except IllegalArgumentException:
+except Exception:
 traceback.print_exc()
 
 def insertTextSection(self, sectionName, templateName, position):
diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog.py 
b/wizards/com/sun/star/wizards/ui/UnoDialog.py
index ef227235677b..37376f1eec45 100644
--- a/wizards/com/sun/star/wizards/ui/UnoDialog.py
+++ b/wizards/com/sun/star/wizards/ui/UnoDialog.py
@@ -213,7 +213,7 @@ class UnoDialog(object):
 nUIColor = 0
 try:
 nUIColor = 
self.xVclWindowPeer.getProperty("DisplayBackgroundColor")
-except IllegalArgumentException:
+except Exception:
 traceback.print_exc()
 return False
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2020-03-30 Thread Caolán McNamara (via logerrit)
 wizards/com/sun/star/wizards/table/FieldFormatter.java |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9383980a9f07a352c62fc09b7bea3a24e2e46b48
Author: Caolán McNamara 
AuthorDate: Mon Mar 30 12:59:14 2020 +0100
Commit: Caolán McNamara 
CommitDate: Mon Mar 30 15:03:22 2020 +0200

Related: tdf#131576 overlapping windows, move bottom one down a little

Change-Id: I28c890740a92f183db72ab997627d564cba49ec0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91361
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/wizards/com/sun/star/wizards/table/FieldFormatter.java 
b/wizards/com/sun/star/wizards/table/FieldFormatter.java
index c3c38e7e2dae..75a1ade73a51 100644
--- a/wizards/com/sun/star/wizards/table/FieldFormatter.java
+++ b/wizards/com/sun/star/wizards/table/FieldFormatter.java
@@ -209,7 +209,7 @@ public class FieldFormatter implements XItemListener
 }, // PropertyNames.PROPERTY_HELPURL
 new Object[]
 {
-85, 158, 49, IFieldFormatStep, 
Short.valueOf(curtabindex++), 166, 50
+82, 158, 52, IFieldFormatStep, 
Short.valueOf(curtabindex++), 166, 50
 });  //, "HID:WIZARDS_HID_DLGTABLE_COLMODIFIER"
 curTableDescriptor = _curTableDescriptor;
 Helper.setUnoPropertyValue(oColumnDescriptorModel, 
PropertyNames.ACTIVE_CONNECTION, _curTableDescriptor.DBConnection);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2020-03-28 Thread Julien Nabet (via logerrit)
 wizards/com/sun/star/wizards/table/FieldFormatter.java |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 70adbc53e88e5b99032d63065410716c54b4f96f
Author: Julien Nabet 
AuthorDate: Fri Mar 27 22:28:28 2020 +0100
Commit: Julien Nabet 
CommitDate: Sat Mar 28 08:25:13 2020 +0100

tdf#131576: fix "Field information" in table wizard, step 2

Change-Id: I8a0dfa9f483f32bc5858e628ff4bb9cb79c9c6a6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91236
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/wizards/com/sun/star/wizards/table/FieldFormatter.java 
b/wizards/com/sun/star/wizards/table/FieldFormatter.java
index db401104a094..c3c38e7e2dae 100644
--- a/wizards/com/sun/star/wizards/table/FieldFormatter.java
+++ b/wizards/com/sun/star/wizards/table/FieldFormatter.java
@@ -73,7 +73,7 @@ public class FieldFormatter implements XItemListener
 },
 new Object[]
 {
-UIConsts.INTEGERS[8], sFieldNames, 91, 27, 
IFieldFormatStep, Short.valueOf(curtabindex++), 90
+UIConsts.INTEGERS[8], sFieldNames, 91, 27, 
IFieldFormatStep, Short.valueOf(curtabindex++), 67
 });
 
 try
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2020-02-09 Thread Andrea Gelmini (via logerrit)
 wizards/com/sun/star/wizards/ui/event/DataAware.py |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7d981e61772b02a80c86821d99249d8dfbddf1a5
Author: Andrea Gelmini 
AuthorDate: Sun Feb 9 11:10:31 2020 +0100
Commit: Julien Nabet 
CommitDate: Sun Feb 9 12:20:37 2020 +0100

Fix typo

Change-Id: I0f58bc3253cbd5d7341eddf9be7bda3d6c245f9c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88326
Tested-by: Julien Nabet 
Reviewed-by: Julien Nabet 

diff --git a/wizards/com/sun/star/wizards/ui/event/DataAware.py 
b/wizards/com/sun/star/wizards/ui/event/DataAware.py
index 24dbe9466aad..e062b48bd2f7 100644
--- a/wizards/com/sun/star/wizards/ui/event/DataAware.py
+++ b/wizards/com/sun/star/wizards/ui/event/DataAware.py
@@ -31,7 +31,7 @@ delegating the data Object get/set methods to a Value object,
 and leaving the UI get/set methods abstract.
 Note that event listening is *not* a part of this model.
 the updateData() or updateUI() methods should be programmatically called.
-in child classes, the updateData() will be binded to UI event calls.
+in child classes, the updateData() will be bound to UI event calls.
 
 This class holds references to a Data Object and a Value object.
 The Value object "knows" how to get and set a value from the
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2019-11-18 Thread Jens Carl (via logerrit)
 wizards/com/sun/star/wizards/common/FileAccess.py |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f09d88e8f8f599938e78adf72fc96cedb261afef
Author: Jens Carl 
AuthorDate: Sun Nov 17 10:55:39 2019 -0800
Commit: Xisco Faulí 
CommitDate: Mon Nov 18 10:15:07 2019 +0100

Fix 'is' operator for comparison

The 'is' operator should not be used for comparison on some types of
literals. In CPython this works by accident and CPython 3.8 introduced a
SyntaxWarning (see https://bugs.python.org/issue34850).

Change-Id: Ifabe22e4ae3b9e1d3bfd5a663f39500e381cfa6e
Reviewed-on: https://gerrit.libreoffice.org/83034
Tested-by: Jenkins
Reviewed-by: Xisco Faulí 

diff --git a/wizards/com/sun/star/wizards/common/FileAccess.py 
b/wizards/com/sun/star/wizards/common/FileAccess.py
index 2740b7aa3c3e..c58f6d4b424c 100644
--- a/wizards/com/sun/star/wizards/common/FileAccess.py
+++ b/wizards/com/sun/star/wizards/common/FileAccess.py
@@ -129,7 +129,7 @@ class FileAccess(object):
 
 def getPath(self, parentURL, childURL):
 string = ""
-if childURL is not None and childURL is not "":
+if childURL is not None and childURL != "":
 string = "/" + childURL
 return self.filenameConverter.getSystemPathFromFileURL(
 parentURL + string)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-07-27 Thread Andrea Gelmini (via logerrit)
 wizards/com/sun/star/wizards/agenda/AgendaDocument.py| 
   2 +-
 wizards/com/sun/star/wizards/agenda/TemplateConsts.py| 
   2 +-
 wizards/com/sun/star/wizards/common/NumberFormatter.java | 
   2 +-
 wizards/com/sun/star/wizards/common/PropertySetHelper.java   | 
   6 +++---
 wizards/com/sun/star/wizards/common/UCB.py   | 
   2 +-
 wizards/com/sun/star/wizards/common/strings.hrc  | 
   2 +-
 wizards/com/sun/star/wizards/query/QueryWizard.java  | 
   2 +-
 wizards/com/sun/star/wizards/report/IReportDefinitionReadAccess.java | 
   2 +-
 wizards/com/sun/star/wizards/report/IReportDocument.java | 
   4 ++--
 wizards/com/sun/star/wizards/report/ReportWizard.java| 
   2 +-
 wizards/com/sun/star/wizards/reportbuilder/layout/DesignTemplate.java| 
   4 ++--
 wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java | 
   4 ++--
 wizards/com/sun/star/wizards/text/TextDocument.py| 
   2 +-
 wizards/source/access2base/L10N.xba  | 
   2 +-
 wizards/source/access2base/Utils.xba | 
   6 +++---
 wizards/source/depot/Lang_it.xba | 
   2 +-
 wizards/source/euro/Writer.xba   | 
   2 +-
 wizards/source/importwizard/FilesModul.xba   | 
   2 +-
 wizards/source/tutorials/TutorialsDialog.xdl | 
   2 +-
 19 files changed, 26 insertions(+), 26 deletions(-)

New commits:
commit 16e15bd404e0042aaceba3bd2ed75ac6fe333922
Author: Andrea Gelmini 
AuthorDate: Fri Jul 12 17:56:42 2019 +0200
Commit: Andrea Gelmini 
CommitDate: Sat Jul 27 10:02:06 2019 +0200

Fix typo

Change-Id: I309ce0b4aade85a510836be0d04bf66c916a464a
Reviewed-on: https://gerrit.libreoffice.org/75507
Reviewed-by: Julien Nabet 
Tested-by: Jenkins
Reviewed-by: Andrea Gelmini 

diff --git a/wizards/com/sun/star/wizards/agenda/AgendaDocument.py 
b/wizards/com/sun/star/wizards/agenda/AgendaDocument.py
index a980e60d4959..567a1f1ae434 100644
--- a/wizards/com/sun/star/wizards/agenda/AgendaDocument.py
+++ b/wizards/com/sun/star/wizards/agenda/AgendaDocument.py
@@ -629,7 +629,7 @@ class ItemsTable(object):
 self.agenda.template, name, self.section)
 self.agenda.textSectionHandler.breakLinkOfTextSection(
 self.section)
-# we need to get a instance after linking
+# we need to get an instance after linking
 
 ItemsTable.table = self.agenda.getTable(name)
 self.section = self.agenda.getSection(name)
diff --git a/wizards/com/sun/star/wizards/agenda/TemplateConsts.py 
b/wizards/com/sun/star/wizards/agenda/TemplateConsts.py
index 18791f06d21a..2593c2ce3407 100644
--- a/wizards/com/sun/star/wizards/agenda/TemplateConsts.py
+++ b/wizards/com/sun/star/wizards/agenda/TemplateConsts.py
@@ -25,7 +25,7 @@ class TemplateConsts:
 '''
 section name prefix for sections that contain items.
 this is also used as table name prefix, since each items section
-must contain a table whos name is identical name to the section's name.
+must contain a table whose name is identical name to the section's name.
 '''
 SECTION_ITEMS = "AGENDA_ITEMS"
 '''
diff --git a/wizards/com/sun/star/wizards/common/NumberFormatter.java 
b/wizards/com/sun/star/wizards/common/NumberFormatter.java
index 9a6ca217e6c9..b2220e1cca19 100644
--- a/wizards/com/sun/star/wizards/common/NumberFormatter.java
+++ b/wizards/com/sun/star/wizards/common/NumberFormatter.java
@@ -152,7 +152,7 @@ public class NumberFormatter
 }
 else
 {
-// TODO: throws a exception in a try catch environment, very 
helpful?
+// TODO: throws an exception in a try catch environment, very 
helpful?
 throw new Exception();
 }
 }
diff --git a/wizards/com/sun/star/wizards/common/PropertySetHelper.java 
b/wizards/com/sun/star/wizards/common/PropertySetHelper.java
index 0fb0959a0f18..7de45668eb26 100644
--- a/wizards/com/sun/star/wizards/common/PropertySetHelper.java
+++ b/wizards/com/sun/star/wizards/common/PropertySetHelper.java
@@ -133,7 +133,7 @@ public class PropertySetHelper
 }
 catch (com.sun.star.lang.IllegalArgumentException e)
 {
-DebugHelper.writeInfo("can't convert a object to integer.");
+DebugHelper.writeInfo("can't convert an object to integer.");
 }
 }
 return nValue;
@@ -179,7 +179,7 @@ public class PropertySetHelper
 }
 catch (com.sun.star.lang.IllegalArgumentException e)
 {
-

[Libreoffice-commits] core.git: wizards/com

2019-07-03 Thread Julien Nabet (via logerrit)
 wizards/com/sun/star/wizards/document/FormHandler.java |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit b59f4fe03a7843cde70a56a282b3a5d7a304f39d
Author: Julien Nabet 
AuthorDate: Sun Jun 30 13:11:10 2019 +0200
Commit: Julien Nabet 
CommitDate: Wed Jul 3 17:38:48 2019 +0200

tdf#125953: take CLOB into account in form wizard

Change-Id: Ie08b47c2892b7da8e516447b868067a6231279c2
Reviewed-on: https://gerrit.libreoffice.org/74927
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/wizards/com/sun/star/wizards/document/FormHandler.java 
b/wizards/com/sun/star/wizards/document/FormHandler.java
index cae352f2b9ef..6ff44ceb3a47 100644
--- a/wizards/com/sun/star/wizards/document/FormHandler.java
+++ b/wizards/com/sun/star/wizards/document/FormHandler.java
@@ -114,7 +114,7 @@ public class FormHandler
 sModelServices[SOGRIDCONTROL] = 
"com.sun.star.form.component.GridControl";
 sModelServices[SOIMAGECONTROL] = 
"com.sun.star.form.component.DatabaseImageControl";
 
-oControlData = new ControlData[22];
+oControlData = new ControlData[23];
 oControlData[0] = createControlData(DataType.BIT,  SOCHECKBOX, 
CHECKBOX);
 oControlData[1] = createControlData(DataType.BOOLEAN,  SOCHECKBOX, 
CHECKBOX);
 oControlData[2] = createControlData(DataType.TINYINT,  
SONUMERICCONTROL, FORMATTEDFIELD);
@@ -136,8 +136,9 @@ public class FormHandler
 oControlData[18] = createControlData(DataType.VARBINARY,   
SOIMAGECONTROL, TEXTFIELD);
 oControlData[19] = createControlData(DataType.LONGVARBINARY, 
SOIMAGECONTROL, TEXTFIELD);
 oControlData[20] = createControlData(DataType.BLOB,
SOIMAGECONTROL, TEXTFIELD);
+oControlData[21] = createControlData(DataType.CLOB,
SOIMAGECONTROL, TEXTFIELD);
 
-oControlData[21] = createControlData(DataType.OTHER,   
SOIMAGECONTROL, TEXTFIELD);
+oControlData[22] = createControlData(DataType.OTHER,   
SOIMAGECONTROL, TEXTFIELD);
 }
 
 public int getControlType(int _fieldtype)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: wizards/com

2019-03-13 Thread Libreoffice Gerrit user
 wizards/com/sun/star/wizards/common/NumberFormatter.java |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 535d4e6dae24973f5bea80643b691c706a3b4efa
Author: Julien Nabet 
AuthorDate: Tue Mar 12 20:03:14 2019 +0100
Commit: Julien Nabet 
CommitDate: Wed Mar 13 07:08:22 2019 +0100

Fix wizards/NumberFormatter.java

Create a brand new odb file (embedded HSQLDB)
Create a simple table in it
Launch Query wizard, you'll see these on console:
...
at com.sun.proxy.$Proxy69.addNew(Unknown Source)
at 
com.sun.star.wizards.common.NumberFormatter.defineNumberFormat(NumberFormatter.java:96)
at 
com.sun.star.wizards.ui.FilterComponent.addNumberFormats(FilterComponent.java:504)
at com.sun.star.wizards.query.QueryWizard.buildSteps(QueryWizard.java:233)
...

...
at com.sun.proxy.$Proxy69.addNew(Unknown Source)
at 
com.sun.star.wizards.common.NumberFormatter.defineNumberFormat(NumberFormatter.java:96)
at 
com.sun.star.wizards.ui.FilterComponent.addNumberFormats(FilterComponent.java:506)
at com.sun.star.wizards.query.QueryWizard.buildSteps(QueryWizard.java:233)
...

Root cause is FilterComponent.java uses "-MM-DD" and "-MM-DD 
HH:MM:SS" (lines 504 and 506)
If it's ok for English locales, xNumberFormats.queryKey calls fail at least 
for French locales.
Use addNewConverted instead of addNew method to take into account the 
difference of locales
and avoid these stacktraces

Change-Id: I5ef6325b8a213ae6758e378c4d3b8560c117042f
Reviewed-on: https://gerrit.libreoffice.org/69131
Tested-by: Jenkins
Reviewed-by: Lionel Elie Mamane 

diff --git a/wizards/com/sun/star/wizards/common/NumberFormatter.java 
b/wizards/com/sun/star/wizards/common/NumberFormatter.java
index dfbd742aef8e..9a6ca217e6c9 100644
--- a/wizards/com/sun/star/wizards/common/NumberFormatter.java
+++ b/wizards/com/sun/star/wizards/common/NumberFormatter.java
@@ -48,6 +48,7 @@ public class NumberFormatter
 private XNumberFormatTypes xNumberFormatTypes;
 private XPropertySet xNumberFormatSettings;
 private final Locale aLocale;
+static private final Locale enLocale = new Locale( "en", "US", "" );
 
 
 public NumberFormatter(XMultiServiceFactory _xMSF, XNumberFormatsSupplier 
_xNumberFormatsSupplier, Locale _aLocale) throws Exception
@@ -93,7 +94,7 @@ public class NumberFormatter
 int NewFormatKey = xNumberFormats.queryKey(_FormatString, aLocale, 
true);
 if (NewFormatKey == -1)
 {
-NewFormatKey = xNumberFormats.addNew(_FormatString, aLocale);
+NewFormatKey = xNumberFormats.addNewConverted(_FormatString, 
enLocale, aLocale);
 }
 return NewFormatKey;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: wizards/com

2019-03-12 Thread Libreoffice Gerrit user
 wizards/com/sun/star/wizards/common/Desktop.py  |   40 ---
 wizards/com/sun/star/wizards/common/FileAccess.py   |   29 --
 wizards/com/sun/star/wizards/common/NumberFormatter.py  |  161 
 wizards/com/sun/star/wizards/document/OfficeDocument.py |   14 -
 wizards/com/sun/star/wizards/text/TextFieldHandler.py   |   50 
 wizards/com/sun/star/wizards/text/TextSectionHandler.py |   23 --
 wizards/com/sun/star/wizards/ui/ControlScroller.py  |   35 ---
 wizards/com/sun/star/wizards/ui/PeerConfig.py   |   15 -
 wizards/com/sun/star/wizards/ui/UnoDialog.py|   93 -
 wizards/com/sun/star/wizards/ui/UnoDialog2.py   |   19 -
 wizards/com/sun/star/wizards/ui/WizardDialog.py |   47 
 11 files changed, 2 insertions(+), 524 deletions(-)

New commits:
commit 2f7c3cce2699901c0ffe3780cfad0376a5d1a519
Author: Xisco Fauli 
AuthorDate: Fri Feb 15 13:27:45 2019 +0100
Commit: Xisco Faulí 
CommitDate: Tue Mar 12 11:21:57 2019 +0100

Remove unused python code

This code was automatically converted from Java to Python.
It might be used at some point if the remaining java wizards
are converted to python, however that's not the case as
per today, thus this code is unused.

Let's get rid of it as it might create confusion

Change-Id: Ic58ade24b10f7a0654b3e8ae39f6afa712589c3d
Reviewed-on: https://gerrit.libreoffice.org/67868
Tested-by: Jenkins
Reviewed-by: Xisco Faulí 

diff --git a/wizards/com/sun/star/wizards/common/Desktop.py 
b/wizards/com/sun/star/wizards/common/Desktop.py
index 94a4a111f276..2715ffb75274 100644
--- a/wizards/com/sun/star/wizards/common/Desktop.py
+++ b/wizards/com/sun/star/wizards/common/Desktop.py
@@ -84,33 +84,6 @@ class Desktop(object):
 
 return sIncSuffix
 
-@classmethod
-def checkforfirstSpecialCharacter(self, _xMSF, _sString, _aLocale):
-try:
-nStartFlags = ANY_LETTER_OR_NUMBER + ASC_UNDERSCORE
-ocharservice = _xMSF.createInstance(
-"com.sun.star.i18n.CharacterClassification")
-aResult = ocharservice.parsePredefinedToken(KParseType.IDENTNAME,
-_sString, 0, _aLocale, nStartFlags, "", nStartFlags, " ")
-return aResult.EndPos
-except Exception:
-traceback.print_exc()
-return -1
-
-@classmethod
-def removeSpecialCharacters(self, _xMSF, _aLocale, _sname):
-snewname = _sname
-i = 0
-while i < snewname.length():
-i = Desktop.checkforfirstSpecialCharacter(_xMSF, snewname,
-_aLocale)
-if i < snewname.length():
-sspecialchar = snewname.substring(i, i + 1)
-snewname = JavaTools.replaceSubString(snewname, "",
-sspecialchar)
-
-return snewname
-
 '''
 Checks if the passed Element Name already exists in the  ElementContainer.
 If yes it appends a suffix to make it unique
@@ -124,16 +97,3 @@ class Desktop(object):
 sIncSuffix = self.getIncrementSuffix(xElementContainer, sElementName)
 return sElementName + sIncSuffix
 
-@classmethod
-def getDispatchURL(self, xMSF, _sURL):
-try:
-oTransformer = 
xMSF.createInstance("com.sun.star.util.URLTransformer")
-oURL = URL()
-oURL.Complete = _sURL
-ok, oURL = oTransformer.parseStrict(oURL)
-if (not ok):
-return None
-return oURL
-except Exception:
-traceback.print_exc()
-return None
diff --git a/wizards/com/sun/star/wizards/common/FileAccess.py 
b/wizards/com/sun/star/wizards/common/FileAccess.py
index b05fcb2c4b21..2740b7aa3c3e 100644
--- a/wizards/com/sun/star/wizards/common/FileAccess.py
+++ b/wizards/com/sun/star/wizards/common/FileAccess.py
@@ -70,24 +70,6 @@ class FileAccess(object):
 return ""
 
 @classmethod
-def combinePaths(self, xMSF, _sFirstPath, _sSecondPath):
-bexists = False
-ReturnPath = ""
-try:
-xUcbInterface = xMSF.createInstance(
-"com.sun.star.ucb.SimpleFileAccess")
-ReturnPath = _sFirstPath + _sSecondPath
-bexists = xUcbInterface.exists(ReturnPath)
-except Exception:
-traceback.print_exc()
-return ""
-
-if not bexists:
-raise NoValidPathException (xMSF, "")
-
-return ReturnPath
-
-@classmethod
 def getFolderTitles(self, xMSF, FilterName, FolderName, resDict=None):
 #Returns and ordered dict containing the template's name and path
 
@@ -132,17 +114,6 @@ class FileAccess(object):
 return locLayoutFiles
 
 @classmethod
-def addPath(self, _sPath, _sPath2):
-if not _sPath.endsWith("/"):
-_sPath += "/"
-
-if _sPath2.startsWith("/"):
-_sPath2 = _sPath2.substring(1)
-
-sNewPath 

[Libreoffice-commits] core.git: wizards/com

2018-07-19 Thread Libreoffice Gerrit user
 wizards/com/sun/star/wizards/document/OfficeDocument.py |1 -
 1 file changed, 1 deletion(-)

New commits:
commit a8e657e9d04f908388580039a0ac5b9348dfee60
Author: Caolán McNamara 
AuthorDate: Wed Jul 18 13:41:15 2018 +0100
Commit: Caolán McNamara 
CommitDate: Thu Jul 19 09:29:27 2018 +0200

Related: rhbz#1602589 null_check: 'xComponent'

Change-Id: I591f9fa611c0ad0d1631d179b7263f83613badfb
Reviewed-on: https://gerrit.libreoffice.org/57640
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/wizards/com/sun/star/wizards/document/OfficeDocument.py 
b/wizards/com/sun/star/wizards/document/OfficeDocument.py
index 6ebb7d389fed..b0bcbf91e27e 100644
--- a/wizards/com/sun/star/wizards/document/OfficeDocument.py
+++ b/wizards/com/sun/star/wizards/document/OfficeDocument.py
@@ -196,7 +196,6 @@ class OfficeDocument(object):
 bState = False
 
 else:
-xComponent.dispose()
 bState = True
 
 return bState
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2018-07-18 Thread Libreoffice Gerrit user
 wizards/com/sun/star/wizards/agenda/TopicsControl.py |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 53352706de3152fe57309a3e2b2ec793949b4413
Author: Caolán McNamara 
AuthorDate: Wed Jul 18 13:43:09 2018 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jul 18 17:16:56 2018 +0200

Related: rhbz#1602589 null_check 'guiRow'

Change-Id: I0c93e6a721646363e5b71ec0e9db6199e7cce006
Reviewed-on: https://gerrit.libreoffice.org/57641
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/wizards/com/sun/star/wizards/agenda/TopicsControl.py 
b/wizards/com/sun/star/wizards/agenda/TopicsControl.py
index e345ddcd11b0..6b3561003b4c 100644
--- a/wizards/com/sun/star/wizards/agenda/TopicsControl.py
+++ b/wizards/com/sun/star/wizards/agenda/TopicsControl.py
@@ -458,8 +458,9 @@ class TopicsControl(ControlScroller):
 
 def rowDown(self, guiRow=None, control=None):
 try:
-if guiRow is None and control is None:
+if guiRow is None:
 guiRow = self.lastFocusRow - self.nscrollvalue
+if control is None:
 control = self.lastFocusControl
 # only perform if this is not the last row.
 actuallRow = guiRow + self.nscrollvalue
@@ -490,8 +491,9 @@ class TopicsControl(ControlScroller):
 
 def rowUp(self, guiRow=None, control=None):
 try:
-if guiRow is None and control is None:
+if guiRow is None:
 guiRow = self.lastFocusRow - self.nscrollvalue
+if control is None:
 control = self.lastFocusControl
 # only perform if this is not the first row
 actuallRow = guiRow + self.nscrollvalue
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com wizards/Pyuno_commonwizards.mk

2018-02-05 Thread Xisco Fauli
 wizards/Pyuno_commonwizards.mk|5 
 wizards/com/sun/star/wizards/common/Configuration.py  |   36 ---
 wizards/com/sun/star/wizards/common/FileAccess.py |  117 --
 wizards/com/sun/star/wizards/common/ListModel.py  |4 
 wizards/com/sun/star/wizards/common/SystemDialog.py   |   42 ---
 wizards/com/sun/star/wizards/common/UCB.py|   33 --
 wizards/com/sun/star/wizards/common/XMLHelper.py  |   34 --
 wizards/com/sun/star/wizards/common/XMLProvider.py|   24 --
 wizards/com/sun/star/wizards/document/OfficeDocument.py   |   63 -
 wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py |   22 -
 wizards/com/sun/star/wizards/text/TextDocument.py |   25 --
 wizards/com/sun/star/wizards/ui/DocumentPreview.py|5 
 wizards/com/sun/star/wizards/ui/UnoDialog.py  |   24 --
 wizards/com/sun/star/wizards/ui/UnoDialog2.py |   37 ---
 wizards/com/sun/star/wizards/ui/WizardDialog.py   |   19 -
 wizards/com/sun/star/wizards/ui/event/CommonListener.py   |   50 
 wizards/com/sun/star/wizards/ui/event/DataAware.py|   27 --
 wizards/com/sun/star/wizards/ui/event/EventListenerList.py|3 
 wizards/com/sun/star/wizards/ui/event/ListDataEvent.py|   36 ---
 wizards/com/sun/star/wizards/ui/event/ListDataListener.py |   32 --
 wizards/com/sun/star/wizards/ui/event/ListModelBinder.py  |   42 ---
 wizards/com/sun/star/wizards/ui/event/SimpleDataAware.py  |   33 --
 wizards/com/sun/star/wizards/ui/event/Task.py |   38 ---
 wizards/com/sun/star/wizards/ui/event/TaskEvent.py|6 
 wizards/com/sun/star/wizards/ui/event/TaskListener.py |4 
 wizards/com/sun/star/wizards/ui/event/UnoDataAware.py |6 
 26 files changed, 28 insertions(+), 739 deletions(-)

New commits:
commit 2029a593f2ff5863b81ba6abc5e466473c475b48
Author: Xisco Fauli 
Date:   Thu Feb 1 15:40:51 2018 +0100

Removed unused code in python wizards

This code got unused after 5b3022860abfe7eefd2e25b60b5b2a563b42b3c0

Change-Id: I6c198ab359f8468a9f4d9041b9bc4feb88eedd74
Reviewed-on: https://gerrit.libreoffice.org/49109
Tested-by: Jenkins 
Reviewed-by: Xisco Faulí 

diff --git a/wizards/Pyuno_commonwizards.mk b/wizards/Pyuno_commonwizards.mk
index 578555c6c5eb..1c139950d963 100644
--- a/wizards/Pyuno_commonwizards.mk
+++ b/wizards/Pyuno_commonwizards.mk
@@ -25,8 +25,6 @@ $(eval $(call gb_Pyuno_add_files,commonwizards,wizards,\
 common/SystemDialog.py \
 common/IRenderer.py \
 common/UCB.py \
-common/XMLHelper.py \
-common/XMLProvider.py \
 common/ListModel.py \
 common/__init__.py \
 document/OfficeDocument.py \
@@ -50,12 +48,9 @@ $(eval $(call gb_Pyuno_add_files,commonwizards,wizards,\
 ui/event/ListModelBinder.py \
 ui/event/RadioDataAware.py \
 ui/event/UnoDataAware.py \
-ui/event/SimpleDataAware.py \
 ui/event/Task.py \
 ui/event/TaskEvent.py \
 ui/event/TaskListener.py \
-ui/event/ListDataEvent.py \
-ui/event/ListDataListener.py \
 ui/event/EventListenerList.py \
 ui/event/__init__.py \
 ))
diff --git a/wizards/com/sun/star/wizards/common/Configuration.py 
b/wizards/com/sun/star/wizards/common/Configuration.py
index e63d20827542..91274e0b288c 100644
--- a/wizards/com/sun/star/wizards/common/Configuration.py
+++ b/wizards/com/sun/star/wizards/common/Configuration.py
@@ -54,47 +54,11 @@ class Configuration(object):
 def getNode(self, name, parent):
 return parent.getByName(name)
 
-# This method creates a new configuration node and adds it
-# to the given view. Note that if a node with the given name
-# already exists it will be completely removed from
-# the configuration.
-# @param configView
-# @param name
-# @return the new created configuration node.
-# @throws com.sun.star.lang.WrappedTargetException
-# @throws ElementExistException
-# @throws NoSuchElementException
-# @throws com.sun.star.uno.Exception
-@classmethod
-def addConfigNode(self, configView, name):
-try:
-node = configView.getByName(name)
-except Exception:
-node = None
-if (node is not None):
-return node
-else:
-# create a new detached set element (instance of 
DataSourceDescription)
-# the new element is the result !
-node = configView.createInstance()
-# insert it - this also names the element
-configView.insertByName(name, node)
-return node
-
-@classmethod
-def removeNode(self, configView, name):
-if (configView.hasByName(name)):
-configView.removeByName(name)
-
 @classmethod
 def 

[Libreoffice-commits] core.git: wizards/com

2018-01-14 Thread Gabor Kelemen
 wizards/com/sun/star/wizards/common/HelpIds.java  |   70 +-
 wizards/com/sun/star/wizards/report/ReportWizard.java |2 
 2 files changed, 37 insertions(+), 35 deletions(-)

New commits:
commit 18b45de3f9aaab82349784a86521b43d7d99d174
Author: Gabor Kelemen 
Date:   Tue Dec 12 00:18:09 2017 +0100

Fix HIDs in Java based Table/Query/Report wizards

Some HIDs were a bit off in these wizards
- Report Wizard 'Grouping' page
- Table Wizard 'Set primary key' page
- Query Wizard 'Grouping' page

All these contain a subclass of a FieldSelection.
Due to the implementation of HID handling there, we need 4 consecutive
HIDs in HelpIds.java for the buttons cmdMoveSelected, cmdMoveAll,
cmdRemoveSelected and cmdRemoveAll.

Above pages contain subclasses without the MoveAll and RemoveAll buttons
so we need empty placeholders in their places to cater for the assumptions
of the parent class.

This also means that HID numbers must be adjusted a bit, and in 
ReportWizard.java
we need to shift the base HID number of the Sorting page that follows
the Grouping page.

Change-Id: I944dd4f781aff2c0b0cfd99c3386001506c01440
Reviewed-on: https://gerrit.libreoffice.org/46270
Tested-by: Jenkins 
Reviewed-by: Andras Timar 

diff --git a/wizards/com/sun/star/wizards/common/HelpIds.java 
b/wizards/com/sun/star/wizards/common/HelpIds.java
index de87206d2bac..2c1ae4fc7d5b 100644
--- a/wizards/com/sun/star/wizards/common/HelpIds.java
+++ b/wizards/com/sun/star/wizards/common/HelpIds.java
@@ -163,24 +163,24 @@ public class HelpIds
 PropertyNames.EMPTY_STRING,
 "HID:WIZARDS_HID_DLGREPORT_2_GROUPING",// HID:34340
 "HID:WIZARDS_HID_DLGREPORT_2_CMDGROUP",// HID:34341
-"HID:WIZARDS_HID_DLGREPORT_2_CMDUNGROUP",// HID:34342
-"HID:WIZARDS_HID_DLGREPORT_2_PREGROUPINGDEST",// HID:34343
-"HID:WIZARDS_HID_DLGREPORT_2_CMDMOVEUPGROUP",// HID:34344
-"HID:WIZARDS_HID_DLGREPORT_2_CMDMOVEDOWNGROUP",// HID:34345
-"HID:WIZARDS_HID_DLGREPORT_3_SORT1",// HID:34346
-"HID:WIZARDS_HID_DLGREPORT_3_OPTASCEND1",// HID:34347
-"HID:WIZARDS_HID_DLGREPORT_3_OPTDESCEND1",// HID:34348
-"HID:WIZARDS_HID_DLGREPORT_3_SORT2",// HID:34349
-"HID:WIZARDS_HID_DLGREPORT_3_OPTASCEND2",// HID:34350
-"HID:WIZARDS_HID_DLGREPORT_3_OPTDESCEND2",// HID:34351
-"HID:WIZARDS_HID_DLGREPORT_3_SORT3",// HID:34352
-"HID:WIZARDS_HID_DLGREPORT_3_OPTASCEND3",// HID:34353
-"HID:WIZARDS_HID_DLGREPORT_3_OPTDESCEND3",// HID:34354
-"HID:WIZARDS_HID_DLGREPORT_3_SORT4",// HID:34355
-"HID:WIZARDS_HID_DLGREPORT_3_OPTASCEND4",// HID:34356
-"HID:WIZARDS_HID_DLGREPORT_3_OPTDESCEND4",// HID:34357
-PropertyNames.EMPTY_STRING,
-PropertyNames.EMPTY_STRING,
+PropertyNames.EMPTY_STRING, // HID:34342 empty, no moveall button
+"HID:WIZARDS_HID_DLGREPORT_2_CMDUNGROUP",// HID:34343
+PropertyNames.EMPTY_STRING, // HID:34344 empty, no removeall button
+"HID:WIZARDS_HID_DLGREPORT_2_PREGROUPINGDEST",// HID:34345
+"HID:WIZARDS_HID_DLGREPORT_2_CMDMOVEUPGROUP",// HID:34346
+"HID:WIZARDS_HID_DLGREPORT_2_CMDMOVEDOWNGROUP",// HID:34347
+"HID:WIZARDS_HID_DLGREPORT_3_SORT1",// HID:34348
+"HID:WIZARDS_HID_DLGREPORT_3_OPTASCEND1",// HID:34349
+"HID:WIZARDS_HID_DLGREPORT_3_OPTDESCEND1",// HID:34350
+"HID:WIZARDS_HID_DLGREPORT_3_SORT2",// HID:34351
+"HID:WIZARDS_HID_DLGREPORT_3_OPTASCEND2",// HID:34352
+"HID:WIZARDS_HID_DLGREPORT_3_OPTDESCEND2",// HID:34353
+"HID:WIZARDS_HID_DLGREPORT_3_SORT3",// HID:34354
+"HID:WIZARDS_HID_DLGREPORT_3_OPTASCEND3",// HID:34355
+"HID:WIZARDS_HID_DLGREPORT_3_OPTDESCEND3",// HID:34356
+"HID:WIZARDS_HID_DLGREPORT_3_SORT4",// HID:34357
+"HID:WIZARDS_HID_DLGREPORT_3_OPTASCEND4",// HID:34358
+"HID:WIZARDS_HID_DLGREPORT_3_OPTDESCEND4",// HID:34359
 PropertyNames.EMPTY_STRING,
 PropertyNames.EMPTY_STRING,
 "HID:WIZARDS_HID_DLGREPORT_4_TITLE",// HID:34362
@@ -695,12 +695,12 @@ public class HelpIds
 PropertyNames.EMPTY_STRING,
 "HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERFIELDS",// HID:40915
 "HID:WIZARDS_HID_QUERYWIZARD_CMDFILTERMOVESELECTED",// HID:40916
-"HID:WIZARDS_HID_QUERYWIZARD_CMDFILTERREMOVESELECTED",// HID:40917
-"HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERSELFIELDS",// HID:40918
-"HID:WIZARDS_HID_QUERYWIZARD_CMDFILTERMOVEUP",// HID:40919
-"HID:WIZARDS_HID_QUERYWIZARD_CMDFILTERMOVEDOWN",// HID:40920
-PropertyNames.EMPTY_STRING,
-PropertyNames.EMPTY_STRING,
+

[Libreoffice-commits] core.git: wizards/com

2018-01-08 Thread Stephan Bergmann
 wizards/com/sun/star/wizards/common/Configuration.py |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 2f9aea0c1aa77a88a3dbfcc668dc410f983f3460
Author: Stephan Bergmann 
Date:   Mon Jan 8 14:31:58 2018 +0100

tdf#114881: Re-introduce ConfigurationUpdateAccess

...which had accidentally been removed completely from this part of
cb2550750386f51ef7a46a8a664a4ab9de614f8d "Drop lazywrite property, which is
silently ignored by configmgr anyway"

Change-Id: Ibacacc7b04bbd0a0cc819530594dd042329b366f
Reviewed-on: https://gerrit.libreoffice.org/47600
Reviewed-by: Julien Nabet 
Tested-by: Jenkins 

diff --git a/wizards/com/sun/star/wizards/common/Configuration.py 
b/wizards/com/sun/star/wizards/common/Configuration.py
index 95816ca6c071..e63d20827542 100644
--- a/wizards/com/sun/star/wizards/common/Configuration.py
+++ b/wizards/com/sun/star/wizards/common/Configuration.py
@@ -34,7 +34,10 @@ class Configuration(object):
 
 args.append(aPathArgument)
 
-sView = "com.sun.star.configuration.ConfigurationAccess"
+if updateable:
+sView = "com.sun.star.configuration.ConfigurationUpdateAccess"
+else:
+sView = "com.sun.star.configuration.ConfigurationAccess"
 
 return oConfigProvider.createInstanceWithArguments(sView, tuple(args))
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2018-01-07 Thread Caolán McNamara
 wizards/com/sun/star/wizards/common/strings.hrc |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 150267f9d1b17b1f4e1443e92dc5247632755e5f
Author: Caolán McNamara 
Date:   Sun Jan 7 16:32:58 2018 +

Related: tdf#114873 if fallback returned as result, drop context

Change-Id: I82676e4a0b3dee33e248b3ba81e99f949ee9227a

diff --git a/wizards/com/sun/star/wizards/common/strings.hrc 
b/wizards/com/sun/star/wizards/common/strings.hrc
index 21110de96fed..46a2097c25cd 100644
--- a/wizards/com/sun/star/wizards/common/strings.hrc
+++ b/wizards/com/sun/star/wizards/common/strings.hrc
@@ -23,7 +23,10 @@ def NC_(context, string):
 # Contextual strings are stored with the concatenation of
 # the context, a EOT byte, and the original string, instead of the 
original string
 # see https://www.gnu.org/software/gettext/manual/html_node/MO-Files.html
-return gettext.gettext(context + chr(4) + string)
+ret = gettext.gettext(context + chr(4) + string)
+if ret.find(chr(4)) == -1:
+return ret
+return string
 
 # common section
 RID_COMMON_START_0  = NC_("RID_COMMON_START_0", "The 
directory '%1' could not be created.There may not be enough space left on 
your hard disk.")
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2018-01-07 Thread Julien Nabet
 wizards/com/sun/star/wizards/common/strings.hrc |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 1a029665ee6902b477c79cdfd08dc3896868c3bf
Author: Julien Nabet 
Date:   Sun Jan 7 01:19:18 2018 +0100

tdf#114873: localize Letter, fax and agenda wizards

Since we use contextual messages, we need to concatenate:
- context
- EOT character
- the message itself
see https://www.gnu.org/software/gettext/manual/html_node/MO-Files.html

A priori, regression from 00657aef09d854c74fb426a935a3e8b1fc390bb0

Change-Id: Ie3e781e30ce09f0121afff2f0eb0769b1fbd2114
Reviewed-on: https://gerrit.libreoffice.org/47521
Tested-by: Jenkins 
Reviewed-by: Jean-Baptiste Faure 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/wizards/com/sun/star/wizards/common/strings.hrc 
b/wizards/com/sun/star/wizards/common/strings.hrc
index fc43b334342c..21110de96fed 100644
--- a/wizards/com/sun/star/wizards/common/strings.hrc
+++ b/wizards/com/sun/star/wizards/common/strings.hrc
@@ -20,7 +20,10 @@ gettext.bindtextdomain('wiz', unohelper.fileUrlToSystemPath(
 gettext.textdomain('wiz')
 
 def NC_(context, string):
-return gettext.gettext(string)
+# Contextual strings are stored with the concatenation of
+# the context, a EOT byte, and the original string, instead of the 
original string
+# see https://www.gnu.org/software/gettext/manual/html_node/MO-Files.html
+return gettext.gettext(context + chr(4) + string)
 
 # common section
 RID_COMMON_START_0  = NC_("RID_COMMON_START_0", "The 
directory '%1' could not be created.There may not be enough space left on 
your hard disk.")
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2017-11-22 Thread Gabor Kelemen
 wizards/com/sun/star/wizards/common/HelpIds.java |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 67fd1ea44506994d49833bd032bf0b07582e18c2
Author: Gabor Kelemen 
Date:   Tue Nov 21 23:12:36 2017 +0100

Fix Java wizard HID list

A still actively used HID was accidentally removed in commit:

https://cgit.freedesktop.org/libreoffice/core/commit/wizards/com/sun/star/wizards/common/HelpIds.java?id=82d863b4a410fa78120d2efc41bd2b3b61f21cee
This caused some HIDs in the Form wizard to slide off by one

Change-Id: I0142a150f1c65456ba9affe5d997ddabe37d1b3e
Reviewed-on: https://gerrit.libreoffice.org/45057
Tested-by: Jenkins 
Reviewed-by: Katarina Behrens 

diff --git a/wizards/com/sun/star/wizards/common/HelpIds.java 
b/wizards/com/sun/star/wizards/common/HelpIds.java
index 82c220695c5a..de87206d2bac 100644
--- a/wizards/com/sun/star/wizards/common/HelpIds.java
+++ b/wizards/com/sun/star/wizards/common/HelpIds.java
@@ -266,6 +266,7 @@ public class HelpIds
 "HID:WIZARDS_HID_DLGFORM_LINKER_LSTMASTERLINK1",// HID:34442
 "HID:WIZARDS_HID_DLGFORM_LINKER_LSTSLAVELINK2",// HID:34443
 "HID:WIZARDS_HID_DLGFORM_LINKER_LSTMASTERLINK2",// HID:3
+"HID:WIZARDS_HID_DLGFORM_LINKER_LSTSLAVELINK3", // HID:34445
 "HID:WIZARDS_HID_DLGFORM_LINKER_LSTMASTERLINK3",// HID:34446
 "HID:WIZARDS_HID_DLGFORM_LINKER_LSTSLAVELINK4",// HID:34447
 "HID:WIZARDS_HID_DLGFORM_LINKER_LSTMASTERLINK4",// HID:34448
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2017-10-31 Thread Gabor Kelemen
 wizards/com/sun/star/wizards/common/HelpIds.py |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 3c2e060f114c1e6d883af1fe63515b07ac886a5c
Author: Gabor Kelemen 
Date:   Mon Oct 30 22:22:01 2017 +0100

Fix Wizard HIDs moved off by one

In commit b3f96d2ccba362a2898bc3a4d365ce7c4d0698e2
I made a mistake that caused a lot of Wizard HIDS go off by one
i.e. they were attached to the next UI item.
I noticed this in the Fax wizard.
Adding one more empty array item seems to fix this.
Problem was caused by the replacement of this line with an empty item:
"", "HID:WIZARDS_HID_IS_BTN_NONE", # HID:41002

Change-Id: Id7df502ac843ab0e572ca59a046f5bacdda7e9bc
Reviewed-on: https://gerrit.libreoffice.org/44075
Tested-by: Jenkins 
Reviewed-by: Andras Timar 

diff --git a/wizards/com/sun/star/wizards/common/HelpIds.py 
b/wizards/com/sun/star/wizards/common/HelpIds.py
index c76b9e3eaa8b..971fc149c51a 100644
--- a/wizards/com/sun/star/wizards/common/HelpIds.py
+++ b/wizards/com/sun/star/wizards/common/HelpIds.py
@@ -772,6 +772,7 @@ class HelpIds:
 "",
 "",
 "",
+"",
 "HID:WIZARDS_HID_IS_BTN_OK", # HID:41003
 "HID:WIZARDS_HID_IS_BTN_CANCEL", # HID:41004
 "HID:WIZARDS_HID_IS_BTN_IMG1", # HID:41005
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2017-10-01 Thread Julien Nabet
 wizards/com/sun/star/wizards/ui/WizardDialog.java |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 05d5b6694b763ad81a1f79d480419341fb682e43
Author: Julien Nabet 
Date:   Sun Oct 1 23:12:04 2017 +0200

Fix regression for labels on Table wizard

Since 
https://cgit.freedesktop.org/libreoffice/core/commit/?id=a95def1aed681bbb664ff24470e0da7c5a5530ac

Change-Id: I9104ab6c68b55f1405297182cba087d668947b0f
Reviewed-on: https://gerrit.libreoffice.org/43011
Tested-by: Jenkins 
Reviewed-by: Julien Nabet 

diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.java 
b/wizards/com/sun/star/wizards/ui/WizardDialog.java
index 238c4da9cea5..69fbf5ab76b2 100644
--- a/wizards/com/sun/star/wizards/ui/WizardDialog.java
+++ b/wizards/com/sun/star/wizards/ui/WizardDialog.java
@@ -608,7 +608,7 @@ public abstract class WizardDialog extends UnoDialog2 
implements VetoableChangeL
 public void setRightPaneHeaders(Resource _oResource, String ResNameBase, 
int StartResID, int _nMaxStep)
 {
 String[] sRightPaneHeaders = new String[_nMaxStep];
-for (int i = 0; i < nMaxStep; ++i) {
+for (int i = 0; i < _nMaxStep; ++i) {
 sRightPaneHeaders[i] = _oResource.getResText(ResNameBase + 
String.valueOf(i + StartResID));
 }
 setRightPaneHeaders(sRightPaneHeaders);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com wizards/source writerfilter/source xmloff/source

2017-09-18 Thread Johnny_M
 wizards/com/sun/star/wizards/db/CommandName.java |2 +-
 wizards/com/sun/star/wizards/db/DBMetaData.java  |2 +-
 wizards/com/sun/star/wizards/db/FieldColumn.java |4 ++--
 wizards/com/sun/star/wizards/db/RecordParser.java|2 +-
 wizards/com/sun/star/wizards/table/FieldDescription.java |2 +-
 wizards/source/formwizard/Layouter.xba   |2 +-
 wizards/source/gimmicks/GetTexts.xba |2 +-
 wizards/source/tools/Misc.xba|8 
 wizards/source/tutorials/Functions.xba   |2 +-
 writerfilter/source/dmapper/PropertyMap.cxx  |2 +-
 xmloff/source/text/txtexppr.cxx  |4 ++--
 11 files changed, 16 insertions(+), 16 deletions(-)

New commits:
commit 510b9557c37c666016c55e6ed2be7a50dbd1b67f
Author: Johnny_M 
Date:   Sun Sep 17 14:23:46 2017 +0200

Translate German comments and debug strings (leftovers in dirs w... and 
x...)

Translates leftovers found using a custom regex in directories beginning 
with "w" and "x".

Additionally:
- A few corrections of previous translations

Change-Id: Ic30cf6792748a6bea8782a9a3711fa468b80bdaf
Reviewed-on: https://gerrit.libreoffice.org/42378
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 

diff --git a/wizards/com/sun/star/wizards/db/CommandName.java 
b/wizards/com/sun/star/wizards/db/CommandName.java
index 91e54ed3ba25..4768018ef3b5 100644
--- a/wizards/com/sun/star/wizards/db/CommandName.java
+++ b/wizards/com/sun/star/wizards/db/CommandName.java
@@ -87,7 +87,7 @@ public class CommandName
 this.DisplayName = _DisplayName;
 int iIndex;
 if 
(oCommandMetaData.xDBMetaData.supportsCatalogsInDataManipulation())
-{ // ...dann Catalog mit in TableName
+{ // ...then Catalog also in TableName
 iIndex = _DisplayName.indexOf(sCatalogSep);
 if (iIndex >= 0)
 {
diff --git a/wizards/com/sun/star/wizards/db/DBMetaData.java 
b/wizards/com/sun/star/wizards/db/DBMetaData.java
index 8d90126d3e5e..1a720b0ac3a5 100644
--- a/wizards/com/sun/star/wizards/db/DBMetaData.java
+++ b/wizards/com/sun/star/wizards/db/DBMetaData.java
@@ -351,7 +351,7 @@ public class DBMetaData
 WidthList[4][0] = DataType.LONGVARCHAR; // ==  -1;
 WidthList[5][0] = DataType.CHAR; // ==   1;
 WidthList[6][0] = DataType.NUMERIC; // ==   2;
-WidthList[7][0] = DataType.DECIMAL; // ==   3;  [mit Nachkommastellen]
+WidthList[7][0] = DataType.DECIMAL; // ==   3;  [with fractional part]
 WidthList[8][0] = DataType.INTEGER; // ==   4;
 WidthList[9][0] = DataType.SMALLINT; // ==   5;
 WidthList[10][0] = DataType.FLOAT; // ==   6;
diff --git a/wizards/com/sun/star/wizards/db/FieldColumn.java 
b/wizards/com/sun/star/wizards/db/FieldColumn.java
index 29e4b3939194..dd8b85a9207e 100644
--- a/wizards/com/sun/star/wizards/db/FieldColumn.java
+++ b/wizards/com/sun/star/wizards/db/FieldColumn.java
@@ -266,7 +266,7 @@ public class FieldColumn
 bIsNumberFormat = true;
 break;
 
-case DataType.DECIMAL: // ==   3;  [mit Nachkommastellen]
+case DataType.DECIMAL: // ==   3;  [with fractional part]
 case DataType.FLOAT: // ==   6;
 case DataType.REAL: // ==   7;
 case DataType.DOUBLE: // ==   8;
@@ -369,7 +369,7 @@ public class FieldColumn
 break;
 
 case DataType.NUMERIC: // ==   2;
-case DataType.DECIMAL: // ==   3;  [mit Nachkommastellen]
+case DataType.DECIMAL: // ==   3;  [with fractional part]
 case DataType.FLOAT: // ==   6;
 case DataType.REAL: // ==   7;
 case DataType.DOUBLE: // ==   8;
diff --git a/wizards/com/sun/star/wizards/db/RecordParser.java 
b/wizards/com/sun/star/wizards/db/RecordParser.java
index c06566874cef..bb35b041fe97 100644
--- a/wizards/com/sun/star/wizards/db/RecordParser.java
+++ b/wizards/com/sun/star/wizards/db/RecordParser.java
@@ -127,7 +127,7 @@ public class RecordParser extends QueryMetaData
 case DataType.NUMERIC: // ==   2;
 case DataType.INTEGER: // ==   4;
 case DataType.SMALLINT: // ==   5;
-case DataType.DECIMAL: // ==   3;  [mit Nachkommastellen]
+case DataType.DECIMAL: // ==   3;  [with fractional part]
 case DataType.FLOAT: // ==   6;
 case DataType.REAL: // ==   7;
 case DataType.DOUBLE: // ==   8;
diff --git a/wizards/com/sun/star/wizards/table/FieldDescription.java 
b/wizards/com/sun/star/wizards/table/FieldDescription.java
index 2128a760eabe..95a847136360 100644
--- a/wizards/com/sun/star/wizards/table/FieldDescription.java
+++ 

[Libreoffice-commits] core.git: wizards/com

2017-07-13 Thread Caolán McNamara
 wizards/com/sun/star/wizards/letter/LetterWizardDialog.py |   32 +++---
 1 file changed, 16 insertions(+), 16 deletions(-)

New commits:
commit d255fb191ef9e49939a5ef076afcc778d74a6507
Author: Caolán McNamara 
Date:   Thu Jul 13 12:58:19 2017 +0100

Resolves: tdf#93745 gtk3 spinbuttons are wider than available space

make dialog 40 pixels wider and allocate 20 extra pixels per spinbutton
and shift labels accordingly

Change-Id: Ic7e5dd662e01207abcbcbb9043f927eceb5b2bd0
Reviewed-on: https://gerrit.libreoffice.org/39903
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialog.py 
b/wizards/com/sun/star/wizards/letter/LetterWizardDialog.py
index bbd14c13c959..5d7c2e39eabf 100644
--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialog.py
+++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialog.py
@@ -32,7 +32,7 @@ class LetterWizardDialog(WizardDialog):
 
 #set dialog properties...
 self.setDialogProperties(True, 210, True, 104, 52, 1, 1, 
-self.resources.resLetterWizardDialog_title, 310)
+self.resources.resLetterWizardDialog_title, 350)
 
 self.fontDescriptor5 = \
 uno.createUnoStruct('com.sun.star.awt.FontDescriptor')
@@ -243,7 +243,7 @@ class LetterWizardDialog(WizardDialog):
 "Value",
 PropertyNames.PROPERTY_WIDTH),
 (12, HelpIds.getHelpIdString(HID + 9),
-"numLogoHeight", 138, 40, True, 2, True, 9, 3, 30), self)
+"numLogoHeight", 138, 40, True, 2, True, 9, 3, 50), self)
 self.numLogoX = self.insertNumericField(
 "numLogoX",
 LetterWizardDialogConst.NUMLOGOX_TEXT_CHANGED,
@@ -258,7 +258,7 @@ class LetterWizardDialog(WizardDialog):
 "Value",
 PropertyNames.PROPERTY_WIDTH),
 (12, HelpIds.getHelpIdString(HID + 10),
-"numLogoX", 266, 40, True, 2, 10, 0, 30), self)
+"numLogoX", 286, 40, True, 2, 10, 0, 50), self)
 self.numLogoWidth = self.insertNumericField(
 "numLogoWidth",
 LetterWizardDialogConst.NUMLOGOWIDTH_TEXT_CHANGED,
@@ -273,7 +273,7 @@ class LetterWizardDialog(WizardDialog):
 "Value",
 PropertyNames.PROPERTY_WIDTH),
 (12, HelpIds.getHelpIdString(HID + 11),
-"numLogoWidth", 138, 56, True, 2, 11, 3.8, 30), self)
+"numLogoWidth", 138, 56, True, 2, 11, 3.8, 50), self)
 self.numLogoY = self.insertNumericField(
 "numLogoY",
 LetterWizardDialogConst.NUMLOGOY_TEXT_CHANGED,
@@ -288,7 +288,7 @@ class LetterWizardDialog(WizardDialog):
 "Value",
 PropertyNames.PROPERTY_WIDTH),
 (12, HelpIds.getHelpIdString(HID + 12),
-"numLogoY", 266, 56, True, 2, 12, -3.4, 30), self)
+"numLogoY", 286, 56, True, 2, 12, -3.4, 50), self)
 self.chkPaperCompanyAddress = self.insertCheckBox(
 "chkPaperCompanyAddress",
 LetterWizardDialogConst.CHKPAPERCOMPANYADDRESS_ITEM_CHANGED,
@@ -320,7 +320,7 @@ class LetterWizardDialog(WizardDialog):
 "Value",
 PropertyNames.PROPERTY_WIDTH),
 (12, HelpIds.getHelpIdString(HID + 14),
-"numAddressHeight", 138, 96, True, 2, True, 14, 3, 30), self)
+"numAddressHeight", 138, 96, True, 2, True, 14, 3, 50), self)
 self.numAddressX = self.insertNumericField(
 "numAddressX",
 LetterWizardDialogConst.NUMADDRESSX_TEXT_CHANGED,
@@ -335,7 +335,7 @@ class LetterWizardDialog(WizardDialog):
 "Value",
 PropertyNames.PROPERTY_WIDTH),
 (12, HelpIds.getHelpIdString(HID + 15),
-"numAddressX", 266, 96, True, 2, 15, 3.8, 30), self)
+"numAddressX", 286, 96, True, 2, 15, 3.8, 50), self)
 self.numAddressWidth = self.insertNumericField(
 "numAddressWidth",
 LetterWizardDialogConst.NUMADDRESSWIDTH_TEXT_CHANGED,
@@ -350,7 +350,7 @@ class LetterWizardDialog(WizardDialog):
 "Value",
 PropertyNames.PROPERTY_WIDTH),
 (12, HelpIds.getHelpIdString(HID + 16),
-"numAddressWidth", 138, 112, True, 2, 16, 13.8, 30), self)
+"numAddressWidth", 138, 112, True, 2, 16, 13.8, 50), self)
 self.numAddressY = self.insertNumericField(
 "numAddressY",
 LetterWizardDialogConst.NUMADDRESSY_TEXT_CHANGED,
@@ -365,7 +365,7 @@ class LetterWizardDialog(WizardDialog):
 "Value",
 PropertyNames.PROPERTY_WIDTH),
 (12, HelpIds.getHelpIdString(HID + 17),
-"numAddressY", 

[Libreoffice-commits] core.git: wizards/com

2017-05-21 Thread Caolán McNamara
 wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.py |9 ++-
 wizards/com/sun/star/wizards/common/Resource.py|   10 ---
 wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py   |   28 
+++---
 wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py |   21 
+--
 4 files changed, 42 insertions(+), 26 deletions(-)

New commits:
commit 38632f933ae9361dad48b2123670876d7d602867
Author: Caolán McNamara 
Date:   Sun May 21 15:04:01 2017 +0100

expand and drop python getResArray

Change-Id: Ie81495a15376b01b0e87ee84628b8c6945897a3d
Reviewed-on: https://gerrit.libreoffice.org/37877
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.py 
b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.py
index 292059cce2a7..f10587a94d3a 100644
--- a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.py
+++ b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.py
@@ -217,5 +217,10 @@ class AgendaWizardDialogResources(object):
 self.resTemplateDescription = oWizardResource.getResText(
 AgendaWizardDialogResources.RID_COMMON_START + 20)
 
-self.RoadmapLabels = oWizardResource.getResArray(
-AgendaWizardDialogResources.RID_AGENDAWIZARDROADMAP_START + 1 , 6)
+self.RoadmapLabels = []
+
self.RoadmapLabels.append(oWizardResource.getResText(AgendaWizardDialogResources.RID_AGENDAWIZARDROADMAP_START
 + 1))
+
self.RoadmapLabels.append(oWizardResource.getResText(AgendaWizardDialogResources.RID_AGENDAWIZARDROADMAP_START
 + 2))
+
self.RoadmapLabels.append(oWizardResource.getResText(AgendaWizardDialogResources.RID_AGENDAWIZARDROADMAP_START
 + 3))
+
self.RoadmapLabels.append(oWizardResource.getResText(AgendaWizardDialogResources.RID_AGENDAWIZARDROADMAP_START
 + 4))
+
self.RoadmapLabels.append(oWizardResource.getResText(AgendaWizardDialogResources.RID_AGENDAWIZARDROADMAP_START
 + 5))
+
self.RoadmapLabels.append(oWizardResource.getResText(AgendaWizardDialogResources.RID_AGENDAWIZARDROADMAP_START
 + 6))
diff --git a/wizards/com/sun/star/wizards/common/Resource.py 
b/wizards/com/sun/star/wizards/common/Resource.py
index a601b9c18ee9..4d3c29e48770 100644
--- a/wizards/com/sun/star/wizards/common/Resource.py
+++ b/wizards/com/sun/star/wizards/common/Resource.py
@@ -47,16 +47,6 @@ class Resource(object):
 traceback.print_exc()
 raise ValueError("Resource with ID not " + str(nID) + " not found")
 
-def getResArray(self, nID, iCount):
-try:
-resArray = []
-for i in range(iCount):
-resArray.append(self.getResText(nID + i))
-return resArray
-except Exception:
-traceback.print_exc()
-raise ValueError("Resource with ID not" + str(nID) + " not found")
-
 @classmethod
 def showCommonResourceError(self, xMSF):
 from .SystemDialog import SystemDialog
diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py 
b/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py
index 25c5171c954f..c274635ba5c0 100644
--- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py
+++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py
@@ -153,11 +153,23 @@ class FaxWizardDialogResources(object):
 self.resTemplateDescription = oWizardResource.getResText(
 FaxWizardDialogResources.RID_RID_COMMON_START + 20)
 
-self.RoadmapLabels = oWizardResource.getResArray(
-FaxWizardDialogResources.RID_FAXWIZARDROADMAP_START + 1 , 5)
-self.SalutationLabels = oWizardResource.getResArray(
-FaxWizardDialogResources.RID_FAXWIZARDSALUTATION_START + 1 , 4)
-self.GreetingLabels = oWizardResource.getResArray(
-FaxWizardDialogResources.RID_FAXWIZARDGREETING_START + 1 , 4)
-self.CommunicationLabels = oWizardResource.getResArray(
-FaxWizardDialogResources.RID_FAXWIZARDCOMMUNICATION_START + 1 , 3)
+self.RoadmapLabels = []
+
self.RoadmapLabels.append(oWizardResource.getResText(FaxWizardDialogResources.RID_FAXWIZARDROADMAP_START
 + 1))
+
self.RoadmapLabels.append(oWizardResource.getResText(FaxWizardDialogResources.RID_FAXWIZARDROADMAP_START
 + 2))
+
self.RoadmapLabels.append(oWizardResource.getResText(FaxWizardDialogResources.RID_FAXWIZARDROADMAP_START
 + 3))
+
self.RoadmapLabels.append(oWizardResource.getResText(FaxWizardDialogResources.RID_FAXWIZARDROADMAP_START
 + 4))
+
self.RoadmapLabels.append(oWizardResource.getResText(FaxWizardDialogResources.RID_FAXWIZARDROADMAP_START
 + 5))
+self.SalutationLabels = []
+

[Libreoffice-commits] core.git: wizards/com

2017-05-07 Thread Julien Nabet
 wizards/com/sun/star/wizards/form/UIControlArranger.java |   36 ++-
 1 file changed, 25 insertions(+), 11 deletions(-)

New commits:
commit aa722151d0e76fddbc3801667f5d613690d5a4d9
Author: Julien Nabet 
Date:   Sun May 7 07:58:46 2017 +0200

tdf#107668: fix form wizard

Regression from 
https://cgit.freedesktop.org/libreoffice/core/commit/?id=fcf9c22e00db0107391775f51fac53555711b951
Use an hashmap to find the right helpText

Change-Id: Ie3389406525fb068fb24262a40b8e6af4c744100
Reviewed-on: https://gerrit.libreoffice.org/37334
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/wizards/com/sun/star/wizards/form/UIControlArranger.java 
b/wizards/com/sun/star/wizards/form/UIControlArranger.java
index a6b4b77f3a41..15122111fec1 100644
--- a/wizards/com/sun/star/wizards/form/UIControlArranger.java
+++ b/wizards/com/sun/star/wizards/form/UIControlArranger.java
@@ -17,6 +17,9 @@
  */
 package com.sun.star.wizards.form;
 
+import java.util.Map;
+import java.util.HashMap;
+
 import com.sun.star.awt.ItemEvent;
 import com.sun.star.awt.Size;
 import com.sun.star.awt.XControl;
@@ -44,11 +47,15 @@ public class UIControlArranger
 private final XRadioButton optAlignLeft;
 private final XRadioButton optAlignRight;
 private final XControl flnLabelPlacement;
-private final String[] HelpTexts = new String[4];
+private final Map helpTexts = new HashMap(4);
 private final ArrangeButtonList[] m_aArrangeList = new 
ArrangeButtonList[2];
 private final Integer IControlStep;
 private static final int SOBASEIMAGEYPOSITION = 66;
 private static final int SOIMAGELISTHEIGHT = 60;
+private static final String ARRANGELISTSIDE = 
"private:graphicrepository/wizards/res/formarrangelistside_42.png";
+private static final String ARRANGELISTTOP = 
"private:graphicrepository/wizards/res/formarrangelisttop_42.png";
+private static final String ARRANGETABLE = 
"private:graphicrepository/wizards/res/formarrangetable_42.png";
+private static final String ARRANGEFREE = 
"private:graphicrepository/wizards/res/formarrangefree_42.png";
 
 public UIControlArranger(FormWizard _CurUnoDialog, FormDocument 
_curFormDocument)
 {
@@ -102,16 +109,23 @@ public class UIControlArranger
 });
 
 
-HelpTexts[0] = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 
36); // "Columnar - Labels Left"
-HelpTexts[1] = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 
37); // "Columnar - Labels of Top"
-HelpTexts[2] = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 
40); // "As Data Sheet"
-HelpTexts[3] = CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 
39); // In Blocks - Labels Above"
-
 DefaultListModel imageModel = new DefaultListModel();
-
imageModel.addElement("private:graphicrepository/wizards/res/formarrangelistside_42.png");
-
imageModel.addElement("private:graphicrepository/wizards/res/formarrangelisttop_42.png");
-
imageModel.addElement("private:graphicrepository/wizards/res/formarrangetable_42.png");
-
imageModel.addElement("private:graphicrepository/wizards/res/formarrangefree_42.png");
+imageModel.addElement(ARRANGELISTSIDE);
+imageModel.addElement(ARRANGELISTTOP);
+imageModel.addElement(ARRANGETABLE);
+imageModel.addElement(ARRANGEFREE);
+
+// "Columnar - Labels Left"
+helpTexts.put(ARRANGELISTSIDE, 
CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 36));
+
+// "Columnar - Labels of Top"
+helpTexts.put(ARRANGELISTTOP, 
CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 37));
+
+// "As Data Sheet"
+helpTexts.put(ARRANGETABLE, 
CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 40));
+
+// "In Blocks - Labels Above"
+helpTexts.put(ARRANGEFREE, 
CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 39));
 
 String sMainArrangementHeader = 
CurUnoDialog.m_oResource.getResText(UIConsts.RID_FORM + 41); // "Arrangement of 
the main form"
 m_aArrangeList[0] = new ArrangeButtonList(0, imageModel, 
sMainArrangementHeader);
@@ -134,7 +148,7 @@ public class UIControlArranger
 {
 return PropertyNames.EMPTY_STRING;
 }
-return HelpTexts[((Integer) listItem).intValue()];
+return (String) helpTexts.get(listItem);
 
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2017-04-07 Thread Gabor Kelemen
 wizards/com/sun/star/wizards/common/HelpIds.java |  126 +++
 wizards/com/sun/star/wizards/common/HelpIds.py   |  126 +++
 2 files changed, 126 insertions(+), 126 deletions(-)

New commits:
commit b3f96d2ccba362a2898bc3a4d365ce7c4d0698e2
Author: Gabor Kelemen 
Date:   Wed Mar 15 20:55:19 2017 +0100

tdf#99967 (related) Drop Web Wizard HIDs

These were used on the recently dropped help pages

Change-Id: I391c881b43c49000c37cbe53b111f686eaa64843
Reviewed-on: https://gerrit.libreoffice.org/36093
Tested-by: Jenkins 
Reviewed-by: Samuel Mehrbrodt 

diff --git a/wizards/com/sun/star/wizards/common/HelpIds.java 
b/wizards/com/sun/star/wizards/common/HelpIds.java
index f4ec24af8a4f..82c220695c5a 100644
--- a/wizards/com/sun/star/wizards/common/HelpIds.java
+++ b/wizards/com/sun/star/wizards/common/HelpIds.java
@@ -28,71 +28,38 @@ public class HelpIds
 "HID:WIZARDS_HID0_CREATE",// HID:34204
 "HID:WIZARDS_HID0_CANCEL",// HID:34205
 "HID:WIZARDS_HID0_STATUS_DIALOG",// HID:34206
-"HID:WIZARDS_HID1_LST_SESSIONS",// HID:34207
 PropertyNames.EMPTY_STRING,
-"HID:WIZARDS_HID1_BTN_DEL_SES",// HID:34209
-"HID:WIZARDS_HID2_LST_DOCS",// HID:34210
-"HID:WIZARDS_HID2_BTN_ADD_DOC",// HID:34211
-"HID:WIZARDS_HID2_BTN_REM_DOC",// HID:34212
+PropertyNames.EMPTY_STRING,
+PropertyNames.EMPTY_STRING,
+PropertyNames.EMPTY_STRING,
+PropertyNames.EMPTY_STRING,
+PropertyNames.EMPTY_STRING,
 "HID:WIZARDS_HID2_BTN_DOC_UP",// HID:34213
 "HID:WIZARDS_HID2_BTN_DOC_DOWN",// HID:34214
-"HID:WIZARDS_HID2_TXT_DOC_TITLE",// HID:34215
-"HID:WIZARDS_HID2_TXT_DOC_DESC",// HID:34216
-"HID:WIZARDS_HID2_TXT_DOC_AUTHOR",// HID:34217
-"HID:WIZARDS_HID2_LST_DOC_EXPORT",// HID:34218
+PropertyNames.EMPTY_STRING,
+PropertyNames.EMPTY_STRING,
+PropertyNames.EMPTY_STRING,
+PropertyNames.EMPTY_STRING,
 "HID:WIZARDS_HID2_STATUS_ADD_DOCS",// HID:34219
-"HID:WIZARDS_HID3_IL_LAYOUTS_IMG1",// HID:34220
-"HID:WIZARDS_HID3_IL_LAYOUTS_IMG2",// HID:34221
-"HID:WIZARDS_HID3_IL_LAYOUTS_IMG3",// HID:34222
-"HID:WIZARDS_HID3_IL_LAYOUTS_IMG4",// HID:34223
-"HID:WIZARDS_HID3_IL_LAYOUTS_IMG5",// HID:34224
-"HID:WIZARDS_HID3_IL_LAYOUTS_IMG6",// HID:34225
-"HID:WIZARDS_HID3_IL_LAYOUTS_IMG7",// HID:34226
-"HID:WIZARDS_HID3_IL_LAYOUTS_IMG8",// HID:34227
-"HID:WIZARDS_HID3_IL_LAYOUTS_IMG9",// HID:34228
+PropertyNames.EMPTY_STRING,
+PropertyNames.EMPTY_STRING,
+PropertyNames.EMPTY_STRING,
+PropertyNames.EMPTY_STRING,
+PropertyNames.EMPTY_STRING,
+PropertyNames.EMPTY_STRING,
+PropertyNames.EMPTY_STRING,
+PropertyNames.EMPTY_STRING,
+PropertyNames.EMPTY_STRING,
 "HID:WIZARDS_HID3_IL_LAYOUTS_IMG10",// HID:34229
 "HID:WIZARDS_HID3_IL_LAYOUTS_IMG11",// HID:34230
 "HID:WIZARDS_HID3_IL_LAYOUTS_IMG12",// HID:34231
 "HID:WIZARDS_HID3_IL_LAYOUTS_IMG13",// HID:34232
 "HID:WIZARDS_HID3_IL_LAYOUTS_IMG14",// HID:34233
 "HID:WIZARDS_HID3_IL_LAYOUTS_IMG15",// HID:34234
-"HID:WIZARDS_HID4_CHK_DISPLAY_FILENAME",// HID:34235
-"HID:WIZARDS_HID4_CHK_DISPLAY_DESCRIPTION",// HID:34236
-"HID:WIZARDS_HID4_CHK_DISPLAY_AUTHOR",// HID:34237
-"HID:WIZARDS_HID4_CHK_DISPLAY_CR_DATE",// HID:34238
-"HID:WIZARDS_HID4_CHK_DISPLAY_UP_DATE",// HID:34239
-"HID:WIZARDS_HID4_CHK_DISPLAY_FORMAT",// HID:34240
-"HID:WIZARDS_HID4_CHK_DISPLAY_F_ICON",// HID:34241
-"HID:WIZARDS_HID4_CHK_DISPLAY_PAGES",// HID:34242
-"HID:WIZARDS_HID4_CHK_DISPLAY_SIZE",// HID:34243
-"HID:WIZARDS_HID4_GRP_OPTIMAIZE_640",// HID:34244
-"HID:WIZARDS_HID4_GRP_OPTIMAIZE_800",// HID:34245
-"HID:WIZARDS_HID4_GRP_OPTIMAIZE_1024",// HID:34246
-"HID:WIZARDS_HID5_LST_STYLES",// HID:34247
-"HID:WIZARDS_HID5_BTN_BACKGND",// HID:34248
-"HID:WIZARDS_HID5_BTN_ICONS",// HID:34249
-"HID:WIZARDS_HID6_TXT_SITE_TITLE",// HID:34250
 PropertyNames.EMPTY_STRING,
 PropertyNames.EMPTY_STRING,
-"HID:WIZARDS_HID6_TXT_SITE_DESC",// HID:34253
 PropertyNames.EMPTY_STRING,
-"HID:WIZARDS_HID6_DATE_SITE_CREATED",// HID:34255
-"HID:WIZARDS_HID6_DATE_SITE_UPDATED",// HID:34256
 PropertyNames.EMPTY_STRING,
-"HID:WIZARDS_HID6_TXT_SITE_EMAIL",// HID:34258
-"HID:WIZARDS_HID6_TXT_SITE_COPYRIGHT",// HID:34259
-"HID:WIZARDS_HID7_BTN_PREVIEW",// HID:34260
-   

[Libreoffice-commits] core.git: wizards/com

2017-02-20 Thread Julien Nabet
 wizards/com/sun/star/wizards/letter/LetterWizardDialog.py |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e25bf8505cfaa3599c2e78a7c56729280f27373e
Author: Julien Nabet 
Date:   Mon Feb 20 23:25:53 2017 +0100

Import UIConsts to use INFOIMAGEURL

Regression from 
https://cgit.freedesktop.org/libreoffice/core/commit/?id=8911c7e177dcc2e9b5a9efcc308395081855b21f

Change-Id: I4f25b5df6a657ad22080b039eaa1746ce4b82b9a
Reviewed-on: https://gerrit.libreoffice.org/34495
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 

diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialog.py 
b/wizards/com/sun/star/wizards/letter/LetterWizardDialog.py
index d28496d..bbd14c1 100644
--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialog.py
+++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialog.py
@@ -18,7 +18,7 @@
 from .LetterWizardDialogConst import LetterWizardDialogConst, HIDMAIN, HID
 from .LetterWizardDialogResources import LetterWizardDialogResources
 from ..common.HelpIds import HelpIds
-from ..ui.WizardDialog import WizardDialog, uno, PropertyNames
+from ..ui.WizardDialog import WizardDialog, uno, UIConsts, PropertyNames
 
 from com.sun.star.awt.FontUnderline import SINGLE
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2017-01-26 Thread Caolán McNamara
 wizards/com/sun/star/wizards/web/BackgroundsDialog.py |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e99364e34b79c89ed5b77eb4f985eab4546dadac
Author: Caolán McNamara 
Date:   Thu Jan 26 14:04:49 2017 +

fix wrong indent

since...

commit 6ec8387bea9015c4487f76cebd045a1a6e291bc4
Author: Caolán McNamara 
Date:   Thu Jan 19 15:56:12 2017 +

unbreak this wizard enough to run it

though in fairness it didn't work before that change anyway

Change-Id: Ibd454ec781c6a5ca65ad08f894854b556b046be6

diff --git a/wizards/com/sun/star/wizards/web/BackgroundsDialog.py 
b/wizards/com/sun/star/wizards/web/BackgroundsDialog.py
index d096873..1844876 100644
--- a/wizards/com/sun/star/wizards/web/BackgroundsDialog.py
+++ b/wizards/com/sun/star/wizards/web/BackgroundsDialog.py
@@ -84,8 +84,8 @@ class BackgroundsDialog(ImageListDialog):
 while i < self.il.listModel.getSize():
 if self.il.listModel.getElementAt(i) == s:
 return i
+i += 1
 
-i += 1
 self.il.listModel.add1(s)
 try:
 configView = Configuration.getConfigurationRoot(
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2017-01-19 Thread Caolán McNamara
 wizards/com/sun/star/wizards/form/UIControlArranger.java |8 +-
 wizards/com/sun/star/wizards/ui/ButtonList.java  |   18 ---
 wizards/com/sun/star/wizards/ui/ImageList.py |   16 +
 wizards/com/sun/star/wizards/web/BackgroundsDialog.py|6 +
 wizards/com/sun/star/wizards/web/IconsDialog.py  |7 +
 wizards/com/sun/star/wizards/web/WebWizardDialog.py  |9 +++
 wizards/com/sun/star/wizards/web/data/CGLayout.py|4 +--
 7 files changed, 23 insertions(+), 45 deletions(-)

New commits:
commit 843e2a9dd6127bf7b5b9adde2ef01451449f0ba3
Author: Caolán McNamara 
Date:   Thu Jan 19 16:21:46 2017 +

get rid of second hicontrast argument

Change-Id: If68b6c8dac5ea4ff50edf90f2b1b8dbc2e0383b4

diff --git a/wizards/com/sun/star/wizards/form/UIControlArranger.java 
b/wizards/com/sun/star/wizards/form/UIControlArranger.java
index 566829d..c518530 100644
--- a/wizards/com/sun/star/wizards/form/UIControlArranger.java
+++ b/wizards/com/sun/star/wizards/form/UIControlArranger.java
@@ -126,14 +126,10 @@ public class UIControlArranger
 
 private class LayoutRenderer implements ButtonList.IImageRenderer
 {
-public Object[] getImageUrls(Object listitem)
+public Object getImageUrl(Object listitem)
 {
-
 int ResId = UIConsts.RID_IMG_FORM + (2 * ((Integer) 
listitem).intValue());
-return new Integer[]
-{
-Integer.valueOf(ResId), Integer.valueOf(ResId + 1)
-};
+return Integer.valueOf(ResId);
 }
 
 public String render(Object listItem)
diff --git a/wizards/com/sun/star/wizards/ui/ButtonList.java 
b/wizards/com/sun/star/wizards/ui/ButtonList.java
index f2aa6ea..3bb1489f3 100644
--- a/wizards/com/sun/star/wizards/ui/ButtonList.java
+++ b/wizards/com/sun/star/wizards/ui/ButtonList.java
@@ -288,17 +288,10 @@ public class ButtonList implements XItemEventBroadcaster, 
XActionListener
 Object oObj = getObjectFor(i);
 if (oObj == null)
 continue;
-Object[] oResources = renderer.getImageUrls(oObj);
-if (oResources == null)
+Object oResource = renderer.getImageUrl(oObj);
+if (oResource == null)
 continue;
-if (oResources.length == 1)
-{
-Helper.setUnoPropertyValue(m_aButtons[i].getModel(), 
PropertyNames.PROPERTY_IMAGEURL, oResources[0]);
-}
-else if (oResources.length == 2)
-{
-
oUnoDialog.getPeerConfiguration().setImageUrl(m_aButtons[i].getModel(), 
oResources[0]);
-}
+
oUnoDialog.getPeerConfiguration().setImageUrl(m_aButtons[i].getModel(), 
oResource);
 boolean bTabStop = Boolean.TRUE; // focusable ? Boolean.TRUE : 
Boolean.FALSE;
 Helper.setUnoPropertyValue(m_aButtons[i].getModel(), "Tabstop", 
bTabStop);
 if (refreshOverNull)
@@ -533,10 +526,9 @@ public class ButtonList implements XItemEventBroadcaster, 
XActionListener
 {
 
 /**
- * @return two resource ids for an image referenced in the imaglist 
resourcefile of the
- * wizards project; The second one of them is designed to be used for 
High Contrast Mode.
+ * @return a resource ids for an image referenced in the resourcefile 
of the wizards project
  */
-Object[] getImageUrls(Object listItem);
+Object getImageUrl(Object listItem);
 }
 
 private static class SimpleCounterRenderer implements IRenderer
diff --git a/wizards/com/sun/star/wizards/ui/ImageList.py 
b/wizards/com/sun/star/wizards/ui/ImageList.py
index 5d7dd79..2e65eec 100644
--- a/wizards/com/sun/star/wizards/ui/ImageList.py
+++ b/wizards/com/sun/star/wizards/ui/ImageList.py
@@ -224,13 +224,10 @@ class ImageList(ListDataListener):
 
 focusable = True
 for index, item in enumerate(self.m_aImages):
-oResources = self.renderer.getImageUrls(self.getObjectFor(index))
-if oResources is not None:
-if len(oResources) == 1:
-item.Model.ImageURL = oResources[0]
-elif len(oResources) == 2:
-self.oUnoDialog.getPeerConfiguration().setImageUrl(
-item.Model, oResources[0])
+oResource = self.renderer.getImageUrl(self.getObjectFor(index))
+if oResource is not None:
+self.oUnoDialog.getPeerConfiguration().setImageUrl(
+item.Model, oResource)
 
 item.Model.Tabstop = bool(focusable)
 if self.refreshOverNull:
@@ -450,10 +447,9 @@ class ImageList(ListDataListener):
 class IImageRenderer(IRenderer):
 
  # @param listItem
- # @return two resource ids for an image referenced in the imaglist 
resourcefile of the
- 

[Libreoffice-commits] core.git: wizards/com

2017-01-19 Thread Caolán McNamara
 wizards/com/sun/star/wizards/web/BackgroundsDialog.py |   20 +-
 1 file changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 6ec8387bea9015c4487f76cebd045a1a6e291bc4
Author: Caolán McNamara 
Date:   Thu Jan 19 15:56:12 2017 +

unbreak this wizard enough to run it

Change-Id: Ia957080165a060164317a5f7c9a46d065169314a

diff --git a/wizards/com/sun/star/wizards/web/BackgroundsDialog.py 
b/wizards/com/sun/star/wizards/web/BackgroundsDialog.py
index 19f377e..c6c2fa8 100644
--- a/wizards/com/sun/star/wizards/web/BackgroundsDialog.py
+++ b/wizards/com/sun/star/wizards/web/BackgroundsDialog.py
@@ -64,12 +64,12 @@ class BackgroundsDialog(ImageListDialog):
 def other(self):
 filename = self.sd.callOpenDialog(
 False, self.settings.cp_DefaultSession.cp_InDirectory)
-if filename is not None and filename.length > 0 and filename[0] is not 
None:
+if filename is not None and len(filename) > 0 and filename[0] is not 
None:
 self.settings.cp_DefaultSession.cp_InDirectory = \
 FileAccess.getParentDir(filename[0])
 i = self.add(filename[0])
-il.setSelected(i)
-il.display(i)
+self.il.setSelected(i)
+self.il.display(i)
 
 '''
 adds the given image to the image list (to the model)
@@ -81,24 +81,24 @@ class BackgroundsDialog(ImageListDialog):
 def add(self, s):
 #first i check the item does not already exists in the list...
 i = 0
-while i < il.getListModel().getSize():
-if il.getListModel().getElementAt(i) == s:
+while i < self.il.listModel.getSize():
+if self.il.listModel.getElementAt(i) == s:
 return i
 
-i += 1
-il.getListModel().addElement(s)
+i += 1
+self.il.listModel.add1(s)
 try:
 configView = Configuration.getConfigurationRoot(
 self.xMSF, FileAccess.connectURLs(
 CONFIG_PATH, "BackgroundImages"), True)
-i = Configuration.getChildrenNames(configView).length + 1
-o = Configuration.addConfigNode(configView, "" + i)
+i = len(Configuration.getChildrenNames(configView)) + 1
+o = Configuration.addConfigNode(configView, "" + str(i))
 Configuration.set(s, "Href", o)
 Configuration.commit(configView)
 except Exception:
 traceback.print_exc()
 
-return il.getListModel().getSize() - 1
+return self.il.listModel.getSize() - 1
 
 '''
 an ImageList Imagerenderer implemtation.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2017-01-07 Thread Julien Nabet
 wizards/com/sun/star/wizards/db/TableDescriptor.java |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 1274efb0a18aef50c78ca07997572a8f2b7145c7
Author: Julien Nabet 
Date:   Sat Jan 7 08:29:33 2017 +0100

Typo: isColunnNameDuplicate->isColumnNameDuplicate

Found thanks to Buovjaga

Change-Id: I9c52c2c5fa7c92e2b9d99fbbb9d02439993397b0
Reviewed-on: https://gerrit.libreoffice.org/32807
Tested-by: Jenkins 
Reviewed-by: Julien Nabet 

diff --git a/wizards/com/sun/star/wizards/db/TableDescriptor.java 
b/wizards/com/sun/star/wizards/db/TableDescriptor.java
index e83ea5b..fca2619 100644
--- a/wizards/com/sun/star/wizards/db/TableDescriptor.java
+++ b/wizards/com/sun/star/wizards/db/TableDescriptor.java
@@ -201,7 +201,7 @@ public class TableDescriptor extends CommandMetaData 
implements XContainerListen
 return false;
 }
 
-private boolean isColunnNameDuplicate(XNameAccess _xColumns, XPropertySet 
_xToBeAppendedPropertySet)
+private boolean isColumnNameDuplicate(XNameAccess _xColumns, XPropertySet 
_xToBeAppendedPropertySet)
 {
 try
 {
@@ -235,7 +235,7 @@ public class TableDescriptor extends CommandMetaData 
implements XContainerListen
 for (int i = 0; i < columncontainer.size(); i++)
 {
 XPropertySet xColPropertySet = getByIndex(i);
-if (xColPropertySet != null && 
!isColunnNameDuplicate(xNameAccessColumns, xColPropertySet))
+if (xColPropertySet != null && 
!isColumnNameDuplicate(xNameAccessColumns, xColPropertySet))
 {
 xAppendColumns.appendByDescriptor(xColPropertySet);
//xColPropertySet.setPropertyValue("Type", 32423)
 }
@@ -256,7 +256,7 @@ public class TableDescriptor extends CommandMetaData 
implements XContainerListen
 for (int i = 0; i < keycolumncontainer.size(); i++)
 {
 XPropertySet xKeyColPropertySet = 
keycolumncontainer.get(i);
-if 
(!isColunnNameDuplicate(xKeyColumnSupplier.getColumns(), xKeyColPropertySet))
+if 
(!isColumnNameDuplicate(xKeyColumnSupplier.getColumns(), xKeyColPropertySet))
 {
 
xKeyColAppend.appendByDescriptor(xKeyColPropertySet);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2017-01-01 Thread Caolán McNamara
 wizards/com/sun/star/wizards/common/Resource.java |5 -
 1 file changed, 5 deletions(-)

New commits:
commit ae7aaf16abdbba6f84e00ef73862e819b11c82eb
Author: Caolán McNamara 
Date:   Sun Jan 1 20:24:23 2017 +

StringList isn't required or used by wizards

as shown by

commit a96c308e52983b7bc0275e31e50a9b04e5805852
Author: Noel Grandin 
Date:   Wed Dec 17 10:33:26 2014 +0200

java: these fields can be converted to local variables

Change-Id: Ifefb5de196a3e5cbaa8945759da42886c69daacf

Change-Id: I4da6c42e0114a891a6b6af8889c94b4332b0b40b

diff --git a/wizards/com/sun/star/wizards/common/Resource.java 
b/wizards/com/sun/star/wizards/common/Resource.java
index 1715fb23..7158bad 100644
--- a/wizards/com/sun/star/wizards/common/Resource.java
+++ b/wizards/com/sun/star/wizards/common/Resource.java
@@ -49,11 +49,6 @@ public class Resource
 this.xStringIndexAccess = UnoRuntime.queryInterface(
 XIndexAccess.class,
 xNameAccess.getByName("String"));
-XIndexAccess xStringListIndexAccess = UnoRuntime.queryInterface(
-XIndexAccess.class,
-xNameAccess.getByName("StringList"));
-if(xStringListIndexAccess == null)
-throw new Exception("could not initialize 
xStringListIndexAccess");
 if(this.xStringIndexAccess == null)
 throw new Exception("could not initialize xStringIndexAccess");
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2016-09-23 Thread Caolán McNamara
 wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py |2 +-
 wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py   |2 +-
 wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py |2 +-
 wizards/com/sun/star/wizards/ui/event/CommonListener.py   |2 --
 4 files changed, 3 insertions(+), 5 deletions(-)

New commits:
commit 01889962cab8449e1d9682d22db0f6e1e28252fd
Author: Caolán McNamara 
Date:   Fri Sep 23 13:11:54 2016 +0100

Resolves: tdf#99626 only the first queryTermination call in wizards works

cause the first call looks up the "queryTermination" method on the object
and replaces the object with that function, then calls on. Subsequent
calls then try to lookup "queryTermination" on "queryTermination".

Just pass queryTermination directly in the ctor (like all the other
wrappers do)

Change-Id: Ie042081c3c34e33b2f040d1ab1a33eeac4df9c3b

diff --git a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py 
b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py
index ede7aaa..372dad0 100644
--- a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py
+++ b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py
@@ -70,7 +70,7 @@ class AgendaWizardDialogImpl(AgendaWizardDialog):
 
 self.initializePaths()
 # initialize the agenda template
-self.terminateListener = TerminateListenerProcAdapter(self)
+self.terminateListener = 
TerminateListenerProcAdapter(self.queryTermination)
 self.myAgendaDoc = AgendaDocument(
 self.xMSF, self.agenda, self.resources,
 self.templateConsts, self.terminateListener)
diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py 
b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py
index 31ac744..ef60a2e 100644
--- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py
+++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py
@@ -65,7 +65,7 @@ class FaxWizardDialogImpl(FaxWizardDialog):
 self.nMaxStep = 5
 
 #instantiate The Document Frame for the Preview
-self.terminateListener = TerminateListenerProcAdapter(self)
+self.terminateListener = 
TerminateListenerProcAdapter(self.queryTermination)
 self.myFaxDoc = FaxDocument(xMSF, self.terminateListener)
 
 #create the dialog:
diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py 
b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py
index dff5647..7c460f7 100644
--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py
+++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py
@@ -72,7 +72,7 @@ class LetterWizardDialogImpl(LetterWizardDialog):
 self.nMaxStep = 6
 
 #instantiate The Document Frame for the Preview
-self.terminateListener = TerminateListenerProcAdapter(self)
+self.terminateListener = 
TerminateListenerProcAdapter(self.queryTermination)
 self.myLetterDoc = LetterDocument(xMSF, self.terminateListener)
 
 #create the dialog
diff --git a/wizards/com/sun/star/wizards/ui/event/CommonListener.py 
b/wizards/com/sun/star/wizards/ui/event/CommonListener.py
index ad15ac2..94cafac 100644
--- a/wizards/com/sun/star/wizards/ui/event/CommonListener.py
+++ b/wizards/com/sun/star/wizards/ui/event/CommonListener.py
@@ -65,8 +65,6 @@ class TerminateListenerProcAdapter( unohelper.Base, 
XTerminateListener ):
 self.oProcToCall = oProcToCall
 
 def queryTermination(self, TerminateEvent):
-self.oProcToCall = getattr(self.oProcToCall,"queryTermination")
-
 if callable( self.oProcToCall ):
 self.oProcToCall()
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2016-05-13 Thread Caolán McNamara
 wizards/com/sun/star/wizards/table/FieldFormatter.java |   14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

New commits:
commit f53e427291321eabe8d060a737e750a94739f911
Author: Caolán McNamara 
Date:   Fri May 13 10:10:50 2016 +0100

Resolves: tdf#99272 new Short[] used instead of new short[]

bridge code expects to see short[] not Short[] so the mapping
doesn't work and office blows up

regression from...

commit ecc90694175190cd6e2b9d1bed8f32850d41ce88
Date:   Wed Oct 15 14:14:28 2014 +0200

java: use 'Short.valueOf' instead of 'new Short'

git grep "new Short\[\]" shows two suspicious cases of this in odk, but they
were always thus, so leaving them untouched.

Change-Id: I3306659b5c3f4e0643c200373da777da248bbd42

diff --git a/wizards/com/sun/star/wizards/table/FieldFormatter.java 
b/wizards/com/sun/star/wizards/table/FieldFormatter.java
index 9822b4c..df1d305 100644
--- a/wizards/com/sun/star/wizards/table/FieldFormatter.java
+++ b/wizards/com/sun/star/wizards/table/FieldFormatter.java
@@ -225,7 +225,7 @@ public class FieldFormatter implements XItemListener
 }
 }
 Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), 
PropertyNames.STRING_ITEM_LIST, _fieldnames);
-Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), 
PropertyNames.SELECTED_ITEMS, new Short[]
+Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), 
PropertyNames.SELECTED_ITEMS, new short[]
 {
 0
 });
@@ -260,7 +260,7 @@ public class FieldFormatter implements XItemListener
 if (CurUnoDialog.verifyfieldcount(icount))
 {
 xlstFieldNames.addItem(snewfieldname, icount);
-Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), 
PropertyNames.SELECTED_ITEMS, new Short[]
+Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), 
PropertyNames.SELECTED_ITEMS, new short[]
 {
 icount
 });
@@ -284,7 +284,7 @@ public class FieldFormatter implements XItemListener
 int ilistcount = /* xlstFieldNames.getItemCount();*/ 
UnoDialog.getListBoxItemCount(xlstFieldNames);
 if ((ipos) < ilistcount)
 {
-Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), 
PropertyNames.SELECTED_ITEMS, new Short[]
+Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), 
PropertyNames.SELECTED_ITEMS, new short[]
 {
 ipos
 });
@@ -294,7 +294,7 @@ public class FieldFormatter implements XItemListener
 if (ilistcount > -1)
 {
 ipos = (short) ((short) ilistcount - (short) 1);
-Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), 
PropertyNames.SELECTED_ITEMS, new Short[]
+Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), 
PropertyNames.SELECTED_ITEMS, new short[]
 {
 ipos
 });
@@ -338,7 +338,7 @@ public class FieldFormatter implements XItemListener
 short ipos = xlstFieldNames.getSelectedItemPos();
 fieldnames[ipos] = newfieldname;
 Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), 
PropertyNames.STRING_ITEM_LIST, fieldnames);
-Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), 
PropertyNames.SELECTED_ITEMS, new Short[]
+Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), 
PropertyNames.SELECTED_ITEMS, new short[]
 {
 ipos
 });
@@ -353,7 +353,7 @@ public class FieldFormatter implements XItemListener
 Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), 
PropertyNames.STRING_ITEM_LIST, snewlist);
 if ((ipos - 1) > -1)
 {
-Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), 
PropertyNames.SELECTED_ITEMS, new Short[]
+Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), 
PropertyNames.SELECTED_ITEMS, new short[]
 {
 (short) (ipos - 1)
 });
@@ -369,7 +369,7 @@ public class FieldFormatter implements XItemListener
 Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), 
PropertyNames.STRING_ITEM_LIST, snewlist);
 if ((ipos + 1) < xlstFieldNames.getItemCount())
 {
-Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), 
PropertyNames.SELECTED_ITEMS, new Short[]
+Helper.setUnoPropertyValue(UnoDialog.getModel(xlstFieldNames), 
PropertyNames.SELECTED_ITEMS, new short[]
 {
 (short) (ipos + 1)
   

[Libreoffice-commits] core.git: wizards/com

2016-03-01 Thread Caolán McNamara
 wizards/com/sun/star/wizards/db/SQLQueryComposer.java |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 2fb8c4b642bae77e0a515512450129503db5aa38
Author: Caolán McNamara 
Date:   Tue Mar 1 10:53:35 2016 +

coverity#1326385 Dereference null return value

Change-Id: I0097e9759c1ac3a1e03d9c2741c109e147dce540

diff --git a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java 
b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java
index e6e8c62..d169f7d 100644
--- a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java
+++ b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java
@@ -242,13 +242,16 @@ public class SQLQueryComposer
 }
 }
 
-public StringBuilder getFromClause()
+public StringBuilder getFromClause() throws SQLException
 {
 StringBuilder sFromClause = new StringBuilder("FROM");
 String[] sCommandNames = CurDBMetaData.getIncludedCommandNames();
 for (int i = 0; i < sCommandNames.length; i++)
 {
 CommandName curCommandName = 
getComposedCommandByDisplayName(sCommandNames[i]);
+if (curCommandName == null) {
+throw new SQLException("Error: CommandName unavailable");
+}
 sFromClause.append(" 
").append(curCommandName.getComposedName()).append(" 
").append(quoteName(curCommandName.getAliasName()));
 if (i < sCommandNames.length - 1)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2016-03-01 Thread Caolán McNamara
 wizards/com/sun/star/wizards/document/GridControl.java |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 144ce8b3ff38a39507a4167662ef5b4aec63907a
Author: Caolán McNamara 
Date:   Tue Mar 1 10:32:30 2016 +

coverity#1326304 Explicit null dereferenced

Change-Id: I1fba88431ec7e5154f39bb0c76e622c6129011d2

diff --git a/wizards/com/sun/star/wizards/document/GridControl.java 
b/wizards/com/sun/star/wizards/document/GridControl.java
index 4b8f98d..cca5de9 100644
--- a/wizards/com/sun/star/wizards/document/GridControl.java
+++ b/wizards/com/sun/star/wizards/document/GridControl.java
@@ -51,6 +51,12 @@ public class GridControl extends Shape
 xNameAccess = UnoRuntime.queryInterface( XNameAccess.class, 
oGridModel );
 _xFormName.insertByName(_sname, oGridModel);
 XControlModel xControlModel = UnoRuntime.queryInterface( 
XControlModel.class, oGridModel );
+// test if the interface was available
+if (xControlModel == null) {
+throw new Exception(
+"Error: GridModel does not export XControlModel 
interface");
+}
+
 xControlShape.setControl(xControlModel);
 xPropertySet = UnoRuntime.queryInterface( XPropertySet.class, 
oGridModel );
 oFormHandler.xDrawPage.add(xShape);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2016-02-16 Thread Stephan Bergmann
 wizards/com/sun/star/wizards/table/ScenarioSelector.java |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 63579501ae4b92db1564dc051706feb34d101eba
Author: Stephan Bergmann 
Date:   Tue Feb 16 13:55:59 2016 +0100

Missing parenthesis

Change-Id: I27aef5d1a0920bb6b9fa9c2204a422b7372fd0cb

diff --git a/wizards/com/sun/star/wizards/table/ScenarioSelector.java 
b/wizards/com/sun/star/wizards/table/ScenarioSelector.java
index 61b4b74..7f88829 100644
--- a/wizards/com/sun/star/wizards/table/ScenarioSelector.java
+++ b/wizards/com/sun/star/wizards/table/ScenarioSelector.java
@@ -235,7 +235,7 @@ public class ScenarioSelector extends FieldSelection 
implements XItemListener, X
 {
 FieldDescription curfielddescription = 
CurTableWizardUnoDialog.fielditems.get(fieldnames[i]);
 PropertyValue[] aProperties = 
curfielddescription.getPropertyValues();
-if (aProperties != null {
+if (aProperties != null) {
 this.curtabledescriptor.addColumn(aProperties);
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2016-01-23 Thread jan iversen
 wizards/com/sun/star/wizards/document/Control.java |   17 ++---
 1 file changed, 14 insertions(+), 3 deletions(-)

New commits:
commit b996107585efb7bed88351d2cea2e56d8500c2fb
Author: jan iversen 
Date:   Thu Jan 21 19:35:26 2016 +0100

cid#1326113, 1326410, 1326411

Removed reference to elements in a null pointer.

Change-Id: Ife6fc68128284e291130a9a81bb7557ce03197ed
Reviewed-on: https://gerrit.libreoffice.org/21690
Tested-by: Jenkins 
Reviewed-by: jan iversen 

diff --git a/wizards/com/sun/star/wizards/document/Control.java 
b/wizards/com/sun/star/wizards/document/Control.java
index 17d12f0..9ff4691 100644
--- a/wizards/com/sun/star/wizards/document/Control.java
+++ b/wizards/com/sun/star/wizards/document/Control.java
@@ -75,7 +75,7 @@ public class Control extends Shape
 try
 {
 icontroltype = _icontroltype;
-String sServiceName = 
oFormHandler.sModelServices[getControlType()];
+String sServiceName = oFormHandler.sModelServices[icontroltype];
 Object oControlModel = 
oFormHandler.xMSFDoc.createInstance(sServiceName);
 xControlModel = UnoRuntime.queryInterface( XControlModel.class, 
oControlModel );
 xPropertySet = UnoRuntime.queryInterface( XPropertySet.class, 
oControlModel );
@@ -185,15 +185,21 @@ public class Control extends Shape
 else
 {
 Size aPeerSize = getPeerSize();
+int  aWidth;
+if (aPeerSize == null)
+aWidth = 0;
+else
+aWidth = aPeerSize.Width;
+
 // We increase the preferred Width a bit so that the control does 
not become too small
 // when we change the border from "3D" to "Flat"
 if (getControlType() == FormHandler.SOCHECKBOX)
 {
-return aPeerSize.Width * oFormHandler.getXPixelFactor();
+return aWidth * oFormHandler.getXPixelFactor();
 }
 else
 {
-return (aPeerSize.Width * oFormHandler.getXPixelFactor()) + 
200;
+return (aWidth * oFormHandler.getXPixelFactor()) + 200;
 }
 }
 }
@@ -208,6 +214,11 @@ public class Control extends Shape
 {
 Size aPeerSize = getPeerSize();
 int nHeight = aPeerSize.Height;
+if (aPeerSize == null)
+ nHeight = 0;
+else
+ nHeight = aPeerSize.Height;
+
 // We increase the preferred Height a bit so that the control does 
not become too small
 // when we change the border from "3D" to "Flat"
 return ((nHeight + 1) * oFormHandler.getYPixelFactor());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2016-01-20 Thread Caolán McNamara
 wizards/com/sun/star/wizards/common/Configuration.java |   16 
 1 file changed, 4 insertions(+), 12 deletions(-)

New commits:
commit 24bfa15bd3d169022dafba177da29e49241892e8
Author: Caolán McNamara 
Date:   Wed Jan 20 10:59:34 2016 +

coverity#1326466 Dereference null return value

Change-Id: Iea0dc27bf32499e1f8b38d8a0e90cebe6ab8b31f

diff --git a/wizards/com/sun/star/wizards/common/Configuration.java 
b/wizards/com/sun/star/wizards/common/Configuration.java
index c69d029..3fcef49 100644
--- a/wizards/com/sun/star/wizards/common/Configuration.java
+++ b/wizards/com/sun/star/wizards/common/Configuration.java
@@ -153,19 +153,11 @@ public abstract class Configuration
 }
 }
 
-public static XNameAccess getChildNodebyIndex(XNameAccess _xNameAccess, 
int _index)
+public static XNameAccess getChildNodebyIndex(XNameAccess _xNameAccess, 
int _index) throws com.sun.star.uno.Exception
 {
-try
-{
-String[] snames = _xNameAccess.getElementNames();
-Object oNode = _xNameAccess.getByName(snames[_index]);
-return UnoRuntime.queryInterface(XNameAccess.class, oNode);
-}
-catch (Exception e)
-{
-e.printStackTrace(System.err);
-return null;
-}
+String[] snames = _xNameAccess.getElementNames();
+Object oNode = _xNameAccess.getByName(snames[_index]);
+return UnoRuntime.queryInterface(XNameAccess.class, oNode);
 }
 
 public static XNameAccess getChildNodebyName(XNameAccess _xNameAccessNode, 
String _SubNodeName)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-11-10 Thread Damjan Jovanovic
 wizards/com/sun/star/wizards/ui/AggregateComponent.java |4 +--
 wizards/source/formwizard/dbwizres.src  |   17 
 2 files changed, 3 insertions(+), 18 deletions(-)

New commits:
commit c3867083a7904ab1a67403185d90dddab01f99eb
Author: Damjan Jovanovic 
Date:   Sun Nov 8 15:55:59 2015 +

Resolves: #i56289# no GROUP BY - COUNT from wizard

Implement the COUNT operator for GROUP BY in the Base Query Wizard,
and delete some unused resource strings to make space for it.

Found by: dtinazzi at easyasp dot it
Patch by: me

(cherry picked from commit 1f6546d6c0e6670d59e6beb05d15c80327634e6c)

Change-Id: I6395566275cea6a33cdc64968b3b31aa17d61554

diff --git a/wizards/com/sun/star/wizards/ui/AggregateComponent.java 
b/wizards/com/sun/star/wizards/ui/AggregateComponent.java
index 2b4646d..2233753 100644
--- a/wizards/com/sun/star/wizards/ui/AggregateComponent.java
+++ b/wizards/com/sun/star/wizards/ui/AggregateComponent.java
@@ -40,7 +40,7 @@ public class AggregateComponent extends ControlScroller
 private String[] sFunctions;
 private String[] sFunctionOperators = new String[]
 {
-"SUM", "AVG", "MIN", "MAX"
+"SUM", "AVG", "MIN", "MAX", "COUNT"
 };
 private QueryMetaData CurDBMetaData;
 private String soptDetailQuery;
@@ -185,7 +185,7 @@ public class AggregateComponent extends ControlScroller
 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);
+sFunctions = CurUnoDialog.m_oResource.getResArray(BaseID + 40, 5);
 
 sDuplicateAggregateFunction = 
CurUnoDialog.m_oResource.getResText(BaseID + 90);
 }
diff --git a/wizards/source/formwizard/dbwizres.src 
b/wizards/source/formwizard/dbwizres.src
index 5fc33b3..ad34d85 100644
--- a/wizards/source/formwizard/dbwizres.src
+++ b/wizards/source/formwizard/dbwizres.src
@@ -812,22 +812,7 @@ String RID_DB_QUERY_WIZARD_START + 43
 
 String RID_DB_QUERY_WIZARD_START + 44
 {
-Text [ en-US] = "get the sum of ";
-};
-
-String RID_DB_QUERY_WIZARD_START + 45
-{
-Text [ en-US] = "get the average of ";
-};
-
-String RID_DB_QUERY_WIZARD_START + 46
-{
-Text [ en-US] = "get the minimum of ";
-};
-
-String RID_DB_QUERY_WIZARD_START + 47
-{
-Text [ en-US] = "get the maximum of ";
+Text [ en-US] = "get the count of";
 };
 
 String RID_DB_QUERY_WIZARD_START + 48
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2015-11-10 Thread Damjan Jovanovic
 wizards/com/sun/star/wizards/query/QuerySummary.java |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit bd0697d487eeadf3eb542c0202aa6a7e3387348b
Author: Damjan Jovanovic 
Date:   Sun Nov 8 14:38:09 2015 +

Use the UIConsts constants for resource IDs in...

main/wizards/com/sun/star/wizards/query/QuerySummary.java

(cherry picked from commit 77ff55a4a1f25c1dc21d083cee43b4506bf91410)

Change-Id: I538aa5761506d430bdbe70de03301f971f363e52

diff --git a/wizards/com/sun/star/wizards/query/QuerySummary.java 
b/wizards/com/sun/star/wizards/query/QuerySummary.java
index ea68195..dd5a8ed 100644
--- a/wizards/com/sun/star/wizards/query/QuerySummary.java
+++ b/wizards/com/sun/star/wizards/query/QuerySummary.java
@@ -26,10 +26,11 @@ import com.sun.star.wizards.db.FieldColumn;
 import com.sun.star.wizards.db.QueryMetaData;
 import com.sun.star.wizards.ui.FilterComponent;
 
+import static com.sun.star.wizards.ui.UIConsts.RID_QUERY;
+
 public class QuerySummary extends QueryMetaData
 {
 
-static final private int RID_QUERY = 2300;
 private String sSummary;
 private Resource oResource;
 private final String sSeparator;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2015-11-10 Thread Damjan Jovanovic
 wizards/com/sun/star/wizards/common/FileAccess.java |7 ++-
 wizards/com/sun/star/wizards/ui/AggregateComponent.java |   15 +++
 wizards/com/sun/star/wizards/ui/FilterComponent.java|   15 +++
 3 files changed, 20 insertions(+), 17 deletions(-)

New commits:
commit 46b8d81ae82da848e70b0735b101b1f1cc4e6beb
Author: Damjan Jovanovic 
Date:   Sun Nov 8 14:34:28 2015 +

Use UIConsts constants for offsets to resource IDs in main/wizards.

(cherry picked from commit 95efcaf575dced8cc18f2ca9fb874d772ad23595)

Change-Id: I8bb247c92f0326da916940f4fc7999d81998297a

diff --git a/wizards/com/sun/star/wizards/common/FileAccess.java 
b/wizards/com/sun/star/wizards/common/FileAccess.java
index d664b28..02357fe 100644
--- a/wizards/com/sun/star/wizards/common/FileAccess.java
+++ b/wizards/com/sun/star/wizards/common/FileAccess.java
@@ -28,8 +28,13 @@ import java.util.Vector;
 import com.sun.star.io.XActiveDataSink;
 import com.sun.star.io.XInputStream;
 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.beans.PropertyValue;
diff --git a/wizards/com/sun/star/wizards/ui/AggregateComponent.java 
b/wizards/com/sun/star/wizards/ui/AggregateComponent.java
index 2233753..af9c9cb 100644
--- a/wizards/com/sun/star/wizards/ui/AggregateComponent.java
+++ b/wizards/com/sun/star/wizards/ui/AggregateComponent.java
@@ -180,14 +180,13 @@ public class AggregateComponent extends ControlScroller
 {
 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, 5);
-
-sDuplicateAggregateFunction = 
CurUnoDialog.m_oResource.getResText(BaseID + 90);
+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, 5);
+
+sDuplicateAggregateFunction = 
CurUnoDialog.m_oResource.getResText(UIConsts.RID_QUERY + 90);
 }
 if (ControlRowVector == null)
 {
diff --git a/wizards/com/sun/star/wizards/ui/FilterComponent.java 
b/wizards/com/sun/star/wizards/ui/FilterComponent.java
index fd76640..27e7eff 100644
--- a/wizards/com/sun/star/wizards/ui/FilterComponent.java
+++ b/wizards/com/sun/star/wizards/ui/FilterComponent.java
@@ -60,7 +60,6 @@ public class FilterComponent
 private final String slblOperators;
 private final String slblValue;
 private WizardDialog CurUnoDialog;
-private static final int BaseID = 2300;
 private final String sIncSuffix;
 private final ControlRow[] oControlRows;
 private final String sDuplicateCondition;
@@ -373,14 +372,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 */); // 
=, 

[Libreoffice-commits] core.git: wizards/com

2015-11-10 Thread Damjan Jovanovic
 wizards/com/sun/star/wizards/db/SQLQueryComposer.java |4 
 1 file changed, 4 insertions(+)

New commits:
commit b9042d2e46f4a0645b63efb23e49b9421d04d837
Author: Damjan Jovanovic 
Date:   Sat Nov 7 18:26:04 2015 +

#i126029# Base query wizard error due to missing quoting of table and 
column names

During the Base query design wizard,
com.sun.star.wizards.ui.FilterComponent.getFilterConditions()
calls
com.sun.star.wizards.db.SQLQueryComposer.getSelectClause()
before its
getFromClause(). However the getSelectClause() needs composedCommandNames
which is populated only by getFromClause() in order to quote table and 
column names.
Without this, table and column names that need quoting (spaces, special 
characters,
reserved words) produce errors.

(cherry picked from commit 046771cac8605e5826a150e4454eff332b65d517)

diff --git a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java 
b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java
index 4a7a679..7a99b7d 100644
--- a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java
+++ b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java
@@ -68,6 +68,10 @@ public class SQLQueryComposer
 
 public String getSelectClause(boolean _baddAliasFieldNames) throws 
SQLException
 {
+// getFromClause() must be called first to populate 
composedCommandNames,
+// but it's idempotent, so let's call it now in case the caller didn't 
already:
+getFromClause();
+
 String sSelectBaseClause = "SELECT ";
 String sSelectClause = sSelectBaseClause;
 for (int i = 0; i < CurDBMetaData.FieldColumns.length; i++)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2015-10-14 Thread Caolán McNamara
 wizards/com/sun/star/wizards/ui/PeerConfig.java |5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit 2fd8707ff2f63750dbe3e51f5ea446620d24e920
Author: Caolán McNamara 
Date:   Wed Oct 14 11:35:48 2015 +0100

coverity#1327212 UwF: Unwritten field

Change-Id: Id5ba80b5f2b9d4d201dce57ba165e1a70dc1ba3d

diff --git a/wizards/com/sun/star/wizards/ui/PeerConfig.java 
b/wizards/com/sun/star/wizards/ui/PeerConfig.java
index bcc8a9b..80a12c3 100644
--- a/wizards/com/sun/star/wizards/ui/PeerConfig.java
+++ b/wizards/com/sun/star/wizards/ui/PeerConfig.java
@@ -60,11 +60,8 @@ public class PeerConfig implements XWindowListener
 
 private static class ControlTask
 {
-
 Object oModel;
 String propname;
-Object propvalue;
-
 }
 
 private static class ImageUrlTask
@@ -106,7 +103,7 @@ public class PeerConfig implements XWindowListener
 for (int i = 0; i < this.aControlTasks.size(); i++)
 {
 ControlTask aControlTask = aControlTasks.get(i);
-Helper.setUnoPropertyValue(aControlTask.oModel, 
aControlTask.propname, aControlTask.propvalue);
+Helper.setUnoPropertyValue(aControlTask.oModel, 
aControlTask.propname, null);
 }
 for (int i = 0; i < this.aImageUrlTasks.size(); i++)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2015-10-14 Thread Caolán McNamara
 wizards/com/sun/star/wizards/report/ReportWizard.java |   12 
 1 file changed, 12 deletions(-)

New commits:
commit 5affc580f401614851f21487d4b4932eb25decff
Author: Caolán McNamara 
Date:   Wed Oct 14 11:39:14 2015 +0100

coverity#1327211 UwF: Unwritten field

Change-Id: Id210a19ea068aadcf1316a1c184769ba75e1cf70

diff --git a/wizards/com/sun/star/wizards/report/ReportWizard.java 
b/wizards/com/sun/star/wizards/report/ReportWizard.java
index 2582ac3..519ea48 100644
--- a/wizards/com/sun/star/wizards/report/ReportWizard.java
+++ b/wizards/com/sun/star/wizards/report/ReportWizard.java
@@ -52,8 +52,6 @@ import java.util.Map;
 
 public class ReportWizard extends DatabaseObjectWizard implements XTextListener
 {
-
-private FieldSelection CurGroupFieldSelection;
 private SortingComponent CurSortingComponent;
 private TitlesComponent CurTitlesComponent;
 private CommandFieldSelection CurDBCommandFieldSelection;
@@ -652,11 +650,6 @@ public class ReportWizard extends DatabaseObjectWizard 
implements XTextListener
 enableWizardSteps(NewItems);
 toggleSortingPage();
 }
-else
-{
-boolean bEnabled = 
(CurGroupFieldSelection.getSelectedFieldNames().length > 0);
-Helper.setUnoPropertyValue(getRoadmapItemByID(SOGROUPPAGE), 
PropertyNames.PROPERTY_ENABLED, bEnabled);
-}
 }
 
 public void shiftFromRightToLeft(String[] SelItems, String[] NewItems)
@@ -667,11 +660,6 @@ public class ReportWizard extends DatabaseObjectWizard 
implements XTextListener
 enableWizardSteps(NewItems);
 CurDBCommandFieldSelection.setModified(true);
 }
-else
-{
-boolean bEnabled = 
(CurGroupFieldSelection.getSelectedFieldNames().length > 0);
-Helper.setUnoPropertyValue(getRoadmapItemByID(SOGROUPPAGE), 
PropertyNames.PROPERTY_ENABLED, bEnabled);
-}
 }
 
 public void moveItemDown(String item)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2015-10-04 Thread Julien Nabet
 wizards/com/sun/star/wizards/common/UCB.py  |2 +-
 wizards/com/sun/star/wizards/web/FTPDialog.py   |8 
 wizards/com/sun/star/wizards/web/WWD_Events.py  |2 +-
 wizards/com/sun/star/wizards/web/WWD_Startup.py |2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit e3f8eb8d3a594e3b8afa51c214f6c5c44d8dde4e
Author: Julien Nabet 
Date:   Sun Oct 4 01:00:57 2015 +0200

tdf#94743: Web Wizard: Cannot export in ftp

1) Fix value of constants RES_OK, RES_CANCEL and RES_HELP

http://opengrok.libreoffice.org/xref/core/offapi/com/sun/star/awt/PushButtonType.idl#29

2) self.updatePublishUI was wrong because FTP appears in second but there 
are 2 elements
for each module (local dir, zip, ftp) in pubAware vector
comment was wrong:
- local takes elements 0 and 1
- zip takes elements 2 and 3
- ftp takes elements 4 (that's why "4" is the right value) and 5
see 
http://opengrok.libreoffice.org/xref/core/wizards/com/sun/star/wizards/web/WWD_Startup.py#509
So fix value passed to self.updatePublishUI + comment

Just a bit of history:
before fix of tdf#92934: Web Wizard: Cannot Export Zip archive 
(http://cgit.freedesktop.org/libreoffice/core/commit/?id=e72a4a3c2e1608e301daef0b6e87cc70d814e736),
the order seemed to be this one for pubAware: local, ftp, zip (whereas UI 
order was already local, zip and ftp)
Perhaps the fix was wrong since there was a similar pb for tdf#94421: Web 
Wizard, option shift when loading saved session

Anyway now the pubAware order is the same as UI order, it may help for 
readability.

minor
a) increase space for lblStatus (there weren't enough room for some 
locales, eg French)
b) replace use of copy3 (deprecated) by copy2

Change-Id: I27d3c2dd699fbe2d51a63e462c7b39e78895d1be
Reviewed-on: https://gerrit.libreoffice.org/19115
Tested-by: Jenkins 
Reviewed-by: Julien Nabet 

diff --git a/wizards/com/sun/star/wizards/common/UCB.py 
b/wizards/com/sun/star/wizards/common/UCB.py
index 3689b14..4d97c01 100644
--- a/wizards/com/sun/star/wizards/common/UCB.py
+++ b/wizards/com/sun/star/wizards/common/UCB.py
@@ -64,7 +64,7 @@ class UCB(object):
 def copy1(self, sourceDir, targetDir, verifier):
 files = self.listFiles(sourceDir, verifier)
 for i in range(len(files)):
-  self.copy3(sourceDir, files[i], targetDir)
+  self.copy2(sourceDir, files[i], targetDir, "")
 
 def copy2(self, sourceDir, filename, targetDir, targetName):
 if (not self.fa.exists(targetDir, True)):
diff --git a/wizards/com/sun/star/wizards/web/FTPDialog.py 
b/wizards/com/sun/star/wizards/web/FTPDialog.py
index 25b1c6b..cb4e2c2 100644
--- a/wizards/com/sun/star/wizards/web/FTPDialog.py
+++ b/wizards/com/sun/star/wizards/web/FTPDialog.py
@@ -51,9 +51,9 @@ from com.sun.star.ucb.OpenMode import FOLDERS
 # the members ip, username, and password (via the methods setXXX(...))
 # for details see the ui.events.DataAware classes. 
 class FTPDialog(WizardDialog):
-RES_OK = 2
-RES_CANCEL = 3
-RES_HELP = 4
+RES_OK = 1
+RES_CANCEL = 2
+RES_HELP = 3
 
 # A Constant used for the setLabel(int) method to change the
 # status-display. "unknown" is the status when the user first
@@ -160,7 +160,7 @@ class FTPDialog(WizardDialog):
 (0, 14, 68, 80, False, False, 14))
 self.lblStatus = self.insertLabel("lblStatus",
 PROPNAMES_LABEL,
-(8, self.resources.resFTPDisconnected, "lblStatus", 86, 82, 9, 
99))
+(8, self.resources.resFTPDisconnected, "lblStatus", 86, 82, 9, 
130))
 self.ln3 = self.insertFixedLine("ln3",
 PROPNAMES_LABEL,
 (8, self.resources.resln3_value, "ln3", 6, 100, 10, 210))
diff --git a/wizards/com/sun/star/wizards/web/WWD_Events.py 
b/wizards/com/sun/star/wizards/web/WWD_Events.py
index 03f2e12..cbb4dff 100644
--- a/wizards/com/sun/star/wizards/web/WWD_Events.py
+++ b/wizards/com/sun/star/wizards/web/WWD_Events.py
@@ -434,7 +434,7 @@ class WWD_Events(WWD_Startup):
 def setFTPPublish(self):
 if self.showFTPDialog(self.getPublisher(FTP_PUBLISHER)):
 self.getPublisher(FTP_PUBLISHER).cp_Publish = True
-self.updatePublishUI(2)
+self.updatePublishUI(4)
 
 '''
 show the ftp dialog
diff --git a/wizards/com/sun/star/wizards/web/WWD_Startup.py 
b/wizards/com/sun/star/wizards/web/WWD_Startup.py
index 0138438..3d15335 100644
--- a/wizards/com/sun/star/wizards/web/WWD_Startup.py
+++ b/wizards/com/sun/star/wizards/web/WWD_Startup.py
@@ -513,7 +513,7 @@ class WWD_Startup(WWD_General):
 Objects on the same Vector need different DataObjectBinding,
 I use this method...
 @param data the CGPublish object
-@param i the number of the object (0 = local, 1 = ftp, 2 = zip)
+@param i the 

[Libreoffice-commits] core.git: wizards/com

2015-10-03 Thread Julien Nabet
 wizards/com/sun/star/wizards/web/FTPDialog.py |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2ff595dbf2b42b4b3ee961b63e5da92067aa8fd9
Author: Julien Nabet 
Date:   Sat Oct 3 18:15:37 2015 +0200

Web Wizard, ftp part: fix logic for dialog

Comment indicated "If one of these fields is empty, the button is disabled",
let's stick to this.

Change-Id: I99dd23339d888c33e7706935842a91f5da681ade

diff --git a/wizards/com/sun/star/wizards/web/FTPDialog.py 
b/wizards/com/sun/star/wizards/web/FTPDialog.py
index 6f3cf75..25b1c6b 100644
--- a/wizards/com/sun/star/wizards/web/FTPDialog.py
+++ b/wizards/com/sun/star/wizards/web/FTPDialog.py
@@ -249,7 +249,7 @@ class FTPDialog(WizardDialog):
 # according to the status of the hostname, username, password text fields.
 # If one of these fields is empty, the button is disabled.
 def enableTestButton(self):
-self.setEnabled(self.btnTestConnection, not self.isEmpty(self.host) or 
self.isEmpty(self.username) or self.isEmpty(self.password))
+self.setEnabled(self.btnTestConnection, not (self.isEmpty(self.host) 
or self.isEmpty(self.username) or self.isEmpty(self.password)))
 
 # @param s
 # @return True if the string is None or "".
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2015-10-01 Thread Julien Nabet
 wizards/com/sun/star/wizards/web/FTPDialog.py  |   24 +++--
 wizards/com/sun/star/wizards/web/FTPDialogResources.py |2 -
 2 files changed, 11 insertions(+), 15 deletions(-)

New commits:
commit 7e09b3656472bd5a3ef4090fd2ea6f521956fd53
Author: Julien Nabet 
Date:   Fri Sep 25 00:02:41 2015 +0200

tdf#92553: Web Wizard: Not open FTP Configure on Web Wizard Preview Setting

Inherit from WizardDialog instead of object
Define required constants for buttons
Remove or tweak calls to super methods
Fix call setDialogProperties which was wrong since unification of this 
method
See ee122cfd36b3af030520f26a6a313bc7cd3156fd

With the patch, FTP dialog opens, we can also connect successfully to an 
ftp server
Still there are bugs to fix then, first of them directory selection

Change-Id: I86c3c9638114216627d92832c26ad780c12860b4
Reviewed-on: https://gerrit.libreoffice.org/18831
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/wizards/com/sun/star/wizards/web/FTPDialog.py 
b/wizards/com/sun/star/wizards/web/FTPDialog.py
index 765685c..6f3cf75 100644
--- a/wizards/com/sun/star/wizards/web/FTPDialog.py
+++ b/wizards/com/sun/star/wizards/web/FTPDialog.py
@@ -19,7 +19,7 @@ import uno
 
 from .WWHID import *
 from .FTPDialogResources import FTPDialogResources
-from ..ui.UnoDialog2 import UnoDialog2
+from ..ui.WizardDialog import WizardDialog
 from ..ui.UIConsts import UIConsts
 from ..ui.event.DataAware import DataAware
 from ..ui.event.UnoDataAware import UnoDataAware
@@ -36,11 +36,6 @@ from com.sun.star.ucb import 
InteractiveNetworkResolveNameException
 from com.sun.star.ucb import OpenCommandArgument2
 from com.sun.star.ucb.OpenMode import FOLDERS
 
-#PushButtonType_OK_value = uno.getConstantByName( 
"com.sun.star.awt.PushButtonType.OK" )
-#PushButtonType_CANCEL_value = uno.getConstantByName( 
"com.sun.star.awt.PushButtonType.CANCEL" )
-#PushButtonType_HELP_value = uno.getConstantByName( 
"com.sun.star.awt.PushButtonType.HELP" )
-
-
 # This is the FTP Dialog. 
 # The Dialog enables the user:
 # (*) entering FTP server and user information.
@@ -55,7 +50,10 @@ from com.sun.star.ucb.OpenMode import FOLDERS
 # I use here the DataAware concept to automatically update
 # the members ip, username, and password (via the methods setXXX(...))
 # for details see the ui.events.DataAware classes. 
-class FTPDialog(UnoDialog2, UIConsts):
+class FTPDialog(WizardDialog):
+RES_OK = 2
+RES_CANCEL = 3
+RES_HELP = 4
 
 # A Constant used for the setLabel(int) method to change the
 # status-display. "unknown" is the status when the user first
@@ -97,7 +95,7 @@ class FTPDialog(UnoDialog2, UIConsts):
 # @throws Exception
 def __init__(self, xmsf, p, oWizardResource):
 
-super(FTPDialog, self).__init__(xmsf)
+super(FTPDialog, self).__init__(xmsf, HID_FTP)
 self.publish = p
 
 templateDir = p.root.soTemplateDir
@@ -113,8 +111,8 @@ class FTPDialog(UnoDialog2, UIConsts):
 self.ucb = UCB(xmsf)
 
 # set dialog properties...
-self.setDialogProperties( True, 160, HelpIds.getHelpIdString(HID_FTP),
-True, "FTPDialog", 167, 82, self.resources.resFTPDialog_title, 222)
+self.setDialogProperties(True, 210, True, 104, 52, 1, 1,
+self.resources.resFTPDialog_title, 310)
 
 # add controls to dialog
 self.build()
@@ -174,13 +172,13 @@ class FTPDialog(UnoDialog2, UIConsts):
 (14, HelpIds.getHelpIdString(HID_FTP_BTN_PATH), 
self.resources.resbtnDir_value, "btnDir", 199, 112, 12, 16), self)
 self.btnOK = self.insertButton("btnOK", None,
 PROPNAMES_BUTTON2,
-(14, HelpIds.getHelpIdString(HID_FTP_OK), 
self.resources.resbtnOK_value, "btnOK", 165, 142, PushButtonType_OK_value, 13, 
50), self)
+(14, HelpIds.getHelpIdString(HID_FTP_OK), 
self.resources.resbtnOK_value, "btnOK", 165, 142, self.RES_OK, 13, 50), self)
 self.btnCancel = self.insertButton("btnCancel",
 None, PROPNAMES_BUTTON2,
-(14, HelpIds.getHelpIdString(HID_FTP_CANCEL), 
self.resources.resbtnCancel_value, "btnCancel", 113, 142, 
PushButtonType_CANCEL_value, 14, 50), self)
+(14, HelpIds.getHelpIdString(HID_FTP_CANCEL), 
self.resources.resbtnCancel_value, "btnCancel", 113, 142, self.RES_CANCEL, 14, 
50), self)
 self.btnHelp = self.insertButton("btnHelp", None,
 PROPNAMES_BUTTON2,
-(14, "", self.resources.resbtnHelp_value, "btnHelp", 57, 142, 
PushButtonType_HELP_value, 15, 50), self)
+(14, "", self.resources.resbtnHelp_value, "btnHelp", 57, 142, 
self.RES_HELP, 15, 50), self)
 
 
 # Make hostname, username and password text fields data aware.
diff --git a/wizards/com/sun/star/wizards/web/FTPDialogResources.py 

[Libreoffice-commits] core.git: wizards/com

2015-09-22 Thread Julien Nabet
 wizards/com/sun/star/wizards/web/WebWizardDialog.py |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 9e99b18f20f46d656c7a52413d23193f75065d1a
Author: Julien Nabet 
Date:   Tue Sep 22 21:42:35 2015 +0200

tdf#94450: Web Wizard: Not enough space for date in step 6

Value of 60 allows to display the selected dates + let a margin if year is 
in 4 numbers one day.

Change-Id: I3d7db50dd318897b0b7a515f9428401c53218c08
Reviewed-on: https://gerrit.libreoffice.org/18786
Tested-by: Jenkins 
Reviewed-by: Julien Nabet 

diff --git a/wizards/com/sun/star/wizards/web/WebWizardDialog.py 
b/wizards/com/sun/star/wizards/web/WebWizardDialog.py
index 5a066fd..f1248bd 100644
--- a/wizards/com/sun/star/wizards/web/WebWizardDialog.py
+++ b/wizards/com/sun/star/wizards/web/WebWizardDialog.py
@@ -525,7 +525,7 @@ class WebWizardDialog(WizardDialog):
 PropertyNames.PROPERTY_TABINDEX,
 PropertyNames.PROPERTY_WIDTH),
 (True, 12, HelpIds.getHelpIdString(HID6_DATE_SITE_CREATED),
-"dateSiteCreated", 179, 124, 6, tabIndex + 1, 49), self)
+"dateSiteCreated", 179, 124, 6, tabIndex + 1, 60), self)
 self.insertLabel("lblSiteUpdated", WebWizardDialog.PROPNAMES_LBL,
 (8, self.resources.reslblSiteUpdated_value, "lblSiteUpdated",
 103, 144, 6, tabIndex + 1, 80))
@@ -540,7 +540,7 @@ class WebWizardDialog(WizardDialog):
 PropertyNames.PROPERTY_TABINDEX,
 PropertyNames.PROPERTY_WIDTH),
 (True, 12, HelpIds.getHelpIdString(HID6_DATE_SITE_UPDATED),
-"dateSiteUpdate", 179, 142, 6, tabIndex + 1, 49), self)
+"dateSiteUpdate", 179, 142, 6, tabIndex + 1, 60), self)
 
 def buildStep7(self, disableFTP, exclamationURL):
 tabIndex = 700
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2015-09-22 Thread Julien Nabet
 wizards/com/sun/star/wizards/agenda/AgendaWizardDialog.py |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 0ca9a3523cb2ccf97d7d13fdf4616af0dbe173d9
Author: Julien Nabet 
Date:   Tue Sep 22 22:01:33 2015 +0200

tdf#94451: Agenda: Not enough space for date in step 5 (French UI)

Adjust some values for make room (ok with French, German and English UI)

Change-Id: I7600acae64f5ae1110c07798cc950ec73a48deab
Reviewed-on: https://gerrit.libreoffice.org/18787
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 

diff --git a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialog.py 
b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialog.py
index fc9eef9..f89afdb 100644
--- a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialog.py
+++ b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialog.py
@@ -284,11 +284,11 @@ class AgendaWizardDialog(WizardDialog):
 self.btnUp = self.insertButton("btnUp",
 AgendaWizardDialogConst.BTNUP_ACTION_PERFORMED,
 self.PROPS_BUTTON, (14, AgendaWizardDialogConst.BTNUP_HID,
-self.resources.resButtonUp, 202, 136, 5, 582, 50), self)
+self.resources.resButtonUp, 180, 136, 5, 582, 60), self)
 self.btnDown = self.insertButton("btnDown",
 AgendaWizardDialogConst.BTNDOWN_ACTION_PERFORMED,
 self.PROPS_BUTTON, (14, AgendaWizardDialogConst.BTNDOWN_HID,
-self.resources.resButtonDown, 254, 136, 5, 583, 50), self)
+self.resources.resButtonDown, 244, 136, 5, 583, 60), self)
 
 def buildStep6(self):
 self.insertLabel("lblTitle6", self.PROPS_LABEL_B,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2015-09-21 Thread Julien Nabet
 wizards/com/sun/star/wizards/web/WWD_Startup.py |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 09c3e186e8b8562e3d502c5cbdef385753336b7f
Author: Julien Nabet 
Date:   Mon Sep 21 21:55:20 2015 +0200

tdf#94421: Web Wizard, option shift when loading saved session

Just use the right order
LOCAL_PUBLISHER first, ZIP_PUBLISHER second, FTP_PUBLISHER third and last 
one

Change-Id: I23ff96785910d62bbb2c221932d0ad2a2e755b3c
Reviewed-on: https://gerrit.libreoffice.org/18755
Tested-by: Jenkins 
Reviewed-by: Julien Nabet 

diff --git a/wizards/com/sun/star/wizards/web/WWD_Startup.py 
b/wizards/com/sun/star/wizards/web/WWD_Startup.py
index 1bbc905..0138438 100644
--- a/wizards/com/sun/star/wizards/web/WWD_Startup.py
+++ b/wizards/com/sun/star/wizards/web/WWD_Startup.py
@@ -494,8 +494,8 @@ class WWD_Startup(WWD_General):
 self.mountList(session.cp_GeneralInfo, self.genAware)
 task.advance(True)
 self.mountDataAware(session.cp_Publishing.getElement(LOCAL_PUBLISHER), 
0)
-self.mountDataAware(session.cp_Publishing.getElement(FTP_PUBLISHER), 1)
-self.mountDataAware(session.cp_Publishing.getElement(ZIP_PUBLISHER), 2)
+self.mountDataAware(session.cp_Publishing.getElement(ZIP_PUBLISHER), 1)
+self.mountDataAware(session.cp_Publishing.getElement(FTP_PUBLISHER), 2)
 task.advance(True)
 self.sessionNameDA.setDataObject(session, True)
 self.chkSaveSettings.Model.State = 1
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2015-09-21 Thread Julien Nabet
 wizards/com/sun/star/wizards/common/SystemDialog.py |2 -
 wizards/com/sun/star/wizards/web/WWD_Events.py  |   28 
 wizards/com/sun/star/wizards/web/WebWizardConst.py  |2 -
 3 files changed, 8 insertions(+), 24 deletions(-)

New commits:
commit af814158b101418adad4f9a21d3b2303620b0396
Author: Julien Nabet 
Date:   Sat Sep 19 09:44:02 2015 +0200

tdf#94351: Web Wizard multiselection doesn't work

Call getSelectedFiles instead of getFiles+adapt behavior so it deals
with an array of files with their full path

Change-Id: I21b6c32dea85460461925a9b44dac195d79b7eac
Reviewed-on: https://gerrit.libreoffice.org/18714
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/wizards/com/sun/star/wizards/common/SystemDialog.py 
b/wizards/com/sun/star/wizards/common/SystemDialog.py
index dc0b3f4..e1bb6bf 100644
--- a/wizards/com/sun/star/wizards/common/SystemDialog.py
+++ b/wizards/com/sun/star/wizards/common/SystemDialog.py
@@ -113,7 +113,7 @@ class SystemDialog(object):
 self.systemDialog.setMultiSelectionMode(multiSelect)
 self.systemDialog.setDisplayDirectory(self.subst(displayDirectory))
 if self.execute(self.systemDialog):
-return self.systemDialog.getFiles()
+return self.systemDialog.getSelectedFiles()
 
 except Exception:
 traceback.print_exc()
diff --git a/wizards/com/sun/star/wizards/web/WWD_Events.py 
b/wizards/com/sun/star/wizards/web/WWD_Events.py
index c5dc75e..03f2e12 100644
--- a/wizards/com/sun/star/wizards/web/WWD_Events.py
+++ b/wizards/com/sun/star/wizards/web/WWD_Events.py
@@ -894,39 +894,23 @@ class WWD_Events(WWD_Startup):
 def loadDocuments(self):
 offset = self.parent.selectedDoc[0] + 1 if 
(len(self.parent.selectedDoc) > 0) else self.parent.getDocsCount()
 
-'''
-if the user chose one file, the list starts at 0,
-if he chose more than one, the first entry is a directory name,
-all the others are filenames.
-'''
-if len(self.files) > 1:
-start = 1
-else:
-start = 0
-
 #Number of documents failed to validate.
 failed = 0
 
 # store the directory
-if start == 1:
-self.parent.settings.cp_DefaultSession.cp_InDirectory = 
self.files[0]
-else:
-self.parent.settings.cp_DefaultSession.cp_InDirectory = \
-FileAccess.getParentDir(self.files[0])
+self.parent.settings.cp_DefaultSession.cp_InDirectory = \
+FileAccess.getParentDir(self.files[0])
 
 '''
 Here i go through each file, and validate it.
 If its ok, I add it to the ListModel/ConfigSet
 '''
 
-for i in range(start, len(self.files)):
+for i in range(0, len(self.files)):
 doc = CGDocument()
 doc.setRoot(self.parent.settings)
 
-if start == 0:
-doc.cp_URL = self.files[i]
-else:
-doc.cp_URL = FileAccess.connectURLs(self.files[0], 
self.files[i])
+doc.cp_URL = self.files[i]
 
 '''
 so - i check each document and if it is ok I add it.
@@ -935,14 +919,14 @@ class WWD_Events(WWD_Startup):
 done in the checkDocument(...) method
 '''
 if self.parent.checkDocument(doc, self.task, self.xC):
-index = offset + i - failed - start
+index = offset + i - failed
 
self.parent.settings.cp_DefaultSession.cp_Content.cp_Documents.add(index, doc)
 else:
 failed += 1
 
 # if any documents where added,
 # set the first one to be the current-selected document.
-if len(self.files) > start + failed:
+if len(self.files) > failed:
 self.parent.setSelectedDoc([offset])
 
 # update the ui...
diff --git a/wizards/com/sun/star/wizards/web/WebWizardConst.py 
b/wizards/com/sun/star/wizards/web/WebWizardConst.py
index f6a2282..363ecd8 100644
--- a/wizards/com/sun/star/wizards/web/WebWizardConst.py
+++ b/wizards/com/sun/star/wizards/web/WebWizardConst.py
@@ -55,4 +55,4 @@ TASK_FINISH = "t_fin"
 when the user adds more than this number
 of documents to the list, a status dialog opens.
 '''
-MIN_ADD_FILES_FOR_DIALOG = 2
+MIN_ADD_FILES_FOR_DIALOG = 1
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2015-09-21 Thread Julien Nabet
 wizards/com/sun/star/wizards/table/TableWizard.java |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 78e1acffcb3d40266bc075c8b88595accbf62a1b
Author: Julien Nabet 
Date:   Mon Sep 21 22:35:36 2015 +0200

Typo: automaticcally->automatically

Change-Id: I0422965071f3828938b1b1a535f1eb4f2de481f2

diff --git a/wizards/com/sun/star/wizards/table/TableWizard.java 
b/wizards/com/sun/star/wizards/table/TableWizard.java
index ce64033..8ba08ad 100644
--- a/wizards/com/sun/star/wizards/table/TableWizard.java
+++ b/wizards/com/sun/star/wizards/table/TableWizard.java
@@ -389,7 +389,7 @@ public class TableWizard extends DatabaseObjectWizard 
implements XTextListener
 {
 int maxfieldcount = curTableDescriptor.getMaxColumnsInTable();
 if (_icount >= (maxfieldcount - 1))
-{   // keep one column as reserve for the automaticcally created 
key
+{   // keep one column as reserve for the automatically created key
 String smessage = serrToManyFields;
 smessage = JavaTools.replaceSubString(smessage, 
String.valueOf(maxfieldcount), "%COUNT");
 showMessageBox("ErrorBox", VclWindowPeerAttribute.OK, 
smessage);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2015-09-19 Thread Julien Nabet
 wizards/com/sun/star/wizards/web/WWD_Events.py |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e72a4a3c2e1608e301daef0b6e87cc70d814e736
Author: Julien Nabet 
Date:   Sat Sep 19 14:51:24 2015 +0200

tdf#92934: Web Wizard: Cannot Export Zip archive

pubAware_ adds 2 elements for each of these:
LOCAL_PUBLISHER, ZIP_PUBLISHER, FTP_PUBLISHER
and since ZIP_PUBLISHER is added in second positon,
the right index is 2 not 4

Change-Id: I0a533fd0cefcbbfca0e95628f64fac6258019600
Reviewed-on: https://gerrit.libreoffice.org/18715
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 

diff --git a/wizards/com/sun/star/wizards/web/WWD_Events.py 
b/wizards/com/sun/star/wizards/web/WWD_Events.py
index eaca38d..c5dc75e 100644
--- a/wizards/com/sun/star/wizards/web/WWD_Events.py
+++ b/wizards/com/sun/star/wizards/web/WWD_Events.py
@@ -459,7 +459,7 @@ class WWD_Events(WWD_Startup):
 zipFile = sd.callStoreDialog(
 self.settings.cp_DefaultSession.cp_OutDirectory,
 self.resources.resDefaultArchiveFilename)
-self.setPublishUrl(ZIP_PUBLISHER, zipFile, 4)
+self.setPublishUrl(ZIP_PUBLISHER, zipFile, 2)
 self.getPublisher(ZIP_PUBLISHER).overwriteApproved = True
 
 '''
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2015-09-01 Thread Julien Nabet
 wizards/com/sun/star/wizards/db/RecordParser.java |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit ed33646cdecac866ab480bf5770726b4a5bfa6c9
Author: Julien Nabet 
Date:   Tue Sep 1 07:27:05 2015 +0200

tdf#91022: Incorrect Dates in Report created with legacy report wizard

Regression from 
http://cgit.freedesktop.org/libreoffice/core/commit/?id=5d8ecad569fd7a254902da154ed8057ec61f3a83
Thank you Matthew Francis for having found the root cause!

Change-Id: I4128368a5f5df6a9fc5f7668fb1f8f330b5795b9
Reviewed-on: https://gerrit.libreoffice.org/18210
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/wizards/com/sun/star/wizards/db/RecordParser.java 
b/wizards/com/sun/star/wizards/db/RecordParser.java
index b71ae99..21be84a 100644
--- a/wizards/com/sun/star/wizards/db/RecordParser.java
+++ b/wizards/com/sun/star/wizards/db/RecordParser.java
@@ -131,12 +131,14 @@ public class RecordParser extends QueryMetaData
 case DataType.FLOAT: // ==   6;
 case DataType.REAL: // ==   7;
 case DataType.DOUBLE: // ==   8;
-case DataType.DATE: // ==  91;
 case DataType.TIME: // ==  92;
-case DataType.TIMESTAMP: // ==  93;
 oAny = getColumnDoubleValue(ColIndex, false);
 break;
 
+case DataType.DATE: // ==  91;
+case DataType.TIMESTAMP: // ==  93;
+oAny = getColumnDoubleValue(ColIndex, true);
+break;
 case DataType.CHAR: // ==   1;
 case DataType.VARCHAR: // ==  12;
 case DataType.LONGVARCHAR: // ==  -1;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2015-07-14 Thread Julien Nabet
 wizards/com/sun/star/wizards/web/WWD_Events.py |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 2f0d1a23759c1b973593bfba642d01fb3df3c269
Author: Julien Nabet serval2...@yahoo.fr
Date:   Sat Jul 4 16:20:32 2015 +0200

tdf#92404: Web Wizard - no result / crash

Fixes
Traceback (most recent call last):
  File 
/home/laci/m/bibisect/lo-linux-dbgutil-daily/opt/program/wizards/web/WWD_Events.py,
 line 249, in addDocument
oLoadDocs = self.LoadDocs(self.xMSF, self.xUnoDialog, files, self)
TypeError: __init__() missing 1 required positional argument: 'parent_'

and:
Traceback (most recent call last):
  File 
/home/julien/compile-libreoffice/libreoffice/instdir/program/wizards/web/WWD_Events.py,
 line 252, in addDocument
oLoadDocs.loadDocuments()
  File 
/home/julien/compile-libreoffice/libreoffice/instdir/program/wizards/web/WWD_Events.py,
 line 934, in loadDocuments
doc.cp_URL = FileAccess.connectURLs(files[0], self.files[i])
NameError: global name 'files' is not defined

Change-Id: I737117a6981e541f12453bb9d9b2680f5fb79142
Reviewed-on: https://gerrit.libreoffice.org/16756
Tested-by: Jenkins c...@libreoffice.org
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/wizards/com/sun/star/wizards/web/WWD_Events.py 
b/wizards/com/sun/star/wizards/web/WWD_Events.py
index fbe439a..eaca38d 100644
--- a/wizards/com/sun/star/wizards/web/WWD_Events.py
+++ b/wizards/com/sun/star/wizards/web/WWD_Events.py
@@ -246,7 +246,7 @@ class WWD_Events(WWD_Startup):
 sd = self.getStatusDialog()
 sd.setLabel(self.resources.resValidatingDocuments)
 sd.execute(self, task, self.resources.prodName)
-oLoadDocs = self.LoadDocs(self.xMSF, self.xUnoDialog, files, 
self)
+oLoadDocs = self.LoadDocs(self.xMSF, self.xUnoDialog, files, 
task, self)
 oLoadDocs.loadDocuments()
 task.removeTaskListener(sd)
 else:
@@ -926,7 +926,7 @@ class WWD_Events(WWD_Startup):
 if start == 0:
 doc.cp_URL = self.files[i]
 else:
-doc.cp_URL = FileAccess.connectURLs(files[0], 
self.files[i])
+doc.cp_URL = FileAccess.connectURLs(self.files[0], 
self.files[i])
 
 '''
 so - i check each document and if it is ok I add it.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com wizards/source writerfilter/source xmerge/source xmlhelp/source xmloff/dtd xmloff/source xmlscript/source xmlsecurity/source

2015-07-03 Thread Andrea Gelmini
 wizards/com/sun/star/wizards/agenda/AgendaDocument.py  
|4 ++--
 wizards/com/sun/star/wizards/ui/FieldSelection.java
|2 +-
 wizards/com/sun/star/wizards/ui/event/DataAware.py 
|2 +-
 wizards/com/sun/star/wizards/ui/event/UnoDataAware.py  
|2 +-
 wizards/com/sun/star/wizards/web/FTPDialog.py  
|4 ++--
 wizards/com/sun/star/wizards/web/Process.py
|2 +-
 wizards/com/sun/star/wizards/web/WWD_Startup.py
|2 +-
 wizards/source/access2base/DoCmd.xba   
|4 ++--
 wizards/source/depot/CommonLang.xba
|4 ++--
 wizards/source/importwizard/API.xba
|2 +-
 writerfilter/source/rtftok/rtfdocumentimpl.cxx 
|2 +-
 
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentSerializerImpl.java
 |2 +-
 xmlhelp/source/treeview/tvread.cxx 
|2 +-
 xmloff/dtd/dtypes.mod  
|2 +-
 xmloff/dtd/nmspace.mod 
|2 +-
 xmloff/source/chart/contexts.hxx   
|2 +-
 xmloff/source/core/DomBuilderContext.cxx   
|2 +-
 xmloff/source/draw/ximpshap.cxx
|2 +-
 xmloff/source/forms/attriblistmerge.hxx
|2 +-
 xmloff/source/forms/elementimport.cxx  
|2 +-
 xmloff/source/script/XMLStarBasicContextFactory.cxx
|2 +-
 xmloff/source/style/xmlaustp.cxx   
|2 +-
 xmloff/source/text/XMLIndexTabStopEntryContext.cxx 
|2 +-
 xmloff/source/text/XMLTextFrameContext.cxx 
|2 +-
 xmloff/source/text/XMLTextHeaderFooterContext.cxx  
|2 +-
 xmloff/source/text/txtflde.cxx 
|2 +-
 xmloff/source/text/txtfldi.cxx 
|6 +++---
 xmloff/source/text/txtprmap.cxx
|2 +-
 xmloff/source/transform/Oasis2OOo.cxx  
|2 +-
 xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
|2 +-
 xmlsecurity/source/helper/xsecctl.cxx  
|2 +-
 xmlsecurity/source/xmlsec/xmlstreamio.cxx  
|2 +-
 32 files changed, 38 insertions(+), 38 deletions(-)

New commits:
commit 1c5f07e60cfd81f27ad3aea0b56634554f3ef5a9
Author: Andrea Gelmini andrea.gelm...@gelma.net
Date:   Thu Jul 2 18:26:18 2015 +0200

Fix typos

Change-Id: I98b4dfb0f72f315065693335e2f882bb2eed3afe
Reviewed-on: https://gerrit.libreoffice.org/16713
Reviewed-by: Samuel Mehrbrodt s.mehrbr...@gmail.com
Tested-by: Samuel Mehrbrodt s.mehrbr...@gmail.com

diff --git a/wizards/com/sun/star/wizards/agenda/AgendaDocument.py 
b/wizards/com/sun/star/wizards/agenda/AgendaDocument.py
index 531068d..8ab03c4 100644
--- a/wizards/com/sun/star/wizards/agenda/AgendaDocument.py
+++ b/wizards/com/sun/star/wizards/agenda/AgendaDocument.py
@@ -410,7 +410,7 @@ class AgendaDocument(TextDocument):
 '''
 create the minutes for the given topics or remove the minutes
 section from the document.
-If no topics are supplied, or the user specified not to create minuts,
+If no topics are supplied, or the user specified not to create minutes,
 the minutes section will be removed,
 @param topicsData supplies PropertyValue arrays containing
 the values for the topics.
@@ -514,7 +514,7 @@ class AgendaDocument(TextDocument):
 
 '''given a text range and a text, fills the given
 text range with the given text.
-If the given text is empty, uses a placeholder with the giveb
+If the given text is empty, uses a placeholder with the given
 placeholder text.
 @param range text range to fill
 @param text the text to fill to the text 

[Libreoffice-commits] core.git: wizards/com

2015-05-27 Thread Caolán McNamara
 wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit a3727ad62b7c1a30f9b0531042cce5ce5b8c6089
Author: Caolán McNamara caol...@redhat.com
Date:   Wed May 27 15:39:12 2015 +0100

wrong comparison in letter wizard

the file name widget is empty when it shouldn't be.
the other wizards get this right

Change-Id: Icdb629e676a73fcf8d8be4352818abbef455bbaf

diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py 
b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py
index d8598ff..f4a16e2 100644
--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py
+++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py
@@ -123,7 +123,7 @@ class LetterWizardDialogImpl(LetterWizardDialog):
 self.myConfig.cp_PrivateLetter.cp_Salutation = \
 self.resources.SalutationLabels[2]
 
-if self.myPathSelection.xSaveTextBox.Text.lower():
+if self.myPathSelection.xSaveTextBox.Text.lower() == :
 self.myPathSelection.initializePath()
 
 xContainerWindow = self.myLetterDoc.xFrame.ContainerWindow
@@ -256,7 +256,7 @@ class LetterWizardDialogImpl(LetterWizardDialog):
 self.lstBusinessStyleItemChanged()
 self.enableSenderReceiver()
 self.setPossibleFooter(True)
-if self.myPathSelection.xSaveTextBox.Text.lower():
+if self.myPathSelection.xSaveTextBox.Text.lower() == :
 self.myPathSelection.initializePath()
 
 def optPrivOfficialLetterItemChanged(self):
@@ -273,7 +273,7 @@ class LetterWizardDialogImpl(LetterWizardDialog):
 self.disableBusinessPaper()
 self.disableSenderReceiver()
 self.setPossibleFooter(True)
-if self.myPathSelection.xSaveTextBox.Text.lower():
+if self.myPathSelection.xSaveTextBox.Text.lower() == :
 self.myPathSelection.initializePath()
 self.myLetterDoc.fillSenderWithUserData()
 
@@ -291,7 +291,7 @@ class LetterWizardDialogImpl(LetterWizardDialog):
 self.disableBusinessPaper()
 self.disableSenderReceiver()
 self.setPossibleFooter(False)
-if self.myPathSelection.xSaveTextBox.Text.lower():
+if self.myPathSelection.xSaveTextBox.Text.lower() == :
 self.myPathSelection.initializePath()
 
 def optSenderPlaceholderItemChanged(self):
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2015-01-02 Thread Julien Nabet
 wizards/com/sun/star/wizards/ui/WizardDialog.java |9 -
 1 file changed, 9 deletions(-)

New commits:
commit c7531408b3ef4b2d284edf35ed983c23e7585231
Author: Julien Nabet serval2...@yahoo.fr
Date:   Fri Jan 2 13:45:54 2015 +0100

Resolves fdo#87123: Impossible to create a form with wizard

Quoting Noel:

The original block of code looked like this before my changes:

MethodInvocation windowHidden = new MethodInvocation(windowHidden, this);
xWindow.addWindowListener((CommonListener) getGuiEventListener());
String dialogName = (String) Helper.getUnoPropertyValue(xDialogModel, 
PropertyNames.PROPERTY_NAME);
getGuiEventListener().add(dialogName, EVENT_ACTION_PERFORMED, windowHidden);

which is clearly bogus, since actionPerformed is not an event on the 
XWindowListener interface.

(see https://bugs.freedesktop.org/show_bug.cgi?id=87123#c14)

Change-Id: I4c4923e6cb21989fcd3e346b099a7e7b15526bf2

diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.java 
b/wizards/com/sun/star/wizards/ui/WizardDialog.java
index 081b9a3..523673a 100644
--- a/wizards/com/sun/star/wizards/ui/WizardDialog.java
+++ b/wizards/com/sun/star/wizards/ui/WizardDialog.java
@@ -461,15 +461,6 @@ public abstract class WizardDialog extends UnoDialog2 
implements VetoableChangeL
 });
 
 setControlProperty(btnWizardNext, DefaultButton, Boolean.TRUE);
-// add a window listener, to know
-// if the user used escape key to
-// close the dialog.
-xWindow.addWindowListener(new XWindowListenerAdapter() {
-@Override
-public void windowHidden(EventObject event) {
-cancelWizard_1();
-}
-});
 }
 catch (java.lang.Exception jexception)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2015-01-02 Thread Julien Nabet
 wizards/com/sun/star/wizards/query/CallQueryWizard.java |3 +++
 wizards/com/sun/star/wizards/table/CallTableWizard.java |3 +++
 2 files changed, 6 insertions(+)

New commits:
commit f3edc18b4006b712725cbe530f064798607b2beb
Author: Julien Nabet serval2...@yahoo.fr
Date:   Fri Jan 2 18:38:34 2015 +0100

Following fdo#87123: Impossible to create table or query with wizard

See https://bugs.freedesktop.org/show_bug.cgi?id=87123#c15
and above all https://bugs.freedesktop.org/show_bug.cgi?id=87123#c18
Thank you Noel for your help!

Change-Id: I9feb2384ff5965bab005c9a1e8803062cd9d0f94

diff --git a/wizards/com/sun/star/wizards/query/CallQueryWizard.java 
b/wizards/com/sun/star/wizards/query/CallQueryWizard.java
index 0114d87..9424566 100644
--- a/wizards/com/sun/star/wizards/query/CallQueryWizard.java
+++ b/wizards/com/sun/star/wizards/query/CallQueryWizard.java
@@ -56,6 +56,9 @@ public class CallQueryWizard
 public static class QueryWizardImplementation extends 
com.sun.star.lib.uno.helper.PropertySet implements 
com.sun.star.lang.XInitialization, com.sun.star.lang.XServiceInfo, 
com.sun.star.task.XJobExecutor
 {
 private PropertyValue[] m_wizardContext;
+// the next two fields are accessed by reflection, do not delete!
+public String   Command;
+public final IntegerCommandType = 
com.sun.star.sdb.CommandType.QUERY;
 
 /** The constructor of the inner class has a XMultiServiceFactory 
parameter.
  * @param i_serviceFactory A special service factory could be 
introduced while initializing.
diff --git a/wizards/com/sun/star/wizards/table/CallTableWizard.java 
b/wizards/com/sun/star/wizards/table/CallTableWizard.java
index 07b8300..e25f006 100644
--- a/wizards/com/sun/star/wizards/table/CallTableWizard.java
+++ b/wizards/com/sun/star/wizards/table/CallTableWizard.java
@@ -56,6 +56,9 @@ public class CallTableWizard
 {
 
 private PropertyValue[] m_wizardContext;
+// the next two fields are accessed by reflection, do not delete!
+public String   Command;
+public final IntegerCommandType = 
com.sun.star.sdb.CommandType.TABLE;
 
 /** The constructor of the inner class has a XMultiServiceFactory 
parameter.
  */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2014-12-19 Thread Lionel Elie Mamane
 wizards/com/sun/star/wizards/form/StyleApplier.java |   24 ++--
 1 file changed, 12 insertions(+), 12 deletions(-)

New commits:
commit df5d040006dc9fdfa65049cd5cbf6841bd4a74de
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Fri Dec 19 23:40:50 2014 +0100

fix indentation

Change-Id: I35a89fc3a7f388be783c729c8e3414aba1c5c726

diff --git a/wizards/com/sun/star/wizards/form/StyleApplier.java 
b/wizards/com/sun/star/wizards/form/StyleApplier.java
index 4a171e0..0e33f92 100644
--- a/wizards/com/sun/star/wizards/form/StyleApplier.java
+++ b/wizards/com/sun/star/wizards/form/StyleApplier.java
@@ -334,11 +334,11 @@ public class StyleApplier
 {
 StylesPath = FileAccess.getOfficePath(xMSF, Config, , );
 StylesPath = FileAccess.combinePaths(xMSF, StylesPath, 
/wizard/form/styles);
-   }
+}
 catch (NoValidPathException e)
-   {
-   }
-   return StylesPath;
+{
+}
+return StylesPath;
 }
 
 private int[] getStyleColors(String _filename)
@@ -401,16 +401,16 @@ public class StyleApplier
 if (aDBControl != null)
 {
 if 
(aDBControl.xServiceInfo.supportsService(com.sun.star.drawing.ShapeCollection))
-{
-TimeStampControl oTimeStampControl = 
(TimeStampControl) aDBControl;
-for (int i = 0; i  2; i++)
 {
-XPropertySet xPropertySet = 
oTimeStampControl.getControlofGroupShapeByIndex(i);
-setDBControlColors(xPropertySet, 
_iStyleColors);
+TimeStampControl oTimeStampControl = 
(TimeStampControl) aDBControl;
+for (int i = 0; i  2; i++)
+{
+XPropertySet xPropertySet = 
oTimeStampControl.getControlofGroupShapeByIndex(i);
+setDBControlColors(xPropertySet, 
_iStyleColors);
+}
 }
-}
-else
-{
+else
+{
 
setDBControlColors(aDBControl.xPropertySet, _iStyleColors);
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2014-12-19 Thread Lionel Elie Mamane
 wizards/com/sun/star/wizards/document/TimeStampControl.java |1 +
 1 file changed, 1 insertion(+)

New commits:
commit d2929cdc1a337769ee3b64b81f8454329c9d4cbb
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Fri Dec 19 23:59:23 2014 +0100

fix build

Change-Id: I149d36a103df51ca78324df3121f51440797e226

diff --git a/wizards/com/sun/star/wizards/document/TimeStampControl.java 
b/wizards/com/sun/star/wizards/document/TimeStampControl.java
index 0706e32..524f172 100644
--- a/wizards/com/sun/star/wizards/document/TimeStampControl.java
+++ b/wizards/com/sun/star/wizards/document/TimeStampControl.java
@@ -30,6 +30,7 @@ import com.sun.star.uno.UnoRuntime;
 import com.sun.star.container.XNameContainer;
 import com.sun.star.drawing.XControlShape;
 import com.sun.star.drawing.XShape;
+import com.sun.star.drawing.XShapes;
 
 public class TimeStampControl extends DatabaseControl
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2014-12-07 Thread Julien Nabet
 wizards/com/sun/star/wizards/form/StyleApplier.java |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c2d8fed349747f526a74cde3fcd36c494fc199b2
Author: Julien Nabet serval2...@yahoo.fr
Date:   Sun Dec 7 22:39:27 2014 +0100

We need to call decode method considering this:

java.lang.NumberFormatException: For input string: #FF9966
at 
java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:481)
at java.lang.Integer.parseInt(Integer.java:527)
at 
com.sun.star.wizards.form.StyleApplier.getStyleColor(StyleApplier.java:321)

When creating form with wizard

Partly reverts 
http://cgit.freedesktop.org/libreoffice/core/commit/?id=10e8e10605b9c52bd7fd8a0665dd4d358c733a66

Change-Id: Ide85566244e0dce1d30f6369d1f5d8d30534a01a

diff --git a/wizards/com/sun/star/wizards/form/StyleApplier.java 
b/wizards/com/sun/star/wizards/form/StyleApplier.java
index 3e6b087..cfb9443 100644
--- a/wizards/com/sun/star/wizards/form/StyleApplier.java
+++ b/wizards/com/sun/star/wizards/form/StyleApplier.java
@@ -318,7 +318,7 @@ public class StyleApplier
 {
 sPropValue = 
JavaTools.replaceSubString(sPropValue, PropertyNames.EMPTY_STRING, 
PropertyNames.SEMI_COLON);
 sPropValue = 
JavaTools.replaceSubString(sPropValue, PropertyNames.EMPTY_STRING, 
PropertyNames.SPACE);
-return Integer.parseInt(sPropValue);
+return Integer.decode(sPropValue).intValue();
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com wizards/Jar_commonwizards.mk

2014-11-25 Thread Noel Grandin
 wizards/Jar_commonwizards.mk  |5 +
 wizards/com/sun/star/wizards/ui/event/XActionListenerAdapter.java |   32 
++
 wizards/com/sun/star/wizards/ui/event/XTextListenerAdapter.java   |   32 
++
 3 files changed, 69 insertions(+)

New commits:
commit 0c4e9e6b7e4f7155e00f40e31a73a928ce4fad38
Author: Noel Grandin n...@peralex.com
Date:   Tue Nov 25 10:49:50 2014 +0200

java,wizards: forgot to commit some files

Change-Id: Ie4532343cf964ade848454d89b44e381eadb6582

diff --git a/wizards/Jar_commonwizards.mk b/wizards/Jar_commonwizards.mk
index 0958a71..ad1ac03 100644
--- a/wizards/Jar_commonwizards.mk
+++ b/wizards/Jar_commonwizards.mk
@@ -86,6 +86,11 @@ $(eval $(call gb_Jar_add_sourcefiles,commonwizards,\
wizards/com/sun/star/wizards/ui/event/TaskEvent 
\
wizards/com/sun/star/wizards/ui/event/TaskListener  
\
wizards/com/sun/star/wizards/ui/event/UnoDataAware  
\
+   wizards/com/sun/star/wizards/ui/event/XActionListenerAdapter\
+   wizards/com/sun/star/wizards/ui/event/XItemListenerAdapter  \
+   wizards/com/sun/star/wizards/ui/event/XMouseListenerAdapter \
+   wizards/com/sun/star/wizards/ui/event/XTextListenerAdapter  \
+   wizards/com/sun/star/wizards/ui/event/XWindowListenerAdapter\
wizards/com/sun/star/wizards/ui/AggregateComponent  
\
wizards/com/sun/star/wizards/ui/CommandFieldSelection   
\
wizards/com/sun/star/wizards/ui/ControlScroller 
\
diff --git a/wizards/com/sun/star/wizards/ui/event/XActionListenerAdapter.java 
b/wizards/com/sun/star/wizards/ui/event/XActionListenerAdapter.java
new file mode 100644
index 000..b7dfddb
--- /dev/null
+++ b/wizards/com/sun/star/wizards/ui/event/XActionListenerAdapter.java
@@ -0,0 +1,32 @@
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the License); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+package com.sun.star.wizards.ui.event;
+
+import com.sun.star.awt.ActionEvent;
+import com.sun.star.awt.XActionListener;
+import com.sun.star.lang.EventObject;
+
+public class XActionListenerAdapter implements XActionListener {
+
+public void disposing(EventObject event) {
+}
+
+public void actionPerformed(ActionEvent event) {
+}
+
+}
diff --git a/wizards/com/sun/star/wizards/ui/event/XTextListenerAdapter.java 
b/wizards/com/sun/star/wizards/ui/event/XTextListenerAdapter.java
new file mode 100644
index 000..af95771
--- /dev/null
+++ b/wizards/com/sun/star/wizards/ui/event/XTextListenerAdapter.java
@@ -0,0 +1,32 @@
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the License); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+package com.sun.star.wizards.ui.event;
+
+import com.sun.star.awt.TextEvent;
+import com.sun.star.awt.XTextListener;
+import com.sun.star.lang.EventObject;
+
+public class XTextListenerAdapter implements XTextListener {
+
+public void disposing(EventObject event) {
+}
+
+public void textChanged(TextEvent event) {
+}
+
+}
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2014-11-24 Thread Noel Grandin
 wizards/com/sun/star/wizards/ui/UnoDialog.java  |2 +-
 wizards/com/sun/star/wizards/ui/UnoDialog2.java |   10 --
 2 files changed, 1 insertion(+), 11 deletions(-)

New commits:
commit f136502dd357c2faa5fde494f89ca833c733c9a4
Author: Noel Grandin n...@peralex.com
Date:   Tue Nov 18 12:58:10 2014 +0200

createListener() is never overriden

Change-Id: I95c095eb7a6f315019fb851fb20e65314eaebf55
Reviewed-on: https://gerrit.libreoffice.org/13091
Reviewed-by: Noel Grandin noelgran...@gmail.com
Tested-by: Noel Grandin noelgran...@gmail.com

diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog.java 
b/wizards/com/sun/star/wizards/ui/UnoDialog.java
index 6ba5822..ef66537 100644
--- a/wizards/com/sun/star/wizards/ui/UnoDialog.java
+++ b/wizards/com/sun/star/wizards/ui/UnoDialog.java
@@ -55,7 +55,7 @@ public class UnoDialog implements EventNames
 public Resource m_oResource;
 public XWindowPeer xWindowPeer = null;
 private PeerConfig m_oPeerConfig;
-protected AbstractListener guiEventListener;
+protected final AbstractListener guiEventListener = new CommonListener();
 
 public AbstractListener getGuiEventListener()
 {
diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog2.java 
b/wizards/com/sun/star/wizards/ui/UnoDialog2.java
index eaf929f..9a09ba0 100644
--- a/wizards/com/sun/star/wizards/ui/UnoDialog2.java
+++ b/wizards/com/sun/star/wizards/ui/UnoDialog2.java
@@ -38,15 +38,6 @@ import com.sun.star.wizards.ui.event.*;
 public class UnoDialog2 extends UnoDialog
 {
 
-/**
- * Override this method to return another listener.
- * @return
- */
-protected AbstractListener createListener()
-{
-return new CommonListener();
-}
-
 public UnoDialog2(XMultiServiceFactory xmsf)
 {
 super(xmsf, new String[]
@@ -54,7 +45,6 @@ public class UnoDialog2 extends UnoDialog
 }, new Object[]
 {
 });
-guiEventListener = createListener();
 }
 
 public XButton insertButton(String sName, String actionPerformed, Object 
eventTarget, String[] sPropNames, Object[] oPropValues)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2014-11-24 Thread Noel Grandin
 wizards/com/sun/star/wizards/ui/UnoDialog.java  |4 ++--
 wizards/com/sun/star/wizards/ui/UnoDialog2.java |6 +-
 2 files changed, 3 insertions(+), 7 deletions(-)

New commits:
commit 53135b2a6ea0222cc9bece9e96ff6c7b833d5490
Author: Noel Grandin n...@peralex.com
Date:   Tue Nov 18 12:59:57 2014 +0200

the UnoDialog constructor parameters can be simplified

Change-Id: I5c790a4b79966c977899a0cdacde8fb41148eb1a
Reviewed-on: https://gerrit.libreoffice.org/13092
Reviewed-by: Noel Grandin noelgran...@gmail.com
Tested-by: Noel Grandin noelgran...@gmail.com

diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog.java 
b/wizards/com/sun/star/wizards/ui/UnoDialog.java
index ef66537..f23eda9 100644
--- a/wizards/com/sun/star/wizards/ui/UnoDialog.java
+++ b/wizards/com/sun/star/wizards/ui/UnoDialog.java
@@ -62,7 +62,7 @@ public class UnoDialog implements EventNames
 return guiEventListener;
 }
 
-public UnoDialog(XMultiServiceFactory xMSF, String[] PropertyNames, 
Object[] PropertyValues)
+public UnoDialog(XMultiServiceFactory xMSF)
 {
 try
 {
@@ -70,7 +70,7 @@ public class UnoDialog implements EventNames
 ControlList = new HashMapString, Integer();
 xDialogModel = (XInterface) 
xMSF.createInstance(com.sun.star.awt.UnoControlDialogModel);
 XMultiPropertySet xMultiPSetDlg = 
UnoRuntime.queryInterface(XMultiPropertySet.class, xDialogModel);
-xMultiPSetDlg.setPropertyValues(PropertyNames, PropertyValues);
+xMultiPSetDlg.setPropertyValues(new String[0], new Object[0]);
 MSFDialogModel = 
UnoRuntime.queryInterface(XMultiServiceFactory.class, xDialogModel);
 xUnoDialog = (XInterface) 
xMSF.createInstance(com.sun.star.awt.UnoControlDialog);
 xControl = UnoRuntime.queryInterface(XControl.class, xUnoDialog);
diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog2.java 
b/wizards/com/sun/star/wizards/ui/UnoDialog2.java
index 9a09ba0..ab41e0e 100644
--- a/wizards/com/sun/star/wizards/ui/UnoDialog2.java
+++ b/wizards/com/sun/star/wizards/ui/UnoDialog2.java
@@ -40,11 +40,7 @@ public class UnoDialog2 extends UnoDialog
 
 public UnoDialog2(XMultiServiceFactory xmsf)
 {
-super(xmsf, new String[]
-{
-}, new Object[]
-{
-});
+super(xmsf);
 }
 
 public XButton insertButton(String sName, String actionPerformed, Object 
eventTarget, String[] sPropNames, Object[] oPropValues)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2014-11-24 Thread Noel Grandin
 wizards/com/sun/star/wizards/ui/UnoDialog.java|5 -
 wizards/com/sun/star/wizards/ui/WizardDialog.java |8 
 2 files changed, 4 insertions(+), 9 deletions(-)

New commits:
commit b7f67f24bbe9ced0dfefda674d96fa1d41cdf062
Author: Noel Grandin n...@peralex.com
Date:   Tue Nov 18 13:01:29 2014 +0200

the getGuiEventListener method is unnecessary

Change-Id: I1c8b0ea28b6dbc2b6825f5f30ae0d234b7362d64
Reviewed-on: https://gerrit.libreoffice.org/13093
Reviewed-by: Noel Grandin noelgran...@gmail.com
Tested-by: Noel Grandin noelgran...@gmail.com

diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog.java 
b/wizards/com/sun/star/wizards/ui/UnoDialog.java
index f23eda9..d5a0d8e 100644
--- a/wizards/com/sun/star/wizards/ui/UnoDialog.java
+++ b/wizards/com/sun/star/wizards/ui/UnoDialog.java
@@ -57,11 +57,6 @@ public class UnoDialog implements EventNames
 private PeerConfig m_oPeerConfig;
 protected final AbstractListener guiEventListener = new CommonListener();
 
-public AbstractListener getGuiEventListener()
-{
-return guiEventListener;
-}
-
 public UnoDialog(XMultiServiceFactory xMSF)
 {
 try
diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.java 
b/wizards/com/sun/star/wizards/ui/WizardDialog.java
index abc1522..3b8d74f 100644
--- a/wizards/com/sun/star/wizards/ui/WizardDialog.java
+++ b/wizards/com/sun/star/wizards/ui/WizardDialog.java
@@ -243,10 +243,10 @@ public abstract class WizardDialog extends UnoDialog2 
implements VetoableChangeL
 xIndexContRoadmap = 
UnoRuntime.queryInterface(XIndexContainer.class, oRoadmap);
 
 MethodInvocation mi = new MethodInvocation(itemStateChanged, 
this, com.sun.star.awt.ItemEvent.class);
-getGuiEventListener().add(rdmNavi, 
EventNames.EVENT_ITEM_CHANGED, mi);
+guiEventListener.add(rdmNavi, EventNames.EVENT_ITEM_CHANGED, mi);
 xRoadmapControl = this.xDlgContainer.getControl(rdmNavi);
 xRoadmapBroadcaster = 
UnoRuntime.queryInterface(XItemEventBroadcaster.class, xRoadmapControl);
-xRoadmapBroadcaster.addItemListener((XItemListener) 
getGuiEventListener());
+xRoadmapBroadcaster.addItemListener((XItemListener) 
guiEventListener);
 
 Helper.setUnoPropertyValue(oRoadmap, Text, 
oWizardResource.getResText(UIConsts.RID_COMMON + 16));
 }
@@ -483,9 +483,9 @@ public abstract class WizardDialog extends UnoDialog2 
implements VetoableChangeL
 // if the user used escape key to
 // close the dialog.
 MethodInvocation windowHidden = new 
MethodInvocation(windowHidden, this);
-xWindow.addWindowListener((CommonListener) getGuiEventListener());
+xWindow.addWindowListener((CommonListener) guiEventListener);
 String dialogName = (String) 
Helper.getUnoPropertyValue(xDialogModel, PropertyNames.PROPERTY_NAME);
-getGuiEventListener().add(dialogName, EVENT_ACTION_PERFORMED, 
windowHidden);
+guiEventListener.add(dialogName, EVENT_ACTION_PERFORMED, 
windowHidden);
 
 }
 catch (java.lang.Exception jexception)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com wizards/Jar_commonwizards.mk

2014-11-24 Thread Noel Grandin
 wizards/Jar_commonwizards.mk|1 
 wizards/com/sun/star/wizards/ui/UnoDialog.java  |2 
 wizards/com/sun/star/wizards/ui/UnoDialog2.java |   21 +-
 wizards/com/sun/star/wizards/ui/WizardDialog.java   |5 
 wizards/com/sun/star/wizards/ui/event/AbstractListener.java |  119 
 wizards/com/sun/star/wizards/ui/event/CommonListener.java   |   97 +
 6 files changed, 108 insertions(+), 137 deletions(-)

New commits:
commit 926744de7a9bb9375f41972f977bfa25fc837c15
Author: Noel Grandin n...@peralex.com
Date:   Tue Nov 18 13:07:45 2014 +0200

merge AbstractListener into CommonListener

since CommonListener is the only subclass

Change-Id: If10ccb29991d7c48e2c20fc41330572a669f1497
Reviewed-on: https://gerrit.libreoffice.org/13094
Reviewed-by: Noel Grandin noelgran...@gmail.com
Tested-by: Noel Grandin noelgran...@gmail.com

diff --git a/wizards/Jar_commonwizards.mk b/wizards/Jar_commonwizards.mk
index a13a114..f0945e3 100644
--- a/wizards/Jar_commonwizards.mk
+++ b/wizards/Jar_commonwizards.mk
@@ -75,7 +75,6 @@ $(eval $(call gb_Jar_add_sourcefiles,commonwizards,\
wizards/com/sun/star/wizards/db/TableDescriptor 
\
wizards/com/sun/star/wizards/db/SQLQueryComposer
\
wizards/com/sun/star/wizards/db/DatabaseObjectWizard
\
-   wizards/com/sun/star/wizards/ui/event/AbstractListener  
\
wizards/com/sun/star/wizards/ui/event/CommonListener
\
wizards/com/sun/star/wizards/ui/event/DataAware 
\
wizards/com/sun/star/wizards/ui/event/DataAwareFields   
\
diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog.java 
b/wizards/com/sun/star/wizards/ui/UnoDialog.java
index d5a0d8e..115f727 100644
--- a/wizards/com/sun/star/wizards/ui/UnoDialog.java
+++ b/wizards/com/sun/star/wizards/ui/UnoDialog.java
@@ -55,7 +55,7 @@ public class UnoDialog implements EventNames
 public Resource m_oResource;
 public XWindowPeer xWindowPeer = null;
 private PeerConfig m_oPeerConfig;
-protected final AbstractListener guiEventListener = new CommonListener();
+protected final CommonListener guiEventListener = new CommonListener();
 
 public UnoDialog(XMultiServiceFactory xMSF)
 {
diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog2.java 
b/wizards/com/sun/star/wizards/ui/UnoDialog2.java
index ab41e0e..0268474 100644
--- a/wizards/com/sun/star/wizards/ui/UnoDialog2.java
+++ b/wizards/com/sun/star/wizards/ui/UnoDialog2.java
@@ -25,7 +25,6 @@ import com.sun.star.wizards.common.Desktop;
 import com.sun.star.wizards.common.Helper;
 import com.sun.star.wizards.common.PropertyNames;
 import com.sun.star.wizards.common.SystemDialog;
-import com.sun.star.wizards.ui.event.*;
 
 /**
  * This class contains convenience methods for inserting components to a 
dialog.
@@ -33,7 +32,7 @@ import com.sun.star.wizards.ui.event.*;
  * description files to a Java class which builds the same dialog through the 
UNO API./p
  * pIt uses an Event-Listener method, which calls a method through reflection
  * when an event on a component is triggered.
- * see the classes AbstractListener, CommonListener, MethodInvocation for 
details./p
+ * see the classes CommonListener, MethodInvocation for details./p
  */
 public class UnoDialog2 extends UnoDialog
 {
@@ -50,7 +49,7 @@ public class UnoDialog2 extends UnoDialog
 
 if (actionPerformed != null)
 {
-xButton.addActionListener((XActionListener) guiEventListener);
+xButton.addActionListener(guiEventListener);
 guiEventListener.add(sName, EVENT_ACTION_PERFORMED, 
actionPerformed, eventTarget);
 }
 return xButton;
@@ -85,7 +84,7 @@ public class UnoDialog2 extends UnoDialog
 
 if (itemChanged != null)
 {
-xCheckBox.addItemListener((XItemListener) guiEventListener);
+xCheckBox.addItemListener(guiEventListener);
 guiEventListener.add(sName, EVENT_ITEM_CHANGED, itemChanged, 
eventTarget);
 }
 return xCheckBox;
@@ -101,18 +100,18 @@ public class UnoDialog2 extends UnoDialog
 XComboBox xComboBox = (XComboBox) 
insertControlModel2(com.sun.star.awt.UnoControlComboBoxModel, sName, 
sPropNames, oPropValues, XComboBox.class);
 if (actionPerformed != null)
 {
-xComboBox.addActionListener((XActionListener) guiEventListener);
+xComboBox.addActionListener(guiEventListener);
 guiEventListener.add(sName, EVENT_ACTION_PERFORMED, 
actionPerformed, eventTarget);
 }
 if (itemChanged != null)
 {
-xComboBox.addItemListener((XItemListener) guiEventListener);
+xComboBox.addItemListener(guiEventListener);
 

[Libreoffice-commits] core.git: wizards/com

2014-11-24 Thread Noel Grandin
 wizards/com/sun/star/wizards/ui/ImageList.java|2 
 wizards/com/sun/star/wizards/ui/UnoDialog.java|2 
 wizards/com/sun/star/wizards/ui/UnoDialog2.java   |   34 ---
 wizards/com/sun/star/wizards/ui/WizardDialog.java |4 -
 wizards/com/sun/star/wizards/ui/event/CommonListener.java |   40 +++---
 wizards/com/sun/star/wizards/ui/event/EventNames.java |   32 +--
 6 files changed, 64 insertions(+), 50 deletions(-)

New commits:
commit 8b0aa5210a36c14bb9c3038870b83a6769dde601
Author: Noel Grandin n...@peralex.com
Date:   Tue Nov 18 13:16:58 2014 +0200

convert EventNames to an enum

Change-Id: I68496b47564f4c00c19a62f9f1bf38d3353598f7
Reviewed-on: https://gerrit.libreoffice.org/13095
Reviewed-by: Noel Grandin noelgran...@gmail.com
Tested-by: Noel Grandin noelgran...@gmail.com

diff --git a/wizards/com/sun/star/wizards/ui/ImageList.java 
b/wizards/com/sun/star/wizards/ui/ImageList.java
index 9b3bfd3..3a0ec88 100644
--- a/wizards/com/sun/star/wizards/ui/ImageList.java
+++ b/wizards/com/sun/star/wizards/ui/ImageList.java
@@ -337,7 +337,7 @@ public class ImageList implements XItemEventBroadcaster, 
ListDataListener
 XWindow win = UnoRuntime.queryInterface(XWindow.class, image);
 win.addMouseListener(uiEventListener);
 win.addKeyListener(imageKeyListener);
-uiEventListener.add(imageName, EventNames.EVENT_MOUSE_PRESSED, 
METHOD_MOUSE_PRESSED);
+uiEventListener.add(imageName, EventNames.MOUSE_PRESSED, 
METHOD_MOUSE_PRESSED);
 
 return image;
 }
diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog.java 
b/wizards/com/sun/star/wizards/ui/UnoDialog.java
index 115f727..5b4eefe 100644
--- a/wizards/com/sun/star/wizards/ui/UnoDialog.java
+++ b/wizards/com/sun/star/wizards/ui/UnoDialog.java
@@ -34,7 +34,7 @@ import com.sun.star.wizards.ui.event.*;
 
 import java.util.HashMap;
 
-public class UnoDialog implements EventNames
+public class UnoDialog
 {
 
 public XMultiServiceFactory xMSF;
diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog2.java 
b/wizards/com/sun/star/wizards/ui/UnoDialog2.java
index 0268474..20a81c2 100644
--- a/wizards/com/sun/star/wizards/ui/UnoDialog2.java
+++ b/wizards/com/sun/star/wizards/ui/UnoDialog2.java
@@ -17,7 +17,20 @@
  */
 package com.sun.star.wizards.ui;
 
-import com.sun.star.awt.*;
+import com.sun.star.awt.XButton;
+import com.sun.star.awt.XCheckBox;
+import com.sun.star.awt.XComboBox;
+import com.sun.star.awt.XControl;
+import com.sun.star.awt.XCurrencyField;
+import com.sun.star.awt.XDateField;
+import com.sun.star.awt.XListBox;
+import com.sun.star.awt.XNumericField;
+import com.sun.star.awt.XPatternField;
+import com.sun.star.awt.XProgressBar;
+import com.sun.star.awt.XRadioButton;
+import com.sun.star.awt.XScrollBar;
+import com.sun.star.awt.XTextComponent;
+import com.sun.star.awt.XTimeField;
 import com.sun.star.lang.XMultiServiceFactory;
 import com.sun.star.uno.UnoRuntime;
 import com.sun.star.uno.XInterface;
@@ -25,6 +38,7 @@ import com.sun.star.wizards.common.Desktop;
 import com.sun.star.wizards.common.Helper;
 import com.sun.star.wizards.common.PropertyNames;
 import com.sun.star.wizards.common.SystemDialog;
+import com.sun.star.wizards.ui.event.EventNames;
 
 /**
  * This class contains convenience methods for inserting components to a 
dialog.
@@ -50,7 +64,7 @@ public class UnoDialog2 extends UnoDialog
 if (actionPerformed != null)
 {
 xButton.addActionListener(guiEventListener);
-guiEventListener.add(sName, EVENT_ACTION_PERFORMED, 
actionPerformed, eventTarget);
+guiEventListener.add(sName, EventNames.ACTION_PERFORMED, 
actionPerformed, eventTarget);
 }
 return xButton;
 }
@@ -85,7 +99,7 @@ public class UnoDialog2 extends UnoDialog
 if (itemChanged != null)
 {
 xCheckBox.addItemListener(guiEventListener);
-guiEventListener.add(sName, EVENT_ITEM_CHANGED, itemChanged, 
eventTarget);
+guiEventListener.add(sName, EventNames.ITEM_CHANGED, itemChanged, 
eventTarget);
 }
 return xCheckBox;
 }
@@ -101,18 +115,18 @@ public class UnoDialog2 extends UnoDialog
 if (actionPerformed != null)
 {
 xComboBox.addActionListener(guiEventListener);
-guiEventListener.add(sName, EVENT_ACTION_PERFORMED, 
actionPerformed, eventTarget);
+guiEventListener.add(sName, EventNames.ACTION_PERFORMED, 
actionPerformed, eventTarget);
 }
 if (itemChanged != null)
 {
 xComboBox.addItemListener(guiEventListener);
-guiEventListener.add(sName, EVENT_ITEM_CHANGED, itemChanged, 
eventTarget);
+guiEventListener.add(sName, EventNames.ITEM_CHANGED, itemChanged, 
eventTarget);
 }
 if (textChanged != null)
 {
 XTextComponent xTextComponent = 

[Libreoffice-commits] core.git: wizards/com

2014-11-24 Thread Noel Grandin
 wizards/com/sun/star/wizards/ui/ImageList.java  |   12 ---
 wizards/com/sun/star/wizards/ui/WizardDialog.java   |   11 ---
 wizards/com/sun/star/wizards/ui/event/CommonListener.java   |   12 +++
 wizards/com/sun/star/wizards/ui/event/MethodInvocation.java |   44 
 4 files changed, 30 insertions(+), 49 deletions(-)

New commits:
commit 41d3adbe47610efc1e7bc848c129024a2ec19f9a
Author: Noel Grandin n...@peralex.com
Date:   Wed Nov 19 09:41:16 2014 +0200

java: simplify the CommonListener stuff

by moving the MethodInvocation to be purely an internal detail

Change-Id: Id7863261abd5ebd30b7596bac756ca5360119283
Reviewed-on: https://gerrit.libreoffice.org/13100
Reviewed-by: Noel Grandin noelgran...@gmail.com
Tested-by: Noel Grandin noelgran...@gmail.com

diff --git a/wizards/com/sun/star/wizards/ui/ImageList.java 
b/wizards/com/sun/star/wizards/ui/ImageList.java
index 0ae99b7..342f264 100644
--- a/wizards/com/sun/star/wizards/ui/ImageList.java
+++ b/wizards/com/sun/star/wizards/ui/ImageList.java
@@ -80,7 +80,6 @@ public class ImageList implements XItemEventBroadcaster, 
ListDataListener
 private final static Short HIDE_PAGE = Short.valueOf((short) 99);
 private final static Integer TRANSPARENT = Integer.valueOf(-1);
 private final static int LINE_HEIGHT = 8;
-private MethodInvocation METHOD_MOUSE_PRESSED;
 
 /** Getter for property imageSize.
  * @return Value of property imageSize.
@@ -272,15 +271,6 @@ public class ImageList implements XItemEventBroadcaster, 
ListDataListener
 
 m_aImages = new XControl[rows * cols];
 
-try
-{
-METHOD_MOUSE_PRESSED = new MethodInvocation(mousePressed, this, 
Object.class);
-}
-catch (NoSuchMethodException e)
-{
-e.printStackTrace();
-}
-
 m_imageHeight = Integer.valueOf(imageSize.Height);
 m_imageWidth = Integer.valueOf(imageSize.Width);
 
@@ -337,7 +327,7 @@ public class ImageList implements XItemEventBroadcaster, 
ListDataListener
 XWindow win = UnoRuntime.queryInterface(XWindow.class, image);
 win.addMouseListener(uiEventListener);
 win.addKeyListener(imageKeyListener);
-uiEventListener.add(imageName, EventNames.MOUSE_PRESSED, 
METHOD_MOUSE_PRESSED);
+uiEventListener.add(imageName, EventNames.MOUSE_PRESSED, 
mousePressed, this, Object.class);
 
 return image;
 }
diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.java 
b/wizards/com/sun/star/wizards/ui/WizardDialog.java
index 8b8e079..dd64b92 100644
--- a/wizards/com/sun/star/wizards/ui/WizardDialog.java
+++ b/wizards/com/sun/star/wizards/ui/WizardDialog.java
@@ -20,7 +20,6 @@ package com.sun.star.wizards.ui;
 import java.beans.*;
 
 import com.sun.star.wizards.ui.event.EventNames;
-import com.sun.star.wizards.ui.event.MethodInvocation;
 import com.sun.star.uno.UnoRuntime;
 import com.sun.star.awt.*;
 import com.sun.star.uno.AnyConverter;
@@ -241,18 +240,13 @@ public abstract class WizardDialog extends UnoDialog2 
implements VetoableChangeL
 xSSFRoadmap = 
UnoRuntime.queryInterface(XSingleServiceFactory.class, oRoadmap);
 xIndexContRoadmap = 
UnoRuntime.queryInterface(XIndexContainer.class, oRoadmap);
 
-MethodInvocation mi = new MethodInvocation(itemStateChanged, 
this, com.sun.star.awt.ItemEvent.class);
-guiEventListener.add(rdmNavi, EventNames.ITEM_CHANGED, mi);
+guiEventListener.add(rdmNavi, EventNames.ITEM_CHANGED, 
itemStateChanged, this, com.sun.star.awt.ItemEvent.class);
 xRoadmapControl = this.xDlgContainer.getControl(rdmNavi);
 xRoadmapBroadcaster = 
UnoRuntime.queryInterface(XItemEventBroadcaster.class, xRoadmapControl);
 xRoadmapBroadcaster.addItemListener(guiEventListener);
 
 Helper.setUnoPropertyValue(oRoadmap, Text, 
oWizardResource.getResText(UIConsts.RID_COMMON + 16));
 }
-catch (NoSuchMethodException ex)
-{
-Resource.showCommonResourceError(xMSF);
-}
 catch (java.lang.Exception jexception)
 {
 jexception.printStackTrace(System.err);
@@ -481,10 +475,9 @@ public abstract class WizardDialog extends UnoDialog2 
implements VetoableChangeL
 // add a window listener, to know
 // if the user used escape key to
 // close the dialog.
-MethodInvocation windowHidden = new 
MethodInvocation(windowHidden, this);
 xWindow.addWindowListener(guiEventListener);
 String dialogName = (String) 
Helper.getUnoPropertyValue(xDialogModel, PropertyNames.PROPERTY_NAME);
-guiEventListener.add(dialogName, EventNames.ACTION_PERFORMED, 
windowHidden);
+guiEventListener.add(dialogName, EventNames.ACTION_PERFORMED, 
windowHidden, this);
 
 }
 catch (java.lang.Exception jexception)
diff --git 

[Libreoffice-commits] core.git: wizards/com

2014-10-14 Thread Noel Grandin
 wizards/com/sun/star/wizards/common/ConfigGroup.java | 
   4 
 wizards/com/sun/star/wizards/common/ConfigSet.java   | 
  10 -
 wizards/com/sun/star/wizards/common/Configuration.java   | 
  10 -
 wizards/com/sun/star/wizards/common/Desktop.java | 
  21 --
 wizards/com/sun/star/wizards/common/FileAccess.java  | 
  73 --
 wizards/com/sun/star/wizards/common/Helper.java  | 
   1 
 wizards/com/sun/star/wizards/common/JavaTools.java   | 
  22 ---
 wizards/com/sun/star/wizards/common/NumberFormatter.java | 
  12 -
 wizards/com/sun/star/wizards/common/NumericalHelper.java | 
  24 ---
 wizards/com/sun/star/wizards/common/PropertySetHelper.java   | 
   1 
 wizards/com/sun/star/wizards/common/Resource.java| 
   3 
 wizards/com/sun/star/wizards/common/SystemDialog.java| 
  20 --
 wizards/com/sun/star/wizards/common/UCB.java | 
   9 -
 wizards/com/sun/star/wizards/db/CommandMetaData.java | 
   9 -
 wizards/com/sun/star/wizards/db/DBMetaData.java  | 
   4 
 wizards/com/sun/star/wizards/db/TableDescriptor.java | 
  10 -
 wizards/com/sun/star/wizards/db/TypeInspector.java   | 
   2 
 wizards/com/sun/star/wizards/document/Control.java   | 
   5 
 wizards/com/sun/star/wizards/document/FormHandler.java   | 
  27 ---
 wizards/com/sun/star/wizards/document/OfficeDocument.java| 
   1 
 wizards/com/sun/star/wizards/report/IReportBuilderLayouter.java  | 
   9 -
 wizards/com/sun/star/wizards/report/IReportDefinitionReadAccess.java | 
   1 
 wizards/com/sun/star/wizards/report/IReportDocument.java | 
  30 
 wizards/com/sun/star/wizards/report/ReportImplementationHelper.java  | 
   4 
 wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java  | 
   1 
 wizards/com/sun/star/wizards/reportbuilder/layout/DesignTemplate.java| 
   4 
 wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java | 
   4 
 wizards/com/sun/star/wizards/reportbuilder/layout/SectionLabel.java  | 
   1 
 wizards/com/sun/star/wizards/table/CallTableWizard.java  | 
   1 
 wizards/com/sun/star/wizards/text/TextDocument.java  | 
   2 
 wizards/com/sun/star/wizards/text/TextFieldHandler.java  | 
   2 
 wizards/com/sun/star/wizards/ui/ButtonList.java  | 
  50 --
 wizards/com/sun/star/wizards/ui/CommandFieldSelection.java   | 
  17 --
 wizards/com/sun/star/wizards/ui/FilterComponent.java | 
   9 -
 wizards/com/sun/star/wizards/ui/ImageList.java   | 
  10 -
 wizards/com/sun/star/wizards/ui/PeerConfig.java  | 
  15 --
 wizards/com/sun/star/wizards/ui/SortingComponent.java| 
   2 
 wizards/com/sun/star/wizards/ui/UnoDialog.java   | 
  21 --
 wizards/com/sun/star/wizards/ui/WizardDialog.java| 
  36 
 wizards/com/sun/star/wizards/ui/event/DataAware.java | 
   1 
 wizards/com/sun/star/wizards/ui/event/DataAwareFields.java   | 
   5 
 wizards/com/sun/star/wizards/ui/event/TaskEvent.java | 
   5 
 wizards/com/sun/star/wizards/ui/event/TaskListener.java  | 
   1 
 43 files changed, 25 insertions(+), 474 deletions(-)

New commits:
commit 959f7f2b7de87f75e83068efaeebe07d5c2be4ac
Author: Noel Grandin n...@peralex.com
Date:   Tue Oct 14 15:41:30 2014 +0200

java: remove useless javadoc tags

Change-Id: I83c59418c9eb32984dd5a2105e3d729e400520a4

diff --git a/wizards/com/sun/star/wizards/common/ConfigGroup.java 
b/wizards/com/sun/star/wizards/common/ConfigGroup.java
index 0a71af2..c9ae076 100644
--- a/wizards/com/sun/star/wizards/common/ConfigGroup.java
+++ b/wizards/com/sun/star/wizards/common/ConfigGroup.java
@@ -65,12 +65,10 @@ public class ConfigGroup implements ConfigNode
 }
 
 /**
- * convert the primitive type value of the
+ * Convert the primitive type value of the
  * given Field object to the corresponding
  * Java Object value.
- * @param field
  * @return the value of the field as a Object.
- * @throws IllegalAccessException
  */
 public Object convertValue(Field field) throws IllegalAccessException
 {
diff --git a/wizards/com/sun/star/wizards/common/ConfigSet.java 
b/wizards/com/sun/star/wizards/common/ConfigSet.java
index 2e97984..9b8b647 100644
--- 

[Libreoffice-commits] core.git: wizards/com

2014-10-14 Thread Robert Antoni Buj i Gelonch
 wizards/com/sun/star/wizards/ui/UIConsts.java |   56 +-
 wizards/com/sun/star/wizards/ui/event/EventNames.java |   31 -
 2 files changed, 43 insertions(+), 44 deletions(-)

New commits:
commit cdecac849b2aaf8314f3cb2046f70b3b436519a7
Author: Robert Antoni Buj i Gelonch robert@gmail.com
Date:   Tue Oct 14 16:08:30 2014 +0200

rm ‘public static final’ modifiers from field declarations within 
interfaces

Change-Id: I2154052f89787b6fe17edb2f6e6ea132347b3d13
Reviewed-on: https://gerrit.libreoffice.org/11971
Reviewed-by: Noel Grandin noelgran...@gmail.com
Tested-by: Noel Grandin noelgran...@gmail.com

diff --git a/wizards/com/sun/star/wizards/ui/UIConsts.java 
b/wizards/com/sun/star/wizards/ui/UIConsts.java
index 9c4d77c..0d2e956 100644
--- a/wizards/com/sun/star/wizards/ui/UIConsts.java
+++ b/wizards/com/sun/star/wizards/ui/UIConsts.java
@@ -21,41 +21,41 @@ package com.sun.star.wizards.ui;
 public interface UIConsts
 {
 
-public static final int RID_COMMON = 500;
-public static final int RID_DB_COMMON = 1000;
-public static final int RID_FORM = 2200;
-public static final int RID_QUERY = 2300;
-public static final int RID_REPORT = 2400;
-public static final int RID_TABLE = 2600;
-public static final int RID_IMG_REPORT = 1000;
-public static final int RID_IMG_FORM = 1100;
-public static final int RID_IMG_WEB = 1200;
-public static final Integer INVISIBLESTEP = 99;
-public static final String INFOIMAGEURL = 
private:resource/dbu/image/19205;
-public static final String INFOIMAGEURL_HC = 
private:resource/dbu/image/19230;
+int RID_COMMON = 500;
+int RID_DB_COMMON = 1000;
+int RID_FORM = 2200;
+int RID_QUERY = 2300;
+int RID_REPORT = 2400;
+int RID_TABLE = 2600;
+int RID_IMG_REPORT = 1000;
+int RID_IMG_FORM = 1100;
+int RID_IMG_WEB = 1200;
+Integer INVISIBLESTEP = 99;
+String INFOIMAGEURL = private:resource/dbu/image/19205;
+String INFOIMAGEURL_HC = private:resource/dbu/image/19230;
 /**
  * The tabindex of the navigation buttons in a wizard must be assigned a 
very
  * high tabindex because on every step their taborder must appear at the 
end
  */
-public static final short SOFIRSTWIZARDNAVITABINDEX = 3;
-public static final Integer INTEGER_8 = 8;
-public static final Integer INTEGER_12 = 12;
-public static final Integer INTEGER_14 = 14;
-public static final Integer INTEGER_16 = 16;
-public static final Integer INTEGER_40 = 40;
-public static final Integer INTEGER_50 = 50;
+short SOFIRSTWIZARDNAVITABINDEX = 3;
+Integer INTEGER_8 = 8;
+Integer INTEGER_12 = 12;
+Integer INTEGER_14 = 14;
+Integer INTEGER_16 = 16;
+Integer INTEGER_40 = 40;
+Integer INTEGER_50 = 50;
 /**Steps of the QueryWizard
  *
  */
-public static final int SOFIELDSELECTIONPAGE = 1;
-public static final int SOSORTINGPAGE = 2;
-public static final int SOFILTERPAGE = 3;
-public static final int SOAGGREGATEPAGE = 4;
-public static final int SOGROUPSELECTIONPAGE = 5;
-public static final int SOGROUPFILTERPAGE = 6;
-public static final int SOTITLESPAGE = 7;
-public static final int SOSUMMARYPAGE = 8;
-public static final Integer[] INTEGERS = new Integer[]
+int SOFIELDSELECTIONPAGE = 1;
+int SOSORTINGPAGE = 2;
+int SOFILTERPAGE = 3;
+int SOAGGREGATEPAGE = 4;
+int SOGROUPSELECTIONPAGE = 5;
+int SOGROUPFILTERPAGE = 6;
+int SOTITLESPAGE = 7;
+int SOSUMMARYPAGE = 8;
+Integer[] INTEGERS = new Integer[]
 {
 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
 };
diff --git a/wizards/com/sun/star/wizards/ui/event/EventNames.java 
b/wizards/com/sun/star/wizards/ui/event/EventNames.java
index fbb733f..e49ee30 100644
--- a/wizards/com/sun/star/wizards/ui/event/EventNames.java
+++ b/wizards/com/sun/star/wizards/ui/event/EventNames.java
@@ -19,21 +19,20 @@ package com.sun.star.wizards.ui.event;
 
 public interface EventNames
 {
-
 //common listener events
-public static final String EVENT_ACTION_PERFORMED = APR;
-public static final String EVENT_ITEM_CHANGED = ICH;
-public static final String EVENT_TEXT_CHANGED = TCH;//window events 
(XWindow)
-public static final String EVENT_WINDOW_RESIZED = WRE;
-public static final String EVENT_WINDOW_MOVED = WMO;
-public static final String EVENT_WINDOW_SHOWN = WSH;
-public static final String EVENT_WINDOW_HIDDEN = WHI;//focus events 
(XWindow)
-public static final String EVENT_FOCUS_GAINED = FGA;
-public static final String EVENT_FOCUS_LOST = FLO;//keyboard events
-public static final String EVENT_KEY_PRESSED = KPR;
-public static final String EVENT_KEY_RELEASED = KRE;//mouse events
-public static final String EVENT_MOUSE_PRESSED = MPR;
-public static final String EVENT_MOUSE_RELEASED = MRE;
-public static final String 

[Libreoffice-commits] core.git: wizards/com

2014-09-24 Thread Ryan McCoskrie
 wizards/com/sun/star/wizards/form/FormWizard.java |   26 --
 1 file changed, 5 insertions(+), 21 deletions(-)

New commits:
commit 86d05eea4578c58be8e4b7b8f3a365238bf22e02
Author: Ryan McCoskrie ryan.mccosk...@gmail.com
Date:   Sun Sep 21 14:33:53 2014 +1200

Removed uneeded checks.

Change-Id: I9fd008f0265f195a8069526cea22a288ff6238f7
Reviewed-on: https://gerrit.libreoffice.org/11562
Reviewed-by: Samuel Mehrbrodt s.mehrbr...@gmail.com
Tested-by: Samuel Mehrbrodt s.mehrbr...@gmail.com

diff --git a/wizards/com/sun/star/wizards/form/FormWizard.java 
b/wizards/com/sun/star/wizards/form/FormWizard.java
index eda3821..c6cba67 100644
--- a/wizards/com/sun/star/wizards/form/FormWizard.java
+++ b/wizards/com/sun/star/wizards/form/FormWizard.java
@@ -78,10 +78,8 @@ public class FormWizard extends DatabaseObjectWizard
 210, Boolean.TRUE, DialogForm, 102, 41, 1, new 
Short((short) 0), m_oResource.getResText(UIConsts.RID_FORM), 310
 });
 drawNaviBar();
-if (getFormResources())
-{
-setRightPaneHeaders(m_oResource, UIConsts.RID_FORM + 90, 8);
-}
+getFormResources();
+setRightPaneHeaders(m_oResource, UIConsts.RID_FORM + 90, 8);
 }
 
 public static void main(String i_args[])
@@ -175,13 +173,7 @@ public class FormWizard extends DatabaseObjectWizard
 
curFormDocument.oMainFormDBMetaData.initializeFieldColumns(true, sTableName, 
aFieldNames);
 
 final String[] aMainFieldNames = 
curFormDocument.oMainFormDBMetaData.getFieldNames();
-try
-{
-curFormDocument.LinkFieldNames = 
JavaTools.removeOutdatedFields(curFormDocument.LinkFieldNames, aMainFieldNames, 
1);
-}
-catch (java.lang.Exception e)
-{
-}
+curFormDocument.LinkFieldNames = 
JavaTools.removeOutdatedFields(curFormDocument.LinkFieldNames, aMainFieldNames, 
1);
 }
 break;
 case SOSUBFORM_PAGE:
@@ -193,13 +185,7 @@ public class FormWizard extends DatabaseObjectWizard
 
curFormDocument.oSubFormDBMetaData.initializeFieldColumns(true, sTableName, 
aFieldNames);
 
 final String[] aSubFieldNames = 
curFormDocument.oSubFormDBMetaData.getFieldNames();
-try
-{
-curFormDocument.LinkFieldNames = 
JavaTools.removeOutdatedFields(curFormDocument.LinkFieldNames, aSubFieldNames, 
0);
-}
-catch (java.lang.Exception e)
-{
-}
+curFormDocument.LinkFieldNames = 
JavaTools.removeOutdatedFields(curFormDocument.LinkFieldNames, aSubFieldNames, 
0);
 }
 break;
 case SOFIELDLINKER_PAGE:
@@ -370,15 +356,13 @@ public class FormWizard extends DatabaseObjectWizard
 }
 }
 
-private boolean getFormResources()
+private void getFormResources()
 {
 sShowBinaryFields = m_oResource.getResText(UIConsts.RID_FORM + 2);
 slblTables = m_oResource.getResText(UIConsts.RID_FORM + 6);
 slblFields = m_oResource.getResText(UIConsts.RID_FORM + 12);
 slblSelFields = m_oResource.getResText(UIConsts.RID_FORM + 1);
 serrFormNameexists = m_oResource.getResText(UIConsts.RID_FORM + 98);
-
-return true;
 }
 
 public class FieldSelectionListener implements 
com.sun.star.wizards.ui.XFieldSelectionListener
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com wizards/Jar_commonwizards.mk

2014-09-22 Thread Noel Grandin
 wizards/Jar_commonwizards.mk | 
   1 
 wizards/com/sun/star/wizards/common/ConfigGroup.java | 
   6 
 wizards/com/sun/star/wizards/common/ConfigNode.java  | 
   6 
 wizards/com/sun/star/wizards/common/ConfigSet.java   | 
   2 
 wizards/com/sun/star/wizards/common/Configuration.java   | 
 102 -
 wizards/com/sun/star/wizards/common/DebugHelper.java | 
   6 
 wizards/com/sun/star/wizards/common/Desktop.java | 
 201 +-
 wizards/com/sun/star/wizards/common/FileAccess.java  | 
 464 
 wizards/com/sun/star/wizards/common/Helper.java  | 
 102 -
 wizards/com/sun/star/wizards/common/IRenderer.java   | 
   2 
 wizards/com/sun/star/wizards/common/Indexable.java   | 
   2 
 wizards/com/sun/star/wizards/common/JavaTools.java   | 
 163 +
 wizards/com/sun/star/wizards/common/NamedValueCollection.java| 
  20 
 wizards/com/sun/star/wizards/common/NumberFormatter.java | 
  47 
 wizards/com/sun/star/wizards/common/NumericalHelper.java | 
 980 +-
 wizards/com/sun/star/wizards/common/ParaStyled.java  | 
   4 
 wizards/com/sun/star/wizards/common/PlaceholderTextElement.java  | 
  14 
 wizards/com/sun/star/wizards/common/Properties.java  | 
   4 
 wizards/com/sun/star/wizards/common/PropertyNames.java   | 
   2 
 wizards/com/sun/star/wizards/common/PropertySetHelper.java   | 
 124 +
 wizards/com/sun/star/wizards/common/Resource.java| 
  25 
 wizards/com/sun/star/wizards/common/SystemDialog.java| 
 105 -
 wizards/com/sun/star/wizards/common/TemplateElement.java | 
   2 
 wizards/com/sun/star/wizards/common/TextElement.java | 
   1 
 wizards/com/sun/star/wizards/common/UCB.java | 
  17 
 wizards/com/sun/star/wizards/common/XMLProvider.java | 
   2 
 wizards/com/sun/star/wizards/db/BlindtextCreator.java| 
  12 
 wizards/com/sun/star/wizards/db/ColumnPropertySet.java   | 
  16 
 wizards/com/sun/star/wizards/db/CommandMetaData.java | 
 146 +
 wizards/com/sun/star/wizards/db/CommandName.java | 
  27 
 wizards/com/sun/star/wizards/db/DBMetaData.java  | 
  69 
 wizards/com/sun/star/wizards/db/FieldColumn.java | 
  18 
 wizards/com/sun/star/wizards/db/QueryMetaData.java   | 
  38 
 wizards/com/sun/star/wizards/db/RecordParser.java| 
  23 
 wizards/com/sun/star/wizards/db/SQLQueryComposer.java| 
  43 
 wizards/com/sun/star/wizards/db/TableDescriptor.java | 
  71 
 wizards/com/sun/star/wizards/db/TypeInspector.java   | 
  48 
 wizards/com/sun/star/wizards/document/Control.java   | 
  42 
 wizards/com/sun/star/wizards/document/DatabaseControl.java   | 
  14 
 wizards/com/sun/star/wizards/document/FormHandler.java   | 
 147 +
 wizards/com/sun/star/wizards/document/GridControl.java   | 
   7 
 wizards/com/sun/star/wizards/document/OfficeDocument.java| 
 165 +
 wizards/com/sun/star/wizards/document/Shape.java | 
   4 
 wizards/com/sun/star/wizards/document/TimeStampControl.java  | 
  28 
 wizards/com/sun/star/wizards/form/CallFormWizard.java| 
  31 
 wizards/com/sun/star/wizards/form/DataEntrySetter.java   | 
  21 
 wizards/com/sun/star/wizards/form/FieldLinker.java   | 
  19 
 wizards/com/sun/star/wizards/form/Finalizer.java | 
  27 
 wizards/com/sun/star/wizards/form/FormConfiguration.java | 
  98 -
 wizards/com/sun/star/wizards/form/FormControlArranger.java   | 
  25 
 wizards/com/sun/star/wizards/form/FormDocument.java  | 
  65 
 wizards/com/sun/star/wizards/form/FormWizard.java| 
  26 
 wizards/com/sun/star/wizards/form/StyleApplier.java  | 
 108 -
 wizards/com/sun/star/wizards/form/UIControlArranger.java | 
  41 
 wizards/com/sun/star/wizards/query/CallQueryWizard.java  | 
  12 
 wizards/com/sun/star/wizards/query/Finalizer.java| 
  20 
 wizards/com/sun/star/wizards/query/QuerySummary.java | 
  16 
 

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

2014-09-15 Thread Jennifer Liebel
 wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py  |   10 +-
 wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.py |   31 
++-
 wizards/source/formwizard/dbwizres.src |   40 
++
 3 files changed, 72 insertions(+), 9 deletions(-)

New commits:
commit 721f1eca1856ab42d1752bca22c87d87713cf1e7
Author: Jennifer Liebel jliebe...@gmail.com
Date:   Fri Sep 12 07:22:06 2014 +

fdo#75107: make colors and styles localizable in Agenda Wizard

Change-Id: I231370da5ee7185888ec95ba1fb64f678a7c8ea3
Reviewed-on: https://gerrit.libreoffice.org/11412
Reviewed-by: Andras Timar andras.ti...@collabora.com
Tested-by: Andras Timar andras.ti...@collabora.com

diff --git a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py 
b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py
index 99aced7..ede7aaa 100644
--- a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py
+++ b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py
@@ -74,7 +74,7 @@ class AgendaWizardDialogImpl(AgendaWizardDialog):
 self.myAgendaDoc = AgendaDocument(
 self.xMSF, self.agenda, self.resources,
 self.templateConsts, self.terminateListener)
-self.initializeTemplates()
+self.initializeTemplates()
 
 self.myAgendaDoc.load(
 self.agendaTemplates[1][self.agenda.cp_AgendaType])
@@ -187,7 +187,7 @@ class AgendaWizardDialogImpl(AgendaWizardDialog):
 RadioDataAware.attachRadioButtons(
 self.agenda, cp_ProceedMethod,
 (self.optCreateAgenda, self.optMakeChanges), True).updateUI()
-
+
 def insertRoadmap(self):
 self.addRoadmap()
 self.insertRoadMapItems(
@@ -204,7 +204,7 @@ class AgendaWizardDialogImpl(AgendaWizardDialog):
 try:
 sAgendaPath = self.sTemplatePath + /wizard/agenda
 self.agendaTemplates = FileAccess.getFolderTitles(
-self.xMSF, aw, sAgendaPath)
+self.xMSF, aw, sAgendaPath, self.resources.dictPageDesign)
 return True
 except NoValidPathException:
 traceback.print_exc()
@@ -311,7 +311,7 @@ class AgendaWizardDialogImpl(AgendaWizardDialog):
 # user said: no, do not overwrite
 endWizard = False
 return False
-
+
 xDocProps = self.myAgendaDoc.xTextDocument.DocumentProperties
 xDocProps.Title = self.txtTemplateName.Text
 self.myAgendaDoc.setWizardTemplateDocInfo( \
@@ -372,7 +372,7 @@ class AgendaWizardDialogImpl(AgendaWizardDialog):
 def drawConstants(self):
 '''Localise the template'''
 constRangeList = self.myAgendaDoc.searchFillInItems(1)
-
+
 for i in constRangeList:
 text = i.String.lower()
 aux = TextElement(i, self.resources.dictConstants[text])
diff --git a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.py 
b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.py
index 4f2fe2b..292059c 100644
--- a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.py
+++ b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.py
@@ -17,7 +17,7 @@
 #
 
 class AgendaWizardDialogResources(object):
-
+
 RID_AGENDAWIZARDDIALOG_START = 5000
 RID_AGENDAWIZARDROADMAP_START = 5049
 RID_COMMON_START = 500
@@ -153,7 +153,7 @@ class AgendaWizardDialogResources(object):
 self.resButtonUp = oWizardResource.getResText(
 AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 70)
 self.resButtonDown = oWizardResource.getResText(
-AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 71) 
   
+AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 71)
 
 #Create a dictionary for localised string in the template
 self.dictConstants = {
@@ -188,11 +188,34 @@ class AgendaWizardDialogResources(object):
 #deadline# : oWizardResource.getResText(
 AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 86)}
 
+#Create a dictionary for localising the page design
+self.dictPageDesign = {
+Blue : oWizardResource.getResText(
+AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 87),
+Classic : oWizardResource.getResText(
+AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 88),
+Colorful : oWizardResource.getResText(
+AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 89),
+Elegant : oWizardResource.getResText(
+AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 90),
+Green : oWizardResource.getResText(
+AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 91),
+Grey : 

[Libreoffice-commits] core.git: wizards/com

2014-09-14 Thread Ryan McCoskrie
 wizards/com/sun/star/wizards/README |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 3327bf17571aed98abcdd565aac523141c009c5f
Author: Ryan McCoskrie ryan.mccosk...@gmail.com
Date:   Sun Sep 14 16:23:55 2014 +1200

Updated example paths in wizards/com/sun/star/wizards/README

Change-Id: I5bd14f81c5eefc2227662605d6ccb107254c53df
Reviewed-on: https://gerrit.libreoffice.org/11440
Reviewed-by: Noel Grandin noelgran...@gmail.com
Tested-by: Noel Grandin noelgran...@gmail.com

diff --git a/wizards/com/sun/star/wizards/README 
b/wizards/com/sun/star/wizards/README
index 2d7bcbc..9ee2840 100644
--- a/wizards/com/sun/star/wizards/README
+++ b/wizards/com/sun/star/wizards/README
@@ -1,8 +1,8 @@
 To call a wizard remotely you need to:
 
 - For testing on core:
-export 
URE_BOOTSTRAP=file:///home/'USER'/git/libo/install/program/fundamentalrc
-export PYTHONPATH=/home/'USER'/git/libo/install/program
+export 
URE_BOOTSTRAP=file:///home/'USER'/libreoffice-core/instdir/program/fundamentalrc
+export PYTHONPATH=/home/'USER'/libreoffice-core/instdir/program
 #and run LibreOffice in listening mode:
 ./soffice --accept=socket,host=localhost,port=2002;urp;
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2014-09-10 Thread rbuj
 wizards/com/sun/star/wizards/form/StyleApplier.java   |2 +-
 wizards/com/sun/star/wizards/report/ReportTextImplementation.java |2 +-
 wizards/com/sun/star/wizards/ui/FilterComponent.java  |2 +-
 wizards/com/sun/star/wizards/ui/ImageList.java|2 +-
 wizards/com/sun/star/wizards/ui/event/DataAwareFields.java|2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 10e8e10605b9c52bd7fd8a0665dd4d358c733a66
Author: rbuj robert@gmail.com
Date:   Tue Sep 9 16:29:01 2014 +0200

wizards: Number Parsing

Change-Id: Ic8d9c97ee6bc48c8440c27c5ae4fc9bb20fa5acd
Reviewed-on: https://gerrit.libreoffice.org/11359
Reviewed-by: Noel Grandin noelgran...@gmail.com
Tested-by: Noel Grandin noelgran...@gmail.com

diff --git a/wizards/com/sun/star/wizards/form/StyleApplier.java 
b/wizards/com/sun/star/wizards/form/StyleApplier.java
index 2cd30ff..dfb5c8a 100644
--- a/wizards/com/sun/star/wizards/form/StyleApplier.java
+++ b/wizards/com/sun/star/wizards/form/StyleApplier.java
@@ -224,7 +224,7 @@ public class StyleApplier
 {
 sPropValue = 
JavaTools.replaceSubString(sPropValue, PropertyNames.EMPTY_STRING, 
PropertyNames.SEMI_COLON);
 sPropValue = 
JavaTools.replaceSubString(sPropValue, PropertyNames.EMPTY_STRING, 
PropertyNames.SPACE);
-return Integer.decode(sPropValue).intValue();
+return Integer.parseInt(sPropValue);
 }
 }
 }
diff --git a/wizards/com/sun/star/wizards/report/ReportTextImplementation.java 
b/wizards/com/sun/star/wizards/report/ReportTextImplementation.java
index ee477c4..efc8402 100644
--- a/wizards/com/sun/star/wizards/report/ReportTextImplementation.java
+++ b/wizards/com/sun/star/wizards/report/ReportTextImplementation.java
@@ -240,7 +240,7 @@ public class ReportTextImplementation extends 
ReportImplementationHelper impleme
 }
 getRecordParser().setRecordFieldNames(sNewList);
 getRecordParser().GroupFieldNames = 
JavaTools.ArrayoutofString(sGroupFieldNames, PropertyNames.SEMI_COLON);
-int nOrigCommandType = 
Integer.valueOf(sCommandType).intValue();
+int nOrigCommandType = Integer.parseInt(sCommandType);
 getRecordParser().setCommandType(nOrigCommandType);
 
 sMsgQueryCreationImpossible = 
JavaTools.replaceSubString(sMsgQueryCreationImpossible, 
getRecordParser().Command, STATEMENT);
diff --git a/wizards/com/sun/star/wizards/ui/FilterComponent.java 
b/wizards/com/sun/star/wizards/ui/FilterComponent.java
index 3a2b78b..4c67f0b 100644
--- a/wizards/com/sun/star/wizards/ui/FilterComponent.java
+++ b/wizards/com/sun/star/wizards/ui/FilterComponent.java
@@ -189,7 +189,7 @@ public class FilterComponent
  */
 private void togglefollowingControlRow(String _scurName)
 {
-int Index = Integer.valueOf(getIndexNumber(_scurName)).intValue();
+int Index = Integer.parseInt(getIndexNumber(_scurName));
 if (Index  oControlRows.length)
 {
 boolean bValue = oControlRows[Index - 1].isConditionComplete();
diff --git a/wizards/com/sun/star/wizards/ui/ImageList.java 
b/wizards/com/sun/star/wizards/ui/ImageList.java
index 78c19ea..35c301d 100644
--- a/wizards/com/sun/star/wizards/ui/ImageList.java
+++ b/wizards/com/sun/star/wizards/ui/ImageList.java
@@ -763,7 +763,7 @@ public class ImageList implements XItemEventBroadcaster, 
ListDataListener
 {
 Object image = ((EventObject) event).Source;
 String controlName = (String) 
Helper.getUnoPropertyValue(getModel(image), PropertyNames.PROPERTY_NAME);
-return Integer.valueOf(controlName.substring(6 + 
name.length())).intValue();
+return Integer.parseInt(controlName.substring(6 + name.length()));
 
 }
 
diff --git a/wizards/com/sun/star/wizards/ui/event/DataAwareFields.java 
b/wizards/com/sun/star/wizards/ui/event/DataAwareFields.java
index c36e8b7..5df239a 100644
--- a/wizards/com/sun/star/wizards/ui/event/DataAwareFields.java
+++ b/wizards/com/sun/star/wizards/ui/event/DataAwareFields.java
@@ -420,7 +420,7 @@ public class DataAwareFields
 }
 else if (value instanceof String)
 {
-return Double.valueOf((String) value).doubleValue();
+return Double.parseDouble((String) value);
 }
 else if (value instanceof short[])
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2014-09-09 Thread Noel Grandin
 wizards/com/sun/star/wizards/report/CallReportWizard.java |  247 --
 1 file changed, 143 insertions(+), 104 deletions(-)

New commits:
commit 1d62f6a24f6160c33ad5c96f39b2ab3c918f0625
Author: Noel Grandin n...@peralex.com
Date:   Tue Sep 9 14:01:15 2014 +0200

fix accidental removal of Java wizard code

in commit 34bcf9b498bccb5c java: remove dead methods

Change-Id: Id6d15248f0410a78afa803a72ba3ff0b6a8e7635

diff --git a/wizards/com/sun/star/wizards/report/CallReportWizard.java 
b/wizards/com/sun/star/wizards/report/CallReportWizard.java
index d6e3881..0126794 100644
--- a/wizards/com/sun/star/wizards/report/CallReportWizard.java
+++ b/wizards/com/sun/star/wizards/report/CallReportWizard.java
@@ -27,142 +27,181 @@ import com.sun.star.wizards.common.PropertyNames;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
-/** This class implements the component. At least the interfaces XServiceInfo,
- * XTypeProvider, and XInitialization should be provided by the service.
+/** This class capsulates the class, that implements the minimal component, a
+ * factory for creating the service (CODE__getServiceFactory/CODE).
  */
 public class CallReportWizard
-  extends com.sun.star.lib.uno.helper.PropertySet implements 
com.sun.star.lang.XInitialization, com.sun.star.lang.XServiceInfo, 
com.sun.star.task.XJobExecutor
 {
 
-private static boolean bWizardStartedAlready;
-
-/** The service name, that must be used to get an instance of this service.
- */
-private static final String __serviceName = 
com.sun.star.wizards.report.CallReportWizard;
-
-private PropertyValue[] m_wizardContext;
-
-/** The constructor of the inner class has a XMultiServiceFactory 
parameter.
- * @param xmultiservicefactoryInitialization A special service factory
- * could be introduced while initializing.
+private static boolean bWizardstartedalready;
+
+/** Gives a factory for creating the service.
+ * This method is called by the codeJavaLoader/code
+ * p
+ * @return Returns a codeXSingleServiceFactory/code for creating the 
component.
+ * @see com.sun.star.comp.loader.JavaLoader
+ * @param stringImplementationName The implementation name of the 
component.
+ * @param xMSF The service manager, who gives access to every known 
service.
+ * @param xregistrykey Makes structural information (except regarding 
treestructures) of a single
+ *registry key accessible.
  */
-public CallReportWizard(com.sun.star.lang.XMultiServiceFactory 
xmultiservicefactoryInitialization)
+public static com.sun.star.lang.XSingleServiceFactory 
__getServiceFactory(String stringImplementationName, 
com.sun.star.lang.XMultiServiceFactory xMSF, com.sun.star.registry.XRegistryKey 
xregistrykey)
 {
-super();
-xmultiservicefactory = xmultiservicefactoryInitialization;
+com.sun.star.lang.XSingleServiceFactory xsingleservicefactory = null;
+if (stringImplementationName.equals(
+ReportWizardImplementation.class.getName()))
+{
+xsingleservicefactory = 
com.sun.star.comp.loader.FactoryHelper.getServiceFactory(
+ReportWizardImplementation.class,
+ReportWizardImplementation.__serviceName,
+xMSF,
+xregistrykey);
+}
+return xsingleservicefactory;
 }
 
-public void trigger(String sEvent)
+/** This class implements the component. At least the interfaces 
XServiceInfo,
+ * XTypeProvider, and XInitialization should be provided by the service.
+ */
+private static class ReportWizardImplementation extends 
com.sun.star.lib.uno.helper.PropertySet implements 
com.sun.star.lang.XInitialization, com.sun.star.lang.XServiceInfo, 
com.sun.star.task.XJobExecutor
 {
-try
+
+private PropertyValue[] m_wizardContext;
+
+/** The constructor of the inner class has a XMultiServiceFactory 
parameter.
+ * @param xmultiservicefactoryInitialization A special service factory
+ * could be introduced while initializing.
+ */
+public 
ReportWizardImplementation(com.sun.star.lang.XMultiServiceFactory 
xmultiservicefactoryInitialization)
 {
-if (sEvent.equals(PropertyNames.START))
+super();
+xmultiservicefactory = xmultiservicefactoryInitialization;
+}
+
+public void trigger(String sEvent)
+{
+try
 {
-if (!bWizardStartedAlready)
+if (sEvent.equals(PropertyNames.START))
 {
-ReportWizard CurReportWizard = new ReportWizard( 
xmultiservicefactory, m_wizardContext );
-CurReportWizard.startReportWizard();
+if (!bWizardstartedalready)
+{
+ReportWizard CurReportWizard = new ReportWizard( 

[Libreoffice-commits] core.git: wizards/com

2014-09-09 Thread rbuj
 wizards/com/sun/star/wizards/common/FileAccess.java  | 
   6 +++---
 wizards/com/sun/star/wizards/form/StyleApplier.java  | 
   6 +++---
 wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java | 
   2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit baa6bb9621f604669d09ba7a7f21c16d46430194
Author: rbuj robert@gmail.com
Date:   Tue Sep 9 16:34:41 2014 +0200

wizards: use a character literal

Change-Id: I22d530e0feb9e3112b4f2e7548d6335235713247
Reviewed-on: https://gerrit.libreoffice.org/11360
Reviewed-by: Thomas Arnhold tho...@arnhold.org
Tested-by: Thomas Arnhold tho...@arnhold.org

diff --git a/wizards/com/sun/star/wizards/common/FileAccess.java 
b/wizards/com/sun/star/wizards/common/FileAccess.java
index 12d4d4d..58af791 100644
--- a/wizards/com/sun/star/wizards/common/FileAccess.java
+++ b/wizards/com/sun/star/wizards/common/FileAccess.java
@@ -515,7 +515,7 @@ public class FileAccess
  */
 private static String getExtension(String filename)
 {
-int p = filename.indexOf(.);
+int p = filename.indexOf('.');
 if (p == -1)
 {
 return PropertyNames.EMPTY_STRING;
@@ -526,7 +526,7 @@ public class FileAccess
 {
 filename = filename.substring(p + 1);
 }
-while ((p = filename.indexOf(.))  -1);
+while ((p = filename.indexOf('.'))  -1);
 }
 return filename;
 }
@@ -588,7 +588,7 @@ public class FileAccess
 }
 int pos = -1;
 int lastPos = 0;
-while ((pos = url.indexOf(/, pos + 1))  -1)
+while ((pos = url.indexOf('/', pos + 1))  -1)
 {
 lastPos = pos;
 }
diff --git a/wizards/com/sun/star/wizards/form/StyleApplier.java 
b/wizards/com/sun/star/wizards/form/StyleApplier.java
index 8236782..2cd30ff 100644
--- a/wizards/com/sun/star/wizards/form/StyleApplier.java
+++ b/wizards/com/sun/star/wizards/form/StyleApplier.java
@@ -210,17 +210,17 @@ public class StyleApplier
 if (index  -1)
 {
 String sPropName = PropertyNames.EMPTY_STRING;
-while (((sPropName.indexOf(})  0)  (index  _sDataList.length 
- 1)))
+while (((sPropName.indexOf('}')  0)  (index  _sDataList.length 
- 1)))
 {
 String scurline = _sDataList[index++];
 if ((scurline.indexOf(_sPropertyDescription))  0)
 {
-if (scurline.indexOf(:)  0)
+if (scurline.indexOf(':')  0)
 {
 String[] sPropList = 
JavaTools.ArrayoutofString(scurline, :);
 String sPropValue = sPropList[1];
 sPropValue = sPropValue.trim();
-if (sPropValue.indexOf(#)  -1)
+if (sPropValue.indexOf('#')  -1)
 {
 sPropValue = 
JavaTools.replaceSubString(sPropValue, PropertyNames.EMPTY_STRING, 
PropertyNames.SEMI_COLON);
 sPropValue = 
JavaTools.replaceSubString(sPropValue, PropertyNames.EMPTY_STRING, 
PropertyNames.SPACE);
diff --git 
a/wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java 
b/wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java
index 93947e2..8c8175b 100644
--- 
a/wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java
+++ 
b/wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java
@@ -698,7 +698,7 @@ abstract public class ReportBuilderLayouter implements 
IReportBuilderLayouter
 {
 if (_sName.startsWith(field:[))
 {
-int nCloseBrace = _sName.lastIndexOf(]);
+int nCloseBrace = _sName.lastIndexOf(']');
 return _sName.substring(7, nCloseBrace).trim();
 }
 return _sName;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2014-09-02 Thread rbuj
 wizards/com/sun/star/wizards/common/ConfigNode.java |6 ++--
 wizards/com/sun/star/wizards/common/Configuration.java  |   16 ++--
 wizards/com/sun/star/wizards/common/NumberFormatter.java|4 +--
 wizards/com/sun/star/wizards/ui/UnoDialog2.java |   10 +++
 wizards/com/sun/star/wizards/ui/event/AbstractListener.java |4 +--
 wizards/com/sun/star/wizards/ui/event/MethodInvocation.java |   14 +-
 6 files changed, 27 insertions(+), 27 deletions(-)

New commits:
commit f09d060b1b3c053ec08ff02e51db39230623bcd1
Author: rbuj robert@gmail.com
Date:   Mon Sep 1 17:40:03 2014 +0200

wizards: fix javadoc error: self-closing element not allowed

Change-Id: I1ffe498da5fa1410832312b38343aae7bca77203
Reviewed-on: https://gerrit.libreoffice.org/11236
Reviewed-by: Thomas Arnhold tho...@arnhold.org
Tested-by: Thomas Arnhold tho...@arnhold.org

diff --git a/wizards/com/sun/star/wizards/common/ConfigNode.java 
b/wizards/com/sun/star/wizards/common/ConfigNode.java
index 69cd96f..0d2abd8 100644
--- a/wizards/com/sun/star/wizards/common/ConfigNode.java
+++ b/wizards/com/sun/star/wizards/common/ConfigNode.java
@@ -20,9 +20,9 @@ package com.sun.star.wizards.common;
 /**
  * This Interface specifies a method of an object which is
  * capable of reading and writing its data out of the
- * OO Configuration. br/
- * There are 2 direct implementations: ConfigGroup and ConfigSet.
- * The root is the first Java Object in the configuration hirarchie.
+ * OO Configuration.
+ * pThere are 2 direct implementations: ConfigGroup and ConfigSet.
+ * The root is the first Java Object in the configuration hierarchies./p
  */
 public interface ConfigNode
 {
diff --git a/wizards/com/sun/star/wizards/common/Configuration.java 
b/wizards/com/sun/star/wizards/common/Configuration.java
index 2a2d8c0..bed4b9c 100644
--- a/wizards/com/sun/star/wizards/common/Configuration.java
+++ b/wizards/com/sun/star/wizards/common/Configuration.java
@@ -28,15 +28,15 @@ import com.sun.star.uno.UnoRuntime;
 import com.sun.star.lang.Locale;
 
 /**
- * This class gives access to the OO configuration api.
- * It contains 4 get and 4 set convenience methods for getting and settings 
properties
- * in the configuration. br/
- * For the get methods, two parameters must be given: name and parent, where 
name is the
- * name of the property, parent is a HierarchyElement 
(::com::sun::star::configuration::HierarchyElement)br/
- * The get and set methods support hieryrchical property names like 
options/gridX. br/
- * NOTE: not yet supported, but sometime later,
+ * This class gives access to the OO configuration API.
+ * pIt contains 4 get and 4 set convenience methods for getting and settings 
properties
+ * in the configuration./p
+ * pFor the get methods, two parameters must be given: name and parent, 
where name is the
+ * name of the property, parent is a HierarchyElement 
(::com::sun::star::configuration::HierarchyElement)/p
+ * pThe get and set methods support hierarchical property names like 
options/gridX. /p
+ * pNOTE: not yet supported, but sometime later,
  * If you will omit the parent parameter, then the name parameter must be 
in hierarchy form from
- * the root of the registry.
+ * the root of the registry./p
  */
 public abstract class Configuration
 {
diff --git a/wizards/com/sun/star/wizards/common/NumberFormatter.java 
b/wizards/com/sun/star/wizards/common/NumberFormatter.java
index 83a51bc..1d9a9c3 100644
--- a/wizards/com/sun/star/wizards/common/NumberFormatter.java
+++ b/wizards/com/sun/star/wizards/common/NumberFormatter.java
@@ -82,8 +82,8 @@ public class NumberFormatter
 
 
 /**
- * gives a key to pass to a NumberFormat object. br/
- * example: br/
+ * gives a key to pass to a NumberFormat object.
+ * pexample:/p
  * pre
  * XNumberFormatsSupplier nsf = 
(XNumberFormatsSupplier)UnoRuntime.queryInterface(...,document);
  * int key = Desktop.getNumberFormatterKey( nsf, 
...star.i18n.NumberFormatIndex.DATE...);
diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog2.java 
b/wizards/com/sun/star/wizards/ui/UnoDialog2.java
index 9259425..6fcf825 100644
--- a/wizards/com/sun/star/wizards/ui/UnoDialog2.java
+++ b/wizards/com/sun/star/wizards/ui/UnoDialog2.java
@@ -29,11 +29,11 @@ import com.sun.star.wizards.ui.event.*;
 
 /**
  * This class contains convenience methods for inserting components to a 
dialog.
- * It was created for use with the automatic conversion of Basic XML Dialog
- * description files to a Java class which builds the same dialog through the 
UNO API.br/
- * It uses an Event-Listener method, which calls a method through reflection
- * wenn an event on a component is trigered.
- * see the classes AbstractListener, CommonListener, MethodInvocation for 
details.
+ * pIt was created for use with the automatic conversion of Basic XML Dialog
+ * description files to a Java class which builds the same dialog through the 
UNO API./p
+ 

[Libreoffice-commits] core.git: wizards/com

2014-09-02 Thread rbuj
 wizards/com/sun/star/wizards/db/SQLQueryComposer.java |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 670f472e138c6f6b0233e8236befa3dbb1809824
Author: rbuj robert@gmail.com
Date:   Mon Sep 1 17:46:14 2014 +0200

wizards: fix javadoc error: bad use of ''

Change-Id: Ide61f9ed907e8896ccb64b6c69b3a43068658ace
Reviewed-on: https://gerrit.libreoffice.org/11237
Reviewed-by: Thomas Arnhold tho...@arnhold.org
Tested-by: Thomas Arnhold tho...@arnhold.org

diff --git a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java 
b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java
index 24f1072..1f7d2df 100644
--- a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java
+++ b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java
@@ -416,9 +416,9 @@ public class SQLQueryComposer
  * retrieves a normalized structured filter
  *
  * pXSingleSelectQueryComposer.getStructuredFilter has a strange habit 
of returning the predicate (equal, not equal, etc)
- * effectively twice: Once as SQLFilterOperator, and once in the value. 
That is, if you have a term column  3, then
+ * effectively twice: Once as SQLFilterOperator, and once in the value. 
That is, if you have a term {@literal column  3}, then
  * you'll get an SQLFilterOperator.NOT_EQUAL (which is fine), 
strongand/strong the textual value of the condition
- * will read  3. The latter is strange enough, but even more strange 
is that this behavior is not even consistent:
+ * will read {@literal  3}. The latter is strange enough, but even 
more strange is that this behavior is not even consistent:
  * for SQLFilterOperator.EQUAL, the = sign is not include in the textual 
value./p
  *
  * pTo abstract from this weirdness, use this function here, which 
strips the unwanted tokens from the textual value
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2014-09-02 Thread rbuj
 wizards/com/sun/star/wizards/ui/event/AbstractListener.java |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 219ee12ffa5982b3ce4c6889193e197640e15756
Author: rbuj robert@gmail.com
Date:   Mon Sep 1 17:25:47 2014 +0200

wizards: fix javadoc error: unknown tag: list

Change-Id: I293b4fc2c2e0ff4fd591389419f36f04e87c59a1
Reviewed-on: https://gerrit.libreoffice.org/11235
Reviewed-by: Thomas Arnhold tho...@arnhold.org
Tested-by: Thomas Arnhold tho...@arnhold.org

diff --git a/wizards/com/sun/star/wizards/ui/event/AbstractListener.java 
b/wizards/com/sun/star/wizards/ui/event/AbstractListener.java
index 0a20583..690d51f 100644
--- a/wizards/com/sun/star/wizards/ui/event/AbstractListener.java
+++ b/wizards/com/sun/star/wizards/ui/event/AbstractListener.java
@@ -30,13 +30,13 @@ import java.util.HashMap;
  * This class is a base class for listener classes.
  * It uses a hashtable to map between a ComponentName, EventName and a 
MethodInvokation Object.
  * To use this class do the following:br/
- * list
+ * ul
  * liWrite a subclass which implements the needed Listener(s)./li
  * in the even methods, use invoke(...).
  * liWhen instanciating the component, register the subclass as the event 
listener./li
  * liWrite the methods which should be performed when the event occurs./li
  * licall the add method, to define a component-event-action mapping./li
- * /list
+ * /ul
  */
 public class AbstractListener
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2014-09-02 Thread rbuj
 wizards/com/sun/star/wizards/ui/FilterComponent.java |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a4a6153e2574c7e01efb7189a84e072480627561
Author: rbuj robert@gmail.com
Date:   Mon Sep 1 17:48:39 2014 +0200

wizards: fix javadoc error: unknown tag: returns

Change-Id: I3d10c48a5fac2683f76cf21ef5c746377ca9a8c4
Reviewed-on: https://gerrit.libreoffice.org/11238
Reviewed-by: Thomas Arnhold tho...@arnhold.org
Tested-by: Thomas Arnhold tho...@arnhold.org

diff --git a/wizards/com/sun/star/wizards/ui/FilterComponent.java 
b/wizards/com/sun/star/wizards/ui/FilterComponent.java
index 4c7a399..3a2b78b 100644
--- a/wizards/com/sun/star/wizards/ui/FilterComponent.java
+++ b/wizards/com/sun/star/wizards/ui/FilterComponent.java
@@ -691,7 +691,7 @@ public class FilterComponent
 }
 
 /**
- * @returns true if the current condition is complete, all needed 
fields are filled with values.
+ * @return true if the current condition is complete, all needed 
fields are filled with values.
  * So we can enable the next.
  */
 private boolean isConditionComplete()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2014-09-02 Thread rbuj
 wizards/com/sun/star/wizards/ui/event/AbstractListener.java |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit ee82777c743cec8943312229ee4ef1c59328e059
Author: rbuj robert@gmail.com
Date:   Mon Sep 1 17:53:50 2014 +0200

wizards: fix javadoc error: text not allowed in ul element

Change-Id: Ic50f9618c2649fe3e0fbbf2db6a09ea2e1d4c810
Reviewed-on: https://gerrit.libreoffice.org/11239
Reviewed-by: Thomas Arnhold tho...@arnhold.org
Tested-by: Thomas Arnhold tho...@arnhold.org

diff --git a/wizards/com/sun/star/wizards/ui/event/AbstractListener.java 
b/wizards/com/sun/star/wizards/ui/event/AbstractListener.java
index 690d51f..2ebbb67 100644
--- a/wizards/com/sun/star/wizards/ui/event/AbstractListener.java
+++ b/wizards/com/sun/star/wizards/ui/event/AbstractListener.java
@@ -32,8 +32,8 @@ import java.util.HashMap;
  * To use this class do the following:br/
  * ul
  * liWrite a subclass which implements the needed Listener(s)./li
- * in the even methods, use invoke(...).
- * liWhen instanciating the component, register the subclass as the event 
listener./li
+ * liIn the even methods, use invoke(...)./li
+ * liWhen instantiating the component, register the subclass as the event 
listener./li
  * liWrite the methods which should be performed when the event occurs./li
  * licall the add method, to define a component-event-action mapping./li
  * /ul
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2014-08-21 Thread rbuj
 wizards/com/sun/star/wizards/document/DatabaseControl.java |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit e189fa400ec4fcafae5e3b04f054cec851f81dd8
Author: rbuj robert@gmail.com
Date:   Wed Aug 20 16:37:43 2014 +0200

wizards: EffectiveMax  EffectiveMin of TINYINT


http://docs.oracle.com/javase/1.5.0/docs/api/constant-values.html#java.lang.Byte.MIN_VALUE

Change-Id: I702f1354eaddc37e6321c3cdc0126a78945d0754
Reviewed-on: https://gerrit.libreoffice.org/11044
Reviewed-by: Noel Grandin noelgran...@gmail.com
Tested-by: Noel Grandin noelgran...@gmail.com

diff --git a/wizards/com/sun/star/wizards/document/DatabaseControl.java 
b/wizards/com/sun/star/wizards/document/DatabaseControl.java
index 7e98a87..6995fdc 100644
--- a/wizards/com/sun/star/wizards/document/DatabaseControl.java
+++ b/wizards/com/sun/star/wizards/document/DatabaseControl.java
@@ -199,8 +199,8 @@ public class DatabaseControl extends Control
 xPropertySet.setPropertyValue(EffectiveMin, new 
Double(Short.MIN_VALUE));
 break;
 case DataType.TINYINT:
-xPropertySet.setPropertyValue(EffectiveMax, new 
Double(127));
-xPropertySet.setPropertyValue(EffectiveMin, new 
Double(-128));
+xPropertySet.setPropertyValue(EffectiveMax, new 
Double(Byte.MAX_VALUE));
+xPropertySet.setPropertyValue(EffectiveMin, new 
Double(Byte.MIN_VALUE));
 break;
 case DataType.FLOAT:
 case DataType.REAL:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2014-08-21 Thread rbuj
 wizards/com/sun/star/wizards/common/JavaTools.java |  127 ++---
 1 file changed, 41 insertions(+), 86 deletions(-)

New commits:
commit d14a4dc996bca209a013a89dd2bffe9301bed3dd
Author: rbuj robert@gmail.com
Date:   Wed Aug 20 19:14:10 2014 +0200

wizards: Enhancements in JavaTools.java

Change-Id: Ie25b4772b34170b8ea200f1bfe6884feac49a414
Reviewed-on: https://gerrit.libreoffice.org/11049
Reviewed-by: Noel Grandin noelgran...@gmail.com
Tested-by: Noel Grandin noelgran...@gmail.com

diff --git a/wizards/com/sun/star/wizards/common/JavaTools.java 
b/wizards/com/sun/star/wizards/common/JavaTools.java
index f4bb359..4f81e43 100644
--- a/wizards/com/sun/star/wizards/common/JavaTools.java
+++ b/wizards/com/sun/star/wizards/common/JavaTools.java
@@ -42,83 +42,61 @@ public class JavaTools
 return sRetArray;
 }
 
-
-
 /**converts a list of Integer values included in an Integer vector to a 
list of int values
  */
-public static int[] IntegerTointList(java.util.ListInteger 
_aIntegerVector)
-{
-try
-{
-Integer[] nIntegerValues = new Integer[_aIntegerVector.size()];
-int[] nintValues = new int[_aIntegerVector.size()];
-_aIntegerVector.toArray(nIntegerValues);
-for (int i = 0; i  nIntegerValues.length; i++)
-{
-nintValues[i] = nIntegerValues[i].intValue();
+public static int[] IntegerTointList(java.util.ListInteger 
_aIntegerVector) {
+int[] nintValues = null;
+if (_aIntegerVector.size()  0) {
+int i = 0;
+nintValues = new int[_aIntegerVector.size()];
+for (Integer nIntegerValue : _aIntegerVector) {
+nintValues[i++] = nIntegerValue.intValue();
 }
-return nintValues;
-}
-catch (RuntimeException e)
-{
-e.printStackTrace(System.err);
-return null;
 }
+return nintValues;
 }
 
 /**converts a list of Boolean values included in a Boolean vector to a 
list of boolean values
  */
-public static boolean[] BooleanTobooleanList(java.util.ListBoolean 
_aBooleanVector)
-{
-try
-{
-Boolean[] bBooleanValues = new Boolean[_aBooleanVector.size()];
-boolean[] bbooleanValues = new boolean[_aBooleanVector.size()];
-_aBooleanVector.toArray(bBooleanValues);
-for (int i = 0; i  bBooleanValues.length; i++)
-{
-bbooleanValues[i] = bBooleanValues[i].booleanValue();
+public static boolean[] BooleanTobooleanList(java.util.ListBoolean 
_aBooleanVector) {
+boolean[] bbooleanValues = null;
+if (_aBooleanVector.size()  0) {
+int i = 0;
+bbooleanValues = new boolean[_aBooleanVector.size()];
+for (Boolean bBooleanValue : _aBooleanVector) {
+bbooleanValues[i++] = bBooleanValue.booleanValue();
 }
-return bbooleanValues;
-}
-catch (RuntimeException e)
-{
-e.printStackTrace(System.err);
-return null;
 }
+return bbooleanValues;
 }
 
-
-
 public static String getlongestArrayItem(String[] StringArray)
 {
 String sLongestItem = PropertyNames.EMPTY_STRING;
-int FieldCount = StringArray.length;
+int iCurLength;
 int iOldLength = 0;
-int iCurLength = 0;
-for (int i = 0; i  FieldCount; i++)
+for (String str : StringArray)
 {
-iCurLength = StringArray[i].length();
+iCurLength = str.length();
 if (iCurLength  iOldLength)
 {
 iOldLength = iCurLength;
-sLongestItem = StringArray[i];
+sLongestItem = str;
 }
 }
 return sLongestItem;
 }
 
-public static String ArraytoString(String[] LocArray)
-{
+public static String ArraytoString(String[] LocArray) {
 StringBuilder ResultString = new 
StringBuilder(PropertyNames.EMPTY_STRING);
-int iLen = LocArray.length;
-for (int i = 0; i  iLen; i++)
-{
-ResultString.append(LocArray[i]);
-if (i  iLen - 1)
-{
+boolean bActive = false;
+for (String str : LocArray) {
+if (bActive) {
 ResultString.append(PropertyNames.SEMI_COLON);
+} else {
+bActive = true;
 }
+ResultString.append(str);
 }
 return ResultString.toString();
 }
@@ -127,14 +105,10 @@ public class JavaTools
  * @return the index of the field that contains the string 'SearchString' 
or '-1' if not it is
  * not contained within the array
  */
-public static int FieldInList(String[] SearchList, String SearchString)
-{
-int FieldLen = SearchList.length;
+public static 

[Libreoffice-commits] core.git: wizards/com

2014-08-20 Thread rbuj
 wizards/com/sun/star/wizards/common/NumericalHelper.java |9 +++--
 1 file changed, 3 insertions(+), 6 deletions(-)

New commits:
commit e5070e0cc2bc7c19668846d3faaa1b97e3440f06
Author: rbuj robert@gmail.com
Date:   Wed Aug 20 12:34:07 2014 +0200

wizards: Number parsing

Change-Id: If81db8cf10556dbb79458258a70760e3f12a5524
Reviewed-on: https://gerrit.libreoffice.org/11041
Reviewed-by: David Tardon dtar...@redhat.com
Tested-by: David Tardon dtar...@redhat.com

diff --git a/wizards/com/sun/star/wizards/common/NumericalHelper.java 
b/wizards/com/sun/star/wizards/common/NumericalHelper.java
index dd1c731..f2c6e76 100644
--- a/wizards/com/sun/star/wizards/common/NumericalHelper.java
+++ b/wizards/com/sun/star/wizards/common/NumericalHelper.java
@@ -97,8 +97,7 @@ public class NumericalHelper
 case STRING_TYPE:
 try
 {
-Integer i = Integer.valueOf((String) aTypeObject.aValue);
-retValue = i.intValue();
+retValue = Integer.parseInt((String) aTypeObject.aValue);
 }
 catch (java.lang.NumberFormatException e)
 {
@@ -152,8 +151,7 @@ public class NumericalHelper
 case STRING_TYPE:
 try
 {
-Float f = new Float((String) aTypeObject.aValue);
-retValue = f.floatValue();
+retValue = Float.parseFloat((String) aTypeObject.aValue);
 }
 catch (java.lang.NumberFormatException e)
 {
@@ -207,8 +205,7 @@ public class NumericalHelper
 case STRING_TYPE:
 try
 {
-Boolean b = Boolean.valueOf((String) aTypeObject.aValue);
-retValue = b.booleanValue();
+retValue = Boolean.parseBoolean((String) 
aTypeObject.aValue);
 }
 catch (java.lang.NumberFormatException e)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2014-06-16 Thread Caolán McNamara
 wizards/com/sun/star/wizards/README |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 67f141a1d8c247c173a922c5f969d21f61401740
Author: Caolán McNamara caol...@redhat.com
Date:   Mon Jun 16 13:06:21 2014 +0100

remove 'basis-link' from README

Change-Id: I5923b09b5fbacb64007cb3f6cf96b08c366d22c2

diff --git a/wizards/com/sun/star/wizards/README 
b/wizards/com/sun/star/wizards/README
index a3877a3..2d7bcbc 100644
--- a/wizards/com/sun/star/wizards/README
+++ b/wizards/com/sun/star/wizards/README
@@ -8,7 +8,7 @@ To call a wizard remotely you need to:
   
 - For testing on installed LibreOffice:
 export URE_BOOTSTRAP=file:///usr/lib/libreoffice/program/fundamentalrc
-export PYTHONPATH=/usr/lib/libreoffice/basis-link/program
+export PYTHONPATH=/usr/lib/libreoffice/program
 #and run LibreOffice in listening mode:
 soffice --accept=socket,host=localhost,port=2002;urp;
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2014-03-30 Thread Julien Nabet
 wizards/com/sun/star/wizards/ui/ImageList.py |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 701d93081684cc7ad482e77148f8970e3c2c1d72
Author: Julien Nabet serval2...@yahoo.fr
Date:   Sun Mar 30 21:38:04 2014 +0200

Resolves: fdo#76802 error msg in Web Page Wizard dialog

Change-Id: I0fa0537a8726bbda182dea8c3a9014d77973edea

diff --git a/wizards/com/sun/star/wizards/ui/ImageList.py 
b/wizards/com/sun/star/wizards/ui/ImageList.py
index a42eb01..7decec7 100644
--- a/wizards/com/sun/star/wizards/ui/ImageList.py
+++ b/wizards/com/sun/star/wizards/ui/ImageList.py
@@ -242,7 +242,7 @@ class ImageList(ListDataListener):
 
 def refreshCounterText(self):
 self.lblCounter.Model.Label = self.counterRenderer.render(
-self.Counter (self.pageStart + 1, self.pageEnd,
+self.Counter (self.pageStart + 1, self.pageEnd(),
   self.listModel.getSize()))
 
 def pageEnd(self):
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2014-03-20 Thread Michael Meeks
 wizards/com/sun/star/wizards/agenda/AgendaDocument.py |   10 +-
 wizards/com/sun/star/wizards/agenda/AgendaWizardDialog.py |8 
 wizards/com/sun/star/wizards/agenda/CGTopic.py|6 +++---
 wizards/com/sun/star/wizards/agenda/TopicsControl.py  |6 +++---
 4 files changed, 15 insertions(+), 15 deletions(-)

New commits:
commit 1f2817e913c87e4f91253bd3fc01e16624ea6b71
Author: Michael Meeks michael.me...@collabora.com
Date:   Thu Mar 20 14:10:07 2014 +

Fix a number of typos  trailing spaces.

Change-Id: I8dea099dbb06600f1493da111284810a0e27cd96

diff --git a/wizards/com/sun/star/wizards/agenda/AgendaDocument.py 
b/wizards/com/sun/star/wizards/agenda/AgendaDocument.py
index 77a55ee..0bcb30f 100644
--- a/wizards/com/sun/star/wizards/agenda/AgendaDocument.py
+++ b/wizards/com/sun/star/wizards/agenda/AgendaDocument.py
@@ -87,8 +87,8 @@ class AgendaDocument(TextDocument):
 self.allItems = []
 
 def load(self, templateURL):
-#Each template is duplicated. aw-XXX.ott is the template itself
-#and XXX.ott is a section link.
+# Each template is duplicated. aw-XXX.ott is the template itself
+# and XXX.ott is a section link.
 self.template = self.calcTemplateName(templateURL)
 self.loadAsPreview(templateURL, False)
 self.xFrame.ComponentWindow.Enable = False
@@ -432,7 +432,7 @@ class AgendaDocument(TextDocument):
 else:
 try:
 topicStartTime = int(self.agenda.cp_Time)
-#first I replace the minutes titles...
+# first I replace the minutes titles...
 self.items = self.searchFillInItems()
 itemIndex = 0
 for item in self.items:
@@ -823,7 +823,7 @@ class Topics(object):
 topics table to the given number of topics.
 Note this method does only reducing - if
 the number of topics given is greater than the
-number of actuall topics it does *not* add
+number of actual topics it does *not* add
 rows !
 Note also that the first topic will never be removed.
 If the table contains no topics, the whole section will
@@ -917,7 +917,7 @@ class AgendaItem(object):
 cell = ItemsTable.table.getCellByName(cellname)
 cell.String = self.textElement
 tableCursor.goRight(1, False)
-#second field is actually always null...
+# second field is actually always null...
 # this is a preparation for adding placeholders.
 if self.field is not None:
 self.field.write(ItemsTable.table.getCellByName(
diff --git a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialog.py 
b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialog.py
index 20f0e17..fc9eef9 100644
--- a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialog.py
+++ b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialog.py
@@ -25,10 +25,10 @@ class AgendaWizardDialog(WizardDialog):
 
 def __init__(self, xmsf):
 super(AgendaWizardDialog,self).__init__(xmsf, HID )
-
+
 #Load Resources
 self.resources = AgendaWizardDialogResources(self.oWizardResource)
-
+
 #set dialog properties...
 self.setDialogProperties(True, 210, True, 200, 52, 1, 1,
 self.resources.resAgendaWizardDialog_title, 310)
@@ -98,7 +98,7 @@ class AgendaWizardDialog(WizardDialog):
 ScaleImage, PropertyNames.PROPERTY_STEP,
 PropertyNames.PROPERTY_TABINDEX,
 PropertyNames.PROPERTY_WIDTH)
-
+
 self.fontDescriptor4 = \
 uno.createUnoStruct('com.sun.star.awt.FontDescriptor')
 self.fontDescriptor4.Weight = 150
@@ -108,7 +108,7 @@ class AgendaWizardDialog(WizardDialog):
 (self.fontDescriptor4, 16, self.resources.reslblTitle1_value,
 True, 91, 8, 1, 100,212))
 self.insertLabel(lblPageDesign, self.PROPS_TEXT,
-(8, self.resources.reslblPageDesign_value, 97, 32, 1, 101, 66))  
+(8, self.resources.reslblPageDesign_value, 97, 32, 1, 101, 66))
 self.listPageDesign = self.insertListBox(listPageDesign,
 None, AgendaWizardDialogConst.LISTPAGEDESIGN_ACTION_PERFORMED,
 self.PROPS_LIST,
diff --git a/wizards/com/sun/star/wizards/agenda/CGTopic.py 
b/wizards/com/sun/star/wizards/agenda/CGTopic.py
index c094363..e99f770 100644
--- a/wizards/com/sun/star/wizards/agenda/CGTopic.py
+++ b/wizards/com/sun/star/wizards/agenda/CGTopic.py
@@ -20,7 +20,7 @@ from ..common.ConfigGroup import ConfigGroup
 '''
 CGTopic means: Configuration Group Topic.
 This object encapsulates a configuration group with topic information.
-Since the topics gui conftrol uses its own data model, there is
+Since the topic's gui control uses its own data model, there is
 also code here to convert from the data model to CGTopic object (the 
constructor)
 and vice versa (setDataToRow method - used 

[Libreoffice-commits] core.git: wizards/com

2014-03-04 Thread Caolán McNamara
 wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py |2 -
 wizards/com/sun/star/wizards/ui/WizardDialog.py   |   12 --
 2 files changed, 11 insertions(+), 3 deletions(-)

New commits:
commit 5fa18dc21644f2a719bf39ec948a586fa8837b6a
Author: Caolán McNamara caol...@redhat.com
Date:   Tue Mar 4 13:31:41 2014 +

actively search for wizards dir in all internal templates

Change-Id: I4ef6da4d9d1931917e0aaa6e110fd273bd917b26

diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py 
b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py
index 76866e7..d8598ff 100644
--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py
+++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py
@@ -752,7 +752,7 @@ class LetterWizardDialogImpl(LetterWizardDialog):
 return None
 
 def initializeTemplates(self, xMSF):
-sLetterPath = self.sTemplatePath + /../common/wizard/letter
+sLetterPath = self.sTemplatePath + /wizard/letter
 self.BusinessFiles = \
 FileAccess.getFolderTitles(
 xMSF, bus, sLetterPath, self.resources.dictBusinessTemplate)
diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.py 
b/wizards/com/sun/star/wizards/ui/WizardDialog.py
index 4e41fdf..e107c63 100644
--- a/wizards/com/sun/star/wizards/ui/WizardDialog.py
+++ b/wizards/com/sun/star/wizards/ui/WizardDialog.py
@@ -22,6 +22,7 @@ from .UnoDialog2 import UnoDialog2, Desktop, PropertyNames, 
UIConsts, \
 ItemListenerProcAdapter
 from ..common.Resource import Resource
 from ..common.HelpIds import HelpIds
+from ..common.FileAccess import FileAccess
 
 from com.sun.star.lang import NoSuchMethodException
 from com.sun.star.frame import TerminationVetoException
@@ -125,10 +126,17 @@ class WizardDialog(UnoDialog2):
 def initializePaths(self):
 xPropertySet = \
 self.xMSF.createInstance(com.sun.star.util.PathSettings)
-self.sTemplatePath = \
-xPropertySet.getPropertyValue(Template_internal)[0]
 self.sUserTemplatePath = \
 xPropertySet.getPropertyValue(Template_writable)
+myFA = FileAccess(self.xMSF)
+aInternalPaths = xPropertySet.getPropertyValue(Template_internal)
+self.sTemplatePath = 
+for path in aInternalPaths:
+if myFA.exists(path + /wizard, False):
+self.sTemplatePath = path
+break
+if self.sTemplatePath == :
+raise Exception(could not find wizard templates)
 
 def addRoadmap(self):
 try:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2014-03-03 Thread Stephan Bergmann
 wizards/com/sun/star/wizards/ui/WizardDialog.py |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 97822e3cbc63d3bd110bc3c654b3fbb4d4d1904c
Author: Stephan Bergmann sberg...@redhat.com
Date:   Mon Mar 3 11:57:34 2014 +0100

Wizards should look for templates in Template_internal, not Template_user

...as only the former reliably denotes the share/template tree where the
wizard templates are stored.  (Presumably the latter defaulted to the 
former as
long as it wasn't explicitly set in the past, but is now always explicitly 
set
since 838b77f5f3d6d8fd98891e99a23ff78a6a357cb2 Resolves: rhbz#1065807 use 
xdg
~/Templates for default Template location.)

Change-Id: I7d1ac47d821c778fe342865465d0505a94b824bf

diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.py 
b/wizards/com/sun/star/wizards/ui/WizardDialog.py
index 6cf9bc5..4e41fdf 100644
--- a/wizards/com/sun/star/wizards/ui/WizardDialog.py
+++ b/wizards/com/sun/star/wizards/ui/WizardDialog.py
@@ -126,7 +126,7 @@ class WizardDialog(UnoDialog2):
 xPropertySet = \
 self.xMSF.createInstance(com.sun.star.util.PathSettings)
 self.sTemplatePath = \
-xPropertySet.getPropertyValue(Template_user)[0]
+xPropertySet.getPropertyValue(Template_internal)[0]
 self.sUserTemplatePath = \
 xPropertySet.getPropertyValue(Template_writable)
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com wizards/Pyuno_web.mk

2014-01-24 Thread Xisco Fauli
 wizards/Pyuno_web.mk  |1 
 wizards/com/sun/star/wizards/README   |5 -
 wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py |   14 ---
 wizards/com/sun/star/wizards/agenda/CallWizard.py |   16 +++
 wizards/com/sun/star/wizards/common/Resource.py   |3 
 wizards/com/sun/star/wizards/fax/CallWizard.py|   18 +++-
 wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py   |   14 ---
 wizards/com/sun/star/wizards/letter/CallWizard.py |   16 +++
 wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py |   14 ---
 wizards/com/sun/star/wizards/ui/WizardDialog.py   |2 
 wizards/com/sun/star/wizards/web/CallWizard.py|   17 +++
 wizards/com/sun/star/wizards/web/WWD_Events.py|   12 --
 wizards/com/sun/star/wizards/web/WebWizard.py |   43 --
 wizards/com/sun/star/wizards/web/WebWizardDialogResources.py  |   12 ++
 14 files changed, 74 insertions(+), 113 deletions(-)

New commits:
commit 574773ac298153b97237b3432b601a83938eaf6b
Author: Xisco Fauli aniste...@gmail.com
Date:   Fri Jan 24 22:40:45 2014 +0100

pywizards: update callRemote methods

Change-Id: Id4a335b19f48738d0f2a02e3660e57701bbc7ef2

diff --git a/wizards/Pyuno_web.mk b/wizards/Pyuno_web.mk
index 6b56a4d..a8e1519 100644
--- a/wizards/Pyuno_web.mk
+++ b/wizards/Pyuno_web.mk
@@ -29,7 +29,6 @@ $(eval $(call gb_Pyuno_add_files,web,wizards/web,\
WWD_General.py \
WWD_Startup.py \
WWHID.py \
-   WebWizard.py \
WebWizardConst.py \
WebWizardDialog.py \
WebWizardDialogResources.py \
diff --git a/wizards/com/sun/star/wizards/README 
b/wizards/com/sun/star/wizards/README
index 473282f..c0351e9 100644
--- a/wizards/com/sun/star/wizards/README
+++ b/wizards/com/sun/star/wizards/README
@@ -14,6 +14,5 @@ To call a wizard remotely you need to:
   
 - Launch the wizard from wizards parent folder:
 python
-#Fax wizard
-from wizards.fax.FaxWizardDialogImpl import FaxWizardDialogImpl
-FaxWizardDialogImpl.main()
+from wizards.[Wizard's folder].CallWizard import CallWizard
+CallWizard.callRemote()
diff --git a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py 
b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py
index 8b21e7e..014159e 100644
--- a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py
+++ b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py
@@ -53,20 +53,6 @@ class AgendaWizardDialogImpl(AgendaWizardDialog):
 def leaveStep(self, OldStep, NewStep):
 pass
 
-@classmethod
-def main(self):
-#Call the wizard remotely(see README)
-try:
-ConnectStr = \
-
uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext
-xLocMSF = Desktop.connect(ConnectStr)
-lw = AgendaWizardDialogImpl(xLocMSF)
-lw.startWizard(xLocMSF)
-except Exception as e:
-print (Wizard failure exception  + str(type(e)) +
-message  + str(e) +  args  + str(e.args) +
-   traceback.format_exc())
-
 def startWizard(self, xMSF):
 self.running = True
 try:
diff --git a/wizards/com/sun/star/wizards/agenda/CallWizard.py 
b/wizards/com/sun/star/wizards/agenda/CallWizard.py
index 5c76249..9ca75f1 100644
--- a/wizards/com/sun/star/wizards/agenda/CallWizard.py
+++ b/wizards/com/sun/star/wizards/agenda/CallWizard.py
@@ -18,7 +18,7 @@
 import unohelper
 import traceback
 
-from .AgendaWizardDialogImpl import AgendaWizardDialogImpl
+from .AgendaWizardDialogImpl import AgendaWizardDialogImpl, Desktop
 
 from com.sun.star.task import XJobExecutor
 
@@ -38,6 +38,20 @@ class CallWizard(unohelper.Base, XJobExecutor):
 message  + str(e) +  args  + str(e.args) +
traceback.format_exc())
 
+@classmethod
+def callRemote(self):
+#Call the wizard remotely(see README)
+try:
+ConnectStr = \
+
uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext
+xLocMSF = Desktop.connect(ConnectStr)
+lw = AgendaWizardDialogImpl(xLocMSF)
+lw.startWizard(xLocMSF)
+except Exception as e:
+print (Wizard failure exception  + str(type(e)) +
+message  + str(e) +  args  + str(e.args) +
+   traceback.format_exc())
+
 # pythonloader looks for a static g_ImplementationHelper variable
 g_ImplementationHelper = unohelper.ImplementationHelper()
 
diff --git a/wizards/com/sun/star/wizards/common/Resource.py 
b/wizards/com/sun/star/wizards/common/Resource.py
index e35820c..472f054 100644
--- a/wizards/com/sun/star/wizards/common/Resource.py
+++ b/wizards/com/sun/star/wizards/common/Resource.py
@@ -16,7 +16,8 @@
 #   the License at 

  1   2   >