From 0f8a30318695447e205b17fb0af06362ab890bc3 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 8 Sep 2016 10:21:09 +0200 Subject: loplugin:constantparam in sw Change-Id: Ibae4cac28e6ff52298c804519f683017729c07a5 --- sw/inc/ccoll.hxx | 2 +- sw/inc/crsrsh.hxx | 13 ++----------- sw/inc/dbmgr.hxx | 3 +-- sw/inc/doc.hxx | 10 +++++----- sw/inc/docstyle.hxx | 3 +-- sw/inc/editsh.hxx | 5 +---- sw/source/core/crsr/crsrsh.cxx | 33 ++++----------------------------- sw/source/core/docnode/ndtbl.cxx | 32 +++++--------------------------- sw/source/core/docnode/ndtbl1.cxx | 2 +- sw/source/core/edit/editsh.cxx | 4 ++-- sw/source/core/edit/edtab.cxx | 6 ++---- sw/source/core/frmedt/fetab.cxx | 8 ++++---- sw/source/ui/dbui/dbinsdlg.cxx | 2 +- sw/source/uibase/app/docstyle.cxx | 15 +++++++-------- sw/source/uibase/chrdlg/ccoll.cxx | 5 ++--- sw/source/uibase/dbui/dbmgr.cxx | 8 +++----- sw/source/uibase/shells/basesh.cxx | 4 ++-- sw/source/uibase/wrtsh/select.cxx | 2 +- 18 files changed, 45 insertions(+), 112 deletions(-) diff --git a/sw/inc/ccoll.hxx b/sw/inc/ccoll.hxx index 313609c44c8a..3048ca91facc 100644 --- a/sw/inc/ccoll.hxx +++ b/sw/inc/ccoll.hxx @@ -48,7 +48,7 @@ class SW_DLLPUBLIC SwCondCollItem : public SfxPoolItem OUString m_sStyles[COND_COMMAND_COUNT]; public: - SwCondCollItem(sal_uInt16 nWhich = FN_COND_COLL); + SwCondCollItem(); virtual ~SwCondCollItem(); diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx index 82671bfbb965..dde40132e064 100644 --- a/sw/inc/crsrsh.hxx +++ b/sw/inc/crsrsh.hxx @@ -271,18 +271,9 @@ protected: /* * Compare-Methode for the StackCursor and the current Cursor. - * The Methods return -1, 0, 1 for lower, equal, greater. The enum - * CursorCompareType says which position is compared. + * The Methods return -1, 0, 1 for lower, equal, greater. */ - enum CursorCompareType { - StackPtStackMk, - StackPtCurrPt, - StackPtCurrMk, - StackMkCurrPt, - StackMkCurrMk, - CurrPtCurrMk - }; - int CompareCursor( CursorCompareType eType ) const; + int CompareCursorStackMkCurrPt() const; bool SelTableRowOrCol( bool bRow, bool bRowSimple = false ); diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx index 399414944de8..5ae985d9f947 100644 --- a/sw/inc/dbmgr.hxx +++ b/sw/inc/dbmgr.hxx @@ -256,8 +256,7 @@ friend class SwConnectionDisposedListener_Impl; /// Run the mail merge for defined modes, except DBMGR_MERGE SAL_DLLPRIVATE bool MergeMailFiles( SwWrtShell* pSh, - const SwMergeDescriptor& rMergeDescriptor, - vcl::Window* pParent ); + const SwMergeDescriptor& rMergeDescriptor ); SAL_DLLPRIVATE bool ToNextMergeRecord(); SAL_DLLPRIVATE bool IsValidMergeRecord() const; diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 43472540dc0b..793f6d2ebaed 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -1223,11 +1223,11 @@ public: static void GetTabCols( SwTabCols &rFill, const SwCursor* pCursor, const SwCellFrame* pBoxFrame ); void SetTabCols( const SwTabCols &rNew, bool bCurRowOnly, - const SwCursor* pCursor, const SwCellFrame* pBoxFrame ); + const SwCellFrame* pBoxFrame ); static void GetTabRows( SwTabCols &rFill, const SwCursor* pCursor, const SwCellFrame* pBoxFrame ); - void SetTabRows( const SwTabCols &rNew, bool bCurColOnly, const SwCursor* pCursor, - const SwCellFrame* pBoxFrame ); + void SetTabRows( const SwTabCols &rNew, bool bCurColOnly, + const SwCellFrame* pBoxFrame ); // Direct access for UNO. void SetTabCols(SwTable& rTab, const SwTabCols &rNew, const SwTabCols &rOld, @@ -1247,8 +1247,8 @@ public: const SwTableAutoFormatTable& GetTableStyles() const { return *mpTableStyles.get(); } // Create a new table style. Tracked by Undo. SwTableAutoFormat* MakeTableStyle(const OUString& rName, bool bBroadcast = false); - // Delete table style named rName. If pAffectedTables is not null, it contains pointers to affected tables. Tracked by undo. - std::unique_ptr DelTableStyle(const OUString& rName, bool bBroadcast = false, std::vector* pAffectedTables = nullptr); + // Delete table style named rName. Tracked by undo. + std::unique_ptr DelTableStyle(const OUString& rName, bool bBroadcast = false); // Change (replace) a table style named rName. Tracked by undo. void ChgTableStyle(const OUString& rName, const SwTableAutoFormat& rNewFormat); diff --git a/sw/inc/docstyle.hxx b/sw/inc/docstyle.hxx index 1eebe05d3988..c8b526fe5196 100644 --- a/sw/inc/docstyle.hxx +++ b/sw/inc/docstyle.hxx @@ -77,8 +77,7 @@ protected: public: SwDocStyleSheet( SwDoc& rDoc, const OUString& rName, - SwDocStyleSheetPool* pPool, - SfxStyleFamily eFam); + SwDocStyleSheetPool* pPool); SwDocStyleSheet( const SwDocStyleSheet& ); diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx index 2105e224f8dc..aef018e0377b 100644 --- a/sw/inc/editsh.hxx +++ b/sw/inc/editsh.hxx @@ -626,8 +626,7 @@ public: /// Re-read if graphic is not ok. Current graphic is replaced by the new one. void ReRead( const OUString& rGrfName, const OUString& rFltName, - const Graphic* pGraphic = nullptr, - const GraphicObject* pGrafObj = nullptr ); + const Graphic* pGraphic = nullptr ); /// Unique identification of object (for ImageMapDlg). void *GetIMapInventor() const; @@ -685,7 +684,6 @@ public: const SwTable& InsertTable( const SwInsertTableOptions& rInsTableOpts, ///< ALL_TBL_INS_ATTR sal_uInt16 nRows, sal_uInt16 nCols, - sal_Int16 eAdj = css::text::HoriOrientation::FULL, const SwTableAutoFormat* pTAFormat = nullptr ); void InsertDDETable( const SwInsertTableOptions& rInsTableOpts, ///< HEADLINE_NO_BORDER @@ -698,7 +696,6 @@ public: SwFrameFormat *GetTableFormat(); bool TextToTable( const SwInsertTableOptions& rInsTableOpts, ///< ALL_TBL_INS_ATTR sal_Unicode cCh, - sal_Int16 eAdj = css::text::HoriOrientation::FULL, const SwTableAutoFormat* pTAFormat = nullptr ); bool TableToText( sal_Unicode cCh ); bool IsTextToTableAvailable() const; diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 0e157784f126..2ed618749340 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -1027,41 +1027,16 @@ void SwCursorShell::KillPams() UpdateCursor( SwCursorShell::SCROLLWIN ); } -int SwCursorShell::CompareCursor( CursorCompareType eType ) const +int SwCursorShell::CompareCursorStackMkCurrPt() const { int nRet = 0; const SwPosition *pFirst = nullptr, *pSecond = nullptr; const SwPaM *pCur = GetCursor(), *pStack = m_pCursorStack; // cursor on stack is needed if we compare against stack - if( pStack || ( eType == CurrPtCurrMk ) ) + if( pStack ) { - switch ( eType) - { - case StackPtStackMk: - pFirst = pStack->GetPoint(); - pSecond = pStack->GetMark(); - break; - case StackPtCurrPt: - pFirst = pStack->GetPoint(); - pSecond = pCur->GetPoint(); - break; - case StackPtCurrMk: - pFirst = pStack->GetPoint(); - pSecond = pCur->GetMark(); - break; - case StackMkCurrPt: - pFirst = pStack->GetMark(); - pSecond = pCur->GetPoint(); - break; - case StackMkCurrMk: - pFirst = pStack->GetMark(); - pSecond = pStack->GetMark(); - break; - case CurrPtCurrMk: - pFirst = pCur->GetPoint(); - pSecond = pCur->GetMark(); - break; - } + pFirst = pStack->GetMark(); + pSecond = pCur->GetPoint(); } if( !pFirst || !pSecond ) nRet = INT_MAX; diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index 1c928728ec75..936a5b512abd 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -2709,7 +2709,7 @@ void SwDoc::GetTabRows( SwTabCols &rFill, const SwCursor* , } void SwDoc::SetTabCols( const SwTabCols &rNew, bool bCurRowOnly, - const SwCursor* pCursor, const SwCellFrame* pBoxFrame ) + const SwCellFrame* pBoxFrame ) { const SwTableBox* pBox = nullptr; SwTabFrame *pTab = nullptr; @@ -2719,29 +2719,9 @@ void SwDoc::SetTabCols( const SwTabCols &rNew, bool bCurRowOnly, pTab = const_cast(static_cast(pBoxFrame))->ImplFindTabFrame(); pBox = pBoxFrame->GetTabBox(); } - else if( pCursor ) - { - const SwContentNode* pCNd = pCursor->GetContentNode(); - if( !pCNd ) - return ; - - Point aPt; - const SwShellCursor *pShCursor = dynamic_cast(pCursor); - if( pShCursor ) - aPt = pShCursor->GetPtPos(); - - const SwFrame* pTmpFrame = pCNd->getLayoutFrame( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false ); - do { - pTmpFrame = pTmpFrame->GetUpper(); - } while ( !pTmpFrame->IsCellFrame() ); - - pBoxFrame = static_cast(pTmpFrame); - pTab = const_cast(static_cast(pBoxFrame))->ImplFindTabFrame(); - pBox = pBoxFrame->GetTabBox(); - } - else if( !pCursor && !pBoxFrame ) + else { - OSL_ENSURE( false, "One of them needs to be specified!" ); + OSL_ENSURE( false, "must specify pBoxFrame" ); return ; } @@ -2784,7 +2764,7 @@ void SwDoc::SetTabCols( const SwTabCols &rNew, bool bCurRowOnly, SetTabCols(rTab, rNew, aOld, pBox, bCurRowOnly ); } -void SwDoc::SetTabRows( const SwTabCols &rNew, bool bCurColOnly, const SwCursor*, +void SwDoc::SetTabRows( const SwTabCols &rNew, bool bCurColOnly, const SwCellFrame* pBoxFrame ) { SwTabFrame *pTab; @@ -4635,7 +4615,7 @@ SwTableAutoFormat* SwDoc::MakeTableStyle(const OUString& rName, bool bBroadcast) return pTableFormat; } -std::unique_ptr SwDoc::DelTableStyle(const OUString& rName, bool bBroadcast, std::vector* pAffectedTables) +std::unique_ptr SwDoc::DelTableStyle(const OUString& rName, bool bBroadcast) { if (bBroadcast) BroadcastStyleOperation(rName, SfxStyleFamily::Table, SfxStyleSheetHintId::ERASED); @@ -4667,8 +4647,6 @@ std::unique_ptr SwDoc::DelTableStyle(const OUString& rName, b } } - if (pAffectedTables) - *pAffectedTables = vAffectedTables; return pReleasedFormat; } diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx index 6f197f4ff227..7d728a29ea93 100644 --- a/sw/source/core/docnode/ndtbl1.cxx +++ b/sw/source/core/docnode/ndtbl1.cxx @@ -1574,7 +1574,7 @@ void SwDoc::AdjustCellWidth( const SwCursor& rCursor, bool bBalance ) const sal_Int16 nOriHori = pFormat->GetHoriOrient().GetHoriOrient(); // We can leave the "real" work to the SwTable now - SetTabCols( aTabCols, false, nullptr, static_cast(pBoxFrame) ); + SetTabCols( aTabCols, false, static_cast(pBoxFrame) ); // Alignment might have been changed in SetTabCols; restore old value const SwFormatHoriOrient &rHori = pFormat->GetHoriOrient(); diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx index 1eb2e7d60e33..0a0057a17dc5 100644 --- a/sw/source/core/edit/editsh.cxx +++ b/sw/source/core/edit/editsh.cxx @@ -283,10 +283,10 @@ bool SwEditShell::GetGrfSize(Size& rSz) const /// Read again if graphic is not OK and replace old one void SwEditShell::ReRead( const OUString& rGrfName, const OUString& rFltName, - const Graphic* pGraphic, const GraphicObject* pGrfObj ) + const Graphic* pGraphic ) { StartAllAction(); - mpDoc->getIDocumentContentOperations().ReRead( *GetCursor(), rGrfName, rFltName, pGraphic, pGrfObj ); + mpDoc->getIDocumentContentOperations().ReRead( *GetCursor(), rGrfName, rFltName, pGraphic, nullptr ); EndAllAction(); } diff --git a/sw/source/core/edit/edtab.cxx b/sw/source/core/edit/edtab.cxx index befb2cb7d113..dc5cf373d007 100644 --- a/sw/source/core/edit/edtab.cxx +++ b/sw/source/core/edit/edtab.cxx @@ -92,7 +92,6 @@ bool ConvertTableToText( const SwTableNode *pConstTableNode, sal_Unicode cCh ) const SwTable& SwEditShell::InsertTable( const SwInsertTableOptions& rInsTableOpts, sal_uInt16 nRows, sal_uInt16 nCols, - sal_Int16 eAdj, const SwTableAutoFormat* pTAFormat ) { StartAllAction(); @@ -109,7 +108,7 @@ const SwTable& SwEditShell::InsertTable( const SwInsertTableOptions& rInsTableOp // from pPos to the new content nodes in the table. const SwTable *pTable = GetDoc()->InsertTable( rInsTableOpts, *pPos, nRows, nCols, - eAdj, pTAFormat, + css::text::HoriOrientation::FULL, pTAFormat, nullptr, true ); if( bEndUndo ) EndUndo( UNDO_END ); @@ -120,7 +119,6 @@ const SwTable& SwEditShell::InsertTable( const SwInsertTableOptions& rInsTableOp bool SwEditShell::TextToTable( const SwInsertTableOptions& rInsTableOpts, sal_Unicode cCh, - sal_Int16 eAdj, const SwTableAutoFormat* pTAFormat ) { SwWait aWait( *GetDoc()->GetDocShell(), true ); @@ -130,7 +128,7 @@ bool SwEditShell::TextToTable( const SwInsertTableOptions& rInsTableOpts, { if( rPaM.HasMark() ) bRet |= nullptr != GetDoc()->TextToTable( rInsTableOpts, rPaM, cCh, - eAdj, pTAFormat ); + css::text::HoriOrientation::FULL, pTAFormat ); } EndAllAction(); return bRet; diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx index 8fa6f8d3ff06..4ac0b77b2c5e 100644 --- a/sw/source/core/frmedt/fetab.cxx +++ b/sw/source/core/frmedt/fetab.cxx @@ -650,7 +650,7 @@ void SwFEShell::SetTabCols( const SwTabCols &rNew, bool bCurRowOnly ) pBox = pBox->GetUpper(); } while ( !pBox->IsCellFrame() ); - GetDoc()->SetTabCols( rNew, bCurRowOnly, nullptr, static_cast(pBox) ); + GetDoc()->SetTabCols( rNew, bCurRowOnly, static_cast(pBox) ); EndAllActionAndCall(); } @@ -691,7 +691,7 @@ void SwFEShell::SetTabRows( const SwTabCols &rNew, bool bCurColOnly ) pBox = pBox->GetUpper(); } while ( !pBox->IsCellFrame() ); - GetDoc()->SetTabRows( rNew, bCurColOnly, nullptr, static_cast(pBox) ); + GetDoc()->SetTabRows( rNew, bCurColOnly, static_cast(pBox) ); EndAllActionAndCall(); } @@ -709,7 +709,7 @@ void SwFEShell::SetMouseTabRows( const SwTabCols &rNew, bool bCurColOnly, const { SET_CURR_SHELL( this ); StartAllAction(); - GetDoc()->SetTabRows( rNew, bCurColOnly, nullptr, static_cast(pBox) ); + GetDoc()->SetTabRows( rNew, bCurColOnly, static_cast(pBox) ); EndAllActionAndCall(); } } @@ -2048,7 +2048,7 @@ void SwFEShell::SetMouseTabCols( const SwTabCols &rNew, bool bCurRowOnly, { SET_CURR_SHELL( this ); StartAllAction(); - GetDoc()->SetTabCols( rNew, bCurRowOnly, nullptr, static_cast(pBox) ); + GetDoc()->SetTabCols( rNew, bCurRowOnly, static_cast(pBox) ); EndAllActionAndCall(); } } diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx index 412a6670eacd..6145cdecc722 100644 --- a/sw/source/ui/dbui/dbinsdlg.cxx +++ b/sw/source/ui/dbui/dbinsdlg.cxx @@ -1035,7 +1035,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence& rSelection, bool bHTML = 0 != (::GetHtmlMode( pView->GetDocShell() ) & HTMLMODE_ON); rSh.InsertTable( pModOpt->GetInsTableFlags(bHTML), - nRows, nCols, text::HoriOrientation::FULL, (pSelection ? pTAutoFormat : nullptr) ); + nRows, nCols, (pSelection ? pTAutoFormat : nullptr) ); rSh.MoveTable( GotoPrevTable, fnTableStart ); if( pSelection && pTableSet ) diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx index f7a176a54d32..0203ee42c9d9 100644 --- a/sw/source/uibase/app/docstyle.cxx +++ b/sw/source/uibase/app/docstyle.cxx @@ -449,12 +449,11 @@ void SwStyleSheetIterator::SwPoolFormatList::Append( char cChar, const OUString& // UI-sided implementation of StyleSheets // uses the Core-Engine -SwDocStyleSheet::SwDocStyleSheet( SwDoc& rDocument, - const OUString& rName, - SwDocStyleSheetPool* _rPool, - SfxStyleFamily eFam) : +SwDocStyleSheet::SwDocStyleSheet( SwDoc& rDocument, + const OUString& rName, + SwDocStyleSheetPool* _rPool) : - SfxStyleSheetBase( rName, _rPool, eFam, 0 ), + SfxStyleSheetBase( rName, _rPool, SfxStyleFamily::Char, 0 ), pCharFormat(nullptr), pColl(nullptr), pFrameFormat(nullptr), @@ -2405,7 +2404,7 @@ void SwDocStyleSheet::SetHelpId( const OUString& r, sal_uLong nId ) // methods for DocStyleSheetPool SwDocStyleSheetPool::SwDocStyleSheetPool( SwDoc& rDocument, bool bOrg ) : SfxStyleSheetBasePool( rDocument.GetAttrPool() ) -, mxStyleSheet( new SwDocStyleSheet( rDocument, OUString(), this, SfxStyleFamily::Char ) ) +, mxStyleSheet( new SwDocStyleSheet( rDocument, OUString(), this ) ) , rDoc( rDocument ) { bOrganizer = bOrg; @@ -2654,8 +2653,8 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Find( const OUString& rName, SwStyleSheetIterator::SwStyleSheetIterator( SwDocStyleSheetPool* pBase, SfxStyleFamily eFam, sal_uInt16 n ) : SfxStyleSheetIterator( pBase, eFam, n ), - mxIterSheet( new SwDocStyleSheet( pBase->GetDoc(), OUString(), pBase, SfxStyleFamily::Char ) ), - mxStyleSheet( new SwDocStyleSheet( pBase->GetDoc(), OUString(), pBase, SfxStyleFamily::Char ) ) + mxIterSheet( new SwDocStyleSheet( pBase->GetDoc(), OUString(), pBase ) ), + mxStyleSheet( new SwDocStyleSheet( pBase->GetDoc(), OUString(), pBase ) ) { bFirstCalled = false; nLastPos = 0; diff --git a/sw/source/uibase/chrdlg/ccoll.cxx b/sw/source/uibase/chrdlg/ccoll.cxx index ed65626e3008..f3b13d03602f 100644 --- a/sw/source/uibase/chrdlg/ccoll.cxx +++ b/sw/source/uibase/chrdlg/ccoll.cxx @@ -131,10 +131,9 @@ const CommandStruct SwCondCollItem::aCmds[] = // Item for the transport of the condition table -SwCondCollItem::SwCondCollItem(sal_uInt16 _nWhich ) : - SfxPoolItem(_nWhich) +SwCondCollItem::SwCondCollItem() : + SfxPoolItem(FN_COND_COLL) { - } SwCondCollItem::~SwCondCollItem() diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index 14437bf5245f..0da5df7f63ea 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -550,7 +550,7 @@ bool SwDBManager::Merge( const SwMergeDescriptor& rMergeDesc ) case DBMGR_MERGE_FILE: case DBMGR_MERGE_SHELL: // save files and send them as e-Mail if required - bRet = MergeMailFiles(pWorkShell, rMergeDesc, nullptr); + bRet = MergeMailFiles(pWorkShell, rMergeDesc); break; default: @@ -1085,8 +1085,7 @@ uno::Reference< mail::XMailMessage > lcl_CreateMailFromDoc( * larger changes in this function! */ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell, - const SwMergeDescriptor& rMergeDescriptor, - vcl::Window* pParent) + const SwMergeDescriptor& rMergeDescriptor) { // deconstruct mail merge type for better readability. // uppercase naming is intentional! @@ -1213,8 +1212,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell, { // construct the process dialog pSourceWindow = &pSourceShell->GetView().GetEditWin(); - if( !pParent ) - pParent = pSourceWindow; + vcl::Window* pParent = pSourceWindow; if( !bMT_PRINTER ) pProgressDlg = VclPtr::Create( pParent, pParent != pSourceWindow ); diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx index 3bb4368b666c..c40a2eaa4ba3 100644 --- a/sw/source/uibase/shells/basesh.cxx +++ b/sw/source/uibase/shells/basesh.cxx @@ -893,7 +893,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) rSh.TableToText( cDelim ); else { - bInserted = rSh.TextToTable( aInsTableOpts, cDelim, text::HoriOrientation::FULL, pTAFormat ); + bInserted = rSh.TextToTable( aInsTableOpts, cDelim, pTAFormat ); } rSh.EnterStdMode(); @@ -2684,7 +2684,7 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest ) if( rSh.HasSelection() ) rSh.DelRight(); - rSh.InsertTable( aInsTableOpts, nRows, nCols, text::HoriOrientation::FULL, pTAFormat ); + rSh.InsertTable( aInsTableOpts, nRows, nCols, pTAFormat ); rSh.MoveTable( GotoPrevTable, fnTableStart ); if( !aTableName.isEmpty() && !rSh.GetTableStyle( aTableName ) ) diff --git a/sw/source/uibase/wrtsh/select.cxx b/sw/source/uibase/wrtsh/select.cxx index 2db60238eba3..8fb183c55c40 100644 --- a/sw/source/uibase/wrtsh/select.cxx +++ b/sw/source/uibase/wrtsh/select.cxx @@ -438,7 +438,7 @@ long SwWrtShell::ExtSelWrd(const Point *pPt, bool ) SwCursorShell::Push(); // save the cursor SwCursorShell::SetCursor( *pPt ); // and check the direction - switch( SwCursorShell::CompareCursor( StackMkCurrPt )) + switch( SwCursorShell::CompareCursorStackMkCurrPt()) { case -1: bToTop = false; break; case 1: bToTop = true; break; -- cgit v1.2.3