Files
libreoffice/sd/source/core/sdpage.cxx

3112 lines
110 KiB
C++
Raw Normal View History

2000-09-18 23:16:46 +00:00
/*************************************************************************
*
* OpenOffice.org - a multi-platform office productivity suite
2000-09-18 23:16:46 +00:00
*
* $RCSfile: sdpage.cxx,v $
2000-09-18 23:16:46 +00:00
*
* $Revision: 1.64 $
2000-09-18 23:16:46 +00:00
*
* last change: $Author: rt $ $Date: 2008-03-12 11:27:32 $
2000-09-18 23:16:46 +00:00
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
2000-09-18 23:16:46 +00:00
*
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2005 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
2000-09-18 23:16:46 +00:00
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
2000-09-18 23:16:46 +00:00
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
2000-09-18 23:16:46 +00:00
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
2000-09-18 23:16:46 +00:00
*
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sd.hxx"
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
#include <algorithm>
2000-09-18 23:16:46 +00:00
#ifndef _SV_SVAPP_HXX
#include <vcl/svapp.hxx>
#endif
#include "eetext.hxx"
2000-09-18 23:16:46 +00:00
#ifndef _EEITEM_HXX //autogen
#include <svx/eeitem.hxx>
#endif
#ifndef _SVDOUTL_HXX //autogen
#include <svx/svdoutl.hxx>
#endif
#include <svx/editdata.hxx>
#include <svx/pageitem.hxx>
#include <svx/lrspitem.hxx>
#include <svx/bulitem.hxx>
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
#include <svx/xoutx.hxx>
#ifndef _SVDPAGV_HXX //autogen
#include <svx/svdpagv.hxx>
#endif
2000-09-18 23:16:46 +00:00
#ifndef _SVX_FHGTITEM_HXX //autogen
#include <svx/fhgtitem.hxx>
#endif
#ifndef _OUTLOBJ_HXX //autogen
#include <svx/outlobj.hxx>
#endif
#ifndef _SVDOOLE2_HXX //autogen
#include <svx/svdoole2.hxx>
#endif
#ifndef _SVDOGRAF_HXX //autogen
#include <svx/svdograf.hxx>
#endif
#ifndef _SVDOPAGE_HXX //autogen
#include <svx/svdopage.hxx>
#endif
#ifndef _SVDOPAGE_HXX //autogen
#include <svx/svdopage.hxx>
#endif
#ifndef _SFX_PRINTER_HXX //autogen
#include <sfx2/printer.hxx>
#endif
#ifndef _BASMGR_HXX //autogen
#include <basic/basmgr.hxx>
#endif
#ifndef _SVX_PBINITEM_HXX //autogen
#include <svx/pbinitem.hxx>
#endif
#ifndef _SVDUNDO_HXX //autogen
#include <svx/svdundo.hxx>
#endif
#ifndef _SFXSMPLHINT_HXX //autogen
#include <svtools/smplhint.hxx>
#endif
#ifndef _SVX_ADJITEM_HXX
#include <svx/adjitem.hxx>
#endif
2000-12-20 14:50:13 +00:00
#ifndef _EDITOBJ_HXX
#include <svx/editobj.hxx>
#endif
#ifndef _SVX_SRIPTTYPEITEM_HXX
#include <svx/scripttypeitem.hxx>
#endif
#ifndef _SVX_UNOWPAGE_HXX
#include <svx/unopage.hxx>
#endif
2000-09-18 23:16:46 +00:00
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
#ifndef _SVX_FLDITEM_HXX
#include <svx/flditem.hxx>
#endif
#ifndef _SDR_CONTACT_DISPLAYINFO_HXX
#include <svx/sdr/contact/displayinfo.hxx>
#endif
#include <svx/adjitem.hxx>
#include "../ui/inc/DrawDocShell.hxx"
#ifndef SD_OUTLINER_HXX
#include "Outliner.hxx"
#endif
2000-09-18 23:16:46 +00:00
#include "misc.hxx"
#include "eetext.hxx"
#include "drawdoc.hxx"
#include "sdpage.hxx"
#include "pglink.hxx"
#include "sdresid.hxx"
#include "stlsheet.hxx"
#include "glob.hrc"
#include "glob.hxx"
#include "helpids.h"
#include "anminfo.hxx"
#include "undo/undomanager.hxx"
#include "undo/undoobjects.hxx"
2000-09-18 23:16:46 +00:00
#ifndef _SDR_CONTACT_DISPLAYINFO_HXX
#include <svx/sdr/contact/displayinfo.hxx>
#endif
#ifndef _SDR_CONTACT_VIEWOBJECTCONTACT_HXX
#include <svx/sdr/contact/viewobjectcontact.hxx>
#endif
#ifndef _SDR_CONTACT_VIEWCONTACT_HXX
#include <svx/sdr/contact/viewcontact.hxx>
#endif
#include <set>
2000-09-18 23:16:46 +00:00
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
using namespace ::sd;
using namespace ::com::sun::star;
2000-09-18 23:16:46 +00:00
TYPEINIT2( SdPage, FmFormPage, SdrObjUserCall );
/*************************************************************************
|*
|* Ctor
|*
\************************************************************************/
SdPage::SdPage(SdDrawDocument& rNewDoc, StarBASIC* pBasic, BOOL bMasterPage)
: FmFormPage(rNewDoc, pBasic, bMasterPage)
, SdrObjUserCall()
, mePageKind(PK_STANDARD)
, meAutoLayout(AUTOLAYOUT_NONE)
, mbSelected(FALSE)
, mePresChange(PRESCHANGE_MANUAL)
, mnTime(1)
, mbSoundOn(FALSE)
, mbExcluded(FALSE)
, mbLoopSound(FALSE)
, mbStopSound(FALSE)
, mbScaleObjects(TRUE)
, mbBackgroundFullSize( FALSE )
, meCharSet(gsl_getSystemTextEncoding())
, mnPaperBin(PAPERBIN_PRINTER_SETTINGS)
, mpPageLink(NULL)
, mpItems(NULL)
, mnTransitionType(0)
, mnTransitionSubtype(0)
, mbTransitionDirection(sal_True)
, mnTransitionFadeColor(0)
, mfTransitionDuration(2.0)
2000-09-18 23:16:46 +00:00
{
// Der Layoutname der Seite wird von SVDRAW benutzt, um die Praesentations-
// vorlagen der Gliederungsobjekte zu ermitteln. Darum enthaelt er bereits
// den Bezeichner fuer die Gliederung (STR_LAYOUT_OUTLINE).
maLayoutName = String(SdResId(STR_LAYOUT_DEFAULT_NAME));
maLayoutName.AppendAscii( RTL_CONSTASCII_STRINGPARAM( SD_LT_SEPARATOR ));
maLayoutName += String(SdResId(STR_LAYOUT_OUTLINE));
2000-09-18 23:16:46 +00:00
Size aPageSize(GetSize());
if (aPageSize.Width() > aPageSize.Height())
{
meOrientation = ORIENTATION_LANDSCAPE;
2000-09-18 23:16:46 +00:00
}
else
{
meOrientation = ORIENTATION_PORTRAIT;
2000-09-18 23:16:46 +00:00
}
}
/*************************************************************************
|*
|* Dtor
|*
\************************************************************************/
2001-02-26 09:20:50 +00:00
SdPage::~SdPage()
2000-09-18 23:16:46 +00:00
{
DisconnectLink();
EndListenOutlineText();
2001-10-12 15:19:53 +00:00
if( mpItems )
delete mpItems;
2000-09-18 23:16:46 +00:00
}
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
/** returns the nIndex'th object from the given PresObjKind, index starts with 1 */
SdrObject* SdPage::GetPresObj(PresObjKind eObjKind, int nIndex )
2000-09-18 23:16:46 +00:00
{
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
int nObjFound = 0; // index of the searched object
SdrObject* pObj = 0;
while( (pObj = maPresentationShapeList.getNextShape(pObj)) != 0 )
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
{
SdAnimationInfo* pInfo = SdDrawDocument::GetShapeUserData(*pObj);
if( pInfo && (pInfo->mePresObjKind == eObjKind) )
2000-09-18 23:16:46 +00:00
{
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
nObjFound++; // found one
if( nObjFound == nIndex )
return pObj;
2001-02-26 09:20:50 +00:00
}
}
return 0;
2001-02-26 09:20:50 +00:00
}
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
/** creates a presentation object with the given PresObjKind on this page. A user call will be set
*/
SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rectangle& rRect, BOOL /* bInsert */ )
2000-09-18 23:16:46 +00:00
{
sd::UndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : 0;
const bool bUndo = pUndoManager && pUndoManager->isInListAction() && IsInserted();
2000-09-18 23:16:46 +00:00
SdrObject* pSdrObj = NULL;
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
bool bForceText = false; // forces the shape text to be set even if its empty
bool bEmptyPresObj = true;
switch( eObjKind )
2000-09-18 23:16:46 +00:00
{
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
case PRESOBJ_TITLE:
{
pSdrObj = new SdrRectObj(OBJ_TITLETEXT);
2000-09-18 23:16:46 +00:00
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
if (bMaster)
{
pSdrObj->SetNotVisibleAsMaster(TRUE);
}
}
break;
case PRESOBJ_OUTLINE:
2000-09-18 23:16:46 +00:00
{
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
pSdrObj = new SdrRectObj(OBJ_OUTLINETEXT);
if (bMaster)
{
pSdrObj->SetNotVisibleAsMaster(TRUE);
}
2000-09-18 23:16:46 +00:00
}
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
break;
2000-09-18 23:16:46 +00:00
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
case PRESOBJ_NOTES:
2000-09-18 23:16:46 +00:00
{
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
pSdrObj = new SdrRectObj(OBJ_TEXT);
if (bMaster)
{
pSdrObj->SetNotVisibleAsMaster(TRUE);
}
2000-09-18 23:16:46 +00:00
}
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
break;
2000-09-18 23:16:46 +00:00
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
case PRESOBJ_TEXT:
2000-09-18 23:16:46 +00:00
{
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
pSdrObj = new SdrRectObj(OBJ_TEXT);
2000-09-18 23:16:46 +00:00
}
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
break;
case PRESOBJ_GRAPHIC:
{
BitmapEx aBmpEx( SdResId( BMP_PRESOBJ_GRAPHIC ) );
Graphic aGraphic( aBmpEx );
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
OutputDevice &aOutDev = *Application::GetDefaultDevice();
aOutDev.Push();
2000-09-18 23:16:46 +00:00
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
aOutDev.SetMapMode( aGraphic.GetPrefMapMode() );
Size aSizePix = aOutDev.LogicToPixel( aGraphic.GetPrefSize() );
aOutDev.SetMapMode(MAP_100TH_MM);
Size aSize = aOutDev.PixelToLogic(aSizePix);
Point aPnt (0, 0);
Rectangle aRect (aPnt, aSize);
pSdrObj = new SdrGrafObj(aGraphic, aRect);
aOutDev.Pop();
}
break;
case PRESOBJ_OBJECT:
{
pSdrObj = new SdrOle2Obj();
BitmapEx aBmpEx( SdResId( BMP_PRESOBJ_OBJECT ) );
Graphic aGraphic( aBmpEx );
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
( (SdrOle2Obj*) pSdrObj)->SetGraphic(&aGraphic);
}
break;
case PRESOBJ_CHART:
{
pSdrObj = new SdrOle2Obj();
( (SdrOle2Obj*) pSdrObj)->SetProgName( String( RTL_CONSTASCII_USTRINGPARAM( "StarChart" )));
BitmapEx aBmpEx( SdResId( BMP_PRESOBJ_CHART ) );
Graphic aGraphic( aBmpEx );
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
( (SdrOle2Obj*) pSdrObj)->SetGraphic(&aGraphic);
}
break;
case PRESOBJ_ORGCHART:
{
pSdrObj = new SdrOle2Obj();
( (SdrOle2Obj*) pSdrObj)->SetProgName( String( RTL_CONSTASCII_USTRINGPARAM( "StarOrg" )));
BitmapEx aBmpEx( SdResId( BMP_PRESOBJ_ORGCHART ) );
Graphic aGraphic( aBmpEx );
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
( (SdrOle2Obj*) pSdrObj)->SetGraphic(&aGraphic);
}
case PRESOBJ_TABLE:
{
pSdrObj = new SdrOle2Obj();
( (SdrOle2Obj*) pSdrObj)->SetProgName( String( RTL_CONSTASCII_USTRINGPARAM( "StarCalc" )));
BitmapEx aBmpEx( SdResId( BMP_PRESOBJ_TABLE ) );
Graphic aGraphic( aBmpEx );
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
( (SdrOle2Obj*) pSdrObj)->SetGraphic(&aGraphic);
}
break;
2000-09-18 23:16:46 +00:00
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
case PRESOBJ_BACKGROUND:
{
pSdrObj = new SdrRectObj();
pSdrObj->SetMoveProtect(TRUE);
pSdrObj->SetResizeProtect(TRUE);
pSdrObj->SetMarkProtect(TRUE);
}
break;
case PRESOBJ_HANDOUT:
{
//Erste Standardseite am SdrPageObj vermerken
SdrPage* pFirstPage = ( (SdDrawDocument*) pModel )->GetSdPage(0, PK_STANDARD);
pSdrObj = new SdrPageObj( pFirstPage );
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
pSdrObj->SetResizeProtect(TRUE);
}
break;
case PRESOBJ_PAGE:
{
//Notizseite am SdrPageObj vermerken
sal_uInt16 nDestPageNum(GetPageNum());
if(nDestPageNum)
{
// decrement only when != 0, else we get a 0xffff
nDestPageNum -= 1;
}
if(nDestPageNum < pModel->GetPageCount())
{
pSdrObj = new SdrPageObj(pModel->GetPage(nDestPageNum));
}
else
{
pSdrObj = new SdrPageObj();
}
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
pSdrObj->SetResizeProtect(TRUE);
}
break;
case PRESOBJ_HEADER:
case PRESOBJ_FOOTER:
case PRESOBJ_DATETIME:
case PRESOBJ_SLIDENUMBER:
{
pSdrObj = new SdrRectObj(OBJ_TEXT);
bEmptyPresObj = false;
bForceText = true;
}
break;
default:
break;
2000-09-18 23:16:46 +00:00
}
if (pSdrObj)
{
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
pSdrObj->SetEmptyPresObj(bEmptyPresObj);
2000-09-18 23:16:46 +00:00
pSdrObj->SetLogicRect(rRect);
InsertObject(pSdrObj);
2000-09-18 23:16:46 +00:00
if ( pSdrObj->ISA(SdrTextObj) )
{
// #96243# Tell the object EARLY that it is vertical to have the
// defaults for AutoGrowWidth/Height reversed
if(bVertical)
((SdrTextObj*)pSdrObj)->SetVerticalWriting(TRUE);
2001-02-26 09:20:50 +00:00
SfxItemSet aTempAttr( ((SdDrawDocument*) pModel)->GetPool() );
2001-02-26 09:20:50 +00:00
if( bVertical )
aTempAttr.Put( SdrTextMinFrameWidthItem( rRect.GetSize().Width() ) );
else
aTempAttr.Put( SdrTextMinFrameHeightItem( rRect.GetSize().Height() ) );
2000-09-18 23:16:46 +00:00
if (bMaster)
{
// Bei Praesentationsobjekten auf der MasterPage soll die
// Groesse vom Benutzwer frei waehlbar sein
// #96243# potential problem: This action was still NOT
// adapted for vertical text. This sure needs to be done.
if(bVertical)
aTempAttr.Put(SdrTextAutoGrowWidthItem(FALSE));
else
aTempAttr.Put(SdrTextAutoGrowHeightItem(FALSE));
2000-09-18 23:16:46 +00:00
}
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
// check if we need another vertical adjustement than the default
SdrTextVertAdjust eV = SDRTEXTVERTADJUST_TOP;
if( (eObjKind == PRESOBJ_FOOTER) && (mePageKind != PK_STANDARD) )
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
{
eV = SDRTEXTVERTADJUST_BOTTOM;
}
else if( (eObjKind == PRESOBJ_SLIDENUMBER) && (mePageKind != PK_STANDARD) )
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
{
eV = SDRTEXTVERTADJUST_BOTTOM;
}
if( eV != SDRTEXTVERTADJUST_TOP )
aTempAttr.Put(SdrTextVertAdjustItem(eV));
pSdrObj->SetMergedItemSet(aTempAttr);
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
pSdrObj->SetLogicRect(rRect);
2000-09-18 23:16:46 +00:00
}
2001-03-19 08:53:25 +00:00
String aString = GetPresObjText(eObjKind);
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
if( (aString.Len() || bForceText) && pSdrObj->ISA(SdrTextObj) )
2000-09-18 23:16:46 +00:00
{
SdrOutliner* pOutliner = ( (SdDrawDocument*) GetModel() )->GetInternalOutliner();
2001-03-19 08:53:25 +00:00
2000-09-18 23:16:46 +00:00
USHORT nOutlMode = pOutliner->GetMode();
pOutliner->Init( OUTLINERMODE_TEXTOBJECT );
pOutliner->SetMinDepth(0);
pOutliner->SetStyleSheet( 0, NULL );
2001-02-26 09:20:50 +00:00
pOutliner->SetVertical( bVertical );
2000-09-18 23:16:46 +00:00
String aEmptyStr;
2001-03-19 08:53:25 +00:00
SetObjText( (SdrTextObj*) pSdrObj, (SdrOutliner*)pOutliner, eObjKind, aString );
2000-09-18 23:16:46 +00:00
pOutliner->Init( nOutlMode );
pOutliner->SetStyleSheet( 0, NULL );
}
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
if( (eObjKind == PRESOBJ_HEADER) || (eObjKind == PRESOBJ_FOOTER) || (eObjKind == PRESOBJ_SLIDENUMBER) || (eObjKind == PRESOBJ_DATETIME) )
{
SfxItemSet aTempAttr( ((SdDrawDocument*) pModel)->GetPool() );
aTempAttr.Put( SvxFontHeightItem( 493, 100, EE_CHAR_FONTHEIGHT ) );
aTempAttr.Put( SvxFontHeightItem( 493, 100, EE_CHAR_FONTHEIGHT_CTL ) );
aTempAttr.Put( SvxFontHeightItem( 493, 100, EE_CHAR_FONTHEIGHT_CJK ) );
SvxAdjust eH = SVX_ADJUST_LEFT;
if( (eObjKind == PRESOBJ_DATETIME) && (mePageKind != PK_STANDARD ) )
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
{
eH = SVX_ADJUST_RIGHT;
}
else if( (eObjKind == PRESOBJ_FOOTER) && (mePageKind == PK_STANDARD ) )
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
{
eH = SVX_ADJUST_CENTER;
}
else if( eObjKind == PRESOBJ_SLIDENUMBER )
{
eH = SVX_ADJUST_RIGHT;
}
if( eH != SVX_ADJUST_LEFT )
aTempAttr.Put(SvxAdjustItem(eH, EE_PARA_JUST ));
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
pSdrObj->SetMergedItemSet(aTempAttr);
}
2000-09-18 23:16:46 +00:00
if (bMaster)
{
SdrLayerAdmin& rLayerAdmin = pModel->GetLayerAdmin();
if (eObjKind == PRESOBJ_BACKGROUND)
{
// Hintergrund der MasterPage
pSdrObj->SetLayer( rLayerAdmin.
GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), FALSE) );
}
else
{
// Hintergrundobjekte der MasterPage
pSdrObj->SetLayer( rLayerAdmin.
GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), FALSE) );
}
}
// Objekt am StyleSheet anmelden
// #95114# Set style only when one was found (as in 5.2)
// pSdrObj->NbcSetStyleSheet( GetStyleSheetForPresObj(eObjKind), FALSE );
if( mePageKind != PK_HANDOUT )
{
SfxStyleSheet* pSheetForPresObj = GetStyleSheetForPresObj(eObjKind);
if(pSheetForPresObj)
pSdrObj->SetStyleSheet(pSheetForPresObj, FALSE);
}
2000-09-18 23:16:46 +00:00
if (eObjKind == PRESOBJ_OUTLINE)
{
for (USHORT nLevel = 1; nLevel < 10; nLevel++)
{
String aName(maLayoutName);
2000-09-18 23:16:46 +00:00
aName += sal_Unicode( ' ' );
aName += String::CreateFromInt32( nLevel );
SfxStyleSheet* pSheet = (SfxStyleSheet*)pModel->GetStyleSheetPool()->Find(aName, SD_STYLE_FAMILY_MASTERPAGE);
2000-09-18 23:16:46 +00:00
DBG_ASSERT(pSheet, "Vorlage fuer Gliederungsobjekt nicht gefunden");
if (pSheet)
pSdrObj->StartListening(*pSheet);
}
}
if ( eObjKind == PRESOBJ_OBJECT ||
eObjKind == PRESOBJ_CHART ||
eObjKind == PRESOBJ_ORGCHART ||
eObjKind == PRESOBJ_TABLE ||
eObjKind == PRESOBJ_GRAPHIC )
{
SfxItemSet aSet( ((SdDrawDocument*) pModel)->GetPool() );
aSet.Put( SdrTextContourFrameItem( TRUE ) );
aSet.Put( SvxAdjustItem( SVX_ADJUST_CENTER, EE_PARA_JUST ) );
pSdrObj->SetMergedItemSet(aSet);
2000-09-18 23:16:46 +00:00
}
if( bUndo )
{
pUndoManager->AddUndoAction(pModel->GetSdrUndoFactory().CreateUndoNewObject(*pSdrObj));
}
if( bUndo )
{
pUndoManager->AddUndoAction( new UndoObjectPresentationKind( *pSdrObj ) );
pUndoManager->AddUndoAction( new UndoObjectUserCall(*pSdrObj) );
}
InsertPresObj(pSdrObj, eObjKind);
pSdrObj->SetUserCall(this);
pSdrObj->RecalcBoundRect();
2000-09-18 23:16:46 +00:00
}
return(pSdrObj);
}
/*************************************************************************
|*
|* Es werden Praesentationsobjekte auf der Page erzeugt.
|* Alle Praesentationsobjekte erhalten einen UserCall auf die Page.
|*
\************************************************************************/
SfxStyleSheet* SdPage::GetStyleSheetForPresObj(PresObjKind eObjKind) const
2000-09-18 23:16:46 +00:00
{
String aName(GetLayoutName());
String aSep( RTL_CONSTASCII_USTRINGPARAM( SD_LT_SEPARATOR ));
USHORT nPos = aName.Search(aSep);
if (nPos != STRING_NOTFOUND)
{
nPos = nPos + aSep.Len();
2000-09-18 23:16:46 +00:00
aName.Erase(nPos);
}
switch (eObjKind)
{
case PRESOBJ_OUTLINE:
{
aName = GetLayoutName();
aName += sal_Unicode( ' ' );
aName += String::CreateFromInt32( 1 );
}
break;
case PRESOBJ_TITLE:
aName += String(SdResId(STR_LAYOUT_TITLE));
break;
case PRESOBJ_BACKGROUND:
aName += String(SdResId(STR_LAYOUT_BACKGROUND));
break;
case PRESOBJ_NOTES:
aName += String(SdResId(STR_LAYOUT_NOTES));
break;
case PRESOBJ_TEXT:
aName += String(SdResId(STR_LAYOUT_SUBTITLE));
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
break;
case PRESOBJ_HEADER:
case PRESOBJ_FOOTER:
case PRESOBJ_DATETIME:
case PRESOBJ_SLIDENUMBER:
aName += String(SdResId(STR_LAYOUT_BACKGROUNDOBJECTS));
break;
2000-09-18 23:16:46 +00:00
default:
break;
}
SfxStyleSheetBasePool* pStShPool = pModel->GetStyleSheetPool();
SfxStyleSheetBase* pResult = pStShPool->Find(aName, SD_STYLE_FAMILY_MASTERPAGE);
2000-09-18 23:16:46 +00:00
return (SfxStyleSheet*)pResult;
}
/** returns the presentation style with the given helpid from this masterpage or this
slides masterpage */
SdStyleSheet* SdPage::getPresentationStyle( sal_uInt32 nHelpId ) const
{
String aStyleName( pPage->GetLayoutName() );
const String aSep( RTL_CONSTASCII_USTRINGPARAM( SD_LT_SEPARATOR ));
aStyleName.Erase(aStyleName.Search(aSep) + aSep.Len());
sal_uInt16 nNameId;
switch( nHelpId )
{
case HID_PSEUDOSHEET_TITLE: nNameId = STR_LAYOUT_TITLE; break;
case HID_PSEUDOSHEET_SUBTITLE: nNameId = STR_LAYOUT_SUBTITLE; break;
case HID_PSEUDOSHEET_OUTLINE1:
case HID_PSEUDOSHEET_OUTLINE2:
case HID_PSEUDOSHEET_OUTLINE3:
case HID_PSEUDOSHEET_OUTLINE4:
case HID_PSEUDOSHEET_OUTLINE5:
case HID_PSEUDOSHEET_OUTLINE6:
case HID_PSEUDOSHEET_OUTLINE7:
case HID_PSEUDOSHEET_OUTLINE8:
case HID_PSEUDOSHEET_OUTLINE9: nNameId = STR_LAYOUT_OUTLINE; break;
case HID_PSEUDOSHEET_BACKGROUNDOBJECTS: nNameId = STR_LAYOUT_BACKGROUNDOBJECTS; break;
case HID_PSEUDOSHEET_BACKGROUND: nNameId = STR_LAYOUT_BACKGROUND; break;
case HID_PSEUDOSHEET_NOTES: nNameId = STR_LAYOUT_NOTES; break;
default:
DBG_ERROR( "SdPage::getPresentationStyle(), illegal argument!" );
return 0;
}
aStyleName.Append( String( SdResId( nNameId ) ) );
if( nNameId == STR_LAYOUT_OUTLINE )
{
aStyleName.Append( sal_Unicode( ' ' ));
aStyleName.Append( String::CreateFromInt32( sal_Int32( nHelpId - HID_PSEUDOSHEET_OUTLINE )));
}
SfxStyleSheetBasePool* pStShPool = pModel->GetStyleSheetPool();
SfxStyleSheetBase* pResult = pStShPool->Find(aStyleName, SD_STYLE_FAMILY_MASTERPAGE);
return dynamic_cast<SdStyleSheet*>(pResult);
}
2000-09-18 23:16:46 +00:00
/*************************************************************************
|*
|* Das Praesentationsobjekt rObj hat sich geaendert und wird nicht mehr
|* durch das Praesentationsobjekt der MasterPage referenziert.
|* Der UserCall wird geloescht.
|*
\************************************************************************/
void SdPage::Changed(const SdrObject& rObj, SdrUserCallType eType, const Rectangle& )
2000-09-18 23:16:46 +00:00
{
if (!maLockAutoLayoutArrangement.isLocked())
2000-09-18 23:16:46 +00:00
{
switch (eType)
{
case SDRUSERCALL_MOVEONLY:
case SDRUSERCALL_RESIZE:
{
if( pModel->isLocked() )
break;
2000-09-18 23:16:46 +00:00
SdrObject* pObj = (SdrObject*) &rObj;
if (pObj)
{
if (!bMaster)
{
if( pObj->GetUserCall() )
{
sd::UndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : 0;
const bool bUndo = pUndoManager && pUndoManager->isInListAction() && IsInserted();
/*
DBG_ASSERT( bUndo || (pUndoManager && pUndoManager->isInUndo()),
"SdPage::Changed(), model change without undo!?" );
*/
if( bUndo )
pUndoManager->AddUndoAction( new UndoObjectUserCall(*pObj) );
// Objekt was resized by user and does not listen to its slide anymore
pObj->SetUserCall(0);
}
2000-09-18 23:16:46 +00:00
}
else if (pModel)
{
// MasterPage-Objekt wurde veraendert, daher
// Objekte auf allen Seiten anpassen
USHORT nPageCount = ((SdDrawDocument*) pModel)->GetSdPageCount(mePageKind);
2000-09-18 23:16:46 +00:00
for (USHORT i = 0; i < nPageCount; i++)
{
SdPage* pLoopPage = ((SdDrawDocument*) pModel)->GetSdPage(i, mePageKind);
2000-09-18 23:16:46 +00:00
if (pLoopPage && this == &(pLoopPage->TRG_GetMasterPage()))
2000-09-18 23:16:46 +00:00
{
// Seite hoert auf diese MasterPage, daher
// AutoLayout anpassen
pLoopPage->SetAutoLayout(pLoopPage->GetAutoLayout());
2000-09-18 23:16:46 +00:00
}
}
}
}
}
break;
case SDRUSERCALL_DELETE:
case SDRUSERCALL_REMOVED:
default:
break;
2000-09-18 23:16:46 +00:00
}
}
}
/*************************************************************************
|*
|* Erzeugt auf einer MasterPage Hintergrund, Titel- und Layout-Bereich
|*
\************************************************************************/
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
void SdPage::CreateTitleAndLayout(BOOL bInit, BOOL bCreate )
2000-09-18 23:16:46 +00:00
{
sd::UndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : 0;
const bool bUndo = pUndoManager && pUndoManager->isInListAction() && IsInserted();
2000-09-18 23:16:46 +00:00
SdPage* pMasterPage = this;
if (!bMaster)
{
pMasterPage = (SdPage*)(&(TRG_GetMasterPage()));
2000-09-18 23:16:46 +00:00
}
if (!pMasterPage)
{
return;
}
/**************************************************************************
* Hintergrund, Titel- und Layout-Bereich werden angelegt
**************************************************************************/
if( mePageKind == PK_STANDARD )
2000-09-18 23:16:46 +00:00
{
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
SdrObject* pMasterBackground = pMasterPage->GetPresObj( PRESOBJ_BACKGROUND );
if( pMasterBackground == NULL )
pMasterPage->CreateDefaultPresObj(PRESOBJ_BACKGROUND, true);
}
2000-09-18 23:16:46 +00:00
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
if( ( (SdDrawDocument*) GetModel() )->GetDocumentType() == DOCUMENT_TYPE_IMPRESS )
{
if( mePageKind == PK_HANDOUT && bInit )
2000-09-18 23:16:46 +00:00
{
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
// handout template
2000-09-18 23:16:46 +00:00
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
// delete all available handout presentation objects
SdrObject* pObj;
while( (pObj = pMasterPage->GetPresObj(PRESOBJ_HANDOUT)) != 0 )
2000-09-18 23:16:46 +00:00
{
if( bUndo )
pUndoManager->AddUndoAction(pModel->GetSdrUndoFactory().CreateUndoDeleteObject(*pObj));
pMasterPage->RemoveObject(pObj->GetOrdNum());
2000-09-18 23:16:46 +00:00
}
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
std::vector< Rectangle > aAreas;
CalculateHandoutAreas( *static_cast< SdDrawDocument* >(GetModel() ), pMasterPage->GetAutoLayout(), false, aAreas );
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
const bool bSkip = pMasterPage->GetAutoLayout() == AUTOLAYOUT_HANDOUT3;
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
sal_uInt16 nPage = 0;
std::vector< Rectangle >::iterator iter( aAreas.begin() );
while( iter != aAreas.end() )
2000-09-18 23:16:46 +00:00
{
SdrPageObj* pPageObj = static_cast<SdrPageObj*>(pMasterPage->CreatePresObj(PRESOBJ_HANDOUT, FALSE, (*iter++), TRUE) );
2000-09-18 23:16:46 +00:00
const sal_uInt16 nDestinationPageNum(2 * nPage + 1);
2000-09-18 23:16:46 +00:00
if(nDestinationPageNum < pModel->GetPageCount())
{
pPageObj->SetReferencedPage(pModel->GetPage(nDestinationPageNum));
}
else
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
{
pPageObj->SetReferencedPage(0L);
}
if( bSkip && iter != aAreas.end() )
iter++;
nPage++;
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
}
2000-09-18 23:16:46 +00:00
}
if( mePageKind != PK_HANDOUT )
2000-09-18 23:16:46 +00:00
{
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
SdrObject* pMasterTitle = pMasterPage->GetPresObj( PRESOBJ_TITLE );
if( pMasterTitle == NULL )
pMasterPage->CreateDefaultPresObj(PRESOBJ_TITLE, true);
2000-09-18 23:16:46 +00:00
SdrObject* pMasterOutline = pMasterPage->GetPresObj( mePageKind==PK_NOTES ? PRESOBJ_NOTES : PRESOBJ_OUTLINE );
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
if( pMasterOutline == NULL )
pMasterPage->CreateDefaultPresObj( mePageKind == PK_STANDARD ? PRESOBJ_OUTLINE : PRESOBJ_NOTES, true );
2000-09-18 23:16:46 +00:00
}
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
// create header&footer objects
2000-09-18 23:16:46 +00:00
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
if( bCreate )
2000-09-18 23:16:46 +00:00
{
if( mePageKind != PK_STANDARD )
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
{
SdrObject* pHeader = pMasterPage->GetPresObj( PRESOBJ_HEADER );
if( pHeader == NULL )
pMasterPage->CreateDefaultPresObj( PRESOBJ_HEADER, true );
}
2000-09-18 23:16:46 +00:00
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
SdrObject* pDate = pMasterPage->GetPresObj( PRESOBJ_DATETIME );
if( pDate == NULL )
pMasterPage->CreateDefaultPresObj( PRESOBJ_DATETIME, true );
2000-09-18 23:16:46 +00:00
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
SdrObject* pFooter = pMasterPage->GetPresObj( PRESOBJ_FOOTER );
if( pFooter == NULL )
pMasterPage->CreateDefaultPresObj( PRESOBJ_FOOTER, true );
2000-09-18 23:16:46 +00:00
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
SdrObject* pNumber = pMasterPage->GetPresObj( PRESOBJ_SLIDENUMBER );
if( pNumber == NULL )
pMasterPage->CreateDefaultPresObj( PRESOBJ_SLIDENUMBER, true );
2000-09-18 23:16:46 +00:00
}
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
}
}
2000-09-18 23:16:46 +00:00
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
SdrObject* SdPage::CreateDefaultPresObj(PresObjKind eObjKind, bool bInsert)
{
if( eObjKind == PRESOBJ_TITLE )
{
Rectangle aTitleRect( GetTitleRect() );
return CreatePresObj(PRESOBJ_TITLE, FALSE, aTitleRect, bInsert);
}
else if( eObjKind == PRESOBJ_OUTLINE )
{
Rectangle aLayoutRect( GetLayoutRect() );
return CreatePresObj( PRESOBJ_OUTLINE, FALSE, aLayoutRect, bInsert);
}
else if( eObjKind == PRESOBJ_NOTES )
{
Rectangle aLayoutRect( GetLayoutRect() );
return CreatePresObj( PRESOBJ_NOTES, FALSE, aLayoutRect, bInsert);
}
else if( (eObjKind == PRESOBJ_FOOTER) || (eObjKind == PRESOBJ_DATETIME) || (eObjKind == PRESOBJ_SLIDENUMBER) || (eObjKind == PRESOBJ_HEADER ) )
{
// create footer objects for standard master page
if( mePageKind == PK_STANDARD )
2000-09-18 23:16:46 +00:00
{
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
const long nLftBorder = GetLftBorder();
const long nUppBorder = GetUppBorder();
2000-09-18 23:16:46 +00:00
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
Point aTitlePos ( nLftBorder, nUppBorder );
Size aPageSize ( GetSize() );
aPageSize.Width() -= nLftBorder + GetRgtBorder();
aPageSize.Height() -= nUppBorder + GetLwrBorder();
2000-09-18 23:16:46 +00:00
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
const int Y = long(nUppBorder + aPageSize.Height() * 0.911);
const int W1 = long(aPageSize.Width() * 0.233);
const int W2 = long(aPageSize.Width() * 0.317);
const int H = long(aPageSize.Height() * 0.069);
2000-09-18 23:16:46 +00:00
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
if( eObjKind == PRESOBJ_DATETIME )
{
Point aPos( long(nLftBorder+(aPageSize.Width()*0.05)), Y );
Size aSize( W1, H );
Rectangle aRect( aPos, aSize );
return CreatePresObj( PRESOBJ_DATETIME, FALSE, aRect, bInsert );
}
else if( eObjKind == PRESOBJ_FOOTER )
{
Point aPos( long(nLftBorder+ aPageSize.Width() * 0.342), Y );
Size aSize( W2, H );
Rectangle aRect( aPos, aSize );
return CreatePresObj( PRESOBJ_FOOTER, FALSE, aRect, bInsert );
}
else if( eObjKind == PRESOBJ_SLIDENUMBER )
{
Point aPos( long(nLftBorder+(aPageSize.Width()*0.717)), Y );
Size aSize( W1, H );
Rectangle aRect( aPos, aSize );
return CreatePresObj( PRESOBJ_SLIDENUMBER, FALSE, aRect, bInsert );
}
else
{
DBG_ERROR( "SdPage::CreateDefaultPresObj() - can't create a header placeholder for a slide master" );
return NULL;
2000-09-18 23:16:46 +00:00
}
}
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
else
2000-09-18 23:16:46 +00:00
{
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
// create header&footer objects for handout and notes master
Point aTitlePos ( GetLftBorder(), GetUppBorder() );
Size aPageSize ( GetSize() );
aPageSize.Width() -= GetLftBorder() + GetRgtBorder();
aPageSize.Height() -= GetUppBorder() + GetLwrBorder();
2000-09-18 23:16:46 +00:00
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
const int NOTES_HEADER_FOOTER_WIDTH = long(aPageSize.Width() * 0.434);
const int NOTES_HEADER_FOOTER_HEIGHT = long(aPageSize.Height() * 0.05);
Size aSize( NOTES_HEADER_FOOTER_WIDTH, NOTES_HEADER_FOOTER_HEIGHT );
const int X1 = GetLftBorder();
const int X2 = GetLftBorder() + long(aPageSize.Width() - NOTES_HEADER_FOOTER_WIDTH);
const int Y1 = GetUppBorder();
const int Y2 = GetUppBorder() + long(aPageSize.Height() - NOTES_HEADER_FOOTER_HEIGHT );
if( eObjKind == PRESOBJ_HEADER )
{
Point aPos( X1, Y1 );
Rectangle aRect( aPos, aSize );
return CreatePresObj( PRESOBJ_HEADER, FALSE, aRect, bInsert );
}
else if( eObjKind == PRESOBJ_DATETIME )
2000-09-18 23:16:46 +00:00
{
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
Point aPos( X2, Y1 );
Rectangle aRect( aPos, aSize );
return CreatePresObj( PRESOBJ_DATETIME, FALSE, aRect, bInsert );
2000-09-18 23:16:46 +00:00
}
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
else if( eObjKind == PRESOBJ_FOOTER )
2000-09-18 23:16:46 +00:00
{
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
Point aPos( X1, Y2 );
Rectangle aRect( aPos, aSize );
return CreatePresObj( PRESOBJ_FOOTER, FALSE, aRect, bInsert );
2000-09-18 23:16:46 +00:00
}
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
else if( eObjKind == PRESOBJ_SLIDENUMBER )
{
Point aPos( X2, Y2 );
Rectangle aRect( aPos, aSize );
return CreatePresObj( PRESOBJ_SLIDENUMBER, FALSE, aRect, bInsert );
}
DBG_ERROR("SdPage::CreateDefaultPresObj() - this should not happen!");
return NULL;
2000-09-18 23:16:46 +00:00
}
}
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
else if( eObjKind == PRESOBJ_BACKGROUND )
{
Point aBackgroundPos ( GetLftBorder(), GetUppBorder() );
Size aBackgroundSize ( GetSize() );
aBackgroundSize.Width() -= GetLftBorder() + GetRgtBorder() - 1;
aBackgroundSize.Height() -= GetUppBorder() + GetLwrBorder() - 1;
Rectangle aBackgroundRect(aBackgroundPos, aBackgroundSize);
return CreatePresObj( PRESOBJ_BACKGROUND, FALSE, aBackgroundRect, bInsert );
}
else
{
DBG_ERROR("SdPage::CreateDefaultPresObj() - unknown PRESOBJ kind" );
return NULL;
}
2000-09-18 23:16:46 +00:00
}
2000-09-18 23:16:46 +00:00
/*************************************************************************
|*
|* Titelbereich zurueckgeben
|*
\************************************************************************/
Rectangle SdPage::GetTitleRect() const
{
Rectangle aTitleRect;
if (mePageKind != PK_HANDOUT)
2000-09-18 23:16:46 +00:00
{
/******************************************************************
* Standard- oder Notiz-Seite: Titelbereich
******************************************************************/
Point aTitlePos ( GetLftBorder(), GetUppBorder() );
Size aTitleSize ( GetSize() );
aTitleSize.Width() -= GetLftBorder() + GetRgtBorder();
aTitleSize.Height() -= GetUppBorder() + GetLwrBorder();
if (mePageKind == PK_STANDARD)
2000-09-18 23:16:46 +00:00
{
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
aTitlePos.X() += long( aTitleSize.Width() * 0.05 );
aTitlePos.Y() += long( aTitleSize.Height() * 0.0399 );
aTitleSize.Width() = long( aTitleSize.Width() * 0.9 );
2000-09-18 23:16:46 +00:00
aTitleSize.Height() = long( aTitleSize.Height() * 0.167 );
}
else if (mePageKind == PK_NOTES)
2000-09-18 23:16:46 +00:00
{
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
Point aPos = aTitlePos;
aPos.Y() += long( aTitleSize.Height() * 0.076 );
2000-09-18 23:16:46 +00:00
// Hoehe beschraenken
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
aTitleSize.Height() = (long) (aTitleSize.Height() * 0.375);
2000-09-18 23:16:46 +00:00
Size aPartArea = aTitleSize;
Size aSize;
sal_uInt16 nDestPageNum(GetPageNum());
SdrPage* pRefPage = 0L;
2000-09-18 23:16:46 +00:00
if(nDestPageNum)
{
// only decrement if != 0, else we get 0xffff
nDestPageNum -= 1;
}
if(nDestPageNum < pModel->GetPageCount())
{
pRefPage = pModel->GetPage(nDestPageNum);
}
2000-09-18 23:16:46 +00:00
if ( pRefPage )
2000-09-18 23:16:46 +00:00
{
// tatsaechliche Seitengroesse in das Handout-Rechteck skalieren
double fH = (double) aPartArea.Width() / pRefPage->GetWdt();
double fV = (double) aPartArea.Height() / pRefPage->GetHgt();
2000-09-18 23:16:46 +00:00
if ( fH > fV )
fH = fV;
aSize.Width() = (long) (fH * pRefPage->GetWdt());
aSize.Height() = (long) (fH * pRefPage->GetHgt());
2000-09-18 23:16:46 +00:00
aPos.X() += (aPartArea.Width() - aSize.Width()) / 2;
aPos.Y() += (aPartArea.Height()- aSize.Height())/ 2;
}
aTitlePos = aPos;
aTitleSize = aSize;
}
aTitleRect.SetPos(aTitlePos);
aTitleRect.SetSize(aTitleSize);
}
return aTitleRect;
}
/*************************************************************************
|*
|* Gliederungsbereich zurueckgeben
|*
\************************************************************************/
Rectangle SdPage::GetLayoutRect() const
{
Rectangle aLayoutRect;
if (mePageKind != PK_HANDOUT)
2000-09-18 23:16:46 +00:00
{
Point aLayoutPos ( GetLftBorder(), GetUppBorder() );
Size aLayoutSize ( GetSize() );
aLayoutSize.Width() -= GetLftBorder() + GetRgtBorder();
aLayoutSize.Height() -= GetUppBorder() + GetLwrBorder();
if (mePageKind == PK_STANDARD)
2000-09-18 23:16:46 +00:00
{
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
aLayoutPos.X() += long( aLayoutSize.Width() * 0.05 );
aLayoutPos.Y() += long( aLayoutSize.Height() * 0.234 );
aLayoutSize.Width() = long( aLayoutSize.Width() * 0.9 );
aLayoutSize.Height() = long( aLayoutSize.Height() * 0.66 );
2000-09-18 23:16:46 +00:00
aLayoutRect.SetPos(aLayoutPos);
aLayoutRect.SetSize(aLayoutSize);
}
else if (mePageKind == PK_NOTES)
2000-09-18 23:16:46 +00:00
{
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
aLayoutPos.X() += long( aLayoutSize.Width() * 0.1 );
aLayoutPos.Y() += long( aLayoutSize.Height() * 0.475 );
aLayoutSize.Width() = long( aLayoutSize.Width() * 0.8 );
aLayoutSize.Height() = long( aLayoutSize.Height() * 0.45 );
2000-09-18 23:16:46 +00:00
aLayoutRect.SetPos(aLayoutPos);
aLayoutRect.SetSize(aLayoutSize);
}
}
return aLayoutRect;
}
/**************************************************************************
|*
|* Diese Methode weist ein AutoLayout zu
|*
\*************************************************************************/
const int MAX_PRESOBJS = 5; // maximum number of presentation objects per layout
const int VERTICAL = 0x8000;
struct LayoutDescriptor
2000-09-18 23:16:46 +00:00
{
int mnLayout;
PresObjKind meKind[MAX_PRESOBJS];
bool mbVertical[MAX_PRESOBJS];
2000-09-18 23:16:46 +00:00
LayoutDescriptor( int nLayout, int k0 = 0, int k1 = 0, int k2 = 0, int k3 = 0, int k4 = 0 );
};
2000-09-18 23:16:46 +00:00
LayoutDescriptor::LayoutDescriptor( int nLayout, int k0, int k1, int k2, int k3, int k4 )
: mnLayout( nLayout )
{
meKind[0] = static_cast<PresObjKind>(k0 & (~VERTICAL)); mbVertical[0] = (k0 & VERTICAL) == VERTICAL;
meKind[1] = static_cast<PresObjKind>(k1 & (~VERTICAL)); mbVertical[1] = (k1 & VERTICAL) == VERTICAL;
meKind[2] = static_cast<PresObjKind>(k2 & (~VERTICAL)); mbVertical[2] = (k2 & VERTICAL) == VERTICAL;
meKind[3] = static_cast<PresObjKind>(k3 & (~VERTICAL)); mbVertical[3] = (k3 & VERTICAL) == VERTICAL;
meKind[4] = static_cast<PresObjKind>(k4 & (~VERTICAL)); mbVertical[4] = (k4 & VERTICAL) == VERTICAL;
}
2000-09-18 23:16:46 +00:00
static const LayoutDescriptor& GetLayoutDescriptor( AutoLayout eLayout )
{
static LayoutDescriptor aLayouts[AUTOLAYOUT__END-AUTOLAYOUT__START] =
{
LayoutDescriptor( 0, PRESOBJ_TITLE, PRESOBJ_TEXT ), // AUTOLAYOUT_TITLE
LayoutDescriptor( 0, PRESOBJ_TITLE, PRESOBJ_OUTLINE ), // AUTOLAYOUT_ENUM
LayoutDescriptor( 0, PRESOBJ_TITLE, PRESOBJ_CHART ), // AUTOLAYOUT_CHART
LayoutDescriptor( 1, PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE ), // AUTOLAYOUT_2TEXT
LayoutDescriptor( 1, PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_CHART ), // AUTOLAYOUT_TEXTCHART
LayoutDescriptor( 0, PRESOBJ_TITLE, PRESOBJ_ORGCHART ), // AUTOLAYOUT_ORG
LayoutDescriptor( 1, PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_GRAPHIC ), // AUTOLAYOUT_TEXTCLIP
LayoutDescriptor( 1, PRESOBJ_TITLE, PRESOBJ_CHART, PRESOBJ_OUTLINE ), // AUTOLAYOUT_CHARTTEXT
LayoutDescriptor( 0, PRESOBJ_TITLE, PRESOBJ_TABLE ), // AUTOLAYOUT_TAB
LayoutDescriptor( 1, PRESOBJ_TITLE, PRESOBJ_GRAPHIC, PRESOBJ_OUTLINE ), // AUTOLAYOUT_CLIPTEXT
LayoutDescriptor( 1, PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OBJECT ), // AUTOLAYOUT_TEXTOBJ
LayoutDescriptor( 0, PRESOBJ_TITLE, PRESOBJ_OBJECT ), // AUTOLAYOUT_OBJ
LayoutDescriptor( 2, PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OBJECT, PRESOBJ_OBJECT ), // AUTOLAYOUT_TEXT2OBJ
LayoutDescriptor( 1, PRESOBJ_TITLE, PRESOBJ_OBJECT, PRESOBJ_OUTLINE ), // AUTOLAYOUT_TEXTOBJ
LayoutDescriptor( 4, PRESOBJ_TITLE, PRESOBJ_OBJECT, PRESOBJ_OUTLINE ), // AUTOLAYOUT_OBJOVERTEXT
LayoutDescriptor( 3, PRESOBJ_TITLE, PRESOBJ_OBJECT, PRESOBJ_OBJECT, PRESOBJ_OUTLINE ), // AUTOLAYOUT_2OBJTEXT
LayoutDescriptor( 5, PRESOBJ_TITLE, PRESOBJ_OBJECT, PRESOBJ_OBJECT, PRESOBJ_OUTLINE ), // AUTOLAYOUT_2OBJOVERTEXT
LayoutDescriptor( 4, PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OBJECT ), // AUTOLAYOUT_TEXTOVEROBJ
LayoutDescriptor( 6, PRESOBJ_TITLE, PRESOBJ_OBJECT, PRESOBJ_OBJECT, // AUTOLAYOUT_4OBJ
PRESOBJ_OBJECT, PRESOBJ_OBJECT ),
LayoutDescriptor( 0, PRESOBJ_TITLE, PRESOBJ_NONE ), // AUTOLAYOUT_ONLY_TITLE
LayoutDescriptor( 0, PRESOBJ_NONE ), // AUTOLAYOUT_NONE
LayoutDescriptor( 0, PRESOBJ_PAGE, PRESOBJ_NOTES ), // AUTOLAYOUT_NOTES
LayoutDescriptor( 0 ), // AUTOLAYOUT_HANDOUT1
LayoutDescriptor( 0 ), // AUTOLAYOUT_HANDOUT2
LayoutDescriptor( 0 ), // AUTOLAYOUT_HANDOUT3
LayoutDescriptor( 0 ), // AUTOLAYOUT_HANDOUT4
LayoutDescriptor( 0 ), // AUTOLAYOUT_HANDOUT6
LayoutDescriptor( 0 ), // AUTOLAYOUT_HANDOUT9
LayoutDescriptor( 7, PRESOBJ_TITLE|VERTICAL, PRESOBJ_OUTLINE|VERTICAL, PRESOBJ_CHART ),// AUTOLAYOUT_VERTICAL_TITLE_TEXT_CHART
LayoutDescriptor( 8, PRESOBJ_TITLE|VERTICAL, PRESOBJ_OUTLINE|VERTICAL ), // AUTOLAYOUT_VERTICAL_TITLE_VERTICAL_OUTLINE
LayoutDescriptor( 0, PRESOBJ_TITLE, PRESOBJ_OUTLINE|VERTICAL ), // AUTOLAYOUT_TITLE_VERTICAL_OUTLINE
LayoutDescriptor( 9, PRESOBJ_TITLE, PRESOBJ_GRAPHIC, PRESOBJ_OUTLINE|VERTICAL ) // AUTOLAYOUT_TITLE_VERTICAL_OUTLINE_CLIPART
};
if( (eLayout < AUTOLAYOUT__START) || (eLayout >= AUTOLAYOUT__END) )
eLayout = AUTOLAYOUT_NONE;
return aLayouts[ eLayout - AUTOLAYOUT__START ];
}
2000-09-18 23:16:46 +00:00
static void CalcAutoLayoutRectangles( SdPage& rPage, int nLayout, Rectangle* rRectangle )
{
2000-09-18 23:16:46 +00:00
Rectangle aTitleRect;
Rectangle aLayoutRect;
if( rPage.GetPageKind() != PK_HANDOUT )
{
SdPage& rMasterPage = static_cast<SdPage&>(rPage.TRG_GetMasterPage());
SdrObject* pMasterTitle = rMasterPage.GetPresObj( PRESOBJ_TITLE );
SdrObject* pMasterOutline = rMasterPage.GetPresObj( rPage.GetPageKind()==PK_NOTES ? PRESOBJ_NOTES : PRESOBJ_OUTLINE );
2000-09-18 23:16:46 +00:00
if( pMasterTitle )
aTitleRect = pMasterTitle->GetLogicRect();
2000-09-18 23:16:46 +00:00
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
if (aTitleRect.IsEmpty() )
aTitleRect = rPage.GetTitleRect();
if( pMasterOutline )
aLayoutRect = pMasterOutline->GetLogicRect();
2000-09-18 23:16:46 +00:00
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
if (aLayoutRect.IsEmpty() )
aLayoutRect = rPage.GetLayoutRect();
2000-09-18 23:16:46 +00:00
}
rRectangle[0] = aTitleRect;
int i;
for( i = 1; i < MAX_PRESOBJS; i++ )
rRectangle[i] = aLayoutRect;
2002-08-01 10:30:12 +00:00
Size aTitleSize( aTitleRect.GetSize() );
Point aTitlePos( aTitleRect.TopLeft() );
Size aLayoutSize( aLayoutRect.GetSize() );
Point aLayoutPos( aLayoutRect.TopLeft() );
Size aTempSize;
Point aTempPnt;
2000-09-18 23:16:46 +00:00
sal_Bool bRightToLeft = ( rPage.GetModel() && static_cast< SdDrawDocument* >( rPage.GetModel() )->GetDefaultWritingMode() == ::com::sun::star::text::WritingMode_RL_TB );
2000-09-18 23:16:46 +00:00
switch( nLayout )
{
case 0: // default layout using only the title and layout area
break; // do nothing
case 1: // title, 2 shapes
case 9: // title, 2 vertical shapes
aLayoutSize.Width() = long (aLayoutSize.Width() * 0.488);
rRectangle[1] = Rectangle (aLayoutPos, aLayoutSize);
2000-09-18 23:16:46 +00:00
aLayoutPos.X() = long (aLayoutPos.X() + aLayoutSize.Width() * 1.05);
rRectangle[2] = Rectangle (aLayoutPos, aLayoutSize);
2000-09-18 23:16:46 +00:00
if( bRightToLeft && (nLayout != 9) )
::std::swap< Rectangle >( rRectangle[1], rRectangle[2] );
2000-09-18 23:16:46 +00:00
break;
case 2: // title, shape, 2 shapes
aTempPnt = aLayoutPos;
aTempSize = aLayoutSize;
aLayoutSize.Height() = long (aLayoutSize.Height() * 0.477);
aLayoutSize.Width() = long (aLayoutSize.Width() * 0.488);
aLayoutPos.X() = long (aLayoutPos.X() + aLayoutSize.Width() * 1.05);
rRectangle[2] = Rectangle (aLayoutPos, aLayoutSize);
2000-09-18 23:16:46 +00:00
aLayoutPos.Y() = long (aLayoutPos.Y() + aLayoutSize.Height() * 1.095);
rRectangle[3] = Rectangle (aLayoutPos, aLayoutSize);
2000-09-18 23:16:46 +00:00
aLayoutPos = aTempPnt;
aLayoutSize = aTempSize;
aLayoutSize.Width() = long (aLayoutSize.Width() * 0.488);
rRectangle[1] = Rectangle (aLayoutPos, aLayoutSize);
2000-09-18 23:16:46 +00:00
if( bRightToLeft )
2000-09-18 23:16:46 +00:00
{
::std::swap< long >( rRectangle[1].Left(), rRectangle[2].Left() );
rRectangle[3].Left() = rRectangle[2].Left();
2000-09-18 23:16:46 +00:00
}
break;
case 3: // title, 2 shapes, shape
aTempPnt = aLayoutPos;
aTempSize = aLayoutSize;
aLayoutSize.Height() = long (aLayoutSize.Height() * 0.477);
aLayoutSize.Width() = long (aLayoutSize.Width() * 0.488);
rRectangle[1] = Rectangle (aLayoutPos, aLayoutSize);
2000-09-18 23:16:46 +00:00
aLayoutPos.Y() = long (aLayoutPos.Y() + aLayoutSize.Height() * 1.095);
rRectangle[2] = Rectangle (aLayoutPos, aLayoutSize);
2000-09-18 23:16:46 +00:00
aLayoutPos = aTempPnt;
aLayoutSize = aTempSize;
aLayoutSize.Width() = long (aLayoutSize.Width() * 0.488);
aLayoutPos.X() = long (aLayoutPos.X() + aLayoutSize.Width() * 1.05);
rRectangle[3] = Rectangle (aLayoutPos, aLayoutSize);
2000-09-18 23:16:46 +00:00
if( bRightToLeft )
2000-09-18 23:16:46 +00:00
{
::std::swap< long >( rRectangle[1].Left(), rRectangle[2].Left() );
rRectangle[3].Left() = rRectangle[2].Left();
2000-09-18 23:16:46 +00:00
}
break;
case 4: // title, shape above shape
aLayoutSize.Height() = long (aLayoutSize.Height() * 0.477);
rRectangle[1] = Rectangle (aLayoutPos, aLayoutSize);
2000-09-18 23:16:46 +00:00
aLayoutPos.Y() = long (aLayoutPos.Y() + aLayoutSize.Height() * 1.095);
rRectangle[2] = Rectangle (aLayoutPos, aLayoutSize);
2000-09-18 23:16:46 +00:00
break;
case 5: // title, 2 shapes above shape
aLayoutSize.Height() = long (aLayoutSize.Height() * 0.477);
aLayoutSize.Width() = long (aLayoutSize.Width() * 0.488);
rRectangle[1] = Rectangle (aLayoutPos, aLayoutSize);
2000-09-18 23:16:46 +00:00
aTempPnt = aLayoutPos;
aLayoutPos.X() = long (aLayoutPos.X() + aLayoutSize.Width() * 1.05);
rRectangle[2] = Rectangle (aLayoutPos, aLayoutSize);
2000-09-18 23:16:46 +00:00
aLayoutPos.X() = aTempPnt.X();
aLayoutPos.Y() = long (aLayoutPos.Y() + aLayoutSize.Height() * 1.095);
aLayoutSize.Width() = long (aLayoutSize.Width() / 0.488);
rRectangle[3] = Rectangle (aLayoutPos, aLayoutSize);
2000-09-18 23:16:46 +00:00
break;
case 6: // title, 4 shapes
{
ULONG nX = long (aLayoutPos.X());
2000-09-18 23:16:46 +00:00
aLayoutSize.Height() = long (aLayoutSize.Height() * 0.477);
aLayoutSize.Width() = long (aLayoutSize.Width() * 0.488);
rRectangle[1] = Rectangle (aLayoutPos, aLayoutSize);
2000-09-18 23:16:46 +00:00
aLayoutPos.X() = long (nX + aLayoutSize.Width() * 1.05);
rRectangle[2] = Rectangle (aLayoutPos, aLayoutSize);
2000-09-18 23:16:46 +00:00
aLayoutPos.Y() = long (aLayoutPos.Y() + aLayoutSize.Height() * 1.095);
rRectangle[3] = Rectangle (aLayoutPos, aLayoutSize);
2000-09-18 23:16:46 +00:00
aLayoutPos.X() = nX;
rRectangle[4] = Rectangle (aLayoutPos, aLayoutSize);
2000-09-18 23:16:46 +00:00
break;
}
case 7: // vertical title, shape above shape
{
Size aSize( rRectangle[0].GetSize().Height(), rRectangle[1].BottomLeft().Y() - rRectangle[0].TopLeft().Y() );
rRectangle[0].SetSize( aSize );
rRectangle[0].SetPos( aTitleRect.TopRight() - Point( aSize.Width(), 0 ) );
Size aPageSize ( rPage.GetSize() );
aPageSize.Height() -= rPage.GetUppBorder() + rPage.GetLwrBorder();
aSize.Height() = long ( rRectangle[0].GetSize().Height() * 0.47 );
aSize.Width() = long( aPageSize.Width() * 0.7 );
rRectangle[1].SetPos( aTitleRect.TopLeft() );
rRectangle[1].SetSize( aSize );
aSize.Height() = rRectangle[0].GetSize().Height();
Point aPos( aTitleRect.TopLeft() );
aPos.Y() += long ( aSize.Height() * 0.53 );
rRectangle[2].SetPos( aPos );
aSize.Height() = long ( rRectangle[0].GetSize().Height() * 0.47 );
rRectangle[2].SetSize( aSize );
2000-09-18 23:16:46 +00:00
break;
}
case 8: // vertical title, shape
{
Size aSize( rRectangle[0].GetSize().Height(), rRectangle[1].BottomLeft().Y() - rRectangle[0].TopLeft().Y() );
rRectangle[0].SetSize( aSize );
rRectangle[0].SetPos( aTitleRect.TopRight() - Point( aSize.Width(), 0 ) );
2000-09-18 23:16:46 +00:00
Size aPageSize ( rPage.GetSize() );
aPageSize.Height() -= rPage.GetUppBorder() + rPage.GetLwrBorder();
aSize.Height() = rRectangle[0].GetSize().Height();
aSize.Width() = long( aPageSize.Width() * 0.7 );
rRectangle[1].SetPos( aTitleRect.TopLeft() );
rRectangle[1].SetSize( aSize );
2000-09-18 23:16:46 +00:00
break;
}
}
}
2000-09-18 23:16:46 +00:00
void findAutoLayoutShapesImpl( SdPage& rPage, const LayoutDescriptor& rDescriptor, std::vector< SdrObject* >& rShapes, bool bInit )
{
int i;
2000-09-18 23:16:46 +00:00
// init list of indexes for each presentation shape kind
// this is used to find subsequent shapes with the same presentation shape kind
int PresObjIndex[PRESOBJ_MAX];
for( i = 0; i < PRESOBJ_MAX; i++ ) PresObjIndex[i] = 1;
2000-09-18 23:16:46 +00:00
bool bMissing = false;
2000-09-18 23:16:46 +00:00
// for each entry in the layoutdescriptor, arrange a presentation shape
for( i = 0; (i < PRESOBJ_MAX) && (rDescriptor.meKind[i] != PRESOBJ_NONE); i++ )
{
PresObjKind eKind = rDescriptor.meKind[i];
SdrObject* pObj = rPage.GetPresObj( eKind, PresObjIndex[eKind] );
if( pObj )
2000-09-18 23:16:46 +00:00
{
PresObjIndex[eKind]++; // on next search for eKind, find next shape with same eKind
rShapes[i] = pObj;
2000-09-18 23:16:46 +00:00
}
else
2000-09-18 23:16:46 +00:00
{
bMissing = true;
2000-09-18 23:16:46 +00:00
}
}
2000-09-18 23:16:46 +00:00
if( bMissing && bInit )
{
// for each entry in the layoutdescriptor, look for an alternative shape
for( i = 0; (i < PRESOBJ_MAX) && (rDescriptor.meKind[i] != PRESOBJ_NONE); i++ )
2000-09-18 23:16:46 +00:00
{
if( rShapes[i] )
continue;
2000-09-18 23:16:46 +00:00
PresObjKind eKind = rDescriptor.meKind[i];
2000-09-18 23:16:46 +00:00
SdrObject* pObj = 0;
bool bFound = false;
2001-02-26 09:20:50 +00:00
const int nShapeCount = rPage.GetObjCount();
int nShapeIndex = 0;
while((nShapeIndex < nShapeCount) && !bFound )
{
pObj = rPage.GetObj(nShapeIndex++);
if( pObj->IsEmptyPresObj() )
continue;
if( pObj->GetObjInventor() != SdrInventor )
continue;
// do not reuse shapes that are already part of the layout
if( std::find( rShapes.begin(), rShapes.end(), pObj ) != rShapes.end() )
continue;
bool bPresStyle = pObj->GetStyleSheet() && (pObj->GetStyleSheet()->GetFamily() == SD_STYLE_FAMILY_MASTERPAGE);
SdrObjKind eSdrObjKind = static_cast< SdrObjKind >( pObj->GetObjIdentifier() );
switch( eKind )
{
case PRESOBJ_TITLE:
bFound = eSdrObjKind == OBJ_TITLETEXT;
break;
case PRESOBJ_OUTLINE:
bFound = (eSdrObjKind == OBJ_OUTLINETEXT) || ((eSdrObjKind == OBJ_TEXT) && bPresStyle);
break;
case PRESOBJ_GRAPHIC:
bFound = eSdrObjKind == OBJ_GRAF;
break;
case PRESOBJ_OBJECT:
bFound = eSdrObjKind == OBJ_OLE2;
break;
case PRESOBJ_CHART:
case PRESOBJ_TABLE:
if( eSdrObjKind == OBJ_OLE2 )
{
SdrOle2Obj* pOle2 = dynamic_cast< SdrOle2Obj* >( pObj );
if( pOle2 )
{
if(
((eKind == PRESOBJ_CHART) &&
( pOle2->GetProgName().EqualsAscii( "StarChart" ) || pOle2->IsChart() ) )
||
((eKind == PRESOBJ_TABLE) &&
( pOle2->GetProgName().EqualsAscii( "StarCalc" ) || pOle2->IsCalc() ) ) )
{
bFound = true;
}
}
break;
}
break;
case PRESOBJ_PAGE:
case PRESOBJ_HANDOUT:
bFound = eSdrObjKind == OBJ_PAGE;
break;
case PRESOBJ_NOTES:
case PRESOBJ_TEXT:
bFound = (bPresStyle && (eSdrObjKind == OBJ_TEXT)) || (eSdrObjKind == OBJ_OUTLINETEXT);
break;
default:
break;
}
}
if( bFound )
rShapes[i] = pObj;
}
}
}
void SdPage::SetAutoLayout(AutoLayout eLayout, BOOL bInit, BOOL bCreate )
{
sd::ScopeLockGuard aGuard( maLockAutoLayoutArrangement );
sd::UndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : 0;
const bool bUndo = pUndoManager && pUndoManager->isInListAction() && IsInserted();
2001-02-26 09:20:50 +00:00
meAutoLayout = eLayout;
2001-02-26 09:20:50 +00:00
// if needed, creates and initialises the presentation shapes on this slides master page
CreateTitleAndLayout(bInit, bCreate);
2001-02-26 09:20:50 +00:00
if((meAutoLayout == AUTOLAYOUT_NONE && maPresentationShapeList.isEmpty()) || bMaster)
{
// MasterPage or no layout and no presentation shapes available, noting to do
return;
}
2001-02-26 09:20:50 +00:00
Rectangle aRectangle[MAX_PRESOBJS];
const LayoutDescriptor& aDescriptor = GetLayoutDescriptor( meAutoLayout );
CalcAutoLayoutRectangles( *this, aDescriptor.mnLayout, aRectangle );
2001-02-26 09:20:50 +00:00
std::set< SdrObject* > aUsedPresentationObjects;
std::vector< SdrObject* > aLayoutShapes(PRESOBJ_MAX, 0);
findAutoLayoutShapesImpl( *this, aDescriptor, aLayoutShapes, bInit );
int i;
2000-09-18 23:16:46 +00:00
// for each entry in the layoutdescriptor, arrange a presentation shape
for( i = 0; (i < PRESOBJ_MAX) && (aDescriptor.meKind[i] != PRESOBJ_NONE); i++ )
{
PresObjKind eKind = aDescriptor.meKind[i];
SdrObject* pObj = InsertAutoLayoutShape( aLayoutShapes[i], eKind, aDescriptor.mbVertical[i], aRectangle[i], bInit );
if( pObj )
aUsedPresentationObjects.insert(pObj); // remember that we used this empty shape
2000-09-18 23:16:46 +00:00
}
// now delete all empty presentation objects that are no longer used by the new layout
if( bInit )
2000-09-18 23:16:46 +00:00
{
SdrObject* pObj = maPresentationShapeList.getNextShape(0);
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
while( pObj )
2000-09-18 23:16:46 +00:00
{
SdrObject* pNext = maPresentationShapeList.getNextShape(pObj);
if( aUsedPresentationObjects.count(pObj) == 0 )
2000-09-18 23:16:46 +00:00
{
if( pObj->IsEmptyPresObj() )
{
if( bUndo )
pUndoManager->AddUndoAction(pModel->GetSdrUndoFactory().CreateUndoDeleteObject(*pObj));
RemoveObject( pObj->GetOrdNum() );
if( !bUndo )
SdrObject::Free( pObj );
}
else
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
{
if( bUndo )
{
pUndoManager->AddUndoAction( new UndoObjectPresentationKind( *pObj ) );
if( pObj->GetUserCall() )
pUndoManager->AddUndoAction( new UndoObjectUserCall( *pObj ) );
}
maPresentationShapeList.removeShape( *pObj );
pObj->SetUserCall(0);
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
}
2000-09-18 23:16:46 +00:00
}
pObj = pNext;
2000-09-18 23:16:46 +00:00
}
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
}
2001-03-19 08:53:25 +00:00
}
2000-09-18 23:16:46 +00:00
/*************************************************************************
|*
|* Objekt einfuegen
|*
\************************************************************************/
2001-02-26 09:20:50 +00:00
void SdPage::NbcInsertObject(SdrObject* pObj, ULONG nPos, const SdrInsertReason* pReason)
2000-09-18 23:16:46 +00:00
{
FmFormPage::NbcInsertObject(pObj, nPos, pReason);
((SdDrawDocument*) pModel)->InsertObject(pObj, this);
SdrLayerID nId = pObj->GetLayer();
if( bMaster )
{
if( nId == 0 )
pObj->NbcSetLayer( 2 ); // wrong layer. corrected to BackgroundObj layer
}
else
{
if( nId == 2 )
pObj->NbcSetLayer( 0 ); // wrong layer. corrected to layout layer
}
}
/*************************************************************************
|*
|* Objekt loeschen
|*
\************************************************************************/
2001-02-26 09:20:50 +00:00
SdrObject* SdPage::RemoveObject(ULONG nObjNum)
2000-09-18 23:16:46 +00:00
{
onRemoveObject(GetObj( nObjNum ));
return FmFormPage::RemoveObject(nObjNum);
2000-09-18 23:16:46 +00:00
}
/*************************************************************************
|*
|* Objekt loeschen, ohne Broadcast
|*
\************************************************************************/
2001-02-26 09:20:50 +00:00
SdrObject* SdPage::NbcRemoveObject(ULONG nObjNum)
2000-09-18 23:16:46 +00:00
{
onRemoveObject(GetObj( nObjNum ));
return FmFormPage::NbcRemoveObject(nObjNum);
2000-09-18 23:16:46 +00:00
}
// #95876# Also overload ReplaceObject methods to realize when
// objects are removed with this mechanism instead of RemoveObject
SdrObject* SdPage::NbcReplaceObject(SdrObject* pNewObj, ULONG nObjNum)
{
onRemoveObject(GetObj( nObjNum ));
return FmFormPage::NbcReplaceObject(pNewObj, nObjNum);
}
// #95876# Also overload ReplaceObject methods to realize when
// objects are removed with this mechanism instead of RemoveObject
SdrObject* SdPage::ReplaceObject(SdrObject* pNewObj, ULONG nObjNum)
{
onRemoveObject(GetObj( nObjNum ));
return FmFormPage::ReplaceObject(pNewObj, nObjNum);
}
// -------------------------------------------------------------------------
// called after a shape is removed or replaced from this slide
void SdPage::onRemoveObject( SdrObject* pObject )
{
if( pObject )
{
RemovePresObj(pObject);
if( pModel )
static_cast<SdDrawDocument*>(pModel)->RemoveObject(pObject, this);
removeAnimations( pObject );
}
}
2000-09-18 23:16:46 +00:00
/*************************************************************************
|*
|*
|*
\************************************************************************/
2001-02-26 09:20:50 +00:00
void SdPage::SetSize(const Size& aSize)
2000-09-18 23:16:46 +00:00
{
Size aOldSize = GetSize();
if (aSize != aOldSize)
{
FmFormPage::SetSize(aSize);
AdjustBackgroundSize();
if (aOldSize.Height() == 10 && aOldSize.Width() == 10)
{
// Die Seite bekommt erstmalig eine gueltige Groesse gesetzt,
// daher wird nun die Orientation initialisiert
if (aSize.Width() > aSize.Height())
{
meOrientation = ORIENTATION_LANDSCAPE;
2000-09-18 23:16:46 +00:00
}
else
{
meOrientation = ORIENTATION_PORTRAIT;
2000-09-18 23:16:46 +00:00
}
}
}
}
/*************************************************************************
|*
|*
|*
\************************************************************************/
2001-02-26 09:20:50 +00:00
void SdPage::SetBorder(INT32 nLft, INT32 nUpp, INT32 nRgt, INT32 nLwr)
2000-09-18 23:16:46 +00:00
{
if (nLft != GetLftBorder() || nUpp != GetUppBorder() ||
nRgt != GetRgtBorder() || nLwr != GetLwrBorder() )
{
FmFormPage::SetBorder(nLft, nUpp, nRgt, nLwr);
AdjustBackgroundSize();
}
}
/*************************************************************************
|*
|*
|*
\************************************************************************/
2001-02-26 09:20:50 +00:00
void SdPage::SetLftBorder(INT32 nBorder)
2000-09-18 23:16:46 +00:00
{
if (nBorder != GetLftBorder() )
{
FmFormPage::SetLftBorder(nBorder);
AdjustBackgroundSize();
}
}
/*************************************************************************
|*
|*
|*
\************************************************************************/
2001-02-26 09:20:50 +00:00
void SdPage::SetRgtBorder(INT32 nBorder)
2000-09-18 23:16:46 +00:00
{
if (nBorder != GetRgtBorder() )
{
FmFormPage::SetRgtBorder(nBorder);
AdjustBackgroundSize();
}
}
/*************************************************************************
|*
|*
|*
\************************************************************************/
2001-02-26 09:20:50 +00:00
void SdPage::SetUppBorder(INT32 nBorder)
2000-09-18 23:16:46 +00:00
{
if (nBorder != GetUppBorder() )
{
FmFormPage::SetUppBorder(nBorder);
AdjustBackgroundSize();
}
}
/*************************************************************************
|*
|*
|*
\************************************************************************/
2001-02-26 09:20:50 +00:00
void SdPage::SetLwrBorder(INT32 nBorder)
2000-09-18 23:16:46 +00:00
{
if (nBorder != GetLwrBorder() )
{
FmFormPage::SetLwrBorder(nBorder);
AdjustBackgroundSize();
}
}
/*************************************************************************
|*
|* Setzt BackgroundFullSize und ruft dann AdjustBackground auf
|*
\************************************************************************/
void SdPage::SetBackgroundFullSize( BOOL bIn )
{
if( bIn != mbBackgroundFullSize )
2000-09-18 23:16:46 +00:00
{
mbBackgroundFullSize = bIn;
2000-09-18 23:16:46 +00:00
AdjustBackgroundSize();
}
}
/*************************************************************************
|*
|* Alle Objekte an neue Seitengroesse anpassen
|*
|* bScaleAllObj: Alle Objekte werden in die neue Flaeche innerhalb der
|* Seitenraender skaliert. Dabei werden die Position, Groesse und bei
|* Praesentationsobjekten auf der MasterPage auch die Schrifthoehe der
|* Praesentationsvorlagen skaliert.
|*
\************************************************************************/
2001-02-26 09:20:50 +00:00
void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderRect, BOOL bScaleAllObj)
2000-09-18 23:16:46 +00:00
{
sd::ScopeLockGuard aGuard( maLockAutoLayoutArrangement );
mbScaleObjects = bScaleAllObj;
2000-09-18 23:16:46 +00:00
SdrObject* pObj = NULL;
Point aRefPnt(0, 0);
Size aNewPageSize(rNewPageSize);
INT32 nLeft = rNewBorderRect.Left();
INT32 nRight = rNewBorderRect.Right();
INT32 nUpper = rNewBorderRect.Top();
INT32 nLower = rNewBorderRect.Bottom();
// Negative Werte stehen fuer nicht zu aendernde Werte
// -> aktuelle Werte verwenden
if (aNewPageSize.Width() < 0)
{
aNewPageSize.Width() = GetWdt();
}
if (aNewPageSize.Height() < 0)
{
aNewPageSize.Height() = GetHgt();
}
if (nLeft < 0)
{
nLeft = GetLftBorder();
}
if (nRight < 0)
{
nRight = GetRgtBorder();
}
if (nUpper < 0)
{
nUpper = GetUppBorder();
}
if (nLower < 0)
{
nLower = GetLwrBorder();
}
Point aBackgroundPos(nLeft, nUpper);
Size aBackgroundSize(aNewPageSize);
Rectangle aBorderRect (aBackgroundPos, aBackgroundSize);
if (mbScaleObjects)
2000-09-18 23:16:46 +00:00
{
aBackgroundSize.Width() -= nLeft + nRight;
aBackgroundSize.Height() -= nUpper + nLower;
aBorderRect.SetSize(aBackgroundSize);
aNewPageSize = aBackgroundSize;
}
long nOldWidth = GetWdt() - GetLftBorder() - GetRgtBorder();
long nOldHeight = GetHgt() - GetUppBorder() - GetLwrBorder();
Fraction aFractX = Fraction(aNewPageSize.Width(), nOldWidth);
Fraction aFractY = Fraction(aNewPageSize.Height(), nOldHeight);
ULONG nObjCnt = (mbScaleObjects ? GetObjCount() : 0);
2000-09-18 23:16:46 +00:00
for (ULONG nObj = 0; nObj < nObjCnt; nObj++)
{
BOOL bIsPresObjOnMaster = FALSE;
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
// Alle Objekte
pObj = GetObj(nObj);
2000-09-18 23:16:46 +00:00
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
if (bMaster && IsPresObj(pObj))
2000-09-18 23:16:46 +00:00
{
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
// Es ist ein Praesentationsobjekt auf der MasterPage
bIsPresObjOnMaster = TRUE;
2000-09-18 23:16:46 +00:00
}
if (pObj)
{
USHORT nIndexBackground = 0;
// #88084# remember aTopLeft as original TopLeft
Point aTopLeft(pObj->GetCurrentBoundRect().TopLeft());
2000-09-18 23:16:46 +00:00
if (bIsPresObjOnMaster && (pObj == GetPresObj(PRESOBJ_BACKGROUND, nIndexBackground)) )
2000-09-18 23:16:46 +00:00
{
/**************************************************************
* 1. Praesentationsobjekte auf Handzettelseite sollen nur positioniert werden
* 2. Hintergrundobjekt wird nicht skaliert
**************************************************************/
}
else if (!pObj->IsEdgeObj())
{
/**************************************************************
* Objekt skalieren
**************************************************************/
if (mbScaleObjects)
2000-09-18 23:16:46 +00:00
{
// #88084# use aTopLeft as original TopLeft
aRefPnt = aTopLeft;
2000-09-18 23:16:46 +00:00
}
pObj->Resize(aRefPnt, aFractX, aFractY);
if (mbScaleObjects)
2000-09-18 23:16:46 +00:00
{
SdrObjKind eObjKind = (SdrObjKind) pObj->GetObjIdentifier();
if (bIsPresObjOnMaster)
{
/**********************************************************
* Praesentationsvorlage: Texthoehe anpassen
**********************************************************/
USHORT nIndexTitle = 0;
USHORT nIndexOutline = 0;
USHORT nIndexNotes = 0;
if (pObj == GetPresObj(PRESOBJ_TITLE, nIndexTitle))
{
SfxStyleSheet* pTitleSheet = GetStyleSheetForPresObj(PRESOBJ_TITLE);
2000-09-18 23:16:46 +00:00
if (pTitleSheet)
2000-09-18 23:16:46 +00:00
{
SfxItemSet& rSet = pTitleSheet->GetItemSet();
2000-11-16 12:55:39 +00:00
SvxFontHeightItem& rOldHgt = (SvxFontHeightItem&) rSet.Get(EE_CHAR_FONTHEIGHT);
2000-09-18 23:16:46 +00:00
ULONG nFontHeight = rOldHgt.GetHeight();
nFontHeight = long(nFontHeight * (double) aFractY);
2000-11-16 12:55:39 +00:00
rSet.Put(SvxFontHeightItem(nFontHeight, 100, EE_CHAR_FONTHEIGHT));
2000-12-20 14:50:13 +00:00
if( SFX_ITEM_AVAILABLE == rSet.GetItemState( EE_CHAR_FONTHEIGHT_CJK ) )
{
rOldHgt = (SvxFontHeightItem&) rSet.Get(EE_CHAR_FONTHEIGHT_CJK);
nFontHeight = rOldHgt.GetHeight();
nFontHeight = long(nFontHeight * (double) aFractY);
rSet.Put(SvxFontHeightItem(nFontHeight, 100, EE_CHAR_FONTHEIGHT_CJK));
}
2000-11-16 12:55:39 +00:00
2000-12-20 14:50:13 +00:00
if( SFX_ITEM_AVAILABLE == rSet.GetItemState( EE_CHAR_FONTHEIGHT_CTL ) )
{
rOldHgt = (SvxFontHeightItem&) rSet.Get(EE_CHAR_FONTHEIGHT_CTL);
nFontHeight = rOldHgt.GetHeight();
nFontHeight = long(nFontHeight * (double) aFractY);
rSet.Put(SvxFontHeightItem(nFontHeight, 100, EE_CHAR_FONTHEIGHT_CTL));
}
2000-11-16 12:55:39 +00:00
pTitleSheet->Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED));
2000-09-18 23:16:46 +00:00
}
}
else if (pObj == GetPresObj(PRESOBJ_OUTLINE, nIndexOutline))
{
String aName(GetLayoutName());
aName += sal_Unicode( ' ' );
for (USHORT i=1; i<=9; i++)
{
String sLayoutName(aName);
sLayoutName += String::CreateFromInt32( (sal_Int32)i );
SfxStyleSheet* pOutlineSheet = (SfxStyleSheet*)((SdDrawDocument*) pModel)->GetStyleSheetPool()->Find(sLayoutName, SD_STYLE_FAMILY_MASTERPAGE);
2000-09-18 23:16:46 +00:00
if (pOutlineSheet)
2000-09-18 23:16:46 +00:00
{
// Neue Fonthoehe berechnen
SfxItemSet aTempSet(pOutlineSheet->GetItemSet());
2000-11-16 12:55:39 +00:00
SvxFontHeightItem& rOldHgt = (SvxFontHeightItem&) aTempSet.Get(EE_CHAR_FONTHEIGHT);
2000-09-18 23:16:46 +00:00
ULONG nFontHeight = rOldHgt.GetHeight();
nFontHeight = long(nFontHeight * (double) aFractY);
2000-11-16 12:55:39 +00:00
aTempSet.Put(SvxFontHeightItem(nFontHeight, 100, EE_CHAR_FONTHEIGHT));
2000-12-20 14:50:13 +00:00
if( SFX_ITEM_AVAILABLE == aTempSet.GetItemState( EE_CHAR_FONTHEIGHT_CJK ) )
{
rOldHgt = (SvxFontHeightItem&) aTempSet.Get(EE_CHAR_FONTHEIGHT_CJK);
nFontHeight = rOldHgt.GetHeight();
nFontHeight = long(nFontHeight * (double) aFractY);
aTempSet.Put(SvxFontHeightItem(nFontHeight, 100, EE_CHAR_FONTHEIGHT_CJK));
}
2000-11-16 12:55:39 +00:00
2000-12-20 14:50:13 +00:00
if( SFX_ITEM_AVAILABLE == aTempSet.GetItemState( EE_CHAR_FONTHEIGHT_CTL ) )
{
rOldHgt = (SvxFontHeightItem&) aTempSet.Get(EE_CHAR_FONTHEIGHT_CTL);
nFontHeight = rOldHgt.GetHeight();
nFontHeight = long(nFontHeight * (double) aFractY);
aTempSet.Put(SvxFontHeightItem(nFontHeight, 100, EE_CHAR_FONTHEIGHT_CTL));
}
2000-09-18 23:16:46 +00:00
// Bullet anpassen
((SdStyleSheet*) pOutlineSheet)->AdjustToFontHeight(aTempSet, FALSE);
2000-09-18 23:16:46 +00:00
// Sonderbehandlung: die INVALIDS auf NULL-Pointer
// zurueckgesetzen (sonst landen INVALIDs oder
// Pointer auf die DefaultItems in der Vorlage;
// beides wuerde die Attribut-Vererbung unterbinden)
aTempSet.ClearInvalidItems();
// Sonderbehandlung: nur die gueltigen Anteile des
// BulletItems
2000-12-20 14:50:13 +00:00
if (aTempSet.GetItemState(EE_PARA_BULLET) == SFX_ITEM_AVAILABLE)
2000-09-18 23:16:46 +00:00
{
SvxBulletItem aOldBulItem((SvxBulletItem&) pOutlineSheet->GetItemSet().Get(EE_PARA_BULLET));
2000-09-18 23:16:46 +00:00
SvxBulletItem& rNewBulItem = (SvxBulletItem&) aTempSet.Get(EE_PARA_BULLET);
aOldBulItem.CopyValidProperties(rNewBulItem);
aTempSet.Put(aOldBulItem);
}
pOutlineSheet->GetItemSet().Put(aTempSet);
2000-09-18 23:16:46 +00:00
pOutlineSheet->Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED));
2000-09-18 23:16:46 +00:00
}
}
}
else if (pObj == GetPresObj(PRESOBJ_NOTES, nIndexNotes))
{
SfxStyleSheet* pNotesSheet = GetStyleSheetForPresObj(PRESOBJ_NOTES);
2000-09-18 23:16:46 +00:00
if (pNotesSheet)
2000-09-18 23:16:46 +00:00
{
ULONG nHeight = pObj->GetLogicRect().GetSize().Height();
ULONG nFontHeight = (ULONG) (nHeight * 0.0741);
SfxItemSet& rSet = pNotesSheet->GetItemSet();
rSet.Put( SvxFontHeightItem(nFontHeight, 100, EE_CHAR_FONTHEIGHT ));
rSet.Put( SvxFontHeightItem(nFontHeight, 100, EE_CHAR_FONTHEIGHT_CJK ));
rSet.Put( SvxFontHeightItem(nFontHeight, 100, EE_CHAR_FONTHEIGHT_CTL ));
pNotesSheet->Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED));
2000-09-18 23:16:46 +00:00
}
}
}
else if ( eObjKind != OBJ_TITLETEXT &&
eObjKind != OBJ_OUTLINETEXT &&
pObj->ISA(SdrTextObj) &&
pObj->GetOutlinerParaObject() )
{
/******************************************************
* Normales Textobjekt: Texthoehe anpassen
******************************************************/
2000-12-20 14:50:13 +00:00
ULONG nScriptType = pObj->GetOutlinerParaObject()->GetTextObject().GetScriptType();
USHORT nWhich = EE_CHAR_FONTHEIGHT;
if ( nScriptType == SCRIPTTYPE_ASIAN )
nWhich = EE_CHAR_FONTHEIGHT_CJK;
else if ( nScriptType == SCRIPTTYPE_COMPLEX )
nWhich = EE_CHAR_FONTHEIGHT_CTL;
// #88084# use more modern method to scale the text height
sal_uInt32 nFontHeight = ((SvxFontHeightItem&)pObj->GetMergedItem(nWhich)).GetHeight();
sal_uInt32 nNewFontHeight = sal_uInt32((double)nFontHeight * (double)aFractY);
pObj->SetMergedItem(SvxFontHeightItem(nNewFontHeight, 100, nWhich));
2000-09-18 23:16:46 +00:00
}
}
}
if (mbScaleObjects && !pObj->IsEdgeObj())
2000-09-18 23:16:46 +00:00
{
/**************************************************************
* Objektposition skalieren
**************************************************************/
Point aNewPos;
2000-09-18 23:16:46 +00:00
// #76447# corrected scaling; only distances may be scaled
// #88084# use aTopLeft as original TopLeft
aNewPos.X() = long((aTopLeft.X() - GetLftBorder()) * (double)aFractX) + nLeft;
aNewPos.Y() = long((aTopLeft.Y() - GetUppBorder()) * (double)aFractY) + nUpper;
2000-09-18 23:16:46 +00:00
Size aVec(aNewPos.X() - aTopLeft.X(), aNewPos.Y() - aTopLeft.Y());
2000-09-18 23:16:46 +00:00
if (aVec.Height() != 0 || aVec.Width() != 0)
{
pObj->NbcMove(aVec);
}
Rectangle aBoundRect = pObj->GetCurrentBoundRect();
2000-09-18 23:16:46 +00:00
if (!aBorderRect.IsInside(aBoundRect))
{
/**********************************************************
* Objekt liegt nicht vollstaendig innerhalb der Raender
* -> Position korrigieren
**********************************************************/
Point aOldPos(aBoundRect.TopLeft());
aNewPos = aOldPos;
2000-09-18 23:16:46 +00:00
// Position links oben ggf. korrigieren
aNewPos.X() = Max(aNewPos.X(), aBorderRect.Left());
aNewPos.Y() = Max(aNewPos.Y(), aBorderRect.Top());
aVec = Size(aNewPos.X() - aOldPos.X(), aNewPos.Y() - aOldPos.Y());
2000-09-18 23:16:46 +00:00
if (aVec.Height() != 0 || aVec.Width() != 0)
{
pObj->NbcMove(aVec);
}
// Position rechts unten ggf. korrigieren
aOldPos = aBoundRect.BottomRight();
aNewPos = aOldPos;
aNewPos.X() = Min(aNewPos.X(), aBorderRect.Right());
aNewPos.Y() = Min(aNewPos.Y(), aBorderRect.Bottom());
aVec = Size(aNewPos.X() - aOldPos.X(), aNewPos.Y() - aOldPos.Y());
if (aVec.Height() != 0 || aVec.Width() != 0)
{
pObj->NbcMove(aVec);
}
}
pObj->SetChanged();
pObj->BroadcastObjectChange();
2000-09-18 23:16:46 +00:00
}
}
}
}
SdrObject* convertPresentationObjectImpl( SdPage& rPage, SdrObject* pSourceObj, PresObjKind eObjKind, bool bVertical, Rectangle aRect )
{
SdDrawDocument* pModel = static_cast< SdDrawDocument* >( rPage.GetModel() );
DBG_ASSERT( pModel, "sd::convertPresentationObjectImpl(), no model on page!" );
if( !pModel || !pSourceObj )
return pSourceObj;
sd::UndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : 0;
const bool bUndo = pUndoManager && pUndoManager->isInListAction() && rPage.IsInserted();
SdrObject* pNewObj = pSourceObj;
if((eObjKind == PRESOBJ_OUTLINE) && (pSourceObj->GetObjIdentifier() != OBJ_OUTLINETEXT) )
{
pNewObj = rPage.CreatePresObj(PRESOBJ_OUTLINE, bVertical, aRect);
// Text des Untertitels in das PRESOBJ_OUTLINE setzen
OutlinerParaObject* pOutlParaObj = pSourceObj->GetOutlinerParaObject();
if(pOutlParaObj)
{
// Text umsetzen
::sd::Outliner* pOutl = pModel->GetInternalOutliner( TRUE );
pOutl->Clear();
pOutl->SetText( *pOutlParaObj );
pOutl->SetMinDepth(1, TRUE);
pOutlParaObj = pOutl->CreateParaObject();
pNewObj->SetOutlinerParaObject( pOutlParaObj );
pOutl->Clear();
pNewObj->SetEmptyPresObj(FALSE);
for (USHORT nLevel = 1; nLevel < 10; nLevel++)
{
// Neue Vorlage zuweisen
String aName(rPage.GetLayoutName());
aName += sal_Unicode( ' ' );
aName += String::CreateFromInt32( nLevel );
SfxStyleSheet* pSheet = static_cast<SfxStyleSheet*>( pModel->GetStyleSheetPool()->Find(aName, SD_STYLE_FAMILY_MASTERPAGE) );
if (pSheet)
{
if (nLevel == 1)
{
SfxStyleSheet* pSubtitleSheet = rPage.GetStyleSheetForPresObj(PRESOBJ_TEXT);
if (pSubtitleSheet)
pOutlParaObj->ChangeStyleSheetName(SD_STYLE_FAMILY_MASTERPAGE, pSubtitleSheet->GetName(), pSheet->GetName());
}
2000-09-18 23:16:46 +00:00
pNewObj->StartListening(*pSheet);
}
}
// LRSpace-Item loeschen
SfxItemSet aSet(pModel->GetPool(), EE_PARA_LRSPACE, EE_PARA_LRSPACE );
aSet.Put(pNewObj->GetMergedItemSet());
aSet.ClearItem(EE_PARA_LRSPACE);
pNewObj->SetMergedItemSet(aSet);
if( bUndo )
pUndoManager->AddUndoAction( pModel->GetSdrUndoFactory().CreateUndoDeleteObject(*pSourceObj) );
// Remove outline shape from page
rPage.RemoveObject( pSourceObj->GetOrdNum() );
if( !bUndo )
SdrObject::Free( pSourceObj );
}
}
else if((eObjKind == PRESOBJ_TEXT) && (pSourceObj->GetObjIdentifier() != OBJ_TEXT) )
{
// is there an outline shape we can use to replace empty subtitle shape?
pNewObj = rPage.CreatePresObj(PRESOBJ_TEXT, bVertical, aRect);
// Text des Gliederungsobjekts in das PRESOBJ_TITLE setzen
OutlinerParaObject* pOutlParaObj = pSourceObj->GetOutlinerParaObject();
if(pOutlParaObj)
{
// Text umsetzen
::sd::Outliner* pOutl = pModel->GetInternalOutliner();
pOutl->Clear();
pOutl->SetText( *pOutlParaObj );
pOutl->SetMinDepth(0, TRUE);
pOutlParaObj = pOutl->CreateParaObject();
pNewObj->SetOutlinerParaObject( pOutlParaObj );
pOutl->Clear();
pNewObj->SetEmptyPresObj(FALSE);
// Linken Einzug zuruecksetzen
SfxItemSet aSet(pModel->GetPool(), EE_PARA_LRSPACE, EE_PARA_LRSPACE );
aSet.Put(pNewObj->GetMergedItemSet());
const SvxLRSpaceItem& rLRItem = (const SvxLRSpaceItem&) aSet.Get(EE_PARA_LRSPACE);
SvxLRSpaceItem aNewLRItem(rLRItem);
aNewLRItem.SetTxtLeft(0);
aSet.Put(aNewLRItem);
pNewObj->SetMergedItemSet(aSet);
SfxStyleSheet* pSheet = rPage.GetStyleSheetForPresObj(PRESOBJ_TEXT);
if (pSheet)
pNewObj->SetStyleSheet(pSheet, TRUE);
// Remove subtitle shape from page
if( bUndo )
pUndoManager->AddUndoAction(pModel->GetSdrUndoFactory().CreateUndoDeleteObject(*pSourceObj));
rPage.RemoveObject( pSourceObj->GetOrdNum() );
if( !bUndo )
SdrObject::Free( pSourceObj );
}
}
return pNewObj;
}
/** reuses or creates a presentation shape for an auto layout that fits the given parameter
@param eObjKind
The kind of presentation shape we like to have
@param nIndex
If > 1 we skip the first nIndex-1 shapes with the presentation shape kind eObjKind while
looking for an existing presentation shape
@param bVertical
If true, the shape is created vertical if bInit is true
@param aRect
The rectangle that should be used to transform the shape
@param bInit
If true the shape is created if not found
@returns
A presentation shape that was either found or created with the given parameters
*/
SdrObject* SdPage::InsertAutoLayoutShape( SdrObject* pObj, PresObjKind eObjKind, bool bVertical, Rectangle aRect, bool bInit )
2000-09-18 23:16:46 +00:00
{
sd::UndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : 0;
const bool bUndo = pUndoManager && pUndoManager->isInListAction() && IsInserted();
2000-09-18 23:16:46 +00:00
if (!pObj && bInit)
{
2001-02-26 09:20:50 +00:00
pObj = CreatePresObj(eObjKind, bVertical, aRect);
2000-09-18 23:16:46 +00:00
}
else if ( pObj && (pObj->GetUserCall() || bInit) )
{
// convert object if shape type does not match kind (f.e. converting outline text to subtitle text)
if( bInit )
pObj = convertPresentationObjectImpl( *this, pObj, eObjKind, bVertical, aRect );
if( bUndo )
{
pUndoManager->AddUndoAction( pModel->GetSdrUndoFactory().CreateUndoGeoObject( *pObj ) );
pUndoManager->AddUndoAction( pModel->GetSdrUndoFactory().CreateUndoAttrObject( *pObj, TRUE, TRUE ) );
pUndoManager->AddUndoAction( new UndoObjectUserCall( *pObj ) );
}
2000-09-18 23:16:46 +00:00
if ( pObj->ISA(SdrGrafObj) && !pObj->IsEmptyPresObj() )
( (SdrGrafObj*) pObj)->AdjustToMaxRect( aRect, FALSE );
else
pObj->SetLogicRect(aRect);
pObj->SetUserCall(this);
SdrTextObj* pTextObject = dynamic_cast< SdrTextObj* >(pObj);
if( pTextObject )
2000-09-18 23:16:46 +00:00
{
if( pTextObject->IsVerticalWriting() != (bVertical ? sal_True : sal_False) )
{
pTextObject->SetVerticalWriting( bVertical );
2000-09-18 23:16:46 +00:00
// #94826# here make sure the correct anchoring is used when the object
// is re-used but orientation is changed
if(PRESOBJ_OUTLINE == eObjKind)
pTextObject->SetMergedItem(SdrTextHorzAdjustItem( bVertical ? SDRTEXTHORZADJUST_RIGHT : SDRTEXTHORZADJUST_BLOCK ));
}
2001-06-22 10:24:53 +00:00
if( !bMaster )
2001-02-26 09:20:50 +00:00
{
if ( pTextObject->IsAutoGrowHeight() )
2001-06-22 10:24:53 +00:00
{
// switch off AutoGrowHeight, set new MinHeight
SfxItemSet aTempAttr( ((SdDrawDocument*) pModel)->GetPool() );
SdrTextMinFrameHeightItem aMinHeight( aRect.GetSize().Height() );
aTempAttr.Put( aMinHeight );
aTempAttr.Put( SdrTextAutoGrowHeightItem(FALSE) );
pTextObject->SetMergedItemSet(aTempAttr);
pTextObject->SetLogicRect(aRect);
2001-06-22 10:24:53 +00:00
// switch on AutoGrowHeight
SfxItemSet aAttr( ((SdDrawDocument*) pModel)->GetPool() );
aAttr.Put( SdrTextAutoGrowHeightItem(TRUE) );
pTextObject->SetMergedItemSet(aAttr);
2001-06-22 10:24:53 +00:00
}
if ( pTextObject->IsAutoGrowWidth() )
2001-06-22 10:24:53 +00:00
{
// switch off AutoGrowWidth , set new MinWidth
SfxItemSet aTempAttr( ((SdDrawDocument*) pModel)->GetPool() );
SdrTextMinFrameWidthItem aMinWidth( aRect.GetSize().Width() );
aTempAttr.Put( aMinWidth );
aTempAttr.Put( SdrTextAutoGrowWidthItem(FALSE) );
pTextObject->SetMergedItemSet(aTempAttr);
pTextObject->SetLogicRect(aRect);
2001-06-22 10:24:53 +00:00
// switch on AutoGrowWidth
SfxItemSet aAttr( ((SdDrawDocument*) pModel)->GetPool() );
aAttr.Put( SdrTextAutoGrowWidthItem(TRUE) );
pTextObject->SetMergedItemSet(aAttr);
2001-06-22 10:24:53 +00:00
}
2001-02-26 09:20:50 +00:00
}
2000-09-18 23:16:46 +00:00
}
}
if(pObj && bInit )
2000-09-18 23:16:46 +00:00
{
if( !IsPresObj( pObj ) )
2000-09-18 23:16:46 +00:00
{
if( bUndo )
pUndoManager->AddUndoAction( new UndoObjectPresentationKind( *pObj ) );
2000-09-18 23:16:46 +00:00
InsertPresObj( pObj, eObjKind );
2000-09-18 23:16:46 +00:00
}
// make adjustments for vertical title and outline shapes
if( bVertical && (( eObjKind == PRESOBJ_TITLE) || (eObjKind == PRESOBJ_OUTLINE)))
{
SfxItemSet aNewSet(pObj->GetMergedItemSet());
aNewSet.Put( SdrTextAutoGrowWidthItem(TRUE) );
aNewSet.Put( SdrTextAutoGrowHeightItem(FALSE) );
if( eObjKind == PRESOBJ_OUTLINE )
2000-09-18 23:16:46 +00:00
{
aNewSet.Put( SdrTextVertAdjustItem(SDRTEXTVERTADJUST_TOP) );
aNewSet.Put( SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_RIGHT) );
2000-09-18 23:16:46 +00:00
}
pObj->SetMergedItemSet(aNewSet);
2000-09-18 23:16:46 +00:00
}
}
return pObj;
2000-09-18 23:16:46 +00:00
}
/*************************************************************************
|*
|* Liefert den PresObjKind eines Objektes zurueck
|*
\************************************************************************/
PresObjKind SdPage::GetPresObjKind(SdrObject* pObj) const
2000-09-18 23:16:46 +00:00
{
PresObjKind eKind = PRESOBJ_NONE;
if( (pObj != 0) && (maPresentationShapeList.hasShape(*pObj)) )
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
{
SdAnimationInfo* pInfo = SdDrawDocument::GetShapeUserData(*pObj);
if( pInfo )
eKind = pInfo->mePresObjKind;
2000-09-18 23:16:46 +00:00
}
return eKind;
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
}
bool SdPage::IsPresObj(const SdrObject* pObj)
{
return pObj && maPresentationShapeList.hasShape( const_cast<SdrObject&>(*pObj) );
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
}
void SdPage::RemovePresObj(const SdrObject* pObj)
{
if( pObj && maPresentationShapeList.hasShape(const_cast<SdrObject&>(*pObj)) )
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
{
SdAnimationInfo* pInfo = SdDrawDocument::GetShapeUserData(const_cast<SdrObject&>(*pObj));
if( pInfo )
pInfo->mePresObjKind = PRESOBJ_NONE;
maPresentationShapeList.removeShape(const_cast<SdrObject&>(*pObj));
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
}
}
void SdPage::InsertPresObj(SdrObject* pObj, PresObjKind eKind )
{
DBG_ASSERT( pObj, "sd::SdPage::InsertPresObj(), invalid presentation object inserted!" );
DBG_ASSERT( !IsPresObj(pObj), "sd::SdPage::InsertPresObj(), presentation object inserted twice!" );
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
if( pObj )
{
SdAnimationInfo* pInfo = SdDrawDocument::GetShapeUserData(*pObj, true);
if( pInfo )
pInfo->mePresObjKind = eKind;
maPresentationShapeList.addShape(*pObj);
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
}
2000-09-18 23:16:46 +00:00
}
/*************************************************************************
|*
|* Text des Objektes setzen
|*
\************************************************************************/
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
void SdPage::SetObjText(SdrTextObj* pObj, SdrOutliner* pOutliner, PresObjKind eObjKind, const String& rString )
2000-09-18 23:16:46 +00:00
{
if ( pObj )
{
DBG_ASSERT( pObj->ISA(SdrTextObj), "SetObjText: Kein SdrTextObj!" );
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
::Outliner* pOutl = pOutliner;
2000-09-18 23:16:46 +00:00
if (!pOutliner)
{
SfxItemPool* pPool = ((SdDrawDocument*) GetModel())->GetDrawOutliner().GetEmptyItemSet().GetPool();
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
pOutl = new ::Outliner( pPool, OUTLINERMODE_OUTLINEOBJECT );
2002-07-26 07:32:44 +00:00
pOutl->SetRefDevice( SD_MOD()->GetRefDevice( *( (SdDrawDocument*) GetModel() )->GetDocSh() ) );
2000-09-18 23:16:46 +00:00
pOutl->SetEditTextObjectPool(pPool);
pOutl->SetStyleSheetPool((SfxStyleSheetPool*)GetModel()->GetStyleSheetPool());
pOutl->SetMinDepth(0);
pOutl->EnableUndo(FALSE);
pOutl->SetUpdateMode( FALSE );
}
USHORT nOutlMode = pOutl->GetMode();
USHORT nMinDepth = pOutl->GetMinDepth();
Size aPaperSize = pOutl->GetPaperSize();
BOOL bUpdateMode = pOutl->GetUpdateMode();
pOutl->SetUpdateMode(FALSE);
pOutl->SetParaAttribs( 0, pOutl->GetEmptyItemSet() );
// #95114# Always set the object's StyleSheet at the Outliner to
// use the current objects StyleSheet. Thus it's the same as in
// SetText(...).
// #95114# Moved this implementation from where SetObjText(...) was called
// to inside this method to work even when outliner is fetched here.
pOutl->SetStyleSheet(0, pObj->GetStyleSheet());
2000-09-18 23:16:46 +00:00
String aString;
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
switch( eObjKind )
2000-09-18 23:16:46 +00:00
{
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
case PRESOBJ_OUTLINE:
{
pOutl->Init( OUTLINERMODE_OUTLINEOBJECT );
pOutl->SetMinDepth(1);
2000-09-18 23:16:46 +00:00
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
aString += sal_Unicode( '\t' );
aString += rString;
2000-09-18 23:16:46 +00:00
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
if (bMaster)
{
pOutl->SetStyleSheet( 0, GetStyleSheetForPresObj(eObjKind) );
aString += String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "\n\t\t" ));
aString += String ( SdResId( STR_PRESOBJ_MPOUTLLAYER2 ) );
2000-09-18 23:16:46 +00:00
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
aString += String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "\n\t\t\t" ));
aString += String ( SdResId( STR_PRESOBJ_MPOUTLLAYER3 ) );
2000-09-18 23:16:46 +00:00
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
aString += String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "\n\t\t\t\t" ));
aString += String ( SdResId( STR_PRESOBJ_MPOUTLLAYER4 ) );
2000-09-18 23:16:46 +00:00
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
aString += String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "\n\t\t\t\t\t" ));
aString += String ( SdResId( STR_PRESOBJ_MPOUTLLAYER5 ) );
2000-09-18 23:16:46 +00:00
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
aString += String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "\n\t\t\t\t\t\t" ));
aString += String ( SdResId( STR_PRESOBJ_MPOUTLLAYER6 ) );
2000-09-18 23:16:46 +00:00
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
aString += String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "\n\t\t\t\t\t\t\t" ));
aString += String ( SdResId( STR_PRESOBJ_MPOUTLLAYER7 ) );
2000-09-18 23:16:46 +00:00
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
aString += String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "\n\t\t\t\t\t\t\t\t" ));
aString += String ( SdResId( STR_PRESOBJ_MPOUTLLAYER8 ) );
2000-09-18 23:16:46 +00:00
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
aString += String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "\n\t\t\t\t\t\t\t\t\t" ));
aString += String ( SdResId( STR_PRESOBJ_MPOUTLLAYER9 ) );
}
2000-09-18 23:16:46 +00:00
}
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
break;
case PRESOBJ_TITLE:
{
pOutl->Init( OUTLINERMODE_TITLEOBJECT );
pOutl->SetMinDepth(0);
aString += rString;
}
break;
default:
{
pOutl->Init( OUTLINERMODE_TEXTOBJECT );
pOutl->SetMinDepth(0);
aString += rString;
// check if we need to add a text field
SvxFieldData* pData = NULL;
switch( eObjKind )
{
case PRESOBJ_HEADER:
pData = new SvxHeaderField();
break;
case PRESOBJ_FOOTER:
pData = new SvxFooterField();
break;
case PRESOBJ_SLIDENUMBER:
pData = new SvxPageField();
break;
case PRESOBJ_DATETIME:
pData = new SvxDateTimeField();
break;
default:
break;
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
}
if( pData )
{
ESelection e;
SvxFieldItem aField( *pData, EE_FEATURE_FIELD );
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
pOutl->QuickInsertField(aField,e);
delete pData;
}
}
break;
2000-09-18 23:16:46 +00:00
}
pOutl->SetPaperSize( pObj->GetLogicRect().GetSize() );
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
if( aString.Len() )
pOutl->SetText( aString, pOutl->GetParagraph( 0 ) );
2000-09-18 23:16:46 +00:00
// MT: Wird nicht gebraucht...
// pOutl->SetUpdateMode(TRUE);
( (SdrTextObj*) pObj)->SetOutlinerParaObject( pOutl->CreateParaObject() );
if (!pOutliner)
{
delete pOutl;
pOutl = NULL;
}
else
{
// Outliner restaurieren
pOutl->Init( nOutlMode );
pOutl->SetParaAttribs( 0, pOutl->GetEmptyItemSet() );
pOutl->SetUpdateMode( bUpdateMode );
pOutl->SetMinDepth( nMinDepth );
pOutl->SetPaperSize( aPaperSize );
}
}
}
/*************************************************************************
|*
|* Link & Daten von einem VControl empfangen
|*
\************************************************************************/
void SdPage::SetLinkData(const String&, const String& )
2000-09-18 23:16:46 +00:00
{
}
/*************************************************************************
|*
|* Layoutname setzen
|*
\************************************************************************/
void SdPage::SetLayoutName(String aName)
{
maLayoutName = aName;
2000-09-18 23:16:46 +00:00
if( bMaster )
{
String aSep( RTL_CONSTASCII_USTRINGPARAM(SD_LT_SEPARATOR) );
USHORT nPos = maLayoutName.Search( aSep );
2000-09-18 23:16:46 +00:00
if ( nPos != STRING_NOTFOUND )
{
FmFormPage::SetName(maLayoutName.Copy(0, nPos));
2000-09-18 23:16:46 +00:00
}
}
}
/*************************************************************************
|*
|* Seitenname zurueckgeben und ggf. generieren
|*
\************************************************************************/
const String& SdPage::GetName() const
2000-09-18 23:16:46 +00:00
{
String aCreatedPageName( maCreatedPageName );
if (GetRealName().Len() == 0)
2000-09-18 23:16:46 +00:00
{
if ((mePageKind == PK_STANDARD || mePageKind == PK_NOTES) && !bMaster)
2000-09-18 23:16:46 +00:00
{
// default name for handout pages
2000-09-18 23:16:46 +00:00
USHORT nNum = (GetPageNum() + 1) / 2;
aCreatedPageName = String(SdResId(STR_PAGE));
aCreatedPageName += sal_Unicode( ' ' );
if( GetModel()->GetPageNumType() == SVX_NUMBER_NONE )
{
// if the document has number none as a formating
// for page numbers we still default to arabic numbering
// to keep the default page names unique
aCreatedPageName += String::CreateFromInt32( (sal_Int32)nNum );
}
else
{
aCreatedPageName += ((SdDrawDocument*) GetModel())->CreatePageNumValue(nNum);
}
2000-09-18 23:16:46 +00:00
}
else
{
/******************************************************************
* Defaultname fuer Handzettelseiten
******************************************************************/
aCreatedPageName = String(SdResId(STR_LAYOUT_DEFAULT_NAME));
}
}
else
{
aCreatedPageName = GetRealName();
2000-09-18 23:16:46 +00:00
}
if (mePageKind == PK_NOTES)
2000-09-18 23:16:46 +00:00
{
aCreatedPageName += sal_Unicode( ' ' );
aCreatedPageName += String(SdResId(STR_NOTES));
}
else if (mePageKind == PK_HANDOUT && bMaster)
2000-09-18 23:16:46 +00:00
{
aCreatedPageName += String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( " (" ));
aCreatedPageName += String(SdResId(STR_HANDOUT));
aCreatedPageName += sal_Unicode( ')' );
}
const_cast< SdPage* >(this)->maCreatedPageName = aCreatedPageName;
return maCreatedPageName;
2000-09-18 23:16:46 +00:00
}
/*************************************************************************
|*
|*
|*
\************************************************************************/
void SdPage::AdjustBackgroundSize()
{
SdrObject* pObj = GetPresObj(PRESOBJ_BACKGROUND);
if (pObj)
{
// Hintergrund-Objekt verschieben
pObj->SetMoveProtect(FALSE);
pObj->SetResizeProtect(FALSE);
{
sd::ScopeLockGuard aGuard( maLockAutoLayoutArrangement );
Point aBackgroundPos;
Size aBackgroundSize( GetSize() );
if( !mbBackgroundFullSize )
{
aBackgroundPos = Point( GetLftBorder(), GetUppBorder() );
aBackgroundSize.Width() -= GetLftBorder() + GetRgtBorder() - 1;
aBackgroundSize.Height() -= GetUppBorder() + GetLwrBorder() - 1;
}
Rectangle aBackgroundRect (aBackgroundPos, aBackgroundSize);
pObj->SetLogicRect(aBackgroundRect);
2000-09-18 23:16:46 +00:00
}
pObj->SetMoveProtect(TRUE);
pObj->SetResizeProtect(TRUE);
}
}
/*************************************************************************
|*
|*
|*
\************************************************************************/
void SdPage::SetOrientation( Orientation eOrient)
{
meOrientation = eOrient;
}
2000-09-18 23:16:46 +00:00
/*************************************************************************
|*
|*
|*
\************************************************************************/
Orientation SdPage::GetOrientation() const
{
return meOrientation;
}
2000-09-18 23:16:46 +00:00
/*************************************************************************
|*
|* Liefert den Default-Text eines PresObjektes zurueck
|*
\************************************************************************/
String SdPage::GetPresObjText(PresObjKind eObjKind) const
2000-09-18 23:16:46 +00:00
{
String aString;
if (eObjKind == PRESOBJ_TITLE)
{
if (bMaster)
{
if (mePageKind != PK_NOTES)
2000-09-18 23:16:46 +00:00
{
aString = String ( SdResId( STR_PRESOBJ_MPTITLE ) );
}
else
{
aString = String ( SdResId( STR_PRESOBJ_MPNOTESTITLE ) );
}
}
else
{
aString = String ( SdResId( STR_PRESOBJ_TITLE ) );
}
}
else if (eObjKind == PRESOBJ_OUTLINE)
{
if (bMaster)
{
aString = String ( SdResId( STR_PRESOBJ_MPOUTLINE ) );
}
else
{
aString = String ( SdResId( STR_PRESOBJ_OUTLINE ) );
}
}
else if (eObjKind == PRESOBJ_NOTES)
{
if (bMaster)
{
aString = String ( SdResId( STR_PRESOBJ_MPNOTESTEXT ) );
}
else
{
aString = String ( SdResId( STR_PRESOBJ_NOTESTEXT ) );
}
}
else if (eObjKind == PRESOBJ_TEXT)
{
aString = String ( SdResId( STR_PRESOBJ_TEXT ) );
}
else if (eObjKind == PRESOBJ_GRAPHIC)
{
aString = String ( SdResId( STR_PRESOBJ_GRAPHIC ) );
}
else if (eObjKind == PRESOBJ_OBJECT)
{
aString = String ( SdResId( STR_PRESOBJ_OBJECT ) );
}
else if (eObjKind == PRESOBJ_CHART)
{
aString = String ( SdResId( STR_PRESOBJ_CHART ) );
}
else if (eObjKind == PRESOBJ_ORGCHART)
{
aString = String ( SdResId( STR_PRESOBJ_ORGCHART ) );
}
else if (eObjKind == PRESOBJ_TABLE)
{
aString = String ( SdResId( STR_PRESOBJ_TABLE ) );
}
return(aString);
}
extern uno::Reference< uno::XInterface > createUnoPageImpl( SdPage* pPage );
uno::Reference< uno::XInterface > SdPage::createUnoPage()
{
2000-11-30 10:25:28 +00:00
return createUnoPageImpl( this );
}
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
/** returns the SdPage implementation for the given XDrawPage or 0 if not available */
SdPage* SdPage::getImplementation( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >& xPage )
{
try
{
::com::sun::star::uno::Reference< ::com::sun::star::lang::XUnoTunnel > xUnoTunnel( xPage, ::com::sun::star::uno::UNO_QUERY );
if( xUnoTunnel.is() )
{
SvxDrawPage* pUnoPage = reinterpret_cast<SvxDrawPage*>(sal::static_int_cast<sal_uIntPtr>(xUnoTunnel->getSomething( SvxDrawPage::getUnoTunnelId()) ) );
if( pUnoPage )
return static_cast< SdPage* >( pUnoPage->GetSdrPage() );
}
}
catch( ::com::sun::star::uno::Exception& e )
{
(void)e;
DBG_ERROR("sd::SdPage::getImplementation(), exception cathced!" );
}
return 0;
}
void SdPage::SetName (const String& rName)
{
FmFormPage::SetName (rName);
ActionChanged();
}
const HeaderFooterSettings& SdPage::getHeaderFooterSettings() const
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
{
if( mePageKind == PK_HANDOUT && !bMaster )
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
{
return (((SdPage&)TRG_GetMasterPage()).maHeaderFooterSettings);
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
}
else
{
return maHeaderFooterSettings;
}
}
void SdPage::setHeaderFooterSettings( const sd::HeaderFooterSettings& rNewSettings )
{
if( mePageKind == PK_HANDOUT && !bMaster )
{
(((SdPage&)TRG_GetMasterPage()).maHeaderFooterSettings) = rNewSettings;
}
else
{
maHeaderFooterSettings = rNewSettings;
}
SetChanged();
if(TRG_HasMasterPage())
{
TRG_GetMasterPageDescriptorViewContact().ActionChanged();
}
}
bool SdPage::checkVisibility(
::sdr::contact::ViewObjectContact& rOriginal,
::sdr::contact::DisplayInfo& rDisplayInfo,
bool bEdit )
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
{
if( !FmFormPage::checkVisibility( rOriginal, rDisplayInfo, bEdit ) )
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
return false;
SdrObject* pObj = rOriginal.GetViewContact().TryToGetSdrObject();
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
if( pObj == NULL )
return false;
const bool bIsPrinting(rDisplayInfo.OutputToPrinter());
const SdrPageView* pPageView = rDisplayInfo.GetPageView();
const bool bIsInsidePageObj(pPageView && pPageView->GetPage() != rDisplayInfo.GetProcessedPage());
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
// empty presentation objects only visible during edit mode
if( (bIsPrinting || !bEdit || bIsInsidePageObj ) && pObj->IsEmptyPresObj() )
{
if( (pObj->GetObjInventor() != SdrInventor) || ( (pObj->GetObjIdentifier() != OBJ_RECT) && (pObj->GetObjIdentifier() != OBJ_PAGE) ) )
return false;
}
if( ( pObj->GetObjInventor() == SdrInventor ) && ( pObj->GetObjIdentifier() == OBJ_TEXT ) )
{
SdPage* pCheckPage = (SdPage*)pObj->GetPage();
if( pCheckPage )
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
{
PresObjKind eKind = pCheckPage->GetPresObjKind(pObj);
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
if((eKind == PRESOBJ_FOOTER) || (eKind == PRESOBJ_HEADER) || (eKind == PRESOBJ_DATETIME) || (eKind == PRESOBJ_SLIDENUMBER) )
{
const bool bMasterObj(rDisplayInfo.GetMasterPagePainting());
if( bMasterObj || ( pCheckPage->GetPageKind() == PK_HANDOUT && bIsPrinting ) )
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
{
// get the page that is currently painted
SdPage* pPaintPage = (SdPage*)rDisplayInfo.GetProcessedPage();
if( pPaintPage )
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
{
// if we are not on a masterpage, see if we have to draw this header&footer object at all
const sd::HeaderFooterSettings& rSettings = pPaintPage->getHeaderFooterSettings();
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
switch( eKind )
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
{
case PRESOBJ_FOOTER:
return rSettings.mbFooterVisible;
case PRESOBJ_HEADER:
return rSettings.mbHeaderVisible;
case PRESOBJ_DATETIME:
return rSettings.mbDateTimeVisible;
case PRESOBJ_SLIDENUMBER:
return rSettings.mbSlideNumberVisible;
default:
break;
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
}
}
}
}
}
}
// i63977, do not print sdr page obj from master pages
if( ( pObj->GetObjInventor() == SdrInventor ) && ( pObj->GetObjIdentifier() == OBJ_PAGE ) )
{
if( pObj->GetPage() && pObj->GetPage()->IsMasterPage() )
return false;
}
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
return true;
}
bool SdPage::RestoreDefaultText( SdrObject* pObj )
{
bool bRet = false;
SdrTextObj* pTextObj = dynamic_cast< SdrTextObj* >( pObj );
if( pTextObj )
{
PresObjKind ePresObjKind = GetPresObjKind(pTextObj);
if (ePresObjKind == PRESOBJ_TITLE ||
ePresObjKind == PRESOBJ_OUTLINE ||
ePresObjKind == PRESOBJ_NOTES ||
ePresObjKind == PRESOBJ_TEXT)
{
String aString( GetPresObjText(ePresObjKind) );
if (aString.Len())
{
BOOL bVertical = FALSE;
OutlinerParaObject* pOldPara = pTextObj->GetOutlinerParaObject();
if( pOldPara )
bVertical = pOldPara->IsVertical(); // is old para object vertical?
SetObjText( pTextObj, 0, ePresObjKind, aString );
if( pOldPara )
{
//pTextObj->SetVerticalWriting( bVertical );
//
// #94826# Here, only the vertical flag for the
// OutlinerParaObjects needs to be changed. The
// AutoGrowWidth/Height items still exist in the
// not changed object.
if(pTextObj
&& pTextObj->GetOutlinerParaObject()
&& pTextObj->GetOutlinerParaObject()->IsVertical() != bVertical)
{
Rectangle aObjectRect = pTextObj->GetSnapRect();
pTextObj->GetOutlinerParaObject()->SetVertical(bVertical);
pTextObj->SetSnapRect(aObjectRect);
}
}
pTextObj->SetTextEditOutliner( NULL ); // to make stylesheet settings work
pTextObj->NbcSetStyleSheet( GetStyleSheetForPresObj(ePresObjKind), TRUE );
pTextObj->SetEmptyPresObj(TRUE);
bRet = true;
}
}
}
return bRet;
}
void SdPage::CalculateHandoutAreas( SdDrawDocument& rModel, AutoLayout eLayout, bool bHorizontal, std::vector< Rectangle >& rAreas )
{
SdPage& rHandoutMaster = *rModel.GetMasterSdPage( 0, PK_HANDOUT );
Size aArea = rHandoutMaster.GetSize();
const long nGapW = 1000; // gap is 1cm
const long nGapH = 1000;
long nLeftBorder = rHandoutMaster.GetLftBorder();
long nRightBorder = rHandoutMaster.GetRgtBorder();
long nTopBorder = rHandoutMaster.GetUppBorder();
long nBottomBorder = rHandoutMaster.GetLwrBorder();
const long nHeaderFooterHeight = static_cast< long >( (aArea.Height() - nTopBorder - nLeftBorder) * 0.05 );
nTopBorder += nHeaderFooterHeight;
nBottomBorder += nHeaderFooterHeight;
long nX = nGapW + nLeftBorder;
long nY = nGapH + nTopBorder;
aArea.Width() -= nGapW * 2 + nLeftBorder + nRightBorder;
aArea.Height() -= nGapH * 2 + nTopBorder + nBottomBorder;
const bool bLandscape = aArea.Width() > aArea.Height();
static sal_uInt16 aOffsets[5][9] =
{
{ 0, 1, 2, 3, 4, 5, 6, 7, 8 }, // AUTOLAYOUT_HANDOUT9, Portrait, Horizontal order
{ 0, 2, 4, 1, 3, 5, 0, 0, 0 }, // AUTOLAYOUT_HANDOUT3, Landscape, Vertical
{ 0, 2, 1, 3, 0, 0, 0, 0, 0 }, // AUTOLAYOUT_HANDOUT4, Landscape, Vertical
{ 0, 3, 1, 4, 2, 5, 0, 0, 0 }, // AUTOLAYOUT_HANDOUT4, Portrait, Vertical
{ 0, 3, 6, 1, 4, 7, 2, 5, 8 }, // AUTOLAYOUT_HANDOUT9, Landscape, Vertical
};
sal_uInt16* pOffsets = aOffsets[0];
USHORT nColCnt = 0, nRowCnt = 0;
switch ( eLayout )
{
case AUTOLAYOUT_HANDOUT1:
nColCnt = 1; nRowCnt = 1;
break;
case AUTOLAYOUT_HANDOUT2:
if( bLandscape )
{
nColCnt = 2; nRowCnt = 1;
}
else
{
nColCnt = 1; nRowCnt = 2;
}
break;
case AUTOLAYOUT_HANDOUT3:
if( bLandscape )
{
nColCnt = 3; nRowCnt = 2;
}
else
{
nColCnt = 2; nRowCnt = 3;
}
pOffsets = aOffsets[ bLandscape ? 1 : 0 ];
break;
case AUTOLAYOUT_HANDOUT4:
nColCnt = 2; nRowCnt = 2;
pOffsets = aOffsets[ bHorizontal ? 0 : 2 ];
break;
case AUTOLAYOUT_HANDOUT6:
if( bLandscape )
{
nColCnt = 3; nRowCnt = 2;
}
else
{
nColCnt = 2; nRowCnt = 3;
}
if( !bHorizontal )
pOffsets = aOffsets[ bLandscape ? 1 : 3 ];
break;
default:
case AUTOLAYOUT_HANDOUT9:
nColCnt = 3; nRowCnt = 3;
if( !bHorizontal )
pOffsets = aOffsets[4];
break;
}
rAreas.resize( nColCnt * nRowCnt );
Size aPartArea, aSize;
aPartArea.Width() = ((aArea.Width() - ((nColCnt-1) * nGapW) ) / nColCnt);
aPartArea.Height() = ((aArea.Height() - ((nRowCnt-1) * nGapH) ) / nRowCnt);
SdrPage* pFirstPage = rModel.GetMasterSdPage(0, PK_STANDARD);
if ( pFirstPage )
{
// scale actual size into handout rect
double fScale = (double)aPartArea.Width() / (double)pFirstPage->GetWdt();
aSize.Height() = (long)(fScale * pFirstPage->GetHgt() );
if( aSize.Height() > aPartArea.Height() )
{
fScale = (double)aPartArea.Height() / (double)pFirstPage->GetHgt();
aSize.Height() = aPartArea.Height();
aSize.Width() = (long)(fScale * pFirstPage->GetWdt());
}
else
{
aSize.Width() = aPartArea.Width();
}
nX += (aPartArea.Width() - aSize.Width()) / 2;
nY += (aPartArea.Height()- aSize.Height())/ 2;
}
else
{
aSize = aPartArea;
}
Point aPos( nX, nY );
const bool bRTL = rModel.GetDefaultWritingMode() == ::com::sun::star::text::WritingMode_RL_TB;
const long nOffsetX = (aPartArea.Width() + nGapW) * (bRTL ? -1 : 1);
const long nOffsetY = aPartArea.Height() + nGapH;
const long nStartX = bRTL ? nOffsetX*(1 - nColCnt) - nX : nX;
for(sal_uInt16 nRow = 0; nRow < nRowCnt; nRow++)
{
aPos.X() = nStartX;
for(sal_uInt16 nCol = 0; nCol < nColCnt; nCol++)
{
rAreas[*pOffsets++] = Rectangle(aPos, aSize);
aPos.X() += nOffsetX;
}
aPos.Y() += nOffsetY;
}
}
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
HeaderFooterSettings::HeaderFooterSettings()
{
mbHeaderVisible = true;
mbFooterVisible = true;
mbSlideNumberVisible = false;
mbDateTimeVisible = true;
mbDateTimeIsFixed = true;
meDateTimeFormat = SVXDATEFORMAT_A;
}
bool HeaderFooterSettings::operator==( const HeaderFooterSettings& rSettings ) const
INTEGRATION: CWS interop12 (1.35.118); FILE MERGED 2004/03/24 18:09:17 cl 1.35.118.21: #i20949# correctly delete shapes from presobjlist 2004/03/23 18:29:44 cl 1.35.118.20: #i20949# correctly delete shapes from presobjlist 2004/03/22 14:35:48 cl 1.35.118.19: fixed a merge problem 2004/03/19 13:20:29 cl 1.35.118.18: fixed merge conflict 2004/03/17 10:23:17 cl 1.35.118.17: RESYNC: (1.38-1.39); FILE MERGED 2004/02/25 16:00:55 cl 1.35.118.16: #115632# remove disposed SdrObjects from the deletet presentation object list 2004/02/17 12:24:30 cl 1.35.118.15: fixed merge problems 2004/02/13 22:27:46 cl 1.35.118.14: RESYNC: (1.37-1.38); FILE MERGED 2004/02/05 15:15:54 cl 1.35.118.13: #i20949# added header&footer support for impress 2004/01/20 17:08:42 cl 1.35.118.12: #i20949# use SvxAdjustItem for header&footer 2004/01/20 16:13:01 cl 1.35.118.11: #i20949# use displayinfo 2003/12/09 23:37:57 cl 1.35.118.10: RESYNC: (1.35-1.37); FILE MERGED 2003/11/25 12:40:21 cl 1.35.118.9: fixed unix compiler problems 2003/11/24 15:25:48 cl 1.35.118.8: fixed unix compile problems 2003/11/20 12:16:47 cl 1.35.118.7: #i20949# added header&footer support for impress 2003/11/19 14:53:43 cl 1.35.118.6: #i20949# header objects on masterpage now have the default style 2003/11/07 09:13:13 cl 1.35.118.5: #i20949# added header&footer support for impress 2003/11/05 17:05:53 cl 1.35.118.4: #i20949# added support for header&footer 2003/11/04 16:38:03 cl 1.35.118.3: #i20949# added header&footer support for impress 2003/10/30 11:18:35 cl 1.35.118.2: #i20949# added header&footer support for impress 2003/09/19 14:38:20 cl 1.35.118.1: #111385# initial version
2004-03-30 14:44:43 +00:00
{
return (mbHeaderVisible == rSettings.mbHeaderVisible) &&
(maHeaderText == rSettings.maHeaderText) &&
(mbFooterVisible == rSettings.mbFooterVisible) &&
(maFooterText == rSettings.maFooterText) &&
(mbSlideNumberVisible == rSettings.mbSlideNumberVisible) &&
(mbDateTimeVisible == rSettings.mbDateTimeVisible) &&
(mbDateTimeIsFixed == rSettings.mbDateTimeIsFixed) &&
(meDateTimeFormat == rSettings.meDateTimeFormat) &&
(maDateTimeText == rSettings.maDateTimeText);
}