coverity#1187656 Logically dead code

Change-Id: Id82a05b5de843d4695b0b3ef66fa103153b24d3a
This commit is contained in:
Caolán McNamara
2014-03-02 09:41:35 +00:00
parent 0e6f312659
commit a2bdb9ab23

View File

@@ -192,7 +192,7 @@ implnCut( const uno::Reference< frame::XModel>& xModel )
void implnPasteSpecial( const uno::Reference< frame::XModel>& xModel, sal_uInt16 nFlags, sal_uInt16 nFunction, bool bSkipEmpty, bool bTranspose) void implnPasteSpecial( const uno::Reference< frame::XModel>& xModel, sal_uInt16 nFlags, sal_uInt16 nFunction, bool bSkipEmpty, bool bTranspose)
{ {
PasteCellsWarningReseter resetWarningBox; PasteCellsWarningReseter resetWarningBox;
sal_Bool bAsLink(false), bOtherDoc(false); sal_Bool bOtherDoc(false);
InsCellCmd eMoveMode = INS_NONE; InsCellCmd eMoveMode = INS_NONE;
ScTabViewShell* pTabViewShell = getBestViewShell( xModel ); ScTabViewShell* pTabViewShell = getBestViewShell( xModel );
@@ -200,23 +200,18 @@ void implnPasteSpecial( const uno::Reference< frame::XModel>& xModel, sal_uInt16
{ {
ScViewData* pView = pTabViewShell->GetViewData(); ScViewData* pView = pTabViewShell->GetViewData();
Window* pWin = ( pView != NULL ) ? pView->GetActiveWin() : NULL; Window* pWin = ( pView != NULL ) ? pView->GetActiveWin() : NULL;
if ( pView && pWin ) if (pWin)
{
if ( bAsLink && bOtherDoc )
pTabViewShell->PasteFromSystem(0);//SOT_FORMATSTR_ID_LINK
else
{ {
ScTransferObj* pOwnClip = ScTransferObj::GetOwnClipboard( pWin ); ScTransferObj* pOwnClip = ScTransferObj::GetOwnClipboard( pWin );
ScDocument* pDoc = NULL; ScDocument* pDoc = NULL;
if ( pOwnClip ) if ( pOwnClip )
pDoc = pOwnClip->GetDocument(); pDoc = pOwnClip->GetDocument();
pTabViewShell->PasteFromClip( nFlags, pDoc, pTabViewShell->PasteFromClip( nFlags, pDoc,
nFunction, bSkipEmpty, bTranspose, bAsLink, nFunction, bSkipEmpty, bTranspose, false,
eMoveMode, IDF_NONE, true ); eMoveMode, IDF_NONE, true );
pTabViewShell->CellContentChanged(); pTabViewShell->CellContentChanged();
} }
} }
}
} }