summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-01-25 12:03:58 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-02-02 08:02:54 +0000
commit4978328534c0f759eea7d0c196046f1d53b06925 (patch)
treecf9dcd62c4f09dcd08115bbda2a8950678a38562 /sc/source/ui
parent1461ebbbb5d47d90e31f0945a4878a68fbee5213 (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 'sc/source/ui')
-rw-r--r--sc/source/ui/app/drwtrans.cxx6
-rw-r--r--sc/source/ui/app/transobj.cxx10
-rw-r--r--sc/source/ui/docshell/docsh3.cxx2
-rw-r--r--sc/source/ui/docshell/docsh4.cxx2
-rw-r--r--sc/source/ui/docshell/externalrefmgr.cxx6
-rw-r--r--sc/source/ui/docshell/pntlock.cxx2
-rw-r--r--sc/source/ui/docshell/tablink.cxx6
-rw-r--r--sc/source/ui/miscdlgs/instbdlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/linkarea.cxx4
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx10
-rw-r--r--sc/source/ui/unoobj/chartuno.cxx6
-rw-r--r--sc/source/ui/unoobj/exceldetect.cxx2
-rw-r--r--sc/source/ui/view/drawvie4.cxx6
-rw-r--r--sc/source/ui/view/spelldialog.cxx2
-rw-r--r--sc/source/ui/view/viewfun3.cxx4
-rw-r--r--sc/source/ui/view/viewfun4.cxx4
-rw-r--r--sc/source/ui/view/viewfun5.cxx4
17 files changed, 39 insertions, 39 deletions
diff --git a/sc/source/ui/app/drwtrans.cxx b/sc/source/ui/app/drwtrans.cxx
index 1c0a506e1cda..d2f3deb9e7cd 100644
--- a/sc/source/ui/app/drwtrans.cxx
+++ b/sc/source/ui/app/drwtrans.cxx
@@ -236,10 +236,10 @@ ScDrawTransferObj::~ScDrawTransferObj()
}
aOleData = TransferableDataHelper(); // clear before releasing the mutex
- aDocShellRef.Clear();
+ aDocShellRef.clear();
delete pModel;
- aDrawPersistRef.Clear(); // after the model
+ aDrawPersistRef.clear(); // after the model
delete pBookmark;
delete pDragSourceView;
@@ -715,7 +715,7 @@ void ScDrawTransferObj::CreateOLEData()
void ScDrawTransferObj::InitDocShell()
{
- if ( !aDocShellRef.Is() )
+ if ( !aDocShellRef.is() )
{
ScDocShell* pDocSh = new ScDocShell;
aDocShellRef = pDocSh; // ref must be there before InitNew
diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx
index 34fa4e0a58b7..16880d5a5deb 100644
--- a/sc/source/ui/app/transobj.cxx
+++ b/sc/source/ui/app/transobj.cxx
@@ -197,9 +197,9 @@ ScTransferObj::~ScTransferObj()
delete pDoc; // ScTransferObj is owner of clipboard document
- aDocShellRef.Clear(); // before releasing the mutex
+ aDocShellRef.clear(); // before releasing the mutex
- aDrawPersistRef.Clear(); // after the model
+ aDrawPersistRef.clear(); // after the model
}
@@ -612,7 +612,7 @@ ScMarkData ScTransferObj::GetSourceMarkData()
void ScTransferObj::InitDocShell(bool bLimitToPageSize)
{
- if ( !aDocShellRef.Is() )
+ if ( !aDocShellRef.is() )
{
ScDocShell* pDocSh = new ScDocShell;
aDocShellRef = pDocSh; // ref must be there before InitNew
@@ -759,7 +759,7 @@ SfxObjectShell* ScTransferObj::SetDrawClipDoc( bool bAnyOle )
{
// update ScGlobal::xDrawClipDocShellRef
- ScGlobal::xDrawClipDocShellRef.Clear();
+ ScGlobal::xDrawClipDocShellRef.clear();
if (bAnyOle)
{
ScGlobal::xDrawClipDocShellRef = new ScDocShell(SfxModelFlags::EMBEDDED_OBJECT | SfxModelFlags::DISABLE_EMBEDDED_SCRIPTS); // there must be a ref
@@ -768,7 +768,7 @@ SfxObjectShell* ScTransferObj::SetDrawClipDoc( bool bAnyOle )
}
else
{
- ScGlobal::xDrawClipDocShellRef.Clear();
+ ScGlobal::xDrawClipDocShellRef.clear();
return nullptr;
}
}
diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx
index d76404bba990..61b412bfd819 100644
--- a/sc/source/ui/docshell/docsh3.cxx
+++ b/sc/source/ui/docshell/docsh3.cxx
@@ -248,7 +248,7 @@ void ScDocShell::UnlockPaint_Impl(bool bDoc)
pPaintLockData = nullptr; // nicht weitersammeln
ScRangeListRef xRangeList = pPaint->GetRangeList();
- if ( xRangeList.Is() )
+ if ( xRangeList.is() )
{
PaintPartFlags nParts = pPaint->GetParts();
for ( size_t i = 0, nCount = xRangeList->size(); i < nCount; i++ )
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 3f11472077cf..6b2ee929d124 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -292,7 +292,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
bValid = true;
}
else
- aRangeListRef.Clear();
+ aRangeListRef.clear();
}
ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell();
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx
index 94b8752f429e..fa08f9492ae3 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -2460,7 +2460,7 @@ ScDocument* ScExternalRefManager::getSrcDocument(sal_uInt16 nFileId)
catch (const css::uno::Exception&)
{
}
- if (!aSrcDoc.maShell.Is())
+ if (!aSrcDoc.maShell.is())
{
// source document could not be loaded.
return nullptr;
@@ -2559,7 +2559,7 @@ SfxObjectShellRef ScExternalRefManager::loadSrcDocument(sal_uInt16 nFileId, OUSt
if (!pNewShell->DoLoad(pMedium.release()))
{
aRef->DoClose();
- aRef.Clear();
+ aRef.clear();
return aRef;
}
@@ -2913,7 +2913,7 @@ bool ScExternalRefManager::refreshSrcDocument(sal_uInt16 nFileId)
}
catch ( const css::uno::Exception& ) {}
- if (!xDocShell.Is())
+ if (!xDocShell.is())
// Failed to load the document. Bail out.
return false;
diff --git a/sc/source/ui/docshell/pntlock.cxx b/sc/source/ui/docshell/pntlock.cxx
index 138c4eb613a2..ed7aca968e17 100644
--- a/sc/source/ui/docshell/pntlock.cxx
+++ b/sc/source/ui/docshell/pntlock.cxx
@@ -33,7 +33,7 @@ ScPaintLockData::~ScPaintLockData()
void ScPaintLockData::AddRange( const ScRange& rRange, PaintPartFlags nP )
{
- if (!xRangeList.Is())
+ if (!xRangeList.is())
xRangeList = new ScRangeList;
xRangeList->Join( rRange );
diff --git a/sc/source/ui/docshell/tablink.cxx b/sc/source/ui/docshell/tablink.cxx
index 5c2ff38af891..7c83260d88ba 100644
--- a/sc/source/ui/docshell/tablink.cxx
+++ b/sc/source/ui/docshell/tablink.cxx
@@ -534,7 +534,7 @@ ScDocumentLoader::ScDocumentLoader( const OUString& rFileName,
ScDocumentLoader::~ScDocumentLoader()
{
- if ( aRef.Is() )
+ if ( aRef.is() )
aRef->DoClose();
else if ( pMedium )
delete pMedium;
@@ -542,14 +542,14 @@ ScDocumentLoader::~ScDocumentLoader()
void ScDocumentLoader::ReleaseDocRef()
{
- if ( aRef.Is() )
+ if ( aRef.is() )
{
// release reference without calling DoClose - caller must
// have another reference to the doc and call DoClose later
pDocShell = nullptr;
pMedium = nullptr;
- aRef.Clear();
+ aRef.clear();
}
}
diff --git a/sc/source/ui/miscdlgs/instbdlg.cxx b/sc/source/ui/miscdlgs/instbdlg.cxx
index 69afe42fe9ec..241b370ac4d9 100644
--- a/sc/source/ui/miscdlgs/instbdlg.cxx
+++ b/sc/source/ui/miscdlgs/instbdlg.cxx
@@ -346,7 +346,7 @@ IMPL_LINK( ScInsertTableDlg, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg
else
{
pDocShTables->DoClose();
- aDocShTablesRef.Clear();
+ aDocShTablesRef.clear();
pDocShTables = nullptr;
FillTables_Impl( nullptr );
diff --git a/sc/source/ui/miscdlgs/linkarea.cxx b/sc/source/ui/miscdlgs/linkarea.cxx
index 67bc379f9c7f..94fc4e677dff 100644
--- a/sc/source/ui/miscdlgs/linkarea.cxx
+++ b/sc/source/ui/miscdlgs/linkarea.cxx
@@ -126,7 +126,7 @@ void ScLinkedAreaDlg::LoadDocument( const OUString& rFile, const OUString& rFilt
// unload old document
pSourceShell->DoClose();
pSourceShell = nullptr;
- aSourceRef.Clear();
+ aSourceRef.clear();
}
if ( !rFile.isEmpty() )
@@ -239,7 +239,7 @@ IMPL_LINK( ScLinkedAreaDlg, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg,
{
pSourceShell->DoClose();
pSourceShell = nullptr;
- aSourceRef.Clear();
+ aSourceRef.clear();
m_pCbUrl->SetText( EMPTY_OUSTRING );
}
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index ae624ce46827..5ae09b2d92be 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -3034,7 +3034,7 @@ ScMemChart* ScCellRangesBase::CreateMemChart_Impl() const
xChartRanges->Append( ScRange( nStartX, nStartY, nTab, nEndX, nEndY, nTab ) );
}
}
- if (!xChartRanges.Is()) // sonst Ranges direkt uebernehmen
+ if (!xChartRanges.is()) // sonst Ranges direkt uebernehmen
xChartRanges = new ScRangeList(aRanges);
ScChartArray aArr( &pDocShell->GetDocument(), xChartRanges, OUString() );
@@ -3113,7 +3113,7 @@ void SAL_CALL ScCellRangesBase::setData( const uno::Sequence< uno::Sequence<doub
long nRowCount = aData.getLength();
long nColCount = nRowCount ? aData[0].getLength() : 0;
ScRangeListRef xChartRanges = GetLimitedChartRanges_Impl( nColCount, nRowCount );
- if ( pDocShell && xChartRanges.Is() )
+ if ( pDocShell && xChartRanges.is() )
{
ScDocument& rDoc = pDocShell->GetDocument();
ScChartArray aArr( &rDoc, xChartRanges, OUString() );
@@ -3184,7 +3184,7 @@ void SAL_CALL ScCellRangesBase::setRowDescriptions(
{
long nRowCount = aRowDescriptions.getLength();
ScRangeListRef xChartRanges = GetLimitedChartRanges_Impl( 1, nRowCount );
- if ( pDocShell && xChartRanges.Is() )
+ if ( pDocShell && xChartRanges.is() )
{
ScDocument& rDoc = pDocShell->GetDocument();
ScChartArray aArr( &rDoc, xChartRanges, OUString() );
@@ -3253,7 +3253,7 @@ void SAL_CALL ScCellRangesBase::setColumnDescriptions(
{
long nColCount = aColumnDescriptions.getLength();
ScRangeListRef xChartRanges = GetLimitedChartRanges_Impl( nColCount, 1 );
- if ( pDocShell && xChartRanges.Is() )
+ if ( pDocShell && xChartRanges.is() )
{
ScDocument& rDoc = pDocShell->GetDocument();
ScChartArray aArr( &rDoc, xChartRanges, OUString() );
@@ -9293,7 +9293,7 @@ public:
void Join( const ScRange& rNewRange );
const ScRangeList& GetRanges();
- void Clear() { aReturnRanges.Clear(); } // aJoinedRanges and aCompletedRanges are cleared in GetRanges
+ void Clear() { aReturnRanges.clear(); } // aJoinedRanges and aCompletedRanges are cleared in GetRanges
};
void ScUniqueFormatsEntry::Join( const ScRange& rNewRange )
diff --git a/sc/source/ui/unoobj/chartuno.cxx b/sc/source/ui/unoobj/chartuno.cxx
index 10d89ce5e6ab..e8ad9ea2caea 100644
--- a/sc/source/ui/unoobj/chartuno.cxx
+++ b/sc/source/ui/unoobj/chartuno.cxx
@@ -601,7 +601,7 @@ void ScChartObj::getFastPropertyValue( uno::Any& rValue, sal_Int32 nHandle ) con
break;
const ScRangeListRef& rRangeList = pListener->GetRangeList();
- if (!rRangeList.Is())
+ if (!rRangeList.is())
break;
size_t nCount = rRangeList->size();
@@ -685,7 +685,7 @@ uno::Sequence<table::CellRangeAddress> SAL_CALL ScChartObj::getRanges()
ScRangeListRef xRanges = new ScRangeList;
bool bColHeaders, bRowHeaders;
GetData_Impl( xRanges, bColHeaders, bRowHeaders );
- if ( xRanges.Is() )
+ if ( xRanges.is() )
{
size_t nCount = xRanges->size();
@@ -732,7 +732,7 @@ void SAL_CALL ScChartObj::setRanges( const uno::Sequence<table::CellRangeAddress
}
ScRangeListRef xNewRanges( pList );
- if ( !xOldRanges.Is() || *xOldRanges != *xNewRanges )
+ if ( !xOldRanges.is() || *xOldRanges != *xNewRanges )
Update_Impl( xNewRanges, bColHeaders, bRowHeaders );
}
diff --git a/sc/source/ui/unoobj/exceldetect.cxx b/sc/source/ui/unoobj/exceldetect.cxx
index d0c72c57600b..bb5bcd3f98eb 100644
--- a/sc/source/ui/unoobj/exceldetect.cxx
+++ b/sc/source/ui/unoobj/exceldetect.cxx
@@ -67,7 +67,7 @@ bool hasStream(const uno::Reference<io::XInputStream>& xInStream, const OUString
try
{
tools::SvRef<SotStorage> xStorage = new SotStorage(pStream, false);
- if (!xStorage.Is() || xStorage->GetError())
+ if (!xStorage.is() || xStorage->GetError())
return false;
return xStorage->IsStream(rName);
}
diff --git a/sc/source/ui/view/drawvie4.cxx b/sc/source/ui/view/drawvie4.cxx
index f0851b5b092a..e9be96c7d5f1 100644
--- a/sc/source/ui/view/drawvie4.cxx
+++ b/sc/source/ui/view/drawvie4.cxx
@@ -356,7 +356,7 @@ void ScDrawView::DoCopy()
// update ScGlobal::xDrawClipDocShellRef
ScDrawLayer::SetGlobalDrawPersist( ScTransferObj::SetDrawClipDoc(!aRanges.empty()) );
- if (ScGlobal::xDrawClipDocShellRef.Is())
+ if (ScGlobal::xDrawClipDocShellRef.is())
{
// Copy data referenced by the chart objects to the draw clip
// document. We need to do this before GetMarkedObjModel() below.
@@ -382,7 +382,7 @@ void ScDrawView::DoCopy()
ScDrawTransferObj* pTransferObj = new ScDrawTransferObj( pModel, pDocSh, aObjDesc );
uno::Reference<datatransfer::XTransferable> xTransferable( pTransferObj );
- if ( ScGlobal::xDrawClipDocShellRef.Is() )
+ if ( ScGlobal::xDrawClipDocShellRef.is() )
{
pTransferObj->SetDrawPersist( ScGlobal::xDrawClipDocShellRef.get() ); // keep persist for ole objects alive
}
@@ -418,7 +418,7 @@ uno::Reference<datatransfer::XTransferable> ScDrawView::CopyToTransferable()
ScDrawTransferObj* pTransferObj = new ScDrawTransferObj( pModel, pDocSh, aObjDesc );
uno::Reference<datatransfer::XTransferable> xTransferable( pTransferObj );
- if ( ScGlobal::xDrawClipDocShellRef.Is() )
+ if ( ScGlobal::xDrawClipDocShellRef.is() )
{
pTransferObj->SetDrawPersist( ScGlobal::xDrawClipDocShellRef.get() ); // keep persist for ole objects alive
}
diff --git a/sc/source/ui/view/spelldialog.cxx b/sc/source/ui/view/spelldialog.cxx
index 0d4dc36c7ec5..b01c9de1158b 100644
--- a/sc/source/ui/view/spelldialog.cxx
+++ b/sc/source/ui/view/spelldialog.cxx
@@ -146,7 +146,7 @@ void ScSpellDialogChildWindow::Reset()
mxUndoDoc.reset();
mxRedoDoc.reset();
mxOldSel.reset();
- mxOldRangeList.Clear();
+ mxOldRangeList.clear();
mpViewShell = nullptr;
mpViewData = nullptr;
mpDocShell = nullptr;
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index 2c481f5ce0fe..64a5cb68b362 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -272,7 +272,7 @@ bool ScViewFunc::CopyToClip( ScDocument* pClipDoc, const ScRangeList& rRanges, b
ScTransferObj* pTransferObj = new ScTransferObj( pClipDoc, aObjDesc );
uno::Reference<datatransfer::XTransferable> xTransferable( pTransferObj );
- if ( ScGlobal::xDrawClipDocShellRef.Is() )
+ if ( ScGlobal::xDrawClipDocShellRef.is() )
{
SfxObjectShellRef aPersistRef( ScGlobal::xDrawClipDocShellRef.get() );
pTransferObj->SetDrawPersist( aPersistRef );// keep persist for ole objects alive
@@ -381,7 +381,7 @@ bool ScViewFunc::CopyToClip( ScDocument* pClipDoc, const ScRangeList& rRanges, b
ScTransferObj* pTransferObj = new ScTransferObj( pDocClip.release(), aObjDesc );
uno::Reference<datatransfer::XTransferable> xTransferable( pTransferObj );
- if ( ScGlobal::xDrawClipDocShellRef.Is() )
+ if ( ScGlobal::xDrawClipDocShellRef.is() )
{
SfxObjectShellRef aPersistRef( ScGlobal::xDrawClipDocShellRef.get() );
pTransferObj->SetDrawPersist( aPersistRef ); // keep persist for ole objects alive
diff --git a/sc/source/ui/view/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx
index 48c322485a35..1076636ec120 100644
--- a/sc/source/ui/view/viewfun4.cxx
+++ b/sc/source/ui/view/viewfun4.cxx
@@ -161,12 +161,12 @@ void ScViewFunc::PasteRTF( SCCOL nStartCol, SCROW nStartRow,
OUString aStr;
tools::SvRef<SotStorageStream> xStream;
- if ( aDataHelper.GetSotStorageStream( SotClipboardFormatId::RTF, xStream ) && xStream.Is() )
+ if ( aDataHelper.GetSotStorageStream( SotClipboardFormatId::RTF, xStream ) && xStream.is() )
// mba: clipboard always must contain absolute URLs (could be from alien source)
aImpEx.ImportStream( *xStream, OUString(), SotClipboardFormatId::RTF );
else if ( aDataHelper.GetString( SotClipboardFormatId::RTF, aStr ) )
aImpEx.ImportString( aStr, SotClipboardFormatId::RTF );
- else if ( aDataHelper.GetSotStorageStream( SotClipboardFormatId::RICHTEXT, xStream ) && xStream.Is() )
+ else if ( aDataHelper.GetSotStorageStream( SotClipboardFormatId::RICHTEXT, xStream ) && xStream.is() )
aImpEx.ImportStream( *xStream, OUString(), SotClipboardFormatId::RICHTEXT );
else if ( aDataHelper.GetString( SotClipboardFormatId::RICHTEXT, aStr ) )
aImpEx.ImportString( aStr, SotClipboardFormatId::RICHTEXT );
diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx
index 6f1cc0646ecd..ac66ce82421e 100644
--- a/sc/source/ui/view/viewfun5.cxx
+++ b/sc/source/ui/view/viewfun5.cxx
@@ -164,7 +164,7 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId nFormatId,
}
xDocShRef->DoClose();
- xDocShRef.Clear();
+ xDocShRef.clear();
}
else
{
@@ -298,7 +298,7 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId nFormatId,
OUString aStr;
tools::SvRef<SotStorageStream> xStream;
- if ( aDataHelper.GetSotStorageStream( nFormatId, xStream ) && xStream.Is() )
+ if ( aDataHelper.GetSotStorageStream( nFormatId, xStream ) && xStream.is() )
{
if (nFormatId == SotClipboardFormatId::HTML)
{