Files
libreoffice/editeng/source/outliner/outliner.cxx

2213 lines
69 KiB
C++
Raw Normal View History

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2000-09-18 16:07:07 +00:00
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2000-09-18 16:07:07 +00:00
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
2000-09-18 16:07:07 +00:00
*
* OpenOffice.org - a multi-platform office productivity suite
2000-09-18 16:07:07 +00:00
*
* This file is part of OpenOffice.org.
2000-09-18 16:07:07 +00:00
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
2000-09-18 16:07:07 +00:00
*
* OpenOffice.org 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 version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
2000-09-18 16:07:07 +00:00
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
2000-09-18 16:07:07 +00:00
*
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_editeng.hxx"
#include <svl/intitem.hxx>
#include <editeng/editeng.hxx>
#include <editeng/editview.hxx>
#include <editeng/editdata.hxx>
#include <editeng/eerdll.hxx>
#include <editeng/lrspitem.hxx>
#include <editeng/fhgtitem.hxx>
2000-09-18 16:07:07 +00:00
#include <math.h>
#include <svl/style.hxx>
2000-09-18 16:07:07 +00:00
#include <vcl/wrkwin.hxx>
#define _OUTLINER_CXX
#include <editeng/outliner.hxx>
2000-09-18 16:07:07 +00:00
#include <paralist.hxx>
#include <editeng/outlobj.hxx>
2000-09-18 16:07:07 +00:00
#include <outleeng.hxx>
#include <outlundo.hxx>
#include <editeng/eeitem.hxx>
#include <editeng/editstat.hxx>
#include <editeng/scripttypeitem.hxx>
#include <editeng/editobj.hxx>
#include <svl/itemset.hxx>
#include <svl/whiter.hxx>
2000-09-18 16:07:07 +00:00
#include <vcl/metric.hxx>
#include <editeng/numitem.hxx>
#include <editeng/adjitem.hxx>
2000-09-18 16:07:07 +00:00
#include <vcl/graph.hxx>
#include <vcl/gdimtf.hxx>
#include <vcl/metaact.hxx>
2009-12-15 21:55:40 +01:00
#include <svtools/grfmgr.hxx>
#include <editeng/svxfont.hxx>
#include <editeng/brshitem.hxx>
#include <svl/itempool.hxx>
2011-02-16 16:34:02 -05:00
// calculate if it's RTL or not
#include <unicode/ubidi.h>
using ::std::advance;
2000-09-18 16:07:07 +00:00
#define DEFAULT_SCALE 75
2011-02-16 16:34:02 -05:00
static const USHORT nDefStyles = 3; // Special treatment for the first 3 levels
2000-09-18 16:07:07 +00:00
static const USHORT nDefBulletIndent = 800;
static const USHORT nDefBulletWidth = 700;
static const USHORT pDefBulletIndents[nDefStyles]= { 1400, 800, 800 };
static const USHORT pDefBulletWidths[nDefStyles] = { 1000, 850, 700 };
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
USHORT lcl_ImplGetDefBulletWidth( sal_Int16 nDepth )
2000-09-18 16:07:07 +00:00
{
return ( nDepth < nDefStyles ) ? pDefBulletWidths[nDepth] : nDefBulletWidth;
}
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
USHORT lcl_ImplGetDefBulletIndent( sal_Int16 nDepth )
2000-09-18 16:07:07 +00:00
{
USHORT nI = 0;
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
if( nDepth >= 0 )
{
for ( sal_Int16 n = 0; n <= nDepth; n++ )
nI = nI +
( ( n < nDefStyles ) ? pDefBulletIndents[n] : nDefBulletIndent );
}
2000-09-18 16:07:07 +00:00
return nI;
}
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
// ----------------------------------------------------------------------
2000-09-18 16:07:07 +00:00
// Outliner
// ----------------------------------------------------------------------
DBG_NAME(Outliner);
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
void Outliner::ImplCheckDepth( sal_Int16& rnDepth ) const
2001-05-30 16:23:37 +00:00
{
if( rnDepth < nMinDepth )
rnDepth = nMinDepth;
else if( rnDepth > nMaxDepth )
rnDepth = nMaxDepth;
}
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
Paragraph* Outliner::Insert(const XubString& rText, ULONG nAbsPos, sal_Int16 nDepth)
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS(Outliner,0);
DBG_ASSERT(pParaList->GetParagraphCount(),"Insert:No Paras");
Paragraph* pPara;
2001-05-30 16:23:37 +00:00
ImplCheckDepth( nDepth );
2000-09-18 16:07:07 +00:00
ULONG nParagraphCount = pParaList->GetParagraphCount();
if( nAbsPos > nParagraphCount )
nAbsPos = nParagraphCount;
if( bFirstParaIsEmpty )
{
pPara = pParaList->GetParagraph( 0 );
if( pPara->GetDepth() != nDepth )
{
nDepthChangedHdlPrevDepth = pPara->GetDepth();
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
mnDepthChangeHdlPrevFlags = pPara->nFlags;
2000-09-18 16:07:07 +00:00
pPara->SetDepth( nDepth );
pHdlParagraph = pPara;
DepthChangedHdl();
}
pPara->nFlags |= PARAFLAG_HOLDDEPTH;
SetText( rText, pPara );
}
else
{
BOOL bUpdate = pEditEngine->GetUpdateMode();
pEditEngine->SetUpdateMode( FALSE );
2002-05-27 13:37:37 +00:00
ImplBlockInsertionCallbacks( TRUE );
2000-09-18 16:07:07 +00:00
pPara = new Paragraph( nDepth );
pParaList->Insert( pPara, nAbsPos );
pEditEngine->InsertParagraph( (USHORT)nAbsPos, String() );
DBG_ASSERT(pPara==pParaList->GetParagraph(nAbsPos),"Insert:Failed");
ImplInitDepth( (USHORT)nAbsPos, nDepth, FALSE );
pHdlParagraph = pPara;
ParagraphInsertedHdl();
pPara->nFlags |= PARAFLAG_HOLDDEPTH;
SetText( rText, pPara );
2002-05-27 13:37:37 +00:00
ImplBlockInsertionCallbacks( FALSE );
2000-09-18 16:07:07 +00:00
pEditEngine->SetUpdateMode( bUpdate );
}
bFirstParaIsEmpty = FALSE;
DBG_ASSERT(pEditEngine->GetParagraphCount()==pParaList->GetParagraphCount(),"SetText failed");
2000-09-18 16:07:07 +00:00
return pPara;
}
void Outliner::ParagraphInserted( USHORT nPara )
{
DBG_CHKTHIS(Outliner,0);
if ( bBlockInsCallback )
return;
if( bPasting || pEditEngine->IsInUndo() )
{
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
Paragraph* pPara = new Paragraph( -1 );
2000-09-18 16:07:07 +00:00
pParaList->Insert( pPara, nPara );
if( pEditEngine->IsInUndo() )
{
pPara->nFlags = PARAFLAG_SETBULLETTEXT;
pPara->bVisible = TRUE;
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
const SfxInt16Item& rLevel = (const SfxInt16Item&) pEditEngine->GetParaAttrib( nPara, EE_PARA_OUTLLEVEL );
2000-09-18 16:07:07 +00:00
pPara->SetDepth( rLevel.GetValue() );
}
}
else
{
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
sal_Int16 nDepth = -1;
Paragraph* pParaBefore = pParaList->GetParagraph( nPara-1 );
if ( pParaBefore )
nDepth = pParaBefore->GetDepth();
2000-09-18 16:07:07 +00:00
Paragraph* pPara = new Paragraph( nDepth );
pParaList->Insert( pPara, nPara );
if( !pEditEngine->IsInUndo() )
{
ImplCalcBulletText( nPara, TRUE, FALSE );
pHdlParagraph = pPara;
ParagraphInsertedHdl();
}
}
}
void Outliner::ParagraphDeleted( USHORT nPara )
{
DBG_CHKTHIS(Outliner,0);
if ( bBlockInsCallback || ( nPara == EE_PARA_ALL ) )
return;
Paragraph* pPara = pParaList->GetParagraph( nPara );
if (!pPara)
return;
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
sal_Int16 nDepth = pPara->GetDepth();
2000-09-18 16:07:07 +00:00
if( !pEditEngine->IsInUndo() )
{
pHdlParagraph = pPara;
ParagraphRemovingHdl();
}
pParaList->Remove( nPara );
delete pPara;
if( !pEditEngine->IsInUndo() && !bPasting )
2000-09-18 16:07:07 +00:00
{
pPara = pParaList->GetParagraph( nPara );
if ( pPara && ( pPara->GetDepth() > nDepth ) )
{
ImplCalcBulletText( nPara, TRUE, FALSE );
2011-02-16 16:34:02 -05:00
// Search for next on the this level ...
2000-09-18 16:07:07 +00:00
while ( pPara && pPara->GetDepth() > nDepth )
pPara = pParaList->GetParagraph( ++nPara );
}
if ( pPara && ( pPara->GetDepth() == nDepth ) )
ImplCalcBulletText( nPara, TRUE, FALSE );
}
}
void Outliner::Init( USHORT nMode )
{
nOutlinerMode = nMode;
Clear();
ULONG nCtrl = pEditEngine->GetControlWord();
nCtrl &= ~(EE_CNTRL_OUTLINER|EE_CNTRL_OUTLINER2);
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
SetMaxDepth( 9 );
2000-09-18 16:07:07 +00:00
switch ( ImplGetOutlinerMode() )
{
case OUTLINERMODE_TEXTOBJECT:
case OUTLINERMODE_TITLEOBJECT:
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
break;
2000-09-18 16:07:07 +00:00
case OUTLINERMODE_OUTLINEOBJECT:
nCtrl |= EE_CNTRL_OUTLINER2;
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
break;
2000-09-18 16:07:07 +00:00
case OUTLINERMODE_OUTLINEVIEW:
nCtrl |= EE_CNTRL_OUTLINER;
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
break;
2000-09-18 16:07:07 +00:00
default: DBG_ERROR( "Outliner::Init - Invalid Mode!" );
}
pEditEngine->SetControlWord( nCtrl );
ImplInitDepth( 0, GetMinDepth(), FALSE );
2001-02-01 14:17:25 +00:00
GetUndoManager().Clear();
2000-09-18 16:07:07 +00:00
}
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
void Outliner::SetMaxDepth( sal_Int16 nDepth, BOOL bCheckParagraphs )
2000-09-18 16:07:07 +00:00
{
if( nMaxDepth != nDepth )
{
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
nMaxDepth = Min( nDepth, (sal_Int16)(SVX_MAX_NUM-1) );
2000-09-18 16:07:07 +00:00
if( bCheckParagraphs )
{
USHORT nParagraphs = (USHORT)pParaList->GetParagraphCount();
for ( USHORT nPara = 0; nPara < nParagraphs; nPara++ )
{
Paragraph* pPara = pParaList->GetParagraph( nPara );
if( pPara && pPara->GetDepth() > nMaxDepth )
2000-09-18 16:07:07 +00:00
{
SetDepth( pPara, nMaxDepth );
}
}
}
}
}
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
sal_Int16 Outliner::GetDepth( ULONG nPara ) const
2000-09-18 16:07:07 +00:00
{
Paragraph* pPara = pParaList->GetParagraph( nPara );
DBG_ASSERT( pPara, "Outliner::GetDepth - Paragraph not found!" );
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
return pPara ? pPara->GetDepth() : -1;
2000-09-18 16:07:07 +00:00
}
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
void Outliner::SetDepth( Paragraph* pPara, sal_Int16 nNewDepth )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS(Outliner,0);
2001-05-30 16:23:37 +00:00
ImplCheckDepth( nNewDepth );
2000-09-18 16:07:07 +00:00
if ( nNewDepth != pPara->GetDepth() )
{
nDepthChangedHdlPrevDepth = pPara->GetDepth();
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
mnDepthChangeHdlPrevFlags = pPara->nFlags;
2000-09-18 16:07:07 +00:00
pHdlParagraph = pPara;
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
USHORT nPara = (USHORT)GetAbsPos( pPara );
ImplInitDepth( nPara, nNewDepth, TRUE );
ImplCalcBulletText( nPara, FALSE, FALSE );
if ( ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEOBJECT )
ImplSetLevelDependendStyleSheet( nPara );
2000-09-18 16:07:07 +00:00
DepthChangedHdl();
}
}
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
sal_Int16 Outliner::GetNumberingStartValue( sal_uInt16 nPara )
{
Paragraph* pPara = pParaList->GetParagraph( nPara );
DBG_ASSERT( pPara, "Outliner::GetNumberingStartValue - Paragraph not found!" );
return pPara ? pPara->GetNumberingStartValue() : -1;
}
void Outliner::SetNumberingStartValue( sal_uInt16 nPara, sal_Int16 nNumberingStartValue )
{
Paragraph* pPara = pParaList->GetParagraph( nPara );
DBG_ASSERT( pPara, "Outliner::GetNumberingStartValue - Paragraph not found!" );
if( pPara && pPara->GetNumberingStartValue() != nNumberingStartValue )
{
if( IsUndoEnabled() && !IsInUndo() )
InsertUndo( new OutlinerUndoChangeParaNumberingRestart( this, nPara,
pPara->GetNumberingStartValue(), nNumberingStartValue,
pPara->IsParaIsNumberingRestart(), pPara->IsParaIsNumberingRestart() ) );
pPara->SetNumberingStartValue( nNumberingStartValue );
2010-10-04 16:20:36 +02:00
// #i100014#
// It is not a good idea to substract 1 from a count and cast the result
// to USHORT without check, if the count is 0.
ImplCheckParagraphs( nPara, (USHORT) (pParaList->GetParagraphCount()) );
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
pEditEngine->SetModified();
}
}
sal_Bool Outliner::IsParaIsNumberingRestart( sal_uInt16 nPara )
{
Paragraph* pPara = pParaList->GetParagraph( nPara );
DBG_ASSERT( pPara, "Outliner::IsParaIsNumberingRestart - Paragraph not found!" );
return pPara ? pPara->IsParaIsNumberingRestart() : sal_False;
}
void Outliner::SetParaIsNumberingRestart( sal_uInt16 nPara, sal_Bool bParaIsNumberingRestart )
{
Paragraph* pPara = pParaList->GetParagraph( nPara );
DBG_ASSERT( pPara, "Outliner::SetParaIsNumberingRestart - Paragraph not found!" );
if( pPara && (pPara->IsParaIsNumberingRestart() != bParaIsNumberingRestart) )
{
if( IsUndoEnabled() && !IsInUndo() )
InsertUndo( new OutlinerUndoChangeParaNumberingRestart( this, nPara,
pPara->GetNumberingStartValue(), pPara->GetNumberingStartValue(),
pPara->IsParaIsNumberingRestart(), bParaIsNumberingRestart ) );
pPara->SetParaIsNumberingRestart( bParaIsNumberingRestart );
2010-10-04 16:20:36 +02:00
// #i100014#
// It is not a good idea to substract 1 from a count and cast the result
// to USHORT without check, if the count is 0.
ImplCheckParagraphs( nPara, (USHORT) (pParaList->GetParagraphCount()) );
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
pEditEngine->SetModified();
}
}
2000-09-18 16:07:07 +00:00
OutlinerParaObject* Outliner::CreateParaObject( USHORT nStartPara, USHORT nCount ) const
{
DBG_CHKTHIS(Outliner,0);
if ( sal::static_int_cast< ULONG >( nStartPara + nCount ) >
pParaList->GetParagraphCount() )
nCount = sal::static_int_cast< USHORT >(
pParaList->GetParagraphCount() - nStartPara );
2000-09-18 16:07:07 +00:00
// When a new OutlinerParaObject is created because a paragraph is just beeing deleted,
// it can happen that the ParaList is not updated yet...
if ( ( nStartPara + nCount ) > pEditEngine->GetParagraphCount() )
nCount = pEditEngine->GetParagraphCount() - nStartPara;
2000-09-18 16:07:07 +00:00
if( !nCount )
return NULL;
CWS-TOOLING: integrate CWS aw063 2009-02-12 13:10:24 +0100 aw r267649 : #i99123# when a primitive is invisible, it is not sufficient to produce no output when decomposing, but to add invisible data using HitTestPrimitive2D. This is needed for the slideshow which relies on geometry data in MetaFiles when painting invisible objects 2009-02-12 13:08:39 +0100 aw r267648 : #i99123# do not ignore HitTestPrimitive2D, but draw empty rectangles instead. This is needed since Slideshow is based on getting MetaFile content when painting invisible objects 2009-02-11 16:04:28 +0100 aw r267620 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:04:10 +0100 aw r267619 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:03:56 +0100 aw r267618 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:03:39 +0100 aw r267617 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:03:21 +0100 aw r267615 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:02:48 +0100 aw r267614 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:02:24 +0100 aw r267613 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:02:01 +0100 aw r267612 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:01:32 +0100 aw r267611 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:01:05 +0100 aw r267610 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:00:15 +0100 aw r267608 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 11:27:33 +0100 aw r267585 : #i98788# added missing include for STL 2009-02-10 17:46:50 +0100 aw r267570 : #i98788# added reaction on pool destruction 2009-02-10 17:11:58 +0100 aw r267562 : #i98788# added messaging mechanism to register for pool destruction 2009-02-10 13:35:35 +0100 aw r267549 : #i98788# removing changes, too complicated and risky for 3.1 2009-02-10 12:13:48 +0100 aw r267546 : #i98788# 4th round 2009-02-10 12:13:37 +0100 aw r267545 : #i98788# 4th round 2009-02-10 12:13:26 +0100 aw r267544 : #i98788# 4th round 2009-02-10 12:13:14 +0100 aw r267543 : #i98788# 4th round 2009-02-10 12:13:03 +0100 aw r267542 : #i98788# 4th round 2009-02-10 12:12:50 +0100 aw r267541 : #i98788# 4th round 2009-02-10 12:12:37 +0100 aw r267540 : #i98788# 4th round 2009-02-08 14:38:22 +0100 aw r267495 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:38:06 +0100 aw r267494 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:37:48 +0100 aw r267493 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:37:17 +0100 aw r267492 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:56 +0100 aw r267491 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:44 +0100 aw r267490 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:29 +0100 aw r267489 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:16 +0100 aw r267488 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:02 +0100 aw r267487 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:35:46 +0100 aw r267486 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-05 12:20:39 +0100 aw r267415 : #i98788# 2nd batch of adaptions for SfxItemPoolHolder addition 2009-02-04 15:12:54 +0100 aw r267385 : #i98788# added newline at EOF 2009-02-04 13:26:04 +0100 aw r267379 : #i98788# make SfxItemPool holdable 2009-02-04 13:25:40 +0100 aw r267378 : #i98788# make SfxItemPool holdable 2009-02-04 13:25:08 +0100 aw r267377 : #i98788# make SfxItemPool holdable 2009-02-04 13:24:42 +0100 aw r267376 : #i98788# make SfxItemPool holdable 2009-02-04 13:23:14 +0100 aw r267375 : #i98788# make SfxItemPool holdable 2009-02-04 13:23:02 +0100 aw r267374 : #i98788# make SfxItemPool holdable 2009-01-29 17:08:31 +0100 aw r267159 : #i97628# completed the fix 2009-01-29 17:08:15 +0100 aw r267158 : #i97628# completed the fix 2009-01-29 14:09:07 +0100 aw r267132 : #i97628# Corrected usage of ParagraphData in headers 2009-01-29 14:06:58 +0100 iha r267131 : #i98344# incorrect font size in charts 2009-01-29 12:13:46 +0100 aw r267115 : #i97628# back to old state; triggers too many errors in other modules 2009-01-29 12:03:51 +0100 aw r267114 : #i97628# enabled exceptions due to STL vector include 2009-01-29 11:21:37 +0100 aw r267107 : #i97628# added needed include 2009-01-28 17:58:29 +0100 aw r267077 : #i97628# first version of newly implemented OutlinerParaObject and adaptions 2009-01-28 17:58:12 +0100 aw r267076 : #i97628# first version of newly implemented OutlinerParaObject and adaptions 2009-01-28 17:57:51 +0100 aw r267074 : #i97628# first version of newly implemented OutlinerParaObject and adaptions 2009-01-28 17:57:21 +0100 aw r267073 : #i97628# first version of newly implemented OutlinerParaObject and adaptions 2009-01-27 17:07:33 +0100 aw r267011 : #i98402# added support for ViewRange when exporting MetaFiles in ObjectContactOfPageView::DoProcessDisplay to avoid to paint too much 2009-01-27 11:45:48 +0100 aw r266973 : #i98404# Added a warning to a place where a conversion to rectangle should not be copied from 2009-01-26 21:44:36 +0100 iha r266949 : #i98497# 3D charts are rendered with wrong size 2009-01-26 20:47:07 +0100 aw r266947 : #i98404# handle BackgroundColorPrimitive2D directly in PixelRenderers and avoid AA under all circumstances 2009-01-26 14:50:36 +0100 aw r266926 : #i98386# secured cloning of SdrObject in IMapUserData by boost::shared_prt usage 2009-01-26 12:51:30 +0100 aw r266916 : #i96581# added separated FontStretching and fallback for small X!=Y scale differences 2009-01-23 16:14:55 +0100 aw r266834 : #i96475# added missing implementation of TextDecoratedPortionPrimitive2D::getB2DRange 2009-01-23 15:24:34 +0100 aw r266826 : #i98405# fixed fallback to DrawAlphaRect to use the correctly sized rectangle 2009-01-23 13:34:43 +0100 aw r266813 : #i96474# fixed impSplitSingleWords for an unexpected case 2009-01-23 10:47:31 +0100 aw r266786 : #i98289#,#i96474# tooling and new flags for tasks 2009-01-23 10:47:20 +0100 aw r266785 : #i98289#,#i96474# tooling and new flags for tasks 2009-01-23 10:47:09 +0100 aw r266783 : #i98289#,#i96474# tooling and new flags for tasks 2009-01-23 10:46:58 +0100 aw r266782 : #i98289#,#i96474# tooling and new flags for tasks 2009-01-23 10:46:48 +0100 aw r266781 : #i98289#,#i96474# tooling and new flags for tasks
2009-03-04 14:16:02 +00:00
EditTextObject* pText = pEditEngine->CreateTextObject( nStartPara, nCount );
const bool bIsEditDoc(OUTLINERMODE_TEXTOBJECT == ImplGetOutlinerMode());
ParagraphDataVector aParagraphDataVector(nCount);
const sal_uInt16 nLastPara(nStartPara + nCount - 1);
2000-09-18 16:07:07 +00:00
CWS-TOOLING: integrate CWS aw063 2009-02-12 13:10:24 +0100 aw r267649 : #i99123# when a primitive is invisible, it is not sufficient to produce no output when decomposing, but to add invisible data using HitTestPrimitive2D. This is needed for the slideshow which relies on geometry data in MetaFiles when painting invisible objects 2009-02-12 13:08:39 +0100 aw r267648 : #i99123# do not ignore HitTestPrimitive2D, but draw empty rectangles instead. This is needed since Slideshow is based on getting MetaFile content when painting invisible objects 2009-02-11 16:04:28 +0100 aw r267620 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:04:10 +0100 aw r267619 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:03:56 +0100 aw r267618 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:03:39 +0100 aw r267617 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:03:21 +0100 aw r267615 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:02:48 +0100 aw r267614 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:02:24 +0100 aw r267613 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:02:01 +0100 aw r267612 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:01:32 +0100 aw r267611 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:01:05 +0100 aw r267610 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:00:15 +0100 aw r267608 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 11:27:33 +0100 aw r267585 : #i98788# added missing include for STL 2009-02-10 17:46:50 +0100 aw r267570 : #i98788# added reaction on pool destruction 2009-02-10 17:11:58 +0100 aw r267562 : #i98788# added messaging mechanism to register for pool destruction 2009-02-10 13:35:35 +0100 aw r267549 : #i98788# removing changes, too complicated and risky for 3.1 2009-02-10 12:13:48 +0100 aw r267546 : #i98788# 4th round 2009-02-10 12:13:37 +0100 aw r267545 : #i98788# 4th round 2009-02-10 12:13:26 +0100 aw r267544 : #i98788# 4th round 2009-02-10 12:13:14 +0100 aw r267543 : #i98788# 4th round 2009-02-10 12:13:03 +0100 aw r267542 : #i98788# 4th round 2009-02-10 12:12:50 +0100 aw r267541 : #i98788# 4th round 2009-02-10 12:12:37 +0100 aw r267540 : #i98788# 4th round 2009-02-08 14:38:22 +0100 aw r267495 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:38:06 +0100 aw r267494 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:37:48 +0100 aw r267493 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:37:17 +0100 aw r267492 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:56 +0100 aw r267491 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:44 +0100 aw r267490 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:29 +0100 aw r267489 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:16 +0100 aw r267488 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:02 +0100 aw r267487 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:35:46 +0100 aw r267486 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-05 12:20:39 +0100 aw r267415 : #i98788# 2nd batch of adaptions for SfxItemPoolHolder addition 2009-02-04 15:12:54 +0100 aw r267385 : #i98788# added newline at EOF 2009-02-04 13:26:04 +0100 aw r267379 : #i98788# make SfxItemPool holdable 2009-02-04 13:25:40 +0100 aw r267378 : #i98788# make SfxItemPool holdable 2009-02-04 13:25:08 +0100 aw r267377 : #i98788# make SfxItemPool holdable 2009-02-04 13:24:42 +0100 aw r267376 : #i98788# make SfxItemPool holdable 2009-02-04 13:23:14 +0100 aw r267375 : #i98788# make SfxItemPool holdable 2009-02-04 13:23:02 +0100 aw r267374 : #i98788# make SfxItemPool holdable 2009-01-29 17:08:31 +0100 aw r267159 : #i97628# completed the fix 2009-01-29 17:08:15 +0100 aw r267158 : #i97628# completed the fix 2009-01-29 14:09:07 +0100 aw r267132 : #i97628# Corrected usage of ParagraphData in headers 2009-01-29 14:06:58 +0100 iha r267131 : #i98344# incorrect font size in charts 2009-01-29 12:13:46 +0100 aw r267115 : #i97628# back to old state; triggers too many errors in other modules 2009-01-29 12:03:51 +0100 aw r267114 : #i97628# enabled exceptions due to STL vector include 2009-01-29 11:21:37 +0100 aw r267107 : #i97628# added needed include 2009-01-28 17:58:29 +0100 aw r267077 : #i97628# first version of newly implemented OutlinerParaObject and adaptions 2009-01-28 17:58:12 +0100 aw r267076 : #i97628# first version of newly implemented OutlinerParaObject and adaptions 2009-01-28 17:57:51 +0100 aw r267074 : #i97628# first version of newly implemented OutlinerParaObject and adaptions 2009-01-28 17:57:21 +0100 aw r267073 : #i97628# first version of newly implemented OutlinerParaObject and adaptions 2009-01-27 17:07:33 +0100 aw r267011 : #i98402# added support for ViewRange when exporting MetaFiles in ObjectContactOfPageView::DoProcessDisplay to avoid to paint too much 2009-01-27 11:45:48 +0100 aw r266973 : #i98404# Added a warning to a place where a conversion to rectangle should not be copied from 2009-01-26 21:44:36 +0100 iha r266949 : #i98497# 3D charts are rendered with wrong size 2009-01-26 20:47:07 +0100 aw r266947 : #i98404# handle BackgroundColorPrimitive2D directly in PixelRenderers and avoid AA under all circumstances 2009-01-26 14:50:36 +0100 aw r266926 : #i98386# secured cloning of SdrObject in IMapUserData by boost::shared_prt usage 2009-01-26 12:51:30 +0100 aw r266916 : #i96581# added separated FontStretching and fallback for small X!=Y scale differences 2009-01-23 16:14:55 +0100 aw r266834 : #i96475# added missing implementation of TextDecoratedPortionPrimitive2D::getB2DRange 2009-01-23 15:24:34 +0100 aw r266826 : #i98405# fixed fallback to DrawAlphaRect to use the correctly sized rectangle 2009-01-23 13:34:43 +0100 aw r266813 : #i96474# fixed impSplitSingleWords for an unexpected case 2009-01-23 10:47:31 +0100 aw r266786 : #i98289#,#i96474# tooling and new flags for tasks 2009-01-23 10:47:20 +0100 aw r266785 : #i98289#,#i96474# tooling and new flags for tasks 2009-01-23 10:47:09 +0100 aw r266783 : #i98289#,#i96474# tooling and new flags for tasks 2009-01-23 10:46:58 +0100 aw r266782 : #i98289#,#i96474# tooling and new flags for tasks 2009-01-23 10:46:48 +0100 aw r266781 : #i98289#,#i96474# tooling and new flags for tasks
2009-03-04 14:16:02 +00:00
for(sal_uInt16 nPara(nStartPara); nPara <= nLastPara; nPara++)
{
aParagraphDataVector[nPara-nStartPara] = *GetParagraph(nPara);
}
OutlinerParaObject* pPObj = new OutlinerParaObject(*pText, aParagraphDataVector, bIsEditDoc);
pPObj->SetOutlinerMode(GetMode());
delete pText;
2000-09-18 16:07:07 +00:00
return pPObj;
}
void Outliner::SetText( const XubString& rText, Paragraph* pPara )
{
DBG_CHKTHIS(Outliner,0);
DBG_ASSERT(pPara,"SetText:No Para");
2000-09-18 16:07:07 +00:00
BOOL bUpdate = pEditEngine->GetUpdateMode();
pEditEngine->SetUpdateMode( FALSE );
2002-05-27 13:37:37 +00:00
ImplBlockInsertionCallbacks( TRUE );
2000-09-18 16:07:07 +00:00
USHORT nPara = (USHORT)pParaList->GetAbsPos( pPara );
if( !rText.Len() )
{
pEditEngine->SetText( nPara, rText );
ImplInitDepth( nPara, pPara->GetDepth(), FALSE );
}
else
{
XubString aText( rText );
aText.ConvertLineEnd( LINEEND_LF );
if( aText.GetChar( aText.Len()-1 ) == '\x0A' )
2011-02-16 16:34:02 -05:00
aText.Erase( aText.Len()-1, 1 ); // Delete the last break
2000-09-18 16:07:07 +00:00
USHORT nCount = aText.GetTokenCount( '\x0A' );
USHORT nPos = 0;
USHORT nInsPos = nPara+1;
while( nCount > nPos )
{
XubString aStr = aText.GetToken( nPos, '\x0A' );
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
sal_Int16 nCurDepth;
2000-09-18 16:07:07 +00:00
if( nPos )
{
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
pPara = new Paragraph( -1 );
nCurDepth = -1;
2000-09-18 16:07:07 +00:00
}
else
nCurDepth = pPara->GetDepth();
2011-02-16 16:34:02 -05:00
// In the outliner mode, filter the tabs and set the indentation
// about a LRSpaceItem. In EditEngine mode intend over old tabs
2000-09-18 16:07:07 +00:00
if( ( ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEOBJECT ) ||
( ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEVIEW ) )
{
2011-02-16 16:34:02 -05:00
// Extract Tabs
2000-09-18 16:07:07 +00:00
USHORT nTabs = 0;
while ( ( nTabs < aStr.Len() ) && ( aStr.GetChar( nTabs ) == '\t' ) )
nTabs++;
if ( nTabs )
aStr.Erase( 0, nTabs );
2011-02-16 16:34:02 -05:00
// Keep depth? (see Outliner::Insert)
2000-09-18 16:07:07 +00:00
if( !(pPara->nFlags & PARAFLAG_HOLDDEPTH) )
{
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
nCurDepth = nTabs-1;
2001-05-30 16:23:37 +00:00
ImplCheckDepth( nCurDepth );
2000-09-18 16:07:07 +00:00
pPara->SetDepth( nCurDepth );
pPara->nFlags &= (~PARAFLAG_HOLDDEPTH);
}
}
2011-02-16 16:34:02 -05:00
if( nPos ) // not with the first paragraph
2000-09-18 16:07:07 +00:00
{
pParaList->Insert( pPara, nInsPos );
pEditEngine->InsertParagraph( nInsPos, aStr );
pHdlParagraph = pPara;
ParagraphInsertedHdl();
}
else
{
nInsPos--;
pEditEngine->SetText( nInsPos, aStr );
}
ImplInitDepth( nInsPos, nCurDepth, FALSE );
nInsPos++;
nPos++;
}
}
DBG_ASSERT(pParaList->GetParagraphCount()==pEditEngine->GetParagraphCount(),"SetText failed!");
2000-09-18 16:07:07 +00:00
bFirstParaIsEmpty = FALSE;
2002-05-27 13:37:37 +00:00
ImplBlockInsertionCallbacks( FALSE );
2000-09-18 16:07:07 +00:00
pEditEngine->SetUpdateMode( bUpdate );
}
2011-02-16 16:34:02 -05:00
// pView == 0 -> Ignore tabs
2000-09-18 16:07:07 +00:00
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
bool Outliner::ImpConvertEdtToOut( sal_uInt32 nPara,EditView* pView)
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS(Outliner,0);
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
bool bConverted = false;
2000-09-18 16:07:07 +00:00
USHORT nTabs = 0;
ESelection aDelSel;
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
// const SfxItemSet& rAttrs = pEditEngine->GetParaAttribs( (sal_uInt16)nPara );
// bool bAlreadyOutliner = rAttrs.GetItemState( EE_PARA_OUTLLRSPACE ) == SFX_ITEM_ON ? true : false;
2000-09-18 16:07:07 +00:00
XubString aName;
XubString aHeading_US( RTL_CONSTASCII_USTRINGPARAM( "heading" ) );
XubString aNumber_US( RTL_CONSTASCII_USTRINGPARAM( "Numbering" ) );
2000-09-18 16:07:07 +00:00
XubString aStr( pEditEngine->GetText( (USHORT)nPara ) );
xub_Unicode* pPtr = (xub_Unicode*)aStr.GetBuffer();
USHORT nHeadingNumberStart = 0;
USHORT nNumberingNumberStart = 0;
SfxStyleSheet* pStyle= pEditEngine->GetStyleSheet( (USHORT)nPara );
if( pStyle )
{
aName = pStyle->GetName();
USHORT nSearch;
if ( ( nSearch = aName.Search( aHeading_US ) ) != STRING_NOTFOUND )
nHeadingNumberStart = nSearch + aHeading_US.Len();
else if ( ( nSearch = aName.Search( aNumber_US ) ) != STRING_NOTFOUND )
nNumberingNumberStart = nSearch + aNumber_US.Len();
2000-09-18 16:07:07 +00:00
}
if ( nHeadingNumberStart || nNumberingNumberStart )
{
2011-02-16 16:34:02 -05:00
// PowerPoint import ?
2000-09-18 16:07:07 +00:00
if( nHeadingNumberStart && ( aStr.Len() >= 2 ) &&
( pPtr[0] != '\t' ) && ( pPtr[1] == '\t' ) )
{
2011-02-16 16:34:02 -05:00
// Extract Bullet and Tab
2000-09-18 16:07:07 +00:00
aDelSel = ESelection( (USHORT)nPara, 0, (USHORT)nPara, 2 );
}
USHORT nPos = nHeadingNumberStart ? nHeadingNumberStart : nNumberingNumberStart;
String aLevel = aName.Copy( nPos );
aLevel.EraseLeadingChars( ' ' );
nTabs = sal::static_int_cast< USHORT >(aLevel.ToInt32());
2000-09-18 16:07:07 +00:00
if( nTabs )
2011-02-16 16:34:02 -05:00
nTabs--; // Level 0 = "heading 1"
2000-09-18 16:07:07 +00:00
bConverted = TRUE;
}
else
{
2011-02-16 16:34:02 -05:00
// filter leading tabs
2000-09-18 16:07:07 +00:00
while( *pPtr == '\t' )
{
pPtr++;
nTabs++;
}
2011-02-16 16:34:02 -05:00
// Remove tabs from the text
2000-09-18 16:07:07 +00:00
if( nTabs )
aDelSel = ESelection( (USHORT)nPara, 0, (USHORT)nPara, nTabs );
}
if ( aDelSel.HasRange() )
{
if ( pView )
{
pView->SetSelection( aDelSel );
pView->DeleteSelected();
}
else
pEditEngine->QuickDelete( aDelSel );
}
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
const SfxInt16Item& rLevel = (const SfxInt16Item&) pEditEngine->GetParaAttrib( sal::static_int_cast< sal_uInt16 >(nPara), EE_PARA_OUTLLEVEL );
sal_Int16 nOutlLevel = rLevel.GetValue();
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
ImplCheckDepth( nOutlLevel );
ImplInitDepth( sal::static_int_cast< sal_uInt16 >(nPara), nOutlLevel, FALSE );
2000-09-18 16:07:07 +00:00
return bConverted;
}
void Outliner::SetText( const OutlinerParaObject& rPObj )
{
DBG_CHKTHIS(Outliner,0);
BOOL bUpdate = pEditEngine->GetUpdateMode();
pEditEngine->SetUpdateMode( FALSE );
BOOL bUndo = pEditEngine->IsUndoEnabled();
EnableUndo( FALSE );
Init( rPObj.GetOutlinerMode() );
2002-05-27 13:37:37 +00:00
ImplBlockInsertionCallbacks( TRUE );
CWS-TOOLING: integrate CWS aw063 2009-02-12 13:10:24 +0100 aw r267649 : #i99123# when a primitive is invisible, it is not sufficient to produce no output when decomposing, but to add invisible data using HitTestPrimitive2D. This is needed for the slideshow which relies on geometry data in MetaFiles when painting invisible objects 2009-02-12 13:08:39 +0100 aw r267648 : #i99123# do not ignore HitTestPrimitive2D, but draw empty rectangles instead. This is needed since Slideshow is based on getting MetaFile content when painting invisible objects 2009-02-11 16:04:28 +0100 aw r267620 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:04:10 +0100 aw r267619 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:03:56 +0100 aw r267618 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:03:39 +0100 aw r267617 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:03:21 +0100 aw r267615 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:02:48 +0100 aw r267614 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:02:24 +0100 aw r267613 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:02:01 +0100 aw r267612 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:01:32 +0100 aw r267611 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:01:05 +0100 aw r267610 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:00:15 +0100 aw r267608 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 11:27:33 +0100 aw r267585 : #i98788# added missing include for STL 2009-02-10 17:46:50 +0100 aw r267570 : #i98788# added reaction on pool destruction 2009-02-10 17:11:58 +0100 aw r267562 : #i98788# added messaging mechanism to register for pool destruction 2009-02-10 13:35:35 +0100 aw r267549 : #i98788# removing changes, too complicated and risky for 3.1 2009-02-10 12:13:48 +0100 aw r267546 : #i98788# 4th round 2009-02-10 12:13:37 +0100 aw r267545 : #i98788# 4th round 2009-02-10 12:13:26 +0100 aw r267544 : #i98788# 4th round 2009-02-10 12:13:14 +0100 aw r267543 : #i98788# 4th round 2009-02-10 12:13:03 +0100 aw r267542 : #i98788# 4th round 2009-02-10 12:12:50 +0100 aw r267541 : #i98788# 4th round 2009-02-10 12:12:37 +0100 aw r267540 : #i98788# 4th round 2009-02-08 14:38:22 +0100 aw r267495 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:38:06 +0100 aw r267494 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:37:48 +0100 aw r267493 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:37:17 +0100 aw r267492 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:56 +0100 aw r267491 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:44 +0100 aw r267490 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:29 +0100 aw r267489 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:16 +0100 aw r267488 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:02 +0100 aw r267487 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:35:46 +0100 aw r267486 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-05 12:20:39 +0100 aw r267415 : #i98788# 2nd batch of adaptions for SfxItemPoolHolder addition 2009-02-04 15:12:54 +0100 aw r267385 : #i98788# added newline at EOF 2009-02-04 13:26:04 +0100 aw r267379 : #i98788# make SfxItemPool holdable 2009-02-04 13:25:40 +0100 aw r267378 : #i98788# make SfxItemPool holdable 2009-02-04 13:25:08 +0100 aw r267377 : #i98788# make SfxItemPool holdable 2009-02-04 13:24:42 +0100 aw r267376 : #i98788# make SfxItemPool holdable 2009-02-04 13:23:14 +0100 aw r267375 : #i98788# make SfxItemPool holdable 2009-02-04 13:23:02 +0100 aw r267374 : #i98788# make SfxItemPool holdable 2009-01-29 17:08:31 +0100 aw r267159 : #i97628# completed the fix 2009-01-29 17:08:15 +0100 aw r267158 : #i97628# completed the fix 2009-01-29 14:09:07 +0100 aw r267132 : #i97628# Corrected usage of ParagraphData in headers 2009-01-29 14:06:58 +0100 iha r267131 : #i98344# incorrect font size in charts 2009-01-29 12:13:46 +0100 aw r267115 : #i97628# back to old state; triggers too many errors in other modules 2009-01-29 12:03:51 +0100 aw r267114 : #i97628# enabled exceptions due to STL vector include 2009-01-29 11:21:37 +0100 aw r267107 : #i97628# added needed include 2009-01-28 17:58:29 +0100 aw r267077 : #i97628# first version of newly implemented OutlinerParaObject and adaptions 2009-01-28 17:58:12 +0100 aw r267076 : #i97628# first version of newly implemented OutlinerParaObject and adaptions 2009-01-28 17:57:51 +0100 aw r267074 : #i97628# first version of newly implemented OutlinerParaObject and adaptions 2009-01-28 17:57:21 +0100 aw r267073 : #i97628# first version of newly implemented OutlinerParaObject and adaptions 2009-01-27 17:07:33 +0100 aw r267011 : #i98402# added support for ViewRange when exporting MetaFiles in ObjectContactOfPageView::DoProcessDisplay to avoid to paint too much 2009-01-27 11:45:48 +0100 aw r266973 : #i98404# Added a warning to a place where a conversion to rectangle should not be copied from 2009-01-26 21:44:36 +0100 iha r266949 : #i98497# 3D charts are rendered with wrong size 2009-01-26 20:47:07 +0100 aw r266947 : #i98404# handle BackgroundColorPrimitive2D directly in PixelRenderers and avoid AA under all circumstances 2009-01-26 14:50:36 +0100 aw r266926 : #i98386# secured cloning of SdrObject in IMapUserData by boost::shared_prt usage 2009-01-26 12:51:30 +0100 aw r266916 : #i96581# added separated FontStretching and fallback for small X!=Y scale differences 2009-01-23 16:14:55 +0100 aw r266834 : #i96475# added missing implementation of TextDecoratedPortionPrimitive2D::getB2DRange 2009-01-23 15:24:34 +0100 aw r266826 : #i98405# fixed fallback to DrawAlphaRect to use the correctly sized rectangle 2009-01-23 13:34:43 +0100 aw r266813 : #i96474# fixed impSplitSingleWords for an unexpected case 2009-01-23 10:47:31 +0100 aw r266786 : #i98289#,#i96474# tooling and new flags for tasks 2009-01-23 10:47:20 +0100 aw r266785 : #i98289#,#i96474# tooling and new flags for tasks 2009-01-23 10:47:09 +0100 aw r266783 : #i98289#,#i96474# tooling and new flags for tasks 2009-01-23 10:46:58 +0100 aw r266782 : #i98289#,#i96474# tooling and new flags for tasks 2009-01-23 10:46:48 +0100 aw r266781 : #i98289#,#i96474# tooling and new flags for tasks
2009-03-04 14:16:02 +00:00
pEditEngine->SetText(rPObj.GetTextObject());
if( rPObj.Count() != pEditEngine->GetParagraphCount() )
{
int nop=0;nop++;
}
2000-09-18 16:07:07 +00:00
bFirstParaIsEmpty = FALSE;
pParaList->Clear( TRUE );
CWS-TOOLING: integrate CWS aw063 2009-02-12 13:10:24 +0100 aw r267649 : #i99123# when a primitive is invisible, it is not sufficient to produce no output when decomposing, but to add invisible data using HitTestPrimitive2D. This is needed for the slideshow which relies on geometry data in MetaFiles when painting invisible objects 2009-02-12 13:08:39 +0100 aw r267648 : #i99123# do not ignore HitTestPrimitive2D, but draw empty rectangles instead. This is needed since Slideshow is based on getting MetaFile content when painting invisible objects 2009-02-11 16:04:28 +0100 aw r267620 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:04:10 +0100 aw r267619 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:03:56 +0100 aw r267618 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:03:39 +0100 aw r267617 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:03:21 +0100 aw r267615 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:02:48 +0100 aw r267614 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:02:24 +0100 aw r267613 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:02:01 +0100 aw r267612 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:01:32 +0100 aw r267611 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:01:05 +0100 aw r267610 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:00:15 +0100 aw r267608 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 11:27:33 +0100 aw r267585 : #i98788# added missing include for STL 2009-02-10 17:46:50 +0100 aw r267570 : #i98788# added reaction on pool destruction 2009-02-10 17:11:58 +0100 aw r267562 : #i98788# added messaging mechanism to register for pool destruction 2009-02-10 13:35:35 +0100 aw r267549 : #i98788# removing changes, too complicated and risky for 3.1 2009-02-10 12:13:48 +0100 aw r267546 : #i98788# 4th round 2009-02-10 12:13:37 +0100 aw r267545 : #i98788# 4th round 2009-02-10 12:13:26 +0100 aw r267544 : #i98788# 4th round 2009-02-10 12:13:14 +0100 aw r267543 : #i98788# 4th round 2009-02-10 12:13:03 +0100 aw r267542 : #i98788# 4th round 2009-02-10 12:12:50 +0100 aw r267541 : #i98788# 4th round 2009-02-10 12:12:37 +0100 aw r267540 : #i98788# 4th round 2009-02-08 14:38:22 +0100 aw r267495 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:38:06 +0100 aw r267494 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:37:48 +0100 aw r267493 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:37:17 +0100 aw r267492 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:56 +0100 aw r267491 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:44 +0100 aw r267490 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:29 +0100 aw r267489 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:16 +0100 aw r267488 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:02 +0100 aw r267487 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:35:46 +0100 aw r267486 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-05 12:20:39 +0100 aw r267415 : #i98788# 2nd batch of adaptions for SfxItemPoolHolder addition 2009-02-04 15:12:54 +0100 aw r267385 : #i98788# added newline at EOF 2009-02-04 13:26:04 +0100 aw r267379 : #i98788# make SfxItemPool holdable 2009-02-04 13:25:40 +0100 aw r267378 : #i98788# make SfxItemPool holdable 2009-02-04 13:25:08 +0100 aw r267377 : #i98788# make SfxItemPool holdable 2009-02-04 13:24:42 +0100 aw r267376 : #i98788# make SfxItemPool holdable 2009-02-04 13:23:14 +0100 aw r267375 : #i98788# make SfxItemPool holdable 2009-02-04 13:23:02 +0100 aw r267374 : #i98788# make SfxItemPool holdable 2009-01-29 17:08:31 +0100 aw r267159 : #i97628# completed the fix 2009-01-29 17:08:15 +0100 aw r267158 : #i97628# completed the fix 2009-01-29 14:09:07 +0100 aw r267132 : #i97628# Corrected usage of ParagraphData in headers 2009-01-29 14:06:58 +0100 iha r267131 : #i98344# incorrect font size in charts 2009-01-29 12:13:46 +0100 aw r267115 : #i97628# back to old state; triggers too many errors in other modules 2009-01-29 12:03:51 +0100 aw r267114 : #i97628# enabled exceptions due to STL vector include 2009-01-29 11:21:37 +0100 aw r267107 : #i97628# added needed include 2009-01-28 17:58:29 +0100 aw r267077 : #i97628# first version of newly implemented OutlinerParaObject and adaptions 2009-01-28 17:58:12 +0100 aw r267076 : #i97628# first version of newly implemented OutlinerParaObject and adaptions 2009-01-28 17:57:51 +0100 aw r267074 : #i97628# first version of newly implemented OutlinerParaObject and adaptions 2009-01-28 17:57:21 +0100 aw r267073 : #i97628# first version of newly implemented OutlinerParaObject and adaptions 2009-01-27 17:07:33 +0100 aw r267011 : #i98402# added support for ViewRange when exporting MetaFiles in ObjectContactOfPageView::DoProcessDisplay to avoid to paint too much 2009-01-27 11:45:48 +0100 aw r266973 : #i98404# Added a warning to a place where a conversion to rectangle should not be copied from 2009-01-26 21:44:36 +0100 iha r266949 : #i98497# 3D charts are rendered with wrong size 2009-01-26 20:47:07 +0100 aw r266947 : #i98404# handle BackgroundColorPrimitive2D directly in PixelRenderers and avoid AA under all circumstances 2009-01-26 14:50:36 +0100 aw r266926 : #i98386# secured cloning of SdrObject in IMapUserData by boost::shared_prt usage 2009-01-26 12:51:30 +0100 aw r266916 : #i96581# added separated FontStretching and fallback for small X!=Y scale differences 2009-01-23 16:14:55 +0100 aw r266834 : #i96475# added missing implementation of TextDecoratedPortionPrimitive2D::getB2DRange 2009-01-23 15:24:34 +0100 aw r266826 : #i98405# fixed fallback to DrawAlphaRect to use the correctly sized rectangle 2009-01-23 13:34:43 +0100 aw r266813 : #i96474# fixed impSplitSingleWords for an unexpected case 2009-01-23 10:47:31 +0100 aw r266786 : #i98289#,#i96474# tooling and new flags for tasks 2009-01-23 10:47:20 +0100 aw r266785 : #i98289#,#i96474# tooling and new flags for tasks 2009-01-23 10:47:09 +0100 aw r266783 : #i98289#,#i96474# tooling and new flags for tasks 2009-01-23 10:46:58 +0100 aw r266782 : #i98289#,#i96474# tooling and new flags for tasks 2009-01-23 10:46:48 +0100 aw r266781 : #i98289#,#i96474# tooling and new flags for tasks
2009-03-04 14:16:02 +00:00
for( USHORT nCurPara = 0; nCurPara < rPObj.Count(); nCurPara++ )
2000-09-18 16:07:07 +00:00
{
CWS-TOOLING: integrate CWS aw063 2009-02-12 13:10:24 +0100 aw r267649 : #i99123# when a primitive is invisible, it is not sufficient to produce no output when decomposing, but to add invisible data using HitTestPrimitive2D. This is needed for the slideshow which relies on geometry data in MetaFiles when painting invisible objects 2009-02-12 13:08:39 +0100 aw r267648 : #i99123# do not ignore HitTestPrimitive2D, but draw empty rectangles instead. This is needed since Slideshow is based on getting MetaFile content when painting invisible objects 2009-02-11 16:04:28 +0100 aw r267620 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:04:10 +0100 aw r267619 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:03:56 +0100 aw r267618 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:03:39 +0100 aw r267617 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:03:21 +0100 aw r267615 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:02:48 +0100 aw r267614 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:02:24 +0100 aw r267613 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:02:01 +0100 aw r267612 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:01:32 +0100 aw r267611 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:01:05 +0100 aw r267610 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:00:15 +0100 aw r267608 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 11:27:33 +0100 aw r267585 : #i98788# added missing include for STL 2009-02-10 17:46:50 +0100 aw r267570 : #i98788# added reaction on pool destruction 2009-02-10 17:11:58 +0100 aw r267562 : #i98788# added messaging mechanism to register for pool destruction 2009-02-10 13:35:35 +0100 aw r267549 : #i98788# removing changes, too complicated and risky for 3.1 2009-02-10 12:13:48 +0100 aw r267546 : #i98788# 4th round 2009-02-10 12:13:37 +0100 aw r267545 : #i98788# 4th round 2009-02-10 12:13:26 +0100 aw r267544 : #i98788# 4th round 2009-02-10 12:13:14 +0100 aw r267543 : #i98788# 4th round 2009-02-10 12:13:03 +0100 aw r267542 : #i98788# 4th round 2009-02-10 12:12:50 +0100 aw r267541 : #i98788# 4th round 2009-02-10 12:12:37 +0100 aw r267540 : #i98788# 4th round 2009-02-08 14:38:22 +0100 aw r267495 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:38:06 +0100 aw r267494 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:37:48 +0100 aw r267493 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:37:17 +0100 aw r267492 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:56 +0100 aw r267491 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:44 +0100 aw r267490 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:29 +0100 aw r267489 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:16 +0100 aw r267488 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:02 +0100 aw r267487 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:35:46 +0100 aw r267486 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-05 12:20:39 +0100 aw r267415 : #i98788# 2nd batch of adaptions for SfxItemPoolHolder addition 2009-02-04 15:12:54 +0100 aw r267385 : #i98788# added newline at EOF 2009-02-04 13:26:04 +0100 aw r267379 : #i98788# make SfxItemPool holdable 2009-02-04 13:25:40 +0100 aw r267378 : #i98788# make SfxItemPool holdable 2009-02-04 13:25:08 +0100 aw r267377 : #i98788# make SfxItemPool holdable 2009-02-04 13:24:42 +0100 aw r267376 : #i98788# make SfxItemPool holdable 2009-02-04 13:23:14 +0100 aw r267375 : #i98788# make SfxItemPool holdable 2009-02-04 13:23:02 +0100 aw r267374 : #i98788# make SfxItemPool holdable 2009-01-29 17:08:31 +0100 aw r267159 : #i97628# completed the fix 2009-01-29 17:08:15 +0100 aw r267158 : #i97628# completed the fix 2009-01-29 14:09:07 +0100 aw r267132 : #i97628# Corrected usage of ParagraphData in headers 2009-01-29 14:06:58 +0100 iha r267131 : #i98344# incorrect font size in charts 2009-01-29 12:13:46 +0100 aw r267115 : #i97628# back to old state; triggers too many errors in other modules 2009-01-29 12:03:51 +0100 aw r267114 : #i97628# enabled exceptions due to STL vector include 2009-01-29 11:21:37 +0100 aw r267107 : #i97628# added needed include 2009-01-28 17:58:29 +0100 aw r267077 : #i97628# first version of newly implemented OutlinerParaObject and adaptions 2009-01-28 17:58:12 +0100 aw r267076 : #i97628# first version of newly implemented OutlinerParaObject and adaptions 2009-01-28 17:57:51 +0100 aw r267074 : #i97628# first version of newly implemented OutlinerParaObject and adaptions 2009-01-28 17:57:21 +0100 aw r267073 : #i97628# first version of newly implemented OutlinerParaObject and adaptions 2009-01-27 17:07:33 +0100 aw r267011 : #i98402# added support for ViewRange when exporting MetaFiles in ObjectContactOfPageView::DoProcessDisplay to avoid to paint too much 2009-01-27 11:45:48 +0100 aw r266973 : #i98404# Added a warning to a place where a conversion to rectangle should not be copied from 2009-01-26 21:44:36 +0100 iha r266949 : #i98497# 3D charts are rendered with wrong size 2009-01-26 20:47:07 +0100 aw r266947 : #i98404# handle BackgroundColorPrimitive2D directly in PixelRenderers and avoid AA under all circumstances 2009-01-26 14:50:36 +0100 aw r266926 : #i98386# secured cloning of SdrObject in IMapUserData by boost::shared_prt usage 2009-01-26 12:51:30 +0100 aw r266916 : #i96581# added separated FontStretching and fallback for small X!=Y scale differences 2009-01-23 16:14:55 +0100 aw r266834 : #i96475# added missing implementation of TextDecoratedPortionPrimitive2D::getB2DRange 2009-01-23 15:24:34 +0100 aw r266826 : #i98405# fixed fallback to DrawAlphaRect to use the correctly sized rectangle 2009-01-23 13:34:43 +0100 aw r266813 : #i96474# fixed impSplitSingleWords for an unexpected case 2009-01-23 10:47:31 +0100 aw r266786 : #i98289#,#i96474# tooling and new flags for tasks 2009-01-23 10:47:20 +0100 aw r266785 : #i98289#,#i96474# tooling and new flags for tasks 2009-01-23 10:47:09 +0100 aw r266783 : #i98289#,#i96474# tooling and new flags for tasks 2009-01-23 10:46:58 +0100 aw r266782 : #i98289#,#i96474# tooling and new flags for tasks 2009-01-23 10:46:48 +0100 aw r266781 : #i98289#,#i96474# tooling and new flags for tasks
2009-03-04 14:16:02 +00:00
Paragraph* pPara = new Paragraph( rPObj.GetParagraphData(nCurPara));
2008-10-01 06:50:54 +00:00
ImplCheckDepth( pPara->nDepth );
2000-09-18 16:07:07 +00:00
pParaList->Insert( pPara, LIST_APPEND );
ImplCheckNumBulletItem( nCurPara );
}
2010-10-04 16:20:36 +02:00
// #i100014#
// It is not a good idea to substract 1 from a count and cast the result
// to USHORT without check, if the count is 0.
ImplCheckParagraphs( 0, (USHORT) (pParaList->GetParagraphCount()) );
2000-09-18 16:07:07 +00:00
EnableUndo( bUndo );
2002-05-27 13:37:37 +00:00
ImplBlockInsertionCallbacks( FALSE );
2000-09-18 16:07:07 +00:00
pEditEngine->SetUpdateMode( bUpdate );
DBG_ASSERT( pParaList->GetParagraphCount()==rPObj.Count(),"SetText failed");
DBG_ASSERT( pEditEngine->GetParagraphCount()==rPObj.Count(),"SetText failed");
2000-09-18 16:07:07 +00:00
}
void Outliner::AddText( const OutlinerParaObject& rPObj )
{
DBG_CHKTHIS(Outliner,0);
Paragraph* pPara;
BOOL bUpdate = pEditEngine->GetUpdateMode();
pEditEngine->SetUpdateMode( FALSE );
2002-05-27 13:37:37 +00:00
ImplBlockInsertionCallbacks( TRUE );
2000-09-18 16:07:07 +00:00
ULONG nPara;
if( bFirstParaIsEmpty )
{
pParaList->Clear( TRUE );
CWS-TOOLING: integrate CWS aw063 2009-02-12 13:10:24 +0100 aw r267649 : #i99123# when a primitive is invisible, it is not sufficient to produce no output when decomposing, but to add invisible data using HitTestPrimitive2D. This is needed for the slideshow which relies on geometry data in MetaFiles when painting invisible objects 2009-02-12 13:08:39 +0100 aw r267648 : #i99123# do not ignore HitTestPrimitive2D, but draw empty rectangles instead. This is needed since Slideshow is based on getting MetaFile content when painting invisible objects 2009-02-11 16:04:28 +0100 aw r267620 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:04:10 +0100 aw r267619 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:03:56 +0100 aw r267618 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:03:39 +0100 aw r267617 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:03:21 +0100 aw r267615 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:02:48 +0100 aw r267614 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:02:24 +0100 aw r267613 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:02:01 +0100 aw r267612 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:01:32 +0100 aw r267611 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:01:05 +0100 aw r267610 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:00:15 +0100 aw r267608 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 11:27:33 +0100 aw r267585 : #i98788# added missing include for STL 2009-02-10 17:46:50 +0100 aw r267570 : #i98788# added reaction on pool destruction 2009-02-10 17:11:58 +0100 aw r267562 : #i98788# added messaging mechanism to register for pool destruction 2009-02-10 13:35:35 +0100 aw r267549 : #i98788# removing changes, too complicated and risky for 3.1 2009-02-10 12:13:48 +0100 aw r267546 : #i98788# 4th round 2009-02-10 12:13:37 +0100 aw r267545 : #i98788# 4th round 2009-02-10 12:13:26 +0100 aw r267544 : #i98788# 4th round 2009-02-10 12:13:14 +0100 aw r267543 : #i98788# 4th round 2009-02-10 12:13:03 +0100 aw r267542 : #i98788# 4th round 2009-02-10 12:12:50 +0100 aw r267541 : #i98788# 4th round 2009-02-10 12:12:37 +0100 aw r267540 : #i98788# 4th round 2009-02-08 14:38:22 +0100 aw r267495 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:38:06 +0100 aw r267494 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:37:48 +0100 aw r267493 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:37:17 +0100 aw r267492 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:56 +0100 aw r267491 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:44 +0100 aw r267490 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:29 +0100 aw r267489 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:16 +0100 aw r267488 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:02 +0100 aw r267487 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:35:46 +0100 aw r267486 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-05 12:20:39 +0100 aw r267415 : #i98788# 2nd batch of adaptions for SfxItemPoolHolder addition 2009-02-04 15:12:54 +0100 aw r267385 : #i98788# added newline at EOF 2009-02-04 13:26:04 +0100 aw r267379 : #i98788# make SfxItemPool holdable 2009-02-04 13:25:40 +0100 aw r267378 : #i98788# make SfxItemPool holdable 2009-02-04 13:25:08 +0100 aw r267377 : #i98788# make SfxItemPool holdable 2009-02-04 13:24:42 +0100 aw r267376 : #i98788# make SfxItemPool holdable 2009-02-04 13:23:14 +0100 aw r267375 : #i98788# make SfxItemPool holdable 2009-02-04 13:23:02 +0100 aw r267374 : #i98788# make SfxItemPool holdable 2009-01-29 17:08:31 +0100 aw r267159 : #i97628# completed the fix 2009-01-29 17:08:15 +0100 aw r267158 : #i97628# completed the fix 2009-01-29 14:09:07 +0100 aw r267132 : #i97628# Corrected usage of ParagraphData in headers 2009-01-29 14:06:58 +0100 iha r267131 : #i98344# incorrect font size in charts 2009-01-29 12:13:46 +0100 aw r267115 : #i97628# back to old state; triggers too many errors in other modules 2009-01-29 12:03:51 +0100 aw r267114 : #i97628# enabled exceptions due to STL vector include 2009-01-29 11:21:37 +0100 aw r267107 : #i97628# added needed include 2009-01-28 17:58:29 +0100 aw r267077 : #i97628# first version of newly implemented OutlinerParaObject and adaptions 2009-01-28 17:58:12 +0100 aw r267076 : #i97628# first version of newly implemented OutlinerParaObject and adaptions 2009-01-28 17:57:51 +0100 aw r267074 : #i97628# first version of newly implemented OutlinerParaObject and adaptions 2009-01-28 17:57:21 +0100 aw r267073 : #i97628# first version of newly implemented OutlinerParaObject and adaptions 2009-01-27 17:07:33 +0100 aw r267011 : #i98402# added support for ViewRange when exporting MetaFiles in ObjectContactOfPageView::DoProcessDisplay to avoid to paint too much 2009-01-27 11:45:48 +0100 aw r266973 : #i98404# Added a warning to a place where a conversion to rectangle should not be copied from 2009-01-26 21:44:36 +0100 iha r266949 : #i98497# 3D charts are rendered with wrong size 2009-01-26 20:47:07 +0100 aw r266947 : #i98404# handle BackgroundColorPrimitive2D directly in PixelRenderers and avoid AA under all circumstances 2009-01-26 14:50:36 +0100 aw r266926 : #i98386# secured cloning of SdrObject in IMapUserData by boost::shared_prt usage 2009-01-26 12:51:30 +0100 aw r266916 : #i96581# added separated FontStretching and fallback for small X!=Y scale differences 2009-01-23 16:14:55 +0100 aw r266834 : #i96475# added missing implementation of TextDecoratedPortionPrimitive2D::getB2DRange 2009-01-23 15:24:34 +0100 aw r266826 : #i98405# fixed fallback to DrawAlphaRect to use the correctly sized rectangle 2009-01-23 13:34:43 +0100 aw r266813 : #i96474# fixed impSplitSingleWords for an unexpected case 2009-01-23 10:47:31 +0100 aw r266786 : #i98289#,#i96474# tooling and new flags for tasks 2009-01-23 10:47:20 +0100 aw r266785 : #i98289#,#i96474# tooling and new flags for tasks 2009-01-23 10:47:09 +0100 aw r266783 : #i98289#,#i96474# tooling and new flags for tasks 2009-01-23 10:46:58 +0100 aw r266782 : #i98289#,#i96474# tooling and new flags for tasks 2009-01-23 10:46:48 +0100 aw r266781 : #i98289#,#i96474# tooling and new flags for tasks
2009-03-04 14:16:02 +00:00
pEditEngine->SetText(rPObj.GetTextObject());
2000-09-18 16:07:07 +00:00
nPara = 0;
}
else
{
nPara = pParaList->GetParagraphCount();
CWS-TOOLING: integrate CWS aw063 2009-02-12 13:10:24 +0100 aw r267649 : #i99123# when a primitive is invisible, it is not sufficient to produce no output when decomposing, but to add invisible data using HitTestPrimitive2D. This is needed for the slideshow which relies on geometry data in MetaFiles when painting invisible objects 2009-02-12 13:08:39 +0100 aw r267648 : #i99123# do not ignore HitTestPrimitive2D, but draw empty rectangles instead. This is needed since Slideshow is based on getting MetaFile content when painting invisible objects 2009-02-11 16:04:28 +0100 aw r267620 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:04:10 +0100 aw r267619 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:03:56 +0100 aw r267618 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:03:39 +0100 aw r267617 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:03:21 +0100 aw r267615 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:02:48 +0100 aw r267614 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:02:24 +0100 aw r267613 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:02:01 +0100 aw r267612 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:01:32 +0100 aw r267611 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:01:05 +0100 aw r267610 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:00:15 +0100 aw r267608 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 11:27:33 +0100 aw r267585 : #i98788# added missing include for STL 2009-02-10 17:46:50 +0100 aw r267570 : #i98788# added reaction on pool destruction 2009-02-10 17:11:58 +0100 aw r267562 : #i98788# added messaging mechanism to register for pool destruction 2009-02-10 13:35:35 +0100 aw r267549 : #i98788# removing changes, too complicated and risky for 3.1 2009-02-10 12:13:48 +0100 aw r267546 : #i98788# 4th round 2009-02-10 12:13:37 +0100 aw r267545 : #i98788# 4th round 2009-02-10 12:13:26 +0100 aw r267544 : #i98788# 4th round 2009-02-10 12:13:14 +0100 aw r267543 : #i98788# 4th round 2009-02-10 12:13:03 +0100 aw r267542 : #i98788# 4th round 2009-02-10 12:12:50 +0100 aw r267541 : #i98788# 4th round 2009-02-10 12:12:37 +0100 aw r267540 : #i98788# 4th round 2009-02-08 14:38:22 +0100 aw r267495 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:38:06 +0100 aw r267494 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:37:48 +0100 aw r267493 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:37:17 +0100 aw r267492 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:56 +0100 aw r267491 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:44 +0100 aw r267490 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:29 +0100 aw r267489 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:16 +0100 aw r267488 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:02 +0100 aw r267487 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:35:46 +0100 aw r267486 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-05 12:20:39 +0100 aw r267415 : #i98788# 2nd batch of adaptions for SfxItemPoolHolder addition 2009-02-04 15:12:54 +0100 aw r267385 : #i98788# added newline at EOF 2009-02-04 13:26:04 +0100 aw r267379 : #i98788# make SfxItemPool holdable 2009-02-04 13:25:40 +0100 aw r267378 : #i98788# make SfxItemPool holdable 2009-02-04 13:25:08 +0100 aw r267377 : #i98788# make SfxItemPool holdable 2009-02-04 13:24:42 +0100 aw r267376 : #i98788# make SfxItemPool holdable 2009-02-04 13:23:14 +0100 aw r267375 : #i98788# make SfxItemPool holdable 2009-02-04 13:23:02 +0100 aw r267374 : #i98788# make SfxItemPool holdable 2009-01-29 17:08:31 +0100 aw r267159 : #i97628# completed the fix 2009-01-29 17:08:15 +0100 aw r267158 : #i97628# completed the fix 2009-01-29 14:09:07 +0100 aw r267132 : #i97628# Corrected usage of ParagraphData in headers 2009-01-29 14:06:58 +0100 iha r267131 : #i98344# incorrect font size in charts 2009-01-29 12:13:46 +0100 aw r267115 : #i97628# back to old state; triggers too many errors in other modules 2009-01-29 12:03:51 +0100 aw r267114 : #i97628# enabled exceptions due to STL vector include 2009-01-29 11:21:37 +0100 aw r267107 : #i97628# added needed include 2009-01-28 17:58:29 +0100 aw r267077 : #i97628# first version of newly implemented OutlinerParaObject and adaptions 2009-01-28 17:58:12 +0100 aw r267076 : #i97628# first version of newly implemented OutlinerParaObject and adaptions 2009-01-28 17:57:51 +0100 aw r267074 : #i97628# first version of newly implemented OutlinerParaObject and adaptions 2009-01-28 17:57:21 +0100 aw r267073 : #i97628# first version of newly implemented OutlinerParaObject and adaptions 2009-01-27 17:07:33 +0100 aw r267011 : #i98402# added support for ViewRange when exporting MetaFiles in ObjectContactOfPageView::DoProcessDisplay to avoid to paint too much 2009-01-27 11:45:48 +0100 aw r266973 : #i98404# Added a warning to a place where a conversion to rectangle should not be copied from 2009-01-26 21:44:36 +0100 iha r266949 : #i98497# 3D charts are rendered with wrong size 2009-01-26 20:47:07 +0100 aw r266947 : #i98404# handle BackgroundColorPrimitive2D directly in PixelRenderers and avoid AA under all circumstances 2009-01-26 14:50:36 +0100 aw r266926 : #i98386# secured cloning of SdrObject in IMapUserData by boost::shared_prt usage 2009-01-26 12:51:30 +0100 aw r266916 : #i96581# added separated FontStretching and fallback for small X!=Y scale differences 2009-01-23 16:14:55 +0100 aw r266834 : #i96475# added missing implementation of TextDecoratedPortionPrimitive2D::getB2DRange 2009-01-23 15:24:34 +0100 aw r266826 : #i98405# fixed fallback to DrawAlphaRect to use the correctly sized rectangle 2009-01-23 13:34:43 +0100 aw r266813 : #i96474# fixed impSplitSingleWords for an unexpected case 2009-01-23 10:47:31 +0100 aw r266786 : #i98289#,#i96474# tooling and new flags for tasks 2009-01-23 10:47:20 +0100 aw r266785 : #i98289#,#i96474# tooling and new flags for tasks 2009-01-23 10:47:09 +0100 aw r266783 : #i98289#,#i96474# tooling and new flags for tasks 2009-01-23 10:46:58 +0100 aw r266782 : #i98289#,#i96474# tooling and new flags for tasks 2009-01-23 10:46:48 +0100 aw r266781 : #i98289#,#i96474# tooling and new flags for tasks
2009-03-04 14:16:02 +00:00
pEditEngine->InsertParagraph( EE_PARA_APPEND, rPObj.GetTextObject() );
2000-09-18 16:07:07 +00:00
}
bFirstParaIsEmpty = FALSE;
CWS-TOOLING: integrate CWS aw063 2009-02-12 13:10:24 +0100 aw r267649 : #i99123# when a primitive is invisible, it is not sufficient to produce no output when decomposing, but to add invisible data using HitTestPrimitive2D. This is needed for the slideshow which relies on geometry data in MetaFiles when painting invisible objects 2009-02-12 13:08:39 +0100 aw r267648 : #i99123# do not ignore HitTestPrimitive2D, but draw empty rectangles instead. This is needed since Slideshow is based on getting MetaFile content when painting invisible objects 2009-02-11 16:04:28 +0100 aw r267620 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:04:10 +0100 aw r267619 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:03:56 +0100 aw r267618 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:03:39 +0100 aw r267617 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:03:21 +0100 aw r267615 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:02:48 +0100 aw r267614 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:02:24 +0100 aw r267613 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:02:01 +0100 aw r267612 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:01:32 +0100 aw r267611 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:01:05 +0100 aw r267610 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:00:15 +0100 aw r267608 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 11:27:33 +0100 aw r267585 : #i98788# added missing include for STL 2009-02-10 17:46:50 +0100 aw r267570 : #i98788# added reaction on pool destruction 2009-02-10 17:11:58 +0100 aw r267562 : #i98788# added messaging mechanism to register for pool destruction 2009-02-10 13:35:35 +0100 aw r267549 : #i98788# removing changes, too complicated and risky for 3.1 2009-02-10 12:13:48 +0100 aw r267546 : #i98788# 4th round 2009-02-10 12:13:37 +0100 aw r267545 : #i98788# 4th round 2009-02-10 12:13:26 +0100 aw r267544 : #i98788# 4th round 2009-02-10 12:13:14 +0100 aw r267543 : #i98788# 4th round 2009-02-10 12:13:03 +0100 aw r267542 : #i98788# 4th round 2009-02-10 12:12:50 +0100 aw r267541 : #i98788# 4th round 2009-02-10 12:12:37 +0100 aw r267540 : #i98788# 4th round 2009-02-08 14:38:22 +0100 aw r267495 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:38:06 +0100 aw r267494 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:37:48 +0100 aw r267493 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:37:17 +0100 aw r267492 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:56 +0100 aw r267491 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:44 +0100 aw r267490 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:29 +0100 aw r267489 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:16 +0100 aw r267488 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:02 +0100 aw r267487 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:35:46 +0100 aw r267486 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-05 12:20:39 +0100 aw r267415 : #i98788# 2nd batch of adaptions for SfxItemPoolHolder addition 2009-02-04 15:12:54 +0100 aw r267385 : #i98788# added newline at EOF 2009-02-04 13:26:04 +0100 aw r267379 : #i98788# make SfxItemPool holdable 2009-02-04 13:25:40 +0100 aw r267378 : #i98788# make SfxItemPool holdable 2009-02-04 13:25:08 +0100 aw r267377 : #i98788# make SfxItemPool holdable 2009-02-04 13:24:42 +0100 aw r267376 : #i98788# make SfxItemPool holdable 2009-02-04 13:23:14 +0100 aw r267375 : #i98788# make SfxItemPool holdable 2009-02-04 13:23:02 +0100 aw r267374 : #i98788# make SfxItemPool holdable 2009-01-29 17:08:31 +0100 aw r267159 : #i97628# completed the fix 2009-01-29 17:08:15 +0100 aw r267158 : #i97628# completed the fix 2009-01-29 14:09:07 +0100 aw r267132 : #i97628# Corrected usage of ParagraphData in headers 2009-01-29 14:06:58 +0100 iha r267131 : #i98344# incorrect font size in charts 2009-01-29 12:13:46 +0100 aw r267115 : #i97628# back to old state; triggers too many errors in other modules 2009-01-29 12:03:51 +0100 aw r267114 : #i97628# enabled exceptions due to STL vector include 2009-01-29 11:21:37 +0100 aw r267107 : #i97628# added needed include 2009-01-28 17:58:29 +0100 aw r267077 : #i97628# first version of newly implemented OutlinerParaObject and adaptions 2009-01-28 17:58:12 +0100 aw r267076 : #i97628# first version of newly implemented OutlinerParaObject and adaptions 2009-01-28 17:57:51 +0100 aw r267074 : #i97628# first version of newly implemented OutlinerParaObject and adaptions 2009-01-28 17:57:21 +0100 aw r267073 : #i97628# first version of newly implemented OutlinerParaObject and adaptions 2009-01-27 17:07:33 +0100 aw r267011 : #i98402# added support for ViewRange when exporting MetaFiles in ObjectContactOfPageView::DoProcessDisplay to avoid to paint too much 2009-01-27 11:45:48 +0100 aw r266973 : #i98404# Added a warning to a place where a conversion to rectangle should not be copied from 2009-01-26 21:44:36 +0100 iha r266949 : #i98497# 3D charts are rendered with wrong size 2009-01-26 20:47:07 +0100 aw r266947 : #i98404# handle BackgroundColorPrimitive2D directly in PixelRenderers and avoid AA under all circumstances 2009-01-26 14:50:36 +0100 aw r266926 : #i98386# secured cloning of SdrObject in IMapUserData by boost::shared_prt usage 2009-01-26 12:51:30 +0100 aw r266916 : #i96581# added separated FontStretching and fallback for small X!=Y scale differences 2009-01-23 16:14:55 +0100 aw r266834 : #i96475# added missing implementation of TextDecoratedPortionPrimitive2D::getB2DRange 2009-01-23 15:24:34 +0100 aw r266826 : #i98405# fixed fallback to DrawAlphaRect to use the correctly sized rectangle 2009-01-23 13:34:43 +0100 aw r266813 : #i96474# fixed impSplitSingleWords for an unexpected case 2009-01-23 10:47:31 +0100 aw r266786 : #i98289#,#i96474# tooling and new flags for tasks 2009-01-23 10:47:20 +0100 aw r266785 : #i98289#,#i96474# tooling and new flags for tasks 2009-01-23 10:47:09 +0100 aw r266783 : #i98289#,#i96474# tooling and new flags for tasks 2009-01-23 10:46:58 +0100 aw r266782 : #i98289#,#i96474# tooling and new flags for tasks 2009-01-23 10:46:48 +0100 aw r266781 : #i98289#,#i96474# tooling and new flags for tasks
2009-03-04 14:16:02 +00:00
for( USHORT n = 0; n < rPObj.Count(); n++ )
2000-09-18 16:07:07 +00:00
{
CWS-TOOLING: integrate CWS aw063 2009-02-12 13:10:24 +0100 aw r267649 : #i99123# when a primitive is invisible, it is not sufficient to produce no output when decomposing, but to add invisible data using HitTestPrimitive2D. This is needed for the slideshow which relies on geometry data in MetaFiles when painting invisible objects 2009-02-12 13:08:39 +0100 aw r267648 : #i99123# do not ignore HitTestPrimitive2D, but draw empty rectangles instead. This is needed since Slideshow is based on getting MetaFile content when painting invisible objects 2009-02-11 16:04:28 +0100 aw r267620 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:04:10 +0100 aw r267619 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:03:56 +0100 aw r267618 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:03:39 +0100 aw r267617 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:03:21 +0100 aw r267615 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:02:48 +0100 aw r267614 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:02:24 +0100 aw r267613 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:02:01 +0100 aw r267612 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:01:32 +0100 aw r267611 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:01:05 +0100 aw r267610 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 16:00:15 +0100 aw r267608 : #i98788# made SfxItemPool destructor protected, added static ::Free method 2009-02-11 11:27:33 +0100 aw r267585 : #i98788# added missing include for STL 2009-02-10 17:46:50 +0100 aw r267570 : #i98788# added reaction on pool destruction 2009-02-10 17:11:58 +0100 aw r267562 : #i98788# added messaging mechanism to register for pool destruction 2009-02-10 13:35:35 +0100 aw r267549 : #i98788# removing changes, too complicated and risky for 3.1 2009-02-10 12:13:48 +0100 aw r267546 : #i98788# 4th round 2009-02-10 12:13:37 +0100 aw r267545 : #i98788# 4th round 2009-02-10 12:13:26 +0100 aw r267544 : #i98788# 4th round 2009-02-10 12:13:14 +0100 aw r267543 : #i98788# 4th round 2009-02-10 12:13:03 +0100 aw r267542 : #i98788# 4th round 2009-02-10 12:12:50 +0100 aw r267541 : #i98788# 4th round 2009-02-10 12:12:37 +0100 aw r267540 : #i98788# 4th round 2009-02-08 14:38:22 +0100 aw r267495 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:38:06 +0100 aw r267494 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:37:48 +0100 aw r267493 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:37:17 +0100 aw r267492 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:56 +0100 aw r267491 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:44 +0100 aw r267490 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:29 +0100 aw r267489 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:16 +0100 aw r267488 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:36:02 +0100 aw r267487 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-08 14:35:46 +0100 aw r267486 : #i98788# 3rd round of changes to SfxItemPool handling 2009-02-05 12:20:39 +0100 aw r267415 : #i98788# 2nd batch of adaptions for SfxItemPoolHolder addition 2009-02-04 15:12:54 +0100 aw r267385 : #i98788# added newline at EOF 2009-02-04 13:26:04 +0100 aw r267379 : #i98788# make SfxItemPool holdable 2009-02-04 13:25:40 +0100 aw r267378 : #i98788# make SfxItemPool holdable 2009-02-04 13:25:08 +0100 aw r267377 : #i98788# make SfxItemPool holdable 2009-02-04 13:24:42 +0100 aw r267376 : #i98788# make SfxItemPool holdable 2009-02-04 13:23:14 +0100 aw r267375 : #i98788# make SfxItemPool holdable 2009-02-04 13:23:02 +0100 aw r267374 : #i98788# make SfxItemPool holdable 2009-01-29 17:08:31 +0100 aw r267159 : #i97628# completed the fix 2009-01-29 17:08:15 +0100 aw r267158 : #i97628# completed the fix 2009-01-29 14:09:07 +0100 aw r267132 : #i97628# Corrected usage of ParagraphData in headers 2009-01-29 14:06:58 +0100 iha r267131 : #i98344# incorrect font size in charts 2009-01-29 12:13:46 +0100 aw r267115 : #i97628# back to old state; triggers too many errors in other modules 2009-01-29 12:03:51 +0100 aw r267114 : #i97628# enabled exceptions due to STL vector include 2009-01-29 11:21:37 +0100 aw r267107 : #i97628# added needed include 2009-01-28 17:58:29 +0100 aw r267077 : #i97628# first version of newly implemented OutlinerParaObject and adaptions 2009-01-28 17:58:12 +0100 aw r267076 : #i97628# first version of newly implemented OutlinerParaObject and adaptions 2009-01-28 17:57:51 +0100 aw r267074 : #i97628# first version of newly implemented OutlinerParaObject and adaptions 2009-01-28 17:57:21 +0100 aw r267073 : #i97628# first version of newly implemented OutlinerParaObject and adaptions 2009-01-27 17:07:33 +0100 aw r267011 : #i98402# added support for ViewRange when exporting MetaFiles in ObjectContactOfPageView::DoProcessDisplay to avoid to paint too much 2009-01-27 11:45:48 +0100 aw r266973 : #i98404# Added a warning to a place where a conversion to rectangle should not be copied from 2009-01-26 21:44:36 +0100 iha r266949 : #i98497# 3D charts are rendered with wrong size 2009-01-26 20:47:07 +0100 aw r266947 : #i98404# handle BackgroundColorPrimitive2D directly in PixelRenderers and avoid AA under all circumstances 2009-01-26 14:50:36 +0100 aw r266926 : #i98386# secured cloning of SdrObject in IMapUserData by boost::shared_prt usage 2009-01-26 12:51:30 +0100 aw r266916 : #i96581# added separated FontStretching and fallback for small X!=Y scale differences 2009-01-23 16:14:55 +0100 aw r266834 : #i96475# added missing implementation of TextDecoratedPortionPrimitive2D::getB2DRange 2009-01-23 15:24:34 +0100 aw r266826 : #i98405# fixed fallback to DrawAlphaRect to use the correctly sized rectangle 2009-01-23 13:34:43 +0100 aw r266813 : #i96474# fixed impSplitSingleWords for an unexpected case 2009-01-23 10:47:31 +0100 aw r266786 : #i98289#,#i96474# tooling and new flags for tasks 2009-01-23 10:47:20 +0100 aw r266785 : #i98289#,#i96474# tooling and new flags for tasks 2009-01-23 10:47:09 +0100 aw r266783 : #i98289#,#i96474# tooling and new flags for tasks 2009-01-23 10:46:58 +0100 aw r266782 : #i98289#,#i96474# tooling and new flags for tasks 2009-01-23 10:46:48 +0100 aw r266781 : #i98289#,#i96474# tooling and new flags for tasks
2009-03-04 14:16:02 +00:00
pPara = new Paragraph( rPObj.GetParagraphData(n) );
2000-09-18 16:07:07 +00:00
pParaList->Insert( pPara, LIST_APPEND );
USHORT nP = sal::static_int_cast< USHORT >(nPara+n);
DBG_ASSERT(pParaList->GetAbsPos(pPara)==nP,"AddText:Out of sync");
2000-09-18 16:07:07 +00:00
ImplInitDepth( nP, pPara->GetDepth(), FALSE );
}
DBG_ASSERT( pEditEngine->GetParagraphCount()==pParaList->GetParagraphCount(), "SetText: OutOfSync" );
2010-10-04 16:20:36 +02:00
// #i100014#
// It is not a good idea to substract 1 from a count and cast the result
// to USHORT without check, if the count is 0.
ImplCheckParagraphs( (USHORT)nPara, (USHORT) (pParaList->GetParagraphCount()) );
2000-09-18 16:07:07 +00:00
2002-05-27 13:37:37 +00:00
ImplBlockInsertionCallbacks( FALSE );
2000-09-18 16:07:07 +00:00
pEditEngine->SetUpdateMode( bUpdate );
}
2010-12-11 23:23:07 +01:00
void Outliner::FieldClicked( const SvxFieldItem& rField, USHORT nPara, USHORT nPos )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS(Outliner,0);
if ( aFieldClickedHdl.IsSet() )
{
EditFieldInfo aFldInfo( this, rField, nPara, nPos );
aFldInfo.SetSimpleClick( TRUE );
aFieldClickedHdl.Call( &aFldInfo );
}
}
2010-12-11 23:23:07 +01:00
void Outliner::FieldSelected( const SvxFieldItem& rField, USHORT nPara, USHORT nPos )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS(Outliner,0);
if ( !aFieldClickedHdl.IsSet() )
return;
EditFieldInfo aFldInfo( this, rField, nPara, nPos );
aFldInfo.SetSimpleClick( FALSE );
aFieldClickedHdl.Call( &aFldInfo );
}
2010-12-11 23:23:07 +01:00
XubString Outliner::CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS(Outliner,0);
if ( !aCalcFieldValueHdl.IsSet() )
return String( ' ' );
EditFieldInfo aFldInfo( this, rField, nPara, nPos );
2011-02-16 16:34:02 -05:00
// The FldColor is preset with COL_LIGHTGRAY.
2000-09-18 16:07:07 +00:00
if ( rpFldColor )
aFldInfo.SetFldColor( *rpFldColor );
aCalcFieldValueHdl.Call( &aFldInfo );
if ( aFldInfo.GetTxtColor() )
{
delete rpTxtColor;
rpTxtColor = new Color( *aFldInfo.GetTxtColor() );
}
delete rpFldColor;
rpFldColor = aFldInfo.GetFldColor() ? new Color( *aFldInfo.GetFldColor() ) : 0;
return aFldInfo.GetRepresentation();
}
void Outliner::SetStyleSheet( ULONG nPara, SfxStyleSheet* pStyle )
{
DBG_CHKTHIS(Outliner,0);
Paragraph* pPara = pParaList->GetParagraph( nPara );
if (pPara)
{
pEditEngine->SetStyleSheet( (USHORT)nPara, pStyle );
pPara->nFlags |= PARAFLAG_SETBULLETTEXT;
ImplCheckNumBulletItem( (USHORT) nPara );
}
2000-09-18 16:07:07 +00:00
}
void Outliner::SetVisible( Paragraph* pPara, BOOL bVisible )
{
DBG_CHKTHIS(Outliner,0);
DBG_ASSERT( pPara, "SetVisible: pPara = NULL" );
if (pPara)
{
pPara->bVisible = bVisible;
ULONG nPara = pParaList->GetAbsPos( pPara );
pEditEngine->ShowParagraph( (USHORT)nPara, bVisible );
}
2000-09-18 16:07:07 +00:00
}
void Outliner::ImplCheckNumBulletItem( USHORT nPara )
{
Paragraph* pPara = pParaList->GetParagraph( nPara );
if (pPara)
pPara->aBulSize.Width() = -1;
2000-09-18 16:07:07 +00:00
}
2001-11-14 10:01:23 +00:00
void Outliner::ImplSetLevelDependendStyleSheet( USHORT nPara, SfxStyleSheet* pLevelStyle )
2000-09-18 16:07:07 +00:00
{
2001-11-14 10:01:23 +00:00
DBG_CHKTHIS(Outliner,0);
DBG_ASSERT( ( ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEOBJECT ) || ( ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEVIEW ), "SetLevelDependendStyleSheet: Wrong Mode!" );
SfxStyleSheet* pStyle = pLevelStyle;
if ( !pStyle )
pStyle = GetStyleSheet( nPara );
2000-09-18 16:07:07 +00:00
2001-11-14 10:01:23 +00:00
if ( pStyle )
2000-09-18 16:07:07 +00:00
{
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
sal_Int16 nDepth = GetDepth( nPara );
if( nDepth < 0 )
nDepth = 0;
2001-11-14 10:01:23 +00:00
String aNewStyleSheetName( pStyle->GetName() );
2000-09-18 16:07:07 +00:00
aNewStyleSheetName.Erase( aNewStyleSheetName.Len()-1, 1 );
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
aNewStyleSheetName += String::CreateFromInt32( nDepth+1 );
2001-11-14 10:01:23 +00:00
SfxStyleSheet* pNewStyle = (SfxStyleSheet*)GetStyleSheetPool()->Find( aNewStyleSheetName, pStyle->GetFamily() );
2000-09-18 16:07:07 +00:00
DBG_ASSERT( pNewStyle, "AutoStyleSheetName - Style not found!" );
2001-11-14 10:01:23 +00:00
if ( pNewStyle && ( pNewStyle != GetStyleSheet( nPara ) ) )
{
2001-11-14 10:01:23 +00:00
SfxItemSet aOldAttrs( GetParaAttribs( nPara ) );
2000-09-18 16:07:07 +00:00
SetStyleSheet( nPara, pNewStyle );
if ( aOldAttrs.GetItemState( EE_PARA_NUMBULLET ) == SFX_ITEM_ON )
{
2001-11-14 10:01:23 +00:00
SfxItemSet aAttrs( GetParaAttribs( nPara ) );
aAttrs.Put( aOldAttrs.Get( EE_PARA_NUMBULLET ) );
2001-11-14 10:01:23 +00:00
SetParaAttribs( nPara, aAttrs );
}
}
2000-09-18 16:07:07 +00:00
}
}
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
void Outliner::ImplInitDepth( USHORT nPara, sal_Int16 nDepth, BOOL bCreateUndo, BOOL bUndoAction )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS(Outliner,0);
2001-05-30 16:23:37 +00:00
DBG_ASSERT( ( nDepth >= nMinDepth ) && ( nDepth <= nMaxDepth ), "ImplInitDepth - Depth is invalid!" );
2000-09-18 16:07:07 +00:00
Paragraph* pPara = pParaList->GetParagraph( nPara );
if (!pPara)
return;
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
sal_Int16 nOldDepth = pPara->GetDepth();
2000-09-18 16:07:07 +00:00
pPara->SetDepth( nDepth );
2011-02-16 16:34:02 -05:00
// For IsInUndo attributes and style do not have to be set, there
// the old values are restored by the EditEngine.
2000-09-18 16:07:07 +00:00
if( !IsInUndo() )
{
BOOL bUpdate = pEditEngine->GetUpdateMode();
pEditEngine->SetUpdateMode( FALSE );
BOOL bUndo = bCreateUndo && IsUndoEnabled();
if ( bUndo && bUndoAction )
UndoActionStart( OLUNDO_DEPTH );
SfxItemSet aAttrs( pEditEngine->GetParaAttribs( nPara ) );
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
aAttrs.Put( SfxInt16Item( EE_PARA_OUTLLEVEL, nDepth ) );
2000-09-18 16:07:07 +00:00
pEditEngine->SetParaAttribs( nPara, aAttrs );
ImplCheckNumBulletItem( nPara );
ImplCalcBulletText( nPara, FALSE, FALSE );
if ( bUndo )
{
InsertUndo( new OutlinerUndoChangeDepth( this, nPara, nOldDepth, nDepth ) );
if ( bUndoAction )
UndoActionEnd( OLUNDO_DEPTH );
}
pEditEngine->SetUpdateMode( bUpdate );
}
}
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
void Outliner::SetParaAttribs( USHORT nPara, const SfxItemSet& rSet )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS(Outliner,0);
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
pEditEngine->SetParaAttribs( nPara, rSet );
2000-09-18 16:07:07 +00:00
}
BOOL Outliner::Expand( Paragraph* pPara )
{
DBG_CHKTHIS(Outliner,0);
if ( pParaList->HasHiddenChilds( pPara ) )
{
OLUndoExpand* pUndo = 0;
2000-09-18 16:07:07 +00:00
BOOL bUndo = IsUndoEnabled() && !IsInUndo();
if( bUndo )
{
UndoActionStart( OLUNDO_EXPAND );
pUndo = new OLUndoExpand( this, OLUNDO_EXPAND );
pUndo->pParas = 0;
pUndo->nCount = (USHORT)pParaList->GetAbsPos( pPara );
}
pHdlParagraph = pPara;
bIsExpanding = TRUE;
pParaList->Expand( pPara );
ExpandHdl();
InvalidateBullet( pPara, pParaList->GetAbsPos(pPara) );
if( bUndo )
{
InsertUndo( pUndo );
UndoActionEnd( OLUNDO_EXPAND );
}
return TRUE;
}
return FALSE;
}
BOOL Outliner::Collapse( Paragraph* pPara )
{
DBG_CHKTHIS(Outliner,0);
2011-02-16 16:34:02 -05:00
if ( pParaList->HasVisibleChilds( pPara ) ) // expanded
2000-09-18 16:07:07 +00:00
{
OLUndoExpand* pUndo = 0;
2000-09-18 16:07:07 +00:00
BOOL bUndo = FALSE;
2000-09-18 16:07:07 +00:00
if( !IsInUndo() && IsUndoEnabled() )
bUndo = TRUE;
if( bUndo )
{
UndoActionStart( OLUNDO_COLLAPSE );
pUndo = new OLUndoExpand( this, OLUNDO_COLLAPSE );
pUndo->pParas = 0;
pUndo->nCount = (USHORT)pParaList->GetAbsPos( pPara );
}
2000-09-18 16:07:07 +00:00
pHdlParagraph = pPara;
bIsExpanding = FALSE;
pParaList->Collapse( pPara );
ExpandHdl();
InvalidateBullet( pPara, pParaList->GetAbsPos(pPara) );
if( bUndo )
{
InsertUndo( pUndo );
UndoActionEnd( OLUNDO_COLLAPSE );
}
return TRUE;
}
return FALSE;
}
Font Outliner::ImpCalcBulletFont( USHORT nPara ) const
{
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
const SvxNumberFormat* pFmt = GetNumberFormat( nPara );
2001-03-29 14:12:06 +00:00
DBG_ASSERT( pFmt && ( pFmt->GetNumberingType() != SVX_NUM_BITMAP ) && ( pFmt->GetNumberingType() != SVX_NUM_NUMBER_NONE ), "ImpCalcBulletFont: Missing or BitmapBullet!" );
2000-09-18 16:07:07 +00:00
2011-02-16 16:34:02 -05:00
Font aStdFont;
if ( !pEditEngine->IsFlatMode() )
{
ESelection aSel( nPara, 0, nPara, 0 );
aStdFont = EditEngine::CreateFontFromItemSet( pEditEngine->GetAttribs( aSel ), GetScriptType( aSel ) );
}
else
{
aStdFont = pEditEngine->GetStandardFont( nPara );
}
2000-09-18 16:07:07 +00:00
2000-10-19 10:11:17 +00:00
Font aBulletFont;
if ( pFmt->GetNumberingType() == SVX_NUM_CHAR_SPECIAL )
{
2000-10-19 10:11:17 +00:00
aBulletFont = *pFmt->GetBulletFont();
}
2000-10-19 10:11:17 +00:00
else
{
aBulletFont = aStdFont;
aBulletFont.SetUnderline( UNDERLINE_NONE );
aBulletFont.SetOverline( UNDERLINE_NONE );
aBulletFont.SetStrikeout( STRIKEOUT_NONE );
aBulletFont.SetEmphasisMark( EMPHASISMARK_NONE );
aBulletFont.SetRelief( RELIEF_NONE );
}
2011-02-16 16:34:02 -05:00
// Use original scale...
USHORT nStretchX, nStretchY;
const_cast<Outliner*>(this)->GetGlobalCharStretching(nStretchX, nStretchY);
USHORT nScale = pFmt->GetBulletRelSize() * nStretchY / 100;
ULONG nScaledLineHeight = aStdFont.GetSize().Height();
nScaledLineHeight *= nScale*10;
nScaledLineHeight /= 1000;
2000-10-19 10:11:17 +00:00
2000-09-18 16:07:07 +00:00
aBulletFont.SetAlign( ALIGN_BOTTOM );
aBulletFont.SetSize( Size( 0, nScaledLineHeight ) );
BOOL bVertical = IsVertical();
aBulletFont.SetVertical( bVertical );
aBulletFont.SetOrientation( bVertical ? 2700 : 0 );
2000-11-20 11:17:53 +00:00
Color aColor( COL_AUTO );
2000-11-20 11:17:53 +00:00
if( !pEditEngine->IsFlatMode() && !( pEditEngine->GetControlWord() & EE_CNTRL_NOCOLORS ) )
2002-02-25 15:10:51 +00:00
{
2000-11-20 11:17:53 +00:00
aColor = pFmt->GetBulletColor();
2002-02-25 15:10:51 +00:00
}
if ( ( aColor == COL_AUTO ) || ( IsForceAutoColor() ) )
aColor = pEditEngine->GetAutoColor();
2000-11-20 11:17:53 +00:00
aBulletFont.SetColor( aColor );
2000-09-18 16:07:07 +00:00
return aBulletFont;
}
void Outliner::PaintBullet( USHORT nPara, const Point& rStartPos,
const Point& rOrigin, short nOrientation, OutputDevice* pOutDev )
{
DBG_CHKTHIS(Outliner,0);
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
bool bDrawBullet = false;
if (pEditEngine)
{
const SfxBoolItem& rBulletState = (const SfxBoolItem&) pEditEngine->GetParaAttrib( nPara, EE_PARA_BULLETSTATE );
bDrawBullet = rBulletState.GetValue() ? true : false;
}
if ( ImplHasBullet( nPara ) && bDrawBullet)
2000-09-18 16:07:07 +00:00
{
BOOL bVertical = IsVertical();
2002-07-24 12:18:20 +00:00
BOOL bRightToLeftPara = pEditEngine->IsRightToLeft( nPara );
Rectangle aBulletArea( ImpCalcBulletArea( nPara, TRUE, FALSE ) );
USHORT nStretchX, nStretchY;
GetGlobalCharStretching(nStretchX, nStretchY);
aBulletArea = Rectangle( Point(aBulletArea.Left()*nStretchX/100,
aBulletArea.Top()),
Size(aBulletArea.GetWidth()*nStretchX/100,
aBulletArea.GetHeight()) );
2000-09-18 16:07:07 +00:00
Paragraph* pPara = pParaList->GetParagraph( nPara );
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
const SvxNumberFormat* pFmt = GetNumberFormat( nPara );
if ( pFmt && ( pFmt->GetNumberingType() != SVX_NUM_NUMBER_NONE ) )
2000-09-18 16:07:07 +00:00
{
if( pFmt->GetNumberingType() != SVX_NUM_BITMAP )
2000-09-18 16:07:07 +00:00
{
Font aBulletFont( ImpCalcBulletFont( nPara ) );
2011-02-16 16:34:02 -05:00
// Use baseline
BOOL bSymbol = pFmt->GetNumberingType() == SVX_NUM_CHAR_SPECIAL;
aBulletFont.SetAlign( bSymbol ? ALIGN_BOTTOM : ALIGN_BASELINE );
2000-09-18 16:07:07 +00:00
Font aOldFont = pOutDev->GetFont();
pOutDev->SetFont( aBulletFont );
ParagraphInfos aParaInfos = pEditEngine->GetParagraphInfos( nPara );
Point aTextPos;
if ( !bVertical )
{
// aTextPos.Y() = rStartPos.Y() + aBulletArea.Bottom();
aTextPos.Y() = rStartPos.Y() + ( bSymbol ? aBulletArea.Bottom() : aParaInfos.nFirstLineMaxAscent );
2002-07-24 12:18:20 +00:00
if ( !bRightToLeftPara )
aTextPos.X() = rStartPos.X() + aBulletArea.Left();
else
aTextPos.X() = rStartPos.X() + GetPaperSize().Width() - aBulletArea.Left();
}
else
{
// aTextPos.X() = rStartPos.X() - aBulletArea.Bottom();
aTextPos.X() = rStartPos.X() - ( bSymbol ? aBulletArea.Bottom() : aParaInfos.nFirstLineMaxAscent );
aTextPos.Y() = rStartPos.Y() + aBulletArea.Left();
}
2000-09-18 16:07:07 +00:00
if ( nOrientation )
2000-09-18 16:07:07 +00:00
{
2011-02-16 16:34:02 -05:00
// Both TopLeft and bottom left is not quite correct,
// since in EditEngine baseline ...
double nRealOrientation = nOrientation*F_PI1800;
double nCos = cos( nRealOrientation );
double nSin = sin( nRealOrientation );
Point aRotatedPos;
// Translation...
aTextPos -= rOrigin;
// Rotation...
aRotatedPos.X()=(long) (nCos*aTextPos.X() + nSin*aTextPos.Y());
aRotatedPos.Y()=(long) - (nSin*aTextPos.X() - nCos*aTextPos.Y());
aTextPos = aRotatedPos;
// Translation...
aTextPos += rOrigin;
Font aRotatedFont( aBulletFont );
aRotatedFont.SetOrientation( nOrientation );
pOutDev->SetFont( aRotatedFont );
}
2000-09-18 16:07:07 +00:00
2011-02-16 16:34:02 -05:00
// VCL will take care of brackets and so on...
ULONG nLayoutMode = pOutDev->GetLayoutMode();
nLayoutMode &= ~(TEXT_LAYOUT_BIDI_RTL|TEXT_LAYOUT_COMPLEX_DISABLED|TEXT_LAYOUT_BIDI_STRONG);
if ( bRightToLeftPara )
nLayoutMode |= TEXT_LAYOUT_BIDI_RTL;
pOutDev->SetLayoutMode( nLayoutMode );
if(bStrippingPortions)
2000-09-18 16:07:07 +00:00
{
const Font aSvxFont(pOutDev->GetFont());
sal_Int32* pBuf = new sal_Int32[ pPara->GetText().Len() ];
2000-09-18 16:07:07 +00:00
pOutDev->GetTextArray( pPara->GetText(), pBuf );
if(bSymbol)
{
// aTextPos is Bottom, go to Baseline
FontMetric aMetric(pOutDev->GetFontMetric());
aTextPos.Y() -= aMetric.GetDescent();
}
DrawingText(aTextPos, pPara->GetText(), 0, pPara->GetText().Len(), pBuf,
aSvxFont, nPara, 0xFFFF, 0xFF, 0, 0, false, false, true, 0, Color(), Color());
2002-07-17 09:24:35 +00:00
delete[] pBuf;
2000-09-18 16:07:07 +00:00
}
else
{
pOutDev->DrawText( aTextPos, pPara->GetText() );
}
2000-09-18 16:07:07 +00:00
pOutDev->SetFont( aOldFont );
}
else
{
if ( pFmt->GetBrush()->GetGraphicObject() )
2000-09-18 16:07:07 +00:00
{
Point aBulletPos;
if ( !bVertical )
{
aBulletPos.Y() = rStartPos.Y() + aBulletArea.Top();
if ( !bRightToLeftPara )
aBulletPos.X() = rStartPos.X() + aBulletArea.Left();
else
aBulletPos.X() = rStartPos.X() + GetPaperSize().Width() - aBulletArea.Right();
}
else
{
aBulletPos.X() = rStartPos.X() - aBulletArea.Bottom();
aBulletPos.Y() = rStartPos.Y() + aBulletArea.Left();
}
if(bStrippingPortions)
{
if(aDrawBulletHdl.IsSet())
{
// call something analog to aDrawPortionHdl (if set) and feed it something
// analog to DrawPortionInfo...
// created aDrawBulletHdl, Set/GetDrawBulletHdl.
// created DrawBulletInfo and added handling to sdrtextdecomposition.cxx
DrawBulletInfo aDrawBulletInfo(
*pFmt->GetBrush()->GetGraphicObject(),
aBulletPos,
pPara->aBulSize);
aDrawBulletHdl.Call(&aDrawBulletInfo);
}
}
else
{
2011-02-16 16:34:02 -05:00
// Remove CAST when KA made the Draw-Method const
((GraphicObject*)pFmt->GetBrush()->GetGraphicObject())->Draw( pOutDev, aBulletPos, pPara->aBulSize );
}
2000-09-18 16:07:07 +00:00
}
}
}
2011-02-16 16:34:02 -05:00
// In case of collapsed subparagraphs paint a line before the text.
2000-09-18 16:07:07 +00:00
if( pParaList->HasChilds(pPara) && !pParaList->HasVisibleChilds(pPara) &&
!bStrippingPortions && !nOrientation )
{
long nWidth = pOutDev->PixelToLogic( Size( 10, 0 ) ).Width();
Point aStartPos, aEndPos;
if ( !bVertical )
{
aStartPos.Y() = rStartPos.Y() + aBulletArea.Bottom();
2002-07-24 12:18:20 +00:00
if ( !bRightToLeftPara )
aStartPos.X() = rStartPos.X() + aBulletArea.Right();
else
aStartPos.X() = rStartPos.X() + GetPaperSize().Width() - aBulletArea.Left();
aEndPos = aStartPos;
aEndPos.X() += nWidth;
}
else
{
aStartPos.X() = rStartPos.X() - aBulletArea.Bottom();
aStartPos.Y() = rStartPos.Y() + aBulletArea.Right();
aEndPos = aStartPos;
aEndPos.Y() += nWidth;
}
2000-09-18 16:07:07 +00:00
const Color& rOldLineColor = pOutDev->GetLineColor();
pOutDev->SetLineColor( Color( COL_BLACK ) );
pOutDev->DrawLine( aStartPos, aEndPos );
2000-09-18 16:07:07 +00:00
pOutDev->SetLineColor( rOldLineColor );
}
}
}
void Outliner::InvalidateBullet( Paragraph* /*pPara*/, ULONG nPara )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS(Outliner,0);
long nLineHeight = (long)pEditEngine->GetLineHeight((USHORT)nPara );
for ( size_t i = 0, n = aViewList.size(); i < n; ++i )
2000-09-18 16:07:07 +00:00
{
OutlinerView* pView = aViewList[ i ];
2000-09-18 16:07:07 +00:00
Point aPos( pView->pEditView->GetWindowPosTopLeft((USHORT)nPara ) );
Rectangle aRect( pView->GetOutputArea() );
aRect.Right() = aPos.X();
aRect.Top() = aPos.Y();
aRect.Bottom() = aPos.Y();
aRect.Bottom() += nLineHeight;
pView->GetWindow()->Invalidate( aRect );
}
}
ULONG Outliner::Read( SvStream& rInput, const String& rBaseURL, USHORT eFormat, SvKeyValueIterator* pHTTPHeaderAttrs )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS(Outliner,0);
BOOL bOldUndo = pEditEngine->IsUndoEnabled();
EnableUndo( FALSE );
BOOL bUpdate = pEditEngine->GetUpdateMode();
pEditEngine->SetUpdateMode( FALSE );
Clear();
2002-05-27 13:37:37 +00:00
ImplBlockInsertionCallbacks( TRUE );
ULONG nRet = pEditEngine->Read( rInput, rBaseURL, (EETextFormat)eFormat, pHTTPHeaderAttrs );
2000-09-18 16:07:07 +00:00
bFirstParaIsEmpty = FALSE;
USHORT nParas = pEditEngine->GetParagraphCount();
pParaList->Clear( TRUE );
USHORT n;
for ( n = 0; n < nParas; n++ )
{
Paragraph* pPara = new Paragraph( 0 );
pParaList->Insert( pPara, LIST_APPEND );
if ( eFormat == EE_FORMAT_BIN )
{
const SfxItemSet& rAttrs = pEditEngine->GetParaAttribs( n );
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
const SfxInt16Item& rLevel = (const SfxInt16Item&) rAttrs.Get( EE_PARA_OUTLLEVEL );
sal_Int16 nDepth = rLevel.GetValue();
2000-09-18 16:07:07 +00:00
ImplInitDepth( n, nDepth, FALSE );
}
}
if ( eFormat != EE_FORMAT_BIN )
{
ImpFilterIndents( 0, nParas-1 );
}
2002-05-27 13:37:37 +00:00
ImplBlockInsertionCallbacks( FALSE );
2000-09-18 16:07:07 +00:00
pEditEngine->SetUpdateMode( bUpdate );
EnableUndo( bOldUndo );
return nRet;
}
void Outliner::ImpFilterIndents( ULONG nFirstPara, ULONG nLastPara )
{
DBG_CHKTHIS(Outliner,0);
BOOL bUpdate = pEditEngine->GetUpdateMode();
pEditEngine->SetUpdateMode( FALSE );
Paragraph* pLastConverted = NULL;
for( ULONG nPara = nFirstPara; nPara <= nLastPara; nPara++ )
{
Paragraph* pPara = pParaList->GetParagraph( nPara );
if (pPara)
{
if( ImpConvertEdtToOut( nPara ) )
{
pLastConverted = pPara;
}
else if ( pLastConverted )
{
2011-02-16 16:34:02 -05:00
// Arrange normal paragraphs below the heading ...
pPara->SetDepth( pLastConverted->GetDepth() );
}
2000-09-18 16:07:07 +00:00
ImplInitDepth( (USHORT)nPara, pPara->GetDepth(), FALSE );
}
2000-09-18 16:07:07 +00:00
}
pEditEngine->SetUpdateMode( bUpdate );
}
SfxUndoManager& Outliner::GetUndoManager()
{
DBG_CHKTHIS(Outliner,0);
return pEditEngine->GetUndoManager();
}
void Outliner::ImpTextPasted( ULONG nStartPara, USHORT nCount )
{
DBG_CHKTHIS(Outliner,0);
BOOL bUpdate = pEditEngine->GetUpdateMode();
pEditEngine->SetUpdateMode( FALSE );
const ULONG nStart = nStartPara;
Paragraph* pPara = pParaList->GetParagraph( nStartPara );
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
2000-09-18 16:07:07 +00:00
while( nCount && pPara )
{
if( ImplGetOutlinerMode() != OUTLINERMODE_TEXTOBJECT )
{
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
nDepthChangedHdlPrevDepth = pPara->GetDepth();
mnDepthChangeHdlPrevFlags = pPara->nFlags;
2000-09-18 16:07:07 +00:00
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
ImpConvertEdtToOut( nStartPara );
pHdlParagraph = pPara;
if( nStartPara == nStart )
{
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
// the existing paragraph has changed depth or flags
if( (pPara->GetDepth() != nDepthChangedHdlPrevDepth) || (pPara->nFlags != mnDepthChangeHdlPrevFlags) )
DepthChangedHdl();
}
2000-09-18 16:07:07 +00:00
}
2011-02-16 16:34:02 -05:00
else // EditEngine mode
2000-09-18 16:07:07 +00:00
{
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
sal_Int16 nDepth = -1;
2000-09-18 16:07:07 +00:00
const SfxItemSet& rAttrs = pEditEngine->GetParaAttribs( (USHORT)nStartPara );
if ( rAttrs.GetItemState( EE_PARA_OUTLLEVEL ) == SFX_ITEM_ON )
{
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
const SfxInt16Item& rLevel = (const SfxInt16Item&) rAttrs.Get( EE_PARA_OUTLLEVEL );
2000-09-18 16:07:07 +00:00
nDepth = rLevel.GetValue();
}
if ( nDepth != GetDepth( nStartPara ) )
ImplInitDepth( (USHORT)nStartPara, nDepth, FALSE );
2000-09-18 16:07:07 +00:00
}
nCount--;
nStartPara++;
pPara = pParaList->GetParagraph( nStartPara );
}
pEditEngine->SetUpdateMode( bUpdate );
DBG_ASSERT(pParaList->GetParagraphCount()==pEditEngine->GetParagraphCount(),"ImpTextPasted failed");
}
long Outliner::IndentingPagesHdl( OutlinerView* pView )
{
DBG_CHKTHIS(Outliner,0);
if( !aIndentingPagesHdl.IsSet() )
return 1;
return aIndentingPagesHdl.Call( pView );
}
BOOL Outliner::ImpCanIndentSelectedPages( OutlinerView* pCurView )
{
DBG_CHKTHIS(Outliner,0);
2011-02-16 16:34:02 -05:00
// The selected pages must already be set in advance through
// ImpCalcSelectedPages
2000-09-18 16:07:07 +00:00
2011-02-16 16:34:02 -05:00
// If the first paragraph is on level 0 it can not indented in any case,
// possible there might be indentations in the following on the 0 level.
if ( ( mnFirstSelPage == 0 ) && ( ImplGetOutlinerMode() != OUTLINERMODE_TEXTOBJECT ) )
2000-09-18 16:07:07 +00:00
{
2011-02-16 16:34:02 -05:00
if ( nDepthChangedHdlPrevDepth == 1 ) // is the only page
2000-09-18 16:07:07 +00:00
return FALSE;
else
2011-02-16 16:34:02 -05:00
pCurView->ImpCalcSelectedPages( FALSE ); // without the first
2000-09-18 16:07:07 +00:00
}
return (BOOL)IndentingPagesHdl( pCurView );
}
BOOL Outliner::ImpCanDeleteSelectedPages( OutlinerView* pCurView )
{
DBG_CHKTHIS(Outliner,0);
2011-02-16 16:34:02 -05:00
// The selected pages must already be set in advance through
// ImpCalcSelectedPages
2000-09-18 16:07:07 +00:00
return (BOOL)RemovingPagesHdl( pCurView );
}
Outliner::Outliner( SfxItemPool* pPool, USHORT nMode )
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
: nMinDepth( -1 )
2000-09-18 16:07:07 +00:00
{
DBG_CTOR( Outliner, 0 );
bStrippingPortions = FALSE;
bPasting = FALSE;
nFirstPage = 1;
bBlockInsCallback = FALSE;
nMaxDepth = 9;
pParaList = new ParagraphList;
pParaList->SetVisibleStateChangedHdl( LINK( this, Outliner, ParaVisibleStateChangedHdl ) );
Paragraph* pPara = new Paragraph( 0 );
pParaList->Insert( pPara, LIST_APPEND );
bFirstParaIsEmpty = TRUE;
pEditEngine = new OutlinerEditEng( this, pPool );
pEditEngine->SetBeginMovingParagraphsHdl( LINK( this, Outliner, BeginMovingParagraphsHdl ) );
pEditEngine->SetEndMovingParagraphsHdl( LINK( this, Outliner, EndMovingParagraphsHdl ) );
2001-11-14 10:01:23 +00:00
pEditEngine->SetBeginPasteOrDropHdl( LINK( this, Outliner, BeginPasteOrDropHdl ) );
pEditEngine->SetEndPasteOrDropHdl( LINK( this, Outliner, EndPasteOrDropHdl ) );
2000-09-18 16:07:07 +00:00
Init( nMode );
}
Outliner::~Outliner()
{
DBG_DTOR(Outliner,0);
pParaList->Clear( TRUE );
delete pParaList;
delete pEditEngine;
}
size_t Outliner::InsertView( OutlinerView* pView, size_t nIndex )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS(Outliner,0);
size_t ActualIndex;
2011-02-16 16:34:02 -05:00
if ( nIndex >= aViewList.size() )
{
aViewList.push_back( pView );
ActualIndex = aViewList.size() - 1;
}
else
{
ViewList::iterator it = aViewList.begin();
advance( it, nIndex );
ActualIndex = nIndex;
}
2000-09-18 16:07:07 +00:00
pEditEngine->InsertView( pView->pEditView, (USHORT)nIndex );
return ActualIndex;
2000-09-18 16:07:07 +00:00
}
OutlinerView* Outliner::RemoveView( OutlinerView* pView )
{
DBG_CHKTHIS(Outliner,0);
for ( ViewList::iterator it = aViewList.begin(); it < aViewList.end(); ++it )
2000-09-18 16:07:07 +00:00
{
if ( *it == pView )
{
2011-02-16 16:34:02 -05:00
pView->pEditView->HideCursor(); // HACK
pEditEngine->RemoveView( pView->pEditView );
aViewList.erase( it );
break;
}
2000-09-18 16:07:07 +00:00
}
2011-02-16 16:34:02 -05:00
return NULL; // return superfluous
2000-09-18 16:07:07 +00:00
}
OutlinerView* Outliner::RemoveView( size_t nIndex )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS(Outliner,0);
EditView* pEditView = pEditEngine->GetView( (USHORT)nIndex );
2011-02-16 16:34:02 -05:00
pEditView->HideCursor(); // HACK
2000-09-18 16:07:07 +00:00
pEditEngine->RemoveView( (USHORT)nIndex );
{
ViewList::iterator it = aViewList.begin();
advance( it, nIndex );
aViewList.erase( it );
}
2011-02-16 16:34:02 -05:00
return NULL; // return superfluous
2000-09-18 16:07:07 +00:00
}
OutlinerView* Outliner::GetView( size_t nIndex ) const
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS(Outliner,0);
return ( nIndex >= aViewList.size() ) ? NULL : aViewList[ nIndex ];
2000-09-18 16:07:07 +00:00
}
size_t Outliner::GetViewCount() const
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS(Outliner,0);
return aViewList.size();
2000-09-18 16:07:07 +00:00
}
void Outliner::ParagraphInsertedHdl()
{
DBG_CHKTHIS(Outliner,0);
if( !IsInUndo() )
aParaInsertedHdl.Call( this );
2000-09-18 16:07:07 +00:00
}
void Outliner::ParagraphRemovingHdl()
{
DBG_CHKTHIS(Outliner,0);
if( !IsInUndo() )
aParaRemovingHdl.Call( this );
2000-09-18 16:07:07 +00:00
}
void Outliner::DepthChangedHdl()
{
DBG_CHKTHIS(Outliner,0);
if( !IsInUndo() )
aDepthChangedHdl.Call( this );
2000-09-18 16:07:07 +00:00
}
ULONG Outliner::GetAbsPos( Paragraph* pPara )
{
DBG_CHKTHIS(Outliner,0);
DBG_ASSERT(pPara,"GetAbsPos:No Para");
2000-09-18 16:07:07 +00:00
return pParaList->GetAbsPos( pPara );
}
ULONG Outliner::GetParagraphCount() const
{
DBG_CHKTHIS(Outliner,0);
return pParaList->GetParagraphCount();
}
Paragraph* Outliner::GetParagraph( ULONG nAbsPos ) const
{
DBG_CHKTHIS(Outliner,0);
return pParaList->GetParagraph( nAbsPos );
}
BOOL Outliner::HasChilds( Paragraph* pParagraph ) const
{
DBG_CHKTHIS(Outliner,0);
return pParaList->HasChilds( pParagraph );
}
BOOL Outliner::ImplHasBullet( USHORT nPara ) const
{
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
return GetNumberFormat(nPara) != 0;
2000-09-18 16:07:07 +00:00
}
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
const SvxNumberFormat* Outliner::GetNumberFormat( USHORT nPara ) const
{
2001-08-23 13:39:24 +00:00
const SvxNumberFormat* pFmt = NULL;
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
Paragraph* pPara = pParaList->GetParagraph( nPara );
if (pPara == NULL)
return NULL;
sal_Int16 nDepth = pPara? pPara->GetDepth() : -1;
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
if( nDepth >= 0 )
2001-08-23 13:39:24 +00:00
{
const SvxNumBulletItem& rNumBullet = (const SvxNumBulletItem&) pEditEngine->GetParaAttrib( nPara, EE_PARA_NUMBULLET );
if ( rNumBullet.GetNumRule()->GetLevelCount() > nDepth )
pFmt = rNumBullet.GetNumRule()->Get( nDepth );
}
2001-08-23 13:39:24 +00:00
return pFmt;
}
2000-09-18 16:07:07 +00:00
Size Outliner::ImplGetBulletSize( USHORT nPara )
{
Paragraph* pPara = pParaList->GetParagraph( nPara );
if (!pPara)
return Size();
2000-09-18 16:07:07 +00:00
if( pPara->aBulSize.Width() == -1 )
{
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
const SvxNumberFormat* pFmt = GetNumberFormat( nPara );
2000-09-18 16:07:07 +00:00
DBG_ASSERT( pFmt, "ImplGetBulletSize - no Bullet!" );
if ( pFmt->GetNumberingType() == SVX_NUM_NUMBER_NONE )
{
pPara->aBulSize = Size( 0, 0 );
}
else if( pFmt->GetNumberingType() != SVX_NUM_BITMAP )
2000-09-18 16:07:07 +00:00
{
String aBulletText = ImplGetBulletText( nPara );
OutputDevice* pRefDev = pEditEngine->GetRefDevice();
Font aBulletFont( ImpCalcBulletFont( nPara ) );
Font aRefFont( pRefDev->GetFont());
pRefDev->SetFont( aBulletFont );
pPara->aBulSize.Width() = pRefDev->GetTextWidth( aBulletText );
pPara->aBulSize.Height() = pRefDev->GetTextHeight();
pRefDev->SetFont( aRefFont );
}
else
{
pPara->aBulSize = OutputDevice::LogicToLogic( pFmt->GetGraphicSize(), MAP_100TH_MM, pEditEngine->GetRefDevice()->GetMapMode() );
}
}
return pPara->aBulSize;
}
void Outliner::ImplCheckParagraphs( USHORT nStart, USHORT nEnd )
{
DBG_CHKTHIS( Outliner, 0 );
2010-10-04 16:20:36 +02:00
// i100014#
// assure that the following for-loop does not loop forever
CWS-TOOLING: integrate CWS dr68 2009-06-19 17:43:48 +0200 oc r273175 : #i102946# some lines for new dialog added 2009-06-19 14:17:45 +0200 oc r273158 : #i102946# three lines added 2009-05-19 11:56:14 +0200 dr r272065 : #i99677# wrong attribute name 2009-05-18 18:37:05 +0200 dr r272045 : #i10000# suncc warning 2009-05-05 16:46:13 +0200 dr r271536 : #i10000# adoptions after rebase to master containing dr67 2009-05-05 16:01:19 +0200 dr r271530 : #i10000# adoptions after rebase to master containing dr67 2009-05-04 14:20:39 +0200 dr r271453 : CWS-TOOLING: rebase CWS dr68 to trunk@271427 (milestone: DEV300:m47) 2009-04-28 17:01:14 +0200 dr r271332 : CWS-TOOLING: rebase CWS dr68 to trunk@270723 (milestone: DEV300:m46) 2009-04-23 12:21:40 +0200 dr r271149 : #i100688# missing checkins 2009-04-23 12:18:16 +0200 dr r271147 : #i100978# relations path handling 2009-04-22 19:25:45 +0200 nn r271136 : #i49491# show navigator for double click on document position status bar control 2009-04-22 11:28:36 +0200 nn r271085 : #i60401# small text change 2009-04-21 16:53:23 +0200 dr r271044 : #i10000# missing dtor 2009-04-20 13:39:25 +0200 nn r270977 : #i60401# add dialog to extend sort range (patch from maoyg) 2009-04-08 12:11:08 +0200 dr r270630 : #i100943# prevent assertion when loading chart with empty category ranges 2009-04-07 19:03:00 +0200 dr r270609 : #i100688# missing bits for OLE 2009-04-07 17:14:06 +0200 dr r270605 : ported fix for #i100710# 2009-04-07 17:12:50 +0200 dr r270604 : #i10000# wae 2009-04-07 15:31:55 +0200 dr r270598 : import system colors moved to FilterBase class, more rework on fill and color contexts 2009-04-06 15:00:03 +0200 dr r270552 : #i99677# prevent recursive loading of the current document 2009-04-03 18:28:42 +0200 dr r270515 : added import of brightness/contrast and mono/grayscale color effects for image shapes 2009-04-03 17:36:03 +0200 dr r270509 : cache already imported embedded graphics 2009-04-03 16:46:34 +0200 dr r270500 : more rework on bitmap fill and graphic object handling 2009-03-31 12:28:10 +0200 dr r270271 : #i10000# unxlngi6 wae 2009-03-31 09:04:10 +0200 dr r270261 : CWS-TOOLING: rebase CWS dr68 to trunk@270033 (milestone: DEV300:m45) 2009-03-30 17:42:05 +0200 dr r270249 : #i91122# add missing doc 2009-03-30 17:37:08 +0200 dr r270248 : #i91122# add missing doc 2009-03-30 16:59:15 +0200 dr r270241 : #i99677# add import of ActiveX scrollbar controls 2009-03-30 14:30:36 +0200 dr r270230 : #i91122# missing/wrong documentation 2009-03-30 13:03:38 +0200 dr r270220 : #i99677# add import of ActiveX combobox and spinbutton controls 2009-03-27 11:46:59 +0100 dr r270144 : #i99677# import ActiveX listbox controls (Forms.ListBox.1) 2009-03-26 19:58:00 +0100 dr r270104 : #i99677# move more OLE import code into ole submodule 2009-03-26 15:15:02 +0100 dr r270082 : #i100546# add import of chart bitmap fills, add import of X/Y offset in tiled bitmap fills of all shapes 2009-03-25 12:54:59 +0100 dr r270018 : #i99677# import ActiveX edit text control (Forms.TextBox.1) 2009-03-24 10:59:29 +0100 dr r269921 : #i99677# moved import of OLE StdHlink to 'ole' submodule, added string import helpers to BinaryStreamBase class, removed implementation of ST_XString import from docprop in favour of the implementation in class AttributeList 2009-03-24 10:40:18 +0100 dr r269919 : #i100502# implicit precedence of '&&' was intended 2009-03-24 10:18:29 +0100 dr r269917 : #i100502# missing parentheses 2009-03-23 15:17:48 +0100 dr r269876 : #i99677# more code reorg, added graphic helper and OLE helper object per filter, added OLE/control import to PPTX/XLSX filter, moved helpers from XmlFilterBase to FilterBase 2009-03-19 12:45:20 +0100 dr r269740 : #i99677# interface changes in oox 2009-03-18 15:51:50 +0100 dr r269683 : #i99677# improved relation handling (internal/external), added preprocessor for VML streams to eat MS specific instructions, added OCX ToggleButton/OptionButton import, added DIB import for BIFF (page background picture, lots of other minor improvements 2009-03-16 15:25:30 +0100 dr r269551 : #i99677# import excel form control client data (printable, cell link) 2009-03-13 18:37:17 +0100 dr r269494 : #i99677# import image controls and check boxes 2009-03-12 15:08:18 +0100 dr r269420 : #i10000# rebase problems 2009-03-12 14:43:09 +0100 dr r269418 : #i10000# rebase problems 2009-03-12 14:42:41 +0100 dr r269417 : #i10000# missing delivered header 2009-03-12 13:57:06 +0100 dr r269405 : #i10000# typos 2009-03-12 12:58:52 +0100 dr r269391 : CWS-TOOLING: rebase CWS dr68 to trunk@269297 (milestone: DEV300:m43) 2009-03-12 11:11:46 +0100 dr r269374 : #i99677# first step to import BIFF8 page background 2009-03-12 10:21:53 +0100 dr r269364 : #i99677# rework of graphic import in entire filter, added import of AX Label controls 2009-03-09 16:44:50 +0100 dr r269202 : #i99677# import some formatting attributes of command buttons 2009-03-05 15:31:46 +0100 dr r268911 : #i99677# use VML shape client data to import excel VML shape positions 2009-03-05 11:39:48 +0100 dr r268888 : #i99677# create UNO control shapes from VML control shapes 2009-03-05 11:38:59 +0100 dr r268886 : #i99677# change attribute Shapes to DrawPage for import of embedded form controls 2009-03-05 11:30:40 +0100 dr r268885 : #i99677# change attribute Shapes to DrawPage for import of embedded form controls 2009-03-04 18:46:05 +0100 dr r268860 : adapt namespace ids according to oox 2009-03-04 18:43:49 +0100 dr r268859 : #i99677# more VML import rework 2009-03-03 13:38:36 +0100 dr r268721 : #i99677# more cleanup for VML filter 2009-03-03 13:13:15 +0100 dr r268719 : #i99807# do not iterate beyond end of std::list 2009-03-02 11:55:49 +0100 dr r268644 : add ST_XString support (encoded characters in attribute values) 2009-02-26 17:07:18 +0100 dr r268542 : #i99677# first steps of ax control import: dummy AX base classes, reimplement VML import (hopefully without breaking anything), register embedded AX controls at VML drawing 2009-02-23 17:43:50 +0100 dr r268365 : #i99426# remaining work on scenario import 2009-02-19 16:56:25 +0100 dr r268295 : #i99426# base implementations for scenarios import
2009-07-15 14:57:49 +00:00
for ( USHORT n = nStart; n < nEnd; n++ )
2000-09-18 16:07:07 +00:00
{
Paragraph* pPara = pParaList->GetParagraph( n );
CWS-TOOLING: integrate CWS tl66 2009-05-15 12:28:55 +0200 tl r271932 : #i91812# include fixed 2009-05-07 16:52:41 +0200 tl r271680 : #i97200# one more MathML export problem to fix 2009-05-05 08:33:29 +0200 tl r271494 : #i99401# positiv user-dicts vs negativ user-dicts 2009-05-04 14:14:03 +0200 tl r271452 : #i97200# warning free code; MathML 2.0 export 2009-05-04 13:26:30 +0200 tl r271448 : #i97200# write valid MathML 2.0 on export 2009-04-29 14:21:54 +0200 tl r271371 : #i97200# new MathML token 2009-04-29 11:12:07 +0200 tl r271360 : #i97200# inroducing separate files for import and export 2009-04-28 16:47:42 +0200 tl r271331 : #i97200# better MathML pretty printing 2009-04-28 11:21:57 +0200 tl r271315 : #i97200# MathML attributes and default namespace for MathML 2009-04-28 11:21:24 +0200 tl r271314 : #i97200# MathML attributes and default namespace for MathML 2009-04-23 12:44:18 +0200 tl r271154 : #i97200# math.dtd removed 2009-04-23 12:31:56 +0200 tl r271151 : #i97200# MathML: don't use namespace on attributes 2009-04-22 13:21:11 +0200 tl r271099 : warning-free code 2009-04-22 12:20:13 +0200 tl r271092 : #i100757# loop fixed 2009-04-22 11:29:51 +0200 tl r271086 : #97327# adding mongolian fingerprint for language guessing 2009-04-22 11:25:56 +0200 tl r271083 : #97327# adding mongolian fingerprint for language guessing 2009-04-21 10:39:21 +0200 tl r271025 : #99599# code fix for LRE/RLE embedding 2009-04-20 16:36:33 +0200 tl r270992 : #i99604# HasDigits fixed 2009-04-20 14:44:19 +0200 tl r270985 : #i99604# warning-free code for Windows 2009-04-20 13:48:13 +0200 tl r270980 : #i99604# HasDigits fix for non-ASCII characters 2009-04-20 13:47:50 +0200 tl r270979 : #i99604# HasDigits fix for non-ASCII characters 2009-04-20 12:28:15 +0200 tl r270973 : warning-free code after merging 2009-04-20 10:16:19 +0200 tl r270964 : warning-free code after merging 2009-04-17 14:43:36 +0200 tl r270948 : #i96846# 2009-04-16 13:09:15 +0200 tl r270883 : CWS-TOOLING: rebase CWS tl66 to trunk@270723 (milestone: DEV300:m46) 2009-04-14 14:34:08 +0200 tl r270770 : #101067# warning-free code 2009-04-02 09:07:44 +0200 tl r270368 : #i100757# performance patch for start-up (initialize language guessing on demand only) 2009-03-11 10:37:59 +0100 tl r269301 : #i100083# fixed system dictionary lookup 2009-03-06 13:10:23 +0100 tl r268998 : warning-free code for Windows non-pro 2009-02-23 14:01:23 +0100 tl r268355 : #i99401# winning rules for user-dictionaries changed 2009-02-19 14:05:57 +0100 tl r268281 : #i98644# suggestion improvement when first checker does not know any suggestions 2009-02-19 14:05:02 +0100 tl r268280 : #i98644# suggestion improvement when first checker does not know any suggestions 2009-02-19 13:58:51 +0100 tl r268279 : #i98644# suggestion improvement when first checker does not know any suggestions 2009-02-19 11:38:03 +0100 tl r268266 : #i98644# suggestion improvement when first checker does not know any suggestions 2009-02-12 11:58:34 +0100 tl r267642 : #i96846# some properties declared as maybevoid 2009-02-06 12:43:55 +0100 tl r267454 : #i98644# provide sugestions from secondary spell checkers if the primary does not provide ones 2009-02-05 13:02:26 +0100 tl r267418 : #i98880# a bit clean-up in the grammar checking framework 2009-02-04 12:15:37 +0100 tl r267363 : #i91812# remove unused/duplicate code 2009-02-04 12:09:34 +0100 tl r267362 : #i91812# remove unused/duplicate code 2009-02-04 11:07:57 +0100 tl r267355 : #i91812# remove unused code 2009-02-04 11:06:48 +0100 tl r267354 : #i91812# remove unused code 2009-02-03 14:52:43 +0100 tl r267331 : #i91812# remove unused code 2009-02-03 14:26:00 +0100 tl r267324 : #i91198# adding fingerprint for luxembourgish 2009-02-03 14:20:58 +0100 tl r267323 : #i91198# adding fingerprint for luxembourgish 2009-02-03 14:18:33 +0100 tl r267322 : #i91198# adding fingerprint for luxembourgish 2009-02-03 13:56:39 +0100 tl r267319 : #i91812# remove unused code 2009-02-03 12:41:50 +0100 tl r267314 : #i48400# auto-spellcheck improvement when deleting wrong chars 2009-02-03 11:48:51 +0100 tl r267310 : #i91812# remove unused code 2009-02-03 11:14:29 +0100 tl r267307 : warning free code 2009-02-03 10:45:21 +0100 tl r267306 : #i91812# remove unused code 2009-02-03 10:37:04 +0100 tl r267304 : #i33387# name change for 'View/Selection' 2009-02-03 10:36:17 +0100 tl r267303 : #i33387# name change for 'View/Selection' 2009-02-03 10:32:12 +0100 tl r267302 : #i30642# spelling error in context menu fixed 2009-02-03 10:27:34 +0100 tl r267301 : #i92210# remove unused code types.cxx cfgitem.*
2009-05-19 09:31:27 +00:00
if (pPara)
{
pPara->Invalidate();
CWS-TOOLING: integrate CWS aw074_DEV300 2009-07-06 13:21:50 +0200 aw r273737 : CWS-TOOLING: rebase CWS aw074 to branches/OOO310@273700 (milestone: OOO310:m15) 2009-07-06 11:12:35 +0200 aw r273728 : #i102637# corrected condition to add gray frame to page visualisation objects 2009-07-03 14:43:00 +0200 aw r273702 : #i102380# always swap n GrafObjects on MasterPages synchronously 2009-07-03 12:14:57 +0200 aw r273686 : #i102548# corrected SdrPathPrimitive2D's usage of unit polygon 2009-07-02 16:06:16 +0200 aw r273662 : #i103255# added control when to show the draft graphic visualisation (in VOC, of course) and when not. Changed text visualisation to BlockText 2009-07-01 17:36:55 +0200 aw r273609 : #i103116# clear GaphicLink for interaction clone of graphic objets 2009-07-01 16:42:09 +0200 aw r273601 : #i101491# corrected some minor glitches in line geometry creation 2009-06-30 18:47:44 +0200 aw r273532 : #i102380# committed the cleanups/additions for the fix 2009-06-26 13:16:17 +0200 aw r273404 : #i101491# finetuning changes 2009-06-26 13:15:57 +0200 aw r273403 : #i101491# finetuning changes 2009-06-25 16:31:26 +0200 aw r273387 : #i101491# first version checkin for linux/mac tests 2009-06-25 16:31:04 +0200 aw r273386 : #i101491# first version checkin for linux/mac tests 2009-06-24 15:35:05 +0200 aw r273350 : #i101734# corrected VclMetafileProcessor2D::impTryToCreateSvtGraphicStroke to use the current ObjectTransformation 2009-06-24 15:01:58 +0200 aw r273348 : #i101811# added ViewInformation2D to renderChartPrimitive2D to allow embedding of object transformation to target MapMode 2009-06-24 12:27:05 +0200 aw r273328 : #i101980# use a hairline LineWitdth for SdrObject::TakeContour() calculation (like the old implementation did) 2009-06-24 11:29:43 +0200 aw r273321 : #i101781# corrected creation fallback for FullDrag for circle objects 2009-06-23 17:26:58 +0200 aw r273300 : #i101556# made primitive text attributes take versioned base text attribute sets into account
2009-07-30 10:40:37 +00:00
ImplCalcBulletText( n, FALSE, FALSE );
CWS-TOOLING: integrate CWS tl66 2009-05-15 12:28:55 +0200 tl r271932 : #i91812# include fixed 2009-05-07 16:52:41 +0200 tl r271680 : #i97200# one more MathML export problem to fix 2009-05-05 08:33:29 +0200 tl r271494 : #i99401# positiv user-dicts vs negativ user-dicts 2009-05-04 14:14:03 +0200 tl r271452 : #i97200# warning free code; MathML 2.0 export 2009-05-04 13:26:30 +0200 tl r271448 : #i97200# write valid MathML 2.0 on export 2009-04-29 14:21:54 +0200 tl r271371 : #i97200# new MathML token 2009-04-29 11:12:07 +0200 tl r271360 : #i97200# inroducing separate files for import and export 2009-04-28 16:47:42 +0200 tl r271331 : #i97200# better MathML pretty printing 2009-04-28 11:21:57 +0200 tl r271315 : #i97200# MathML attributes and default namespace for MathML 2009-04-28 11:21:24 +0200 tl r271314 : #i97200# MathML attributes and default namespace for MathML 2009-04-23 12:44:18 +0200 tl r271154 : #i97200# math.dtd removed 2009-04-23 12:31:56 +0200 tl r271151 : #i97200# MathML: don't use namespace on attributes 2009-04-22 13:21:11 +0200 tl r271099 : warning-free code 2009-04-22 12:20:13 +0200 tl r271092 : #i100757# loop fixed 2009-04-22 11:29:51 +0200 tl r271086 : #97327# adding mongolian fingerprint for language guessing 2009-04-22 11:25:56 +0200 tl r271083 : #97327# adding mongolian fingerprint for language guessing 2009-04-21 10:39:21 +0200 tl r271025 : #99599# code fix for LRE/RLE embedding 2009-04-20 16:36:33 +0200 tl r270992 : #i99604# HasDigits fixed 2009-04-20 14:44:19 +0200 tl r270985 : #i99604# warning-free code for Windows 2009-04-20 13:48:13 +0200 tl r270980 : #i99604# HasDigits fix for non-ASCII characters 2009-04-20 13:47:50 +0200 tl r270979 : #i99604# HasDigits fix for non-ASCII characters 2009-04-20 12:28:15 +0200 tl r270973 : warning-free code after merging 2009-04-20 10:16:19 +0200 tl r270964 : warning-free code after merging 2009-04-17 14:43:36 +0200 tl r270948 : #i96846# 2009-04-16 13:09:15 +0200 tl r270883 : CWS-TOOLING: rebase CWS tl66 to trunk@270723 (milestone: DEV300:m46) 2009-04-14 14:34:08 +0200 tl r270770 : #101067# warning-free code 2009-04-02 09:07:44 +0200 tl r270368 : #i100757# performance patch for start-up (initialize language guessing on demand only) 2009-03-11 10:37:59 +0100 tl r269301 : #i100083# fixed system dictionary lookup 2009-03-06 13:10:23 +0100 tl r268998 : warning-free code for Windows non-pro 2009-02-23 14:01:23 +0100 tl r268355 : #i99401# winning rules for user-dictionaries changed 2009-02-19 14:05:57 +0100 tl r268281 : #i98644# suggestion improvement when first checker does not know any suggestions 2009-02-19 14:05:02 +0100 tl r268280 : #i98644# suggestion improvement when first checker does not know any suggestions 2009-02-19 13:58:51 +0100 tl r268279 : #i98644# suggestion improvement when first checker does not know any suggestions 2009-02-19 11:38:03 +0100 tl r268266 : #i98644# suggestion improvement when first checker does not know any suggestions 2009-02-12 11:58:34 +0100 tl r267642 : #i96846# some properties declared as maybevoid 2009-02-06 12:43:55 +0100 tl r267454 : #i98644# provide sugestions from secondary spell checkers if the primary does not provide ones 2009-02-05 13:02:26 +0100 tl r267418 : #i98880# a bit clean-up in the grammar checking framework 2009-02-04 12:15:37 +0100 tl r267363 : #i91812# remove unused/duplicate code 2009-02-04 12:09:34 +0100 tl r267362 : #i91812# remove unused/duplicate code 2009-02-04 11:07:57 +0100 tl r267355 : #i91812# remove unused code 2009-02-04 11:06:48 +0100 tl r267354 : #i91812# remove unused code 2009-02-03 14:52:43 +0100 tl r267331 : #i91812# remove unused code 2009-02-03 14:26:00 +0100 tl r267324 : #i91198# adding fingerprint for luxembourgish 2009-02-03 14:20:58 +0100 tl r267323 : #i91198# adding fingerprint for luxembourgish 2009-02-03 14:18:33 +0100 tl r267322 : #i91198# adding fingerprint for luxembourgish 2009-02-03 13:56:39 +0100 tl r267319 : #i91812# remove unused code 2009-02-03 12:41:50 +0100 tl r267314 : #i48400# auto-spellcheck improvement when deleting wrong chars 2009-02-03 11:48:51 +0100 tl r267310 : #i91812# remove unused code 2009-02-03 11:14:29 +0100 tl r267307 : warning free code 2009-02-03 10:45:21 +0100 tl r267306 : #i91812# remove unused code 2009-02-03 10:37:04 +0100 tl r267304 : #i33387# name change for 'View/Selection' 2009-02-03 10:36:17 +0100 tl r267303 : #i33387# name change for 'View/Selection' 2009-02-03 10:32:12 +0100 tl r267302 : #i30642# spelling error in context menu fixed 2009-02-03 10:27:34 +0100 tl r267301 : #i92210# remove unused code types.cxx cfgitem.*
2009-05-19 09:31:27 +00:00
}
2000-09-18 16:07:07 +00:00
}
}
void Outliner::SetRefDevice( OutputDevice* pRefDev )
{
DBG_CHKTHIS(Outliner,0);
pEditEngine->SetRefDevice( pRefDev );
for ( USHORT n = (USHORT) pParaList->GetParagraphCount(); n; )
{
Paragraph* pPara = pParaList->GetParagraph( --n );
pPara->Invalidate();
}
}
void Outliner::ParaAttribsChanged( USHORT nPara )
{
DBG_CHKTHIS(Outliner,0);
2011-02-16 16:34:02 -05:00
// The Outliner does not have an undo of its own, when paragraphs are
// separated/merged. When ParagraphInserted the attribute EE_PARA_OUTLLEVEL
// may not be set, this is however needed when the depth of the paragraph
// is to be determined.
2000-09-18 16:07:07 +00:00
if( pEditEngine->IsInUndo() )
{
if ( pParaList->GetParagraphCount() == pEditEngine->GetParagraphCount() )
{
Paragraph* pPara = pParaList->GetParagraph( nPara );
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
const SfxInt16Item& rLevel = (const SfxInt16Item&) pEditEngine->GetParaAttrib( nPara, EE_PARA_OUTLLEVEL );
if ( pPara && pPara->GetDepth() != rLevel.GetValue() )
2000-09-18 16:07:07 +00:00
{
pPara->SetDepth( rLevel.GetValue() );
ImplCalcBulletText( nPara, TRUE, TRUE );
}
}
}
}
void Outliner::StyleSheetChanged( SfxStyleSheet* pStyle )
{
DBG_CHKTHIS(Outliner,0);
2011-02-16 16:34:02 -05:00
// The EditEngine calls StyleSheetChanged also for derived styles.
// Here all the paragraphs, which had the said template, used to be
// hunted by a ImpRecalcParaAttribs, why?
// => only the Bullet-representation can really change...
2000-09-18 16:07:07 +00:00
USHORT nParas = (USHORT)pParaList->GetParagraphCount();
for( USHORT nPara = 0; nPara < nParas; nPara++ )
{
if ( pEditEngine->GetStyleSheet( nPara ) == pStyle )
{
ImplCheckNumBulletItem( nPara );
ImplCalcBulletText( nPara, FALSE, FALSE );
2011-02-16 16:34:02 -05:00
// EditEngine formats changed paragraphs before calling this method,
// so they are not reformatted now and use wrong bullet indent
pEditEngine->QuickMarkInvalid( ESelection( nPara, 0, nPara, 0 ) );
2000-09-18 16:07:07 +00:00
}
}
}
2002-07-24 12:18:20 +00:00
Rectangle Outliner::ImpCalcBulletArea( USHORT nPara, BOOL bAdjust, BOOL bReturnPaperPos )
2000-09-18 16:07:07 +00:00
{
2011-02-16 16:34:02 -05:00
// Bullet area within the paragraph ...
2000-09-18 16:07:07 +00:00
Rectangle aBulletArea;
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
const SvxNumberFormat* pFmt = GetNumberFormat( nPara );
2000-09-18 16:07:07 +00:00
if ( pFmt )
{
Point aTopLeft;
Size aBulletSize( ImplGetBulletSize( nPara ) );
BOOL bOutlineMode = ( pEditEngine->GetControlWord() & EE_CNTRL_OUTLINER ) != 0;
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
// the ODF attribut text:space-before which holds the spacing to add to the left of the label
const short nSpaceBefore = pFmt->GetAbsLSpace() + pFmt->GetFirstLineOffset();
2000-09-18 16:07:07 +00:00
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
const SvxLRSpaceItem& rLR = (const SvxLRSpaceItem&) pEditEngine->GetParaAttrib( nPara, bOutlineMode ? EE_PARA_OUTLLRSPACE : EE_PARA_LRSPACE );
aTopLeft.X() = rLR.GetTxtLeft() + rLR.GetTxtFirstLineOfst() + nSpaceBefore;
2000-09-18 16:07:07 +00:00
long nBulletWidth = Max( (long) -rLR.GetTxtFirstLineOfst(), (long) ((-pFmt->GetFirstLineOffset()) + pFmt->GetCharTextDistance()) );
2011-02-16 16:34:02 -05:00
if ( nBulletWidth < aBulletSize.Width() ) // The Bullet creates its space
2000-09-18 16:07:07 +00:00
nBulletWidth = aBulletSize.Width();
if ( bAdjust && !bOutlineMode )
2000-09-18 16:07:07 +00:00
{
2011-02-16 16:34:02 -05:00
// Adjust when centered or align right
2000-09-18 16:07:07 +00:00
const SvxAdjustItem& rItem = (const SvxAdjustItem&)pEditEngine->GetParaAttrib( nPara, EE_PARA_JUST );
if ( ( !pEditEngine->IsRightToLeft( nPara ) && ( rItem.GetAdjust() != SVX_ADJUST_LEFT ) ) ||
( pEditEngine->IsRightToLeft( nPara ) && ( rItem.GetAdjust() != SVX_ADJUST_RIGHT ) ) )
{
2000-09-18 16:07:07 +00:00
aTopLeft.X() = pEditEngine->GetFirstLineStartX( nPara ) - nBulletWidth;
}
2000-09-18 16:07:07 +00:00
}
2011-02-16 16:34:02 -05:00
// Vertical:
2000-09-18 16:07:07 +00:00
ParagraphInfos aInfos = pEditEngine->GetParagraphInfos( nPara );
if ( aInfos.bValid )
{
2011-02-16 16:34:02 -05:00
aTopLeft.Y() = /* aInfos.nFirstLineOffset + */ // nFirstLineOffset is already added to the StartPos (PaintBullet) from the EditEngine
aInfos.nFirstLineHeight - aInfos.nFirstLineTextHeight
+ aInfos.nFirstLineTextHeight / 2
- aBulletSize.Height() / 2;
2011-02-16 16:34:02 -05:00
// may prefer to print out on the baseline ...
if( ( pFmt->GetNumberingType() != SVX_NUM_NUMBER_NONE ) && ( pFmt->GetNumberingType() != SVX_NUM_BITMAP ) && ( pFmt->GetNumberingType() != SVX_NUM_CHAR_SPECIAL ) )
2000-09-18 16:07:07 +00:00
{
Font aBulletFont( ImpCalcBulletFont( nPara ) );
if ( aBulletFont.GetCharSet() != RTL_TEXTENCODING_SYMBOL )
{
OutputDevice* pRefDev = pEditEngine->GetRefDevice();
Font aOldFont = pRefDev->GetFont();
pRefDev->SetFont( aBulletFont );
FontMetric aMetric( pRefDev->GetFontMetric() );
2011-02-16 16:34:02 -05:00
// Leading on the first line ...
aTopLeft.Y() = /* aInfos.nFirstLineOffset + */ aInfos.nFirstLineMaxAscent;
2000-09-18 16:07:07 +00:00
aTopLeft.Y() -= aMetric.GetAscent();
pRefDev->SetFont( aOldFont );
}
}
}
// Horizontal:
if( pFmt->GetNumAdjust() == SVX_ADJUST_RIGHT )
{
aTopLeft.X() += nBulletWidth - aBulletSize.Width();
}
else if( pFmt->GetNumAdjust() == SVX_ADJUST_CENTER )
{
aTopLeft.X() += ( nBulletWidth - aBulletSize.Width() ) / 2;
}
2011-02-16 16:34:02 -05:00
if ( aTopLeft.X() < 0 ) // then push
2000-09-18 16:07:07 +00:00
aTopLeft.X() = 0;
aBulletArea = Rectangle( aTopLeft, aBulletSize );
}
2002-07-24 12:18:20 +00:00
if ( bReturnPaperPos )
{
Size aBulletSize( aBulletArea.GetSize() );
Point aBulletDocPos( aBulletArea.TopLeft() );
aBulletDocPos.Y() += pEditEngine->GetDocPosTopLeft( nPara ).Y();
Point aBulletPos( aBulletDocPos );
if ( IsVertical() )
{
aBulletPos.Y() = aBulletDocPos.X();
aBulletPos.X() = GetPaperSize().Width() - aBulletDocPos.Y();
// Rotate:
aBulletPos.X() -= aBulletSize.Height();
Size aSz( aBulletSize );
aBulletSize.Width() = aSz.Height();
aBulletSize.Height() = aSz.Width();
}
else if ( pEditEngine->IsRightToLeft( nPara ) )
{
aBulletPos.X() = GetPaperSize().Width() - aBulletDocPos.X() - aBulletSize.Width();
}
aBulletArea = Rectangle( aBulletPos, aBulletSize );
}
2000-09-18 16:07:07 +00:00
return aBulletArea;
}
void Outliner::ExpandHdl()
{
DBG_CHKTHIS(Outliner,0);
aExpandHdl.Call( this );
}
2002-02-28 17:51:59 +00:00
EBulletInfo Outliner::GetBulletInfo( USHORT nPara )
{
EBulletInfo aInfo;
aInfo.nParagraph = nPara;
aInfo.bVisible = ImplHasBullet( nPara );
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
const SvxNumberFormat* pFmt = GetNumberFormat( nPara );
2002-02-28 17:51:59 +00:00
aInfo.nType = pFmt ? pFmt->GetNumberingType() : 0;
2002-04-25 09:19:06 +00:00
if( pFmt )
2002-02-28 17:51:59 +00:00
{
2002-04-25 09:19:06 +00:00
if( pFmt->GetNumberingType() != SVX_NUM_BITMAP )
{
aInfo.aText = ImplGetBulletText( nPara );
if( pFmt->GetBulletFont() )
aInfo.aFont = *pFmt->GetBulletFont();
2002-04-25 09:19:06 +00:00
}
else if ( pFmt->GetBrush()->GetGraphicObject() )
{
aInfo.aGraphic = pFmt->GetBrush()->GetGraphicObject()->GetGraphic();
}
2002-02-28 17:51:59 +00:00
}
if ( aInfo.bVisible )
{
2002-07-24 12:18:20 +00:00
aInfo.aBounds = ImpCalcBulletArea( nPara, TRUE, TRUE );
2002-02-28 17:51:59 +00:00
}
return aInfo;
}
2000-09-18 16:07:07 +00:00
XubString Outliner::GetText( Paragraph* pParagraph, ULONG nCount ) const
{
DBG_CHKTHIS(Outliner,0);
XubString aText;
USHORT nStartPara = (USHORT) pParaList->GetAbsPos( pParagraph );
for ( USHORT n = 0; n < nCount; n++ )
{
aText += pEditEngine->GetText( nStartPara + n );
if ( (n+1) < (USHORT)nCount )
aText += '\n';
}
return aText;
}
void Outliner::Remove( Paragraph* pPara, ULONG nParaCount )
{
DBG_CHKTHIS(Outliner,0);
ULONG nPos = pParaList->GetAbsPos( pPara );
if( !nPos && ( nParaCount >= pParaList->GetParagraphCount() ) )
{
Clear();
}
else
{
for( USHORT n = 0; n < (USHORT)nParaCount; n++ )
pEditEngine->RemoveParagraph( (USHORT) nPos );
}
}
void Outliner::StripPortions()
{
DBG_CHKTHIS(Outliner,0);
bStrippingPortions = TRUE;
pEditEngine->StripPortions();
bStrippingPortions = FALSE;
}
void Outliner::DrawingText( const Point& rStartPos, const XubString& rText, USHORT nTextStart, USHORT nTextLen, const sal_Int32* pDXArray,const SvxFont& rFont,
USHORT nPara, USHORT nIndex, BYTE nRightToLeft,
const EEngineData::WrongSpellVector* pWrongSpellVector,
const SvxFieldData* pFieldData,
bool bEndOfLine,
bool bEndOfParagraph,
bool bEndOfBullet,
const ::com::sun::star::lang::Locale* pLocale,
const Color& rOverlineColor,
const Color& rTextLineColor)
2002-05-03 11:42:09 +00:00
{
DBG_CHKTHIS(Outliner,0);
if(aDrawPortionHdl.IsSet())
{
DrawPortionInfo aInfo( rStartPos, rText, nTextStart, nTextLen, rFont, nPara, nIndex, pDXArray, pWrongSpellVector,
pFieldData, pLocale, rOverlineColor, rTextLineColor, nRightToLeft, false, 0, bEndOfLine, bEndOfParagraph, bEndOfBullet);
aDrawPortionHdl.Call( &aInfo );
}
}
void Outliner::DrawingTab( const Point& rStartPos, long nWidth, const String& rChar, const SvxFont& rFont,
USHORT nPara, xub_StrLen nIndex, BYTE nRightToLeft, bool bEndOfLine, bool bEndOfParagraph,
const Color& rOverlineColor, const Color& rTextLineColor)
{
if(aDrawPortionHdl.IsSet())
{
DrawPortionInfo aInfo( rStartPos, rChar, 0, rChar.Len(), rFont, nPara, nIndex, NULL, NULL,
NULL, NULL, rOverlineColor, rTextLineColor, nRightToLeft, true, nWidth, bEndOfLine, bEndOfParagraph, false);
aDrawPortionHdl.Call( &aInfo );
}
2002-05-03 11:42:09 +00:00
}
2000-09-18 16:07:07 +00:00
long Outliner::RemovingPagesHdl( OutlinerView* pView )
{
DBG_CHKTHIS(Outliner,0);
return aRemovingPagesHdl.IsSet() ? aRemovingPagesHdl.Call( pView ) : TRUE;
}
BOOL Outliner::ImpCanDeleteSelectedPages( OutlinerView* pCurView, USHORT _nFirstPage, USHORT nPages )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS(Outliner,0);
nDepthChangedHdlPrevDepth = nPages;
mnFirstSelPage = _nFirstPage;
pHdlParagraph = 0;
2000-09-18 16:07:07 +00:00
return (BOOL)RemovingPagesHdl( pCurView );
}
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
SfxItemSet Outliner::GetParaAttribs( USHORT nPara )
2000-09-18 16:07:07 +00:00
{
DBG_CHKTHIS(Outliner,0);
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
return pEditEngine->GetParaAttribs( nPara );
2000-09-18 16:07:07 +00:00
}
IMPL_LINK( Outliner, ParaVisibleStateChangedHdl, Paragraph*, pPara )
{
DBG_CHKTHIS(Outliner,0);
ULONG nPara = pParaList->GetAbsPos( pPara );
pEditEngine->ShowParagraph( (USHORT)nPara, pPara->IsVisible() );
return 0;
}
IMPL_LINK( Outliner, BeginMovingParagraphsHdl, MoveParagraphsInfo*, EMPTYARG )
{
DBG_CHKTHIS(Outliner,0);
if( !IsInUndo() )
GetBeginMovingHdl().Call( this );
return 0;
}
2001-11-14 10:01:23 +00:00
IMPL_LINK( Outliner, BeginPasteOrDropHdl, PasteOrDropInfos*, pInfos )
{
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
UndoActionStart( EDITUNDO_DRAGANDDROP );
maBeginPasteOrDropHdl.Call(pInfos);
2001-11-14 10:01:23 +00:00
return 0;
}
IMPL_LINK( Outliner, EndPasteOrDropHdl, PasteOrDropInfos*, pInfos )
{
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
bPasting = FALSE;
ImpTextPasted( pInfos->nStartPara, pInfos->nEndPara - pInfos->nStartPara + 1 );
maEndPasteOrDropHdl.Call( pInfos );
UndoActionEnd( EDITUNDO_DRAGANDDROP );
2001-11-14 10:01:23 +00:00
return 0;
}
IMPL_LINK( Outliner, EndMovingParagraphsHdl, MoveParagraphsInfo*, pInfos )
{
DBG_CHKTHIS(Outliner,0);
pParaList->MoveParagraphs( pInfos->nStartPara, pInfos->nDestPara, pInfos->nEndPara - pInfos->nStartPara + 1 );
USHORT nChangesStart = Min( pInfos->nStartPara, pInfos->nDestPara );
USHORT nParas = (USHORT)pParaList->GetParagraphCount();
for ( USHORT n = nChangesStart; n < nParas; n++ )
ImplCalcBulletText( n, FALSE, FALSE );
if( !IsInUndo() )
aEndMovingHdl.Call( this );
return 0;
}
CWS-TOOLING: integrate CWS impress177 2009-10-07 13:02:12 +0200 sj r276751 : #i104579# fixed horz and vert adjustment for master styles (excluding notes master) 2009-10-06 18:09:14 +0200 sj r276724 : #i104579# fixed horz and vert adjustment for master styles 2009-10-05 15:02:38 +0200 sj r276679 : #i104685# fixed text color problem 2009-10-02 14:01:22 +0200 aw r276641 : #i105508# added own flag for ClipOnBounds to SdrBlockTextPrimitive2D and the helper createTextPrimitive; adapted usages; corrected VerticalText stuff; corrected ClipOnBounds for CustomShapes 2009-09-30 11:55:44 +0200 cl r276550 : CWS-TOOLING: rebase CWS impress177 to trunk@276429 (milestone: DEV300:m60) 2009-09-28 17:57:37 +0200 cl r276498 : #i94900# after a paste special make sure the stylesheets for outline shapes are correct 2009-09-24 17:36:29 +0200 af r276425 : #i103464# Restore device more reliably. 2009-09-24 12:29:31 +0200 sj r276417 : #i104685# fixed text color propblem 2009-09-22 16:48:06 +0200 sj r276360 : #i104682# fixed table border line thickness 2009-09-22 16:46:29 +0200 sj r276359 : #i104682# fixed table border line thickness 2009-09-22 10:29:30 +0200 sj r276346 : #104579# fixed horz and vert adjustment for master styles 2009-09-21 14:18:29 +0200 af r276330 : #i100905# Fixed crash when region is split into bands. 2009-09-15 15:44:30 +0200 cl r276181 : #i103179# always hide presentation shapes from master page if rendered as slide background 2009-09-15 10:44:52 +0200 cl r276155 : #i104579# return correct IsEmptyPresObj state 2009-09-14 16:51:41 +0200 cl r276132 : #i96538# restored OOo 3.0 numbering behaviour
2009-10-14 15:14:05 +00:00
static bool isSameNumbering( const SvxNumberFormat& rN1, const SvxNumberFormat& rN2 )
{
if( rN1.GetNumberingType() != rN2.GetNumberingType() )
return false;
if( rN1.GetNumStr(1) != rN2.GetNumStr(1) )
return false;
if( (rN1.GetPrefix() != rN2.GetPrefix()) || (rN1.GetSuffix() != rN2.GetSuffix()) )
return false;
return true;
}
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
sal_uInt16 Outliner::ImplGetNumbering( USHORT nPara, const SvxNumberFormat* pParaFmt )
{
sal_uInt16 nNumber = pParaFmt->GetStart() - 1;
Paragraph* pPara = pParaList->GetParagraph( nPara );
const sal_Int16 nParaDepth = pPara->GetDepth();
do
{
pPara = pParaList->GetParagraph( nPara );
const sal_Int16 nDepth = pPara->GetDepth();
CWS-TOOLING: integrate CWS impress177 2009-10-07 13:02:12 +0200 sj r276751 : #i104579# fixed horz and vert adjustment for master styles (excluding notes master) 2009-10-06 18:09:14 +0200 sj r276724 : #i104579# fixed horz and vert adjustment for master styles 2009-10-05 15:02:38 +0200 sj r276679 : #i104685# fixed text color problem 2009-10-02 14:01:22 +0200 aw r276641 : #i105508# added own flag for ClipOnBounds to SdrBlockTextPrimitive2D and the helper createTextPrimitive; adapted usages; corrected VerticalText stuff; corrected ClipOnBounds for CustomShapes 2009-09-30 11:55:44 +0200 cl r276550 : CWS-TOOLING: rebase CWS impress177 to trunk@276429 (milestone: DEV300:m60) 2009-09-28 17:57:37 +0200 cl r276498 : #i94900# after a paste special make sure the stylesheets for outline shapes are correct 2009-09-24 17:36:29 +0200 af r276425 : #i103464# Restore device more reliably. 2009-09-24 12:29:31 +0200 sj r276417 : #i104685# fixed text color propblem 2009-09-22 16:48:06 +0200 sj r276360 : #i104682# fixed table border line thickness 2009-09-22 16:46:29 +0200 sj r276359 : #i104682# fixed table border line thickness 2009-09-22 10:29:30 +0200 sj r276346 : #104579# fixed horz and vert adjustment for master styles 2009-09-21 14:18:29 +0200 af r276330 : #i100905# Fixed crash when region is split into bands. 2009-09-15 15:44:30 +0200 cl r276181 : #i103179# always hide presentation shapes from master page if rendered as slide background 2009-09-15 10:44:52 +0200 cl r276155 : #i104579# return correct IsEmptyPresObj state 2009-09-14 16:51:41 +0200 cl r276132 : #i96538# restored OOo 3.0 numbering behaviour
2009-10-14 15:14:05 +00:00
// ignore paragraphs that are below our paragraph or have no numbering
if( (nDepth > nParaDepth) || (nDepth == -1) )
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
continue;
// stop on paragraphs that are above our paragraph
if( nDepth < nParaDepth )
break;
const SvxNumberFormat* pFmt = GetNumberFormat( nPara );
CWS-TOOLING: integrate CWS impress177 2009-10-07 13:02:12 +0200 sj r276751 : #i104579# fixed horz and vert adjustment for master styles (excluding notes master) 2009-10-06 18:09:14 +0200 sj r276724 : #i104579# fixed horz and vert adjustment for master styles 2009-10-05 15:02:38 +0200 sj r276679 : #i104685# fixed text color problem 2009-10-02 14:01:22 +0200 aw r276641 : #i105508# added own flag for ClipOnBounds to SdrBlockTextPrimitive2D and the helper createTextPrimitive; adapted usages; corrected VerticalText stuff; corrected ClipOnBounds for CustomShapes 2009-09-30 11:55:44 +0200 cl r276550 : CWS-TOOLING: rebase CWS impress177 to trunk@276429 (milestone: DEV300:m60) 2009-09-28 17:57:37 +0200 cl r276498 : #i94900# after a paste special make sure the stylesheets for outline shapes are correct 2009-09-24 17:36:29 +0200 af r276425 : #i103464# Restore device more reliably. 2009-09-24 12:29:31 +0200 sj r276417 : #i104685# fixed text color propblem 2009-09-22 16:48:06 +0200 sj r276360 : #i104682# fixed table border line thickness 2009-09-22 16:46:29 +0200 sj r276359 : #i104682# fixed table border line thickness 2009-09-22 10:29:30 +0200 sj r276346 : #104579# fixed horz and vert adjustment for master styles 2009-09-21 14:18:29 +0200 af r276330 : #i100905# Fixed crash when region is split into bands. 2009-09-15 15:44:30 +0200 cl r276181 : #i103179# always hide presentation shapes from master page if rendered as slide background 2009-09-15 10:44:52 +0200 cl r276155 : #i104579# return correct IsEmptyPresObj state 2009-09-14 16:51:41 +0200 cl r276132 : #i96538# restored OOo 3.0 numbering behaviour
2009-10-14 15:14:05 +00:00
if( pFmt == 0 )
continue; // ignore paragraphs without bullets
// check if numbering is the same
if( !isSameNumbering( *pFmt, *pParaFmt ) )
break;
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
const SfxBoolItem& rBulletState = (const SfxBoolItem&) pEditEngine->GetParaAttrib( nPara, EE_PARA_BULLETSTATE );
if( rBulletState.GetValue() )
nNumber += 1;
// same depth, same number format, check for restart
const sal_Int16 nNumberingStartValue = pPara->GetNumberingStartValue();
if( (nNumberingStartValue != -1) || pPara->IsParaIsNumberingRestart() )
{
if( nNumberingStartValue != -1 )
nNumber += nNumberingStartValue - 1;
break;
}
}
while( nPara-- );
return nNumber;
}
2000-09-18 16:07:07 +00:00
void Outliner::ImplCalcBulletText( USHORT nPara, BOOL bRecalcLevel, BOOL bRecalcChilds )
{
DBG_CHKTHIS(Outliner,0);
Paragraph* pPara = pParaList->GetParagraph( nPara );
USHORT nRelPos = 0xFFFF;
while ( pPara )
{
XubString aBulletText;
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
const SvxNumberFormat* pFmt = GetNumberFormat( nPara );
if( pFmt && ( pFmt->GetNumberingType() != SVX_NUM_BITMAP ) )
2000-09-18 16:07:07 +00:00
{
aBulletText += pFmt->GetPrefix();
2001-03-29 14:12:06 +00:00
if( pFmt->GetNumberingType() == SVX_NUM_CHAR_SPECIAL )
{
aBulletText += pFmt->GetBulletChar();
}
else if( pFmt->GetNumberingType() != SVX_NUM_NUMBER_NONE )
2000-09-18 16:07:07 +00:00
{
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
aBulletText += pFmt->GetNumStr( ImplGetNumbering( nPara, pFmt ) );
2000-09-18 16:07:07 +00:00
}
aBulletText += pFmt->GetSuffix();
}
if( aBulletText != pPara->GetText() )
pPara->SetText( aBulletText );
pPara->nFlags &= (~PARAFLAG_SETBULLETTEXT);
if ( bRecalcLevel )
{
if ( nRelPos != 0xFFFF )
nRelPos++;
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
sal_Int16 nDepth = pPara->GetDepth();
2000-09-18 16:07:07 +00:00
pPara = pParaList->GetParagraph( ++nPara );
if ( !bRecalcChilds )
{
while ( pPara && ( pPara->GetDepth() > nDepth ) )
pPara = pParaList->GetParagraph( ++nPara );
}
if ( pPara && ( pPara->GetDepth() < nDepth ) )
pPara = NULL;
}
else
{
pPara = NULL;
}
}
}
void Outliner::Clear()
{
DBG_CHKTHIS(Outliner,0);
if( !bFirstParaIsEmpty )
{
2002-05-27 13:37:37 +00:00
ImplBlockInsertionCallbacks( TRUE );
2000-09-18 16:07:07 +00:00
pEditEngine->Clear();
pParaList->Clear( TRUE );
pParaList->Insert( new Paragraph( nMinDepth ), LIST_APPEND );
bFirstParaIsEmpty = TRUE;
2002-05-27 13:37:37 +00:00
ImplBlockInsertionCallbacks( FALSE );
2000-09-18 16:07:07 +00:00
}
else
{
Paragraph* pPara = pParaList->GetParagraph( 0 );
if(pPara)
pPara->SetDepth( nMinDepth );
2000-09-18 16:07:07 +00:00
}
}
void Outliner::SetFlatMode( BOOL bFlat )
{
DBG_CHKTHIS(Outliner,0);
if( bFlat != pEditEngine->IsFlatMode() )
{
for ( USHORT nPara = (USHORT)pParaList->GetParagraphCount(); nPara; )
pParaList->GetParagraph( --nPara )->aBulSize.Width() = -1;
pEditEngine->SetFlatMode( bFlat );
}
}
String Outliner::ImplGetBulletText( USHORT nPara )
{
String aRes;
2000-09-18 16:07:07 +00:00
Paragraph* pPara = pParaList->GetParagraph( nPara );
if (pPara)
{
2011-02-16 16:34:02 -05:00
// Enable optimization again ...
2000-09-18 16:07:07 +00:00
// if( pPara->nFlags & PARAFLAG_SETBULLETTEXT )
ImplCalcBulletText( nPara, FALSE, FALSE );
aRes = pPara->GetText();
}
return aRes;
2000-09-18 16:07:07 +00:00
}
// this is needed for StarOffice Api
void Outliner::SetLevelDependendStyleSheet( USHORT nPara )
{
SfxItemSet aOldAttrs( pEditEngine->GetParaAttribs( nPara ) );
ImplSetLevelDependendStyleSheet( nPara );
pEditEngine->SetParaAttribs( nPara, aOldAttrs );
}
2002-05-27 13:37:37 +00:00
SV_IMPL_PTRARR( NotifyList, EENotifyPtr );
2002-05-27 13:37:37 +00:00
void Outliner::ImplBlockInsertionCallbacks( BOOL b )
{
if ( b )
2002-05-27 13:37:37 +00:00
{
bBlockInsCallback++;
}
else
{
DBG_ASSERT( bBlockInsCallback, "ImplBlockInsertionCallbacks ?!" );
bBlockInsCallback--;
2002-05-27 13:37:37 +00:00
if ( !bBlockInsCallback )
{
// Call blocked notify events...
while ( pEditEngine->aNotifyCache.Count() )
2002-05-27 13:37:37 +00:00
{
EENotify* pNotify = pEditEngine->aNotifyCache[0];
// Remove from list before calling, maybe we enter LeaveBlockNotifications while calling the handler...
pEditEngine->aNotifyCache.Remove( 0 );
pEditEngine->aOutlinerNotifyHdl.Call( pNotify );
delete pNotify;
2002-05-27 13:37:37 +00:00
}
}
}
}
IMPL_LINK( Outliner, EditEngineNotifyHdl, EENotify*, pNotify )
{
if ( !bBlockInsCallback )
{
pEditEngine->aOutlinerNotifyHdl.Call( pNotify );
}
else
{
EENotify* pNewNotify = new EENotify( *pNotify );
pEditEngine->aNotifyCache.Insert( pNewNotify, pEditEngine->aNotifyCache.Count() );
}
return 0;
}
/** sets a link that is called at the beginning of a drag operation at an edit view */
void Outliner::SetBeginDropHdl( const Link& rLink )
{
pEditEngine->SetBeginDropHdl( rLink );
}
Link Outliner::GetBeginDropHdl() const
{
return pEditEngine->GetBeginDropHdl();
}
/** sets a link that is called at the end of a drag operation at an edit view */
void Outliner::SetEndDropHdl( const Link& rLink )
{
pEditEngine->SetEndDropHdl( rLink );
}
Link Outliner::GetEndDropHdl() const
{
return pEditEngine->GetEndDropHdl();
}
INTEGRATION: CWS impressodf12 (1.70.350); FILE MERGED 2008/05/30 14:02:19 cl 1.70.350.19: #i75927# fixed send to outliner after bullet rework 2008/05/29 13:29:48 cl 1.70.350.18: #i75927# bullet rework 2008/05/29 12:12:46 cl 1.70.350.17: #i75927# bullet rework 2008/05/27 15:00:02 cl 1.70.350.16: #i35937# code cleanup after bullet rework 2008/05/26 15:11:40 cl 1.70.350.15: #i75927# added restart for numbering 2008/05/26 11:37:24 cl 1.70.350.14: #i35937# code cleanup after bullet rework 2008/05/15 15:00:31 cl 1.70.350.13: #i35937# reworked bullets in outliner 2008/04/28 11:24:00 cl 1.70.350.12: fixed linux compiler warnings 2008/04/25 09:01:27 cl 1.70.350.11: RESYNC: (1.70-1.71); FILE MERGED 2008/04/24 15:31:39 cl 1.70.350.10: #i35937# converted EE_PARA_BULLETSTATE to bool item 2008/04/22 08:05:48 tl 1.70.350.9: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/21 15:31:49 tl 1.70.350.8: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/17 08:49:44 cl 1.70.350.7: #i35937# moved paint of page number to sd 2008/04/14 14:30:34 cl 1.70.350.6: #i35937# removed unneeeded code and correct style sheet when bullets are switched on/off 2008/04/14 07:48:01 tl 1.70.350.5: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/14 07:27:25 tl 1.70.350.4: #i35937# EditEngine/outliner changes regarding number format and bullets 2008/04/13 19:04:01 cl 1.70.350.3: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/11 07:28:17 cl 1.70.350.2: #i35937# allow paragraph depth of -1 to switch of numbering 2008/04/10 16:50:55 cl 1.70.350.1: #i35937# allow paragraph depth of -1 to switch of numbering
2008-06-06 11:30:58 +00:00
/** sets a link that is called before a drop or paste operation. */
void Outliner::SetBeginPasteOrDropHdl( const Link& rLink )
{
maBeginPasteOrDropHdl = rLink;
}
/** sets a link that is called after a drop or paste operation. */
void Outliner::SetEndPasteOrDropHdl( const Link& rLink )
{
maEndPasteOrDropHdl = rLink;
}
void Outliner::SetParaFlag( Paragraph* pPara, sal_uInt16 nFlag )
{
if( pPara && !pPara->HasFlag( nFlag ) )
{
if( IsUndoEnabled() && !IsInUndo() )
InsertUndo( new OutlinerUndoChangeParaFlags( this, (sal_uInt16)GetAbsPos( pPara ), pPara->nFlags, pPara->nFlags|nFlag ) );
pPara->SetFlag( nFlag );
}
}
void Outliner::RemoveParaFlag( Paragraph* pPara, sal_uInt16 nFlag )
{
if( pPara && pPara->HasFlag( nFlag ) )
{
if( IsUndoEnabled() && !IsInUndo() )
InsertUndo( new OutlinerUndoChangeParaFlags( this, (sal_uInt16)GetAbsPos( pPara ), pPara->nFlags, pPara->nFlags & ~nFlag ) );
pPara->RemoveFlag( nFlag );
}
}
bool Outliner::HasParaFlag( const Paragraph* pPara, sal_uInt16 nFlag ) const
{
return pPara && pPara->HasFlag( nFlag );
}
sal_Bool DrawPortionInfo::IsRTL() const
{
if(0xFF == mnBiDiLevel)
{
// Use Bidi functions from icu 2.0 to calculate if this portion
// is RTL or not.
UErrorCode nError(U_ZERO_ERROR);
UBiDi* pBidi = ubidi_openSized(mrText.Len(), 0, &nError);
nError = U_ZERO_ERROR;
// I do not have this info here. Is it necessary? I'll have to ask MT.
const BYTE nDefaultDir = UBIDI_LTR; //IsRightToLeft( nPara ) ? UBIDI_RTL : UBIDI_LTR;
ubidi_setPara(pBidi, reinterpret_cast<const UChar *>(mrText.GetBuffer()), mrText.Len(), nDefaultDir, NULL, &nError); // UChar != sal_Unicode in MinGW
nError = U_ZERO_ERROR;
int32_t nStart(0);
int32_t nEnd;
UBiDiLevel nCurrDir;
ubidi_getLogicalRun(pBidi, nStart, &nEnd, &nCurrDir);
ubidi_close(pBidi);
// remember on-demand calculated state
((DrawPortionInfo*)this)->mnBiDiLevel = nCurrDir;
}
return (1 == (mnBiDiLevel % 2));
}
2002-05-27 13:37:37 +00:00
// eof
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */