Files
libreoffice/sw/source/core/layout/flycnt.cxx

1517 lines
57 KiB
C++
Raw Normal View History

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
re-base on ALv2 code. Includes: Patches contributed by Oliver-Rainer Wittmann sw34bf06: #i117783# - Writer's implementation of XPagePrintable - apply print settings to new printing routines http://svn.apache.org/viewvc?view=revision&revision=1172115 sw34bf06: #o12311627# use <rtl_random> methods to create unique ids for list styles and list ids http://svn.apache.org/viewvc?view=revision&revision=1172112 sw34bf06 #i114725#,#i115828# - method <SwDoc::ClearDoc()> - clear list structures completely http://svn.apache.org/viewvc?view=revision&revision=1172122 i#118572 - remove ui string and help content regarding usage of Java Mail in Writer's Mail Merge as Java Mail is not used. http://svn.apache.org/viewvc?view=revision&revision=1197035 Patches contributed by Mathias Bauer cws mba34issues01: #i117718#: provide filter name in case storage of medium does not allow to detect one http://svn.apache.org/viewvc?view=revision&revision=1172350 cws mba34issues01: #i117721#: directly provide parameters retrieved from SfxMedium http://svn.apache.org/viewvc?view=revision&revision=1172353 gnumake4 work variously http://svn.apache.org/viewvc?view=revision&revision=1394707 http://svn.apache.org/viewvc?view=revision&revision=1394326 http://svn.apache.org/viewvc?view=revision&revision=1396797 http://svn.apache.org/viewvc?view=revision&revision=1397315 cws mba34issues01: #i117723#: convert assertion into trace http://svn.apache.org/viewvc?view=revision&revision=1172355 cws mba34issues01: #i117699#: keep layout alive until swdoc dies http://svn.apache.org/viewvc?view=revision&revision=1172362 cws mba34issues01: #i117943#: missing color attributes in RTF clipboard http://svn.apache.org/viewvc?view=revision&revision=1172363 Patch contributed by Henning Brinkmann imported patch i#103878 http://svn.apache.org/viewvc?view=revision&revision=1172109 Patches contributed by Michael Stahl sw34bf06: #i117955#: WW8 export: disable storing of section breaks in endnotes http://svn.apache.org/viewvc?view=revision&revision=1172119 Patch contributed by imacat Fixed the Asian language work count. http://svn.apache.org/viewvc?view=revision&revision=1241345 Patch contributed by Pedro Giffuni i#20878 - Add comment with BZ issue for reference. http://svn.apache.org/viewvc?view=revision&revision=1244517 Patch contributed by Andre Fischer Do not add targets for junit tests when junit is disabled. http://svn.apache.org/viewvc?view=revision&revision=1241508 add writerperfect dependency.
2011-03-31 10:05:04 +02:00
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
2000-09-18 23:08:29 +00:00
#include <tools/bigint.hxx>
#include "pagefrm.hxx"
#include "cntfrm.hxx"
#include "flyfrm.hxx"
#include "txtfrm.hxx"
#include <doc.hxx>
#include <IDocumentUndoRedo.hxx>
2000-09-18 23:08:29 +00:00
#include "viewsh.hxx"
#include "viewimp.hxx"
#include "pam.hxx"
#include "frmfmt.hxx"
#include "frmtool.hxx"
#include "dflyobj.hxx"
#include "hints.hxx"
#include "ndtxt.hxx"
2000-09-18 23:08:29 +00:00
#include "swundo.hxx"
#include <editeng/ulspitem.hxx>
#include <editeng/lrspitem.hxx>
2000-09-18 23:08:29 +00:00
#include <fmtanchr.hxx>
#include <fmtornt.hxx>
#include <fmtfsize.hxx>
#include <fmtsrnd.hxx>
2000-09-18 23:08:29 +00:00
#include "tabfrm.hxx"
#include "flyfrms.hxx"
#include "crstate.hxx"
#include "sectfrm.hxx"
#include <tocntntanchoredobjectposition.hxx>
#include <dcontact.hxx>
#include <sortedobjs.hxx>
#include <layouter.hxx>
#include <objectformattertxtfrm.hxx>
#include <HandleAnchorNodeChg.hxx>
using namespace ::com::sun::star;
2000-09-18 23:08:29 +00:00
/*************************************************************************
|*
|* SwFlyAtCntFrm::SwFlyAtCntFrm()
|*
|*************************************************************************/
SwFlyAtCntFrm::SwFlyAtCntFrm( SwFlyFrmFmt *pFmt, SwFrm* pSib, SwFrm *pAnch ) :
SwFlyFreeFrm( pFmt, pSib, pAnch )
2000-09-18 23:08:29 +00:00
{
bAtCnt = sal_True;
bAutoPosition = (FLY_AT_CHAR == pFmt->GetAnchor().GetAnchorId());
2000-09-18 23:08:29 +00:00
}
2011-02-13 18:00:46 +01:00
// #i28701#
TYPEINIT1(SwFlyAtCntFrm,SwFlyFreeFrm);
2000-09-18 23:08:29 +00:00
/*************************************************************************
|*
|* SwFlyAtCntFrm::Modify()
|*
|*************************************************************************/
void SwFlyAtCntFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
2000-09-18 23:08:29 +00:00
{
sal_uInt16 nWhich = pNew ? pNew->Which() : 0;
2000-09-18 23:08:29 +00:00
const SwFmtAnchor *pAnch = 0;
2000-09-18 23:08:29 +00:00
if( RES_ATTRSET_CHG == nWhich && SFX_ITEM_SET ==
((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_ANCHOR, sal_False,
2000-09-18 23:08:29 +00:00
(const SfxPoolItem**)&pAnch ))
2012-02-13 11:37:18 +01:00
; // The anchor pointer is set at GetItemState!
2000-09-18 23:08:29 +00:00
else if( RES_ANCHOR == nWhich )
{
2012-02-13 11:37:18 +01:00
//Change anchor, I move myself to a new place.
//The anchor type must not change, this is only possible using
//SwFEShell.
2000-09-18 23:08:29 +00:00
pAnch = (const SwFmtAnchor*)pNew;
}
if( pAnch )
{
OSL_ENSURE( pAnch->GetAnchorId() == GetFmt()->GetAnchor().GetAnchorId(),
2012-02-13 11:37:18 +01:00
"Illegal change of anchor type. " );
2000-09-18 23:08:29 +00:00
2012-02-13 11:37:18 +01:00
//Unregister, get hold of a new anchor and attach it
SwRect aOld( GetObjRectWithSpaces() );
2000-09-18 23:08:29 +00:00
SwPageFrm *pOldPage = FindPageFrm();
const SwFrm *pOldAnchor = GetAnchorFrm();
SwCntntFrm *pCntnt = (SwCntntFrm*)GetAnchorFrm();
AnchorFrm()->RemoveFly( this );
2000-09-18 23:08:29 +00:00
const bool bBodyFtn = (pCntnt->IsInDocBody() || pCntnt->IsInFtn());
2000-09-18 23:08:29 +00:00
// Search the new anchor using the NodeIdx; the relation between old
// and new NodeIdx determines the search direction
2000-09-18 23:08:29 +00:00
const SwNodeIndex aNewIdx( pAnch->GetCntntAnchor()->nNode );
SwNodeIndex aOldIdx( *pCntnt->GetNode() );
2012-02-13 11:37:18 +01:00
//fix: depending on which index was smaller, searching in the do-while
//loop previously was done forward or backwards respectively. This however
//could lead to an infinite loop. To at least avoid the loop, searching
//is now done in only one direction. Getting hold of a frame from the node
//is still possible if the new anchor could not be found. Chances are
//good that this will be the correct one.
const bool bNext = aOldIdx < aNewIdx;
// consider the case that at found anchor frame candidate already a
// fly frame of the given fly format is registered.
2011-02-13 18:00:46 +01:00
// consider, that <pCntnt> is the already
// the new anchor frame.
bool bFound( aOldIdx == aNewIdx );
while ( pCntnt && !bFound )
2000-09-18 23:08:29 +00:00
{
do
{
if ( bNext )
2000-09-18 23:08:29 +00:00
pCntnt = pCntnt->GetNextCntntFrm();
else
pCntnt = pCntnt->GetPrevCntntFrm();
} while ( pCntnt &&
!( bBodyFtn == ( pCntnt->IsInDocBody() ||
pCntnt->IsInFtn() ) ) );
if ( pCntnt )
2000-09-18 23:08:29 +00:00
aOldIdx = *pCntnt->GetNode();
// check, if at found anchor frame candidate already a fly frame
// of the given fly frame format is registered.
bFound = aOldIdx == aNewIdx;
if ( bFound && pCntnt->GetDrawObjs() )
{
SwFrmFmt* pMyFlyFrmFmt( &GetFrmFmt() );
SwSortedObjs &rObjs = *pCntnt->GetDrawObjs();
for( sal_uInt16 i = 0; i < rObjs.Count(); ++i)
{
SwFlyFrm* pFlyFrm = dynamic_cast<SwFlyFrm*>(rObjs[i]);
if ( pFlyFrm &&
&(pFlyFrm->GetFrmFmt()) == pMyFlyFrmFmt )
{
bFound = false;
break;
}
}
}
2000-09-18 23:08:29 +00:00
}
if ( !pCntnt )
{
SwCntntNode *pNode = aNewIdx.GetNode().GetCntntNode();
pCntnt = pNode->getLayoutFrm( getRootFrm(), &pOldAnchor->Frm().Pos(), 0, sal_False );
OSL_ENSURE( pCntnt, "Neuen Anker nicht gefunden" );
2000-09-18 23:08:29 +00:00
}
2012-02-13 11:37:18 +01:00
//Flys are never attached to a follow, but always on the master which
//we are going to search now.
SwCntntFrm* pFlow = pCntnt;
2000-09-18 23:08:29 +00:00
while ( pFlow->IsFollow() )
pFlow = pFlow->FindMaster();
pCntnt = pFlow;
2000-09-18 23:08:29 +00:00
2012-02-13 11:37:18 +01:00
//and *puff* it's attached...
2000-09-18 23:08:29 +00:00
pCntnt->AppendFly( this );
if ( pOldPage && pOldPage != FindPageFrm() )
NotifyBackground( pOldPage, aOld, PREP_FLY_LEAVE );
//Fix(3495)
_InvalidatePos();
InvalidatePage();
SetNotifyBack();
2011-02-13 18:00:46 +01:00
// #i28701# - reset member <maLastCharRect> and
// <mnLastTopOfLine> for to-character anchored objects.
ClearCharRectAndTopOfLine();
2000-09-18 23:08:29 +00:00
}
else
SwFlyFrm::Modify( pOld, pNew );
}
/*************************************************************************
|*
|* SwFlyAtCntFrm::MakeAll()
|*
2012-02-13 11:37:18 +01:00
|* Description With a paragraph-anchored fly it's absolutely possible that
|* the anchor reacts to changes of the fly. To this reaction the fly must
|* certaily react too. Sadly this can lead to oscillations; for example the
|* fly wants to go down therefore the content can go up - this leads to a
|* smaller TxtFrm thus the fly needs to go up again whereby the text will
|* get pushed down...
|* To avoid such oscillations, a small position stack is built. If the fly
|* reaches a position which it already had once, the action is stopped.
|* To not run into problems, the stack is designed to hold five positions.
|* If the stack flows over, the action is stopped too.
|* Cancellation leads to the situation that the fly has a bad position in
|* the end. In case of cancellation, the frame is set to automatic top
|* alignment to not trigger a 'big oscillation' when calling from outside
|* again.
2000-09-18 23:08:29 +00:00
|*************************************************************************/
2012-02-13 11:37:18 +01:00
//We need some helper classes to monitor the oscillation and a few functions
//to not get lost.
2011-02-13 18:00:46 +01:00
// #i3317# - re-factoring of the position stack
2000-09-18 23:08:29 +00:00
class SwOszControl
{
static const SwFlyFrm *pStk1;
static const SwFlyFrm *pStk2;
static const SwFlyFrm *pStk3;
static const SwFlyFrm *pStk4;
static const SwFlyFrm *pStk5;
const SwFlyFrm *pFly;
2011-02-13 18:00:46 +01:00
// #i3317#
sal_uInt8 mnPosStackSize;
std::vector<Point*> maObjPositions;
2000-09-18 23:08:29 +00:00
public:
SwOszControl( const SwFlyFrm *pFrm );
~SwOszControl();
bool ChkOsz();
static bool IsInProgress( const SwFlyFrm *pFly );
2000-09-18 23:08:29 +00:00
};
const SwFlyFrm *SwOszControl::pStk1 = 0;
const SwFlyFrm *SwOszControl::pStk2 = 0;
const SwFlyFrm *SwOszControl::pStk3 = 0;
const SwFlyFrm *SwOszControl::pStk4 = 0;
const SwFlyFrm *SwOszControl::pStk5 = 0;
SwOszControl::SwOszControl( const SwFlyFrm *pFrm )
: pFly( pFrm ),
2011-02-13 18:00:46 +01:00
// #i3317#
mnPosStackSize( 20 )
2000-09-18 23:08:29 +00:00
{
if ( !SwOszControl::pStk1 )
SwOszControl::pStk1 = pFly;
else if ( !SwOszControl::pStk2 )
SwOszControl::pStk2 = pFly;
else if ( !SwOszControl::pStk3 )
SwOszControl::pStk3 = pFly;
else if ( !SwOszControl::pStk4 )
SwOszControl::pStk4 = pFly;
else if ( !SwOszControl::pStk5 )
SwOszControl::pStk5 = pFly;
}
SwOszControl::~SwOszControl()
{
if ( SwOszControl::pStk1 == pFly )
SwOszControl::pStk1 = 0;
else if ( SwOszControl::pStk2 == pFly )
SwOszControl::pStk2 = 0;
else if ( SwOszControl::pStk3 == pFly )
SwOszControl::pStk3 = 0;
else if ( SwOszControl::pStk4 == pFly )
SwOszControl::pStk4 = 0;
else if ( SwOszControl::pStk5 == pFly )
SwOszControl::pStk5 = 0;
2011-02-13 18:00:46 +01:00
// #i3317#
while ( !maObjPositions.empty() )
{
Point* pPos = maObjPositions.back();
delete pPos;
maObjPositions.pop_back();
}
2000-09-18 23:08:29 +00:00
}
bool SwOszControl::IsInProgress( const SwFlyFrm *pFly )
2000-09-18 23:08:29 +00:00
{
if ( SwOszControl::pStk1 && !pFly->IsLowerOf( SwOszControl::pStk1 ) )
return true;
2000-09-18 23:08:29 +00:00
if ( SwOszControl::pStk2 && !pFly->IsLowerOf( SwOszControl::pStk2 ) )
return true;
2000-09-18 23:08:29 +00:00
if ( SwOszControl::pStk3 && !pFly->IsLowerOf( SwOszControl::pStk3 ) )
return true;
2000-09-18 23:08:29 +00:00
if ( SwOszControl::pStk4 && !pFly->IsLowerOf( SwOszControl::pStk4 ) )
return true;
2000-09-18 23:08:29 +00:00
if ( SwOszControl::pStk5 && !pFly->IsLowerOf( SwOszControl::pStk5 ) )
return true;
return false;
2000-09-18 23:08:29 +00:00
}
bool SwOszControl::ChkOsz()
2000-09-18 23:08:29 +00:00
{
bool bOscillationDetected = false;
if ( maObjPositions.size() == mnPosStackSize )
{
// position stack is full -> oscillation
bOscillationDetected = true;
}
else
2000-09-18 23:08:29 +00:00
{
Point* pNewObjPos = new Point( pFly->GetObjRect().Pos() );
for ( std::vector<Point*>::iterator aObjPosIter = maObjPositions.begin();
aObjPosIter != maObjPositions.end();
++aObjPosIter )
{
if ( *(pNewObjPos) == *(*aObjPosIter) )
{
2010-12-04 14:11:36 +09:00
// position already occurred -> oscillation
bOscillationDetected = true;
delete pNewObjPos;
break;
}
}
if ( !bOscillationDetected )
{
maObjPositions.push_back( pNewObjPos );
}
2000-09-18 23:08:29 +00:00
}
return bOscillationDetected;
2000-09-18 23:08:29 +00:00
}
void SwFlyAtCntFrm::MakeAll()
{
if ( !GetFmt()->GetDoc()->IsVisibleLayerId( GetVirtDrawObj()->GetLayer() ) )
{
return;
}
if ( !SwOszControl::IsInProgress( this ) && !IsLocked() && !IsColLocked() )
2000-09-18 23:08:29 +00:00
{
2011-02-13 18:00:46 +01:00
// #i28701# - use new method <GetPageFrm()>
if( !GetPageFrm() && GetAnchorFrm() && GetAnchorFrm()->IsInFly() )
{
SwFlyFrm* pFly = AnchorFrm()->FindFlyFrm();
SwPageFrm *pTmpPage = pFly ? pFly->FindPageFrm() : NULL;
if( pTmpPage )
pTmpPage->AppendFlyToPage( this );
}
2011-02-13 18:00:46 +01:00
// #i28701# - use new method <GetPageFrm()>
if( GetPageFrm() )
{
bSetCompletePaintOnInvalidate = true;
{
SwFlyFrmFmt *pFmt = (SwFlyFrmFmt*)GetFmt();
const SwFmtFrmSize &rFrmSz = GetFmt()->GetFrmSize();
if( rFrmSz.GetHeightPercent() != 0xFF &&
rFrmSz.GetHeightPercent() >= 100 )
{
pFmt->LockModify();
SwFmtSurround aMain( pFmt->GetSurround() );
if ( aMain.GetSurround() == SURROUND_NONE )
{
aMain.SetSurround( SURROUND_THROUGHT );
pFmt->SetFmtAttr( aMain );
}
pFmt->UnlockModify();
}
}
SwOszControl aOszCntrl( this );
2000-09-18 23:08:29 +00:00
2011-02-13 18:00:46 +01:00
// #i43255#
// #i50356# - format the anchor frame, which
// contains the anchor position. E.g., for at-character anchored
// object this can be the follow frame of the anchor frame.
const bool bFormatAnchor =
!static_cast<const SwTxtFrm*>( GetAnchorFrmContainingAnchPos() )->IsAnyJoinLocked() &&
!ConsiderObjWrapInfluenceOnObjPos() &&
!ConsiderObjWrapInfluenceOfOtherObjs();
const SwFrm* pFooter = GetAnchorFrm()->FindFooterOrHeader();
if( pFooter && !pFooter->IsFooterFrm() )
pFooter = NULL;
bool bOsz = false;
bool bExtra = Lower() && Lower()->IsColumnFrm();
2011-02-13 18:00:46 +01:00
// #i3317# - boolean, to apply temporarly the
// 'straightforward positioning process' for the frame due to its
// overlapping with a previous column.
bool bConsiderWrapInfluenceDueToOverlapPrevCol( false );
2011-02-13 18:00:46 +01:00
// #i35911# - boolean, to apply temporarly the
// 'straightforward positioning process' for the frame due to fact
// that it causes the complete content of its layout environment
// to move forward.
2011-02-13 18:00:46 +01:00
// #i40444# - extend usage of this boolean:
// apply temporarly the 'straightforward positioning process' for
// the frame due to the fact that the frame clears the area for
// the anchor frame, thus it has to move forward.
bool bConsiderWrapInfluenceDueToMovedFwdAnchor( false );
do {
SWRECTFN( this )
Point aOldPos( (Frm().*fnRect->fnGetPos)() );
SwFlyFreeFrm::MakeAll();
const bool bPosChgDueToOwnFormat =
aOldPos != (Frm().*fnRect->fnGetPos)();
2011-02-13 18:00:46 +01:00
// #i3317#
if ( !ConsiderObjWrapInfluenceOnObjPos() &&
OverlapsPrevColumn() )
{
bConsiderWrapInfluenceDueToOverlapPrevCol = true;
}
2011-02-13 18:00:46 +01:00
// #i28701# - no format of anchor frame, if
// wrapping style influence is considered on object positioning
if ( bFormatAnchor )
{
SwTxtFrm* pAnchPosAnchorFrm =
dynamic_cast<SwTxtFrm*>(GetAnchorFrmContainingAnchPos());
OSL_ENSURE( pAnchPosAnchorFrm,
"<SwFlyAtCntFrm::MakeAll()> - anchor frame of wrong type -> crash" );
2011-02-13 18:00:46 +01:00
// #i58182# - For the usage of new method
// <SwObjectFormatterTxtFrm::CheckMovedFwdCondition(..)>
// to check move forward of anchor frame due to the object
// positioning it's needed to know, if the object is anchored
// at the master frame before the anchor frame is formatted.
const bool bAnchoredAtMaster( !pAnchPosAnchorFrm->IsFollow() );
2011-02-13 18:00:46 +01:00
// #i56300#
// perform complete format of anchor text frame and its
// previous frames, which have become invalid due to the
// fly frame format.
SwObjectFormatterTxtFrm::FormatAnchorFrmAndItsPrevs( *pAnchPosAnchorFrm );
2011-02-13 18:00:46 +01:00
// #i35911#
// #i40444#
// #i58182# - usage of new method
// <SwObjectFormatterTxtFrm::CheckMovedFwdCondition(..)>
sal_uInt32 nToPageNum( 0L );
bool bDummy( false );
if ( SwObjectFormatterTxtFrm::CheckMovedFwdCondition(
*this, GetPageFrm()->GetPhyPageNum(),
bAnchoredAtMaster, nToPageNum, bDummy ) )
{
bConsiderWrapInfluenceDueToMovedFwdAnchor = true;
2011-02-13 18:00:46 +01:00
// mark anchor text frame
// directly, that it is moved forward by object positioning.
SwTxtFrm* pAnchorTxtFrm( static_cast<SwTxtFrm*>(AnchorFrm()) );
bool bInsert( true );
sal_uInt32 nAnchorFrmToPageNum( 0L );
const SwDoc& rDoc = *(GetFrmFmt().GetDoc());
if ( SwLayouter::FrmMovedFwdByObjPos(
rDoc, *pAnchorTxtFrm, nAnchorFrmToPageNum ) )
{
if ( nAnchorFrmToPageNum < nToPageNum )
SwLayouter::RemoveMovedFwdFrm( rDoc, *pAnchorTxtFrm );
else
bInsert = false;
}
if ( bInsert )
{
SwLayouter::InsertMovedFwdFrm( rDoc, *pAnchorTxtFrm,
nToPageNum );
}
}
}
2000-09-18 23:08:29 +00:00
if ( aOldPos != (Frm().*fnRect->fnGetPos)() ||
( !GetValidPosFlag() &&
( pFooter || bPosChgDueToOwnFormat ) ) )
{
bOsz = aOszCntrl.ChkOsz();
// special loop prevention for dedicated document:
if ( bOsz &&
HasFixSize() && IsClipped() &&
GetAnchorFrm()->GetUpper()->IsCellFrm() )
{
SwFrmFmt* pFmt = GetFmt();
const SwFmtFrmSize& rFrmSz = pFmt->GetFrmSize();
if ( rFrmSz.GetWidthPercent() &&
rFrmSz.GetHeightPercent() == 0xFF )
{
SwFmtSurround aSurround( pFmt->GetSurround() );
if ( aSurround.GetSurround() == SURROUND_NONE )
{
pFmt->LockModify();
aSurround.SetSurround( SURROUND_THROUGHT );
pFmt->SetFmtAttr( aSurround );
pFmt->UnlockModify();
bOsz = false;
OSL_FAIL( "<SwFlyAtCntFrm::MakeAll()> - special loop prevention for dedicated document of b6403541 applied" );
}
}
}
}
if ( bExtra && Lower() && !Lower()->GetValidPosFlag() )
{
2012-02-13 11:37:18 +01:00
// If a multi column frame leaves invalid columns because of
// a position change, we loop once more and format
2012-02-13 11:37:18 +01:00
// our content using FormatWidthCols again.
_InvalidateSize();
bExtra = false; // Ensure only one additional loop run
}
} while ( !IsValid() && !bOsz &&
2011-02-13 18:00:46 +01:00
// #i3317#
!bConsiderWrapInfluenceDueToOverlapPrevCol &&
2011-02-13 18:00:46 +01:00
// #i40444#
!bConsiderWrapInfluenceDueToMovedFwdAnchor &&
GetFmt()->GetDoc()->IsVisibleLayerId( GetVirtDrawObj()->GetLayer() ) );
2011-02-13 18:00:46 +01:00
// #i3317# - instead of attribute change apply
// temporarly the 'straightforward positioning process'.
2011-02-13 18:00:46 +01:00
// #i80924#
// handle special case during splitting of table rows
if ( bConsiderWrapInfluenceDueToMovedFwdAnchor &&
GetAnchorFrm()->IsInTab() &&
GetAnchorFrm()->IsInFollowFlowRow() )
{
const SwFrm* pCellFrm = GetAnchorFrm();
while ( pCellFrm && !pCellFrm->IsCellFrm() )
{
pCellFrm = pCellFrm->GetUpper();
}
if ( pCellFrm )
{
SWRECTFN( pCellFrm )
if ( (pCellFrm->Frm().*fnRect->fnGetTop)() == 0 &&
(pCellFrm->Frm().*fnRect->fnGetHeight)() == 0 )
{
bConsiderWrapInfluenceDueToMovedFwdAnchor = false;
}
}
}
if ( bOsz || bConsiderWrapInfluenceDueToOverlapPrevCol ||
2011-02-13 18:00:46 +01:00
// #i40444#
bConsiderWrapInfluenceDueToMovedFwdAnchor )
2000-09-18 23:08:29 +00:00
{
SetTmpConsiderWrapInfluence( true );
SetRestartLayoutProcess( true );
SetTmpConsiderWrapInfluenceOfOtherObjs( true );
2000-09-18 23:08:29 +00:00
}
bSetCompletePaintOnInvalidate = false;
2000-09-18 23:08:29 +00:00
}
}
}
/** method to determine, if a <MakeAll()> on the Writer fly frame is possible
2011-02-13 18:00:46 +01:00
#i28701#
*/
bool SwFlyAtCntFrm::IsFormatPossible() const
{
return SwFlyFreeFrm::IsFormatPossible() &&
!SwOszControl::IsInProgress( this );
}
2000-09-18 23:08:29 +00:00
/*************************************************************************
|*
|* FindAnchor() und Hilfsfunktionen.
|*
2012-02-13 11:37:18 +01:00
|* Description: Searches an anchor for paragraph bound objects
|* starting from pOldAnch. This is used to show anchors as well as changing
|* anchors when dragging paragraph bound objects.
2000-09-18 23:08:29 +00:00
|*
|*************************************************************************/
class SwDistance
{
public:
SwTwips nMain, nSub;
SwDistance() { nMain = nSub = 0; }
SwDistance& operator=( const SwDistance &rTwo )
{ nMain = rTwo.nMain; nSub = rTwo.nSub; return *this; }
bool operator<( const SwDistance& rTwo ) const
2000-09-18 23:08:29 +00:00
{ return nMain < rTwo.nMain || ( nMain == rTwo.nMain && nSub &&
rTwo.nSub && nSub < rTwo.nSub ); }
bool operator<=( const SwDistance& rTwo ) const
2000-09-18 23:08:29 +00:00
{ return nMain < rTwo.nMain || ( nMain == rTwo.nMain && ( !nSub ||
!rTwo.nSub || nSub <= rTwo.nSub ) ); }
};
static const SwFrm * lcl_CalcDownDist( SwDistance &rRet,
2000-09-18 23:08:29 +00:00
const Point &rPt,
const SwCntntFrm *pCnt )
{
rRet.nSub = 0;
//If the point stays inside the Cnt everything is clear already; the Cntnt
2012-02-13 11:37:18 +01:00
//automatically has a distance of 0.
2000-09-18 23:08:29 +00:00
if ( pCnt->Frm().IsInside( rPt ) )
{
rRet.nMain = 0;
return pCnt;
}
else
{
const SwLayoutFrm *pUp = pCnt->IsInTab() ? pCnt->FindTabFrm()->GetUpper() : pCnt->GetUpper();
2012-02-13 11:37:18 +01:00
// single column sections need to interconnect to their upper
2000-09-18 23:08:29 +00:00
while( pUp->IsSctFrm() )
pUp = pUp->GetUpper();
const bool bVert = pUp->IsVertical();
2009-03-04 16:19:59 +00:00
//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
const bool bVertL2R = pUp->IsVertLR();
2012-02-13 11:37:18 +01:00
//Follow the text flow.
2011-02-13 18:00:46 +01:00
// #i70582#
2010-05-14 11:27:15 +00:00
// --> OD 2009-03-05 - adopted for Support for Classical Mongolian Script
CWS-TOOLING: integrate CWS sw31bf04 2009-01-21 14:24:10 +0100 od r266670 : #i59051# correction of metric change for PolyPolygonBezier needed 2009-01-21 09:35:44 +0100 od r266632 : #i96062# adjustment of fix after rebasing 2009-01-21 09:34:56 +0100 od r266631 : #i94152# adjustment of fix after rebasing 2009-01-20 16:43:12 +0100 od r266596 : CWS-TOOLING: rebase CWS sw31bf04 to trunk@266428 (milestone: DEV300:m39) 2009-01-20 11:52:22 +0100 od r266561 : #i94152 method <SwDoc::SetOutlineNumRule(..)> - assure that at outline list style registered text node have the correct list level set 2009-01-20 10:43:53 +0100 od r266556 : #i93399# methods <SwNumRule::SetIndent(..)> and <SwNumRule::ChangeIndent(..)> - adjust also the list tab position, if a list tab stop is applied 2009-01-16 16:26:56 +0100 od r266432 : #i59051# adjust Writer's UNO-API for drawing objects - correct conversion of "StartPosition" and "EndPosition" - conversion of "PolyPolygonBezier" 2009-01-16 16:20:49 +0100 od r266430 : #i59051# - adjust UNO-API of connector shape -- convert "PolyPolygonBezier" to correct metric -- convert "StartPosition" and "EndPosition" in set-method before applying anchor position - adjust UNO-API of measure shape -- convert "StartPosition" and "EndPosition" to correct metric 2009-01-16 15:01:21 +0100 od r266419 : #i95698# method <SwFrm::GetPrevSctLeaf(..)> - only columns as previous section leaves for tables inside sections, which are inside another table. 2009-01-14 14:34:58 +0100 od r266304 : #i96092# method <HandleResetAttrAtTxtNode::~HandleResetAttrAtTxtNode()> - set list level to outline level, if needed. 2009-01-13 17:09:43 +0100 od r266238 : #i98037# method <SwWW8ImplReader::IsObjectLayoutInTableCell(..)> - adjust evaluation of WW8 attributes 2009-01-13 11:49:48 +0100 od r266203 : #i94187# method <SwTxtFormatter::NewTabPortion(..)> - correct consideration of compatibility option TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST 2009-01-13 11:48:45 +0100 od r266202 : #i94187# method <OutWW8_SwTxtNode(..)> - set list style directly at paragraph only in position and space mode LABEL_WIDTH_AND_POSITION 2009-01-12 12:22:58 +0100 od r266143 : #i70582# method <SwFlyAtCntFrm::SetAbsPos(..)> and local method <lcl_CalcDownDist(..)> - correct determination of anchor's frame top for object positioning.
2009-02-13 10:05:35 +00:00
const SwTwips nTopForObjPos =
bVert
2010-05-14 11:27:15 +00:00
? ( bVertL2R
? ( pCnt->Frm().Left() +
pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() )
: ( pCnt->Frm().Left() +
pCnt->Frm().Width() -
pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() ) )
CWS-TOOLING: integrate CWS sw31bf04 2009-01-21 14:24:10 +0100 od r266670 : #i59051# correction of metric change for PolyPolygonBezier needed 2009-01-21 09:35:44 +0100 od r266632 : #i96062# adjustment of fix after rebasing 2009-01-21 09:34:56 +0100 od r266631 : #i94152# adjustment of fix after rebasing 2009-01-20 16:43:12 +0100 od r266596 : CWS-TOOLING: rebase CWS sw31bf04 to trunk@266428 (milestone: DEV300:m39) 2009-01-20 11:52:22 +0100 od r266561 : #i94152 method <SwDoc::SetOutlineNumRule(..)> - assure that at outline list style registered text node have the correct list level set 2009-01-20 10:43:53 +0100 od r266556 : #i93399# methods <SwNumRule::SetIndent(..)> and <SwNumRule::ChangeIndent(..)> - adjust also the list tab position, if a list tab stop is applied 2009-01-16 16:26:56 +0100 od r266432 : #i59051# adjust Writer's UNO-API for drawing objects - correct conversion of "StartPosition" and "EndPosition" - conversion of "PolyPolygonBezier" 2009-01-16 16:20:49 +0100 od r266430 : #i59051# - adjust UNO-API of connector shape -- convert "PolyPolygonBezier" to correct metric -- convert "StartPosition" and "EndPosition" in set-method before applying anchor position - adjust UNO-API of measure shape -- convert "StartPosition" and "EndPosition" to correct metric 2009-01-16 15:01:21 +0100 od r266419 : #i95698# method <SwFrm::GetPrevSctLeaf(..)> - only columns as previous section leaves for tables inside sections, which are inside another table. 2009-01-14 14:34:58 +0100 od r266304 : #i96092# method <HandleResetAttrAtTxtNode::~HandleResetAttrAtTxtNode()> - set list level to outline level, if needed. 2009-01-13 17:09:43 +0100 od r266238 : #i98037# method <SwWW8ImplReader::IsObjectLayoutInTableCell(..)> - adjust evaluation of WW8 attributes 2009-01-13 11:49:48 +0100 od r266203 : #i94187# method <SwTxtFormatter::NewTabPortion(..)> - correct consideration of compatibility option TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST 2009-01-13 11:48:45 +0100 od r266202 : #i94187# method <OutWW8_SwTxtNode(..)> - set list style directly at paragraph only in position and space mode LABEL_WIDTH_AND_POSITION 2009-01-12 12:22:58 +0100 od r266143 : #i70582# method <SwFlyAtCntFrm::SetAbsPos(..)> and local method <lcl_CalcDownDist(..)> - correct determination of anchor's frame top for object positioning.
2009-02-13 10:05:35 +00:00
: ( pCnt->Frm().Top() +
pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() );
if ( pUp->Frm().IsInside( rPt ) )
2000-09-18 23:08:29 +00:00
{
2011-02-13 18:00:46 +01:00
// <rPt> point is inside environment of given content frame
// #i70582#
if( bVert )
//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
{
if ( bVertL2R )
rRet.nMain = rPt.X() - nTopForObjPos;
else
rRet.nMain = nTopForObjPos - rPt.X();
}
else
CWS-TOOLING: integrate CWS sw31bf04 2009-01-21 14:24:10 +0100 od r266670 : #i59051# correction of metric change for PolyPolygonBezier needed 2009-01-21 09:35:44 +0100 od r266632 : #i96062# adjustment of fix after rebasing 2009-01-21 09:34:56 +0100 od r266631 : #i94152# adjustment of fix after rebasing 2009-01-20 16:43:12 +0100 od r266596 : CWS-TOOLING: rebase CWS sw31bf04 to trunk@266428 (milestone: DEV300:m39) 2009-01-20 11:52:22 +0100 od r266561 : #i94152 method <SwDoc::SetOutlineNumRule(..)> - assure that at outline list style registered text node have the correct list level set 2009-01-20 10:43:53 +0100 od r266556 : #i93399# methods <SwNumRule::SetIndent(..)> and <SwNumRule::ChangeIndent(..)> - adjust also the list tab position, if a list tab stop is applied 2009-01-16 16:26:56 +0100 od r266432 : #i59051# adjust Writer's UNO-API for drawing objects - correct conversion of "StartPosition" and "EndPosition" - conversion of "PolyPolygonBezier" 2009-01-16 16:20:49 +0100 od r266430 : #i59051# - adjust UNO-API of connector shape -- convert "PolyPolygonBezier" to correct metric -- convert "StartPosition" and "EndPosition" in set-method before applying anchor position - adjust UNO-API of measure shape -- convert "StartPosition" and "EndPosition" to correct metric 2009-01-16 15:01:21 +0100 od r266419 : #i95698# method <SwFrm::GetPrevSctLeaf(..)> - only columns as previous section leaves for tables inside sections, which are inside another table. 2009-01-14 14:34:58 +0100 od r266304 : #i96092# method <HandleResetAttrAtTxtNode::~HandleResetAttrAtTxtNode()> - set list level to outline level, if needed. 2009-01-13 17:09:43 +0100 od r266238 : #i98037# method <SwWW8ImplReader::IsObjectLayoutInTableCell(..)> - adjust evaluation of WW8 attributes 2009-01-13 11:49:48 +0100 od r266203 : #i94187# method <SwTxtFormatter::NewTabPortion(..)> - correct consideration of compatibility option TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST 2009-01-13 11:48:45 +0100 od r266202 : #i94187# method <OutWW8_SwTxtNode(..)> - set list style directly at paragraph only in position and space mode LABEL_WIDTH_AND_POSITION 2009-01-12 12:22:58 +0100 od r266143 : #i70582# method <SwFlyAtCntFrm::SetAbsPos(..)> and local method <lcl_CalcDownDist(..)> - correct determination of anchor's frame top for object positioning.
2009-02-13 10:05:35 +00:00
rRet.nMain = rPt.Y() - nTopForObjPos;
2000-09-18 23:08:29 +00:00
return pCnt;
}
else if ( rPt.Y() <= pUp->Frm().Top() )
{
2011-02-13 18:00:46 +01:00
// <rPt> point is above environment of given content frame
// correct for vertical layout?
rRet.nMain = LONG_MAX;
}
else if( rPt.X() < pUp->Frm().Left() &&
rPt.Y() <= ( bVert ? pUp->Frm().Top() : pUp->Frm().Bottom() ) )
2000-09-18 23:08:29 +00:00
{
2011-02-13 18:00:46 +01:00
// <rPt> point is left of environment of given content frame
// seems not to be correct for vertical layout!?
const SwFrm *pLay = pUp->GetLeaf( MAKEPAGE_NONE, sal_False, pCnt );
if( !pLay ||
(bVert && (pLay->Frm().Top() + pLay->Prt().Bottom()) <rPt.Y())||
(!bVert && (pLay->Frm().Left() + pLay->Prt().Right())<rPt.X()) )
2000-09-18 23:08:29 +00:00
{
2011-02-13 18:00:46 +01:00
// <rPt> point is in left border of environment
// #i70582#
if( bVert )
//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
{
if ( bVertL2R )
rRet.nMain = rPt.X() - nTopForObjPos;
else
rRet.nMain = nTopForObjPos - rPt.X();
}
else
CWS-TOOLING: integrate CWS sw31bf04 2009-01-21 14:24:10 +0100 od r266670 : #i59051# correction of metric change for PolyPolygonBezier needed 2009-01-21 09:35:44 +0100 od r266632 : #i96062# adjustment of fix after rebasing 2009-01-21 09:34:56 +0100 od r266631 : #i94152# adjustment of fix after rebasing 2009-01-20 16:43:12 +0100 od r266596 : CWS-TOOLING: rebase CWS sw31bf04 to trunk@266428 (milestone: DEV300:m39) 2009-01-20 11:52:22 +0100 od r266561 : #i94152 method <SwDoc::SetOutlineNumRule(..)> - assure that at outline list style registered text node have the correct list level set 2009-01-20 10:43:53 +0100 od r266556 : #i93399# methods <SwNumRule::SetIndent(..)> and <SwNumRule::ChangeIndent(..)> - adjust also the list tab position, if a list tab stop is applied 2009-01-16 16:26:56 +0100 od r266432 : #i59051# adjust Writer's UNO-API for drawing objects - correct conversion of "StartPosition" and "EndPosition" - conversion of "PolyPolygonBezier" 2009-01-16 16:20:49 +0100 od r266430 : #i59051# - adjust UNO-API of connector shape -- convert "PolyPolygonBezier" to correct metric -- convert "StartPosition" and "EndPosition" in set-method before applying anchor position - adjust UNO-API of measure shape -- convert "StartPosition" and "EndPosition" to correct metric 2009-01-16 15:01:21 +0100 od r266419 : #i95698# method <SwFrm::GetPrevSctLeaf(..)> - only columns as previous section leaves for tables inside sections, which are inside another table. 2009-01-14 14:34:58 +0100 od r266304 : #i96092# method <HandleResetAttrAtTxtNode::~HandleResetAttrAtTxtNode()> - set list level to outline level, if needed. 2009-01-13 17:09:43 +0100 od r266238 : #i98037# method <SwWW8ImplReader::IsObjectLayoutInTableCell(..)> - adjust evaluation of WW8 attributes 2009-01-13 11:49:48 +0100 od r266203 : #i94187# method <SwTxtFormatter::NewTabPortion(..)> - correct consideration of compatibility option TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST 2009-01-13 11:48:45 +0100 od r266202 : #i94187# method <OutWW8_SwTxtNode(..)> - set list style directly at paragraph only in position and space mode LABEL_WIDTH_AND_POSITION 2009-01-12 12:22:58 +0100 od r266143 : #i70582# method <SwFlyAtCntFrm::SetAbsPos(..)> and local method <lcl_CalcDownDist(..)> - correct determination of anchor's frame top for object positioning.
2009-02-13 10:05:35 +00:00
rRet.nMain = rPt.Y() - nTopForObjPos;
2000-09-18 23:08:29 +00:00
return pCnt;
}
else
rRet.nMain = LONG_MAX;
}
else
{
Merge commit 'ooo/DEV300_m101' into integration/dev300_m101 Conflicts: starmath/inc/applicat.hxx starmath/inc/dialog.hxx starmath/inc/document.hxx starmath/inc/edit.hxx starmath/inc/format.hxx starmath/inc/node.hxx starmath/inc/parse.hxx starmath/inc/rect.hxx starmath/inc/smdll.hxx starmath/inc/smmod.hxx starmath/inc/starmath.hrc starmath/inc/symbol.hxx starmath/inc/toolbox.hxx starmath/inc/utility.hxx starmath/inc/view.hxx starmath/prj/build.lst starmath/qa/cppunit/version.map starmath/sdi/smslots.sdi starmath/source/accessibility.cxx starmath/source/cfgitem.cxx starmath/source/cfgitem.hxx starmath/source/config.cxx starmath/source/dialog.cxx starmath/source/document.cxx starmath/source/edit.cxx starmath/source/format.cxx starmath/source/makefile.mk starmath/source/math_pch.cxx starmath/source/mathmlexport.cxx starmath/source/mathmlimport.cxx starmath/source/mathtype.cxx starmath/source/node.cxx starmath/source/parse.cxx starmath/source/rect.cxx starmath/source/register.cxx starmath/source/smdetect.cxx starmath/source/smdll.cxx starmath/source/smmod.cxx starmath/source/smres.src starmath/source/symbol.cxx starmath/source/toolbox.cxx starmath/source/unomodel.cxx starmath/source/utility.cxx starmath/source/view.cxx sw/JunitTest_sw_unoapi.mk sw/Library_swd.mk sw/Makefile sw/inc/IDocumentFieldsAccess.hxx sw/inc/IDocumentSettingAccess.hxx sw/inc/IDocumentUndoRedo.hxx sw/inc/IShellCursorSupplier.hxx sw/inc/SwUndoField.hxx sw/inc/acmplwrd.hxx sw/inc/authfld.hxx sw/inc/bparr.hxx sw/inc/calbck.hxx sw/inc/calc.hxx sw/inc/ccoll.hxx sw/inc/cellatr.hxx sw/inc/cellfml.hxx sw/inc/chpfld.hxx sw/inc/cmdid.h sw/inc/crsrsh.hxx sw/inc/crstate.hxx sw/inc/dbfld.hxx sw/inc/dbmgr.hxx sw/inc/dcontact.hxx sw/inc/ddefld.hxx sw/inc/doc.hxx sw/inc/docary.hxx sw/inc/docsh.hxx sw/inc/docstat.hxx sw/inc/docstyle.hxx sw/inc/docufld.hxx sw/inc/editsh.hxx sw/inc/errhdl.hxx sw/inc/expfld.hxx sw/inc/fchrfmt.hxx sw/inc/fesh.hxx sw/inc/fldbas.hxx sw/inc/flddat.hxx sw/inc/flddropdown.hxx sw/inc/flypos.hxx sw/inc/fmtanchr.hxx sw/inc/fmtautofmt.hxx sw/inc/fmtclds.hxx sw/inc/fmtcnct.hxx sw/inc/fmtcol.hxx sw/inc/fmtfsize.hxx sw/inc/fmtftn.hxx sw/inc/fmtftntx.hxx sw/inc/fmthdft.hxx sw/inc/fmtinfmt.hxx sw/inc/fmtline.hxx sw/inc/fmtornt.hxx sw/inc/fmtpdsc.hxx sw/inc/fmtruby.hxx sw/inc/fmtsrnd.hxx sw/inc/fmturl.hxx sw/inc/fmtwrapinfluenceonobjpos.hxx sw/inc/format.hxx sw/inc/frmatr.hxx sw/inc/frmfmt.hxx sw/inc/grfatr.hxx sw/inc/helpid.h sw/inc/hintids.hxx sw/inc/hints.hxx sw/inc/htmltbl.hxx sw/inc/inetfld.hxx sw/inc/io.hxx sw/inc/iodetect.hxx sw/inc/itabenum.hxx sw/inc/ndarr.hxx sw/inc/ndgrf.hxx sw/inc/ndindex.hxx sw/inc/ndnotxt.hxx sw/inc/ndole.hxx sw/inc/ndtxt.hxx sw/inc/ndtyp.hxx sw/inc/node.hxx sw/inc/numrule.hxx sw/inc/pagedesc.hxx sw/inc/pagepreviewlayout.hxx sw/inc/pam.hxx sw/inc/paratr.hxx sw/inc/poolfmt.awk sw/inc/poolfmt.hxx sw/inc/printdata.hxx sw/inc/reffld.hxx sw/inc/shellio.hxx sw/inc/shellres.hxx sw/inc/swabstdlg.hxx sw/inc/swatrset.hxx sw/inc/swerror.h sw/inc/swprtopt.hxx sw/inc/swtable.hxx sw/inc/swtypes.hxx sw/inc/tblafmt.hxx sw/inc/tgrditem.hxx sw/inc/tox.hxx sw/inc/undobj.hxx sw/inc/unocoll.hxx sw/inc/unoframe.hxx sw/inc/unoprnms.hxx sw/inc/usrfld.hxx sw/inc/viewopt.hxx sw/inc/viewsh.hxx sw/inc/viscrs.hxx sw/prj/build.lst sw/qa/complex/accessibility/makefile.mk sw/qa/core/Test-BigPtrArray.cxx sw/qa/core/makefile.mk sw/sdi/makefile.mk sw/source/core/access/makefile.mk sw/source/core/access/textmarkuphelper.cxx sw/source/core/attr/calbck.cxx sw/source/core/attr/cellatr.cxx sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx sw/source/core/attr/format.cxx sw/source/core/attr/hints.cxx sw/source/core/bastyp/calc.cxx sw/source/core/bastyp/init.cxx sw/source/core/bastyp/makefile.mk sw/source/core/bastyp/swcache.cxx sw/source/core/crsr/bookmrk.cxx sw/source/core/crsr/callnk.cxx sw/source/core/crsr/crsrsh.cxx sw/source/core/crsr/crstrvl.cxx sw/source/core/crsr/findattr.cxx sw/source/core/crsr/findcoll.cxx sw/source/core/crsr/makefile.mk sw/source/core/crsr/pam.cxx sw/source/core/crsr/swcrsr.cxx sw/source/core/crsr/trvltbl.cxx sw/source/core/crsr/unocrsr.cxx sw/source/core/crsr/viscrs.cxx sw/source/core/doc/acmplwrd.cxx sw/source/core/doc/doc.cxx sw/source/core/doc/docbm.cxx sw/source/core/doc/doccomp.cxx sw/source/core/doc/docdesc.cxx sw/source/core/doc/docdraw.cxx sw/source/core/doc/docedt.cxx sw/source/core/doc/docfld.cxx sw/source/core/doc/docfly.cxx sw/source/core/doc/docfmt.cxx sw/source/core/doc/docftn.cxx sw/source/core/doc/docglbl.cxx sw/source/core/doc/docglos.cxx sw/source/core/doc/doclay.cxx sw/source/core/doc/docnew.cxx sw/source/core/doc/docnum.cxx sw/source/core/doc/docredln.cxx sw/source/core/doc/docruby.cxx sw/source/core/doc/docsort.cxx sw/source/core/doc/docstat.cxx sw/source/core/doc/doctxm.cxx sw/source/core/doc/fmtcol.cxx sw/source/core/doc/gctable.cxx sw/source/core/doc/htmltbl.cxx sw/source/core/doc/makefile.mk sw/source/core/doc/number.cxx sw/source/core/doc/poolfmt.cxx sw/source/core/doc/tblafmt.cxx sw/source/core/doc/tblcpy.cxx sw/source/core/doc/tblrwcl.cxx sw/source/core/docnode/makefile.mk sw/source/core/docnode/ndcopy.cxx sw/source/core/docnode/ndnum.cxx sw/source/core/docnode/ndsect.cxx sw/source/core/docnode/ndtbl.cxx sw/source/core/docnode/ndtbl1.cxx sw/source/core/docnode/node.cxx sw/source/core/docnode/node2lay.cxx sw/source/core/docnode/nodes.cxx sw/source/core/docnode/section.cxx sw/source/core/docnode/swbaslnk.cxx sw/source/core/draw/dcontact.cxx sw/source/core/draw/dflyobj.cxx sw/source/core/draw/drawdoc.cxx sw/source/core/draw/dview.cxx sw/source/core/draw/makefile.mk sw/source/core/edit/autofmt.cxx sw/source/core/edit/edattr.cxx sw/source/core/edit/eddel.cxx sw/source/core/edit/edfcol.cxx sw/source/core/edit/edfld.cxx sw/source/core/edit/edfldexp.cxx sw/source/core/edit/edfmt.cxx sw/source/core/edit/edglss.cxx sw/source/core/edit/editsh.cxx sw/source/core/edit/edlingu.cxx sw/source/core/edit/ednumber.cxx sw/source/core/edit/edsect.cxx sw/source/core/edit/edtab.cxx sw/source/core/edit/edtox.cxx sw/source/core/edit/edundo.cxx sw/source/core/edit/makefile.mk sw/source/core/except/dbgloop.cxx sw/source/core/except/errhdl.cxx sw/source/core/fields/authfld.cxx sw/source/core/fields/cellfml.cxx sw/source/core/fields/chpfld.cxx sw/source/core/fields/dbfld.cxx sw/source/core/fields/ddefld.cxx sw/source/core/fields/ddetbl.cxx sw/source/core/fields/docufld.cxx sw/source/core/fields/expfld.cxx sw/source/core/fields/fldbas.cxx sw/source/core/fields/flddat.cxx sw/source/core/fields/flddropdown.cxx sw/source/core/fields/macrofld.cxx sw/source/core/fields/makefile.mk sw/source/core/fields/reffld.cxx sw/source/core/fields/scrptfld.cxx sw/source/core/fields/tblcalc.cxx sw/source/core/fields/usrfld.cxx sw/source/core/frmedt/fecopy.cxx sw/source/core/frmedt/fedesc.cxx sw/source/core/frmedt/fefly1.cxx sw/source/core/frmedt/feshview.cxx sw/source/core/frmedt/fetab.cxx sw/source/core/frmedt/fews.cxx sw/source/core/frmedt/makefile.mk sw/source/core/frmedt/tblsel.cxx sw/source/core/graphic/grfatr.cxx sw/source/core/inc/SwUndoFmt.hxx sw/source/core/inc/SwUndoTOXChange.hxx sw/source/core/inc/anchoredobjectposition.hxx sw/source/core/inc/dbgloop.hxx sw/source/core/inc/drawfont.hxx sw/source/core/inc/flowfrm.hxx sw/source/core/inc/frame.hxx sw/source/core/inc/frmtool.hxx sw/source/core/inc/layact.hxx sw/source/core/inc/layfrm.hxx sw/source/core/inc/notxtfrm.hxx sw/source/core/inc/rolbck.hxx sw/source/core/inc/rootfrm.hxx sw/source/core/inc/scriptinfo.hxx sw/source/core/inc/swblocks.hxx sw/source/core/inc/swcache.hxx sw/source/core/inc/tabfrm.hxx sw/source/core/inc/txmsrt.hxx sw/source/core/inc/undoflystrattr.hxx sw/source/core/inc/viewimp.hxx sw/source/core/layout/atrfrm.cxx sw/source/core/layout/calcmove.cxx sw/source/core/layout/dbg_lay.cxx sw/source/core/layout/findfrm.cxx sw/source/core/layout/flowfrm.cxx sw/source/core/layout/fly.cxx sw/source/core/layout/flycnt.cxx sw/source/core/layout/flyincnt.cxx sw/source/core/layout/flylay.cxx sw/source/core/layout/frmtool.cxx sw/source/core/layout/ftnfrm.cxx sw/source/core/layout/layact.cxx sw/source/core/layout/laycache.cxx sw/source/core/layout/makefile.mk sw/source/core/layout/objectformatter.cxx sw/source/core/layout/pagechg.cxx sw/source/core/layout/pagedesc.cxx sw/source/core/layout/paintfrm.cxx sw/source/core/layout/sectfrm.cxx sw/source/core/layout/tabfrm.cxx sw/source/core/layout/trvlfrm.cxx sw/source/core/layout/unusedf.cxx sw/source/core/layout/wsfrm.cxx sw/source/core/makefile.mk sw/source/core/objectpositioning/anchoredobjectposition.cxx sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx sw/source/core/objectpositioning/makefile.mk sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx sw/source/core/ole/ndole.cxx sw/source/core/para/makefile.mk sw/source/core/para/paratr.cxx sw/source/core/sw3io/makefile.mk sw/source/core/sw3io/sw3convert.cxx sw/source/core/swg/SwXMLTextBlocks.cxx sw/source/core/swg/makefile.mk sw/source/core/swg/swblocks.cxx sw/source/core/table/swnewtable.cxx sw/source/core/table/swtable.cxx sw/source/core/text/EnhancedPDFExportHelper.cxx sw/source/core/text/atrstck.cxx sw/source/core/text/frmcrsr.cxx sw/source/core/text/frmform.cxx sw/source/core/text/itrcrsr.cxx sw/source/core/text/itrform2.cxx sw/source/core/text/makefile.mk sw/source/core/text/porlay.cxx sw/source/core/text/pormulti.cxx sw/source/core/text/txtfld.cxx sw/source/core/text/txtfrm.cxx sw/source/core/text/txtio.cxx sw/source/core/tox/makefile.mk sw/source/core/tox/txmsrt.cxx sw/source/core/txtnode/fmtatr2.cxx sw/source/core/txtnode/fntcache.cxx sw/source/core/txtnode/fntcap.cxx sw/source/core/txtnode/makefile.mk sw/source/core/txtnode/ndhints.cxx sw/source/core/txtnode/ndtxt.cxx sw/source/core/txtnode/swfont.cxx sw/source/core/txtnode/thints.cxx sw/source/core/txtnode/txtatr2.cxx sw/source/core/txtnode/txtedt.cxx sw/source/core/undo/SwUndoField.cxx sw/source/core/undo/SwUndoPageDesc.cxx sw/source/core/undo/SwUndoTOXChange.cxx sw/source/core/undo/docundo.cxx sw/source/core/undo/makefile.mk sw/source/core/undo/rolbck.cxx sw/source/core/undo/unbkmk.cxx sw/source/core/undo/undel.cxx sw/source/core/undo/undobj.cxx sw/source/core/undo/undobj1.cxx sw/source/core/undo/unfmco.cxx sw/source/core/undo/unins.cxx sw/source/core/undo/unnum.cxx sw/source/core/undo/unoutl.cxx sw/source/core/undo/unredln.cxx sw/source/core/undo/unsect.cxx sw/source/core/undo/unsort.cxx sw/source/core/undo/unspnd.cxx sw/source/core/undo/untbl.cxx sw/source/core/unocore/makefile.mk sw/source/core/unocore/swunohelper.cxx sw/source/core/unocore/unobkm.cxx sw/source/core/unocore/unocoll.cxx sw/source/core/unocore/unocrsrhelper.cxx sw/source/core/unocore/unodraw.cxx sw/source/core/unocore/unofield.cxx sw/source/core/unocore/unoframe.cxx sw/source/core/unocore/unomap.cxx sw/source/core/unocore/unoprnms.cxx sw/source/core/unocore/unoredlines.cxx sw/source/core/unocore/unosett.cxx sw/source/core/unocore/unosrch.cxx sw/source/core/unocore/unostyle.cxx sw/source/core/unocore/unotbl.cxx sw/source/core/view/vdraw.cxx sw/source/core/view/viewimp.cxx sw/source/core/view/viewpg.cxx sw/source/core/view/viewsh.cxx sw/source/core/view/vnew.cxx sw/source/core/view/vprint.cxx sw/source/filter/ascii/ascatr.cxx sw/source/filter/ascii/makefile.mk sw/source/filter/ascii/wrtasc.cxx sw/source/filter/basflt/fltini.cxx sw/source/filter/basflt/iodetect.cxx sw/source/filter/basflt/makefile.mk sw/source/filter/html/SwAppletImpl.cxx sw/source/filter/html/css1atr.cxx sw/source/filter/html/htmlatr.cxx sw/source/filter/html/htmlbas.cxx sw/source/filter/html/htmlcss1.cxx sw/source/filter/html/htmlfly.cxx sw/source/filter/html/htmlftn.cxx sw/source/filter/html/htmlgrin.cxx sw/source/filter/html/htmlnum.cxx sw/source/filter/html/htmlplug.cxx sw/source/filter/html/htmltab.cxx sw/source/filter/html/makefile.mk sw/source/filter/html/parcss1.cxx sw/source/filter/html/svxcss1.cxx sw/source/filter/html/swhtml.cxx sw/source/filter/inc/msfilter.hxx sw/source/filter/inc/wrtswtbl.hxx sw/source/filter/rtf/makefile.mk sw/source/filter/rtf/rtffly.cxx sw/source/filter/rtf/rtfnum.cxx sw/source/filter/rtf/rtftbl.cxx sw/source/filter/rtf/swparrtf.cxx sw/source/filter/rtf/swparrtf.hxx sw/source/filter/writer/makefile.mk sw/source/filter/writer/writer.cxx sw/source/filter/writer/wrt_fn.cxx sw/source/filter/writer/wrtswtbl.cxx sw/source/filter/ww1/fltshell.cxx sw/source/filter/ww1/makefile.mk sw/source/filter/ww1/w1class.cxx sw/source/filter/ww1/w1class.hxx sw/source/filter/ww1/w1filter.cxx sw/source/filter/ww1/w1par.cxx sw/source/filter/ww1/w1sprm.cxx sw/source/filter/ww1/w1struct.hxx sw/source/filter/ww8/README-rtf.txt sw/source/filter/ww8/attributeoutputbase.hxx sw/source/filter/ww8/docxattributeoutput.cxx sw/source/filter/ww8/docxattributeoutput.hxx sw/source/filter/ww8/docxexport.cxx sw/source/filter/ww8/docxexport.hxx sw/source/filter/ww8/docxexportfilter.cxx sw/source/filter/ww8/dump/dump8.cxx sw/source/filter/ww8/dump/dump8a.cxx sw/source/filter/ww8/dump/msvbasic.cxx sw/source/filter/ww8/dump/msvbasic.hxx sw/source/filter/ww8/dump/ww8darr.cxx sw/source/filter/ww8/dump/ww8darr.hxx sw/source/filter/ww8/dump/ww8dout.cxx sw/source/filter/ww8/dump/ww8dout.hxx sw/source/filter/ww8/dump/ww8scan.cxx sw/source/filter/ww8/dump/ww8scan.hxx sw/source/filter/ww8/dump/ww8struc.hxx sw/source/filter/ww8/makefile.mk sw/source/filter/ww8/rtfattributeoutput.cxx sw/source/filter/ww8/rtfattributeoutput.hxx sw/source/filter/ww8/rtfexport.cxx sw/source/filter/ww8/rtfexport.hxx sw/source/filter/ww8/rtfexportfilter.cxx sw/source/filter/ww8/rtfexportfilter.hxx sw/source/filter/ww8/rtfimportfilter.cxx sw/source/filter/ww8/rtfimportfilter.hxx sw/source/filter/ww8/rtfsdrexport.cxx sw/source/filter/ww8/rtfsdrexport.hxx sw/source/filter/ww8/writerhelper.cxx sw/source/filter/ww8/writerwordglue.cxx sw/source/filter/ww8/wrtw8esh.cxx sw/source/filter/ww8/wrtw8nds.cxx sw/source/filter/ww8/wrtw8num.cxx sw/source/filter/ww8/wrtw8sty.cxx sw/source/filter/ww8/wrtww8.cxx sw/source/filter/ww8/wrtww8.hxx sw/source/filter/ww8/wrtww8gr.cxx sw/source/filter/ww8/ww8atr.cxx sw/source/filter/ww8/ww8attributeoutput.hxx sw/source/filter/ww8/ww8graf.cxx sw/source/filter/ww8/ww8graf.hxx sw/source/filter/ww8/ww8graf2.cxx sw/source/filter/ww8/ww8par.cxx sw/source/filter/ww8/ww8par.hxx sw/source/filter/ww8/ww8par2.cxx sw/source/filter/ww8/ww8par3.cxx sw/source/filter/ww8/ww8par5.cxx sw/source/filter/ww8/ww8par6.cxx sw/source/filter/ww8/ww8scan.cxx sw/source/filter/ww8/ww8scan.hxx sw/source/filter/ww8/ww8struc.hxx sw/source/filter/xml/makefile.mk sw/source/filter/xml/xmlimpit.cxx sw/source/filter/xml/xmltble.cxx sw/source/filter/xml/xmltbli.cxx sw/source/ui/app/appenv.cxx sw/source/ui/app/apphdl.cxx sw/source/ui/app/applab.cxx sw/source/ui/app/appopt.cxx sw/source/ui/app/docsh.cxx sw/source/ui/app/docsh2.cxx sw/source/ui/app/docshini.cxx sw/source/ui/app/docst.cxx sw/source/ui/app/docstyle.cxx sw/source/ui/app/makefile.mk sw/source/ui/app/mn.src sw/source/ui/app/swmodul1.cxx sw/source/ui/cctrl/makefile.mk sw/source/ui/cctrl/swlbox.cxx sw/source/ui/chrdlg/break.cxx sw/source/ui/chrdlg/ccoll.cxx sw/source/ui/chrdlg/chardlg.cxx sw/source/ui/chrdlg/drpcps.cxx sw/source/ui/chrdlg/makefile.mk sw/source/ui/chrdlg/numpara.cxx sw/source/ui/chrdlg/pardlg.cxx sw/source/ui/chrdlg/swuiccoll.cxx sw/source/ui/config/barcfg.cxx sw/source/ui/config/caption.cxx sw/source/ui/config/cfgitems.cxx sw/source/ui/config/fontcfg.cxx sw/source/ui/config/mailconfigpage.cxx sw/source/ui/config/makefile.mk sw/source/ui/config/modcfg.cxx sw/source/ui/config/optcomp.cxx sw/source/ui/config/optload.cxx sw/source/ui/config/optpage.cxx sw/source/ui/config/prtopt.cxx sw/source/ui/config/uinums.cxx sw/source/ui/config/usrpref.cxx sw/source/ui/config/viewopt.cxx sw/source/ui/dbui/dbinsdlg.cxx sw/source/ui/dbui/dbmgr.cxx sw/source/ui/dbui/dbtree.cxx sw/source/ui/dbui/makefile.mk sw/source/ui/dbui/mmaddressblockpage.cxx sw/source/ui/dbui/mmdocselectpage.cxx sw/source/ui/dbui/mmoutputpage.cxx sw/source/ui/dbui/swdbtoolsclient.cxx sw/source/ui/dialog/abstract.cxx sw/source/ui/dialog/ascfldlg.cxx sw/source/ui/dialog/macassgn.cxx sw/source/ui/dialog/makefile.mk sw/source/ui/dialog/regionsw.cxx sw/source/ui/dialog/swdlgfact.cxx sw/source/ui/dialog/swdlgfact.hxx sw/source/ui/dialog/uiregionsw.cxx sw/source/ui/dochdl/gloshdl.cxx sw/source/ui/dochdl/makefile.mk sw/source/ui/dochdl/swdtflvr.cxx sw/source/ui/docvw/PostItMgr.cxx sw/source/ui/docvw/SidebarWin.cxx sw/source/ui/docvw/edtdd.cxx sw/source/ui/docvw/edtwin.cxx sw/source/ui/docvw/edtwin2.cxx sw/source/ui/docvw/edtwin3.cxx sw/source/ui/docvw/makefile.mk sw/source/ui/docvw/romenu.cxx sw/source/ui/docvw/romenu.hxx sw/source/ui/docvw/srcedtw.cxx sw/source/ui/envelp/envfmt.cxx sw/source/ui/envelp/envimg.cxx sw/source/ui/envelp/envlop1.cxx sw/source/ui/envelp/envprt.cxx sw/source/ui/envelp/label1.cxx sw/source/ui/envelp/labfmt.cxx sw/source/ui/envelp/labprt.cxx sw/source/ui/envelp/mailmrge.cxx sw/source/ui/envelp/makefile.mk sw/source/ui/fldui/flddb.cxx sw/source/ui/fldui/flddinf.cxx sw/source/ui/fldui/flddok.cxx sw/source/ui/fldui/fldedt.cxx sw/source/ui/fldui/fldfunc.cxx sw/source/ui/fldui/fldmgr.cxx sw/source/ui/fldui/fldpage.cxx sw/source/ui/fldui/fldref.cxx sw/source/ui/fldui/fldtdlg.cxx sw/source/ui/fldui/fldvar.cxx sw/source/ui/fldui/fldwrap.cxx sw/source/ui/fldui/inpdlg.cxx sw/source/ui/fldui/makefile.mk sw/source/ui/fmtui/makefile.mk sw/source/ui/fmtui/tmpdlg.cxx sw/source/ui/frmdlg/colmgr.cxx sw/source/ui/frmdlg/column.cxx sw/source/ui/frmdlg/cption.cxx sw/source/ui/frmdlg/frmdlg.cxx sw/source/ui/frmdlg/frmmgr.cxx sw/source/ui/frmdlg/frmpage.cxx sw/source/ui/frmdlg/makefile.mk sw/source/ui/frmdlg/wrap.cxx sw/source/ui/globdoc/makefile.mk sw/source/ui/inc/bmpwin.hxx sw/source/ui/inc/colmgr.hxx sw/source/ui/inc/column.hxx sw/source/ui/inc/envimg.hxx sw/source/ui/inc/envlop.hxx sw/source/ui/inc/frmpage.hxx sw/source/ui/inc/inputwin.hxx sw/source/ui/inc/javaedit.hxx sw/source/ui/inc/num.hxx sw/source/ui/inc/optpage.hxx sw/source/ui/inc/regionsw.hxx sw/source/ui/inc/split.hxx sw/source/ui/inc/swlbox.hxx sw/source/ui/inc/swmn_tmpl.hrc sw/source/ui/inc/swuiidxmrk.hxx sw/source/ui/inc/tabsh.hxx sw/source/ui/inc/toxmgr.hxx sw/source/ui/inc/uiitems.hxx sw/source/ui/inc/view.hxx sw/source/ui/inc/workctrl.hxx sw/source/ui/inc/wrap.hxx sw/source/ui/inc/wrtsh.hxx sw/source/ui/index/cnttab.cxx sw/source/ui/index/makefile.mk sw/source/ui/index/toxmgr.cxx sw/source/ui/lingu/hhcwrp.cxx sw/source/ui/lingu/makefile.mk sw/source/ui/lingu/olmenu.cxx sw/source/ui/misc/bookmark.cxx sw/source/ui/misc/docfnote.cxx sw/source/ui/misc/glosbib.cxx sw/source/ui/misc/glosdoc.cxx sw/source/ui/misc/glshell.cxx sw/source/ui/misc/insfnote.cxx sw/source/ui/misc/linenum.cxx sw/source/ui/misc/makefile.mk sw/source/ui/misc/num.cxx sw/source/ui/misc/numberingtypelistbox.cxx sw/source/ui/misc/outline.cxx sw/source/ui/misc/pgfnote.cxx sw/source/ui/misc/pggrid.cxx sw/source/ui/misc/redlndlg.cxx sw/source/ui/misc/srtdlg.cxx sw/source/ui/misc/swmodalredlineacceptdlg.cxx sw/source/ui/ribbar/conarc.cxx sw/source/ui/ribbar/drawbase.cxx sw/source/ui/ribbar/inputwin.cxx sw/source/ui/ribbar/inputwin.src sw/source/ui/ribbar/makefile.mk sw/source/ui/ribbar/tbxanchr.cxx sw/source/ui/ribbar/workctrl.cxx sw/source/ui/ribbar/workctrl.src sw/source/ui/shells/annotsh.cxx sw/source/ui/shells/basesh.cxx sw/source/ui/shells/beziersh.cxx sw/source/ui/shells/drawdlg.cxx sw/source/ui/shells/drwbassh.cxx sw/source/ui/shells/drwtxtex.cxx sw/source/ui/shells/drwtxtsh.cxx sw/source/ui/shells/frmsh.cxx sw/source/ui/shells/grfsh.cxx sw/source/ui/shells/grfshex.cxx sw/source/ui/shells/makefile.mk sw/source/ui/shells/tabsh.cxx sw/source/ui/shells/textfld.cxx sw/source/ui/shells/textglos.cxx sw/source/ui/shells/textsh.cxx sw/source/ui/shells/textsh1.cxx sw/source/ui/shells/txtattr.cxx sw/source/ui/shells/txtcrsr.cxx sw/source/ui/shells/txtnum.cxx sw/source/ui/table/convert.cxx sw/source/ui/table/instable.cxx sw/source/ui/table/makefile.mk sw/source/ui/table/swtablerep.cxx sw/source/ui/table/tabledlg.cxx sw/source/ui/table/tablemgr.cxx sw/source/ui/table/tablepg.hxx sw/source/ui/table/tautofmt.cxx sw/source/ui/uiview/formatclipboard.cxx sw/source/ui/uiview/makefile.mk sw/source/ui/uiview/pview.cxx sw/source/ui/uiview/pview.src sw/source/ui/uiview/scroll.cxx sw/source/ui/uiview/srcview.cxx sw/source/ui/uiview/swcli.cxx sw/source/ui/uiview/uivwimp.cxx sw/source/ui/uiview/view.cxx sw/source/ui/uiview/view1.cxx sw/source/ui/uiview/view2.cxx sw/source/ui/uiview/viewcoll.cxx sw/source/ui/uiview/viewdlg2.cxx sw/source/ui/uiview/viewling.cxx sw/source/ui/uiview/viewmdi.cxx sw/source/ui/uiview/viewport.cxx sw/source/ui/uiview/viewprt.cxx sw/source/ui/uiview/viewsrch.cxx sw/source/ui/uiview/viewtab.cxx sw/source/ui/uno/SwXDocumentSettings.cxx sw/source/ui/uno/SwXPrintPreviewSettings.cxx sw/source/ui/uno/SwXPrintPreviewSettings.hxx sw/source/ui/uno/unoatxt.cxx sw/source/ui/uno/unomod.cxx sw/source/ui/uno/unotxdoc.cxx sw/source/ui/uno/unotxvw.cxx sw/source/ui/utlui/attrdesc.cxx sw/source/ui/utlui/content.cxx sw/source/ui/utlui/glbltree.cxx sw/source/ui/utlui/initui.cxx sw/source/ui/utlui/makefile.mk sw/source/ui/utlui/navipi.cxx sw/source/ui/utlui/navipi.src sw/source/ui/utlui/numfmtlb.cxx sw/source/ui/utlui/prcntfld.cxx sw/source/ui/utlui/uiitems.cxx sw/source/ui/utlui/uitool.cxx sw/source/ui/utlui/unotools.cxx sw/source/ui/utlui/viewlayoutctrl.cxx sw/source/ui/utlui/zoomctrl.cxx sw/source/ui/vba/makefile.mk sw/source/ui/vba/service.cxx sw/source/ui/web/makefile.mk sw/source/ui/wrtsh/makefile.mk sw/source/ui/wrtsh/wrtsh1.cxx sw/source/ui/wrtsh/wrtsh2.cxx sw/source/ui/wrtsh/wrtsh4.cxx sw/source/ui/wrtsh/wrtundo.cxx sw/util/hidother.src sw/util/makefile.mk sw/util/msword.map
2011-03-14 16:51:14 +00:00
// Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
CWS-TOOLING: integrate CWS sw31bf04 2009-01-21 14:24:10 +0100 od r266670 : #i59051# correction of metric change for PolyPolygonBezier needed 2009-01-21 09:35:44 +0100 od r266632 : #i96062# adjustment of fix after rebasing 2009-01-21 09:34:56 +0100 od r266631 : #i94152# adjustment of fix after rebasing 2009-01-20 16:43:12 +0100 od r266596 : CWS-TOOLING: rebase CWS sw31bf04 to trunk@266428 (milestone: DEV300:m39) 2009-01-20 11:52:22 +0100 od r266561 : #i94152 method <SwDoc::SetOutlineNumRule(..)> - assure that at outline list style registered text node have the correct list level set 2009-01-20 10:43:53 +0100 od r266556 : #i93399# methods <SwNumRule::SetIndent(..)> and <SwNumRule::ChangeIndent(..)> - adjust also the list tab position, if a list tab stop is applied 2009-01-16 16:26:56 +0100 od r266432 : #i59051# adjust Writer's UNO-API for drawing objects - correct conversion of "StartPosition" and "EndPosition" - conversion of "PolyPolygonBezier" 2009-01-16 16:20:49 +0100 od r266430 : #i59051# - adjust UNO-API of connector shape -- convert "PolyPolygonBezier" to correct metric -- convert "StartPosition" and "EndPosition" in set-method before applying anchor position - adjust UNO-API of measure shape -- convert "StartPosition" and "EndPosition" to correct metric 2009-01-16 15:01:21 +0100 od r266419 : #i95698# method <SwFrm::GetPrevSctLeaf(..)> - only columns as previous section leaves for tables inside sections, which are inside another table. 2009-01-14 14:34:58 +0100 od r266304 : #i96092# method <HandleResetAttrAtTxtNode::~HandleResetAttrAtTxtNode()> - set list level to outline level, if needed. 2009-01-13 17:09:43 +0100 od r266238 : #i98037# method <SwWW8ImplReader::IsObjectLayoutInTableCell(..)> - adjust evaluation of WW8 attributes 2009-01-13 11:49:48 +0100 od r266203 : #i94187# method <SwTxtFormatter::NewTabPortion(..)> - correct consideration of compatibility option TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST 2009-01-13 11:48:45 +0100 od r266202 : #i94187# method <OutWW8_SwTxtNode(..)> - set list style directly at paragraph only in position and space mode LABEL_WIDTH_AND_POSITION 2009-01-12 12:22:58 +0100 od r266143 : #i70582# method <SwFlyAtCntFrm::SetAbsPos(..)> and local method <lcl_CalcDownDist(..)> - correct determination of anchor's frame top for object positioning.
2009-02-13 10:05:35 +00:00
rRet.nMain = bVert
2010-05-14 11:27:15 +00:00
? ( bVertL2R
? ( (pUp->Frm().Left() + pUp->Prt().Right()) - nTopForObjPos )
: ( nTopForObjPos - (pUp->Frm().Left() + pUp->Prt().Left() ) ) )
: ( (pUp->Frm().Top() + pUp->Prt().Bottom()) - nTopForObjPos );
2000-09-18 23:08:29 +00:00
const SwFrm *pPre = pCnt;
const SwFrm *pLay = pUp->GetLeaf( MAKEPAGE_NONE, sal_True, pCnt );
SwTwips nFrmTop = 0;
SwTwips nPrtHeight = 0;
bool bSct = false;
2000-09-18 23:08:29 +00:00
const SwSectionFrm *pSect = pUp->FindSctFrm();
if( pSect )
{
rRet.nSub = rRet.nMain;
rRet.nMain = 0;
}
if( pSect && !pSect->IsAnLower( pLay ) )
{
bSct = false;
2000-09-18 23:08:29 +00:00
const SwSectionFrm* pNxtSect = pLay ? pLay->FindSctFrm() : 0;
if( pSect->IsAnFollow( pNxtSect ) )
{
if( pLay->IsVertical() )
{
2009-03-04 16:19:59 +00:00
//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
if ( pLay->IsVertLR() )
nFrmTop = pLay->Frm().Left();
else
nFrmTop = pLay->Frm().Left() + pLay->Frm().Width();
nPrtHeight = pLay->Prt().Width();
}
else
{
nFrmTop = pLay->Frm().Top();
nPrtHeight = pLay->Prt().Height();
}
2000-09-18 23:08:29 +00:00
pSect = pNxtSect;
}
else
{
pLay = pSect->GetUpper();
if( pLay->IsVertical() )
{
2009-03-04 16:19:59 +00:00
//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
if ( pLay->IsVertLR() )
{
nFrmTop = pSect->Frm().Right();
nPrtHeight = pLay->Frm().Left() + pLay->Prt().Left()
+ pLay->Prt().Width() - pSect->Frm().Left()
- pSect->Frm().Width();
}
else
{
nFrmTop = pSect->Frm().Left();
nPrtHeight = pSect->Frm().Left() - pLay->Frm().Left()
- pLay->Prt().Left();
2009-03-04 16:19:59 +00:00
}
}
else
{
nFrmTop = pSect->Frm().Bottom();
nPrtHeight = pLay->Frm().Top() + pLay->Prt().Top()
+ pLay->Prt().Height() - pSect->Frm().Top()
- pSect->Frm().Height();
}
2000-09-18 23:08:29 +00:00
pSect = 0;
}
}
else if( pLay )
{
if( pLay->IsVertical() )
{
2009-03-04 16:19:59 +00:00
//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
if ( pLay->IsVertLR() )
{
nFrmTop = pLay->Frm().Left();
nPrtHeight = pLay->Prt().Width();
}
else
{
nFrmTop = pLay->Frm().Left() + pLay->Frm().Width();
nPrtHeight = pLay->Prt().Width();
}
}
else
{
nFrmTop = pLay->Frm().Top();
nPrtHeight = pLay->Prt().Height();
}
2000-09-18 23:08:29 +00:00
bSct = 0 != pSect;
}
while ( pLay && !pLay->Frm().IsInside( rPt ) &&
( pLay->Frm().Top() <= rPt.Y() || pLay->IsInFly() ||
( pLay->IsInSct() &&
pLay->FindSctFrm()->GetUpper()->Frm().Top() <= rPt.Y())) )
{
if ( pLay->IsFtnContFrm() )
{
if ( !((SwLayoutFrm*)pLay)->Lower() )
{
SwFrm *pDel = (SwFrm*)pLay;
pDel->Cut();
delete pDel;
return pPre;
}
return 0;
}
else
{
if( bSct || pSect )
rRet.nSub += nPrtHeight;
else
rRet.nMain += nPrtHeight;
pPre = pLay;
pLay = pLay->GetLeaf( MAKEPAGE_NONE, sal_True, pCnt );
2000-09-18 23:08:29 +00:00
if( pSect && !pSect->IsAnLower( pLay ) )
{ // If we're leaving a SwSectionFrm, the next Leaf-Frm
// is the part of the upper below the SectionFrm.
const SwSectionFrm* pNxtSect = pLay ?
pLay->FindSctFrm() : NULL;
bSct = false;
2000-09-18 23:08:29 +00:00
if( pSect->IsAnFollow( pNxtSect ) )
{
pSect = pNxtSect;
if( pLay->IsVertical() )
{
2009-03-04 16:19:59 +00:00
//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
if ( pLay->IsVertLR() )
{
nFrmTop = pLay->Frm().Left();
nPrtHeight = pLay->Prt().Width();
}
else
{
2009-03-04 16:19:59 +00:00
nFrmTop = pLay->Frm().Left() + pLay->Frm().Width();
nPrtHeight = pLay->Prt().Width();
}
}
else
{
nFrmTop = pLay->Frm().Top();
nPrtHeight = pLay->Prt().Height();
}
2000-09-18 23:08:29 +00:00
}
else
{
pLay = pSect->GetUpper();
if( pLay->IsVertical() )
{
2009-03-04 16:19:59 +00:00
//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
if ( pLay->IsVertLR() )
{
nFrmTop = pSect->Frm().Right();
nPrtHeight = pLay->Frm().Left()+pLay->Prt().Left()
+ pLay->Prt().Width() - pSect->Frm().Left()
- pSect->Frm().Width();
}
else
{
2009-03-04 16:19:59 +00:00
nFrmTop = pSect->Frm().Left();
nPrtHeight = pSect->Frm().Left() -
pLay->Frm().Left() - pLay->Prt().Left();
}
}
else
{
nFrmTop = pSect->Frm().Bottom();
nPrtHeight = pLay->Frm().Top()+pLay->Prt().Top()
+ pLay->Prt().Height() - pSect->Frm().Top()
- pSect->Frm().Height();
}
2000-09-18 23:08:29 +00:00
pSect = 0;
}
}
else if( pLay )
{
if( pLay->IsVertical() )
{
2009-03-04 16:19:59 +00:00
//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
if ( pLay->IsVertLR() )
{
nFrmTop = pLay->Frm().Left();
nPrtHeight = pLay->Prt().Width();
}
else
{
nFrmTop = pLay->Frm().Left() + pLay->Frm().Width();
nPrtHeight = pLay->Prt().Width();
}
}
else
{
nFrmTop = pLay->Frm().Top();
nPrtHeight = pLay->Prt().Height();
}
2000-09-18 23:08:29 +00:00
bSct = 0 != pSect;
}
}
}
if ( pLay )
{
if ( pLay->Frm().IsInside( rPt ) )
{
2009-03-04 16:19:59 +00:00
//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
SwTwips nDiff = pLay->IsVertical() ? ( pLay->IsVertLR() ? ( rPt.X() - nFrmTop ) : ( nFrmTop - rPt.X() ) )
: ( rPt.Y() - nFrmTop );
2000-09-18 23:08:29 +00:00
if( bSct || pSect )
rRet.nSub += nDiff;
2000-09-18 23:08:29 +00:00
else
rRet.nMain += nDiff;
2000-09-18 23:08:29 +00:00
}
if ( pLay->IsFtnContFrm() && !((SwLayoutFrm*)pLay)->Lower() )
{
SwFrm *pDel = (SwFrm*)pLay;
pDel->Cut();
delete pDel;
return 0;
}
return pLay;
}
else
rRet.nMain = LONG_MAX;
}
}
return 0;
}
static sal_uLong lcl_FindCntDiff( const Point &rPt, const SwLayoutFrm *pLay,
2000-09-18 23:08:29 +00:00
const SwCntntFrm *& rpCnt,
const bool bBody, const sal_Bool bFtn )
2000-09-18 23:08:29 +00:00
{
// Searches below pLay the nearest Cnt to the point. The reference point of
2012-02-13 11:37:18 +01:00
//the Cntnts is always the left upper corner.
//The Cnt should preferably be above the point.
2000-09-18 23:08:29 +00:00
#if OSL_DEBUG_LEVEL > 1
2000-09-18 23:08:29 +00:00
Point arPoint( rPt );
#endif
rpCnt = 0;
sal_uLong nDistance = ULONG_MAX;
sal_uLong nNearest = ULONG_MAX;
2000-09-18 23:08:29 +00:00
const SwCntntFrm *pCnt = pLay->ContainsCntnt();
while ( pCnt && (bBody != pCnt->IsInDocBody() || bFtn != pCnt->IsInFtn()))
{
pCnt = pCnt->GetNextCntntFrm();
if ( !pLay->IsAnLower( pCnt ) )
pCnt = 0;
}
const SwCntntFrm *pNearest = pCnt;
if ( pCnt )
{
do
{
2012-02-13 11:37:18 +01:00
//Calculate the distance between those two points.
//'delta' X^2 + 'delta' Y^2 = 'distance'^2
sal_uInt32 dX = Max( pCnt->Frm().Left(), rPt.X() ) -
2000-09-18 23:08:29 +00:00
Min( pCnt->Frm().Left(), rPt.X() ),
dY = Max( pCnt->Frm().Top(), rPt.Y() ) -
Min( pCnt->Frm().Top(), rPt.Y() );
BigInt dX1( dX ), dY1( dY );
dX1 *= dX1; dY1 *= dY1;
const sal_uLong nDiff = ::SqRt( dX1 + dY1 );
2000-09-18 23:08:29 +00:00
if ( pCnt->Frm().Top() <= rPt.Y() )
{
if ( nDiff < nDistance )
{
2012-02-13 11:37:18 +01:00
//This one is the nearer one
2000-09-18 23:08:29 +00:00
nDistance = nNearest = nDiff;
rpCnt = pNearest = pCnt;
}
}
else if ( nDiff < nNearest )
{
nNearest = nDiff;
pNearest = pCnt;
}
pCnt = pCnt->GetNextCntntFrm();
while ( pCnt &&
(bBody != pCnt->IsInDocBody() || bFtn != pCnt->IsInFtn()))
pCnt = pCnt->GetNextCntntFrm();
} while ( pCnt && pLay->IsAnLower( pCnt ) );
}
if ( nDistance == ULONG_MAX )
{ rpCnt = pNearest;
return nNearest;
}
return nDistance;
}
static const SwCntntFrm * lcl_FindCnt( const Point &rPt, const SwCntntFrm *pCnt,
const bool bBody, const sal_Bool bFtn )
2000-09-18 23:08:29 +00:00
{
2012-02-13 11:37:18 +01:00
//Starting from pCnt searches the CntntFrm whose left upper corner is the
//nearest to the point.
//Always returns a CntntFrm.
//First the nearest Cntnt inside the page which contains the Cntnt is
//searched. Starting from this page the pages in both directions need to
//be considered. If possible a Cntnt is returned whose Y-position is
2012-02-13 11:37:18 +01:00
//above the point.
2000-09-18 23:08:29 +00:00
const SwCntntFrm *pRet, *pNew;
const SwLayoutFrm *pLay = pCnt->FindPageFrm();
sal_uLong nDist;
2000-09-18 23:08:29 +00:00
nDist = ::lcl_FindCntDiff( rPt, pLay, pNew, bBody, bFtn );
if ( pNew )
pRet = pNew;
else
{ pRet = pCnt;
nDist = ULONG_MAX;
}
const SwCntntFrm *pNearest = pRet;
sal_uLong nNearest = nDist;
2000-09-18 23:08:29 +00:00
if ( pLay )
{
const SwLayoutFrm *pPge = pLay;
sal_uLong nOldNew = ULONG_MAX;
for ( sal_uInt16 i = 0; pPge->GetPrev() && (i < 3); ++i )
2000-09-18 23:08:29 +00:00
{
pPge = (SwLayoutFrm*)pPge->GetPrev();
const sal_uLong nNew = ::lcl_FindCntDiff( rPt, pPge, pNew, bBody, bFtn );
2000-09-18 23:08:29 +00:00
if ( nNew < nDist )
{
if ( pNew->Frm().Top() <= rPt.Y() )
{
pRet = pNearest = pNew;
nDist = nNearest = nNew;
}
else if ( nNew < nNearest )
{
pNearest = pNew;
nNearest = nNew;
}
}
else if ( nOldNew != ULONG_MAX && nNew > nOldNew )
break;
else
nOldNew = nNew;
}
pPge = pLay;
nOldNew = ULONG_MAX;
for ( sal_uInt16 j = 0; pPge->GetNext() && (j < 3); ++j )
2000-09-18 23:08:29 +00:00
{
pPge = (SwLayoutFrm*)pPge->GetNext();
const sal_uLong nNew = ::lcl_FindCntDiff( rPt, pPge, pNew, bBody, bFtn );
2000-09-18 23:08:29 +00:00
if ( nNew < nDist )
{
if ( pNew->Frm().Top() <= rPt.Y() )
{
pRet = pNearest = pNew;
nDist = nNearest = nNew;
}
else if ( nNew < nNearest )
{
pNearest = pNew;
nNearest = nNew;
}
}
else if ( nOldNew != ULONG_MAX && nNew > nOldNew )
break;
else
nOldNew = nNew;
}
}
if ( (pRet->Frm().Top() > rPt.Y()) )
return pNearest;
else
return pRet;
}
static void lcl_PointToPrt( Point &rPoint, const SwFrm *pFrm )
2000-09-18 23:08:29 +00:00
{
SwRect aTmp( pFrm->Prt() );
aTmp += pFrm->Frm().Pos();
if ( rPoint.X() < aTmp.Left() )
rPoint.X() = aTmp.Left();
else if ( rPoint.X() > aTmp.Right() )
rPoint.X() = aTmp.Right();
if ( rPoint.Y() < aTmp.Top() )
rPoint.Y() = aTmp.Top();
else if ( rPoint.Y() > aTmp.Bottom() )
rPoint.Y() = aTmp.Bottom();
}
const SwCntntFrm *FindAnchor( const SwFrm *pOldAnch, const Point &rNew,
const sal_Bool bBodyOnly )
2000-09-18 23:08:29 +00:00
{
2012-02-13 11:37:18 +01:00
//Search the nearest Cnt around the given document position in the text
//flow. The given anchor is the starting Frm.
const SwCntntFrm* pCnt;
2000-09-18 23:08:29 +00:00
if ( pOldAnch->IsCntntFrm() )
{
2000-09-18 23:08:29 +00:00
pCnt = (const SwCntntFrm*)pOldAnch;
}
2000-09-18 23:08:29 +00:00
else
{
Point aTmp( rNew );
2000-09-18 23:08:29 +00:00
SwLayoutFrm *pTmpLay = (SwLayoutFrm*)pOldAnch;
if( pTmpLay->IsRootFrm() )
{
SwRect aTmpRect( aTmp, Size(0,0) );
pTmpLay = (SwLayoutFrm*)::FindPage( aTmpRect, pTmpLay->Lower() );
}
pCnt = pTmpLay->GetCntntPos( aTmp, sal_False, bBodyOnly );
2000-09-18 23:08:29 +00:00
}
2012-02-13 11:37:18 +01:00
//Take care to use meaningful ranges during search. This means to not enter
//or leave header/footer in this case.
const bool bBody = pCnt->IsInDocBody() || bBodyOnly;
const sal_Bool bFtn = !bBodyOnly && pCnt->IsInFtn();
2000-09-18 23:08:29 +00:00
Point aNew( rNew );
if ( bBody )
{
//#38848 drag from page margin into the body.
2000-09-18 23:08:29 +00:00
const SwFrm *pPage = pCnt->FindPageFrm();
::lcl_PointToPrt( aNew, pPage->GetUpper() );
SwRect aTmp( aNew, Size( 0, 0 ) );
pPage = ::FindPage( aTmp, pPage );
::lcl_PointToPrt( aNew, pPage );
}
if ( pCnt->IsInDocBody() == bBody && pCnt->Frm().IsInside( aNew ) )
return pCnt;
else if ( pOldAnch->IsInDocBody() || pOldAnch->IsPageFrm() )
{
// Maybe the selected anchor is on the same page as the current anchor.
// With this we won't run into problems with the columns.
2000-09-18 23:08:29 +00:00
Point aTmp( aNew );
const SwCntntFrm *pTmp = pCnt->FindPageFrm()->
GetCntntPos( aTmp, sal_False, sal_True, sal_False );
2000-09-18 23:08:29 +00:00
if ( pTmp && pTmp->Frm().IsInside( aNew ) )
return pTmp;
}
2012-02-13 11:37:18 +01:00
//Starting from the anchor we now search in both directions until we found
//the nearest one respectively.
//Not the direct distance is relevant but the distance which needs to be
//traveled through the text flow.
2000-09-18 23:08:29 +00:00
const SwCntntFrm *pUpLst;
const SwCntntFrm *pUpFrm = pCnt;
SwDistance nUp, nUpLst;
::lcl_CalcDownDist( nUp, aNew, pUpFrm );
SwDistance nDown = nUp;
bool bNegAllowed = true;// Make it possible to leave the negative section once.
2000-09-18 23:08:29 +00:00
do
{
pUpLst = pUpFrm; nUpLst = nUp;
pUpFrm = pUpLst->GetPrevCntntFrm();
while ( pUpFrm &&
(bBody != pUpFrm->IsInDocBody() || bFtn != pUpFrm->IsInFtn()))
pUpFrm = pUpFrm->GetPrevCntntFrm();
if ( pUpFrm )
{
::lcl_CalcDownDist( nUp, aNew, pUpFrm );
2012-02-13 11:37:18 +01:00
//It makes sense to search further, if the distance grows inside
//a table.
2000-09-18 23:08:29 +00:00
if ( pUpLst->IsInTab() && pUpFrm->IsInTab() )
{
while ( pUpFrm && ((nUpLst < nUp && pUpFrm->IsInTab()) ||
bBody != pUpFrm->IsInDocBody()) )
{
pUpFrm = pUpFrm->GetPrevCntntFrm();
if ( pUpFrm )
::lcl_CalcDownDist( nUp, aNew, pUpFrm );
}
}
}
if ( !pUpFrm )
nUp.nMain = LONG_MAX;
if ( nUp.nMain >= 0 && LONG_MAX != nUp.nMain )
2000-09-18 23:08:29 +00:00
{
bNegAllowed = false;
2012-02-13 11:37:18 +01:00
if ( nUpLst.nMain < 0 ) //don't take the wrong one, if the value
//just changed from negative to positive.
2000-09-18 23:08:29 +00:00
{ pUpLst = pUpFrm;
nUpLst = nUp;
}
}
} while ( pUpFrm && ( ( bNegAllowed && nUp.nMain < 0 ) || ( nUp <= nUpLst ) ) );
2000-09-18 23:08:29 +00:00
const SwCntntFrm *pDownLst;
const SwCntntFrm *pDownFrm = pCnt;
SwDistance nDownLst;
if ( nDown.nMain < 0 )
nDown.nMain = LONG_MAX;
do
{
pDownLst = pDownFrm; nDownLst = nDown;
pDownFrm = pDownLst->GetNextCntntFrm();
while ( pDownFrm &&
(bBody != pDownFrm->IsInDocBody() || bFtn != pDownFrm->IsInFtn()))
pDownFrm = pDownFrm->GetNextCntntFrm();
if ( pDownFrm )
{
::lcl_CalcDownDist( nDown, aNew, pDownFrm );
if ( nDown.nMain < 0 )
nDown.nMain = LONG_MAX;
2012-02-13 11:37:18 +01:00
//It makes sense to search further, if the distance grows inside
//a table.
2000-09-18 23:08:29 +00:00
if ( pDownLst->IsInTab() && pDownFrm->IsInTab() )
{
while ( pDownFrm && ( ( nDown.nMain != LONG_MAX && pDownFrm->IsInTab()) || bBody != pDownFrm->IsInDocBody() ) )
2000-09-18 23:08:29 +00:00
{
pDownFrm = pDownFrm->GetNextCntntFrm();
if ( pDownFrm )
::lcl_CalcDownDist( nDown, aNew, pDownFrm );
if ( nDown.nMain < 0 )
nDown.nMain = LONG_MAX;
}
}
}
if ( !pDownFrm )
nDown.nMain = LONG_MAX;
} while ( pDownFrm && nDown <= nDownLst &&
nDown.nMain != LONG_MAX && nDownLst.nMain != LONG_MAX );
2012-02-13 11:37:18 +01:00
//If we couldn't find one in both directions, we'll search the Cntnt whose
//left upper corner is the nearest to the point. Such a situation may
//happen, if the point doesn't lay in the text flow but in any margin.
2000-09-18 23:08:29 +00:00
if ( nDownLst.nMain == LONG_MAX && nUpLst.nMain == LONG_MAX )
{
2011-02-13 18:00:46 +01:00
// If an OLE objects, which is contained in a fly frame
// is resized in inplace mode and the new Position is outside the
// fly frame, we do not want to leave our fly frame.
if ( pCnt->IsInFly() )
return pCnt;
2000-09-18 23:08:29 +00:00
return ::lcl_FindCnt( aNew, pCnt, bBody, bFtn );
}
2000-09-18 23:08:29 +00:00
else
return nDownLst < nUpLst ? pDownLst : pUpLst;
}
/*************************************************************************
|*
|* SwFlyAtCntFrm::SetAbsPos()
|*
|*************************************************************************/
void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
{
SwPageFrm *pOldPage = FindPageFrm();
const SwRect aOld( GetObjRectWithSpaces() );
Point aNew( rNew );
2009-03-04 16:19:59 +00:00
//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
if( ( GetAnchorFrm()->IsVertical() && !GetAnchorFrm()->IsVertLR() ) || GetAnchorFrm()->IsRightToLeft() )
aNew.X() += Frm().Width();
SwCntntFrm *pCnt = (SwCntntFrm*)::FindAnchor( GetAnchorFrm(), aNew );
if( pCnt->IsProtected() )
pCnt = (SwCntntFrm*)GetAnchorFrm();
SwPageFrm *pTmpPage = 0;
const bool bVert = pCnt->IsVertical();
2009-03-04 16:19:59 +00:00
//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
const bool bVertL2R = pCnt->IsVertLR();
const sal_Bool bRTL = pCnt->IsRightToLeft();
if( ( !bVert != !GetAnchorFrm()->IsVertical() ) ||
( !bRTL != !GetAnchorFrm()->IsRightToLeft() ) )
{
if( bVert || bRTL )
aNew.X() += Frm().Width();
else
aNew.X() -= Frm().Width();
}
if ( pCnt->IsInDocBody() )
{
//#38848 drag from page margin into the body.
pTmpPage = pCnt->FindPageFrm();
::lcl_PointToPrt( aNew, pTmpPage->GetUpper() );
SwRect aTmp( aNew, Size( 0, 0 ) );
pTmpPage = (SwPageFrm*)::FindPage( aTmp, pTmpPage );
::lcl_PointToPrt( aNew, pTmpPage );
}
2012-02-13 11:37:18 +01:00
//Setup RelPos, only invalidate if requested.
//rNew is an absolute position. We need to calculate the distance from rNew
//to the anchor inside the text flow to correctly set RelPos.
//!!!!!We can optimize here: FindAnchor could also return RelPos!
const SwFrm *pFrm = 0;
SwTwips nY;
if ( pCnt->Frm().IsInside( aNew ) )
{
2011-02-13 18:00:46 +01:00
// #i70582#
CWS-TOOLING: integrate CWS sw31bf04 2009-01-21 14:24:10 +0100 od r266670 : #i59051# correction of metric change for PolyPolygonBezier needed 2009-01-21 09:35:44 +0100 od r266632 : #i96062# adjustment of fix after rebasing 2009-01-21 09:34:56 +0100 od r266631 : #i94152# adjustment of fix after rebasing 2009-01-20 16:43:12 +0100 od r266596 : CWS-TOOLING: rebase CWS sw31bf04 to trunk@266428 (milestone: DEV300:m39) 2009-01-20 11:52:22 +0100 od r266561 : #i94152 method <SwDoc::SetOutlineNumRule(..)> - assure that at outline list style registered text node have the correct list level set 2009-01-20 10:43:53 +0100 od r266556 : #i93399# methods <SwNumRule::SetIndent(..)> and <SwNumRule::ChangeIndent(..)> - adjust also the list tab position, if a list tab stop is applied 2009-01-16 16:26:56 +0100 od r266432 : #i59051# adjust Writer's UNO-API for drawing objects - correct conversion of "StartPosition" and "EndPosition" - conversion of "PolyPolygonBezier" 2009-01-16 16:20:49 +0100 od r266430 : #i59051# - adjust UNO-API of connector shape -- convert "PolyPolygonBezier" to correct metric -- convert "StartPosition" and "EndPosition" in set-method before applying anchor position - adjust UNO-API of measure shape -- convert "StartPosition" and "EndPosition" to correct metric 2009-01-16 15:01:21 +0100 od r266419 : #i95698# method <SwFrm::GetPrevSctLeaf(..)> - only columns as previous section leaves for tables inside sections, which are inside another table. 2009-01-14 14:34:58 +0100 od r266304 : #i96092# method <HandleResetAttrAtTxtNode::~HandleResetAttrAtTxtNode()> - set list level to outline level, if needed. 2009-01-13 17:09:43 +0100 od r266238 : #i98037# method <SwWW8ImplReader::IsObjectLayoutInTableCell(..)> - adjust evaluation of WW8 attributes 2009-01-13 11:49:48 +0100 od r266203 : #i94187# method <SwTxtFormatter::NewTabPortion(..)> - correct consideration of compatibility option TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST 2009-01-13 11:48:45 +0100 od r266202 : #i94187# method <OutWW8_SwTxtNode(..)> - set list style directly at paragraph only in position and space mode LABEL_WIDTH_AND_POSITION 2009-01-12 12:22:58 +0100 od r266143 : #i70582# method <SwFlyAtCntFrm::SetAbsPos(..)> and local method <lcl_CalcDownDist(..)> - correct determination of anchor's frame top for object positioning.
2009-02-13 10:05:35 +00:00
const SwTwips nTopForObjPos =
bVert
2010-05-14 11:27:15 +00:00
? ( bVertL2R
? ( pCnt->Frm().Left() +
pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() )
: ( pCnt->Frm().Left() +
pCnt->Frm().Width() -
pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() ) )
CWS-TOOLING: integrate CWS sw31bf04 2009-01-21 14:24:10 +0100 od r266670 : #i59051# correction of metric change for PolyPolygonBezier needed 2009-01-21 09:35:44 +0100 od r266632 : #i96062# adjustment of fix after rebasing 2009-01-21 09:34:56 +0100 od r266631 : #i94152# adjustment of fix after rebasing 2009-01-20 16:43:12 +0100 od r266596 : CWS-TOOLING: rebase CWS sw31bf04 to trunk@266428 (milestone: DEV300:m39) 2009-01-20 11:52:22 +0100 od r266561 : #i94152 method <SwDoc::SetOutlineNumRule(..)> - assure that at outline list style registered text node have the correct list level set 2009-01-20 10:43:53 +0100 od r266556 : #i93399# methods <SwNumRule::SetIndent(..)> and <SwNumRule::ChangeIndent(..)> - adjust also the list tab position, if a list tab stop is applied 2009-01-16 16:26:56 +0100 od r266432 : #i59051# adjust Writer's UNO-API for drawing objects - correct conversion of "StartPosition" and "EndPosition" - conversion of "PolyPolygonBezier" 2009-01-16 16:20:49 +0100 od r266430 : #i59051# - adjust UNO-API of connector shape -- convert "PolyPolygonBezier" to correct metric -- convert "StartPosition" and "EndPosition" in set-method before applying anchor position - adjust UNO-API of measure shape -- convert "StartPosition" and "EndPosition" to correct metric 2009-01-16 15:01:21 +0100 od r266419 : #i95698# method <SwFrm::GetPrevSctLeaf(..)> - only columns as previous section leaves for tables inside sections, which are inside another table. 2009-01-14 14:34:58 +0100 od r266304 : #i96092# method <HandleResetAttrAtTxtNode::~HandleResetAttrAtTxtNode()> - set list level to outline level, if needed. 2009-01-13 17:09:43 +0100 od r266238 : #i98037# method <SwWW8ImplReader::IsObjectLayoutInTableCell(..)> - adjust evaluation of WW8 attributes 2009-01-13 11:49:48 +0100 od r266203 : #i94187# method <SwTxtFormatter::NewTabPortion(..)> - correct consideration of compatibility option TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST 2009-01-13 11:48:45 +0100 od r266202 : #i94187# method <OutWW8_SwTxtNode(..)> - set list style directly at paragraph only in position and space mode LABEL_WIDTH_AND_POSITION 2009-01-12 12:22:58 +0100 od r266143 : #i70582# method <SwFlyAtCntFrm::SetAbsPos(..)> and local method <lcl_CalcDownDist(..)> - correct determination of anchor's frame top for object positioning.
2009-02-13 10:05:35 +00:00
: ( pCnt->Frm().Top() +
pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() );
if( bVert )
//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
CWS-TOOLING: integrate CWS sw31bf04 2009-01-21 14:24:10 +0100 od r266670 : #i59051# correction of metric change for PolyPolygonBezier needed 2009-01-21 09:35:44 +0100 od r266632 : #i96062# adjustment of fix after rebasing 2009-01-21 09:34:56 +0100 od r266631 : #i94152# adjustment of fix after rebasing 2009-01-20 16:43:12 +0100 od r266596 : CWS-TOOLING: rebase CWS sw31bf04 to trunk@266428 (milestone: DEV300:m39) 2009-01-20 11:52:22 +0100 od r266561 : #i94152 method <SwDoc::SetOutlineNumRule(..)> - assure that at outline list style registered text node have the correct list level set 2009-01-20 10:43:53 +0100 od r266556 : #i93399# methods <SwNumRule::SetIndent(..)> and <SwNumRule::ChangeIndent(..)> - adjust also the list tab position, if a list tab stop is applied 2009-01-16 16:26:56 +0100 od r266432 : #i59051# adjust Writer's UNO-API for drawing objects - correct conversion of "StartPosition" and "EndPosition" - conversion of "PolyPolygonBezier" 2009-01-16 16:20:49 +0100 od r266430 : #i59051# - adjust UNO-API of connector shape -- convert "PolyPolygonBezier" to correct metric -- convert "StartPosition" and "EndPosition" in set-method before applying anchor position - adjust UNO-API of measure shape -- convert "StartPosition" and "EndPosition" to correct metric 2009-01-16 15:01:21 +0100 od r266419 : #i95698# method <SwFrm::GetPrevSctLeaf(..)> - only columns as previous section leaves for tables inside sections, which are inside another table. 2009-01-14 14:34:58 +0100 od r266304 : #i96092# method <HandleResetAttrAtTxtNode::~HandleResetAttrAtTxtNode()> - set list level to outline level, if needed. 2009-01-13 17:09:43 +0100 od r266238 : #i98037# method <SwWW8ImplReader::IsObjectLayoutInTableCell(..)> - adjust evaluation of WW8 attributes 2009-01-13 11:49:48 +0100 od r266203 : #i94187# method <SwTxtFormatter::NewTabPortion(..)> - correct consideration of compatibility option TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST 2009-01-13 11:48:45 +0100 od r266202 : #i94187# method <OutWW8_SwTxtNode(..)> - set list style directly at paragraph only in position and space mode LABEL_WIDTH_AND_POSITION 2009-01-12 12:22:58 +0100 od r266143 : #i70582# method <SwFlyAtCntFrm::SetAbsPos(..)> and local method <lcl_CalcDownDist(..)> - correct determination of anchor's frame top for object positioning.
2009-02-13 10:05:35 +00:00
{
2009-03-04 16:19:59 +00:00
if ( bVertL2R )
2010-05-14 11:27:15 +00:00
nY = rNew.X() - nTopForObjPos;
2009-03-04 16:19:59 +00:00
else
2010-05-14 11:27:15 +00:00
nY = nTopForObjPos - rNew.X() - Frm().Width();
CWS-TOOLING: integrate CWS sw31bf04 2009-01-21 14:24:10 +0100 od r266670 : #i59051# correction of metric change for PolyPolygonBezier needed 2009-01-21 09:35:44 +0100 od r266632 : #i96062# adjustment of fix after rebasing 2009-01-21 09:34:56 +0100 od r266631 : #i94152# adjustment of fix after rebasing 2009-01-20 16:43:12 +0100 od r266596 : CWS-TOOLING: rebase CWS sw31bf04 to trunk@266428 (milestone: DEV300:m39) 2009-01-20 11:52:22 +0100 od r266561 : #i94152 method <SwDoc::SetOutlineNumRule(..)> - assure that at outline list style registered text node have the correct list level set 2009-01-20 10:43:53 +0100 od r266556 : #i93399# methods <SwNumRule::SetIndent(..)> and <SwNumRule::ChangeIndent(..)> - adjust also the list tab position, if a list tab stop is applied 2009-01-16 16:26:56 +0100 od r266432 : #i59051# adjust Writer's UNO-API for drawing objects - correct conversion of "StartPosition" and "EndPosition" - conversion of "PolyPolygonBezier" 2009-01-16 16:20:49 +0100 od r266430 : #i59051# - adjust UNO-API of connector shape -- convert "PolyPolygonBezier" to correct metric -- convert "StartPosition" and "EndPosition" in set-method before applying anchor position - adjust UNO-API of measure shape -- convert "StartPosition" and "EndPosition" to correct metric 2009-01-16 15:01:21 +0100 od r266419 : #i95698# method <SwFrm::GetPrevSctLeaf(..)> - only columns as previous section leaves for tables inside sections, which are inside another table. 2009-01-14 14:34:58 +0100 od r266304 : #i96092# method <HandleResetAttrAtTxtNode::~HandleResetAttrAtTxtNode()> - set list level to outline level, if needed. 2009-01-13 17:09:43 +0100 od r266238 : #i98037# method <SwWW8ImplReader::IsObjectLayoutInTableCell(..)> - adjust evaluation of WW8 attributes 2009-01-13 11:49:48 +0100 od r266203 : #i94187# method <SwTxtFormatter::NewTabPortion(..)> - correct consideration of compatibility option TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST 2009-01-13 11:48:45 +0100 od r266202 : #i94187# method <OutWW8_SwTxtNode(..)> - set list style directly at paragraph only in position and space mode LABEL_WIDTH_AND_POSITION 2009-01-12 12:22:58 +0100 od r266143 : #i70582# method <SwFlyAtCntFrm::SetAbsPos(..)> and local method <lcl_CalcDownDist(..)> - correct determination of anchor's frame top for object positioning.
2009-02-13 10:05:35 +00:00
}
else
CWS-TOOLING: integrate CWS sw31bf04 2009-01-21 14:24:10 +0100 od r266670 : #i59051# correction of metric change for PolyPolygonBezier needed 2009-01-21 09:35:44 +0100 od r266632 : #i96062# adjustment of fix after rebasing 2009-01-21 09:34:56 +0100 od r266631 : #i94152# adjustment of fix after rebasing 2009-01-20 16:43:12 +0100 od r266596 : CWS-TOOLING: rebase CWS sw31bf04 to trunk@266428 (milestone: DEV300:m39) 2009-01-20 11:52:22 +0100 od r266561 : #i94152 method <SwDoc::SetOutlineNumRule(..)> - assure that at outline list style registered text node have the correct list level set 2009-01-20 10:43:53 +0100 od r266556 : #i93399# methods <SwNumRule::SetIndent(..)> and <SwNumRule::ChangeIndent(..)> - adjust also the list tab position, if a list tab stop is applied 2009-01-16 16:26:56 +0100 od r266432 : #i59051# adjust Writer's UNO-API for drawing objects - correct conversion of "StartPosition" and "EndPosition" - conversion of "PolyPolygonBezier" 2009-01-16 16:20:49 +0100 od r266430 : #i59051# - adjust UNO-API of connector shape -- convert "PolyPolygonBezier" to correct metric -- convert "StartPosition" and "EndPosition" in set-method before applying anchor position - adjust UNO-API of measure shape -- convert "StartPosition" and "EndPosition" to correct metric 2009-01-16 15:01:21 +0100 od r266419 : #i95698# method <SwFrm::GetPrevSctLeaf(..)> - only columns as previous section leaves for tables inside sections, which are inside another table. 2009-01-14 14:34:58 +0100 od r266304 : #i96092# method <HandleResetAttrAtTxtNode::~HandleResetAttrAtTxtNode()> - set list level to outline level, if needed. 2009-01-13 17:09:43 +0100 od r266238 : #i98037# method <SwWW8ImplReader::IsObjectLayoutInTableCell(..)> - adjust evaluation of WW8 attributes 2009-01-13 11:49:48 +0100 od r266203 : #i94187# method <SwTxtFormatter::NewTabPortion(..)> - correct consideration of compatibility option TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST 2009-01-13 11:48:45 +0100 od r266202 : #i94187# method <OutWW8_SwTxtNode(..)> - set list style directly at paragraph only in position and space mode LABEL_WIDTH_AND_POSITION 2009-01-12 12:22:58 +0100 od r266143 : #i70582# method <SwFlyAtCntFrm::SetAbsPos(..)> and local method <lcl_CalcDownDist(..)> - correct determination of anchor's frame top for object positioning.
2009-02-13 10:05:35 +00:00
{
nY = rNew.Y() - nTopForObjPos;
}
}
else
{
SwDistance aDist;
pFrm = ::lcl_CalcDownDist( aDist, aNew, pCnt );
nY = aDist.nMain + aDist.nSub;
}
SwTwips nX = 0;
if ( pCnt->IsFollow() )
{
// Flys are never attached to the follow but always to the master,
// which we're going to search now.
const SwCntntFrm *pOriginal = pCnt;
const SwCntntFrm *pFollow = pCnt;
while ( pCnt->IsFollow() )
{
do
{ pCnt = pCnt->GetPrevCntntFrm();
} while ( pCnt->GetFollow() != pFollow );
pFollow = pCnt;
}
SwTwips nDiff = 0;
do
{ const SwFrm *pUp = pFollow->GetUpper();
if( pUp->IsVertical() )
//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
{
2009-03-04 16:19:59 +00:00
if ( pUp->IsVertLR() )
nDiff += pUp->Prt().Width() - pFollow->GetRelPos().X();
else
nDiff += pFollow->Frm().Left() + pFollow->Frm().Width()
- pUp->Frm().Left() - pUp->Prt().Left();
}
else
nDiff += pUp->Prt().Height() - pFollow->GetRelPos().Y();
pFollow = pFollow->GetFollow();
} while ( pFollow != pOriginal );
nY += nDiff;
if( bVert )
nX = pCnt->Frm().Top() - pOriginal->Frm().Top();
else
nX = pCnt->Frm().Left() - pOriginal->Frm().Left();
}
if ( nY == LONG_MAX )
{
2011-02-13 18:00:46 +01:00
// #i70582#
CWS-TOOLING: integrate CWS sw31bf04 2009-01-21 14:24:10 +0100 od r266670 : #i59051# correction of metric change for PolyPolygonBezier needed 2009-01-21 09:35:44 +0100 od r266632 : #i96062# adjustment of fix after rebasing 2009-01-21 09:34:56 +0100 od r266631 : #i94152# adjustment of fix after rebasing 2009-01-20 16:43:12 +0100 od r266596 : CWS-TOOLING: rebase CWS sw31bf04 to trunk@266428 (milestone: DEV300:m39) 2009-01-20 11:52:22 +0100 od r266561 : #i94152 method <SwDoc::SetOutlineNumRule(..)> - assure that at outline list style registered text node have the correct list level set 2009-01-20 10:43:53 +0100 od r266556 : #i93399# methods <SwNumRule::SetIndent(..)> and <SwNumRule::ChangeIndent(..)> - adjust also the list tab position, if a list tab stop is applied 2009-01-16 16:26:56 +0100 od r266432 : #i59051# adjust Writer's UNO-API for drawing objects - correct conversion of "StartPosition" and "EndPosition" - conversion of "PolyPolygonBezier" 2009-01-16 16:20:49 +0100 od r266430 : #i59051# - adjust UNO-API of connector shape -- convert "PolyPolygonBezier" to correct metric -- convert "StartPosition" and "EndPosition" in set-method before applying anchor position - adjust UNO-API of measure shape -- convert "StartPosition" and "EndPosition" to correct metric 2009-01-16 15:01:21 +0100 od r266419 : #i95698# method <SwFrm::GetPrevSctLeaf(..)> - only columns as previous section leaves for tables inside sections, which are inside another table. 2009-01-14 14:34:58 +0100 od r266304 : #i96092# method <HandleResetAttrAtTxtNode::~HandleResetAttrAtTxtNode()> - set list level to outline level, if needed. 2009-01-13 17:09:43 +0100 od r266238 : #i98037# method <SwWW8ImplReader::IsObjectLayoutInTableCell(..)> - adjust evaluation of WW8 attributes 2009-01-13 11:49:48 +0100 od r266203 : #i94187# method <SwTxtFormatter::NewTabPortion(..)> - correct consideration of compatibility option TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST 2009-01-13 11:48:45 +0100 od r266202 : #i94187# method <OutWW8_SwTxtNode(..)> - set list style directly at paragraph only in position and space mode LABEL_WIDTH_AND_POSITION 2009-01-12 12:22:58 +0100 od r266143 : #i70582# method <SwFlyAtCntFrm::SetAbsPos(..)> and local method <lcl_CalcDownDist(..)> - correct determination of anchor's frame top for object positioning.
2009-02-13 10:05:35 +00:00
const SwTwips nTopForObjPos =
bVert
2010-05-14 11:27:15 +00:00
? ( bVertL2R
? ( pCnt->Frm().Left() +
pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() )
: ( pCnt->Frm().Left() +
pCnt->Frm().Width() -
pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() ) )
CWS-TOOLING: integrate CWS sw31bf04 2009-01-21 14:24:10 +0100 od r266670 : #i59051# correction of metric change for PolyPolygonBezier needed 2009-01-21 09:35:44 +0100 od r266632 : #i96062# adjustment of fix after rebasing 2009-01-21 09:34:56 +0100 od r266631 : #i94152# adjustment of fix after rebasing 2009-01-20 16:43:12 +0100 od r266596 : CWS-TOOLING: rebase CWS sw31bf04 to trunk@266428 (milestone: DEV300:m39) 2009-01-20 11:52:22 +0100 od r266561 : #i94152 method <SwDoc::SetOutlineNumRule(..)> - assure that at outline list style registered text node have the correct list level set 2009-01-20 10:43:53 +0100 od r266556 : #i93399# methods <SwNumRule::SetIndent(..)> and <SwNumRule::ChangeIndent(..)> - adjust also the list tab position, if a list tab stop is applied 2009-01-16 16:26:56 +0100 od r266432 : #i59051# adjust Writer's UNO-API for drawing objects - correct conversion of "StartPosition" and "EndPosition" - conversion of "PolyPolygonBezier" 2009-01-16 16:20:49 +0100 od r266430 : #i59051# - adjust UNO-API of connector shape -- convert "PolyPolygonBezier" to correct metric -- convert "StartPosition" and "EndPosition" in set-method before applying anchor position - adjust UNO-API of measure shape -- convert "StartPosition" and "EndPosition" to correct metric 2009-01-16 15:01:21 +0100 od r266419 : #i95698# method <SwFrm::GetPrevSctLeaf(..)> - only columns as previous section leaves for tables inside sections, which are inside another table. 2009-01-14 14:34:58 +0100 od r266304 : #i96092# method <HandleResetAttrAtTxtNode::~HandleResetAttrAtTxtNode()> - set list level to outline level, if needed. 2009-01-13 17:09:43 +0100 od r266238 : #i98037# method <SwWW8ImplReader::IsObjectLayoutInTableCell(..)> - adjust evaluation of WW8 attributes 2009-01-13 11:49:48 +0100 od r266203 : #i94187# method <SwTxtFormatter::NewTabPortion(..)> - correct consideration of compatibility option TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST 2009-01-13 11:48:45 +0100 od r266202 : #i94187# method <OutWW8_SwTxtNode(..)> - set list style directly at paragraph only in position and space mode LABEL_WIDTH_AND_POSITION 2009-01-12 12:22:58 +0100 od r266143 : #i70582# method <SwFlyAtCntFrm::SetAbsPos(..)> and local method <lcl_CalcDownDist(..)> - correct determination of anchor's frame top for object positioning.
2009-02-13 10:05:35 +00:00
: ( pCnt->Frm().Top() +
pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() );
if( bVert )
//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
CWS-TOOLING: integrate CWS sw31bf04 2009-01-21 14:24:10 +0100 od r266670 : #i59051# correction of metric change for PolyPolygonBezier needed 2009-01-21 09:35:44 +0100 od r266632 : #i96062# adjustment of fix after rebasing 2009-01-21 09:34:56 +0100 od r266631 : #i94152# adjustment of fix after rebasing 2009-01-20 16:43:12 +0100 od r266596 : CWS-TOOLING: rebase CWS sw31bf04 to trunk@266428 (milestone: DEV300:m39) 2009-01-20 11:52:22 +0100 od r266561 : #i94152 method <SwDoc::SetOutlineNumRule(..)> - assure that at outline list style registered text node have the correct list level set 2009-01-20 10:43:53 +0100 od r266556 : #i93399# methods <SwNumRule::SetIndent(..)> and <SwNumRule::ChangeIndent(..)> - adjust also the list tab position, if a list tab stop is applied 2009-01-16 16:26:56 +0100 od r266432 : #i59051# adjust Writer's UNO-API for drawing objects - correct conversion of "StartPosition" and "EndPosition" - conversion of "PolyPolygonBezier" 2009-01-16 16:20:49 +0100 od r266430 : #i59051# - adjust UNO-API of connector shape -- convert "PolyPolygonBezier" to correct metric -- convert "StartPosition" and "EndPosition" in set-method before applying anchor position - adjust UNO-API of measure shape -- convert "StartPosition" and "EndPosition" to correct metric 2009-01-16 15:01:21 +0100 od r266419 : #i95698# method <SwFrm::GetPrevSctLeaf(..)> - only columns as previous section leaves for tables inside sections, which are inside another table. 2009-01-14 14:34:58 +0100 od r266304 : #i96092# method <HandleResetAttrAtTxtNode::~HandleResetAttrAtTxtNode()> - set list level to outline level, if needed. 2009-01-13 17:09:43 +0100 od r266238 : #i98037# method <SwWW8ImplReader::IsObjectLayoutInTableCell(..)> - adjust evaluation of WW8 attributes 2009-01-13 11:49:48 +0100 od r266203 : #i94187# method <SwTxtFormatter::NewTabPortion(..)> - correct consideration of compatibility option TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST 2009-01-13 11:48:45 +0100 od r266202 : #i94187# method <OutWW8_SwTxtNode(..)> - set list style directly at paragraph only in position and space mode LABEL_WIDTH_AND_POSITION 2009-01-12 12:22:58 +0100 od r266143 : #i70582# method <SwFlyAtCntFrm::SetAbsPos(..)> and local method <lcl_CalcDownDist(..)> - correct determination of anchor's frame top for object positioning.
2009-02-13 10:05:35 +00:00
{
2009-03-04 16:19:59 +00:00
if ( bVertL2R )
2010-05-14 11:27:15 +00:00
nY = rNew.X() - nTopForObjPos;
2009-03-04 16:19:59 +00:00
else
2010-05-14 11:27:15 +00:00
nY = nTopForObjPos - rNew.X();
CWS-TOOLING: integrate CWS sw31bf04 2009-01-21 14:24:10 +0100 od r266670 : #i59051# correction of metric change for PolyPolygonBezier needed 2009-01-21 09:35:44 +0100 od r266632 : #i96062# adjustment of fix after rebasing 2009-01-21 09:34:56 +0100 od r266631 : #i94152# adjustment of fix after rebasing 2009-01-20 16:43:12 +0100 od r266596 : CWS-TOOLING: rebase CWS sw31bf04 to trunk@266428 (milestone: DEV300:m39) 2009-01-20 11:52:22 +0100 od r266561 : #i94152 method <SwDoc::SetOutlineNumRule(..)> - assure that at outline list style registered text node have the correct list level set 2009-01-20 10:43:53 +0100 od r266556 : #i93399# methods <SwNumRule::SetIndent(..)> and <SwNumRule::ChangeIndent(..)> - adjust also the list tab position, if a list tab stop is applied 2009-01-16 16:26:56 +0100 od r266432 : #i59051# adjust Writer's UNO-API for drawing objects - correct conversion of "StartPosition" and "EndPosition" - conversion of "PolyPolygonBezier" 2009-01-16 16:20:49 +0100 od r266430 : #i59051# - adjust UNO-API of connector shape -- convert "PolyPolygonBezier" to correct metric -- convert "StartPosition" and "EndPosition" in set-method before applying anchor position - adjust UNO-API of measure shape -- convert "StartPosition" and "EndPosition" to correct metric 2009-01-16 15:01:21 +0100 od r266419 : #i95698# method <SwFrm::GetPrevSctLeaf(..)> - only columns as previous section leaves for tables inside sections, which are inside another table. 2009-01-14 14:34:58 +0100 od r266304 : #i96092# method <HandleResetAttrAtTxtNode::~HandleResetAttrAtTxtNode()> - set list level to outline level, if needed. 2009-01-13 17:09:43 +0100 od r266238 : #i98037# method <SwWW8ImplReader::IsObjectLayoutInTableCell(..)> - adjust evaluation of WW8 attributes 2009-01-13 11:49:48 +0100 od r266203 : #i94187# method <SwTxtFormatter::NewTabPortion(..)> - correct consideration of compatibility option TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST 2009-01-13 11:48:45 +0100 od r266202 : #i94187# method <OutWW8_SwTxtNode(..)> - set list style directly at paragraph only in position and space mode LABEL_WIDTH_AND_POSITION 2009-01-12 12:22:58 +0100 od r266143 : #i70582# method <SwFlyAtCntFrm::SetAbsPos(..)> and local method <lcl_CalcDownDist(..)> - correct determination of anchor's frame top for object positioning.
2009-02-13 10:05:35 +00:00
}
else
CWS-TOOLING: integrate CWS sw31bf04 2009-01-21 14:24:10 +0100 od r266670 : #i59051# correction of metric change for PolyPolygonBezier needed 2009-01-21 09:35:44 +0100 od r266632 : #i96062# adjustment of fix after rebasing 2009-01-21 09:34:56 +0100 od r266631 : #i94152# adjustment of fix after rebasing 2009-01-20 16:43:12 +0100 od r266596 : CWS-TOOLING: rebase CWS sw31bf04 to trunk@266428 (milestone: DEV300:m39) 2009-01-20 11:52:22 +0100 od r266561 : #i94152 method <SwDoc::SetOutlineNumRule(..)> - assure that at outline list style registered text node have the correct list level set 2009-01-20 10:43:53 +0100 od r266556 : #i93399# methods <SwNumRule::SetIndent(..)> and <SwNumRule::ChangeIndent(..)> - adjust also the list tab position, if a list tab stop is applied 2009-01-16 16:26:56 +0100 od r266432 : #i59051# adjust Writer's UNO-API for drawing objects - correct conversion of "StartPosition" and "EndPosition" - conversion of "PolyPolygonBezier" 2009-01-16 16:20:49 +0100 od r266430 : #i59051# - adjust UNO-API of connector shape -- convert "PolyPolygonBezier" to correct metric -- convert "StartPosition" and "EndPosition" in set-method before applying anchor position - adjust UNO-API of measure shape -- convert "StartPosition" and "EndPosition" to correct metric 2009-01-16 15:01:21 +0100 od r266419 : #i95698# method <SwFrm::GetPrevSctLeaf(..)> - only columns as previous section leaves for tables inside sections, which are inside another table. 2009-01-14 14:34:58 +0100 od r266304 : #i96092# method <HandleResetAttrAtTxtNode::~HandleResetAttrAtTxtNode()> - set list level to outline level, if needed. 2009-01-13 17:09:43 +0100 od r266238 : #i98037# method <SwWW8ImplReader::IsObjectLayoutInTableCell(..)> - adjust evaluation of WW8 attributes 2009-01-13 11:49:48 +0100 od r266203 : #i94187# method <SwTxtFormatter::NewTabPortion(..)> - correct consideration of compatibility option TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST 2009-01-13 11:48:45 +0100 od r266202 : #i94187# method <OutWW8_SwTxtNode(..)> - set list style directly at paragraph only in position and space mode LABEL_WIDTH_AND_POSITION 2009-01-12 12:22:58 +0100 od r266143 : #i70582# method <SwFlyAtCntFrm::SetAbsPos(..)> and local method <lcl_CalcDownDist(..)> - correct determination of anchor's frame top for object positioning.
2009-02-13 10:05:35 +00:00
{
nY = rNew.Y() - nTopForObjPos;
}
}
SwFlyFrmFmt *pFmt = (SwFlyFrmFmt*)GetFmt();
const SwFmtSurround& rSurround = pFmt->GetSurround();
const sal_Bool bWrapThrough =
rSurround.GetSurround() == SURROUND_THROUGHT;
SwTwips nBaseOfstForFly = 0;
const SwFrm* pTmpFrm = pFrm ? pFrm : pCnt;
if ( pTmpFrm->IsTxtFrm() )
nBaseOfstForFly =
((SwTxtFrm*)pTmpFrm)->GetBaseOfstForFly( !bWrapThrough );
if( bVert )
{
if( !pFrm )
nX += rNew.Y() - pCnt->Frm().Top() - nBaseOfstForFly;
else
nX = rNew.Y() - pFrm->Frm().Top() - nBaseOfstForFly;
}
else
{
if( !pFrm )
{
if ( pCnt->IsRightToLeft() )
nX += pCnt->Frm().Right() - rNew.X() - Frm().Width() +
nBaseOfstForFly;
else
nX += rNew.X() - pCnt->Frm().Left() - nBaseOfstForFly;
}
else
{
if ( pFrm->IsRightToLeft() )
nX += pFrm->Frm().Right() - rNew.X() - Frm().Width() +
nBaseOfstForFly;
else
nX = rNew.X() - pFrm->Frm().Left() - nBaseOfstForFly;
}
}
GetFmt()->GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
if( pCnt != GetAnchorFrm() || ( IsAutoPos() && pCnt->IsTxtFrm() &&
GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::HTML_MODE)) )
{
2012-02-13 11:37:18 +01:00
//Set the anchor attribute according to the new Cnt.
SwFmtAnchor aAnch( pFmt->GetAnchor() );
SwPosition *pPos = (SwPosition*)aAnch.GetCntntAnchor();
if( IsAutoPos() && pCnt->IsTxtFrm() )
{
SwCrsrMoveState eTmpState( MV_SETONLYTEXT );
Point aPt( rNew );
if( pCnt->GetCrsrOfst( pPos, aPt, &eTmpState )
&& pPos->nNode == *pCnt->GetNode() )
{
ResetLastCharRectHeight();
if( text::RelOrientation::CHAR == pFmt->GetVertOrient().GetRelationOrient() )
nY = LONG_MAX;
if( text::RelOrientation::CHAR == pFmt->GetHoriOrient().GetRelationOrient() )
nX = LONG_MAX;
}
else
{
pPos->nNode = *pCnt->GetNode();
pPos->nContent.Assign( pCnt->GetNode(), 0 );
}
}
else
{
pPos->nNode = *pCnt->GetNode();
pPos->nContent.Assign( pCnt->GetNode(), 0 );
}
// handle change of anchor node:
// if count of the anchor frame also change, the fly frames have to be
// re-created. Thus, delete all fly frames except the <this> before the
// anchor attribute is change and re-create them afterwards.
{
SwHandleAnchorNodeChg aHandleAnchorNodeChg( *pFmt, aAnch, this );
pFmt->GetDoc()->SetAttr( aAnch, *pFmt );
}
}
2011-02-13 18:00:46 +01:00
// #i28701# - use new method <GetPageFrm()>
else if ( pTmpPage && pTmpPage != GetPageFrm() )
GetPageFrm()->MoveFly( this, pTmpPage );
const Point aRelPos = bVert ? Point( -nY, nX ) : Point( nX, nY );
2009-03-04 16:19:59 +00:00
ChgRelPos( aRelPos );
GetFmt()->GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
if ( pOldPage != FindPageFrm() )
::Notify_Background( GetVirtDrawObj(), pOldPage, aOld, PREP_FLY_LEAVE,
sal_False );
}
/** method to assure that anchored object is registered at the correct
page frame
2000-09-18 23:08:29 +00:00
2011-02-13 18:00:46 +01:00
#i28701#
takes over functionality of deleted method <SwFlyAtCntFrm::AssertPage()>
*/
void SwFlyAtCntFrm::RegisterAtCorrectPage()
{
SwPageFrm* pPageFrm( 0L );
if ( GetVertPosOrientFrm() )
{
pPageFrm = const_cast<SwPageFrm*>(GetVertPosOrientFrm()->FindPageFrm());
}
if ( pPageFrm && GetPageFrm() != pPageFrm )
{
if ( GetPageFrm() )
GetPageFrm()->MoveFly( this, pPageFrm );
else
pPageFrm->AppendFlyToPage( this );
}
2000-09-18 23:08:29 +00:00
}
2011-02-13 18:00:46 +01:00
// #i26791#
//void SwFlyAtCntFrm::MakeFlyPos()
void SwFlyAtCntFrm::MakeObjPos()
2000-09-18 23:08:29 +00:00
{
// if fly frame position is valid, nothing is to do. Thus, return
if ( bValidPos )
{
return;
}
2011-02-13 18:00:46 +01:00
// #i26791# - validate position flag here.
bValidPos = sal_True;
2011-02-13 18:00:46 +01:00
// #i35911# - no calculation of new position, if
// anchored object is marked that it clears its environment and its
// environment is already cleared.
2011-02-13 18:00:46 +01:00
// before checking for cleared environment
// check, if member <mpVertPosOrientFrm> is set.
if ( GetVertPosOrientFrm() &&
ClearedEnvironment() && HasClearedEnvironment() )
{
return;
}
2011-02-13 18:00:46 +01:00
// use new class to position object
objectpositioning::SwToCntntAnchoredObjectPosition
aObjPositioning( *GetVirtDrawObj() );
aObjPositioning.CalcPosition();
SetVertPosOrientFrm ( aObjPositioning.GetVertPosOrientFrm() );
2000-09-18 23:08:29 +00:00
}
2011-02-13 18:00:46 +01:00
// #i28701#
bool SwFlyAtCntFrm::_InvalidationAllowed( const InvalidationType _nInvalid ) const
{
bool bAllowed( SwFlyFreeFrm::_InvalidationAllowed( _nInvalid ) );
// forbiddance of base instance can't be over ruled.
if ( bAllowed )
{
if ( _nInvalid == INVALID_POS ||
_nInvalid == INVALID_ALL )
{
bAllowed = InvalidationOfPosAllowed();
}
}
return bAllowed;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */