2000-09-18 11:07:07 -05:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-10 15:27:39 -05:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2010-02-12 08:01:35 -06:00
|
|
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2008-04-10 15:27:39 -05:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2008-04-10 15:27:39 -05:00
|
|
|
* This file is part of OpenOffice.org.
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2008-04-10 15:27:39 -05: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 11:07:07 -05:00
|
|
|
*
|
2008-04-10 15:27:39 -05: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 11:07:07 -05:00
|
|
|
*
|
2008-04-10 15:27:39 -05: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 11:07:07 -05:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
#ifndef _OUTLINFO_HXX
|
|
|
|
#define _OUTLINFO_HXX
|
|
|
|
|
|
|
|
#include <tools/gen.hxx>
|
|
|
|
#include <vcl/outdev.hxx>
|
|
|
|
|
|
|
|
// ---------------
|
|
|
|
// - SdLaserInfo -
|
|
|
|
// ---------------
|
|
|
|
|
|
|
|
struct OutlinerCharacter
|
|
|
|
{
|
|
|
|
Rectangle aRect;
|
|
|
|
ULONG nPara;
|
|
|
|
Color aColor;
|
|
|
|
|
2002-08-01 08:57:46 -05:00
|
|
|
// #101500# Removed CharCode, it's only used in one place to compare
|
|
|
|
// for single space character. This can be done at creation, too.
|
|
|
|
//USHORT nCharCode;
|
|
|
|
|
|
|
|
OutlinerCharacter( const Rectangle& _rRect, ULONG _nPara, const Color& _rCol /* #101500#, USHORT _nCharCode*/ )
|
|
|
|
: aRect( _rRect ),
|
|
|
|
nPara( _nPara ),
|
|
|
|
aColor( _rCol )
|
|
|
|
{
|
|
|
|
}
|
2000-09-18 11:07:07 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
struct OutlinerParagraph
|
|
|
|
{
|
|
|
|
Rectangle aRect;
|
|
|
|
ULONG nCharCount;
|
|
|
|
|
|
|
|
OutlinerParagraph() : nCharCount( 0 ) {}
|
|
|
|
~OutlinerParagraph() {};
|
|
|
|
};
|
|
|
|
|
|
|
|
// ----------------
|
|
|
|
// - OutlinerInfo -
|
|
|
|
// ----------------
|
|
|
|
|
|
|
|
class DrawPortionInfo;
|
|
|
|
class SdDrawDocument;
|
|
|
|
class SdrRectObj;
|
|
|
|
|
|
|
|
class OutlinerInfo
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
|
|
|
|
List aCharacterList;
|
|
|
|
Rectangle aObjBound;
|
|
|
|
Rectangle aParaBound;
|
|
|
|
Point aTextOffset;
|
|
|
|
OutlinerParagraph* pParagraphs;
|
2006-12-12 10:46:33 -06:00
|
|
|
OutputDevice* mpOut;
|
2000-09-18 11:07:07 -05:00
|
|
|
ULONG nParaCount;
|
|
|
|
ULONG nCurPara;
|
|
|
|
long nExtraData;
|
|
|
|
BOOL bInit;
|
2001-03-20 09:49:46 -06:00
|
|
|
BOOL mbVertical;
|
2000-09-18 11:07:07 -05:00
|
|
|
|
2006-12-12 10:46:33 -06:00
|
|
|
OutlinerInfo( const OutlinerInfo& ) {}
|
|
|
|
OutlinerInfo& operator=( const OutlinerInfo& ) { return *this; }
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
DECL_LINK( DrawPortionHdl, DrawPortionInfo* );
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
OutlinerInfo();
|
|
|
|
~OutlinerInfo();
|
|
|
|
|
|
|
|
void Clear();
|
|
|
|
|
|
|
|
void SetTextObj( SdDrawDocument* pDoc, SdrRectObj* pObj, OutputDevice* _pOut );
|
|
|
|
|
|
|
|
const Rectangle& GetObjRect() const { return aObjBound; }
|
|
|
|
const Rectangle& GetTextRect() const { return aParaBound; }
|
|
|
|
const Point& GetTextOffset() const { return aTextOffset; }
|
|
|
|
|
2008-10-10 08:02:43 -05:00
|
|
|
ULONG GetParaCount() const { return nParaCount; }
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
const Rectangle& GetParaRect( const ULONG nPara ) const;
|
|
|
|
BOOL GetParaCharCount( const ULONG nPara ) const;
|
|
|
|
|
|
|
|
ULONG GetCharacterCount() const { return aCharacterList.Count(); }
|
|
|
|
OutlinerCharacter* GetCharacter( ULONG nPos ) const { return (OutlinerCharacter*) aCharacterList.GetObject( nPos ); };
|
|
|
|
OutlinerCharacter* GetFirstCharacter() { return (OutlinerCharacter*) aCharacterList.First(); }
|
|
|
|
OutlinerCharacter* GetNextCharacter() { return (OutlinerCharacter*) aCharacterList.Next(); }
|
|
|
|
|
|
|
|
void SetExtraData( const long _nExtraData = 0L ) { nExtraData = _nExtraData; }
|
2008-10-10 08:02:43 -05:00
|
|
|
long GetExtraData() const { return nExtraData; }
|
2001-03-20 09:49:46 -06:00
|
|
|
|
|
|
|
BOOL IsVertical() const { return mbVertical; }
|
2000-09-18 11:07:07 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|