sw: remove useless SET_CURR_SHELL macro
Perhaps it did something useful in the past, but it's better to expand it in its current form. Change-Id: I404e8d274f15a178f519d42a1ecd993c1e530f91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96384 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
This commit is contained in:
parent
35bb0594b2
commit
18ab61cd40
41 changed files with 198 additions and 202 deletions
|
@ -96,10 +96,6 @@ const sal_uInt8 MAXLEVEL = 10;
|
|||
|
||||
const sal_uInt8 NO_NUMLEVEL = 0x20; // "or" with the levels.
|
||||
|
||||
// Some helper functions as macros or inlines.
|
||||
|
||||
#define SET_CURR_SHELL( shell ) CurrShell aCurr( shell )
|
||||
|
||||
// pPathFinder is initialized by the UI.
|
||||
// The class delivers all paths needed.
|
||||
extern SwPathFinder *pPathFinder;
|
||||
|
|
|
@ -501,7 +501,7 @@ bool SwCursorShell::bColumnChange()
|
|||
|
||||
bool SwCursorShell::UpDown( bool bUp, sal_uInt16 nCnt )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
SwCallLink aLk( *this ); // watch Cursor-Moves; call Link if needed
|
||||
|
||||
bool bTableMode = IsTableMode();
|
||||
|
@ -532,7 +532,7 @@ bool SwCursorShell::UpDown( bool bUp, sal_uInt16 nCnt )
|
|||
bool SwCursorShell::LRMargin( bool bLeft, bool bAPI)
|
||||
{
|
||||
SwCallLink aLk( *this ); // watch Cursor-Moves; call Link if needed
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
m_eMvState = CursorMoveState::LeftMargin; // status for Cursor travelling - GetModelPositionForViewPoint
|
||||
|
||||
const bool bTableMode = IsTableMode();
|
||||
|
@ -638,7 +638,7 @@ bool SwCursorShell::MovePage( SwWhichPage fnWhichPage, SwPosPage fnPosPage )
|
|||
if( !m_pCurrentCursor->HasMark() || !m_pCurrentCursor->IsNoContent() )
|
||||
{
|
||||
SwCallLink aLk( *this ); // watch Cursor-Moves; call Link if needed
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
|
||||
SwCursorSaveState aSaveState( *m_pCurrentCursor );
|
||||
Point& rPt = m_pCurrentCursor->GetPtPos();
|
||||
|
@ -759,7 +759,7 @@ bool SwCursorShell::IsInHeaderFooter( bool* pbInHeader ) const
|
|||
|
||||
int SwCursorShell::SetCursor( const Point &rLPt, bool bOnlyText, bool bBlock )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
|
||||
SwShellCursor* pCursor = getShellCursor( bBlock );
|
||||
SwPosition aPos( *pCursor->GetPoint() );
|
||||
|
@ -991,7 +991,7 @@ bool SwCursorShell::TestCurrPam(
|
|||
const Point & rPt,
|
||||
bool bTstHit )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
|
||||
// check if the SPoint is in a table selection
|
||||
if( m_pTableCursor )
|
||||
|
@ -1186,7 +1186,7 @@ void collectUIInformation(const OUString& aPage)
|
|||
|
||||
bool SwCursorShell::GotoPage( sal_uInt16 nPage )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
SwCallLink aLk( *this ); // watch Cursor-Moves; call Link if needed
|
||||
SwCursorSaveState aSaveState( *m_pCurrentCursor );
|
||||
bool bRet = GetLayout()->SetCurrPage( m_pCurrentCursor, nPage ) &&
|
||||
|
@ -1208,7 +1208,7 @@ void SwCursorShell::GetCharRectAt(SwRect& rRect, const SwPosition* pPos)
|
|||
void SwCursorShell::GetPageNum( sal_uInt16 &rnPhyNum, sal_uInt16 &rnVirtNum,
|
||||
bool bAtCursorPos, const bool bCalcFrame )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
// page number: first visible page or the one at the cursor
|
||||
const SwContentFrame* pCFrame;
|
||||
const SwPageFrame *pPg = nullptr;
|
||||
|
@ -1227,7 +1227,7 @@ void SwCursorShell::GetPageNum( sal_uInt16 &rnPhyNum, sal_uInt16 &rnVirtNum,
|
|||
|
||||
sal_uInt16 SwCursorShell::GetPageNumSeqNonEmpty()
|
||||
{
|
||||
SET_CURR_SHELL(this);
|
||||
CurrShell aCurr(this);
|
||||
// page number: first visible page or the one at the cursor
|
||||
const SwContentFrame* pCFrame = GetCurrFrame(/*bCalcFrame*/true);
|
||||
const SwPageFrame* pPg = nullptr;
|
||||
|
@ -1251,7 +1251,7 @@ sal_uInt16 SwCursorShell::GetPageNumSeqNonEmpty()
|
|||
|
||||
sal_uInt16 SwCursorShell::GetNextPrevPageNum( bool bNext )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
// page number: first visible page or the one at the cursor
|
||||
const SwPageFrame *pPg = Imp()->GetFirstVisPage(GetOut());
|
||||
if( pPg )
|
||||
|
@ -1289,7 +1289,7 @@ sal_uInt16 SwCursorShell::GetNextPrevPageNum( bool bNext )
|
|||
|
||||
sal_uInt16 SwCursorShell::GetPageCnt()
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
// return number of pages
|
||||
return GetLayout()->GetPageNum();
|
||||
}
|
||||
|
@ -1358,7 +1358,7 @@ bool SwCursorShell::GoNextCursor()
|
|||
if( !m_pCurrentCursor->IsMultiSelection() )
|
||||
return false;
|
||||
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
SwCallLink aLk( *this ); // watch Cursor-Moves; call Link if needed
|
||||
m_pCurrentCursor = m_pCurrentCursor->GetNext();
|
||||
|
||||
|
@ -1377,7 +1377,7 @@ bool SwCursorShell::GoPrevCursor()
|
|||
if( !m_pCurrentCursor->IsMultiSelection() )
|
||||
return false;
|
||||
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
SwCallLink aLk( *this ); // watch Cursor-Moves; call Link if needed
|
||||
m_pCurrentCursor = m_pCurrentCursor->GetPrev();
|
||||
|
||||
|
@ -1407,7 +1407,7 @@ bool SwCursorShell::GoNextPrevCursorSetSearchLabel(const bool bNext)
|
|||
void SwCursorShell::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle &rRect)
|
||||
{
|
||||
comphelper::FlagRestorationGuard g(mbSelectAll, StartsWithTable() && ExtendedSelectedAll());
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
|
||||
// always switch off all cursors when painting
|
||||
SwRect aRect( rRect );
|
||||
|
@ -1452,7 +1452,7 @@ void SwCursorShell::Paint(vcl::RenderContext& rRenderContext, const tools::Recta
|
|||
|
||||
void SwCursorShell::VisPortChgd( const SwRect & rRect )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
bool bVis; // switch off all cursors when scrolling
|
||||
|
||||
// if a cursor is visible then hide the SV cursor
|
||||
|
@ -1486,7 +1486,7 @@ void SwCursorShell::VisPortChgd( const SwRect & rRect )
|
|||
*/
|
||||
void SwCursorShell::UpdateCursorPos()
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
++mnStartAction;
|
||||
SwShellCursor* pShellCursor = getShellCursor( true );
|
||||
Size aOldSz( GetDocSize() );
|
||||
|
@ -1566,7 +1566,7 @@ class SwNotifyAccAboutInvalidTextSelections
|
|||
|
||||
void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
ClearUpCursors();
|
||||
|
||||
if (ActionPend())
|
||||
|
@ -2363,7 +2363,7 @@ void SwCursorShell::HideCursors()
|
|||
// if cursor is visible then hide SV cursor
|
||||
if( m_pVisibleCursor->IsVisible() )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
m_pVisibleCursor->Hide();
|
||||
}
|
||||
// revoke inversion of SSelection
|
||||
|
@ -2376,7 +2376,7 @@ void SwCursorShell::ShowCursors( bool bCursorVis )
|
|||
if( !m_bHasFocus || m_bAllProtect || m_bBasicHideCursor )
|
||||
return;
|
||||
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
SwShellCursor* pCurrentCursor = m_pTableCursor ? m_pTableCursor : m_pCurrentCursor;
|
||||
pCurrentCursor->Show(nullptr);
|
||||
|
||||
|
@ -2408,7 +2408,7 @@ void SwCursorShell::HideCursor()
|
|||
{
|
||||
m_bSVCursorVis = false;
|
||||
// possibly reverse selected areas!!
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
m_pCurrentCursor->SetShowTextInputFieldOverlay( false );
|
||||
m_pVisibleCursor->Hide();
|
||||
|
||||
|
@ -2441,7 +2441,7 @@ void SwCursorShell::ShellGetFocus()
|
|||
/** Get current frame in which the cursor is positioned. */
|
||||
SwContentFrame *SwCursorShell::GetCurrFrame( const bool bCalcFrame ) const
|
||||
{
|
||||
SET_CURR_SHELL( const_cast<SwCursorShell*>(this) );
|
||||
CurrShell aCurr( const_cast<SwCursorShell*>(this) );
|
||||
SwContentFrame *pRet = nullptr;
|
||||
SwContentNode *pNd = m_pCurrentCursor->GetContentNode();
|
||||
if ( pNd )
|
||||
|
@ -2642,7 +2642,7 @@ bool SwCursorShell::ExtendSelection( bool bEnd, sal_Int32 nCount )
|
|||
*/
|
||||
bool SwCursorShell::SetVisibleCursor( const Point &rPt )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
Point aPt( rPt );
|
||||
SwPosition aPos( *m_pCurrentCursor->GetPoint() );
|
||||
SwCursorMoveState aTmpState( CursorMoveState::SetOnlyText );
|
||||
|
@ -2932,7 +2932,7 @@ SwCursorShell::SwCursorShell( SwCursorShell& rShell, vcl::Window *pInitWin )
|
|||
, m_nMarkedListLevel( 0 )
|
||||
, m_oldColFrame(nullptr)
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
// only keep the position of the current cursor of the copy shell
|
||||
m_pCurrentCursor = new SwShellCursor( *this, *(rShell.m_pCurrentCursor->GetPoint()) );
|
||||
m_pCurrentCursor->GetContentNode()->Add( this );
|
||||
|
@ -2969,7 +2969,7 @@ SwCursorShell::SwCursorShell( SwDoc& rDoc, vcl::Window *pInitWin,
|
|||
, m_nMarkedListLevel( 0 )
|
||||
, m_oldColFrame(nullptr)
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
// create initial cursor and set it to first content position
|
||||
SwNodes& rNds = rDoc.GetNodes();
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ void SwCursorShell::MoveCursorToNum()
|
|||
SwCursorSaveState aSaveState( *m_pCurrentCursor );
|
||||
if( ActionPend() )
|
||||
return;
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
// try to set cursor onto this position, at half of the char-
|
||||
// SRectangle's height
|
||||
Point aPt( m_pCurrentCursor->GetPtPos() );
|
||||
|
@ -136,7 +136,7 @@ bool SwCursorShell::GotoHeaderText()
|
|||
|
||||
if( pFrame )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
// get header frame
|
||||
SwCallLink aLk( *this ); // watch Cursor-Moves
|
||||
SwCursor *pTmpCursor = getShellCursor( true );
|
||||
|
@ -169,7 +169,7 @@ bool SwCursorShell::GotoFooterText()
|
|||
if( pLower )
|
||||
{
|
||||
SwCursor *pTmpCursor = getShellCursor( true );
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
// get position in footer
|
||||
SwCallLink aLk( *this ); // watch Cursor-Moves
|
||||
SwCursorSaveState aSaveState( *pTmpCursor );
|
||||
|
@ -195,7 +195,7 @@ bool SwCursorShell::SetCursorInHdFt( size_t nDescNo, bool bInHeader )
|
|||
SwDoc *pMyDoc = GetDoc();
|
||||
const SwPageDesc* pDesc = nullptr;
|
||||
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
|
||||
if( SIZE_MAX == nDescNo )
|
||||
{
|
||||
|
@ -515,7 +515,7 @@ bool SwCursorShell::GotoNxtPrvTableFormula( bool bNext, bool bOnlyErrors )
|
|||
|
||||
if( bFnd )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
SwCallLink aLk( *this ); // watch Cursor-Moves
|
||||
SwCursorSaveState aSaveState( *m_pCurrentCursor );
|
||||
|
||||
|
@ -619,7 +619,7 @@ bool SwCursorShell::GotoNxtPrvTOXMark( bool bNext )
|
|||
|
||||
if( bFnd )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
SwCallLink aLk( *this ); // watch Cursor-Moves
|
||||
SwCursorSaveState aSaveState( *m_pCurrentCursor );
|
||||
|
||||
|
@ -637,7 +637,7 @@ bool SwCursorShell::GotoNxtPrvTOXMark( bool bNext )
|
|||
const SwTOXMark& SwCursorShell::GotoTOXMark( const SwTOXMark& rStart,
|
||||
SwTOXSearch eDir )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
SwCallLink aLk( *this ); // watch Cursor-Moves
|
||||
SwCursorSaveState aSaveState( *m_pCurrentCursor );
|
||||
|
||||
|
@ -850,7 +850,7 @@ bool SwCursorShell::MoveFieldType(
|
|||
}
|
||||
const SetGetExpField& rFnd = **it;
|
||||
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
SwCallLink aLk( *this ); // watch Cursor-Moves
|
||||
SwCursorSaveState aSaveState( *pCursor );
|
||||
|
||||
|
@ -871,7 +871,7 @@ bool SwCursorShell::GotoFormatField( const SwFormatField& rField )
|
|||
|| !sw::IsFieldDeletedInModel(
|
||||
GetDoc()->getIDocumentRedlineAccess(), *pTextField)))
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
SwCallLink aLk( *this ); // watch Cursor-Moves
|
||||
|
||||
SwCursor* pCursor = getShellCursor( true );
|
||||
|
@ -1003,7 +1003,7 @@ void SwCursorShell::GotoOutline( SwOutlineNodes::size_type nIdx )
|
|||
{
|
||||
SwCursor* pCursor = getShellCursor( true );
|
||||
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
SwCallLink aLk( *this ); // watch Cursor-Moves
|
||||
SwCursorSaveState aSaveState( *pCursor );
|
||||
|
||||
|
@ -1020,7 +1020,7 @@ bool SwCursorShell::GotoOutline( const OUString& rName )
|
|||
{
|
||||
SwCursor* pCursor = getShellCursor( true );
|
||||
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
SwCallLink aLk( *this ); // watch Cursor-Moves
|
||||
SwCursorSaveState aSaveState( *pCursor );
|
||||
|
||||
|
@ -1088,7 +1088,7 @@ bool SwCursorShell::GotoNextOutline()
|
|||
SvxSearchDialogWrapper::SetSearchLabel( SearchLabel::Empty );
|
||||
}
|
||||
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
SwCallLink aLk( *this ); // watch Cursor-Moves
|
||||
SwCursorSaveState aSaveState( *pCursor );
|
||||
pCursor->GetPoint()->nNode = *pNd;
|
||||
|
@ -1148,7 +1148,7 @@ bool SwCursorShell::GotoPrevOutline()
|
|||
{
|
||||
SvxSearchDialogWrapper::SetSearchLabel( SearchLabel::Empty );
|
||||
}
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
SwCallLink aLk( *this ); // watch Cursor-Moves
|
||||
SwCursorSaveState aSaveState( *pCursor );
|
||||
pCursor->GetPoint()->nNode = *pNd;
|
||||
|
@ -1197,7 +1197,7 @@ bool SwCursorShell::MakeOutlineSel(SwOutlineNodes::size_type nSttPos, SwOutlineN
|
|||
if( rOutlNds.empty() )
|
||||
return false;
|
||||
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
SwCallLink aLk( *this ); // watch Cursor-Moves
|
||||
|
||||
if( nSttPos > nEndPos ) // parameters switched?
|
||||
|
@ -1250,7 +1250,7 @@ bool SwCursorShell::MakeOutlineSel(SwOutlineNodes::size_type nSttPos, SwOutlineN
|
|||
bool SwCursorShell::GotoRefMark( const OUString& rRefMark, sal_uInt16 nSubType,
|
||||
sal_uInt16 nSeqNo )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
SwCallLink aLk( *this ); // watch Cursor-Moves
|
||||
SwCursorSaveState aSaveState( *m_pCurrentCursor );
|
||||
|
||||
|
@ -1283,7 +1283,7 @@ bool SwCursorShell::GetContentAtPos( const Point& rPt,
|
|||
bool bSetCursor,
|
||||
SwRect* pFieldRect )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
bool bRet = false;
|
||||
|
||||
if( !IsTableMode() )
|
||||
|
@ -1973,7 +1973,7 @@ bool SwContentAtPos::IsInRTLText()const
|
|||
bool SwCursorShell::SelectText( const sal_Int32 nStart,
|
||||
const sal_Int32 nEnd )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
bool bRet = false;
|
||||
|
||||
SwCallLink aLk( *this );
|
||||
|
@ -1998,7 +1998,7 @@ bool SwCursorShell::SelectTextAttr( sal_uInt16 nWhich,
|
|||
bool bExpand,
|
||||
const SwTextAttr* pTextAttr )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
bool bRet = false;
|
||||
|
||||
if( !IsTableMode() )
|
||||
|
@ -2030,7 +2030,7 @@ bool SwCursorShell::GotoINetAttr( const SwTextINetFormat& rAttr )
|
|||
{
|
||||
SwCursor* pCursor = getShellCursor( true );
|
||||
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
SwCallLink aLk( *this ); // watch Cursor-Moves
|
||||
SwCursorSaveState aSaveState( *pCursor );
|
||||
|
||||
|
@ -2053,7 +2053,7 @@ bool SwCursorShell::GetShadowCursorPos( const Point& rPt, SwFillMode eFillMode,
|
|||
SwRect& rRect, sal_Int16& rOrient )
|
||||
{
|
||||
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
bool bRet = false;
|
||||
|
||||
if (!IsTableMode() && !HasSelection()
|
||||
|
@ -2079,7 +2079,7 @@ bool SwCursorShell::GetShadowCursorPos( const Point& rPt, SwFillMode eFillMode,
|
|||
|
||||
bool SwCursorShell::SetShadowCursorPos( const Point& rPt, SwFillMode eFillMode )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
bool bRet = false;
|
||||
|
||||
if (!IsTableMode() && !HasSelection()
|
||||
|
@ -2227,7 +2227,7 @@ const SwRangeRedline* SwCursorShell::SelNextRedline()
|
|||
const SwRangeRedline* pFnd = nullptr;
|
||||
if( !IsTableMode() )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
SwCallLink aLk( *this ); // watch Cursor-Moves
|
||||
SwCursorSaveState aSaveState( *m_pCurrentCursor );
|
||||
|
||||
|
@ -2247,7 +2247,7 @@ const SwRangeRedline* SwCursorShell::SelPrevRedline()
|
|||
const SwRangeRedline* pFnd = nullptr;
|
||||
if( !IsTableMode() )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
SwCallLink aLk( *this ); // watch Cursor-Moves
|
||||
SwCursorSaveState aSaveState( *m_pCurrentCursor );
|
||||
|
||||
|
@ -2340,7 +2340,7 @@ const SwRangeRedline* SwCursorShell::GotoRedline( SwRedlineTable::size_type nArr
|
|||
const SwRangeRedline* pFnd = nullptr;
|
||||
if( !IsTableMode() )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
|
||||
const SwRedlineTable& rTable = GetDoc()->getIDocumentRedlineAccess().GetRedlineTable();
|
||||
const SwRangeRedline* pTmp = rTable[ nArrPos ];
|
||||
|
@ -2544,7 +2544,7 @@ bool SwCursorShell::SelectNxtPrvHyperlink( bool bNext )
|
|||
const SwFlyFrameFormat* pFndFormat = aCmpPos.GetFlyFormat();
|
||||
if( pFndAttr || pFndFormat )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
SwCallLink aLk( *this );
|
||||
|
||||
// found a text attribute ?
|
||||
|
|
|
@ -76,7 +76,7 @@ void SwCursorShell::MoveColumn( SwWhichColumn fnWhichCol, SwPosColumn fnPosCol )
|
|||
SwContentFrame* pCnt = (*fnPosCol)( pLayFrame );
|
||||
if( pCnt )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
SwCallLink aLk( *this ); // watch Cursor-Moves; call Link if needed
|
||||
SwCursorSaveState aSaveState( *m_pCurrentCursor );
|
||||
|
||||
|
|
|
@ -343,7 +343,7 @@ bool SwCursorShell::GotoPrevFootnoteAnchor()
|
|||
/// jump from border to anchor
|
||||
void SwCursorShell::GotoFlyAnchor()
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
const SwFrame* pFrame = GetCurrFrame();
|
||||
do {
|
||||
pFrame = pFrame->GetUpper();
|
||||
|
|
|
@ -134,7 +134,7 @@ bool SwCursorShell::SelTableRowOrCol( bool bRow, bool bRowSimple )
|
|||
const SwTabFrame* pMasterTabFrame = pTabFrame->IsFollow() ? pTabFrame->FindMaster( true ) : pTabFrame;
|
||||
const SwTable* pTable = pTabFrame->GetTable();
|
||||
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
|
||||
const SwTableBox* pStt = nullptr;
|
||||
const SwTableBox* pEnd = nullptr;
|
||||
|
@ -260,7 +260,7 @@ bool SwCursorShell::SelTable()
|
|||
const SwTabFrame* pMasterTabFrame = pTableFrame->IsFollow() ? pTableFrame->FindMaster( true ) : pTableFrame;
|
||||
const SwTableNode* pTableNd = pTableFrame->GetTable()->GetTableNode();
|
||||
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
|
||||
if( !m_pTableCursor )
|
||||
{
|
||||
|
@ -302,7 +302,7 @@ bool SwCursorShell::SelTableBox()
|
|||
if( pStartNode == nullptr )
|
||||
return false;
|
||||
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
|
||||
// create a table cursor, if there isn't one already
|
||||
if( !m_pTableCursor )
|
||||
|
|
|
@ -770,7 +770,7 @@ void SwDoc::UpdatePagesForPrintingWithPostItData(
|
|||
if (nPostItMode == SwPostItMode::NONE || nPostItCount <= 0)
|
||||
return;
|
||||
|
||||
SET_CURR_SHELL( rData.m_pPostItShell.get() );
|
||||
CurrShell aCurr( rData.m_pPostItShell.get() );
|
||||
|
||||
// clear document and move to end of it
|
||||
SwDoc & rPostItDoc(*rData.m_pPostItShell->GetDoc());
|
||||
|
|
|
@ -824,7 +824,7 @@ void SwNoTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
|
|||
|
||||
for(SwViewShell& rShell : pVSh->GetRingContainer())
|
||||
{
|
||||
SET_CURR_SHELL( &rShell );
|
||||
CurrShell aCurr( &rShell );
|
||||
if( rShell.IsPreview() )
|
||||
{
|
||||
if( rShell.GetWin() )
|
||||
|
|
|
@ -2697,7 +2697,7 @@ void SwEditShell::AutoFormat( const SvxSwAutoFormatFlags* pAFlags )
|
|||
{
|
||||
std::unique_ptr<SwWait> pWait;
|
||||
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
StartUndo( SwUndoId::AUTOFORMAT );
|
||||
|
||||
|
@ -2733,7 +2733,7 @@ void SwEditShell::AutoFormat( const SvxSwAutoFormatFlags* pAFlags )
|
|||
|
||||
void SwEditShell::AutoFormatBySplitNode()
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
SwPaM* pCursor = GetCursor();
|
||||
if( pCursor->IsMultiSelection() || !pCursor->Move( fnMoveBackward, GoInNode ) )
|
||||
return;
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
void SwEditShell::ResetAttr( const std::set<sal_uInt16> &attrs, SwPaM* pPaM )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
SwPaM* pCursor = pPaM ? pPaM : GetCursor( );
|
||||
|
||||
StartAllAction();
|
||||
|
@ -111,7 +111,7 @@ static void lcl_disableShowChangesIfNeeded( SwDoc *const pDoc, const SwNode& rNo
|
|||
|
||||
void SwEditShell::SetAttrItem( const SfxPoolItem& rHint, SetAttrMode nFlags, const bool bParagraphSetting )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
RedlineFlags eRedlMode = GetDoc()->getIDocumentRedlineAccess().GetRedlineFlags(), eOldMode = eRedlMode;
|
||||
SwPaM* pCursor = GetCursor();
|
||||
|
@ -150,7 +150,7 @@ void SwEditShell::SetAttrItem( const SfxPoolItem& rHint, SetAttrMode nFlags, con
|
|||
|
||||
void SwEditShell::SetAttrSet( const SfxItemSet& rSet, SetAttrMode nFlags, SwPaM* pPaM, const bool bParagraphSetting )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
SwPaM* pCursor = pPaM ? pPaM : GetCursor();
|
||||
StartAllAction();
|
||||
RedlineFlags eRedlMode = GetDoc()->getIDocumentRedlineAccess().GetRedlineFlags(), eOldMode = eRedlMode;
|
||||
|
|
|
@ -114,7 +114,7 @@ void SwEditShell::DeleteSel( SwPaM& rPam, bool* pUndo )
|
|||
|
||||
bool SwEditShell::Delete()
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
bool bRet = false;
|
||||
if ( !HasReadonlySel() || CursorInsideInputField() )
|
||||
{
|
||||
|
@ -155,7 +155,7 @@ bool SwEditShell::Copy( SwEditShell* pDestShell )
|
|||
if( !pDestShell )
|
||||
pDestShell = this;
|
||||
|
||||
SET_CURR_SHELL( pDestShell );
|
||||
CurrShell aCurr( pDestShell );
|
||||
|
||||
// List of insert positions for smart insert of block selections
|
||||
std::vector< std::shared_ptr<SwPosition> > aInsertList;
|
||||
|
@ -306,7 +306,7 @@ bool SwEditShell::Copy( SwEditShell* pDestShell )
|
|||
*/
|
||||
bool SwEditShell::Replace( const OUString& rNewStr, bool bRegExpRplc )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
|
||||
bool bRet = false;
|
||||
if( !HasReadonlySel() )
|
||||
|
@ -341,7 +341,7 @@ bool SwEditShell::DelFullPara()
|
|||
// no multi selection
|
||||
if( !pCursor->IsMultiSelection() && !HasReadonlySel() )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
bRet = GetDoc()->getIDocumentContentOperations().DelFullPara( *pCursor );
|
||||
EndAllAction();
|
||||
|
|
|
@ -125,7 +125,7 @@ void SwEditShell::FieldToText( SwFieldType const * pType )
|
|||
if( !pType->HasWriterListeners() )
|
||||
return;
|
||||
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
StartUndo( SwUndoId::DELETE );
|
||||
Push();
|
||||
|
@ -147,7 +147,7 @@ void SwEditShell::FieldToText( SwFieldType const * pType )
|
|||
/// add a field at the cursor position
|
||||
void SwEditShell::Insert2(SwField const & rField, const bool bForceExpandHints)
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
SwFormatField aField( rField );
|
||||
|
||||
|
@ -203,7 +203,7 @@ static SwTextField* lcl_FindInputField( SwDoc* pDoc, SwField& rField )
|
|||
|
||||
void SwEditShell::UpdateOneField(SwField &rField)
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
{
|
||||
// If there are no selections so take the value of the current cursor position.
|
||||
|
@ -322,7 +322,7 @@ void SwEditShell::ChangeDBFields( const std::vector<OUString>& rOldNames,
|
|||
/// Update all expression fields
|
||||
void SwEditShell::UpdateExpFields(bool bCloseDB)
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
GetDoc()->getIDocumentFieldsAccess().UpdateExpFields(nullptr, true);
|
||||
if (bCloseDB)
|
||||
|
|
|
@ -134,7 +134,7 @@ void SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos,
|
|||
if( !getIDocumentSettingAccess().get(DocumentSettingId::GLOBAL_DOCUMENT) )
|
||||
return;
|
||||
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
|
||||
SwPaM* pCursor = GetCursor();
|
||||
|
@ -173,7 +173,7 @@ bool SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos,
|
|||
if( !getIDocumentSettingAccess().get(DocumentSettingId::GLOBAL_DOCUMENT) )
|
||||
return false;
|
||||
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
|
||||
SwPaM* pCursor = GetCursor();
|
||||
|
@ -213,7 +213,7 @@ bool SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos )
|
|||
if( !getIDocumentSettingAccess().get(DocumentSettingId::GLOBAL_DOCUMENT) )
|
||||
return false;
|
||||
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
|
||||
SwPaM* pCursor = GetCursor();
|
||||
|
@ -236,7 +236,7 @@ void SwEditShell::DeleteGlobalDocContent( const SwGlblDocContents& rArr ,
|
|||
if( !getIDocumentSettingAccess().get(DocumentSettingId::GLOBAL_DOCUMENT) )
|
||||
return;
|
||||
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
StartUndo( SwUndoId::START );
|
||||
|
||||
|
@ -304,7 +304,7 @@ bool SwEditShell::MoveGlobalDocContent( const SwGlblDocContents& rArr ,
|
|||
( nFromPos <= nInsPos && nInsPos <= nToPos ) )
|
||||
return false;
|
||||
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
|
||||
SwPaM* pCursor = GetCursor();
|
||||
|
@ -336,7 +336,7 @@ void SwEditShell::GotoGlobalDocContent( const SwGlblDocContent& rPos )
|
|||
if( !getIDocumentSettingAccess().get(DocumentSettingId::GLOBAL_DOCUMENT) )
|
||||
return;
|
||||
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
SttCursorMove();
|
||||
|
||||
SwPaM* pCursor = GetCursor();
|
||||
|
|
|
@ -163,7 +163,7 @@ bool SwEditShell::CopySelToDoc( SwDoc* pInsDoc )
|
|||
SwIndex(pContentNode, pContentNode ? pContentNode->Len() : 0));
|
||||
|
||||
bool bRet = false;
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
|
||||
pInsDoc->getIDocumentFieldsAccess().LockExpFields();
|
||||
|
||||
|
|
|
@ -604,7 +604,7 @@ void *SwEditShell::GetIMapInventor() const
|
|||
Graphic SwEditShell::GetIMapGraphic() const
|
||||
{
|
||||
// returns always a graphic if the cursor is in a Fly
|
||||
SET_CURR_SHELL( const_cast<SwEditShell*>(this) );
|
||||
CurrShell aCurr( const_cast<SwEditShell*>(this) );
|
||||
Graphic aRet;
|
||||
SwPaM* pCursor = GetCursor();
|
||||
if ( !pCursor->HasMark() )
|
||||
|
@ -895,7 +895,7 @@ const SwFootnoteInfo& SwEditShell::GetFootnoteInfo() const
|
|||
void SwEditShell::SetFootnoteInfo(const SwFootnoteInfo& rInfo)
|
||||
{
|
||||
StartAllAction();
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
GetDoc()->SetFootnoteInfo(rInfo);
|
||||
CallChgLnk();
|
||||
EndAllAction();
|
||||
|
@ -909,7 +909,7 @@ const SwEndNoteInfo& SwEditShell::GetEndNoteInfo() const
|
|||
void SwEditShell::SetEndNoteInfo(const SwEndNoteInfo& rInfo)
|
||||
{
|
||||
StartAllAction();
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
GetDoc()->SetEndNoteInfo(rInfo);
|
||||
EndAllAction();
|
||||
}
|
||||
|
@ -922,7 +922,7 @@ const SwLineNumberInfo& SwEditShell::GetLineNumberInfo() const
|
|||
void SwEditShell::SetLineNumberInfo(const SwLineNumberInfo& rInfo)
|
||||
{
|
||||
StartAllAction();
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
GetDoc()->SetLineNumberInfo(rInfo);
|
||||
AddPaintRect( GetLayout()->getFrameArea() );
|
||||
EndAllAction();
|
||||
|
@ -964,7 +964,7 @@ OUString SwEditShell::DeleteExtTextInput( bool bInsText )
|
|||
OUString sTmp;
|
||||
SwUnoCursorHelper::GetTextFromPam(*pDel, sTmp);
|
||||
sRet = sTmp;
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
pDel->SetInsText( bInsText );
|
||||
SetOverwriteCursor( pDel->IsOverwriteCursor() );
|
||||
|
@ -989,7 +989,7 @@ void SwEditShell::SetExtTextInputData( const CommandExtTextInputData& rData )
|
|||
return;
|
||||
|
||||
StartAllAction();
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
|
||||
if( !rData.IsOnlyCursorChanged() )
|
||||
pInput->SetInputData( rData );
|
||||
|
@ -1018,7 +1018,7 @@ void SwEditShell::TransliterateText( TransliterationFlags nType )
|
|||
{
|
||||
utl::TransliterationWrapper aTrans( ::comphelper::getProcessComponentContext(), nType );
|
||||
StartAllAction();
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
|
||||
SwPaM* pCursor = GetCursor();
|
||||
if( pCursor->GetNext() != pCursor )
|
||||
|
|
|
@ -203,7 +203,7 @@ void SwLinguIter::Start_( SwEditShell *pShell, SwDocPositions eStart,
|
|||
|
||||
pSh = pShell;
|
||||
|
||||
SET_CURR_SHELL( pSh );
|
||||
CurrShell aCurr( pSh );
|
||||
|
||||
OSL_ENSURE(!m_pEnd, "SwLinguIter::Start_ without End?");
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ void SwEditShell::SetRedlineFlags( RedlineFlags eMode )
|
|||
{
|
||||
if( eMode != GetDoc()->getIDocumentRedlineAccess().GetRedlineFlags() )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
GetDoc()->getIDocumentRedlineAccess().SetRedlineFlags( eMode );
|
||||
EndAllAction();
|
||||
|
@ -65,7 +65,7 @@ static void lcl_InvalidateAll( SwViewShell* pSh )
|
|||
|
||||
bool SwEditShell::AcceptRedline( SwRedlineTable::size_type nPos )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
bool bRet = GetDoc()->getIDocumentRedlineAccess().AcceptRedline( nPos, true );
|
||||
if( !nPos && !::IsExtraData( GetDoc() ) )
|
||||
|
@ -76,7 +76,7 @@ bool SwEditShell::AcceptRedline( SwRedlineTable::size_type nPos )
|
|||
|
||||
bool SwEditShell::RejectRedline( SwRedlineTable::size_type nPos )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
bool bRet = GetDoc()->getIDocumentRedlineAccess().RejectRedline( nPos, true );
|
||||
if( !nPos && !::IsExtraData( GetDoc() ) )
|
||||
|
@ -87,7 +87,7 @@ bool SwEditShell::RejectRedline( SwRedlineTable::size_type nPos )
|
|||
|
||||
bool SwEditShell::AcceptRedlinesInSelection()
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
bool bRet = GetDoc()->getIDocumentRedlineAccess().AcceptRedline( *GetCursor(), true );
|
||||
EndAllAction();
|
||||
|
@ -96,7 +96,7 @@ bool SwEditShell::AcceptRedlinesInSelection()
|
|||
|
||||
bool SwEditShell::RejectRedlinesInSelection()
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
bool bRet = GetDoc()->getIDocumentRedlineAccess().RejectRedline( *GetCursor(), true );
|
||||
EndAllAction();
|
||||
|
@ -127,7 +127,7 @@ void SwEditShell::UpdateRedlineAttr()
|
|||
{
|
||||
if( IDocumentRedlineAccess::IsShowChanges(GetDoc()->getIDocumentRedlineAccess().GetRedlineFlags()) )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
|
||||
GetDoc()->getIDocumentRedlineAccess().UpdateRedlineAttr();
|
||||
|
|
|
@ -342,7 +342,7 @@ bool SwEditShell::GetTableBoxFormulaAttrs( SfxItemSet& rSet ) const
|
|||
|
||||
void SwEditShell::SetTableBoxFormulaAttrs( const SfxItemSet& rSet )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
SwSelBoxes aBoxes;
|
||||
if( IsTableMode() )
|
||||
::GetTableSelCrs( *this, aBoxes );
|
||||
|
|
|
@ -74,7 +74,7 @@ void SwEditShell::Insert(const SwTOXMark& rMark)
|
|||
|
||||
void SwEditShell::DeleteTOXMark( SwTOXMark const * pMark )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
|
||||
mxDoc->DeleteTOXMark( pMark );
|
||||
|
@ -120,7 +120,7 @@ void SwEditShell::SetDefaultTOXBase(const SwTOXBase& rBase)
|
|||
/// Insert listing and create content
|
||||
void SwEditShell::InsertTableOf( const SwTOXBase& rTOX, const SfxItemSet* pSet )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
|
||||
SwDocShell* pDocSh = GetDoc()->GetDocShell();
|
||||
|
@ -156,7 +156,7 @@ void SwEditShell::UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet)
|
|||
SwDocShell* pDocSh = pMyDoc->GetDocShell();
|
||||
|
||||
bool bInIndex = &rTOX == GetCurTOX();
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
|
||||
::StartProgress( STR_STATSTR_TOX_UPDATE, 0, 0, pDocSh );
|
||||
|
|
|
@ -96,7 +96,7 @@ void SwEditShell::HandleUndoRedoContext(::sw::UndoRedoContext & rContext)
|
|||
|
||||
void SwEditShell::Undo(sal_uInt16 const nCount)
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
|
||||
// current undo state was not saved
|
||||
::sw::UndoGuard const undoGuard(GetDoc()->GetIDocumentUndoRedo());
|
||||
|
@ -152,7 +152,7 @@ void SwEditShell::Undo(sal_uInt16 const nCount)
|
|||
|
||||
void SwEditShell::Redo(sal_uInt16 const nCount)
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
|
||||
bool bRet = false;
|
||||
|
||||
|
@ -202,7 +202,7 @@ void SwEditShell::Redo(sal_uInt16 const nCount)
|
|||
|
||||
void SwEditShell::Repeat(sal_uInt16 const nCount)
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
|
||||
StartAllAction();
|
||||
|
||||
|
|
|
@ -255,7 +255,7 @@ SwUndoId SwEditShell::GetRepeatInfo(OUString *const o_pStr) const
|
|||
void SwEditShell::AutoCorrect( SvxAutoCorrect& rACorr, bool bInsert,
|
||||
sal_Unicode cChar )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
|
||||
StartAllAction();
|
||||
|
||||
|
@ -282,7 +282,7 @@ void SwEditShell::SetNewDoc()
|
|||
|
||||
OUString SwEditShell::GetPrevAutoCorrWord(SvxAutoCorrect& rACorr)
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
|
||||
OUString sRet;
|
||||
SwPaM* pCursor = getShellCursor( true );
|
||||
|
@ -299,7 +299,7 @@ OUString SwEditShell::GetPrevAutoCorrWord(SvxAutoCorrect& rACorr)
|
|||
|
||||
std::vector<OUString> SwEditShell::GetChunkForAutoText()
|
||||
{
|
||||
SET_CURR_SHELL(this);
|
||||
CurrShell aCurr(this);
|
||||
|
||||
std::vector<OUString> aRet;
|
||||
SwPaM* pCursor = getShellCursor(true);
|
||||
|
|
|
@ -446,7 +446,7 @@ bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt,
|
|||
OSL_ENSURE( this == pDestShell || !pDestShell->IsObjSelected(),
|
||||
"Dest-Shell cannot be in Obj-Mode" );
|
||||
|
||||
SET_CURR_SHELL( pDestShell );
|
||||
CurrShell aCurr( pDestShell );
|
||||
|
||||
pDestShell->StartAllAction();
|
||||
pDestShell->GetDoc()->getIDocumentFieldsAccess().LockExpFields();
|
||||
|
@ -675,7 +675,7 @@ namespace {
|
|||
|
||||
bool SwFEShell::Paste( SwDoc* pClpDoc, bool bNestedTable )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
OSL_ENSURE( pClpDoc, "no clipboard document" );
|
||||
// then till end of the nodes array
|
||||
SwNodeIndex aIdx( pClpDoc->GetNodes().GetEndOfExtras(), 2 );
|
||||
|
@ -1128,7 +1128,7 @@ void SwFEShell::PastePages( SwFEShell& rToFill, sal_uInt16 nStartPage, sal_uInt1
|
|||
aCpyPam.SetMark();
|
||||
*aCpyPam.GetMark() = *GetCursor()->GetPoint();
|
||||
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
|
||||
StartAllAction();
|
||||
GetDoc()->getIDocumentFieldsAccess().LockExpFields();
|
||||
|
@ -1300,7 +1300,7 @@ static void lcl_ConvertSdrOle2ObjsToSdrGrafObjs( SdrModel& _rModel )
|
|||
|
||||
void SwFEShell::Paste( SvStream& rStrm, SwPasteSdr nAction, const Point* pPt )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
StartUndo();
|
||||
|
||||
|
@ -1524,7 +1524,7 @@ void SwFEShell::Paste( SvStream& rStrm, SwPasteSdr nAction, const Point* pPt )
|
|||
|
||||
bool SwFEShell::Paste(const Graphic &rGrf, const OUString& rURL)
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
SdrObject* pObj = nullptr;
|
||||
SdrView *pView = Imp()->GetDrawView();
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ void SwFEShell::ChgCurPageDesc( const SwPageDesc& rDesc )
|
|||
|
||||
OSL_ENSURE( !GetCursor()->HasMark(), "ChgCurPageDesc only without selection!");
|
||||
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
while ( pPage )
|
||||
{
|
||||
pFlow = pPage->FindFirstBodyContent();
|
||||
|
@ -110,7 +110,7 @@ void SwFEShell::ChgCurPageDesc( const SwPageDesc& rDesc )
|
|||
void SwFEShell::ChgPageDesc( size_t i, const SwPageDesc &rChged )
|
||||
{
|
||||
StartAllAction();
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
//Fix i64842: because Undo has a very special way to handle header/footer content
|
||||
// we have to copy the page descriptor before calling ChgPageDesc.
|
||||
SwPageDesc aDesc( rChged );
|
||||
|
|
|
@ -235,7 +235,7 @@ bool sw_ChkAndSetNewAnchor(
|
|||
|
||||
void SwFEShell::SelectFlyFrame( SwFlyFrame& rFrame )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
|
||||
// The frame is new, thus select it.
|
||||
// !! Always select the frame, if it's not selected.
|
||||
|
@ -309,7 +309,7 @@ SwFlyFrame* SwFEShell::GetSelectedOrCurrFlyFrame() const
|
|||
// Returns non-null pointer, if the current Fly could be anchored to another one (so it is inside)
|
||||
const SwFrameFormat* SwFEShell::IsFlyInFly()
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
|
||||
if ( !Imp()->HasDrawView() )
|
||||
return nullptr;
|
||||
|
@ -370,7 +370,7 @@ const SwFrameFormat* SwFEShell::IsFlyInFly()
|
|||
|
||||
void SwFEShell::SetFlyPos( const Point& rAbsPos )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
|
||||
// Determine reference point in document coordinates
|
||||
SwFlyFrame *pFly = GetCurrFlyFrame(false);
|
||||
|
@ -420,7 +420,7 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, bool bMoveIt )
|
|||
{
|
||||
Point aRet;
|
||||
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
|
||||
if ( !Imp()->HasDrawView() )
|
||||
return aRet;
|
||||
|
@ -642,7 +642,7 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, bool bMoveIt )
|
|||
const SwFrameFormat *SwFEShell::NewFlyFrame( const SfxItemSet& rSet, bool bAnchValid,
|
||||
SwFrameFormat *pParent )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
|
||||
SwPaM* pCursor = GetCursor();
|
||||
|
@ -820,7 +820,7 @@ void SwFEShell::Insert( const OUString& rGrfName, const OUString& rFltName,
|
|||
const SfxItemSet* pFlyAttrSet )
|
||||
{
|
||||
SwFlyFrameFormat* pFormat = nullptr;
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
SwShellCursor *pStartCursor = dynamic_cast<SwShellCursor*>(GetSwCursor());
|
||||
SwShellCursor *pCursor = pStartCursor;
|
||||
|
@ -902,7 +902,7 @@ SwFlyFrameFormat* SwFEShell::InsertObject( const svt::EmbeddedObjectRef& xObj,
|
|||
SfxItemSet* pFlyAttrSet )
|
||||
{
|
||||
SwFlyFrameFormat* pFormat = nullptr;
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
{
|
||||
for(const SwPaM& rPaM : GetCursor()->GetRingContainer())
|
||||
|
@ -931,7 +931,7 @@ SwFlyFrameFormat* SwFEShell::InsertObject( const svt::EmbeddedObjectRef& xObj,
|
|||
void SwFEShell::InsertDrawObj( SdrObject& rDrawObj,
|
||||
const Point& rInsertPosition )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
|
||||
SfxItemSet rFlyAttrSet( GetDoc()->GetAttrPool(), aFrameFormatSetRange );
|
||||
rFlyAttrSet.Put( SwFormatAnchor( RndStdIds::FLY_AT_PARA ));
|
||||
|
@ -1040,7 +1040,7 @@ bool SwFEShell::GetFlyFrameAttr( SfxItemSet &rSet ) const
|
|||
return false;
|
||||
}
|
||||
|
||||
SET_CURR_SHELL( const_cast<SwFEShell*>(this) );
|
||||
CurrShell aCurr( const_cast<SwFEShell*>(this) );
|
||||
|
||||
if( !rSet.Set( pFly->GetFormat()->GetAttrSet() ) )
|
||||
return false;
|
||||
|
@ -1076,7 +1076,7 @@ bool SwFEShell::GetFlyFrameAttr( SfxItemSet &rSet ) const
|
|||
// Attributes of the current fly will change.
|
||||
bool SwFEShell::SetFlyFrameAttr( SfxItemSet& rSet )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
bool bRet = false;
|
||||
|
||||
if( rSet.Count() )
|
||||
|
@ -1121,7 +1121,7 @@ SfxItemSet SwFEShell::makeItemSetFromFormatAnchor(SfxItemPool& rPool, const SwFo
|
|||
bool SwFEShell::SetDrawingAttr( SfxItemSet& rSet )
|
||||
{
|
||||
bool bRet = false;
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
if ( !rSet.Count() ||
|
||||
!Imp()->HasDrawView() )
|
||||
return bRet;
|
||||
|
@ -1159,7 +1159,7 @@ bool SwFEShell::SetDrawingAttr( SfxItemSet& rSet )
|
|||
// Reset attributes contained in the set.
|
||||
void SwFEShell::ResetFlyFrameAttr( const SfxItemSet* pSet )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
|
||||
SwFlyFrame *pFly = GetSelectedOrCurrFlyFrame();
|
||||
OSL_ENSURE( pFly, "SetFlyFrameAttr, no Fly selected." );
|
||||
|
@ -1210,7 +1210,7 @@ void SwFEShell::SetFrameFormat( SwFrameFormat *pNewFormat, bool bKeepOrient, Poi
|
|||
if( pFly )
|
||||
{
|
||||
StartAllAction();
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
|
||||
SwFlyFrameFormat* pFlyFormat = pFly->GetFormat();
|
||||
const Point aPt( pFly->getFrameArea().Pos() );
|
||||
|
@ -1770,7 +1770,7 @@ ObjCntType SwFEShell::GetObjCntTypeOfSelection() const
|
|||
|
||||
void SwFEShell::ReplaceSdrObj( const OUString& rGrfName, const Graphic* pGrf )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
|
||||
const SdrMarkList *pMrkList;
|
||||
if( Imp()->HasDrawView() && 1 ==
|
||||
|
|
|
@ -178,7 +178,7 @@ bool SwFEShell::SelectObj( const Point& rPt, sal_uInt8 nFlag, SdrObject *pObj )
|
|||
SwDrawView *pDView = Imp()->GetDrawView();
|
||||
if(!pDView)
|
||||
return false;
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAction(); // action is necessary to assure only one AttrChgdNotify
|
||||
// (e.g. due to Unmark->MarkListHasChgd) arrives
|
||||
|
||||
|
@ -1282,7 +1282,7 @@ bool SwFEShell::IsInsideSelectedObj( const Point &rPt )
|
|||
|
||||
bool SwFEShell::IsObjSelectable( const Point& rPt )
|
||||
{
|
||||
SET_CURR_SHELL(this);
|
||||
CurrShell aCurr(this);
|
||||
SwDrawView *pDView = Imp()->GetDrawView();
|
||||
bool bRet = false;
|
||||
if( pDView )
|
||||
|
@ -1300,7 +1300,7 @@ bool SwFEShell::IsObjSelectable( const Point& rPt )
|
|||
SdrObject* SwFEShell::GetObjAt( const Point& rPt )
|
||||
{
|
||||
SdrObject* pRet = nullptr;
|
||||
SET_CURR_SHELL(this);
|
||||
CurrShell aCurr(this);
|
||||
SwDrawView *pDView = Imp()->GetDrawView();
|
||||
if( pDView )
|
||||
{
|
||||
|
@ -1317,7 +1317,7 @@ SdrObject* SwFEShell::GetObjAt( const Point& rPt )
|
|||
// Test if there is an object at that position and if it should be selected.
|
||||
bool SwFEShell::ShouldObjectBeSelected(const Point& rPt)
|
||||
{
|
||||
SET_CURR_SHELL(this);
|
||||
CurrShell aCurr(this);
|
||||
SwDrawView *pDrawView = Imp()->GetDrawView();
|
||||
bool bRet(false);
|
||||
|
||||
|
@ -2518,7 +2518,7 @@ bool SwFEShell::GotoFly( const OUString& rName, FlyCntType eType, bool bSelFrame
|
|||
const SwFlyFrameFormat* pFlyFormat = mxDoc->FindFlyByName( rName, aChkArr[ eType]);
|
||||
if( pFlyFormat )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
|
||||
SwFlyFrame* pFrame = SwIterator<SwFlyFrame,SwFormat>( *pFlyFormat ).First();
|
||||
if( pFrame )
|
||||
|
@ -2682,7 +2682,7 @@ bool SwFEShell::GetObjAttr( SfxItemSet &rSet ) const
|
|||
|
||||
void SwFEShell::SetObjAttr( const SfxItemSet& rSet )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
|
||||
if ( !rSet.Count() )
|
||||
{
|
||||
|
@ -2713,7 +2713,7 @@ bool SwFEShell::IsAlignPossible() const
|
|||
|
||||
void SwFEShell::CheckUnboundObjects()
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
|
||||
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
|
||||
for ( size_t i = 0; i < rMrkList.GetMarkCount(); ++i )
|
||||
|
|
|
@ -181,7 +181,7 @@ void SwFEShell::InsertRow( sal_uInt16 nCnt, bool bBehind )
|
|||
return;
|
||||
}
|
||||
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
|
||||
// search boxes via the layout
|
||||
|
@ -220,7 +220,7 @@ void SwFEShell::InsertCol( sal_uInt16 nCnt, bool bBehind )
|
|||
return;
|
||||
}
|
||||
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
|
||||
if( !CheckSplitCells( *this, nCnt + 1, SwTableSearchType::Col ) )
|
||||
{
|
||||
|
@ -273,7 +273,7 @@ bool SwFEShell::DeleteCol()
|
|||
return false;
|
||||
}
|
||||
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
|
||||
// search boxes via the layout
|
||||
|
@ -324,7 +324,7 @@ bool SwFEShell::DeleteRow(bool bCompleteTable)
|
|||
return false;
|
||||
}
|
||||
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
|
||||
// search for boxes via the layout
|
||||
|
@ -445,7 +445,7 @@ TableMergeErr SwFEShell::MergeTab()
|
|||
}
|
||||
else
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
|
||||
TableWait aWait(pTableCursor->GetSelectedBoxesCount(), nullptr,
|
||||
|
@ -476,7 +476,7 @@ void SwFEShell::SplitTab( bool bVert, sal_uInt16 nCnt, bool bSameHeight )
|
|||
return;
|
||||
}
|
||||
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
|
||||
if( bVert && !CheckSplitCells( *this, nCnt + 1, SwTableSearchType::NONE ) )
|
||||
{
|
||||
|
@ -618,7 +618,7 @@ void SwFEShell::SetTabCols( const SwTabCols &rNew, bool bCurRowOnly )
|
|||
if( !pBox || !pBox->IsInTab() )
|
||||
return;
|
||||
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
|
||||
do
|
||||
|
@ -669,7 +669,7 @@ void SwFEShell::SetTabRows( const SwTabCols &rNew, bool bCurColOnly )
|
|||
if( !pBox || !pBox->IsInTab() )
|
||||
return;
|
||||
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
|
||||
do
|
||||
|
@ -693,7 +693,7 @@ void SwFEShell::SetMouseTabRows( const SwTabCols &rNew, bool bCurColOnly, const
|
|||
const SwFrame *pBox = GetBox( rPt );
|
||||
if( pBox )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
GetDoc()->SetTabRows( rNew, bCurColOnly, static_cast<const SwCellFrame*>(pBox) );
|
||||
EndAllActionAndCall();
|
||||
|
@ -702,7 +702,7 @@ void SwFEShell::SetMouseTabRows( const SwTabCols &rNew, bool bCurColOnly, const
|
|||
|
||||
void SwFEShell::SetRowSplit( const SwFormatRowSplit& rNew )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
GetDoc()->SetRowSplit( *getShellCursor( false ), rNew );
|
||||
EndAllActionAndCall();
|
||||
|
@ -715,7 +715,7 @@ std::unique_ptr<SwFormatRowSplit> SwFEShell::GetRowSplit() const
|
|||
|
||||
void SwFEShell::SetRowHeight( const SwFormatFrameSize &rNew )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
GetDoc()->SetRowHeight( *getShellCursor( false ), rNew );
|
||||
EndAllActionAndCall();
|
||||
|
@ -728,7 +728,7 @@ std::unique_ptr<SwFormatFrameSize> SwFEShell::GetRowHeight() const
|
|||
|
||||
bool SwFEShell::BalanceRowHeight( bool bTstOnly, const bool bOptimize )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
if( !bTstOnly )
|
||||
StartAllAction();
|
||||
bool bRet = GetDoc()->BalanceRowHeight( *getShellCursor( false ), bTstOnly, bOptimize );
|
||||
|
@ -739,7 +739,7 @@ bool SwFEShell::BalanceRowHeight( bool bTstOnly, const bool bOptimize )
|
|||
|
||||
void SwFEShell::SetRowBackground( const SvxBrushItem &rNew )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
GetDoc()->SetRowBackground( *getShellCursor( false ), rNew );
|
||||
EndAllActionAndCall();
|
||||
|
@ -752,7 +752,7 @@ bool SwFEShell::GetRowBackground( std::unique_ptr<SvxBrushItem>& rToFill ) const
|
|||
|
||||
void SwFEShell::SetTabBorders( const SfxItemSet& rSet )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
GetDoc()->SetTabBorders( *getShellCursor( false ), rSet );
|
||||
EndAllActionAndCall();
|
||||
|
@ -761,7 +761,7 @@ void SwFEShell::SetTabBorders( const SfxItemSet& rSet )
|
|||
void SwFEShell::SetTabLineStyle( const Color* pColor, bool bSetLine,
|
||||
const editeng::SvxBorderLine* pBorderLine )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
GetDoc()->SetTabLineStyle( *getShellCursor( false ),
|
||||
pColor, bSetLine, pBorderLine );
|
||||
|
@ -775,7 +775,7 @@ void SwFEShell::GetTabBorders( SfxItemSet& rSet ) const
|
|||
|
||||
void SwFEShell::SetBoxBackground( const SvxBrushItem &rNew )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
GetDoc()->SetBoxAttr( *getShellCursor( false ), rNew );
|
||||
EndAllActionAndCall();
|
||||
|
@ -791,7 +791,7 @@ bool SwFEShell::GetBoxBackground( std::unique_ptr<SvxBrushItem>& rToFill ) const
|
|||
|
||||
void SwFEShell::SetBoxDirection( const SvxFrameDirectionItem& rNew )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
GetDoc()->SetBoxAttr( *getShellCursor( false ), rNew );
|
||||
EndAllActionAndCall();
|
||||
|
@ -807,7 +807,7 @@ bool SwFEShell::GetBoxDirection( std::unique_ptr<SvxFrameDirectionItem>& rToFill
|
|||
|
||||
void SwFEShell::SetBoxAlign( sal_uInt16 nAlign )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
GetDoc()->SetBoxAlign( *getShellCursor( false ), nAlign );
|
||||
EndAllActionAndCall();
|
||||
|
@ -824,7 +824,7 @@ void SwFEShell::SetTabBackground( const SvxBrushItem &rNew )
|
|||
if( !pFrame || !pFrame->IsInTab() )
|
||||
return;
|
||||
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
GetDoc()->SetAttr( rNew, *pFrame->ImplFindTabFrame()->GetFormat() );
|
||||
EndAllAction(); // no call, nothing changes!
|
||||
|
@ -902,7 +902,7 @@ void SwFEShell::ProtectCells()
|
|||
SvxProtectItem aProt( RES_PROTECT );
|
||||
aProt.SetContentProtect( true );
|
||||
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
|
||||
GetDoc()->SetBoxAttr( *getShellCursor( false ), aProt );
|
||||
|
@ -919,7 +919,7 @@ void SwFEShell::ProtectCells()
|
|||
// cancel table selection
|
||||
void SwFEShell::UnProtectCells()
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
|
||||
SwSelBoxes aBoxes;
|
||||
|
@ -946,7 +946,7 @@ void SwFEShell::UnProtectCells()
|
|||
|
||||
void SwFEShell::UnProtectTables()
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
GetDoc()->UnProtectTables( *GetCursor() );
|
||||
EndAllActionAndCall();
|
||||
|
@ -1002,7 +1002,7 @@ void SwFEShell::SetRowsToRepeat( sal_uInt16 nSet )
|
|||
if( pTab && pTab->GetTable()->GetRowsToRepeat() != nSet )
|
||||
{
|
||||
SwWait aWait( *GetDoc()->GetDocShell(), true );
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
GetDoc()->SetRowsToRepeat( *pTab->GetTable(), nSet );
|
||||
EndAllActionAndCall();
|
||||
|
@ -1106,7 +1106,7 @@ bool SwFEShell::CheckHeadline( bool bRepeat ) const
|
|||
|
||||
void SwFEShell::AdjustCellWidth( const bool bBalance, const bool bNoShrink )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
|
||||
// switch on wait-cursor, as we do not know how
|
||||
|
@ -1233,7 +1233,7 @@ bool SwFEShell::UpdateTableStyleFormatting(SwTableNode *pTableNode,
|
|||
bool bRet;
|
||||
if( !aBoxes.empty() )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
bRet = GetDoc()->SetTableAutoFormat(
|
||||
aBoxes, *pTableStyle, bResetDirect, pStyleName != nullptr);
|
||||
|
@ -1286,7 +1286,7 @@ bool SwFEShell::DeleteTableSel()
|
|||
return false;
|
||||
}
|
||||
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
|
||||
// search boxes via the layout
|
||||
|
@ -2040,7 +2040,7 @@ void SwFEShell::SetMouseTabCols( const SwTabCols &rNew, bool bCurRowOnly,
|
|||
const SwFrame *pBox = GetBox( rPt );
|
||||
if( pBox )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
GetDoc()->SetTabCols( rNew, bCurRowOnly, static_cast<const SwCellFrame*>(pBox) );
|
||||
EndAllActionAndCall();
|
||||
|
@ -2127,7 +2127,7 @@ void SwFEShell::SetTableAttr( const SfxItemSet &rNew )
|
|||
SwFrame *pFrame = GetCurrFrame();
|
||||
if( pFrame && pFrame->IsInTab() )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
SwTabFrame *pTab = pFrame->FindTabFrame();
|
||||
pTab->GetTable()->SetHTMLTableLayout(std::shared_ptr<SwHTMLTableLayout>());
|
||||
|
@ -2144,7 +2144,7 @@ void SwFEShell::SetColRowWidthHeight( TableChgWidthHeightType eType, sal_uInt16
|
|||
if( !pFrame || !pFrame->IsInTab() )
|
||||
return;
|
||||
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
StartAllAction();
|
||||
|
||||
do {
|
||||
|
|
|
@ -82,7 +82,7 @@ void SwFEShell::EndAllActionAndCall()
|
|||
// Determine the Content's nearest to the point
|
||||
Point SwFEShell::GetContentPos( const Point& rPoint, bool bNext ) const
|
||||
{
|
||||
SET_CURR_SHELL( const_cast<SwFEShell*>(this) );
|
||||
CurrShell aCurr( const_cast<SwFEShell*>(this) );
|
||||
return GetLayout()->GetNextPrevContentPos( rPoint, bNext );
|
||||
}
|
||||
|
||||
|
@ -518,7 +518,7 @@ bool SwFEShell::Sort(const SwSortOptions& rOpt)
|
|||
if( !HasSelection() )
|
||||
return false;
|
||||
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
bool bRet = false;
|
||||
StartAllAction();
|
||||
if(IsTableMode())
|
||||
|
|
|
@ -141,8 +141,8 @@ class SAL_DLLPUBLIC_RTTI SwRootFrame: public SwLayoutFrame
|
|||
* know the active shell.
|
||||
* this is approximated by setting the pointer mpCurrShell when a
|
||||
* shell gets the focus (FEShell). Additionally the pointer will be
|
||||
* set temporarily by SwCurrShell typically via SET_CURR_SHELL
|
||||
* The macro and class can be found in the SwViewShell. These object can
|
||||
* set temporarily by SwCurrShell typically via CurrShell
|
||||
* The class can be found in the SwViewShell. These object can
|
||||
* be created nested (also for different kinds of Shells). They are
|
||||
* collected into the Array mpCurrShells.
|
||||
* Furthermore it can happen that a shell is activated while a curshell
|
||||
|
|
|
@ -661,7 +661,7 @@ void SwOLENode::SetChanged()
|
|||
|
||||
for(SwViewShell& rShell : pVSh->GetRingContainer())
|
||||
{
|
||||
SET_CURR_SHELL(&rShell);
|
||||
CurrShell aCurr(&rShell);
|
||||
|
||||
if(rShell.VisArea().IsOver(aFrameArea) && OUTDEV_WINDOW == rShell.GetOut()->GetOutDevType())
|
||||
{
|
||||
|
|
|
@ -50,7 +50,7 @@ void SwViewShellImp::StartAction()
|
|||
{
|
||||
if ( HasDrawView() )
|
||||
{
|
||||
SET_CURR_SHELL( GetShell() );
|
||||
CurrShell aCurr( GetShell() );
|
||||
if ( dynamic_cast<const SwFEShell*>( m_pShell) != nullptr )
|
||||
static_cast<SwFEShell*>(m_pShell)->HideChainMarker(); // might have changed
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ void SwViewShellImp::EndAction()
|
|||
{
|
||||
if ( HasDrawView() )
|
||||
{
|
||||
SET_CURR_SHELL( GetShell() );
|
||||
CurrShell aCurr( GetShell() );
|
||||
if ( dynamic_cast<const SwFEShell*>(m_pShell) != nullptr )
|
||||
static_cast<SwFEShell*>(m_pShell)->SetChainMarker(); // might have changed
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ void SwViewShell::PrintProspect(
|
|||
// create a new shell for the printer
|
||||
SwViewShell aShell( *this, nullptr, pPrinter );
|
||||
|
||||
SET_CURR_SHELL( &aShell );
|
||||
CurrShell aCurr( &aShell );
|
||||
|
||||
aShell.PrepareForPrint( rPrintData );
|
||||
|
||||
|
|
|
@ -267,7 +267,7 @@ void SwViewShell::ImplEndAction( const bool bIdleEnd )
|
|||
|
||||
const bool bIsShellForCheckViewLayout = ( this == GetLayout()->GetCurrShell() );
|
||||
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
if ( Imp()->HasDrawView() && !Imp()->GetDrawView()->areMarkHandlesHidden() )
|
||||
Imp()->StartAction();
|
||||
|
||||
|
@ -467,7 +467,7 @@ void SwViewShell::ImplLockPaint()
|
|||
|
||||
void SwViewShell::ImplUnlockPaint( bool bVirDev )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
if ( GetWin() && GetWin()->IsVisible() )
|
||||
{
|
||||
if ( (bInSizeNotify || bVirDev ) && VisArea().HasArea() )
|
||||
|
@ -639,7 +639,7 @@ bool SwViewShell::IsDummyPage( sal_uInt16 nPageNum ) const
|
|||
*/
|
||||
void SwViewShell::UpdateFields(bool bCloseDB)
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
|
||||
bool bCursor = dynamic_cast<const SwCursorShell*>( this ) != nullptr;
|
||||
if ( bCursor )
|
||||
|
@ -658,7 +658,7 @@ void SwViewShell::UpdateFields(bool bCloseDB)
|
|||
/** update all charts for which any table exists */
|
||||
void SwViewShell::UpdateAllCharts()
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
// Start-/EndAction handled in the SwDoc-Method!
|
||||
GetDoc()->UpdateAllCharts();
|
||||
}
|
||||
|
@ -693,7 +693,7 @@ void SwViewShell::LayoutIdle()
|
|||
return;
|
||||
}
|
||||
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
|
||||
#ifdef DBG_UTIL
|
||||
// If Test5 has been set, the IdleFormatter is disabled.
|
||||
|
@ -976,7 +976,7 @@ void SwViewShell::CalcLayout()
|
|||
// (except the Page Preview apparently only has a non-subclassed ViewShell)
|
||||
assert((typeid(*this) == typeid(SwViewShell)) || mnStartAction);
|
||||
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
SwWait aWait( *GetDoc()->GetDocShell(), true );
|
||||
|
||||
// Preserve top of the text frame cache.
|
||||
|
@ -1096,7 +1096,7 @@ void SwViewShell::VisPortChgd( const SwRect &rRect)
|
|||
Imp()->GetRegion() && Imp()->GetRegion()->GetOrigin() != VisArea() )
|
||||
Imp()->DelRegion();
|
||||
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
|
||||
bool bScrolled = false;
|
||||
|
||||
|
@ -1796,7 +1796,7 @@ void SwViewShell::Paint(vcl::RenderContext& rRenderContext, const tools::Rectang
|
|||
}
|
||||
|
||||
mbPaintInProgress = true;
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
SwRootFrame::SetNoVirDev( true );
|
||||
|
||||
//We don't want to Clip to and from, we trust that all are limited
|
||||
|
@ -2015,7 +2015,7 @@ void SwViewShell::InvalidateLayout( bool bSizeChanged )
|
|||
!GetViewOptions()->IsWhitespaceHidden() )
|
||||
return;
|
||||
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
|
||||
OSL_ENSURE( GetLayout(), "Layout not ready" );
|
||||
|
||||
|
@ -2153,7 +2153,7 @@ void SwViewShell::ImplApplyViewOptions( const SwViewOption &rOpt )
|
|||
return;
|
||||
}
|
||||
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
|
||||
bool bReformat = false;
|
||||
|
||||
|
|
|
@ -189,7 +189,7 @@ SwViewShell::SwViewShell( SwDoc& rDocument, vcl::Window *pWindow,
|
|||
mpImp->InitPagePreviewLayout();
|
||||
}
|
||||
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
|
||||
static_cast<SwHiddenTextFieldType*>(mxDoc->getIDocumentFieldsAccess().GetSysFieldType( SwFieldIds::HiddenText ))->
|
||||
SetHiddenFlag( !mpOpt->IsShowHiddenField() );
|
||||
|
@ -247,7 +247,7 @@ SwViewShell::SwViewShell( SwViewShell& rShell, vcl::Window *pWindow,
|
|||
if( nFlags & VSHELLFLAG_SHARELAYOUT )
|
||||
mpLayout = rShell.mpLayout;
|
||||
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
|
||||
bool bModified = mxDoc->getIDocumentState().IsModified();
|
||||
|
||||
|
@ -283,7 +283,7 @@ SwViewShell::~SwViewShell()
|
|||
= mxDoc ? &mxDoc->getIDocumentLayoutAccess() : nullptr;
|
||||
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
mbPaintWorks = false;
|
||||
|
||||
// i#9684 Stopping the animated graphics is not
|
||||
|
|
|
@ -107,7 +107,7 @@ void SwPaintQueue::Repaint()
|
|||
SwQueuedPaint *pPt = s_pPaintQueue;
|
||||
do
|
||||
{ SwViewShell *pSh = pPt->pSh;
|
||||
SET_CURR_SHELL( pSh );
|
||||
CurrShell aCurr( pSh );
|
||||
if ( pSh->IsPreview() )
|
||||
{
|
||||
if ( pSh->GetWin() )
|
||||
|
@ -201,7 +201,7 @@ void SwViewShell::InitPrt( OutputDevice *pOutDev )
|
|||
void SwViewShell::ChgAllPageOrientation( Orientation eOri )
|
||||
{
|
||||
OSL_ENSURE( mnStartAction, "missing an Action" );
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
|
||||
const size_t nAll = GetDoc()->GetPageDescCnt();
|
||||
bool bNewOri = eOri != Orientation::Portrait;
|
||||
|
@ -240,7 +240,7 @@ void SwViewShell::ChgAllPageOrientation( Orientation eOri )
|
|||
void SwViewShell::ChgAllPageSize( Size const &rSz )
|
||||
{
|
||||
OSL_ENSURE( mnStartAction, "missing an Action" );
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
|
||||
SwDoc* pMyDoc = GetDoc();
|
||||
const size_t nAll = pMyDoc->GetPageDescCnt();
|
||||
|
@ -273,7 +273,7 @@ void SwViewShell::ChgAllPageSize( Size const &rSz )
|
|||
|
||||
void SwViewShell::CalcPagesForPrint( sal_uInt16 nMax )
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
|
||||
SwRootFrame* pMyLayout = GetLayout();
|
||||
|
||||
|
@ -484,7 +484,7 @@ bool SwViewShell::PrintOrPDFExport(
|
|||
|
||||
{ // additional scope so that the CurrShell is reset before destroying the shell
|
||||
|
||||
SET_CURR_SHELL( pShell.get() );
|
||||
CurrShell aCurr( pShell.get() );
|
||||
|
||||
//JP 01.02.99: Bug 61335 - the ReadOnly flag is never copied
|
||||
if( mpOpt->IsReadonly() )
|
||||
|
@ -579,7 +579,7 @@ void SwViewShell::PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintD
|
|||
pSh.reset(new SwViewShell( *pDoc, nullptr, pOpt, &rRenderContext));
|
||||
|
||||
{
|
||||
SET_CURR_SHELL( pSh.get() );
|
||||
CurrShell aCurr( pSh.get() );
|
||||
pSh->PrepareForPrint( rOptions );
|
||||
pSh->SetPrtFormatOption( true );
|
||||
|
||||
|
|
|
@ -308,7 +308,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
|
|||
}
|
||||
}
|
||||
|
||||
SET_CURR_SHELL(pSh);
|
||||
CurrShell aCurr(pSh);
|
||||
pSh->SetNewDoc(); // Avoid performance problems
|
||||
|
||||
// Remember Flys of this site
|
||||
|
|
|
@ -210,7 +210,7 @@ void SwModule::InsertLab(SfxRequest& rReq, bool bLabel)
|
|||
|
||||
SwWait aWait( static_cast<SwDocShell&>(*xDocSh), true );
|
||||
|
||||
SET_CURR_SHELL(pSh);
|
||||
CurrShell aCurr(pSh);
|
||||
pSh->SetLabelDoc(rItem.m_bSynchron);
|
||||
pSh->DoUndo( false );
|
||||
pSh->StartAllAction();
|
||||
|
|
|
@ -375,7 +375,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier )
|
|||
if( !rSh.VisArea().Width() )
|
||||
return;
|
||||
|
||||
SET_CURR_SHELL(&rSh);
|
||||
CurrShell aCurr(&rSh);
|
||||
|
||||
if ( IsChainMode() )
|
||||
{
|
||||
|
@ -2900,7 +2900,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
|
|||
if( rSh.FinishOLEObj() )
|
||||
return; // end InPlace and the click doesn't count anymore
|
||||
|
||||
SET_CURR_SHELL( &rSh );
|
||||
CurrShell aCurr( &rSh );
|
||||
|
||||
SdrView *pSdrView = rSh.GetDrawView();
|
||||
if ( pSdrView )
|
||||
|
@ -3818,7 +3818,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
|
|||
|
||||
bool bIsDocReadOnly = m_rView.GetDocShell()->IsReadOnly();
|
||||
|
||||
SET_CURR_SHELL( &rSh );
|
||||
CurrShell aCurr( &rSh );
|
||||
|
||||
//aPixPt == Point in Pixel, relative to ChildWin
|
||||
//aDocPt == Point in Twips, document coordinates
|
||||
|
@ -4282,7 +4282,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
|
|||
m_rView.SetNumRuleNodeFromDoc(nullptr);
|
||||
|
||||
SwWrtShell &rSh = m_rView.GetWrtShell();
|
||||
SET_CURR_SHELL( &rSh );
|
||||
CurrShell aCurr( &rSh );
|
||||
SdrView *pSdrView = rSh.GetDrawView();
|
||||
if ( pSdrView )
|
||||
{
|
||||
|
@ -5220,7 +5220,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
|
|||
if((!pChildWin || pChildWin->GetView() != &m_rView) &&
|
||||
!rSh.IsDrawCreate() && !IsDrawAction())
|
||||
{
|
||||
SET_CURR_SHELL( &rSh );
|
||||
CurrShell aCurr( &rSh );
|
||||
if (!m_pApplyTempl)
|
||||
{
|
||||
if (g_bNoInterrupt)
|
||||
|
|
|
@ -100,7 +100,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
|
|||
if(bQuickBalloon && !rSh.GetViewOptions()->IsShowContentTips())
|
||||
return;
|
||||
bool bContinue = true;
|
||||
SET_CURR_SHELL(&rSh);
|
||||
CurrShell aCurr(&rSh);
|
||||
OUString sText;
|
||||
Point aPos( PixelToLogic( ScreenToOutputPixel( rEvt.GetMousePosPixel() ) ));
|
||||
bool bBalloon = bool(rEvt.GetMode() & HelpEventMode::BALLOON);
|
||||
|
|
|
@ -960,7 +960,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
|
|||
{
|
||||
if (m_pWrtShell->GetDoc()->GetDocumentFieldsManager().containsUpdatableFields())
|
||||
{
|
||||
SET_CURR_SHELL(m_pWrtShell.get());
|
||||
CurrShell aCurr(m_pWrtShell.get());
|
||||
m_pWrtShell->StartAction();
|
||||
m_pWrtShell->CalcLayout();
|
||||
m_pWrtShell->GetDoc()->getIDocumentFieldsAccess().UpdateFields(false);
|
||||
|
@ -1166,7 +1166,7 @@ void SwView::ReadUserData( const OUString &rUserData, bool bBrowse )
|
|||
{
|
||||
bool bIsOwnDocument = lcl_IsOwnDocument( *this );
|
||||
|
||||
SET_CURR_SHELL(m_pWrtShell.get());
|
||||
CurrShell aCurr(m_pWrtShell.get());
|
||||
|
||||
sal_Int32 nPos = 0;
|
||||
|
||||
|
@ -1284,7 +1284,7 @@ void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue >
|
|||
if (!rSequence.hasElements())
|
||||
return;
|
||||
|
||||
SET_CURR_SHELL(m_pWrtShell.get());
|
||||
CurrShell aCurr(m_pWrtShell.get());
|
||||
const SwRect& rRect = m_pWrtShell->GetCharRect();
|
||||
const tools::Rectangle &rVis = GetVisArea();
|
||||
const SwViewOption* pVOpt = m_pWrtShell->GetViewOptions();
|
||||
|
|
|
@ -1060,7 +1060,7 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize )
|
|||
ShowVScrollbar(bShowV);
|
||||
m_pVScrollbar->SetAuto(bAuto);
|
||||
|
||||
SET_CURR_SHELL( m_pWrtShell.get() );
|
||||
CurrShell aCurr( m_pWrtShell.get() );
|
||||
bool bRepeat = false;
|
||||
long nCnt = 0;
|
||||
|
||||
|
|
|
@ -1665,7 +1665,7 @@ SwWrtShell::SwWrtShell( SwWrtShell& rSh, vcl::Window *_pWin, SwView &rShell )
|
|||
, m_aNavigationMgr(*this)
|
||||
{
|
||||
BITFLD_INI_LIST
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
|
||||
SetSfxViewShell( static_cast<SfxViewShell *>(&rShell) );
|
||||
SetFlyMacroLnk( LINK(this, SwWrtShell, ExecFlyMac) );
|
||||
|
@ -1684,7 +1684,7 @@ SwWrtShell::SwWrtShell( SwDoc& rDoc, vcl::Window *_pWin, SwView &rShell,
|
|||
, m_aNavigationMgr(*this)
|
||||
{
|
||||
BITFLD_INI_LIST
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
SetSfxViewShell( static_cast<SfxViewShell *>(&rShell) );
|
||||
SetFlyMacroLnk( LINK(this, SwWrtShell, ExecFlyMac) );
|
||||
|
||||
|
@ -1697,7 +1697,7 @@ SwWrtShell::SwWrtShell( SwDoc& rDoc, vcl::Window *_pWin, SwView &rShell,
|
|||
|
||||
SwWrtShell::~SwWrtShell()
|
||||
{
|
||||
SET_CURR_SHELL( this );
|
||||
CurrShell aCurr( this );
|
||||
while(IsModePushed())
|
||||
PopMode();
|
||||
while(PopCursor(false))
|
||||
|
|
Loading…
Reference in a new issue