diff options
author | Petr Mladek <pmladek@suse.cz> | 2012-11-05 14:34:27 +0100 |
---|---|---|
committer | Petr Mladek <pmladek@suse.cz> | 2012-11-05 14:34:27 +0100 |
commit | ef15a5a4acd3174752484c6aeb570d4d6444b645 (patch) | |
tree | 3d1d5b58f85737aa46241aea4c4dabea520cecc2 /sw/source/core | |
parent | a1b0ce05e851e9724c046888a01869eddf9e9db2 (diff) | |
parent | c309ce0227a14330094191c1ef15fa00899defcb (diff) |
Merge remote-tracking branch 'origin/libreoffice-3-6-3' into suse-3.6
Conflicts:
desktop/source/app/sofficemain.cxx
instsetoo_native/util/openoffice.lst
solenv/inc/minor.mk
Change-Id: I3e9510067c7173f6c71368e70ba6dfe168c5318e
Diffstat (limited to 'sw/source/core')
-rw-r--r-- | sw/source/core/crsr/crsrsh.cxx | 15 | ||||
-rwxr-xr-x[-rw-r--r--] | sw/source/core/doc/dbgoutsw.cxx | 5 | ||||
-rw-r--r-- | sw/source/core/table/swtable.cxx | 14 | ||||
-rw-r--r-- | sw/source/core/undo/untbl.cxx | 5 | ||||
-rw-r--r-- | sw/source/core/view/printdata.cxx | 5 |
5 files changed, 30 insertions, 14 deletions
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index ca62c557e9f5..1493d14cd180 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -2012,26 +2012,27 @@ void SwCrsrShell::Combine() return; SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen - SwCrsrSaveState aSaveState( *pCurCrsr ); + // rhbz#689053: IsSelOvr must restore the saved stack position, not the + // current one, because current point + stack mark may be invalid PaM + SwCrsrSaveState aSaveState(*pCrsrStk); if( pCrsrStk->HasMark() ) // nur wenn GetMark gesetzt wurde { bool const bResult = CheckNodesRange( pCrsrStk->GetMark()->nNode, pCurCrsr->GetPoint()->nNode, sal_True ); OSL_ENSURE(bResult, "StackCrsr & act. Crsr not in same Section."); (void) bResult; // non-debug: unused - // kopiere das GetMark - if( !pCurCrsr->HasMark() ) - pCurCrsr->SetMark(); - *pCurCrsr->GetMark() = *pCrsrStk->GetMark(); - pCurCrsr->GetMkPos() = pCrsrStk->GetMkPos(); } + *pCrsrStk->GetPoint() = *pCurCrsr->GetPoint(); + pCrsrStk->GetPtPos() = pCurCrsr->GetPtPos(); SwShellCrsr * pTmp = 0; if( pCrsrStk->GetNext() != pCrsrStk ) { pTmp = dynamic_cast<SwShellCrsr*>(pCrsrStk->GetNext()); } - delete pCrsrStk; + delete pCurCrsr; + pCurCrsr = pCrsrStk; + pCrsrStk->MoveTo(0); // remove from ring pCrsrStk = pTmp; if( !pCurCrsr->IsInProtectTable( sal_True ) && !pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE | diff --git a/sw/source/core/doc/dbgoutsw.cxx b/sw/source/core/doc/dbgoutsw.cxx index b14e07d0cd7f..ad42cff7539d 100644..100755 --- a/sw/source/core/doc/dbgoutsw.cxx +++ b/sw/source/core/doc/dbgoutsw.cxx @@ -973,12 +973,9 @@ String lcl_TokenType2Str(FormTokenType nType) case TOKEN_END: return String("END", RTL_TEXTENCODING_ASCII_US); default: + OSL_FAIL("should not be reached"); return String("??", RTL_TEXTENCODING_ASCII_US); } - - OSL_FAIL("should not be reached"); - - return String("??", RTL_TEXTENCODING_ASCII_US); } String lcl_dbg_out(const SwFormToken & rToken) diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx index 3a57a7586b4f..69e755b09a70 100644 --- a/sw/source/core/table/swtable.cxx +++ b/sw/source/core/table/swtable.cxx @@ -1747,10 +1747,9 @@ SwTableBox::SwTableBox( SwTableBoxFmt* pFmt, const SwStartNode& rSttNd, SwTableL rSrtArr.Insert( p ); // eintragen } -SwTableBox::~SwTableBox() +void SwTableBox::RemoveFromTable() { - // Inhaltstragende Box ? - if( !GetFrmFmt()->GetDoc()->IsInDtor() && pSttNd ) + if (pSttNd) // box containing contents? { // an der Table austragen const SwTableNode* pTblNd = pSttNd->FindTableNode(); @@ -1759,6 +1758,15 @@ SwTableBox::~SwTableBox() GetTabSortBoxes(); SwTableBox *p = this; // error: &this rSrtArr.Remove( p ); // austragen + pSttNd = 0; // clear it so this is only run once + } +} + +SwTableBox::~SwTableBox() +{ + if (!GetFrmFmt()->GetDoc()->IsInDtor()) + { + RemoveFromTable(); } // ist die TabelleBox der letzte Client im FrameFormat, kann dieses diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx index 11dbb4b7eeaa..e3a6af5d7a6a 100644 --- a/sw/source/core/undo/untbl.cxx +++ b/sw/source/core/undo/untbl.cxx @@ -1755,7 +1755,11 @@ void SwUndoTblNdsChg::UndoImpl(::sw::UndoRedoContext & rContext) rDoc.GetNodes()._MoveNodes( aRg, rDoc.GetNodes(), aInsPos, sal_False ); } else + { // first disconnect box from node, otherwise ~SwTableBox would + // access pBox->pSttNd, deleted by DeleteSection + pBox->RemoveFromTable(); rDoc.DeleteSection( rDoc.GetNodes()[ nIdx ] ); + } aDelBoxes.insert( aDelBoxes.end(), pBox ); } } @@ -1771,6 +1775,7 @@ void SwUndoTblNdsChg::UndoImpl(::sw::UndoRedoContext & rContext) // TL_CHART2: notify chart about box to be removed if (pPCD) pPCD->DeleteBox( &pTblNd->GetTable(), *pBox ); + pBox->RemoveFromTable(); // ~SwTableBox would access pBox->pSttNd aDelBoxes.insert( aDelBoxes.end(), pBox ); rDoc.DeleteSection( rDoc.GetNodes()[ nIdx ] ); } diff --git a/sw/source/core/view/printdata.cxx b/sw/source/core/view/printdata.cxx index 4e6d37f1cab1..99888555d2dd 100644 --- a/sw/source/core/view/printdata.cxx +++ b/sw/source/core/view/printdata.cxx @@ -131,6 +131,11 @@ void SwRenderData::ViewOptionAdjustStop() m_pViewOptionAdjust.reset(); } +void SwRenderData::ViewOptionAdjustCrashPreventionKludge() +{ + m_pViewOptionAdjust->DontTouchThatViewShellItSmellsFunny(); +} + void SwRenderData::MakeSwPrtOptions( SwDocShell const*const pDocShell, |