diff options
| author | Oliver-Rainer Wittmann <orw@apache.org> | 2014-07-15 12:15:37 +0000 |
|---|---|---|
| committer | Caolán McNamara <caolanm@redhat.com> | 2014-07-16 09:01:02 +0100 |
| commit | 133d6d8d4dec497276c3a9b0ba6761cffd322f81 (patch) | |
| tree | 26282ae68d27e44ff6bf7ad22023272cf4d1bf54 | |
| parent | 7dd5f9308895644ae6ece56253c892046cc6ed5e (diff) | |
Resolves: #i121443# register text frames and graphics...
on the correct page frame
- trigger formatting of selected object when moving view to the selected object
or when graphical horizontal line has been inserted.
(cherry picked from commit 82fafc47de0c59c783c5df596c976a429ff8a21d)
Conflicts:
sw/source/core/frmedt/feshview.cxx
sw/source/core/layout/fly.cxx
sw/source/ui/shells/textsh.cxx
Change-Id: I4b4b523ff445f2ce20d9b81ad1187db7b44bd145
| -rw-r--r-- | sw/source/core/frmedt/feshview.cxx | 5 | ||||
| -rw-r--r-- | sw/source/core/layout/fly.cxx | 33 |
2 files changed, 6 insertions, 32 deletions
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index 75b3d3342765..8aa17a8c6814 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -2253,9 +2253,10 @@ const SwFrmFmt* SwFEShell::GetFlyNum(sal_uInt16 nIdx, FlyCntType eType, bool bI // show the current selected object void SwFEShell::MakeSelVisible() { - if( Imp()->HasDrawView() && - Imp()->GetDrawView()->GetMarkedObjectList().GetMarkCount() ) + if ( Imp()->HasDrawView() && + Imp()->GetDrawView()->GetMarkedObjectList().GetMarkCount() ) { + GetCurrFrm(); // just to trigger formatting in case the selected object is not formatted. MakeVisible( Imp()->GetDrawView()->GetAllMarkedRect() ); } else diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx index f4c01f43d1b9..6aa2579550ef 100644 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -2007,37 +2007,10 @@ void SwFrm::AppendFly( SwFlyFrm *pNew ) // Register at the page // If there's none present, register via SwPageFrm::PreparePage - SwPageFrm *pPage = FindPageFrm(); - if ( pPage ) + SwPageFrm* pPage = FindPageFrm(); + if ( pPage != NULL ) { - if ( pNew->IsFlyAtCntFrm() && pNew->Frm().Top() == FAR_AWAY ) - { - // Try to make the page formatting of new documents a bit handier: - // In the beginning we add the Flys to the back, so that the Anchors - // do not have to be reformatted unnecessarily often. - // However, we do not add them all the way at the end, so that we - // can still jump to the document's end in a meaningful way. - SwRootFrm *pRoot = (SwRootFrm*)pPage->GetUpper(); - if( !SwLayHelper::CheckPageFlyCache( pPage, pNew ) ) - { - SwPageFrm *pTmp = pRoot->GetLastPage(); - if ( pTmp->GetPhyPageNum() > 30 ) - { - for ( sal_uInt16 i = 0; i < 10; ++i ) - { - pTmp = (SwPageFrm*)pTmp->GetPrev(); - if( pTmp->GetPhyPageNum() <= pPage->GetPhyPageNum() ) - break; // So that we don't end up before the Anchor - } - if ( pTmp->IsEmptyPage() ) - pTmp = (SwPageFrm*)pTmp->GetPrev(); - pPage = pTmp; - } - } - pPage->AppendFlyToPage( pNew ); - } - else - pPage->AppendFlyToPage( pNew ); + pPage->AppendFlyToPage( pNew ); } } |
