Kaydet (Commit) 46baf01c authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Improved loplugin:cstylecast to reference types: cui

Change-Id: I3473b5d90b91f73e3bc30a7a7c6035f7de7657d6
üst f41eea85
......@@ -337,7 +337,7 @@ void SvxHpLinkDlg::SetPage ( SvxHyperlinkItem* pItem )
IconChoicePage* pPage = GetTabPage (nPageId);
if(pPage)
{
SfxItemSet& aPageSet = (SfxItemSet&)pPage->GetItemSet ();
SfxItemSet& aPageSet = const_cast<SfxItemSet&>(pPage->GetItemSet ());
aPageSet.Put ( *pItem );
pCurrentPage->Reset( aPageSet );
......
......@@ -448,7 +448,7 @@ void SvxHyperlinkTabPageBase::Reset( const SfxItemSet& rItemSet)
FillStandardDlgFields (pHyperlinkItem);
// set all other fields
FillDlgFields ( (OUString&)pHyperlinkItem->GetURL() );
FillDlgFields ( pHyperlinkItem->GetURL() );
// Store initial URL
maStrInitURL = pHyperlinkItem->GetURL();
......
......@@ -591,7 +591,7 @@ void SvBaseLinksDlg::SetManager( LinkManager* pNewMgr )
if( pLinkMgr )
{
SvBaseLinks& rLnks = (SvBaseLinks&)pLinkMgr->GetLinks();
SvBaseLinks& rLnks = const_cast<SvBaseLinks&>(pLinkMgr->GetLinks());
for( size_t n = 0; n < rLnks.size(); ++n )
{
tools::SvRef<SvBaseLink>& rLinkRef = rLnks[ n ];
......
......@@ -111,8 +111,8 @@ SotClipboardFormatId SvPasteObjectDialog::GetFormat( const TransferableDataHelpe
ObjectLB().SetUpdateMode( false );
DataFlavorExVector::iterator aIter( ((DataFlavorExVector&)*pFormats).begin() ),
aEnd( ((DataFlavorExVector&)*pFormats).end() );
DataFlavorExVector::iterator aIter( const_cast<DataFlavorExVector&>(*pFormats).begin() ),
aEnd( const_cast<DataFlavorExVector&>(*pFormats).end() );
while( aIter != aEnd )
{
SotClipboardFormatId nFormat = (*aIter++).mnSotId;
......
......@@ -198,7 +198,7 @@ void SfxMacroTabPage::ScriptChanged()
bool SfxMacroTabPage::FillItemSet( SfxItemSet* rSet )
{
SvxMacroItem aItem( GetWhich( aPageRg[0] ) );
((SvxMacroTableDtor&)aItem.GetMacroTable()) = aTbl;
const_cast<SvxMacroTableDtor&>(aItem.GetMacroTable()) = aTbl;
const SfxPoolItem* pItem;
if( SfxItemState::SET != GetItemSet().GetItemState( aItem.Which(), true, &pItem )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment