diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-25 12:03:58 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-02 08:02:54 +0000 |
commit | 4978328534c0f759eea7d0c196046f1d53b06925 (patch) | |
tree | cf9dcd62c4f09dcd08115bbda2a8950678a38562 /svx | |
parent | 1461ebbbb5d47d90e31f0945a4878a68fbee5213 (diff) |
convert method names in tools::SvRef to be more like our other..
reference classes, uno::Reference and rtl::Reference.
Specifically rename Is()->is() and Clear()->clear().
Change-Id: Icb7e05e2d09cb9977121508b837ba0961dabb4ae
Reviewed-on: https://gerrit.libreoffice.org/33576
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/charmap.cxx | 6 | ||||
-rw-r--r-- | svx/source/fmcomp/fmgridcl.cxx | 14 | ||||
-rw-r--r-- | svx/source/fmcomp/fmgridif.cxx | 4 | ||||
-rw-r--r-- | svx/source/fmcomp/gridcell.cxx | 2 | ||||
-rw-r--r-- | svx/source/fmcomp/gridctrl.cxx | 30 | ||||
-rw-r--r-- | svx/source/form/fmscriptingenv.cxx | 2 | ||||
-rw-r--r-- | svx/source/form/fmundo.cxx | 2 | ||||
-rw-r--r-- | svx/source/gallery2/galmisc.cxx | 8 | ||||
-rw-r--r-- | svx/source/gallery2/galtheme.cxx | 22 |
9 files changed, 45 insertions, 45 deletions
diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx index 9bfa8d95e3b2..b2ef739ee1a5 100644 --- a/svx/source/dialog/charmap.cxx +++ b/svx/source/dialog/charmap.cxx @@ -576,7 +576,7 @@ void SvxShowCharSet::SelectIndex( int nNewIndex, bool bFocus ) if( !aVscrollSB ) return; - if ( !mxFontCharMap.Is() ) + if ( !mxFontCharMap.is() ) RecalculateFont( *this ); if( nNewIndex < 0 ) @@ -657,7 +657,7 @@ void SvxShowCharSet::OutputIndex( int nNewIndex ) void SvxShowCharSet::SelectCharacter( sal_UCS4 cNew ) { - if ( !mxFontCharMap.Is() ) + if ( !mxFontCharMap.is() ) RecalculateFont( *this ); // get next available char of current font @@ -1656,7 +1656,7 @@ void SubsetMap::InitList() void SubsetMap::ApplyCharMap( const FontCharMapRef& rxFontCharMap ) { - if( !rxFontCharMap.Is() ) + if( !rxFontCharMap.is() ) return; // remove subsets that are not matched in any range diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx index 1e39c967d65d..df87cc08052b 100644 --- a/svx/source/fmcomp/fmgridcl.cxx +++ b/svx/source/fmcomp/fmgridcl.cxx @@ -1085,7 +1085,7 @@ void FmGridControl::propertyChange(const css::beans::PropertyChangeEvent& evt) const DbGridRowRef& xRow = GetCurrentRow(); // waehrend Positionierung wird kein abgleich der Properties vorgenommen Reference<XPropertySet> xSet(evt.Source,UNO_QUERY); - if (xRow.Is() && (::cppu::any2bool(xSet->getPropertyValue(FM_PROP_ISNEW))|| CompareBookmark(getDataSource()->getBookmark(), xRow->GetBookmark()))) + if (xRow.is() && (::cppu::any2bool(xSet->getPropertyValue(FM_PROP_ISNEW))|| CompareBookmark(getDataSource()->getBookmark(), xRow->GetBookmark()))) { if (evt.PropertyName == FM_PROP_ISMODIFIED) { @@ -1149,7 +1149,7 @@ void FmGridControl::DeleteSelectedRows() if ( IsCurrentAppending() ) return; // is the insert row selected - if (GetEmptyRow().Is() && IsRowSelected(GetRowCount() - 1)) + if (GetEmptyRow().is() && IsRowSelected(GetRowCount() - 1)) nSelectedRows -= 1; // nothing to do @@ -1216,10 +1216,10 @@ void FmGridControl::DeleteSelectedRows() Any aBookmark; bool bNewPos = false; // if the current row isn't selected we take the row as row after deletion - OSL_ENSURE( GetCurrentRow().Is(), "FmGridControl::DeleteSelectedRows: no current row here?" ); + OSL_ENSURE( GetCurrentRow().is(), "FmGridControl::DeleteSelectedRows: no current row here?" ); // crash reports suggest it can happen we don't have a current row - how? // #154303# / 2008-04-23 / frank.schoenheit@sun.com - if ( !IsRowSelected( GetCurrentPos() ) && !IsCurrentAppending() && GetCurrentRow().Is() ) + if ( !IsRowSelected( GetCurrentPos() ) && !IsCurrentAppending() && GetCurrentRow().is() ) { aBookmark = GetCurrentRow()->GetBookmark(); bNewPos = true; @@ -1314,7 +1314,7 @@ void FmGridControl::DeleteSelectedRows() --nRecordCount; // there are no rows left and we have an insert row - if (!nRecordCount && GetEmptyRow().Is()) + if (!nRecordCount && GetEmptyRow().is()) { Reference< XResultSetUpdate > xUpdateCursor(Reference< XInterface >(*m_pDataCursor), UNO_QUERY); xUpdateCursor->moveToInsertRow(); @@ -1423,7 +1423,7 @@ bool FmGridControl::commit() // wird if (!IsUpdating()) { - if (Controller().Is() && Controller()->IsModified()) + if (Controller().is() && Controller()->IsModified()) { if (!SaveModified()) return false; @@ -1435,7 +1435,7 @@ bool FmGridControl::commit() void FmGridControl::inserted(const css::lang::EventObject& /*rEvent*/) { const DbGridRowRef& xRow = GetCurrentRow(); - if (!xRow.Is()) + if (!xRow.is()) return; // Zeile ist eingefuegt worden, dann den status und mode zuruecksetzen diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx index 33af56e75e49..0fa2357ccced 100644 --- a/svx/source/fmcomp/fmgridif.cxx +++ b/svx/source/fmcomp/fmgridif.cxx @@ -1251,7 +1251,7 @@ Sequence< sal_Bool > SAL_CALL FmXGridPeer::queryFieldDataType( const Type& xType pCol = aColumns[ nModelPos ]; const DbGridRowRef xRow = pGrid->GetSeekRow(); - xFieldContent = (xRow.Is() && xRow->HasField(pCol->GetFieldPos())) ? xRow->GetField(pCol->GetFieldPos()).getColumn() : Reference< css::sdb::XColumn > (); + xFieldContent = (xRow.is() && xRow->HasField(pCol->GetFieldPos())) ? xRow->GetField(pCol->GetFieldPos()).getColumn() : Reference< css::sdb::XColumn > (); if (!xFieldContent.is()) // can't supply anything without a field content // FS - 07.12.99 - 54391 @@ -1291,7 +1291,7 @@ Sequence< Any > SAL_CALL FmXGridPeer::queryFieldData( sal_Int32 nRow, const Type // don't use GetCurrentRow as this isn't affected by the above SeekRow // FS - 30.09.99 - 68644 DbGridRowRef xPaintRow = pGrid->GetPaintRow(); - ENSURE_OR_THROW( xPaintRow.Is(), "invalid paint row" ); + ENSURE_OR_THROW( xPaintRow.is(), "invalid paint row" ); // I need the columns of the control for GetFieldText DbGridColumns aColumns = pGrid->GetColumns(); diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index 2195b90708dd..705653d61bc7 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -441,7 +441,7 @@ Reference< css::sdb::XColumn > DbGridColumn::GetCurrentFieldValue() const { Reference< css::sdb::XColumn > xField; const DbGridRowRef xRow = m_rParent.GetCurrentRow(); - if (xRow.Is() && xRow->HasField(m_nFieldPos)) + if (xRow.is() && xRow->HasField(m_nFieldPos)) { xField = xRow->GetField(m_nFieldPos).getColumn(); } diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index f901dd3d5ab8..61947d437828 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -76,7 +76,7 @@ using namespace ::com::sun::star::datatransfer; using namespace ::com::sun::star::container; using namespace com::sun::star::accessibility; -#define ROWSTATUS(row) (!row.Is() ? "NULL" : row->GetStatus() == GridRowStatus::Clean ? "CLEAN" : row->GetStatus() == GridRowStatus::Modified ? "MODIFIED" : row->GetStatus() == GridRowStatus::Deleted ? "DELETED" : "INVALID") +#define ROWSTATUS(row) (!row.is() ? "NULL" : row->GetStatus() == GridRowStatus::Clean ? "CLEAN" : row->GetStatus() == GridRowStatus::Modified ? "MODIFIED" : row->GetStatus() == GridRowStatus::Deleted ? "DELETED" : "INVALID") #define DEFAULT_BROWSE_MODE \ BrowserMode::COLUMNSELECTION \ @@ -1286,7 +1286,7 @@ void DbGridControl::EnableNavigationBar(bool bEnable) DbGridControlOptions DbGridControl::SetOptions(DbGridControlOptions nOpt) { - DBG_ASSERT(!m_xCurrentRow.Is() || !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) @@ -1917,7 +1917,7 @@ void DbGridControl::RowInserted(long nRow, long nNumRows, bool bDoPaint) // if we have an insert row we have to reduce to count by 1 // as the total count reflects only the existing rows in database m_nTotalCount = GetRowCount() + nNumRows; - if (m_xEmptyRow.Is()) + if (m_xEmptyRow.is()) --m_nTotalCount; } else if (m_nTotalCount >= 0) @@ -1936,7 +1936,7 @@ void DbGridControl::RowRemoved(long nRow, long nNumRows, bool bDoPaint) { m_nTotalCount = GetRowCount() - nNumRows; // if we have an insert row reduce by 1 - if (m_xEmptyRow.Is()) + if (m_xEmptyRow.is()) --m_nTotalCount; } else if (m_nTotalCount >= 0) @@ -2112,7 +2112,7 @@ bool DbGridControl::SetCurrent(long nNewRow) if ( !m_pSeekCursor->isBeforeFirst() && !m_pSeekCursor->isAfterLast() ) { Any aBookmark = m_pSeekCursor->getBookmark(); - if (!m_xCurrentRow.Is() || 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)) @@ -2219,7 +2219,7 @@ void DbGridControl::AdjustDataSource(bool bFull) // but this is only possible for rows which are not inserted, in that case the comparison result // may not be correct else - if ( m_xCurrentRow.Is() + if ( m_xCurrentRow.is() && !m_xCurrentRow->IsNew() && !m_pDataCursor->isBeforeFirst() && !m_pDataCursor->isAfterLast() @@ -2247,7 +2247,7 @@ void DbGridControl::AdjustDataSource(bool bFull) m_xPaintRow = m_xSeekRow; // not up-to-date row, thus, adjust completely - if (!m_xCurrentRow.Is()) + if (!m_xCurrentRow.is()) AdjustRows(); sal_Int32 nNewPos = AlignSeekCursor(); @@ -2260,7 +2260,7 @@ void DbGridControl::AdjustDataSource(bool bFull) if (m_bSynchDisplay) DbGridControl_Base::GoToRow(nNewPos); - if (!m_xCurrentRow.Is()) + if (!m_xCurrentRow.is()) // Happens e.g. when deleting the n last datasets (n>1) while the cursor was positioned // on the last one. In this case, AdjustRows deletes two rows from BrowseBox, by what // CurrentRow is corrected to point two rows down, so that GoToRow will point into @@ -2276,7 +2276,7 @@ void DbGridControl::AdjustDataSource(bool bFull) // if the data cursor was moved from outside, this section is voided SetNoSelection(); - m_aBar->InvalidateAll(m_nCurrentPos, m_xCurrentRow.Is()); + m_aBar->InvalidateAll(m_nCurrentPos, m_xCurrentRow.is()); } sal_Int32 DbGridControl::AlignSeekCursor() @@ -2746,7 +2746,7 @@ void DbGridControl::DataSourcePropertyChanged(const PropertyChangeEvent& evt) if (xSource.is()) bIsNew = ::comphelper::getBOOL(xSource->getPropertyValue(FM_PROP_ISNEW)); - if (bIsNew && m_xCurrentRow.Is()) + if (bIsNew && m_xCurrentRow.is()) { DBG_ASSERT(::comphelper::getBOOL(xSource->getPropertyValue(FM_PROP_ROWCOUNTFINAL)), "DbGridControl::DataSourcePropertyChanged : somebody moved the form to a new record before the row count was final !"); sal_Int32 nRecordCount = 0; @@ -2774,7 +2774,7 @@ void DbGridControl::DataSourcePropertyChanged(const PropertyChangeEvent& evt) } } } - if (m_xCurrentRow.Is()) + if (m_xCurrentRow.is()) { m_xCurrentRow->SetStatus(::comphelper::getBOOL(evt.NewValue) ? GridRowStatus::Modified : GridRowStatus::Clean); m_xCurrentRow->SetNew( bIsNew ); @@ -3114,7 +3114,7 @@ bool DbGridControl::IsModified() const bool DbGridControl::IsCurrentAppending() const { - return m_xCurrentRow.Is() && m_xCurrentRow->IsNew(); + return m_xCurrentRow.is() && m_xCurrentRow->IsNew(); } bool DbGridControl::IsInsertionRow(long nRow) const @@ -3137,8 +3137,8 @@ bool DbGridControl::SaveModified() size_t Location = GetModelColumnPos( GetCurColumnId() ); DbGridColumn* pColumn = ( Location < m_aColumns.size() ) ? m_aColumns[ Location ] : nullptr; bool bOK = pColumn && pColumn->Commit(); - DBG_ASSERT( Controller().Is(), "DbGridControl::SaveModified: was modified, by have no controller?!" ); - if ( !Controller().Is() ) + DBG_ASSERT( Controller().is(), "DbGridControl::SaveModified: was modified, by have no controller?!" ); + if ( !Controller().is() ) // this might happen if the callbacks implicitly triggered by Commit // fiddled with the form or the control ... // (Note that this here is a workaround, at most. We need a general concept how @@ -3178,7 +3178,7 @@ bool DbGridControl::SaveRow() if (!IsValid(m_xCurrentRow) || !IsModified()) return true; // value of the controller was not saved, yet - else if (Controller().Is() && Controller()->IsModified()) + else if (Controller().is() && Controller()->IsModified()) { if (!SaveModified()) return false; diff --git a/svx/source/form/fmscriptingenv.cxx b/svx/source/form/fmscriptingenv.cxx index b58c364e661d..071ebf753e03 100644 --- a/svx/source/form/fmscriptingenv.cxx +++ b/svx/source/form/fmscriptingenv.cxx @@ -994,7 +994,7 @@ namespace svxform // SfxObjectShellRef is good here since the model controls the lifetime of the object SfxObjectShellRef xObjectShell = m_rFormModel.GetObjectShell(); - if( !xObjectShell.Is() ) + if( !xObjectShell.is() ) return; // the script to execute diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx index 3ae443c30f74..c71a6acddfbc 100644 --- a/svx/source/form/fmundo.cxx +++ b/svx/source/form/fmundo.cxx @@ -126,7 +126,7 @@ private: Reference< XPropertySet > const xListenerProps( xScriptListener, UNO_QUERY_THROW ); // SfxObjectShellRef is good here since the model controls the lifetime of the shell SfxObjectShellRef const xObjectShell = m_rModel.GetObjectShell(); - ENSURE_OR_THROW( xObjectShell.Is(), "no object shell!" ); + ENSURE_OR_THROW( xObjectShell.is(), "no object shell!" ); xListenerProps->setPropertyValue("Model", makeAny( xObjectShell->GetModel() ) ); m_vbaListener = xScriptListener; diff --git a/svx/source/gallery2/galmisc.cxx b/svx/source/gallery2/galmisc.cxx index 180cec48a1ae..65956e0187ce 100644 --- a/svx/source/gallery2/galmisc.cxx +++ b/svx/source/gallery2/galmisc.cxx @@ -427,13 +427,13 @@ void GalleryTransferable::InitData( bool bLazy ) mpGraphicObject = new GraphicObject( aGraphic ); } - if( !mxModelStream.Is() ) + if( !mxModelStream.is() ) { mxModelStream = new SotStorageStream( "" ); mxModelStream->SetBufferSize( 16348 ); if( !mpTheme->GetModelStream( mnObjectPos, mxModelStream ) ) - mxModelStream.Clear(); + mxModelStream.clear(); else mxModelStream->Seek( 0 ); } @@ -514,7 +514,7 @@ bool GalleryTransferable::GetData( const datatransfer::DataFlavor& rFlavor, cons if( ( SotClipboardFormatId::DRAWING == nFormat ) && ( SgaObjKind::SvDraw == meObjectKind ) ) { - bRet = ( mxModelStream.Is() && SetObject( mxModelStream.get(), SotClipboardFormatId::NONE, rFlavor ) ); + bRet = ( mxModelStream.is() && SetObject( mxModelStream.get(), SotClipboardFormatId::NONE, rFlavor ) ); } else if( ( SotClipboardFormatId::SVIM == nFormat ) && mpImageMap ) { @@ -569,7 +569,7 @@ void GalleryTransferable::DragFinished( sal_Int8 nDropAction ) void GalleryTransferable::ObjectReleased() { - mxModelStream.Clear(); + mxModelStream.clear(); delete mpGraphicObject; mpGraphicObject = nullptr; delete mpImageMap; diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx index db774bd754fa..4e65d6cee710 100644 --- a/svx/source/gallery2/galtheme.cxx +++ b/svx/source/gallery2/galtheme.cxx @@ -569,12 +569,12 @@ void GalleryTheme::Actualize( const Link<const INetURLObject&, void>& rActualize } else { - if ( aSvDrawStorageRef.Is() ) + if ( aSvDrawStorageRef.is() ) { const OUString aStmName( GetSvDrawStreamNameFromURL( pEntry->aURL ) ); tools::SvRef<SotStorageStream> pIStm = aSvDrawStorageRef->OpenSotStream( aStmName, StreamMode::READ ); - if( pIStm.Is() && !pIStm->GetError() ) + if( pIStm.is() && !pIStm->GetError() ) { pIStm->SetBufferSize( 16384 ); @@ -670,7 +670,7 @@ void GalleryTheme::Actualize( const Link<const INetURLObject&, void>& rActualize if( nStorErr == ERRCODE_NONE ) { - aSvDrawStorageRef.Clear(); + aSvDrawStorageRef.clear(); CopyFile( aTmpURL, GetSdvURL() ); ImplCreateSvDrawStorage(); } @@ -931,12 +931,12 @@ bool GalleryTheme::GetModel( sal_uIntPtr nPos, SdrModel& rModel, bool ) const INetURLObject aURL( ImplGetURL( pObject ) ); tools::SvRef<SotStorage> xStor( GetSvDrawStorage() ); - if( xStor.Is() ) + if( xStor.is() ) { const OUString aStmName( GetSvDrawStreamNameFromURL( aURL ) ); tools::SvRef<SotStorageStream> xIStm( xStor->OpenSotStream( aStmName, StreamMode::READ ) ); - if( xIStm.Is() && !xIStm->GetError() ) + if( xIStm.is() && !xIStm->GetError() ) { xIStm->SetBufferSize( STREAMBUF_SIZE ); bRet = GallerySvDrawImport( *xIStm, rModel ); @@ -954,12 +954,12 @@ bool GalleryTheme::InsertModel( const FmFormModel& rModel, sal_uIntPtr nInsertPo tools::SvRef<SotStorage> xStor( GetSvDrawStorage() ); bool bRet = false; - if( xStor.Is() ) + if( xStor.is() ) { const OUString aStmName( GetSvDrawStreamNameFromURL( aURL ) ); tools::SvRef<SotStorageStream> xOStm( xStor->OpenSotStream( aStmName, StreamMode::WRITE | StreamMode::TRUNC ) ); - if( xOStm.Is() && !xOStm->GetError() ) + if( xOStm.is() && !xOStm->GetError() ) { SvMemoryStream aMemStm( 65535, 65535 ); FmFormModel* pFormModel = const_cast<FmFormModel*>(&rModel); @@ -1003,12 +1003,12 @@ bool GalleryTheme::GetModelStream( sal_uIntPtr nPos, tools::SvRef<SotStorageStre const INetURLObject aURL( ImplGetURL( pObject ) ); tools::SvRef<SotStorage> xStor( GetSvDrawStorage() ); - if( xStor.Is() ) + if( xStor.is() ) { const OUString aStmName( GetSvDrawStreamNameFromURL( aURL ) ); tools::SvRef<SotStorageStream> xIStm( xStor->OpenSotStream( aStmName, StreamMode::READ ) ); - if( xIStm.Is() && !xIStm->GetError() ) + if( xIStm.is() && !xIStm->GetError() ) { sal_uInt32 nVersion = 0; @@ -1050,12 +1050,12 @@ bool GalleryTheme::InsertModelStream( const tools::SvRef<SotStorageStream>& rxMo tools::SvRef<SotStorage> xStor( GetSvDrawStorage() ); bool bRet = false; - if( xStor.Is() ) + if( xStor.is() ) { const OUString aStmName( GetSvDrawStreamNameFromURL( aURL ) ); tools::SvRef<SotStorageStream> xOStm( xStor->OpenSotStream( aStmName, StreamMode::WRITE | StreamMode::TRUNC ) ); - if( xOStm.Is() && !xOStm->GetError() ) + if( xOStm.is() && !xOStm->GetError() ) { GalleryCodec aCodec( *xOStm ); SvMemoryStream aMemStm( 65535, 65535 ); |