summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/querydesign
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source/ui/querydesign')
-rw-r--r--dbaccess/source/ui/querydesign/ConnectionLine.cxx18
-rw-r--r--dbaccess/source/ui/querydesign/JoinController.cxx4
-rw-r--r--dbaccess/source/ui/querydesign/JoinTableView.cxx28
-rw-r--r--dbaccess/source/ui/querydesign/QueryDesignFieldUndoAct.hxx4
-rw-r--r--dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx64
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx20
-rw-r--r--dbaccess/source/ui/querydesign/TableWindow.cxx10
-rw-r--r--dbaccess/source/ui/querydesign/querycontainerwindow.cxx2
9 files changed, 76 insertions, 76 deletions
diff --git a/dbaccess/source/ui/querydesign/ConnectionLine.cxx b/dbaccess/source/ui/querydesign/ConnectionLine.cxx
index 5411e22e9457..96086d60b682 100644
--- a/dbaccess/source/ui/querydesign/ConnectionLine.cxx
+++ b/dbaccess/source/ui/querydesign/ConnectionLine.cxx
@@ -29,8 +29,8 @@
#include <vcl/settings.hxx>
using namespace dbaui;
-const long DESCRIPT_LINE_WIDTH = 15;
-const long HIT_SENSITIVE_RADIUS = 5;
+const tools::Long DESCRIPT_LINE_WIDTH = 15;
+const tools::Long HIT_SENSITIVE_RADIUS = 5;
namespace
{
@@ -55,7 +55,7 @@ namespace
tools::Rectangle aReturn;
if ( pListBox )
{
- const long nRowHeight = pListBox->get_widget().get_height_rows(1);
+ const tools::Long nRowHeight = pListBox->get_widget().get_height_rows(1);
aReturn.SetTop( _aConnPos.Y() - nRowHeight );
aReturn.SetBottom( aReturn.Top() + nRowHeight );
if (_aDescrLinePos.X() < _aConnPos.X())
@@ -105,10 +105,10 @@ namespace
else
{
const auto nRowHeight = rTreeView.get_height_rows(1);
- _rNewConPos.AdjustY( -static_cast<long>( 0.5 * nRowHeight ) );
+ _rNewConPos.AdjustY( -static_cast<tools::Long>( 0.5 * nRowHeight ) );
}
- long nListBoxBottom = _pWin->GetPosPixel().Y()
+ tools::Long nListBoxBottom = _pWin->GetPosPixel().Y()
+ pListBox->GetPosPixel().Y()
+ pListBox->GetSizePixel().Height();
if( _rNewConPos.Y() > nListBoxBottom )
@@ -232,8 +232,8 @@ bool OConnectionLine::RecalcLine()
Point aSourceCenter( 0, 0 );
Point aDestCenter( 0, 0 );
- aSourceCenter.setX( pSourceWin->GetPosPixel().X() + static_cast<long>( 0.5*pSourceWin->GetSizePixel().Width() ) );
- aDestCenter.setX( pDestWin->GetPosPixel().X() + static_cast<long>( 0.5*pDestWin->GetSizePixel().Width() ) );
+ aSourceCenter.setX( pSourceWin->GetPosPixel().X() + static_cast<tools::Long>( 0.5*pSourceWin->GetSizePixel().Width() ) );
+ aDestCenter.setX( pDestWin->GetPosPixel().X() + static_cast<tools::Long>( 0.5*pDestWin->GetSizePixel().Width() ) );
const OTableWindow* pFirstWin = pDestWin;
const OTableWindow* pSecondWin = pSourceWin;
@@ -311,8 +311,8 @@ static double dist_Euklid(const Point &p1, const Point& p2,const Point& pM, Poin
double l = (v.X() * w.Y() - v.Y() * w.X()) / a;
double a2 = w.X()*v.X()+w.Y()*v.Y();
a = a2 / (a * a);
- q.setX( long(p1.X() + a * v.X()) );
- q.setY( long(p1.Y() + a * v.Y()) );
+ q.setX( tools::Long(p1.X() + a * v.X()) );
+ q.setY( tools::Long(p1.Y() + a * v.Y()) );
return l;
}
diff --git a/dbaccess/source/ui/querydesign/JoinController.cxx b/dbaccess/source/ui/querydesign/JoinController.cxx
index 49ad53027729..114f77d99865 100644
--- a/dbaccess/source/ui/querydesign/JoinController.cxx
+++ b/dbaccess/source/ui/querydesign/JoinController.cxx
@@ -157,7 +157,7 @@ void OJoinController::impl_onModifyChanged()
InvalidateFeature( SID_RELATION_ADD_RELATION );
}
-void OJoinController::SaveTabWinPosSize(OTableWindow const * pTabWin, long nOffsetX, long nOffsetY)
+void OJoinController::SaveTabWinPosSize(OTableWindow const * pTabWin, tools::Long nOffsetX, tools::Long nOffsetY)
{
// the data for the window
const TTableWindowData::value_type& pData = pTabWin->GetData();
@@ -262,7 +262,7 @@ void OJoinController::runDialogAsync()
});
}
-void OJoinController::SaveTabWinsPosSize( OJoinTableView::OTableWindowMap* pTabWinList, long nOffsetX, long nOffsetY )
+void OJoinController::SaveTabWinsPosSize( OJoinTableView::OTableWindowMap* pTabWinList, tools::Long nOffsetX, tools::Long nOffsetY )
{
// Deletion and recreation of the old implementation with the current model is not correct anymore:
// The TabWins have a pointer to their data, but they are managed by me. When I delete the old ones, the TabWins suddenly have a pointer to objects, which no longer exist.
diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx
index 5ef30e19aeda..a51c375eaf2d 100644
--- a/dbaccess/source/ui/querydesign/JoinTableView.cxx
+++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx
@@ -123,8 +123,8 @@ void OScrollWindowHelper::Resize()
Window::Resize();
Size aTotalOutputSize = GetOutputSizePixel();
- long nHScrollHeight = GetHScrollBar().GetSizePixel().Height();
- long nVScrollWidth = GetVScrollBar().GetSizePixel().Width();
+ tools::Long nHScrollHeight = GetHScrollBar().GetSizePixel().Height();
+ tools::Long nVScrollWidth = GetVScrollBar().GetSizePixel().Width();
GetHScrollBar().SetPosSizePixel(
Point( 0, aTotalOutputSize.Height()-nHScrollHeight ),
@@ -148,7 +148,7 @@ void OScrollWindowHelper::Resize()
GetVScrollBar().SetVisibleSize( aTotalOutputSize.Height() );
// adjust the ranges of the scrollbars if necessary
- long lRange = GetHScrollBar().GetRange().Max() - GetHScrollBar().GetRange().Min();
+ tools::Long lRange = GetHScrollBar().GetRange().Max() - GetHScrollBar().GetRange().Min();
if (m_pTableView->GetScrollOffset().X() + aTotalOutputSize.Width() > lRange)
GetHScrollBar().SetRangeMax(m_pTableView->GetScrollOffset().X() + aTotalOutputSize.Width() + GetHScrollBar().GetRange().Min());
@@ -403,13 +403,13 @@ void OJoinTableView::RemoveTabWin( OTableWindow* pTabWin )
namespace
{
- bool isScrollAllowed( OJoinTableView* _pView,long nDelta, bool bHoriz)
+ bool isScrollAllowed( OJoinTableView* _pView,tools::Long nDelta, bool bHoriz)
{
// adjust ScrollBar-Positions
ScrollBar& rBar = bHoriz ? _pView->GetHScrollBar() : _pView->GetVScrollBar() ;
- long nOldThumbPos = rBar.GetThumbPos();
- long nNewThumbPos = nOldThumbPos + nDelta;
+ tools::Long nOldThumbPos = rBar.GetThumbPos();
+ tools::Long nNewThumbPos = nOldThumbPos + nDelta;
if( nNewThumbPos < 0 )
nNewThumbPos = 0;
else if( nNewThumbPos > rBar.GetRangeMax() )
@@ -425,7 +425,7 @@ namespace
return true;
}
- bool getMovementImpl(OJoinTableView* _pView,const Point& _rPoint,const Size& _rSize,long& _nScrollX,long& _nScrollY)
+ bool getMovementImpl(OJoinTableView* _pView,const Point& _rPoint,const Size& _rSize,tools::Long& _nScrollX,tools::Long& _nScrollY)
{
_nScrollY = _nScrollX = 0;
// data about the tab win
@@ -487,7 +487,7 @@ namespace
bool OJoinTableView::isMovementAllowed(const Point& _rPoint,const Size& _rSize)
{
- long nX,nY;
+ tools::Long nX,nY;
return getMovementImpl(this,_rPoint,_rSize,nX,nY);
}
@@ -501,7 +501,7 @@ void OJoinTableView::EnsureVisible(const OTableWindow* _pWin)
void OJoinTableView::EnsureVisible(const Point& _rPoint,const Size& _rSize)
{
- long nScrollX,nScrollY;
+ tools::Long nScrollX,nScrollY;
if ( getMovementImpl(this,_rPoint,_rSize,nScrollX,nScrollY) )
{
@@ -639,7 +639,7 @@ void OJoinTableView::BeginChildSizing( OTableWindow* pTabWin, PointerStyle nPoin
StartTracking();
}
-bool OJoinTableView::ScrollPane( long nDelta, bool bHoriz, bool bPaintScrollBars )
+bool OJoinTableView::ScrollPane( tools::Long nDelta, bool bHoriz, bool bPaintScrollBars )
{
bool bRet = true;
@@ -648,8 +648,8 @@ bool OJoinTableView::ScrollPane( long nDelta, bool bHoriz, bool bPaintScrollBars
{
if( bHoriz )
{
- long nOldThumbPos = GetHScrollBar().GetThumbPos();
- long nNewThumbPos = nOldThumbPos + nDelta;
+ tools::Long nOldThumbPos = GetHScrollBar().GetThumbPos();
+ tools::Long nNewThumbPos = nOldThumbPos + nDelta;
if( nNewThumbPos < 0 )
{
nNewThumbPos = 0;
@@ -665,8 +665,8 @@ bool OJoinTableView::ScrollPane( long nDelta, bool bHoriz, bool bPaintScrollBars
}
else
{
- long nOldThumbPos = GetVScrollBar().GetThumbPos();
- long nNewThumbPos = nOldThumbPos+nDelta;
+ tools::Long nOldThumbPos = GetVScrollBar().GetThumbPos();
+ tools::Long nNewThumbPos = nOldThumbPos+nDelta;
if( nNewThumbPos < 0 )
{
nNewThumbPos = 0;
diff --git a/dbaccess/source/ui/querydesign/QueryDesignFieldUndoAct.hxx b/dbaccess/source/ui/querydesign/QueryDesignFieldUndoAct.hxx
index 47be95d92c47..601d25f9c01c 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignFieldUndoAct.hxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignFieldUndoAct.hxx
@@ -71,12 +71,12 @@ namespace dbaui
class OTabFieldSizedUndoAct final : public OQueryDesignFieldUndoAct
{
- long m_nNextWidth;
+ tools::Long m_nNextWidth;
public:
explicit OTabFieldSizedUndoAct(OSelectionBrowseBox* pSelBrwBox) : OQueryDesignFieldUndoAct(pSelBrwBox, STR_QUERY_UNDO_SIZE_COLUMN), m_nNextWidth(0) { }
- void SetOriginalWidth(long nWidth) { m_nNextWidth = nWidth; }
+ void SetOriginalWidth(tools::Long nWidth) { m_nNextWidth = nWidth; }
virtual void Undo() override;
virtual void Redo() override { Undo(); }
diff --git a/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx b/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx
index 6242c94fc09f..3171c8789dcb 100644
--- a/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx
+++ b/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx
@@ -88,7 +88,7 @@ void OTabFieldSizedUndoAct::Undo()
if ( m_nColumnPosition != BROWSER_INVALIDID )
{
sal_uInt16 nColumnId = pOwner->GetColumnId(m_nColumnPosition);
- long nNextWidth = pOwner->GetColumnWidth(nColumnId);
+ tools::Long nNextWidth = pOwner->GetColumnWidth(nColumnId);
pOwner->SetColWidth(nColumnId, m_nNextWidth);
m_nNextWidth = nNextWidth;
}
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 030c8caf07e8..ccb389c2dd06 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -355,7 +355,7 @@ void OSelectionBrowseBox::Init()
SetDataRowHeight(aHeight.Height());
SetTitleLines(1);
// get number of visible rows
- for(long i=0;i<BROW_ROW_CNT;i++)
+ for(tools::Long i=0;i<BROW_ROW_CNT;i++)
{
if(m_bVisibleRow[i])
m_nVisibleCount++;
@@ -429,7 +429,7 @@ void OSelectionBrowseBox::SetReadOnly(bool bRO)
}
}
-CellController* OSelectionBrowseBox::GetController(long nRow, sal_uInt16 nColId)
+CellController* OSelectionBrowseBox::GetController(tools::Long nRow, sal_uInt16 nColId)
{
if ( nColId > getFields().size() )
return nullptr;
@@ -442,7 +442,7 @@ CellController* OSelectionBrowseBox::GetController(long nRow, sal_uInt16 nColId)
if (static_cast<OQueryController&>(getDesignView()->getController()).isReadOnly())
return nullptr;
- long nCellIndex = GetRealRow(nRow);
+ tools::Long nCellIndex = GetRealRow(nRow);
switch (nCellIndex)
{
case BROW_FIELD_ROW:
@@ -460,7 +460,7 @@ CellController* OSelectionBrowseBox::GetController(long nRow, sal_uInt16 nColId)
}
}
-void OSelectionBrowseBox::InitController(CellControllerRef& /*rController*/, long nRow, sal_uInt16 nColId)
+void OSelectionBrowseBox::InitController(CellControllerRef& /*rController*/, tools::Long nRow, sal_uInt16 nColId)
{
OSL_ENSURE(nColId != BROWSER_INVALIDID,"An Invalid Id was set!");
if ( nColId == BROWSER_INVALIDID )
@@ -470,7 +470,7 @@ void OSelectionBrowseBox::InitController(CellControllerRef& /*rController*/, lon
return;
OTableFieldDescRef pEntry = getFields()[nPos-1];
OSL_ENSURE(pEntry.is(), "OSelectionBrowseBox::InitController : invalid FieldDescription !");
- long nCellIndex = GetRealRow(nRow);
+ tools::Long nCellIndex = GetRealRow(nRow);
switch (nCellIndex)
{
@@ -905,7 +905,7 @@ bool OSelectionBrowseBox::SaveModified()
{
// for the Undo-action
OUString strOldCellContents,sNewValue;
- long nRow = GetRealRow(GetCurRow());
+ tools::Long nRow = GetRealRow(GetCurRow());
bool bAppendRow = false;
switch (nRow)
{
@@ -1211,7 +1211,7 @@ bool OSelectionBrowseBox::SaveModified()
return pEntry != nullptr && !bError;
}
-bool OSelectionBrowseBox::SeekRow(long nRow)
+bool OSelectionBrowseBox::SeekRow(tools::Long nRow)
{
m_nSeekRow = nRow;
return nRow < m_nVisibleCount;
@@ -1229,7 +1229,7 @@ void OSelectionBrowseBox::PaintCell(OutputDevice& rDev, const tools::Rectangle&
if (!pEntry.is())
return;
- long nRow = GetRealRow(m_nSeekRow);
+ tools::Long nRow = GetRealRow(m_nSeekRow);
if (nRow == BROW_VIS_ROW)
PaintTristate(rRect, pEntry->IsVisible() ? TRISTATE_TRUE : TRISTATE_FALSE);
else
@@ -1260,7 +1260,7 @@ void OSelectionBrowseBox::RemoveColumn(sal_uInt16 _nColumnId)
// ColId is synonymous to Position, and the condition should be valid
sal_uInt16 nCurCol = GetCurColumnId();
- long nCurrentRow = GetCurRow();
+ tools::Long nCurrentRow = GetCurRow();
DeactivateCell();
@@ -1446,7 +1446,7 @@ void OSelectionBrowseBox::DeleteFields(const OUString& rAliasName)
ActivateCell(nRow , nColId);
}
-void OSelectionBrowseBox::SetColWidth(sal_uInt16 nColId, long nNewWidth)
+void OSelectionBrowseBox::SetColWidth(sal_uInt16 nColId, tools::Long nNewWidth)
{
bool bWasEditing = IsEditing();
if (bWasEditing)
@@ -1479,11 +1479,11 @@ tools::Rectangle OSelectionBrowseBox::GetInvalidRect( sal_uInt16 nColId )
void OSelectionBrowseBox::InsertColumn(const OTableFieldDescRef& pEntry, sal_uInt16& _nColumnPosition)
{
// the control should have exactly one more column: the HandleColumn
- OSL_ENSURE(_nColumnPosition == BROWSER_INVALIDID || (_nColumnPosition <= static_cast<long>(getFields().size())), "OSelectionBrowseBox::InsertColumn : invalid parameter nColId.");
+ OSL_ENSURE(_nColumnPosition == BROWSER_INVALIDID || (_nColumnPosition <= static_cast<tools::Long>(getFields().size())), "OSelectionBrowseBox::InsertColumn : invalid parameter nColId.");
// -1 means at the end. Count means at the end, others denotes a correct position
sal_uInt16 nCurCol = GetCurColumnId();
- long nCurrentRow = GetCurRow();
+ tools::Long nCurrentRow = GetCurRow();
DeactivateCell();
@@ -1857,7 +1857,7 @@ bool OSelectionBrowseBox::Save()
void OSelectionBrowseBox::CellModified()
{
- long nRow = GetRealRow(GetCurRow());
+ tools::Long nRow = GetRealRow(GetCurRow());
switch (nRow)
{
case BROW_VIS_ROW:
@@ -1928,7 +1928,7 @@ void OSelectionBrowseBox::Command(const CommandEvent& rEvt)
}
sal_uInt16 nColId = GetColumnId(GetColumnAtXPosPixel( aMenuPos.X() ));
- long nRow = GetRowAtYPosPixel( aMenuPos.Y() );
+ tools::Long nRow = GetRowAtYPosPixel( aMenuPos.Y() );
if (nRow < 0 && nColId > HANDLE_ID )
{
@@ -2018,7 +2018,7 @@ void OSelectionBrowseBox::SetRowVisible(sal_uInt16 _nWhich, bool _bVis)
// do this before removing or inserting rows, as this triggers ActivateCell-calls, which rely on m_bVisibleRow
m_bVisibleRow[_nWhich] = !m_bVisibleRow[_nWhich];
- long nId = GetBrowseRow(_nWhich);
+ tools::Long nId = GetBrowseRow(_nWhich);
if (_bVis)
{
RowInserted(nId);
@@ -2034,10 +2034,10 @@ void OSelectionBrowseBox::SetRowVisible(sal_uInt16 _nWhich, bool _bVis)
ActivateCell();
}
-long OSelectionBrowseBox::GetBrowseRow(long nRowId) const
+tools::Long OSelectionBrowseBox::GetBrowseRow(tools::Long nRowId) const
{
sal_uInt16 nCount(0);
- for(long i = 0 ; i < nRowId ; ++i)
+ for(tools::Long i = 0 ; i < nRowId ; ++i)
{
if ( m_bVisibleRow[i] )
++nCount;
@@ -2045,20 +2045,20 @@ long OSelectionBrowseBox::GetBrowseRow(long nRowId) const
return nCount;
}
-long OSelectionBrowseBox::GetRealRow(long nRowId) const
+tools::Long OSelectionBrowseBox::GetRealRow(tools::Long nRowId) const
{
- long nErg=0,i;
- const long nCount = m_bVisibleRow.size();
+ tools::Long nErg=0,i;
+ const tools::Long nCount = m_bVisibleRow.size();
for(i=0;i < nCount; ++i)
{
if(m_bVisibleRow[i] && nErg++ == nRowId)
break;
}
- OSL_ENSURE(nErg <= long(m_bVisibleRow.size()),"nErg cannot be greater than BROW_ROW_CNT!");
+ OSL_ENSURE(nErg <= tools::Long(m_bVisibleRow.size()),"nErg cannot be greater than BROW_ROW_CNT!");
return i;
}
-const long nVisibleRowMask[] =
+const tools::Long nVisibleRowMask[] =
{
0x0001,
0x0002,
@@ -2086,7 +2086,7 @@ sal_Int32 OSelectionBrowseBox::GetNoneVisibleRows() const
return nErg;
}
-void OSelectionBrowseBox::SetNoneVisibleRow(long nRows)
+void OSelectionBrowseBox::SetNoneVisibleRow(tools::Long nRows)
{
// only the first 11 rows are interesting
sal_Int32 const nSize = SAL_N_ELEMENTS(nVisibleRowMask);
@@ -2094,7 +2094,7 @@ void OSelectionBrowseBox::SetNoneVisibleRow(long nRows)
m_bVisibleRow[i] = !(nRows & nVisibleRowMask[i]);
}
-OUString OSelectionBrowseBox::GetCellText(long nRow, sal_uInt16 nColId) const
+OUString OSelectionBrowseBox::GetCellText(tools::Long nRow, sal_uInt16 nColId) const
{
sal_uInt16 nPos = GetColumnPos(nColId);
@@ -2290,7 +2290,7 @@ void OSelectionBrowseBox::SetCellContents(sal_Int32 nRow, sal_uInt16 nColId, con
pEntry->SetCriteria(sal_uInt16(nRow - BROW_CRIT1_ROW), strNewText);
}
- long nCellIndex = GetRealRow(nRow);
+ tools::Long nCellIndex = GetRealRow(nRow);
if(IsRowVisible(static_cast<sal_uInt16>(nRow)))
RowModified(nCellIndex, nColId);
@@ -2333,7 +2333,7 @@ void OSelectionBrowseBox::ColumnResized(sal_uInt16 nColId)
}
}
-sal_uInt32 OSelectionBrowseBox::GetTotalCellWidth(long nRowId, sal_uInt16 nColId)
+sal_uInt32 OSelectionBrowseBox::GetTotalCellWidth(tools::Long nRowId, sal_uInt16 nColId)
{
sal_uInt16 nPos = GetColumnPos(nColId);
OSL_ENSURE((nPos == 0) || (nPos <= getFields().size()), "OSelectionBrowseBox::GetTotalCellWidth : invalid parameter nColId");
@@ -2341,7 +2341,7 @@ sal_uInt32 OSelectionBrowseBox::GetTotalCellWidth(long nRowId, sal_uInt16 nColId
OTableFieldDescRef pEntry = getFields()[nPos-1];
OSL_ENSURE(pEntry.is(), "OSelectionBrowseBox::GetTotalCellWidth : invalid FieldDescription !");
- long nRow = GetRealRow(nRowId);
+ tools::Long nRow = GetRealRow(nRowId);
OUString strText(GetCellText(nRow, nColId));
return GetDataWindow().LogicToPixel(Size(GetDataWindow().GetTextWidth(strText),0)).Width();
}
@@ -2349,7 +2349,7 @@ sal_uInt32 OSelectionBrowseBox::GetTotalCellWidth(long nRowId, sal_uInt16 nColId
bool OSelectionBrowseBox::isCutAllowed() const
{
bool bCutAllowed = false;
- long nRow = GetRealRow(GetCurRow());
+ tools::Long nRow = GetRealRow(GetCurRow());
switch (nRow)
{
case BROW_VIS_ROW:
@@ -2377,7 +2377,7 @@ bool OSelectionBrowseBox::isCutAllowed() const
void OSelectionBrowseBox::cut()
{
- long nRow = GetRealRow(GetCurRow());
+ tools::Long nRow = GetRealRow(GetCurRow());
switch (nRow)
{
case BROW_FIELD_ROW:
@@ -2400,7 +2400,7 @@ void OSelectionBrowseBox::cut()
void OSelectionBrowseBox::paste()
{
- long nRow = GetRealRow(GetCurRow());
+ tools::Long nRow = GetRealRow(GetCurRow());
switch (nRow)
{
case BROW_FIELD_ROW:
@@ -2423,7 +2423,7 @@ void OSelectionBrowseBox::paste()
bool OSelectionBrowseBox::isPasteAllowed() const
{
bool bPasteAllowed = true;
- long nRow = GetRealRow(GetCurRow());
+ tools::Long nRow = GetRealRow(GetCurRow());
switch (nRow)
{
case BROW_VIS_ROW:
@@ -2443,7 +2443,7 @@ bool OSelectionBrowseBox::isCopyAllowed() const
void OSelectionBrowseBox::copy()
{
- long nRow = GetRealRow(GetCurRow());
+ tools::Long nRow = GetRealRow(GetCurRow());
switch (nRow)
{
case BROW_FIELD_ROW:
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
index 99dfd424b8de..7fe01622fcbd 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
@@ -52,7 +52,7 @@ namespace dbaui
std::vector<bool> m_bVisibleRow; // at pos we find the RowId
Timer m_timerInvalidate;
- long m_nSeekRow;
+ tools::Long m_nSeekRow;
BrowserMode m_nMode; // remember the BrowseModes
VclPtr< ::svt::EditControl> m_pTextCell;
VclPtr< ::svt::CheckBoxControl> m_pVisibleCell;
@@ -104,14 +104,14 @@ namespace dbaui
OQueryDesignView* getDesignView() const;
sal_uInt16 FieldsCount();
- void SetColWidth(sal_uInt16 nColId, long lNewWidth);
+ void SetColWidth(sal_uInt16 nColId, tools::Long lNewWidth);
// unlike SetColumnWidth of the base class it checks an active cell in this column
OUString GetCellContents(sal_Int32 nCellIndex, sal_uInt16 nColId);
void SetCellContents(sal_Int32 nCellIndex, sal_uInt16 nColId, const OUString& strNewText);
// cell content (formatted as string) set/return
sal_Int32 GetNoneVisibleRows() const;
- void SetNoneVisibleRow(long nRows);
+ void SetNoneVisibleRow(tools::Long nRows);
bool IsRowVisible(sal_uInt16 _nWhich) const;
void SetRowVisible(sal_uInt16 _nWhich, bool _bVis);
@@ -150,7 +150,7 @@ namespace dbaui
@return
the text out of the cell
*/
- virtual OUString GetCellText(long _nRow, sal_uInt16 _nColId) const override;
+ virtual OUString GetCellText(tools::Long _nRow, sal_uInt16 _nColId) const override;
/** returns the description of the row.
@param _nRow
@@ -178,7 +178,7 @@ namespace dbaui
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessibleCell( sal_Int32 nRow, sal_uInt16 nColumnId ) override;
private:
- virtual bool SeekRow( long nRow ) override;
+ virtual bool SeekRow( tools::Long nRow ) override;
virtual void PaintStatusCell(OutputDevice& rDev, const tools::Rectangle& rRect) const override;
virtual void PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect,
@@ -191,14 +191,14 @@ namespace dbaui
virtual void KeyInput( const KeyEvent& rEvt ) override;
virtual void Command(const CommandEvent& rEvt) override;
- virtual ::svt::CellController* GetController(long nRow, sal_uInt16 nCol) override;
- virtual void InitController(::svt::CellControllerRef& rController, long nRow, sal_uInt16 nCol) override;
+ virtual ::svt::CellController* GetController(tools::Long nRow, sal_uInt16 nCol) override;
+ virtual void InitController(::svt::CellControllerRef& rController, tools::Long nRow, sal_uInt16 nCol) override;
virtual void CellModified() override;
virtual bool SaveModified() override;
virtual void Init() override;
virtual void ColumnResized( sal_uInt16 nColId ) override;
- virtual sal_uInt32 GetTotalCellWidth(long nRow, sal_uInt16 nColId) override;
+ virtual sal_uInt32 GetTotalCellWidth(tools::Long nRow, sal_uInt16 nColId) override;
// if you want to have an own header ...
virtual VclPtr<BrowserHeader> imp_CreateHeaderBar(BrowseBox* pParent) override;
@@ -216,8 +216,8 @@ namespace dbaui
void RemoveField( sal_uInt16 nId );
tools::Rectangle GetInvalidRect( sal_uInt16 nColId );
- long GetRealRow(long nRow) const;
- long GetBrowseRow(long nRowId) const;
+ tools::Long GetRealRow(tools::Long nRow) const;
+ tools::Long GetBrowseRow(tools::Long nRowId) const;
bool GetFunctionName(sal_uInt32 _nFunctionTokenId, OUString& rFkt);
void appendUndoAction(const OUString& _rOldValue,const OUString& _rNewValue,sal_Int32 _nRow, bool& _bListAction);
void appendUndoAction(const OUString& _rOldValue,const OUString& _rNewValue,sal_Int32 _nRow);
diff --git a/dbaccess/source/ui/querydesign/TableWindow.cxx b/dbaccess/source/ui/querydesign/TableWindow.cxx
index 02f45afb416f..5744f58bdb3e 100644
--- a/dbaccess/source/ui/querydesign/TableWindow.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindow.cxx
@@ -429,12 +429,12 @@ void OTableWindow::Resize()
Size aOutSize = GetOutputSizePixel();
aOutSize = Size(CalcZoom(aOutSize.Width()),CalcZoom(aOutSize.Height()));
- long nTitleHeight = CalcZoom( GetTextHeight() )+ CalcZoom( 4 );
+ tools::Long nTitleHeight = CalcZoom( GetTextHeight() )+ CalcZoom( 4 );
// Set the title and ListBox
- long n5Pos = CalcZoom(5);
- long nPositionX = n5Pos;
- long nPositionY = n5Pos;
+ tools::Long n5Pos = CalcZoom(5);
+ tools::Long nPositionX = n5Pos;
+ tools::Long nPositionY = n5Pos;
// position the image which indicates the type
m_aTypeImage->SetPosPixel( Point( nPositionX, nPositionY ) );
@@ -447,7 +447,7 @@ void OTableWindow::Resize()
nPositionX += aImageSize.Width() + CalcZoom( 2 );
m_xTitle->SetPosSizePixel( Point( nPositionX, nPositionY ), Size( aOutSize.Width() - nPositionX - n5Pos, nTitleHeight ) );
- long nTitleToList = CalcZoom( 3 );
+ tools::Long nTitleToList = CalcZoom( 3 );
m_xListBox->SetPosSizePixel(
Point( n5Pos, nPositionY + nTitleHeight + nTitleToList ),
diff --git a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx
index 9481f6518cf5..68b4c5c86865 100644
--- a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx
+++ b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx
@@ -201,7 +201,7 @@ namespace dbaui
Size aSize = GetOutputSizePixel();
Size aBeamer(aSize.Width(),sal_Int32(aSize.Height()*0.33));
- const long nFrameHeight = LogicToPixel(Size(0, 3), MapMode(MapUnit::MapAppFont)).Height();
+ const tools::Long nFrameHeight = LogicToPixel(Size(0, 3), MapMode(MapUnit::MapAppFont)).Height();
Point aPos(0,aBeamer.Height()+nFrameHeight);
m_pBeamer->SetPosSizePixel(Point(0,0),aBeamer);