summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/browser/sbagrid.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source/ui/browser/sbagrid.cxx')
-rw-r--r--dbaccess/source/ui/browser/sbagrid.cxx204
1 files changed, 102 insertions, 102 deletions
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx
index 1652ed46b094..62353cd5456b 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -33,11 +33,11 @@
#include <svx/svxids.hrc>
-#define ITEMID_HORJUSTIFY SID_ATTR_ALIGN_HOR_JUSTIFY
-#define ITEMID_VERJUSTIFY SID_ATTR_ALIGN_VER_JUSTIFY
-#define ITEMID_LINEBREAK SID_ATTR_ALIGN_LINEBREAK
-#define ITEMID_MARGIN SID_ATTR_ALIGN_MARGIN
-#define ITEMID_NUMBERINFO SID_ATTR_NUMBERFORMAT_INFO
+#define ITEMID_HORJUSTIFY SID_ATTR_ALIGN_HOR_JUSTIFY
+#define ITEMID_VERJUSTIFY SID_ATTR_ALIGN_VER_JUSTIFY
+#define ITEMID_LINEBREAK SID_ATTR_ALIGN_LINEBREAK
+#define ITEMID_MARGIN SID_ATTR_ALIGN_MARGIN
+#define ITEMID_NUMBERINFO SID_ATTR_NUMBERFORMAT_INFO
#define _ZFORLIST_DECLARE_TABLE
@@ -172,9 +172,9 @@ Sequence< ::rtl::OUString> SbaXGridControl::getSupportedServiceNames_Static(void
aSupported[2] = ::rtl::OUString::createFromAscii("com.sun.star.awt.UnoControl");
return aSupported;
}
-DBG_NAME(SbaXGridControl );
+DBG_NAME(SbaXGridControl );
//---------------------------------------------------------------------------------------
-SbaXGridControl::SbaXGridControl(const Reference< XMultiServiceFactory >& _rM)
+SbaXGridControl::SbaXGridControl(const Reference< XMultiServiceFactory >& _rM)
: FmXGridControl(_rM)
{
DBG_CTOR(SbaXGridControl ,NULL);
@@ -183,7 +183,7 @@ SbaXGridControl::SbaXGridControl(const Reference< XMultiServiceFactory >& _rM)
//---------------------------------------------------------------------------------------
SbaXGridControl::~SbaXGridControl()
{
- DBG_DTOR(SbaXGridControl ,NULL);
+ DBG_DTOR(SbaXGridControl ,NULL);
}
//---------------------------------------------------------------------------------------
@@ -204,7 +204,7 @@ FmXGridPeer* SbaXGridControl::imp_CreatePeer(Window* pParent)
catch(Exception&)
{
}
-
+
}
pReturn->Create(pParent, nStyle);
@@ -212,7 +212,7 @@ FmXGridPeer* SbaXGridControl::imp_CreatePeer(Window* pParent)
}
//------------------------------------------------------------------------------
-Any SAL_CALL SbaXGridControl::queryInterface(const Type& _rType) throw (RuntimeException)
+Any SAL_CALL SbaXGridControl::queryInterface(const Type& _rType) throw (RuntimeException)
{
Any aRet = FmXGridControl::queryInterface(_rType);
return aRet.hasValue() ? aRet : ::cppu::queryInterface(_rType,(::com::sun::star::frame::XDispatch*)this);
@@ -257,10 +257,10 @@ void SAL_CALL SbaXGridControl::createPeer(const Reference< ::com::sun::star::awt
// TODO: why the hell this whole class does not use any mutex?
-// if (0 == m_nPeerCreationLevel)
+// if (0 == m_nPeerCreationLevel)
{
Reference< ::com::sun::star::frame::XDispatch > xDisp(getPeer(), UNO_QUERY);
- for ( StatusMultiplexerArray::iterator aIter = m_aStatusMultiplexer.begin();
+ for ( StatusMultiplexerArray::iterator aIter = m_aStatusMultiplexer.begin();
aIter != m_aStatusMultiplexer.end();
++aIter)
{
@@ -294,12 +294,12 @@ void SAL_CALL SbaXGridControl::addStatusListener( const Reference< XStatusListen
if ( getPeer().is() )
{
if ( 1 == pMultiplexer->getLength() )
- { // the first external listener for this URL
+ { // the first external listener for this URL
Reference< XDispatch > xDisp( getPeer(), UNO_QUERY );
xDisp->addStatusListener( pMultiplexer, _rURL );
}
else
- { // already have other listeners for this URL
+ { // already have other listeners for this URL
_rxListener->statusChanged( pMultiplexer->getLastEvent() );
}
}
@@ -334,7 +334,7 @@ void SAL_CALL SbaXGridControl::dispose(void) throw( RuntimeException )
EventObject aEvt;
aEvt.Source = *this;
- for ( StatusMultiplexerArray::iterator aIter = m_aStatusMultiplexer.begin();
+ for ( StatusMultiplexerArray::iterator aIter = m_aStatusMultiplexer.begin();
aIter != m_aStatusMultiplexer.end();
++aIter)
{
@@ -365,7 +365,7 @@ SbaXGridPeer::SbaXGridPeer(const Reference< XMultiServiceFactory >& _rM)
//---------------------------------------------------------------------------------------
SbaXGridPeer::~SbaXGridPeer()
{
- DBG_DTOR(SbaXGridPeer ,NULL);
+ DBG_DTOR(SbaXGridPeer ,NULL);
}
//---------------------------------------------------------------------------------------
@@ -401,7 +401,7 @@ void SbaXGridPeer::NotifyStatusChanged(const ::com::sun::star::util::URL& _rUrl,
else
{
::cppu::OInterfaceContainerHelper * pIter = m_aStatusListeners.getContainer(_rUrl);
-
+
if (pIter)
{
::cppu::OInterfaceIteratorHelper aListIter(*pIter);
@@ -412,7 +412,7 @@ void SbaXGridPeer::NotifyStatusChanged(const ::com::sun::star::util::URL& _rUrl,
}
//------------------------------------------------------------------------------
-Any SAL_CALL SbaXGridPeer::queryInterface(const Type& _rType) throw (RuntimeException)
+Any SAL_CALL SbaXGridPeer::queryInterface(const Type& _rType) throw (RuntimeException)
{
Any aRet = ::cppu::queryInterface(_rType,(::com::sun::star::frame::XDispatch*)this);
if(aRet.hasValue())
@@ -423,10 +423,10 @@ Any SAL_CALL SbaXGridPeer::queryInterface(const Type& _rType) throw (RuntimeExce
//---------------------------------------------------------------------------------------
Reference< ::com::sun::star::frame::XDispatch > SAL_CALL SbaXGridPeer::queryDispatch(const ::com::sun::star::util::URL& aURL, const ::rtl::OUString& aTargetFrameName, sal_Int32 nSearchFlags) throw( RuntimeException )
{
- if ( (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:GridSlots/BrowserAttribs")))
- || (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:GridSlots/RowHeight")))
- || (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:GridSlots/ColumnAttribs")))
- || (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:GridSlots/ColumnWidth")))
+ if ( (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:GridSlots/BrowserAttribs")))
+ || (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:GridSlots/RowHeight")))
+ || (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:GridSlots/ColumnAttribs")))
+ || (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:GridSlots/ColumnWidth")))
)
{
return (::com::sun::star::frame::XDispatch*)this;
@@ -439,7 +439,7 @@ Reference< ::com::sun::star::frame::XDispatch > SAL_CALL SbaXGridPeer::queryDis
IMPL_LINK( SbaXGridPeer, OnDispatchEvent, void*, /*NOTINTERESTEDIN*/ )
{
SbaGridControl* pGrid = static_cast< SbaGridControl* >( GetWindow() );
- if ( pGrid ) // if this fails, we were disposing before arriving here
+ if ( pGrid ) // if this fails, we were disposing before arriving here
{
if ( Application::GetMainThreadIdentifier() != ::osl::Thread::getCurrentIdentifier() )
{
@@ -595,17 +595,17 @@ void SAL_CALL SbaXGridPeer::removeStatusListener(const Reference< ::com::sun::st
//---------------------------------------------------------------------------------------
const Sequence< sal_Int8 > & SbaXGridPeer::getUnoTunnelId()
{
- static Sequence< sal_Int8 > * pSeq = 0;
- if( !pSeq )
+ static Sequence< sal_Int8 > * pSeq = 0;
+ if( !pSeq )
{
::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() );
- if( !pSeq )
+ if( !pSeq )
{
static Sequence< sal_Int8 > aSeq( 16 );
- rtl_createUuid( (sal_uInt8*)aSeq.getArray(), 0,sal_True );
- pSeq = &aSeq;
- }
- }
+ rtl_createUuid( (sal_uInt8*)aSeq.getArray(), 0,sal_True );
+ pSeq = &aSeq;
+ }
+ }
return *pSeq;
}
@@ -626,7 +626,7 @@ sal_Int64 SAL_CALL SbaXGridPeer::getSomething( const Sequence< sal_Int8 > & rId
{
if( rId.getLength() == 16 && 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) )
return reinterpret_cast< sal_Int64 >( this );
-
+
return FmXGridPeer::getSomething(rId);
}
@@ -675,10 +675,10 @@ void SbaGridHeader::MouseButtonDown( const MouseEvent& _rMEvt )
// the base class will start a column move here, which we don't want to allow
// (at the moment. If we store relative positions with the columns, we can allow column moves ....)
-// sal_uInt16 nPos(0);
-// sal_uInt16 nHitTest = ImplHitTest( _rMEvt.GetPosPixel(), mnMouseOff, nPos );
-// if (!nHitTest & HEAD_HITTEST_DIVIDER)
-// return;
+// sal_uInt16 nPos(0);
+// sal_uInt16 nHitTest = ImplHitTest( _rMEvt.GetPosPixel(), mnMouseOff, nPos );
+// if (!nHitTest & HEAD_HITTEST_DIVIDER)
+// return;
}
FmGridHeader::MouseButtonDown(_rMEvt);
@@ -692,7 +692,7 @@ sal_Bool SbaGridHeader::ImplStartColumnDrag(sal_Int8 _nAction, const Point& _rMo
if (HEADERBAR_ITEM_NOTFOUND != nId)
{
Rectangle aColRect = GetItemRect(nId);
- aColRect.Left() += nId ? 3 : 0; // the handle col (nId == 0) does not have a left margin for resizing
+ aColRect.Left() += nId ? 3 : 0; // the handle col (nId == 0) does not have a left margin for resizing
aColRect.Right() -= 3;
bResizingCol = !aColRect.IsInside(_rMousePos);
}
@@ -708,7 +708,7 @@ sal_Bool SbaGridHeader::ImplStartColumnDrag(sal_Int8 _nAction, const Point& _rMo
static_cast<SbaGridControl*>(GetParent())->StartDrag(_nAction,
Point(
- _rMousePos.X() + GetPosPixel().X(), // we aren't left-justified with our parent, in contrast to the data window
+ _rMousePos.X() + GetPosPixel().X(), // we aren't left-justified with our parent, in contrast to the data window
_rMousePos.Y() - GetSizePixel().Height()
)
);
@@ -740,7 +740,7 @@ void SbaGridHeader::PreExecuteColumnContextMenu(sal_uInt16 nColId, PopupMenu& rM
pShowColsMenu->EnableItem(SID_FM_SHOWALLCOLS, sal_False);
}
}
-
+
// prepend some new items
sal_Bool bColAttrs = (nColId != (sal_uInt16)-1) && (nColId != 0);
if ( bColAttrs && !bDBIsReadOnly)
@@ -811,7 +811,7 @@ void SbaGridHeader::PostExecuteColumnContextMenu(sal_uInt16 nColId, const PopupM
//==================================================================
// SbaGridControl
//==================================================================
-DBG_NAME(SbaGridControl );
+DBG_NAME(SbaGridControl );
//---------------------------------------------------------------------------------------
SbaGridControl::SbaGridControl(Reference< XMultiServiceFactory > _rM,
Window* pParent, FmXGridPeer* _pPeer, WinBits nBits)
@@ -827,9 +827,9 @@ SbaGridControl::SbaGridControl(Reference< XMultiServiceFactory > _rM,
//---------------------------------------------------------------------------------------
SbaGridControl::~SbaGridControl()
{
- DBG_DTOR(SbaGridControl ,NULL);
+ DBG_DTOR(SbaGridControl ,NULL);
if (m_nAsyncDropEvent)
- Application::RemoveUserEvent(m_nAsyncDropEvent);
+ Application::RemoveUserEvent(m_nAsyncDropEvent);
}
//---------------------------------------------------------------------------------------
@@ -864,7 +864,7 @@ 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++);
@@ -902,13 +902,13 @@ void SbaGridControl::SetColWidth(sal_uInt16 nColId)
Any aWidth = xAffectedCol->getPropertyValue(PROPERTY_WIDTH);
sal_Int32 nCurWidth = aWidth.hasValue() ? ::comphelper::getINT32(aWidth) : -1;
- DlgSize aDlgColWidth(this, nCurWidth, sal_False);
+ DlgSize aDlgColWidth(this, nCurWidth, sal_False);
if (aDlgColWidth.Execute())
{
sal_Int32 nValue = aDlgColWidth.GetValue();
Any aNewWidth;
if (-1 == nValue)
- { // set to default
+ { // set to default
Reference< XPropertyState > xPropState(xAffectedCol, UNO_QUERY);
if (xPropState.is())
{
@@ -938,26 +938,26 @@ void SbaGridControl::SetRowHeight()
sal_Int32 nValue = aDlgRowHeight.GetValue();
Any aNewHeight;
if ((sal_Int16)-1 == nValue)
- { // set to default
+ { // set to default
Reference< XPropertyState > xPropState(xCols, UNO_QUERY);
if (xPropState.is())
{
- try
- {
- aNewHeight = xPropState->getPropertyDefault(PROPERTY_ROW_HEIGHT);
- }
+ try
+ {
+ aNewHeight = xPropState->getPropertyDefault(PROPERTY_ROW_HEIGHT);
+ }
catch(Exception&)
{ }
}
}
else
aNewHeight <<= nValue;
- try
- {
- xCols->setPropertyValue(PROPERTY_ROW_HEIGHT, aNewHeight);
- }
- catch(Exception&)
- {
+ try
+ {
+ xCols->setPropertyValue(PROPERTY_ROW_HEIGHT, aNewHeight);
+ }
+ catch(Exception&)
+ {
OSL_ENSURE(0,"setPropertyValue: PROPERTY_ROW_HEIGHT throws a exception");
}
}
@@ -1058,7 +1058,7 @@ void SbaGridControl::CursorMoved()
}
//---------------------------------------------------------------------------------------
-void SbaGridControl::ActivateCell(long nRow, sal_uInt16 nCol, sal_Bool bSetCellFocus /*= sal_True*/ )
+void SbaGridControl::ActivateCell(long nRow, sal_uInt16 nCol, sal_Bool bSetCellFocus /*= sal_True*/ )
{
FmGridControl::ActivateCell(nRow, nCol, bSetCellFocus);
if (m_pMasterListener)
@@ -1122,7 +1122,7 @@ Reference< XPropertySet > SbaGridControl::getField(sal_uInt16 nModelPos)
{
OSL_ENSURE(0,"SbaGridControl::getField Exception occured!");
}
-
+
return xEmptyReturn;
}
@@ -1194,7 +1194,7 @@ void SbaGridControl::StartDrag( sal_Int8 _nAction, const Point& _rPosPixel )
long nCorrectRowCount = GetRowCount();
if (GetOptions() & OPT_INSERT)
- --nCorrectRowCount; // there is a empty row for inserting records
+ --nCorrectRowCount; // there is a empty row for inserting records
if (bCurrentRowVirtual)
--nCorrectRowCount;
@@ -1204,20 +1204,20 @@ void SbaGridControl::StartDrag( sal_Int8 _nAction, const Point& _rPosPixel )
sal_Bool bHitHandle = (nColPos == 0);
// check which kind of dragging has to be initiated
- if ( bHitHandle // the handle column
+ if ( bHitHandle // the handle column
// AND
- && ( GetSelectRowCount() // at least one row is selected
+ && ( GetSelectRowCount() // at least one row is selected
// OR
- || ( (nRow >= 0) // a row below the header
- && !bCurrentRowVirtual // we aren't appending a new record
- && (nRow != GetCurrentPos()) // a row which is not the current one
- ) // OR
- || ( (0 == GetSelectRowCount()) // no rows selected
- && (-1 == nRow) // hit the header
+ || ( (nRow >= 0) // a row below the header
+ && !bCurrentRowVirtual // we aren't appending a new record
+ && (nRow != GetCurrentPos()) // a row which is not the current one
+ ) // OR
+ || ( (0 == GetSelectRowCount()) // no rows selected
+ && (-1 == nRow) // hit the header
)
)
)
- { // => start dragging the row
+ { // => start dragging the row
if (GetDataWindow().IsMouseCaptured())
GetDataWindow().ReleaseMouse();
@@ -1231,11 +1231,11 @@ void SbaGridControl::StartDrag( sal_Int8 _nAction, const Point& _rPosPixel )
bHandled = sal_True;
}
- else if ( (nRow < 0) // the header
- && (!bHitHandle) // non-handle column
- && (nViewPos < GetViewColCount()) // valid (existing) column
+ else if ( (nRow < 0) // the header
+ && (!bHitHandle) // non-handle column
+ && (nViewPos < GetViewColCount()) // valid (existing) column
)
- { // => start dragging the column
+ { // => start dragging the column
if (GetDataWindow().IsMouseCaptured())
GetDataWindow().ReleaseMouse();
@@ -1244,10 +1244,10 @@ void SbaGridControl::StartDrag( sal_Int8 _nAction, const Point& _rPosPixel )
bHandled = sal_True;
}
- else if ( !bHitHandle // non-handle column
- && (nRow >= 0) // non-header row
+ else if ( !bHitHandle // non-handle column
+ && (nRow >= 0) // non-header row
)
- { // => start dragging the field content
+ { // => start dragging the field content
if (GetDataWindow().IsMouseCaptured())
GetDataWindow().ReleaseMouse();
@@ -1300,7 +1300,7 @@ void SbaGridControl::DoColumnDrag(sal_uInt16 nColumnPos)
}
if (0 == sField.getLength())
return;
-
+
OColumnTransferable* pDataTransfer = new OColumnTransferable(xDataSource, sField, xAffectedField, xActiveConnection, CTF_FIELD_DESCRIPTOR | CTF_COLUMN_DESCRIPTOR);
Reference< XTransferable > xEnsureDelete = pDataTransfer;
pDataTransfer->StartDrag(this, DND_ACTION_COPY | DND_ACTION_LINK);
@@ -1385,10 +1385,10 @@ void SbaGridControl::DoFieldDrag(sal_uInt16 nColumnPos, sal_Int16 nRowPos)
}
/// unary_function Functor object for class ZZ returntype is void
- struct SbaGridControlPrec : ::std::unary_function<DataFlavorExVector::value_type,bool>
+ struct SbaGridControlPrec : ::std::unary_function<DataFlavorExVector::value_type,bool>
{
- sal_Bool bQueryDrop;
- SbaGridControlPrec(sal_Bool _bQueryDrop)
+ sal_Bool bQueryDrop;
+ SbaGridControlPrec(sal_Bool _bQueryDrop)
: bQueryDrop(_bQueryDrop)
{
}
@@ -1397,13 +1397,13 @@ void SbaGridControl::DoFieldDrag(sal_uInt16 nColumnPos, sal_Int16 nRowPos)
{
switch (_aType.mnSotId)
{
-// case SOT_FORMAT_RTF: // RTF data descriptions
-// case SOT_FORMATSTR_ID_HTML: // HTML data descriptions
- case SOT_FORMATSTR_ID_DBACCESS_TABLE: // table descriptor
- case SOT_FORMATSTR_ID_DBACCESS_QUERY: // query descriptor
- case SOT_FORMATSTR_ID_DBACCESS_COMMAND: // SQL command
+// case SOT_FORMAT_RTF: // RTF data descriptions
+// case SOT_FORMATSTR_ID_HTML: // HTML data descriptions
+ case SOT_FORMATSTR_ID_DBACCESS_TABLE: // table descriptor
+ case SOT_FORMATSTR_ID_DBACCESS_QUERY: // query descriptor
+ case SOT_FORMATSTR_ID_DBACCESS_COMMAND: // SQL command
return true;
- }
+ }
return false;
}
};
@@ -1417,25 +1417,25 @@ sal_Int8 SbaGridControl::AcceptDrop( const BrowserAcceptDropEvent& rEvt )
return nAction;
if ( IsDropFormatSupported( FORMAT_STRING ) ) do
- { // odd construction, but spares us a lot of (explicit ;) goto's
+ { // odd construction, but spares us a lot of (explicit ;) goto's
if (!GetEmptyRow().Is())
// without an empty row we're not in update mode
break;
- long nRow = GetRowAtYPosPixel(rEvt.maPosPixel.Y(), sal_False);
- sal_uInt16 nCol = GetColumnAtXPosPixel(rEvt.maPosPixel.X(), sal_False);
+ long nRow = GetRowAtYPosPixel(rEvt.maPosPixel.Y(), sal_False);
+ sal_uInt16 nCol = GetColumnAtXPosPixel(rEvt.maPosPixel.X(), sal_False);
long nCorrectRowCount = GetRowCount();
if (GetOptions() & OPT_INSERT)
- --nCorrectRowCount; // there is a empty row for inserting records
+ --nCorrectRowCount; // there is a empty row for inserting records
if (IsCurrentAppending())
- --nCorrectRowCount; // the current data record doesn't really exist, we are appending a new one
+ --nCorrectRowCount; // the current data record doesn't really exist, we are appending a new one
if ((nCol == BROWSER_INVALIDID) || (nRow >= nCorrectRowCount) || GetColumnId(nCol) == 0 )
// no valid cell under the mouse cursor
break;
-
+
Rectangle aRect = GetCellRect(nRow, nCol, sal_False);
if (!aRect.IsInside(rEvt.maPosPixel))
// not dropped within a cell (a cell isn't as wide as the column - the are small spaces)
@@ -1467,7 +1467,7 @@ sal_Int8 SbaGridControl::AcceptDrop( const BrowserAcceptDropEvent& rEvt )
// assume RO
break;
}
-
+
try
{
// assume that text can be dropped into a field if the column has a ::com::sun::star::awt::XTextComponent interface
@@ -1531,14 +1531,14 @@ sal_Int8 SbaGridControl::ExecuteDrop( const BrowserExecuteDropEvent& rEvt )
if ( IsDropFormatSupported( FORMAT_STRING ) )
{
- long nRow = GetRowAtYPosPixel(rEvt.maPosPixel.Y(), sal_False);
- sal_uInt16 nCol = GetColumnAtXPosPixel(rEvt.maPosPixel.X(), sal_False);
+ long nRow = GetRowAtYPosPixel(rEvt.maPosPixel.Y(), sal_False);
+ sal_uInt16 nCol = GetColumnAtXPosPixel(rEvt.maPosPixel.X(), sal_False);
long nCorrectRowCount = GetRowCount();
if (GetOptions() & OPT_INSERT)
- --nCorrectRowCount; // there is a empty row for inserting records
+ --nCorrectRowCount; // there is a empty row for inserting records
if (IsCurrentAppending())
- --nCorrectRowCount; // the current data record doesn't really exist, we are appending a new one
+ --nCorrectRowCount; // the current data record doesn't really exist, we are appending a new one
DBG_ASSERT((nCol != BROWSER_INVALIDID) && (nRow < nCorrectRowCount), "SbaGridControl::Drop : dropped on an invalid position !");
// AcceptDrop should have caught this
@@ -1609,9 +1609,9 @@ IMPL_LINK(SbaGridControl, AsynchDropEvent, void*, /*EMPTY_ARG*/)
{
sal_Bool bCountFinal = sal_False;
xDataSource->getPropertyValue(PROPERTY_ISROWCOUNTFINAL) >>= bCountFinal;
- if ( !bCountFinal )
+ if ( !bCountFinal )
setDataSource(NULL); // deattach from grid control
- Reference< XResultSetUpdate > xResultSetUpdate(xDataSource,UNO_QUERY);
+ Reference< XResultSetUpdate > xResultSetUpdate(xDataSource,UNO_QUERY);
ODatabaseImportExport* pImExport = new ORowSetImportExport(this,xResultSetUpdate,m_aDataDescriptor,getServiceManager());
Reference<XEventListener> xHolder = pImExport;
Hide();
@@ -1639,11 +1639,11 @@ IMPL_LINK(SbaGridControl, AsynchDropEvent, void*, /*EMPTY_ARG*/)
Show();
DBG_UNHANDLED_EXCEPTION();
}
- if ( !bCountFinal )
+ if ( !bCountFinal )
setDataSource(Reference< XRowSet >(xDataSource,UNO_QUERY));
}
- m_aDataDescriptor.clear();
-
+ m_aDataDescriptor.clear();
+
return 0L;
}
// -------------------------------------------------------------------------
@@ -1657,7 +1657,7 @@ IMPL_LINK(SbaGridControl, AsynchDropEvent, void*, /*EMPTY_ARG*/)
}
else
sRet = FmGridControl::GetAccessibleObjectDescription( eObjType,_nPosition);
- return sRet;
+ return sRet;
}
// -----------------------------------------------------------------------------
void SbaGridControl::DeleteSelectedRows()