diff options
Diffstat (limited to 'sc/source/ui')
-rw-r--r-- | sc/source/ui/attrdlg/scdlgfact.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/attrdlg/scdlgfact.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/inc/inscodlg.hxx | 6 | ||||
-rw-r--r-- | sc/source/ui/inc/undoblk.hxx | 8 | ||||
-rw-r--r-- | sc/source/ui/inc/viewfunc.hxx | 12 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/inscodlg.cxx | 32 | ||||
-rw-r--r-- | sc/source/ui/undo/undoblk3.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/vba/excelvbahelper.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/vba/excelvbahelper.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/vba/vbarange.cxx | 18 | ||||
-rw-r--r-- | sc/source/ui/view/cellsh1.cxx | 8 | ||||
-rw-r--r-- | sc/source/ui/view/cliputil.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/viewfun2.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/view/viewfun3.cxx | 26 | ||||
-rw-r--r-- | sc/source/ui/view/viewfun5.cxx | 4 |
15 files changed, 65 insertions, 65 deletions
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx index 53f7363726a4..9fd856a41e90 100644 --- a/sc/source/ui/attrdlg/scdlgfact.cxx +++ b/sc/source/ui/attrdlg/scdlgfact.cxx @@ -302,7 +302,7 @@ InsertDeleteFlags AbstractScInsertContentsDlg_Impl::GetInsContentsCmdBits() cons return pDlg->GetInsContentsCmdBits(); } -sal_uInt16 AbstractScInsertContentsDlg_Impl::GetFormulaCmdBits() const +ScPasteFunc AbstractScInsertContentsDlg_Impl::GetFormulaCmdBits() const { return pDlg->GetFormulaCmdBits(); } diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx index 647c8d55de63..aa3cad460a85 100644 --- a/sc/source/ui/attrdlg/scdlgfact.hxx +++ b/sc/source/ui/attrdlg/scdlgfact.hxx @@ -209,7 +209,7 @@ class AbstractScInsertContentsDlg_Impl : public AbstractScInsertContentsDlg { DECL_ABSTDLG_BASE(AbstractScInsertContentsDlg_Impl, ScInsertContentsDlg) virtual InsertDeleteFlags GetInsContentsCmdBits() const SAL_OVERRIDE; - virtual sal_uInt16 GetFormulaCmdBits() const SAL_OVERRIDE; + virtual ScPasteFunc GetFormulaCmdBits() const SAL_OVERRIDE; virtual bool IsSkipEmptyCells() const SAL_OVERRIDE; virtual bool IsLink() const SAL_OVERRIDE; virtual void SetFillMode( bool bSet ) SAL_OVERRIDE; diff --git a/sc/source/ui/inc/inscodlg.hxx b/sc/source/ui/inc/inscodlg.hxx index 4c68cb053243..a36994dfdd8b 100644 --- a/sc/source/ui/inc/inscodlg.hxx +++ b/sc/source/ui/inc/inscodlg.hxx @@ -37,7 +37,7 @@ public: virtual void dispose() SAL_OVERRIDE; InsertDeleteFlags GetInsContentsCmdBits() const; - sal_uInt16 GetFormulaCmdBits() const; + ScPasteFunc GetFormulaCmdBits() const; bool IsSkipEmptyCells() const; bool IsTranspose() const; bool IsLink() const; @@ -84,7 +84,7 @@ private: bool bUsedShortCut; InsertDeleteFlags nShortCutInsContentsCmdBits; - sal_uInt16 nShortCutFormulaCmdBits; + ScPasteFunc nShortCutFormulaCmdBits; bool bShortCutSkipEmptyCells; bool bShortCutTranspose; bool bShortCutIsLink; @@ -93,7 +93,7 @@ private: static bool bPreviousAllCheck; static InsertDeleteFlags nPreviousChecks; static sal_uInt16 nPreviousChecks2; - static sal_uInt16 nPreviousFormulaChecks; + static ScPasteFunc nPreviousFormulaChecks; static sal_uInt16 nPreviousMoveMode; // enum InsCellCmd void DisableChecks( bool bInsAllChecked = true ); diff --git a/sc/source/ui/inc/undoblk.hxx b/sc/source/ui/inc/undoblk.hxx index 53111f41f997..4013805f0b1c 100644 --- a/sc/source/ui/inc/undoblk.hxx +++ b/sc/source/ui/inc/undoblk.hxx @@ -163,14 +163,14 @@ private: struct ScUndoPasteOptions { - sal_uInt16 nFunction; + ScPasteFunc nFunction; bool bSkipEmpty; bool bTranspose; bool bAsLink; InsCellCmd eMoveMode; ScUndoPasteOptions() : - nFunction( PASTE_NOFUNC ), + nFunction( ScPasteFunc::NONE ), bSkipEmpty( false ), bTranspose( false ), bAsLink( false ), @@ -293,7 +293,7 @@ public: SCCOL nStartX, SCROW nStartY, SCTAB nStartZ, SCCOL nEndX, SCROW nEndY, SCTAB nEndZ, ScDocument* pNewUndoDoc, bool bNewMulti, SCTAB nSrc, - InsertDeleteFlags nFlg, sal_uInt16 nFunc, bool bSkip, bool bLink ); + InsertDeleteFlags nFlg, ScPasteFunc nFunc, bool bSkip, bool bLink ); virtual ~ScUndoFillTable(); virtual void Undo() SAL_OVERRIDE; @@ -310,7 +310,7 @@ private: sal_uLong nStartChangeAction; sal_uLong nEndChangeAction; InsertDeleteFlags nFlags; - sal_uInt16 nFunction; + ScPasteFunc nFunction; SCTAB nSrcTab; bool bMulti; // Multi selection bool bSkipEmpty; diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx index 7b28d0ae5729..cbd8a391f4a1 100644 --- a/sc/source/ui/inc/viewfunc.hxx +++ b/sc/source/ui/inc/viewfunc.hxx @@ -105,13 +105,13 @@ public: bool bApi = false, bool bIncludeObjects = false, bool bStopEdit = true, bool bUseRangeForVBA = true ); ScTransferObj* CopyToTransferable(); SC_DLLPUBLIC bool PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc, - sal_uInt16 nFunction = PASTE_NOFUNC, bool bSkipEmpty = false, + ScPasteFunc nFunction = ScPasteFunc::NONE, bool bSkipEmpty = false, bool bTranspose = false, bool bAsLink = false, InsCellCmd eMoveMode = INS_NONE, InsertDeleteFlags nUndoExtraFlags = IDF_NONE, bool bAllowDialogs = false ); - void FillTab( InsertDeleteFlags nFlags, sal_uInt16 nFunction, bool bSkipEmpty, bool bAsLink ); + void FillTab( InsertDeleteFlags nFlags, ScPasteFunc nFunction, bool bSkipEmpty, bool bAsLink ); SC_DLLPUBLIC void PasteFromSystem(); SC_DLLPUBLIC bool PasteFromSystem( SotClipboardFormatId nFormatId, bool bApi = false ); @@ -119,8 +119,8 @@ public: ::com::sun::star::datatransfer::XTransferable >& rxTransferable ); void PasteDraw(); - void PasteDraw( const Point& rLogicPos, SdrModel* pModel, bool bGroup, - const OUString& rSrcShellID, const OUString& rDestShellID ); + void PasteDraw( const Point& rLogicPos, SdrModel* pModel, bool bGroup, + const OUString& rSrcShellID, const OUString& rDestShellID ); bool PasteOnDrawObjectLinked( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rxTransferable, @@ -341,11 +341,11 @@ private: const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rxTransferable ); - bool PasteMultiRangesFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc, sal_uInt16 nFunction, + bool PasteMultiRangesFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc, ScPasteFunc nFunction, bool bSkipEmpty, bool bTranspose, bool bAsLink, bool bAllowDialogs, InsCellCmd eMoveMode, InsertDeleteFlags nUndoFlags ); - bool PasteFromClipToMultiRanges( InsertDeleteFlags nFlags, ScDocument* pClipDoc, sal_uInt16 nFunction, + bool PasteFromClipToMultiRanges( InsertDeleteFlags nFlags, ScDocument* pClipDoc, ScPasteFunc nFunction, bool bSkipEmpty, bool bTranspose, bool bAsLink, bool bAllowDialogs, InsCellCmd eMoveMode, InsertDeleteFlags nUndoFlags ); diff --git a/sc/source/ui/miscdlgs/inscodlg.cxx b/sc/source/ui/miscdlgs/inscodlg.cxx index 9a7922a03821..e68c15962c08 100644 --- a/sc/source/ui/miscdlgs/inscodlg.cxx +++ b/sc/source/ui/miscdlgs/inscodlg.cxx @@ -25,7 +25,7 @@ bool ScInsertContentsDlg::bPreviousAllCheck = false; InsertDeleteFlags ScInsertContentsDlg::nPreviousChecks = (IDF_VALUE | IDF_DATETIME | IDF_STRING); -sal_uInt16 ScInsertContentsDlg::nPreviousFormulaChecks = PASTE_NOFUNC; +ScPasteFunc ScInsertContentsDlg::nPreviousFormulaChecks = ScPasteFunc::NONE; sal_uInt16 ScInsertContentsDlg::nPreviousChecks2 = 0; sal_uInt16 ScInsertContentsDlg::nPreviousMoveMode = INS_NONE; // enum InsCellCmd @@ -41,7 +41,7 @@ ScInsertContentsDlg::ScInsertContentsDlg( vcl::Window* pParent, bMoveRightDisabled( false ), bUsedShortCut ( false ), nShortCutInsContentsCmdBits( IDF_NONE ), - nShortCutFormulaCmdBits(0), + nShortCutFormulaCmdBits(ScPasteFunc::NONE), bShortCutSkipEmptyCells(false), bShortCutTranspose(false), bShortCutIsLink(false), @@ -98,11 +98,11 @@ ScInsertContentsDlg::ScInsertContentsDlg( vcl::Window* pParent, switch( ScInsertContentsDlg::nPreviousFormulaChecks ) { - case PASTE_NOFUNC: mpRbNoOp->Check(); break; - case PASTE_ADD: mpRbAdd->Check(); break; - case PASTE_SUB: mpRbSub->Check(); break; - case PASTE_MUL: mpRbMul->Check(); break; - case PASTE_DIV: mpRbDiv->Check(); break; + case ScPasteFunc::NONE: mpRbNoOp->Check(); break; + case ScPasteFunc::ADD: mpRbAdd->Check(); break; + case ScPasteFunc::SUB: mpRbSub->Check(); break; + case ScPasteFunc::MUL: mpRbMul->Check(); break; + case ScPasteFunc::DIV: mpRbDiv->Check(); break; } switch( ScInsertContentsDlg::nPreviousMoveMode ) @@ -312,7 +312,7 @@ IMPL_LINK_TYPED( ScInsertContentsDlg, ShortCutHdl, Button*, pBtn, void ) { bUsedShortCut = true; nShortCutInsContentsCmdBits = IDF_STRING | IDF_VALUE | IDF_DATETIME; - nShortCutFormulaCmdBits = PASTE_NOFUNC; + nShortCutFormulaCmdBits = ScPasteFunc::NONE; bShortCutSkipEmptyCells = false; bShortCutTranspose = false; bShortCutIsLink = false; @@ -323,7 +323,7 @@ IMPL_LINK_TYPED( ScInsertContentsDlg, ShortCutHdl, Button*, pBtn, void ) { bUsedShortCut = true; nShortCutInsContentsCmdBits = IDF_STRING | IDF_VALUE | IDF_DATETIME | IDF_ATTRIB; - nShortCutFormulaCmdBits = PASTE_NOFUNC; + nShortCutFormulaCmdBits = ScPasteFunc::NONE; bShortCutSkipEmptyCells = false; bShortCutTranspose = false; bShortCutIsLink = false; @@ -334,7 +334,7 @@ IMPL_LINK_TYPED( ScInsertContentsDlg, ShortCutHdl, Button*, pBtn, void ) { bUsedShortCut = true; nShortCutInsContentsCmdBits = IDF_ALL; - nShortCutFormulaCmdBits = PASTE_NOFUNC; + nShortCutFormulaCmdBits = ScPasteFunc::NONE; bShortCutSkipEmptyCells = false; bShortCutTranspose = true; bShortCutIsLink = false; @@ -403,17 +403,17 @@ void ScInsertContentsDlg::dispose() ModalDialog::dispose(); } -sal_uInt16 ScInsertContentsDlg::GetFormulaCmdBits() const +ScPasteFunc ScInsertContentsDlg::GetFormulaCmdBits() const { - ScInsertContentsDlg::nPreviousFormulaChecks = PASTE_NOFUNC; + ScInsertContentsDlg::nPreviousFormulaChecks = ScPasteFunc::NONE; if(mpRbAdd->IsChecked()) - ScInsertContentsDlg::nPreviousFormulaChecks = PASTE_ADD; + ScInsertContentsDlg::nPreviousFormulaChecks = ScPasteFunc::ADD; else if(mpRbSub->IsChecked()) - ScInsertContentsDlg::nPreviousFormulaChecks = PASTE_SUB; + ScInsertContentsDlg::nPreviousFormulaChecks = ScPasteFunc::SUB; else if(mpRbMul->IsChecked()) - ScInsertContentsDlg::nPreviousFormulaChecks = PASTE_MUL; + ScInsertContentsDlg::nPreviousFormulaChecks = ScPasteFunc::MUL; else if(mpRbDiv->IsChecked()) - ScInsertContentsDlg::nPreviousFormulaChecks = PASTE_DIV; + ScInsertContentsDlg::nPreviousFormulaChecks = ScPasteFunc::DIV; if (bUsedShortCut) return nShortCutFormulaCmdBits; return ScInsertContentsDlg::nPreviousFormulaChecks; diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx index b5cc16c67838..762797db0e42 100644 --- a/sc/source/ui/undo/undoblk3.cxx +++ b/sc/source/ui/undo/undoblk3.cxx @@ -224,7 +224,7 @@ ScUndoFillTable::ScUndoFillTable( ScDocShell* pNewDocShell, SCCOL nStartX, SCROW nStartY, SCTAB nStartZ, SCCOL nEndX, SCROW nEndY, SCTAB nEndZ, ScDocument* pNewUndoDoc, bool bNewMulti, SCTAB nSrc, - InsertDeleteFlags nFlg, sal_uInt16 nFunc, bool bSkip, bool bLink ) + InsertDeleteFlags nFlg, ScPasteFunc nFunc, bool bSkip, bool bLink ) : ScSimpleUndo( pNewDocShell ), aRange ( nStartX, nStartY, nStartZ, nEndX, nEndY, nEndZ ), aMarkData ( rMark ), diff --git a/sc/source/ui/vba/excelvbahelper.cxx b/sc/source/ui/vba/excelvbahelper.cxx index c42b9cdab83b..a8feafbef04c 100644 --- a/sc/source/ui/vba/excelvbahelper.cxx +++ b/sc/source/ui/vba/excelvbahelper.cxx @@ -186,7 +186,7 @@ implnCut( const uno::Reference< frame::XModel>& xModel ) } } -void implnPasteSpecial( const uno::Reference< frame::XModel>& xModel, InsertDeleteFlags nFlags, sal_uInt16 nFunction, bool bSkipEmpty, bool bTranspose) +void implnPasteSpecial( const uno::Reference< frame::XModel>& xModel, InsertDeleteFlags nFlags, ScPasteFunc nFunction, bool bSkipEmpty, bool bTranspose) { PasteCellsWarningReseter resetWarningBox; InsCellCmd eMoveMode = INS_NONE; diff --git a/sc/source/ui/vba/excelvbahelper.hxx b/sc/source/ui/vba/excelvbahelper.hxx index 82ac81002d28..a0b66de14845 100644 --- a/sc/source/ui/vba/excelvbahelper.hxx +++ b/sc/source/ui/vba/excelvbahelper.hxx @@ -41,7 +41,7 @@ void implSetZoom( const css::uno::Reference< css::frame::XModel >& xModel, sal_I void implnCopy( const css::uno::Reference< css::frame::XModel>& xModel ); void implnPaste ( const css::uno::Reference< css::frame::XModel>& xModel ); void implnCut( const css::uno::Reference< css::frame::XModel>& xModel ); -void implnPasteSpecial( const css::uno::Reference< css::frame::XModel>& xModel, InsertDeleteFlags nFlags, sal_uInt16 nFunction, bool bSkipEmpty, bool bTranspose); +void implnPasteSpecial( const css::uno::Reference< css::frame::XModel>& xModel, InsertDeleteFlags nFlags, ScPasteFunc nFunction, bool bSkipEmpty, bool bTranspose); ScTabViewShell* getBestViewShell( const css::uno::Reference< css::frame::XModel>& xModel ) ; ScDocShell* getDocShell( const css::uno::Reference< css::frame::XModel>& xModel ) ; ScTabViewShell* getCurrentBestViewShell( const css::uno::Reference< css::uno::XComponentContext >& xContext ); diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index 913de30eb7d9..29596bc4f5f1 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -2823,27 +2823,27 @@ static InsertDeleteFlags getPasteFlags (sal_Int32 Paste) return nFlags; } -static sal_uInt16 +static ScPasteFunc getPasteFormulaBits( sal_Int32 Operation) { - sal_uInt16 nFormulaBits = PASTE_NOFUNC ; + ScPasteFunc nFormulaBits = ScPasteFunc::NONE; switch (Operation) { case excel::XlPasteSpecialOperation::xlPasteSpecialOperationAdd: - nFormulaBits = PASTE_ADD;break; + nFormulaBits = ScPasteFunc::ADD; break; case excel::XlPasteSpecialOperation::xlPasteSpecialOperationSubtract: - nFormulaBits = PASTE_SUB;break; + nFormulaBits = ScPasteFunc::SUB;break; case excel::XlPasteSpecialOperation::xlPasteSpecialOperationMultiply: - nFormulaBits = PASTE_MUL;break; + nFormulaBits = ScPasteFunc::MUL;break; case excel::XlPasteSpecialOperation::xlPasteSpecialOperationDivide: - nFormulaBits = PASTE_DIV;break; + nFormulaBits = ScPasteFunc::DIV;break; case excel::XlPasteSpecialOperation::xlPasteSpecialOperationNone: default: - nFormulaBits = PASTE_NOFUNC; break; + nFormulaBits = ScPasteFunc::NONE; break; } -return nFormulaBits; + return nFormulaBits; } void SAL_CALL ScVbaRange::PasteSpecial( const uno::Any& Paste, const uno::Any& Operation, const uno::Any& SkipBlanks, const uno::Any& Transpose ) throw (::com::sun::star::uno::RuntimeException, std::exception) @@ -2875,7 +2875,7 @@ ScVbaRange::PasteSpecial( const uno::Any& Paste, const uno::Any& Operation, cons Transpose >>= bTranspose; InsertDeleteFlags nFlags = getPasteFlags(nPaste); - sal_uInt16 nFormulaBits = getPasteFormulaBits(nOperation); + ScPasteFunc nFormulaBits = getPasteFormulaBits(nOperation); excel::implnPasteSpecial(pShell->GetModel(), nFlags,nFormulaBits,bSkipBlanks,bTranspose); } diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx index b0484f9c77c8..106bc5c2b307 100644 --- a/sc/source/ui/view/cellsh1.cxx +++ b/sc/source/ui/view/cellsh1.cxx @@ -444,7 +444,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) case FID_FILL_TAB: { InsertDeleteFlags nFlags = IDF_NONE; - sal_uInt16 nFunction = PASTE_NOFUNC; + ScPasteFunc nFunction = ScPasteFunc::NONE; bool bSkipEmpty = false; bool bAsLink = false; @@ -1316,7 +1316,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) case FID_INS_CELL_CONTENTS: { InsertDeleteFlags nFlags = IDF_NONE; - sal_uInt16 nFunction = PASTE_NOFUNC; + ScPasteFunc nFunction = ScPasteFunc::NONE; InsCellCmd eMoveMode = INS_NONE; vcl::Window* pWin = GetViewData()->GetActiveWin(); @@ -1365,7 +1365,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) SFX_REQUEST_ARG( rReq, pLinkItem, SfxBoolItem, FN_PARAM_4, false ); SFX_REQUEST_ARG( rReq, pMoveItem, SfxInt16Item, FN_PARAM_5, false ); if ( pFuncItem ) - nFunction = pFuncItem->GetValue(); + nFunction = static_cast<ScPasteFunc>(pFuncItem->GetValue()); if ( pSkipItem ) bSkipEmpty = pSkipItem->GetValue(); if ( pTransposeItem ) @@ -1498,7 +1498,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) rReq.AppendItem( SfxBoolItem( FN_PARAM_2, bSkipEmpty ) ); rReq.AppendItem( SfxBoolItem( FN_PARAM_3, bTranspose ) ); rReq.AppendItem( SfxBoolItem( FN_PARAM_4, bAsLink ) ); - rReq.AppendItem( SfxUInt16Item( FN_PARAM_1, nFunction ) ); + rReq.AppendItem( SfxUInt16Item( FN_PARAM_1, static_cast<sal_uInt16>(nFunction) ) ); rReq.AppendItem( SfxInt16Item( FN_PARAM_5, (sal_Int16) eMoveMode ) ); rReq.Done(); } diff --git a/sc/source/ui/view/cliputil.cxx b/sc/source/ui/view/cliputil.cxx index 8b08840c6ba8..a1e52ffb70f6 100644 --- a/sc/source/ui/view/cliputil.cxx +++ b/sc/source/ui/view/cliputil.cxx @@ -65,7 +65,7 @@ void ScClipUtil::PasteFromClipboard( ScViewData* pViewData, ScTabViewShell* pTab nFlags &= ~IDF_FORMULA; pTabViewShell->PasteFromClip( nFlags, pClipDoc, - PASTE_NOFUNC, false, false, false, INS_NONE, IDF_NONE, + ScPasteFunc::NONE, false, false, false, INS_NONE, IDF_NONE, bShowDialog ); // allow warning dialog } } diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index 466eec0601a9..0c57a933e254 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -791,7 +791,7 @@ void ScViewFunc::EnterBlock( const OUString& rString, const EditTextObject* pDat pInsDoc->SetClipArea( ScRange(aPos) ); // insert Block, with Undo etc. - if ( PasteFromClip( IDF_CONTENTS, pInsDoc.get(), PASTE_NOFUNC, false, false, + if ( PasteFromClip( IDF_CONTENTS, pInsDoc.get(), ScPasteFunc::NONE, false, false, false, INS_NONE, IDF_ATTRIB ) ) { const SfxUInt32Item* pItem = static_cast<const SfxUInt32Item*>( pInsDoc->GetAttr( @@ -1418,7 +1418,7 @@ void ScViewFunc::CopyAutoSpellData( FillDir eDir, SCCOL nStartCol, SCROW nStartR } -void ScViewFunc::FillTab( InsertDeleteFlags nFlags, sal_uInt16 nFunction, bool bSkipEmpty, bool bAsLink ) +void ScViewFunc::FillTab( InsertDeleteFlags nFlags, ScPasteFunc nFunction, bool bSkipEmpty, bool bAsLink ) { //! allow source sheet to be protected ScEditableTester aTester( this ); diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx index 1ffe6ca227e6..8e17d82cdf80 100644 --- a/sc/source/ui/view/viewfun3.cxx +++ b/sc/source/ui/view/viewfun3.cxx @@ -463,7 +463,7 @@ void ScViewFunc::PasteFromSystem() // keep a reference in case the clipboard is changed during PasteFromClip uno::Reference<datatransfer::XTransferable> aOwnClipRef( pOwnClip ); PasteFromClip( IDF_ALL, pOwnClip->GetDocument(), - PASTE_NOFUNC, false, false, false, INS_NONE, IDF_NONE, + ScPasteFunc::NONE, false, false, false, INS_NONE, IDF_NONE, true ); // allow warning dialog } else if (pDrawClip) @@ -605,7 +605,7 @@ void ScViewFunc::PasteFromTransferable( const uno::Reference<datatransfer::XTran if (pOwnClip) { PasteFromClip( IDF_ALL, pOwnClip->GetDocument(), - PASTE_NOFUNC, false, false, false, INS_NONE, IDF_NONE, + ScPasteFunc::NONE, false, false, false, INS_NONE, IDF_NONE, true ); // allow warning dialog } else if (pDrawClip) @@ -700,7 +700,7 @@ bool ScViewFunc::PasteFromSystem( SotClipboardFormatId nFormatId, bool bApi ) // keep a reference in case the clipboard is changed during PasteFromClip uno::Reference<datatransfer::XTransferable> aOwnClipRef( pOwnClip ); PasteFromClip( IDF_ALL, pOwnClip->GetDocument(), - PASTE_NOFUNC, false, false, false, INS_NONE, IDF_NONE, + ScPasteFunc::NONE, false, false, false, INS_NONE, IDF_NONE, !bApi ); // allow warning dialog } else @@ -843,7 +843,7 @@ bool checkDestRangeForOverwrite(const ScRangeList& rDestRanges, const ScDocument } bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc, - sal_uInt16 nFunction, bool bSkipEmpty, + ScPasteFunc nFunction, bool bSkipEmpty, bool bTranspose, bool bAsLink, InsCellCmd eMoveMode, InsertDeleteFlags nUndoExtraFlags, bool bAllowDialogs ) @@ -1120,7 +1120,7 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc, { bool bAskIfNotEmpty = bAllowDialogs && ( nFlags & IDF_CONTENTS ) && - nFunction == PASTE_NOFUNC && + nFunction == ScPasteFunc::NONE && SC_MOD()->GetInputOptions().GetReplaceCellsWarn(); if ( bAskIfNotEmpty ) { @@ -1247,7 +1247,7 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc, // save original data in case of calculation std::unique_ptr<ScDocument> pMixDoc; - if (nFunction) + if (nFunction != ScPasteFunc::NONE) { bSkipEmpty = false; if ( nFlags & IDF_CONTENTS ) @@ -1431,7 +1431,7 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc, } bool ScViewFunc::PasteMultiRangesFromClip( - InsertDeleteFlags nFlags, ScDocument* pClipDoc, sal_uInt16 nFunction, + InsertDeleteFlags nFlags, ScDocument* pClipDoc, ScPasteFunc nFunction, bool bSkipEmpty, bool bTranspose, bool bAsLink, bool bAllowDialogs, InsCellCmd eMoveMode, InsertDeleteFlags nUndoFlags) { @@ -1488,7 +1488,7 @@ bool ScViewFunc::PasteMultiRangesFromClip( bool bAskIfNotEmpty = bAllowDialogs && (nFlags & IDF_CONTENTS) && - nFunction == PASTE_NOFUNC && SC_MOD()->GetInputOptions().GetReplaceCellsWarn(); + nFunction == ScPasteFunc::NONE && SC_MOD()->GetInputOptions().GetReplaceCellsWarn(); if (bAskIfNotEmpty) { @@ -1517,7 +1517,7 @@ bool ScViewFunc::PasteMultiRangesFromClip( } ::std::unique_ptr<ScDocument> pMixDoc; - if ( bSkipEmpty || nFunction ) + if ( bSkipEmpty || nFunction != ScPasteFunc::NONE) { if ( nFlags & IDF_CONTENTS ) { @@ -1589,7 +1589,7 @@ bool ScViewFunc::PasteMultiRangesFromClip( } bool ScViewFunc::PasteFromClipToMultiRanges( - InsertDeleteFlags nFlags, ScDocument* pClipDoc, sal_uInt16 nFunction, + InsertDeleteFlags nFlags, ScDocument* pClipDoc, ScPasteFunc nFunction, bool bSkipEmpty, bool bTranspose, bool bAsLink, bool bAllowDialogs, InsCellCmd eMoveMode, InsertDeleteFlags nUndoFlags ) { @@ -1646,7 +1646,7 @@ bool ScViewFunc::PasteFromClipToMultiRanges( bool bAskIfNotEmpty = bAllowDialogs && (nFlags & IDF_CONTENTS) && - nFunction == PASTE_NOFUNC && SC_MOD()->GetInputOptions().GetReplaceCellsWarn(); + nFunction == ScPasteFunc::NONE && SC_MOD()->GetInputOptions().GetReplaceCellsWarn(); if (bAskIfNotEmpty) { @@ -1667,7 +1667,7 @@ bool ScViewFunc::PasteFromClipToMultiRanges( } std::unique_ptr<ScDocument> pMixDoc; - if (bSkipEmpty || nFunction) + if (bSkipEmpty || nFunction != ScPasteFunc::NONE) { if (nFlags & IDF_CONTENTS) { @@ -1900,7 +1900,7 @@ bool ScViewFunc::LinkBlock( const ScRange& rSource, const ScAddress& rDestPos, b // Paste - PasteFromClip( IDF_ALL, pClipDoc.get(), PASTE_NOFUNC, false, false, true ); // as a link + PasteFromClip( IDF_ALL, pClipDoc.get(), ScPasteFunc::NONE, false, false, true ); // as a link return true; } diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx index edd2dd67adae..4b1c0c07bd5e 100644 --- a/sc/source/ui/view/viewfun5.cxx +++ b/sc/source/ui/view/viewfun5.cxx @@ -158,7 +158,7 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId nFormatId, SetCursor( nPosX, nPosY ); Unmark(); PasteFromClip( IDF_ALL, pClipDoc.get(), - PASTE_NOFUNC, false, false, false, INS_NONE, IDF_NONE, + ScPasteFunc::NONE, false, false, false, INS_NONE, IDF_NONE, bAllowDialogs ); bRet = true; } @@ -579,7 +579,7 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId nFormatId, pInsDoc->SetClipArea( aSource ); PasteFromClip( IDF_ALL, pInsDoc, - PASTE_NOFUNC, false, false, false, INS_NONE, IDF_NONE, + ScPasteFunc::NONE, false, false, false, INS_NONE, IDF_NONE, bAllowDialogs ); delete pInsDoc; |