Files
libreoffice/sw/source/core/frmedt/feshview.cxx

3119 lines
108 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 "hintids.hxx"
#include <svx/sdrobjectfilter.hxx>
#include <svx/svditer.hxx>
#include <svx/svdobj.hxx>
2000-09-18 23:08:29 +00:00
#include <svx/svdouno.hxx>
#include <svx/svdoole2.hxx>
#include <svx/svdogrp.hxx>
#include <svx/svdocirc.hxx>
#include <svx/svdopath.hxx>
#include <svx/sxciaitm.hxx>
2000-09-18 23:08:29 +00:00
#include <svx/xfillit.hxx>
#include <svx/svdocapt.hxx>
#include <sfx2/app.hxx>
#include <editeng/boxitem.hxx>
#include <editeng/opaqitem.hxx>
#include <editeng/protitem.hxx>
2000-09-18 23:08:29 +00:00
#include <svx/svdpage.hxx>
#include <svx/svdpagv.hxx>
#include <IDocumentSettingAccess.hxx>
#include <cmdid.h>
#include <poolfmt.hrc>
2000-09-18 23:08:29 +00:00
#include <frmfmt.hxx>
#include <frmatr.hxx>
#include <fmtfsize.hxx>
#include <fmtanchr.hxx>
#include <fmtornt.hxx>
#include <fmtsrnd.hxx>
#include <fmtcntnt.hxx>
#include <fmtflcnt.hxx>
#include <fmtcnct.hxx>
#include <docary.hxx>
#include <tblsel.hxx>
#include <swtable.hxx>
#include <flyfrms.hxx>
2000-09-18 23:08:29 +00:00
#include "fesh.hxx"
#include "rootfrm.hxx"
#include "pagefrm.hxx"
#include "sectfrm.hxx"
#include "doc.hxx"
#include <IDocumentUndoRedo.hxx>
2000-09-18 23:08:29 +00:00
#include "dview.hxx"
#include "dflyobj.hxx"
#include "dcontact.hxx"
#include "viewimp.hxx"
#include "flyfrm.hxx"
#include "pam.hxx"
#include "ndole.hxx"
#include "ndgrf.hxx"
#include "ndtxt.hxx"
#include "viewopt.hxx"
2000-09-18 23:08:29 +00:00
#include "swundo.hxx"
#include "notxtfrm.hxx"
#include "txtfrm.hxx"
#include "txatbase.hxx"
#include "mdiexp.hxx"
#include <sortedobjs.hxx>
#include <HandleAnchorNodeChg.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
#include <switerator.hxx>
#include <com/sun/star/embed/EmbedMisc.hpp>
#include <com/sun/star/embed/Aspects.hpp>
2000-09-18 23:08:29 +00:00
#define SCROLLVAL 75
using namespace com::sun::star;
// tolerance limit of Drawing-SS
#define MINMOVE ((sal_uInt16)GetOut()->PixelToLogic(Size(Imp()->GetDrawView()->GetMarkHdlSizePixel()/2,0)).Width())
2000-09-18 23:08:29 +00:00
SwFlyFrm *GetFlyFromMarked( const SdrMarkList *pLst, SwViewShell *pSh )
2000-09-18 23:08:29 +00:00
{
if ( !pLst )
pLst = pSh->HasDrawView() ? &pSh->Imp()->GetDrawView()->GetMarkedObjectList():0;
2000-09-18 23:08:29 +00:00
if ( pLst && pLst->GetMarkCount() == 1 )
{
SdrObject *pO = pLst->GetMark( 0 )->GetMarkedSdrObj();
if ( pO && pO->ISA(SwVirtFlyDrawObj) )
2000-09-18 23:08:29 +00:00
return ((SwVirtFlyDrawObj*)pO)->GetFlyFrm();
}
return 0;
}
static void lcl_GrabCursor( SwFEShell* pSh, SwFlyFrm* pOldSelFly)
2000-09-18 23:08:29 +00:00
{
const SwFrmFmt *pFlyFmt = pSh->SelFlyGrabCrsr();
if( pFlyFmt && !pSh->ActionPend() &&
(!pOldSelFly || pOldSelFly->GetFmt() != pFlyFmt) )
{
// now call set macro if applicable
2000-09-18 23:08:29 +00:00
pSh->GetFlyMacroLnk().Call( (void*)pFlyFmt );
extern bool bNoInterrupt; // in swapp.cxx
// if a dialog was started inside a macro, then
// MouseButtonUp arrives at macro and not to us. Therefore
// flag is always set here and will never be switched to
// respective Shell !!!!!!!
bNoInterrupt = false;
2000-09-18 23:08:29 +00:00
}
else if( !pFlyFmt || RES_DRAWFRMFMT == pFlyFmt->Which() )
{
2011-02-08 08:51:51 +01:00
// --> assure consistent cursor
pSh->KillPams();
pSh->ClearMark();
pSh->SetCrsr( pSh->Imp()->GetDrawView()->GetAllMarkedRect().TopLeft(), sal_True);
}
2000-09-18 23:08:29 +00:00
}
/*************************************************************************
|*
|* SwFEShell::SelectObj()
*************************************************************************/
sal_Bool SwFEShell::SelectObj( const Point& rPt, sal_uInt8 nFlag, SdrObject *pObj )
2000-09-18 23:08:29 +00:00
{
SwDrawView *pDView = Imp()->GetDrawView();
if(!pDView)
return sal_False;
2000-09-18 23:08:29 +00:00
SET_CURR_SHELL( this );
StartAction(); // action is necessary to assure only one AttrChgdNotify
// (e.g. due to Unmark->MarkListHasChgd) arrives
2000-09-18 23:08:29 +00:00
const SdrMarkList &rMrkList = pDView->GetMarkedObjectList();
const bool bHadSelection = rMrkList.GetMarkCount();
const sal_Bool bAddSelect = 0 != (SW_ADD_SELECT & nFlag);
const sal_Bool bEnterGroup = 0 != (SW_ENTER_GROUP & nFlag);
2000-09-18 23:08:29 +00:00
SwFlyFrm* pOldSelFly = 0;
const Point aOldPos( pDView->GetAllMarkedRect().TopLeft() );
if( bHadSelection )
{
// call Unmark when !bAddSelect or if fly was selected
bool bUnmark = !bAddSelect;
2000-09-18 23:08:29 +00:00
if ( rMrkList.GetMarkCount() == 1 )
{
// if fly was selected, deselect it first
2000-09-18 23:08:29 +00:00
pOldSelFly = ::GetFlyFromMarked( &rMrkList, this );
if ( pOldSelFly )
{
const sal_uInt16 nType = GetCntType();
2002-04-09 13:21:41 +00:00
if( nType != CNT_TXT || (SW_LEAVE_FRAME & nFlag) ||
2000-09-18 23:08:29 +00:00
( pOldSelFly->GetFmt()->GetProtect().IsCntntProtected()
&& !IsReadOnlyAvailable() ))
{
// If a fly is deselected, which contains graphic, OLE or
// otherwise, the cursor should be removed from it.
// Similar if a fly with protected content is deselected.
// For simplicity we put the cursor next to the upper-left
// corner.
2000-09-18 23:08:29 +00:00
Point aPt( pOldSelFly->Frm().Pos() );
aPt.setX(aPt.getX() - 1);
bool bUnLockView = !IsViewLocked();
LockView( sal_True );
SetCrsr( aPt, sal_True );
2000-09-18 23:08:29 +00:00
if( bUnLockView )
LockView( sal_False );
2000-09-18 23:08:29 +00:00
}
if ( nType & CNT_GRF &&
((SwNoTxtFrm*)pOldSelFly->Lower())->HasAnimation() )
{
GetWin()->Invalidate( pOldSelFly->Frm().SVRect() );
}
bUnmark = true;
2000-09-18 23:08:29 +00:00
}
}
if ( bUnmark )
pDView->UnmarkAll();
}
else
{
KillPams();
ClearMark();
}
if ( pObj )
2002-05-15 12:22:47 +00:00
{
OSL_ENSURE( !bEnterGroup, "SW_ENTER_GROUP is not supported" );
2002-05-15 12:22:47 +00:00
pDView->MarkObj( pObj, Imp()->GetPageView() );
}
2000-09-18 23:08:29 +00:00
else
2002-05-15 12:22:47 +00:00
{
2000-09-18 23:08:29 +00:00
pDView->MarkObj( rPt, MINMOVE, bAddSelect, bEnterGroup );
2002-05-15 12:22:47 +00:00
}
2000-09-18 23:08:29 +00:00
const sal_Bool bRet = 0 != rMrkList.GetMarkCount();
2000-09-18 23:08:29 +00:00
if ( rMrkList.GetMarkCount() > 1 )
{
// It sucks if Drawing objects were selected and now
// additionally a fly is selected.
for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i )
2000-09-18 23:08:29 +00:00
{
SdrObject *pTmpObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
sal_Bool bForget = pTmpObj->ISA(SwVirtFlyDrawObj);
2000-09-18 23:08:29 +00:00
if( bForget )
{
pDView->UnmarkAll();
pDView->MarkObj( pTmpObj, Imp()->GetPageView(), bAddSelect, bEnterGroup );
2000-09-18 23:08:29 +00:00
break;
}
}
}
if ( bRet )
{
::lcl_GrabCursor(this, pOldSelFly);
if ( GetCntType() & CNT_GRF )
{
const SwFlyFrm *pTmp = GetFlyFromMarked( &rMrkList, this );
OSL_ENSURE( pTmp, "Graphic without Fly" );
2000-09-18 23:08:29 +00:00
if ( ((SwNoTxtFrm*)pTmp->Lower())->HasAnimation() )
((SwNoTxtFrm*)pTmp->Lower())->StopAnimation( GetOut() );
}
}
else if ( !pOldSelFly && bHadSelection )
SetCrsr( aOldPos, sal_True);
2000-09-18 23:08:29 +00:00
if( bRet || !bHadSelection )
CallChgLnk();
// update der Statuszeile
::FrameNotify( this, bRet ? FLY_DRAG_START : FLY_DRAG_END );
EndAction();
return bRet;
}
/*************************************************************************
|*
|* sal_Bool SwFEShell::MoveAnchor( sal_uInt16 nDir )
|*
|* Description: MoveAnchor( nDir ) looked for an another Anchor for
|* the selected drawing object (or fly frame) in the given direction.
|* An object "as character" doesn't moves anyway.
|* A page bounded object could move to the previous/next page with up/down,
|* an object bounded "at paragraph" moves to the previous/next paragraph, too.
|* An object bounded "at character" moves to the previous/next paragraph
|* with up/down and to the previous/next character with left/right.
|* If the anchor for at paragraph/character bounded objects has vertical or
|* right_to_left text direction, the directions for up/down/left/right will
|* interpreted accordingly.
|* An object bounded "at fly" takes the center of the actual anchor and looks
|* for the nearest fly frame in the given direction.
|*
*************************************************************************/
#define LESS_X( aPt1, aPt2, bOld ) ( aPt1.getX() < aPt2.getX() || \
( aPt1.getX() == aPt2.getX() && ( aPt1.getY() < aPt2.getY() || \
( aPt1.getY() == aPt2.getY() && bOld ) ) ) )
#define LESS_Y( aPt1, aPt2, bOld ) ( aPt1.getY() < aPt2.getY() || \
( aPt1.getY() == aPt2.getY() && ( aPt1.getX() < aPt2.getX() || \
( aPt1.getX() == aPt2.getX() && bOld ) ) ) )
2002-05-28 13:05:17 +00:00
sal_Bool SwFEShell::MoveAnchor( sal_uInt16 nDir )
2002-05-28 13:05:17 +00:00
{
const SdrMarkList* pMrkList;
if( !Imp()->GetDrawView() ||
0 == (pMrkList = &Imp()->GetDrawView()->GetMarkedObjectList()) ||
2002-05-28 13:05:17 +00:00
1 != pMrkList->GetMarkCount())
return sal_False;
SwFrm* pOld;
SwFlyFrm* pFly = NULL;
SdrObject *pObj = pMrkList->GetMark( 0 )->GetMarkedSdrObj();
if( pObj->ISA(SwVirtFlyDrawObj) )
{
pFly = ((SwVirtFlyDrawObj*)pObj)->GetFlyFrm();
pOld = pFly->AnchorFrm();
}
2002-05-28 13:05:17 +00:00
else
pOld = ((SwDrawContact*)GetUserCall(pObj))->GetAnchorFrm( pObj );
sal_Bool bRet = sal_False;
2002-05-28 13:05:17 +00:00
if( pOld )
{
SwFrm* pNew = pOld;
// #i28701#
SwAnchoredObject* pAnchoredObj = ::GetUserCall( pObj )->GetAnchoredObj( pObj );
SwFrmFmt& rFmt = pAnchoredObj->GetFrmFmt();
SwFmtAnchor aAnch( rFmt.GetAnchor() );
RndStdIds nAnchorId = aAnch.GetAnchorId();
if ( FLY_AS_CHAR == nAnchorId )
return sal_False;
if( pOld->IsVertical() )
{
if( pOld->IsTxtFrm() )
{
switch( nDir ) {
case SW_MOVE_UP: nDir = SW_MOVE_LEFT; break;
case SW_MOVE_DOWN: nDir = SW_MOVE_RIGHT; break;
case SW_MOVE_LEFT: nDir = SW_MOVE_DOWN; break;
case SW_MOVE_RIGHT: nDir = SW_MOVE_UP; break;
}
if( pOld->IsRightToLeft() )
{
if( nDir == SW_MOVE_LEFT )
nDir = SW_MOVE_RIGHT;
else if( nDir == SW_MOVE_RIGHT )
nDir = SW_MOVE_LEFT;
}
}
}
switch ( nAnchorId ) {
case FLY_AT_PAGE:
{
OSL_ENSURE( pOld->IsPageFrm(), "Wrong anchor, page expected." );
if( SW_MOVE_UP == nDir )
pNew = pOld->GetPrev();
else if( SW_MOVE_DOWN == nDir )
pNew = pOld->GetNext();
if( pNew && pNew != pOld )
{
aAnch.SetPageNum( ((SwPageFrm*)pNew)->GetPhyPageNum() );
bRet = sal_True;
}
break;
}
case FLY_AT_CHAR:
{
OSL_ENSURE( pOld->IsCntntFrm(), "Wrong anchor, page expected." );
if( SW_MOVE_LEFT == nDir || SW_MOVE_RIGHT == nDir )
{
SwPosition *pPos = (SwPosition*)aAnch.GetCntntAnchor();
SwTxtNode* pTxtNd = ((SwTxtFrm*)pOld)->GetTxtNode();
const sal_Int32 nAct = pPos->nContent.GetIndex();
if( SW_MOVE_LEFT == nDir )
{
bRet = sal_True;
if( nAct )
{
pPos->nContent.Assign( pTxtNd, nAct-1 );
}
else
nDir = SW_MOVE_UP;
}
else
{
const sal_Int32 nMax =
static_cast<SwTxtFrm*>(pOld)->GetTxtNode()->GetTxt().getLength();
if( nAct < nMax )
{
bRet = sal_True;
pPos->nContent.Assign( pTxtNd, nAct+1 );
}
else
nDir = SW_MOVE_DOWN;
}
}
} // no break!
case FLY_AT_PARA:
{
OSL_ENSURE( pOld->IsCntntFrm(), "Wrong anchor, page expected." );
if( SW_MOVE_UP == nDir )
pNew = pOld->FindPrev();
else if( SW_MOVE_DOWN == nDir )
pNew = pOld->FindNext();
if( pNew && pNew != pOld && pNew->IsCntntFrm() )
{
SwPosition *pPos = (SwPosition*)aAnch.GetCntntAnchor();
SwTxtNode* pTxtNd = ((SwTxtFrm*)pNew)->GetTxtNode();
pPos->nNode = *pTxtNd;
sal_Int32 nTmp = 0;
if( bRet )
{
nTmp = static_cast<SwTxtFrm*>(pNew)->GetTxtNode()->GetTxt().getLength();
if( nTmp )
--nTmp;
}
pPos->nContent.Assign( pTxtNd, nTmp );
bRet = sal_True;
}
else if( SW_MOVE_UP == nDir || SW_MOVE_DOWN == nDir )
bRet = sal_False;
break;
}
case FLY_AT_FLY:
{
OSL_ENSURE( pOld->IsFlyFrm(), "Wrong anchor, fly frame expected.");
SwPageFrm* pPage = pOld->FindPageFrm();
OSL_ENSURE( pPage, "Where's my page?" );
SwFlyFrm* pNewFly = NULL;
if( pPage->GetSortedObjs() )
{
int i;
bool bOld = false;
Point aCenter( pOld->Frm().Left() + pOld->Frm().Width()/2,
pOld->Frm().Top() + pOld->Frm().Height()/2 );
Point aBest;
for( i = 0; (sal_uInt16)i<pPage->GetSortedObjs()->Count(); ++i )
{
SwAnchoredObject* pAnchObj =
(*pPage->GetSortedObjs())[i];
if( pAnchObj->ISA(SwFlyFrm) )
{
SwFlyFrm* pTmp = static_cast<SwFlyFrm*>(pAnchObj);
if( pTmp == pOld )
bOld = true;
else
{
const SwFlyFrm* pCheck = pFly ? pTmp : 0;
while( pCheck )
{
if( pCheck == pFly )
break;
const SwFrm *pNxt = pCheck->GetAnchorFrm();
pCheck = pNxt ? pNxt->FindFlyFrm() : NULL;
}
if( pCheck || pTmp->IsProtected() )
continue;
Point aNew( pTmp->Frm().Left() +
pTmp->Frm().Width()/2,
pTmp->Frm().Top() +
pTmp->Frm().Height()/2 );
bool bAccept = false;
switch( nDir ) {
case SW_MOVE_RIGHT:
{
bAccept = LESS_X( aCenter, aNew, bOld )
&& ( !pNewFly ||
LESS_X( aNew, aBest, false ) );
break;
}
case SW_MOVE_LEFT:
{
bAccept = LESS_X( aNew, aCenter, !bOld )
&& ( !pNewFly ||
LESS_X( aBest, aNew, true ) );
break;
}
case SW_MOVE_UP:
{
bAccept = LESS_Y( aNew, aCenter, !bOld )
&& ( !pNewFly ||
LESS_Y( aBest, aNew, true ) );
break;
}
case SW_MOVE_DOWN:
{
bAccept = LESS_Y( aCenter, aNew, bOld )
&& ( !pNewFly ||
LESS_Y( aNew, aBest, false ) );
break;
}
}
if( bAccept )
{
pNewFly = pTmp;
aBest = aNew;
}
}
}
}
}
if( pNewFly )
{
SwPosition aPos( *pNewFly->GetFmt()->
GetCntnt().GetCntntIdx());
aAnch.SetAnchor( &aPos );
bRet = sal_True;
}
break;
}
default: break;
}
if( bRet )
{
StartAllAction();
2011-02-08 08:51:51 +01:00
// --> 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* pHandleAnchorNodeChg( 0L );
SwFlyFrmFmt* pFlyFrmFmt( dynamic_cast<SwFlyFrmFmt*>(&rFmt) );
if ( pFlyFrmFmt )
{
pHandleAnchorNodeChg =
new SwHandleAnchorNodeChg( *pFlyFrmFmt, aAnch );
}
rFmt.GetDoc()->SetAttr( aAnch, rFmt );
delete pHandleAnchorNodeChg;
}
// #i28701# - no call of method
// <CheckCharRectAndTopOfLine()> for to-character anchored
// Writer fly frame needed. This method call can cause a
// format of the anchor frame, which is no longer intended.
// Instead clear the anchor character rectangle and
// the top of line values for all to-character anchored objects.
pAnchoredObj->ClearCharRectAndTopOfLine();
EndAllAction();
2002-05-28 13:05:17 +00:00
}
}
return bRet;
2002-05-28 13:05:17 +00:00
}
2000-09-18 23:08:29 +00:00
/*************************************************************************
|*
|* SwFEShell::GetSelFrmType()
|*
*************************************************************************/
const SdrMarkList* SwFEShell::_GetMarkList() const
{
const SdrMarkList* pMarkList = NULL;
if( Imp()->GetDrawView() != NULL )
pMarkList = &Imp()->GetDrawView()->GetMarkedObjectList();
return pMarkList;
}
sal_uInt16 SwFEShell::GetSelFrmType() const
2000-09-18 23:08:29 +00:00
{
sal_uInt16 eType;
2000-09-18 23:08:29 +00:00
// get marked frame list, and check if anything is selected
const SdrMarkList* pMarkList = _GetMarkList();
if( pMarkList == NULL || pMarkList->GetMarkCount() == 0 )
eType = FRMTYPE_NONE;
else
{
// obtain marked item as fly frame; if no fly frame, it must
// be a draw object
const SwFlyFrm* pFly = ::GetFlyFromMarked(pMarkList, (SwViewShell*)this);
if ( pFly != NULL )
{
if( pFly->IsFlyLayFrm() )
eType = FRMTYPE_FLY_FREE;
else if( pFly->IsFlyAtCntFrm() )
eType = FRMTYPE_FLY_ATCNT;
else
{
OSL_ENSURE( pFly->IsFlyInCntFrm(), "New frametype?" );
eType = FRMTYPE_FLY_INCNT;
}
}
else
eType = FRMTYPE_DRAWOBJ;
}
return eType;
}
2011-02-08 08:51:51 +01:00
// does the draw selection contain a control?
bool SwFEShell::IsSelContainsControl() const
{
bool bRet = false;
2000-09-18 23:08:29 +00:00
// basically, copy the mechanism from GetSelFrmType(), but call
// CheckControl... if you get a drawing object
const SdrMarkList* pMarkList = _GetMarkList();
if( pMarkList != NULL && pMarkList->GetMarkCount() == 1 )
2000-09-18 23:08:29 +00:00
{
// if we have one marked object, get the SdrObject and check
// whether it contains a control
const SdrObject* pSdrObject = pMarkList->GetMark( 0 )->GetMarkedSdrObj();
bRet = pSdrObject && ::CheckControlLayer( pSdrObject );
2000-09-18 23:08:29 +00:00
}
return bRet;
2000-09-18 23:08:29 +00:00
}
/*************************************************************************
|*
|* SwFEShell::Scroll()
|*
*************************************************************************/
void SwFEShell::ScrollTo( const Point &rPt )
2000-09-18 23:08:29 +00:00
{
const SwRect aRect( rPt, rPt );
if ( IsScrollMDI( this, aRect ) &&
(!Imp()->GetDrawView()->GetMarkedObjectList().GetMarkCount() ||
2000-09-18 23:08:29 +00:00
Imp()->IsDragPossible( rPt )) )
{
ScrollMDI( this, aRect, SCROLLVAL, SCROLLVAL );
}
}
/*************************************************************************
|*
|* SwFEShell::SetDragMode()
|*
*************************************************************************/
void SwFEShell::SetDragMode( sal_uInt16 eDragMode )
2000-09-18 23:08:29 +00:00
{
if ( Imp()->HasDrawView() )
Imp()->GetDrawView()->SetDragMode( (SdrDragMode)eDragMode );
}
/*************************************************************************
|*
|* SwFEShell::BeginDrag()
|*
*************************************************************************/
long SwFEShell::BeginDrag( const Point* pPt, sal_Bool )
2000-09-18 23:08:29 +00:00
{
SdrView *pView = Imp()->GetDrawView();
if ( pView && pView->AreObjectsMarked() )
2000-09-18 23:08:29 +00:00
{
delete pChainFrom; delete pChainTo; pChainFrom = pChainTo = 0;
SdrHdl* pHdl = pView->PickHandle( *pPt );
2010-11-22 10:32:27 +00:00
pView->BegDragObj( *pPt, 0, pHdl );
2000-09-18 23:08:29 +00:00
::FrameNotify( this, FLY_DRAG );
return 1;
}
return 0;
}
/*************************************************************************
|*
|* SwFEShell::Drag()
|*
*************************************************************************/
long SwFEShell::Drag( const Point *pPt, sal_Bool )
2000-09-18 23:08:29 +00:00
{
OSL_ENSURE( Imp()->HasDrawView(), "Drag without DrawView?" );
2000-09-18 23:08:29 +00:00
if ( Imp()->GetDrawView()->IsDragObj() )
{
ScrollTo( *pPt );
2000-09-18 23:08:29 +00:00
Imp()->GetDrawView()->MovDragObj( *pPt );
Imp()->GetDrawView()->ShowDragAnchor();
::FrameNotify( this, FLY_DRAG );
return 1;
}
return 0;
}
/*************************************************************************
|*
|* SwFEShell::EndDrag()
|*
*************************************************************************/
long SwFEShell::EndDrag( const Point *, sal_Bool )
2000-09-18 23:08:29 +00:00
{
OSL_ENSURE( Imp()->HasDrawView(), "EndDrag without DrawView?" );
2000-09-18 23:08:29 +00:00
SdrView *pView = Imp()->GetDrawView();
if ( pView->IsDragObj() )
{
// Setup Start-/EndActions only to the SwViewShell
SwViewShell *pSh = this;
2000-09-18 23:08:29 +00:00
do {
pSh->StartAction();
} while ( this != (pSh = (SwViewShell*)pSh->GetNext()) );
2000-09-18 23:08:29 +00:00
StartUndo( UNDO_START );
// #50778# Bug during dragging: In StartAction a HideShowXor is called.
// In EndDragObj() this is reversed, for no reason and even wrong.
// To restore consistancy we should bring up the Xor again.
2002-01-29 09:41:09 +00:00
// Reanimation from the hack #50778 to fix bug #97057
// May be not the best solution, but the one with lowest risc at the moment.
// pView->ShowShownXor( GetOut() );
2002-01-29 09:41:09 +00:00
2000-09-18 23:08:29 +00:00
pView->EndDragObj();
// DrawUndo on to flyframes are not stored
// The flys change the flag.
GetDoc()->GetIDocumentUndoRedo().DoDrawUndo(true);
ChgAnchor( 0, true );
2000-09-18 23:08:29 +00:00
EndUndo( UNDO_END );
do {
pSh->EndAction();
if( pSh->IsA( TYPE( SwCrsrShell ) ) )
((SwCrsrShell*)pSh)->CallChgLnk();
} while ( this != (pSh = (SwViewShell*)pSh->GetNext()) );
2000-09-18 23:08:29 +00:00
GetDoc()->SetModified();
::FrameNotify( this, FLY_DRAG );
return 1;
}
return 0;
}
/*************************************************************************
|*
|* SwFEShell::BreakDrag()
|*
*************************************************************************/
void SwFEShell::BreakDrag()
{
OSL_ENSURE( Imp()->HasDrawView(), "BreakDrag without DrawView?" );
2000-09-18 23:08:29 +00:00
if ( Imp()->GetDrawView()->IsDragObj() )
Imp()->GetDrawView()->BrkDragObj();
SetChainMarker();
}
/*************************************************************************
|*
|* SwFEShell::SelFlyGrabCrsr()
|*
|* Description If a fly is selected, pulls the crsr in
|* the first CntntFrm
2000-09-18 23:08:29 +00:00
*************************************************************************/
const SwFrmFmt* SwFEShell::SelFlyGrabCrsr()
{
if ( Imp()->HasDrawView() )
{
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
2000-09-18 23:08:29 +00:00
SwFlyFrm *pFly = ::GetFlyFromMarked( &rMrkList, this );
if( pFly )
{
SwCntntFrm *pCFrm = pFly->ContainsCntnt();
if ( pCFrm )
{
SwCntntNode *pCNode = pCFrm->GetNode();
2011-02-08 08:51:51 +01:00
// --> assure, that the cursor is consistent.
KillPams();
ClearMark();
2000-09-18 23:08:29 +00:00
SwPaM *pCrsr = GetCrsr();
pCrsr->GetPoint()->nNode = *pCNode;
pCrsr->GetPoint()->nContent.Assign( pCNode, 0 );
SwRect& rChrRect = (SwRect&)GetCharRect();
rChrRect = pFly->Prt();
rChrRect.Pos() += pFly->Frm().Pos();
GetCrsrDocPos() = rChrRect.Pos();
}
return pFly->GetFmt();
}
}
return 0;
}
/*************************************************************************
|*
|* SwFEShell::SelectionToTop(), SelectionToBottom()
|*
|* Description Selection to above/below (Z-Order)
2000-09-18 23:08:29 +00:00
|*
*************************************************************************/
static void lcl_NotifyNeighbours( const SdrMarkList *pLst )
2000-09-18 23:08:29 +00:00
{
// Rules for evasion have changed.
// 1. The environment of the fly and everything inside should be notified
// 2. The content of the frame itself has to be notified
// 3. Frames displaced by the frame have to be notified
// 4. Also Drawing objects can displace frames
for( sal_uInt16 j = 0; j < pLst->GetMarkCount(); ++j )
2000-09-18 23:08:29 +00:00
{
SwPageFrm *pPage;
bool bCheckNeighbours = false;
sal_Int16 aHori = text::HoriOrientation::NONE;
2000-09-18 23:08:29 +00:00
SwRect aRect;
SdrObject *pO = pLst->GetMark( 0 )->GetMarkedSdrObj();
if ( pO->ISA(SwVirtFlyDrawObj) )
2000-09-18 23:08:29 +00:00
{
SwFlyFrm *pFly = ((SwVirtFlyDrawObj*)pO)->GetFlyFrm();
const SwFmtHoriOrient &rHori = pFly->GetFmt()->GetHoriOrient();
aHori = rHori.GetHoriOrient();
if( text::HoriOrientation::NONE != aHori && text::HoriOrientation::CENTER != aHori &&
2000-09-18 23:08:29 +00:00
pFly->IsFlyAtCntFrm() )
{
bCheckNeighbours = true;
2000-09-18 23:08:29 +00:00
pFly->InvalidatePos();
pFly->Frm().Pos().Y() += 1;
}
pPage = pFly->FindPageFrm();
aRect = pFly->Frm();
}
else
{
SwFrm* pAnch = ( (SwDrawContact*)GetUserCall(pO) )->GetAnchorFrm( pO );
2000-09-18 23:08:29 +00:00
if( !pAnch )
continue;
pPage = pAnch->FindPageFrm();
// #i68520# - naming changed
aRect = GetBoundRectOfAnchoredObj( pO );
2000-09-18 23:08:29 +00:00
}
sal_uInt32 nCount = pPage->GetSortedObjs() ? pPage->GetSortedObjs()->Count() : 0;
for ( sal_uInt32 i = 0; i < nCount; ++i )
2000-09-18 23:08:29 +00:00
{
SwAnchoredObject* pAnchoredObj = (*pPage->GetSortedObjs())[i];
if ( !pAnchoredObj->ISA(SwFlyFrm) )
2000-09-18 23:08:29 +00:00
continue;
SwFlyFrm* pAct = static_cast<SwFlyFrm*>(pAnchoredObj);
2000-09-18 23:08:29 +00:00
SwRect aTmpCalcPnt( pAct->Prt() );
aTmpCalcPnt += pAct->Frm().Pos();
if ( aRect.IsOver( aTmpCalcPnt ) )
{
SwCntntFrm *pCnt = pAct->ContainsCntnt();
while ( pCnt )
{
aTmpCalcPnt = pCnt->Prt();
aTmpCalcPnt += pCnt->Frm().Pos();
if ( aRect.IsOver( aTmpCalcPnt ) )
((SwFrm*)pCnt)->Prepare( PREP_FLY_ATTR_CHG );
pCnt = pCnt->GetNextCntntFrm();
}
}
if ( bCheckNeighbours && pAct->IsFlyAtCntFrm() )
{
const SwFmtHoriOrient &rH = pAct->GetFmt()->GetHoriOrient();
if ( rH.GetHoriOrient() == aHori &&
pAct->Frm().Top() <= aRect.Bottom() &&
pAct->Frm().Bottom() >= aRect.Top() )
{
pAct->InvalidatePos();
pAct->Frm().Pos().Y() += 1;
}
}
}
}
}
void SwFEShell::SelectionToTop( sal_Bool bTop )
2000-09-18 23:08:29 +00:00
{
OSL_ENSURE( Imp()->HasDrawView(), "SelectionToTop without DrawView?" );
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
OSL_ENSURE( rMrkList.GetMarkCount(), "No object selected." );
2000-09-18 23:08:29 +00:00
SwFlyFrm *pFly = ::GetFlyFromMarked( &rMrkList, this );
if ( pFly && pFly->IsFlyInCntFrm() )
return;
StartAllAction();
if ( bTop )
Imp()->GetDrawView()->PutMarkedToTop();
else
Imp()->GetDrawView()->MovMarkedToTop();
::lcl_NotifyNeighbours( &rMrkList );
GetDoc()->SetModified();
EndAllAction();
}
void SwFEShell::SelectionToBottom( sal_Bool bBottom )
2000-09-18 23:08:29 +00:00
{
OSL_ENSURE( Imp()->HasDrawView(), "SelectionToBottom without DrawView?" );
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
OSL_ENSURE( rMrkList.GetMarkCount(), "No object selected." );
2000-09-18 23:08:29 +00:00
SwFlyFrm *pFly = ::GetFlyFromMarked( &rMrkList, this );
if ( pFly && pFly->IsFlyInCntFrm() )
return;
StartAllAction();
if ( bBottom )
Imp()->GetDrawView()->PutMarkedToBtm();
else
Imp()->GetDrawView()->MovMarkedToBtm();
::lcl_NotifyNeighbours( &rMrkList );
GetDoc()->SetModified();
EndAllAction();
}
/*************************************************************************
|*
|* SwFEShell::GetLayerId()
|*
|* Description Object above/below the document?
|* 2 Controls, 1 Heaven, 0 Hell, -1 Ambiguous
2000-09-18 23:08:29 +00:00
*************************************************************************/
short SwFEShell::GetLayerId() const
{
short nRet = SHRT_MAX;
if ( Imp()->HasDrawView() )
{
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i )
2000-09-18 23:08:29 +00:00
{
const SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
if( !pObj )
continue;
2000-09-18 23:08:29 +00:00
if ( nRet == SHRT_MAX )
nRet = pObj->GetLayer();
else if ( nRet != pObj->GetLayer() )
{
nRet = -1;
break;
}
}
}
if ( nRet == SHRT_MAX )
nRet = -1;
return nRet;
}
/*************************************************************************
|*
|* SwFEShell::SelectionToHeaven(), SelectionToHell()
|*
|* Description Object above/below the document
2000-09-18 23:08:29 +00:00
|*
*************************************************************************/
// Note: only visible objects can be marked. Thus, objects with invisible
// layer IDs have not to be considered.
// If <SwFEShell> exists, layout exists!!
void SwFEShell::ChangeOpaque( SdrLayerID nLayerId )
2000-09-18 23:08:29 +00:00
{
if ( Imp()->HasDrawView() )
{
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
const IDocumentDrawModelAccess* pIDDMA = getIDocumentDrawModelAccess();
2011-02-08 08:51:51 +01:00
// correct type of <nControls>
for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i )
2000-09-18 23:08:29 +00:00
{
SdrObject* pObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
if( !pObj )
continue;
// or group objects containing controls.
2011-02-08 08:51:51 +01:00
// --> #i113730#
// consider that a member of a drawing group has been selected.
const SwContact* pContact = ::GetUserCall( pObj );
OSL_ENSURE( pContact && pContact->GetMaster(), "<SwFEShell::ChangeOpaque(..)> - missing contact or missing master object at contact!" );
const bool bControlObj = ( pContact && pContact->GetMaster() )
? ::CheckControlLayer( pContact->GetMaster() )
: ::CheckControlLayer( pObj );
if ( !bControlObj && pObj->GetLayer() != nLayerId )
2000-09-18 23:08:29 +00:00
{
pObj->SetLayer( nLayerId );
InvalidateWindows( SwRect( pObj->GetCurrentBoundRect() ) );
if ( pObj->ISA(SwVirtFlyDrawObj) )
2000-09-18 23:08:29 +00:00
{
SwFmt *pFmt = ((SwVirtFlyDrawObj*)pObj)->GetFlyFrm()->GetFmt();
SvxOpaqueItem aOpa( pFmt->GetOpaque() );
aOpa.SetValue( nLayerId == pIDDMA->GetHellId() );
pFmt->SetFmtAttr( aOpa );
2000-09-18 23:08:29 +00:00
}
}
}
GetDoc()->SetModified();
}
}
void SwFEShell::SelectionToHeaven()
{
ChangeOpaque( getIDocumentDrawModelAccess()->GetHeavenId() );
2000-09-18 23:08:29 +00:00
}
void SwFEShell::SelectionToHell()
{
ChangeOpaque( getIDocumentDrawModelAccess()->GetHellId() );
2000-09-18 23:08:29 +00:00
}
/*************************************************************************
|*
|* SwFEShell::IsObjSelected(), IsFrmSelected()
|*
*************************************************************************/
sal_uInt16 SwFEShell::IsObjSelected() const
2000-09-18 23:08:29 +00:00
{
if ( IsFrmSelected() || !Imp()->HasDrawView() )
return 0;
else
return sal_uInt16( Imp()->GetDrawView()->GetMarkedObjectList().GetMarkCount() );
2000-09-18 23:08:29 +00:00
}
sal_Bool SwFEShell::IsFrmSelected() const
2000-09-18 23:08:29 +00:00
{
if ( !Imp()->HasDrawView() )
return sal_False;
2000-09-18 23:08:29 +00:00
else
return 0 != ::GetFlyFromMarked( &Imp()->GetDrawView()->GetMarkedObjectList(),
(SwViewShell*)this );
2000-09-18 23:08:29 +00:00
}
2002-05-15 12:22:47 +00:00
sal_Bool SwFEShell::IsObjSelected( const SdrObject& rObj ) const
{
if ( IsFrmSelected() || !Imp()->HasDrawView() )
return sal_False;
else
return Imp()->GetDrawView()
->IsObjMarked( const_cast< SdrObject * >( &rObj ) );
}
sal_Bool SwFEShell::IsObjSameLevelWithMarked(const SdrObject* pObj) const
{
if (pObj)
{
const SdrMarkList& aMarkList = Imp()->GetDrawView()->GetMarkedObjectList();
if (aMarkList.GetMarkCount() == 0)
{
return sal_True;
}
SdrMark* pM=aMarkList.GetMark(0);
if (pM)
{
SdrObject* pMarkObj = pM->GetMarkedSdrObj();
if (pMarkObj && pMarkObj->GetUpGroup() == pObj->GetUpGroup())
return sal_True;
}
}
return sal_False;
}
2000-09-18 23:08:29 +00:00
/*************************************************************************
|*
|* SwFEShell::EndTextEdit()
|*
*************************************************************************/
void SwFEShell::EndTextEdit()
{
// Terminate the TextEditMode. If required (default if the object
// does not contain any more text and does not carry attributes) the object
// is deleted. All other objects marked are preserved.
2000-09-18 23:08:29 +00:00
OSL_ENSURE( Imp()->HasDrawView() && Imp()->GetDrawView()->IsTextEdit(),
2000-09-18 23:08:29 +00:00
"EndTextEdit an no Object" );
StartAllAction();
SdrView *pView = Imp()->GetDrawView();
SdrObject *pObj = pView->GetTextEditObject();
SdrObjUserCall* pUserCall;
if( 0 != ( pUserCall = GetUserCall(pObj) ) )
{
SdrObject *pTmp = ((SwContact*)pUserCall)->GetMaster();
if( !pTmp )
pTmp = pObj;
pUserCall->Changed( *pTmp, SDRUSERCALL_RESIZE, pTmp->GetLastBoundRect() );
2000-09-18 23:08:29 +00:00
}
if ( !pObj->GetUpGroup() )
{
if ( SDRENDTEXTEDIT_SHOULDBEDELETED == pView->SdrEndTextEdit(sal_True) )
2000-09-18 23:08:29 +00:00
{
if ( pView->GetMarkedObjectList().GetMarkCount() > 1 )
2000-09-18 23:08:29 +00:00
{
{
SdrMarkList aSave( pView->GetMarkedObjectList() );
2000-09-18 23:08:29 +00:00
aSave.DeleteMark( aSave.FindObject( pObj ) );
if ( aSave.GetMarkCount() )
{
pView->UnmarkAll();
pView->MarkObj( pObj, Imp()->GetPageView() );
}
DelSelectedObj();
if ( aSave.GetMarkCount() )
{
for ( sal_uInt16 i = 0; i < aSave.GetMarkCount(); ++i )
pView->MarkObj( aSave.GetMark( i )->GetMarkedSdrObj(),
2000-09-18 23:08:29 +00:00
Imp()->GetPageView() );
}
}
}
else
DelSelectedObj();
}
}
else
pView->SdrEndTextEdit();
2000-09-18 23:08:29 +00:00
EndAllAction();
}
/*************************************************************************
|*
|* SwFEShell::IsInsideSelectedObj()
|*
*************************************************************************/
int SwFEShell::IsInsideSelectedObj( const Point &rPt )
{
if( Imp()->HasDrawView() )
{
SwDrawView *pDView = Imp()->GetDrawView();
if( pDView->GetMarkedObjectList().GetMarkCount() &&
2000-09-18 23:08:29 +00:00
pDView->IsMarkedObjHit( rPt ) )
{
return SDRHIT_OBJECT;
}
}
return SDRHIT_NONE;
}
/*************************************************************************
|*
|* SwFEShell::IsObjSelectable()
|*
*************************************************************************/
bool SwFEShell::IsObjSelectable( const Point& rPt )
2000-09-18 23:08:29 +00:00
{
SET_CURR_SHELL(this);
SwDrawView *pDView = Imp()->GetDrawView();
bool bRet = false;
2000-09-18 23:08:29 +00:00
if( pDView )
{
SdrObject* pObj;
SdrPageView* pPV;
sal_uInt16 nOld = pDView->GetHitTolerancePixel();
2000-09-18 23:08:29 +00:00
pDView->SetHitTolerancePixel( pDView->GetMarkHdlSizePixel()/2 );
CWS-TOOLING: integrate CWS aw065 2009-06-17 13:48:12 +0200 aw r273068 : #99385# corrected small error in SCs selection visualisation 2009-06-16 15:45:28 +0200 wg r273021 : i102838 2009-06-16 12:46:07 +0200 wg r273016 : i102833 2009-06-11 17:40:29 +0200 aw r272895 : #i98870# added implementation for getPageCount helper 2009-06-11 16:39:54 +0200 aw r272885 : #i102663#, #i102667#, #i98870# incluide file typo corrected 2009-06-11 16:24:07 +0200 aw r272881 : #i102663#, #i102667#, #i98870# changes to SdrText, it's usage in SdrTextPrimitive2D and to OverlayObject base implementation. Also support for PageCountField added 2009-06-11 16:23:52 +0200 aw r272880 : #i102663#, #i102667#, #i98870# changes to SdrText, it's usage in SdrTextPrimitive2D and to OverlayObject base implementation. Also support for PageCountField added 2009-06-09 13:50:29 +0200 aw r272769 : #i98917# added support for the OverlayHatchRectanglePrimitive to follow rotation with it's hatch; simplified OverlayHatchRect 2009-06-09 13:04:06 +0200 aw r272766 : #i98870# re-added PageNumber identification in SdrTextPrimitive2D::get2DDecomposition 2009-06-08 18:56:05 +0200 aw r272744 : #i99385# added some last corrections to OverlayObjects in SD (had to do some merges on resync, needed to optically check and correct) 2009-06-08 11:17:57 +0200 aw r272725 : cws aw065: corrections after resync 2009-06-08 11:02:25 +0200 aw r272723 : cws aw065: corrections after resync 2009-06-08 10:36:22 +0200 aw r272722 : cws aw065: corrections after resync 2009-06-05 18:57:06 +0200 aw r272712 : CWS-TOOLING: rebase CWS aw065 to trunk@272291 (milestone: DEV300:m49) 2009-06-05 14:56:34 +0200 aw r272690 : #i89784# stripped old stuff no longer needed due to text-to-polygon conversion using primitives 2009-06-05 14:50:07 +0200 aw r272688 : #102091# removed on-model-lock suppression for SdrObject::ActionChanged() 2009-06-05 14:47:29 +0200 aw r272687 : #102091# corrected local value buffering in ScenePrimitive2D::get2DDecomposition 2009-06-03 17:53:32 +0200 aw r272599 : #i89784# version before stripping 2009-06-03 17:52:18 +0200 aw r272598 : #i89784# version before stripping 2009-05-28 17:15:47 +0200 aw r272420 : #i101872# old stuff removed/stripped 2009-05-28 17:15:32 +0200 aw r272419 : #i101872# old stuff removed/stripped 2009-05-28 17:15:15 +0200 aw r272418 : #i101872# old stuff removed/stripped 2009-05-28 17:14:45 +0200 aw r272417 : #i101872# old stuff removed/stripped 2009-05-28 12:13:56 +0200 aw r272396 : #i101872# stable hybrid state 2009-05-28 12:13:46 +0200 aw r272395 : #i101872# stable hybrid state 2009-05-28 12:13:35 +0200 aw r272394 : #i101872# stable hybrid state 2009-05-28 12:13:20 +0200 aw r272393 : #i101872# stable hybrid state 2009-05-28 12:13:05 +0200 aw r272392 : #i101872# stable hybrid state 2009-05-28 12:12:51 +0200 aw r272391 : #i101872# stable hybrid state 2009-05-15 16:56:02 +0200 aw r271952 : #i101872# HitTest unifications 2009-05-15 16:55:22 +0200 aw r271951 : #i101872# HitTest unifications 2009-05-15 16:55:12 +0200 aw r271950 : #i101872# HitTest unifications 2009-05-15 16:55:01 +0200 aw r271949 : #i101872# HitTest unifications 2009-05-15 16:54:51 +0200 aw r271948 : #i101872# HitTest unifications 2009-05-15 16:54:35 +0200 aw r271947 : #i101872# HitTest unifications 2009-05-15 16:54:22 +0200 aw r271946 : #i101872# HitTest unifications 2009-05-12 19:08:38 +0200 aw r271834 : #i101684# corrected AutoShape's preparation of text transformation due to different definitions in TextBounds 2009-05-12 15:44:49 +0200 aw r271827 : #i89784# expanded TextLayouterDevice::getTextOutlines() to support DXArray and X-Font scaling 2009-05-11 19:40:40 +0200 aw r271790 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications 2009-05-11 19:40:25 +0200 aw r271789 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications 2009-05-11 19:40:12 +0200 aw r271788 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications 2009-05-11 13:01:53 +0200 aw r271765 : #i99385# corrections and optimizations 2009-05-08 14:48:40 +0200 aw r271718 : #i1016180# added optimizations in model operations when model is locked 2009-05-08 14:11:45 +0200 aw r271716 : #i101679# added flush() calls to OverlayManager when interaction step is prepared 2009-05-07 17:44:03 +0200 aw r271689 : #i99385# last corrections/changes 2009-05-07 17:43:47 +0200 aw r271688 : #i99385# last corrections/changes 2009-05-07 13:20:09 +0200 aw r271654 : #i99385# added changes from WFH 2009-05-07 13:19:38 +0200 aw r271653 : #i99385# added changes from WFH 2009-05-07 13:19:11 +0200 aw r271652 : #i99385# added changes from WFH 2009-05-07 11:33:17 +0200 aw r271643 : #i99385# corrections after resync 2009-05-07 11:17:31 +0200 aw r271642 : #i99385# corrections after resync 2009-05-06 18:46:53 +0200 aw r271609 : CWS-TOOLING: rebase CWS aw065 to trunk@271427 (milestone: DEV300:m47) 2009-05-05 18:24:03 +0200 aw r271548 : #i101443# force new text decomposition when TextBackgroundColor has changed 2009-05-05 17:44:42 +0200 aw r271542 : #i99385# 3rd round, simplifications and corrections done 2009-05-05 17:44:32 +0200 aw r271541 : #i99385# 3rd round, simplifications and corrections done 2009-05-05 17:44:20 +0200 aw r271540 : #i99385# 3rd round, simplifications and corrections done 2009-05-05 17:44:09 +0200 aw r271539 : #i99385# 3rd round, simplifications and corrections done 2009-05-05 15:48:38 +0200 aw r271527 : #i99385# 2nd round, usages checked and corrected 2009-05-05 15:48:15 +0200 aw r271526 : #i99385# 2nd round, usages checked and corrected 2009-05-05 15:48:03 +0200 aw r271525 : #i99385# 2nd round, usages checked and corrected 2009-05-05 15:47:51 +0200 aw r271524 : #i99385# 2nd round, usages checked and corrected 2009-04-27 18:33:10 +0200 aw r271300 : #i99385# state commit after all implementations are done 2009-04-27 15:36:53 +0200 aw r271283 : #i99385# state commit after all implementations are done 2009-04-27 15:27:49 +0200 aw r271280 : #i99385# state commit after all implementations are done 2009-04-27 15:27:33 +0200 aw r271279 : #i99385# state commit after all implementations are done 2009-04-27 15:27:00 +0200 aw r271278 : #i99385# state commit after all implementations are done 2009-04-27 15:26:15 +0200 aw r271277 : #i99385# state commit after all implementations are done 2009-04-27 15:25:40 +0200 aw r271275 : #i99385# state commit after all implementations are done 2009-04-27 15:25:19 +0200 aw r271274 : #i99385# state commit after all implementations are done 2009-04-27 15:24:00 +0200 aw r271272 : #i99385# state commit after all implementations are done 2009-03-19 17:12:00 +0100 aw r269757 : #i100360# corrected bitmap's PefSize calculation for bitmap filled objects when Bitmap is Pixel-based on it's mapping 2009-02-19 17:09:47 +0100 aw r268298 : #i98917# corrected attributes 2009-02-19 17:09:30 +0100 aw r268297 : #i98917# corrected attributes 2009-02-19 17:08:22 +0100 aw r268296 : #i98917# corrected attributes 2009-02-19 11:56:25 +0100 aw r268268 : #i98870# added extra code to react on PageNumber change 2009-02-18 16:57:24 +0100 aw r268243 : #i98917# in OverlayHatchRect::getGeometry the rotation was not applied to the TopLeft of the centered rectangle, but to the already extended one, thus the visualisation was rotating around the wrong edge
2009-07-02 14:28:15 +00:00
bRet = 0 != pDView->PickObj( rPt, pDView->getHitTolLog(), pObj, pPV, SDRSEARCH_PICKMARKABLE );
2000-09-18 23:08:29 +00:00
pDView->SetHitTolerancePixel( nOld );
}
return bRet;
2000-09-18 23:08:29 +00:00
}
SdrObject* SwFEShell::GetObjAt( const Point& rPt )
{
SdrObject* pRet = 0;
SET_CURR_SHELL(this);
SwDrawView *pDView = Imp()->GetDrawView();
if( pDView )
{
SdrPageView* pPV;
sal_uInt16 nOld = pDView->GetHitTolerancePixel();
pDView->SetHitTolerancePixel( pDView->GetMarkHdlSizePixel()/2 );
pDView->PickObj( rPt, pDView->getHitTolLog(), pRet, pPV, SDRSEARCH_PICKMARKABLE );
pDView->SetHitTolerancePixel( nOld );
}
return pRet;
}
// Test if there is a object at that position and if it should be selected.
sal_Bool SwFEShell::ShouldObjectBeSelected(const Point& rPt)
{
SET_CURR_SHELL(this);
SwDrawView *pDrawView = Imp()->GetDrawView();
sal_Bool bRet(sal_False);
if(pDrawView)
{
SdrObject* pObj;
SdrPageView* pPV;
sal_uInt16 nOld(pDrawView->GetHitTolerancePixel());
pDrawView->SetHitTolerancePixel(pDrawView->GetMarkHdlSizePixel()/2);
CWS-TOOLING: integrate CWS aw065 2009-06-17 13:48:12 +0200 aw r273068 : #99385# corrected small error in SCs selection visualisation 2009-06-16 15:45:28 +0200 wg r273021 : i102838 2009-06-16 12:46:07 +0200 wg r273016 : i102833 2009-06-11 17:40:29 +0200 aw r272895 : #i98870# added implementation for getPageCount helper 2009-06-11 16:39:54 +0200 aw r272885 : #i102663#, #i102667#, #i98870# incluide file typo corrected 2009-06-11 16:24:07 +0200 aw r272881 : #i102663#, #i102667#, #i98870# changes to SdrText, it's usage in SdrTextPrimitive2D and to OverlayObject base implementation. Also support for PageCountField added 2009-06-11 16:23:52 +0200 aw r272880 : #i102663#, #i102667#, #i98870# changes to SdrText, it's usage in SdrTextPrimitive2D and to OverlayObject base implementation. Also support for PageCountField added 2009-06-09 13:50:29 +0200 aw r272769 : #i98917# added support for the OverlayHatchRectanglePrimitive to follow rotation with it's hatch; simplified OverlayHatchRect 2009-06-09 13:04:06 +0200 aw r272766 : #i98870# re-added PageNumber identification in SdrTextPrimitive2D::get2DDecomposition 2009-06-08 18:56:05 +0200 aw r272744 : #i99385# added some last corrections to OverlayObjects in SD (had to do some merges on resync, needed to optically check and correct) 2009-06-08 11:17:57 +0200 aw r272725 : cws aw065: corrections after resync 2009-06-08 11:02:25 +0200 aw r272723 : cws aw065: corrections after resync 2009-06-08 10:36:22 +0200 aw r272722 : cws aw065: corrections after resync 2009-06-05 18:57:06 +0200 aw r272712 : CWS-TOOLING: rebase CWS aw065 to trunk@272291 (milestone: DEV300:m49) 2009-06-05 14:56:34 +0200 aw r272690 : #i89784# stripped old stuff no longer needed due to text-to-polygon conversion using primitives 2009-06-05 14:50:07 +0200 aw r272688 : #102091# removed on-model-lock suppression for SdrObject::ActionChanged() 2009-06-05 14:47:29 +0200 aw r272687 : #102091# corrected local value buffering in ScenePrimitive2D::get2DDecomposition 2009-06-03 17:53:32 +0200 aw r272599 : #i89784# version before stripping 2009-06-03 17:52:18 +0200 aw r272598 : #i89784# version before stripping 2009-05-28 17:15:47 +0200 aw r272420 : #i101872# old stuff removed/stripped 2009-05-28 17:15:32 +0200 aw r272419 : #i101872# old stuff removed/stripped 2009-05-28 17:15:15 +0200 aw r272418 : #i101872# old stuff removed/stripped 2009-05-28 17:14:45 +0200 aw r272417 : #i101872# old stuff removed/stripped 2009-05-28 12:13:56 +0200 aw r272396 : #i101872# stable hybrid state 2009-05-28 12:13:46 +0200 aw r272395 : #i101872# stable hybrid state 2009-05-28 12:13:35 +0200 aw r272394 : #i101872# stable hybrid state 2009-05-28 12:13:20 +0200 aw r272393 : #i101872# stable hybrid state 2009-05-28 12:13:05 +0200 aw r272392 : #i101872# stable hybrid state 2009-05-28 12:12:51 +0200 aw r272391 : #i101872# stable hybrid state 2009-05-15 16:56:02 +0200 aw r271952 : #i101872# HitTest unifications 2009-05-15 16:55:22 +0200 aw r271951 : #i101872# HitTest unifications 2009-05-15 16:55:12 +0200 aw r271950 : #i101872# HitTest unifications 2009-05-15 16:55:01 +0200 aw r271949 : #i101872# HitTest unifications 2009-05-15 16:54:51 +0200 aw r271948 : #i101872# HitTest unifications 2009-05-15 16:54:35 +0200 aw r271947 : #i101872# HitTest unifications 2009-05-15 16:54:22 +0200 aw r271946 : #i101872# HitTest unifications 2009-05-12 19:08:38 +0200 aw r271834 : #i101684# corrected AutoShape's preparation of text transformation due to different definitions in TextBounds 2009-05-12 15:44:49 +0200 aw r271827 : #i89784# expanded TextLayouterDevice::getTextOutlines() to support DXArray and X-Font scaling 2009-05-11 19:40:40 +0200 aw r271790 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications 2009-05-11 19:40:25 +0200 aw r271789 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications 2009-05-11 19:40:12 +0200 aw r271788 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications 2009-05-11 13:01:53 +0200 aw r271765 : #i99385# corrections and optimizations 2009-05-08 14:48:40 +0200 aw r271718 : #i1016180# added optimizations in model operations when model is locked 2009-05-08 14:11:45 +0200 aw r271716 : #i101679# added flush() calls to OverlayManager when interaction step is prepared 2009-05-07 17:44:03 +0200 aw r271689 : #i99385# last corrections/changes 2009-05-07 17:43:47 +0200 aw r271688 : #i99385# last corrections/changes 2009-05-07 13:20:09 +0200 aw r271654 : #i99385# added changes from WFH 2009-05-07 13:19:38 +0200 aw r271653 : #i99385# added changes from WFH 2009-05-07 13:19:11 +0200 aw r271652 : #i99385# added changes from WFH 2009-05-07 11:33:17 +0200 aw r271643 : #i99385# corrections after resync 2009-05-07 11:17:31 +0200 aw r271642 : #i99385# corrections after resync 2009-05-06 18:46:53 +0200 aw r271609 : CWS-TOOLING: rebase CWS aw065 to trunk@271427 (milestone: DEV300:m47) 2009-05-05 18:24:03 +0200 aw r271548 : #i101443# force new text decomposition when TextBackgroundColor has changed 2009-05-05 17:44:42 +0200 aw r271542 : #i99385# 3rd round, simplifications and corrections done 2009-05-05 17:44:32 +0200 aw r271541 : #i99385# 3rd round, simplifications and corrections done 2009-05-05 17:44:20 +0200 aw r271540 : #i99385# 3rd round, simplifications and corrections done 2009-05-05 17:44:09 +0200 aw r271539 : #i99385# 3rd round, simplifications and corrections done 2009-05-05 15:48:38 +0200 aw r271527 : #i99385# 2nd round, usages checked and corrected 2009-05-05 15:48:15 +0200 aw r271526 : #i99385# 2nd round, usages checked and corrected 2009-05-05 15:48:03 +0200 aw r271525 : #i99385# 2nd round, usages checked and corrected 2009-05-05 15:47:51 +0200 aw r271524 : #i99385# 2nd round, usages checked and corrected 2009-04-27 18:33:10 +0200 aw r271300 : #i99385# state commit after all implementations are done 2009-04-27 15:36:53 +0200 aw r271283 : #i99385# state commit after all implementations are done 2009-04-27 15:27:49 +0200 aw r271280 : #i99385# state commit after all implementations are done 2009-04-27 15:27:33 +0200 aw r271279 : #i99385# state commit after all implementations are done 2009-04-27 15:27:00 +0200 aw r271278 : #i99385# state commit after all implementations are done 2009-04-27 15:26:15 +0200 aw r271277 : #i99385# state commit after all implementations are done 2009-04-27 15:25:40 +0200 aw r271275 : #i99385# state commit after all implementations are done 2009-04-27 15:25:19 +0200 aw r271274 : #i99385# state commit after all implementations are done 2009-04-27 15:24:00 +0200 aw r271272 : #i99385# state commit after all implementations are done 2009-03-19 17:12:00 +0100 aw r269757 : #i100360# corrected bitmap's PefSize calculation for bitmap filled objects when Bitmap is Pixel-based on it's mapping 2009-02-19 17:09:47 +0100 aw r268298 : #i98917# corrected attributes 2009-02-19 17:09:30 +0100 aw r268297 : #i98917# corrected attributes 2009-02-19 17:08:22 +0100 aw r268296 : #i98917# corrected attributes 2009-02-19 11:56:25 +0100 aw r268268 : #i98870# added extra code to react on PageNumber change 2009-02-18 16:57:24 +0100 aw r268243 : #i98917# in OverlayHatchRect::getGeometry the rotation was not applied to the TopLeft of the centered rectangle, but to the already extended one, thus the visualisation was rotating around the wrong edge
2009-07-02 14:28:15 +00:00
bRet = pDrawView->PickObj(rPt, pDrawView->getHitTolLog(), pObj, pPV, SDRSEARCH_PICKMARKABLE);
pDrawView->SetHitTolerancePixel(nOld);
if ( bRet && pObj )
{
const IDocumentDrawModelAccess* pIDDMA = getIDocumentDrawModelAccess();
// #i89920#
// Do not select object in background which is overlapping this text
// at the given position.
bool bObjInBackground( false );
{
if ( pObj->GetLayer() == pIDDMA->GetHellId() )
{
const SwAnchoredObject* pAnchoredObj = ::GetUserCall( pObj )->GetAnchoredObj( pObj );
const SwFrmFmt& rFmt = pAnchoredObj->GetFrmFmt();
const SwFmtSurround& rSurround = rFmt.GetSurround();
if ( rSurround.GetSurround() == SURROUND_THROUGHT )
{
bObjInBackground = true;
}
}
}
if ( bObjInBackground )
{
const SwPageFrm* pPageFrm = GetLayout()->GetPageAtPos( rPt );
if( pPageFrm )
{
const SwCntntFrm* pCntntFrm( pPageFrm->ContainsCntnt() );
while ( pCntntFrm )
{
if ( pCntntFrm->UnionFrm().IsInside( rPt ) )
{
const SwTxtFrm* pTxtFrm =
dynamic_cast<const SwTxtFrm*>(pCntntFrm);
if ( pTxtFrm )
{
SwPosition aPos( *(pTxtFrm->GetTxtNode()) );
Point aTmpPt( rPt );
if (pTxtFrm->GetKeyCrsrOfst(&aPos, aTmpPt))
{
SwRect aCursorCharRect;
if (pTxtFrm->GetCharRect(aCursorCharRect,
aPos))
{
if ( aCursorCharRect.IsOver( SwRect( pObj->GetLastBoundRect() ) ) )
{
bRet = sal_False;
}
}
}
}
else
{
bRet = sal_False;
}
break;
}
pCntntFrm = pCntntFrm->GetNextCntntFrm();
}
}
}
// Don't select header / footer objects in body edition and vice-versa
SwContact* pContact = static_cast<SwContact*>(pObj->GetUserCall());
if ( !pContact->ObjAnchoredAtPage() )
{
const SwPosition& rPos = pContact->GetCntntAnchor();
bool bInHdrFtr = GetDoc()->IsInHeaderFooter( rPos.nNode );
if ( ( IsHeaderFooterEdit() && !bInHdrFtr ) ||
( !IsHeaderFooterEdit() && bInHdrFtr ) )
{
bRet = sal_False;
}
}
if ( bRet )
{
const SdrPage* pPage = pIDDMA->GetDrawModel()->GetPage(0);
for(sal_uInt32 a(pObj->GetOrdNum() + 1); bRet && a < pPage->GetObjCount(); a++)
{
SdrObject *pCandidate = pPage->GetObj(a);
if (pCandidate->ISA(SwVirtFlyDrawObj) &&
( (SwVirtFlyDrawObj*)pCandidate)->GetCurrentBoundRect().IsInside(rPt) )
{
bRet = sal_False;
}
}
}
}
}
return bRet;
}
2000-09-18 23:08:29 +00:00
/*************************************************************************
|*
|* SwFEShell::GotoObj()
2000-09-18 23:08:29 +00:00
|*
|* Description If an object was selected, we assume its upper-left corner
|* otherwise the middle of the current CharRects.
2000-09-18 23:08:29 +00:00
|*
*************************************************************************/
/* --------------------------------------------------
* Does the object include a control or groups,
* which comprise only controls
* --------------------------------------------------*/
static bool lcl_IsControlGroup( const SdrObject *pObj )
{
bool bRet = false;
if(pObj->ISA(SdrUnoObj))
bRet = true;
else if( pObj->ISA( SdrObjGroup ) )
{
bRet = true;
const SdrObjList *pLst = ((SdrObjGroup*)pObj)->GetSubList();
for ( sal_uInt16 i = 0; i < pLst->GetObjCount(); ++i )
if( !::lcl_IsControlGroup( pLst->GetObj( i ) ) )
return false;
}
return bRet;
}
2000-09-18 23:08:29 +00:00
namespace
2000-09-18 23:08:29 +00:00
{
class MarkableObjectsOnly : public ::svx::ISdrObjectFilter
2000-09-18 23:08:29 +00:00
{
public:
MarkableObjectsOnly( SdrPageView* i_pPV )
:m_pPV( i_pPV )
{
}
2000-09-18 23:08:29 +00:00
virtual bool includeObject( const SdrObject& i_rObject ) const
2000-09-18 23:08:29 +00:00
{
return m_pPV && m_pPV->GetView().IsObjMarkable( const_cast< SdrObject* >( &i_rObject ), m_pPV );
}
private:
SdrPageView* m_pPV;
};
}
const SdrObject* SwFEShell::GetBestObject( sal_Bool bNext, sal_uInt16 /*GOTOOBJ_...*/ eType, sal_Bool bFlat, const ::svx::ISdrObjectFilter* pFilter )
{
if( !Imp()->HasDrawView() )
return NULL;
const SdrObject *pBest = 0,
*pTop = 0;
const long nTmp = bNext ? LONG_MAX : 0;
Point aBestPos( nTmp, nTmp );
Point aTopPos( nTmp, nTmp );
Point aCurPos;
Point aPos;
bool bNoDraw = 0 == (GOTOOBJ_DRAW_ANY & eType);
bool bNoFly = 0 == (GOTOOBJ_FLY_ANY & eType);
if( !bNoFly && bNoDraw )
{
SwFlyFrm *pFly = GetCurrFrm( sal_False )->FindFlyFrm();
if( pFly )
pBest = pFly->GetVirtDrawObj();
}
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
SdrPageView* pPV = Imp()->GetDrawView()->GetSdrPageView();
MarkableObjectsOnly aDefaultFilter( pPV );
if ( !pFilter )
pFilter = &aDefaultFilter;
if( !pBest || rMrkList.GetMarkCount() == 1 )
{
// Determine starting point
SdrObjList* pList = NULL;
if ( rMrkList.GetMarkCount() )
{
const SdrObject* pStartObj = rMrkList.GetMark(0)->GetMarkedSdrObj();
if( pStartObj->ISA(SwVirtFlyDrawObj) )
aPos = ((SwVirtFlyDrawObj*)pStartObj)->GetFlyFrm()->Frm().Pos();
2000-09-18 23:08:29 +00:00
else
aPos = pStartObj->GetSnapRect().TopLeft();
// If an object inside a group is selected, we want to
// iterate over the group members.
if ( ! pStartObj->GetUserCall() )
pList = pStartObj->GetObjList();
}
else
{
// If no object is selected, we check if we just entered a group.
// In this case we want to iterate over the group members.
aPos = GetCharRect().Center();
const SdrObject* pStartObj = pPV ? pPV->GetAktGroup() : 0;
if ( pStartObj && pStartObj->ISA( SdrObjGroup ) )
pList = pStartObj->GetSubList();
}
if ( ! pList )
{
// Here we are if
// A No object has been selected and no group has been entered or
// B An object has been selected and it is not inside a group
pList = getIDocumentDrawModelAccess()->GetDrawModel()->GetPage( 0 );
}
OSL_ENSURE( pList, "No object list to iterate" );
2000-09-18 23:08:29 +00:00
SdrObjListIter aObjIter( *pList, bFlat ? IM_FLAT : IM_DEEPNOGROUPS );
while ( aObjIter.IsMore() )
{
SdrObject* pObj = aObjIter.Next();
sal_Bool bFlyFrm = pObj->ISA(SwVirtFlyDrawObj);
if( ( bNoFly && bFlyFrm ) ||
( bNoDraw && !bFlyFrm ) ||
( eType == GOTOOBJ_DRAW_SIMPLE && lcl_IsControlGroup( pObj ) ) ||
( eType == GOTOOBJ_DRAW_CONTROL && !lcl_IsControlGroup( pObj ) ) ||
( pFilter && !pFilter->includeObject( *pObj ) ) )
continue;
if( bFlyFrm )
2000-09-18 23:08:29 +00:00
{
SwVirtFlyDrawObj *pO = (SwVirtFlyDrawObj*)pObj;
SwFlyFrm *pFly = pO->GetFlyFrm();
if( GOTOOBJ_FLY_ANY != ( GOTOOBJ_FLY_ANY & eType ) )
2000-09-18 23:08:29 +00:00
{
switch ( eType )
{
case GOTOOBJ_FLY_FRM:
if ( pFly->Lower() && pFly->Lower()->IsNoTxtFrm() )
continue;
break;
case GOTOOBJ_FLY_GRF:
if ( pFly->Lower() &&
(pFly->Lower()->IsLayoutFrm() ||
!((SwCntntFrm*)pFly->Lower())->GetNode()->GetGrfNode()))
continue;
break;
case GOTOOBJ_FLY_OLE:
if ( pFly->Lower() &&
(pFly->Lower()->IsLayoutFrm() ||
!((SwCntntFrm*)pFly->Lower())->GetNode()->GetOLENode()))
continue;
break;
}
2000-09-18 23:08:29 +00:00
}
aCurPos = pFly->Frm().Pos();
}
else
aCurPos = pObj->GetCurrentBoundRect().TopLeft();
2000-09-18 23:08:29 +00:00
// Special case if another object is on same Y.
if( aCurPos != aPos && // only when it is not me
aCurPos.getY() == aPos.getY() && // Y positions equal
(bNext? (aCurPos.getX() > aPos.getX()) : // lies next to me
(aCurPos.getX() < aPos.getX())) ) // " reverse
{
aBestPos = Point( nTmp, nTmp );
SdrObjListIter aTmpIter( *pList, bFlat ? IM_FLAT : IM_DEEPNOGROUPS );
while ( aTmpIter.IsMore() )
2000-09-18 23:08:29 +00:00
{
SdrObject* pTmpObj = aTmpIter.Next();
bFlyFrm = pTmpObj->ISA(SwVirtFlyDrawObj);
if( ( bNoFly && bFlyFrm ) || ( bNoDraw && !bFlyFrm ) )
continue;
if( bFlyFrm )
2000-09-18 23:08:29 +00:00
{
SwVirtFlyDrawObj *pO = (SwVirtFlyDrawObj*)pTmpObj;
aCurPos = pO->GetFlyFrm()->Frm().Pos();
2000-09-18 23:08:29 +00:00
}
else
aCurPos = pTmpObj->GetCurrentBoundRect().TopLeft();
2000-09-18 23:08:29 +00:00
if( aCurPos != aPos && aCurPos.Y() == aPos.Y() &&
(bNext? (aCurPos.getX() > aPos.getX()) : // lies next to me
(aCurPos.getX() < aPos.getX())) && // " reverse
(bNext? (aCurPos.getX() < aBestPos.getX()) : // better as best
(aCurPos.getX() > aBestPos.getX())) ) // " reverse
{
aBestPos = aCurPos;
pBest = pTmpObj;
}
2000-09-18 23:08:29 +00:00
}
break;
2000-09-18 23:08:29 +00:00
}
2010-11-04 13:05:15 +01:00
if( (
(bNext? (aPos.getY() < aCurPos.getY()) : // only below me
(aPos.getY() > aCurPos.getY())) && // " reverse
(bNext? (aBestPos.getY() > aCurPos.getY()) : // closer below
(aBestPos.getY() < aCurPos.getY()))
2010-11-04 13:05:15 +01:00
) || // " reverse
(aBestPos.getY() == aCurPos.getY() &&
(bNext? (aBestPos.getX() > aCurPos.getX()) : // further left
(aBestPos.getX() < aCurPos.getX())))) // " reverse
2000-09-18 23:08:29 +00:00
{
aBestPos = aCurPos;
pBest = pObj;
2000-09-18 23:08:29 +00:00
}
if( (bNext? (aTopPos.getY() > aCurPos.getY()) : // higher as best
(aTopPos.getY() < aCurPos.getY())) || // " reverse
(aTopPos.getY() == aCurPos.getY() &&
(bNext? (aTopPos.getX() > aCurPos.getX()) : // further left
(aTopPos.getX() < aCurPos.getX())))) // " reverse
2000-09-18 23:08:29 +00:00
{
aTopPos = aCurPos;
pTop = pObj;
2000-09-18 23:08:29 +00:00
}
}
// unfortunately nothing found
if( (bNext? (aBestPos.getX() == LONG_MAX) : (aBestPos.getX() == 0)) )
pBest = pTop;
}
return pBest;
}
sal_Bool SwFEShell::GotoObj( sal_Bool bNext, sal_uInt16 /*GOTOOBJ_...*/ eType )
{
const SdrObject* pBest = GetBestObject( bNext, eType );
if ( !pBest )
return sal_False;
sal_Bool bFlyFrm = pBest->ISA(SwVirtFlyDrawObj);
if( bFlyFrm )
{
SwVirtFlyDrawObj *pO = (SwVirtFlyDrawObj*)pBest;
const SwRect& rFrm = pO->GetFlyFrm()->Frm();
SelectObj( rFrm.Pos(), 0, (SdrObject*)pBest );
if( !ActionPend() )
MakeVisible( rFrm );
}
else
{
SelectObj( Point(), 0, (SdrObject*)pBest );
if( !ActionPend() )
MakeVisible( pBest->GetCurrentBoundRect() );
2000-09-18 23:08:29 +00:00
}
CallChgLnk();
return sal_True;
2000-09-18 23:08:29 +00:00
}
/*************************************************************************
|*
|* SwFEShell::BeginCreate()
|*
*************************************************************************/
sal_Bool SwFEShell::BeginCreate( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, const Point &rPos )
2000-09-18 23:08:29 +00:00
{
sal_Bool bRet = sal_False;
2000-09-18 23:08:29 +00:00
if ( !Imp()->HasDrawView() )
Imp()->MakeDrawView();
if ( GetPageNumber( rPos ) )
{
Imp()->GetDrawView()->SetCurrentObj( eSdrObjectKind );
if ( eSdrObjectKind == OBJ_CAPTION )
bRet = Imp()->GetDrawView()->BegCreateCaptionObj(
rPos, Size( lMinBorder - MINFLY, lMinBorder - MINFLY ),
GetOut() );
else
bRet = Imp()->GetDrawView()->BegCreateObj( rPos, GetOut() );
}
if ( bRet )
{
2000-09-18 23:08:29 +00:00
::FrameNotify( this, FLY_DRAG_START );
}
2000-09-18 23:08:29 +00:00
return bRet;
}
sal_Bool SwFEShell::BeginCreate( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, sal_uInt32 eObjInventor,
2000-09-18 23:08:29 +00:00
const Point &rPos )
{
sal_Bool bRet = sal_False;
2000-09-18 23:08:29 +00:00
if ( !Imp()->HasDrawView() )
Imp()->MakeDrawView();
if ( GetPageNumber( rPos ) )
{
Imp()->GetDrawView()->SetCurrentObj( eSdrObjectKind, eObjInventor );
bRet = Imp()->GetDrawView()->BegCreateObj( rPos, GetOut() );
}
if ( bRet )
::FrameNotify( this, FLY_DRAG_START );
return bRet;
}
/*************************************************************************
|*
|* SwFEShell::MoveCreate()
|*
*************************************************************************/
void SwFEShell::MoveCreate( const Point &rPos )
{
OSL_ENSURE( Imp()->HasDrawView(), "MoveCreate without DrawView?" );
2000-09-18 23:08:29 +00:00
if ( GetPageNumber( rPos ) )
{
ScrollTo( rPos );
2000-09-18 23:08:29 +00:00
Imp()->GetDrawView()->MovCreateObj( rPos );
::FrameNotify( this, FLY_DRAG );
}
}
/*************************************************************************
|*
|* SwFEShell::EndCreate(), ImpEndCreate()
|*
*************************************************************************/
sal_Bool SwFEShell::EndCreate( sal_uInt16 eSdrCreateCmd )
2000-09-18 23:08:29 +00:00
{
// To assure undo-object from the DrawEngine is not stored,
// (we create our own undo-object!), temporarily switch-off Undo
OSL_ENSURE( Imp()->HasDrawView(), "EndCreate without DrawView?" );
2000-09-18 23:08:29 +00:00
if( !Imp()->GetDrawView()->IsGroupEntered() )
{
GetDoc()->GetIDocumentUndoRedo().DoDrawUndo(false);
}
sal_Bool bCreate = Imp()->GetDrawView()->EndCreateObj(
2000-09-18 23:08:29 +00:00
SdrCreateCmd( eSdrCreateCmd ) );
GetDoc()->GetIDocumentUndoRedo().DoDrawUndo(true);
2000-09-18 23:08:29 +00:00
if ( !bCreate )
{
::FrameNotify( this, FLY_DRAG_END );
return sal_False;
2000-09-18 23:08:29 +00:00
}
if ( (SdrCreateCmd)eSdrCreateCmd == SDRCREATE_NEXTPOINT )
{
::FrameNotify( this, FLY_DRAG );
return sal_True;
2000-09-18 23:08:29 +00:00
}
return ImpEndCreate();
}
sal_Bool SwFEShell::ImpEndCreate()
2000-09-18 23:08:29 +00:00
{
OSL_ENSURE( Imp()->GetDrawView()->GetMarkedObjectList().GetMarkCount() == 1,
"New object not selected." );
2000-09-18 23:08:29 +00:00
SdrObject& rSdrObj = *Imp()->GetDrawView()->GetMarkedObjectList().GetMark(0)->GetMarkedSdrObj();
2000-09-18 23:08:29 +00:00
if( rSdrObj.GetSnapRect().IsEmpty() )
{
// preferably we forget the object, only gives problems
2000-09-18 23:08:29 +00:00
Imp()->GetDrawView()->DeleteMarked();
Imp()->GetDrawView()->UnmarkAll();
::FrameNotify( this, FLY_DRAG_END );
return sal_False;
2000-09-18 23:08:29 +00:00
}
if( rSdrObj.GetUpGroup() )
{
Point aTmpPos( rSdrObj.GetSnapRect().TopLeft() );
2000-09-18 23:08:29 +00:00
Point aNewAnchor( rSdrObj.GetUpGroup()->GetAnchorPos() );
// OD 2004-04-05 #i26791# - direct object positioning for group members
2000-09-18 23:08:29 +00:00
rSdrObj.NbcSetRelativePos( aTmpPos - aNewAnchor );
rSdrObj.NbcSetAnchorPos( aNewAnchor );
::FrameNotify( this, FLY_DRAG );
return sal_True;
2000-09-18 23:08:29 +00:00
}
LockPaint();
2000-09-18 23:08:29 +00:00
StartAllAction();
Imp()->GetDrawView()->UnmarkAll();
const Rectangle &rBound = rSdrObj.GetSnapRect();
Point aPt( rBound.TopRight() );
2000-09-18 23:08:29 +00:00
// alien identifier should end up on defaults
// duplications possible!!
sal_uInt16 nIdent = SdrInventor == rSdrObj.GetObjInventor()
2000-09-18 23:08:29 +00:00
? rSdrObj.GetObjIdentifier()
: 0xFFFF;
// default for controls character bound, otherwise paragraph bound.
2000-09-18 23:08:29 +00:00
SwFmtAnchor aAnch;
const SwFrm *pAnch = 0;
bool bCharBound = false;
2000-09-18 23:08:29 +00:00
if( rSdrObj.ISA( SdrUnoObj ) )
{
SwPosition aPos( GetDoc()->GetNodes() );
SwCrsrMoveState aState( MV_SETONLYTEXT );
Point aPoint( aPt.getX(), aPt.getY() + rBound.GetHeight()/2 );
GetLayout()->GetCrsrOfst( &aPos, aPoint, &aState );
2000-09-18 23:08:29 +00:00
// characterbinding not allowed in readonly-content
2000-09-18 23:08:29 +00:00
if( !aPos.nNode.GetNode().IsProtect() )
{
pAnch = aPos.nNode.GetNode().GetCntntNode()->getLayoutFrm( GetLayout(), &aPoint, &aPos );
2000-09-18 23:08:29 +00:00
SwRect aTmp;
pAnch->GetCharRect( aTmp, aPos );
// The crsr should not be too far away
bCharBound = true;
2000-09-18 23:08:29 +00:00
Rectangle aRect( aTmp.SVRect() );
aRect.Left() -= MM50*2;
aRect.Top() -= MM50*2;
aRect.Right() += MM50*2;
aRect.Bottom()+= MM50*2;
if( !aRect.IsOver( rBound ) && !::GetHtmlMode( GetDoc()->GetDocShell() ))
bCharBound = false;
2000-09-18 23:08:29 +00:00
// anchor in header/footer also not allowed.
2000-09-18 23:08:29 +00:00
if( bCharBound )
bCharBound = !GetDoc()->IsInHeaderFooter( aPos.nNode );
if( bCharBound )
{
aAnch.SetType( FLY_AS_CHAR );
2000-09-18 23:08:29 +00:00
aAnch.SetAnchor( &aPos );
}
}
}
if( !bCharBound )
{
2011-02-08 08:51:51 +01:00
// allow native drawing objects in header/footer.
// Thus, set <bBodyOnly> to <false> for these objects using value
// of <nIdent> - value <0xFFFF> indicates control objects, which aren't
// allowed in header/footer.
//bool bBodyOnly = OBJ_NONE != nIdent;
bool bBodyOnly = 0xFFFF == nIdent;
bool bAtPage = false;
const SwFrm* pPage = 0;
2000-09-18 23:08:29 +00:00
SwCrsrMoveState aState( MV_SETONLYTEXT );
Point aPoint( aPt );
SwPosition aPos( GetDoc()->GetNodes() );
GetLayout()->GetCrsrOfst( &aPos, aPoint, &aState );
// do not set in ReadnOnly-content
2000-09-18 23:08:29 +00:00
if( aPos.nNode.GetNode().IsProtect() )
// then only page bound. Or should we
// search the next not-readonly position?
bAtPage = true;
2000-09-18 23:08:29 +00:00
pAnch = aPos.nNode.GetNode().GetCntntNode()->getLayoutFrm( GetLayout(), &aPoint, 0, sal_False );
2000-09-18 23:08:29 +00:00
if( !bAtPage )
{
const SwFlyFrm *pTmp = pAnch->FindFlyFrm();
if( pTmp )
{
const SwFrm* pTmpFrm = pAnch;
SwRect aBound( rBound );
while( pTmp )
{
if( pTmp->Frm().IsInside( aBound ) )
{
if( !bBodyOnly || !pTmp->FindFooterOrHeader() )
pPage = pTmpFrm;
break;
}
pTmp = pTmp->GetAnchorFrm()
? pTmp->GetAnchorFrm()->FindFlyFrm()
2000-09-18 23:08:29 +00:00
: 0;
pTmpFrm = pTmp;
}
}
if( !pPage )
pPage = pAnch->FindPageFrm();
// Always via FindAnchor, to assure the frame will be bound
// to the previous. With GetCrsOfst we can also reach the next. THIS IS WRONG.
2000-09-18 23:08:29 +00:00
pAnch = ::FindAnchor( pPage, aPt, bBodyOnly );
aPos.nNode = *((SwCntntFrm*)pAnch)->GetNode();
// do not set in ReadnOnly-content
2000-09-18 23:08:29 +00:00
if( aPos.nNode.GetNode().IsProtect() )
// then only page bound. Or should we
// search the next not-readonly position?
bAtPage = true;
2000-09-18 23:08:29 +00:00
else
{
aAnch.SetType( FLY_AT_PARA );
2000-09-18 23:08:29 +00:00
aAnch.SetAnchor( &aPos );
}
}
if( bAtPage )
{
pPage = pAnch->FindPageFrm();
aAnch.SetType( FLY_AT_PAGE );
2000-09-18 23:08:29 +00:00
aAnch.SetPageNum( pPage->GetPhyPageNum() );
pAnch = pPage; // page becomes an anchor
2000-09-18 23:08:29 +00:00
}
}
SfxItemSet aSet( GetDoc()->GetAttrPool(), RES_FRM_SIZE, RES_FRM_SIZE,
RES_SURROUND, RES_ANCHOR, 0 );
aSet.Put( aAnch );
// OD 2004-03-30 #i26791# - determine relative object position
SwTwips nXOffset;
SwTwips nYOffset = rBound.Top() - pAnch->Frm().Top();
2000-09-18 23:08:29 +00:00
{
if( pAnch->IsVertical() )
{
nXOffset = nYOffset;
nYOffset = pAnch->Frm().Left()+pAnch->Frm().Width()-rBound.Right();
}
else if( pAnch->IsRightToLeft() )
nXOffset = pAnch->Frm().Left()+pAnch->Frm().Width()-rBound.Right();
else
nXOffset = rBound.Left() - pAnch->Frm().Left();
2000-09-18 23:08:29 +00:00
if( pAnch->IsTxtFrm() && ((SwTxtFrm*)pAnch)->IsFollow() )
{
SwTxtFrm* pTmp = (SwTxtFrm*)pAnch;
do {
pTmp = pTmp->FindMaster();
OSL_ENSURE( pTmp, "Where's my Master?" );
// OD 2004-03-30 #i26791# - correction: add frame area height
// of master frames.
nYOffset += pTmp->IsVertical() ?
pTmp->Frm().Width() : pTmp->Frm().Height();
2000-09-18 23:08:29 +00:00
} while ( pTmp->IsFollow() );
}
}
if( OBJ_NONE == nIdent )
{
// For OBJ_NONE a fly is inserted.
const long nWidth = rBound.Right() - rBound.Left();
const long nHeight= rBound.Bottom() - rBound.Top();
aSet.Put( SwFmtFrmSize( ATT_MIN_SIZE, std::max( nWidth, long(MINFLY) ),
std::max( nHeight, long(MINFLY) )));
SwFmtHoriOrient aHori( nXOffset, text::HoriOrientation::NONE, text::RelOrientation::FRAME );
SwFmtVertOrient aVert( nYOffset, text::VertOrientation::NONE, text::RelOrientation::FRAME );
2000-09-18 23:08:29 +00:00
aSet.Put( SwFmtSurround( SURROUND_PARALLEL ) );
aSet.Put( aHori );
aSet.Put( aVert );
// Quickly store the square
2000-09-18 23:08:29 +00:00
const SwRect aFlyRect( rBound );
// Throw away generated object, now the fly can nicely
// via the available SS be generated.
GetDoc()->GetIDocumentUndoRedo().DoDrawUndo(false); // see above
// #i52858# - method name changed
SdrPage *pPg = getIDocumentDrawModelAccess()->GetOrCreateDrawModel()->GetPage( 0 );
2000-09-18 23:08:29 +00:00
if( !pPg )
{
SdrModel* pTmpSdrModel = getIDocumentDrawModelAccess()->GetDrawModel();
pPg = pTmpSdrModel->AllocPage( false );
pTmpSdrModel->InsertPage( pPg );
2000-09-18 23:08:29 +00:00
}
pPg->RecalcObjOrdNums();
SdrObject* pRemovedObject = pPg->RemoveObject( rSdrObj.GetOrdNumDirect() );
SdrObject::Free( pRemovedObject );
GetDoc()->GetIDocumentUndoRedo().DoDrawUndo(true);
2000-09-18 23:08:29 +00:00
SwFlyFrm* pFlyFrm;
if( NewFlyFrm( aSet, sal_True ) &&
2000-09-18 23:08:29 +00:00
::GetHtmlMode( GetDoc()->GetDocShell() ) &&
0 != ( pFlyFrm = FindFlyFrm() ))
{
SfxItemSet aHtmlSet( GetDoc()->GetAttrPool(), RES_VERT_ORIENT, RES_HORI_ORIENT );
// horizontal orientation:
const bool bLeftFrm = aFlyRect.Left() <
2000-09-18 23:08:29 +00:00
pAnch->Frm().Left() + pAnch->Prt().Left(),
bLeftPrt = aFlyRect.Left() + aFlyRect.Width() <
pAnch->Frm().Left() + pAnch->Prt().Width()/2;
if( bLeftFrm || bLeftPrt )
{
aHori.SetHoriOrient( text::HoriOrientation::LEFT );
aHori.SetRelationOrient( bLeftFrm ? text::RelOrientation::FRAME : text::RelOrientation::PRINT_AREA );
2000-09-18 23:08:29 +00:00
}
else
{
const bool bRightFrm = aFlyRect.Left() >
2000-09-18 23:08:29 +00:00
pAnch->Frm().Left() + pAnch->Prt().Width();
aHori.SetHoriOrient( text::HoriOrientation::RIGHT );
aHori.SetRelationOrient( bRightFrm ? text::RelOrientation::FRAME : text::RelOrientation::PRINT_AREA );
2000-09-18 23:08:29 +00:00
}
aHtmlSet.Put( aHori );
aVert.SetVertOrient( text::VertOrientation::TOP );
aVert.SetRelationOrient( text::RelOrientation::PRINT_AREA );
2000-09-18 23:08:29 +00:00
aHtmlSet.Put( aVert );
GetDoc()->SetAttr( aHtmlSet, *pFlyFrm->GetFmt() );
}
}
else
{
Point aRelNullPt;
if( OBJ_CAPTION == nIdent )
aRelNullPt = ((SdrCaptionObj&)rSdrObj).GetTailPos();
else
aRelNullPt = rBound.TopLeft();
aSet.Put( aAnch );
aSet.Put( SwFmtSurround( SURROUND_THROUGHT ) );
// OD 2004-03-30 #i26791# - set horizontal position
SwFmtHoriOrient aHori( nXOffset, text::HoriOrientation::NONE, text::RelOrientation::FRAME );
aSet.Put( aHori );
// OD 2004-03-30 #i26791# - set vertical position
if( pAnch->IsTxtFrm() && ((SwTxtFrm*)pAnch)->IsFollow() )
{
SwTxtFrm* pTmp = (SwTxtFrm*)pAnch;
do {
pTmp = pTmp->FindMaster();
OSL_ENSURE( pTmp, "Where's my Master?" );
nYOffset += pTmp->IsVertical() ?
pTmp->Prt().Width() : pTmp->Prt().Height();
} while ( pTmp->IsFollow() );
}
SwFmtVertOrient aVert( nYOffset, text::VertOrientation::NONE, text::RelOrientation::FRAME );
aSet.Put( aVert );
SwDrawFrmFmt* pFmt = (SwDrawFrmFmt*)getIDocumentLayoutAccess()->MakeLayoutFmt( RND_DRAW_OBJECT, &aSet );
// #i36010# - set layout direction of the position
pFmt->SetPositionLayoutDir(
text::PositionLayoutDir::PositionInLayoutDirOfAnchor );
// #i44344#, #i44681# - positioning attributes already set
pFmt->PosAttrSet();
2000-09-18 23:08:29 +00:00
SwDrawContact *pContact = new SwDrawContact( pFmt, &rSdrObj );
// #i35635#
pContact->MoveObjToVisibleLayer( &rSdrObj );
2000-09-18 23:08:29 +00:00
if( bCharBound )
{
OSL_ENSURE( aAnch.GetAnchorId() == FLY_AS_CHAR, "wrong AnchorType" );
2000-09-18 23:08:29 +00:00
SwTxtNode *pNd = aAnch.GetCntntAnchor()->nNode.GetNode().GetTxtNode();
CWS-TOOLING: integrate CWS odfmetadata3 2009-09-11 Michael Stahl merge DEV300_m58 2009-09-07 Michael Stahl SwFmtFld::Modify(): do nothing on RES_OBJECTDYING 2009-08-27 Michael Stahl #i91565#, #i91566#: TextPortionEnumerationTest.java: add test document 2009-08-27 Michael Stahl #i91565#, #i91566#: add complex test: TextPortionEnumerationTest.java 2009-08-27 Michael Stahl CLiteral::initialize(): zero-length literals probably not an error 2009-08-27 Michael Stahl #i91565#, #i91566#: offapi: new InContentMetadata and MetadataField services adapt TextPortion for InContentMetadata 2009-08-27 Michael Stahl #i91564#: xmloff: load/store xml:id and RDFa for text:bookmark(-start). 2009-08-27 Michael Stahl #i91564#: sw core: add support for xml:id at bookmarks: sw::mark::Bookmark: derive from Metadatable. SwHistoryBookmark, SaveBookmark: store a MetadatableUndo. ndcopy.cxx: lcl_CopyBookmarks(): copy the xml:id. SwXBookmark: derive from MetadatableMixin. 2009-08-27 Michael Stahl #i91565#, #i91566#: xmloff: refactor ruby import so nested meta(-field) works: remove XMLRubyHint_Impl. XMLImpRubyContext_Impl::~XMLImpRubyContext_Impl(): insert ruby directly. 2009-08-27 Michael Stahl #i91565#, #i91566#: xmloff: fix text:meta(-field) import/export: new XMLTextParagraphExport::exportTextField() overload for XTextField. CreateAndInsertMark(): set xml:id after insertion. fix meta(-field) service names, bugs etc. 2009-08-27 Michael Stahl #i91565#, #i91566#: sw text formatting: paint background of meta(-field) body: SwFont: add member m_nMetaCount. txttypes.hxx: add POR_META. atrstck.cxx: handle RES_TXTATR_META(FIELD). itrform2.cxx: SwTxtFormatter::WhichTxtPor(): create new class SwMetaPortion. 2009-08-27 Michael Stahl #i91566#: sw text formatting: display meta-field prefix and suffix: SwAttrIter::GetAttr(): replace with call to GetTxtAttrForCharAt(). SwTxtFormatter::NewExtraPortion(): handle meta-field prefix. SwTxtFormatter: new member m_nHintEndIndex. SwTxtFormatter::WhichFirstPortion(): call TryNewNoLengthPortion(). SwTxtFormatter::TryNewNoLengthPortion(): new; handle suffix of meta-field. SwTxtFormatter::UnderFlow(): UGLY HACK: decrement m_nHintEndIndex. SwFldPortion: add flag m_bNoLength: portion has zero length (for suffix). 2009-08-27 Michael Stahl #i91565#, #i91566#: extend text:meta(-field) uno wrapper with XText interface: unoobj.hxx: new CursorType CURSOR_META. unoobj2.cxx: refactor SwXText implementation to ensure that when the SwXText belongs to a SwXMeta, content is always inserted inside the meta(-field). unoobj.cxx: new SwXTextCursor::ForceIntoMeta(): cursor stays in meta(-field). unometa.hxx: SwXMeta implements XText, forwarding to a member SwXMetaText. DocInsertStringSplitCR(), SwX*::attachToRange(), SwX*::DeleteAndInsert(): use FORCEHINTEXPAND hack to ensure insert into the meta(-field) at the end. 2009-08-27 Michael Stahl #i91565#, #i91566#: add text:meta(-field) uno wrapper to sw: fmtmeta.hxx, fmtatr2.cxx: new class sw::MetaField, new sw::MetaFieldManager. doc.hxx, docnew.cxx: new SwDoc::GetMetaFieldManager(). unocoll.hxx,.cxx: new SW_SERVICE_FIELDTYPE_METAFIELD, SW_SERVICE_TYPE_META. unomap.hxx,.cxx: new PROPERTY_MAP_METAFIELD. unoprnms.hxx: new UNO_NAME_META. unoport.hxx: new PORTION_META; add "InContentMetadata" prop to SwXTextPortion. new unometa.hxx: new class SwXMeta and SwXMetaField. unofield.cxx: SwXFieldEnumeration: include meta-fields. unoportenum.cxx: handle RES_TXTATR_META(FIELD) by using a portion list stack. unotext.cxx: SwXText::insertTextContent(): handle meta(-field) as attribute. 2009-08-27 Michael Stahl #i91565#, #i91566#: ndhints.cxx: remove sort number from SwTxtAttrNesting 2009-08-27 Michael Stahl #i91565#, #i91566#: add support for hints with end and CH_TXTATR to sw core: doc.hxx, docedt.cxx: replace SwDoc::Delete(), DeleteAndJoin(), ReplaceRange() with wrappers that split at left-overlapped end+CH_TXTATR hints. txatbase.hxx: new member SwTxtAttr::m_bHasDummyChar. ndtxt.hxx: rename SwTxtNode::GetTxtAttr() to GetTxtAttrForCharAt(). ndtxt.cxx: SwTxtNode::CopyText(): copy end+CH_TXTATR hints iff copy CH_TXTATR. txtatr2.cxx, thints.cxx: SwTxtMeta gets a CH_TXTATR. 2009-08-27 Michael Stahl #i91565#, #i91566#: add text:meta(-field) to sw core: txatbase.hxx: new member SwTxtAttr::m_bNesting. hintids.hxx: new ids RES_TXTATR_META, RES_TXTATR_METAFIELD. txtatr.hxx: new base class SwTxtAttrNesting. new hint SwTxtMeta. SwTxtRuby derives from SwTxtAttrNesting. txtinet.hxx: SwTxtINetFmt derives from SwTxtAttrNesting. new header fmtmeta.hxx: new pool item SwFmtMeta. new class sw::Meta. ndhints.hxx, thints.cxx: new method SwpHints::TryInsertNesting(). thints.cxx: refactoring: BuildPortions() no longer handles Ruby/Hyperlink, but TryInsertNesting(), which also handles meta(-field). SwTxtNode::InsertItem(): check if the hint is actually inserted. ndhints.cxx: sort nesting hints based on sort number. ndtxt.cxx: lcl_CopyHint(): handle copy of meta/meta-field. 2009-08-27 Michael Stahl enable expanding hints with m_bLockExpandFlag set: add new InsertFlag: INS_FORCEHINTEXPAND. add new SetAttrMode: SETATTR_FORCEHINTEXPAND. rename SwEditShell::Insert() to Insert2() because changed signature fails to compile when SwWrtShell tries to overwrite these non-virtual members... SwWrtShell::Insert() sets FOCEHINTEXPAND if range was selected/deleted. adapt SwUndoInsert to store flags. 2009-08-27 Michael Stahl change formal parameters of item insertion methods to type SetAttrMode 2009-08-27 Michael Stahl fix incorrect resetting of text attributes in SwUndoInsSection, SwUndoInserts 2009-08-27 Michael Stahl clean up SwTxtNode::CutImpl() and lcl_CopyHint() 2009-08-27 Michael Stahl rename SwDoc::Copy() to CopyRange(), and _Copy() to CopyImpl() 2009-08-27 Michael Stahl rename SwNodes::Move() to MoveRange(), and remove unused parameter 2009-08-27 Michael Stahl rename SwDoc::Move() to MoveRange()/MoveNodeRange() 2009-08-27 Michael Stahl rename SwDoc::Insert() to InsertString(), and remove sal_Unicode variant 2009-08-27 Michael Stahl rename SwDoc::Insert() to InsertPoolItem()/InsertItemSet()/InsertSwSection() 2009-08-27 Michael Stahl rename SwDoc::Replace() to ReplaceRange() 2009-08-27 Michael Stahl remove SwDoc::Overwrite() sal_Unicode variant 2009-08-27 Michael Stahl split up SwDoc::DeleteAndJoin(): factor out DeleteAndJoinWithRedline() 2009-08-27 Michael Stahl rename overloaded SwDoc::Delete() to DeleteRange()/DeleteTOXMark() 2009-08-27 Michael Stahl rename SwTxtNode::Copy() to CopyText() 2009-08-27 Michael Stahl rename SwTxtNode::Cut() to CutText(), and _Cut() to CutImpl() 2009-08-27 Michael Stahl rename SwTxtNode::Delete() to DeleteAttribute()/DeleteAttributes() 2009-08-27 Michael Stahl rename SwTxtNode::Replace() to ReplaceText(), and remove the xub_Unicode variant 2009-08-27 Michael Stahl rename SwTxtNode::Erase() to EraseText() 2009-08-27 Michael Stahl rename SwTxtNode::Insert() to InsertText(), and remove the xub_Unicode variant 2009-08-27 Michael Stahl clean up SwTxtNode::Update() 2009-08-27 Michael Stahl remove SwTxtAttr::RemoveFromPool() and make destructor non-public, to be invoked by new method SwTxtAttr::Destroy() 2009-08-27 Michael Stahl ensure that SwDoc::Insert() for item (set) returns success indicator: replace SwRegHistory constructor with method InsertItems(), returning bool. refactor InsAttr() so that it checks if InsertItems() succeeds. 2009-08-27 Michael Stahl move SwXTextPortionEnumeration from unoobj.hxx to unoport.hxx 2009-08-27 Michael Stahl add missing SolarMutex in SwXTextPortion methods 2009-08-27 Michael Stahl SwXTextPortion: new member m_xTextField (so the TextField property need not be returned indirectly via SwUnoCursorHelper). factor out function CreateSwXTextField(). 2009-08-27 Michael Stahl SwXTextPortion: remove PORTION_CONTROL_CHAR and implementation of XTextField 2009-08-27 Michael Stahl remove obsolete hint SwTxtHardBlank and formats SwFmtHardBlank/SwFmtSoftHyph 2009-08-27 Michael Stahl clean up SwTxtAttr and friends: remove many accessor methods for obsolete (due to autofmt) char format items. remove unused flag SwTxtAttr::m_bDontMergeAttr. MakeRedlineTxtAttr() now dedicated function, no longer calls MakeTxtAttr(). 2009-08-27 Michael Stahl remove obsolete attribute SwTxt2Lines 2009-08-27 Michael Stahl SwXTextPortionEnumeration: finish refactoring CreatePortions change ExportHints so it always returns a text portion for hint w/ CH_TXTATR. remove special case for handling end of paragraph. unfortunately had to refactor the fieldmarks export as well (got in the way). 2009-08-27 Michael Stahl SwXTextPortionEnumeration: refactor CreatePortions: frames export extract function ExportFrames() from CreatePortions(). remove (un)dead code that calls evil MovePara(fnParaCurr, fnParaEnd) 2009-08-27 Michael Stahl clean up SwXParaFrameEnumeration 2009-08-27 Michael Stahl CollectFrameAtNode: replace SwDependArr with STL based FrameDependList_t 2009-08-27 Michael Stahl SwXTextPortionEnumeration: tweak refmark/toxmark export so ExportHints returns the portion for point marks 2009-08-27 Michael Stahl clean up SwXTextPortionEnumeration: prefix members, remove casts, replace SvWeirdArray with STL, etc. make CreatePortions() method a function, and remove lots of members. extract fieldmarks function from CreatePortions. 2009-08-27 Michael Stahl remove FOREACHUNOPAM_START/END macros 2009-08-27 Michael Stahl clean up SwXTextPortion: prefix members, remove casts, etc. remove SwXRubyPortion: replace it with another SwXTextPortion constructor 2009-08-27 Michael Stahl #i102541# SwXReferenceMark::InsertRefMark(): use flag SETATTR_DONTEXPAND 2009-08-27 Michael Stahl rename SwTxtNode::Insert to SwTxtNode::InsertHint, and fix constness in SwTxtNode::InsertItem 2009-08-27 Michael Stahl turn SwTxtNode::MakeTxtAttr() methods into global functions in ndhints.hxx 2009-08-27 Michael Stahl remove obsolete sw/inc/bookmrk.hxx 2009-08-27 Michael Stahl pam.cxx: fix ComparePosition functions (returned wrong result in one case) 2009-08-27 Michael Stahl #i103613# only import RDF metadata on normal open of a document 2009-09-11 kz CWS-TOOLING: integrate CWS impress176 2009-09-08 20:18:24 +0200 sj r275957 : fixed warning (shadowed variable) 2009-09-08 18:02:05 +0200 cl r275948 : #i104315# added missing tab pages 2009-09-08 17:35:18 +0200 cl r275947 : #i104866# fixed angle import 2009-09-08 17:32:53 +0200 cl r275946 : #i104841# fixed angle import 2009-09-08 17:01:25 +0200 cl r275943 : #i103935# fixed the SID_EVENTCONFIG mess 2009-09-08 14:32:57 +0200 sj r275928 : #i104685# only comments 2009-09-07 12:37:36 +0200 sj r275886 : #i104683# fixed import of bold/italic attributes for normal text shapes 2009-09-04 15:07:46 +0200 sj r275808 : #104689# fixed bullet color problem 2009-09-03 15:25:07 +0200 sj r275753 : #160200# added vertical alignment of table cells 2009-09-11 kz CWS-TOOLING: integrate CWS dv14 2009-09-10 15:16:32 +0200 sg r276035 : #160513# updated wfs scheme to accept ports 2009-09-10 07:41:47 +0200 dv r276019 : #i104942# Better renaming algorithmen 2009-08-31 13:41:11 +0200 dv r275604 : #160505# Setting APP1PRODUCTNAME must not overwrite APP1PRODUCTDEF 2009-09-11 kz CWS-TOOLING: integrate CWS jl131 2009-09-02 16:42:40 +0200 jl r275720 : #i97896# 2009-08-31 13:01:53 +0200 jl r275599 : CWS-TOOLING: rebase CWS jl131 to trunk@275331 (milestone: DEV300:m56) 2009-07-31 14:35:30 +0200 jl r274531 : CWS-TOOLING: rebase CWS jl131 to trunk@274203 (milestone: DEV300:m53) 2009-07-23 14:20:32 +0200 jl r274272 : #i79839# better error text when trying to modify shared layer without having write permission, eg. unopkg add --shared, unopkg remove --shared, unopkg reinstall --shared 2009-07-22 16:38:02 +0200 jl r274252 : #i97896# localize error message for lock file 2009-07-22 16:37:22 +0200 jl r274251 : #i80462# unprecise wording in updatedialog 2009-07-22 16:36:06 +0200 jl r274250 : #i97896# localize error message for lock file 2009-07-22 16:35:20 +0200 jl r274249 : #i97896# localize error message for lock file 2009-07-22 15:07:30 +0200 jl r274242 : #i98873# minimum java version is 1.5 since OOo 3.0 2009-09-11 kz CWS-TOOLING: integrate CWS changehc 2009-08-31 19:38:50 +0200 pl r275633 : remove dbug printf 2009-08-31 17:41:50 +0200 pl r275623 : CWS-TOOLING: rebase CWS changehc to trunk@275331 (milestone: DEV300:m56) 2009-07-15 19:45:46 +0200 pl r274028 : #i35482# use HC flag to decide high contrast mode 2009-07-15 17:40:52 +0200 pl r274020 : #i35482# use HC flag to decide high contrast mode 2009-07-15 17:39:50 +0200 pl r274019 : #i35482# update autohc correctly in MergeSystemSettings 2009-07-15 17:38:57 +0200 pl r274018 : #i35482# update autohc correctly in MergeSystemSettings 2009-09-11 kz CWS-TOOLING: integrate CWS notes10 2009-08-24 07:25:57 +0200 mod r275287 : 2009-07-26 02:38:32 +0200 mod r274343 : #i#i103645# 2009-07-26 02:01:53 +0200 mod r274342 : #i103645# 2009-07-26 01:52:42 +0200 mod r274341 : #i103490# 2009-07-22 08:31:48 +0200 mod r274215 : #i103373# 2009-07-15 00:55:11 +0200 mod r273987 : #i101419# 2009-07-14 07:07:55 +0200 mod r273956 : #i101419# 2009-07-14 07:07:43 +0200 mod r273955 : #i101419# 2009-07-14 07:02:10 +0200 mod r273954 : changes from notes9 2009-07-14 06:14:25 +0200 mod r273953 : #i103476# 2009-09-11 kz CWS-TOOLING: integrate CWS ab70 2009-09-10 15:12:54 +0200 jsk r276034 : #i85434# - mandatory automatic update test 2009-09-10 15:11:06 +0200 jsk r276033 : #i85434# - mandatory automatic update test 2009-09-02 09:49:24 +0200 ab r275698 : #i85434# Dialog Import 2009-09-11 kz CWS-TOOLING: integrate CWS hb32bugs02 2009-09-02 Henning Brinkmann #i102420# revert changes 2009-08-26 Henning Brinkmann merged DEV300_m56 2009-08-19 Henning Brinkmann merged DEV300_m55 2009-08-14 Henning Brinkmann merged changes from wntmsci12 2009-08-12 Henning Brinkmann Implemented NoSpaceEdit constructor and destructor in .cxx to allow compile with debug on wntmsci12. 2009-08-12 Henning Brinkmann Added some SW_DLLPUBLIC to make compilable on wntmsci12. 2009-08-11 Henning Brinkmann #i102420# dbg_out: surround output for SwNodes with <nodes-array>. 2009-08-10 Henning Brinkmann #i102420# rewritten debug output for SwNodes. 2009-08-07 Henning Brinkmann #i102420# debug _MoveNodes: output the destination, too. Break after two iterations. 2009-08-07 Henning Brinkmann #i102420# _MoveNodes: Additionally check if destination index is inside source => false Check if current range was already handled => loop Debug output current range 2009-08-06 Henning Brinkmann merged DEV300_m54 2009-08-06 Henning Brinkmann added master fix 2009-08-06 Henning Brinkmann debug output for SwNodeRange 2009-08-04 Henning Brinkmann #i102844# robustness: check for NULL pointer to prevent crash 2009-08-03 Henning Brinkmann #i103475# applied patch and verified 2009-08-03 Henning Brinkmann Removed code preventing build of sw with DEBUG. 2009-09-11 convert-repo update tags 2009-09-10 kz CWS-TOOLING: integrate CWS os2port06dev300 2009-09-05 22:49:00 +0200 ydario r275858 : #i99588# applied os2port06 diff to DEV300 tree. 2009-09-10 kz CWS-TOOLING: integrate CWS mingwport23 2009-08-29 07:07:53 +0200 tono r275555 : i#104522: mingw port graphite 2009-08-29 07:07:26 +0200 tono r275554 : i#104522: mingw port printf format fix 2009-09-10 kz CWS-TOOLING: integrate CWS mh232 2009-08-26 03:52:57 +0200 mh r275385 : #i102182# FreeBSD patch 2009-08-26 03:43:20 +0200 mh r275384 : #i101333# patch for FreeBSD 2009-08-26 03:11:20 +0200 mh r275383 : #i39230 2009-08-26 03:07:51 +0200 mh r275382 : #i39230# more space for initials field 2009-08-26 02:41:19 +0200 mh r275380 : #i39230# use vos::osecurity for reading the user name 2009-08-18 22:06:00 +0200 mh r275130 : #i104243#, line ending problem with newer perl 2009-08-18 21:53:21 +0200 mh r275129 : #i39230# read initials via getpwnam 2009-08-18 21:34:05 +0200 mh r275128 : enable CAIROCANVAS for Linux and Mac, #i88613# 2009-08-17 18:02:59 +0200 mh r275067 : #i95498# make compile with gcc3 2009-09-10 kz CWS-TOOLING: integrate CWS tkr24 2009-09-07 14:31:06 +0200 is r275898 : #160081# adding NO_LICENSE_INTO_COPYRIGHT 2009-09-10 releng #i10000# change KeyMapping to SingletonRef<framework::KeyMapping> 2009-09-11 convert-repo update tags 2009-09-10 kz CWS-TOOLING: integrate CWS os2port06dev300 2009-09-05 22:49:00 +0200 ydario r275858 : #i99588# applied os2port06 diff to DEV300 tree. 2009-09-10 kz CWS-TOOLING: integrate CWS mingwport23 2009-08-29 07:07:53 +0200 tono r275555 : i#104522: mingw port graphite 2009-08-29 07:07:26 +0200 tono r275554 : i#104522: mingw port printf format fix 2009-09-10 kz CWS-TOOLING: integrate CWS mh232 2009-08-26 03:52:57 +0200 mh r275385 : #i102182# FreeBSD patch 2009-08-26 03:43:20 +0200 mh r275384 : #i101333# patch for FreeBSD 2009-08-26 03:11:20 +0200 mh r275383 : #i39230 2009-08-26 03:07:51 +0200 mh r275382 : #i39230# more space for initials field 2009-08-26 02:41:19 +0200 mh r275380 : #i39230# use vos::osecurity for reading the user name 2009-08-18 22:06:00 +0200 mh r275130 : #i104243#, line ending problem with newer perl 2009-08-18 21:53:21 +0200 mh r275129 : #i39230# read initials via getpwnam 2009-08-18 21:34:05 +0200 mh r275128 : enable CAIROCANVAS for Linux and Mac, #i88613# 2009-08-17 18:02:59 +0200 mh r275067 : #i95498# make compile with gcc3 2009-09-10 kz CWS-TOOLING: integrate CWS tkr24 2009-09-07 14:31:06 +0200 is r275898 : #160081# adding NO_LICENSE_INTO_COPYRIGHT 2009-09-10 releng #i10000# change KeyMapping to SingletonRef<framework::KeyMapping>
2009-09-11 14:29:45 +00:00
SwFmtFlyCnt aFmt( pFmt );
pNd->InsertItem(aFmt,
2000-09-18 23:08:29 +00:00
aAnch.GetCntntAnchor()->nContent.GetIndex(), 0 );
SwFmtVertOrient aVertical( pFmt->GetVertOrient() );
aVertical.SetVertOrient( text::VertOrientation::LINE_CENTER );
pFmt->SetFmtAttr( aVertical );
2000-09-18 23:08:29 +00:00
}
if( pAnch->IsTxtFrm() && ((SwTxtFrm*)pAnch)->IsFollow() )
{
SwTxtFrm* pTmp = (SwTxtFrm*)pAnch;
do {
pTmp = pTmp->FindMaster();
OSL_ENSURE( pTmp, "Where's my Master?" );
2000-09-18 23:08:29 +00:00
} while( pTmp->IsFollow() );
pAnch = pTmp;
}
2000-09-18 23:08:29 +00:00
pContact->ConnectToLayout();
2011-02-08 08:51:51 +01:00
// mark object at frame the object is inserted at.
{
SdrObject* pMarkObj = pContact->GetDrawObjectByAnchorFrm( *pAnch );
if ( pMarkObj )
{
Imp()->GetDrawView()->MarkObj( pMarkObj, Imp()->GetPageView(),
sal_False, sal_False );
}
else
{
Imp()->GetDrawView()->MarkObj( &rSdrObj, Imp()->GetPageView(),
sal_False, sal_False );
}
}
2000-09-18 23:08:29 +00:00
}
GetDoc()->SetModified();
KillPams();
EndAllActionAndCall();
UnlockPaint();
return sal_True;
2000-09-18 23:08:29 +00:00
}
/*************************************************************************
|*
|* SwFEShell::BreakCreate()
|*
*************************************************************************/
void SwFEShell::BreakCreate()
{
OSL_ENSURE( Imp()->HasDrawView(), "BreakCreate without DrawView?" );
2000-09-18 23:08:29 +00:00
Imp()->GetDrawView()->BrkCreateObj();
::FrameNotify( this, FLY_DRAG_END );
}
/*************************************************************************
|*
|* SwFEShell::IsDrawCreate()
|*
*************************************************************************/
bool SwFEShell::IsDrawCreate() const
2000-09-18 23:08:29 +00:00
{
return Imp()->HasDrawView() ? Imp()->GetDrawView()->IsCreateObj() : false;
2000-09-18 23:08:29 +00:00
}
/*************************************************************************
|*
|* SwFEShell::BeginMark()
|*
*************************************************************************/
sal_Bool SwFEShell::BeginMark( const Point &rPos )
2000-09-18 23:08:29 +00:00
{
if ( !Imp()->HasDrawView() )
Imp()->MakeDrawView();
if ( GetPageNumber( rPos ) )
{
SwDrawView* pDView = Imp()->GetDrawView();
if (pDView->HasMarkablePoints())
return pDView->BegMarkPoints( rPos );
2000-09-18 23:08:29 +00:00
else
return pDView->BegMarkObj( rPos );
2000-09-18 23:08:29 +00:00
}
else
return sal_False;
2000-09-18 23:08:29 +00:00
}
/*************************************************************************
|*
|* SwFEShell::MoveMark()
|*
*************************************************************************/
void SwFEShell::MoveMark( const Point &rPos )
{
OSL_ENSURE( Imp()->HasDrawView(), "MoveMark without DrawView?" );
2000-09-18 23:08:29 +00:00
if ( GetPageNumber( rPos ) )
{
ScrollTo( rPos );
2000-09-18 23:08:29 +00:00
SwDrawView* pDView = Imp()->GetDrawView();
if (pDView->IsInsObjPoint())
pDView->MovInsObjPoint( rPos );
else if (pDView->IsMarkPoints())
pDView->MovMarkPoints( rPos );
else
pDView->MovAction( rPos );
}
}
/*************************************************************************
|*
|* SwFEShell::EndMark()
|*
*************************************************************************/
sal_Bool SwFEShell::EndMark()
2000-09-18 23:08:29 +00:00
{
sal_Bool bRet = sal_False;
OSL_ENSURE( Imp()->HasDrawView(), "EndMark without DrawView?" );
2000-09-18 23:08:29 +00:00
if (Imp()->GetDrawView()->IsMarkObj())
{
bRet = Imp()->GetDrawView()->EndMarkObj();
if ( bRet )
{
bool bShowHdl = false;
2000-09-18 23:08:29 +00:00
SwDrawView* pDView = Imp()->GetDrawView();
// frames are not selected this way, except when
// it is only one frame
SdrMarkList &rMrkList = (SdrMarkList&)pDView->GetMarkedObjectList();
2000-09-18 23:08:29 +00:00
SwFlyFrm* pOldSelFly = ::GetFlyFromMarked( &rMrkList, this );
if ( rMrkList.GetMarkCount() > 1 )
for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i )
2000-09-18 23:08:29 +00:00
{
SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
if( pObj->ISA(SwVirtFlyDrawObj) )
2000-09-18 23:08:29 +00:00
{
if ( !bShowHdl )
{
bShowHdl = true;
2000-09-18 23:08:29 +00:00
}
rMrkList.DeleteMark( i );
--i; // no exceptions
2000-09-18 23:08:29 +00:00
}
}
if( bShowHdl )
{
pDView->MarkListHasChanged();
pDView->AdjustMarkHdl();
}
if ( rMrkList.GetMarkCount() )
::lcl_GrabCursor(this, pOldSelFly);
else
bRet = sal_False;
2000-09-18 23:08:29 +00:00
}
if ( bRet )
::FrameNotify( this, FLY_DRAG_START );
}
else
{
if (Imp()->GetDrawView()->IsMarkPoints())
bRet = Imp()->GetDrawView()->EndMarkPoints();
}
SetChainMarker();
return bRet;
}
/*************************************************************************
|*
|* SwFEShell::BreakSelect()
|*
*************************************************************************/
void SwFEShell::BreakMark()
{
OSL_ENSURE( Imp()->HasDrawView(), "BreakMark without DrawView?" );
2000-09-18 23:08:29 +00:00
Imp()->GetDrawView()->BrkMarkObj();
}
/*************************************************************************
|*
|* SwFEShell::GetAnchorId()
|*
*************************************************************************/
short SwFEShell::GetAnchorId() const
{
short nRet = SHRT_MAX;
if ( Imp()->HasDrawView() )
{
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i )
2000-09-18 23:08:29 +00:00
{
SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
if ( pObj->ISA(SwVirtFlyDrawObj) )
2000-09-18 23:08:29 +00:00
{
nRet = -1;
break;
}
SwDrawContact *pContact = (SwDrawContact*)GetUserCall(pObj);
short nId = static_cast<short>(pContact->GetFmt()->GetAnchor().GetAnchorId());
2000-09-18 23:08:29 +00:00
if ( nRet == SHRT_MAX )
nRet = nId;
else if ( nRet != nId )
{
nRet = -1;
break;
}
}
}
if ( nRet == SHRT_MAX )
nRet = -1;
return nRet;
}
/*************************************************************************
|*
|* SwFEShell::ChgAnchor()
|*
*************************************************************************/
void SwFEShell::ChgAnchor( int eAnchorId, bool bSameOnly, bool bPosCorr )
2000-09-18 23:08:29 +00:00
{
OSL_ENSURE( Imp()->HasDrawView(), "ChgAnchor without DrawView?" );
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
2000-09-18 23:08:29 +00:00
if( rMrkList.GetMarkCount() &&
!rMrkList.GetMark( 0 )->GetMarkedSdrObj()->GetUpGroup() )
2000-09-18 23:08:29 +00:00
{
StartAllAction();
if( GetDoc()->ChgAnchor( rMrkList, (RndStdIds)eAnchorId, bSameOnly, bPosCorr ))
2000-09-18 23:08:29 +00:00
Imp()->GetDrawView()->UnmarkAll();
EndAllAction();
::FrameNotify( this, FLY_DRAG );
}
}
/*************************************************************************
|*
|* SwFEShell::DelSelectedObj()
|*
*************************************************************************/
void SwFEShell::DelSelectedObj()
{
OSL_ENSURE( Imp()->HasDrawView(), "DelSelectedObj(), no DrawView available" );
2000-09-18 23:08:29 +00:00
if ( Imp()->HasDrawView() )
{
StartAllAction();
Imp()->GetDrawView()->DeleteMarked();
EndAllAction();
::FrameNotify( this, FLY_DRAG_END );
}
}
/*************************************************************************
|*
|* SwFEShell::GetObjSize(), GetAnchorObjDiff()
|*
|* Description For the statusline to request the current
|* conditions
2000-09-18 23:08:29 +00:00
|*
*************************************************************************/
Size SwFEShell::GetObjSize() const
{
Rectangle aRect;
if ( Imp()->HasDrawView() )
{
if ( Imp()->GetDrawView()->IsAction() )
Imp()->GetDrawView()->TakeActionRect( aRect );
else
aRect = Imp()->GetDrawView()->GetAllMarkedRect();
}
return aRect.GetSize();
}
Point SwFEShell::GetAnchorObjDiff() const
{
const SdrView *pView = Imp()->GetDrawView();
OSL_ENSURE( pView, "GetAnchorObjDiff without DrawView?" );
2000-09-18 23:08:29 +00:00
Rectangle aRect;
if ( Imp()->GetDrawView()->IsAction() )
Imp()->GetDrawView()->TakeActionRect( aRect );
else
aRect = Imp()->GetDrawView()->GetAllMarkedRect();
Point aRet( aRect.TopLeft() );
if ( IsFrmSelected() )
{
SwFlyFrm *pFly = FindFlyFrm();
aRet -= pFly->GetAnchorFrm()->Frm().Pos();
2000-09-18 23:08:29 +00:00
}
else
{
const SdrObject *pObj = pView->GetMarkedObjectList().GetMarkCount() == 1 ?
pView->GetMarkedObjectList().GetMark(0)->GetMarkedSdrObj() : 0;
2000-09-18 23:08:29 +00:00
if ( pObj )
aRet -= pObj->GetAnchorPos();
}
return aRet;
}
Point SwFEShell::GetObjAbsPos() const
{
OSL_ENSURE( Imp()->GetDrawView(), "GetObjAbsPos() without DrawView?" );
2000-09-18 23:08:29 +00:00
return Imp()->GetDrawView()->GetDragStat().GetActionRect().TopLeft();
}
/*************************************************************************
|*
|* SwFEShell::IsGroupSelected()
|*
*************************************************************************/
sal_Bool SwFEShell::IsGroupSelected()
2000-09-18 23:08:29 +00:00
{
if ( IsObjSelected() )
{
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i )
2000-09-18 23:08:29 +00:00
{
SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
2011-02-08 08:51:51 +01:00
// consider 'virtual' drawing objects.
// Thus, use corresponding method instead of checking type.
if ( pObj->IsGroupObject() &&
2011-02-08 08:51:51 +01:00
// --> #i38505# No ungroup allowed for 3d objects
!pObj->Is3DObj() &&
FLY_AS_CHAR != ((SwDrawContact*)GetUserCall(pObj))->
GetFmt()->GetAnchor().GetAnchorId() )
{
return sal_True;
}
2000-09-18 23:08:29 +00:00
}
}
return sal_False;
2000-09-18 23:08:29 +00:00
}
2011-02-08 08:51:51 +01:00
// Change return type.
// Adjustments for drawing objects in header/footer:
// allow group, only if all selected objects are in the same header/footer
// or not in header/footer.
bool SwFEShell::IsGroupAllowed() const
2000-09-18 23:08:29 +00:00
{
bool bIsGroupAllowed = false;
2000-09-18 23:08:29 +00:00
if ( IsObjSelected() > 1 )
{
bIsGroupAllowed = true;
const SdrObject* pUpGroup = 0L;
const SwFrm* pHeaderFooterFrm = 0L;
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
for ( sal_uInt16 i = 0; bIsGroupAllowed && i < rMrkList.GetMarkCount(); ++i )
2000-09-18 23:08:29 +00:00
{
const SdrObject* pObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
if ( i )
bIsGroupAllowed = pObj->GetUpGroup() == pUpGroup;
2000-09-18 23:08:29 +00:00
else
pUpGroup = pObj->GetUpGroup();
if ( bIsGroupAllowed )
{
SwFrmFmt* pFrmFmt( ::FindFrmFmt( const_cast<SdrObject*>(pObj) ) );
if ( !pFrmFmt )
{
OSL_FAIL( "<SwFEShell::IsGroupAllowed()> - missing frame format" );
bIsGroupAllowed = false;
}
else if ( FLY_AS_CHAR == pFrmFmt->GetAnchor().GetAnchorId() )
{
bIsGroupAllowed = false;
}
}
2011-02-08 08:51:51 +01:00
// check, if all selected objects are in the
// same header/footer or not in header/footer.
if ( bIsGroupAllowed )
{
const SwFrm* pAnchorFrm = 0L;
if ( pObj->ISA(SwVirtFlyDrawObj) )
{
const SwFlyFrm* pFlyFrm =
static_cast<const SwVirtFlyDrawObj*>(pObj)->GetFlyFrm();
if ( pFlyFrm )
{
pAnchorFrm = pFlyFrm->GetAnchorFrm();
}
}
else
{
SwDrawContact* pDrawContact = static_cast<SwDrawContact*>(GetUserCall( pObj ));
if ( pDrawContact )
{
pAnchorFrm = pDrawContact->GetAnchorFrm( pObj );
}
}
if ( pAnchorFrm )
{
if ( i )
{
bIsGroupAllowed =
( pAnchorFrm->FindFooterOrHeader() == pHeaderFooterFrm );
}
else
{
pHeaderFooterFrm = pAnchorFrm->FindFooterOrHeader();
}
}
}
2000-09-18 23:08:29 +00:00
}
}
return bIsGroupAllowed;
2000-09-18 23:08:29 +00:00
}
/*************************************************************************
|*
|* SwFEShell::GroupSelection()
|*
|* Description The group gets the anchor and the contactobject
|* of the first in the selection
2000-09-18 23:08:29 +00:00
|*
*************************************************************************/
void SwFEShell::GroupSelection()
{
if ( IsGroupAllowed() )
{
StartAllAction();
StartUndo( UNDO_START );
GetDoc()->GroupSelection( *Imp()->GetDrawView() );
EndUndo( UNDO_END );
EndAllAction();
}
}
/*************************************************************************
|*
|* SwFEShell::UnGroupSelection()
|*
|* Description The individual objects get a copy of the anchor and
|* the contactobject of the group
2000-09-18 23:08:29 +00:00
|*
*************************************************************************/
void SwFEShell::UnGroupSelection()
{
if ( IsGroupSelected() )
{
StartAllAction();
StartUndo( UNDO_START );
GetDoc()->UnGroupSelection( *Imp()->GetDrawView() );
EndUndo( UNDO_END );
EndAllAction();
}
}
/*************************************************************************
|*
|* SwFEShell::MirrorSelection()
|*
*************************************************************************/
void SwFEShell::MirrorSelection( bool bHorizontal )
2000-09-18 23:08:29 +00:00
{
SdrView *pView = Imp()->GetDrawView();
if ( IsObjSelected() && pView->IsMirrorAllowed() )
{
if ( bHorizontal )
pView->MirrorAllMarkedHorizontal();
else
pView->MirrorAllMarkedVertical();
}
}
// jump to named frame (Graphic/OLE)
2000-09-18 23:08:29 +00:00
sal_Bool SwFEShell::GotoFly( const OUString& rName, FlyCntType eType, sal_Bool bSelFrm )
2000-09-18 23:08:29 +00:00
{
sal_Bool bRet = sal_False;
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
static sal_uInt8 const aChkArr[ 4 ] = {
2000-09-18 23:08:29 +00:00
/* FLYCNTTYPE_ALL */ 0,
/* FLYCNTTYPE_FRM */ ND_TEXTNODE,
/* FLYCNTTYPE_GRF */ ND_GRFNODE,
/* FLYCNTTYPE_OLE */ ND_OLENODE
};
const SwFlyFrmFmt* pFlyFmt = mpDoc->FindFlyByName( rName, aChkArr[ eType]);
2000-09-18 23:08:29 +00:00
if( pFlyFmt )
{
SET_CURR_SHELL( this );
SwFlyFrm* pFrm = SwIterator<SwFlyFrm,SwFmt>::FirstElement( *pFlyFmt );
2000-09-18 23:08:29 +00:00
if( pFrm )
{
if( bSelFrm )
{
SelectObj( pFrm->Frm().Pos(), 0, pFrm->GetVirtDrawObj() );
2000-09-18 23:08:29 +00:00
if( !ActionPend() )
MakeVisible( pFrm->Frm() );
}
else
{
SwCntntFrm *pCFrm = pFrm->ContainsCntnt();
if ( pCFrm )
{
SwCntntNode *pCNode = pCFrm->GetNode();
ClearMark();
SwPaM* pCrsr = GetCrsr();
pCrsr->GetPoint()->nNode = *pCNode;
pCrsr->GetPoint()->nContent.Assign( pCNode, 0 );
SwRect& rChrRect = (SwRect&)GetCharRect();
rChrRect = pFrm->Prt();
rChrRect.Pos() += pFrm->Frm().Pos();
GetCrsrDocPos() = rChrRect.Pos();
}
}
bRet = sal_True;
2000-09-18 23:08:29 +00:00
}
}
return bRet;
}
sal_uInt16 SwFEShell::GetFlyCount( FlyCntType eType ) const
2000-09-18 23:08:29 +00:00
{
return GetDoc()->GetFlyCount(eType);
}
const SwFrmFmt* SwFEShell::GetFlyNum(sal_uInt16 nIdx, FlyCntType eType ) const
2000-09-18 23:08:29 +00:00
{
return GetDoc()->GetFlyNum(nIdx, eType );
}
// show the current selected object
2000-09-18 23:08:29 +00:00
void SwFEShell::MakeSelVisible()
{
if( Imp()->HasDrawView() &&
Imp()->GetDrawView()->GetMarkedObjectList().GetMarkCount() )
2000-09-18 23:08:29 +00:00
{
MakeVisible( Imp()->GetDrawView()->GetAllMarkedRect() );
}
else
SwCrsrShell::MakeSelVisible();
}
// how is the selected object protected?
sal_uInt8 SwFEShell::IsSelObjProtected( sal_uInt16 eType ) const
2000-09-18 23:08:29 +00:00
{
int nChk = 0;
const bool bParent = (eType & FLYPROTECT_PARENT);
2000-09-18 23:08:29 +00:00
if( Imp()->HasDrawView() )
{
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
for( sal_uLong i = rMrkList.GetMarkCount(); i; )
2000-09-18 23:08:29 +00:00
{
SdrObject *pObj = rMrkList.GetMark( --i )->GetMarkedSdrObj();
2000-09-18 23:08:29 +00:00
if( !bParent )
{
nChk |= ( pObj->IsMoveProtect() ? FLYPROTECT_POS : 0 ) |
( pObj->IsResizeProtect()? FLYPROTECT_SIZE : 0 );
if( pObj->ISA(SwVirtFlyDrawObj) )
2000-09-18 23:08:29 +00:00
{
SwFlyFrm *pFly = ((SwVirtFlyDrawObj*)pObj)->GetFlyFrm();
if ( (FLYPROTECT_CONTENT & eType) && pFly->GetFmt()->GetProtect().IsCntntProtected() )
2000-09-18 23:08:29 +00:00
nChk |= FLYPROTECT_CONTENT;
if ( pFly->Lower() && pFly->Lower()->IsNoTxtFrm() )
{
SwOLENode *pNd = ((SwCntntFrm*)pFly->Lower())->GetNode()->GetOLENode();
uno::Reference < embed::XEmbeddedObject > xObj( pNd ? pNd->GetOLEObj().GetOleRef() : 0 );
if ( xObj.is() )
2000-09-18 23:08:29 +00:00
{
// TODO/LATER: use correct aspect
const bool bNeverResize = (embed::EmbedMisc::EMBED_NEVERRESIZE & xObj->getStatus( embed::Aspects::MSOLE_CONTENT ));
Resolves: #i121420# merge sidebar feature (cherry picked from commit 0a0a9b32aa5bf1ce2554ad37cbba3c7a105db2b5) Conflicts: chart2/source/controller/dialogs/dlg_View3D.cxx chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx chart2/source/controller/drawinglayer/ViewElementListProvider.cxx chart2/source/controller/inc/ViewElementListProvider.hxx chart2/source/controller/inc/dlg_View3D.hxx chart2/source/controller/main/ShapeController.cxx chart2/source/inc/chartview/DrawModelWrapper.hxx chart2/source/view/main/DrawModelWrapper.cxx cui/source/inc/border.hxx cui/source/inc/cuitabarea.hxx cui/source/inc/cuitabline.hxx cui/source/inc/sdrcelldlg.hxx cui/source/inc/treeopt.hxx cui/source/options/optchart.cxx cui/source/options/optchart.hxx cui/source/options/optcolor.cxx cui/source/options/treeopt.cxx cui/source/tabpages/backgrnd.cxx cui/source/tabpages/border.cxx cui/source/tabpages/chardlg.cxx cui/source/tabpages/numpages.cxx cui/source/tabpages/tpcolor.cxx cui/source/tabpages/tplneend.cxx editeng/inc/editeng/outliner.hxx extensions/source/propctrlr/standardcontrol.cxx framework/source/register/registerservices.cxx offapi/com/sun/star/ui/makefile.mk officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu officecfg/registry/data/org/openoffice/Office/UI/makefile.mk officecfg/registry/schema/org/openoffice/Office/UI/makefile.mk postprocess/packregistry/makefile.mk reportdesign/source/ui/dlg/Condition.cxx reportdesign/source/ui/misc/UITools.cxx sc/inc/document.hxx sc/inc/helpids.h sc/inc/sc.hrc sc/prj/build.lst sc/sdi/scalc.sdi sc/source/core/data/documen9.cxx sc/source/core/data/drwlayer.cxx sc/source/ui/app/scdll.cxx sc/source/ui/app/typemap.cxx sc/source/ui/dbgui/scendlg.cxx sc/source/ui/docshell/docsh2.cxx sc/source/ui/docshell/docsh4.cxx sc/source/ui/drawfunc/chartsh.cxx sc/source/ui/drawfunc/drawsh.cxx sc/source/ui/drawfunc/drawsh2.cxx sc/source/ui/drawfunc/drawsh4.cxx sc/source/ui/drawfunc/drformsh.cxx sc/source/ui/drawfunc/drtxtob.cxx sc/source/ui/drawfunc/drtxtob1.cxx sc/source/ui/drawfunc/drtxtob2.cxx sc/source/ui/drawfunc/graphsh.cxx sc/source/ui/drawfunc/oleobjsh.cxx sc/source/ui/inc/chartsh.hxx sc/source/ui/inc/formatsh.hxx sc/source/ui/miscdlgs/tabbgcolordlg.cxx sc/source/ui/navipi/navipi.cxx sc/source/ui/optdlg/opredlin.cxx sc/source/ui/optdlg/tpview.cxx sc/source/ui/sidebar/makefile.mk sc/source/ui/view/auditsh.cxx sc/source/ui/view/cellsh.cxx sc/source/ui/view/editsh.cxx sc/source/ui/view/formatsh.cxx sc/source/ui/view/pivotsh.cxx sc/source/ui/view/tabvwsh.cxx sc/util/makefile.mk sd/inc/sdabstdlg.hxx sd/prj/build.lst sd/sdi/ToolPanelViewShell.sdi sd/sdi/makefile.mk sd/source/ui/accessibility/makefile.mk sd/source/ui/animations/CustomAnimationDialog.cxx sd/source/ui/dlg/PaneChildWindows.cxx sd/source/ui/dlg/PaneShells.cxx sd/source/ui/dlg/copydlg.cxx sd/source/ui/dlg/navigatr.cxx sd/source/ui/dlg/sddlgfact.cxx sd/source/ui/dlg/sddlgfact.hxx sd/source/ui/docshell/docshel3.cxx sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx sd/source/ui/framework/factories/TaskPanelFactory.cxx sd/source/ui/framework/factories/TaskPanelFactory.hxx sd/source/ui/framework/factories/ViewShellWrapper.cxx sd/source/ui/framework/factories/makefile.mk sd/source/ui/framework/module/ImpressModule.cxx sd/source/ui/framework/module/ToolPanelModule.cxx sd/source/ui/framework/tools/FrameworkHelper.cxx sd/source/ui/func/fuolbull.cxx sd/source/ui/inc/DrawViewShell.hxx sd/source/ui/inc/PaneChildWindows.hxx sd/source/ui/inc/celltempl.hxx sd/source/ui/inc/copydlg.hxx sd/source/ui/inc/dlgpage.hxx sd/source/ui/inc/framework/FrameworkHelper.hxx sd/source/ui/inc/prltempl.hxx sd/source/ui/inc/tabtempl.hxx sd/source/ui/inc/taskpane/ILayoutableWindow.hxx sd/source/ui/inc/taskpane/PanelId.hxx sd/source/ui/inc/tpaction.hxx sd/source/ui/sidebar/AllMasterPagesSelector.cxx sd/source/ui/sidebar/AllMasterPagesSelector.hxx sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx sd/source/ui/sidebar/CurrentMasterPagesSelector.hxx sd/source/ui/sidebar/DocumentHelper.cxx sd/source/ui/sidebar/DocumentHelper.hxx sd/source/ui/sidebar/LayoutMenu.cxx sd/source/ui/sidebar/LayoutMenu.hxx sd/source/ui/sidebar/MasterPageContainer.cxx sd/source/ui/sidebar/MasterPageContainer.hxx sd/source/ui/sidebar/MasterPageContainerFiller.cxx sd/source/ui/sidebar/MasterPageContainerFiller.hxx sd/source/ui/sidebar/MasterPageContainerProviders.cxx sd/source/ui/sidebar/MasterPageContainerProviders.hxx sd/source/ui/sidebar/MasterPageContainerQueue.cxx sd/source/ui/sidebar/MasterPageContainerQueue.hxx sd/source/ui/sidebar/MasterPageDescriptor.cxx sd/source/ui/sidebar/MasterPageDescriptor.hxx sd/source/ui/sidebar/MasterPageObserver.cxx sd/source/ui/sidebar/MasterPagesSelector.cxx sd/source/ui/sidebar/MasterPagesSelector.hxx sd/source/ui/sidebar/PreviewValueSet.cxx sd/source/ui/sidebar/PreviewValueSet.hxx sd/source/ui/sidebar/RecentMasterPagesSelector.cxx sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx sd/source/ui/sidebar/SidebarShellManager.cxx sd/source/ui/sidebar/SlideTransitionPanel.hxx sd/source/ui/sidebar/makefile.mk sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx sd/source/ui/table/TableDesignPane.hxx sd/source/ui/toolpanel/ControlContainer.cxx sd/source/ui/toolpanel/ControlContainerDescriptor.hxx sd/source/ui/toolpanel/MethodGuard.hxx sd/source/ui/toolpanel/ScrollPanel.cxx sd/source/ui/toolpanel/SlideSorterCacheDisplay.cxx sd/source/ui/toolpanel/SubToolPanel.cxx sd/source/ui/toolpanel/TaskPaneFocusManager.cxx sd/source/ui/toolpanel/TaskPaneTreeNode.cxx sd/source/ui/toolpanel/TitleBar.cxx sd/source/ui/toolpanel/TitledControl.cxx sd/source/ui/toolpanel/ToolPanel.cxx sd/source/ui/toolpanel/ToolPanel.hxx sd/source/ui/toolpanel/ToolPanelFactory.cxx sd/source/ui/toolpanel/ToolPanelUIElement.cxx sd/source/ui/toolpanel/ToolPanelUIElement.hxx sd/source/ui/toolpanel/ToolPanelViewShell.cxx sd/source/ui/toolpanel/controls/CustomAnimationPanel.cxx sd/source/ui/toolpanel/controls/CustomAnimationPanel.hxx sd/source/ui/toolpanel/controls/MasterPagesPanel.cxx sd/source/ui/toolpanel/controls/MasterPagesPanel.hxx sd/source/ui/toolpanel/controls/SlideTransitionPanel.cxx sd/source/ui/toolpanel/controls/SlideTransitionPanel.hxx sd/source/ui/toolpanel/controls/TableDesignPanel.cxx sd/source/ui/toolpanel/controls/TableDesignPanel.hxx sd/source/ui/unoidl/UnoDocumentSettings.cxx sd/source/ui/view/ViewShellBase.cxx sd/source/ui/view/drtxtob.cxx sd/source/ui/view/drviews3.cxx sd/source/ui/view/drviews7.cxx sd/source/ui/view/drviewsa.cxx sd/source/ui/view/drviewsf.cxx sd/source/ui/view/outlnvsh.cxx sd/source/ui/view/sdview.cxx sd/source/ui/view/viewshel.cxx sd/uiconfig/sdraw/menubar/menubar.xml sd/util/makefile.mk sfx2/Package_inc.mk sfx2/inc/sfx2/sfx.hrc sfx2/inc/sfx2/sfxsids.hrc sfx2/source/control/bindings.cxx sfx2/source/dialog/templdlg.cxx sfx2/source/inc/templdgi.hxx svx/AllLangResTarget_svx.mk svx/Package_inc.mk svx/inc/svx/XPropertyTable.hxx svx/inc/svx/bmpmask.hxx svx/inc/svx/colrctrl.hxx svx/inc/svx/dialogs.hrc svx/inc/svx/dlgctrl.hxx svx/inc/svx/dlgutil.hxx svx/inc/svx/drawitem.hxx svx/inc/svx/fontwork.hxx svx/inc/svx/galbrws.hxx svx/inc/svx/sdr/table/tablecontroller.hxx svx/inc/svx/svdmodel.hxx svx/inc/svx/svdstr.hrc svx/inc/svx/svxids.hrc svx/inc/svx/svxitems.hrc svx/inc/svx/xattr.hxx svx/inc/svx/xflgrit.hxx svx/inc/svx/xflhtit.hxx svx/inc/svx/xit.hxx svx/inc/svx/xlineit.hxx svx/inc/svx/xlndsit.hxx svx/inc/svx/xlnedit.hxx svx/inc/svx/xlnstit.hxx svx/inc/svx/xtable.hxx svx/sdi/svx.sdi svx/source/dialog/_bmpmask.cxx svx/source/dialog/dialcontrol.cxx svx/source/dialog/dlgctrl.cxx svx/source/dialog/dlgutil.cxx svx/source/dialog/fontwork.cxx svx/source/gallery2/galbrws.cxx svx/source/gallery2/galbrws1.cxx svx/source/gallery2/gallery1.cxx svx/source/items/drawitem.cxx svx/source/items/svxitems.src svx/source/sdr/attribute/sdrformtextattribute.cxx svx/source/sidebar/ColorPanel.hxx svx/source/sidebar/EmptyPanel.hrc svx/source/sidebar/EmptyPanel.hxx svx/source/sidebar/gallery/GalleryPanel.hxx svx/source/svdraw/svdedtv1.cxx svx/source/svdraw/svdmodel.cxx svx/source/svdraw/svdogrp.cxx svx/source/svdraw/svdstr.src svx/source/tbxctrls/tbcontrl.cxx svx/source/unodraw/XPropertyTable.cxx svx/source/unodraw/unoctabl.cxx svx/source/xoutdev/XPropertyEntry.cxx svx/source/xoutdev/xattr.cxx svx/source/xoutdev/xattr2.cxx svx/source/xoutdev/xtabbtmp.cxx svx/source/xoutdev/xtabcolr.cxx svx/source/xoutdev/xtabdash.cxx svx/source/xoutdev/xtabgrdt.cxx svx/source/xoutdev/xtabhtch.cxx svx/source/xoutdev/xtable.cxx svx/source/xoutdev/xtablend.cxx svx/util/svx.component sw/inc/cmdid.h sw/inc/docsh.hxx sw/inc/editsh.hxx sw/inc/helpid.h sw/inc/rcid.hrc sw/inc/swabstdlg.hxx sw/inc/swcommands.h sw/sdi/swriter.sdi sw/source/core/doc/docdesc.cxx sw/source/core/draw/drawdoc.cxx sw/source/ui/app/docsh2.cxx sw/source/ui/app/docshdrw.cxx sw/source/ui/app/docshini.cxx sw/source/ui/app/docst.cxx sw/source/ui/config/optpage.cxx sw/source/ui/dialog/swdlgfact.cxx sw/source/ui/dialog/swdlgfact.hxx sw/source/ui/fmtui/tmpdlg.cxx sw/source/ui/inc/tmpdlg.hxx sw/source/ui/misc/pggrid.cxx 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/drawsh.cxx sw/source/ui/shells/drformsh.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/olesh.cxx sw/source/ui/shells/tabsh.cxx sw/source/ui/shells/textsh.cxx sw/source/ui/shells/textsh1.cxx sw/source/ui/shells/txtnum.cxx sw/source/ui/uiview/viewtab.cxx sw/source/ui/uno/unofreg.cxx sw/source/ui/utlui/navipi.cxx sw/util/sw.component vcl/inc/vcl/split.hxx vcl/inc/vcl/window.hxx vcl/inc/window.h vcl/source/window/split.cxx vcl/source/window/window.cxx vcl/source/window/window4.cxx Change-Id: Idebaff59f9d60e4e93290cefefdda4c5a1e9215e Resolves: #i122194# Adapted license text in propertypanel.hrc then renamed it to ResourceDefinitions.hrc (cherry picked from commit e952d1401c1adc41934118ba7f542611ef9da11b) Conflicts: sfx2/Package_inc.mk sfx2/source/sidebar/SidebarChildWindow.cxx svx/source/sidebar/graphic/GraphicPropertyPanel.cxx svx/source/sidebar/line/LinePropertyPanel.cxx svx/source/sidebar/possize/PosSizePropertyPanel.cxx sw/source/ui/sidebar/PagePropertyPanel.src sw/source/ui/sidebar/WrapPropertyPanel.src Change-Id: Ie009056a78ab108556717a501399c83b477b3548 Resolves: #i122194# finally I got the correct file name Change-Id: If7a075af8c9a829f6f0a69f883c5c6d4ac97ba2a More merge changes for optional sidebar: revert toolpanel removal, restore and re-enable task pane remove apparently un-used SidebarFactory module add extra visibility annotation to ItemReceiverUpdate
2013-04-10 08:20:16 +00:00
if ( ( (FLYPROTECT_CONTENT & eType) || (FLYPROTECT_SIZE & eType) ) && bNeverResize )
2000-09-18 23:08:29 +00:00
{
nChk |= FLYPROTECT_SIZE;
nChk |= FLYPROTECT_FIXED;
}
// set FLYPROTECT_POS if it is a Math object anchored 'as char' and baseline alignment is activated
const bool bProtectMathPos = SotExchange::IsMath( xObj->getClassID() )
&& FLY_AS_CHAR == pFly->GetFmt()->GetAnchor().GetAnchorId()
&& mpDoc->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT );
if ((FLYPROTECT_POS & eType) && bProtectMathPos)
nChk |= FLYPROTECT_POS;
2000-09-18 23:08:29 +00:00
}
}
}
nChk &= eType;
if( nChk == eType )
return static_cast<sal_uInt8>(eType);
2000-09-18 23:08:29 +00:00
}
const SwFrm* pAnch;
if( pObj->ISA(SwVirtFlyDrawObj) )
pAnch = ( (SwVirtFlyDrawObj*)pObj )->GetFlyFrm()->GetAnchorFrm();
2000-09-18 23:08:29 +00:00
else
{
SwDrawContact* pTmp = (SwDrawContact*)GetUserCall(pObj);
pAnch = pTmp ? pTmp->GetAnchorFrm( pObj ) : NULL;
2000-09-18 23:08:29 +00:00
}
if( pAnch && pAnch->IsProtected() )
return static_cast<sal_uInt8>(eType);
2000-09-18 23:08:29 +00:00
}
}
return static_cast<sal_uInt8>(nChk);
2000-09-18 23:08:29 +00:00
}
sal_Bool SwFEShell::GetObjAttr( SfxItemSet &rSet ) const
2000-09-18 23:08:29 +00:00
{
if ( !IsObjSelected() )
return sal_False;
2000-09-18 23:08:29 +00:00
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i )
2000-09-18 23:08:29 +00:00
{
SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
2000-09-18 23:08:29 +00:00
SwDrawContact *pContact = (SwDrawContact*)GetUserCall(pObj);
2011-02-08 08:51:51 +01:00
// --> make code robust
OSL_ENSURE( pContact, "<SwFEShell::GetObjAttr(..)> - missing <pContact> - please inform OD." );
if ( pContact )
{
if ( i )
rSet.MergeValues( pContact->GetFmt()->GetAttrSet() );
else
rSet.Put( pContact->GetFmt()->GetAttrSet() );
}
2000-09-18 23:08:29 +00:00
}
return sal_True;
2000-09-18 23:08:29 +00:00
}
sal_Bool SwFEShell::SetObjAttr( const SfxItemSet& rSet )
2000-09-18 23:08:29 +00:00
{
SET_CURR_SHELL( this );
if ( !rSet.Count() )
{ OSL_ENSURE( !this, "SetObjAttr, empty set." );
return sal_False;
2000-09-18 23:08:29 +00:00
}
StartAllAction();
StartUndo( UNDO_INSATTR );
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i )
2000-09-18 23:08:29 +00:00
{
SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
2000-09-18 23:08:29 +00:00
SwDrawContact *pContact = (SwDrawContact*)GetUserCall(pObj);
GetDoc()->SetAttr( rSet, *pContact->GetFmt() );
}
EndUndo( UNDO_INSATTR );
EndAllActionAndCall();
GetDoc()->SetModified();
return sal_True;
2000-09-18 23:08:29 +00:00
}
sal_Bool SwFEShell::IsAlignPossible() const
2000-09-18 23:08:29 +00:00
{
sal_uInt16 nCnt;
2000-09-18 23:08:29 +00:00
if ( 0 < (nCnt = IsObjSelected()) )
{
sal_Bool bRet = sal_True;
2000-09-18 23:08:29 +00:00
if ( nCnt == 1 )
{
SdrObject *pO = Imp()->GetDrawView()->GetMarkedObjectList().GetMark(0)->GetMarkedSdrObj();
2000-09-18 23:08:29 +00:00
SwDrawContact *pC = (SwDrawContact*)GetUserCall(pO);
OSL_ENSURE( pC, "No SwDrawContact!");
//only as character bound drawings can be aligned
bRet = pC ? (pC->GetFmt()->GetAnchor().GetAnchorId() == FLY_AS_CHAR) : sal_False;
2000-09-18 23:08:29 +00:00
}
if ( bRet )
return Imp()->GetDrawView()->IsAlignPossible();
}
return sal_False;
2000-09-18 23:08:29 +00:00
}
// temporary fix till SS of JOE is available
2000-09-18 23:08:29 +00:00
void SwFEShell::CheckUnboundObjects()
{
SET_CURR_SHELL( this );
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i )
2000-09-18 23:08:29 +00:00
{
SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
2000-09-18 23:08:29 +00:00
if ( !GetUserCall(pObj) )
{
const Rectangle &rBound = pObj->GetSnapRect();
const Point aPt( rBound.TopLeft() );
const SwFrm *pPage = GetLayout()->Lower();
const SwFrm *pLast = pPage;
while ( pPage && !pPage->Frm().IsInside( aPt ) )
{
if ( aPt.Y() > pPage->Frm().Bottom() )
pLast = pPage;
pPage = pPage->GetNext();
}
if ( !pPage )
pPage = pLast;
OSL_ENSURE( pPage, "Page not found." );
2000-09-18 23:08:29 +00:00
// Alien identifier should roll into the default,
// Duplications are possible!!
sal_uInt16 nIdent =
2000-09-18 23:08:29 +00:00
Imp()->GetDrawView()->GetCurrentObjInventor() == SdrInventor ?
Imp()->GetDrawView()->GetCurrentObjIdentifier() : 0xFFFF;
SwFmtAnchor aAnch;
{
const SwFrm *pAnch = ::FindAnchor( pPage, aPt, sal_True );
2000-09-18 23:08:29 +00:00
SwPosition aPos( *((SwCntntFrm*)pAnch)->GetNode() );
aAnch.SetType( FLY_AT_PARA );
2000-09-18 23:08:29 +00:00
aAnch.SetAnchor( &aPos );
((SwRect&)GetCharRect()).Pos() = aPt;
}
// First the action here, to assure GetCharRect delivers current values.
2000-09-18 23:08:29 +00:00
StartAllAction();
SfxItemSet aSet( GetAttrPool(), RES_FRM_SIZE, RES_FRM_SIZE,
RES_SURROUND, RES_ANCHOR, 0 );
aSet.Put( aAnch );
Point aRelNullPt;
if( OBJ_CAPTION == nIdent )
aRelNullPt = ((SdrCaptionObj*)pObj)->GetTailPos();
else
aRelNullPt = rBound.TopLeft();
aSet.Put( aAnch );
aSet.Put( SwFmtSurround( SURROUND_THROUGHT ) );
SwFrmFmt* pFmt = getIDocumentLayoutAccess()->MakeLayoutFmt( RND_DRAW_OBJECT, &aSet );
2000-09-18 23:08:29 +00:00
SwDrawContact *pContact = new SwDrawContact(
(SwDrawFrmFmt*)pFmt, pObj );
// #i35635#
pContact->MoveObjToVisibleLayer( pObj );
2000-09-18 23:08:29 +00:00
pContact->ConnectToLayout();
EndAllAction();
}
}
}
void SwFEShell::SetCalcFieldValueHdl(Outliner* pOutliner)
{
GetDoc()->SetCalcFieldValueHdl(pOutliner);
}
int SwFEShell::Chainable( SwRect &rRect, const SwFrmFmt &rSource,
const Point &rPt ) const
{
rRect.Clear();
// The source is not allowed to have a follow.
2000-09-18 23:08:29 +00:00
const SwFmtChain &rChain = rSource.GetChain();
if ( rChain.GetNext() )
return SW_CHAIN_SOURCE_CHAINED;
if( Imp()->HasDrawView() )
{
SdrObject* pObj;
SdrPageView* pPView;
SwDrawView *pDView = (SwDrawView*)Imp()->GetDrawView();
const sal_uInt16 nOld = pDView->GetHitTolerancePixel();
2000-09-18 23:08:29 +00:00
pDView->SetHitTolerancePixel( 0 );
CWS-TOOLING: integrate CWS aw065 2009-06-17 13:48:12 +0200 aw r273068 : #99385# corrected small error in SCs selection visualisation 2009-06-16 15:45:28 +0200 wg r273021 : i102838 2009-06-16 12:46:07 +0200 wg r273016 : i102833 2009-06-11 17:40:29 +0200 aw r272895 : #i98870# added implementation for getPageCount helper 2009-06-11 16:39:54 +0200 aw r272885 : #i102663#, #i102667#, #i98870# incluide file typo corrected 2009-06-11 16:24:07 +0200 aw r272881 : #i102663#, #i102667#, #i98870# changes to SdrText, it's usage in SdrTextPrimitive2D and to OverlayObject base implementation. Also support for PageCountField added 2009-06-11 16:23:52 +0200 aw r272880 : #i102663#, #i102667#, #i98870# changes to SdrText, it's usage in SdrTextPrimitive2D and to OverlayObject base implementation. Also support for PageCountField added 2009-06-09 13:50:29 +0200 aw r272769 : #i98917# added support for the OverlayHatchRectanglePrimitive to follow rotation with it's hatch; simplified OverlayHatchRect 2009-06-09 13:04:06 +0200 aw r272766 : #i98870# re-added PageNumber identification in SdrTextPrimitive2D::get2DDecomposition 2009-06-08 18:56:05 +0200 aw r272744 : #i99385# added some last corrections to OverlayObjects in SD (had to do some merges on resync, needed to optically check and correct) 2009-06-08 11:17:57 +0200 aw r272725 : cws aw065: corrections after resync 2009-06-08 11:02:25 +0200 aw r272723 : cws aw065: corrections after resync 2009-06-08 10:36:22 +0200 aw r272722 : cws aw065: corrections after resync 2009-06-05 18:57:06 +0200 aw r272712 : CWS-TOOLING: rebase CWS aw065 to trunk@272291 (milestone: DEV300:m49) 2009-06-05 14:56:34 +0200 aw r272690 : #i89784# stripped old stuff no longer needed due to text-to-polygon conversion using primitives 2009-06-05 14:50:07 +0200 aw r272688 : #102091# removed on-model-lock suppression for SdrObject::ActionChanged() 2009-06-05 14:47:29 +0200 aw r272687 : #102091# corrected local value buffering in ScenePrimitive2D::get2DDecomposition 2009-06-03 17:53:32 +0200 aw r272599 : #i89784# version before stripping 2009-06-03 17:52:18 +0200 aw r272598 : #i89784# version before stripping 2009-05-28 17:15:47 +0200 aw r272420 : #i101872# old stuff removed/stripped 2009-05-28 17:15:32 +0200 aw r272419 : #i101872# old stuff removed/stripped 2009-05-28 17:15:15 +0200 aw r272418 : #i101872# old stuff removed/stripped 2009-05-28 17:14:45 +0200 aw r272417 : #i101872# old stuff removed/stripped 2009-05-28 12:13:56 +0200 aw r272396 : #i101872# stable hybrid state 2009-05-28 12:13:46 +0200 aw r272395 : #i101872# stable hybrid state 2009-05-28 12:13:35 +0200 aw r272394 : #i101872# stable hybrid state 2009-05-28 12:13:20 +0200 aw r272393 : #i101872# stable hybrid state 2009-05-28 12:13:05 +0200 aw r272392 : #i101872# stable hybrid state 2009-05-28 12:12:51 +0200 aw r272391 : #i101872# stable hybrid state 2009-05-15 16:56:02 +0200 aw r271952 : #i101872# HitTest unifications 2009-05-15 16:55:22 +0200 aw r271951 : #i101872# HitTest unifications 2009-05-15 16:55:12 +0200 aw r271950 : #i101872# HitTest unifications 2009-05-15 16:55:01 +0200 aw r271949 : #i101872# HitTest unifications 2009-05-15 16:54:51 +0200 aw r271948 : #i101872# HitTest unifications 2009-05-15 16:54:35 +0200 aw r271947 : #i101872# HitTest unifications 2009-05-15 16:54:22 +0200 aw r271946 : #i101872# HitTest unifications 2009-05-12 19:08:38 +0200 aw r271834 : #i101684# corrected AutoShape's preparation of text transformation due to different definitions in TextBounds 2009-05-12 15:44:49 +0200 aw r271827 : #i89784# expanded TextLayouterDevice::getTextOutlines() to support DXArray and X-Font scaling 2009-05-11 19:40:40 +0200 aw r271790 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications 2009-05-11 19:40:25 +0200 aw r271789 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications 2009-05-11 19:40:12 +0200 aw r271788 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications 2009-05-11 13:01:53 +0200 aw r271765 : #i99385# corrections and optimizations 2009-05-08 14:48:40 +0200 aw r271718 : #i1016180# added optimizations in model operations when model is locked 2009-05-08 14:11:45 +0200 aw r271716 : #i101679# added flush() calls to OverlayManager when interaction step is prepared 2009-05-07 17:44:03 +0200 aw r271689 : #i99385# last corrections/changes 2009-05-07 17:43:47 +0200 aw r271688 : #i99385# last corrections/changes 2009-05-07 13:20:09 +0200 aw r271654 : #i99385# added changes from WFH 2009-05-07 13:19:38 +0200 aw r271653 : #i99385# added changes from WFH 2009-05-07 13:19:11 +0200 aw r271652 : #i99385# added changes from WFH 2009-05-07 11:33:17 +0200 aw r271643 : #i99385# corrections after resync 2009-05-07 11:17:31 +0200 aw r271642 : #i99385# corrections after resync 2009-05-06 18:46:53 +0200 aw r271609 : CWS-TOOLING: rebase CWS aw065 to trunk@271427 (milestone: DEV300:m47) 2009-05-05 18:24:03 +0200 aw r271548 : #i101443# force new text decomposition when TextBackgroundColor has changed 2009-05-05 17:44:42 +0200 aw r271542 : #i99385# 3rd round, simplifications and corrections done 2009-05-05 17:44:32 +0200 aw r271541 : #i99385# 3rd round, simplifications and corrections done 2009-05-05 17:44:20 +0200 aw r271540 : #i99385# 3rd round, simplifications and corrections done 2009-05-05 17:44:09 +0200 aw r271539 : #i99385# 3rd round, simplifications and corrections done 2009-05-05 15:48:38 +0200 aw r271527 : #i99385# 2nd round, usages checked and corrected 2009-05-05 15:48:15 +0200 aw r271526 : #i99385# 2nd round, usages checked and corrected 2009-05-05 15:48:03 +0200 aw r271525 : #i99385# 2nd round, usages checked and corrected 2009-05-05 15:47:51 +0200 aw r271524 : #i99385# 2nd round, usages checked and corrected 2009-04-27 18:33:10 +0200 aw r271300 : #i99385# state commit after all implementations are done 2009-04-27 15:36:53 +0200 aw r271283 : #i99385# state commit after all implementations are done 2009-04-27 15:27:49 +0200 aw r271280 : #i99385# state commit after all implementations are done 2009-04-27 15:27:33 +0200 aw r271279 : #i99385# state commit after all implementations are done 2009-04-27 15:27:00 +0200 aw r271278 : #i99385# state commit after all implementations are done 2009-04-27 15:26:15 +0200 aw r271277 : #i99385# state commit after all implementations are done 2009-04-27 15:25:40 +0200 aw r271275 : #i99385# state commit after all implementations are done 2009-04-27 15:25:19 +0200 aw r271274 : #i99385# state commit after all implementations are done 2009-04-27 15:24:00 +0200 aw r271272 : #i99385# state commit after all implementations are done 2009-03-19 17:12:00 +0100 aw r269757 : #i100360# corrected bitmap's PefSize calculation for bitmap filled objects when Bitmap is Pixel-based on it's mapping 2009-02-19 17:09:47 +0100 aw r268298 : #i98917# corrected attributes 2009-02-19 17:09:30 +0100 aw r268297 : #i98917# corrected attributes 2009-02-19 17:08:22 +0100 aw r268296 : #i98917# corrected attributes 2009-02-19 11:56:25 +0100 aw r268268 : #i98870# added extra code to react on PageNumber change 2009-02-18 16:57:24 +0100 aw r268243 : #i98917# in OverlayHatchRect::getGeometry the rotation was not applied to the TopLeft of the centered rectangle, but to the already extended one, thus the visualisation was rotating around the wrong edge
2009-07-02 14:28:15 +00:00
if( pDView->PickObj( rPt, pDView->getHitTolLog(), pObj, pPView, SDRSEARCH_PICKMARKABLE ) &&
pObj->ISA(SwVirtFlyDrawObj) )
2000-09-18 23:08:29 +00:00
{
SwFlyFrm *pFly = ((SwVirtFlyDrawObj*)pObj)->GetFlyFrm();
rRect = pFly->Frm();
// Target and source should not be equal and the list
// should not be cyclic
2000-09-18 23:08:29 +00:00
SwFrmFmt *pFmt = pFly->GetFmt();
return GetDoc()->Chainable(rSource, *pFmt);
}
pDView->SetHitTolerancePixel( nOld );
}
return SW_CHAIN_NOT_FOUND;
}
int SwFEShell::Chain( SwFrmFmt &rSource, const SwFrmFmt &rDest )
{
return GetDoc()->Chain(rSource, rDest);
}
2000-09-18 23:08:29 +00:00
int SwFEShell::Chain( SwFrmFmt &rSource, const Point &rPt )
{
SwRect aDummy;
int nErr = Chainable( aDummy, rSource, rPt );
if ( !nErr )
{
StartAllAction();
SdrObject* pObj;
SdrPageView* pPView;
SwDrawView *pDView = (SwDrawView*)Imp()->GetDrawView();
const sal_uInt16 nOld = pDView->GetHitTolerancePixel();
2000-09-18 23:08:29 +00:00
pDView->SetHitTolerancePixel( 0 );
CWS-TOOLING: integrate CWS aw065 2009-06-17 13:48:12 +0200 aw r273068 : #99385# corrected small error in SCs selection visualisation 2009-06-16 15:45:28 +0200 wg r273021 : i102838 2009-06-16 12:46:07 +0200 wg r273016 : i102833 2009-06-11 17:40:29 +0200 aw r272895 : #i98870# added implementation for getPageCount helper 2009-06-11 16:39:54 +0200 aw r272885 : #i102663#, #i102667#, #i98870# incluide file typo corrected 2009-06-11 16:24:07 +0200 aw r272881 : #i102663#, #i102667#, #i98870# changes to SdrText, it's usage in SdrTextPrimitive2D and to OverlayObject base implementation. Also support for PageCountField added 2009-06-11 16:23:52 +0200 aw r272880 : #i102663#, #i102667#, #i98870# changes to SdrText, it's usage in SdrTextPrimitive2D and to OverlayObject base implementation. Also support for PageCountField added 2009-06-09 13:50:29 +0200 aw r272769 : #i98917# added support for the OverlayHatchRectanglePrimitive to follow rotation with it's hatch; simplified OverlayHatchRect 2009-06-09 13:04:06 +0200 aw r272766 : #i98870# re-added PageNumber identification in SdrTextPrimitive2D::get2DDecomposition 2009-06-08 18:56:05 +0200 aw r272744 : #i99385# added some last corrections to OverlayObjects in SD (had to do some merges on resync, needed to optically check and correct) 2009-06-08 11:17:57 +0200 aw r272725 : cws aw065: corrections after resync 2009-06-08 11:02:25 +0200 aw r272723 : cws aw065: corrections after resync 2009-06-08 10:36:22 +0200 aw r272722 : cws aw065: corrections after resync 2009-06-05 18:57:06 +0200 aw r272712 : CWS-TOOLING: rebase CWS aw065 to trunk@272291 (milestone: DEV300:m49) 2009-06-05 14:56:34 +0200 aw r272690 : #i89784# stripped old stuff no longer needed due to text-to-polygon conversion using primitives 2009-06-05 14:50:07 +0200 aw r272688 : #102091# removed on-model-lock suppression for SdrObject::ActionChanged() 2009-06-05 14:47:29 +0200 aw r272687 : #102091# corrected local value buffering in ScenePrimitive2D::get2DDecomposition 2009-06-03 17:53:32 +0200 aw r272599 : #i89784# version before stripping 2009-06-03 17:52:18 +0200 aw r272598 : #i89784# version before stripping 2009-05-28 17:15:47 +0200 aw r272420 : #i101872# old stuff removed/stripped 2009-05-28 17:15:32 +0200 aw r272419 : #i101872# old stuff removed/stripped 2009-05-28 17:15:15 +0200 aw r272418 : #i101872# old stuff removed/stripped 2009-05-28 17:14:45 +0200 aw r272417 : #i101872# old stuff removed/stripped 2009-05-28 12:13:56 +0200 aw r272396 : #i101872# stable hybrid state 2009-05-28 12:13:46 +0200 aw r272395 : #i101872# stable hybrid state 2009-05-28 12:13:35 +0200 aw r272394 : #i101872# stable hybrid state 2009-05-28 12:13:20 +0200 aw r272393 : #i101872# stable hybrid state 2009-05-28 12:13:05 +0200 aw r272392 : #i101872# stable hybrid state 2009-05-28 12:12:51 +0200 aw r272391 : #i101872# stable hybrid state 2009-05-15 16:56:02 +0200 aw r271952 : #i101872# HitTest unifications 2009-05-15 16:55:22 +0200 aw r271951 : #i101872# HitTest unifications 2009-05-15 16:55:12 +0200 aw r271950 : #i101872# HitTest unifications 2009-05-15 16:55:01 +0200 aw r271949 : #i101872# HitTest unifications 2009-05-15 16:54:51 +0200 aw r271948 : #i101872# HitTest unifications 2009-05-15 16:54:35 +0200 aw r271947 : #i101872# HitTest unifications 2009-05-15 16:54:22 +0200 aw r271946 : #i101872# HitTest unifications 2009-05-12 19:08:38 +0200 aw r271834 : #i101684# corrected AutoShape's preparation of text transformation due to different definitions in TextBounds 2009-05-12 15:44:49 +0200 aw r271827 : #i89784# expanded TextLayouterDevice::getTextOutlines() to support DXArray and X-Font scaling 2009-05-11 19:40:40 +0200 aw r271790 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications 2009-05-11 19:40:25 +0200 aw r271789 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications 2009-05-11 19:40:12 +0200 aw r271788 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications 2009-05-11 13:01:53 +0200 aw r271765 : #i99385# corrections and optimizations 2009-05-08 14:48:40 +0200 aw r271718 : #i1016180# added optimizations in model operations when model is locked 2009-05-08 14:11:45 +0200 aw r271716 : #i101679# added flush() calls to OverlayManager when interaction step is prepared 2009-05-07 17:44:03 +0200 aw r271689 : #i99385# last corrections/changes 2009-05-07 17:43:47 +0200 aw r271688 : #i99385# last corrections/changes 2009-05-07 13:20:09 +0200 aw r271654 : #i99385# added changes from WFH 2009-05-07 13:19:38 +0200 aw r271653 : #i99385# added changes from WFH 2009-05-07 13:19:11 +0200 aw r271652 : #i99385# added changes from WFH 2009-05-07 11:33:17 +0200 aw r271643 : #i99385# corrections after resync 2009-05-07 11:17:31 +0200 aw r271642 : #i99385# corrections after resync 2009-05-06 18:46:53 +0200 aw r271609 : CWS-TOOLING: rebase CWS aw065 to trunk@271427 (milestone: DEV300:m47) 2009-05-05 18:24:03 +0200 aw r271548 : #i101443# force new text decomposition when TextBackgroundColor has changed 2009-05-05 17:44:42 +0200 aw r271542 : #i99385# 3rd round, simplifications and corrections done 2009-05-05 17:44:32 +0200 aw r271541 : #i99385# 3rd round, simplifications and corrections done 2009-05-05 17:44:20 +0200 aw r271540 : #i99385# 3rd round, simplifications and corrections done 2009-05-05 17:44:09 +0200 aw r271539 : #i99385# 3rd round, simplifications and corrections done 2009-05-05 15:48:38 +0200 aw r271527 : #i99385# 2nd round, usages checked and corrected 2009-05-05 15:48:15 +0200 aw r271526 : #i99385# 2nd round, usages checked and corrected 2009-05-05 15:48:03 +0200 aw r271525 : #i99385# 2nd round, usages checked and corrected 2009-05-05 15:47:51 +0200 aw r271524 : #i99385# 2nd round, usages checked and corrected 2009-04-27 18:33:10 +0200 aw r271300 : #i99385# state commit after all implementations are done 2009-04-27 15:36:53 +0200 aw r271283 : #i99385# state commit after all implementations are done 2009-04-27 15:27:49 +0200 aw r271280 : #i99385# state commit after all implementations are done 2009-04-27 15:27:33 +0200 aw r271279 : #i99385# state commit after all implementations are done 2009-04-27 15:27:00 +0200 aw r271278 : #i99385# state commit after all implementations are done 2009-04-27 15:26:15 +0200 aw r271277 : #i99385# state commit after all implementations are done 2009-04-27 15:25:40 +0200 aw r271275 : #i99385# state commit after all implementations are done 2009-04-27 15:25:19 +0200 aw r271274 : #i99385# state commit after all implementations are done 2009-04-27 15:24:00 +0200 aw r271272 : #i99385# state commit after all implementations are done 2009-03-19 17:12:00 +0100 aw r269757 : #i100360# corrected bitmap's PefSize calculation for bitmap filled objects when Bitmap is Pixel-based on it's mapping 2009-02-19 17:09:47 +0100 aw r268298 : #i98917# corrected attributes 2009-02-19 17:09:30 +0100 aw r268297 : #i98917# corrected attributes 2009-02-19 17:08:22 +0100 aw r268296 : #i98917# corrected attributes 2009-02-19 11:56:25 +0100 aw r268268 : #i98870# added extra code to react on PageNumber change 2009-02-18 16:57:24 +0100 aw r268243 : #i98917# in OverlayHatchRect::getGeometry the rotation was not applied to the TopLeft of the centered rectangle, but to the already extended one, thus the visualisation was rotating around the wrong edge
2009-07-02 14:28:15 +00:00
pDView->PickObj( rPt, pDView->getHitTolLog(), pObj, pPView, SDRSEARCH_PICKMARKABLE );
2000-09-18 23:08:29 +00:00
pDView->SetHitTolerancePixel( nOld );
SwFlyFrm *pFly = ((SwVirtFlyDrawObj*)pObj)->GetFlyFrm();
SwFlyFrmFmt *pFmt = (SwFlyFrmFmt*)pFly->GetFmt();
GetDoc()->Chain(rSource, *pFmt);
EndAllAction();
SetChainMarker();
}
return nErr;
}
void SwFEShell::Unchain( SwFrmFmt &rFmt )
{
StartAllAction();
GetDoc()->Unchain(rFmt);
EndAllAction();
}
void SwFEShell::HideChainMarker()
{
if ( pChainFrom )
{
delete pChainFrom;
pChainFrom = 0L;
}
2000-09-18 23:08:29 +00:00
if ( pChainTo )
{
delete pChainTo;
pChainTo = 0L;
}
2000-09-18 23:08:29 +00:00
}
void SwFEShell::SetChainMarker()
{
bool bDelFrom = true,
bDelTo = true;
2000-09-18 23:08:29 +00:00
if ( IsFrmSelected() )
{
SwFlyFrm *pFly = FindFlyFrm();
if ( pFly->GetPrevLink() )
{
bDelFrom = false;
2000-09-18 23:08:29 +00:00
const SwFrm *pPre = pFly->GetPrevLink();
Point aStart( pPre->Frm().Right(), pPre->Frm().Bottom());
Point aEnd(pFly->Frm().Pos());
2000-09-18 23:08:29 +00:00
if ( !pChainFrom )
{
pChainFrom = new SdrDropMarkerOverlay( *GetDrawView(), aStart, aEnd );
}
2000-09-18 23:08:29 +00:00
}
if ( pFly->GetNextLink() )
{
bDelTo = false;
2000-09-18 23:08:29 +00:00
const SwFlyFrm *pNxt = pFly->GetNextLink();
Point aStart( pFly->Frm().Right(), pFly->Frm().Bottom());
Point aEnd(pNxt->Frm().Pos());
2000-09-18 23:08:29 +00:00
if ( !pChainTo )
{
pChainTo = new SdrDropMarkerOverlay( *GetDrawView(), aStart, aEnd );
}
2000-09-18 23:08:29 +00:00
}
}
2000-09-18 23:08:29 +00:00
if ( bDelFrom )
{
2000-09-18 23:08:29 +00:00
delete pChainFrom, pChainFrom = 0;
}
2000-09-18 23:08:29 +00:00
if ( bDelTo )
{
2000-09-18 23:08:29 +00:00
delete pChainTo, pChainTo = 0;
}
2000-09-18 23:08:29 +00:00
}
long SwFEShell::GetSectionWidth( SwFmt& rFmt ) const
{
SwFrm *pFrm = GetCurrFrm();
// Is the cursor at this moment in a SectionFrm?
2000-09-18 23:08:29 +00:00
if( pFrm && pFrm->IsInSct() )
{
SwSectionFrm* pSect = pFrm->FindSctFrm();
do
{
// Is it the right one?
if( pSect->KnowsFormat( rFmt ) )
2000-09-18 23:08:29 +00:00
return pSect->Frm().Width();
// for nested areas
2000-09-18 23:08:29 +00:00
pSect = pSect->GetUpper()->FindSctFrm();
}
while( pSect );
}
SwIterator<SwSectionFrm,SwFmt> aIter( rFmt );
for ( SwSectionFrm* pSct = aIter.First(); pSct; pSct = aIter.Next() )
{
if( !pSct->IsFollow() )
{
return pSct->Frm().Width();
}
}
2000-09-18 23:08:29 +00:00
return 0;
}
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
void SwFEShell::CreateDefaultShape( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, const Rectangle& rRect,
sal_uInt16 nSlotId)
{
SdrView* pDrawView = GetDrawView();
SdrModel* pDrawModel = pDrawView->GetModel();
SdrObject* pObj = SdrObjFactory::MakeNewObject(
SdrInventor, eSdrObjectKind,
0L, pDrawModel);
if(pObj)
{
Rectangle aRect(rRect);
if(OBJ_CARC == eSdrObjectKind || OBJ_CCUT == eSdrObjectKind)
{
// force quadratic
if(aRect.GetWidth() > aRect.GetHeight())
{
aRect = Rectangle(
Point(aRect.Left() + ((aRect.GetWidth() - aRect.GetHeight()) / 2), aRect.Top()),
Size(aRect.GetHeight(), aRect.GetHeight()));
}
else
{
aRect = Rectangle(
Point(aRect.Left(), aRect.Top() + ((aRect.GetHeight() - aRect.GetWidth()) / 2)),
Size(aRect.GetWidth(), aRect.GetWidth()));
}
}
pObj->SetLogicRect(aRect);
if(pObj->ISA(SdrCircObj))
{
SfxItemSet aAttr(pDrawModel->GetItemPool());
aAttr.Put(SdrCircStartAngleItem(9000));
aAttr.Put(SdrCircEndAngleItem(0));
pObj->SetMergedItemSet(aAttr);
}
else if(pObj->ISA(SdrPathObj))
{
basegfx::B2DPolyPolygon aPoly;
switch(eSdrObjectKind)
{
case OBJ_PATHLINE:
{
basegfx::B2DPolygon aInnerPoly;
aInnerPoly.append(basegfx::B2DPoint(aRect.Left(), aRect.Bottom()));
const basegfx::B2DPoint aCenterBottom(aRect.Center().getX(), aRect.Bottom());
aInnerPoly.appendBezierSegment(
aCenterBottom,
aCenterBottom,
basegfx::B2DPoint(aRect.Center().getX(), aRect.Center().getY()));
const basegfx::B2DPoint aCenterTop(aRect.Center().getX(), aRect.Top());
aInnerPoly.appendBezierSegment(
aCenterTop,
aCenterTop,
basegfx::B2DPoint(aRect.Right(), aRect.Top()));
aInnerPoly.setClosed(true);
aPoly.append(aInnerPoly);
}
break;
case OBJ_FREELINE:
{
basegfx::B2DPolygon aInnerPoly;
aInnerPoly.append(basegfx::B2DPoint(aRect.Left(), aRect.Bottom()));
aInnerPoly.appendBezierSegment(
basegfx::B2DPoint(aRect.Left(), aRect.Top()),
basegfx::B2DPoint(aRect.Center().getX(), aRect.Top()),
basegfx::B2DPoint(aRect.Center().getX(), aRect.Center().getY()));
aInnerPoly.appendBezierSegment(
basegfx::B2DPoint(aRect.Center().getX(), aRect.Bottom()),
basegfx::B2DPoint(aRect.Right(), aRect.Bottom()),
basegfx::B2DPoint(aRect.Right(), aRect.Top()));
aInnerPoly.append(basegfx::B2DPoint(aRect.Right(), aRect.Bottom()));
aInnerPoly.setClosed(true);
aPoly.append(aInnerPoly);
}
break;
case OBJ_POLY:
case OBJ_PLIN:
{
basegfx::B2DPolygon aInnerPoly;
sal_Int32 nWdt(aRect.GetWidth());
sal_Int32 nHgt(aRect.GetHeight());
aInnerPoly.append(basegfx::B2DPoint(aRect.Left(), aRect.Bottom()));
aInnerPoly.append(basegfx::B2DPoint(aRect.Left() + (nWdt * 30) / 100, aRect.Top() + (nHgt * 70) / 100));
aInnerPoly.append(basegfx::B2DPoint(aRect.Left(), aRect.Top() + (nHgt * 15) / 100));
aInnerPoly.append(basegfx::B2DPoint(aRect.Left() + (nWdt * 65) / 100, aRect.Top()));
aInnerPoly.append(basegfx::B2DPoint(aRect.Left() + nWdt, aRect.Top() + (nHgt * 30) / 100));
aInnerPoly.append(basegfx::B2DPoint(aRect.Left() + (nWdt * 80) / 100, aRect.Top() + (nHgt * 50) / 100));
aInnerPoly.append(basegfx::B2DPoint(aRect.Left() + (nWdt * 80) / 100, aRect.Top() + (nHgt * 75) / 100));
aInnerPoly.append(basegfx::B2DPoint(aRect.Bottom(), aRect.Right()));
if(OBJ_PLIN == eSdrObjectKind)
{
aInnerPoly.append(basegfx::B2DPoint(aRect.Center().getX(), aRect.Bottom()));
}
else
{
aInnerPoly.setClosed(true);
}
2000-09-18 23:08:29 +00:00
aPoly.append(aInnerPoly);
}
break;
case OBJ_LINE :
{
sal_Int32 nYMiddle((aRect.Top() + aRect.Bottom()) / 2);
basegfx::B2DPolygon aTempPoly;
aTempPoly.append(basegfx::B2DPoint(aRect.TopLeft().getX(), nYMiddle));
aTempPoly.append(basegfx::B2DPoint(aRect.BottomRight().getX(), nYMiddle));
aPoly.append(aTempPoly);
}
break;
}
((SdrPathObj*)pObj)->SetPathPoly(aPoly);
}
else if(pObj->ISA(SdrCaptionObj))
{
sal_Bool bVerticalText = ( SID_DRAW_TEXT_VERTICAL == nSlotId ||
SID_DRAW_CAPTION_VERTICAL == nSlotId );
((SdrTextObj*)pObj)->SetVerticalWriting(bVerticalText);
if(bVerticalText)
{
SfxItemSet aSet(pObj->GetMergedItemSet());
aSet.Put(SdrTextVertAdjustItem(SDRTEXTVERTADJUST_CENTER));
aSet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_RIGHT));
pObj->SetMergedItemSet(aSet);
}
2000-09-18 23:08:29 +00:00
((SdrCaptionObj*)pObj)->SetLogicRect(aRect);
((SdrCaptionObj*)pObj)->SetTailPos(
aRect.TopLeft() - Point(aRect.GetWidth() / 2, aRect.GetHeight() / 2));
}
else if(pObj->ISA(SdrTextObj))
{
SdrTextObj* pText = (SdrTextObj*)pObj;
pText->SetLogicRect(aRect);
sal_Bool bVertical = (SID_DRAW_TEXT_VERTICAL == nSlotId);
bool bMarquee = (SID_DRAW_TEXT_MARQUEE == nSlotId);
pText->SetVerticalWriting(bVertical);
if(bVertical)
{
SfxItemSet aSet(pDrawModel->GetItemPool());
aSet.Put(SdrTextAutoGrowWidthItem(sal_True));
aSet.Put(SdrTextAutoGrowHeightItem(sal_False));
aSet.Put(SdrTextVertAdjustItem(SDRTEXTVERTADJUST_TOP));
aSet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_RIGHT));
pText->SetMergedItemSet(aSet);
}
if(bMarquee)
{
SfxItemSet aSet(pDrawModel->GetItemPool(), SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST);
aSet.Put( SdrTextAutoGrowWidthItem( sal_False ) );
aSet.Put( SdrTextAutoGrowHeightItem( sal_False ) );
aSet.Put( SdrTextAniKindItem( SDRTEXTANI_SLIDE ) );
aSet.Put( SdrTextAniDirectionItem( SDRTEXTANI_LEFT ) );
aSet.Put( SdrTextAniCountItem( 1 ) );
aSet.Put( SdrTextAniAmountItem( (sal_Int16)GetWin()->PixelToLogic(Size(2,1)).Width()) );
pObj->SetMergedItemSetAndBroadcast(aSet);
}
}
SdrPageView* pPageView = pDrawView->GetSdrPageView();
pDrawView->InsertObjectAtView(pObj, *pPageView);
}
ImpEndCreate();
}
/** SwFEShell::GetShapeBackgrd
method determines background color of the page the selected drawing
object is on and returns this color.
If no color is found, because no drawing object is selected or ...,
color COL_BLACK (default color on constructing object of class Color)
is returned.
@returns an object of class Color
*/
const Color SwFEShell::GetShapeBackgrd() const
{
Color aRetColor;
// check, if a draw view exists
OSL_ENSURE( Imp()->GetDrawView(), "wrong usage of SwFEShell::GetShapeBackgrd - no draw view!");
if( Imp()->GetDrawView() )
{
// determine list of selected objects
const SdrMarkList* pMrkList = &Imp()->GetDrawView()->GetMarkedObjectList();
// check, if exactly one object is selected.
OSL_ENSURE( pMrkList->GetMarkCount() == 1, "wrong usage of SwFEShell::GetShapeBackgrd - no selected object!");
if ( pMrkList->GetMarkCount() == 1)
{
// get selected object
const SdrObject *pSdrObj = pMrkList->GetMark( 0 )->GetMarkedSdrObj();
// check, if selected object is a shape (drawing object)
OSL_ENSURE( !pSdrObj->ISA(SwVirtFlyDrawObj), "wrong usage of SwFEShell::GetShapeBackgrd - selected object is not a drawing object!");
if ( !pSdrObj->ISA(SwVirtFlyDrawObj) )
{
// determine page frame of the frame the shape is anchored.
const SwFrm* pAnchorFrm =
static_cast<SwDrawContact*>(GetUserCall(pSdrObj))->GetAnchorFrm( pSdrObj );
OSL_ENSURE( pAnchorFrm, "inconsistent modell - no anchor at shape!");
if ( pAnchorFrm )
{
const SwPageFrm* pPageFrm = pAnchorFrm->FindPageFrm();
OSL_ENSURE( pPageFrm, "inconsistent modell - no page!");
if ( pPageFrm )
{
aRetColor = pPageFrm->GetDrawBackgrdColor();
}
}
}
}
}
return aRetColor;
}
/** Is default horizontal text direction for selected drawing object right-to-left
Because drawing objects only painted for each page only, the default
horizontal text direction of a drawing object is given by the corresponding
page property.
@returns boolean, indicating, if the horizontal text direction of the
page, the selected drawing object is on, is right-to-left.
*/
2008-10-10 13:02:43 +00:00
bool SwFEShell::IsShapeDefaultHoriTextDirR2L() const
{
bool bRet = false;
// check, if a draw view exists
OSL_ENSURE( Imp()->GetDrawView(), "wrong usage of SwFEShell::GetShapeBackgrd - no draw view!");
if( Imp()->GetDrawView() )
{
// determine list of selected objects
const SdrMarkList* pMrkList = &Imp()->GetDrawView()->GetMarkedObjectList();
// check, if exactly one object is selected.
OSL_ENSURE( pMrkList->GetMarkCount() == 1, "wrong usage of SwFEShell::GetShapeBackgrd - no selected object!");
if ( pMrkList->GetMarkCount() == 1)
{
// get selected object
const SdrObject *pSdrObj = pMrkList->GetMark( 0 )->GetMarkedSdrObj();
// check, if selected object is a shape (drawing object)
OSL_ENSURE( !pSdrObj->ISA(SwVirtFlyDrawObj), "wrong usage of SwFEShell::GetShapeBackgrd - selected object is not a drawing object!");
if ( !pSdrObj->ISA(SwVirtFlyDrawObj) )
{
// determine page frame of the frame the shape is anchored.
const SwFrm* pAnchorFrm =
static_cast<SwDrawContact*>(GetUserCall(pSdrObj))->GetAnchorFrm( pSdrObj );
OSL_ENSURE( pAnchorFrm, "inconsistent modell - no anchor at shape!");
if ( pAnchorFrm )
{
const SwPageFrm* pPageFrm = pAnchorFrm->FindPageFrm();
OSL_ENSURE( pPageFrm, "inconsistent modell - no page!");
if ( pPageFrm )
{
bRet = pPageFrm->IsRightToLeft() ? true : false;
}
}
}
}
}
return bRet;
}
Point SwFEShell::GetRelativePagePosition(const Point& rDocPos)
{
Point aRet(-1, -1);
const SwFrm *pPage = GetLayout()->Lower();
while ( pPage && !pPage->Frm().IsInside( rDocPos ) )
{
pPage = pPage->GetNext();
}
if(pPage)
{
aRet = rDocPos - pPage->Frm().TopLeft();
}
return aRet;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */