Files
libreoffice/svx/inc/svx/outliner.hxx

1051 lines
40 KiB
C++
Raw Normal View History

/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: outliner.hxx,v $
2008-10-01 06:50:54 +00:00
* $Revision: 1.6.16.2 $
*
* This file is part of OpenOffice.org.
*
* 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.
*
* 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).
*
* 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.
*
************************************************************************/
#ifndef _OUTLINER_HXX
#define _OUTLINER_HXX
#include <tools/gen.hxx>
#include <tools/string.hxx>
#include <tools/debug.hxx>
CWS-TOOLING: integrate CWS impress169 2009-05-13 17:37:21 +0200 sj r271865 : #i100942# applied patch, removed oversafe buffer check (now without warnings on 64 bit platform) 2009-05-13 12:27:18 +0200 sj r271855 : #i101769# fixed line/fill attributes for graphic objects 2009-05-12 10:25:17 +0200 cl r271799 : report correct minimum cell hight for empty cells 2009-04-28 17:29:46 +0200 cl r271334 : fixed merge error 2009-04-28 16:18:01 +0200 cl r271330 : fixed build error 2009-04-28 12:38:09 +0200 cl r271320 : #i100129# images for new layouts 2009-04-27 19:12:06 +0200 cl r271302 : CWS-TOOLING: rebase CWS impress169 to trunk@270723 (milestone: DEV300:m46) 2009-04-20 19:13:28 +0200 sj r271012 : #i100942# applied patch, removed oversafe buffer check 2009-04-09 18:00:01 +0200 sj r270719 : #158488# added rectangular gradient support 2009-04-09 17:49:52 +0200 sj r270718 : #158488# added rectangular gradient support 2009-04-09 17:46:24 +0200 sj r270717 : #158488# added rectangular gradient support 2009-03-26 18:16:34 +0100 cl r270098 : #i99867# applied patch from jlcheng to correctly register table design pane 2009-03-26 18:12:11 +0100 cl r270097 : #i100220# leave some items default so they are not overridden if a new table style is set 2009-03-26 18:11:10 +0100 cl r270096 : #i100220# clear only those items that are also in the style when assigning a new table layout 2009-03-26 15:56:24 +0100 cl r270085 : #i99977# listen to outliner and dispose if outliner dies 2009-03-26 15:47:29 +0100 cl r270084 : #i99977# made the Outliner a SfxBroadcaster so others can listen for its death 2009-03-24 19:10:05 +0100 sj r269991 : #i100490# fixed text resize problem 2009-03-23 14:31:11 +0100 sj r269872 : #i96083# added patch, (dubious && and ||) 2009-03-19 17:55:11 +0100 sj r269764 : #i100275# applied patch, row height is now correct even for rows containing no text 2009-03-18 18:10:52 +0100 sj r269701 : #i93616# solved performance problem when loading document 2009-03-18 16:20:40 +0100 sj r269688 : removing unused code 2009-03-18 16:19:22 +0100 sj r269687 : removing unused code 2009-03-18 16:17:54 +0100 sj r269686 : removing unused code 2009-03-18 10:28:07 +0100 cl r269643 : #i100029# let cells be disposed as soon as the table model is disposed 2009-03-17 15:56:50 +0100 cl r269614 : #i99984# new impress photo layouts 3x2 and 2x2 2009-03-17 15:36:35 +0100 cl r269611 : #i99984# adding new impress photo layouts 3x2 and 2x2 2009-03-16 18:43:48 +0100 cl r269564 : #i55224# correct internal links if pages are changed 2009-03-16 16:40:38 +0100 cl r269559 : #i55224# correct internal hyperlinks if slides are changed/renamed 2009-03-16 15:34:12 +0100 cl r269553 : #i99427# invalidate slots after promote/demote 2009-03-13 18:18:20 +0100 sj r269492 : #i92421# fixed loop if loading encrypted ppt file 2009-03-13 14:51:58 +0100 sj r269481 : #i93002# fixed crash if saving presentation without master title placeholder 2009-03-13 12:26:21 +0100 sj r269468 : #i100147# do not exceed the max point count if creating simple polygon via ::GetSimple 2009-03-12 17:00:45 +0100 sj r269427 : #i82518# justifying rectangles for arc/pie and chord actions, fixed round rectangle problem
2009-05-19 09:32:45 +00:00
#include <svtools/brdcst.hxx>
#include <svx/editdata.hxx>
#include <i18npool/lang.h>
#include <tools/color.hxx>
#include <vcl/graph.hxx>
#include <tools/list.hxx>
#include <tools/link.hxx>
#include <rsc/rscsfx.hxx>
#include "svx/svxdllapi.h"
#include <goodies/grfmgr.hxx>
#include <tools/rtti.hxx> // wegen typedef TypeId
#include <vector>
class OutlinerEditEng;
class Outliner;
class EditView;
class EditUndo;
class ParagraphList;
class OutlinerParaObject;
class SvStream;
class SvxBulletItem;
class SvxFont;
class SvxSearchItem;
class SvxFieldItem;
class OLUndoRemove;
class Window;
class KeyEvent;
class MouseEvent;
class Pointer;
class CommandEvent;
class MapMode;
class OutputDevice;
class PolyPolygon;
class SfxStyleSheetPool;
class SfxStyleSheet;
class SfxItemPool;
class SfxItemSet;
class SvxNumBulletItem;
class SvxNumberFormat;
class SvxLRSpaceItem;
class SfxUndoManager;
class EditEngine;
class SvKeyValueIterator;
class SvxForbiddenCharactersTable;
#include <com/sun/star/uno/Reference.h>
#include <vos/ref.hxx>
#include <svx/svxfont.hxx>
#include <svx/eedata.hxx>
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
#include <svx/paragraphdata.hxx>
class SvxFieldData;
//////////////////////////////////////////////////////////////////////////////
namespace com { namespace sun { namespace star { namespace linguistic2 {
class XSpellChecker1;
class XHyphenator;
}}}}
namespace svx{
struct SpellPortion;
typedef std::vector<SpellPortion> SpellPortions;
}
namespace basegfx { class B2DPolyPolygon; }
// nur interner Gebrauch!
#define PARAFLAG_DROPTARGET 0x1000
#define PARAFLAG_DROPTARGET_EMPTY 0x2000
#define PARAFLAG_HOLDDEPTH 0x4000
#define PARAFLAG_SETBULLETTEXT 0x8000
#define PARAFLAG_ISPAGE 0x0100
// Undo-Action-Ids
#define OLUNDO_DEPTH EDITUNDO_USER
// #define OLUNDO_HEIGHT EDITUNDO_USER+1
#define OLUNDO_EXPAND EDITUNDO_USER+2
#define OLUNDO_COLLAPSE EDITUNDO_USER+3
// #define OLUNDO_REMOVE EDITUNDO_USER+4
#define OLUNDO_ATTR EDITUNDO_USER+5
#define OLUNDO_INSERT EDITUNDO_USER+6
// #define OLUNDO_MOVEPARAGRAPHS EDITUNDO_USER+7
#define OLUNDO_CHECKPARA EDITUNDO_USER+8
2008-10-01 06:50:54 +00:00
class Paragraph : protected ParagraphData
{
private:
friend class Outliner;
friend class ParagraphList;
friend class OutlinerView;
friend class OutlinerParaObject;
friend class OutlinerEditEng;
friend class OLUndoDepth;
friend class OutlinerUndoCheckPara;
friend class OutlinerUndoChangeParaFlags;
Paragraph& operator=(const Paragraph& rPara );
USHORT nFlags;
XubString aBulText;
Size aBulSize;
BOOL bVisible;
BOOL IsVisible() const { return bVisible; }
void SetText( const XubString& rText ) { aBulText = rText; aBulSize.Width() = -1; }
void Invalidate() { aBulSize.Width() = -1; }
void SetDepth( sal_Int16 nNewDepth ) { nDepth = nNewDepth; aBulSize.Width() = -1; }
const XubString& GetText() const { return aBulText; }
Paragraph( sal_Int16 nDepth );
Paragraph( const Paragraph& );
2008-10-01 06:50:54 +00:00
Paragraph( const ParagraphData& );
~Paragraph();
sal_Int16 GetDepth() const { return nDepth; }
sal_Int16 GetNumberingStartValue() const { return mnNumberingStartValue; }
void SetNumberingStartValue( sal_Int16 nNumberingStartValue );
sal_Bool IsParaIsNumberingRestart() const { return mbParaIsNumberingRestart; }
void SetParaIsNumberingRestart( sal_Bool bParaIsNumberingRestart );
void SetFlag( USHORT nFlag ) { nFlags |= nFlag; }
void RemoveFlag( USHORT nFlag ) { nFlags &= ~nFlag; }
bool HasFlag( USHORT nFlag ) const { return (nFlags & nFlag) != 0; }
};
struct ParaRange
{
USHORT nStartPara;
USHORT nEndPara;
ParaRange( USHORT nS, USHORT nE ) { nStartPara = nS, nEndPara = nE; }
void Adjust();
USHORT Len() const { return 1 + ( ( nEndPara > nStartPara ) ? (nEndPara-nStartPara) : (nStartPara-nEndPara) ); }
};
inline void ParaRange::Adjust()
{
if ( nStartPara > nEndPara )
{
USHORT nTmp = nStartPara;
nStartPara = nEndPara;
nEndPara = nTmp;
}
}
#define OL_ROOTPARENT (Paragraph*)NULL
class SVX_DLLPUBLIC OutlinerView
{
friend class Outliner;
private:
Outliner* pOwner;
EditView* pEditView;
// Drag & Drop
BOOL bBeginDragAtMove_OLDMEMBER;
BOOL bInDragMode;
Point aDDStartPosRef;
Point aDDStartPosPix;
ULONG nDDStartPara;
ULONG nDDStartParaVisChildCount;
ULONG nDDCurPara;
USHORT nDDStartDepth;
USHORT nDDCurDepth;
USHORT nDDMaxDepth;
BOOL bDDChangingDepth;
BOOL bDDCursorVisible;
long* pHorTabArrDoc;
long nDDScrollLRBorderWidthWin; // Left Right
long nDDScrollTBBorderWidthWin; // Top Bottom
long nDDScrollLROffs;
long nDDScrollTDOffs;
void* pDummy;
ULONG nDummy;
enum MouseTarget {
MouseText = 0,
MouseBullet = 1,
MouseHypertext = 2, // ausserhalb OutputArea
MouseOutside = 3, // ausserhalb OutputArea
MouseDontKnow = 4
};
MouseTarget OLD_ePrevMouseTarget;
#ifdef _OUTLINER_CXX
SVX_DLLPRIVATE void ImplExpandOrCollaps( USHORT nStartPara, USHORT nEndPara, BOOL bExpand );
SVX_DLLPRIVATE ULONG ImpCheckMousePos( const Point& rPosPixel, MouseTarget& reTarget);
SVX_DLLPRIVATE void ImpToggleExpand( Paragraph* pParentPara );
SVX_DLLPRIVATE ParaRange ImpGetSelectedParagraphs( BOOL bIncludeHiddenChilds );
SVX_DLLPRIVATE void ImpHideDDCursor();
SVX_DLLPRIVATE void ImpShowDDCursor();
SVX_DLLPRIVATE void ImpPaintDDCursor();
SVX_DLLPRIVATE void ImpDragScroll( const Point& rPosPix );
SVX_DLLPRIVATE void ImpScrollLeft();
SVX_DLLPRIVATE void ImpScrollRight();
SVX_DLLPRIVATE void ImpScrollUp();
SVX_DLLPRIVATE void ImpScrollDown();
SVX_DLLPRIVATE ULONG ImpGetInsertionPara( const Point& rPosPixel );
SVX_DLLPRIVATE Point ImpGetDocPos( const Point& rPosPixel );
SVX_DLLPRIVATE Pointer ImpGetMousePointer( MouseTarget eTarget );
SVX_DLLPRIVATE USHORT ImpInitPaste( ULONG& rStart );
SVX_DLLPRIVATE void ImpPasted( ULONG nStart, ULONG nPrevParaCount, USHORT nSize);
SVX_DLLPRIVATE USHORT ImpCalcSelectedPages( BOOL bIncludeFirstSelected );
SVX_DLLPRIVATE BOOL ImpIsIndentingPages();
#endif
public:
OutlinerView( Outliner* pOut, Window* pWindow );
virtual ~OutlinerView();
EditView& GetEditView() const { return *pEditView; }
void Scroll( long nHorzScroll, long nVertScroll );
void Paint( const Rectangle& rRect );
BOOL PostKeyEvent( const KeyEvent& rKEvt );
BOOL MouseButtonDown( const MouseEvent& );
BOOL MouseButtonUp( const MouseEvent& );
BOOL MouseMove( const MouseEvent& );
void ShowCursor( BOOL bGotoCursor = TRUE );
void HideCursor();
void SetOutliner( Outliner* pOutliner );
Outliner* GetOutliner() const { return pOwner; }
void SetWindow( Window* pWindow );
Window* GetWindow() const;
void SetReadOnly( BOOL bReadOnly );
BOOL IsReadOnly() const;
void SetOutputArea( const Rectangle& rRect );
Rectangle GetOutputArea() const;
Rectangle GetVisArea() const;
List* CreateSelectionList();
// gibt Anzahl selektierter Absaetze zurueck
// MT 07/00: Who needs this?
ULONG Select( Paragraph* pParagraph,
BOOL bSelect=TRUE,
BOOL bWChilds=TRUE);
String GetSelected() const;
void SelectRange( ULONG nFirst, USHORT nCount );
void SetAttribs( const SfxItemSet& );
void Indent( short nDiff );
void AdjustDepth( short nDX ); // Spaeter gegeb Indent ersetzen!
BOOL AdjustHeight( long nDY );
void AdjustDepth( Paragraph* pPara, short nDX,
BOOL bWithChilds = FALSE );
void AdjustHeight( Paragraph* pPara, long nDY,
BOOL bWithChilds=FALSE );
ULONG Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFormat, BOOL bSelect = FALSE, SvKeyValueIterator* pHTTPHeaderAttrs = NULL );
ULONG Write( SvStream& rOutput, EETextFormat eFormat );
void InsertText( const String& rNew, BOOL bSelect = FALSE );
void InsertText( const OutlinerParaObject& rParaObj );
void Expand();
void Collapse();
void Expand( Paragraph* );
void Collapse( Paragraph* );
void ExpandAll();
void CollapseAll();
void SetBackgroundColor( const Color& rColor );
Color GetBackgroundColor();
SfxItemSet GetAttribs();
void Cut();
void Copy();
void Paste();
void PasteSpecial();
void EnablePaste( BOOL bEnable );
void Undo();
void Redo();
void SetStyleSheet( SfxStyleSheet* );
SfxStyleSheet* GetStyleSheet() const;
void SetControlWord( ULONG nWord );
ULONG GetControlWord() const;
void SetAnchorMode( EVAnchorMode eMode );
EVAnchorMode GetAnchorMode() const;
Pointer GetPointer( const Point& rPosPixel );
void Command( const CommandEvent& rCEvt );
void RemoveCharAttribs( ULONG nPara, USHORT nWhich = 0 );
void CompleteAutoCorrect();
EESpellState StartSpeller( BOOL bMultipleDoc = FALSE );
EESpellState StartThesaurus();
USHORT StartSearchAndReplace( const SvxSearchItem& rSearchItem );
// for text conversion
void StartTextConversion( LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont, INT32 nOptions, BOOL bIsInteractive, BOOL bMultipleDoc );
void TransliterateText( sal_Int32 nTransliterationMode );
ESelection GetSelection();
USHORT GetSelectedScriptType() const;
void SetVisArea( const Rectangle& rRec );
void SetSelection( const ESelection& );
void RemoveAttribs( BOOL bRemoveParaAttribs = FALSE, USHORT nWhich = 0, BOOL bKeepLanguages = FALSE );
void RemoveAttribsKeepLanguages( BOOL bRemoveParaAttribs );
BOOL HasSelection() const;
void InsertField( const SvxFieldItem& rFld );
const SvxFieldItem* GetFieldUnderMousePointer() const;
const SvxFieldItem* GetFieldUnderMousePointer( USHORT& nPara, xub_StrLen& nPos ) const;
const SvxFieldItem* GetFieldAtSelection() const;
/** enables numbering for the selected paragraphs if the numbering of the first paragraph is off
or disables numbering for the selected paragraphs if the numbering of the first paragraph is on
*/
void ToggleBullets();
/** enables numbering for the selected paragraphs that are not enabled and ignore all selected
paragraphs that already have numbering enabled.
*/
void EnableBullets();
BOOL IsCursorAtWrongSpelledWord( BOOL bMarkIfWrong = FALSE );
BOOL IsWrongSpelledWordAtPos( const Point& rPosPixel, BOOL bMarkIfWrong = FALSE );
void SpellIgnoreWord();
void ExecuteSpellPopup( const Point& rPosPixel, Link* pCallBack = 0 );
void SetInvalidateMore( USHORT nPixel );
USHORT GetInvalidateMore() const;
CWS-TOOLING: integrate CWS impress171 2009-06-02 16:32:02 +0200 cl r272511 : fixed build error 2009-05-29 16:40:09 +0200 cl r272471 : CWS-TOOLING: rebase CWS impress171 to trunk@272291 (milestone: DEV300:m49) 2009-05-19 15:14:08 +0200 sj r272082 : #i101459# applied patch (writing out StyleTextProperties even if no chars given) 2009-05-19 15:09:31 +0200 sj r272081 : #i101459# applied patch (writing out StyleTextProperties even if no chars given) 2009-05-19 15:09:14 +0200 sj r272080 : #i101459# applied patch (writing out StyleTextProperties even if no chars given) 2009-05-18 13:34:05 +0200 sj r272015 : #i47689# fixed rectangles toolbar 2009-05-13 14:59:08 +0200 sj r271862 : #i101563# fixed crash when loading pptx document 2009-05-12 19:31:58 +0200 sj r271835 : #101684# fixed rotation of customshapes 2009-05-08 16:37:01 +0200 sj r271724 : #i101683,i101584,i48160# added shearing of customshapes, fixed rotation problem 2009-04-28 17:32:14 +0200 sj r271335 : #i48160# fixed gluepoint rotation of customshapes 2009-04-27 16:31:54 +0200 cl r271291 : #i100138# applied patch for japanese reconversion feature 2009-04-27 16:30:52 +0200 cl r271290 : #i100138# applied patch for japanese reconversion feature 2009-04-27 16:28:55 +0200 cl r271289 : #i100138# applied patch for japanese reconversion feature 2009-04-23 14:22:59 +0200 cl r271170 : #i95342# #i96820# #i97298# multiple table handling fixes 2009-04-23 14:18:54 +0200 sj r271169 : #i60368# ignoring gamma values for toolbar/menu icons 2009-04-23 11:54:28 +0200 cl r271146 : #i97298# set style to text even during text edit 2009-04-23 11:46:38 +0200 cl r271145 : fixed compiler error with debug 2009-04-22 19:09:37 +0200 sj r271135 : #i101051# applied patch (proper import of notes page object) 2009-04-22 11:07:54 +0200 cl r271082 : #i96820# modify doc after merging cells 2009-04-22 10:57:35 +0200 cl r271081 : #i100307# applied patch from jlcheng to correctly set modfiy state 2009-04-22 10:31:11 +0200 cl r271079 : #i96736# copy merge information on clone 2009-04-21 08:27:22 +0200 cl r271016 : #i89541# use SfxErrorContext to make the ErrorHandler dialog modal 2009-04-20 17:52:56 +0200 cl r271003 : #i98480# removed 'EndPosition' and 'StartPosition' from styles 2009-04-20 16:41:55 +0200 cl r270994 : #i98403# fixed state handling for selected motion path 2009-04-17 11:35:25 +0200 cl r270931 : #i61274# export to pdf should behave like printing considering layer visibility 2009-04-17 10:00:17 +0200 cl r270924 : #i98967# set default style on any new shape except a page obj 2009-04-16 16:28:20 +0200 cl r270893 : #i98859# use percentage type for relative font height
2009-06-17 10:58:14 +00:00
String GetSurroundingText() const;
Selection GetSurroundingTextSelection() const;
};
//#if 0 // _SOLAR__PRIVATE
DECLARE_LIST(ViewList,OutlinerView*)
//#else
//typedef List ViewList;
//#endif
class SVX_DLLPUBLIC DrawPortionInfo
{
public:
const Point& mrStartPos;
const String& mrText;
sal_uInt16 mnTextStart;
sal_uInt16 mnTextLen;
sal_uInt16 mnPara;
xub_StrLen mnIndex;
const SvxFont& mrFont;
const sal_Int32* mpDXArray;
const EEngineData::WrongSpellVector* mpWrongSpellVector;
const SvxFieldData* mpFieldData;
const ::com::sun::star::lang::Locale* mpLocale;
const Color maOverlineColor;
const Color maTextLineColor;
// #101498# BiDi level needs to be transported, too.
BYTE mnBiDiLevel;
// bitfield
unsigned mbEndOfLine : 1;
unsigned mbEndOfParagraph : 1;
unsigned mbEndOfBullet : 1;
BYTE GetBiDiLevel() const { return mnBiDiLevel; }
sal_Bool IsRTL() const;
DrawPortionInfo(
const Point& rPos,
const String& rTxt,
sal_uInt16 nTxtStart,
sal_uInt16 nTxtLen,
const SvxFont& rFnt,
sal_uInt16 nPar,
xub_StrLen nIdx,
const sal_Int32* pDXArr,
const EEngineData::WrongSpellVector* pWrongSpellVector,
const SvxFieldData* pFieldData,
const ::com::sun::star::lang::Locale* pLocale,
const Color& rOverlineColor,
const Color& rTextLineColor,
BYTE nBiDiLevel,
bool bEndOfLine,
bool bEndOfParagraph,
bool bEndOfBullet)
: mrStartPos(rPos),
mrText(rTxt),
mnTextStart(nTxtStart),
mnTextLen(nTxtLen),
mnPara(nPar),
mnIndex(nIdx),
mrFont(rFnt),
mpDXArray(pDXArr),
mpWrongSpellVector(pWrongSpellVector),
mpFieldData(pFieldData),
mpLocale(pLocale),
maOverlineColor(rOverlineColor),
maTextLineColor(rTextLineColor),
mnBiDiLevel(nBiDiLevel),
mbEndOfLine(bEndOfLine),
mbEndOfParagraph(bEndOfParagraph),
mbEndOfBullet(bEndOfBullet)
{}
};
class SVX_DLLPUBLIC DrawBulletInfo
{
public:
const GraphicObject maBulletGraphicObject;
Point maBulletPosition;
Size maBulletSize;
DrawBulletInfo(
const GraphicObject& rBulletGraphicObject,
const Point& rBulletPosition,
const Size& rBulletSize)
: maBulletGraphicObject(rBulletGraphicObject),
maBulletPosition(rBulletPosition),
maBulletSize(rBulletSize)
{}
};
struct SVX_DLLPUBLIC PaintFirstLineInfo
{
USHORT mnPara;
const Point& mrStartPos;
long mnBaseLineY;
const Point& mrOrigin;
short mnOrientation;
OutputDevice* mpOutDev;
PaintFirstLineInfo( USHORT nPara, const Point& rStartPos, long nBaseLineY, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev )
: mnPara( nPara ), mrStartPos( rStartPos ), mnBaseLineY( nBaseLineY ), mrOrigin( rOrigin ), mnOrientation( nOrientation ), mpOutDev( pOutDev )
{}
};
class SdrPage;
class EditFieldInfo
{
private:
Outliner* pOutliner;
const SvxFieldItem& rFldItem;
Color* pTxtColor;
Color* pFldColor;
String aRepresentation;
USHORT nPara;
xub_StrLen nPos;
BOOL bSimpleClick;
EditFieldInfo();
EditFieldInfo( const EditFieldInfo& );
SdrPage* mpSdrPage;
public:
EditFieldInfo( Outliner* pOutl, const SvxFieldItem& rFItem, USHORT nPa, xub_StrLen nPo )
: rFldItem( rFItem )
{
pOutliner = pOutl;
nPara = nPa; nPos = nPo;
pTxtColor = 0; pFldColor = 0; bSimpleClick = FALSE;
mpSdrPage = 0;
}
~EditFieldInfo()
{
delete pTxtColor;
delete pFldColor;
}
Outliner* GetOutliner() const { return pOutliner; }
const SvxFieldItem& GetField() const { return rFldItem; }
Color* GetTxtColor() const { return pTxtColor; }
void SetTxtColor( const Color& rColor )
{ delete pTxtColor; pTxtColor = new Color( rColor ); }
Color* GetFldColor() const { return pFldColor; }
void SetFldColor( const Color& rColor )
{ delete pFldColor; pFldColor = new Color( rColor ); }
void ClearFldColor()
{ delete pFldColor; pFldColor = 0; }
USHORT GetPara() const { return nPara; }
xub_StrLen GetPos() const { return nPos; }
BOOL IsSimpleClick() const { return bSimpleClick; }
void SetSimpleClick( BOOL bSimple ) { bSimpleClick = bSimple; }
const String& GetRepresentation() const { return aRepresentation; }
String& GetRepresentation() { return aRepresentation; }
void SetRepresentation( const String& rStr ) { aRepresentation = rStr; }
void SetSdrPage( SdrPage* pPage ) { mpSdrPage = pPage; }
SdrPage* GetSdrPage() const { return mpSdrPage; }
};
struct EBulletInfo
{
BOOL bVisible;
USHORT nType; // see SvxNumberType
String aText;
SvxFont aFont;
Graphic aGraphic;
USHORT nParagraph;
Rectangle aBounds;
EBulletInfo() : bVisible( FALSE ), nType( 0 ), nParagraph( EE_PARA_NOT_FOUND ) {}
};
#define OUTLINERMODE_DONTKNOW 0x0000
#define OUTLINERMODE_TEXTOBJECT 0x0001
#define OUTLINERMODE_TITLEOBJECT 0x0002
#define OUTLINERMODE_OUTLINEOBJECT 0x0003
#define OUTLINERMODE_OUTLINEVIEW 0x0004
#define OUTLINERMODE_USERMASK 0x00FF
#define OUTLINERMODE_SUBTITLE (0x0100|OUTLINERMODE_TEXTOBJECT)
#define OUTLINERMODE_NOTE (0x0200|OUTLINERMODE_TEXTOBJECT)
CWS-TOOLING: integrate CWS impress169 2009-05-13 17:37:21 +0200 sj r271865 : #i100942# applied patch, removed oversafe buffer check (now without warnings on 64 bit platform) 2009-05-13 12:27:18 +0200 sj r271855 : #i101769# fixed line/fill attributes for graphic objects 2009-05-12 10:25:17 +0200 cl r271799 : report correct minimum cell hight for empty cells 2009-04-28 17:29:46 +0200 cl r271334 : fixed merge error 2009-04-28 16:18:01 +0200 cl r271330 : fixed build error 2009-04-28 12:38:09 +0200 cl r271320 : #i100129# images for new layouts 2009-04-27 19:12:06 +0200 cl r271302 : CWS-TOOLING: rebase CWS impress169 to trunk@270723 (milestone: DEV300:m46) 2009-04-20 19:13:28 +0200 sj r271012 : #i100942# applied patch, removed oversafe buffer check 2009-04-09 18:00:01 +0200 sj r270719 : #158488# added rectangular gradient support 2009-04-09 17:49:52 +0200 sj r270718 : #158488# added rectangular gradient support 2009-04-09 17:46:24 +0200 sj r270717 : #158488# added rectangular gradient support 2009-03-26 18:16:34 +0100 cl r270098 : #i99867# applied patch from jlcheng to correctly register table design pane 2009-03-26 18:12:11 +0100 cl r270097 : #i100220# leave some items default so they are not overridden if a new table style is set 2009-03-26 18:11:10 +0100 cl r270096 : #i100220# clear only those items that are also in the style when assigning a new table layout 2009-03-26 15:56:24 +0100 cl r270085 : #i99977# listen to outliner and dispose if outliner dies 2009-03-26 15:47:29 +0100 cl r270084 : #i99977# made the Outliner a SfxBroadcaster so others can listen for its death 2009-03-24 19:10:05 +0100 sj r269991 : #i100490# fixed text resize problem 2009-03-23 14:31:11 +0100 sj r269872 : #i96083# added patch, (dubious && and ||) 2009-03-19 17:55:11 +0100 sj r269764 : #i100275# applied patch, row height is now correct even for rows containing no text 2009-03-18 18:10:52 +0100 sj r269701 : #i93616# solved performance problem when loading document 2009-03-18 16:20:40 +0100 sj r269688 : removing unused code 2009-03-18 16:19:22 +0100 sj r269687 : removing unused code 2009-03-18 16:17:54 +0100 sj r269686 : removing unused code 2009-03-18 10:28:07 +0100 cl r269643 : #i100029# let cells be disposed as soon as the table model is disposed 2009-03-17 15:56:50 +0100 cl r269614 : #i99984# new impress photo layouts 3x2 and 2x2 2009-03-17 15:36:35 +0100 cl r269611 : #i99984# adding new impress photo layouts 3x2 and 2x2 2009-03-16 18:43:48 +0100 cl r269564 : #i55224# correct internal links if pages are changed 2009-03-16 16:40:38 +0100 cl r269559 : #i55224# correct internal hyperlinks if slides are changed/renamed 2009-03-16 15:34:12 +0100 cl r269553 : #i99427# invalidate slots after promote/demote 2009-03-13 18:18:20 +0100 sj r269492 : #i92421# fixed loop if loading encrypted ppt file 2009-03-13 14:51:58 +0100 sj r269481 : #i93002# fixed crash if saving presentation without master title placeholder 2009-03-13 12:26:21 +0100 sj r269468 : #i100147# do not exceed the max point count if creating simple polygon via ::GetSimple 2009-03-12 17:00:45 +0100 sj r269427 : #i82518# justifying rectangles for arc/pie and chord actions, fixed round rectangle problem
2009-05-19 09:32:45 +00:00
class SVX_DLLPUBLIC Outliner : public SfxBroadcaster
{
friend class OutlinerView;
friend class OutlinerEditEng;
friend class OutlinerParaObject;
friend class OLUndoExpand;
friend class OutlinerUndoChangeDepth;
friend class OutlinerUndoCheckPara;
friend class OutlinerUndoChangeParaFlags;
OutlinerEditEng* pEditEngine;
ParagraphList* pParaList;
ViewList aViewList;
Paragraph* pHdlParagraph;
ULONG mnFirstSelPage;
Link aDrawPortionHdl;
Link aDrawBulletHdl;
Link aExpandHdl;
Link aParaInsertedHdl;
Link aParaRemovingHdl;
Link aDepthChangedHdl;
Link aWidthArrReqHdl;
Link aBeginMovingHdl;
Link aEndMovingHdl;
Link aIndentingPagesHdl;
Link aRemovingPagesHdl;
Link aFieldClickedHdl;
Link aCalcFieldValueHdl;
Link maPaintFirstLineHdl;
Link maBeginPasteOrDropHdl;
Link maEndPasteOrDropHdl;
sal_Int16 nDepthChangedHdlPrevDepth;
USHORT mnDepthChangeHdlPrevFlags;
sal_Int16 nMaxDepth;
const sal_Int16 nMinDepth;
USHORT nFirstPage;
USHORT nOutlinerMode;
BOOL bIsExpanding; // Nur in Expand/Collaps-Hdl gueltig, mal umstellen
BOOL bFirstParaIsEmpty;
BOOL bBlockInsCallback;
BOOL bStrippingPortions;
BOOL bPasting;
ULONG nDummy;
#ifdef _OUTLINER_CXX
DECL_LINK( ParaVisibleStateChangedHdl, Paragraph* );
DECL_LINK( BeginMovingParagraphsHdl, MoveParagraphsInfo* );
DECL_LINK( EndMovingParagraphsHdl, MoveParagraphsInfo* );
DECL_LINK( BeginPasteOrDropHdl, PasteOrDropInfos* );
DECL_LINK( EndPasteOrDropHdl, PasteOrDropInfos* );
DECL_LINK( EditEngineNotifyHdl, EENotify* );
void ImplCheckParagraphs( USHORT nStart, USHORT nEnd );
BOOL ImplHasBullet( USHORT nPara ) const;
Size ImplGetBulletSize( USHORT nPara );
sal_uInt16 ImplGetNumbering( USHORT nPara, const SvxNumberFormat* pParaFmt );
void ImplCalcBulletText( USHORT nPara, BOOL bRecalcLevel, BOOL bRecalcChilds );
String ImplGetBulletText( USHORT nPara );
void ImplCheckNumBulletItem( USHORT nPara );
void ImplInitDepth( USHORT nPara, sal_Int16 nDepth, BOOL bCreateUndo, BOOL bUndoAction = FALSE );
void ImplSetLevelDependendStyleSheet( USHORT nPara, SfxStyleSheet* pLevelStyle = NULL );
void ImplBlockInsertionCallbacks( BOOL b );
void ImplCheckStyleSheet( USHORT nPara, BOOL bReplaceExistingStyle );
void ImpRecalcBulletIndent( ULONG nPara );
const SvxBulletItem& ImpGetBullet( ULONG nPara, USHORT& );
void ImpFilterIndents( ULONG nFirstPara, ULONG nLastPara );
bool ImpConvertEdtToOut( sal_uInt32 nPara, EditView* pView = 0 );
void ImpTextPasted( ULONG nStartPara, USHORT nCount );
long ImpCalcMaxBulletWidth( USHORT nPara, const SvxBulletItem& rBullet );
Font ImpCalcBulletFont( USHORT nPara ) const;
Rectangle ImpCalcBulletArea( USHORT nPara, BOOL bAdjust, BOOL bReturnPaperPos );
long ImpGetTextIndent( ULONG nPara );
BOOL ImpCanIndentSelectedPages( OutlinerView* pCurView );
BOOL ImpCanDeleteSelectedPages( OutlinerView* pCurView );
BOOL ImpCanDeleteSelectedPages( OutlinerView* pCurView, USHORT nFirstPage, USHORT nPages );
USHORT ImplGetOutlinerMode() const { return nOutlinerMode & OUTLINERMODE_USERMASK; }
void ImplCheckDepth( sal_Int16& rnDepth ) const;
#endif
protected:
void ParagraphInserted( USHORT nParagraph );
void ParagraphDeleted( USHORT nParagraph );
void ParaAttribsChanged( USHORT nParagraph );
virtual void StyleSheetChanged( SfxStyleSheet* pStyle );
void InvalidateBullet( Paragraph* pPara, ULONG nPara );
void PaintBullet( USHORT nPara, const Point& rStartPos,
const Point& rOrigin, short nOrientation,
OutputDevice* pOutDev );
// used by OutlinerEditEng. Allows Outliner objects to provide
// bullet access to the EditEngine.
virtual const SvxNumberFormat* GetNumberFormat( USHORT nPara ) const;
public:
Outliner( SfxItemPool* pPool, USHORT nOutlinerMode );
virtual ~Outliner();
void Init( USHORT nOutlinerMode );
USHORT GetMode() const { return nOutlinerMode; }
void SetVertical( BOOL bVertical );
BOOL IsVertical() const;
void SetFixedCellHeight( BOOL bUseFixedCellHeight );
BOOL IsFixedCellHeight() const;
void SetDefaultHorizontalTextDirection( EEHorizontalTextDirection eHTextDir );
EEHorizontalTextDirection GetDefaultHorizontalTextDirection() const;
USHORT GetScriptType( const ESelection& rSelection ) const;
LanguageType GetLanguage( USHORT nPara, USHORT nPos ) const;
void SetAsianCompressionMode( USHORT nCompressionMode );
USHORT GetAsianCompressionMode() const;
void SetKernAsianPunctuation( BOOL bEnabled );
BOOL IsKernAsianPunctuation() const;
void SetAddExtLeading( BOOL b );
BOOL IsAddExtLeading() const;
ULONG InsertView( OutlinerView* pView, ULONG nIndex=LIST_APPEND);
OutlinerView* RemoveView( OutlinerView* pView );
OutlinerView* RemoveView( ULONG nIndex );
OutlinerView* GetView( ULONG nIndex ) const;
ULONG GetViewCount() const;
Paragraph* Insert( const String& rText, ULONG nAbsPos = LIST_APPEND, sal_Int16 nDepth = 0 );
void SetText( const OutlinerParaObject& );
void AddText( const OutlinerParaObject& );
void SetText( const String& rText, Paragraph* pParagraph );
String GetText( Paragraph* pPara, ULONG nParaCount=1 ) const;
OutlinerParaObject* CreateParaObject( USHORT nStartPara = 0, USHORT nParaCount = 0xFFFF ) const;
const SfxItemSet& GetEmptyItemSet() const;
void SetRefMapMode( const MapMode& );
MapMode GetRefMapMode() const;
void SetBackgroundColor( const Color& rColor );
Color GetBackgroundColor() const;
sal_Int16 GetMinDepth() const { return -1; }
void SetMaxDepth( sal_Int16 nDepth, BOOL bCheckParas = FALSE );
sal_Int16 GetMaxDepth() const { return nMaxDepth; }
void SetUpdateMode( BOOL bUpdate );
BOOL GetUpdateMode() const;
void Clear();
void RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich );
ULONG GetParagraphCount() const;
Paragraph* GetParagraph( ULONG nAbsPos ) const;
BOOL HasParent( Paragraph* pParagraph ) const;
BOOL HasChilds( Paragraph* pParagraph ) const;
ULONG GetChildCount( Paragraph* pParent ) const;
BOOL IsExpanded( Paragraph* pPara ) const;
// Paragraph* GetParagraph( Paragraph* pParent, ULONG nRelPos ) const;
Paragraph* GetParent( Paragraph* pParagraph ) const;
// ULONG GetRelPos( Paragraph* pParent, Paragraph* pPara ) const;
ULONG GetAbsPos( Paragraph* pPara );
sal_Int16 GetDepth( ULONG nPara ) const;
void SetDepth( Paragraph* pParagraph, sal_Int16 nNewDepth );
void SetVisible( Paragraph* pPara, BOOL bVisible );
BOOL IsVisible( Paragraph* pPara ) const { return pPara->IsVisible(); }
void EnableUndo( BOOL bEnable );
BOOL IsUndoEnabled() const;
void UndoActionStart( USHORT nId );
void UndoActionEnd( USHORT nId );
void InsertUndo( EditUndo* pUndo );
BOOL IsInUndo();
void ClearModifyFlag();
BOOL IsModified() const;
Paragraph* GetHdlParagraph() const { return pHdlParagraph; }
BOOL IsExpanding() const { return bIsExpanding; }
virtual void ExpandHdl();
void SetExpandHdl( const Link& rLink ) { aExpandHdl = rLink; }
Link GetExpandHdl() const { return aExpandHdl; }
virtual void ParagraphInsertedHdl();
void SetParaInsertedHdl(const Link& rLink){aParaInsertedHdl=rLink;}
Link GetParaInsertedHdl() const { return aParaInsertedHdl; }
virtual void ParagraphRemovingHdl();
void SetParaRemovingHdl(const Link& rLink){aParaRemovingHdl=rLink;}
Link GetParaRemovingHdl() const { return aParaRemovingHdl; }
virtual void DepthChangedHdl();
void SetDepthChangedHdl(const Link& rLink){aDepthChangedHdl=rLink;}
Link GetDepthChangedHdl() const { return aDepthChangedHdl; }
sal_Int16 GetPrevDepth() const { return nDepthChangedHdlPrevDepth; }
USHORT GetPrevFlags() const { return mnDepthChangeHdlPrevFlags; }
virtual long RemovingPagesHdl( OutlinerView* );
void SetRemovingPagesHdl(const Link& rLink){aRemovingPagesHdl=rLink;}
Link GetRemovingPagesHdl() const { return aRemovingPagesHdl; }
virtual long IndentingPagesHdl( OutlinerView* );
void SetIndentingPagesHdl(const Link& rLink){aIndentingPagesHdl=rLink;}
Link GetIndentingPagesHdl() const { return aIndentingPagesHdl; }
// nur gueltig in den beiden oberen Handlern
USHORT GetSelPageCount() const { return nDepthChangedHdlPrevDepth; }
// nur gueltig in den beiden oberen Handlern
ULONG GetFirstSelPage() const { return mnFirstSelPage; }
void SetCalcFieldValueHdl(const Link& rLink ) { aCalcFieldValueHdl= rLink; }
Link GetCalcFieldValueHdl() const { return aCalcFieldValueHdl; }
void SetFieldClickedHdl(const Link& rLink ) { aFieldClickedHdl= rLink; }
Link GetFieldClickedHdl() const { return aFieldClickedHdl; }
void SetDrawPortionHdl(const Link& rLink){aDrawPortionHdl=rLink;}
Link GetDrawPortionHdl() const { return aDrawPortionHdl; }
void SetDrawBulletHdl(const Link& rLink){aDrawBulletHdl=rLink;}
Link GetDrawBulletHdl() const { return aDrawBulletHdl; }
void SetPaintFirstLineHdl(const Link& rLink) { maPaintFirstLineHdl = rLink; }
Link GetPaintFirstLineHdl() const { return maPaintFirstLineHdl; }
void SetModifyHdl( const Link& rLink );
Link GetModifyHdl() const;
void SetNotifyHdl( const Link& rLink );
Link GetNotifyHdl() const;
void SetStatusEventHdl( const Link& rLink );
Link GetStatusEventHdl() const;
void Draw( OutputDevice* pOutDev, const Rectangle& rOutRect );
void Draw( OutputDevice* pOutDev, const Rectangle& rOutRect, const Point& rStartDocPos );
void Draw( OutputDevice* pOutDev, const Point& rStartPos, short nOrientation = 0 );
const Size& GetPaperSize() const;
void SetPaperSize( const Size& rSize );
void SetFirstPageNumber( USHORT n ) { nFirstPage = n; }
USHORT GetFirstPageNumber() const { return nFirstPage; }
void SetPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon );
void SetPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::B2DPolyPolygon* pLinePolyPolygon);
void ClearPolygon();
const PolyPolygon* GetPolygon();
const Size& GetMinAutoPaperSize() const;
void SetMinAutoPaperSize( const Size& rSz );
const Size& GetMaxAutoPaperSize() const;
void SetMaxAutoPaperSize( const Size& rSz );
void SetDefTab( USHORT nTab );
USHORT GetDefTab() const;
BOOL IsFlatMode() const;
void SetFlatMode( BOOL bFlat );
void EnableAutoColor( BOOL b );
BOOL IsAutoColorEnabled() const;
void ForceAutoColor( BOOL b );
BOOL IsForceAutoColor() const;
EBulletInfo GetBulletInfo( USHORT nPara );
void SetWordDelimiters( const String& rDelimiters );
String GetWordDelimiters() const;
String GetWord( USHORT nPara, xub_StrLen nIndex );
void StripPortions();
// #101498#
virtual void DrawingText(
const Point& rStartPos, const String& rText, USHORT nTextStart, USHORT nTextLen,
const sal_Int32* pDXArray, const SvxFont& rFont, USHORT nPara, xub_StrLen 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);
Size CalcTextSize();
Point GetDocPos( Paragraph* pPara );
void SetStyleSheetPool( SfxStyleSheetPool* pSPool );
SfxStyleSheetPool* GetStyleSheetPool();
BOOL IsInSelectionMode() const;
void SetStyleSheet( ULONG nPara, SfxStyleSheet* pStyle );
SfxStyleSheet* GetStyleSheet( ULONG nPara );
void SetParaAttribs( USHORT nPara, const SfxItemSet& );
SfxItemSet GetParaAttribs( USHORT nPara );
void Remove( Paragraph* pPara, ULONG nParaCount );
BOOL Expand( Paragraph* );
BOOL Collapse( Paragraph* );
void SetParaFlag( Paragraph* pPara, sal_uInt16 nFlag );
void RemoveParaFlag( Paragraph* pPara, sal_uInt16 nFlag );
bool HasParaFlag( const Paragraph* pPara, sal_uInt16 nFlag ) const;
// gibt ein Array mit den Bulletbreiten der n Einrueckebenen
// zurueck. Letzter Wert muss -1 sein. Wird vom Outliner geloescht.
Link GetWidthArrReqHdl() const{ return aWidthArrReqHdl; }
void SetWidthArrReqHdl(const Link& rLink){aWidthArrReqHdl=rLink; }
void SetControlWord( ULONG nWord );
ULONG GetControlWord() const;
Link GetBeginMovingHdl() const { return aBeginMovingHdl; }
void SetBeginMovingHdl(const Link& rLink) {aBeginMovingHdl=rLink;}
Link GetEndMovingHdl() const {return aEndMovingHdl;}
void SetEndMovingHdl( const Link& rLink){aEndMovingHdl=rLink;}
ULONG GetLineCount( ULONG nParagraph ) const;
USHORT GetLineLen( ULONG nParagraph, USHORT nLine ) const;
ULONG GetLineHeight( ULONG nParagraph, ULONG nLine = 0 );
// nFormat muss ein Wert aus dem enum EETextFormat sein (wg.CLOOKS)
ULONG Read( SvStream& rInput, const String& rBaseURL, USHORT, SvKeyValueIterator* pHTTPHeaderAttrs = NULL );
SfxUndoManager& GetUndoManager();
void QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel );
void QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel );
void QuickInsertLineBreak( const ESelection& rSel );
// nur fuer EditEngine-Modus
void QuickInsertText( const String& rText, const ESelection& rSel );
void QuickDelete( const ESelection& rSel );
void QuickRemoveCharAttribs( USHORT nPara, USHORT nWhich = 0 );
void QuickFormatDoc( BOOL bFull = FALSE );
BOOL UpdateFields();
void RemoveFields( BOOL bKeepFieldText, TypeId aType = NULL );
virtual void FieldClicked( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos );
virtual void FieldSelected( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos );
virtual String CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos, Color*& rTxtColor, Color*& rFldColor );
void SetSpeller( ::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XSpellChecker1 > &xSpeller );
::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XSpellChecker1 >
GetSpeller();
::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XHyphenator >
GetHyphenator() const;
void SetHyphenator( ::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XHyphenator >& xHyph );
void SetForbiddenCharsTable( vos::ORef<SvxForbiddenCharactersTable> xForbiddenChars );
vos::ORef<SvxForbiddenCharactersTable> GetForbiddenCharsTable() const;
// Depricated
void SetDefaultLanguage( LanguageType eLang );
LanguageType GetDefaultLanguage() const;
BOOL HasOnlineSpellErrors() const;
void CompleteOnlineSpelling();
EESpellState HasSpellErrors();
BOOL HasText( const SvxSearchItem& rSearchItem );
virtual BOOL SpellNextDocument();
// for text conversion
sal_Bool HasConvertibleTextPortion( LanguageType nLang );
virtual BOOL ConvertNextDocument();
void SetEditTextObjectPool( SfxItemPool* pPool );
SfxItemPool* GetEditTextObjectPool() const;
void SetRefDevice( OutputDevice* pRefDev );
OutputDevice* GetRefDevice() const;
USHORT GetFirstLineOffset( ULONG nParagraph );
ULONG GetTextHeight() const;
ULONG GetTextHeight( ULONG nParagraph ) const;
Point GetDocPosTopLeft( ULONG nParagraph );
Point GetDocPos( const Point& rPaperPos ) const;
BOOL IsTextPos( const Point& rPaperPos, USHORT nBorder = 0 );
BOOL IsTextPos( const Point& rPaperPos, USHORT nBorder, BOOL* pbBuuletPos );
void SetGlobalCharStretching( USHORT nX = 100, USHORT nY = 100 );
void GetGlobalCharStretching( USHORT& rX, USHORT& rY );
void DoStretchChars( USHORT nX, USHORT nY );
void EraseVirtualDevice();
void SetBigTextObjectStart( USHORT nStartAtPortionCount );
USHORT GetBigTextObjectStart() const;
BOOL ShouldCreateBigTextObject() const;
const EditEngine& GetEditEngine() const { return *((EditEngine*)pEditEngine); }
// this is needed for StarOffice Api
void SetLevelDependendStyleSheet( USHORT nPara );
USHORT GetOutlinerMode() const { return nOutlinerMode & OUTLINERMODE_USERMASK; }
void StartSpelling(EditView& rEditView, sal_Bool bMultipleDoc);
//spell and return a sentence
bool SpellSentence(EditView& rEditView, ::svx::SpellPortions& rToFill, bool bIsGrammarChecking );
2008-12-15 12:01:46 +00:00
// put spell position to start of current sentence
void PutSpellingToSentenceStart( EditView& rEditView );
//applies a changed sentence
void ApplyChangedSentence(EditView& rEditView, const ::svx::SpellPortions& rNewPortions, bool bIsGrammarChecking );
void EndSpelling();
/** sets a link that is called at the beginning of a drag operation at an edit view */
void SetBeginDropHdl( const Link& rLink );
Link GetBeginDropHdl() const;
/** sets a link that is called at the end of a drag operation at an edit view */
void SetEndDropHdl( const Link& rLink );
Link GetEndDropHdl() const;
/** sets a link that is called before a drop or paste operation. */
void SetBeginPasteOrDropHdl( const Link& rLink );
Link GetBeginPasteOrDropHdl() const { return maBeginPasteOrDropHdl; }
/** sets a link that is called after a drop or paste operation. */
void SetEndPasteOrDropHdl( const Link& rLink );
Link GetEndPasteOrDropHdl() const { return maEndPasteOrDropHdl; }
virtual sal_Int16 GetNumberingStartValue( sal_uInt16 nPara );
virtual void SetNumberingStartValue( sal_uInt16 nPara, sal_Int16 nNumberingStartValue );
virtual sal_Bool IsParaIsNumberingRestart( sal_uInt16 nPara );
virtual void SetParaIsNumberingRestart( sal_uInt16 nPara, sal_Bool bParaIsNumberingRestart );
};
#endif