summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorOcke Janssen <oj@openoffice.org>2001-09-20 11:59:25 +0000
committerOcke Janssen <oj@openoffice.org>2001-09-20 11:59:25 +0000
commit1581a0d3ca842ea2c35e6699b01ff41f1825c9dd (patch)
treebc1391c35d6c99b3157051997284555d22e2ac1a /dbaccess
parent21301e1d332c067e4e000d826bedb3247923e0eb (diff)
#92232# fixes for BIGINT type and new property HELPTEXT
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/core/api/BookmarkSet.cxx10
-rw-r--r--dbaccess/source/core/api/CRowSetColumn.cxx10
-rw-r--r--dbaccess/source/core/api/CRowSetDataColumn.cxx10
-rw-r--r--dbaccess/source/core/api/CacheSet.cxx10
-rw-r--r--dbaccess/source/core/api/KeySet.cxx16
-rw-r--r--dbaccess/source/core/api/RowSet.cxx11
-rw-r--r--dbaccess/source/core/api/column.cxx21
-rw-r--r--dbaccess/source/core/api/definitioncolumn.cxx19
-rw-r--r--dbaccess/source/core/api/tablecontainer.cxx8
-rw-r--r--dbaccess/source/core/inc/column.hxx5
-rw-r--r--dbaccess/source/inc/dbastrings.hrc5
-rw-r--r--dbaccess/source/inc/stringconstants.hrc7
-rw-r--r--dbaccess/source/shared/dbastrings.cxx5
-rw-r--r--dbaccess/source/ui/browser/dsEntriesNoExp.cxx224
-rw-r--r--dbaccess/source/ui/browser/dsbrowserDnD.cxx11
-rw-r--r--dbaccess/source/ui/browser/makefile.mk9
-rw-r--r--dbaccess/source/ui/browser/sbagrid.cxx23
-rw-r--r--dbaccess/source/ui/browser/unodatbr.cxx145
-rw-r--r--dbaccess/source/ui/control/FieldDescControl.cxx8
-rw-r--r--dbaccess/source/ui/inc/UITools.hxx17
-rw-r--r--dbaccess/source/ui/misc/UITools.cxx46
-rw-r--r--dbaccess/source/ui/misc/WCopyTable.cxx11
-rw-r--r--dbaccess/source/ui/querydesign/QueryTextView.cxx6
-rw-r--r--dbaccess/source/ui/querydesign/TableWindow.cxx6
-rw-r--r--dbaccess/source/ui/querydesign/TableWindowListBox.cxx8
-rw-r--r--dbaccess/source/ui/querydesign/TableWindowTitle.cxx8
-rw-r--r--dbaccess/source/ui/querydesign/querycontainerwindow.cxx10
-rw-r--r--dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx8
-rw-r--r--dbaccess/source/ui/tabledesign/TableController.cxx48
-rw-r--r--dbaccess/source/ui/tabledesign/TableDesignView.cxx10
30 files changed, 460 insertions, 275 deletions
diff --git a/dbaccess/source/core/api/BookmarkSet.cxx b/dbaccess/source/core/api/BookmarkSet.cxx
index dfd75ab2495b..d937e481b939 100644
--- a/dbaccess/source/core/api/BookmarkSet.cxx
+++ b/dbaccess/source/core/api/BookmarkSet.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: BookmarkSet.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: oj $ $Date: 2001-07-24 13:25:26 $
+ * last change: $Author: oj $ $Date: 2001-09-20 12:59:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -166,6 +166,9 @@ void OBookmarkSet::updateColumn(sal_Int32 nPos,Reference< XRowUpdate > _xParamet
case DataType::NUMERIC:
_xParameter->updateString(nPos,_rValue);
break;
+ case DataType::BIGINT:
+ _xParameter->updateLong(nPos,_rValue);
+ break;
case DataType::BIT:
_xParameter->updateBoolean(nPos,_rValue);
break;
@@ -209,6 +212,9 @@ void OBookmarkSet::updateColumn(sal_Int32 nPos,Reference< XRowUpdate > _xParamet
/*------------------------------------------------------------------------
$Log: not supported by cvs2svn $
+ Revision 1.6 2001/07/24 13:25:26 oj
+ #89430# move ORowSetValue into dbtools
+
Revision 1.5 2001/05/03 07:15:56 oj
#86526# fetch decimal and numeric as string
diff --git a/dbaccess/source/core/api/CRowSetColumn.cxx b/dbaccess/source/core/api/CRowSetColumn.cxx
index 323b92243e22..a34f98254f5f 100644
--- a/dbaccess/source/core/api/CRowSetColumn.cxx
+++ b/dbaccess/source/core/api/CRowSetColumn.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: CRowSetColumn.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: oj $ $Date: 2001-08-24 06:25:57 $
+ * last change: $Author: oj $ $Date: 2001-09-20 12:59:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -119,12 +119,13 @@ Any SAL_CALL ORowSetColumn::queryInterface( const Type & _rType ) throw (Runtime
//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper* ORowSetColumn::createArrayHelper( ) const
{
- BEGIN_PROPERTY_HELPER(27)
+ BEGIN_PROPERTY_HELPER(28)
DECL_PROP1(ALIGN, sal_Int32, MAYBEVOID);
DECL_PROP1(CATALOGNAME, ::rtl::OUString, READONLY);
DECL_PROP0_IFACE(CONTROLMODEL, XPropertySet );
DECL_PROP1(DISPLAYSIZE, sal_Int32, READONLY);
DECL_PROP1(NUMBERFORMAT, sal_Int32, MAYBEVOID);
+ DECL_PROP0(HELPTEXT, ::rtl::OUString );
DECL_PROP0_BOOL(HIDDEN );
DECL_PROP1_BOOL(ISAUTOINCREMENT, READONLY);
DECL_PROP1_BOOL(ISCASESENSITIVE, READONLY);
@@ -167,6 +168,7 @@ void SAL_CALL ORowSetColumn::getFastPropertyValue( Any& rValue, sal_Int32 nHandl
case PROPERTY_ID_WIDTH:
case PROPERTY_ID_HIDDEN:
case PROPERTY_ID_CONTROLMODEL:
+ case PROPERTY_ID_HELPTEXT:
OColumnSettings::getFastPropertyValue( rValue, nHandle );
break;
case PROPERTY_ID_VALUE:
@@ -188,6 +190,7 @@ void SAL_CALL ORowSetColumn::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,
case PROPERTY_ID_WIDTH:
case PROPERTY_ID_HIDDEN:
case PROPERTY_ID_CONTROLMODEL:
+ case PROPERTY_ID_HELPTEXT:
OColumnSettings::setFastPropertyValue_NoBroadcast( nHandle, rValue );
break;
case PROPERTY_ID_VALUE:
@@ -211,6 +214,7 @@ sal_Bool SAL_CALL ORowSetColumn::convertFastPropertyValue( Any & rConvertedValue
case PROPERTY_ID_WIDTH:
case PROPERTY_ID_HIDDEN:
case PROPERTY_ID_CONTROLMODEL:
+ case PROPERTY_ID_HELPTEXT:
bModified = OColumnSettings::convertFastPropertyValue( rConvertedValue, rOldValue, nHandle, rValue );
break;
case PROPERTY_ID_VALUE:
diff --git a/dbaccess/source/core/api/CRowSetDataColumn.cxx b/dbaccess/source/core/api/CRowSetDataColumn.cxx
index 5e786f817bd5..fa260bd7224f 100644
--- a/dbaccess/source/core/api/CRowSetDataColumn.cxx
+++ b/dbaccess/source/core/api/CRowSetDataColumn.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: CRowSetDataColumn.cxx,v $
*
- * $Revision: 1.21 $
+ * $Revision: 1.22 $
*
- * last change: $Author: fs $ $Date: 2001-08-31 14:19:53 $
+ * last change: $Author: oj $ $Date: 2001-09-20 12:59:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -120,13 +120,14 @@ ORowSetDataColumn::~ORowSetDataColumn()
//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper* ORowSetDataColumn::createArrayHelper( ) const
{
- BEGIN_PROPERTY_HELPER(28)
+ BEGIN_PROPERTY_HELPER(29)
DECL_PROP1(ALIGN, sal_Int32, MAYBEVOID);
DECL_PROP1(CATALOGNAME, ::rtl::OUString, READONLY);
DECL_PROP0_IFACE(CONTROLMODEL, XPropertySet );
DECL_PROP1(DESCRIPTION, ::rtl::OUString, READONLY);
DECL_PROP1(DISPLAYSIZE, sal_Int32, READONLY);
DECL_PROP1(NUMBERFORMAT, sal_Int32, MAYBEVOID);
+ DECL_PROP0(HELPTEXT, ::rtl::OUString );
DECL_PROP0_BOOL(HIDDEN );
DECL_PROP1_BOOL(ISAUTOINCREMENT, READONLY);
DECL_PROP1_BOOL(ISCASESENSITIVE, READONLY);
@@ -172,6 +173,7 @@ void SAL_CALL ORowSetDataColumn::getFastPropertyValue( Any& rValue, sal_Int32 nH
case PROPERTY_ID_WIDTH:
case PROPERTY_ID_HIDDEN:
case PROPERTY_ID_CONTROLMODEL:
+ case PROPERTY_ID_HELPTEXT:
OColumnSettings::getFastPropertyValue( rValue, nHandle );
break;
case PROPERTY_ID_VALUE:
@@ -197,6 +199,7 @@ void SAL_CALL ORowSetDataColumn::setFastPropertyValue_NoBroadcast(sal_Int32 nHan
case PROPERTY_ID_WIDTH:
case PROPERTY_ID_HIDDEN:
case PROPERTY_ID_CONTROLMODEL:
+ case PROPERTY_ID_HELPTEXT:
OColumnSettings::setFastPropertyValue_NoBroadcast( nHandle, rValue );
break;
case PROPERTY_ID_VALUE:
@@ -221,6 +224,7 @@ sal_Bool SAL_CALL ORowSetDataColumn::convertFastPropertyValue( Any & rConvertedV
case PROPERTY_ID_WIDTH:
case PROPERTY_ID_HIDDEN:
case PROPERTY_ID_CONTROLMODEL:
+ case PROPERTY_ID_HELPTEXT:
bModified = OColumnSettings::convertFastPropertyValue( rConvertedValue, rOldValue, nHandle, rValue );
break;
case PROPERTY_ID_VALUE:
diff --git a/dbaccess/source/core/api/CacheSet.cxx b/dbaccess/source/core/api/CacheSet.cxx
index 596beaba952f..93f2f7549e06 100644
--- a/dbaccess/source/core/api/CacheSet.cxx
+++ b/dbaccess/source/core/api/CacheSet.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: CacheSet.cxx,v $
*
- * $Revision: 1.25 $
+ * $Revision: 1.26 $
*
- * last change: $Author: oj $ $Date: 2001-07-24 13:25:25 $
+ * last change: $Author: oj $ $Date: 2001-09-20 12:59:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -477,6 +477,9 @@ void OCacheSet::setParameter(sal_Int32 nPos,Reference< XParameters > _xParameter
case DataType::NUMERIC:
_xParameter->setString(nPos,_rValue);
break;
+ case DataType::BIGINT:
+ _xParameter->setLong(nPos,_rValue);
+ break;
case DataType::BIT:
_xParameter->setBoolean(nPos,_rValue);
break;
@@ -551,6 +554,9 @@ void OCacheSet::fillValueRow(ORowSetRow& _rRow,sal_Int32 _nPosition)
case DataType::NUMERIC:
(*aIter) = getString(i);
break;
+ case DataType::BIGINT:
+ (*aIter) = getLong(i);
+ break;
case DataType::FLOAT:
(*aIter) = getFloat(i);
break;
diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx
index 18bcafe50572..ed20b5da4666 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: KeySet.cxx,v $
*
- * $Revision: 1.25 $
+ * $Revision: 1.26 $
*
- * last change: $Author: hr $ $Date: 2001-09-13 10:38:45 $
+ * last change: $Author: oj $ $Date: 2001-09-20 12:56:18 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -862,6 +862,9 @@ void SAL_CALL OKeySet::refreshRow() throw(SQLException, RuntimeException)
case DataType::NUMERIC:
xParameter->setString(nPos,*aExternParamIter);
break;
+ case DataType::BIGINT:
+ xParameter->setLong(nPos,*aExternParamIter);
+ break;
case DataType::FLOAT:
xParameter->setFloat(nPos,*aExternParamIter);
break;
@@ -924,6 +927,9 @@ void SAL_CALL OKeySet::refreshRow() throw(SQLException, RuntimeException)
case DataType::NUMERIC:
xParameter->setString(nPos,*aIter);
break;
+ case DataType::BIGINT:
+ xParameter->setLong(nPos,*aIter);
+ break;
case DataType::FLOAT:
xParameter->setFloat(nPos,*aIter);
break;
@@ -1004,6 +1010,9 @@ sal_Bool OKeySet::fetchRow()
case DataType::NUMERIC:
(*aIter) = m_xDriverRow->getString(aPosIter->second);
break;
+ case DataType::BIGINT:
+ (*aIter) = m_xDriverRow->getLong(aPosIter->second);
+ break;
case DataType::FLOAT:
(*aIter) = m_xDriverRow->getFloat(aPosIter->second);
break;
@@ -1254,6 +1263,9 @@ namespace dbaccess
/*------------------------------------------------------------------------
$Log: not supported by cvs2svn $
+ Revision 1.25 2001/09/13 10:38:45 hr
+ #92075#: can't take address from temporary
+
Revision 1.24 2001/08/14 11:51:34 oj
#91006# check index values as well
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx
index e9e2c87784ef..a730bbcca660 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: RowSet.cxx,v $
*
- * $Revision: 1.91 $
+ * $Revision: 1.92 $
*
- * last change: $Author: oj $ $Date: 2001-09-18 11:24:33 $
+ * last change: $Author: oj $ $Date: 2001-09-20 12:56:18 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -771,7 +771,7 @@ void SAL_CALL ORowSet::updateInt( sal_Int32 columnIndex, sal_Int32 x ) throw(SQL
// -------------------------------------------------------------------------
void SAL_CALL ORowSet::updateLong( sal_Int32 columnIndex, sal_Int64 x ) throw(SQLException, RuntimeException)
{
- updateValue(columnIndex,(double)x);
+ updateValue(columnIndex,x);
}
// -------------------------------------------------------------------------
void SAL_CALL ORowSet::updateFloat( sal_Int32 columnIndex, float x ) throw(SQLException, RuntimeException)
@@ -1618,6 +1618,8 @@ void ORowSet::execute_NoApprove_NoNewConn(ClearableMutexGuard& _rClearForNotific
pColumn->setFastPropertyValue_NoBroadcast(PROPERTY_ID_HIDDEN,xColumn->getPropertyValue(PROPERTY_HIDDEN));
if(xInfo.is() && xInfo->hasPropertyByName(PROPERTY_CONTROLMODEL))
pColumn->setFastPropertyValue_NoBroadcast(PROPERTY_ID_CONTROLMODEL,xColumn->getPropertyValue(PROPERTY_CONTROLMODEL));
+ if(xInfo.is() && xInfo->hasPropertyByName(PROPERTY_HELPTEXT))
+ pColumn->setFastPropertyValue_NoBroadcast(PROPERTY_ID_HELPTEXT,xColumn->getPropertyValue(PROPERTY_HELPTEXT));
}
catch(Exception&)
{
@@ -1996,7 +1998,7 @@ void SAL_CALL ORowSet::setInt( sal_Int32 parameterIndex, sal_Int32 x ) throw(SQL
// -------------------------------------------------------------------------
void SAL_CALL ORowSet::setLong( sal_Int32 parameterIndex, sal_Int64 x ) throw(SQLException, RuntimeException)
{
- setParameter(parameterIndex,(double)x);
+ setParameter(parameterIndex,x);
}
// -------------------------------------------------------------------------
void SAL_CALL ORowSet::setFloat( sal_Int32 parameterIndex, float x ) throw(SQLException, RuntimeException)
@@ -2218,6 +2220,7 @@ ORowSetClone::ORowSetClone(ORowSet& rParent,::osl::Mutex& _rMutex)
pColumn->setFastPropertyValue_NoBroadcast(PROPERTY_ID_WIDTH,xColumn->getPropertyValue(PROPERTY_WIDTH));
pColumn->setFastPropertyValue_NoBroadcast(PROPERTY_ID_HIDDEN,xColumn->getPropertyValue(PROPERTY_HIDDEN));
pColumn->setFastPropertyValue_NoBroadcast(PROPERTY_ID_CONTROLMODEL,xColumn->getPropertyValue(PROPERTY_CONTROLMODEL));
+ pColumn->setFastPropertyValue_NoBroadcast(PROPERTY_ID_HELPTEXT,xColumn->getPropertyValue(PROPERTY_HELPTEXT));
}
m_pColumns = new ORowSetDataColumns(rParent.m_xActiveConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers(),
diff --git a/dbaccess/source/core/api/column.cxx b/dbaccess/source/core/api/column.cxx
index bd568eed5d63..45a6a6f63853 100644
--- a/dbaccess/source/core/api/column.cxx
+++ b/dbaccess/source/core/api/column.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: column.cxx,v $
*
- * $Revision: 1.32 $
+ * $Revision: 1.33 $
*
- * last change: $Author: fs $ $Date: 2001-08-30 14:51:08 $
+ * last change: $Author: oj $ $Date: 2001-09-20 12:56:18 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -359,6 +359,9 @@ void OColumnSettings::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) con
case PROPERTY_ID_CONTROLMODEL:
rValue <<= m_xControlModel;
break;
+ case PROPERTY_ID_HELPTEXT:
+ rValue = m_aHelpText;
+ break;
}
}
@@ -405,6 +408,10 @@ sal_Bool OColumnSettings::convertFastPropertyValue(
}
}
break;
+ case PROPERTY_ID_HELPTEXT:
+ bModified = ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, m_aHelpText,
+ ::getCppuType(static_cast< ::rtl::OUString* >(NULL)));
+ break;
}
return bModified;
}
@@ -443,6 +450,11 @@ void OColumnSettings::setFastPropertyValue_NoBroadcast(
"OColumnSettings::setFastPropertyValue_NoBroadcast(HIDDEN) : invalid value !");
m_bHidden = ::comphelper::getBOOL(rValue);
break;
+ case PROPERTY_ID_HELPTEXT:
+ OSL_ENSURE(!rValue.hasValue() || rValue.getValueType().equals(::getCppuType(static_cast< ::rtl::OUString* >(NULL))),
+ "OColumnSettings::setFastPropertyValue_NoBroadcast(ID_RELATIVEPOSITION) : invalid value !");
+ m_aHelpText = rValue;
+ break;
}
}
@@ -454,6 +466,7 @@ sal_Bool OColumnSettings::isDefaulted() const
&& !m_aWidth.hasValue()
&& !m_aFormatKey.hasValue()
&& !m_aRelativePosition.hasValue()
+ && !m_aHelpText.hasValue()
&& !m_bHidden;
}
@@ -535,6 +548,8 @@ sal_Bool OColumnSettings::writeUITo(const OConfigurationNode& _rConfigNode, cons
_rConfigNode.setNodeValue( CONFIGKEY_FORMATSTRING, aPersistentFormatString );
_rConfigNode.setNodeValue( CONFIGKEY_FORMATLOCALE, aPersistentFomatLocale );
+ _rConfigNode.setNodeValue( CONFIGKEY_COLUMN_HELPTEXT, m_aHelpText );
+
return sal_True;
}
@@ -549,11 +564,13 @@ void OColumnSettings::readUIFrom(const OConfigurationNode& _rConfigNode, const R
m_aFormatKey.clear();
m_aWidth.clear();
m_aAlignment.clear();
+ m_aHelpText.clear();
m_aAlignment = _rConfigNode.getNodeValue(CONFIGKEY_COLUMN_ALIGNMENT);
m_aWidth = _rConfigNode.getNodeValue(CONFIGKEY_COLUMN_WIDTH);
m_aRelativePosition = _rConfigNode.getNodeValue(CONFIGKEY_COLUMN_RELPOSITION);
m_bHidden = ::cppu::any2bool(_rConfigNode.getNodeValue(CONFIGKEY_COLUMN_HIDDEN));
+ m_aHelpText = _rConfigNode.getNodeValue(CONFIGKEY_COLUMN_HELPTEXT);
// the format key is somewhat more complicated
m_aFormatKey = _rConfigNode.getNodeValue( CONFIGKEY_COLUMN_NUMBERFORMAT );
diff --git a/dbaccess/source/core/api/definitioncolumn.cxx b/dbaccess/source/core/api/definitioncolumn.cxx
index 46652a66f634..b34c50b5bfb8 100644
--- a/dbaccess/source/core/api/definitioncolumn.cxx
+++ b/dbaccess/source/core/api/definitioncolumn.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: definitioncolumn.cxx,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: oj $ $Date: 2001-08-15 13:04:23 $
+ * last change: $Author: oj $ $Date: 2001-09-20 12:56:18 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -137,12 +137,13 @@ Sequence< ::rtl::OUString > OTableColumnDescriptor::getSupportedServiceNames( )
//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper* OTableColumnDescriptor::createArrayHelper( ) const
{
- BEGIN_PROPERTY_HELPER(17)
+ BEGIN_PROPERTY_HELPER(18)
DECL_PROP1(ALIGN, sal_Int32, MAYBEVOID);
DECL_PROP0_IFACE(CONTROLMODEL, XPropertySet );
DECL_PROP0(DEFAULTVALUE, ::rtl::OUString );
DECL_PROP0(DESCRIPTION, ::rtl::OUString );
DECL_PROP1(NUMBERFORMAT, sal_Int32 ,MAYBEVOID);
+ DECL_PROP0(HELPTEXT, ::rtl::OUString );
DECL_PROP0_BOOL(HIDDEN );
DECL_PROP0_BOOL(ISAUTOINCREMENT );
DECL_PROP0_BOOL(ISCURRENCY );
@@ -405,12 +406,13 @@ Sequence< ::rtl::OUString > OTableColumn::getSupportedServiceNames( ) throw (Ru
//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper* OTableColumn::createArrayHelper( ) const
{
- BEGIN_PROPERTY_HELPER(17)
+ BEGIN_PROPERTY_HELPER(18)
DECL_PROP2(ALIGN, sal_Int32, BOUND, MAYBEVOID);
DECL_PROP1_IFACE(CONTROLMODEL, XPropertySet , BOUND);
DECL_PROP1(DEFAULTVALUE, ::rtl::OUString, READONLY);
DECL_PROP1(DESCRIPTION, ::rtl::OUString, READONLY);
DECL_PROP2(NUMBERFORMAT, sal_Int32, BOUND, MAYBEVOID);
+ DECL_PROP0(HELPTEXT, ::rtl::OUString );
DECL_PROP1_BOOL(HIDDEN, BOUND);
DECL_PROP1_BOOL(ISAUTOINCREMENT, READONLY);
DECL_PROP1_BOOL(ISCURRENCY, READONLY);
@@ -565,7 +567,7 @@ Sequence< ::rtl::OUString > OTableColumnDescriptorWrapper::getSupportedServiceNa
::cppu::IPropertyArrayHelper* OTableColumnDescriptorWrapper::createArrayHelper( sal_Int32 nId ) const
{
// BEGIN_PROPERTY_HELPER(17)
- sal_Int32 nPropertyCount = 14;
+ sal_Int32 nPropertyCount = 15;
// How many properties do we have?
// Which optional properties are contained?
if (nId & HAS_DESCRIPTION)
@@ -593,6 +595,7 @@ Sequence< ::rtl::OUString > OTableColumnDescriptorWrapper::getSupportedServiceNa
}
DECL_PROP1(NUMBERFORMAT, sal_Int32, MAYBEVOID);
+ DECL_PROP0(HELPTEXT, ::rtl::OUString );
DECL_PROP0_BOOL(HIDDEN );
DECL_PROP0_BOOL(ISAUTOINCREMENT );
DECL_PROP0_BOOL(ISCURRENCY );
@@ -631,6 +634,7 @@ void OTableColumnDescriptorWrapper::getFastPropertyValue( Any& rValue, sal_Int32
case PROPERTY_ID_WIDTH:
case PROPERTY_ID_HIDDEN:
case PROPERTY_ID_CONTROLMODEL:
+ case PROPERTY_ID_HELPTEXT:
OColumnSettings::getFastPropertyValue( rValue, nHandle );
break;
default:
@@ -665,6 +669,7 @@ sal_Bool OTableColumnDescriptorWrapper::convertFastPropertyValue(
case PROPERTY_ID_WIDTH:
case PROPERTY_ID_HIDDEN:
case PROPERTY_ID_CONTROLMODEL:
+ case PROPERTY_ID_HELPTEXT:
bModified = OColumnSettings::convertFastPropertyValue( rConvertedValue, rOldValue, nHandle, rValue );
break;
default:
@@ -688,6 +693,7 @@ void OTableColumnDescriptorWrapper::setFastPropertyValue_NoBroadcast(
case PROPERTY_ID_WIDTH:
case PROPERTY_ID_HIDDEN:
case PROPERTY_ID_CONTROLMODEL:
+ case PROPERTY_ID_HELPTEXT:
OColumnSettings::setFastPropertyValue_NoBroadcast( nHandle, rValue );
break;
default:
@@ -741,7 +747,7 @@ Sequence< ::rtl::OUString > OTableColumnWrapper::getSupportedServiceNames( ) th
::cppu::IPropertyArrayHelper* OTableColumnWrapper::createArrayHelper( sal_Int32 nId ) const
{
// BEGIN_PROPERTY_HELPER(17)
- sal_Int32 nPropertyCount = 14;
+ sal_Int32 nPropertyCount = 15;
// How many properties do we have?
// Which optional properties are contained?
if (nId & HAS_DESCRIPTION)
@@ -769,6 +775,7 @@ Sequence< ::rtl::OUString > OTableColumnWrapper::getSupportedServiceNames( ) th
}
DECL_PROP2(NUMBERFORMAT, sal_Int32, BOUND, MAYBEVOID);
+ DECL_PROP0(HELPTEXT, ::rtl::OUString );
DECL_PROP1_BOOL(HIDDEN, BOUND);
DECL_PROP1_BOOL(ISAUTOINCREMENT, READONLY);
DECL_PROP1_BOOL(ISCURRENCY, READONLY);
diff --git a/dbaccess/source/core/api/tablecontainer.cxx b/dbaccess/source/core/api/tablecontainer.cxx
index 5fa23f10c7ae..dfe795ad9e14 100644
--- a/dbaccess/source/core/api/tablecontainer.cxx
+++ b/dbaccess/source/core/api/tablecontainer.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: tablecontainer.cxx,v $
*
- * $Revision: 1.35 $
+ * $Revision: 1.36 $
*
- * last change: $Author: oj $ $Date: 2001-09-19 13:20:46 $
+ * last change: $Author: oj $ $Date: 2001-09-20 12:56:18 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -620,8 +620,8 @@ void SAL_CALL OTableContainer::appendByDescriptor( const Reference< XPropertySet
{
::rtl::OUString sTypeName2Cmp = xRow->getString(1);
sal_Int32 nType = xRow->getShort(2);
- ::rtl::OUString sLiteralPre = xRow->getString(4);
- if( sTypeName.equalsIgnoreAsciiCase(sTypeName2Cmp) && nType == nDataType && sLiteralPre.getLength() && !xRow->wasNull())
+ ::rtl::OUString sCreateParams = xRow->getString(6);
+ if( sTypeName.equalsIgnoreAsciiCase(sTypeName2Cmp) && nType == nDataType && sCreateParams.getLength() && !xRow->wasNull())
{
bUseLiteral = sal_True;
break;
diff --git a/dbaccess/source/core/inc/column.hxx b/dbaccess/source/core/inc/column.hxx
index 1488b85ed79e..1a9304cf1762 100644
--- a/dbaccess/source/core/inc/column.hxx
+++ b/dbaccess/source/core/inc/column.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: column.hxx,v $
*
- * $Revision: 1.15 $
+ * $Revision: 1.16 $
*
- * last change: $Author: fs $ $Date: 2001-08-30 07:54:53 $
+ * last change: $Author: oj $ $Date: 2001-09-20 12:56:18 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -235,6 +235,7 @@ namespace dbaccess
::com::sun::star::uno::Any m_aFormatKey; // sal_Int32 or void
::com::sun::star::uno::Any m_aRelativePosition; // sal_Int32 or void
::com::sun::star::uno::Any m_aAlignment; // sal_Int32 (::com::sun::star::awt::TextAlign) or void
+ ::com::sun::star::uno::Any m_aHelpText; // the description of the column which is visible in the helptext of the column
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
m_xControlModel;
diff --git a/dbaccess/source/inc/dbastrings.hrc b/dbaccess/source/inc/dbastrings.hrc
index b66ffa9c84f5..fc0fa1e98761 100644
--- a/dbaccess/source/inc/dbastrings.hrc
+++ b/dbaccess/source/inc/dbastrings.hrc
@@ -2,9 +2,9 @@
*
* $RCSfile: dbastrings.hrc,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: fs $ $Date: 2001-08-30 16:13:32 $
+ * last change: $Author: oj $ $Date: 2001-09-20 12:56:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -138,6 +138,7 @@ namespace dbaccess
DECLARE_CONSTASCII_USTRING(CONFIGKEY_COLUMN_RELPOSITION);
DECLARE_CONSTASCII_USTRING(CONFIGKEY_COLUMN_HIDDEN);
DECLARE_CONSTASCII_USTRING(CONFIGKEY_LAYOUTINFORMATION);
+ DECLARE_CONSTASCII_USTRING(CONFIGKEY_COLUMN_HELPTEXT);
}
diff --git a/dbaccess/source/inc/stringconstants.hrc b/dbaccess/source/inc/stringconstants.hrc
index 9836bfe4ff49..283271aba4d0 100644
--- a/dbaccess/source/inc/stringconstants.hrc
+++ b/dbaccess/source/inc/stringconstants.hrc
@@ -2,9 +2,9 @@
*
* $RCSfile: stringconstants.hrc,v $
*
- * $Revision: 1.27 $
+ * $Revision: 1.28 $
*
- * last change: $Author: fs $ $Date: 2001-06-15 08:36:56 $
+ * last change: $Author: oj $ $Date: 2001-09-20 12:56:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -168,6 +168,7 @@
#define PROPERTY_ID_TEXTLINECOLOR 94
#define PROPERTY_ID_TEXTEMPHASIS 95
#define PROPERTY_ID_TEXTRELIEF 96
+#define PROPERTY_ID_HELPTEXT 97
//============================================================
//= property names
@@ -285,7 +286,7 @@ DECLARE_CONSTASCII_USTRING(PROPERTY_CREATEVIEW);
DECLARE_CONSTASCII_USTRING(PROPERTY_TEXTLINECOLOR);
DECLARE_CONSTASCII_USTRING(PROPERTY_TEXTEMPHASIS);
DECLARE_CONSTASCII_USTRING(PROPERTY_TEXTRELIEF);
-
+DECLARE_CONSTASCII_USTRING(PROPERTY_HELPTEXT);
//============================================================
//= service names
//============================================================
diff --git a/dbaccess/source/shared/dbastrings.cxx b/dbaccess/source/shared/dbastrings.cxx
index 4bdad704c56b..75a496bfaab9 100644
--- a/dbaccess/source/shared/dbastrings.cxx
+++ b/dbaccess/source/shared/dbastrings.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: dbastrings.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: fs $ $Date: 2001-08-30 16:13:59 $
+ * last change: $Author: oj $ $Date: 2001-09-20 12:56:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -126,6 +126,7 @@ namespace dbaccess
IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_FORMATLOCALE, "FormatLocale");
IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_COLUMN_RELPOSITION, "Position");
IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_COLUMN_HIDDEN, "Hidden");
+ IMPLEMENT_CONSTASCII_USTRING(CONFIGKEY_COLUMN_HELPTEXT, "HelpText");
//============================================================
//= SQLSTATE
diff --git a/dbaccess/source/ui/browser/dsEntriesNoExp.cxx b/dbaccess/source/ui/browser/dsEntriesNoExp.cxx
new file mode 100644
index 000000000000..3b8e71f77e1a
--- /dev/null
+++ b/dbaccess/source/ui/browser/dsEntriesNoExp.cxx
@@ -0,0 +1,224 @@
+/*************************************************************************
+ *
+ * $RCSfile: dsEntriesNoExp.cxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: oj $ $Date: 2001-09-20 12:57:49 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an AS IS basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SBA_UNODATBR_HXX_
+#include "unodatbr.hxx"
+#endif
+#ifndef DBACCESS_UI_BROWSER_ID_HXX
+#include "browserids.hxx"
+#endif
+#ifndef _DBAUI_LISTVIEWITEMS_HXX_
+#include "listviewitems.hxx"
+#endif
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+#ifndef DBACCESS_UI_DBTREEVIEW_HXX
+#include "dbtreeview.hxx"
+#endif
+#ifndef DBAUI_DBTREELISTBOX_HXX
+#include "dbtreelistbox.hxx"
+#endif
+#ifndef _DBU_RESOURCE_HRC_
+#include "dbu_resource.hrc"
+#endif
+#ifndef DBAUI_DBTREEMODEL_HXX
+#include "dbtreemodel.hxx"
+#endif
+
+using namespace ::dbtools;
+using namespace ::svx;
+
+// .........................................................................
+namespace dbaui
+{
+// .........................................................................
+// -----------------------------------------------------------------------------
+SbaTableQueryBrowser::EntryType SbaTableQueryBrowser::getChildType( SvLBoxEntry* _pEntry )
+{
+ DBG_ASSERT(isContainer(_pEntry), "SbaTableQueryBrowser::getChildType: invalid entry!");
+ switch (getEntryType(_pEntry))
+ {
+ case etTableContainer:
+ return etTable;
+ case etQueryContainer:
+ return etQuery;
+ case etBookmarkContainer:
+ return etBookmark;
+ }
+ return etUnknown;
+}
+
+// -----------------------------------------------------------------------------
+String SbaTableQueryBrowser::GetEntryText( SvLBoxEntry* _pEntry )
+{
+ return m_pTreeView->getListBox()->GetEntryText(_pEntry);
+}
+
+// -----------------------------------------------------------------------------
+SbaTableQueryBrowser::EntryType SbaTableQueryBrowser::getEntryType( SvLBoxEntry* _pEntry )
+{
+ if (!_pEntry)
+ return etUnknown;
+
+ SvLBoxEntry* pRootEntry = m_pTreeView->getListBox()->GetRootLevelParent(_pEntry);
+ SvLBoxEntry* pEntryParent = m_pTreeView->getListBox()->GetParent(_pEntry);
+ SvLBoxEntry* pTables = m_pTreeView->getListBox()->GetEntry(pRootEntry, CONTAINER_TABLES);
+ SvLBoxEntry* pQueries = m_pTreeView->getListBox()->GetEntry(pRootEntry, CONTAINER_QUERIES);
+ SvLBoxEntry* pBookmarks = m_pTreeView->getListBox()->GetEntry(pRootEntry, CONTAINER_BOOKMARKS);
+
+#ifdef DBG_UTIL
+ String sTest;
+ if (pTables) sTest = m_pTreeView->getListBox()->GetEntryText(pTables);
+ if (pQueries) sTest = m_pTreeView->getListBox()->GetEntryText(pQueries);
+ if (pBookmarks) sTest = m_pTreeView->getListBox()->GetEntryText(pBookmarks);
+#endif
+
+ if (pRootEntry == _pEntry)
+ return etDatasource;
+
+ if (pTables == _pEntry)
+ return etTableContainer;
+
+ if (pQueries == _pEntry)
+ return etQueryContainer;
+
+ if (pBookmarks == _pEntry)
+ return etBookmarkContainer;
+
+ if (pTables == pEntryParent)
+ return etTable;
+
+ if (pQueries == pEntryParent)
+ return etQuery;
+
+ if (pBookmarks == pEntryParent)
+ return etBookmark;
+
+ return etUnknown;
+}
+//------------------------------------------------------------------------------
+void SbaTableQueryBrowser::select(SvLBoxEntry* _pEntry, sal_Bool _bSelect)
+{
+ SvLBoxItem* pTextItem = _pEntry ? _pEntry->GetFirstItem(SV_ITEM_ID_BOLDLBSTRING) : NULL;
+ if (pTextItem)
+ {
+ static_cast<OBoldListboxString*>(pTextItem)->emphasize(_bSelect);
+ m_pTreeModel->InvalidateEntry(_pEntry);
+ }
+ else
+ DBG_ERROR("SbaTableQueryBrowser::select: invalid entry!");
+}
+
+//------------------------------------------------------------------------------
+void SbaTableQueryBrowser::selectPath(SvLBoxEntry* _pEntry, sal_Bool _bSelect)
+{
+ while (_pEntry)
+ {
+ select(_pEntry, _bSelect);
+ _pEntry = m_pTreeModel->GetParent(_pEntry);
+ }
+}
+//------------------------------------------------------------------------------
+sal_Bool SbaTableQueryBrowser::isSelected(SvLBoxEntry* _pEntry) const
+{
+ SvLBoxItem* pTextItem = _pEntry ? _pEntry->GetFirstItem(SV_ITEM_ID_BOLDLBSTRING) : NULL;
+ if (pTextItem)
+ return static_cast<OBoldListboxString*>(pTextItem)->isEmphasized();
+ else
+ DBG_ERROR("SbaTableQueryBrowser::isSelected: invalid entry!");
+ return sal_False;
+}
+//------------------------------------------------------------------------------
+void SbaTableQueryBrowser::AddSupportedFeatures()
+{
+ SbaXDataBrowserController::AddSupportedFeatures();
+
+ m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:Title")] = ID_BROWSER_TITLE;
+ m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:DataSourceBrowser/FormLetter")] = ID_BROWSER_FORMLETTER;
+ m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:DataSourceBrowser/InsertColumns")] = ID_BROWSER_INSERTCOLUMNS;
+ m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:DataSourceBrowser/InsertContent")] = ID_BROWSER_INSERTCONTENT;
+ m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:DataSourceBrowser/ToggleExplore")] = ID_BROWSER_EXPLORER;
+ m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:DataSourceBrowser/DocumentDataSource")] = ID_BROWSER_DOCUMENT_DATASOURCE;
+
+ // TODO reenable our own code if we really have a handling for the formslots
+// ControllerFeature( ::rtl::OUString::createFromAscii("private:FormSlot/moveToFirst"), SID_FM_RECORD_FIRST ),
+// ControllerFeature( ::rtl::OUString::createFromAscii("private:FormSlot/moveToLast"), SID_FM_RECORD_LAST ),
+// ControllerFeature( ::rtl::OUString::createFromAscii("private:FormSlot/moveToNew"), SID_FM_RECORD_NEW ),
+// ControllerFeature( ::rtl::OUString::createFromAscii("private:FormSlot/moveToNext"), SID_FM_RECORD_NEXT ),
+// ControllerFeature( ::rtl::OUString::createFromAscii("private:FormSlot/moveToPrev"), SID_FM_RECORD_PREV )
+
+}
+// -------------------------------------------------------------------------
+String SbaTableQueryBrowser::getURL() const
+{
+ return String();
+}
+//------------------------------------------------------------------------------
+ToolBox* SbaTableQueryBrowser::CreateToolBox(Window* _pParent)
+{
+ return new ToolBox( _pParent, ModuleRes( RID_BRW_QRY_TOOLBOX ) );
+}
+
+// .........................................................................
+} // namespace dbaui
+// .........................................................................
+
diff --git a/dbaccess/source/ui/browser/dsbrowserDnD.cxx b/dbaccess/source/ui/browser/dsbrowserDnD.cxx
index 13f29d2521c6..19107812f01b 100644
--- a/dbaccess/source/ui/browser/dsbrowserDnD.cxx
+++ b/dbaccess/source/ui/browser/dsbrowserDnD.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: dsbrowserDnD.cxx,v $
*
- * $Revision: 1.27 $
+ * $Revision: 1.28 $
*
- * last change: $Author: oj $ $Date: 2001-08-27 06:57:24 $
+ * last change: $Author: oj $ $Date: 2001-09-20 12:56:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -858,9 +858,11 @@ namespace dbaui
break;
case DataType::DECIMAL:
case DataType::NUMERIC:
- case DataType::BIGINT:
xParameter->setDouble(nPos,xRow->getDouble(i));
break;
+ case DataType::BIGINT:
+ xParameter->setLong(nPos,xRow->getLong(i));
+ break;
case DataType::FLOAT:
xParameter->setFloat(nPos,xRow->getFloat(i));
break;
@@ -1076,6 +1078,9 @@ namespace dbaui
/*************************************************************************
* history:
* $Log: not supported by cvs2svn $
+ * Revision 1.27 2001/08/27 06:57:24 oj
+ * #90015# some speedup's
+ *
* Revision 1.26 2001/08/24 06:31:34 oj
* #90015# code corrcetions for some speedup's
*
diff --git a/dbaccess/source/ui/browser/makefile.mk b/dbaccess/source/ui/browser/makefile.mk
index 6715adb3bfae..bbff079235ce 100644
--- a/dbaccess/source/ui/browser/makefile.mk
+++ b/dbaccess/source/ui/browser/makefile.mk
@@ -2,9 +2,9 @@
#
# $RCSfile: makefile.mk,v $
#
-# $Revision: 1.9 $
+# $Revision: 1.10 $
#
-# last change: $Author: vg $ $Date: 2001-08-30 15:07:14 $
+# last change: $Author: oj $ $Date: 2001-09-20 12:56:17 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
@@ -72,7 +72,6 @@ IMGLST_SRS=$(SRS)$/$(TARGET).srs
# --- Files --------------------------------------------------------
EXCEPTIONSFILES=\
- $(SLO)$/dbtreemodel.obj \
$(SLO)$/dsbrowserDnD.obj \
$(SLO)$/dataview.obj \
$(SLO)$/genericcontroller.obj \
@@ -90,7 +89,9 @@ EXCEPTIONSFILES=\
SLOFILES =\
$(EXCEPTIONSFILES)\
- $(SLO)$/AsyncronousLink.obj
+ $(SLO)$/dsEntriesNoExp.obj \
+ $(SLO)$/dbtreemodel.obj \
+ $(SLO)$/AsyncronousLink.obj
SRCFILES = sbabrw.src \
sbagrid.src
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx
index fe0552be5526..ecfd43a9545a 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: sbagrid.cxx,v $
*
- * $Revision: 1.47 $
+ * $Revision: 1.48 $
*
- * last change: $Author: hr $ $Date: 2001-09-13 14:15:52 $
+ * last change: $Author: oj $ $Date: 2001-09-20 12:56:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -259,6 +259,9 @@
#ifndef _VCL_STDTEXT_HXX
#include <vcl/stdtext.hxx>
#endif
+#ifndef DBAUI_TOOLS_HXX
+#include "UITools.hxx"
+#endif
using namespace ::com::sun::star::ui::dialogs;
using namespace ::com::sun::star::uno;
@@ -1293,21 +1296,7 @@ void SbaGridControl::SetColAttrs(sal_uInt16 nColId)
// horizontal justify
SFX_ITEMSET_GET(*pSet, pHorJustify, SvxHorJustifyItem, SBA_ATTR_ALIGN_HOR_JUSTIFY, sal_True);
- SvxCellHorJustify eHorJustify = (SvxCellHorJustify)pHorJustify->GetValue();
- Any aTextAlign;
- switch (eHorJustify)
- {
- case SVX_HOR_JUSTIFY_LEFT:
- aTextAlign <<= (sal_Int16)::com::sun::star::awt::TextAlign::LEFT;
- break;
- case SVX_HOR_JUSTIFY_CENTER:
- aTextAlign <<= (sal_Int16)::com::sun::star::awt::TextAlign::CENTER;
- break;
- case SVX_HOR_JUSTIFY_RIGHT:
- aTextAlign <<= (sal_Int16)::com::sun::star::awt::TextAlign::RIGHT;
- break;
- }
- xAffectedCol->setPropertyValue(PROPERTY_ALIGN, aTextAlign);
+ xAffectedCol->setPropertyValue(PROPERTY_ALIGN, makeAny(dbaui::mapTextAllign((SvxCellHorJustify)pHorJustify->GetValue())));
// format key
if (nFlags & TP_ATTR_NUMBER)
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 3093e00d2ed6..ffc339ecdbe7 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: unodatbr.cxx,v $
*
- * $Revision: 1.107 $
+ * $Revision: 1.108 $
*
- * last change: $Author: oj $ $Date: 2001-09-19 13:20:12 $
+ * last change: $Author: oj $ $Date: 2001-09-20 12:56:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -759,9 +759,10 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun::
// ... the 'comment' property as helptext (will usually be shown as header-tooltip)
Any aDescription; aDescription <<= ::rtl::OUString();
- if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_DESCRIPTION))
- aDescription <<= comphelper::getString(xColumn->getPropertyValue(PROPERTY_DESCRIPTION));
- xCurrentCol->setPropertyValue(PROPERTY_HELPTEXT, xColumn->getPropertyValue(PROPERTY_DESCRIPTION));
+ if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_HELPTEXT))
+ aDescription <<= comphelper::getString(xColumn->getPropertyValue(PROPERTY_HELPTEXT));
+
+ xCurrentCol->setPropertyValue(PROPERTY_HELPTEXT, aDescription);
xColContainer->insertByName(*pBegin, makeAny(xCurrentCol));
}
@@ -776,13 +777,6 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun::
return sal_True;
}
-
-//------------------------------------------------------------------------------
-ToolBox* SbaTableQueryBrowser::CreateToolBox(Window* _pParent)
-{
- return new ToolBox( _pParent, ModuleRes( RID_BRW_QRY_TOOLBOX ) );
-}
-
// -----------------------------------------------------------------------------
Reference<XPropertySet> getColumnHelper(SvLBoxEntry* _pCurrentlyDisplayed,const Reference<XPropertySet>& _rxSource)
{
@@ -1388,12 +1382,6 @@ void SbaTableQueryBrowser::ColumnChanged()
}
SbaXDataBrowserController::ColumnChanged();
}
-
-// -------------------------------------------------------------------------
-String SbaTableQueryBrowser::getURL() const
-{
- return String();
-}
// -----------------------------------------------------------------------
void SbaTableQueryBrowser::InvalidateFeature(sal_uInt16 nId, const Reference< ::com::sun::star::frame::XStatusListener > & xListener)
{
@@ -1450,28 +1438,6 @@ void SbaTableQueryBrowser::LoadFinished(sal_Bool _bWasSynch)
while (aIter.hasMoreElements())
static_cast< XSelectionChangeListener* >(aIter.next())->selectionChanged(aEvt);
}
-
-//------------------------------------------------------------------------------
-void SbaTableQueryBrowser::AddSupportedFeatures()
-{
- SbaXDataBrowserController::AddSupportedFeatures();
-
- m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:Title")] = ID_BROWSER_TITLE;
- m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:DataSourceBrowser/FormLetter")] = ID_BROWSER_FORMLETTER;
- m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:DataSourceBrowser/InsertColumns")] = ID_BROWSER_INSERTCOLUMNS;
- m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:DataSourceBrowser/InsertContent")] = ID_BROWSER_INSERTCONTENT;
- m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:DataSourceBrowser/ToggleExplore")] = ID_BROWSER_EXPLORER;
- m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:DataSourceBrowser/DocumentDataSource")] = ID_BROWSER_DOCUMENT_DATASOURCE;
-
- // TODO reenable our own code if we really have a handling for the formslots
-// ControllerFeature( ::rtl::OUString::createFromAscii("private:FormSlot/moveToFirst"), SID_FM_RECORD_FIRST ),
-// ControllerFeature( ::rtl::OUString::createFromAscii("private:FormSlot/moveToLast"), SID_FM_RECORD_LAST ),
-// ControllerFeature( ::rtl::OUString::createFromAscii("private:FormSlot/moveToNew"), SID_FM_RECORD_NEW ),
-// ControllerFeature( ::rtl::OUString::createFromAscii("private:FormSlot/moveToNext"), SID_FM_RECORD_NEXT ),
-// ControllerFeature( ::rtl::OUString::createFromAscii("private:FormSlot/moveToPrev"), SID_FM_RECORD_PREV )
-
-}
-
//------------------------------------------------------------------------------
FeatureState SbaTableQueryBrowser::GetState(sal_uInt16 nId)
{
@@ -2115,41 +2081,6 @@ sal_Bool SbaTableQueryBrowser::ensureEntryObject( SvLBoxEntry* _pEntry )
return pEntryData->xObject.is();
}
-
-//------------------------------------------------------------------------------
-sal_Bool SbaTableQueryBrowser::isSelected(SvLBoxEntry* _pEntry) const
-{
- SvLBoxItem* pTextItem = _pEntry ? _pEntry->GetFirstItem(SV_ITEM_ID_BOLDLBSTRING) : NULL;
- if (pTextItem)
- return static_cast<OBoldListboxString*>(pTextItem)->isEmphasized();
- else
- DBG_ERROR("SbaTableQueryBrowser::isSelected: invalid entry!");
- return sal_False;
-}
-
-//------------------------------------------------------------------------------
-void SbaTableQueryBrowser::select(SvLBoxEntry* _pEntry, sal_Bool _bSelect)
-{
- SvLBoxItem* pTextItem = _pEntry ? _pEntry->GetFirstItem(SV_ITEM_ID_BOLDLBSTRING) : NULL;
- if (pTextItem)
- {
- static_cast<OBoldListboxString*>(pTextItem)->emphasize(_bSelect);
- m_pTreeModel->InvalidateEntry(_pEntry);
- }
- else
- DBG_ERROR("SbaTableQueryBrowser::select: invalid entry!");
-}
-
-//------------------------------------------------------------------------------
-void SbaTableQueryBrowser::selectPath(SvLBoxEntry* _pEntry, sal_Bool _bSelect)
-{
- while (_pEntry)
- {
- select(_pEntry, _bSelect);
- _pEntry = m_pTreeModel->GetParent(_pEntry);
- }
-}
-
//------------------------------------------------------------------------------
IMPL_LINK(SbaTableQueryBrowser, OnEntryDoubleClicked, SvLBoxEntry*, _pEntry)
{
@@ -3900,70 +3831,6 @@ sal_Bool SbaTableQueryBrowser::requestContextMenu( const CommandEvent& _rEvent )
return sal_True; // handled
}
-// -----------------------------------------------------------------------------
-SbaTableQueryBrowser::EntryType SbaTableQueryBrowser::getChildType( SvLBoxEntry* _pEntry )
-{
- DBG_ASSERT(isContainer(_pEntry), "SbaTableQueryBrowser::getChildType: invalid entry!");
- switch (getEntryType(_pEntry))
- {
- case etTableContainer:
- return etTable;
- case etQueryContainer:
- return etQuery;
- case etBookmarkContainer:
- return etBookmark;
- }
- return etUnknown;
-}
-
-// -----------------------------------------------------------------------------
-String SbaTableQueryBrowser::GetEntryText( SvLBoxEntry* _pEntry )
-{
- return m_pTreeView->getListBox()->GetEntryText(_pEntry);
-}
-
-// -----------------------------------------------------------------------------
-SbaTableQueryBrowser::EntryType SbaTableQueryBrowser::getEntryType( SvLBoxEntry* _pEntry )
-{
- if (!_pEntry)
- return etUnknown;
-
- SvLBoxEntry* pRootEntry = m_pTreeView->getListBox()->GetRootLevelParent(_pEntry);
- SvLBoxEntry* pEntryParent = m_pTreeView->getListBox()->GetParent(_pEntry);
- SvLBoxEntry* pTables = m_pTreeView->getListBox()->GetEntry(pRootEntry, CONTAINER_TABLES);
- SvLBoxEntry* pQueries = m_pTreeView->getListBox()->GetEntry(pRootEntry, CONTAINER_QUERIES);
- SvLBoxEntry* pBookmarks = m_pTreeView->getListBox()->GetEntry(pRootEntry, CONTAINER_BOOKMARKS);
-
-#ifdef DBG_UTIL
- String sTest;
- if (pTables) sTest = m_pTreeView->getListBox()->GetEntryText(pTables);
- if (pQueries) sTest = m_pTreeView->getListBox()->GetEntryText(pQueries);
- if (pBookmarks) sTest = m_pTreeView->getListBox()->GetEntryText(pBookmarks);
-#endif
-
- if (pRootEntry == _pEntry)
- return etDatasource;
-
- if (pTables == _pEntry)
- return etTableContainer;
-
- if (pQueries == _pEntry)
- return etQueryContainer;
-
- if (pBookmarks == _pEntry)
- return etBookmarkContainer;
-
- if (pTables == pEntryParent)
- return etTable;
-
- if (pQueries == pEntryParent)
- return etQuery;
-
- if (pBookmarks == pEntryParent)
- return etBookmark;
-
- return etUnknown;
-}
// -----------------------------------------------------------------------------
void SbaTableQueryBrowser::setDefaultTitle() const
diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx
index b9aabe8d0e35..79b62e402215 100644
--- a/dbaccess/source/ui/control/FieldDescControl.cxx
+++ b/dbaccess/source/ui/control/FieldDescControl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: FieldDescControl.cxx,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: oj $ $Date: 2001-07-18 09:11:36 $
+ * last change: $Author: oj $ $Date: 2001-09-20 12:56:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -313,6 +313,10 @@ OFieldDescControl::~OFieldDescControl()
delete m_pVertScroll;
delete m_pHorzScroll;
+ m_pVertScroll = NULL;
+ m_pHorzScroll = NULL;
+ pLastFocusWindow = NULL;
+
//////////////////////////////////////////////////////////////////////
// Childs zerstoeren
DeactivateAggregate( tpDefault );
diff --git a/dbaccess/source/ui/inc/UITools.hxx b/dbaccess/source/ui/inc/UITools.hxx
index b3245f632713..a2e8d294fc85 100644
--- a/dbaccess/source/ui/inc/UITools.hxx
+++ b/dbaccess/source/ui/inc/UITools.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: UITools.hxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: oj $ $Date: 2001-07-18 08:51:09 $
+ * last change: $Author: oj $ $Date: 2001-09-20 12:56:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -90,6 +90,7 @@ namespace com { namespace sun { namespace star {
}}}
class Window;
+enum SvxCellHorJustify;
// .........................................................................
namespace dbaui
{
@@ -162,6 +163,18 @@ namespace dbaui
*/
sal_Bool checkDataSourceAvailable( const ::rtl::OUString& _sDataSourceName,
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xFactory_xORB);
+
+ /** maps SvxCellHorJustify to com::sun::star::awt::TextAlign
+ @param SvxCellHorJustify& _eAlignment
+ @return the corresponding com::sun::star::awt::TextAlign
+ */
+ sal_Int32 mapTextAllign(const SvxCellHorJustify& _eAlignment);
+ /** fill a column with ui data of a field description
+ @param _rxColumn the column which should be filled
+ @param _pFieldDesc the source of the data
+ */
+ void setColumnUiProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxColumn,
+ const OFieldDescription* _pFieldDesc);
// .........................................................................
}
// .........................................................................
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index 92156c6e8137..f70469fb59b6 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: UITools.cxx,v $
*
- * $Revision: 1.14 $
+ * $Revision: 1.15 $
*
- * last change: $Author: oj $ $Date: 2001-08-27 06:57:23 $
+ * last change: $Author: oj $ $Date: 2001-09-20 12:56:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -119,6 +119,9 @@
#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#endif
+#ifndef _COM_SUN_STAR_AWT_TEXTALIGN_HPP_
+#include <com/sun/star/awt/TextAlign.hpp>
+#endif
#ifndef DBAUI_TYPEINFO_HXX
#include "TypeInfo.hxx"
#endif
@@ -169,10 +172,10 @@ void composeTableName( const Reference< XDatabaseMetaData >& _rxMetaData,
// -----------------------------------------------------------------------------
SQLExceptionInfo createConnection( const ::rtl::OUString& _rsDataSourceName,
- const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _xDatabaseContext,
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rMF,
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener>& _rEvtLst,
- ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _rOUTConnection )
+ const Reference< ::com::sun::star::container::XNameAccess >& _xDatabaseContext,
+ const Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rMF,
+ Reference< ::com::sun::star::lang::XEventListener>& _rEvtLst,
+ Reference< ::com::sun::star::sdbc::XConnection>& _rOUTConnection )
{
Any aValue;
try
@@ -359,7 +362,7 @@ const OTypeInfo* getTypeInfoFromType(const OTypeInfoMap& _rTypeInfo,
return pTypeInfo;
}
-void fillTypeInfo( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _rxConnection,
+void fillTypeInfo( const Reference< ::com::sun::star::sdbc::XConnection>& _rxConnection,
const String& _rsTypeNames,
OTypeInfoMap& _rTypeInfoMap,
::std::vector<OTypeInfoMap::iterator>& _rTypeInfoIters)
@@ -514,8 +517,6 @@ void setColumnProperties(const Reference<XPropertySet>& _rxColumn,const OFieldDe
_rxColumn->setPropertyValue(PROPERTY_ISNULLABLE, makeAny(_pFieldDesc->GetIsNullable()));
_rxColumn->setPropertyValue(PROPERTY_ISAUTOINCREMENT,::cppu::bool2any(_pFieldDesc->IsAutoIncrement()));
// _rxColumn->setPropertyValue(PROPERTY_ISCURRENCY,::cppu::bool2any(_pFieldDesc->IsCurrency()));
- if(_rxColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_DESCRIPTION))
- _rxColumn->setPropertyValue(PROPERTY_DESCRIPTION,makeAny(_pFieldDesc->GetDescription()));
if(_rxColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_DEFAULTVALUE))
_rxColumn->setPropertyValue(PROPERTY_DEFAULTVALUE,makeAny(_pFieldDesc->GetDefaultValue()));
}
@@ -558,7 +559,7 @@ void setColumnProperties(const Reference<XPropertySet>& _rxColumn,const OFieldDe
return sDefaultName;
}
// -----------------------------------------------------------------------------
-sal_Bool checkDataSourceAvailable(const ::rtl::OUString& _sDataSourceName,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xORB)
+sal_Bool checkDataSourceAvailable(const ::rtl::OUString& _sDataSourceName,const Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xORB)
{
sal_Bool bRet = sal_False;
Reference< XNameAccess > xDataBaseContext(_xORB->createInstance(SERVICE_SDB_DATABASECONTEXT), UNO_QUERY);
@@ -566,7 +567,30 @@ sal_Bool checkDataSourceAvailable(const ::rtl::OUString& _sDataSourceName,const
bRet = xDataBaseContext->hasByName(_sDataSourceName);
return bRet;
}
-
+// -----------------------------------------------------------------------------
+sal_Int32 mapTextAllign(const SvxCellHorJustify& _eAlignment)
+{
+ sal_Int32 nAlignment = com::sun::star::awt::TextAlign::LEFT;
+ switch (_eAlignment)
+ {
+ case SVX_HOR_JUSTIFY_LEFT: nAlignment = ::com::sun::star::awt::TextAlign::LEFT; break;
+ case SVX_HOR_JUSTIFY_CENTER: nAlignment = ::com::sun::star::awt::TextAlign::CENTER; break;
+ case SVX_HOR_JUSTIFY_RIGHT: nAlignment = ::com::sun::star::awt::TextAlign::RIGHT; break;
+ default:
+ OSL_ENSURE(0,"Invalid TextAlign!");
+ }
+ return nAlignment;
+}
+// -----------------------------------------------------------------------------
+void setColumnUiProperties( const Reference< XPropertySet>& _rxColumn,const OFieldDescription* _pFieldDesc)
+{
+ if(_rxColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_FORMATKEY))
+ _rxColumn->setPropertyValue(PROPERTY_FORMATKEY,makeAny(_pFieldDesc->GetFormatKey()));
+ if(_rxColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_ALIGN))
+ _rxColumn->setPropertyValue(PROPERTY_ALIGN,makeAny(dbaui::mapTextAllign(_pFieldDesc->GetHorJustify())));
+ if(_rxColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_HELPTEXT))
+ _rxColumn->setPropertyValue(PROPERTY_HELPTEXT,makeAny(_pFieldDesc->GetDescription()));
+}
// .........................................................................
}
// .........................................................................
diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx
index 21380203ba02..07d3de86c280 100644
--- a/dbaccess/source/ui/misc/WCopyTable.cxx
+++ b/dbaccess/source/ui/misc/WCopyTable.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: WCopyTable.cxx,v $
*
- * $Revision: 1.13 $
+ * $Revision: 1.14 $
*
- * last change: $Author: oj $ $Date: 2001-08-08 08:24:54 $
+ * last change: $Author: oj $ $Date: 2001-09-20 12:56:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -686,12 +686,7 @@ void OCopyTableWizard::appendColumns(Reference<XColumnsSupplier>& _rxColSup,cons
{
xColumns->getByName(pField->GetName()) >>= xColumn;
if(xColumn.is())
- {
- if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_FORMATKEY))
- xColumn->setPropertyValue(PROPERTY_FORMATKEY,makeAny(pField->GetFormatKey()));
- if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_ALIGN))
- xColumn->setPropertyValue(PROPERTY_ALIGN,makeAny((sal_Int32)pField->GetHorJustify()));
- }
+ dbaui::setColumnUiProperties(xColumn,pField);
}
else
{
diff --git a/dbaccess/source/ui/querydesign/QueryTextView.cxx b/dbaccess/source/ui/querydesign/QueryTextView.cxx
index bbc301a552ab..92f565d8d7d7 100644
--- a/dbaccess/source/ui/querydesign/QueryTextView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryTextView.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: QueryTextView.cxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: fs $ $Date: 2001-08-23 14:39:09 $
+ * last change: $Author: oj $ $Date: 2001-09-20 12:56:16 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -130,7 +130,7 @@ OQueryTextView::OQueryTextView(OQueryContainerWindow* _pParent)
// -----------------------------------------------------------------------------
OQueryTextView::~OQueryTextView()
{
- delete m_pEdit;
+ DELETEZ(m_pEdit);
DBG_DTOR(OQueryTextView,NULL);
}
// -----------------------------------------------------------------------------
diff --git a/dbaccess/source/ui/querydesign/TableWindow.cxx b/dbaccess/source/ui/querydesign/TableWindow.cxx
index 837652000fed..47c2e3eb3955 100644
--- a/dbaccess/source/ui/querydesign/TableWindow.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindow.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: TableWindow.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: oj $ $Date: 2001-08-09 13:30:50 $
+ * last change: $Author: oj $ $Date: 2001-09-20 12:56:16 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -177,7 +177,7 @@ OTableWindow::~OTableWindow()
if (m_pListBox)
{
EmptyListBox();
- delete m_pListBox;
+ DELETEZ(m_pListBox);
}
DBG_DTOR(OTableWindow,NULL);
}
diff --git a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx
index f9db96e132d5..223caa4ed630 100644
--- a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: TableWindowListBox.cxx,v $
*
- * $Revision: 1.14 $
+ * $Revision: 1.15 $
*
- * last change: $Author: hr $ $Date: 2001-08-14 14:51:05 $
+ * last change: $Author: oj $ $Date: 2001-09-20 12:56:16 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -128,6 +128,7 @@ OTableWindowListBox::~OTableWindowListBox()
{
if( m_aScrollTimer.IsActive() )
m_aScrollTimer.Stop();
+ m_pTabWin = NULL;
DBG_DTOR(OTableWindowListBox,NULL);
}
@@ -374,7 +375,8 @@ void OTableWindowListBox::LoseFocus()
//------------------------------------------------------------------------------
void OTableWindowListBox::GetFocus()
{
- m_pTabWin->GetFocus();
+ if(m_pTabWin)
+ m_pTabWin->GetFocus();
SvTreeListBox::GetFocus();
if (GetCurEntry() != NULL)
if (GetSelectionCount() == 0)
diff --git a/dbaccess/source/ui/querydesign/TableWindowTitle.cxx b/dbaccess/source/ui/querydesign/TableWindowTitle.cxx
index 18e2ebc36aa5..2a07082c22c8 100644
--- a/dbaccess/source/ui/querydesign/TableWindowTitle.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindowTitle.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: TableWindowTitle.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: oj $ $Date: 2001-08-27 06:57:23 $
+ * last change: $Author: oj $ $Date: 2001-09-20 12:56:16 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -130,13 +130,15 @@ OTableWindowTitle::OTableWindowTitle( OTableWindow* pParent ) :
//------------------------------------------------------------------------------
OTableWindowTitle::~OTableWindowTitle()
{
+ m_pTabWin = NULL;
DBG_DTOR(OTableWindowTitle,NULL);
}
//------------------------------------------------------------------------------
void OTableWindowTitle::GetFocus()
{
- m_pTabWin->GetFocus();
+ if(m_pTabWin)
+ m_pTabWin->GetFocus();
}
//------------------------------------------------------------------------------
diff --git a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx
index ed56185e6f1e..74bf5988104c 100644
--- a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx
+++ b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: querycontainerwindow.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: fs $ $Date: 2001-09-07 10:05:58 $
+ * last change: $Author: oj $ $Date: 2001-09-20 12:56:16 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -184,7 +184,8 @@ namespace dbaui
// -----------------------------------------------------------------------------
void OQueryContainerWindow::GetFocus()
{
- m_pViewSwitch->GetFocus();
+ if(m_pViewSwitch)
+ m_pViewSwitch->GetFocus();
}
// -----------------------------------------------------------------------------
IMPL_LINK( OQueryContainerWindow, SplitHdl, void*, p )
@@ -280,6 +281,9 @@ namespace dbaui
/*************************************************************************
* history:
* $Log: not supported by cvs2svn $
+ * Revision 1.2 2001/09/07 10:05:58 fs
+ * #65293# syntax
+ *
* Revision 1.1 2001/08/23 14:39:40 fs
* initial checkin - outsourced from QueryTextView.hxx (the container window for the query design)
*
diff --git a/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx b/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx
index 7a4beae6c349..78cb78d1ede5 100644
--- a/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx
+++ b/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: FieldDescGenWin.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: oj $ $Date: 2001-07-16 07:55:35 $
+ * last change: $Author: oj $ $Date: 2001-09-20 12:56:16 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -101,6 +101,7 @@ OFieldDescGenWin::~OFieldDescGenWin()
{
DBG_DTOR(OFieldDescGenWin,NULL);
delete m_pFieldControl;
+ m_pFieldControl = NULL;
}
//------------------------------------------------------------------------------
void OFieldDescGenWin::Init()
@@ -173,7 +174,8 @@ void OFieldDescGenWin::GetFocus()
//////////////////////////////////////////////////////////////////////
// Setzt den Focus auf das zuletzt aktive Control
TabPage::GetFocus();
- m_pFieldControl->GetFocus();
+ if(m_pFieldControl)
+ m_pFieldControl->GetFocus();
}
//------------------------------------------------------------------------------
diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx
index fe42291b7149..d03f0c6e3881 100644
--- a/dbaccess/source/ui/tabledesign/TableController.cxx
+++ b/dbaccess/source/ui/tabledesign/TableController.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: TableController.cxx,v $
*
- * $Revision: 1.52 $
+ * $Revision: 1.53 $
*
- * last change: $Author: oj $ $Date: 2001-08-24 06:40:35 $
+ * last change: $Author: oj $ $Date: 2001-09-20 12:56:16 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -559,6 +559,9 @@ sal_Bool OTableController::doSaveDoc(sal_Bool _bSaveAs)
bAlter = sal_True;
alterColumns();
}
+ Reference<XFlushable> xFlush(m_xTable,UNO_QUERY);
+ if(xFlush.is())
+ xFlush->flush();
reSyncRows();
}
catch(SQLContext& e)
@@ -837,7 +840,7 @@ void OTableController::losingConnection( )
Reference< XComponent > xComponent(m_xTable, UNO_QUERY);
if (xComponent.is())
{
- Reference<XEventListener> xEvtL( static_cast<::cppu::OWeakObject*>(this), UNO_QUERY);
+ Reference<XEventListener> xEvtL( static_cast< ::cppu::OWeakObject*>(this), UNO_QUERY);
xComponent->removeEventListener(xEvtL);
}
stopTableListening();
@@ -922,12 +925,7 @@ void OTableController::appendColumns(Reference<XColumnsSupplier>& _rxColSup,sal_
{
xColumns->getByName(pField->GetName()) >>= xColumn;
if(xColumn.is())
- {
- if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_FORMATKEY))
- xColumn->setPropertyValue(PROPERTY_FORMATKEY,makeAny(pField->GetFormatKey()));
- if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_ALIGN))
- xColumn->setPropertyValue(PROPERTY_ALIGN,makeAny((sal_Int32)pField->GetHorJustify()));
- }
+ dbaui::setColumnUiProperties(xColumn,pField);
}
else
{
@@ -1039,8 +1037,8 @@ void OTableController::loadData()
xColumn->getPropertyValue(PROPERTY_PRECISION) >>= nPrecision;
- if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_DESCRIPTION))
- xColumn->getPropertyValue(PROPERTY_DESCRIPTION) >>= sDescription;
+ if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_HELPTEXT))
+ xColumn->getPropertyValue(PROPERTY_HELPTEXT) >>= sDescription;
if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_DEFAULTVALUE))
xColumn->getPropertyValue(PROPERTY_DEFAULTVALUE)>>= sDefaultValue;
if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_FORMATKEY))
@@ -1286,8 +1284,8 @@ void OTableController::alterColumns()
xColumn->getPropertyValue(PROPERTY_ISNULLABLE) >>= nNullable;
bAutoIncrement = ::cppu::any2bool(xColumn->getPropertyValue(PROPERTY_ISAUTOINCREMENT));
// xColumn->getPropertyValue(PROPERTY_ISCURRENCY,::cppu::bool2any(pField->IsCurrency()));
- if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_DESCRIPTION))
- xColumn->getPropertyValue(PROPERTY_DESCRIPTION) >>= sDescription;
+ if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_HELPTEXT))
+ xColumn->getPropertyValue(PROPERTY_HELPTEXT) >>= sDescription;
if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_DEFAULTVALUE))
xColumn->getPropertyValue(PROPERTY_DEFAULTVALUE) >>= sDefaultValue;
if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_FORMATKEY))
@@ -1301,7 +1299,6 @@ void OTableController::alterColumns()
nScale != pField->GetScale() ||
nNullable != pField->GetIsNullable() ||
bAutoIncrement != pField->IsAutoIncrement() ||
- sDescription != pField->GetDescription() ||
sDefaultValue != pField->GetDefaultValue()) &&
xColumnFactory.is())
{
@@ -1354,10 +1351,15 @@ void OTableController::alterColumns()
if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_FORMATKEY))
xColumn->setPropertyValue(PROPERTY_FORMATKEY,makeAny(pField->GetFormatKey()));
}
- if(nAlignment != (sal_Int32)pField->GetHorJustify())
+ if(nAlignment != dbaui::mapTextAllign(pField->GetHorJustify()))
{
if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_ALIGN))
- xColumn->setPropertyValue(PROPERTY_ALIGN,makeAny(nAlignment));
+ xColumn->setPropertyValue(PROPERTY_ALIGN,makeAny(dbaui::mapTextAllign(pField->GetHorJustify())));
+ }
+ if(sDescription != pField->GetDescription())
+ {
+ if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_HELPTEXT))
+ xColumn->setPropertyValue(PROPERTY_HELPTEXT,makeAny(pField->GetDescription()));
}
}
else if(xColumnFactory.is() && xAlter.is() && nPos < nColumnCount)
@@ -1373,12 +1375,7 @@ void OTableController::alterColumns()
aColumns[pField->GetName()] = sal_True;
xColumns->getByName(pField->GetName()) >>= xColumn;
if(xColumn.is())
- {
- if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_FORMATKEY))
- xColumn->setPropertyValue(PROPERTY_FORMATKEY,makeAny(pField->GetFormatKey()));
- if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_ALIGN))
- xColumn->setPropertyValue(PROPERTY_ALIGN,makeAny((sal_Int32)pField->GetHorJustify()));
- }
+ dbaui::setColumnUiProperties(xColumn,pField);
}
else
{
@@ -1451,12 +1448,7 @@ void OTableController::alterColumns()
aColumns[pField->GetName()] = sal_True;
xColumns->getByName(pField->GetName()) >>= xColumn;
if(xColumn.is())
- {
- if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_FORMATKEY))
- xColumn->setPropertyValue(PROPERTY_FORMATKEY,makeAny(pField->GetFormatKey()));
- if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_ALIGN))
- xColumn->setPropertyValue(PROPERTY_ALIGN,makeAny((sal_Int32)pField->GetHorJustify()));
- }
+ dbaui::setColumnUiProperties(xColumn,pField);
}
else
{
diff --git a/dbaccess/source/ui/tabledesign/TableDesignView.cxx b/dbaccess/source/ui/tabledesign/TableDesignView.cxx
index 684229a1f87b..8f95e19d2108 100644
--- a/dbaccess/source/ui/tabledesign/TableDesignView.cxx
+++ b/dbaccess/source/ui/tabledesign/TableDesignView.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: TableDesignView.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: oj $ $Date: 2001-08-30 12:58:00 $
+ * last change: $Author: oj $ $Date: 2001-09-20 12:56:16 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -136,10 +136,8 @@ OTableBorderWindow::~OTableBorderWindow()
m_pEditorCtrl->Hide();
m_pFieldDescWin->Hide();
- delete m_pEditorCtrl;
- m_pEditorCtrl = NULL;
- delete m_pFieldDescWin;
- m_pFieldDescWin = NULL;
+ DELETEZ(m_pEditorCtrl);
+ DELETEZ(m_pFieldDescWin);
}
// -----------------------------------------------------------------------------
void OTableBorderWindow::Resize()