summaryrefslogtreecommitdiff
path: root/sd/source
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 /sd/source
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 'sd/source')
-rw-r--r--sd/source/core/drawdoc3.cxx18
-rw-r--r--sd/source/filter/eppt/eppt.cxx8
-rw-r--r--sd/source/filter/ppt/pptin.cxx2
-rw-r--r--sd/source/filter/ppt/propread.cxx2
-rw-r--r--sd/source/filter/sdpptwrp.cxx2
-rw-r--r--sd/source/ui/app/sdmod.cxx2
-rw-r--r--sd/source/ui/app/sdxfer.cxx14
-rw-r--r--sd/source/ui/dlg/morphdlg.cxx4
-rw-r--r--sd/source/ui/dlg/sdtreelb.cxx4
-rw-r--r--sd/source/ui/dlg/vectdlg.cxx4
-rw-r--r--sd/source/ui/slidesorter/controller/SlsSlotManager.cxx2
-rw-r--r--sd/source/ui/view/sdview2.cxx2
-rw-r--r--sd/source/ui/view/sdview3.cxx6
13 files changed, 35 insertions, 35 deletions
diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx
index ec85bb7cb0a7..fbfb5883c73c 100644
--- a/sd/source/core/drawdoc3.cxx
+++ b/sd/source/core/drawdoc3.cxx
@@ -249,7 +249,7 @@ SdDrawDocument* SdDrawDocument::OpenBookmarkDoc(SfxMedium* pMedium)
CloseBookmarkDoc();
pBookmarkDoc = nullptr;
}
- else if (mxBookmarkDocShRef.Is())
+ else if (mxBookmarkDocShRef.is())
{
pBookmarkDoc = mxBookmarkDocShRef->GetDoc();
}
@@ -267,7 +267,7 @@ SdDrawDocument* SdDrawDocument::OpenBookmarkDoc(const OUString& rBookmarkFile)
std::unique_ptr<SfxMedium> xMedium(new SfxMedium(rBookmarkFile, StreamMode::READ));
pBookmarkDoc = OpenBookmarkDoc(xMedium.release());
}
- else if (mxBookmarkDocShRef.Is())
+ else if (mxBookmarkDocShRef.is())
{
pBookmarkDoc = mxBookmarkDocShRef->GetDoc();
}
@@ -301,7 +301,7 @@ void SdDrawDocument::InsertBookmark(
{
pBookmarkDoc = pBookmarkDocSh->GetDoc();
}
- else if ( mxBookmarkDocShRef.Is() )
+ else if ( mxBookmarkDocShRef.is() )
{
pBookmarkDoc = mxBookmarkDocShRef->GetDoc();
}
@@ -396,7 +396,7 @@ bool SdDrawDocument::InsertBookmarkAsPage(
aBookmarkName = pBookmarkDocSh->GetMedium()->GetName();
}
}
- else if ( mxBookmarkDocShRef.Is() )
+ else if ( mxBookmarkDocShRef.is() )
{
pBookmarkDoc = mxBookmarkDocShRef->GetDoc();
aBookmarkName = maBookmarkFile;
@@ -990,7 +990,7 @@ bool SdDrawDocument::InsertBookmarkAsObject(
{
pBookmarkDoc = pBookmarkDocSh->GetDoc();
}
- else if ( mxBookmarkDocShRef.Is() )
+ else if ( mxBookmarkDocShRef.is() )
{
pBookmarkDoc = mxBookmarkDocShRef->GetDoc();
}
@@ -1143,12 +1143,12 @@ bool SdDrawDocument::InsertBookmarkAsObject(
// Stops the bookmark insertion
void SdDrawDocument::CloseBookmarkDoc()
{
- if (mxBookmarkDocShRef.Is())
+ if (mxBookmarkDocShRef.is())
{
mxBookmarkDocShRef->DoClose();
}
- mxBookmarkDocShRef.Clear();
+ mxBookmarkDocShRef.clear();
maBookmarkFile.clear();
}
@@ -1164,12 +1164,12 @@ void SdDrawDocument::SetAllocDocSh(bool bAlloc)
{
mbAllocDocSh = bAlloc;
- if(mxAllocedDocShRef.Is())
+ if(mxAllocedDocShRef.is())
{
mxAllocedDocShRef->DoClose();
}
- mxAllocedDocShRef.Clear();
+ mxAllocedDocShRef.clear();
}
// Return list of CustomShows (create it, too, if necessary)
diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx
index 96556e6280a7..616a4c7478f4 100644
--- a/sd/source/filter/eppt/eppt.cxx
+++ b/sd/source/filter/eppt/eppt.cxx
@@ -101,7 +101,7 @@ PPTWriter::PPTWriter( tools::SvRef<SotStorage>& rSvStorage,
void PPTWriter::exportPPTPre( const std::vector< css::beans::PropertyValue >& rMediaData )
{
- if ( !mrStg.Is() )
+ if ( !mrStg.is() )
return;
// master pages + slides and notes + notes master page
@@ -1451,13 +1451,13 @@ extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL SaveVBA( SfxObjectShell& rDocS
aMSVBas.SaveOrDelMSVBAStorage( true, "_MS_VBA_Overhead" );
tools::SvRef<SotStorage> xOverhead = xDest->OpenSotStorage( "_MS_VBA_Overhead" );
- if ( xOverhead.Is() && ( xOverhead->GetError() == SVSTREAM_OK ) )
+ if ( xOverhead.is() && ( xOverhead->GetError() == SVSTREAM_OK ) )
{
tools::SvRef<SotStorage> xOverhead2 = xOverhead->OpenSotStorage( "_MS_VBA_Overhead" );
- if ( xOverhead2.Is() && ( xOverhead2->GetError() == SVSTREAM_OK ) )
+ if ( xOverhead2.is() && ( xOverhead2->GetError() == SVSTREAM_OK ) )
{
tools::SvRef<SotStorageStream> xTemp = xOverhead2->OpenSotStream( "_MS_VBA_Overhead2" );
- if ( xTemp.Is() && ( xTemp->GetError() == SVSTREAM_OK ) )
+ if ( xTemp.is() && ( xTemp->GetError() == SVSTREAM_OK ) )
{
sal_uInt32 nLen = xTemp->GetSize();
if ( nLen )
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index cb3283935a3e..d1ae32eb4e21 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -2763,7 +2763,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL TestImportPPT(const OUString &rURL
return false;
tools::SvRef<SotStorageStream> xDocStream(xStorage->OpenSotStream( "PowerPoint Document", StreamMode::STD_READ));
- if ( !xDocStream.Is() )
+ if ( !xDocStream.is() )
return false;
SdDLL::Init();
diff --git a/sd/source/filter/ppt/propread.cxx b/sd/source/filter/ppt/propread.cxx
index d567b2c77855..8eb2daf523e2 100644
--- a/sd/source/filter/ppt/propread.cxx
+++ b/sd/source/filter/ppt/propread.cxx
@@ -543,7 +543,7 @@ PropRead::PropRead( SotStorage& rStorage, const OUString& rName ) :
if ( rStorage.IsStream( rName ) )
{
mpSvStream = rStorage.OpenSotStream( rName, StreamMode::STD_READ );
- if ( mpSvStream.Is() )
+ if ( mpSvStream.is() )
{
mpSvStream->SetEndian( SvStreamEndian::LITTLE );
memset( mApplicationCLSID, 0, 16 );
diff --git a/sd/source/filter/sdpptwrp.cxx b/sd/source/filter/sdpptwrp.cxx
index d64a1e145005..b66cd3f2294c 100644
--- a/sd/source/filter/sdpptwrp.cxx
+++ b/sd/source/filter/sdpptwrp.cxx
@@ -144,7 +144,7 @@ bool SdPPTFilter::Export()
ExportPPTPointer PPTExport = ExportPPT;
#endif
- if( PPTExport && xStorRef.Is() )
+ if( PPTExport && xStorRef.is() )
{
sal_uInt32 nCnvrtFlags = 0;
const SvtFilterOptions& rFilterOptions = SvtFilterOptions::Get();
diff --git a/sd/source/ui/app/sdmod.cxx b/sd/source/ui/app/sdmod.cxx
index bd0249929db0..27ec957c04f5 100644
--- a/sd/source/ui/app/sdmod.cxx
+++ b/sd/source/ui/app/sdmod.cxx
@@ -174,7 +174,7 @@ tools::SvRef<SotStorageStream> SdModule::GetOptionStream( const OUString& rOptio
{
DocumentType eType = pDocSh->GetDoc()->GetDocumentType();
- if( !xOptionStorage.Is() )
+ if( !xOptionStorage.is() )
{
INetURLObject aURL( SvtPathOptions().GetUserConfigPath() );
diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx
index 4e512d410aa2..3a5f63fa5a13 100644
--- a/sd/source/ui/app/sdxfer.cxx
+++ b/sd/source/ui/app/sdxfer.cxx
@@ -125,14 +125,14 @@ SdTransferable::~SdTransferable()
delete mpOLEDataHelper;
- if( maDocShellRef.Is() )
+ if( maDocShellRef.is() )
{
SfxObjectShell* pObj = maDocShellRef.get();
::sd::DrawDocShell* pDocSh = static_cast< ::sd::DrawDocShell*>(pObj);
pDocSh->DoClose();
}
- maDocShellRef.Clear();
+ maDocShellRef.clear();
if( mbOwnDocument )
delete mpSdDrawDocumentIntern;
@@ -287,10 +287,10 @@ void SdTransferable::CreateData()
if( mpSourceDoc )
mpSourceDoc->CreatingDataObj(nullptr);
- if( !maDocShellRef.Is() && mpSdDrawDocumentIntern->GetDocSh() )
+ if( !maDocShellRef.is() && mpSdDrawDocumentIntern->GetDocSh() )
maDocShellRef = mpSdDrawDocumentIntern->GetDocSh();
- if( !maDocShellRef.Is() )
+ if( !maDocShellRef.is() )
{
OSL_FAIL( "SdTransferable::CreateData(), failed to create a model with persist, clipboard operation will fail for OLE objects!" );
mbOwnDocument = true;
@@ -499,7 +499,7 @@ bool SdTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDo
{
SfxObjectShellRef aOldRef( maDocShellRef );
- maDocShellRef.Clear();
+ maDocShellRef.clear();
if( mpSdViewIntern )
{
@@ -510,7 +510,7 @@ bool SdTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDo
bOK = SetObject( pDoc, SDTRANSFER_OBJECTTYPE_DRAWMODEL, rFlavor );
- if( maDocShellRef.Is() )
+ if( maDocShellRef.is() )
{
maDocShellRef->DoClose();
}
@@ -569,7 +569,7 @@ bool SdTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDo
SdrSwapGraphicsMode nOldSwapMode = mpSdDrawDocumentIntern->GetSwapGraphicsMode();
mpSdDrawDocumentIntern->SetSwapGraphicsMode( SdrSwapGraphicsMode::PURGE );
- if( !maDocShellRef.Is() )
+ if( !maDocShellRef.is() )
{
maDocShellRef = new ::sd::DrawDocShell(
mpSdDrawDocumentIntern,
diff --git a/sd/source/ui/dlg/morphdlg.cxx b/sd/source/ui/dlg/morphdlg.cxx
index bd3704be59a9..055059e931b3 100644
--- a/sd/source/ui/dlg/morphdlg.cxx
+++ b/sd/source/ui/dlg/morphdlg.cxx
@@ -84,7 +84,7 @@ void MorphDlg::LoadSettings()
sal_uInt16 nSteps;
bool bOrient, bAttrib;
- if( xIStm.Is() )
+ if( xIStm.is() )
{
SdIOCompat aCompat( *xIStm, StreamMode::READ );
@@ -106,7 +106,7 @@ void MorphDlg::SaveSettings() const
tools::SvRef<SotStorageStream> xOStm( SD_MOD()->GetOptionStream( SD_OPTION_MORPHING ,
SD_OPTION_STORE ) );
- if( xOStm.Is() )
+ if( xOStm.is() )
{
SdIOCompat aCompat( *xOStm, StreamMode::WRITE, 1 );
diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx
index c1c6bab04031..2e0f718e81cd 100644
--- a/sd/source/ui/dlg/sdtreelb.cxx
+++ b/sd/source/ui/dlg/sdtreelb.cxx
@@ -1002,10 +1002,10 @@ SdDrawDocument* SdPageObjsTLB::GetBookmarkDoc(SfxMedium* pMed)
*/
void SdPageObjsTLB::CloseBookmarkDoc()
{
- if (mxBookmarkDocShRef.Is())
+ if (mxBookmarkDocShRef.is())
{
mxBookmarkDocShRef->DoClose();
- mxBookmarkDocShRef.Clear();
+ mxBookmarkDocShRef.clear();
// Medium is owned by document, so it's destroyed already
mpOwnMedium = nullptr;
diff --git a/sd/source/ui/dlg/vectdlg.cxx b/sd/source/ui/dlg/vectdlg.cxx
index 32d9b2051945..1e991ac179b1 100644
--- a/sd/source/ui/dlg/vectdlg.cxx
+++ b/sd/source/ui/dlg/vectdlg.cxx
@@ -312,7 +312,7 @@ void SdVectorizeDlg::LoadSettings()
sal_uInt16 nFillHoles;
bool bFillHoles;
- if( xIStm.Is() )
+ if( xIStm.is() )
{
SdIOCompat aCompat( *xIStm, StreamMode::READ );
xIStm->ReadUInt16( nLayers ).ReadUInt16( nReduce ).ReadUInt16( nFillHoles ).ReadCharAsBool( bFillHoles );
@@ -339,7 +339,7 @@ void SdVectorizeDlg::SaveSettings() const
SD_OPTION_VECTORIZE ,
SD_OPTION_STORE ) );
- if( xOStm.Is() )
+ if( xOStm.is() )
{
SdIOCompat aCompat( *xOStm, StreamMode::WRITE, 1 );
xOStm->WriteUInt16( m_pNmLayers->GetValue() ).WriteUInt16( m_pMtReduce->GetValue() );
diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
index da82353cd0e4..2842a1e2a97d 100644
--- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
@@ -697,7 +697,7 @@ void SlotManager::GetClipboardState ( SfxItemSet& rSet)
|| rSet.GetItemState(SID_PASTE_SPECIAL) == SfxItemState::DEFAULT)
{
// no own clipboard data?
- if ( !pTransferClip || !pTransferClip->GetDocShell().Is() )
+ if ( !pTransferClip || !pTransferClip->GetDocShell().is() )
{
rSet.DisableItem(SID_PASTE);
rSet.DisableItem(SID_PASTE_SPECIAL);
diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx
index ccdf2ada88f6..1c693043badd 100644
--- a/sd/source/ui/view/sdview2.cxx
+++ b/sd/source/ui/view/sdview2.cxx
@@ -676,7 +676,7 @@ sal_Int8 View::ExecuteDrop( const ExecuteDropEvent& rEvt,
{
::tools::SvRef<SotStorageStream> xStm;
- if( aDataHelper.GetSotStorageStream( SotClipboardFormatId::XFA, xStm ) && xStm.Is() )
+ if( aDataHelper.GetSotStorageStream( SotClipboardFormatId::XFA, xStm ) && xStm.is() )
{
XFillExchangeData aFillData( XFillAttrSetItem( &mrDoc.GetPool() ) );
diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx
index 50146ced52b0..cb5dc0b44078 100644
--- a/sd/source/ui/view/sdview3.cxx
+++ b/sd/source/ui/view/sdview3.cxx
@@ -365,7 +365,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
// Paste only if SfxClassificationHelper recommends so.
const SfxObjectShellRef& pSource = pOwnData->GetDocShell();
SfxObjectShell* pDestination = mrDoc.GetDocSh();
- if (pSource.Is() && pDestination)
+ if (pSource.is() && pDestination)
{
SfxClassificationCheckPasteResult eResult = SfxClassificationHelper::CheckPaste(pSource->getDocProperties(), pDestination->getDocProperties());
if (!SfxClassificationHelper::ShowPasteInfo(eResult))
@@ -377,7 +377,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
{
const View* pSourceView = pOwnData->GetView();
- if( pOwnData->GetDocShell().Is() && pOwnData->IsPageTransferable() )
+ if( pOwnData->GetDocShell().is() && pOwnData->IsPageTransferable() )
{
mpClipboard->HandlePageDrop (*pOwnData);
bReturn = true;
@@ -919,7 +919,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
}
xDocShRef->DoClose();
- xDocShRef.Clear();
+ xDocShRef.clear();
}
else