summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorOcke Janssen <Ocke.Janssen@sun.com>2009-11-11 14:09:11 +0100
committerOcke Janssen <Ocke.Janssen@sun.com>2009-11-11 14:09:11 +0100
commitb008a8ac98a3e719ca8464c5177d7ebbf9f5a28b (patch)
tree35fb0939094353486abfdfb92cd59ea6b0433682 /dbaccess
parent373cc84bba0ab3521e41489f9e3188dc0682e878 (diff)
#i105086# impl clob and blob
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/browser/sbagrid.cxx46
-rw-r--r--dbaccess/source/ui/browser/unodatbr.cxx1
-rw-r--r--dbaccess/source/ui/control/FieldDescControl.cxx12
-rw-r--r--dbaccess/source/ui/inc/TypeInfo.hxx1
4 files changed, 36 insertions, 24 deletions
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx
index 1ca1a737dfd2..d75411cb7997 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -985,13 +985,13 @@ void SbaGridControl::PreExecuteRowContextMenu(sal_uInt16 nRow, PopupMenu& rMenu)
rMenu.SetHelpId(ID_BROWSER_ROWHEIGHT, aNewItems.GetHelpId(ID_BROWSER_ROWHEIGHT));
rMenu.InsertSeparator(nPos++);
} // if (!IsReadOnlyDB())
-
- if ( GetSelectRowCount() > 0 )
- {
- rMenu.InsertItem(ID_BROWSER_COPY, aNewItems.GetItemText(SID_COPY), 0, nPos++);
- rMenu.SetHelpId(ID_BROWSER_COPY, aNewItems.GetHelpId(SID_COPY));
-
- rMenu.InsertSeparator(nPos++);
+
+ if ( GetSelectRowCount() > 0 )
+ {
+ rMenu.InsertItem(ID_BROWSER_COPY, aNewItems.GetItemText(SID_COPY), 0, nPos++);
+ rMenu.SetHelpId(ID_BROWSER_COPY, aNewItems.GetHelpId(SID_COPY));
+
+ rMenu.InsertSeparator(nPos++);
}
}
@@ -1428,20 +1428,20 @@ void SbaGridControl::DoColumnDrag(sal_uInt16 nColumnPos)
}
// -----------------------------------------------------------------------
-void SbaGridControl::CopySelectedRowsToClipboard()
-{
- DBG_ASSERT( GetSelectRowCount() > 0, "SbaGridControl::CopySelectedRowsToClipboard: invalid call!" );
- implTransferSelectedRows( (sal_Int16)FirstSelectedRow(), true );
-}
-
-// -----------------------------------------------------------------------
-void SbaGridControl::DoRowDrag( sal_Int16 nRowPos )
-{
- implTransferSelectedRows( nRowPos, false );
-}
-
-// -----------------------------------------------------------------------
-void SbaGridControl::implTransferSelectedRows( sal_Int16 nRowPos, bool _bTrueIfClipboardFalseIfDrag )
+void SbaGridControl::CopySelectedRowsToClipboard()
+{
+ DBG_ASSERT( GetSelectRowCount() > 0, "SbaGridControl::CopySelectedRowsToClipboard: invalid call!" );
+ implTransferSelectedRows( (sal_Int16)FirstSelectedRow(), true );
+}
+
+// -----------------------------------------------------------------------
+void SbaGridControl::DoRowDrag( sal_Int16 nRowPos )
+{
+ implTransferSelectedRows( nRowPos, false );
+}
+
+// -----------------------------------------------------------------------
+void SbaGridControl::implTransferSelectedRows( sal_Int16 nRowPos, bool _bTrueIfClipboardFalseIfDrag )
{
Reference< XPropertySet > xDataSource(getDataSource(), UNO_QUERY);
DBG_ASSERT(xDataSource.is(), "SbaGridControl::implTransferSelectedRows : invalid data source !");
@@ -1478,8 +1478,8 @@ void SbaGridControl::implTransferSelectedRows( sal_Int16 nRowPos, bool _bTrueIfC
ODataClipboard* pTransfer = new ODataClipboard(xDataSource, aSelectedRows,xRowSetClone, getServiceManager());
Reference< XTransferable > xEnsureDelete = pTransfer;
- if ( _bTrueIfClipboardFalseIfDrag )
- pTransfer->CopyToClipboard( this );
+ if ( _bTrueIfClipboardFalseIfDrag )
+ pTransfer->CopyToClipboard( this );
else
pTransfer->StartDrag(this, DND_ACTION_COPY | DND_ACTION_LINK);
}
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 8f2528e1f96a..7619c2000042 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -633,6 +633,7 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun::
break;
case DataType::LONGVARCHAR:
+ case DataType::CLOB:
aInitialValues.push_back( NamedValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MultiLine" ) ), makeAny( (sal_Bool)sal_True ) ) );
// NO break!
case DataType::BINARY:
diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx
index 4d9e81bc1f83..7eecfced5457 100644
--- a/dbaccess/source/ui/control/FieldDescControl.cxx
+++ b/dbaccess/source/ui/control/FieldDescControl.cxx
@@ -1375,6 +1375,14 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr )
ActivateAggregate( tpFormat );
break;
case DataType::BIT:
+ if ( pFieldType->aCreateParams.getLength() )
+ {
+ DeactivateAggregate( tpFormat );
+ DeactivateAggregate( tpTextLen );
+ DeactivateAggregate( tpBoolDefault );
+ break;
+ }
+ // run through
case DataType::BOOLEAN:
DeactivateAggregate( tpTextLen );
DeactivateAggregate( tpFormat );
@@ -1473,7 +1481,9 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr )
if( pBoolDefault )
{
// wenn pRequired auf sal_True gesetzt ist, dann darf das sal_Bool Feld nicht den Eintrag <<keiner>> besitzen
- String sDef = BoolStringUI(::comphelper::getString(pFieldDescr->GetControlDefault()));
+ ::rtl::OUString sValue;
+ pFieldDescr->GetControlDefault() >>= sValue;
+ String sDef = BoolStringUI(sValue);
// sicher stellen das <<keiner>> nur vorhanden ist, wenn das Feld NULL sein darf
if ( ( pFieldType.get() && !pFieldType->bNullable ) || !pFieldDescr->IsNullable() )
diff --git a/dbaccess/source/ui/inc/TypeInfo.hxx b/dbaccess/source/ui/inc/TypeInfo.hxx
index b44daeba3beb..ee5a5235da68 100644
--- a/dbaccess/source/ui/inc/TypeInfo.hxx
+++ b/dbaccess/source/ui/inc/TypeInfo.hxx
@@ -83,6 +83,7 @@ const sal_uInt16 TYPE_BLOB = 27;
const sal_uInt16 TYPE_CLOB = 28;
const sal_uInt16 TYPE_REF = 29;
const sal_uInt16 TYPE_OTHER = 30;
+const sal_uInt16 TYPE_BIT = 31;
class OTypeInfo
{