summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
authorJacek Fraczek <fraczek.jacek@gmail.com>2016-10-05 22:00:51 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-10-10 08:48:30 +0000
commitf004aa99514d385f3ee254bba735f5eaeb7d9ad8 (patch)
treeaacd5792f553b8e9cbf029cc7e0797ed0dd423fe /svx/source
parent728c7327bd97602a38723553ed044ea4c01d13b2 (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')
-rw-r--r--svx/source/dialog/charmap.cxx6
-rw-r--r--svx/source/fmcomp/fmgridif.cxx2
-rw-r--r--svx/source/fmcomp/gridctrl.cxx12
-rw-r--r--svx/source/gallery2/galtheme.cxx4
4 files changed, 12 insertions, 12 deletions
diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx
index caf0c31ef5d6..bcc7ceff90ef 100644
--- a/svx/source/dialog/charmap.cxx
+++ b/svx/source/dialog/charmap.cxx
@@ -655,8 +655,8 @@ void SvxShowCharSet::OutputIndex( int nNewIndex )
void SvxShowCharSet::SelectCharacter( sal_UCS4 cNew )
{
- if (mxFontCharMap == nullptr)
- RecalculateFont(*this);
+ if ( !mxFontCharMap.Is() )
+ RecalculateFont( *this );
// get next available char of current font
sal_UCS4 cNext = mxFontCharMap->GetNextChar( (cNew > 0) ? cNew - 1 : cNew );
@@ -1621,7 +1621,7 @@ void SubsetMap::InitList()
void SubsetMap::ApplyCharMap( const FontCharMapRef& rxFontCharMap )
{
- if( !rxFontCharMap )
+ if( !rxFontCharMap.Is() )
return;
// remove subsets that are not matched in any range
diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx
index a14585b6b967..c940c1435559 100644
--- a/svx/source/fmcomp/fmgridif.cxx
+++ b/svx/source/fmcomp/fmgridif.cxx
@@ -1332,7 +1332,7 @@ Sequence< Any > SAL_CALL FmXGridPeer::queryFieldData( sal_Int32 nRow, const Type
// Strings are dealt with directly by the GetFieldText
case TypeClass_STRING :
{
- OUString sText = aColumns[ nModelPos ]->GetCellText( xPaintRow, pGrid->getNumberFormatter() );
+ OUString sText = aColumns[ nModelPos ]->GetCellText( xPaintRow.get(), pGrid->getNumberFormatter() );
pReturnArray[i] <<= sText;
}
break;
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);
}
}
diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx
index 4829fb3c06bb..57f6f54a35bf 100644
--- a/svx/source/gallery2/galtheme.cxx
+++ b/svx/source/gallery2/galtheme.cxx
@@ -574,7 +574,7 @@ void GalleryTheme::Actualize( const Link<const INetURLObject&, void>& rActualize
const OUString aStmName( GetSvDrawStreamNameFromURL( pEntry->aURL ) );
tools::SvRef<SotStorageStream> pIStm = aSvDrawStorageRef->OpenSotStream( aStmName, StreamMode::READ );
- if( pIStm && !pIStm->GetError() )
+ if( pIStm.Is() && !pIStm->GetError() )
{
pIStm->SetBufferSize( 16384 );
@@ -657,7 +657,7 @@ void GalleryTheme::Actualize( const Link<const INetURLObject&, void>& rActualize
try
{
tools::SvRef<SotStorage> aTempStorageRef( new SotStorage( false, aTmpURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::STD_READWRITE ) );
- aSvDrawStorageRef->CopyTo( aTempStorageRef );
+ aSvDrawStorageRef->CopyTo( aTempStorageRef.get() );
nStorErr = aSvDrawStorageRef->GetError();
}
catch (const css::ucb::ContentCreationException& e)