convert some tools::Long->sal_Int32
in places where it is obvious we only need a sal_Int32, because we are dealing with rows and columns, and not even calc needs more than 32 bits for that. Change-Id: I114417e639c224d45bfd9fc6838122ab195eefa3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104584 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -70,11 +70,6 @@ const BrowserMode BrowserStdFlags = BrowserMode::COLUMNSELECTION |
|
||||
BrowserMode::AUTO_HSCROLL | BrowserMode::AUTO_VSCROLL |
|
||||
BrowserMode::HIDESELECT;
|
||||
|
||||
sal_Int32 lcl_getRowInData( tools::Long nRow )
|
||||
{
|
||||
return static_cast< sal_Int32 >( nRow );
|
||||
}
|
||||
|
||||
sal_Int32 lcl_getColumnInData( sal_uInt16 nCol )
|
||||
{
|
||||
return static_cast< sal_Int32 >( nCol ) - 1;
|
||||
@@ -607,7 +602,7 @@ void DataBrowser::RenewTable()
|
||||
if (!m_apDataBrowserModel)
|
||||
return;
|
||||
|
||||
tools::Long nOldRow = GetCurRow();
|
||||
sal_Int32 nOldRow = GetCurRow();
|
||||
sal_uInt16 nOldColId = GetCurColumnId();
|
||||
|
||||
bool bLastUpdateMode = GetUpdateMode();
|
||||
@@ -684,13 +679,13 @@ OUString DataBrowser::GetColString( sal_Int32 nColumnId ) const
|
||||
return OUString();
|
||||
}
|
||||
|
||||
OUString DataBrowser::GetCellText( tools::Long nRow, sal_uInt16 nColumnId ) const
|
||||
OUString DataBrowser::GetCellText( sal_Int32 nRow, sal_uInt16 nColumnId ) const
|
||||
{
|
||||
OUString aResult;
|
||||
|
||||
if( nColumnId == 0 )
|
||||
{
|
||||
aResult = OUString::number(static_cast< sal_Int32 >( nRow ) + 1);
|
||||
aResult = OUString::number(nRow + 1);
|
||||
}
|
||||
else if( nRow >= 0 && m_apDataBrowserModel)
|
||||
{
|
||||
@@ -744,7 +739,7 @@ OUString DataBrowser::GetCellText( tools::Long nRow, sal_uInt16 nColumnId ) cons
|
||||
return aResult;
|
||||
}
|
||||
|
||||
double DataBrowser::GetCellNumber( tools::Long nRow, sal_uInt16 nColumnId ) const
|
||||
double DataBrowser::GetCellNumber( sal_Int32 nRow, sal_uInt16 nColumnId ) const
|
||||
{
|
||||
double fResult;
|
||||
::rtl::math::setNan( & fResult );
|
||||
@@ -913,7 +908,7 @@ void DataBrowser::RemoveColumn()
|
||||
|
||||
void DataBrowser::InsertRow()
|
||||
{
|
||||
sal_Int32 nRowIdx = lcl_getRowInData( GetCurRow());
|
||||
sal_Int32 nRowIdx = GetCurRow();
|
||||
|
||||
if( nRowIdx >= 0 && m_apDataBrowserModel)
|
||||
{
|
||||
@@ -928,7 +923,7 @@ void DataBrowser::InsertRow()
|
||||
|
||||
void DataBrowser::RemoveRow()
|
||||
{
|
||||
sal_Int32 nRowIdx = lcl_getRowInData( GetCurRow());
|
||||
sal_Int32 nRowIdx = GetCurRow();
|
||||
|
||||
if( nRowIdx >= 0 && m_apDataBrowserModel)
|
||||
{
|
||||
@@ -986,7 +981,7 @@ void DataBrowser::MoveRightColumn()
|
||||
|
||||
void DataBrowser::MoveUpRow()
|
||||
{
|
||||
sal_Int32 nRowIdx = lcl_getRowInData( GetCurRow());
|
||||
sal_Int32 nRowIdx = GetCurRow();
|
||||
|
||||
if( !(nRowIdx > 0 && m_apDataBrowserModel))
|
||||
return;
|
||||
@@ -1007,7 +1002,7 @@ void DataBrowser::MoveUpRow()
|
||||
|
||||
void DataBrowser::MoveDownRow()
|
||||
{
|
||||
sal_Int32 nRowIdx = lcl_getRowInData( GetCurRow());
|
||||
sal_Int32 nRowIdx = GetCurRow();
|
||||
|
||||
if( !(nRowIdx >= 0 && m_apDataBrowserModel))
|
||||
return;
|
||||
@@ -1063,7 +1058,7 @@ void DataBrowser::PaintCell(
|
||||
rDev.SetClipRegion();
|
||||
}
|
||||
|
||||
bool DataBrowser::SeekRow( tools::Long nRow )
|
||||
bool DataBrowser::SeekRow( sal_Int32 nRow )
|
||||
{
|
||||
if( ! EditBrowseBox::SeekRow( nRow ))
|
||||
return false;
|
||||
@@ -1078,14 +1073,14 @@ bool DataBrowser::SeekRow( tools::Long nRow )
|
||||
|
||||
bool DataBrowser::IsTabAllowed( bool bForward ) const
|
||||
{
|
||||
tools::Long nRow = GetCurRow();
|
||||
tools::Long nCol = GetCurColumnId();
|
||||
sal_Int32 nRow = GetCurRow();
|
||||
sal_Int32 nCol = GetCurColumnId();
|
||||
|
||||
// column 0 is header-column
|
||||
tools::Long nBadCol = bForward
|
||||
sal_Int32 nBadCol = bForward
|
||||
? GetColumnCount() - 1
|
||||
: 1;
|
||||
tools::Long nBadRow = bForward
|
||||
sal_Int32 nBadRow = bForward
|
||||
? GetRowCount() - 1
|
||||
: 0;
|
||||
|
||||
@@ -1099,7 +1094,7 @@ bool DataBrowser::IsTabAllowed( bool bForward ) const
|
||||
nCol != nBadCol );
|
||||
}
|
||||
|
||||
::svt::CellController* DataBrowser::GetController( tools::Long /*nRow*/, sal_uInt16 nCol )
|
||||
::svt::CellController* DataBrowser::GetController( sal_Int32 /*nRow*/, sal_uInt16 nCol )
|
||||
{
|
||||
if( m_bIsReadOnly )
|
||||
return nullptr;
|
||||
@@ -1116,7 +1111,7 @@ bool DataBrowser::IsTabAllowed( bool bForward ) const
|
||||
}
|
||||
|
||||
void DataBrowser::InitController(
|
||||
::svt::CellControllerRef& rController, tools::Long nRow, sal_uInt16 nCol )
|
||||
::svt::CellControllerRef& rController, sal_Int32 nRow, sal_uInt16 nCol )
|
||||
{
|
||||
if( rController == m_rTextEditController )
|
||||
{
|
||||
@@ -1176,7 +1171,7 @@ bool DataBrowser::SaveModified()
|
||||
|
||||
bool bChangeValid = true;
|
||||
|
||||
const sal_Int32 nRow = lcl_getRowInData( GetCurRow());
|
||||
const sal_Int32 nRow = GetCurRow();
|
||||
const sal_Int32 nCol = lcl_getColumnInData( GetCurColumnId());
|
||||
|
||||
OSL_ENSURE( nRow >= 0 || nCol >= 0, "This cell should not be modified!" );
|
||||
|
||||
@@ -55,10 +55,10 @@ class DataBrowser : public ::svt::EditBrowseBox
|
||||
protected:
|
||||
// EditBrowseBox overridables
|
||||
virtual void PaintCell( OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColumnId ) const override;
|
||||
virtual bool SeekRow( tools::Long nRow ) override;
|
||||
virtual bool SeekRow( sal_Int32 nRow ) override;
|
||||
virtual bool IsTabAllowed( bool bForward ) const 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 ::svt::CellController* GetController( sal_Int32 nRow, sal_uInt16 nCol ) override;
|
||||
virtual void InitController( ::svt::CellControllerRef& rController, sal_Int32 nRow, sal_uInt16 nCol ) override;
|
||||
virtual bool SaveModified() override;
|
||||
virtual void CursorMoved() override;
|
||||
// called whenever the control of the current cell has been modified
|
||||
@@ -82,12 +82,12 @@ public:
|
||||
@return
|
||||
the text out of the cell
|
||||
*/
|
||||
virtual OUString GetCellText(tools::Long nRow, sal_uInt16 nColId) const override;
|
||||
virtual OUString GetCellText(sal_Int32 nRow, sal_uInt16 nColId) const override;
|
||||
|
||||
/** returns the number in the given cell. If a cell is empty or contains a
|
||||
string, the result will be Nan
|
||||
*/
|
||||
double GetCellNumber( tools::Long nRow, sal_uInt16 nColumnId ) const;
|
||||
double GetCellNumber( sal_Int32 nRow, sal_uInt16 nColumnId ) const;
|
||||
|
||||
bool isDateTimeString( const OUString& aInputString, double& fOutDateTimeValue );
|
||||
|
||||
@@ -154,7 +154,7 @@ private:
|
||||
std::shared_ptr< NumberFormatterWrapper > m_spNumberFormatterWrapper;
|
||||
|
||||
/// the row that is currently painted
|
||||
tools::Long m_nSeekRow;
|
||||
sal_Int32 m_nSeekRow;
|
||||
bool m_bIsReadOnly;
|
||||
bool m_bDataValid;
|
||||
|
||||
|
||||
@@ -658,7 +658,7 @@ VclPtr<BrowserHeader> SbaGridControl::imp_CreateHeaderBar(BrowseBox* pParent)
|
||||
return VclPtr<SbaGridHeader>::Create(pParent);
|
||||
}
|
||||
|
||||
CellController* SbaGridControl::GetController(tools::Long nRow, sal_uInt16 nCol)
|
||||
CellController* SbaGridControl::GetController(sal_Int32 nRow, sal_uInt16 nCol)
|
||||
{
|
||||
if ( m_bActivatingForDrop )
|
||||
return nullptr;
|
||||
@@ -850,7 +850,7 @@ void SbaGridControl::Select()
|
||||
m_pMasterListener->SelectionChanged();
|
||||
}
|
||||
|
||||
void SbaGridControl::ActivateCell(tools::Long nRow, sal_uInt16 nCol, bool bSetCellFocus /*= sal_True*/ )
|
||||
void SbaGridControl::ActivateCell(sal_Int32 nRow, sal_uInt16 nCol, bool bSetCellFocus /*= sal_True*/ )
|
||||
{
|
||||
FmGridControl::ActivateCell(nRow, nCol, bSetCellFocus);
|
||||
if (m_pMasterListener)
|
||||
@@ -937,7 +937,7 @@ bool SbaGridControl::IsReadOnlyDB() const
|
||||
|
||||
void SbaGridControl::MouseButtonDown( const BrowserMouseEvent& rMEvt)
|
||||
{
|
||||
tools::Long nRow = GetRowAtYPosPixel(rMEvt.GetPosPixel().Y());
|
||||
sal_Int32 nRow = GetRowAtYPosPixel(rMEvt.GetPosPixel().Y());
|
||||
sal_uInt16 nColPos = GetColumnAtXPosPixel(rMEvt.GetPosPixel().X());
|
||||
sal_uInt16 nViewPos = (nColPos == BROWSER_INVALIDID) ? sal_uInt16(-1) : nColPos-1;
|
||||
// 'the handle column' and 'no valid column' will both result in a view position of -1 !
|
||||
@@ -963,7 +963,7 @@ void SbaGridControl::StartDrag( sal_Int8 _nAction, const Point& _rPosPixel )
|
||||
// (Yes, this is controller (not view) functionality. But collecting and evaluating all the
|
||||
// information necessary via UNO would be quite difficult (if not impossible) so
|
||||
// my laziness says 'do it here'...)
|
||||
tools::Long nRow = GetRowAtYPosPixel(_rPosPixel.Y());
|
||||
sal_Int32 nRow = GetRowAtYPosPixel(_rPosPixel.Y());
|
||||
sal_uInt16 nColPos = GetColumnAtXPosPixel(_rPosPixel.X());
|
||||
sal_uInt16 nViewPos = (nColPos == BROWSER_INVALIDID) ? sal_uInt16(-1) : nColPos-1;
|
||||
// 'the handle column' and 'no valid column' will both result in a view position of -1 !
|
||||
@@ -972,7 +972,7 @@ void SbaGridControl::StartDrag( sal_Int8 _nAction, const Point& _rPosPixel )
|
||||
// the current row doesn't really exist: the user's appending a new one and already has entered some data,
|
||||
// so the row contains data which has no counter part within the data source
|
||||
|
||||
tools::Long nCorrectRowCount = GetRowCount();
|
||||
sal_Int32 nCorrectRowCount = GetRowCount();
|
||||
if (GetOptions() & DbGridControlOptions::Insert)
|
||||
--nCorrectRowCount; // there is an empty row for inserting records
|
||||
if (bCurrentRowVirtual)
|
||||
@@ -1182,10 +1182,10 @@ sal_Int8 SbaGridControl::AcceptDrop( const BrowserAcceptDropEvent& rEvt )
|
||||
// without an empty row we're not in update mode
|
||||
break;
|
||||
|
||||
const tools::Long nRow = GetRowAtYPosPixel(rEvt.maPosPixel.Y(), false);
|
||||
const sal_Int32 nRow = GetRowAtYPosPixel(rEvt.maPosPixel.Y(), false);
|
||||
const sal_uInt16 nCol = GetColumnId(GetColumnAtXPosPixel(rEvt.maPosPixel.X()));
|
||||
|
||||
tools::Long nCorrectRowCount = GetRowCount();
|
||||
sal_Int32 nCorrectRowCount = GetRowCount();
|
||||
if (GetOptions() & DbGridControlOptions::Insert)
|
||||
--nCorrectRowCount; // there is an empty row for inserting records
|
||||
if (IsCurrentAppending())
|
||||
@@ -1275,10 +1275,10 @@ sal_Int8 SbaGridControl::ExecuteDrop( const BrowserExecuteDropEvent& rEvt )
|
||||
|
||||
if ( IsDropFormatSupported( SotClipboardFormatId::STRING ) )
|
||||
{
|
||||
tools::Long nRow = GetRowAtYPosPixel(rEvt.maPosPixel.Y(), false);
|
||||
sal_Int32 nRow = GetRowAtYPosPixel(rEvt.maPosPixel.Y(), false);
|
||||
sal_uInt16 nCol = GetColumnAtXPosPixel(rEvt.maPosPixel.X());
|
||||
|
||||
tools::Long nCorrectRowCount = GetRowCount();
|
||||
sal_Int32 nCorrectRowCount = GetRowCount();
|
||||
if (GetOptions() & DbGridControlOptions::Insert)
|
||||
--nCorrectRowCount; // there is an empty row for inserting records
|
||||
if (IsCurrentAppending())
|
||||
|
||||
@@ -89,7 +89,7 @@ void OColumnControlWindow::DeactivateAggregate( EControlType eType )
|
||||
}
|
||||
}
|
||||
|
||||
void OColumnControlWindow::CellModified(tools::Long /*nRow*/, sal_uInt16 /*nColId*/ )
|
||||
void OColumnControlWindow::CellModified(sal_Int32 /*nRow*/, sal_uInt16 /*nColId*/ )
|
||||
{
|
||||
saveCurrentFieldDescData();
|
||||
}
|
||||
|
||||
@@ -108,12 +108,12 @@ namespace dbaui
|
||||
|
||||
void Init(const TTableConnectionData::value_type& _pConnData);
|
||||
using ORelationControl_Base::Init;
|
||||
virtual void InitController( ::svt::CellControllerRef& rController, tools::Long nRow, sal_uInt16 nCol ) override;
|
||||
virtual ::svt::CellController* GetController( tools::Long nRow, sal_uInt16 nCol ) override;
|
||||
virtual void InitController( ::svt::CellControllerRef& rController, sal_Int32 nRow, sal_uInt16 nCol ) override;
|
||||
virtual ::svt::CellController* GetController( sal_Int32 nRow, sal_uInt16 nCol ) override;
|
||||
virtual void PaintCell( OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColId ) const override;
|
||||
virtual bool SeekRow( tools::Long nRow ) override;
|
||||
virtual bool SeekRow( sal_Int32 nRow ) override;
|
||||
virtual bool SaveModified() override;
|
||||
virtual OUString GetCellText( tools::Long nRow, sal_uInt16 nColId ) const override;
|
||||
virtual OUString GetCellText( sal_Int32 nRow, sal_uInt16 nColId ) const override;
|
||||
|
||||
virtual void CellModified() override;
|
||||
|
||||
@@ -204,7 +204,7 @@ namespace dbaui
|
||||
|
||||
bool ORelationControl::IsTabAllowed(bool bForward) const
|
||||
{
|
||||
tools::Long nRow = GetCurRow();
|
||||
sal_Int32 nRow = GetCurRow();
|
||||
sal_uInt16 nCol = GetCurColumnId();
|
||||
|
||||
bool bRet = !( ( bForward && (nCol == DEST_COLUMN) && (nRow == GetRowCount() - 1))
|
||||
@@ -215,7 +215,7 @@ namespace dbaui
|
||||
|
||||
bool ORelationControl::SaveModified()
|
||||
{
|
||||
tools::Long nRow = GetCurRow();
|
||||
sal_Int32 nRow = GetCurRow();
|
||||
if ( nRow != BROWSER_ENDOFSELECTION )
|
||||
{
|
||||
weld::ComboBox& rListBox = m_pListCell->get_widget();
|
||||
@@ -263,7 +263,7 @@ namespace dbaui
|
||||
return nId;
|
||||
}
|
||||
|
||||
OUString ORelationControl::GetCellText( tools::Long nRow, sal_uInt16 nColId ) const
|
||||
OUString ORelationControl::GetCellText( sal_Int32 nRow, sal_uInt16 nColId ) const
|
||||
{
|
||||
OUString sText;
|
||||
if ( m_pConnData->GetConnLineDataList().size() > o3tl::make_unsigned(nRow) )
|
||||
@@ -282,7 +282,7 @@ namespace dbaui
|
||||
return sText;
|
||||
}
|
||||
|
||||
void ORelationControl::InitController( CellControllerRef& /*rController*/, tools::Long nRow, sal_uInt16 nColumnId )
|
||||
void ORelationControl::InitController( CellControllerRef& /*rController*/, sal_Int32 nRow, sal_uInt16 nColumnId )
|
||||
{
|
||||
|
||||
OString sHelpId( HID_RELATIONDIALOG_LEFTFIELDCELL );
|
||||
@@ -319,12 +319,12 @@ namespace dbaui
|
||||
rList.set_help_id(sHelpId);
|
||||
}
|
||||
|
||||
CellController* ORelationControl::GetController( tools::Long /*nRow*/, sal_uInt16 /*nColumnId*/ )
|
||||
CellController* ORelationControl::GetController( sal_Int32 /*nRow*/, sal_uInt16 /*nColumnId*/ )
|
||||
{
|
||||
return new ListBoxCellController( m_pListCell.get() );
|
||||
}
|
||||
|
||||
bool ORelationControl::SeekRow( tools::Long nRow )
|
||||
bool ORelationControl::SeekRow( sal_Int32 nRow )
|
||||
{
|
||||
m_nDataPos = nRow;
|
||||
return true;
|
||||
|
||||
@@ -181,7 +181,7 @@ IMPL_LINK_NOARG(OTableGrantControl, AsynchDeactivate, void*, void)
|
||||
|
||||
bool OTableGrantControl::IsTabAllowed(bool bForward) const
|
||||
{
|
||||
tools::Long nRow = GetCurRow();
|
||||
sal_Int32 nRow = GetCurRow();
|
||||
sal_uInt16 nCol = GetCurColumnId();
|
||||
|
||||
if (bForward && (nCol == 2) && (nRow == GetRowCount() - 1))
|
||||
@@ -257,7 +257,7 @@ bool OTableGrantControl::SaveModified()
|
||||
return bErg;
|
||||
}
|
||||
|
||||
OUString OTableGrantControl::GetCellText( tools::Long nRow, sal_uInt16 nColId ) const
|
||||
OUString OTableGrantControl::GetCellText( sal_Int32 nRow, sal_uInt16 nColId ) const
|
||||
{
|
||||
if(COL_TABLE_NAME == nColId)
|
||||
return m_aTableNames[nRow];
|
||||
@@ -270,7 +270,7 @@ OUString OTableGrantControl::GetCellText( tools::Long nRow, sal_uInt16 nColId )
|
||||
return OUString::number(isAllowed(nColId,nPriv) ? 1 :0);
|
||||
}
|
||||
|
||||
void OTableGrantControl::InitController( CellControllerRef& /*rController*/, tools::Long nRow, sal_uInt16 nColumnId )
|
||||
void OTableGrantControl::InitController( CellControllerRef& /*rController*/, sal_Int32 nRow, sal_uInt16 nColumnId )
|
||||
{
|
||||
OUString sTablename = m_aTableNames[nRow];
|
||||
// special case for tablename
|
||||
@@ -357,7 +357,7 @@ void OTableGrantControl::setGrantUser(const Reference< XAuthorizable>& _xGrantUs
|
||||
m_xGrantUser = _xGrantUser;
|
||||
}
|
||||
|
||||
CellController* OTableGrantControl::GetController( tools::Long nRow, sal_uInt16 nColumnId )
|
||||
CellController* OTableGrantControl::GetController( sal_Int32 nRow, sal_uInt16 nColumnId )
|
||||
{
|
||||
|
||||
CellController* pController = nullptr;
|
||||
@@ -384,7 +384,7 @@ CellController* OTableGrantControl::GetController( tools::Long nRow, sal_uInt16
|
||||
return pController;
|
||||
}
|
||||
|
||||
bool OTableGrantControl::SeekRow( tools::Long nRow )
|
||||
bool OTableGrantControl::SeekRow( sal_Int32 nRow )
|
||||
{
|
||||
m_nDataPos = nRow;
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ constexpr auto BROWSER_STANDARD_FLAGS = BrowserMode::COLUMNSELECTION | BrowserMo
|
||||
::svt::EditBrowseBox::dispose();
|
||||
}
|
||||
|
||||
bool IndexFieldsControl::SeekRow(tools::Long nRow)
|
||||
bool IndexFieldsControl::SeekRow(sal_Int32 nRow)
|
||||
{
|
||||
if (!EditBrowseBox::SeekRow(nRow))
|
||||
return false;
|
||||
@@ -165,7 +165,7 @@ constexpr auto BROWSER_STANDARD_FLAGS = BrowserMode::COLUMNSELECTION | BrowserMo
|
||||
_rFields.resize(aDest - _rFields.begin());
|
||||
}
|
||||
|
||||
sal_uInt32 IndexFieldsControl::GetTotalCellWidth(tools::Long _nRow, sal_uInt16 _nColId)
|
||||
sal_uInt32 IndexFieldsControl::GetTotalCellWidth(sal_Int32 _nRow, sal_uInt16 _nColId)
|
||||
{
|
||||
if (COLUMN_ID_ORDER == _nColId)
|
||||
{
|
||||
@@ -233,7 +233,7 @@ constexpr auto BROWSER_STANDARD_FLAGS = BrowserMode::COLUMNSELECTION | BrowserMo
|
||||
rNameListBox.append_text(*pFields);
|
||||
}
|
||||
|
||||
CellController* IndexFieldsControl::GetController(tools::Long _nRow, sal_uInt16 _nColumnId)
|
||||
CellController* IndexFieldsControl::GetController(sal_Int32 _nRow, sal_uInt16 _nColumnId)
|
||||
{
|
||||
if (!IsEnabled())
|
||||
return nullptr;
|
||||
@@ -263,7 +263,7 @@ constexpr auto BROWSER_STANDARD_FLAGS = BrowserMode::COLUMNSELECTION | BrowserMo
|
||||
return pReturn;
|
||||
}
|
||||
|
||||
bool IndexFieldsControl::implGetFieldDesc(tools::Long _nRow, IndexFields::const_iterator& _rPos)
|
||||
bool IndexFieldsControl::implGetFieldDesc(sal_Int32 _nRow, IndexFields::const_iterator& _rPos)
|
||||
{
|
||||
_rPos = m_aFields.end();
|
||||
if ((_nRow < 0) || (_nRow >= static_cast<sal_Int32>(m_aFields.size())))
|
||||
@@ -343,7 +343,7 @@ constexpr auto BROWSER_STANDARD_FLAGS = BrowserMode::COLUMNSELECTION | BrowserMo
|
||||
return true;
|
||||
}
|
||||
|
||||
void IndexFieldsControl::InitController(CellControllerRef& /*_rController*/, tools::Long _nRow, sal_uInt16 _nColumnId)
|
||||
void IndexFieldsControl::InitController(CellControllerRef& /*_rController*/, sal_Int32 _nRow, sal_uInt16 _nColumnId)
|
||||
{
|
||||
IndexFields::const_iterator aFieldDescription;
|
||||
bool bNewField = !implGetFieldDesc(_nRow, aFieldDescription);
|
||||
@@ -407,7 +407,7 @@ constexpr auto BROWSER_STANDARD_FLAGS = BrowserMode::COLUMNSELECTION | BrowserMo
|
||||
|
||||
SaveModified();
|
||||
}
|
||||
OUString IndexFieldsControl::GetCellText(tools::Long _nRow,sal_uInt16 nColId) const
|
||||
OUString IndexFieldsControl::GetCellText(sal_Int32 _nRow,sal_uInt16 nColId) const
|
||||
{
|
||||
IndexFields::const_iterator aRow = m_aFields.end();
|
||||
if ( _nRow >= 0 )
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace dbaui
|
||||
virtual TOTypeInfoSP getTypeInfo(sal_Int32 _nPos) override;
|
||||
virtual bool isAutoIncrementValueEnabled() const override;
|
||||
virtual OUString getAutoIncrementValue() const override;
|
||||
virtual void CellModified(tools::Long nRow, sal_uInt16 nColId ) override;
|
||||
virtual void CellModified(sal_Int32 nRow, sal_uInt16 nColId ) override;
|
||||
|
||||
public:
|
||||
OColumnControlWindow(weld::Container* pParent,
|
||||
|
||||
@@ -136,7 +136,7 @@ namespace dbaui
|
||||
|
||||
virtual css::lang::Locale GetLocale() const = 0;
|
||||
|
||||
virtual void CellModified(tools::Long nRow, sal_uInt16 nColId ) = 0;
|
||||
virtual void CellModified(sal_Int32 nRow, sal_uInt16 nColId ) = 0;
|
||||
virtual void SetModified(bool bModified); // base implementation is empty
|
||||
|
||||
virtual TOTypeInfoSP getTypeInfo(sal_Int32 _nPos) = 0;
|
||||
|
||||
@@ -41,10 +41,10 @@ namespace dbaui
|
||||
public:
|
||||
OTableRowView(vcl::Window* pParent);
|
||||
|
||||
virtual void SetCellData( tools::Long nRow, sal_uInt16 nColId, const TOTypeInfoSP& _pTypeInfo ) = 0;
|
||||
virtual void SetCellData( tools::Long nRow, sal_uInt16 nColId, const css::uno::Any& _rNewData ) = 0;
|
||||
virtual css::uno::Any GetCellData( tools::Long nRow, sal_uInt16 nColId ) = 0;
|
||||
virtual void SetControlText( tools::Long nRow, sal_uInt16 nColId, const OUString& rText ) = 0;
|
||||
virtual void SetCellData( sal_Int32 nRow, sal_uInt16 nColId, const TOTypeInfoSP& _pTypeInfo ) = 0;
|
||||
virtual void SetCellData( sal_Int32 nRow, sal_uInt16 nColId, const css::uno::Any& _rNewData ) = 0;
|
||||
virtual css::uno::Any GetCellData( sal_Int32 nRow, sal_uInt16 nColId ) = 0;
|
||||
virtual void SetControlText( sal_Int32 nRow, sal_uInt16 nColId, const OUString& rText ) = 0;
|
||||
|
||||
virtual OTableDesignView* GetView() const = 0;
|
||||
|
||||
@@ -56,18 +56,18 @@ namespace dbaui
|
||||
virtual void paste() override;
|
||||
|
||||
protected:
|
||||
void Paste( tools::Long nRow );
|
||||
void Paste( sal_Int32 nRow );
|
||||
|
||||
virtual void CopyRows() = 0;
|
||||
virtual void DeleteRows() = 0;
|
||||
virtual void InsertRows( tools::Long nRow ) = 0;
|
||||
virtual void InsertNewRows( tools::Long nRow ) = 0;
|
||||
virtual void InsertRows( sal_Int32 nRow ) = 0;
|
||||
virtual void InsertNewRows( sal_Int32 nRow ) = 0;
|
||||
|
||||
virtual bool IsPrimaryKeyAllowed() = 0;
|
||||
virtual bool IsInsertNewAllowed( tools::Long nRow ) = 0;
|
||||
virtual bool IsInsertNewAllowed( sal_Int32 nRow ) = 0;
|
||||
virtual bool IsDeleteAllowed() = 0;
|
||||
|
||||
virtual RowStatus GetRowStatus(tools::Long nRow) const override;
|
||||
virtual RowStatus GetRowStatus(sal_Int32 nRow) const override;
|
||||
virtual void KeyInput(const KeyEvent& rEvt) override;
|
||||
virtual void Command( const CommandEvent& rEvt ) override;
|
||||
|
||||
|
||||
@@ -81,12 +81,12 @@ protected:
|
||||
virtual bool PreNotify(NotifyEvent& rNEvt ) override;
|
||||
|
||||
virtual bool IsTabAllowed(bool bForward) const override;
|
||||
virtual void InitController( ::svt::CellControllerRef& rController, tools::Long nRow, sal_uInt16 nCol ) override;
|
||||
virtual ::svt::CellController* GetController( tools::Long nRow, sal_uInt16 nCol ) override;
|
||||
virtual void InitController( ::svt::CellControllerRef& rController, sal_Int32 nRow, sal_uInt16 nCol ) override;
|
||||
virtual ::svt::CellController* GetController( sal_Int32 nRow, sal_uInt16 nCol ) override;
|
||||
virtual void PaintCell( OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColId ) const override;
|
||||
virtual bool SeekRow( tools::Long nRow ) override;
|
||||
virtual bool SeekRow( sal_Int32 nRow ) override;
|
||||
virtual bool SaveModified() override;
|
||||
virtual OUString GetCellText( tools::Long nRow, sal_uInt16 nColId ) const override;
|
||||
virtual OUString GetCellText( sal_Int32 nRow, sal_uInt16 nColId ) const override;
|
||||
|
||||
virtual void CellModified() override;
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace dbaui
|
||||
virtual void ActivateAggregate( EControlType eType ) override;
|
||||
virtual void DeactivateAggregate( EControlType eType ) override;
|
||||
|
||||
virtual void CellModified(tools::Long nRow, sal_uInt16 nColId ) override;
|
||||
virtual void CellModified(sal_Int32 nRow, sal_uInt16 nColId ) override;
|
||||
|
||||
virtual css::lang::Locale GetLocale() const override;
|
||||
virtual css::uno::Reference< css::util::XNumberFormatter > GetFormatter() const override;
|
||||
|
||||
@@ -64,20 +64,20 @@ namespace dbaui
|
||||
void SaveValue() { m_aSavedValue = m_aFields; }
|
||||
|
||||
void SetModifyHdl(const Link<IndexFieldsControl&,void>& _rHdl) { m_aModifyHdl = _rHdl; }
|
||||
virtual OUString GetCellText(tools::Long _nRow,sal_uInt16 nColId) const override;
|
||||
virtual OUString GetCellText(sal_Int32 _nRow,sal_uInt16 nColId) const override;
|
||||
|
||||
private:
|
||||
// EditBrowseBox overridables
|
||||
virtual void PaintCell( OutputDevice& _rDev, const tools::Rectangle& _rRect, sal_uInt16 _nColumnId ) const override;
|
||||
virtual bool SeekRow(tools::Long nRow) override;
|
||||
virtual sal_uInt32 GetTotalCellWidth(tools::Long nRow, sal_uInt16 nColId) override;
|
||||
virtual bool SeekRow(sal_Int32 nRow) override;
|
||||
virtual sal_uInt32 GetTotalCellWidth(sal_Int32 nRow, sal_uInt16 nColId) override;
|
||||
virtual bool IsTabAllowed(bool bForward) const override;
|
||||
|
||||
::svt::CellController* GetController(tools::Long _nRow, sal_uInt16 _nColumnId) override;
|
||||
void InitController(::svt::CellControllerRef&, tools::Long _nRow, sal_uInt16 _nColumnId) override;
|
||||
::svt::CellController* GetController(sal_Int32 _nRow, sal_uInt16 _nColumnId) override;
|
||||
void InitController(::svt::CellControllerRef&, sal_Int32 _nRow, sal_uInt16 _nColumnId) override;
|
||||
|
||||
OUString GetRowCellText(const IndexFields::const_iterator& _rRow,sal_uInt16 nColId) const;
|
||||
bool implGetFieldDesc(tools::Long _nRow, IndexFields::const_iterator& _rPos);
|
||||
bool implGetFieldDesc(sal_Int32 _nRow, IndexFields::const_iterator& _rPos);
|
||||
|
||||
bool isNewField() const { return GetCurRow() >= static_cast<sal_Int32>(m_aFields.size()); }
|
||||
|
||||
|
||||
@@ -213,7 +213,7 @@ namespace dbaui
|
||||
|
||||
void SetMasterListener(SbaGridListener* pListener) { m_pMasterListener = pListener; }
|
||||
|
||||
virtual void ActivateCell(tools::Long nRow, sal_uInt16 nCol, bool bSetCellFocus = true) override;
|
||||
virtual void ActivateCell(sal_Int32 nRow, sal_uInt16 nCol, bool bSetCellFocus = true) override;
|
||||
virtual void DeactivateCell(bool bUpdate = true) override;
|
||||
using FmGridControl::ActivateCell;
|
||||
|
||||
@@ -249,7 +249,7 @@ namespace dbaui
|
||||
|
||||
// EditBrowseBox overridables
|
||||
virtual VclPtr<BrowserHeader> imp_CreateHeaderBar(BrowseBox* pParent) override;
|
||||
virtual ::svt::CellController* GetController(tools::Long nRow, sal_uInt16 nCol) override;
|
||||
virtual ::svt::CellController* GetController(sal_Int32 nRow, sal_uInt16 nCol) override;
|
||||
|
||||
// DbGridControl overridables
|
||||
virtual void PreExecuteRowContextMenu(sal_uInt16 nRow, PopupMenu& rMenu) override;
|
||||
|
||||
@@ -77,7 +77,7 @@ void OWizTypeSelectControl::DeactivateAggregate( EControlType eType )
|
||||
}
|
||||
}
|
||||
|
||||
void OWizTypeSelectControl::CellModified(tools::Long nRow, sal_uInt16 nColId )
|
||||
void OWizTypeSelectControl::CellModified(sal_Int32 nRow, sal_uInt16 nColId )
|
||||
{
|
||||
OSL_ENSURE(nRow == -1,"nRow must be -1!");
|
||||
|
||||
|
||||
@@ -429,7 +429,7 @@ void OSelectionBrowseBox::SetReadOnly(bool bRO)
|
||||
}
|
||||
}
|
||||
|
||||
CellController* OSelectionBrowseBox::GetController(tools::Long nRow, sal_uInt16 nColId)
|
||||
CellController* OSelectionBrowseBox::GetController(sal_Int32 nRow, sal_uInt16 nColId)
|
||||
{
|
||||
if ( nColId > getFields().size() )
|
||||
return nullptr;
|
||||
@@ -442,7 +442,7 @@ CellController* OSelectionBrowseBox::GetController(tools::Long nRow, sal_uInt16
|
||||
if (static_cast<OQueryController&>(getDesignView()->getController()).isReadOnly())
|
||||
return nullptr;
|
||||
|
||||
tools::Long nCellIndex = GetRealRow(nRow);
|
||||
sal_Int32 nCellIndex = GetRealRow(nRow);
|
||||
switch (nCellIndex)
|
||||
{
|
||||
case BROW_FIELD_ROW:
|
||||
@@ -460,7 +460,7 @@ CellController* OSelectionBrowseBox::GetController(tools::Long nRow, sal_uInt16
|
||||
}
|
||||
}
|
||||
|
||||
void OSelectionBrowseBox::InitController(CellControllerRef& /*rController*/, tools::Long nRow, sal_uInt16 nColId)
|
||||
void OSelectionBrowseBox::InitController(CellControllerRef& /*rController*/, sal_Int32 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*/, too
|
||||
return;
|
||||
OTableFieldDescRef pEntry = getFields()[nPos-1];
|
||||
OSL_ENSURE(pEntry.is(), "OSelectionBrowseBox::InitController : invalid FieldDescription !");
|
||||
tools::Long nCellIndex = GetRealRow(nRow);
|
||||
sal_Int32 nCellIndex = GetRealRow(nRow);
|
||||
|
||||
switch (nCellIndex)
|
||||
{
|
||||
@@ -905,7 +905,7 @@ bool OSelectionBrowseBox::SaveModified()
|
||||
{
|
||||
// for the Undo-action
|
||||
OUString strOldCellContents,sNewValue;
|
||||
tools::Long nRow = GetRealRow(GetCurRow());
|
||||
sal_Int32 nRow = GetRealRow(GetCurRow());
|
||||
bool bAppendRow = false;
|
||||
switch (nRow)
|
||||
{
|
||||
@@ -1211,7 +1211,7 @@ bool OSelectionBrowseBox::SaveModified()
|
||||
return pEntry != nullptr && !bError;
|
||||
}
|
||||
|
||||
bool OSelectionBrowseBox::SeekRow(tools::Long nRow)
|
||||
bool OSelectionBrowseBox::SeekRow(sal_Int32 nRow)
|
||||
{
|
||||
m_nSeekRow = nRow;
|
||||
return nRow < m_nVisibleCount;
|
||||
@@ -1229,7 +1229,7 @@ void OSelectionBrowseBox::PaintCell(OutputDevice& rDev, const tools::Rectangle&
|
||||
if (!pEntry.is())
|
||||
return;
|
||||
|
||||
tools::Long nRow = GetRealRow(m_nSeekRow);
|
||||
sal_Int32 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();
|
||||
tools::Long nCurrentRow = GetCurRow();
|
||||
sal_Int32 nCurrentRow = GetCurRow();
|
||||
|
||||
DeactivateCell();
|
||||
|
||||
@@ -1483,7 +1483,7 @@ void OSelectionBrowseBox::InsertColumn(const OTableFieldDescRef& pEntry, sal_uIn
|
||||
// -1 means at the end. Count means at the end, others denotes a correct position
|
||||
|
||||
sal_uInt16 nCurCol = GetCurColumnId();
|
||||
tools::Long nCurrentRow = GetCurRow();
|
||||
sal_Int32 nCurrentRow = GetCurRow();
|
||||
|
||||
DeactivateCell();
|
||||
|
||||
@@ -1857,7 +1857,7 @@ bool OSelectionBrowseBox::Save()
|
||||
|
||||
void OSelectionBrowseBox::CellModified()
|
||||
{
|
||||
tools::Long nRow = GetRealRow(GetCurRow());
|
||||
sal_Int32 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() ));
|
||||
tools::Long nRow = GetRowAtYPosPixel( aMenuPos.Y() );
|
||||
sal_Int32 nRow = GetRowAtYPosPixel( aMenuPos.Y() );
|
||||
|
||||
if (nRow < 0 && nColId > HANDLE_ID )
|
||||
{
|
||||
@@ -2034,10 +2034,10 @@ void OSelectionBrowseBox::SetRowVisible(sal_uInt16 _nWhich, bool _bVis)
|
||||
ActivateCell();
|
||||
}
|
||||
|
||||
tools::Long OSelectionBrowseBox::GetBrowseRow(tools::Long nRowId) const
|
||||
sal_Int32 OSelectionBrowseBox::GetBrowseRow(sal_Int32 nRowId) const
|
||||
{
|
||||
sal_uInt16 nCount(0);
|
||||
for(tools::Long i = 0 ; i < nRowId ; ++i)
|
||||
sal_Int32 nCount(0);
|
||||
for(sal_Int32 i = 0 ; i < nRowId ; ++i)
|
||||
{
|
||||
if ( m_bVisibleRow[i] )
|
||||
++nCount;
|
||||
@@ -2045,10 +2045,10 @@ tools::Long OSelectionBrowseBox::GetBrowseRow(tools::Long nRowId) const
|
||||
return nCount;
|
||||
}
|
||||
|
||||
tools::Long OSelectionBrowseBox::GetRealRow(tools::Long nRowId) const
|
||||
sal_Int32 OSelectionBrowseBox::GetRealRow(sal_Int32 nRowId) const
|
||||
{
|
||||
tools::Long nErg=0,i;
|
||||
const tools::Long nCount = m_bVisibleRow.size();
|
||||
sal_Int32 nErg=0,i;
|
||||
const sal_Int32 nCount = m_bVisibleRow.size();
|
||||
for(i=0;i < nCount; ++i)
|
||||
{
|
||||
if(m_bVisibleRow[i] && nErg++ == nRowId)
|
||||
@@ -2086,7 +2086,7 @@ sal_Int32 OSelectionBrowseBox::GetNoneVisibleRows() const
|
||||
return nErg;
|
||||
}
|
||||
|
||||
void OSelectionBrowseBox::SetNoneVisibleRow(tools::Long nRows)
|
||||
void OSelectionBrowseBox::SetNoneVisibleRow(sal_Int32 nRows)
|
||||
{
|
||||
// only the first 11 rows are interesting
|
||||
sal_Int32 const nSize = SAL_N_ELEMENTS(nVisibleRowMask);
|
||||
@@ -2094,7 +2094,7 @@ void OSelectionBrowseBox::SetNoneVisibleRow(tools::Long nRows)
|
||||
m_bVisibleRow[i] = !(nRows & nVisibleRowMask[i]);
|
||||
}
|
||||
|
||||
OUString OSelectionBrowseBox::GetCellText(tools::Long nRow, sal_uInt16 nColId) const
|
||||
OUString OSelectionBrowseBox::GetCellText(sal_Int32 nRow, sal_uInt16 nColId) const
|
||||
{
|
||||
|
||||
sal_uInt16 nPos = GetColumnPos(nColId);
|
||||
@@ -2333,7 +2333,7 @@ void OSelectionBrowseBox::ColumnResized(sal_uInt16 nColId)
|
||||
}
|
||||
}
|
||||
|
||||
sal_uInt32 OSelectionBrowseBox::GetTotalCellWidth(tools::Long nRowId, sal_uInt16 nColId)
|
||||
sal_uInt32 OSelectionBrowseBox::GetTotalCellWidth(sal_Int32 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(tools::Long nRowId, sal_uInt16
|
||||
OTableFieldDescRef pEntry = getFields()[nPos-1];
|
||||
OSL_ENSURE(pEntry.is(), "OSelectionBrowseBox::GetTotalCellWidth : invalid FieldDescription !");
|
||||
|
||||
tools::Long nRow = GetRealRow(nRowId);
|
||||
sal_Int32 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(tools::Long nRowId, sal_uInt16
|
||||
bool OSelectionBrowseBox::isCutAllowed() const
|
||||
{
|
||||
bool bCutAllowed = false;
|
||||
tools::Long nRow = GetRealRow(GetCurRow());
|
||||
sal_Int32 nRow = GetRealRow(GetCurRow());
|
||||
switch (nRow)
|
||||
{
|
||||
case BROW_VIS_ROW:
|
||||
@@ -2377,7 +2377,7 @@ bool OSelectionBrowseBox::isCutAllowed() const
|
||||
|
||||
void OSelectionBrowseBox::cut()
|
||||
{
|
||||
tools::Long nRow = GetRealRow(GetCurRow());
|
||||
sal_Int32 nRow = GetRealRow(GetCurRow());
|
||||
switch (nRow)
|
||||
{
|
||||
case BROW_FIELD_ROW:
|
||||
@@ -2400,7 +2400,7 @@ void OSelectionBrowseBox::cut()
|
||||
|
||||
void OSelectionBrowseBox::paste()
|
||||
{
|
||||
tools::Long nRow = GetRealRow(GetCurRow());
|
||||
sal_Int32 nRow = GetRealRow(GetCurRow());
|
||||
switch (nRow)
|
||||
{
|
||||
case BROW_FIELD_ROW:
|
||||
@@ -2423,7 +2423,7 @@ void OSelectionBrowseBox::paste()
|
||||
bool OSelectionBrowseBox::isPasteAllowed() const
|
||||
{
|
||||
bool bPasteAllowed = true;
|
||||
tools::Long nRow = GetRealRow(GetCurRow());
|
||||
sal_Int32 nRow = GetRealRow(GetCurRow());
|
||||
switch (nRow)
|
||||
{
|
||||
case BROW_VIS_ROW:
|
||||
@@ -2443,7 +2443,7 @@ bool OSelectionBrowseBox::isCopyAllowed() const
|
||||
|
||||
void OSelectionBrowseBox::copy()
|
||||
{
|
||||
tools::Long nRow = GetRealRow(GetCurRow());
|
||||
sal_Int32 nRow = GetRealRow(GetCurRow());
|
||||
switch (nRow)
|
||||
{
|
||||
case BROW_FIELD_ROW:
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace dbaui
|
||||
std::vector<bool> m_bVisibleRow; // at pos we find the RowId
|
||||
Timer m_timerInvalidate;
|
||||
|
||||
tools::Long m_nSeekRow;
|
||||
sal_Int32 m_nSeekRow;
|
||||
BrowserMode m_nMode; // remember the BrowseModes
|
||||
VclPtr< ::svt::EditControl> m_pTextCell;
|
||||
VclPtr< ::svt::CheckBoxControl> m_pVisibleCell;
|
||||
@@ -111,7 +111,7 @@ namespace dbaui
|
||||
void SetCellContents(sal_Int32 nCellIndex, sal_uInt16 nColId, const OUString& strNewText);
|
||||
// cell content (formatted as string) set/return
|
||||
sal_Int32 GetNoneVisibleRows() const;
|
||||
void SetNoneVisibleRow(tools::Long nRows);
|
||||
void SetNoneVisibleRow(sal_Int32 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(tools::Long _nRow, sal_uInt16 _nColId) const override;
|
||||
virtual OUString GetCellText(sal_Int32 _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( tools::Long nRow ) override;
|
||||
virtual bool SeekRow( sal_Int32 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(tools::Long nRow, sal_uInt16 nCol) override;
|
||||
virtual void InitController(::svt::CellControllerRef& rController, tools::Long nRow, sal_uInt16 nCol) override;
|
||||
virtual ::svt::CellController* GetController(sal_Int32 nRow, sal_uInt16 nCol) override;
|
||||
virtual void InitController(::svt::CellControllerRef& rController, sal_Int32 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(tools::Long nRow, sal_uInt16 nColId) override;
|
||||
virtual sal_uInt32 GetTotalCellWidth(sal_Int32 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 );
|
||||
tools::Long GetRealRow(tools::Long nRow) const;
|
||||
tools::Long GetBrowseRow(tools::Long nRowId) const;
|
||||
sal_Int32 GetRealRow(sal_Int32 nRow) const;
|
||||
sal_Int32 GetBrowseRow(sal_Int32 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);
|
||||
|
||||
@@ -167,7 +167,7 @@ void OTableEditorCtrl::SetReadOnly( bool bRead )
|
||||
bReadOnly = bRead;
|
||||
|
||||
// Disable active cells
|
||||
tools::Long nRow(GetCurRow());
|
||||
sal_Int32 nRow(GetCurRow());
|
||||
sal_uInt16 nCol(GetCurColumnId());
|
||||
DeactivateCell();
|
||||
|
||||
@@ -278,7 +278,7 @@ void OTableEditorCtrl::dispose()
|
||||
OTableRowView::dispose();
|
||||
}
|
||||
|
||||
bool OTableEditorCtrl::SetDataPtr( tools::Long nRow )
|
||||
bool OTableEditorCtrl::SetDataPtr( sal_Int32 nRow )
|
||||
{
|
||||
if(nRow == -1)
|
||||
return false;
|
||||
@@ -290,7 +290,7 @@ bool OTableEditorCtrl::SetDataPtr( tools::Long nRow )
|
||||
return pActRow != nullptr;
|
||||
}
|
||||
|
||||
bool OTableEditorCtrl::SeekRow(tools::Long _nRow)
|
||||
bool OTableEditorCtrl::SeekRow(sal_Int32 _nRow)
|
||||
{
|
||||
// Call the Base class to remember which row must be repainted
|
||||
EditBrowseBox::SeekRow(_nRow);
|
||||
@@ -310,7 +310,7 @@ void OTableEditorCtrl::PaintCell(OutputDevice& rDev, const tools::Rectangle& rRe
|
||||
rDev.Pop();
|
||||
}
|
||||
|
||||
CellController* OTableEditorCtrl::GetController(tools::Long nRow, sal_uInt16 nColumnId)
|
||||
CellController* OTableEditorCtrl::GetController(sal_Int32 nRow, sal_uInt16 nColumnId)
|
||||
{
|
||||
// If EditorCtrl is ReadOnly, editing is forbidden
|
||||
Reference<XPropertySet> xTable = GetView()->getController().getTable();
|
||||
@@ -348,7 +348,7 @@ CellController* OTableEditorCtrl::GetController(tools::Long nRow, sal_uInt16 nCo
|
||||
}
|
||||
}
|
||||
|
||||
void OTableEditorCtrl::InitController(CellControllerRef&, tools::Long nRow, sal_uInt16 nColumnId)
|
||||
void OTableEditorCtrl::InitController(CellControllerRef&, sal_Int32 nRow, sal_uInt16 nColumnId)
|
||||
{
|
||||
SeekRow( nRow == -1 ? GetCurRow() : nRow);
|
||||
OFieldDescription* pActFieldDescr = pActRow->GetActFieldDescr();
|
||||
@@ -405,7 +405,7 @@ void OTableEditorCtrl::InitController(CellControllerRef&, tools::Long nRow, sal_
|
||||
}
|
||||
}
|
||||
|
||||
EditBrowseBox::RowStatus OTableEditorCtrl::GetRowStatus(tools::Long nRow) const
|
||||
EditBrowseBox::RowStatus OTableEditorCtrl::GetRowStatus(sal_Int32 nRow) const
|
||||
{
|
||||
const_cast<OTableEditorCtrl*>(this)->SetDataPtr( nRow );
|
||||
if( !pActRow )
|
||||
@@ -436,7 +436,7 @@ void OTableEditorCtrl::SaveCurRow()
|
||||
pDescrWin->SaveData( pActRow->GetActFieldDescr() );
|
||||
}
|
||||
|
||||
void OTableEditorCtrl::DisplayData(tools::Long nRow)
|
||||
void OTableEditorCtrl::DisplayData(sal_Int32 nRow)
|
||||
{
|
||||
// go to the correct cell
|
||||
SetDataPtr(nRow);
|
||||
@@ -496,7 +496,7 @@ sal_Int32 OTableEditorCtrl::HasFieldName( const OUString& rFieldName )
|
||||
return nCount;
|
||||
}
|
||||
|
||||
void OTableEditorCtrl::SaveData(tools::Long nRow, sal_uInt16 nColId)
|
||||
void OTableEditorCtrl::SaveData(sal_Int32 nRow, sal_uInt16 nColId)
|
||||
{
|
||||
// Store the cell content
|
||||
SetDataPtr( nRow == -1 ? GetCurRow() : nRow);
|
||||
@@ -602,7 +602,7 @@ bool OTableEditorCtrl::SaveModified()
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OTableEditorCtrl::CursorMoving(tools::Long nNewRow, sal_uInt16 nNewCol)
|
||||
bool OTableEditorCtrl::CursorMoving(sal_Int32 nNewRow, sal_uInt16 nNewCol)
|
||||
{
|
||||
|
||||
if (!EditBrowseBox::CursorMoving(nNewRow, nNewCol))
|
||||
@@ -633,7 +633,7 @@ IMPL_LINK_NOARG( OTableEditorCtrl, InvalidateFieldType, void*, void )
|
||||
Invalidate( GetFieldRectPixel(nOldDataPos, FIELD_TYPE) );
|
||||
}
|
||||
|
||||
void OTableEditorCtrl::CellModified( tools::Long nRow, sal_uInt16 nColId )
|
||||
void OTableEditorCtrl::CellModified( sal_Int32 nRow, sal_uInt16 nColId )
|
||||
{
|
||||
|
||||
// If the description is null, use the default
|
||||
@@ -766,7 +766,7 @@ OUString OTableEditorCtrl::GenerateName( const OUString& rName )
|
||||
return aFieldName;
|
||||
}
|
||||
|
||||
void OTableEditorCtrl::InsertRows( tools::Long nRow )
|
||||
void OTableEditorCtrl::InsertRows( sal_Int32 nRow )
|
||||
{
|
||||
|
||||
std::vector< std::shared_ptr<OTableRow> > vInsertedUndoRedoRows; // need for undo/redo handling
|
||||
@@ -780,7 +780,7 @@ void OTableEditorCtrl::InsertRows( tools::Long nRow )
|
||||
{
|
||||
aStreamRef->Seek(STREAM_SEEK_TO_BEGIN);
|
||||
aStreamRef->ResetError();
|
||||
tools::Long nInsertRow = nRow;
|
||||
sal_Int32 nInsertRow = nRow;
|
||||
std::shared_ptr<OTableRow> pRow;
|
||||
sal_Int32 nSize = 0;
|
||||
(*aStreamRef).ReadInt32( nSize );
|
||||
@@ -846,11 +846,11 @@ void OTableEditorCtrl::DeleteRows()
|
||||
InvalidateFeatures();
|
||||
}
|
||||
|
||||
void OTableEditorCtrl::InsertNewRows( tools::Long nRow )
|
||||
void OTableEditorCtrl::InsertNewRows( sal_Int32 nRow )
|
||||
{
|
||||
OSL_ENSURE(GetView()->getController().isAddAllowed(),"Call of InsertNewRows not valid here. Please check isAppendAllowed!");
|
||||
// Create Undo-Action
|
||||
tools::Long nInsertRows = GetSelectRowCount();
|
||||
sal_Int32 nInsertRows = GetSelectRowCount();
|
||||
if( !nInsertRows )
|
||||
nInsertRows = 1;
|
||||
GetUndoManager().AddUndoAction( std::make_unique<OTableEditorInsNewUndoAct>(this, nRow, nInsertRows) );
|
||||
@@ -863,7 +863,7 @@ void OTableEditorCtrl::InsertNewRows( tools::Long nRow )
|
||||
InvalidateFeatures();
|
||||
}
|
||||
|
||||
void OTableEditorCtrl::SetControlText( tools::Long nRow, sal_uInt16 nColId, const OUString& rText )
|
||||
void OTableEditorCtrl::SetControlText( sal_Int32 nRow, sal_uInt16 nColId, const OUString& rText )
|
||||
{
|
||||
// Set the Browser Controls
|
||||
if( nColId < FIELD_FIRST_VIRTUAL_COLUMN )
|
||||
@@ -884,7 +884,7 @@ void OTableEditorCtrl::SetControlText( tools::Long nRow, sal_uInt16 nColId, cons
|
||||
}
|
||||
}
|
||||
|
||||
void OTableEditorCtrl::SetCellData( tools::Long nRow, sal_uInt16 nColId, const TOTypeInfoSP& _pTypeInfo )
|
||||
void OTableEditorCtrl::SetCellData( sal_Int32 nRow, sal_uInt16 nColId, const TOTypeInfoSP& _pTypeInfo )
|
||||
{
|
||||
// Relocate the current pointer
|
||||
if( nRow == -1 )
|
||||
@@ -905,7 +905,7 @@ void OTableEditorCtrl::SetCellData( tools::Long nRow, sal_uInt16 nColId, const T
|
||||
SetControlText(nRow,nColId,_pTypeInfo ? _pTypeInfo->aUIName : OUString());
|
||||
}
|
||||
|
||||
void OTableEditorCtrl::SetCellData( tools::Long nRow, sal_uInt16 nColId, const css::uno::Any& _rNewData )
|
||||
void OTableEditorCtrl::SetCellData( sal_Int32 nRow, sal_uInt16 nColId, const css::uno::Any& _rNewData )
|
||||
{
|
||||
// Relocate the current pointer
|
||||
if( nRow == -1 )
|
||||
@@ -985,7 +985,7 @@ void OTableEditorCtrl::SetCellData( tools::Long nRow, sal_uInt16 nColId, const c
|
||||
SetControlText(nRow,nColId,sValue);
|
||||
}
|
||||
|
||||
Any OTableEditorCtrl::GetCellData( tools::Long nRow, sal_uInt16 nColId )
|
||||
Any OTableEditorCtrl::GetCellData( sal_Int32 nRow, sal_uInt16 nColId )
|
||||
{
|
||||
OFieldDescription* pFieldDescr = GetFieldDescr( nRow );
|
||||
if( !pFieldDescr )
|
||||
@@ -1054,19 +1054,19 @@ Any OTableEditorCtrl::GetCellData( tools::Long nRow, sal_uInt16 nColId )
|
||||
return makeAny(sValue);
|
||||
}
|
||||
|
||||
OUString OTableEditorCtrl::GetCellText( tools::Long nRow, sal_uInt16 nColId ) const
|
||||
OUString OTableEditorCtrl::GetCellText( sal_Int32 nRow, sal_uInt16 nColId ) const
|
||||
{
|
||||
OUString sCellText;
|
||||
const_cast< OTableEditorCtrl* >( this )->GetCellData( nRow, nColId ) >>= sCellText;
|
||||
return sCellText;
|
||||
}
|
||||
|
||||
sal_uInt32 OTableEditorCtrl::GetTotalCellWidth(tools::Long nRow, sal_uInt16 nColId)
|
||||
sal_uInt32 OTableEditorCtrl::GetTotalCellWidth(sal_Int32 nRow, sal_uInt16 nColId)
|
||||
{
|
||||
return GetTextWidth(GetCellText(nRow, nColId)) + 2 * GetTextWidth("0");
|
||||
}
|
||||
|
||||
OFieldDescription* OTableEditorCtrl::GetFieldDescr( tools::Long nRow )
|
||||
OFieldDescription* OTableEditorCtrl::GetFieldDescr( sal_Int32 nRow )
|
||||
{
|
||||
std::vector< std::shared_ptr<OTableRow> >::size_type nListCount(
|
||||
m_pRowList->size());
|
||||
@@ -1279,7 +1279,7 @@ bool OTableEditorCtrl::IsDeleteAllowed()
|
||||
return GetSelectRowCount() != 0 && GetView()->getController().isDropAllowed();
|
||||
}
|
||||
|
||||
bool OTableEditorCtrl::IsInsertNewAllowed( tools::Long nRow )
|
||||
bool OTableEditorCtrl::IsInsertNewAllowed( sal_Int32 nRow )
|
||||
{
|
||||
|
||||
bool bInsertNewAllowed = GetView()->getController().isAddAllowed();
|
||||
@@ -1375,7 +1375,7 @@ void OTableEditorCtrl::Command(const CommandEvent& rEvt)
|
||||
if( !IsReadOnly() )
|
||||
{
|
||||
sal_uInt16 nColId = GetColumnId(GetColumnAtXPosPixel(aMenuPos.X()));
|
||||
tools::Long nRow = GetRowAtYPosPixel(aMenuPos.Y());
|
||||
sal_Int32 nRow = GetRowAtYPosPixel(aMenuPos.Y());
|
||||
|
||||
if ( HANDLE_ID != nColId )
|
||||
{
|
||||
@@ -1591,7 +1591,7 @@ bool OTableEditorCtrl::IsPrimaryKey()
|
||||
void OTableEditorCtrl::SwitchType( const TOTypeInfoSP& _pType )
|
||||
{
|
||||
// if there is no assigned field name
|
||||
tools::Long nRow(GetCurRow());
|
||||
sal_Int32 nRow(GetCurRow());
|
||||
OFieldDescription* pActFieldDescr = GetFieldDescr( nRow );
|
||||
if( pActFieldDescr )
|
||||
// Store the old description
|
||||
@@ -1648,7 +1648,7 @@ void OTableEditorCtrl::DeactivateCell(bool bUpdate)
|
||||
{
|
||||
OTableRowView::DeactivateCell(bUpdate);
|
||||
// now we have to deactivate the field description
|
||||
tools::Long nRow(GetCurRow());
|
||||
sal_Int32 nRow(GetCurRow());
|
||||
if (pDescrWin)
|
||||
pDescrWin->SetReadOnly(bReadOnly || !SetDataPtr(nRow) || GetActRow()->IsReadOnly());
|
||||
}
|
||||
|
||||
@@ -85,29 +85,29 @@ namespace dbaui
|
||||
|
||||
protected:
|
||||
virtual void Command( const CommandEvent& rEvt ) override;
|
||||
virtual bool SeekRow(tools::Long nRow) override;
|
||||
virtual bool SeekRow(sal_Int32 nRow) override;
|
||||
virtual void PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect,
|
||||
sal_uInt16 nColumnId ) const override;
|
||||
|
||||
virtual void CursorMoved() override;
|
||||
virtual RowStatus GetRowStatus(tools::Long nRow) const override;
|
||||
virtual RowStatus GetRowStatus(sal_Int32 nRow) const 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 ::svt::CellController* GetController(sal_Int32 nRow, sal_uInt16 nCol) override;
|
||||
virtual void InitController(::svt::CellControllerRef& rController, sal_Int32 nRow, sal_uInt16 nCol) override;
|
||||
|
||||
virtual void CellModified() override;
|
||||
virtual bool SaveModified() override; // is called before changing a cell (false prevents change)
|
||||
|
||||
virtual OUString GetCellText(tools::Long nRow, sal_uInt16 nColId) const override;
|
||||
virtual sal_uInt32 GetTotalCellWidth(tools::Long nRow, sal_uInt16 nColId) override;
|
||||
virtual OUString GetCellText(sal_Int32 nRow, sal_uInt16 nColId) const override;
|
||||
virtual sal_uInt32 GetTotalCellWidth(sal_Int32 nRow, sal_uInt16 nColId) override;
|
||||
|
||||
virtual void CopyRows() override;
|
||||
virtual void InsertRows( tools::Long nRow ) override;
|
||||
virtual void InsertRows( sal_Int32 nRow ) override;
|
||||
virtual void DeleteRows() override;
|
||||
virtual void InsertNewRows( tools::Long nRow ) override;
|
||||
virtual void InsertNewRows( sal_Int32 nRow ) override;
|
||||
|
||||
virtual bool IsPrimaryKeyAllowed() override;
|
||||
virtual bool IsInsertNewAllowed( tools::Long nRow ) override;
|
||||
virtual bool IsInsertNewAllowed( sal_Int32 nRow ) override;
|
||||
virtual bool IsDeleteAllowed() override;
|
||||
|
||||
void ClearModified();
|
||||
@@ -119,7 +119,7 @@ namespace dbaui
|
||||
explicit OTableEditorCtrl(vcl::Window* pParentWin, OTableDesignView* pView);
|
||||
virtual ~OTableEditorCtrl() override;
|
||||
virtual void dispose() override;
|
||||
virtual bool CursorMoving(tools::Long nNewRow, sal_uInt16 nNewCol) override;
|
||||
virtual bool CursorMoving(sal_Int32 nNewRow, sal_uInt16 nNewCol) override;
|
||||
SfxUndoManager& GetUndoManager() const;
|
||||
|
||||
void SetDescrWin( OTableFieldDescWin* pWin )
|
||||
@@ -132,19 +132,19 @@ namespace dbaui
|
||||
void SwitchType( const TOTypeInfoSP& _pType );
|
||||
|
||||
/// force displaying of the given row
|
||||
void DisplayData( tools::Long nRow );
|
||||
void DisplayData( sal_Int32 nRow );
|
||||
|
||||
virtual void SetCellData( tools::Long nRow, sal_uInt16 nColId, const TOTypeInfoSP& _pTypeInfo ) override;
|
||||
virtual void SetCellData( tools::Long nRow, sal_uInt16 nColId, const css::uno::Any& _rSaveData ) override;
|
||||
virtual css::uno::Any GetCellData( tools::Long nRow, sal_uInt16 nColId ) override;
|
||||
virtual void SetControlText( tools::Long nRow, sal_uInt16 nColId, const OUString& rText ) override;
|
||||
virtual void SetCellData( sal_Int32 nRow, sal_uInt16 nColId, const TOTypeInfoSP& _pTypeInfo ) override;
|
||||
virtual void SetCellData( sal_Int32 nRow, sal_uInt16 nColId, const css::uno::Any& _rSaveData ) override;
|
||||
virtual css::uno::Any GetCellData( sal_Int32 nRow, sal_uInt16 nColId ) override;
|
||||
virtual void SetControlText( sal_Int32 nRow, sal_uInt16 nColId, const OUString& rText ) override;
|
||||
|
||||
virtual OTableDesignView* GetView() const override;
|
||||
|
||||
std::vector< std::shared_ptr<OTableRow> >* GetRowList(){ return m_pRowList; }
|
||||
|
||||
const std::shared_ptr<OTableRow>& GetActRow() const { return pActRow; }
|
||||
void CellModified( tools::Long nRow, sal_uInt16 nColId );
|
||||
void CellModified( sal_Int32 nRow, sal_uInt16 nColId );
|
||||
void SetReadOnly( bool bRead );
|
||||
|
||||
virtual void Init() override;
|
||||
@@ -154,7 +154,7 @@ namespace dbaui
|
||||
bool IsCopyAllowed();
|
||||
bool IsPasteAllowed() const;
|
||||
bool IsReadOnly() const { return bReadOnly;}
|
||||
OFieldDescription* GetFieldDescr( tools::Long nRow );
|
||||
OFieldDescription* GetFieldDescr( sal_Int32 nRow );
|
||||
|
||||
// Window overrides
|
||||
virtual bool PreNotify( NotifyEvent& rNEvt ) override;
|
||||
@@ -178,9 +178,9 @@ namespace dbaui
|
||||
void InitCellController();
|
||||
sal_Int32 HasFieldName( const OUString& rFieldName );
|
||||
OUString GenerateName( const OUString& rName );
|
||||
bool SetDataPtr( tools::Long nRow );
|
||||
bool SetDataPtr( sal_Int32 nRow );
|
||||
|
||||
void SaveData(tools::Long nRow, sal_uInt16 nColumnId);
|
||||
void SaveData(sal_Int32 nRow, sal_uInt16 nColumnId);
|
||||
/** AdjustFieldDescription set the needed values for the description
|
||||
@param _pFieldDesc the field description where to set the values
|
||||
@param _rMultiSel contains the positions which changed for undo/redo
|
||||
|
||||
@@ -105,13 +105,13 @@ void OTableRowView::Command(const CommandEvent& rEvt)
|
||||
}
|
||||
|
||||
sal_uInt16 nColId = GetColumnId(GetColumnAtXPosPixel(rEvt.GetMousePosPixel().X()));
|
||||
tools::Long nRow = GetRowAtYPosPixel(rEvt.GetMousePosPixel().Y());
|
||||
sal_Int32 nRow = GetRowAtYPosPixel(rEvt.GetMousePosPixel().Y());
|
||||
|
||||
if ( nColId == HANDLE_ID )
|
||||
{
|
||||
VclBuilder aBuilder(nullptr, AllSettings::GetUIRootDir(), "dbaccess/ui/querycolmenu.ui", "");
|
||||
VclPtr<PopupMenu> aContextMenu(aBuilder.get_menu("menu"));
|
||||
tools::Long nSelectRowCount = GetSelectRowCount();
|
||||
sal_Int32 nSelectRowCount = GetSelectRowCount();
|
||||
aContextMenu->EnableItem(aContextMenu->GetItemId("cut"), nSelectRowCount != 0);
|
||||
aContextMenu->EnableItem(aContextMenu->GetItemId("copy"), nSelectRowCount != 0);
|
||||
aContextMenu->EnableItem(aContextMenu->GetItemId("paste"), false);
|
||||
@@ -166,12 +166,12 @@ void OTableRowView::paste()
|
||||
OSL_FAIL("OTableRowView::Paste : (pseudo-) abstract method called !");
|
||||
}
|
||||
|
||||
void OTableRowView::Paste( tools::Long nRow )
|
||||
void OTableRowView::Paste( sal_Int32 nRow )
|
||||
{
|
||||
InsertRows( nRow );
|
||||
}
|
||||
|
||||
EditBrowseBox::RowStatus OTableRowView::GetRowStatus(tools::Long nRow) const
|
||||
EditBrowseBox::RowStatus OTableRowView::GetRowStatus(sal_Int32 nRow) const
|
||||
{
|
||||
if (nRow >= 0 && m_nDataPos == nRow)
|
||||
return CURRENT;
|
||||
|
||||
@@ -49,7 +49,7 @@ OTableFieldControl::~OTableFieldControl()
|
||||
dispose();
|
||||
}
|
||||
|
||||
void OTableFieldControl::CellModified(tools::Long nRow, sal_uInt16 nColId )
|
||||
void OTableFieldControl::CellModified(sal_Int32 nRow, sal_uInt16 nColId )
|
||||
{
|
||||
GetCtrl()->CellModified(nRow,nColId);
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace dbaui
|
||||
virtual void ActivateAggregate( EControlType eType ) override;
|
||||
virtual void DeactivateAggregate( EControlType eType ) override;
|
||||
// are to be implemented by the derived classes
|
||||
virtual void CellModified(tools::Long nRow, sal_uInt16 nColId ) override;
|
||||
virtual void CellModified(sal_Int32 nRow, sal_uInt16 nColId ) override;
|
||||
virtual bool IsReadOnly() override;
|
||||
virtual void SetModified(bool bModified) override;
|
||||
virtual css::uno::Reference< css::util::XNumberFormatter > GetFormatter() const override;
|
||||
|
||||
@@ -65,7 +65,7 @@ void OTableDesignUndoAct::Redo()
|
||||
}
|
||||
}
|
||||
|
||||
OTableDesignCellUndoAct::OTableDesignCellUndoAct( OTableRowView* pOwner, tools::Long nRowID, sal_uInt16 nColumn ) :
|
||||
OTableDesignCellUndoAct::OTableDesignCellUndoAct( OTableRowView* pOwner, sal_Int32 nRowID, sal_uInt16 nColumn ) :
|
||||
OTableDesignUndoAct( pOwner ,STR_TABED_UNDO_CELLMODIFIED)
|
||||
,m_nCol( nColumn )
|
||||
,m_nRow( nRowID )
|
||||
@@ -116,7 +116,7 @@ OTableEditorUndoAct::~OTableEditorUndoAct()
|
||||
{
|
||||
}
|
||||
|
||||
OTableEditorTypeSelUndoAct::OTableEditorTypeSelUndoAct( OTableEditorCtrl* pOwner, tools::Long nRowID, sal_uInt16 nColumn, const TOTypeInfoSP& _pOldType )
|
||||
OTableEditorTypeSelUndoAct::OTableEditorTypeSelUndoAct( OTableEditorCtrl* pOwner, sal_Int32 nRowID, sal_uInt16 nColumn, const TOTypeInfoSP& _pOldType )
|
||||
:OTableEditorUndoAct( pOwner ,STR_TABED_UNDO_TYPE_CHANGED)
|
||||
,m_nCol( nColumn )
|
||||
,m_nRow( nRowID )
|
||||
@@ -240,7 +240,7 @@ void OTableEditorInsUndoAct::Undo()
|
||||
void OTableEditorInsUndoAct::Redo()
|
||||
{
|
||||
// insert lines again
|
||||
tools::Long nInsertRow = m_nInsPos;
|
||||
sal_Int32 nInsertRow = m_nInsPos;
|
||||
std::shared_ptr<OTableRow> pRow;
|
||||
std::vector< std::shared_ptr<OTableRow> >* pRowList = pTabEdCtrl->GetRowList();
|
||||
for (auto const& insertedRow : m_vInsertedRows)
|
||||
@@ -256,7 +256,7 @@ void OTableEditorInsUndoAct::Redo()
|
||||
OTableEditorUndoAct::Redo();
|
||||
}
|
||||
|
||||
OTableEditorInsNewUndoAct::OTableEditorInsNewUndoAct( OTableEditorCtrl* pOwner, tools::Long nInsertPosition, tools::Long nInsertedRows ) :
|
||||
OTableEditorInsNewUndoAct::OTableEditorInsNewUndoAct( OTableEditorCtrl* pOwner, sal_Int32 nInsertPosition, sal_Int32 nInsertedRows ) :
|
||||
OTableEditorUndoAct( pOwner ,STR_TABED_UNDO_NEWROWINSERTED)
|
||||
,m_nInsPos( nInsertPosition )
|
||||
,m_nInsRows( nInsertedRows )
|
||||
|
||||
@@ -57,28 +57,28 @@ namespace dbaui
|
||||
class OTableDesignCellUndoAct final : public OTableDesignUndoAct
|
||||
{
|
||||
sal_uInt16 m_nCol;
|
||||
tools::Long m_nRow;
|
||||
sal_Int32 m_nRow;
|
||||
css::uno::Any m_sOldText;
|
||||
css::uno::Any m_sNewText;
|
||||
|
||||
virtual void Undo() override;
|
||||
virtual void Redo() override;
|
||||
public:
|
||||
OTableDesignCellUndoAct( OTableRowView* pOwner, tools::Long nRowID, sal_uInt16 nColumn );
|
||||
OTableDesignCellUndoAct( OTableRowView* pOwner, sal_Int32 nRowID, sal_uInt16 nColumn );
|
||||
virtual ~OTableDesignCellUndoAct() override;
|
||||
};
|
||||
|
||||
class OTableEditorTypeSelUndoAct final : public OTableEditorUndoAct
|
||||
{
|
||||
sal_uInt16 m_nCol;
|
||||
tools::Long m_nRow;
|
||||
sal_Int32 m_nRow;
|
||||
TOTypeInfoSP m_pOldType;
|
||||
TOTypeInfoSP m_pNewType;
|
||||
|
||||
virtual void Undo() override;
|
||||
virtual void Redo() override;
|
||||
public:
|
||||
OTableEditorTypeSelUndoAct( OTableEditorCtrl* pOwner, tools::Long nRowID, sal_uInt16 nColumn, const TOTypeInfoSP& _pOldType );
|
||||
OTableEditorTypeSelUndoAct( OTableEditorCtrl* pOwner, sal_Int32 nRowID, sal_uInt16 nColumn, const TOTypeInfoSP& _pOldType );
|
||||
virtual ~OTableEditorTypeSelUndoAct() override;
|
||||
};
|
||||
|
||||
@@ -109,13 +109,13 @@ namespace dbaui
|
||||
|
||||
class OTableEditorInsNewUndoAct final : public OTableEditorUndoAct
|
||||
{
|
||||
tools::Long m_nInsPos;
|
||||
tools::Long m_nInsRows;
|
||||
sal_Int32 m_nInsPos;
|
||||
sal_Int32 m_nInsRows;
|
||||
|
||||
virtual void Undo() override;
|
||||
virtual void Redo() override;
|
||||
public:
|
||||
OTableEditorInsNewUndoAct( OTableEditorCtrl* pOwner, tools::Long nInsertPosition, tools::Long nInsertedRows );
|
||||
OTableEditorInsNewUndoAct( OTableEditorCtrl* pOwner, sal_Int32 nInsertPosition, sal_Int32 nInsertedRows );
|
||||
virtual ~OTableEditorInsNewUndoAct() override;
|
||||
};
|
||||
|
||||
|
||||
+42
-42
@@ -54,7 +54,7 @@ namespace vcl {
|
||||
}
|
||||
|
||||
#define BROWSER_INVALIDID SAL_MAX_UINT16
|
||||
#define BROWSER_ENDOFSELECTION (static_cast<tools::Long>(SFX_ENDOFSELECTION))
|
||||
constexpr sal_Int32 BROWSER_ENDOFSELECTION = SFX_ENDOFSELECTION;
|
||||
|
||||
enum class BrowserMode
|
||||
{
|
||||
@@ -119,19 +119,19 @@ namespace o3tl
|
||||
class BrowseEvent
|
||||
{
|
||||
VclPtr<vcl::Window> pWin;
|
||||
tools::Long nRow;
|
||||
sal_Int32 nRow;
|
||||
tools::Rectangle aRect;
|
||||
sal_uInt16 nCol;
|
||||
sal_uInt16 nColId;
|
||||
|
||||
public:
|
||||
BrowseEvent( vcl::Window* pWindow,
|
||||
tools::Long nAbsRow,
|
||||
sal_Int32 nAbsRow,
|
||||
sal_uInt16 nColumn, sal_uInt16 nColumnId,
|
||||
const tools::Rectangle& rRect );
|
||||
|
||||
vcl::Window* GetWindow() const { return pWin; }
|
||||
tools::Long GetRow() const { return nRow; }
|
||||
sal_Int32 GetRow() const { return nRow; }
|
||||
sal_uInt16 GetColumn() const { return nCol; }
|
||||
sal_uInt16 GetColumnId() const { return nColId; }
|
||||
const tools::Rectangle& GetRect() const { return aRect; }
|
||||
@@ -225,7 +225,7 @@ class BrowserMouseEvent: public MouseEvent, public BrowseEvent
|
||||
public:
|
||||
BrowserMouseEvent( BrowserDataWin* pWin, const MouseEvent& rEvt );
|
||||
BrowserMouseEvent( vcl::Window* pWin, const MouseEvent& rEvt,
|
||||
tools::Long nAbsRow, sal_uInt16 nColumn, sal_uInt16 nColumnId,
|
||||
sal_Int32 nAbsRow, sal_uInt16 nColumn, sal_uInt16 nColumnId,
|
||||
const tools::Rectangle& rRect );
|
||||
};
|
||||
|
||||
@@ -287,9 +287,9 @@ private:
|
||||
bool bHLines; // draw lines between rows
|
||||
bool bVLines; // draw lines between columns
|
||||
bool bBootstrapped; // child windows resized etc.
|
||||
tools::Long nTopRow; // no. of first visible row (0...)
|
||||
tools::Long nCurRow; // no. of row with cursor
|
||||
tools::Long nRowCount; // total number of rows in model
|
||||
sal_Int32 nTopRow; // no. of first visible row (0...)
|
||||
sal_Int32 nCurRow; // no. of row with cursor
|
||||
sal_Int32 nRowCount; // total number of rows in model
|
||||
sal_uInt16 nFirstCol; // no. of first visible scrollable column
|
||||
sal_uInt16 nCurColId; // column id of cursor
|
||||
|
||||
@@ -317,17 +317,17 @@ private:
|
||||
union
|
||||
{
|
||||
MultiSelection* pSel; // selected rows for multi-selection
|
||||
tools::Long nSel; // selected row for single-selection
|
||||
sal_Int32 nSel; // selected row for single-selection
|
||||
} uRow;
|
||||
std::unique_ptr<MultiSelection> pColSel; // selected column-ids
|
||||
|
||||
// fdo#83943, detect if making the cursor position visible is impossible to achieve
|
||||
struct CursorMoveAttempt
|
||||
{
|
||||
tools::Long m_nCol;
|
||||
tools::Long m_nRow;
|
||||
sal_Int32 m_nCol;
|
||||
sal_Int32 m_nRow;
|
||||
bool m_bScrolledToReachCell;
|
||||
CursorMoveAttempt(tools::Long nCol, tools::Long nRow, bool bScrolledToReachCell)
|
||||
CursorMoveAttempt(sal_Int32 nCol, sal_Int32 nRow, bool bScrolledToReachCell)
|
||||
: m_nCol(nCol)
|
||||
, m_nRow(nRow)
|
||||
, m_bScrolledToReachCell(bScrolledToReachCell)
|
||||
@@ -359,7 +359,7 @@ private:
|
||||
SVT_DLLPRIVATE void AutoSizeLastColumn();
|
||||
|
||||
SVT_DLLPRIVATE tools::Long ImpGetDataRowHeight() const;
|
||||
SVT_DLLPRIVATE tools::Rectangle ImplFieldRectPixel( tools::Long nRow, sal_uInt16 nColId ) const;
|
||||
SVT_DLLPRIVATE tools::Rectangle ImplFieldRectPixel( sal_Int32 nRow, sal_uInt16 nColId ) const;
|
||||
SVT_DLLPRIVATE sal_uInt16 FrozenColCount() const;
|
||||
|
||||
SVT_DLLPRIVATE void ColumnInserted( sal_uInt16 nPos );
|
||||
@@ -371,7 +371,7 @@ private:
|
||||
|
||||
SVT_DLLPRIVATE tools::Long GetBarHeight() const;
|
||||
|
||||
bool GoToRow(tools::Long nRow, bool bRowColMove, bool bDoNotModifySelection = false );
|
||||
bool GoToRow(sal_Int32 nRow, bool bRowColMove, bool bDoNotModifySelection = false );
|
||||
|
||||
bool GoToColumnId( sal_uInt16 nColId, bool bMakeVisible, bool bRowColMove = false);
|
||||
void SelectColumnPos( sal_uInt16 nCol, bool _bSelect, bool bMakeVisible);
|
||||
@@ -395,7 +395,7 @@ protected:
|
||||
// (with the help of RowInserted and RowRemoved), so overriding of
|
||||
// the method is needless
|
||||
public:
|
||||
virtual tools::Long GetRowCount() const override;
|
||||
virtual sal_Int32 GetRowCount() const override;
|
||||
|
||||
protected:
|
||||
// for display in VScrollBar set it e.g. on "?"
|
||||
@@ -408,7 +408,7 @@ protected:
|
||||
@param nRow
|
||||
nRow starts at 0
|
||||
*/
|
||||
virtual bool SeekRow( tools::Long nRow ) = 0;
|
||||
virtual bool SeekRow( sal_Int32 nRow ) = 0;
|
||||
void DrawCursor();
|
||||
void PaintData(vcl::Window const & rWin, vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect);
|
||||
virtual void PaintField(vcl::RenderContext& rDev, const tools::Rectangle& rRect, sal_uInt16 nColumnId) const = 0;
|
||||
@@ -426,11 +426,11 @@ protected:
|
||||
// numbering of the visible scope has changed
|
||||
// - Scrolling (and thereof resulting in another first visible row)
|
||||
// - Resize the window
|
||||
virtual void VisibleRowsChanged( tools::Long nNewTopRow, sal_uInt16 nNumRows);
|
||||
virtual void VisibleRowsChanged( sal_Int32 nNewTopRow, sal_uInt16 nNumRows);
|
||||
|
||||
// number of visible rows in the window (incl. "truncated" rows)
|
||||
sal_uInt16 GetVisibleRows() const;
|
||||
tools::Long GetTopRow() const { return nTopRow; }
|
||||
sal_Int32 GetTopRow() const { return nTopRow; }
|
||||
sal_uInt16 GetFirstVisibleColNumber() const { return nFirstCol; }
|
||||
|
||||
// Focus-Rect enable / disable
|
||||
@@ -488,7 +488,7 @@ public:
|
||||
virtual void EndScroll();
|
||||
virtual void Select();
|
||||
virtual void DoubleClick( const BrowserMouseEvent& rEvt );
|
||||
virtual bool IsCursorMoveAllowed( tools::Long nNewRow, sal_uInt16 nNewColId ) const;
|
||||
virtual bool IsCursorMoveAllowed( sal_Int32 nNewRow, sal_uInt16 nNewColId ) const;
|
||||
virtual void CursorMoved();
|
||||
virtual void ColumnMoved( sal_uInt16 nColId );
|
||||
virtual void ColumnResized( sal_uInt16 nColId );
|
||||
@@ -533,56 +533,56 @@ public:
|
||||
bool IsFrozen( sal_uInt16 nColumnId ) const;
|
||||
|
||||
// movement of visible area
|
||||
tools::Long ScrollColumns( tools::Long nColumns );
|
||||
tools::Long ScrollRows( tools::Long nRows );
|
||||
void MakeFieldVisible( tools::Long nRow, sal_uInt16 nColId );
|
||||
sal_Int32 ScrollColumns( sal_Int32 nColumns );
|
||||
sal_Int32 ScrollRows( sal_Int32 nRows );
|
||||
void MakeFieldVisible( sal_Int32 nRow, sal_uInt16 nColId );
|
||||
|
||||
// access and movement of cursor
|
||||
tools::Long GetCurRow() const { return nCurRow; }
|
||||
sal_Int32 GetCurRow() const { return nCurRow; }
|
||||
sal_uInt16 GetCurColumnId() const { return nCurColId; }
|
||||
bool GoToRow( tools::Long nRow );
|
||||
bool GoToRow( sal_Int32 nRow );
|
||||
bool GoToColumnId( sal_uInt16 nColId );
|
||||
bool GoToRowColumnId( tools::Long nRow, sal_uInt16 nColId );
|
||||
bool GoToRowColumnId( sal_Int32 nRow, sal_uInt16 nColId );
|
||||
|
||||
// selections
|
||||
virtual void SetNoSelection() override;
|
||||
virtual void SelectAll() override;
|
||||
virtual void SelectRow( tools::Long nRow, bool _bSelect = true, bool bExpand = true ) override;
|
||||
virtual void SelectRow( sal_Int32 nRow, bool _bSelect = true, bool bExpand = true ) override;
|
||||
void SelectColumnPos( sal_uInt16 nCol, bool _bSelect = true )
|
||||
{ SelectColumnPos( nCol, _bSelect, true); }
|
||||
void SelectColumnId( sal_uInt16 nColId )
|
||||
{ SelectColumnPos( GetColumnPos(nColId), true, true); }
|
||||
tools::Long GetSelectRowCount() const;
|
||||
sal_Int32 GetSelectRowCount() const;
|
||||
sal_uInt16 GetSelectColumnCount() const;
|
||||
virtual bool IsRowSelected( tools::Long nRow ) const override;
|
||||
virtual bool IsRowSelected( sal_Int32 nRow ) const override;
|
||||
bool IsColumnSelected( sal_uInt16 nColumnId ) const;
|
||||
tools::Long FirstSelectedRow();
|
||||
tools::Long LastSelectedRow();
|
||||
tools::Long NextSelectedRow();
|
||||
sal_Int32 FirstSelectedRow();
|
||||
sal_Int32 LastSelectedRow();
|
||||
sal_Int32 NextSelectedRow();
|
||||
const MultiSelection* GetColumnSelection() const { return pColSel.get(); }
|
||||
const MultiSelection* GetSelection() const
|
||||
{ return bMultiSelection ? uRow.pSel : nullptr; }
|
||||
|
||||
tools::Long FirstSelectedColumn( ) const;
|
||||
sal_Int32 FirstSelectedColumn( ) const;
|
||||
|
||||
bool IsResizing() const { return bResizing; }
|
||||
|
||||
// access to positions of fields, column and rows
|
||||
BrowserDataWin& GetDataWindow() const;
|
||||
tools::Rectangle GetRowRectPixel( tools::Long nRow ) const;
|
||||
tools::Rectangle GetFieldRectPixel( tools::Long nRow, sal_uInt16 nColId,
|
||||
tools::Rectangle GetRowRectPixel( sal_Int32 nRow ) const;
|
||||
tools::Rectangle GetFieldRectPixel( sal_Int32 nRow, sal_uInt16 nColId,
|
||||
bool bRelToBrowser = true) const;
|
||||
bool IsFieldVisible( tools::Long nRow, sal_uInt16 nColId,
|
||||
bool IsFieldVisible( sal_Int32 nRow, sal_uInt16 nColId,
|
||||
bool bComplete = false ) const;
|
||||
tools::Long GetRowAtYPosPixel( tools::Long nY,
|
||||
sal_Int32 GetRowAtYPosPixel( tools::Long nY,
|
||||
bool bRelToBrowser = true ) const;
|
||||
sal_uInt16 GetColumnAtXPosPixel( tools::Long nX ) const;
|
||||
|
||||
// invalidations
|
||||
void Clear();
|
||||
void RowRemoved( tools::Long nRow, tools::Long nNumRows = 1, bool bDoPaint = true );
|
||||
void RowModified( tools::Long nRow, sal_uInt16 nColId = BROWSER_INVALIDID );
|
||||
void RowInserted( tools::Long nRow, tools::Long nNumRows = 1, bool bDoPaint = true, bool bKeepSelection = false );
|
||||
void RowRemoved( sal_Int32 nRow, sal_Int32 nNumRows = 1, bool bDoPaint = true );
|
||||
void RowModified( sal_Int32 nRow, sal_uInt16 nColId = BROWSER_INVALIDID );
|
||||
void RowInserted( sal_Int32 nRow, sal_Int32 nNumRows = 1, bool bDoPaint = true, bool bKeepSelection = false );
|
||||
|
||||
// miscellaneous
|
||||
bool ReserveControlArea(sal_uInt16 nWidth = USHRT_MAX);
|
||||
@@ -624,7 +624,7 @@ public:
|
||||
@return
|
||||
the text out of the cell
|
||||
*/
|
||||
virtual OUString GetCellText(tools::Long _nRow, sal_uInt16 _nColId) const;
|
||||
virtual OUString GetCellText(sal_Int32 _nRow, sal_uInt16 _nColId) const;
|
||||
|
||||
/** @return
|
||||
the current column count
|
||||
@@ -818,13 +818,13 @@ public:
|
||||
virtual bool HasRowHeader() const override;
|
||||
virtual bool GoToCell( sal_Int32 _nRow, sal_uInt16 _nColumn ) override;
|
||||
virtual void SelectColumn( sal_uInt16 _nColumn, bool _bSelect = true ) override;
|
||||
virtual bool IsColumnSelected( tools::Long _nColumn ) const override;
|
||||
virtual bool IsColumnSelected( sal_Int32 _nColumn ) const override;
|
||||
virtual sal_Int32 GetSelectedRowCount() const override;
|
||||
virtual sal_Int32 GetSelectedColumnCount() const override;
|
||||
virtual void GetAllSelectedRows( css::uno::Sequence< sal_Int32 >& _rRows ) const override;
|
||||
virtual void GetAllSelectedColumns( css::uno::Sequence< sal_Int32 >& _rColumns ) const override;
|
||||
virtual bool IsCellVisible( sal_Int32 _nRow, sal_uInt16 _nColumn ) const override;
|
||||
virtual OUString GetAccessibleCellText(tools::Long _nRow, sal_uInt16 _nColPos) const override;
|
||||
virtual OUString GetAccessibleCellText(sal_Int32 _nRow, sal_uInt16 _nColPos) const override;
|
||||
virtual bool GetGlyphBoundRects( const Point& rOrigin, const OUString& rStr, int nIndex, int nLen, MetricVector& rVector ) override;
|
||||
virtual tools::Rectangle GetWindowExtentsRelative(const vcl::Window *pRelativeWindow) const override;
|
||||
virtual void GrabFocus() override;
|
||||
|
||||
@@ -837,8 +837,8 @@ namespace svt
|
||||
// In ActivateCell, we grab the focus asynchronously, but if between requesting activation
|
||||
// and the asynchronous event the focus has changed, we won't grab it for ourself.
|
||||
|
||||
tools::Long nPaintRow; // row being painted
|
||||
tools::Long nEditRow;
|
||||
sal_Int32 nPaintRow; // row being painted
|
||||
sal_Int32 nEditRow;
|
||||
sal_uInt16 nEditCol;
|
||||
|
||||
bool bHasFocus : 1;
|
||||
@@ -867,7 +867,7 @@ namespace svt
|
||||
virtual void ColumnResized(sal_uInt16 nColId) override;
|
||||
virtual void Resize() override;
|
||||
virtual void ArrangeControls(sal_uInt16& nX, sal_uInt16 nY);
|
||||
virtual bool SeekRow(tools::Long nRow) override;
|
||||
virtual bool SeekRow(sal_Int32 nRow) override;
|
||||
|
||||
virtual void GetFocus() override;
|
||||
virtual void LoseFocus() override;
|
||||
@@ -886,14 +886,14 @@ namespace svt
|
||||
virtual void EndScroll() override;
|
||||
|
||||
// should be used instead of GetFieldRectPixel, 'cause this method here takes into account the borders
|
||||
tools::Rectangle GetCellRect(tools::Long nRow, sal_uInt16 nColId, bool bRelToBrowser = true) const;
|
||||
virtual sal_uInt32 GetTotalCellWidth(tools::Long nRow, sal_uInt16 nColId);
|
||||
tools::Rectangle GetCellRect(sal_Int32 nRow, sal_uInt16 nColId, bool bRelToBrowser = true) const;
|
||||
virtual sal_uInt32 GetTotalCellWidth(sal_Int32 nRow, sal_uInt16 nColId);
|
||||
sal_uInt32 GetAutoColumnWidth(sal_uInt16 nColId);
|
||||
|
||||
virtual void PaintStatusCell(OutputDevice& rDev, const tools::Rectangle& rRect) const;
|
||||
virtual void PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColId) const = 0;
|
||||
|
||||
virtual RowStatus GetRowStatus(tools::Long nRow) const;
|
||||
virtual RowStatus GetRowStatus(sal_Int32 nRow) const;
|
||||
|
||||
virtual void RowHeightChanged() override;
|
||||
|
||||
@@ -903,7 +903,7 @@ namespace svt
|
||||
|
||||
// when changing a row:
|
||||
// CursorMoving: cursor is being moved, but GetCurRow() still provides the old row
|
||||
virtual bool CursorMoving(tools::Long nNewRow, sal_uInt16 nNewCol);
|
||||
virtual bool CursorMoving(sal_Int32 nNewRow, sal_uInt16 nNewCol);
|
||||
|
||||
// cursor has been moved
|
||||
virtual void CursorMoved() override;
|
||||
@@ -915,8 +915,8 @@ namespace svt
|
||||
|
||||
virtual bool IsModified() const {return aController.is() && aController->IsValueChangedFromSaved();}
|
||||
|
||||
virtual CellController* GetController(tools::Long nRow, sal_uInt16 nCol);
|
||||
virtual void InitController(CellControllerRef& rController, tools::Long nRow, sal_uInt16 nCol);
|
||||
virtual CellController* GetController(sal_Int32 nRow, sal_uInt16 nCol);
|
||||
virtual void InitController(CellControllerRef& rController, sal_Int32 nRow, sal_uInt16 nCol);
|
||||
static void ResizeController(CellControllerRef const & rController, const tools::Rectangle&);
|
||||
virtual void DoubleClick(const BrowserMouseEvent&) override;
|
||||
|
||||
@@ -934,7 +934,7 @@ namespace svt
|
||||
// result in traveling to the next or to th previous cell
|
||||
virtual bool IsTabAllowed(bool bForward) const;
|
||||
|
||||
virtual bool IsCursorMoveAllowed(tools::Long nNewRow, sal_uInt16 nNewColId) const override;
|
||||
virtual bool IsCursorMoveAllowed(sal_Int32 nNewRow, sal_uInt16 nNewColId) const override;
|
||||
|
||||
void PaintTristate(const tools::Rectangle& rRect, const TriState& eState, bool _bEnabled=true) const;
|
||||
|
||||
@@ -947,7 +947,7 @@ namespace svt
|
||||
virtual void dispose() override;
|
||||
|
||||
bool IsEditing() const {return aController.is();}
|
||||
void InvalidateStatusCell(tools::Long nRow) {RowModified(nRow, 0);}
|
||||
void InvalidateStatusCell(sal_Int32 nRow) {RowModified(nRow, 0);}
|
||||
void InvalidateHandleColumn();
|
||||
|
||||
// late construction
|
||||
@@ -959,7 +959,7 @@ namespace svt
|
||||
EditBrowseBoxFlags GetBrowserFlags() const { return m_nBrowserFlags; }
|
||||
void SetBrowserFlags(EditBrowseBoxFlags nFlags);
|
||||
|
||||
virtual void ActivateCell(tools::Long nRow, sal_uInt16 nCol, bool bSetCellFocus = true);
|
||||
virtual void ActivateCell(sal_Int32 nRow, sal_uInt16 nCol, bool bSetCellFocus = true);
|
||||
virtual void DeactivateCell(bool bUpdate = true);
|
||||
// Children ---------------------------------------------------------------
|
||||
|
||||
@@ -982,7 +982,7 @@ namespace svt
|
||||
|
||||
virtual bool ProcessKey(const KeyEvent& rEvt) override;
|
||||
|
||||
css::uno::Reference< css::accessibility::XAccessible > CreateAccessibleCheckBoxCell(tools::Long _nRow, sal_uInt16 _nColumnPos,const TriState& eState);
|
||||
css::uno::Reference< css::accessibility::XAccessible > CreateAccessibleCheckBoxCell(sal_Int32 _nRow, sal_uInt16 _nColumnPos,const TriState& eState);
|
||||
bool ControlHasFocus() const;
|
||||
protected:
|
||||
// creates the accessible which wraps the active cell
|
||||
|
||||
+17
-17
@@ -295,7 +295,7 @@ private:
|
||||
// (with respect to the data source capabilities)
|
||||
// defaults to (insert | update | delete)
|
||||
sal_uInt16 m_nLastColId;
|
||||
tools::Long m_nLastRowId;
|
||||
sal_Int32 m_nLastRowId;
|
||||
|
||||
bool m_bDesignMode : 1; // default = sal_False
|
||||
bool m_bRecordCountFinal : 1;
|
||||
@@ -312,14 +312,14 @@ protected:
|
||||
bool m_bUpdating : 1; // are any updates being executed right now?
|
||||
|
||||
protected:
|
||||
virtual bool SeekRow(tools::Long nRow) override;
|
||||
virtual void VisibleRowsChanged( tools::Long nNewTopRow, sal_uInt16 nNumRows) override;
|
||||
virtual bool SeekRow(sal_Int32 nRow) override;
|
||||
virtual void VisibleRowsChanged( sal_Int32 nNewTopRow, sal_uInt16 nNumRows) override;
|
||||
virtual void PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColId) const override;
|
||||
virtual RowStatus GetRowStatus(tools::Long nRow) const override;
|
||||
virtual bool CursorMoving(tools::Long nNewRow, sal_uInt16 nNewCol) override;
|
||||
virtual RowStatus GetRowStatus(sal_Int32 nRow) const override;
|
||||
virtual bool CursorMoving(sal_Int32 nNewRow, sal_uInt16 nNewCol) override;
|
||||
virtual void CursorMoved() override;
|
||||
virtual void ArrangeControls(sal_uInt16& nX, sal_uInt16 nY) override;
|
||||
virtual sal_uInt32 GetTotalCellWidth(tools::Long nRow, sal_uInt16 nColId) override;
|
||||
virtual sal_uInt32 GetTotalCellWidth(sal_Int32 nRow, sal_uInt16 nColId) override;
|
||||
virtual void Command(const CommandEvent& rEvt) override;
|
||||
virtual bool PreNotify(NotifyEvent& rEvt) override;
|
||||
virtual void KeyInput(const KeyEvent& rEvt) override;
|
||||
@@ -327,7 +327,7 @@ protected:
|
||||
virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
|
||||
virtual void Select() override;
|
||||
|
||||
virtual ::svt::CellController* GetController(tools::Long nRow, sal_uInt16 nCol) override;
|
||||
virtual ::svt::CellController* GetController(sal_Int32 nRow, sal_uInt16 nCol) override;
|
||||
|
||||
virtual void CellModified() override;
|
||||
virtual bool SaveModified() override;
|
||||
@@ -374,7 +374,7 @@ protected:
|
||||
// DragSourceHelper overridables
|
||||
virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel ) override;
|
||||
|
||||
void executeRowContextMenu( tools::Long _nRow, const Point& _rPreferredPos );
|
||||
void executeRowContextMenu( sal_Int32 _nRow, const Point& _rPreferredPos );
|
||||
|
||||
public:
|
||||
DbGridControl(
|
||||
@@ -397,7 +397,7 @@ public:
|
||||
@return
|
||||
the text out of the cell
|
||||
*/
|
||||
virtual OUString GetCellText(tools::Long _nRow, sal_uInt16 _nColId) const override;
|
||||
virtual OUString GetCellText(sal_Int32 _nRow, sal_uInt16 _nColId) const override;
|
||||
|
||||
void RemoveRows(bool bNewCursor);
|
||||
|
||||
@@ -437,7 +437,7 @@ public:
|
||||
|
||||
void SetFilterMode(bool bMode);
|
||||
bool IsFilterMode() const {return m_bFilterMode;}
|
||||
bool IsFilterRow(tools::Long nRow) const {return m_bFilterMode && nRow == 0;}
|
||||
bool IsFilterRow(sal_Int32 nRow) const {return m_bFilterMode && nRow == 0;}
|
||||
|
||||
void EnableNavigationBar(bool bEnable);
|
||||
bool HasNavigationBar() const {return m_bNavigationBar;}
|
||||
@@ -472,9 +472,9 @@ public:
|
||||
// is the current line being updated
|
||||
bool IsUpdating() const {return m_bUpdating;}
|
||||
|
||||
void RowRemoved( tools::Long nRow, tools::Long nNumRows = 1, bool bDoPaint = true );
|
||||
void RowInserted( tools::Long nRow, tools::Long nNumRows = 1, bool bDoPaint = true );
|
||||
void RowModified( tools::Long nRow );
|
||||
void RowRemoved( sal_Int32 nRow, sal_Int32 nNumRows = 1, bool bDoPaint = true );
|
||||
void RowInserted( sal_Int32 nRow, sal_Int32 nNumRows = 1, bool bDoPaint = true );
|
||||
void RowModified( sal_Int32 nRow );
|
||||
|
||||
void resetCurrentRow();
|
||||
|
||||
@@ -560,12 +560,12 @@ public:
|
||||
CreateAccessibleCell( sal_Int32 nRow, sal_uInt16 nColumnId ) override;
|
||||
|
||||
protected:
|
||||
void RecalcRows(tools::Long nNewTopRow, sal_uInt16 nLinesOnScreen, bool bUpdateCursor);
|
||||
bool SeekCursor(tools::Long nRow, bool bAbsolute = false);
|
||||
void RecalcRows(sal_Int32 nNewTopRow, sal_uInt16 nLinesOnScreen, bool bUpdateCursor);
|
||||
bool SeekCursor(sal_Int32 nRow, bool bAbsolute = false);
|
||||
void RemoveColumns(); // cleaning of own structures
|
||||
void AdjustRows();
|
||||
sal_Int32 AlignSeekCursor();
|
||||
bool SetCurrent(tools::Long nNewRow);
|
||||
bool SetCurrent(sal_Int32 nNewRow);
|
||||
|
||||
OUString GetCurrentRowCellText(DbGridColumn const * pCol,const DbGridRowRef& _rRow) const;
|
||||
virtual void DeleteSelectedRows();
|
||||
@@ -575,7 +575,7 @@ protected:
|
||||
bool IsCurrentAppending() const;
|
||||
|
||||
// empty row for insertion
|
||||
bool IsInsertionRow(tools::Long nRow) const;
|
||||
bool IsInsertionRow(sal_Int32 nRow) const;
|
||||
|
||||
void SetSeekPos(sal_Int32 nPos) {m_nSeekPos = nPos;}
|
||||
sal_Int32 GetCurrentPos() const {return m_nCurrentPos;}
|
||||
|
||||
@@ -81,8 +81,8 @@ public:
|
||||
virtual vcl::Window* GetWindowInstance()= 0;
|
||||
virtual sal_Int32 GetAccessibleControlCount() const = 0;
|
||||
virtual bool ConvertPointToControlIndex( sal_Int32& _rnIndex, const Point& _rPoint )= 0;
|
||||
virtual tools::Long GetRowCount() const= 0;
|
||||
virtual tools::Long GetColumnCount() const= 0;
|
||||
virtual sal_Int32 GetRowCount() const= 0;
|
||||
virtual sal_Int32 GetColumnCount() const= 0;
|
||||
virtual bool ConvertPointToCellAddress( sal_Int32& _rnRow, sal_Int32& _rnColPos, const Point& _rPoint )= 0;
|
||||
virtual tools::Rectangle calcHeaderRect( bool _bIsColumnBar ) = 0;
|
||||
virtual tools::Rectangle calcHeaderCellRect( bool _bColHeader, sal_Int32 _nPos ) = 0;
|
||||
|
||||
@@ -51,7 +51,7 @@ class IAccessibleTableProvider
|
||||
{
|
||||
public:
|
||||
/** @return The count of the rows. */
|
||||
virtual tools::Long GetRowCount() const = 0;
|
||||
virtual sal_Int32 GetRowCount() const = 0;
|
||||
/** @return The count of the columns. */
|
||||
virtual sal_uInt16 GetColumnCount() const = 0;
|
||||
|
||||
@@ -73,19 +73,19 @@ public:
|
||||
|
||||
virtual void SetNoSelection() = 0;
|
||||
virtual void SelectAll() = 0;
|
||||
virtual void SelectRow( tools::Long _nRow, bool _bSelect = true, bool bExpand = true ) = 0;
|
||||
virtual void SelectRow( sal_Int32 _nRow, bool _bSelect = true, bool bExpand = true ) = 0;
|
||||
virtual void SelectColumn( sal_uInt16 _nColumnPos, bool _bSelect = true ) = 0;
|
||||
virtual sal_Int32 GetSelectedRowCount() const = 0;
|
||||
virtual sal_Int32 GetSelectedColumnCount() const = 0;
|
||||
/** @return <TRUE/>, if the row is selected. */
|
||||
virtual bool IsRowSelected( tools::Long _nRow ) const = 0;
|
||||
virtual bool IsColumnSelected( tools::Long _nColumnPos ) const = 0;
|
||||
virtual bool IsRowSelected( sal_Int32 _nRow ) const = 0;
|
||||
virtual bool IsColumnSelected( sal_Int32 _nColumnPos ) const = 0;
|
||||
virtual void GetAllSelectedRows( css::uno::Sequence< sal_Int32 >& _rRows ) const = 0;
|
||||
virtual void GetAllSelectedColumns( css::uno::Sequence< sal_Int32 >& _rColumns ) const = 0;
|
||||
|
||||
/** @return <TRUE/>, if the cell is visible. */
|
||||
virtual bool IsCellVisible( sal_Int32 _nRow, sal_uInt16 _nColumnPos ) const = 0;
|
||||
virtual OUString GetAccessibleCellText( tools::Long _nRow, sal_uInt16 _nColumnPos ) const = 0;
|
||||
virtual OUString GetAccessibleCellText( sal_Int32 _nRow, sal_uInt16 _nColumnPos ) const = 0;
|
||||
|
||||
virtual tools::Rectangle calcHeaderRect( bool _bIsColumnBar, bool _bOnScreen = true ) = 0;
|
||||
virtual tools::Rectangle calcTableRect( bool _bOnScreen = true ) = 0;
|
||||
|
||||
@@ -133,10 +133,10 @@ public:
|
||||
|
||||
// Accessible -------------------------------------------------------------
|
||||
|
||||
bool IsCellCheckBox( tools::Long _nRow, sal_uInt16 _nColumn, TriState& _rState );
|
||||
bool IsCellCheckBox( sal_Int32 _nRow, sal_uInt16 _nColumn, TriState& _rState );
|
||||
|
||||
/** @return The count of the rows. */
|
||||
virtual tools::Long GetRowCount() const override;
|
||||
virtual sal_Int32 GetRowCount() const override;
|
||||
/** @return The count of the columns. */
|
||||
virtual sal_uInt16 GetColumnCount() const override;
|
||||
|
||||
@@ -160,19 +160,19 @@ public:
|
||||
virtual void SetNoSelection() override;
|
||||
using SvTabListBox::SelectAll;
|
||||
virtual void SelectAll() override;
|
||||
virtual void SelectRow( tools::Long _nRow, bool _bSelect = true, bool bExpand = true ) override;
|
||||
virtual void SelectRow( sal_Int32 _nRow, bool _bSelect = true, bool bExpand = true ) override;
|
||||
virtual void SelectColumn( sal_uInt16 _nColumn, bool _bSelect = true ) override;
|
||||
virtual sal_Int32 GetSelectedRowCount() const override;
|
||||
virtual sal_Int32 GetSelectedColumnCount() const override;
|
||||
/** @return <TRUE/>, if the row is selected. */
|
||||
virtual bool IsRowSelected( tools::Long _nRow ) const override;
|
||||
virtual bool IsColumnSelected( tools::Long _nColumn ) const override;
|
||||
virtual bool IsRowSelected( sal_Int32 _nRow ) const override;
|
||||
virtual bool IsColumnSelected( sal_Int32 _nColumn ) const override;
|
||||
virtual void GetAllSelectedRows( css::uno::Sequence< sal_Int32 >& _rRows ) const override;
|
||||
virtual void GetAllSelectedColumns( css::uno::Sequence< sal_Int32 >& _rColumns ) const override;
|
||||
|
||||
/** @return <TRUE/>, if the cell is visible. */
|
||||
virtual bool IsCellVisible( sal_Int32 _nRow, sal_uInt16 _nColumn ) const override;
|
||||
virtual OUString GetAccessibleCellText( tools::Long _nRow, sal_uInt16 _nColumnPos ) const override;
|
||||
virtual OUString GetAccessibleCellText( sal_Int32 _nRow, sal_uInt16 _nColumnPos ) const override;
|
||||
|
||||
virtual tools::Rectangle calcHeaderRect( bool _bIsColumnBar, bool _bOnScreen = true ) override;
|
||||
virtual tools::Rectangle calcTableRect( bool _bOnScreen = true ) override;
|
||||
|
||||
@@ -133,18 +133,18 @@ public:
|
||||
*/
|
||||
void moveGroups(const uno::Sequence<uno::Any>& _aGroups,sal_Int32 _nRow,bool _bSelect = true);
|
||||
|
||||
virtual bool CursorMoving(tools::Long nNewRow, sal_uInt16 nNewCol) override;
|
||||
virtual bool CursorMoving(sal_Int32 nNewRow, sal_uInt16 nNewCol) override;
|
||||
using ::svt::EditBrowseBox::GetRowCount;
|
||||
protected:
|
||||
virtual bool IsTabAllowed(bool bForward) const override;
|
||||
|
||||
virtual void InitController( ::svt::CellControllerRef& rController, tools::Long nRow, sal_uInt16 nCol ) override;
|
||||
virtual ::svt::CellController* GetController( tools::Long nRow, sal_uInt16 nCol ) override;
|
||||
virtual void InitController( ::svt::CellControllerRef& rController, sal_Int32 nRow, sal_uInt16 nCol ) override;
|
||||
virtual ::svt::CellController* GetController( sal_Int32 nRow, sal_uInt16 nCol ) override;
|
||||
virtual void PaintCell( OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColId ) const override;
|
||||
virtual bool SeekRow( tools::Long nRow ) override;
|
||||
virtual bool SeekRow( sal_Int32 nRow ) override;
|
||||
virtual bool SaveModified() override;
|
||||
virtual OUString GetCellText( tools::Long nRow, sal_uInt16 nColId ) const override;
|
||||
virtual RowStatus GetRowStatus(tools::Long nRow) const override;
|
||||
virtual OUString GetCellText( sal_Int32 nRow, sal_uInt16 nColId ) const override;
|
||||
virtual RowStatus GetRowStatus(sal_Int32 nRow) const override;
|
||||
|
||||
virtual void KeyInput(const KeyEvent& rEvt) override;
|
||||
virtual void Command( const CommandEvent& rEvt ) override;
|
||||
@@ -483,7 +483,7 @@ bool OFieldExpressionControl::SaveModified()
|
||||
return true;
|
||||
}
|
||||
|
||||
OUString OFieldExpressionControl::GetCellText( tools::Long nRow, sal_uInt16 /*nColId*/ ) const
|
||||
OUString OFieldExpressionControl::GetCellText( sal_Int32 nRow, sal_uInt16 /*nColId*/ ) const
|
||||
{
|
||||
OUString sText;
|
||||
if ( nRow != BROWSER_ENDOFSELECTION && m_aGroupPositions[nRow] != NO_GROUP )
|
||||
@@ -507,13 +507,13 @@ OUString OFieldExpressionControl::GetCellText( tools::Long nRow, sal_uInt16 /*nC
|
||||
return sText;
|
||||
}
|
||||
|
||||
void OFieldExpressionControl::InitController( CellControllerRef& /*rController*/, tools::Long nRow, sal_uInt16 nColumnId )
|
||||
void OFieldExpressionControl::InitController( CellControllerRef& /*rController*/, sal_Int32 nRow, sal_uInt16 nColumnId )
|
||||
{
|
||||
weld::ComboBox& rComboBox = m_pComboCell->get_widget();
|
||||
rComboBox.set_entry_text(GetCellText(nRow, nColumnId));
|
||||
}
|
||||
|
||||
bool OFieldExpressionControl::CursorMoving(tools::Long nNewRow, sal_uInt16 nNewCol)
|
||||
bool OFieldExpressionControl::CursorMoving(sal_Int32 nNewRow, sal_uInt16 nNewCol)
|
||||
{
|
||||
|
||||
if (!EditBrowseBox::CursorMoving(nNewRow, nNewCol))
|
||||
@@ -528,14 +528,14 @@ bool OFieldExpressionControl::CursorMoving(tools::Long nNewRow, sal_uInt16 nNewC
|
||||
return true;
|
||||
}
|
||||
|
||||
CellController* OFieldExpressionControl::GetController( tools::Long /*nRow*/, sal_uInt16 /*nColumnId*/ )
|
||||
CellController* OFieldExpressionControl::GetController( sal_Int32 /*nRow*/, sal_uInt16 /*nColumnId*/ )
|
||||
{
|
||||
ComboBoxCellController* pCellController = new ComboBoxCellController( m_pComboCell );
|
||||
pCellController->GetComboBox().set_entry_editable(m_pParent->m_pController->isEditable());
|
||||
return pCellController;
|
||||
}
|
||||
|
||||
bool OFieldExpressionControl::SeekRow( tools::Long _nRow )
|
||||
bool OFieldExpressionControl::SeekRow( sal_Int32 _nRow )
|
||||
{
|
||||
// the basis class needs the call, because that's how the class knows which line will be painted
|
||||
EditBrowseBox::SeekRow(_nRow);
|
||||
@@ -560,7 +560,7 @@ void OFieldExpressionControl::PaintCell( OutputDevice& rDev, const tools::Rectan
|
||||
rDev.SetClipRegion();
|
||||
}
|
||||
|
||||
EditBrowseBox::RowStatus OFieldExpressionControl::GetRowStatus(tools::Long nRow) const
|
||||
EditBrowseBox::RowStatus OFieldExpressionControl::GetRowStatus(sal_Int32 nRow) const
|
||||
{
|
||||
if (nRow >= 0 && nRow == m_nDataPos)
|
||||
return EditBrowseBox::CURRENT;
|
||||
@@ -844,7 +844,7 @@ OGroupsSortingDialog::~OGroupsSortingDialog()
|
||||
void OGroupsSortingDialog::UpdateData( )
|
||||
{
|
||||
m_xFieldExpression->Invalidate();
|
||||
tools::Long nCurRow = m_xFieldExpression->GetCurRow();
|
||||
sal_Int32 nCurRow = m_xFieldExpression->GetCurRow();
|
||||
m_xFieldExpression->DeactivateCell();
|
||||
m_xFieldExpression->ActivateCell(nCurRow, m_xFieldExpression->GetCurColumnId());
|
||||
DisplayData(nCurRow);
|
||||
|
||||
+1
-1
@@ -198,7 +198,7 @@ private:
|
||||
|
||||
private:
|
||||
void PaintGridRanges_Impl();
|
||||
ScRangeListRef GetLimitedChartRanges_Impl( tools::Long nDataColumns, tools::Long nDataRows ) const;
|
||||
ScRangeListRef GetLimitedChartRanges_Impl( sal_Int32 nDataColumns, sal_Int32 nDataRows ) const;
|
||||
void ForceChartListener_Impl();
|
||||
std::unique_ptr<ScMemChart> CreateMemChart_Impl() const;
|
||||
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ public:
|
||||
};
|
||||
static void PutData( ScDocument& rDoc, SCCOL nCol, SCROW nRow, SCTAB nTab,
|
||||
const css::uno::Reference< css::sdbc::XRow>& xRow,
|
||||
tools::Long nRowPos,
|
||||
sal_Int32 nRowPos,
|
||||
tools::Long nType, bool bCurrency, StrData* pStrData = nullptr );
|
||||
};
|
||||
|
||||
|
||||
+21
-21
@@ -115,15 +115,15 @@ public:
|
||||
class ScDPGroupTableData final : public ScDPTableData
|
||||
{
|
||||
std::shared_ptr<ScDPTableData> pSourceData;
|
||||
tools::Long nSourceCount;
|
||||
sal_Int32 nSourceCount;
|
||||
std::vector<ScDPGroupDimension>
|
||||
aGroups;
|
||||
std::unique_ptr<ScDPNumGroupDimension[]>
|
||||
pNumGroups; // array[nSourceCount]
|
||||
ScDocument* pDoc;
|
||||
|
||||
void FillGroupValues(std::vector<SCROW>& rItems, const std::vector<tools::Long>& rDims);
|
||||
virtual tools::Long GetSourceDim( tools::Long nDim ) override;
|
||||
void FillGroupValues(std::vector<SCROW>& rItems, const std::vector<sal_Int32>& rDims);
|
||||
virtual sal_Int32 GetSourceDim( sal_Int32 nDim ) override;
|
||||
|
||||
bool IsNumGroupDimension( tools::Long nDimension ) const;
|
||||
void GetNumGroupInfo(tools::Long nDimension, ScDPNumGroupInfo& rInfo);
|
||||
@@ -138,19 +138,19 @@ public:
|
||||
const std::shared_ptr<ScDPTableData>& GetSourceTableData() const { return pSourceData;}
|
||||
|
||||
void AddGroupDimension( const ScDPGroupDimension& rGroup );
|
||||
void SetNumGroupDimension( tools::Long nIndex, const ScDPNumGroupDimension& rGroup );
|
||||
tools::Long GetDimensionIndex( const OUString& rName );
|
||||
void SetNumGroupDimension( sal_Int32 nIndex, const ScDPNumGroupDimension& rGroup );
|
||||
sal_Int32 GetDimensionIndex( const OUString& rName );
|
||||
|
||||
virtual tools::Long GetColumnCount() override;
|
||||
virtual tools::Long GetMembersCount( tools::Long nDim ) override;
|
||||
virtual const std::vector< SCROW >& GetColumnEntries( tools::Long nColumn ) override ;
|
||||
virtual const ScDPItemData* GetMemberById( tools::Long nDim, tools::Long nId) override;
|
||||
virtual tools::Long Compare( tools::Long nDim, tools::Long nDataId1, tools::Long nDataId2) override;
|
||||
virtual sal_Int32 GetColumnCount() override;
|
||||
virtual sal_Int32 GetMembersCount( sal_Int32 nDim ) override;
|
||||
virtual const std::vector< SCROW >& GetColumnEntries( sal_Int32 nColumn ) override ;
|
||||
virtual const ScDPItemData* GetMemberById( sal_Int32 nDim, sal_Int32 nId) override;
|
||||
virtual sal_Int32 Compare( sal_Int32 nDim, sal_Int32 nDataId1, sal_Int32 nDataId2) override;
|
||||
|
||||
virtual OUString getDimensionName(tools::Long nColumn) override;
|
||||
virtual bool getIsDataLayoutDimension(tools::Long nColumn) override;
|
||||
virtual bool IsDateDimension(tools::Long nDim) override;
|
||||
virtual sal_uInt32 GetNumberFormat(tools::Long nDim) override;
|
||||
virtual OUString getDimensionName(sal_Int32 nColumn) override;
|
||||
virtual bool getIsDataLayoutDimension(sal_Int32 nColumn) override;
|
||||
virtual bool IsDateDimension(sal_Int32 nDim) override;
|
||||
virtual sal_uInt32 GetNumberFormat(sal_Int32 nDim) override;
|
||||
virtual void DisposeData() override;
|
||||
virtual void SetEmptyFlags( bool bIgnoreEmptyRows, bool bRepeatIfEmpty ) override;
|
||||
|
||||
@@ -165,13 +165,13 @@ public:
|
||||
virtual const ScDPFilteredCache& GetCacheTable() const override;
|
||||
virtual void ReloadCacheTable() override;
|
||||
|
||||
virtual bool IsBaseForGroup(tools::Long nDim) const override;
|
||||
virtual tools::Long GetGroupBase(tools::Long nGroupDim) const override;
|
||||
virtual bool IsNumOrDateGroup(tools::Long nDim) const override;
|
||||
virtual bool IsInGroup( const ScDPItemData& rGroupData, tools::Long nGroupIndex,
|
||||
const ScDPItemData& rBaseData, tools::Long nBaseIndex ) const override;
|
||||
virtual bool HasCommonElement( const ScDPItemData& rFirstData, tools::Long nFirstIndex,
|
||||
const ScDPItemData& rSecondData, tools::Long nSecondIndex ) const override;
|
||||
virtual bool IsBaseForGroup(sal_Int32 nDim) const override;
|
||||
virtual sal_Int32 GetGroupBase(sal_Int32 nGroupDim) const override;
|
||||
virtual bool IsNumOrDateGroup(sal_Int32 nDim) const override;
|
||||
virtual bool IsInGroup( const ScDPItemData& rGroupData, sal_Int32 nGroupIndex,
|
||||
const ScDPItemData& rBaseData, sal_Int32 nBaseIndex ) const override;
|
||||
virtual bool HasCommonElement( const ScDPItemData& rFirstData, sal_Int32 nFirstIndex,
|
||||
const ScDPItemData& rSecondData, sal_Int32 nSecondIndex ) const override;
|
||||
|
||||
#if DUMP_PIVOT_TABLE
|
||||
virtual void Dump() const override;
|
||||
|
||||
+1
-1
@@ -101,7 +101,7 @@ private:
|
||||
// see PivotTable::putToInteropGrabBag in sc/source/filter/oox/pivottablebuffer.cxx for details
|
||||
std::map<OUString, css::uno::Any> maInteropGrabBag;
|
||||
|
||||
tools::Long nHeaderRows; // page fields plus filter button
|
||||
sal_Int32 nHeaderRows; // page fields plus filter button
|
||||
bool mbHeaderLayout:1; // true : grid, false : standard
|
||||
bool bAllowMove:1;
|
||||
bool bSettingsChanged:1;
|
||||
|
||||
+6
-6
@@ -59,14 +59,14 @@ private:
|
||||
pColNumFmt;
|
||||
std::unique_ptr<sal_uInt32[]>
|
||||
pRowNumFmt;
|
||||
tools::Long nColFmtCount;
|
||||
tools::Long nRowFmtCount;
|
||||
sal_Int32 nColFmtCount;
|
||||
sal_Int32 nRowFmtCount;
|
||||
sal_uInt32 nSingleNumFmt;
|
||||
|
||||
// Output geometry related parameters
|
||||
tools::Long nColCount;
|
||||
tools::Long nRowCount;
|
||||
tools::Long nHeaderSize;
|
||||
sal_Int32 nColCount;
|
||||
sal_Int32 nRowCount;
|
||||
sal_Int32 nHeaderSize;
|
||||
SCCOL nTabStartCol;
|
||||
SCROW nTabStartRow;
|
||||
SCCOL nMemberStartCol;
|
||||
@@ -106,7 +106,7 @@ public:
|
||||
|
||||
void Output(); //! Refresh?
|
||||
ScRange GetOutputRange( sal_Int32 nRegionType = css::sheet::DataPilotOutputRangeType::WHOLE );
|
||||
tools::Long GetHeaderRows() const;
|
||||
sal_Int32 GetHeaderRows() const;
|
||||
bool HasError(); // range overflow or exception from source
|
||||
|
||||
void GetPositionData(const ScAddress& rPos, css::sheet::DataPilotTablePositionData& rPosData);
|
||||
|
||||
@@ -134,8 +134,8 @@ struct ScDPResultFilterContext
|
||||
{
|
||||
ScDPResultTree maFilterSet;
|
||||
std::vector<ScDPResultFilter> maFilters;
|
||||
tools::Long mnCol;
|
||||
tools::Long mnRow;
|
||||
sal_Int32 mnCol;
|
||||
sal_Int32 mnRow;
|
||||
|
||||
ScDPResultFilterContext();
|
||||
};
|
||||
|
||||
+4
-4
@@ -63,10 +63,10 @@ public:
|
||||
ScDatabaseDPData(const ScDocument* pDoc, const ScDPCache& rCache);
|
||||
virtual ~ScDatabaseDPData() override;
|
||||
|
||||
virtual tools::Long GetColumnCount() override;
|
||||
virtual OUString getDimensionName(tools::Long nColumn) override;
|
||||
virtual bool getIsDataLayoutDimension(tools::Long nColumn) override;
|
||||
virtual bool IsDateDimension(tools::Long nDim) override;
|
||||
virtual sal_Int32 GetColumnCount() override;
|
||||
virtual OUString getDimensionName(sal_Int32 nColumn) override;
|
||||
virtual bool getIsDataLayoutDimension(sal_Int32 nColumn) override;
|
||||
virtual bool IsDateDimension(sal_Int32 nDim) override;
|
||||
virtual void DisposeData() override;
|
||||
virtual void SetEmptyFlags( bool bIgnoreEmptyRows, bool bRepeatIfEmpty ) override;
|
||||
|
||||
|
||||
+5
-5
@@ -96,11 +96,11 @@ public:
|
||||
ScSheetDPData(const ScDocument* pD, const ScSheetSourceDesc& rDesc, const ScDPCache& rCache);
|
||||
virtual ~ScSheetDPData() override;
|
||||
|
||||
virtual tools::Long GetColumnCount() override;
|
||||
virtual OUString getDimensionName(tools::Long nColumn) override;
|
||||
virtual bool getIsDataLayoutDimension(tools::Long nColumn) override;
|
||||
virtual bool IsDateDimension(tools::Long nDim) override;
|
||||
virtual sal_uInt32 GetNumberFormat(tools::Long nDim) override;
|
||||
virtual sal_Int32 GetColumnCount() override;
|
||||
virtual OUString getDimensionName(sal_Int32 nColumn) override;
|
||||
virtual bool getIsDataLayoutDimension(sal_Int32 nColumn) override;
|
||||
virtual bool IsDateDimension(sal_Int32 nDim) override;
|
||||
virtual sal_uInt32 GetNumberFormat(sal_Int32 nDim) override;
|
||||
virtual void DisposeData() override;
|
||||
virtual void SetEmptyFlags( bool bIgnoreEmptyRows, bool bRepeatIfEmpty ) override;
|
||||
|
||||
|
||||
+24
-24
@@ -69,14 +69,14 @@ public:
|
||||
should be passed as a const instance. */
|
||||
struct SAL_DLLPRIVATE CalcInfo
|
||||
{
|
||||
::std::vector<tools::Long> aColLevelDims;
|
||||
::std::vector<sal_Int32> aColLevelDims;
|
||||
::std::vector<ScDPDimension*> aColDims;
|
||||
::std::vector<ScDPLevel*> aColLevels;
|
||||
::std::vector<tools::Long> aRowLevelDims;
|
||||
::std::vector<sal_Int32> aRowLevelDims;
|
||||
::std::vector<ScDPDimension*> aRowDims;
|
||||
::std::vector<ScDPLevel*> aRowLevels;
|
||||
::std::vector<tools::Long> aPageDims;
|
||||
::std::vector<tools::Long> aDataSrcCols;
|
||||
::std::vector<sal_Int32> aPageDims;
|
||||
::std::vector<sal_Int32> aDataSrcCols;
|
||||
|
||||
ScDPInitState* pInitState;
|
||||
ScDPResultMember* pColRoot;
|
||||
@@ -90,19 +90,19 @@ public:
|
||||
ScDPTableData(const ScDocument* pDoc);
|
||||
virtual ~ScDPTableData();
|
||||
|
||||
OUString GetFormattedString(tools::Long nDim, const ScDPItemData& rItem, bool bLocaleIndependent) const;
|
||||
OUString GetFormattedString(sal_Int32 nDim, const ScDPItemData& rItem, bool bLocaleIndependent) const;
|
||||
|
||||
tools::Long GetDatePart( tools::Long nDateVal, tools::Long nHierarchy, tools::Long nLevel );
|
||||
|
||||
//! use (new) typed collection instead of ScStrCollection
|
||||
//! or separate Str and ValueCollection
|
||||
|
||||
virtual tools::Long GetColumnCount() = 0;
|
||||
virtual const std::vector< SCROW >& GetColumnEntries( tools::Long nColumn ) ;
|
||||
virtual OUString getDimensionName(tools::Long nColumn) = 0;
|
||||
virtual bool getIsDataLayoutDimension(tools::Long nColumn) = 0;
|
||||
virtual bool IsDateDimension(tools::Long nDim) = 0;
|
||||
virtual sal_uInt32 GetNumberFormat(tools::Long nDim);
|
||||
virtual sal_Int32 GetColumnCount() = 0;
|
||||
virtual const std::vector< SCROW >& GetColumnEntries( sal_Int32 nColumn ) ;
|
||||
virtual OUString getDimensionName(sal_Int32 nColumn) = 0;
|
||||
virtual bool getIsDataLayoutDimension(sal_Int32 nColumn) = 0;
|
||||
virtual bool IsDateDimension(sal_Int32 nDim) = 0;
|
||||
virtual sal_uInt32 GetNumberFormat(sal_Int32 nDim);
|
||||
sal_uInt32 GetNumberFormatByIdx( NfIndexTableOffset );
|
||||
virtual void DisposeData() = 0;
|
||||
virtual void SetEmptyFlags( bool bIgnoreEmptyRows, bool bRepeatIfEmpty ) = 0;
|
||||
@@ -119,19 +119,19 @@ public:
|
||||
virtual void ReloadCacheTable() = 0;
|
||||
|
||||
// override in ScDPGroupTableData:
|
||||
virtual bool IsBaseForGroup(tools::Long nDim) const;
|
||||
virtual tools::Long GetGroupBase(tools::Long nGroupDim) const;
|
||||
virtual bool IsNumOrDateGroup(tools::Long nDim) const;
|
||||
virtual bool IsInGroup( const ScDPItemData& rGroupData, tools::Long nGroupIndex,
|
||||
const ScDPItemData& rBaseData, tools::Long nBaseIndex ) const;
|
||||
virtual bool HasCommonElement( const ScDPItemData& rFirstData, tools::Long nFirstIndex,
|
||||
const ScDPItemData& rSecondData, tools::Long nSecondIndex ) const;
|
||||
virtual bool IsBaseForGroup(sal_Int32 nDim) const;
|
||||
virtual sal_Int32 GetGroupBase(sal_Int32 nGroupDim) const;
|
||||
virtual bool IsNumOrDateGroup(sal_Int32 nDim) const;
|
||||
virtual bool IsInGroup( const ScDPItemData& rGroupData, sal_Int32 nGroupIndex,
|
||||
const ScDPItemData& rBaseData, sal_Int32 nBaseIndex ) const;
|
||||
virtual bool HasCommonElement( const ScDPItemData& rFirstData, sal_Int32 nFirstIndex,
|
||||
const ScDPItemData& rSecondData, sal_Int32 nSecondIndex ) const;
|
||||
|
||||
virtual tools::Long GetMembersCount( tools::Long nDim );
|
||||
const ScDPItemData* GetMemberByIndex( tools::Long nDim, tools::Long nIndex );
|
||||
virtual const ScDPItemData* GetMemberById( tools::Long nDim, tools::Long nId);
|
||||
virtual tools::Long GetSourceDim( tools::Long nDim );
|
||||
virtual tools::Long Compare( tools::Long nDim, tools::Long nDataId1, tools::Long nDataId2);
|
||||
virtual sal_Int32 GetMembersCount( sal_Int32 nDim );
|
||||
const ScDPItemData* GetMemberByIndex( sal_Int32 nDim, sal_Int32 nIndex );
|
||||
virtual const ScDPItemData* GetMemberById( sal_Int32 nDim, sal_Int32 nId);
|
||||
virtual sal_Int32 GetSourceDim( sal_Int32 nDim );
|
||||
virtual sal_Int32 Compare( sal_Int32 nDim, sal_Int32 nDataId1, sal_Int32 nDataId2);
|
||||
|
||||
#if DUMP_PIVOT_TABLE
|
||||
virtual void Dump() const;
|
||||
@@ -154,7 +154,7 @@ protected:
|
||||
|
||||
private:
|
||||
void GetItemData(const ScDPFilteredCache& rCacheTable, sal_Int32 nRow,
|
||||
const ::std::vector<tools::Long>& rDims, ::std::vector< SCROW >& rItemData);
|
||||
const ::std::vector<sal_Int32>& rDims, ::std::vector< SCROW >& rItemData);
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
+5
-5
@@ -105,7 +105,7 @@ struct ScDPSubTotalState
|
||||
class ScDPRunningTotalState
|
||||
{
|
||||
public:
|
||||
typedef std::vector<tools::Long> IndexArray; /// array of long integers terminated by -1.
|
||||
typedef std::vector<sal_Int32> IndexArray; /// array of sal_Int32 terminated by -1.
|
||||
|
||||
ScDPRunningTotalState( ScDPResultMember* pColRoot, ScDPResultMember* pRowRoot );
|
||||
|
||||
@@ -117,8 +117,8 @@ public:
|
||||
const IndexArray& GetRowVisible() const { return maRowVisible;}
|
||||
const IndexArray& GetRowSorted() const { return maRowSorted;}
|
||||
|
||||
void AddColIndex( tools::Long nVisible, tools::Long nSorted );
|
||||
void AddRowIndex( tools::Long nVisible, tools::Long nSorted );
|
||||
void AddColIndex( sal_Int32 nVisible, tools::Long nSorted );
|
||||
void AddRowIndex( sal_Int32 nVisible, tools::Long nSorted );
|
||||
void RemoveColIndex();
|
||||
void RemoveRowIndex();
|
||||
|
||||
@@ -562,12 +562,12 @@ public:
|
||||
// called for the reference dimension
|
||||
ScDPDataMember* GetRowReferenceMember(
|
||||
const ScDPRelativePos* pMemberPos, const OUString* pName,
|
||||
const tools::Long* pRowIndexes, const tools::Long* pColIndexes ) const;
|
||||
const sal_Int32* pRowIndexes, const sal_Int32* pColIndexes ) const;
|
||||
|
||||
// uses row root member from ScDPRunningTotalState
|
||||
static ScDPDataMember* GetColReferenceMember(
|
||||
const ScDPRelativePos* pMemberPos, const OUString* pName,
|
||||
tools::Long nRefDimPos, const ScDPRunningTotalState& rRunning );
|
||||
sal_Int32 nRefDimPos, const ScDPRunningTotalState& rRunning );
|
||||
|
||||
#if DUMP_PIVOT_TABLE
|
||||
void DumpState( const ScDPResultMember* pRefMember, ScDocument* pDoc, ScAddress& rPos ) const;
|
||||
|
||||
+53
-53
@@ -85,10 +85,10 @@ private:
|
||||
rtl::Reference<ScDPDimensions> pDimensions; // api objects
|
||||
// settings:
|
||||
|
||||
std::vector<tools::Long> maColDims;
|
||||
std::vector<tools::Long> maRowDims;
|
||||
std::vector<tools::Long> maDataDims;
|
||||
std::vector<tools::Long> maPageDims;
|
||||
std::vector<sal_Int32> maColDims;
|
||||
std::vector<sal_Int32> maRowDims;
|
||||
std::vector<sal_Int32> maDataDims;
|
||||
std::vector<sal_Int32> maPageDims;
|
||||
ScDPResultTree maResFilterSet;
|
||||
|
||||
bool bColumnGrand;
|
||||
@@ -96,7 +96,7 @@ private:
|
||||
bool bIgnoreEmptyRows;
|
||||
bool bRepeatIfEmpty;
|
||||
|
||||
tools::Long nDupCount;
|
||||
sal_Int32 nDupCount;
|
||||
|
||||
// results:
|
||||
std::unique_ptr<ScDPResultData> pResData; // keep the rest in this!
|
||||
@@ -148,27 +148,27 @@ public:
|
||||
GetGrandTotalName() const;
|
||||
|
||||
css::sheet::DataPilotFieldOrientation
|
||||
GetOrientation(tools::Long nColumn);
|
||||
void SetOrientation(tools::Long nColumn, css::sheet::DataPilotFieldOrientation nNew);
|
||||
tools::Long GetPosition(tools::Long nColumn);
|
||||
GetOrientation(sal_Int32 nColumn);
|
||||
void SetOrientation(sal_Int32 nColumn, css::sheet::DataPilotFieldOrientation nNew);
|
||||
sal_Int32 GetPosition(sal_Int32 nColumn);
|
||||
|
||||
tools::Long GetDataDimensionCount() const;
|
||||
ScDPDimension* GetDataDimension(tools::Long nIndex);
|
||||
OUString GetDataDimName(tools::Long nIndex);
|
||||
sal_Int32 GetDataDimensionCount() const;
|
||||
ScDPDimension* GetDataDimension(sal_Int32 nIndex);
|
||||
OUString GetDataDimName(sal_Int32 nIndex);
|
||||
const ScDPCache* GetCache();
|
||||
const ScDPItemData* GetItemDataById( tools::Long nDim, tools::Long nId );
|
||||
bool IsDataLayoutDimension(tools::Long nDim);
|
||||
const ScDPItemData* GetItemDataById( sal_Int32 nDim, sal_Int32 nId );
|
||||
bool IsDataLayoutDimension(sal_Int32 nDim);
|
||||
css::sheet::DataPilotFieldOrientation
|
||||
GetDataLayoutOrientation();
|
||||
|
||||
bool IsDateDimension(tools::Long nDim);
|
||||
bool IsDateDimension(sal_Int32 nDim);
|
||||
|
||||
bool SubTotalAllowed(tools::Long nColumn); //! move to ScDPResultData
|
||||
bool SubTotalAllowed(sal_Int32 nColumn); //! move to ScDPResultData
|
||||
|
||||
ScDPDimension* AddDuplicated(const OUString& rNewName);
|
||||
tools::Long GetDupCount() const { return nDupCount; }
|
||||
sal_Int32 GetDupCount() const { return nDupCount; }
|
||||
|
||||
tools::Long GetSourceDim(tools::Long nDim);
|
||||
sal_Int32 GetSourceDim(sal_Int32 nDim);
|
||||
|
||||
const css::uno::Sequence<css::sheet::MemberResult>*
|
||||
GetMemberResults( const ScDPLevel* pLevel );
|
||||
@@ -228,7 +228,7 @@ class ScDPDimensions : public cppu::WeakImplHelper<
|
||||
{
|
||||
private:
|
||||
ScDPSource* pSource;
|
||||
tools::Long nDimCount;
|
||||
sal_Int32 nDimCount;
|
||||
std::unique_ptr<rtl::Reference<ScDPDimension>[]>
|
||||
ppDims;
|
||||
|
||||
@@ -264,13 +264,13 @@ class ScDPDimension : public cppu::WeakImplHelper<
|
||||
css::lang::XServiceInfo >
|
||||
{
|
||||
ScDPSource* pSource;
|
||||
tools::Long nDim; // dimension index (== column ID)
|
||||
sal_Int32 nDim; // dimension index (== column ID)
|
||||
rtl::Reference<ScDPHierarchies> mxHierarchies;
|
||||
ScGeneralFunction nFunction;
|
||||
OUString aName; // if empty, take from source
|
||||
std::optional<OUString> mpLayoutName;
|
||||
std::optional<OUString> mpSubtotalName;
|
||||
tools::Long nSourceDim; // >=0 if dup'ed
|
||||
sal_Int32 nSourceDim; // >=0 if dup'ed
|
||||
css::sheet::DataPilotFieldReference
|
||||
aReferenceValue; // settings for "show data as" / "displayed value"
|
||||
bool bHasSelectedPage;
|
||||
@@ -285,8 +285,8 @@ public:
|
||||
ScDPDimension(const ScDPDimension&) = delete;
|
||||
ScDPDimension& operator=(const ScDPDimension&) = delete;
|
||||
|
||||
tools::Long GetDimension() const { return nDim; } // dimension index in source
|
||||
tools::Long GetSourceDim() const { return nSourceDim; } // >=0 if dup'ed
|
||||
sal_Int32 GetDimension() const { return nDim; } // dimension index in source
|
||||
sal_Int32 GetSourceDim() const { return nSourceDim; } // >=0 if dup'ed
|
||||
|
||||
ScDPDimension* CreateCloneObject();
|
||||
ScDPHierarchies* GetHierarchiesObject();
|
||||
@@ -346,7 +346,7 @@ class ScDPHierarchies : public cppu::WeakImplHelper<
|
||||
{
|
||||
private:
|
||||
ScDPSource* pSource;
|
||||
tools::Long nDim;
|
||||
sal_Int32 nDim;
|
||||
// date columns have 3 hierarchies (flat/quarter/week), other columns only one
|
||||
// #i52547# don't offer the incomplete date hierarchy implementation
|
||||
static const tools::Long nHierCount = 1;
|
||||
@@ -371,7 +371,7 @@ public:
|
||||
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
|
||||
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
|
||||
|
||||
static tools::Long getCount();
|
||||
static sal_Int32 getCount();
|
||||
ScDPHierarchy* getByIndex(tools::Long nIndex) const;
|
||||
};
|
||||
|
||||
@@ -382,12 +382,12 @@ class ScDPHierarchy : public cppu::WeakImplHelper<
|
||||
{
|
||||
private:
|
||||
ScDPSource* pSource;
|
||||
tools::Long nDim;
|
||||
tools::Long nHier;
|
||||
sal_Int32 nDim;
|
||||
sal_Int32 nHier;
|
||||
rtl::Reference<ScDPLevels> mxLevels;
|
||||
|
||||
public:
|
||||
ScDPHierarchy( ScDPSource* pSrc, tools::Long nD, tools::Long nH );
|
||||
ScDPHierarchy( ScDPSource* pSrc, sal_Int32 nDim, sal_Int32 nHier );
|
||||
virtual ~ScDPHierarchy() override;
|
||||
|
||||
ScDPLevels* GetLevelsObject();
|
||||
@@ -412,14 +412,14 @@ class ScDPLevels : public cppu::WeakImplHelper<
|
||||
{
|
||||
private:
|
||||
ScDPSource* pSource;
|
||||
tools::Long nDim;
|
||||
tools::Long nHier;
|
||||
tools::Long nLevCount;
|
||||
sal_Int32 nDim;
|
||||
sal_Int32 nHier;
|
||||
sal_Int32 nLevCount;
|
||||
std::unique_ptr<rtl::Reference<ScDPLevel>[]>
|
||||
ppLevs;
|
||||
|
||||
public:
|
||||
ScDPLevels( ScDPSource* pSrc, tools::Long nD, tools::Long nH );
|
||||
ScDPLevels( ScDPSource* pSrc, sal_Int32 nDim, sal_Int32 nHier );
|
||||
virtual ~ScDPLevels() override;
|
||||
|
||||
// XNameAccess
|
||||
@@ -436,8 +436,8 @@ public:
|
||||
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
|
||||
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
|
||||
|
||||
tools::Long getCount() const;
|
||||
ScDPLevel* getByIndex(tools::Long nIndex) const;
|
||||
sal_Int32 getCount() const;
|
||||
ScDPLevel* getByIndex(sal_Int32 nIndex) const;
|
||||
};
|
||||
|
||||
class ScDPLevel : public cppu::WeakImplHelper<
|
||||
@@ -449,9 +449,9 @@ class ScDPLevel : public cppu::WeakImplHelper<
|
||||
{
|
||||
private:
|
||||
ScDPSource* pSource;
|
||||
tools::Long nDim;
|
||||
tools::Long nHier;
|
||||
tools::Long nLev;
|
||||
sal_Int32 nDim;
|
||||
sal_Int32 nHier;
|
||||
sal_Int32 nLev;
|
||||
rtl::Reference<ScDPMembers> mxMembers;
|
||||
css::uno::Sequence<sal_Int16> aSubTotals;
|
||||
css::sheet::DataPilotFieldSortInfo aSortInfo; // stored user settings
|
||||
@@ -459,14 +459,14 @@ private:
|
||||
css::sheet::DataPilotFieldLayoutInfo aLayoutInfo; // stored user settings
|
||||
// valid only from result calculation:
|
||||
::std::vector<sal_Int32> aGlobalOrder; // result of sorting by name or position
|
||||
tools::Long nSortMeasure; // measure (index of data dimension) to sort by
|
||||
tools::Long nAutoMeasure; // measure (index of data dimension) for AutoShow
|
||||
sal_Int32 nSortMeasure; // measure (index of data dimension) to sort by
|
||||
sal_Int32 nAutoMeasure; // measure (index of data dimension) for AutoShow
|
||||
bool bShowEmpty:1;
|
||||
bool bEnableLayout:1; // enabled only for row fields, not for the innermost one
|
||||
bool bRepeatItemLabels:1;
|
||||
|
||||
public:
|
||||
ScDPLevel( ScDPSource* pSrc, tools::Long nD, tools::Long nH, tools::Long nL );
|
||||
ScDPLevel( ScDPSource* pSrc, sal_Int32 nDim, sal_Int32 nHier, sal_Int32 nLevel );
|
||||
virtual ~ScDPLevel() override;
|
||||
|
||||
ScDPMembers* GetMembersObject();
|
||||
@@ -516,8 +516,8 @@ public:
|
||||
|
||||
const ::std::vector<sal_Int32>& GetGlobalOrder() const { return aGlobalOrder; }
|
||||
::std::vector<sal_Int32>& GetGlobalOrder() { return aGlobalOrder; }
|
||||
tools::Long GetSortMeasure() const { return nSortMeasure; }
|
||||
tools::Long GetAutoMeasure() const { return nAutoMeasure; }
|
||||
sal_Int32 GetSortMeasure() const { return nSortMeasure; }
|
||||
sal_Int32 GetAutoMeasure() const { return nAutoMeasure; }
|
||||
|
||||
bool IsOutlineLayout() const
|
||||
{
|
||||
@@ -551,15 +551,15 @@ class ScDPMembers : public cppu::WeakImplHelper<
|
||||
private:
|
||||
typedef std::vector<rtl::Reference<ScDPMember> > MembersType;
|
||||
ScDPSource* pSource;
|
||||
tools::Long nDim;
|
||||
tools::Long nHier;
|
||||
tools::Long nLev;
|
||||
tools::Long nMbrCount;
|
||||
sal_Int32 nDim;
|
||||
sal_Int32 nHier;
|
||||
sal_Int32 nLev;
|
||||
sal_Int32 nMbrCount;
|
||||
mutable MembersType maMembers;
|
||||
mutable ScDPMembersHashMap aHashMap;
|
||||
|
||||
public:
|
||||
ScDPMembers( ScDPSource* pSrc, tools::Long nD, tools::Long nH, tools::Long nL );
|
||||
ScDPMembers( ScDPSource* pSrc, sal_Int32 nDim, sal_Int32 nHier, sal_Int32 nLev );
|
||||
virtual ~ScDPMembers() override;
|
||||
|
||||
// XMembersAccess
|
||||
@@ -579,10 +579,10 @@ public:
|
||||
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
|
||||
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
|
||||
|
||||
tools::Long getCount() const { return nMbrCount;}
|
||||
ScDPMember* getByIndex(tools::Long nIndex) const;
|
||||
sal_Int32 getCount() const { return nMbrCount;}
|
||||
ScDPMember* getByIndex(sal_Int32 nIndex) const;
|
||||
|
||||
tools::Long getMinMembers() const;
|
||||
sal_Int32 getMinMembers() const;
|
||||
|
||||
sal_Int32 GetIndexFromName( const OUString& rName ) const; // <0 if not found
|
||||
const ScDPItemData* GetSrcItemDataByIndex( SCROW nIndex);
|
||||
@@ -599,9 +599,9 @@ class ScDPMember : public cppu::WeakImplHelper<
|
||||
{
|
||||
private:
|
||||
ScDPSource* pSource;
|
||||
tools::Long nDim;
|
||||
tools::Long nHier;
|
||||
tools::Long nLev;
|
||||
sal_Int32 nDim;
|
||||
sal_Int32 nHier;
|
||||
sal_Int32 nLev;
|
||||
|
||||
SCROW mnDataId;
|
||||
std::optional<OUString> mpLayoutName;
|
||||
@@ -611,7 +611,7 @@ private:
|
||||
bool bShowDet;
|
||||
|
||||
public:
|
||||
ScDPMember(ScDPSource* pSrc, tools::Long nD, tools::Long nH, tools::Long nL, SCROW nIndex);
|
||||
ScDPMember(ScDPSource* pSrc, sal_Int32 nDim, sal_Int32 nHier, sal_Int32 nLev, SCROW nIndex);
|
||||
virtual ~ScDPMember() override;
|
||||
ScDPMember(const ScDPMember&) = delete;
|
||||
ScDPMember& operator=(const ScDPMember&) = delete;
|
||||
|
||||
+2
-2
@@ -142,8 +142,8 @@ public:
|
||||
void InsertTab( SCTAB nTab );
|
||||
void DeleteTab( SCTAB nTab );
|
||||
|
||||
void ShiftCols(const ScDocument& rDoc, SCCOL nStartCol, tools::Long nColOffset);
|
||||
void ShiftRows(const ScDocument& rDoc, SCROW nStartRow, tools::Long nRowOffset);
|
||||
void ShiftCols(const ScDocument& rDoc, SCCOL nStartCol, sal_Int32 nColOffset);
|
||||
void ShiftRows(const ScDocument& rDoc, SCROW nStartRow, sal_Int32 nRowOffset);
|
||||
|
||||
// Generate envelopes if multimarked and fills the passed ScRange object with
|
||||
// the smallest range that includes the marked area plus its envelopes.
|
||||
|
||||
@@ -64,8 +64,8 @@ public:
|
||||
void Clear();
|
||||
void MarkAllCols( SCROW nStartRow, SCROW nEndRow );
|
||||
bool HasAnyMarks() const;
|
||||
void ShiftCols(SCCOL nStartCol, tools::Long nColOffset);
|
||||
void ShiftRows(SCROW nStartRow, tools::Long nRowOffset);
|
||||
void ShiftCols(SCCOL nStartCol, sal_Int32 nColOffset);
|
||||
void ShiftRows(SCROW nStartRow, sal_Int32 nRowOffset);
|
||||
|
||||
// For faster access from within ScMarkData, instead of creating
|
||||
// ScMultiSelIter with ScFlatBoolRowSegments bottleneck.
|
||||
|
||||
@@ -35,7 +35,7 @@ ScDatabaseDocUtil::StrData::StrData() :
|
||||
}
|
||||
|
||||
void ScDatabaseDocUtil::PutData(ScDocument& rDoc, SCCOL nCol, SCROW nRow, SCTAB nTab,
|
||||
const uno::Reference<sdbc::XRow>& xRow, tools::Long nRowPos,
|
||||
const uno::Reference<sdbc::XRow>& xRow, sal_Int32 nRowPos,
|
||||
tools::Long nType, bool bCurrency, StrData* pStrData)
|
||||
{
|
||||
OUString aString;
|
||||
|
||||
@@ -483,7 +483,7 @@ void ScDPGroupTableData::AddGroupDimension( const ScDPGroupDimension& rGroup )
|
||||
aGroups.push_back( aNewGroup );
|
||||
}
|
||||
|
||||
void ScDPGroupTableData::SetNumGroupDimension( tools::Long nIndex, const ScDPNumGroupDimension& rGroup )
|
||||
void ScDPGroupTableData::SetNumGroupDimension( sal_Int32 nIndex, const ScDPNumGroupDimension& rGroup )
|
||||
{
|
||||
if ( nIndex < nSourceCount )
|
||||
{
|
||||
@@ -493,7 +493,7 @@ void ScDPGroupTableData::SetNumGroupDimension( tools::Long nIndex, const ScDPNum
|
||||
}
|
||||
}
|
||||
|
||||
tools::Long ScDPGroupTableData::GetDimensionIndex( const OUString& rName )
|
||||
sal_Int32 ScDPGroupTableData::GetDimensionIndex( const OUString& rName )
|
||||
{
|
||||
for (tools::Long i = 0; i < nSourceCount; ++i) // nSourceCount excludes data layout
|
||||
if (pSourceData->getDimensionName(i) == rName) //TODO: ignore case?
|
||||
@@ -501,7 +501,7 @@ tools::Long ScDPGroupTableData::GetDimensionIndex( const OUString& rName )
|
||||
return -1; // none
|
||||
}
|
||||
|
||||
tools::Long ScDPGroupTableData::GetColumnCount()
|
||||
sal_Int32 ScDPGroupTableData::GetColumnCount()
|
||||
{
|
||||
return nSourceCount + aGroups.size();
|
||||
}
|
||||
@@ -516,12 +516,12 @@ void ScDPGroupTableData::GetNumGroupInfo(tools::Long nDimension, ScDPNumGroupInf
|
||||
if ( nDimension < nSourceCount )
|
||||
rInfo = pNumGroups[nDimension].GetInfo();
|
||||
}
|
||||
tools::Long ScDPGroupTableData::GetMembersCount( tools::Long nDim )
|
||||
sal_Int32 ScDPGroupTableData::GetMembersCount( sal_Int32 nDim )
|
||||
{
|
||||
const std::vector< SCROW >& members = GetColumnEntries( nDim );
|
||||
return members.size();
|
||||
}
|
||||
const std::vector< SCROW >& ScDPGroupTableData::GetColumnEntries( tools::Long nColumn )
|
||||
const std::vector< SCROW >& ScDPGroupTableData::GetColumnEntries( sal_Int32 nColumn )
|
||||
{
|
||||
if ( nColumn >= nSourceCount )
|
||||
{
|
||||
@@ -544,12 +544,12 @@ const std::vector< SCROW >& ScDPGroupTableData::GetColumnEntries( tools::Long n
|
||||
return pSourceData->GetColumnEntries( nColumn );
|
||||
}
|
||||
|
||||
const ScDPItemData* ScDPGroupTableData::GetMemberById( tools::Long nDim, tools::Long nId )
|
||||
const ScDPItemData* ScDPGroupTableData::GetMemberById( sal_Int32 nDim, sal_Int32 nId )
|
||||
{
|
||||
return pSourceData->GetMemberById( nDim, nId );
|
||||
}
|
||||
|
||||
OUString ScDPGroupTableData::getDimensionName(tools::Long nColumn)
|
||||
OUString ScDPGroupTableData::getDimensionName(sal_Int32 nColumn)
|
||||
{
|
||||
if ( nColumn >= nSourceCount )
|
||||
{
|
||||
@@ -562,13 +562,13 @@ OUString ScDPGroupTableData::getDimensionName(tools::Long nColumn)
|
||||
return pSourceData->getDimensionName( nColumn );
|
||||
}
|
||||
|
||||
bool ScDPGroupTableData::getIsDataLayoutDimension(tools::Long nColumn)
|
||||
bool ScDPGroupTableData::getIsDataLayoutDimension(sal_Int32 nColumn)
|
||||
{
|
||||
// position of data layout dimension is moved from source data
|
||||
return ( nColumn == sal::static_int_cast<tools::Long>( nSourceCount + aGroups.size() ) ); // data layout dimension?
|
||||
}
|
||||
|
||||
bool ScDPGroupTableData::IsDateDimension(tools::Long nDim)
|
||||
bool ScDPGroupTableData::IsDateDimension(sal_Int32 nDim)
|
||||
{
|
||||
if ( nDim >= nSourceCount )
|
||||
{
|
||||
@@ -581,7 +581,7 @@ bool ScDPGroupTableData::IsDateDimension(tools::Long nDim)
|
||||
return pSourceData->IsDateDimension( nDim );
|
||||
}
|
||||
|
||||
sal_uInt32 ScDPGroupTableData::GetNumberFormat(tools::Long nDim)
|
||||
sal_uInt32 ScDPGroupTableData::GetNumberFormat(sal_Int32 nDim)
|
||||
{
|
||||
if ( nDim >= nSourceCount )
|
||||
{
|
||||
@@ -801,9 +801,9 @@ void ScDPGroupTableData::ReloadCacheTable()
|
||||
pSourceData->ReloadCacheTable();
|
||||
}
|
||||
|
||||
void ScDPGroupTableData::FillGroupValues(vector<SCROW>& rItems, const vector<tools::Long>& rDims)
|
||||
void ScDPGroupTableData::FillGroupValues(vector<SCROW>& rItems, const vector<sal_Int32>& rDims)
|
||||
{
|
||||
tools::Long nGroupedColumns = aGroups.size();
|
||||
sal_Int32 nGroupedColumns = aGroups.size();
|
||||
|
||||
const ScDPCache& rCache = GetCacheTable().getCache();
|
||||
size_t i = 0;
|
||||
@@ -811,7 +811,7 @@ void ScDPGroupTableData::FillGroupValues(vector<SCROW>& rItems, const vector<too
|
||||
{
|
||||
bool bDateDim = false;
|
||||
|
||||
tools::Long nSourceDim = nColumn;
|
||||
sal_Int32 nSourceDim = nColumn;
|
||||
if ( nColumn >= nSourceCount && nColumn < nSourceCount + nGroupedColumns )
|
||||
{
|
||||
const ScDPGroupDimension& rGroupDim = aGroups[nColumn - nSourceCount];
|
||||
@@ -871,13 +871,13 @@ void ScDPGroupTableData::FillGroupValues(vector<SCROW>& rItems, const vector<too
|
||||
}
|
||||
}
|
||||
|
||||
bool ScDPGroupTableData::IsBaseForGroup(tools::Long nDim) const
|
||||
bool ScDPGroupTableData::IsBaseForGroup(sal_Int32 nDim) const
|
||||
{
|
||||
return std::any_of(aGroups.begin(), aGroups.end(),
|
||||
[&nDim](const ScDPGroupDimension& rDim) { return rDim.GetSourceDim() == nDim; });
|
||||
}
|
||||
|
||||
tools::Long ScDPGroupTableData::GetGroupBase(tools::Long nGroupDim) const
|
||||
sal_Int32 ScDPGroupTableData::GetGroupBase(sal_Int32 nGroupDim) const
|
||||
{
|
||||
auto aIter = std::find_if(aGroups.begin(), aGroups.end(),
|
||||
[&nGroupDim](const ScDPGroupDimension& rDim) { return rDim.GetGroupDim() == nGroupDim; });
|
||||
@@ -887,7 +887,7 @@ tools::Long ScDPGroupTableData::GetGroupBase(tools::Long nGroupDim) const
|
||||
return -1; // none
|
||||
}
|
||||
|
||||
bool ScDPGroupTableData::IsNumOrDateGroup(tools::Long nDimension) const
|
||||
bool ScDPGroupTableData::IsNumOrDateGroup(sal_Int32 nDimension) const
|
||||
{
|
||||
// Virtual method from ScDPTableData, used in result data to force text labels.
|
||||
|
||||
@@ -905,8 +905,8 @@ bool ScDPGroupTableData::IsNumOrDateGroup(tools::Long nDimension) const
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ScDPGroupTableData::IsInGroup( const ScDPItemData& rGroupData, tools::Long nGroupIndex,
|
||||
const ScDPItemData& rBaseData, tools::Long nBaseIndex ) const
|
||||
bool ScDPGroupTableData::IsInGroup( const ScDPItemData& rGroupData, sal_Int32 nGroupIndex,
|
||||
const ScDPItemData& rBaseData, sal_Int32 nBaseIndex ) const
|
||||
{
|
||||
auto aIter = std::find_if(aGroups.begin(), aGroups.end(),
|
||||
[&nGroupIndex, &nBaseIndex](const ScDPGroupDimension& rDim) {
|
||||
@@ -933,8 +933,8 @@ bool ScDPGroupTableData::IsInGroup( const ScDPItemData& rGroupData, tools::Long
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ScDPGroupTableData::HasCommonElement( const ScDPItemData& rFirstData, tools::Long nFirstIndex,
|
||||
const ScDPItemData& rSecondData, tools::Long nSecondIndex ) const
|
||||
bool ScDPGroupTableData::HasCommonElement( const ScDPItemData& rFirstData, sal_Int32 nFirstIndex,
|
||||
const ScDPItemData& rSecondData, sal_Int32 nSecondIndex ) const
|
||||
{
|
||||
const ScDPGroupDimension* pFirstDim = nullptr;
|
||||
const ScDPGroupDimension* pSecondDim = nullptr;
|
||||
@@ -990,7 +990,7 @@ bool ScDPGroupTableData::HasCommonElement( const ScDPItemData& rFirstData, tools
|
||||
return true;
|
||||
}
|
||||
|
||||
tools::Long ScDPGroupTableData::GetSourceDim( tools::Long nDim )
|
||||
sal_Int32 ScDPGroupTableData::GetSourceDim( sal_Int32 nDim )
|
||||
{
|
||||
if ( getIsDataLayoutDimension( nDim ) )
|
||||
return nSourceCount;
|
||||
@@ -1002,7 +1002,7 @@ tools::Long ScDPGroupTableData::GetSourceDim( tools::Long nDim )
|
||||
return nDim;
|
||||
}
|
||||
|
||||
tools::Long ScDPGroupTableData::Compare(tools::Long nDim, tools::Long nDataId1, tools::Long nDataId2)
|
||||
sal_Int32 ScDPGroupTableData::Compare(sal_Int32 nDim, sal_Int32 nDataId1, sal_Int32 nDataId2)
|
||||
{
|
||||
if ( getIsDataLayoutDimension(nDim) )
|
||||
return 0;
|
||||
|
||||
@@ -528,19 +528,19 @@ void ScDPObject::CreateOutput()
|
||||
pOutput.reset( new ScDPOutput( pDoc, xSource, aOutRange.aStart, bFilterButton ) );
|
||||
pOutput->SetHeaderLayout ( mbHeaderLayout );
|
||||
|
||||
tools::Long nOldRows = nHeaderRows;
|
||||
sal_Int32 nOldRows = nHeaderRows;
|
||||
nHeaderRows = pOutput->GetHeaderRows();
|
||||
|
||||
if ( !(bAllowMove && nHeaderRows != nOldRows) )
|
||||
return;
|
||||
|
||||
tools::Long nDiff = nOldRows - nHeaderRows;
|
||||
sal_Int32 nDiff = nOldRows - nHeaderRows;
|
||||
if ( nOldRows == 0 )
|
||||
--nDiff;
|
||||
if ( nHeaderRows == 0 )
|
||||
++nDiff;
|
||||
|
||||
tools::Long nNewRow = aOutRange.aStart.Row() + nDiff;
|
||||
sal_Int32 nNewRow = aOutRange.aStart.Row() + nDiff;
|
||||
if ( nNewRow < 0 )
|
||||
nNewRow = 0;
|
||||
|
||||
|
||||
@@ -330,7 +330,7 @@ void lcl_SetFrame( ScDocument* pDoc, SCTAB nTab,
|
||||
pDoc->ApplyFrameAreaTab(ScRange(nCol1, nRow1, nTab, nCol2, nRow2, nTab), aBox, aBoxInfo);
|
||||
}
|
||||
|
||||
void lcl_FillNumberFormats( std::unique_ptr<sal_uInt32[]>& rFormats, tools::Long& rCount,
|
||||
void lcl_FillNumberFormats( std::unique_ptr<sal_uInt32[]>& rFormats, sal_Int32& rCount,
|
||||
const uno::Reference<sheet::XDataPilotMemberResults>& xLevRes,
|
||||
const uno::Reference<container::XIndexAccess>& xDims )
|
||||
{
|
||||
@@ -1054,9 +1054,9 @@ void ScDPOutput::Output()
|
||||
SCCOL nColPos = nMemberStartCol + static_cast<SCCOL>(nField); //TODO: check for overflow
|
||||
const uno::Sequence<sheet::MemberResult> rSequence = pRowFields[nField].maResult;
|
||||
const sheet::MemberResult* pArray = rSequence.getConstArray();
|
||||
tools::Long nThisRowCount = rSequence.getLength();
|
||||
sal_Int32 nThisRowCount = rSequence.getLength();
|
||||
OSL_ENSURE( nThisRowCount == nRowCount, "count mismatch" ); //TODO: ???
|
||||
for (tools::Long nRow=0; nRow<nThisRowCount; nRow++)
|
||||
for (sal_Int32 nRow=0; nRow<nThisRowCount; nRow++)
|
||||
{
|
||||
SCROW nRowPos = nDataStartRow + static_cast<SCROW>(nRow); //TODO: check for overflow
|
||||
HeaderCell( nColPos, nRowPos, nTab, pArray[nRow], false, nField );
|
||||
@@ -1104,13 +1104,13 @@ void ScDPOutput::Output()
|
||||
|
||||
// output data results:
|
||||
|
||||
for (tools::Long nRow=0; nRow<nRowCount; nRow++)
|
||||
for (sal_Int32 nRow=0; nRow<nRowCount; nRow++)
|
||||
{
|
||||
SCROW nRowPos = nDataStartRow + static_cast<SCROW>(nRow); //TODO: check for overflow
|
||||
const sheet::DataResult* pColAry = pRowAry[nRow].getConstArray();
|
||||
tools::Long nThisColCount = pRowAry[nRow].getLength();
|
||||
sal_Int32 nThisColCount = pRowAry[nRow].getLength();
|
||||
OSL_ENSURE( nThisColCount == nColCount, "count mismatch" ); //TODO: ???
|
||||
for (tools::Long nCol=0; nCol<nThisColCount; nCol++)
|
||||
for (sal_Int32 nCol=0; nCol<nThisColCount; nCol++)
|
||||
{
|
||||
SCCOL nColPos = nDataStartCol + static_cast<SCCOL>(nCol); //TODO: check for overflow
|
||||
DataCell( nColPos, nRowPos, nTab, pColAry[nCol] );
|
||||
@@ -1147,7 +1147,7 @@ bool ScDPOutput::HasError()
|
||||
return bSizeOverflow || bResultsError;
|
||||
}
|
||||
|
||||
tools::Long ScDPOutput::GetHeaderRows() const
|
||||
sal_Int32 ScDPOutput::GetHeaderRows() const
|
||||
{
|
||||
return pPageFields.size() + ( bDoFilter ? 1 : 0 );
|
||||
}
|
||||
|
||||
@@ -77,13 +77,13 @@ void ScDatabaseDPData::DisposeData()
|
||||
aCacheTable.clear();
|
||||
}
|
||||
|
||||
tools::Long ScDatabaseDPData::GetColumnCount()
|
||||
sal_Int32 ScDatabaseDPData::GetColumnCount()
|
||||
{
|
||||
CreateCacheTable();
|
||||
return GetCacheTable().getColSize();
|
||||
}
|
||||
|
||||
OUString ScDatabaseDPData::getDimensionName(tools::Long nColumn)
|
||||
OUString ScDatabaseDPData::getDimensionName(sal_Int32 nColumn)
|
||||
{
|
||||
if (getIsDataLayoutDimension(nColumn))
|
||||
{
|
||||
@@ -96,12 +96,12 @@ OUString ScDatabaseDPData::getDimensionName(tools::Long nColumn)
|
||||
return aCacheTable.getFieldName(static_cast<SCCOL>(nColumn));
|
||||
}
|
||||
|
||||
bool ScDatabaseDPData::getIsDataLayoutDimension(tools::Long nColumn)
|
||||
bool ScDatabaseDPData::getIsDataLayoutDimension(sal_Int32 nColumn)
|
||||
{
|
||||
return ( nColumn == GetCacheTable().getColSize());
|
||||
}
|
||||
|
||||
bool ScDatabaseDPData::IsDateDimension(tools::Long /* nDim */)
|
||||
bool ScDatabaseDPData::IsDateDimension(sal_Int32 /* nDim */)
|
||||
{
|
||||
//TODO: later...
|
||||
return false;
|
||||
|
||||
@@ -73,13 +73,13 @@ void ScSheetDPData::DisposeData()
|
||||
aCacheTable.clear();
|
||||
}
|
||||
|
||||
tools::Long ScSheetDPData::GetColumnCount()
|
||||
sal_Int32 ScSheetDPData::GetColumnCount()
|
||||
{
|
||||
CreateCacheTable();
|
||||
return aCacheTable.getColSize();
|
||||
}
|
||||
|
||||
OUString ScSheetDPData::getDimensionName(tools::Long nColumn)
|
||||
OUString ScSheetDPData::getDimensionName(sal_Int32 nColumn)
|
||||
{
|
||||
CreateCacheTable();
|
||||
if (getIsDataLayoutDimension(nColumn))
|
||||
@@ -99,7 +99,7 @@ OUString ScSheetDPData::getDimensionName(tools::Long nColumn)
|
||||
}
|
||||
}
|
||||
|
||||
bool ScSheetDPData::IsDateDimension(tools::Long nDim)
|
||||
bool ScSheetDPData::IsDateDimension(sal_Int32 nDim)
|
||||
{
|
||||
CreateCacheTable();
|
||||
tools::Long nColCount = aCacheTable.getColSize();
|
||||
@@ -118,7 +118,7 @@ bool ScSheetDPData::IsDateDimension(tools::Long nDim)
|
||||
}
|
||||
}
|
||||
|
||||
sal_uInt32 ScSheetDPData::GetNumberFormat(tools::Long nDim)
|
||||
sal_uInt32 ScSheetDPData::GetNumberFormat(sal_Int32 nDim)
|
||||
{
|
||||
CreateCacheTable();
|
||||
if (getIsDataLayoutDimension(nDim))
|
||||
@@ -146,7 +146,7 @@ sal_uInt32 ScDPTableData::GetNumberFormatByIdx( NfIndexTableOffset eIdx )
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool ScSheetDPData::getIsDataLayoutDimension(tools::Long nColumn)
|
||||
bool ScSheetDPData::getIsDataLayoutDimension(sal_Int32 nColumn)
|
||||
{
|
||||
CreateCacheTable();
|
||||
return (nColumn ==static_cast<tools::Long>( aCacheTable.getColSize()));
|
||||
|
||||
@@ -48,7 +48,7 @@ ScDPTableData::~ScDPTableData()
|
||||
{
|
||||
}
|
||||
|
||||
OUString ScDPTableData::GetFormattedString(tools::Long nDim, const ScDPItemData& rItem, bool bLocaleIndependent) const
|
||||
OUString ScDPTableData::GetFormattedString(sal_Int32 nDim, const ScDPItemData& rItem, bool bLocaleIndependent) const
|
||||
{
|
||||
const ScDPCache& rCache = GetCacheTable().getCache();
|
||||
return rCache.GetFormattedString(nDim, rItem, bLocaleIndependent);
|
||||
@@ -104,35 +104,35 @@ bool ScDPTableData::IsRepeatIfEmpty()
|
||||
return false;
|
||||
}
|
||||
|
||||
sal_uInt32 ScDPTableData::GetNumberFormat(tools::Long)
|
||||
sal_uInt32 ScDPTableData::GetNumberFormat(sal_Int32)
|
||||
{
|
||||
return 0; // default format
|
||||
}
|
||||
|
||||
bool ScDPTableData::IsBaseForGroup(tools::Long) const
|
||||
bool ScDPTableData::IsBaseForGroup(sal_Int32) const
|
||||
{
|
||||
return false; // always false
|
||||
}
|
||||
|
||||
tools::Long ScDPTableData::GetGroupBase(tools::Long) const
|
||||
sal_Int32 ScDPTableData::GetGroupBase(sal_Int32) const
|
||||
{
|
||||
return -1; // always none
|
||||
}
|
||||
|
||||
bool ScDPTableData::IsNumOrDateGroup(tools::Long) const
|
||||
bool ScDPTableData::IsNumOrDateGroup(sal_Int32) const
|
||||
{
|
||||
return false; // always false
|
||||
}
|
||||
|
||||
bool ScDPTableData::IsInGroup( const ScDPItemData&, tools::Long,
|
||||
const ScDPItemData&, tools::Long ) const
|
||||
bool ScDPTableData::IsInGroup( const ScDPItemData&, sal_Int32,
|
||||
const ScDPItemData&, sal_Int32 ) const
|
||||
{
|
||||
OSL_FAIL("IsInGroup shouldn't be called for non-group data");
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ScDPTableData::HasCommonElement( const ScDPItemData&, tools::Long,
|
||||
const ScDPItemData&, tools::Long ) const
|
||||
bool ScDPTableData::HasCommonElement( const ScDPItemData&, sal_Int32,
|
||||
const ScDPItemData&, sal_Int32 ) const
|
||||
{
|
||||
OSL_FAIL("HasCommonElement shouldn't be called for non-group data");
|
||||
return false;
|
||||
@@ -215,13 +215,13 @@ void ScDPTableData::CalcResultsFromCacheTable(const ScDPFilteredCache& rCacheTab
|
||||
}
|
||||
|
||||
void ScDPTableData::GetItemData(const ScDPFilteredCache& rCacheTable, sal_Int32 nRow,
|
||||
const vector<tools::Long>& rDims, vector<SCROW>& rItemData)
|
||||
const vector<sal_Int32>& rDims, vector<SCROW>& rItemData)
|
||||
{
|
||||
sal_Int32 nDimSize = rDims.size();
|
||||
rItemData.reserve(rItemData.size() + nDimSize);
|
||||
for (sal_Int32 i = 0; i < nDimSize; ++i)
|
||||
{
|
||||
tools::Long nDim = rDims[i];
|
||||
sal_Int32 nDim = rDims[i];
|
||||
|
||||
if (getIsDataLayoutDimension(nDim))
|
||||
{
|
||||
@@ -238,14 +238,14 @@ void ScDPTableData::GetItemData(const ScDPFilteredCache& rCacheTable, sal_Int32
|
||||
}
|
||||
}
|
||||
|
||||
tools::Long ScDPTableData::GetMembersCount( tools::Long nDim )
|
||||
sal_Int32 ScDPTableData::GetMembersCount( sal_Int32 nDim )
|
||||
{
|
||||
if ( nDim > MAXCOL )
|
||||
return 0;
|
||||
return GetCacheTable().getFieldEntries( nDim ).size();
|
||||
}
|
||||
|
||||
const ScDPItemData* ScDPTableData::GetMemberByIndex( tools::Long nDim, tools::Long nIndex )
|
||||
const ScDPItemData* ScDPTableData::GetMemberByIndex( sal_Int32 nDim, sal_Int32 nIndex )
|
||||
{
|
||||
if ( nIndex >= GetMembersCount( nDim ) )
|
||||
return nullptr;
|
||||
@@ -255,23 +255,22 @@ const ScDPItemData* ScDPTableData::GetMemberByIndex( tools::Long nDim, tools::Lo
|
||||
return GetCacheTable().getCache().GetItemDataById( static_cast<SCCOL>(nDim), static_cast<SCROW>(nMembers[nIndex]) );
|
||||
}
|
||||
|
||||
const ScDPItemData* ScDPTableData::GetMemberById( tools::Long nDim, tools::Long nId)
|
||||
const ScDPItemData* ScDPTableData::GetMemberById( sal_Int32 nDim, sal_Int32 nId)
|
||||
{
|
||||
return GetCacheTable().getCache().GetItemDataById(nDim, static_cast<SCROW>(nId));
|
||||
}
|
||||
|
||||
const std::vector< SCROW >& ScDPTableData::GetColumnEntries( tools::Long nColumn )
|
||||
const std::vector< SCROW >& ScDPTableData::GetColumnEntries( sal_Int32 nColumn )
|
||||
{
|
||||
return GetCacheTable().getFieldEntries( nColumn );
|
||||
}
|
||||
|
||||
tools::Long ScDPTableData::GetSourceDim( tools::Long nDim )
|
||||
sal_Int32 ScDPTableData::GetSourceDim( sal_Int32 nDim )
|
||||
{
|
||||
return nDim;
|
||||
|
||||
}
|
||||
|
||||
tools::Long ScDPTableData::Compare( tools::Long nDim, tools::Long nDataId1, tools::Long nDataId2)
|
||||
sal_Int32 ScDPTableData::Compare( sal_Int32 nDim, sal_Int32 nDataId1, sal_Int32 nDataId2)
|
||||
{
|
||||
if ( getIsDataLayoutDimension(nDim) )
|
||||
return 0;
|
||||
|
||||
@@ -314,7 +314,7 @@ ScDPRunningTotalState::ScDPRunningTotalState( ScDPResultMember* pColRoot, ScDPRe
|
||||
maRowSorted.push_back(-1);
|
||||
}
|
||||
|
||||
void ScDPRunningTotalState::AddColIndex( tools::Long nVisible, tools::Long nSorted )
|
||||
void ScDPRunningTotalState::AddColIndex( sal_Int32 nVisible, tools::Long nSorted )
|
||||
{
|
||||
maColVisible.back() = nVisible;
|
||||
maColVisible.push_back(-1);
|
||||
@@ -323,7 +323,7 @@ void ScDPRunningTotalState::AddColIndex( tools::Long nVisible, tools::Long nSort
|
||||
maColSorted.push_back(-1);
|
||||
}
|
||||
|
||||
void ScDPRunningTotalState::AddRowIndex( tools::Long nVisible, tools::Long nSorted )
|
||||
void ScDPRunningTotalState::AddRowIndex( sal_Int32 nVisible, tools::Long nSorted )
|
||||
{
|
||||
maRowVisible.back() = nVisible;
|
||||
maRowVisible.push_back(-1);
|
||||
@@ -1551,7 +1551,7 @@ void ScDPResultMember::FillDataResults(
|
||||
// IsVisible() test is in ScDPResultDimension::FillDataResults
|
||||
// (not on data layout dimension)
|
||||
const ScDPLevel* pParentLevel = GetParentLevel();
|
||||
tools::Long nStartRow = rFilterCxt.mnRow;
|
||||
sal_Int32 nStartRow = rFilterCxt.mnRow;
|
||||
|
||||
tools::Long nExtraSpace = 0;
|
||||
if ( pParentLevel && pParentLevel->IsAddEmpty() )
|
||||
@@ -1569,7 +1569,7 @@ void ScDPResultMember::FillDataResults(
|
||||
if ( bTitleLine ) // in tabular layout the title is on a separate row
|
||||
++rFilterCxt.mnRow; // -> fill child dimension one row below
|
||||
|
||||
tools::Long nOldRow = rFilterCxt.mnRow;
|
||||
sal_Int32 nOldRow = rFilterCxt.mnRow;
|
||||
pChildDimension->FillDataResults(pRefMember, rFilterCxt, rSequence, nMeasure);
|
||||
rFilterCxt.mnRow = nOldRow; // Revert to the original row before the call.
|
||||
|
||||
@@ -2348,8 +2348,8 @@ void ScDPDataMember::UpdateRunningTotals(
|
||||
bool bRefDimInRow = ( nRefOrient == sheet::DataPilotFieldOrientation_ROW );
|
||||
|
||||
ScDPResultDimension* pSelectDim = nullptr;
|
||||
tools::Long nRowPos = 0;
|
||||
tools::Long nColPos = 0;
|
||||
sal_Int32 nRowPos = 0;
|
||||
sal_Int32 nColPos = 0;
|
||||
|
||||
// find the reference field in column or row dimensions
|
||||
|
||||
@@ -2447,8 +2447,8 @@ void ScDPDataMember::UpdateRunningTotals(
|
||||
nColPos, rRunning );
|
||||
else
|
||||
{
|
||||
const tools::Long* pRowSorted = rRowSorted.data();
|
||||
const tools::Long* pColSorted = rColSorted.data();
|
||||
const sal_Int32* pRowSorted = rRowSorted.data();
|
||||
const sal_Int32* pColSorted = rColSorted.data();
|
||||
pRowSorted += nRowPos + 1; // including the reference dimension
|
||||
pSelectMember = pSelectDim->GetRowReferenceMember(
|
||||
nullptr, nullptr, pRowSorted, pColSorted);
|
||||
@@ -2506,8 +2506,8 @@ void ScDPDataMember::UpdateRunningTotals(
|
||||
else
|
||||
{
|
||||
aRefItemPos.nBasePos = rRowVisible[nRowPos]; // without sort order applied
|
||||
const tools::Long* pRowSorted = rRowSorted.data();
|
||||
const tools::Long* pColSorted = rColSorted.data();
|
||||
const sal_Int32* pRowSorted = rRowSorted.data();
|
||||
const sal_Int32* pColSorted = rColSorted.data();
|
||||
pRowSorted += nRowPos + 1; // including the reference dimension
|
||||
pSelectMember = pSelectDim->GetRowReferenceMember(
|
||||
pRefPos, pRefName, pRowSorted, pColSorted);
|
||||
@@ -3247,7 +3247,7 @@ void ScDPResultDimension::UpdateRunningTotals( const ScDPResultMember* pRefMembe
|
||||
|
||||
ScDPDataMember* ScDPResultDimension::GetRowReferenceMember(
|
||||
const ScDPRelativePos* pRelativePos, const OUString* pName,
|
||||
const tools::Long* pRowIndexes, const tools::Long* pColIndexes ) const
|
||||
const sal_Int32* pRowIndexes, const sal_Int32* pColIndexes ) const
|
||||
{
|
||||
// get named, previous/next, or first member of this dimension (first existing if pRelativePos and pName are NULL)
|
||||
|
||||
@@ -3290,7 +3290,7 @@ ScDPDataMember* ScDPResultDimension::GetRowReferenceMember(
|
||||
|
||||
// get child members by given indexes
|
||||
|
||||
const tools::Long* pNextRowIndex = pRowIndexes;
|
||||
const sal_Int32* pNextRowIndex = pRowIndexes;
|
||||
while ( *pNextRowIndex >= 0 && pRowMember )
|
||||
{
|
||||
const ScDPResultDimension* pRowChild = pRowMember->GetChildDimension();
|
||||
@@ -3315,7 +3315,7 @@ ScDPDataMember* ScDPResultDimension::GetRowReferenceMember(
|
||||
{
|
||||
pColMember = pRowMember->GetDataRoot();
|
||||
|
||||
const tools::Long* pNextColIndex = pColIndexes;
|
||||
const sal_Int32* pNextColIndex = pColIndexes;
|
||||
while ( *pNextColIndex >= 0 && pColMember )
|
||||
{
|
||||
ScDPDataDimension* pColChild = pColMember->GetChildDimension();
|
||||
@@ -3337,19 +3337,19 @@ ScDPDataMember* ScDPResultDimension::GetRowReferenceMember(
|
||||
|
||||
ScDPDataMember* ScDPResultDimension::GetColReferenceMember(
|
||||
const ScDPRelativePos* pRelativePos, const OUString* pName,
|
||||
tools::Long nRefDimPos, const ScDPRunningTotalState& rRunning )
|
||||
sal_Int32 nRefDimPos, const ScDPRunningTotalState& rRunning )
|
||||
{
|
||||
OSL_ENSURE( pRelativePos == nullptr || pName == nullptr, "can't use position and name" );
|
||||
|
||||
const tools::Long* pColIndexes = rRunning.GetColSorted().data();
|
||||
const tools::Long* pRowIndexes = rRunning.GetRowSorted().data();
|
||||
const sal_Int32* pColIndexes = rRunning.GetColSorted().data();
|
||||
const sal_Int32* pRowIndexes = rRunning.GetRowSorted().data();
|
||||
|
||||
// get own row member using all indexes
|
||||
|
||||
const ScDPResultMember* pRowMember = rRunning.GetRowResRoot();
|
||||
ScDPDataMember* pColMember = nullptr;
|
||||
|
||||
const tools::Long* pNextRowIndex = pRowIndexes;
|
||||
const sal_Int32* pNextRowIndex = pRowIndexes;
|
||||
while ( *pNextRowIndex >= 0 && pRowMember )
|
||||
{
|
||||
const ScDPResultDimension* pRowChild = pRowMember->GetChildDimension();
|
||||
@@ -3367,8 +3367,8 @@ ScDPDataMember* ScDPResultDimension::GetColReferenceMember(
|
||||
{
|
||||
pColMember = pRowMember->GetDataRoot();
|
||||
|
||||
const tools::Long* pNextColIndex = pColIndexes;
|
||||
tools::Long nColSkipped = 0;
|
||||
const sal_Int32* pNextColIndex = pColIndexes;
|
||||
sal_Int32 nColSkipped = 0;
|
||||
while ( *pNextColIndex >= 0 && pColMember && nColSkipped < nRefDimPos )
|
||||
{
|
||||
ScDPDataDimension* pColChild = pColMember->GetChildDimension();
|
||||
@@ -3423,7 +3423,7 @@ ScDPDataMember* ScDPResultDimension::GetColReferenceMember(
|
||||
|
||||
// get column members below the reference field
|
||||
|
||||
const tools::Long* pNextColIndex = pColIndexes + nRefDimPos + 1;
|
||||
const sal_Int32* pNextColIndex = pColIndexes + nRefDimPos + 1;
|
||||
while ( *pNextColIndex >= 0 && pColMember )
|
||||
{
|
||||
ScDPDataDimension* pColChild = pColMember->GetChildDimension();
|
||||
@@ -3909,8 +3909,8 @@ void ScDPResultVisibilityData::fillFieldFilters(vector<ScDPFilteredCache::Criter
|
||||
typedef std::unordered_map<OUString, long> FieldNameMapType;
|
||||
FieldNameMapType aFieldNames;
|
||||
ScDPTableData* pData = mpSource->GetData();
|
||||
tools::Long nColumnCount = pData->GetColumnCount();
|
||||
for (tools::Long i = 0; i < nColumnCount; ++i)
|
||||
sal_Int32 nColumnCount = pData->GetColumnCount();
|
||||
for (sal_Int32 i = 0; i < nColumnCount; ++i)
|
||||
{
|
||||
aFieldNames.emplace(pData->getDimensionName(i), i);
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ const std::optional<OUString> & ScDPSource::GetGrandTotalName() const
|
||||
return mpGrandTotalName;
|
||||
}
|
||||
|
||||
sheet::DataPilotFieldOrientation ScDPSource::GetOrientation(tools::Long nColumn)
|
||||
sheet::DataPilotFieldOrientation ScDPSource::GetOrientation(sal_Int32 nColumn)
|
||||
{
|
||||
if (std::find(maColDims.begin(), maColDims.end(), nColumn) != maColDims.end())
|
||||
return sheet::DataPilotFieldOrientation_COLUMN;
|
||||
@@ -140,21 +140,21 @@ sheet::DataPilotFieldOrientation ScDPSource::GetOrientation(tools::Long nColumn)
|
||||
return sheet::DataPilotFieldOrientation_HIDDEN;
|
||||
}
|
||||
|
||||
tools::Long ScDPSource::GetDataDimensionCount() const
|
||||
sal_Int32 ScDPSource::GetDataDimensionCount() const
|
||||
{
|
||||
return maDataDims.size();
|
||||
}
|
||||
|
||||
ScDPDimension* ScDPSource::GetDataDimension(tools::Long nIndex)
|
||||
ScDPDimension* ScDPSource::GetDataDimension(sal_Int32 nIndex)
|
||||
{
|
||||
if (nIndex < 0 || o3tl::make_unsigned(nIndex) >= maDataDims.size())
|
||||
return nullptr;
|
||||
|
||||
tools::Long nDimIndex = maDataDims[nIndex];
|
||||
sal_Int32 nDimIndex = maDataDims[nIndex];
|
||||
return GetDimensionsObject()->getByIndex(nDimIndex);
|
||||
}
|
||||
|
||||
OUString ScDPSource::GetDataDimName(tools::Long nIndex)
|
||||
OUString ScDPSource::GetDataDimName(sal_Int32 nIndex)
|
||||
{
|
||||
OUString aRet;
|
||||
ScDPDimension* pDim = GetDataDimension(nIndex);
|
||||
@@ -163,9 +163,9 @@ OUString ScDPSource::GetDataDimName(tools::Long nIndex)
|
||||
return aRet;
|
||||
}
|
||||
|
||||
tools::Long ScDPSource::GetPosition(tools::Long nColumn)
|
||||
sal_Int32 ScDPSource::GetPosition(sal_Int32 nColumn)
|
||||
{
|
||||
std::vector<tools::Long>::const_iterator it, itBeg = maColDims.begin(), itEnd = maColDims.end();
|
||||
std::vector<sal_Int32>::const_iterator it, itBeg = maColDims.begin(), itEnd = maColDims.end();
|
||||
it = std::find(itBeg, itEnd, nColumn);
|
||||
if (it != itEnd)
|
||||
return std::distance(itBeg, it);
|
||||
@@ -193,10 +193,10 @@ tools::Long ScDPSource::GetPosition(tools::Long nColumn)
|
||||
|
||||
namespace {
|
||||
|
||||
bool testSubTotal( bool& rAllowed, tools::Long nColumn, const std::vector<tools::Long>& rDims, ScDPSource* pSource )
|
||||
bool testSubTotal( bool& rAllowed, sal_Int32 nColumn, const std::vector<sal_Int32>& rDims, ScDPSource* pSource )
|
||||
{
|
||||
rAllowed = true;
|
||||
std::vector<tools::Long>::const_iterator it = rDims.begin(), itEnd = rDims.end();
|
||||
std::vector<sal_Int32>::const_iterator it = rDims.begin(), itEnd = rDims.end();
|
||||
for (; it != itEnd; ++it)
|
||||
{
|
||||
if (*it != nColumn)
|
||||
@@ -222,16 +222,16 @@ bool testSubTotal( bool& rAllowed, tools::Long nColumn, const std::vector<tools:
|
||||
return false;
|
||||
}
|
||||
|
||||
void removeDim( tools::Long nRemove, std::vector<tools::Long>& rDims )
|
||||
void removeDim( sal_Int32 nRemove, std::vector<sal_Int32>& rDims )
|
||||
{
|
||||
std::vector<tools::Long>::iterator it = std::find(rDims.begin(), rDims.end(), nRemove);
|
||||
std::vector<sal_Int32>::iterator it = std::find(rDims.begin(), rDims.end(), nRemove);
|
||||
if (it != rDims.end())
|
||||
rDims.erase(it);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
bool ScDPSource::SubTotalAllowed(tools::Long nColumn)
|
||||
bool ScDPSource::SubTotalAllowed(sal_Int32 nColumn)
|
||||
{
|
||||
//TODO: cache this at ScDPResultData
|
||||
bool bAllowed = true;
|
||||
@@ -242,7 +242,7 @@ bool ScDPSource::SubTotalAllowed(tools::Long nColumn)
|
||||
return bAllowed;
|
||||
}
|
||||
|
||||
void ScDPSource::SetOrientation(tools::Long nColumn, sheet::DataPilotFieldOrientation nNew)
|
||||
void ScDPSource::SetOrientation(sal_Int32 nColumn, sheet::DataPilotFieldOrientation nNew)
|
||||
{
|
||||
//TODO: change to no-op if new orientation is equal to old?
|
||||
|
||||
@@ -276,7 +276,7 @@ void ScDPSource::SetOrientation(tools::Long nColumn, sheet::DataPilotFieldOrient
|
||||
}
|
||||
}
|
||||
|
||||
bool ScDPSource::IsDataLayoutDimension(tools::Long nDim)
|
||||
bool ScDPSource::IsDataLayoutDimension(sal_Int32 nDim)
|
||||
{
|
||||
return nDim == pData->GetColumnCount();
|
||||
}
|
||||
@@ -286,7 +286,7 @@ sheet::DataPilotFieldOrientation ScDPSource::GetDataLayoutOrientation()
|
||||
return GetOrientation(pData->GetColumnCount());
|
||||
}
|
||||
|
||||
bool ScDPSource::IsDateDimension(tools::Long nDim)
|
||||
bool ScDPSource::IsDateDimension(sal_Int32 nDim)
|
||||
{
|
||||
return pData->IsDateDimension(nDim);
|
||||
}
|
||||
@@ -333,7 +333,7 @@ ScDPDimension* ScDPSource::AddDuplicated(const OUString& rNewName)
|
||||
return pDimensions->getByIndex( pDimensions->getCount() - 1 );
|
||||
}
|
||||
|
||||
tools::Long ScDPSource::GetSourceDim(tools::Long nDim)
|
||||
sal_Int32 ScDPSource::GetSourceDim(sal_Int32 nDim)
|
||||
{
|
||||
// original source dimension or data layout dimension?
|
||||
if ( nDim <= pData->GetColumnCount() )
|
||||
@@ -364,15 +364,15 @@ uno::Sequence< uno::Sequence<sheet::DataResult> > SAL_CALL ScDPSource::getResult
|
||||
throw uno::RuntimeException();
|
||||
}
|
||||
|
||||
tools::Long nColCount = pColResRoot->GetSize(pResData->GetColStartMeasure());
|
||||
tools::Long nRowCount = pRowResRoot->GetSize(pResData->GetRowStartMeasure());
|
||||
sal_Int32 nColCount = pColResRoot->GetSize(pResData->GetColStartMeasure());
|
||||
sal_Int32 nRowCount = pRowResRoot->GetSize(pResData->GetRowStartMeasure());
|
||||
|
||||
// allocate full sequence
|
||||
//TODO: leave out empty rows???
|
||||
|
||||
uno::Sequence< uno::Sequence<sheet::DataResult> > aSeq( nRowCount );
|
||||
uno::Sequence<sheet::DataResult>* pRowAry = aSeq.getArray();
|
||||
for (tools::Long nRow = 0; nRow < nRowCount; nRow++)
|
||||
for (sal_Int32 nRow = 0; nRow < nRowCount; nRow++)
|
||||
{
|
||||
uno::Sequence<sheet::DataResult> aColSeq( nColCount );
|
||||
// use default values of DataResult
|
||||
@@ -438,13 +438,13 @@ void SAL_CALL ScDPSource::removeRefreshListener( const uno::Reference<util::XRef
|
||||
|
||||
Sequence< Sequence<Any> > SAL_CALL ScDPSource::getDrillDownData(const Sequence<sheet::DataPilotFieldFilter>& aFilters)
|
||||
{
|
||||
tools::Long nColumnCount = GetData()->GetColumnCount();
|
||||
sal_Int32 nColumnCount = GetData()->GetColumnCount();
|
||||
|
||||
vector<ScDPFilteredCache::Criterion> aFilterCriteria;
|
||||
for (const sheet::DataPilotFieldFilter& rFilter : aFilters)
|
||||
{
|
||||
const OUString& aFieldName = rFilter.FieldName;
|
||||
for (tools::Long nCol = 0; nCol < nColumnCount; ++nCol)
|
||||
for (sal_Int32 nCol = 0; nCol < nColumnCount; ++nCol)
|
||||
{
|
||||
if (aFieldName == pData->getDimensionName(nCol))
|
||||
{
|
||||
@@ -598,7 +598,7 @@ static tools::Long lcl_CountMinMembers(const vector<ScDPDimension*>& ppDim, cons
|
||||
|
||||
void ScDPSource::FillCalcInfo(bool bIsRow, ScDPTableData::CalcInfo& rInfo, bool &rHasAutoShow)
|
||||
{
|
||||
const std::vector<tools::Long>& rDims = bIsRow ? maRowDims : maColDims;
|
||||
const std::vector<sal_Int32>& rDims = bIsRow ? maRowDims : maColDims;
|
||||
for (const auto& rDimIndex : rDims)
|
||||
{
|
||||
ScDPDimension* pDim = GetDimensionsObject()->getByIndex(rDimIndex);
|
||||
@@ -606,14 +606,14 @@ void ScDPSource::FillCalcInfo(bool bIsRow, ScDPTableData::CalcInfo& rInfo, bool
|
||||
if ( nHierarchy >= ScDPHierarchies::getCount() )
|
||||
nHierarchy = 0;
|
||||
ScDPLevels* pLevels = pDim->GetHierarchiesObject()->getByIndex(nHierarchy)->GetLevelsObject();
|
||||
tools::Long nCount = pLevels->getCount();
|
||||
sal_Int32 nCount = pLevels->getCount();
|
||||
|
||||
//TODO: Test
|
||||
if (pDim->getIsDataLayoutDimension() && maDataDims.size() < 2)
|
||||
nCount = 0;
|
||||
//TODO: Test
|
||||
|
||||
for (tools::Long j = 0; j < nCount; ++j)
|
||||
for (sal_Int32 j = 0; j < nCount; ++j)
|
||||
{
|
||||
ScDPLevel* pLevel = pLevels->getByIndex(j);
|
||||
pLevel->EvaluateSortOrder();
|
||||
@@ -792,7 +792,7 @@ void ScDPSource::CreateRes_Impl()
|
||||
eRefType == sheet::DataPilotFieldReferenceType::ITEM_PERCENTAGE_DIFFERENCE ||
|
||||
eRefType == sheet::DataPilotFieldReferenceType::RUNNING_TOTAL )
|
||||
{
|
||||
tools::Long nColumn = comphelper::findValue(
|
||||
sal_Int32 nColumn = comphelper::findValue(
|
||||
GetDimensionsObject()->getElementNames(), aDataRefValues.back().ReferenceField);
|
||||
if ( nColumn >= 0 )
|
||||
{
|
||||
@@ -957,7 +957,7 @@ void ScDPSource::FillLevelList( sheet::DataPilotFieldOrientation nOrientation, s
|
||||
{
|
||||
rList.clear();
|
||||
|
||||
std::vector<tools::Long>* pDimIndex = nullptr;
|
||||
std::vector<sal_Int32>* pDimIndex = nullptr;
|
||||
switch (nOrientation)
|
||||
{
|
||||
case sheet::DataPilotFieldOrientation_COLUMN:
|
||||
@@ -989,13 +989,13 @@ void ScDPSource::FillLevelList( sheet::DataPilotFieldOrientation nOrientation, s
|
||||
OSL_ENSURE( pDim->getOrientation() == nOrientation, "orientations are wrong" );
|
||||
|
||||
ScDPHierarchies* pHiers = pDim->GetHierarchiesObject();
|
||||
tools::Long nHierarchy = ScDPDimension::getUsedHierarchy();
|
||||
sal_Int32 nHierarchy = ScDPDimension::getUsedHierarchy();
|
||||
if ( nHierarchy >= ScDPHierarchies::getCount() )
|
||||
nHierarchy = 0;
|
||||
ScDPHierarchy* pHier = pHiers->getByIndex(nHierarchy);
|
||||
ScDPLevels* pLevels = pHier->GetLevelsObject();
|
||||
tools::Long nLevCount = pLevels->getCount();
|
||||
for (tools::Long nLev=0; nLev<nLevCount; nLev++)
|
||||
sal_Int32 nLevCount = pLevels->getCount();
|
||||
for (sal_Int32 nLev=0; nLev<nLevCount; nLev++)
|
||||
{
|
||||
ScDPLevel* pLevel = pLevels->getByIndex(nLev);
|
||||
rList.push_back(pLevel);
|
||||
@@ -1018,7 +1018,7 @@ void ScDPSource::FillMemberResults()
|
||||
}
|
||||
|
||||
FillLevelList( sheet::DataPilotFieldOrientation_COLUMN, aColLevelList );
|
||||
tools::Long nColLevelCount = aColLevelList.size();
|
||||
sal_Int32 nColLevelCount = aColLevelList.size();
|
||||
if (nColLevelCount)
|
||||
{
|
||||
tools::Long nColDimSize = pColResRoot->GetSize(pResData->GetColStartMeasure());
|
||||
@@ -1050,15 +1050,15 @@ const uno::Sequence<sheet::MemberResult>* ScDPSource::GetMemberResults( const Sc
|
||||
{
|
||||
FillMemberResults();
|
||||
|
||||
tools::Long i = 0;
|
||||
tools::Long nColCount = aColLevelList.size();
|
||||
sal_Int32 i = 0;
|
||||
sal_Int32 nColCount = aColLevelList.size();
|
||||
for (i=0; i<nColCount; i++)
|
||||
{
|
||||
ScDPLevel* pColLevel = aColLevelList[i];
|
||||
if ( pColLevel == pLevel )
|
||||
return &pColResults[i];
|
||||
}
|
||||
tools::Long nRowCount = aRowLevelList.size();
|
||||
sal_Int32 nRowCount = aRowLevelList.size();
|
||||
for (i=0; i<nRowCount; i++)
|
||||
{
|
||||
ScDPLevel* pRowLevel = aRowLevelList[i];
|
||||
@@ -1177,11 +1177,11 @@ ScDPDimensions::~ScDPDimensions()
|
||||
void ScDPDimensions::CountChanged()
|
||||
{
|
||||
// include data layout dimension and duplicated dimensions
|
||||
tools::Long nNewCount = pSource->GetData()->GetColumnCount() + 1 + pSource->GetDupCount();
|
||||
sal_Int32 nNewCount = pSource->GetData()->GetColumnCount() + 1 + pSource->GetDupCount();
|
||||
if ( ppDims )
|
||||
{
|
||||
tools::Long i;
|
||||
tools::Long nCopy = std::min( nNewCount, nDimCount );
|
||||
sal_Int32 i;
|
||||
sal_Int32 nCopy = std::min( nNewCount, nDimCount );
|
||||
rtl::Reference<ScDPDimension>* ppNew = new rtl::Reference<ScDPDimension>[nNewCount];
|
||||
|
||||
for (i=0; i<nCopy; i++) // copy existing dims
|
||||
@@ -1198,8 +1198,8 @@ void ScDPDimensions::CountChanged()
|
||||
|
||||
uno::Any SAL_CALL ScDPDimensions::getByName( const OUString& aName )
|
||||
{
|
||||
tools::Long nCount = getCount();
|
||||
for (tools::Long i=0; i<nCount; i++)
|
||||
sal_Int32 nCount = getCount();
|
||||
for (sal_Int32 i=0; i<nCount; i++)
|
||||
if ( getByIndex(i)->getName() == aName )
|
||||
{
|
||||
uno::Reference<container::XNamed> xNamed = getByIndex(i);
|
||||
@@ -1512,7 +1512,7 @@ uno::Any SAL_CALL ScDPDimension::getPropertyValue( const OUString& aPropertyName
|
||||
{
|
||||
uno::Any aRet;
|
||||
if ( aPropertyName == SC_UNO_DP_POSITION )
|
||||
aRet <<= static_cast<sal_Int32>(pSource->GetPosition( nDim ));
|
||||
aRet <<= pSource->GetPosition( nDim );
|
||||
else if ( aPropertyName == SC_UNO_DP_USEDHIERARCHY )
|
||||
aRet <<= static_cast<sal_Int32>(getUsedHierarchy());
|
||||
else if ( aPropertyName == SC_UNO_DP_ORIENTATION )
|
||||
@@ -1574,8 +1574,7 @@ uno::Any SAL_CALL ScDPDimension::getPropertyValue( const OUString& aPropertyName
|
||||
}
|
||||
else if (aPropertyName == SC_UNO_DP_ORIGINAL_POS)
|
||||
{
|
||||
sal_Int32 nPos = static_cast<sal_Int32>(nSourceDim);
|
||||
aRet <<= nPos;
|
||||
aRet <<= nSourceDim;
|
||||
}
|
||||
else if ( aPropertyName == SC_UNO_DP_FILTER )
|
||||
{
|
||||
@@ -1669,7 +1668,7 @@ sal_Bool SAL_CALL ScDPHierarchies::hasElements()
|
||||
|
||||
// end of XNameAccess implementation
|
||||
|
||||
tools::Long ScDPHierarchies::getCount()
|
||||
sal_Int32 ScDPHierarchies::getCount()
|
||||
{
|
||||
return nHierCount;
|
||||
}
|
||||
@@ -1684,7 +1683,7 @@ ScDPHierarchy* ScDPHierarchies::getByIndex(tools::Long nIndex) const
|
||||
if ( !ppHiers )
|
||||
{
|
||||
const_cast<ScDPHierarchies*>(this)->ppHiers.reset( new rtl::Reference<ScDPHierarchy>[nHierCount] );
|
||||
for (tools::Long i=0; i<nHierCount; i++)
|
||||
for (sal_Int32 i=0; i<nHierCount; i++)
|
||||
ppHiers[i] = nullptr;
|
||||
}
|
||||
if ( !ppHiers[nIndex].is() )
|
||||
@@ -1698,7 +1697,7 @@ ScDPHierarchy* ScDPHierarchies::getByIndex(tools::Long nIndex) const
|
||||
return nullptr; //TODO: exception?
|
||||
}
|
||||
|
||||
ScDPHierarchy::ScDPHierarchy( ScDPSource* pSrc, tools::Long nD, tools::Long nH ) :
|
||||
ScDPHierarchy::ScDPHierarchy( ScDPSource* pSrc, sal_Int32 nD, sal_Int32 nH ) :
|
||||
pSource( pSrc ),
|
||||
nDim( nD ),
|
||||
nHier( nH )
|
||||
@@ -1751,7 +1750,7 @@ void SAL_CALL ScDPHierarchy::setName( const OUString& /* rNewName */ )
|
||||
OSL_FAIL("not implemented"); //TODO: exception?
|
||||
}
|
||||
|
||||
ScDPLevels::ScDPLevels( ScDPSource* pSrc, tools::Long nD, tools::Long nH ) :
|
||||
ScDPLevels::ScDPLevels( ScDPSource* pSrc, sal_Int32 nD, sal_Int32 nH ) :
|
||||
pSource( pSrc ),
|
||||
nDim( nD ),
|
||||
nHier( nH )
|
||||
@@ -1830,12 +1829,12 @@ sal_Bool SAL_CALL ScDPLevels::hasElements()
|
||||
|
||||
// end of XNameAccess implementation
|
||||
|
||||
tools::Long ScDPLevels::getCount() const
|
||||
sal_Int32 ScDPLevels::getCount() const
|
||||
{
|
||||
return nLevCount;
|
||||
}
|
||||
|
||||
ScDPLevel* ScDPLevels::getByIndex(tools::Long nIndex) const
|
||||
ScDPLevel* ScDPLevels::getByIndex(sal_Int32 nIndex) const
|
||||
{
|
||||
if ( nIndex >= 0 && nIndex < nLevCount )
|
||||
{
|
||||
@@ -1888,7 +1887,7 @@ bool ScDPGlobalMembersOrder::operator()( sal_Int32 nIndex1, sal_Int32 nIndex2 )
|
||||
return bAscending ? (nCompare < 0) : (nCompare > 0);
|
||||
}
|
||||
|
||||
ScDPLevel::ScDPLevel( ScDPSource* pSrc, tools::Long nD, tools::Long nH, tools::Long nL ) :
|
||||
ScDPLevel::ScDPLevel( ScDPSource* pSrc, sal_Int32 nD, sal_Int32 nH, sal_Int32 nL ) :
|
||||
pSource( pSrc ),
|
||||
nDim( nD ),
|
||||
nHier( nH ),
|
||||
@@ -2174,7 +2173,7 @@ uno::Any SAL_CALL ScDPLevel::getPropertyValue( const OUString& aPropertyName )
|
||||
|
||||
SC_IMPL_DUMMY_PROPERTY_LISTENER( ScDPLevel )
|
||||
|
||||
ScDPMembers::ScDPMembers( ScDPSource* pSrc, tools::Long nD, tools::Long nH, tools::Long nL ) :
|
||||
ScDPMembers::ScDPMembers( ScDPSource* pSrc, sal_Int32 nD, sal_Int32 nH, sal_Int32 nL ) :
|
||||
pSource( pSrc ),
|
||||
nDim( nD ),
|
||||
nHier( nH ),
|
||||
@@ -2337,11 +2336,11 @@ uno::Sequence<OUString> ScDPMembers::getElementNames( bool bLocaleIndependent )
|
||||
return aSeq;
|
||||
}
|
||||
|
||||
tools::Long ScDPMembers::getMinMembers() const
|
||||
sal_Int32 ScDPMembers::getMinMembers() const
|
||||
{
|
||||
// used in lcl_CountMinMembers
|
||||
|
||||
tools::Long nVisCount = 0;
|
||||
sal_Int32 nVisCount = 0;
|
||||
if (!maMembers.empty())
|
||||
{
|
||||
nVisCount = std::count_if(maMembers.begin(), maMembers.end(), [](const rtl::Reference<ScDPMember>& pMbr) {
|
||||
@@ -2354,7 +2353,7 @@ tools::Long ScDPMembers::getMinMembers() const
|
||||
return nVisCount;
|
||||
}
|
||||
|
||||
ScDPMember* ScDPMembers::getByIndex(tools::Long nIndex) const
|
||||
ScDPMember* ScDPMembers::getByIndex(sal_Int32 nIndex) const
|
||||
{
|
||||
// result of GetColumnEntries must not change between ScDPMembers ctor
|
||||
// and all calls to getByIndex
|
||||
@@ -2367,7 +2366,7 @@ ScDPMember* ScDPMembers::getByIndex(tools::Long nIndex) const
|
||||
if (!maMembers[nIndex])
|
||||
{
|
||||
rtl::Reference<ScDPMember> pNew;
|
||||
tools::Long nSrcDim = pSource->GetSourceDim( nDim );
|
||||
sal_Int32 nSrcDim = pSource->GetSourceDim( nDim );
|
||||
if ( pSource->IsDataLayoutDimension(nSrcDim) )
|
||||
{
|
||||
// empty name (never shown, not used for lookup)
|
||||
@@ -2448,7 +2447,7 @@ ScDPMember* ScDPMembers::getByIndex(tools::Long nIndex) const
|
||||
}
|
||||
|
||||
ScDPMember::ScDPMember(
|
||||
ScDPSource* pSrc, tools::Long nD, tools::Long nH, tools::Long nL, SCROW nIndex) :
|
||||
ScDPSource* pSrc, sal_Int32 nD, sal_Int32 nH, sal_Int32 nL, SCROW nIndex) :
|
||||
pSource( pSrc ),
|
||||
nDim( nD ),
|
||||
nHier( nH ),
|
||||
@@ -2468,7 +2467,7 @@ ScDPMember::~ScDPMember()
|
||||
|
||||
bool ScDPMember::IsNamedItem(SCROW nIndex) const
|
||||
{
|
||||
tools::Long nSrcDim = pSource->GetSourceDim( nDim );
|
||||
sal_Int32 nSrcDim = pSource->GetSourceDim( nDim );
|
||||
if ( nHier != SC_DAPI_HIERARCHY_FLAT && pSource->IsDateDimension( nSrcDim ) )
|
||||
{
|
||||
const ScDPItemData* pData = pSource->GetCache()->GetItemDataById(nDim, nIndex);
|
||||
@@ -2614,7 +2613,7 @@ const ScDPItemData* ScDPMember::GetItemData() const
|
||||
return pData;
|
||||
}
|
||||
|
||||
const ScDPItemData* ScDPSource::GetItemDataById(tools::Long nDim, tools::Long nId)
|
||||
const ScDPItemData* ScDPSource::GetItemDataById(sal_Int32 nDim, sal_Int32 nId)
|
||||
{
|
||||
return GetData()->GetMemberById(nDim, nId);
|
||||
}
|
||||
|
||||
@@ -648,7 +648,7 @@ void ScMarkData::DeleteTab( SCTAB nTab )
|
||||
maTabMarked.swap(tabMarked);
|
||||
}
|
||||
|
||||
void ScMarkData::ShiftCols(const ScDocument& rDoc, SCCOL nStartCol, tools::Long nColOffset)
|
||||
void ScMarkData::ShiftCols(const ScDocument& rDoc, SCCOL nStartCol, sal_Int32 nColOffset)
|
||||
{
|
||||
if (bMarked)
|
||||
{
|
||||
@@ -661,7 +661,7 @@ void ScMarkData::ShiftCols(const ScDocument& rDoc, SCCOL nStartCol, tools::Long
|
||||
}
|
||||
}
|
||||
|
||||
void ScMarkData::ShiftRows(const ScDocument& rDoc, SCROW nStartRow, tools::Long nRowOffset)
|
||||
void ScMarkData::ShiftRows(const ScDocument& rDoc, SCROW nStartRow, sal_Int32 nRowOffset)
|
||||
{
|
||||
if (bMarked)
|
||||
{
|
||||
|
||||
@@ -341,7 +341,7 @@ bool ScMultiSel::HasAnyMarks() const
|
||||
return false;
|
||||
}
|
||||
|
||||
void ScMultiSel::ShiftCols(SCCOL nStartCol, tools::Long nColOffset)
|
||||
void ScMultiSel::ShiftCols(SCCOL nStartCol, sal_Int32 nColOffset)
|
||||
{
|
||||
if (nStartCol > mrSheetLimits.mnMaxCol)
|
||||
return;
|
||||
@@ -392,7 +392,7 @@ void ScMultiSel::ShiftCols(SCCOL nStartCol, tools::Long nColOffset)
|
||||
aMultiSelContainer[nStartCol + i] = rNewCol;
|
||||
}
|
||||
|
||||
void ScMultiSel::ShiftRows(SCROW nStartRow, tools::Long nRowOffset)
|
||||
void ScMultiSel::ShiftRows(SCROW nStartRow, sal_Int32 nRowOffset)
|
||||
{
|
||||
for (auto& aPair: aMultiSelContainer)
|
||||
aPair.Shift(nStartRow, nRowOffset);
|
||||
|
||||
@@ -1424,7 +1424,7 @@ void ScUnoAddInCall::ExecuteCallWithArgs(uno::Sequence<uno::Any>& rCallArgs)
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
static tools::Long lcl_GetMaxColCount(const uno::Sequence< uno::Sequence<T> >* pRowSeq)
|
||||
static sal_Int32 lcl_GetMaxColCount(const uno::Sequence< uno::Sequence<T> >* pRowSeq)
|
||||
{
|
||||
if (!pRowSeq->hasElements())
|
||||
return 0;
|
||||
@@ -1499,23 +1499,23 @@ void ScUnoAddInCall::SetResult( const uno::Any& rNewRes )
|
||||
|
||||
if ( pRowSeq )
|
||||
{
|
||||
tools::Long nRowCount = pRowSeq->getLength();
|
||||
tools::Long nMaxColCount = lcl_GetMaxColCount(pRowSeq);
|
||||
sal_Int32 nRowCount = pRowSeq->getLength();
|
||||
sal_Int32 nMaxColCount = lcl_GetMaxColCount(pRowSeq);
|
||||
if ( nMaxColCount && nRowCount )
|
||||
{
|
||||
const uno::Sequence<sal_Int32>* pRowArr = pRowSeq->getConstArray();
|
||||
xMatrix = new ScMatrix(
|
||||
static_cast<SCSIZE>(nMaxColCount),
|
||||
static_cast<SCSIZE>(nRowCount), 0.0);
|
||||
for (tools::Long nRow=0; nRow<nRowCount; nRow++)
|
||||
for (sal_Int32 nRow=0; nRow<nRowCount; nRow++)
|
||||
{
|
||||
tools::Long nColCount = pRowArr[nRow].getLength();
|
||||
sal_Int32 nColCount = pRowArr[nRow].getLength();
|
||||
const sal_Int32* pColArr = pRowArr[nRow].getConstArray();
|
||||
for (tools::Long nCol=0; nCol<nColCount; nCol++)
|
||||
for (sal_Int32 nCol=0; nCol<nColCount; nCol++)
|
||||
xMatrix->PutDouble( pColArr[nCol],
|
||||
static_cast<SCSIZE>(nCol),
|
||||
static_cast<SCSIZE>(nRow) );
|
||||
for (tools::Long nCol=nColCount; nCol<nMaxColCount; nCol++)
|
||||
for (sal_Int32 nCol=nColCount; nCol<nMaxColCount; nCol++)
|
||||
xMatrix->PutDouble( 0.0,
|
||||
static_cast<SCSIZE>(nCol),
|
||||
static_cast<SCSIZE>(nRow) );
|
||||
@@ -1534,23 +1534,23 @@ void ScUnoAddInCall::SetResult( const uno::Any& rNewRes )
|
||||
|
||||
if ( pRowSeq )
|
||||
{
|
||||
tools::Long nRowCount = pRowSeq->getLength();
|
||||
tools::Long nMaxColCount = lcl_GetMaxColCount(pRowSeq);
|
||||
sal_Int32 nRowCount = pRowSeq->getLength();
|
||||
sal_Int32 nMaxColCount = lcl_GetMaxColCount(pRowSeq);
|
||||
if ( nMaxColCount && nRowCount )
|
||||
{
|
||||
const uno::Sequence<double>* pRowArr = pRowSeq->getConstArray();
|
||||
xMatrix = new ScMatrix(
|
||||
static_cast<SCSIZE>(nMaxColCount),
|
||||
static_cast<SCSIZE>(nRowCount), 0.0);
|
||||
for (tools::Long nRow=0; nRow<nRowCount; nRow++)
|
||||
for (sal_Int32 nRow=0; nRow<nRowCount; nRow++)
|
||||
{
|
||||
tools::Long nColCount = pRowArr[nRow].getLength();
|
||||
sal_Int32 nColCount = pRowArr[nRow].getLength();
|
||||
const double* pColArr = pRowArr[nRow].getConstArray();
|
||||
for (tools::Long nCol=0; nCol<nColCount; nCol++)
|
||||
for (sal_Int32 nCol=0; nCol<nColCount; nCol++)
|
||||
xMatrix->PutDouble( pColArr[nCol],
|
||||
static_cast<SCSIZE>(nCol),
|
||||
static_cast<SCSIZE>(nRow) );
|
||||
for (tools::Long nCol=nColCount; nCol<nMaxColCount; nCol++)
|
||||
for (sal_Int32 nCol=nColCount; nCol<nMaxColCount; nCol++)
|
||||
xMatrix->PutDouble( 0.0,
|
||||
static_cast<SCSIZE>(nCol),
|
||||
static_cast<SCSIZE>(nRow) );
|
||||
@@ -1569,25 +1569,25 @@ void ScUnoAddInCall::SetResult( const uno::Any& rNewRes )
|
||||
|
||||
if ( pRowSeq )
|
||||
{
|
||||
tools::Long nRowCount = pRowSeq->getLength();
|
||||
tools::Long nMaxColCount = lcl_GetMaxColCount(pRowSeq);
|
||||
sal_Int32 nRowCount = pRowSeq->getLength();
|
||||
sal_Int32 nMaxColCount = lcl_GetMaxColCount(pRowSeq);
|
||||
if ( nMaxColCount && nRowCount )
|
||||
{
|
||||
const uno::Sequence<OUString>* pRowArr = pRowSeq->getConstArray();
|
||||
xMatrix = new ScMatrix(
|
||||
static_cast<SCSIZE>(nMaxColCount),
|
||||
static_cast<SCSIZE>(nRowCount), 0.0);
|
||||
for (tools::Long nRow=0; nRow<nRowCount; nRow++)
|
||||
for (sal_Int32 nRow=0; nRow<nRowCount; nRow++)
|
||||
{
|
||||
tools::Long nColCount = pRowArr[nRow].getLength();
|
||||
sal_Int32 nColCount = pRowArr[nRow].getLength();
|
||||
const OUString* pColArr = pRowArr[nRow].getConstArray();
|
||||
for (tools::Long nCol=0; nCol<nColCount; nCol++)
|
||||
for (sal_Int32 nCol=0; nCol<nColCount; nCol++)
|
||||
{
|
||||
xMatrix->PutString(
|
||||
svl::SharedString(pColArr[nCol]),
|
||||
static_cast<SCSIZE>(nCol), static_cast<SCSIZE>(nRow));
|
||||
}
|
||||
for (tools::Long nCol=nColCount; nCol<nMaxColCount; nCol++)
|
||||
for (sal_Int32 nCol=nColCount; nCol<nMaxColCount; nCol++)
|
||||
{
|
||||
xMatrix->PutString(
|
||||
svl::SharedString(EMPTY_OUSTRING),
|
||||
|
||||
@@ -64,16 +64,16 @@ bool ScRangeToSequence::FillLongArray( uno::Any& rAny, ScDocument& rDoc, const S
|
||||
SCTAB nTab = rRange.aStart.Tab();
|
||||
SCCOL nStartCol = rRange.aStart.Col();
|
||||
SCROW nStartRow = rRange.aStart.Row();
|
||||
tools::Long nColCount = rRange.aEnd.Col() + 1 - rRange.aStart.Col();
|
||||
tools::Long nRowCount = rRange.aEnd.Row() + 1 - rRange.aStart.Row();
|
||||
sal_Int32 nColCount = rRange.aEnd.Col() + 1 - rRange.aStart.Col();
|
||||
sal_Int32 nRowCount = rRange.aEnd.Row() + 1 - rRange.aStart.Row();
|
||||
|
||||
uno::Sequence< uno::Sequence<sal_Int32> > aRowSeq( nRowCount );
|
||||
uno::Sequence<sal_Int32>* pRowAry = aRowSeq.getArray();
|
||||
for (tools::Long nRow = 0; nRow < nRowCount; nRow++)
|
||||
for (sal_Int32 nRow = 0; nRow < nRowCount; nRow++)
|
||||
{
|
||||
uno::Sequence<sal_Int32> aColSeq( nColCount );
|
||||
sal_Int32* pColAry = aColSeq.getArray();
|
||||
for (tools::Long nCol = 0; nCol < nColCount; nCol++)
|
||||
for (sal_Int32 nCol = 0; nCol < nColCount; nCol++)
|
||||
pColAry[nCol] = lcl_DoubleToLong( rDoc.GetValue(
|
||||
ScAddress( static_cast<SCCOL>(nStartCol+nCol), static_cast<SCROW>(nStartRow+nRow), nTab ) ) );
|
||||
|
||||
@@ -117,16 +117,16 @@ bool ScRangeToSequence::FillDoubleArray( uno::Any& rAny, ScDocument& rDoc, const
|
||||
SCTAB nTab = rRange.aStart.Tab();
|
||||
SCCOL nStartCol = rRange.aStart.Col();
|
||||
SCROW nStartRow = rRange.aStart.Row();
|
||||
tools::Long nColCount = rRange.aEnd.Col() + 1 - rRange.aStart.Col();
|
||||
tools::Long nRowCount = rRange.aEnd.Row() + 1 - rRange.aStart.Row();
|
||||
sal_Int32 nColCount = rRange.aEnd.Col() + 1 - rRange.aStart.Col();
|
||||
sal_Int32 nRowCount = rRange.aEnd.Row() + 1 - rRange.aStart.Row();
|
||||
|
||||
uno::Sequence< uno::Sequence<double> > aRowSeq( nRowCount );
|
||||
uno::Sequence<double>* pRowAry = aRowSeq.getArray();
|
||||
for (tools::Long nRow = 0; nRow < nRowCount; nRow++)
|
||||
for (sal_Int32 nRow = 0; nRow < nRowCount; nRow++)
|
||||
{
|
||||
uno::Sequence<double> aColSeq( nColCount );
|
||||
double* pColAry = aColSeq.getArray();
|
||||
for (tools::Long nCol = 0; nCol < nColCount; nCol++)
|
||||
for (sal_Int32 nCol = 0; nCol < nColCount; nCol++)
|
||||
pColAry[nCol] = rDoc.GetValue(
|
||||
ScAddress( static_cast<SCCOL>(nStartCol+nCol), static_cast<SCROW>(nStartRow+nRow), nTab ) );
|
||||
|
||||
@@ -170,18 +170,18 @@ bool ScRangeToSequence::FillStringArray( uno::Any& rAny, ScDocument& rDoc, const
|
||||
SCTAB nTab = rRange.aStart.Tab();
|
||||
SCCOL nStartCol = rRange.aStart.Col();
|
||||
SCROW nStartRow = rRange.aStart.Row();
|
||||
tools::Long nColCount = rRange.aEnd.Col() + 1 - rRange.aStart.Col();
|
||||
tools::Long nRowCount = rRange.aEnd.Row() + 1 - rRange.aStart.Row();
|
||||
sal_Int32 nColCount = rRange.aEnd.Col() + 1 - rRange.aStart.Col();
|
||||
sal_Int32 nRowCount = rRange.aEnd.Row() + 1 - rRange.aStart.Row();
|
||||
|
||||
bool bHasErrors = false;
|
||||
|
||||
uno::Sequence< uno::Sequence<OUString> > aRowSeq( nRowCount );
|
||||
uno::Sequence<OUString>* pRowAry = aRowSeq.getArray();
|
||||
for (tools::Long nRow = 0; nRow < nRowCount; nRow++)
|
||||
for (sal_Int32 nRow = 0; nRow < nRowCount; nRow++)
|
||||
{
|
||||
uno::Sequence<OUString> aColSeq( nColCount );
|
||||
OUString* pColAry = aColSeq.getArray();
|
||||
for (tools::Long nCol = 0; nCol < nColCount; nCol++)
|
||||
for (sal_Int32 nCol = 0; nCol < nColCount; nCol++)
|
||||
{
|
||||
FormulaError nErrCode = rDoc.GetStringForFormula(
|
||||
ScAddress(static_cast<SCCOL>(nStartCol+nCol), static_cast<SCROW>(nStartRow+nRow), nTab),
|
||||
@@ -242,18 +242,18 @@ bool ScRangeToSequence::FillMixedArray( uno::Any& rAny, ScDocument& rDoc, const
|
||||
SCTAB nTab = rRange.aStart.Tab();
|
||||
SCCOL nStartCol = rRange.aStart.Col();
|
||||
SCROW nStartRow = rRange.aStart.Row();
|
||||
tools::Long nColCount = rRange.aEnd.Col() + 1 - rRange.aStart.Col();
|
||||
tools::Long nRowCount = rRange.aEnd.Row() + 1 - rRange.aStart.Row();
|
||||
sal_Int32 nColCount = rRange.aEnd.Col() + 1 - rRange.aStart.Col();
|
||||
sal_Int32 nRowCount = rRange.aEnd.Row() + 1 - rRange.aStart.Row();
|
||||
|
||||
bool bHasErrors = false;
|
||||
|
||||
uno::Sequence< uno::Sequence<uno::Any> > aRowSeq( nRowCount );
|
||||
uno::Sequence<uno::Any>* pRowAry = aRowSeq.getArray();
|
||||
for (tools::Long nRow = 0; nRow < nRowCount; nRow++)
|
||||
for (sal_Int32 nRow = 0; nRow < nRowCount; nRow++)
|
||||
{
|
||||
uno::Sequence<uno::Any> aColSeq( nColCount );
|
||||
uno::Any* pColAry = aColSeq.getArray();
|
||||
for (tools::Long nCol = 0; nCol < nColCount; nCol++)
|
||||
for (sal_Int32 nCol = 0; nCol < nColCount; nCol++)
|
||||
{
|
||||
uno::Any& rElement = pColAry[nCol];
|
||||
|
||||
|
||||
@@ -476,12 +476,12 @@ uno::Reference< XAccessible > SAL_CALL ScAccessiblePreviewTable::getAccessibleCh
|
||||
uno::Reference<XAccessible> xRet;
|
||||
if ( mpTableInfo )
|
||||
{
|
||||
tools::Long nColumns = mpTableInfo->GetCols();
|
||||
sal_Int32 nColumns = mpTableInfo->GetCols();
|
||||
if ( nColumns > 0 )
|
||||
{
|
||||
// nCol, nRow are within the visible table, not the document
|
||||
tools::Long nCol = nIndex % nColumns;
|
||||
tools::Long nRow = nIndex / nColumns;
|
||||
sal_Int32 nCol = nIndex % nColumns;
|
||||
sal_Int32 nRow = nIndex / nColumns;
|
||||
|
||||
xRet = getAccessibleCellAt( nRow, nCol );
|
||||
}
|
||||
|
||||
@@ -233,7 +233,7 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
|
||||
|
||||
// get column descriptions
|
||||
|
||||
tools::Long nColCount = 0;
|
||||
sal_Int32 nColCount = 0;
|
||||
uno::Reference<sdbc::XResultSetMetaData> xMeta;
|
||||
uno::Reference<sdbc::XResultSetMetaDataSupplier> xMetaSupp( xRowSet, uno::UNO_QUERY );
|
||||
if ( xMetaSupp.is() )
|
||||
|
||||
@@ -2704,8 +2704,8 @@ bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
|
||||
{
|
||||
ScRange aRange = qDecreaseRange.back();
|
||||
|
||||
tools::Long nDecreaseRowCount = 0;
|
||||
tools::Long nDecreaseColCount = 0;
|
||||
sal_Int32 nDecreaseRowCount = 0;
|
||||
sal_Int32 nDecreaseColCount = 0;
|
||||
if( eCmd == DelCellCmd::CellsUp || eCmd == DelCellCmd::Rows )
|
||||
{
|
||||
if( nStartRow >= aRange.aStart.Row() && nStartRow <= aRange.aEnd.Row() && nEndRow>= aRange.aStart.Row() && nEndRow <= aRange.aEnd.Row() )
|
||||
|
||||
@@ -287,7 +287,7 @@ ErrCode ScDocShell::DBaseImport( const OUString& rFullFileName, rtl_TextEncoding
|
||||
try
|
||||
{
|
||||
tools::Long i;
|
||||
tools::Long nColCount = 0;
|
||||
sal_Int32 nColCount = 0;
|
||||
OUString aTabName;
|
||||
uno::Reference<sdbc::XDriverManager2> xDrvMan;
|
||||
uno::Reference<sdbc::XConnection> xConnection;
|
||||
@@ -762,7 +762,7 @@ ErrCode ScDocShell::DBaseExport( const OUString& rFullFileName, rtl_TextEncoding
|
||||
bHasFieldNames = false;
|
||||
}
|
||||
|
||||
tools::Long nColCount = nLastCol - nFirstCol + 1;
|
||||
sal_Int32 nColCount = nLastCol - nFirstCol + 1;
|
||||
uno::Sequence<OUString> aColNames( nColCount );
|
||||
uno::Sequence<sal_Int32> aColTypes( nColCount );
|
||||
uno::Sequence<sal_Int32> aColLengths( nColCount );
|
||||
@@ -838,7 +838,7 @@ ErrCode ScDocShell::DBaseExport( const OUString& rFullFileName, rtl_TextEncoding
|
||||
const sal_Int32* pColTypes = aColTypes.getConstArray();
|
||||
const sal_Int32* pColLengths = aColLengths.getConstArray();
|
||||
const sal_Int32* pColScales = aColScales.getConstArray();
|
||||
tools::Long nCol;
|
||||
sal_Int32 nCol;
|
||||
|
||||
for (nCol=0; nCol<nColCount; nCol++)
|
||||
{
|
||||
|
||||
@@ -41,7 +41,7 @@ private:
|
||||
rtl_TextEncoding eCharSet;
|
||||
LanguageType eLang;
|
||||
bool bCharSetSystem;
|
||||
tools::Long nStartRow;
|
||||
sal_Int32 nStartRow;
|
||||
std::vector<sal_Int32> mvColStart;
|
||||
std::vector<sal_uInt8> mvColFormat;
|
||||
|
||||
@@ -65,7 +65,7 @@ public:
|
||||
sal_uInt16 GetInfoCount() const { return mvColStart.size(); }
|
||||
const sal_Int32* GetColStart() const { return mvColStart.data(); }
|
||||
const sal_uInt8* GetColFormat() const { return mvColFormat.data(); }
|
||||
tools::Long GetStartRow() const { return nStartRow; }
|
||||
sal_Int32 GetStartRow() const { return nStartRow; }
|
||||
LanguageType GetLanguage() const { return eLang; }
|
||||
|
||||
void SetCharSet( rtl_TextEncoding eNew ) { eCharSet = eNew; }
|
||||
@@ -78,7 +78,7 @@ public:
|
||||
void SetDetectSpecialNumber(bool bSet) { bDetectSpecialNumber = bSet; }
|
||||
void SetSkipEmptyCells(bool bSet) { bSkipEmptyCells = bSet; }
|
||||
void SetTextSep( sal_Unicode c ) { cTextSep = c; }
|
||||
void SetStartRow( tools::Long nRow) { nStartRow= nRow; }
|
||||
void SetStartRow( sal_Int32 nRow) { nStartRow= nRow; }
|
||||
void SetLanguage(LanguageType e) { eLang = e; }
|
||||
|
||||
void SetColumnInfo( const ScCsvExpDataVec& rDataVec );
|
||||
|
||||
@@ -1115,8 +1115,8 @@ static bool lcl_PutDataArray( ScDocShell& rDocShell, const ScRange& rRange,
|
||||
return false;
|
||||
}
|
||||
|
||||
tools::Long nCols = 0;
|
||||
tools::Long nRows = aData.getLength();
|
||||
sal_Int32 nCols = 0;
|
||||
sal_Int32 nRows = aData.getLength();
|
||||
if ( nRows )
|
||||
nCols = aData[0].getLength();
|
||||
|
||||
@@ -1250,8 +1250,8 @@ static bool lcl_PutFormulaArray( ScDocShell& rDocShell, const ScRange& rRange,
|
||||
return false;
|
||||
}
|
||||
|
||||
tools::Long nCols = 0;
|
||||
tools::Long nRows = aData.getLength();
|
||||
sal_Int32 nCols = 0;
|
||||
sal_Int32 nRows = aData.getLength();
|
||||
if ( nRows )
|
||||
nCols = aData[0].getLength();
|
||||
|
||||
@@ -2985,7 +2985,7 @@ uno::Sequence< uno::Sequence<double> > SAL_CALL ScCellRangesBase::getData()
|
||||
return uno::Sequence< uno::Sequence<double> >(0);
|
||||
}
|
||||
|
||||
ScRangeListRef ScCellRangesBase::GetLimitedChartRanges_Impl( tools::Long nDataColumns, tools::Long nDataRows ) const
|
||||
ScRangeListRef ScCellRangesBase::GetLimitedChartRanges_Impl( sal_Int32 nDataColumns, sal_Int32 nDataRows ) const
|
||||
{
|
||||
if ( aRanges.size() == 1 )
|
||||
{
|
||||
@@ -2998,13 +2998,13 @@ ScRangeListRef ScCellRangesBase::GetLimitedChartRanges_Impl( tools::Long nDataCo
|
||||
|
||||
SCTAB nTab = rRange.aStart.Tab();
|
||||
|
||||
tools::Long nEndColumn = nDataColumns - 1 + ( bChartColAsHdr ? 1 : 0 );
|
||||
sal_Int32 nEndColumn = nDataColumns - 1 + ( bChartColAsHdr ? 1 : 0 );
|
||||
if ( nEndColumn < 0 )
|
||||
nEndColumn = 0;
|
||||
if ( nEndColumn > rDoc.MaxCol() )
|
||||
nEndColumn = rDoc.MaxCol();
|
||||
|
||||
tools::Long nEndRow = nDataRows - 1 + ( bChartRowAsHdr ? 1 : 0 );
|
||||
sal_Int32 nEndRow = nDataRows - 1 + ( bChartRowAsHdr ? 1 : 0 );
|
||||
if ( nEndRow < 0 )
|
||||
nEndRow = 0;
|
||||
if ( nEndRow > rDoc.MaxRow() )
|
||||
@@ -3022,8 +3022,8 @@ void SAL_CALL ScCellRangesBase::setData( const uno::Sequence< uno::Sequence<doub
|
||||
{
|
||||
SolarMutexGuard aGuard;
|
||||
bool bDone = false;
|
||||
tools::Long nRowCount = aData.getLength();
|
||||
tools::Long nColCount = nRowCount ? aData[0].getLength() : 0;
|
||||
sal_Int32 nRowCount = aData.getLength();
|
||||
sal_Int32 nColCount = nRowCount ? aData[0].getLength() : 0;
|
||||
ScRangeListRef xChartRanges = GetLimitedChartRanges_Impl( nColCount, nRowCount );
|
||||
if ( pDocShell && xChartRanges.is() )
|
||||
{
|
||||
@@ -3036,12 +3036,12 @@ void SAL_CALL ScCellRangesBase::setData( const uno::Sequence< uno::Sequence<doub
|
||||
if ( pPosMap->GetColCount() == static_cast<SCCOL>(nColCount) &&
|
||||
pPosMap->GetRowCount() == static_cast<SCROW>(nRowCount) )
|
||||
{
|
||||
for (tools::Long nRow=0; nRow<nRowCount; nRow++)
|
||||
for (sal_Int32 nRow=0; nRow<nRowCount; nRow++)
|
||||
{
|
||||
const uno::Sequence<double>& rRowSeq = aData[nRow];
|
||||
const double* pArray = rRowSeq.getConstArray();
|
||||
nColCount = rRowSeq.getLength();
|
||||
for (tools::Long nCol=0; nCol<nColCount; nCol++)
|
||||
for (sal_Int32 nCol=0; nCol<nColCount; nCol++)
|
||||
{
|
||||
const ScAddress* pPos = pPosMap->GetPosition(
|
||||
sal::static_int_cast<SCCOL>(nCol),
|
||||
@@ -3094,7 +3094,7 @@ void SAL_CALL ScCellRangesBase::setRowDescriptions(
|
||||
bool bDone = false;
|
||||
if ( bChartColAsHdr )
|
||||
{
|
||||
tools::Long nRowCount = aRowDescriptions.getLength();
|
||||
sal_Int32 nRowCount = aRowDescriptions.getLength();
|
||||
ScRangeListRef xChartRanges = GetLimitedChartRanges_Impl( 1, nRowCount );
|
||||
if ( pDocShell && xChartRanges.is() )
|
||||
{
|
||||
@@ -3107,7 +3107,7 @@ void SAL_CALL ScCellRangesBase::setRowDescriptions(
|
||||
if ( pPosMap->GetRowCount() == static_cast<SCROW>(nRowCount) )
|
||||
{
|
||||
const OUString* pArray = aRowDescriptions.getConstArray();
|
||||
for (tools::Long nRow=0; nRow<nRowCount; nRow++)
|
||||
for (sal_Int32 nRow=0; nRow<nRowCount; nRow++)
|
||||
{
|
||||
const ScAddress* pPos = pPosMap->GetRowHeaderPosition(
|
||||
static_cast<SCSIZE>(nRow) );
|
||||
@@ -3163,7 +3163,7 @@ void SAL_CALL ScCellRangesBase::setColumnDescriptions(
|
||||
bool bDone = false;
|
||||
if ( bChartRowAsHdr )
|
||||
{
|
||||
tools::Long nColCount = aColumnDescriptions.getLength();
|
||||
sal_Int32 nColCount = aColumnDescriptions.getLength();
|
||||
ScRangeListRef xChartRanges = GetLimitedChartRanges_Impl( nColCount, 1 );
|
||||
if ( pDocShell && xChartRanges.is() )
|
||||
{
|
||||
@@ -3176,7 +3176,7 @@ void SAL_CALL ScCellRangesBase::setColumnDescriptions(
|
||||
if ( pPosMap->GetColCount() == static_cast<SCCOL>(nColCount) )
|
||||
{
|
||||
const OUString* pArray = aColumnDescriptions.getConstArray();
|
||||
for (tools::Long nCol=0; nCol<nColCount; nCol++)
|
||||
for (sal_Int32 nCol=0; nCol<nColCount; nCol++)
|
||||
{
|
||||
const ScAddress* pPos = pPosMap->GetColHeaderPosition(
|
||||
sal::static_int_cast<SCCOL>(nCol) );
|
||||
|
||||
@@ -309,7 +309,7 @@ static bool lcl_AddFunctionToken( ScTokenArray& rArray, const OUString& rName,co
|
||||
return false; // no valid function name
|
||||
}
|
||||
|
||||
static void lcl_AddRef( ScTokenArray& rArray, tools::Long nStartRow, tools::Long nColCount, tools::Long nRowCount )
|
||||
static void lcl_AddRef( ScTokenArray& rArray, sal_Int32 nStartRow, sal_Int32 nColCount, sal_Int32 nRowCount )
|
||||
{
|
||||
ScComplexRefData aRef;
|
||||
aRef.InitRange(ScRange(0,nStartRow,0,nColCount-1,nStartRow+nRowCount-1,0));
|
||||
@@ -332,19 +332,19 @@ public:
|
||||
// the other types methods are here just to reflect the orig code and for
|
||||
// completeness.
|
||||
|
||||
void visitElem( tools::Long nCol, tools::Long nRow, sal_Int16 elem )
|
||||
void visitElem( sal_Int32 nCol, sal_Int32 nRow, sal_Int16 elem )
|
||||
{
|
||||
mpDoc->SetValue( static_cast<SCCOL>(nCol), static_cast<SCROW>(nRow), 0, elem );
|
||||
}
|
||||
void visitElem( tools::Long nCol, tools::Long nRow, sal_Int32 elem )
|
||||
void visitElem( sal_Int32 nCol, sal_Int32 nRow, sal_Int32 elem )
|
||||
{
|
||||
mpDoc->SetValue( static_cast<SCCOL>(nCol), static_cast<SCROW>(nRow), 0, elem );
|
||||
}
|
||||
void visitElem( tools::Long nCol, tools::Long nRow, const double& elem )
|
||||
void visitElem( sal_Int32 nCol, sal_Int32 nRow, const double& elem )
|
||||
{
|
||||
mpDoc->SetValue( static_cast<SCCOL>(nCol), static_cast<SCROW>(nRow), 0, elem );
|
||||
}
|
||||
void visitElem( tools::Long nCol, tools::Long nRow, const OUString& elem )
|
||||
void visitElem( sal_Int32 nCol, sal_Int32 nRow, const OUString& elem )
|
||||
{
|
||||
if (!elem.isEmpty())
|
||||
{
|
||||
@@ -353,7 +353,7 @@ public:
|
||||
mpDoc->SetString(ScAddress(nCol,nRow,0), elem, &aParam);
|
||||
}
|
||||
}
|
||||
void visitElem( tools::Long nCol, tools::Long nRow, const uno::Any& rElement )
|
||||
void visitElem( sal_Int32 nCol, sal_Int32 nRow, const uno::Any& rElement )
|
||||
{
|
||||
uno::TypeClass eElemClass = rElement.getValueTypeClass();
|
||||
if ( eElemClass == uno::TypeClass_VOID )
|
||||
@@ -391,14 +391,14 @@ class SequencesContainer
|
||||
{
|
||||
uno::Sequence< uno::Sequence< seq > > maSeq;
|
||||
|
||||
tools::Long& mrDocRow;
|
||||
sal_Int32& mrDocRow;
|
||||
bool mbOverflow;
|
||||
bool mbArgError;
|
||||
ScDocument* mpDoc;
|
||||
ScTokenArray& mrTokenArr;
|
||||
|
||||
public:
|
||||
SequencesContainer( const uno::Any& rArg, ScTokenArray& rTokenArr, tools::Long& rDocRow, ScDocument* pDoc ) :
|
||||
SequencesContainer( const uno::Any& rArg, ScTokenArray& rTokenArr, sal_Int32& rDocRow, ScDocument* pDoc ) :
|
||||
mrDocRow( rDocRow ), mbOverflow(false), mbArgError(false), mpDoc( pDoc ), mrTokenArr( rTokenArr )
|
||||
{
|
||||
rArg >>= maSeq;
|
||||
@@ -407,16 +407,16 @@ public:
|
||||
void process()
|
||||
{
|
||||
SimpleVisitor aVisitor(mpDoc);
|
||||
tools::Long nStartRow = mrDocRow;
|
||||
tools::Long nRowCount = maSeq.getLength();
|
||||
tools::Long nMaxColCount = 0;
|
||||
sal_Int32 nStartRow = mrDocRow;
|
||||
sal_Int32 nRowCount = maSeq.getLength();
|
||||
sal_Int32 nMaxColCount = 0;
|
||||
for ( const uno::Sequence< seq >& rRow : maSeq )
|
||||
{
|
||||
tools::Long nColCount = rRow.getLength();
|
||||
sal_Int32 nColCount = rRow.getLength();
|
||||
if ( nColCount > nMaxColCount )
|
||||
nMaxColCount = nColCount;
|
||||
const seq* pColArr = rRow.getConstArray();
|
||||
for (tools::Long nCol=0; nCol<nColCount; nCol++)
|
||||
for (sal_Int32 nCol=0; nCol<nColCount; nCol++)
|
||||
if ( nCol <= mpDoc->MaxCol() && mrDocRow <= mpDoc->MaxRow() )
|
||||
aVisitor.visitElem( nCol, mrDocRow, pColArr[ nCol ] );
|
||||
else
|
||||
@@ -436,7 +436,7 @@ class ArrayOfArrayProc
|
||||
{
|
||||
public:
|
||||
static void processSequences( ScDocument* pDoc, const uno::Any& rArg, ScTokenArray& rTokenArr,
|
||||
tools::Long& rDocRow, bool& rArgErr, bool& rOverflow )
|
||||
sal_Int32& rDocRow, bool& rArgErr, bool& rOverflow )
|
||||
{
|
||||
SequencesContainer< T > aContainer( rArg, rTokenArr, rDocRow, pDoc );
|
||||
aContainer.process();
|
||||
@@ -487,7 +487,7 @@ uno::Any SAL_CALL ScFunctionAccess::callFunction( const OUString& aName,
|
||||
|
||||
bool bArgErr = false;
|
||||
bool bOverflow = false;
|
||||
tools::Long nDocRow = 0;
|
||||
sal_Int32 nDocRow = 0;
|
||||
tools::Long nArgCount = aArguments.getLength();
|
||||
const uno::Any* pArgArr = aArguments.getConstArray();
|
||||
|
||||
@@ -557,9 +557,9 @@ uno::Any SAL_CALL ScFunctionAccess::callFunction( const OUString& aName,
|
||||
{
|
||||
ScRange const & rSrcRange = rRanges[ 0 ];
|
||||
|
||||
tools::Long nStartRow = nDocRow;
|
||||
tools::Long nColCount = rSrcRange.aEnd.Col() - rSrcRange.aStart.Col() + 1;
|
||||
tools::Long nRowCount = rSrcRange.aEnd.Row() - rSrcRange.aStart.Row() + 1;
|
||||
sal_Int32 nStartRow = nDocRow;
|
||||
sal_Int32 nColCount = rSrcRange.aEnd.Col() - rSrcRange.aStart.Col() + 1;
|
||||
sal_Int32 nRowCount = rSrcRange.aEnd.Row() - rSrcRange.aStart.Row() + 1;
|
||||
|
||||
if ( nStartRow + nRowCount > pDoc->GetSheetLimits().GetMaxRowCount() )
|
||||
bOverflow = true;
|
||||
|
||||
@@ -2643,7 +2643,7 @@ void ScTabView::getRowColumnHeaders(const tools::Rectangle& rRectangle, tools::J
|
||||
mnLOKEndHeaderRow = nEndRow;
|
||||
}
|
||||
|
||||
tools::Long nVisibleRows = nEndRow - nStartRow;
|
||||
sal_Int32 nVisibleRows = nEndRow - nStartRow;
|
||||
if (nVisibleRows < 25)
|
||||
nVisibleRows = 25;
|
||||
|
||||
@@ -2741,7 +2741,7 @@ void ScTabView::getRowColumnHeaders(const tools::Rectangle& rRectangle, tools::J
|
||||
mnLOKEndHeaderCol = nEndCol;
|
||||
}
|
||||
|
||||
tools::Long nVisibleCols = nEndCol - nStartCol;
|
||||
sal_Int32 nVisibleCols = nEndCol - nStartCol;
|
||||
if (nVisibleCols < 10)
|
||||
nVisibleCols = 10;
|
||||
|
||||
|
||||
@@ -248,7 +248,7 @@ class SmShowSymbolSet final : public weld::CustomWidgetController
|
||||
Link<SmShowSymbolSet&,void> aSelectHdlLink;
|
||||
Link<SmShowSymbolSet&,void> aDblClickHdlLink;
|
||||
tools::Long nLen;
|
||||
tools::Long nRows, nColumns;
|
||||
sal_Int32 nRows, nColumns;
|
||||
tools::Long nXOffset, nYOffset;
|
||||
sal_uInt16 nSelectSymbol;
|
||||
std::unique_ptr<weld::ScrolledWindow> m_xScrolledWindow;
|
||||
|
||||
@@ -135,8 +135,8 @@ namespace svt::table
|
||||
virtual vcl::Window* GetWindowInstance() override;
|
||||
virtual sal_Int32 GetAccessibleControlCount() const override;
|
||||
virtual bool ConvertPointToControlIndex( sal_Int32& _rnIndex, const Point& _rPoint ) override;
|
||||
virtual tools::Long GetRowCount() const override;
|
||||
virtual tools::Long GetColumnCount() const override;
|
||||
virtual sal_Int32 GetRowCount() const override;
|
||||
virtual sal_Int32 GetColumnCount() const override;
|
||||
virtual bool ConvertPointToCellAddress( sal_Int32& _rnRow, sal_Int32& _rnColPos, const Point& _rPoint ) override;
|
||||
virtual tools::Rectangle calcHeaderRect( bool _bIsColumnBar ) override;
|
||||
virtual tools::Rectangle calcHeaderCellRect( bool _bIsColumnBar, sal_Int32 nPos) override;
|
||||
|
||||
@@ -824,7 +824,7 @@ OUString BrowseBox::GetColumnTitle( sal_uInt16 nId ) const
|
||||
return mvCols[ nItemPos ]->Title();
|
||||
}
|
||||
|
||||
tools::Long BrowseBox::GetRowCount() const
|
||||
sal_Int32 BrowseBox::GetRowCount() const
|
||||
{
|
||||
return nRowCount;
|
||||
}
|
||||
@@ -857,7 +857,7 @@ void BrowseBox::SetTitleLines( sal_uInt16 nLines )
|
||||
nTitleLines = nLines;
|
||||
}
|
||||
|
||||
tools::Long BrowseBox::ScrollColumns( tools::Long nCols )
|
||||
sal_Int32 BrowseBox::ScrollColumns( sal_Int32 nCols )
|
||||
{
|
||||
|
||||
if ( nFirstCol + nCols < 0 ||
|
||||
@@ -999,12 +999,12 @@ tools::Long BrowseBox::ScrollColumns( tools::Long nCols )
|
||||
}
|
||||
|
||||
|
||||
tools::Long BrowseBox::ScrollRows( tools::Long nRows )
|
||||
sal_Int32 BrowseBox::ScrollRows( sal_Int32 nRows )
|
||||
{
|
||||
// compute new top row
|
||||
tools::Long nTmpMin = std::min( static_cast<tools::Long>(nTopRow + nRows), static_cast<tools::Long>(nRowCount - 1) );
|
||||
sal_Int32 nTmpMin = std::min( static_cast<sal_Int32>(nTopRow + nRows), static_cast<sal_Int32>(nRowCount - 1) );
|
||||
|
||||
tools::Long nNewTopRow = std::max<tools::Long>( nTmpMin, 0 );
|
||||
sal_Int32 nNewTopRow = std::max<sal_Int32>( nTmpMin, 0 );
|
||||
|
||||
if ( nNewTopRow == nTopRow )
|
||||
return 0;
|
||||
@@ -1023,7 +1023,7 @@ tools::Long BrowseBox::ScrollRows( tools::Long nRows )
|
||||
|
||||
// scroll area on screen and/or repaint
|
||||
tools::Long nDeltaY = GetDataRowHeight() * ( nNewTopRow - nTopRow );
|
||||
tools::Long nOldTopRow = nTopRow;
|
||||
sal_Int32 nOldTopRow = nTopRow;
|
||||
nTopRow = nNewTopRow;
|
||||
|
||||
if ( GetUpdateMode() )
|
||||
@@ -1050,7 +1050,7 @@ tools::Long BrowseBox::ScrollRows( tools::Long nRows )
|
||||
}
|
||||
|
||||
|
||||
void BrowseBox::RowModified( tools::Long nRow, sal_uInt16 nColId )
|
||||
void BrowseBox::RowModified( sal_Int32 nRow, sal_uInt16 nColId )
|
||||
{
|
||||
|
||||
if ( !GetUpdateMode() )
|
||||
@@ -1075,7 +1075,7 @@ void BrowseBox::Clear()
|
||||
|
||||
// adjust the total number of rows
|
||||
DoHideCursor( "Clear" );
|
||||
tools::Long nOldRowCount = nRowCount;
|
||||
sal_Int32 nOldRowCount = nRowCount;
|
||||
nRowCount = 0;
|
||||
if(bMultiSelection)
|
||||
{
|
||||
@@ -1134,7 +1134,7 @@ void BrowseBox::Clear()
|
||||
);
|
||||
}
|
||||
|
||||
void BrowseBox::RowInserted( tools::Long nRow, tools::Long nNumRows, bool bDoPaint, bool bKeepSelection )
|
||||
void BrowseBox::RowInserted( sal_Int32 nRow, sal_Int32 nNumRows, bool bDoPaint, bool bKeepSelection )
|
||||
{
|
||||
|
||||
if (nRow < 0)
|
||||
@@ -1152,7 +1152,7 @@ void BrowseBox::RowInserted( tools::Long nRow, tools::Long nNumRows, bool bDoPai
|
||||
DoHideCursor( "RowInserted" );
|
||||
|
||||
// must we paint the new rows?
|
||||
tools::Long nOldCurRow = nCurRow;
|
||||
sal_Int32 nOldCurRow = nCurRow;
|
||||
Size aSz = pDataWin->GetOutputSizePixel();
|
||||
if ( bDoPaint && nRow >= nTopRow &&
|
||||
nRow <= nTopRow + aSz.Height() / GetDataRowHeight() )
|
||||
@@ -1241,7 +1241,7 @@ void BrowseBox::RowInserted( tools::Long nRow, tools::Long nNumRows, bool bDoPai
|
||||
}
|
||||
|
||||
|
||||
void BrowseBox::RowRemoved( tools::Long nRow, tools::Long nNumRows, bool bDoPaint )
|
||||
void BrowseBox::RowRemoved( sal_Int32 nRow, sal_Int32 nNumRows, bool bDoPaint )
|
||||
{
|
||||
|
||||
if ( nRow < 0 )
|
||||
@@ -1266,7 +1266,7 @@ void BrowseBox::RowRemoved( tools::Long nRow, tools::Long nNumRows, bool bDoPain
|
||||
// adjust total row count
|
||||
nRowCount -= nNumRows;
|
||||
if (nRowCount < 0) nRowCount = 0;
|
||||
tools::Long nOldCurRow = nCurRow;
|
||||
sal_Int32 nOldCurRow = nCurRow;
|
||||
|
||||
// adjust the selection
|
||||
if ( bMultiSelection )
|
||||
@@ -1412,16 +1412,15 @@ void BrowseBox::RowRemoved( tools::Long nRow, tools::Long nNumRows, bool bDoPain
|
||||
}
|
||||
|
||||
|
||||
bool BrowseBox::GoToRow( tools::Long nRow)
|
||||
bool BrowseBox::GoToRow( sal_Int32 nRow)
|
||||
{
|
||||
return GoToRow(nRow, false);
|
||||
}
|
||||
|
||||
|
||||
bool BrowseBox::GoToRow( tools::Long nRow, bool bRowColMove, bool bKeepSelection )
|
||||
bool BrowseBox::GoToRow( sal_Int32 nRow, bool bRowColMove, bool bKeepSelection )
|
||||
{
|
||||
|
||||
tools::Long nOldCurRow = nCurRow;
|
||||
sal_Int32 nOldCurRow = nCurRow;
|
||||
|
||||
// nothing to do?
|
||||
if ( nRow == nCurRow && ( bMultiSelection || uRow.nSel == nRow ) )
|
||||
@@ -1438,7 +1437,7 @@ bool BrowseBox::GoToRow( tools::Long nRow, bool bRowColMove, bool bKeepSelection
|
||||
// compute the last visible row
|
||||
Size aSz( pDataWin->GetSizePixel() );
|
||||
sal_uInt16 nVisibleRows = sal_uInt16( aSz.Height() / GetDataRowHeight() - 1 );
|
||||
tools::Long nLastRow = nTopRow + nVisibleRows;
|
||||
sal_Int32 nLastRow = nTopRow + nVisibleRows;
|
||||
|
||||
// suspend Updates
|
||||
pDataWin->EnterUpdateLock();
|
||||
@@ -1566,7 +1565,7 @@ bool BrowseBox::GoToColumnId( sal_uInt16 nColId, bool bMakeVisible, bool bRowCol
|
||||
}
|
||||
|
||||
|
||||
bool BrowseBox::GoToRowColumnId( tools::Long nRow, sal_uInt16 nColId )
|
||||
bool BrowseBox::GoToRowColumnId( sal_Int32 nRow, sal_uInt16 nColId )
|
||||
{
|
||||
|
||||
// out of range?
|
||||
@@ -1659,7 +1658,7 @@ void BrowseBox::SelectAll()
|
||||
tools::Rectangle aHighlightRect;
|
||||
sal_uInt16 nVisibleRows =
|
||||
static_cast<sal_uInt16>(pDataWin->GetOutputSizePixel().Height() / GetDataRowHeight() + 1);
|
||||
for ( tools::Long nRow = std::max<tools::Long>( nTopRow, uRow.pSel->FirstSelected() );
|
||||
for ( sal_Int32 nRow = std::max<sal_Int32>( nTopRow, uRow.pSel->FirstSelected() );
|
||||
nRow != BROWSER_ENDOFSELECTION && nRow < nTopRow + nVisibleRows;
|
||||
nRow = uRow.pSel->NextSelected() )
|
||||
aHighlightRect.Union( tools::Rectangle(
|
||||
@@ -1700,7 +1699,7 @@ void BrowseBox::SelectAll()
|
||||
}
|
||||
|
||||
|
||||
void BrowseBox::SelectRow( tools::Long nRow, bool _bSelect, bool bExpand )
|
||||
void BrowseBox::SelectRow( sal_Int32 nRow, bool _bSelect, bool bExpand )
|
||||
{
|
||||
|
||||
if ( !bMultiSelection )
|
||||
@@ -1772,7 +1771,7 @@ void BrowseBox::SelectRow( tools::Long nRow, bool _bSelect, bool bExpand )
|
||||
}
|
||||
|
||||
|
||||
tools::Long BrowseBox::GetSelectRowCount() const
|
||||
sal_Int32 BrowseBox::GetSelectRowCount() const
|
||||
{
|
||||
|
||||
return bMultiSelection ? uRow.pSel->GetSelectCount() :
|
||||
@@ -1853,34 +1852,34 @@ sal_uInt16 BrowseBox::GetSelectColumnCount() const
|
||||
}
|
||||
|
||||
|
||||
tools::Long BrowseBox::FirstSelectedColumn( ) const
|
||||
sal_Int32 BrowseBox::FirstSelectedColumn( ) const
|
||||
{
|
||||
return pColSel ? pColSel->FirstSelected() : BROWSER_ENDOFSELECTION;
|
||||
}
|
||||
|
||||
|
||||
tools::Long BrowseBox::FirstSelectedRow()
|
||||
sal_Int32 BrowseBox::FirstSelectedRow()
|
||||
{
|
||||
|
||||
return bMultiSelection ? uRow.pSel->FirstSelected() : uRow.nSel;
|
||||
}
|
||||
|
||||
|
||||
tools::Long BrowseBox::NextSelectedRow()
|
||||
sal_Int32 BrowseBox::NextSelectedRow()
|
||||
{
|
||||
|
||||
return bMultiSelection ? uRow.pSel->NextSelected() : BROWSER_ENDOFSELECTION;
|
||||
}
|
||||
|
||||
|
||||
tools::Long BrowseBox::LastSelectedRow()
|
||||
sal_Int32 BrowseBox::LastSelectedRow()
|
||||
{
|
||||
|
||||
return bMultiSelection ? uRow.pSel->LastSelected() : uRow.nSel;
|
||||
}
|
||||
|
||||
|
||||
bool BrowseBox::IsRowSelected( tools::Long nRow ) const
|
||||
bool BrowseBox::IsRowSelected( sal_Int32 nRow ) const
|
||||
{
|
||||
|
||||
return bMultiSelection ? uRow.pSel->IsSelected(nRow) : nRow == uRow.nSel;
|
||||
@@ -1897,7 +1896,7 @@ bool BrowseBox::IsColumnSelected( sal_uInt16 nColumnId ) const
|
||||
|
||||
void BrowseBox::MakeFieldVisible
|
||||
(
|
||||
tools::Long nRow, // line number of the field (starting with 0)
|
||||
sal_Int32 nRow, // line number of the field (starting with 0)
|
||||
sal_uInt16 nColId // column ID of the field
|
||||
)
|
||||
|
||||
@@ -1948,7 +1947,7 @@ void BrowseBox::MakeFieldVisible
|
||||
ScrollRows( nRow - nTopRow );
|
||||
|
||||
// positioned outside below?
|
||||
tools::Long nBottomRow = nTopRow + GetVisibleRows();
|
||||
sal_Int32 nBottomRow = nTopRow + GetVisibleRows();
|
||||
// decrement nBottomRow to make it the number of the last visible line
|
||||
// (count starts with 0!).
|
||||
// Example: BrowseBox contains exactly one entry. nBottomRow := 0 + 1 - 1
|
||||
@@ -1961,7 +1960,7 @@ void BrowseBox::MakeFieldVisible
|
||||
}
|
||||
|
||||
|
||||
bool BrowseBox::IsFieldVisible( tools::Long nRow, sal_uInt16 nColumnId,
|
||||
bool BrowseBox::IsFieldVisible( sal_Int32 nRow, sal_uInt16 nColumnId,
|
||||
bool bCompletely ) const
|
||||
{
|
||||
|
||||
@@ -1986,7 +1985,7 @@ bool BrowseBox::IsFieldVisible( tools::Long nRow, sal_uInt16 nColumnId,
|
||||
}
|
||||
|
||||
|
||||
tools::Rectangle BrowseBox::GetFieldRectPixel( tools::Long nRow, sal_uInt16 nColumnId,
|
||||
tools::Rectangle BrowseBox::GetFieldRectPixel( sal_Int32 nRow, sal_uInt16 nColumnId,
|
||||
bool bRelToBrowser) const
|
||||
{
|
||||
|
||||
@@ -2007,7 +2006,7 @@ tools::Rectangle BrowseBox::GetFieldRectPixel( tools::Long nRow, sal_uInt16 nCol
|
||||
}
|
||||
|
||||
|
||||
tools::Rectangle BrowseBox::GetRowRectPixel( tools::Long nRow ) const
|
||||
tools::Rectangle BrowseBox::GetRowRectPixel( sal_Int32 nRow ) const
|
||||
{
|
||||
|
||||
// get the rectangle relative to DataWin
|
||||
@@ -2031,7 +2030,7 @@ tools::Rectangle BrowseBox::GetRowRectPixel( tools::Long nRow ) const
|
||||
}
|
||||
|
||||
|
||||
tools::Rectangle BrowseBox::ImplFieldRectPixel( tools::Long nRow, sal_uInt16 nColumnId ) const
|
||||
tools::Rectangle BrowseBox::ImplFieldRectPixel( sal_Int32 nRow, sal_uInt16 nColumnId ) const
|
||||
{
|
||||
|
||||
// compute the X-coordinate relative to DataWin by accumulation
|
||||
@@ -2061,7 +2060,7 @@ tools::Rectangle BrowseBox::ImplFieldRectPixel( tools::Long nRow, sal_uInt16 nCo
|
||||
}
|
||||
|
||||
|
||||
tools::Long BrowseBox::GetRowAtYPosPixel( tools::Long nY, bool bRelToBrowser ) const
|
||||
sal_Int32 BrowseBox::GetRowAtYPosPixel( tools::Long nY, bool bRelToBrowser ) const
|
||||
{
|
||||
|
||||
// compute the Y-coordinate
|
||||
@@ -2238,7 +2237,7 @@ void BrowseBox::SetMode( BrowserMode nMode )
|
||||
}
|
||||
|
||||
|
||||
void BrowseBox::VisibleRowsChanged( tools::Long, sal_uInt16 )
|
||||
void BrowseBox::VisibleRowsChanged( sal_Int32, sal_uInt16 )
|
||||
{
|
||||
|
||||
// old behavior: automatically correct NumRows:
|
||||
@@ -2253,7 +2252,7 @@ void BrowseBox::VisibleRowsChanged( tools::Long, sal_uInt16 )
|
||||
}
|
||||
|
||||
|
||||
bool BrowseBox::IsCursorMoveAllowed( tools::Long, sal_uInt16 ) const
|
||||
bool BrowseBox::IsCursorMoveAllowed( sal_Int32, sal_uInt16 ) const
|
||||
|
||||
/* [Description]
|
||||
|
||||
|
||||
@@ -242,18 +242,18 @@ void BrowseBox::ToggleSelection()
|
||||
|
||||
// accumulate areas of rows to highlight
|
||||
std::vector<tools::Rectangle> aHighlightList;
|
||||
tools::Long nLastRowInRect = 0; // for the CFront
|
||||
sal_Int32 nLastRowInRect = 0; // for the CFront
|
||||
|
||||
// don't highlight handle column
|
||||
BrowserColumn *pFirstCol = mvCols.empty() ? nullptr : mvCols[ 0 ].get();
|
||||
tools::Long nOfsX = (!pFirstCol || pFirstCol->GetId()) ? 0 : pFirstCol->Width();
|
||||
|
||||
// accumulate old row selection
|
||||
tools::Long nBottomRow = nTopRow +
|
||||
sal_Int32 nBottomRow = nTopRow +
|
||||
pDataWin->GetOutputSizePixel().Height() / GetDataRowHeight();
|
||||
if ( nBottomRow > GetRowCount() && GetRowCount() )
|
||||
nBottomRow = GetRowCount();
|
||||
for ( tools::Long nRow = bMultiSelection ? uRow.pSel->FirstSelected() : uRow.nSel;
|
||||
for ( sal_Int32 nRow = bMultiSelection ? uRow.pSel->FirstSelected() : uRow.nSel;
|
||||
nRow != BROWSER_ENDOFSELECTION && nRow <= nBottomRow;
|
||||
nRow = bMultiSelection ? uRow.pSel->NextSelected() : BROWSER_ENDOFSELECTION )
|
||||
{
|
||||
@@ -1049,7 +1049,7 @@ void BrowseBox::UpdateScrollbars()
|
||||
nCornerSize = static_cast<sal_uLong>(nCornerSize * static_cast<double>(GetZoom()));
|
||||
|
||||
bool bNeedsVScroll = false;
|
||||
tools::Long nMaxRows = 0;
|
||||
sal_Int32 nMaxRows = 0;
|
||||
if (GetDataRowHeight())
|
||||
{
|
||||
// needs VScroll?
|
||||
@@ -1134,7 +1134,7 @@ void BrowseBox::UpdateScrollbars()
|
||||
|
||||
if ( pVScroll->GetThumbPos() != nTopRow )
|
||||
pVScroll->SetThumbPos( nTopRow );
|
||||
tools::Long nVisibleSize = std::min( std::min( nRowCount, nMaxRows ), tools::Long(nRowCount-nTopRow) );
|
||||
tools::Long nVisibleSize = std::min( std::min( nRowCount, nMaxRows ), (nRowCount-nTopRow) );
|
||||
pVScroll->SetVisibleSize( nVisibleSize ? nVisibleSize : 1 );
|
||||
pVScroll->SetRange( Range( 0, nRowCount ) );
|
||||
pVScroll->SetPosSizePixel(
|
||||
@@ -1712,7 +1712,7 @@ void BrowseBox::Dispatch( sal_uInt16 nId )
|
||||
if ( GetRowCount() )
|
||||
{
|
||||
DoHideCursor( "BROWSER_SELECTHOME" );
|
||||
for ( tools::Long nRow = GetCurRow(); nRow >= 0; --nRow )
|
||||
for ( sal_Int32 nRow = GetCurRow(); nRow >= 0; --nRow )
|
||||
SelectRow( nRow );
|
||||
GoToRow( 0, true );
|
||||
DoShowCursor( "BROWSER_SELECTHOME" );
|
||||
@@ -1722,8 +1722,8 @@ void BrowseBox::Dispatch( sal_uInt16 nId )
|
||||
if ( GetRowCount() )
|
||||
{
|
||||
DoHideCursor( "BROWSER_SELECTEND" );
|
||||
tools::Long nRows = GetRowCount();
|
||||
for ( tools::Long nRow = GetCurRow(); nRow < nRows; ++nRow )
|
||||
sal_Int32 nRows = GetRowCount();
|
||||
for ( sal_Int32 nRow = GetCurRow(); nRow < nRows; ++nRow )
|
||||
SelectRow( nRow );
|
||||
GoToRow( GetRowCount() - 1, true );
|
||||
DoShowCursor( "BROWSER_SELECTEND" );
|
||||
@@ -1735,7 +1735,7 @@ void BrowseBox::Dispatch( sal_uInt16 nId )
|
||||
{
|
||||
// deselect the current row, if it isn't the first
|
||||
// and there is no other selected row above
|
||||
tools::Long nRow = GetCurRow();
|
||||
sal_Int32 nRow = GetCurRow();
|
||||
bool bLocalSelect = ( !IsRowSelected( nRow ) ||
|
||||
GetSelectRowCount() == 1 || IsRowSelected( nRow - 1 ) );
|
||||
SelectRow( nRow, bLocalSelect );
|
||||
@@ -1752,7 +1752,7 @@ void BrowseBox::Dispatch( sal_uInt16 nId )
|
||||
{
|
||||
// deselect the current row, if it isn't the first
|
||||
// and there is no other selected row under
|
||||
tools::Long nRow = GetCurRow();
|
||||
sal_Int32 nRow = GetCurRow();
|
||||
bool bLocalSelect = ( !IsRowSelected( nRow ) ||
|
||||
GetSelectRowCount() == 1 || IsRowSelected( nRow + 1 ) );
|
||||
SelectRow( nCurRow, bLocalSelect );
|
||||
|
||||
@@ -236,7 +236,7 @@ OUString BrowseBox::GetAccessibleObjectName( ::vcl::AccessibleBrowseBoxObjType e
|
||||
aRetText = "TableCell";
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
aRetText += " ["
|
||||
+ OUString::number(sal_Int32(GetCurRow()))
|
||||
+ OUString::number(GetCurRow())
|
||||
+ ","
|
||||
+ OUString::number(sal_Int32(GetCurColumnId()))
|
||||
+ "]";
|
||||
@@ -249,7 +249,7 @@ OUString BrowseBox::GetAccessibleObjectName( ::vcl::AccessibleBrowseBoxObjType e
|
||||
}
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
aRetText += " ["
|
||||
+ OUString::number(sal_Int32(GetCurRow()))
|
||||
+ OUString::number(GetCurRow())
|
||||
+ ","
|
||||
+ OUString::number(sal_Int32(GetCurColumnId()))
|
||||
+ "]";
|
||||
@@ -259,7 +259,7 @@ OUString BrowseBox::GetAccessibleObjectName( ::vcl::AccessibleBrowseBoxObjType e
|
||||
aRetText = GetColumnDescription( sal_Int16( _nPosition ) );
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
aRetText += " ["
|
||||
+ OUString::number(sal_Int32(GetCurRow()))
|
||||
+ OUString::number(GetCurRow())
|
||||
+ ","
|
||||
+ OUString::number(sal_Int32(GetCurColumnId()))
|
||||
+ "]";
|
||||
@@ -395,7 +395,7 @@ void BrowseBox::GrabTableFocus()
|
||||
GrabFocus();
|
||||
}
|
||||
|
||||
OUString BrowseBox::GetCellText(tools::Long, sal_uInt16 ) const
|
||||
OUString BrowseBox::GetCellText(sal_Int32, sal_uInt16 ) const
|
||||
{
|
||||
SAL_WARN("svtools", "This method has to be implemented by the derived classes! BUG!!");
|
||||
return OUString();
|
||||
@@ -459,7 +459,7 @@ void BrowseBox::SelectColumn( sal_uInt16 _nColumn, bool _bSelect )
|
||||
SelectColumnPos( _nColumn, _bSelect );
|
||||
}
|
||||
|
||||
bool BrowseBox::IsColumnSelected( tools::Long _nColumn ) const
|
||||
bool BrowseBox::IsColumnSelected( sal_Int32 _nColumn ) const
|
||||
{
|
||||
return ( pColSel && (0 <= _nColumn) && (_nColumn <= 0xFFF) ) &&
|
||||
pColSel->IsSelected( static_cast< sal_uInt16 >( _nColumn ) );
|
||||
@@ -520,7 +520,7 @@ bool BrowseBox::IsCellVisible( sal_Int32 _nRow, sal_uInt16 _nColumnPos ) const
|
||||
return IsFieldVisible( _nRow, GetColumnId( _nColumnPos ) );
|
||||
}
|
||||
|
||||
OUString BrowseBox::GetAccessibleCellText(tools::Long _nRow, sal_uInt16 _nColPos) const
|
||||
OUString BrowseBox::GetAccessibleCellText(sal_Int32 _nRow, sal_uInt16 _nColPos) const
|
||||
{
|
||||
return GetCellText( _nRow, GetColumnId( _nColPos ) );
|
||||
}
|
||||
|
||||
@@ -298,10 +298,10 @@ BrowseEvent BrowserDataWin::CreateBrowseEvent( const Point& rPosPixel )
|
||||
BrowseBox *pBox = GetParent();
|
||||
|
||||
// seek to row under mouse
|
||||
tools::Long nRelRow = rPosPixel.Y() < 0
|
||||
sal_Int32 nRelRow = rPosPixel.Y() < 0
|
||||
? -1
|
||||
: rPosPixel.Y() / pBox->GetDataRowHeight();
|
||||
tools::Long nRow = nRelRow < 0 ? -1 : nRelRow + pBox->nTopRow;
|
||||
sal_Int32 nRow = nRelRow < 0 ? -1 : nRelRow + pBox->nTopRow;
|
||||
|
||||
// find column under mouse
|
||||
tools::Long nMouseX = rPosPixel.X();
|
||||
@@ -376,7 +376,7 @@ void BrowserDataWin::Command( const CommandEvent& rEvt )
|
||||
return;
|
||||
|
||||
Point aEventPos( rEvt.GetMousePosPixel() );
|
||||
tools::Long nRow = pBox->GetRowAtYPosPixel( aEventPos.Y(), false);
|
||||
sal_Int32 nRow = pBox->GetRowAtYPosPixel( aEventPos.Y(), false);
|
||||
MouseEvent aMouseEvt( aEventPos, 1, MouseEventModifiers::SELECT, MOUSE_LEFT );
|
||||
if ( CommandEventId::ContextMenu == rEvt.GetCommand() && rEvt.IsMouseEvent() &&
|
||||
nRow < pBox->GetRowCount() && !pBox->IsRowSelected(nRow) )
|
||||
@@ -574,7 +574,7 @@ void BrowserDataWin::RequestHelp( const HelpEvent& rHEvt )
|
||||
|
||||
|
||||
BrowseEvent::BrowseEvent( vcl::Window* pWindow,
|
||||
tools::Long nAbsRow, sal_uInt16 nColumn, sal_uInt16 nColumnId,
|
||||
sal_Int32 nAbsRow, sal_uInt16 nColumn, sal_uInt16 nColumnId,
|
||||
const tools::Rectangle& rRect ):
|
||||
pWin(pWindow),
|
||||
nRow(nAbsRow),
|
||||
@@ -594,7 +594,7 @@ BrowserMouseEvent::BrowserMouseEvent( BrowserDataWin *pWindow,
|
||||
|
||||
|
||||
BrowserMouseEvent::BrowserMouseEvent( vcl::Window *pWindow, const MouseEvent& rEvt,
|
||||
tools::Long nAbsRow, sal_uInt16 nColumn, sal_uInt16 nColumnId,
|
||||
sal_Int32 nAbsRow, sal_uInt16 nColumn, sal_uInt16 nColumnId,
|
||||
const tools::Rectangle& rRect ):
|
||||
MouseEvent(rEvt),
|
||||
BrowseEvent( pWindow, nAbsRow, nColumn, nColumnId, rRect )
|
||||
|
||||
@@ -196,7 +196,7 @@ namespace svt
|
||||
}
|
||||
|
||||
|
||||
bool EditBrowseBox::SeekRow(tools::Long nRow)
|
||||
bool EditBrowseBox::SeekRow(sal_Int32 nRow)
|
||||
{
|
||||
nPaintRow = nRow;
|
||||
return true;
|
||||
@@ -364,7 +364,7 @@ namespace svt
|
||||
}
|
||||
|
||||
|
||||
EditBrowseBox::RowStatus EditBrowseBox::GetRowStatus(tools::Long) const
|
||||
EditBrowseBox::RowStatus EditBrowseBox::GetRowStatus(sal_Int32) const
|
||||
{
|
||||
return CLEAN;
|
||||
}
|
||||
@@ -770,7 +770,7 @@ namespace svt
|
||||
}
|
||||
|
||||
|
||||
bool EditBrowseBox::IsCursorMoveAllowed(tools::Long nNewRow, sal_uInt16 nNewColId) const
|
||||
bool EditBrowseBox::IsCursorMoveAllowed(sal_Int32 nNewRow, sal_uInt16 nNewColId) const
|
||||
{
|
||||
sal_uInt16 nInfo = 0;
|
||||
|
||||
@@ -874,7 +874,7 @@ namespace svt
|
||||
}
|
||||
|
||||
|
||||
bool EditBrowseBox::CursorMoving(tools::Long, sal_uInt16)
|
||||
bool EditBrowseBox::CursorMoving(sal_Int32, sal_uInt16)
|
||||
{
|
||||
DeactivateCell(false);
|
||||
return true;
|
||||
@@ -883,7 +883,7 @@ namespace svt
|
||||
|
||||
void EditBrowseBox::CursorMoved()
|
||||
{
|
||||
tools::Long nNewRow = GetCurRow();
|
||||
sal_Int32 nNewRow = GetCurRow();
|
||||
if (nEditRow != nNewRow)
|
||||
{
|
||||
if (!(GetBrowserFlags() & EditBrowseBoxFlags::NO_HANDLE_COLUMN_CONTENT))
|
||||
@@ -909,7 +909,7 @@ namespace svt
|
||||
}
|
||||
|
||||
|
||||
void EditBrowseBox::ActivateCell(tools::Long nRow, sal_uInt16 nCol, bool bCellFocus)
|
||||
void EditBrowseBox::ActivateCell(sal_Int32 nRow, sal_uInt16 nCol, bool bCellFocus)
|
||||
{
|
||||
if (IsEditing())
|
||||
return;
|
||||
@@ -992,7 +992,7 @@ namespace svt
|
||||
}
|
||||
|
||||
|
||||
tools::Rectangle EditBrowseBox::GetCellRect(tools::Long nRow, sal_uInt16 nColId, bool bRel) const
|
||||
tools::Rectangle EditBrowseBox::GetCellRect(sal_Int32 nRow, sal_uInt16 nColId, bool bRel) const
|
||||
{
|
||||
tools::Rectangle aRect( GetFieldRectPixel(nRow, nColId, bRel));
|
||||
if ((GetMode() & BrowserMode::CURSOR_WO_FOCUS) == BrowserMode::CURSOR_WO_FOCUS)
|
||||
@@ -1102,7 +1102,7 @@ namespace svt
|
||||
{
|
||||
}
|
||||
|
||||
CellController* EditBrowseBox::GetController(tools::Long, sal_uInt16)
|
||||
CellController* EditBrowseBox::GetController(sal_Int32, sal_uInt16)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
@@ -1122,7 +1122,7 @@ namespace svt
|
||||
rControl.SetPosSizePixel(aPoint, aSize);
|
||||
}
|
||||
|
||||
void EditBrowseBox::InitController(CellControllerRef&, tools::Long, sal_uInt16)
|
||||
void EditBrowseBox::InitController(CellControllerRef&, sal_Int32, sal_uInt16)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1152,8 +1152,8 @@ namespace svt
|
||||
sal_uInt32 nCurColWidth = GetColumnWidth(nColId);
|
||||
sal_uInt32 nMinColWidth = CalcZoom(20); // minimum
|
||||
sal_uInt32 nNewColWidth = nMinColWidth;
|
||||
tools::Long nMaxRows = std::min(tools::Long(GetVisibleRows()), GetRowCount());
|
||||
tools::Long nLastVisRow = GetTopRow() + nMaxRows - 1;
|
||||
sal_Int32 nMaxRows = std::min(sal_Int32(GetVisibleRows()), GetRowCount());
|
||||
sal_Int32 nLastVisRow = GetTopRow() + nMaxRows - 1;
|
||||
|
||||
if (GetTopRow() <= nLastVisRow) // calc the column with using the cell contents
|
||||
{
|
||||
@@ -1168,7 +1168,7 @@ namespace svt
|
||||
return nNewColWidth;
|
||||
}
|
||||
|
||||
sal_uInt32 EditBrowseBox::GetTotalCellWidth(tools::Long, sal_uInt16)
|
||||
sal_uInt32 EditBrowseBox::GetTotalCellWidth(sal_Int32, sal_uInt16)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace svt
|
||||
using namespace ::com::sun::star::accessibility::AccessibleEventId;
|
||||
|
||||
|
||||
Reference< XAccessible > EditBrowseBox::CreateAccessibleCheckBoxCell(tools::Long _nRow, sal_uInt16 _nColumnPos,const TriState& eState)
|
||||
Reference< XAccessible > EditBrowseBox::CreateAccessibleCheckBoxCell(sal_Int32 _nRow, sal_uInt16 _nColumnPos,const TriState& eState)
|
||||
{
|
||||
Reference< XAccessible > xAccessible( GetAccessible() );
|
||||
Reference< XAccessibleContext > xAccContext;
|
||||
@@ -143,7 +143,7 @@ void EditBrowseBox::DetermineFocus( const GetFocusFlags _nGetFocusFlags )
|
||||
)
|
||||
return;
|
||||
|
||||
tools::Long nRows = GetRowCount();
|
||||
sal_Int32 nRows = GetRowCount();
|
||||
sal_uInt16 nCols = ColCount();
|
||||
|
||||
if (( nRows <= 0 ) || ( nCols <= 0 ))
|
||||
|
||||
@@ -540,13 +540,13 @@ namespace svt::table
|
||||
}
|
||||
|
||||
|
||||
tools::Long TableControl::GetRowCount() const
|
||||
sal_Int32 TableControl::GetRowCount() const
|
||||
{
|
||||
return GetModel()->getRowCount();
|
||||
}
|
||||
|
||||
|
||||
tools::Long TableControl::GetColumnCount() const
|
||||
sal_Int32 TableControl::GetColumnCount() const
|
||||
{
|
||||
return GetModel()->getColumnCount();
|
||||
}
|
||||
|
||||
@@ -1590,7 +1590,7 @@ void DbGridControl::ColumnMoved(sal_uInt16 nId)
|
||||
m_aColumns.insert( m_aColumns.begin() + nNewModelPos, std::move(temp) );
|
||||
}
|
||||
|
||||
bool DbGridControl::SeekRow(tools::Long nRow)
|
||||
bool DbGridControl::SeekRow(sal_Int32 nRow)
|
||||
{
|
||||
// in filter mode or in insert only mode we don't have any cursor!
|
||||
if ( !SeekCursor( nRow ) )
|
||||
@@ -1623,12 +1623,12 @@ bool DbGridControl::SeekRow(tools::Long nRow)
|
||||
}
|
||||
|
||||
// Is called whenever the visible amount of data changes
|
||||
void DbGridControl::VisibleRowsChanged( tools::Long nNewTopRow, sal_uInt16 nLinesOnScreen )
|
||||
void DbGridControl::VisibleRowsChanged( sal_Int32 nNewTopRow, sal_uInt16 nLinesOnScreen )
|
||||
{
|
||||
RecalcRows(nNewTopRow, nLinesOnScreen, false);
|
||||
}
|
||||
|
||||
void DbGridControl::RecalcRows(tools::Long nNewTopRow, sal_uInt16 nLinesOnScreen, bool bUpdateCursor)
|
||||
void DbGridControl::RecalcRows(sal_Int32 nNewTopRow, sal_uInt16 nLinesOnScreen, bool bUpdateCursor)
|
||||
{
|
||||
// If no cursor -> no rows in the browser.
|
||||
if (!m_pSeekCursor)
|
||||
@@ -1684,7 +1684,7 @@ void DbGridControl::RecalcRows(tools::Long nNewTopRow, sal_uInt16 nLinesOnScreen
|
||||
EnablePaint(true);
|
||||
}
|
||||
|
||||
void DbGridControl::RowInserted(tools::Long nRow, tools::Long nNumRows, bool bDoPaint)
|
||||
void DbGridControl::RowInserted(sal_Int32 nRow, sal_Int32 nNumRows, bool bDoPaint)
|
||||
{
|
||||
if (!nNumRows)
|
||||
return;
|
||||
@@ -1704,7 +1704,7 @@ void DbGridControl::RowInserted(tools::Long nRow, tools::Long nNumRows, bool bDo
|
||||
m_aBar->InvalidateState(DbGridControlNavigationBarState::Count);
|
||||
}
|
||||
|
||||
void DbGridControl::RowRemoved(tools::Long nRow, tools::Long nNumRows, bool bDoPaint)
|
||||
void DbGridControl::RowRemoved(sal_Int32 nRow, sal_Int32 nNumRows, bool bDoPaint)
|
||||
{
|
||||
if (!nNumRows)
|
||||
return;
|
||||
@@ -1786,7 +1786,7 @@ void DbGridControl::AdjustRows()
|
||||
m_aBar->InvalidateState(DbGridControlNavigationBarState::Count);
|
||||
}
|
||||
|
||||
svt::EditBrowseBox::RowStatus DbGridControl::GetRowStatus(tools::Long nRow) const
|
||||
svt::EditBrowseBox::RowStatus DbGridControl::GetRowStatus(sal_Int32 nRow) const
|
||||
{
|
||||
if (IsFilterRow(nRow))
|
||||
return EditBrowseBox::FILTER;
|
||||
@@ -1829,7 +1829,7 @@ void DbGridControl::PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect,
|
||||
}
|
||||
}
|
||||
|
||||
bool DbGridControl::CursorMoving(tools::Long nNewRow, sal_uInt16 nNewCol)
|
||||
bool DbGridControl::CursorMoving(sal_Int32 nNewRow, sal_uInt16 nNewCol)
|
||||
{
|
||||
|
||||
DeactivateCell( false );
|
||||
@@ -1846,7 +1846,7 @@ bool DbGridControl::CursorMoving(tools::Long nNewRow, sal_uInt16 nNewCol)
|
||||
return EditBrowseBox::CursorMoving( nNewRow, nNewCol );
|
||||
}
|
||||
|
||||
bool DbGridControl::SetCurrent(tools::Long nNewRow)
|
||||
bool DbGridControl::SetCurrent(sal_Int32 nNewRow)
|
||||
{
|
||||
// Each movement of the datacursor must start with BeginCursorAction and end with
|
||||
// EndCursorAction to block all notifications during the movement
|
||||
@@ -2101,7 +2101,7 @@ sal_Int32 DbGridControl::AlignSeekCursor()
|
||||
return m_nSeekPos;
|
||||
}
|
||||
|
||||
bool DbGridControl::SeekCursor(tools::Long nRow, bool bAbsolute)
|
||||
bool DbGridControl::SeekCursor(sal_Int32 nRow, bool bAbsolute)
|
||||
{
|
||||
// position SeekCursor onto the data cursor, no data transmission
|
||||
|
||||
@@ -2267,7 +2267,7 @@ void DbGridControl::MoveToLast()
|
||||
|
||||
void DbGridControl::MoveToPrev()
|
||||
{
|
||||
tools::Long nNewRow = std::max(GetCurRow() - 1, 0L);
|
||||
sal_Int32 nNewRow = std::max(GetCurRow() - 1, sal_Int32(0));
|
||||
if (GetCurRow() != nNewRow)
|
||||
MoveToPosition(nNewRow);
|
||||
}
|
||||
@@ -2432,7 +2432,7 @@ void DbGridControl::SetFilterMode(bool bMode)
|
||||
setDataSource(Reference< XRowSet > ());
|
||||
}
|
||||
|
||||
OUString DbGridControl::GetCellText(tools::Long _nRow, sal_uInt16 _nColId) const
|
||||
OUString DbGridControl::GetCellText(sal_Int32 _nRow, sal_uInt16 _nColId) const
|
||||
{
|
||||
size_t Location = GetModelColumnPos( _nColId );
|
||||
DbGridColumn* pColumn = ( Location < m_aColumns.size() ) ? m_aColumns[ Location ].get() : nullptr;
|
||||
@@ -2451,7 +2451,7 @@ OUString DbGridControl::GetCurrentRowCellText(DbGridColumn const * pColumn,const
|
||||
return aText;
|
||||
}
|
||||
|
||||
sal_uInt32 DbGridControl::GetTotalCellWidth(tools::Long nRow, sal_uInt16 nColId)
|
||||
sal_uInt32 DbGridControl::GetTotalCellWidth(sal_Int32 nRow, sal_uInt16 nColId)
|
||||
{
|
||||
if (SeekRow(nRow))
|
||||
{
|
||||
@@ -2584,7 +2584,7 @@ void DbGridControl::copyCellText(sal_Int32 _nRow, sal_uInt16 _nColId)
|
||||
OStringTransfer::CopyString( GetCurrentRowCellText( pColumn,m_xPaintRow ), this );
|
||||
}
|
||||
|
||||
void DbGridControl::executeRowContextMenu( tools::Long _nRow, const Point& _rPreferredPos )
|
||||
void DbGridControl::executeRowContextMenu( sal_Int32 _nRow, const Point& _rPreferredPos )
|
||||
{
|
||||
VclBuilder aBuilder(nullptr, AllSettings::GetUIRootDir(), "svx/ui/rowsmenu.ui", "");
|
||||
VclPtr<PopupMenu> aContextMenu(aBuilder.get_menu("menu"));
|
||||
@@ -2661,7 +2661,7 @@ void DbGridControl::DeleteSelectedRows()
|
||||
return;
|
||||
}
|
||||
|
||||
CellController* DbGridControl::GetController(tools::Long /*nRow*/, sal_uInt16 nColumnId)
|
||||
CellController* DbGridControl::GetController(sal_Int32 /*nRow*/, sal_uInt16 nColumnId)
|
||||
{
|
||||
if (!IsValid(m_xCurrentRow) || !IsEnabled())
|
||||
return nullptr;
|
||||
@@ -2854,7 +2854,7 @@ void DbGridControl::resetCurrentRow()
|
||||
RowModified(GetCurRow()); // will update the current controller if affected
|
||||
}
|
||||
|
||||
void DbGridControl::RowModified( tools::Long nRow )
|
||||
void DbGridControl::RowModified( sal_Int32 nRow )
|
||||
{
|
||||
if (nRow == m_nCurrentPos && IsEditing())
|
||||
{
|
||||
@@ -2875,7 +2875,7 @@ bool DbGridControl::IsCurrentAppending() const
|
||||
return m_xCurrentRow.is() && m_xCurrentRow->IsNew();
|
||||
}
|
||||
|
||||
bool DbGridControl::IsInsertionRow(tools::Long nRow) const
|
||||
bool DbGridControl::IsInsertionRow(sal_Int32 nRow) const
|
||||
{
|
||||
return (m_nOptions & DbGridControlOptions::Insert) && m_nTotalCount >= 0 && (nRow == GetRowCount() - 1);
|
||||
}
|
||||
|
||||
+3
-3
@@ -405,7 +405,7 @@ class SW_DLLPUBLIC SwTableBox: public SwClient //Client of FrameFormat.
|
||||
|
||||
std::optional<Color> mxUserColor;
|
||||
std::optional<Color> mxNumFormatColor;
|
||||
tools::Long mnRowSpan;
|
||||
sal_Int32 mnRowSpan;
|
||||
bool mbDummyFlag;
|
||||
|
||||
/// Do we contain any direct formatting?
|
||||
@@ -484,8 +484,8 @@ public:
|
||||
void SetSaveUserColor(std::optional<Color> p ) { mxUserColor = p; }
|
||||
void SetSaveNumFormatColor( std::optional<Color> p ) { mxNumFormatColor = p; }
|
||||
|
||||
tools::Long getRowSpan() const;
|
||||
void setRowSpan( tools::Long nNewRowSpan );
|
||||
sal_Int32 getRowSpan() const;
|
||||
void setRowSpan( sal_Int32 nNewRowSpan );
|
||||
bool getDummyFlag() const;
|
||||
void setDummyFlag( bool bDummy );
|
||||
|
||||
|
||||
@@ -1583,11 +1583,11 @@ sal_Bool SAL_CALL SwAccessibleTable::selectColumn( sal_Int32 column )
|
||||
if( isAccessibleColumnSelected( column ) )
|
||||
return true;
|
||||
|
||||
tools::Long lRowCount = getAccessibleRowCount();
|
||||
sal_Int32 lRowCount = getAccessibleRowCount();
|
||||
|
||||
for(tools::Long lRow = 0; lRow < lRowCount; lRow ++)
|
||||
for(sal_Int32 lRow = 0; lRow < lRowCount; lRow ++)
|
||||
{
|
||||
tools::Long lChildIndex = getAccessibleIndex(lRow, column);
|
||||
sal_Int32 lChildIndex = getAccessibleIndex(lRow, column);
|
||||
selectAccessibleChild(lChildIndex);
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -1648,7 +1648,7 @@ static void lcl_CheckRowSpan( SwTable &rTable )
|
||||
SwTableLine* pLine = rTable.GetTabLines()[ nLineCount - nMaxSpan ];
|
||||
for( auto pBox : pLine->GetTabBoxes() )
|
||||
{
|
||||
tools::Long nRowSpan = pBox->getRowSpan();
|
||||
sal_Int32 nRowSpan = pBox->getRowSpan();
|
||||
if( nRowSpan > nMaxSpan )
|
||||
pBox->setRowSpan( nMaxSpan );
|
||||
else if( nRowSpan < nMinSpan )
|
||||
|
||||
@@ -2829,7 +2829,7 @@ void SwDoc::SetTabRows( const SwTabCols &rNew, bool bCurColOnly,
|
||||
if ( pContent && pContent->IsTextFrame() )
|
||||
{
|
||||
const SwTableBox* pBox = static_cast<const SwCellFrame*>(pFrame)->GetTabBox();
|
||||
const tools::Long nRowSpan = pBox->getRowSpan();
|
||||
const sal_Int32 nRowSpan = pBox->getRowSpan();
|
||||
if( nRowSpan > 0 ) // Not overlapped
|
||||
pTextFrame = static_cast<const SwTextFrame*>(pContent);
|
||||
if( nRowSpan < 2 ) // Not overlapping for row height
|
||||
|
||||
@@ -279,8 +279,8 @@ static void lcl_ChangeRowSpan( const SwTable& rTable, const tools::Long nDiff,
|
||||
const size_t nBoxCount = pLine->GetTabBoxes().size();
|
||||
for( size_t nCurrBox = 0; nCurrBox < nBoxCount; ++nCurrBox )
|
||||
{
|
||||
tools::Long nRowSpan = pLine->GetTabBoxes()[nCurrBox]->getRowSpan();
|
||||
tools::Long nAbsSpan = nRowSpan > 0 ? nRowSpan : -nRowSpan;
|
||||
sal_Int32 nRowSpan = pLine->GetTabBoxes()[nCurrBox]->getRowSpan();
|
||||
sal_Int32 nAbsSpan = nRowSpan > 0 ? nRowSpan : -nRowSpan;
|
||||
// Check if the last overlapped cell is above or below
|
||||
// the critical area
|
||||
if( nAbsSpan > nDistance )
|
||||
@@ -397,7 +397,7 @@ std::unique_ptr<SwBoxSelection> SwTable::CollectBoxSelection( const SwPaM& rPam
|
||||
OSL_ENSURE( pBox, "Missing table box" );
|
||||
tools::Long nLeft = nRight;
|
||||
nRight += pBox->GetFrameFormat()->GetFrameSize().GetWidth();
|
||||
tools::Long nRowSpan = pBox->getRowSpan();
|
||||
sal_Int32 nRowSpan = pBox->getRowSpan();
|
||||
if( nRight <= nMin )
|
||||
{
|
||||
if( nRight == nMin && nLeftSpanCnt )
|
||||
@@ -695,7 +695,7 @@ bool SwTable::NewInsertCol( SwDoc& rDoc, const SwSelBoxes& rBoxes,
|
||||
SwTableNode* pTableNd = GetTableNode();
|
||||
std::vector<SwTableBoxFormat*> aInsFormat( nCnt, nullptr );
|
||||
size_t nLastLine = SAL_MAX_SIZE;
|
||||
tools::Long nLastRowSpan = 1;
|
||||
sal_Int32 nLastRowSpan = 1;
|
||||
|
||||
for( size_t i = 0; i < m_aLines.size(); ++i )
|
||||
{
|
||||
@@ -707,7 +707,7 @@ bool SwTable::NewInsertCol( SwDoc& rDoc, const SwSelBoxes& rBoxes,
|
||||
++nInsPos;
|
||||
SwTableBoxFormat* pBoxFrameFormat = static_cast<SwTableBoxFormat*>(pBox->GetFrameFormat());
|
||||
::InsTableBox( rDoc, pTableNd, pLine, pBoxFrameFormat, pBox, nInsPos, nCnt );
|
||||
tools::Long nRowSpan = pBox->getRowSpan();
|
||||
sal_Int32 nRowSpan = pBox->getRowSpan();
|
||||
tools::Long nDiff = i - nLastLine;
|
||||
bool bNewSpan = false;
|
||||
if( nLastLine != SAL_MAX_SIZE && nDiff <= nLastRowSpan &&
|
||||
@@ -846,7 +846,7 @@ bool SwTable::PrepareMerge( const SwPaM& rPam, SwSelBoxes& rBoxes,
|
||||
// The number of lines in the selection rectangle: nLineCount
|
||||
const size_t nLineCount = pSel->maBoxes.size();
|
||||
// BTW: nLineCount is the rowspan of the new master cell
|
||||
tools::Long nRowSpan = static_cast<tools::Long>(nLineCount);
|
||||
sal_Int32 nRowSpan = static_cast<tools::Long>(nLineCount);
|
||||
// We will need the first and last line of the selection
|
||||
// to check if there any superfluous row after merging
|
||||
SwTableLine* pFirstLn = nullptr;
|
||||
@@ -1194,7 +1194,7 @@ void SwTable::InsertSpannedRow( SwDoc& rDoc, sal_uInt16 nRowIdx, sal_uInt16 nCnt
|
||||
SwTableLine *pNewLine = GetTabLines()[ nRowIdx + nCnt - n ];
|
||||
for( size_t nCurrBox = 0; nCurrBox < nBoxCount; ++nCurrBox )
|
||||
{
|
||||
tools::Long nRowSpan = rLine.GetTabBoxes()[nCurrBox]->getRowSpan();
|
||||
sal_Int32 nRowSpan = rLine.GetTabBoxes()[nCurrBox]->getRowSpan();
|
||||
if( nRowSpan > 0 )
|
||||
nRowSpan = - nRowSpan;
|
||||
pNewLine->GetTabBoxes()[ nCurrBox ]->setRowSpan( nRowSpan - n );
|
||||
@@ -1386,7 +1386,7 @@ static sal_uInt16 lcl_LineIndex( const SwTable& rTable, const SwSelBoxes& rBoxes
|
||||
{
|
||||
if( nPos > nDirect || nDirect == USHRT_MAX )
|
||||
nDirect = nPos;
|
||||
tools::Long nRowSpan = pBox->getRowSpan();
|
||||
sal_Int32 nRowSpan = pBox->getRowSpan();
|
||||
if( nRowSpan < 2 )
|
||||
nSpan = 0;
|
||||
else if( nSpan )
|
||||
@@ -1517,7 +1517,7 @@ bool SwTable::InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes,
|
||||
SwTableLine *pNewLine = GetTabLines()[ nRowIdx+nCnt-n-nOfs];
|
||||
for( size_t nCurrBox = 0; nCurrBox < nBoxCount; ++nCurrBox )
|
||||
{
|
||||
tools::Long nRowSpan = pLine->GetTabBoxes()[nCurrBox]->getRowSpan();
|
||||
sal_Int32 nRowSpan = pLine->GetTabBoxes()[nCurrBox]->getRowSpan();
|
||||
if( bBehind )
|
||||
{
|
||||
if( nRowSpan == 1 || nRowSpan == -1 )
|
||||
@@ -1576,7 +1576,7 @@ void SwTable::PrepareDelBoxes( const SwSelBoxes& rBoxes )
|
||||
for (size_t i = 0; i < rBoxes.size(); ++i)
|
||||
{
|
||||
SwTableBox* pBox = rBoxes[i];
|
||||
tools::Long nRowSpan = pBox->getRowSpan();
|
||||
sal_Int32 nRowSpan = pBox->getRowSpan();
|
||||
if( nRowSpan != 1 && pBox->GetFrameFormat()->GetFrameSize().GetWidth() )
|
||||
{
|
||||
tools::Long nLeft = lcl_Box2LeftBorder( *pBox );
|
||||
@@ -1647,7 +1647,7 @@ static void lcl_SearchSelBox( const SwTable &rTable, SwSelBoxes& rBoxes, tools::
|
||||
nRight - nMin > nMin - nLeft;
|
||||
else
|
||||
bAdd = nLeft <= nMid || nRight - nMax < nMax - nLeft;
|
||||
tools::Long nRowSpan = pBox->getRowSpan();
|
||||
sal_Int32 nRowSpan = pBox->getRowSpan();
|
||||
if( bAdd &&
|
||||
( !bChkProtected ||
|
||||
!pBox->GetFrameFormat()->GetProtect().IsContentProtected() ) )
|
||||
@@ -1920,7 +1920,7 @@ void SwTable::ExpandSelection( SwSelBoxes& rBoxes ) const
|
||||
for (size_t i = 0; i < rBoxes.size(); ++i)
|
||||
{
|
||||
SwTableBox *pBox = rBoxes[i];
|
||||
tools::Long nRowSpan = pBox->getRowSpan();
|
||||
sal_Int32 nRowSpan = pBox->getRowSpan();
|
||||
if( nRowSpan != 1 )
|
||||
{
|
||||
SwTableBox *pMasterBox = nRowSpan > 0 ? pBox
|
||||
@@ -2007,7 +2007,7 @@ SwSaveRowSpan::SwSaveRowSpan( SwTableBoxes& rBoxes, sal_uInt16 nSplitLn )
|
||||
{
|
||||
SwTableBox* pBox = rBoxes[nCurrCol];
|
||||
OSL_ENSURE( pBox, "Missing Table Box" );
|
||||
tools::Long nRowSp = pBox->getRowSpan();
|
||||
sal_Int32 nRowSp = pBox->getRowSpan();
|
||||
mnRowSpans[ nCurrCol ] = nRowSp;
|
||||
if( nRowSp < 0 )
|
||||
{
|
||||
@@ -2042,7 +2042,7 @@ void SwTable::RestoreRowSpan( const SwSaveRowSpan& rSave )
|
||||
{
|
||||
SwTableBox* pBox = pLine->GetTabBoxes()[nCurrCol];
|
||||
OSL_ENSURE( pBox, "Missing Table Box" );
|
||||
tools::Long nRowSp = pBox->getRowSpan();
|
||||
sal_Int32 nRowSp = pBox->getRowSpan();
|
||||
if( nRowSp != rSave.mnRowSpans[ nCurrCol ] )
|
||||
{
|
||||
OSL_ENSURE( -nRowSp == rSave.mnRowSpans[ nCurrCol ], "Pardon me?!" );
|
||||
@@ -2098,7 +2098,7 @@ void SwTable::CleanUpBottomRowSpan( sal_uInt16 nDelLines )
|
||||
{
|
||||
SwTableBox* pBox = pLine->GetTabBoxes()[nCurrCol];
|
||||
OSL_ENSURE( pBox, "Missing Table Box" );
|
||||
tools::Long nRowSp = pBox->getRowSpan();
|
||||
sal_Int32 nRowSp = pBox->getRowSpan();
|
||||
if( nRowSp < 0 )
|
||||
nRowSp = -nRowSp;
|
||||
if( nRowSp > 1 )
|
||||
@@ -2246,8 +2246,8 @@ void SwTable::ConvertSubtableBox(sal_uInt16 const nRow, sal_uInt16 const nBox)
|
||||
// -2 -> -(N+1) ; -N .. -2
|
||||
// 1 -> N ; -(N-1) .. -1
|
||||
// 2 -> N+1 ; -N .. -2
|
||||
tools::Long newSourceRowSpan(pSourceBox->getRowSpan());
|
||||
tools::Long newBoxRowSpan;
|
||||
sal_Int32 newSourceRowSpan(pSourceBox->getRowSpan());
|
||||
sal_Int32 newBoxRowSpan;
|
||||
if (newSourceRowSpan < 0)
|
||||
{
|
||||
newSourceRowSpan -= pSubTableBox->GetTabLines().size() - 1;
|
||||
@@ -2397,7 +2397,7 @@ namespace {
|
||||
|
||||
struct RowSpanCheck
|
||||
{
|
||||
tools::Long nRowSpan;
|
||||
sal_Int32 nRowSpan;
|
||||
SwTwips nLeft;
|
||||
SwTwips nRight;
|
||||
};
|
||||
@@ -2431,7 +2431,7 @@ void SwTable::CheckConsistency() const
|
||||
index = *index.GetNode().EndOfSectionNode();
|
||||
++index;
|
||||
SwTwips nNewWidth = pBox->GetFrameFormat()->GetFrameSize().GetWidth() + nWidth;
|
||||
tools::Long nRowSp = pBox->getRowSpan();
|
||||
sal_Int32 nRowSp = pBox->getRowSpan();
|
||||
if( nRowSp < 0 )
|
||||
{
|
||||
SAL_WARN_IF( aIter == aRowSpanCells.end(),
|
||||
|
||||
@@ -71,12 +71,12 @@ using namespace com::sun::star;
|
||||
static void ChgTextToNum( SwTableBox& rBox, const OUString& rText, const Color* pCol,
|
||||
bool bChgAlign, sal_uLong nNdPos );
|
||||
|
||||
tools::Long SwTableBox::getRowSpan() const
|
||||
sal_Int32 SwTableBox::getRowSpan() const
|
||||
{
|
||||
return mnRowSpan;
|
||||
}
|
||||
|
||||
void SwTableBox::setRowSpan( tools::Long nNewRowSpan )
|
||||
void SwTableBox::setRowSpan( sal_Int32 nNewRowSpan )
|
||||
{
|
||||
mnRowSpan = nNewRowSpan;
|
||||
}
|
||||
@@ -162,7 +162,7 @@ void InsTableBox( SwDoc& rDoc, SwTableNode* pTableNd,
|
||||
rDoc.GetDfltTextFormatColl(), nullptr,
|
||||
nInsPos, nCnt );
|
||||
|
||||
tools::Long nRowSpan = pBox->getRowSpan();
|
||||
sal_Int32 nRowSpan = pBox->getRowSpan();
|
||||
if( nRowSpan != 1 )
|
||||
{
|
||||
SwTableBoxes& rTableBoxes = pLine->GetTabBoxes();
|
||||
@@ -1048,7 +1048,7 @@ static void lcl_CalcNewWidths( std::vector<sal_uInt16> &rSpanPos, ChangeList& rC
|
||||
{
|
||||
SwTableBox* pBox = pLine->GetTabBoxes()[nCurrBox];
|
||||
SwTwips nCurrWidth = pBox->GetFrameFormat()->GetFrameSize().GetWidth();
|
||||
const tools::Long nRowSpan = pBox->getRowSpan();
|
||||
const sal_Int32 nRowSpan = pBox->getRowSpan();
|
||||
const bool bCurrRowSpan = bTop ? nRowSpan < 0 :
|
||||
( nRowSpan > 1 || nRowSpan < -1 );
|
||||
if( bRowSpan || bCurrRowSpan )
|
||||
|
||||
@@ -159,7 +159,7 @@ class SaveBox
|
||||
|
||||
SaveBox* pNext;
|
||||
sal_uLong nSttNode;
|
||||
tools::Long nRowSpan;
|
||||
sal_Int32 nRowSpan;
|
||||
sal_uInt16 nItemSet;
|
||||
union
|
||||
{
|
||||
|
||||
@@ -1604,7 +1604,7 @@ SwTableLine *HTMLTable::MakeTableLine( SwTableBox *pUpper,
|
||||
// The HTML tables represent a box. So we need to split behind that box
|
||||
nSplitCol = nCol + 1;
|
||||
|
||||
tools::Long nBoxRowSpan = rCell2.GetRowSpan();
|
||||
sal_Int32 nBoxRowSpan = rCell2.GetRowSpan();
|
||||
if (!rCell2.GetContents() || rCell2.IsCovered())
|
||||
{
|
||||
if (rCell2.IsCovered())
|
||||
|
||||
@@ -657,7 +657,7 @@ void SwWriteTable::FillTableRowsCols( tools::Long nStartRPos, sal_uInt16 nStartR
|
||||
sal_uInt16 nRowSpan = nRow - nOldRow + 1;
|
||||
|
||||
// The new table model may have true row span attributes
|
||||
const tools::Long nAttrRowSpan = pBox->getRowSpan();
|
||||
const sal_Int32 nAttrRowSpan = pBox->getRowSpan();
|
||||
if ( 1 < nAttrRowSpan )
|
||||
nRowSpan = static_cast<sal_uInt16>(nAttrRowSpan);
|
||||
else if ( nAttrRowSpan < 1 )
|
||||
|
||||
@@ -1103,7 +1103,7 @@ void WW8TableCellGrid::addShadowCells()
|
||||
bool bBeginningOfCell = true;
|
||||
bool bVertMerge = false;
|
||||
SwRect aRect = aCellIt->getRect();
|
||||
tools::Long nRowSpan = 1;
|
||||
sal_Int32 nRowSpan = 1;
|
||||
while (aCellIt != aCellEndIt)
|
||||
{
|
||||
WW8TableNodeInfo * pNodeInfo = aCellIt->getTableNodeInfo();
|
||||
|
||||
@@ -2783,7 +2783,7 @@ void WW8TabDesc::FinishSwTable()
|
||||
auto& rRow = groupIt->row(n);
|
||||
for (size_t i = 0; i<rRow.size(); ++i)
|
||||
{
|
||||
const tools::Long nRowSpanSet = (n == 0) && (i == 0) ?
|
||||
const sal_Int32 nRowSpanSet = (n == 0) && (i == 0) ?
|
||||
nRowSpan :
|
||||
(-1 * (nRowSpan - n));
|
||||
SwTableBox* pCurrentBox = rRow[i];
|
||||
|
||||
@@ -916,7 +916,7 @@ void SwXMLExport::ExportTableLine( const SwTableLine& rLine,
|
||||
const SwTableBox *pBox = rBoxes[nBox];
|
||||
|
||||
// NEW TABLES
|
||||
const tools::Long nRowSpan = pBox->getRowSpan();
|
||||
const sal_Int32 nRowSpan = pBox->getRowSpan();
|
||||
if( nRowSpan < 1 )
|
||||
{
|
||||
SvXMLElementExport aElem2( *this, rTableInfo.GetPrefix(),
|
||||
|
||||
@@ -2252,7 +2252,7 @@ SwTableLine *SwXMLTableContext::MakeTableLine( SwTableBox *pUpper,
|
||||
( pCell->GetStartNode() || pCell->GetSubTable() ) )
|
||||
{
|
||||
// insert new empty cell for covered cells:
|
||||
tools::Long nBoxRowSpan = 1;
|
||||
sal_Int32 nBoxRowSpan = 1;
|
||||
if ( !m_bHasSubTables )
|
||||
{
|
||||
nBoxRowSpan = pCell->GetRowSpan();
|
||||
|
||||
@@ -142,14 +142,14 @@ class SwEntryBrowseBox : public SwEntryBrowseBox_Base
|
||||
::svt::CellControllerRef m_xController;
|
||||
::svt::CellControllerRef m_xCheckController;
|
||||
|
||||
tools::Long m_nCurrentRow;
|
||||
sal_Int32 m_nCurrentRow;
|
||||
bool m_bModified;
|
||||
|
||||
protected:
|
||||
virtual bool SeekRow( tools::Long nRow ) override;
|
||||
virtual bool SeekRow( sal_Int32 nRow ) override;
|
||||
virtual void PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColId) const override;
|
||||
virtual void InitController(::svt::CellControllerRef& rController, tools::Long nRow, sal_uInt16 nCol) override;
|
||||
virtual ::svt::CellController* GetController(tools::Long nRow, sal_uInt16 nCol) override;
|
||||
virtual void InitController(::svt::CellControllerRef& rController, sal_Int32 nRow, sal_uInt16 nCol) override;
|
||||
virtual ::svt::CellController* GetController(sal_Int32 nRow, sal_uInt16 nCol) override;
|
||||
virtual bool SaveModified() override;
|
||||
|
||||
std::vector<tools::Long> GetOptimalColWidths() const;
|
||||
@@ -163,7 +163,7 @@ public:
|
||||
|
||||
bool IsModified()const override;
|
||||
|
||||
virtual OUString GetCellText( tools::Long nRow, sal_uInt16 nColumn ) const override;
|
||||
virtual OUString GetCellText( sal_Int32 nRow, sal_uInt16 nColumn ) const override;
|
||||
virtual void Resize() override;
|
||||
virtual Size GetOptimalSize() const override;
|
||||
};
|
||||
@@ -3670,13 +3670,13 @@ Size SwEntryBrowseBox::GetOptimalSize() const
|
||||
return aSize;
|
||||
}
|
||||
|
||||
bool SwEntryBrowseBox::SeekRow( tools::Long nRow )
|
||||
bool SwEntryBrowseBox::SeekRow( sal_Int32 nRow )
|
||||
{
|
||||
m_nCurrentRow = nRow;
|
||||
return true;
|
||||
}
|
||||
|
||||
OUString SwEntryBrowseBox::GetCellText(tools::Long nRow, sal_uInt16 nColumn) const
|
||||
OUString SwEntryBrowseBox::GetCellText(sal_Int32 nRow, sal_uInt16 nColumn) const
|
||||
{
|
||||
OUString pRet;
|
||||
if (o3tl::make_unsigned(nRow) < m_Entries.size())
|
||||
@@ -3703,7 +3703,7 @@ void SwEntryBrowseBox::PaintCell(OutputDevice& rDev,
|
||||
rDev.DrawText( rRect, GetCellText( m_nCurrentRow, nColumnId ), nStyle );
|
||||
}
|
||||
|
||||
::svt::CellController* SwEntryBrowseBox::GetController(tools::Long /*nRow*/, sal_uInt16 nCol)
|
||||
::svt::CellController* SwEntryBrowseBox::GetController(sal_Int32 /*nRow*/, sal_uInt16 nCol)
|
||||
{
|
||||
return nCol < ITEM_CASE ? m_xController.get() : m_xCheckController.get();
|
||||
}
|
||||
@@ -3754,7 +3754,7 @@ bool SwEntryBrowseBox::SaveModified()
|
||||
}
|
||||
|
||||
void SwEntryBrowseBox::InitController(
|
||||
::svt::CellControllerRef& rController, tools::Long nRow, sal_uInt16 nCol)
|
||||
::svt::CellControllerRef& rController, sal_Int32 nRow, sal_uInt16 nCol)
|
||||
{
|
||||
const OUString rText = GetCellText( nRow, nCol );
|
||||
if(nCol < ITEM_CASE)
|
||||
|
||||
@@ -1259,7 +1259,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
|
||||
static_cast<CreateMonitor*>(xProgressDlg.get())->SetTotalCount(nMaxDocs);
|
||||
}
|
||||
|
||||
tools::Long nStartRow, nEndRow;
|
||||
sal_Int32 nStartRow, nEndRow;
|
||||
bool bFreezedLayouts = false;
|
||||
// to collect temporary email files
|
||||
std::vector< OUString> aFilesToRemove;
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace sw::mark { class IMark; }
|
||||
struct SwDocMergeInfo
|
||||
{
|
||||
sw::mark::IMark* startPageInTarget;
|
||||
tools::Long nDBRow;
|
||||
sal_Int32 nDBRow;
|
||||
};
|
||||
|
||||
class SW_DLLPUBLIC SwMailMergeConfigItem
|
||||
|
||||
@@ -533,7 +533,7 @@ void SvHeaderTabListBox::RecalculateAccessibleChildren()
|
||||
}
|
||||
}
|
||||
|
||||
bool SvHeaderTabListBox::IsCellCheckBox( tools::Long _nRow, sal_uInt16 _nColumn, TriState& _rState )
|
||||
bool SvHeaderTabListBox::IsCellCheckBox( sal_Int32 _nRow, sal_uInt16 _nColumn, TriState& _rState )
|
||||
{
|
||||
bool bRet = false;
|
||||
SvTreeListEntry* pEntry = GetEntry( _nRow );
|
||||
@@ -557,7 +557,7 @@ bool SvHeaderTabListBox::IsCellCheckBox( tools::Long _nRow, sal_uInt16 _nColumn,
|
||||
}
|
||||
return bRet;
|
||||
}
|
||||
tools::Long SvHeaderTabListBox::GetRowCount() const
|
||||
sal_Int32 SvHeaderTabListBox::GetRowCount() const
|
||||
{
|
||||
return GetEntryCount();
|
||||
}
|
||||
@@ -622,7 +622,7 @@ void SvHeaderTabListBox::SelectAll()
|
||||
SvTreeListBox::SelectAll(true);
|
||||
}
|
||||
|
||||
void SvHeaderTabListBox::SelectRow( tools::Long _nRow, bool _bSelect, bool )
|
||||
void SvHeaderTabListBox::SelectRow( sal_Int32 _nRow, bool _bSelect, bool )
|
||||
{
|
||||
Select( GetEntry( _nRow ), _bSelect );
|
||||
}
|
||||
@@ -641,13 +641,13 @@ sal_Int32 SvHeaderTabListBox::GetSelectedColumnCount() const
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool SvHeaderTabListBox::IsRowSelected( tools::Long _nRow ) const
|
||||
bool SvHeaderTabListBox::IsRowSelected( sal_Int32 _nRow ) const
|
||||
{
|
||||
SvTreeListEntry* pEntry = GetEntry( _nRow );
|
||||
return ( pEntry && IsSelected( pEntry ) );
|
||||
}
|
||||
|
||||
bool SvHeaderTabListBox::IsColumnSelected( tools::Long ) const
|
||||
bool SvHeaderTabListBox::IsColumnSelected( sal_Int32 ) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -665,7 +665,7 @@ bool SvHeaderTabListBox::IsCellVisible( sal_Int32, sal_uInt16 ) const
|
||||
return true;
|
||||
}
|
||||
|
||||
OUString SvHeaderTabListBox::GetAccessibleCellText( tools::Long _nRow, sal_uInt16 _nColumnPos ) const
|
||||
OUString SvHeaderTabListBox::GetAccessibleCellText( sal_Int32 _nRow, sal_uInt16 _nColumnPos ) const
|
||||
{
|
||||
return GetTabEntryText(_nRow, _nColumnPos);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user