diff options
author | Jacek Fraczek <fraczek.jacek@gmail.com> | 2016-10-05 22:00:51 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-10-10 08:48:30 +0000 |
commit | f004aa99514d385f3ee254bba735f5eaeb7d9ad8 (patch) | |
tree | aacd5792f553b8e9cbf029cc7e0797ed0dd423fe /svx/source/fmcomp/gridctrl.cxx | |
parent | 728c7327bd97602a38723553ed044ea4c01d13b2 (diff) |
tdf#89307: Removed SvRef::operator T*()
Conditional statements are using SvRef::Is() method.
Changed static_cast<T*>(svRef<T>) occurances to svRef.get().
Added operator == and != to SvRef.
SbxObject::Execute is using SbxVariableRef internally.
SbxObject::FindQualified is using SbxVariableRef internally.
Change-Id: I45b553e35d8fca9bf71163e6eefc60802a066395
Reviewed-on: https://gerrit.libreoffice.org/29621
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'svx/source/fmcomp/gridctrl.cxx')
-rw-r--r-- | svx/source/fmcomp/gridctrl.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index fdab1a3b2a1a..fbeec83f3213 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -1286,7 +1286,7 @@ void DbGridControl::EnableNavigationBar(bool bEnable) DbGridControlOptions DbGridControl::SetOptions(DbGridControlOptions nOpt) { - DBG_ASSERT(!m_xCurrentRow || !m_xCurrentRow->IsModified(), + DBG_ASSERT(!m_xCurrentRow.Is() || !m_xCurrentRow->IsModified(), "DbGridControl::SetOptions : please do not call when editing a record (things are much easier this way ;) !"); // for the next setDataSource (which is triggered by a refresh, for instance) @@ -2049,7 +2049,7 @@ void DbGridControl::PaintCell(OutputDevice& rDev, const Rectangle& rRect, sal_uI aArea.Top() += 1; aArea.Bottom() -= 1; } - pColumn->Paint(rDev, aArea, m_xPaintRow, getNumberFormatter()); + pColumn->Paint(rDev, aArea, m_xPaintRow.get(), getNumberFormatter()); } } @@ -2112,7 +2112,7 @@ bool DbGridControl::SetCurrent(long nNewRow) if ( !m_pSeekCursor->isBeforeFirst() && !m_pSeekCursor->isAfterLast() ) { Any aBookmark = m_pSeekCursor->getBookmark(); - if (!m_xCurrentRow || m_xCurrentRow->IsNew() || !CompareBookmark(aBookmark, m_pDataCursor->getBookmark())) + if (!m_xCurrentRow.Is() || m_xCurrentRow->IsNew() || !CompareBookmark(aBookmark, m_pDataCursor->getBookmark())) { // adjust the cursor to the new desired row if (!m_pDataCursor->moveToBookmark(aBookmark)) @@ -2247,7 +2247,7 @@ void DbGridControl::AdjustDataSource(bool bFull) m_xPaintRow = m_xSeekRow; // not up-to-date row, thus, adjust completely - if (!m_xCurrentRow) + if (!m_xCurrentRow.Is()) AdjustRows(); sal_Int32 nNewPos = AlignSeekCursor(); @@ -2676,7 +2676,7 @@ OUString DbGridControl::GetCurrentRowCellText(DbGridColumn* pColumn,const DbGrid // text output for a single row OUString aText; if ( pColumn && IsValid(_rRow) ) - aText = pColumn->GetCellText(_rRow, m_xFormatter); + aText = pColumn->GetCellText(_rRow.get(), m_xFormatter); return aText; } @@ -3611,7 +3611,7 @@ void DbGridControl::FieldValueChanged(sal_uInt16 _nId, const PropertyChangeEvent } // and finally do the update ... - pColumn->UpdateFromField(m_xCurrentRow, m_xFormatter); + pColumn->UpdateFromField(m_xCurrentRow.get(), m_xFormatter); RowModified(GetCurRow(), _nId); } } |