diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2007-04-11 15:03:13 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2007-04-11 15:03:13 +0000 |
commit | 1effdaa05ef31b3c7beff98f640214e6c3883d1e (patch) | |
tree | 42d07a7ccdb1d5121c2ba7e8c35c7fd250e6843e /svx/inc | |
parent | 1de539e580635ccf431c5b31dbb1b4a969793518 (diff) |
INTEGRATION: CWS hedaburemove01 (1.1.2); FILE ADDED
2007/02/09 16:53:22 vg 1.1.2.1: #72503# get rid of hedabu procedure: Moving headers to svx/inc/svx and correspondent necessary changes
Diffstat (limited to 'svx/inc')
-rw-r--r-- | svx/inc/svx/numitem.hxx | 358 | ||||
-rw-r--r-- | svx/inc/svx/obj3d.hxx | 655 | ||||
-rw-r--r-- | svx/inc/svx/optlingu.hxx | 209 | ||||
-rw-r--r-- | svx/inc/svx/orphitem.hxx | 90 |
4 files changed, 1312 insertions, 0 deletions
diff --git a/svx/inc/svx/numitem.hxx b/svx/inc/svx/numitem.hxx new file mode 100644 index 000000000000..71917e0e9af5 --- /dev/null +++ b/svx/inc/svx/numitem.hxx @@ -0,0 +1,358 @@ +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: numitem.hxx,v $ + * + * $Revision: 1.2 $ + * + * last change: $Author: vg $ $Date: 2007-04-11 16:02:40 $ + * + * The Contents of this file are made available subject to + * the terms of GNU Lesser General Public License Version 2.1. + * + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2005 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + ************************************************************************/ +#ifndef _SVX_NUMITEM_HXX +#define _SVX_NUMITEM_HXX + +// include --------------------------------------------------------------- + +#ifndef _LINK_HXX //autogen +#include <tools/link.hxx> +#endif +#ifndef _STRING_HXX //autogen +#include <tools/string.hxx> +#endif +#ifndef _SFXPOOLITEM_HXX //autogen +#include <svtools/poolitem.hxx> +#endif +#ifndef _SVX_SVXENUM_HXX //autogen +#include <svx/svxenum.hxx> +#endif +#ifndef _SV_GEN_HXX //autogen +#include <tools/gen.hxx> +#endif +#ifndef _SVX_NUMDEF_HXX //autogen +#include <svx/numdef.hxx> +#endif +#ifndef _SV_COLOR_HXX //autogen +#include <tools/color.hxx> +#endif +#ifndef _CPPUHELPER_WEAKREF_HXX_ +#include <cppuhelper/weakref.hxx> +#endif +#ifndef _COM_SUN_STAR_LANG_LOCALE_HPP_ +#include <com/sun/star/lang/Locale.hpp> +#endif +#ifndef _COM_SUN_STAR_UNO_REFERENCE_H_ +#include <com/sun/star/uno/Reference.h> +#endif +#ifndef _COM_SUN_STAR_STYLE_NUMBERINGTYPE_HPP_ +#include <com/sun/star/style/NumberingType.hpp> +#endif +#ifndef _SV_FONTCVT_HXX +#include <vcl/fontcvt.hxx> +#endif + +#ifndef INCLUDED_SVXDLLAPI_H +#include "svx/svxdllapi.h" +#endif + +class SvxBrushItem; +class Font; +class Graphic; +class SvxNodeNum; +class BitmapEx; +namespace com{namespace sun{ namespace star{ + namespace text{ + class XNumberingFormatter; + } +}}} + +// ----------------------------------------------------------------------- +//Feature-Flags (only USHORT!) +#define NUM_CONTINUOUS 0x0001 // fortlaufende Numerierung moeglich? +#define NUM_CHAR_TEXT_DISTANCE 0x0002 // Abstand Symbol<->Text? +#define NUM_CHAR_STYLE 0x0004 // Zeichenvorlagen? +#define NUM_BULLET_REL_SIZE 0x0008 // rel. Bulletgroesse? +#define NUM_BULLET_COLOR 0x0010 // Bullet color +#define NUM_SYMBOL_ALIGNMENT 0x0040 // alignment soll unter den Optionen angezeigt werden +#define NUM_NO_NUMBERS 0x0080 // Numberierungen sind nicht erlaubt +#define NUM_ENABLE_LINKED_BMP 0x0100 // linked bitmaps are available +#define NUM_ENABLE_EMBEDDED_BMP 0x0200 // embedded bitmaps are available + +#define SVX_NO_NUM 200 // Markierung fuer keine Numerierung +#define SVX_NO_NUMLEVEL 0x20 + +#define NUMITEM_VERSION_01 0x01 +#define NUMITEM_VERSION_02 0x02 +#define NUMITEM_VERSION_03 0x03 + +#define LINK_TOKEN 0x80 //indicate linked bitmaps - for use in dialog only +class SVX_DLLPUBLIC SvxNumberType +{ + static sal_Int32 nRefCount; + static com::sun::star::uno::Reference<com::sun::star::text::XNumberingFormatter> xFormatter; + + sal_Int16 nNumType; + sal_Bool bShowSymbol; // Symbol auch anzeigen? + +public: + SvxNumberType(sal_Int16 nType = com::sun::star::style::NumberingType::ARABIC); + SvxNumberType(const SvxNumberType& rType); + ~SvxNumberType(); + + String GetNumStr( ULONG nNo ) const; + String GetNumStr( ULONG nNo, const com::sun::star::lang::Locale& rLocale ) const; + + void SetNumberingType(sal_Int16 nSet) {nNumType = nSet;} + sal_Int16 GetNumberingType() const {return nNumType;} + + void SetShowSymbol(sal_Bool bSet) {bShowSymbol = bSet;} + sal_Bool IsShowSymbol()const{return bShowSymbol;} + + sal_Bool IsTxtFmt() const + { + return com::sun::star::style::NumberingType::NUMBER_NONE != nNumType && + com::sun::star::style::NumberingType::CHAR_SPECIAL != nNumType && + com::sun::star::style::NumberingType::BITMAP != nNumType; + } +}; + +class SVX_DLLPUBLIC SvxNumberFormat : public SvxNumberType +{ + String sPrefix; + String sSuffix; + + SvxAdjust eNumAdjust; + + BYTE nInclUpperLevels; //Nummern aus der vorigen Ebenen uebernehmen + USHORT nStart; //Start der Zaehlung + + sal_Unicode cBullet; //Symbol + USHORT nBulletRelSize; //proz. Groesse des Bullets + Color nBulletColor; //Bullet color + + short nFirstLineOffset; //Erstzeileneinzug + short nAbsLSpace; //Abstand Rand<->Nummer + short nLSpace; //relative Einrueckung zum Vorgaenger + short nCharTextDistance; //Abstand Nummer<->Text + + SvxBrushItem* pGraphicBrush; // + SvxFrameVertOrient eVertOrient; // vert. Ausrichtung einer Bitmap + + Size aGraphicSize; // immer! in 1/100 mm + Font* pBulletFont; // Pointer auf den BulletFont + + String sCharStyleName; // Zeichenvorlage + + BitmapEx* pScaledImageCache; // Image scaled to aGraphicSize, only cached for WINDOW/VDEV + + DECL_STATIC_LINK( SvxNumberFormat, GraphicArrived, void * ); + virtual void NotifyGraphicArrived(); +public: + SvxNumberFormat(sal_Int16 nNumberingType); + SvxNumberFormat(const SvxNumberFormat& rFormat); + SvxNumberFormat(SvStream &rStream); + virtual ~SvxNumberFormat(); + + SvStream& Store(SvStream &rStream, FontToSubsFontConverter pConverter); + + SvxNumberFormat& operator=( const SvxNumberFormat& ); + BOOL operator==( const SvxNumberFormat& ) const; + BOOL operator!=( const SvxNumberFormat& rFmt) const {return !(*this == rFmt);} + + void SetNumAdjust(SvxAdjust eSet) {eNumAdjust = eSet;} + SvxAdjust GetNumAdjust() const {return eNumAdjust;} + void SetPrefix(const String& rSet) { sPrefix = rSet;} + const String& GetPrefix() const { return sPrefix;} + void SetSuffix(const String& rSet) { sSuffix = rSet;} + const String& GetSuffix() const { return sSuffix;} + + void SetCharFmtName(const String& rSet){ sCharStyleName = rSet; } + virtual const String& GetCharFmtName()const; + + void SetBulletFont(const Font* pFont); + const Font* GetBulletFont() const {return pBulletFont;} + void SetBulletChar(sal_Unicode cSet){cBullet = cSet;} + sal_Unicode GetBulletChar()const {return cBullet;} + void SetBulletRelSize(USHORT nSet) {nBulletRelSize = nSet;} + USHORT GetBulletRelSize() const { return nBulletRelSize;} + void SetBulletColor(Color nSet){nBulletColor = nSet;} + Color GetBulletColor()const {return nBulletColor;} + + void SetIncludeUpperLevels( BYTE nSet ) { nInclUpperLevels = nSet;} + BYTE GetIncludeUpperLevels()const { return nInclUpperLevels;} + void SetStart(USHORT nSet) {nStart = nSet;} + USHORT GetStart() const {return nStart;} + + virtual void SetGraphicBrush( const SvxBrushItem* pBrushItem, const Size* pSize = 0, const SvxFrameVertOrient* pOrient = 0); + const SvxBrushItem* GetBrush() const {return pGraphicBrush;} + void SetGraphic( const String& rName ); + virtual void SetVertOrient(SvxFrameVertOrient eSet); + virtual SvxFrameVertOrient GetVertOrient() const; + void SetGraphicSize(const Size& rSet) {aGraphicSize = rSet;} + const Size& GetGraphicSize() const {return aGraphicSize;} + + void SetLSpace(short nSet) {nLSpace = nSet;} + short GetLSpace() const {return nLSpace;} + void SetAbsLSpace(short nSet) {nAbsLSpace = nSet;} + short GetAbsLSpace() const {return nAbsLSpace;} + void SetFirstLineOffset(short nSet) { nFirstLineOffset = nSet;} + short GetFirstLineOffset() const {return nFirstLineOffset; } + void SetCharTextDistance(short nSet) { nCharTextDistance = nSet; } + short GetCharTextDistance() const {return nCharTextDistance;} + + static Size GetGraphicSizeMM100(const Graphic* pGraphic); + static String CreateRomanString( ULONG nNo, BOOL bUpper ); +}; + +enum SvxNumRuleType +{ + SVX_RULETYPE_NUMBERING, + SVX_RULETYPE_OUTLINE_NUMBERING, + SVX_RULETYPE_PRESENTATION_NUMBERING, + SVX_RULETYPE_END +}; + +class SVX_DLLPUBLIC SvxNumRule +{ + USHORT nLevelCount; // Anzahl der unterstuetzten Levels + ULONG nFeatureFlags; // was wird unterstuetzt? + SvxNumRuleType eNumberingType; // was fuer eine Numerierung + BOOL bContinuousNumbering; // fortlaufende Numerierung + + SvxNumberFormat* aFmts[SVX_MAX_NUM]; + BOOL aFmtsSet[SVX_MAX_NUM]; //Flags ueber Gueltigkeit der Ebenen + + static sal_Int32 nRefCount; + com::sun::star::lang::Locale aLocale; +public: + SvxNumRule(ULONG nFeatures, USHORT nLevels, BOOL bCont, SvxNumRuleType eType = SVX_RULETYPE_NUMBERING); + SvxNumRule(const SvxNumRule& rCopy); + SvxNumRule(SvStream &rStream); + virtual ~SvxNumRule(); + + int operator==( const SvxNumRule& ) const; + int operator!=( const SvxNumRule& rRule ) const {return !(*this == rRule);} + + SvxNumRule& operator=( const SvxNumRule& ); + + SvStream& Store(SvStream &rStream); + + const SvxNumberFormat* Get(USHORT nLevel)const; + const SvxNumberFormat& GetLevel(USHORT nLevel)const; + void SetLevel(USHORT nLevel, const SvxNumberFormat& rFmt, BOOL bIsValid = TRUE); + void SetLevel(USHORT nLevel, const SvxNumberFormat* pFmt); + + BOOL IsContinuousNumbering()const + {return bContinuousNumbering;} + void SetContinuousNumbering(BOOL bSet) + {bContinuousNumbering = bSet;} + + USHORT GetLevelCount() const {return nLevelCount;} + BOOL IsFeatureSupported(ULONG nFeature) const + {return 0 != (nFeatureFlags & nFeature);} + ULONG GetFeatureFlags() const {return nFeatureFlags;} + void SetFeatureFlag( ULONG nFlag, BOOL bSet = TRUE ) { if(bSet) nFeatureFlags |= nFlag; else nFeatureFlags &= ~nFlag; } + + String MakeNumString( const SvxNodeNum&, BOOL bInclStrings = TRUE ) const; + + SvxNumRuleType GetNumRuleType() const { return eNumberingType; } + void SetNumRuleType( const SvxNumRuleType& rType ) { eNumberingType = rType; } + + BOOL UnLinkGraphics(); +}; +/* -----------------27.10.98 13:04------------------- + * + * --------------------------------------------------*/ +class SVX_DLLPUBLIC SvxNumBulletItem : public SfxPoolItem +{ + SvxNumRule* pNumRule; +public: + SvxNumBulletItem(SvxNumRule& rRule); + SvxNumBulletItem(SvxNumRule& rRule, USHORT nWhich ); + SvxNumBulletItem(const SvxNumBulletItem& rCopy); + virtual ~SvxNumBulletItem(); + + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; + virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual int operator==( const SfxPoolItem& ) const; + + SvxNumRule* GetNumRule() const {return pNumRule;} + + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); +}; +/* -----------------28.10.98 15:21------------------- + * + * --------------------------------------------------*/ +class SvxNodeNum +{ + USHORT nLevelVal[ SVX_MAX_NUM ]; // Nummern aller Levels + USHORT nSetValue; // vorgegebene Nummer + BYTE nMyLevel; // akt. Level + BOOL bStartNum; // Numerierung neu starten + +public: + inline SvxNodeNum( BYTE nLevel = SVX_NO_NUM, USHORT nSetVal = USHRT_MAX ); + inline SvxNodeNum& operator=( const SvxNodeNum& rCpy ); + + BYTE GetLevel() const { return nMyLevel; } + void SetLevel( BYTE nVal ) { nMyLevel = nVal; } + + BOOL IsStart() const { return bStartNum; } + void SetStart( BOOL bFlag = TRUE ) { bStartNum = bFlag; } + + USHORT GetSetValue() const { return nSetValue; } + void SetSetValue( USHORT nVal ) { nSetValue = nVal; } + + const USHORT* GetLevelVal() const { return nLevelVal; } + USHORT* GetLevelVal() { return nLevelVal; } +}; + +SvxNodeNum::SvxNodeNum( BYTE nLevel, USHORT nSetVal ) + : nSetValue( nSetVal ), nMyLevel( nLevel ), bStartNum( FALSE ) +{ + memset( nLevelVal, 0, sizeof( nLevelVal ) ); +} + +inline SvxNodeNum& SvxNodeNum::operator=( const SvxNodeNum& rCpy ) +{ + nSetValue = rCpy.nSetValue; + nMyLevel = rCpy.nMyLevel; + bStartNum = rCpy.bStartNum; + + memcpy( nLevelVal, rCpy.nLevelVal, sizeof( nLevelVal ) ); + return *this; +} + +/* -------------------------------------------------- + * + * --------------------------------------------------*/ +SvxNumRule* SvxConvertNumRule( const SvxNumRule* pRule, USHORT nLevel, SvxNumRuleType eType ); + +#endif + diff --git a/svx/inc/svx/obj3d.hxx b/svx/inc/svx/obj3d.hxx new file mode 100644 index 000000000000..a9b75bafbb8b --- /dev/null +++ b/svx/inc/svx/obj3d.hxx @@ -0,0 +1,655 @@ +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: obj3d.hxx,v $ + * + * $Revision: 1.2 $ + * + * last change: $Author: vg $ $Date: 2007-04-11 16:02:52 $ + * + * The Contents of this file are made available subject to + * the terms of GNU Lesser General Public License Version 2.1. + * + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2005 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + ************************************************************************/ + +#ifndef _E3D_OBJ3D_HXX +#define _E3D_OBJ3D_HXX + +#ifndef _SVDOATTR_HXX //autogen +#include <svx/svdoattr.hxx> +#endif + +#ifndef _SVDOBJ_HXX //autogen +#include <svx/svdobj.hxx> +#endif + +#ifndef _VOLUME3D_HXX +#include <svx/volume3d.hxx> +#endif + +#ifndef _DEF3D_HXX +#include <svx/def3d.hxx> +#endif + +#ifndef _SVDPAGE_HXX +#include <svx/svdpage.hxx> +#endif + +#ifndef _E3D_DEFLT3D_HXX +#include <svx/deflt3d.hxx> +#endif + +#ifndef _SV_BITMAP_HXX +#include <vcl/bitmap.hxx> +#endif + +#ifndef _B3D_B3DGEOM_HXX +#include <goodies/b3dgeom.hxx> +#endif + +#ifndef _B3D_MATRIL3D_HXX +#include <goodies/matril3d.hxx> +#endif + +#ifndef _B3D_B3DTEX_HXX +#include <goodies/b3dtex.hxx> +#endif + +#ifndef _B3D_B3DLIGHT_HXX +#include <goodies/b3dlight.hxx> +#endif + +#ifndef _B3D_BASE3D_HXX +#include <goodies/base3d.hxx> +#endif + +#ifndef _SVX3DITEMS_HXX +#include <svx/svx3ditems.hxx> +#endif + +#ifndef _SVX_XFLCLIT_HXX +#include <svx/xflclit.hxx> +#endif + +#ifndef _SFXITEMSET_HXX +#include <svtools/itemset.hxx> +#endif + +#ifndef _BGFX_POLYGON_B3DPOLYPOLYGON_HXX +#include <basegfx/polygon/b3dpolypolygon.hxx> +#endif + +#ifndef _BGFX_POINT_B2DPOINT_HXX +#include <basegfx/point/b2dpoint.hxx> +#endif + +#ifndef _BGFX_POLYGON_B2DPOLYGON_HXX +#include <basegfx/polygon/b2dpolygon.hxx> +#endif + +#ifndef _BGFX_VECTOR_B2ENUMS_HXX +#include <basegfx/vector/b2enums.hxx> +#endif + +#ifndef INCLUDED_SVXDLLAPI_H +#include "svx/svxdllapi.h" +#endif + +//************************************************************ +// Vorausdeklarationen +//************************************************************ + +class SfxPoolItem; +class Viewport3D; +class E3dScene; +class E3dPolyScene; +class Base3D; +namespace basegfx { class B3DPolyPolygon; } + +namespace sdr +{ + namespace properties + { + class BaseProperties; + class E3dProperties; + class E3dCompoundProperties; + class E3dExtrudeProperties; + class E3dLatheProperties; + class E3dSphereProperties; + } // end of namespace properties +} // end of namespace sdr + +/************************************************************************* +|* +|* Defines fuer nDrawFlag in Paint3D +|* +\************************************************************************/ + +#define E3D_DRAWFLAG_FILLED 0x0001 +#define E3D_DRAWFLAG_OUTLINE 0x0002 +#define E3D_DRAWFLAG_TRANSPARENT 0x0004 +#define E3D_DRAWFLAG_GHOSTED 0x0008 + +/************************************************************************* +|* +|* GeoData relevant fuer Undo-Actions +|* +\************************************************************************/ + +class E3DObjGeoData : public SdrObjGeoData +{ +public: + Volume3D aLocalBoundVol; // umschliessendes Volumen des Objekts + basegfx::B3DHomMatrix aTfMatrix; // lokale Transformation + + E3DObjGeoData() {} +}; + +/************************************************************************* +|* +|* Liste fuer 3D-Objekte +|* +\************************************************************************/ + +class E3dObjList : public SdrObjList +{ +public: + TYPEINFO(); + E3dObjList(SdrModel* pNewModel, SdrPage* pNewPage, E3dObjList* pNewUpList=NULL); + E3dObjList(const E3dObjList& rSrcList); + virtual ~E3dObjList(); + + virtual void NbcInsertObject(SdrObject* pObj, ULONG nPos=CONTAINER_APPEND, + const SdrInsertReason* pReason=NULL); + virtual SdrObject* NbcRemoveObject(ULONG nObjNum); + virtual SdrObject* RemoveObject(ULONG nObjNum); +}; + +/************************************************************************* +|* +|* Basisklasse fuer 3D-Objekte +|* +\************************************************************************/ + +class SVX_DLLPUBLIC E3dObject : public SdrAttrObj +{ + virtual sdr::properties::BaseProperties* CreateObjectSpecificProperties(); + + // to allow sdr::properties::E3dProperties access to StructureChanged() + friend class sdr::properties::E3dProperties; + + // Aus der E3dObjList und E3dDragMethod alles erlauben + friend class E3dObjList; + friend class E3dDragMethod; + + protected: + E3dObjList* pSub; // Subliste (Childobjekte) + + Volume3D aBoundVol; // umschliessendes Volumen mit allen Childs + Volume3D aLocalBoundVol; // umschliessendes Volumen des Objekts + basegfx::B3DHomMatrix aTfMatrix; // lokale Transformation + basegfx::B3DHomMatrix aFullTfMatrix; // globale Transformation (inkl. Parents) + + // Flags + unsigned bTfHasChanged : 1; + unsigned bBoundVolValid : 1; + unsigned bIsSelected : 1; + + public: + virtual void SetBoundVolInvalid(); + + protected: + virtual void SetTransformChanged(); + virtual void NewObjectInserted(const E3dObject* p3DObj); + virtual void StructureChanged(const E3dObject* p3DObj); + virtual void RecalcBoundVolume(); + + basegfx::B2DPolyPolygon ImpCreateWireframePoly() const; + +public: + TYPEINFO(); + E3dObject(); + E3dObject(BOOL bIsFromChart); + + virtual void RecalcSnapRect(); + virtual void RecalcBoundRect(); + virtual void SetRectsDirty(sal_Bool bNotMyself = sal_False); + + virtual ~E3dObject(); + + virtual UINT32 GetObjInventor() const; + virtual UINT16 GetObjIdentifier() const; + + virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const; + + virtual void NbcSetLayer(SdrLayerID nLayer); + + virtual void SetObjList(SdrObjList* pNewObjList); + virtual void SetPage(SdrPage* pNewPage); + virtual void SetModel(SdrModel* pNewModel); + virtual void NbcMove(const Size& rSize); + virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact); + + virtual SdrObjList* GetSubList() const; + + virtual basegfx::B2DPolyPolygon TakeXorPoly(sal_Bool bDetail) const; + virtual sal_uInt32 GetHdlCount() const; + virtual void AddToHdlList(SdrHdlList& rHdlList) const; + virtual FASTBOOL HasSpecialDrag() const; + + // 3D-Zeichenmethode + virtual void Paint3D(XOutputDevice& rOut, Base3D* pBase3D, + const SdrPaintInfoRec& rInfoRec, UINT16 nDrawFlags=0); + + // Objekt als Kontur in das Polygon einfuegen + virtual basegfx::B2DPolyPolygon ImpTakeContour3D() const; + + // Schatten fuer 3D-Objekte zeichnen + virtual void DrawShadows(Base3D *pBase3D, XOutputDevice& rXOut, + const Rectangle& rBound, const Volume3D& rVolume, + const SdrPaintInfoRec& rInfoRec); + + // 3D-Objekt in die Gruppe einfuegen; Eigentumsuebergang! + virtual void Insert3DObj(E3dObject* p3DObj); + void Remove3DObj(E3dObject* p3DObj); + + E3dObject* GetParentObj() const; + virtual E3dScene* GetScene() const; + + const Volume3D& GetLocalBoundVolume() { return aLocalBoundVol; } + virtual const Volume3D& GetBoundVolume() const; + basegfx::B3DPoint GetCenter(); + + // komplette Transformation inklusive aller Parents berechnen + const basegfx::B3DHomMatrix& GetFullTransform() const; + + // Transformationsmatrix abfragen bzw. (zurueck)setzen + virtual const basegfx::B3DHomMatrix& GetTransform() const; + virtual void NbcSetTransform(const basegfx::B3DHomMatrix& rMatrix); + virtual void NbcResetTransform(); + virtual void SetTransform(const basegfx::B3DHomMatrix& rMatrix); + virtual void ResetTransform(); + + // Translation + virtual void NbcTranslate(const basegfx::B3DVector& rTrans); + virtual void Translate(const basegfx::B3DVector& rTrans); + // Skalierung + virtual void NbcScaleX (double fSx); + virtual void NbcScaleY (double fSy); + virtual void NbcScaleZ (double fSz); + virtual void NbcScale (double fSx, double fSy, double fSz); + virtual void NbcScale (double fS); + + virtual void ScaleX (double fSx); + virtual void ScaleY (double fSy); + virtual void ScaleZ (double fSz); + virtual void Scale (double fSx, double fSy, double fSz); + virtual void Scale (double fS); + + // Rotation mit Winkel in Radiant + virtual void NbcRotateX(double fAng); + virtual void NbcRotateY(double fAng); + virtual void NbcRotateZ(double fAng); + + virtual void RotateX(double fAng); + virtual void RotateY(double fAng); + virtual void RotateZ(double fAng); + + // [FG] 2D-Rotationen, werden hier als Rotationen um die Z-Achse, die in den Bildschirm zeigt, + // implementiert plus eine Verschiebung der Scene. Dies bedeutet auch die Scene (E3dScene) + // muss diese Routine in der Klasse als virtual definieren. + virtual void NbcRotate(const Point& rRef, long nWink, double sn, double cs); + + // Transformation auf die Koordinaten (nicht auf die lokale Matrix) + // eines Objekts und seiner Childs anwenden; Objekte, die eigene + // Koordinaten speichern, muessen diese Methode implementieren + // Wireframe-Darstellung des Objekts erzeugen und die Linien als + // Punkt-Paare in rPoly3D ablegen + void CreateWireframe(basegfx::B3DPolygon& rWirePoly, const basegfx::B3DHomMatrix* pTf = 0L) const; + + // TakeObjName...() ist fuer die Anzeige in der UI, z.B. "3 Rahmen selektiert". + virtual void TakeObjNameSingul(String& rName) const; + virtual void TakeObjNamePlural(String& rName) const; + USHORT GetLogicalGroup() { return 0; } + virtual void operator=(const SdrObject&); + + virtual SdrObjGeoData *NewGeoData() const; + virtual void SaveGeoData(SdrObjGeoData& rGeo) const; + virtual void RestGeoData(const SdrObjGeoData& rGeo); + + // Selektion Setzen/Lesen + BOOL GetSelected() { return bIsSelected; } + void SetSelected(BOOL bNew); + + // Aufbrechen + virtual BOOL IsBreakObjPossible(); + virtual SdrAttrObj* GetBreakObj(); +}; + +/************************************************************************* +|* +|* Klasse fuer alle zusammengesetzen Objekte (Cube, Lathe, Scene, Extrude) +|* Diese Klasse erspart ein paar ISA-Abfragen und sie beschleunigt das +|* Verhalten ungemein, da alle Attribute usw. fuer die untergeordneten +|* Polygone hierueber gehalten werden. Die Polygone duerfen nur Attribute +|* halten, wenn sie direkt einer Szene untergeordnet sind. +|* +\************************************************************************/ + +class SVX_DLLPUBLIC E3dCompoundObject : public E3dObject +{ + virtual sdr::properties::BaseProperties* CreateObjectSpecificProperties(); + + // to allow sdr::properties::E3dCompoundProperties access to SetGeometryValid() + friend class sdr::properties::E3dCompoundProperties; + friend class sdr::properties::E3dExtrudeProperties; + friend class sdr::properties::E3dLatheProperties; + friend class sdr::properties::E3dSphereProperties; + + // for access from E3dCompoundProperties only + void InvalidateGeometry() { bGeometryValid = sal_False; } + +protected: + // Die Darstellungsgeometrie dieses Objektes + B3dGeometry aDisplayGeometry; + + // Material des Objektes + Color aMaterialAmbientColor; + B3dMaterial aBackMaterial; + + // Attribute zur Geometrieerzeugung + unsigned bCreateNormals : 1; + unsigned bCreateTexture : 1; + + // Wird zwischen Vorder- und Hintergrundmaterial unterschieden + unsigned bUseDifferentBackMaterial : 1; + + // Geometrie gueltig? + unsigned bGeometryValid : 1; + + // THB: Temporary fix for SJ's flipping problem + // TODO: Clarify with AW + unsigned bFullTfIsPositive : 1; + +protected: + // Hilfsfunktionen zur Geometrieerzeugung + basegfx::B3DPolyPolygon ImpGrowPoly( + const basegfx::B3DPolyPolygon& rPolyPolyGrow, + const basegfx::B3DPolyPolygon& rPolyPolyNormals, + double fFactor); + basegfx::B2VectorOrientation ImpGetOrientationInPoint( + const basegfx::B3DPolygon& rPolygon, + sal_uInt32 nIndex); + basegfx::B3DPolyPolygon ImpCorrectGrownPoly( + const basegfx::B3DPolyPolygon& aToBeCorrected, + const basegfx::B3DPolyPolygon& aOriginal); + + basegfx::B3DPolyPolygon ImpScalePoly( + const basegfx::B3DPolyPolygon& rPolyPolyScale, + double fFactor); + + void ImpCreateFront( + const basegfx::B3DPolyPolygon& rPolyPoly3D, + const basegfx::B3DPolyPolygon& rFrontNormals, + BOOL bCreateNormals = TRUE, + BOOL bCreateTexture = TRUE); + void ImpCreateBack( + const basegfx::B3DPolyPolygon& rPolyPoly3D, + const basegfx::B3DPolyPolygon& rBackNormals, + BOOL bCreateNormals = TRUE, + BOOL bCreateTexture = TRUE); + + basegfx::B3DPolyPolygon ImpCreateByPattern(const basegfx::B3DPolyPolygon& rPattern); + basegfx::B3DPolyPolygon ImpAddFrontNormals( + const basegfx::B3DPolyPolygon& rNormalsFront, + const basegfx::B3DPoint& rOffset); + basegfx::B3DPolyPolygon ImpAddBackNormals( + const basegfx::B3DPolyPolygon& rNormalsBack, + const basegfx::B3DPoint& rOffset); + + basegfx::B3DPolyPolygon ImpAddInBetweenNormals( + const basegfx::B3DPolyPolygon& rPolyPolyFront, + const basegfx::B3DPolyPolygon& rPolyPolyBack, + const basegfx::B3DPolyPolygon& rNormals, + BOOL bSmoothed = TRUE); + void ImpCreateInBetween( + const basegfx::B3DPolyPolygon& rPolyPolyFront, + const basegfx::B3DPolyPolygon& rPolyPolyBack, + const basegfx::B3DPolyPolygon& rFrontNormals, + const basegfx::B3DPolyPolygon& rBackNormals, + BOOL bCreateNormals = TRUE, + double fSurroundFactor=1.0, + double fTextureStart=0.0, + double fTextureDepth=1.0, + BOOL bRotateTexture90=FALSE); + + // Geometrieerzeugung + void AddGeometry( + const basegfx::B3DPolyPolygon& rPolyPolygon, + BOOL bHintIsComplex=TRUE, + BOOL bOutline=FALSE); + void AddGeometry( + const basegfx::B3DPolyPolygon& rPolyPolygon, + const basegfx::B3DPolyPolygon& rPolyPolygonNormal, + BOOL bHintIsComplex=TRUE, + BOOL bOutline=FALSE); + void AddGeometry( + const basegfx::B3DPolyPolygon& rPolyPolygon, + const basegfx::B3DPolyPolygon& rPolyPolygonNormal, + const basegfx::B2DPolyPolygon& rPolyPolygonTexture, + BOOL bHintIsComplex=TRUE, + BOOL bOutline=FALSE); + void StartCreateGeometry(); + + // Segmenterzeugung + void ImpCreateSegment( + const basegfx::B3DPolyPolygon& rFront, // vorderes Polygon + const basegfx::B3DPolyPolygon& rBack, // hinteres Polygon + const basegfx::B3DPolyPolygon* pPrev = 0L, // smooth uebergang zu Vorgaenger + const basegfx::B3DPolyPolygon* pNext = 0L, // smooth uebergang zu Nachfolger + BOOL bCreateFront = TRUE, // vorderen Deckel erzeugen + BOOL bCreateBack = TRUE, // hinteren Deckel erzeugen + double fPercentDiag = 0.05, // Anteil des Deckels an der Tiefe + BOOL bSmoothLeft = TRUE, // Glaetten der umlaufenden Normalen links + BOOL bSmoothRight = TRUE, // Glaetten der umlaufenden Normalen rechts + BOOL bSmoothFrontBack = FALSE, // Glaetten der Abschlussflaechen + double fSurroundFactor = 1.0, // Wertebereich der Texturkoordinaten im Umlauf + double fTextureStart = 0.0, // TexCoor ueber Extrude-Tiefe + double fTextureDepth = 1.0, // TexCoor ueber Extrude-Tiefe + BOOL bCreateTexture = TRUE, + BOOL bCreateNormals = TRUE, + BOOL bCharacterExtrude = FALSE, // FALSE=exakt, TRUE=ohne Ueberschneidungen + BOOL bRotateTexture90 = FALSE, // Textur der Seitenflaechen um 90 Grad kippen + // #i28528# + basegfx::B3DPolyPolygon* pLineGeometryFront = 0L, // For creation of line geometry front parts + basegfx::B3DPolyPolygon* pLineGeometryBack = 0L, // For creation of line geometry back parts + basegfx::B3DPolyPolygon* pLineGeometry = 0L // For creation of line geometry in-betweens + ); + + // #i28528# + basegfx::B3DPolyPolygon ImpCompleteLinePolygon(const basegfx::B3DPolyPolygon& rLinePolyPoly, sal_uInt32 nPolysPerRun, sal_Bool bClosed); + + void SetDefaultAttributes(E3dDefaultAttributes& rDefault); + + // convert given basegfx::B3DPolyPolygon to screen coor + basegfx::B2DPolyPolygon TransformToScreenCoor(const basegfx::B3DPolyPolygon& rCandidate); + +public : + TYPEINFO(); + + E3dCompoundObject(); + E3dCompoundObject(E3dDefaultAttributes& rDefault); + virtual ~E3dCompoundObject(); + + // DoubleSided: TRUE/FALSE + BOOL GetDoubleSided() const + { return ((const Svx3DDoubleSidedItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_DOUBLE_SIDED)).GetValue(); } + + // NormalsKind: 0 == FALSE/FALSE, 1 == TRUE/FALSE, else == TRUE/TRUE + sal_uInt16 GetNormalsKind() const + { return ((const Svx3DNormalsKindItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_NORMALS_KIND)).GetValue(); } + + // NormalsInvert: TRUE/FALSE + BOOL GetNormalsInvert() const + { return ((const Svx3DNormalsInvertItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_NORMALS_INVERT)).GetValue(); } + + // TextureProjX: 0 == FALSE/FALSE, 1 == TRUE/FALSE, else == TRUE/TRUE + sal_uInt16 GetTextureProjectionX() const + { return ((const Svx3DTextureProjectionXItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_TEXTURE_PROJ_X)).GetValue(); } + + // TextureProjY: 0 == FALSE/FALSE, 1 == TRUE/FALSE, else == TRUE/TRUE + sal_uInt16 GetTextureProjectionY() const + { return ((const Svx3DTextureProjectionYItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_TEXTURE_PROJ_Y)).GetValue(); } + + // Shadow3D: TRUE/FALSE + BOOL GetShadow3D() const + { return ((const Svx3DShadow3DItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_SHADOW_3D)).GetValue(); } + + // MaterialColor: Color + Color GetMaterialColor() const + { return ((const Svx3DMaterialColorItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_MAT_COLOR)).GetValue(); } + + // MaterialEmission: Color + Color GetMaterialEmission() const + { return ((const Svx3DMaterialEmissionItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_MAT_EMISSION)).GetValue(); } + + // MaterialSpecular: Color + Color GetMaterialSpecular() const + { return ((const Svx3DMaterialSpecularItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_MAT_SPECULAR)).GetValue(); } + + // MaterialSpecularIntensity: + sal_uInt16 GetMaterialSpecularIntensity() const + { return ((const Svx3DMaterialSpecularIntensityItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY)).GetValue(); } + + // TextureKind: 1 == Base3DTextureLuminance, 2 == Base3DTextureIntensity, 3 == Base3DTextureColor + Base3DTextureKind GetTextureKind() const + { return (Base3DTextureKind)((const Svx3DTextureKindItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_TEXTURE_KIND)).GetValue(); } + + // TextureMode: 1 == Base3DTextureReplace, 2 == Base3DTextureModulate, 3 == Base3DTextureBlend + Base3DTextureMode GetTextureMode() const + { return (Base3DTextureMode)((const Svx3DTextureModeItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_TEXTURE_MODE)).GetValue(); } + + // TextureFilter: TRUE/FALSE + BOOL GetTextureFilter() const + { return ((const Svx3DTextureFilterItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_TEXTURE_FILTER)).GetValue(); } + + // #i28528# + // Added extra Item (Bool) for chart2 to be able to show reduced line geometry + BOOL GetReducedLineGeometry() const + { return ((const Svx3DReducedLineGeometryItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_REDUCED_LINE_GEOMETRY)).GetValue(); } + + virtual UINT16 GetObjIdentifier() const; + virtual void RecalcSnapRect(); + virtual void RecalcBoundRect(); + virtual const Volume3D& GetBoundVolume() const; + + // Hittest, wird an Geometrie weitergegeben + virtual SdrObject* CheckHit(const Point& rPnt, USHORT nTol, const SetOfByte* pVisiLayer) const; + + // #110988# test if given hit candidate point is inside bound volume of object. Used + // from CheckHit. + sal_Bool ImpIsInsideBoundVolume(const basegfx::B3DPoint& rFront, const basegfx::B3DPoint& rBack, const Point& rPnt) const; + + // 3D-Zeichenmethode + virtual void Paint3D(XOutputDevice& rOut, Base3D* pBase3D, + const SdrPaintInfoRec& rInfoRec, UINT16 nDrawFlags=0); + + // Objekt als Kontur in das Polygon einfuegen + virtual basegfx::B2DPolyPolygon ImpTakeContour3D() const; + + // Schatten fuer 3D-Objekte zeichnen + virtual void DrawShadows(Base3D *pBase3D, XOutputDevice& rXOut, + const Rectangle& rBound, const Volume3D& rVolume, + const SdrPaintInfoRec& rInfoRec); + + // #78972# + basegfx::B2DPolyPolygon ImpGetShadowPolygon() const; + void ImpDrawShadowPolygon(const basegfx::B2DPolyPolygon& rPoly, XOutputDevice& rXOut); + + // Bitmaps fuer 3D-Darstellung von Gradients und Hatches holen + AlphaMask GetAlphaMask(const SfxItemSet& rSet, const Size& rSizePixel); + Bitmap GetGradientBitmap(const SfxItemSet&); + Bitmap GetHatchBitmap(const SfxItemSet&); + + // Geometrieerzeugung + void DestroyGeometry(); + virtual void CreateGeometry(); + void ReCreateGeometry(); + + // Give out simple line geometry + virtual basegfx::B3DPolyPolygon Get3DLineGeometry() const; + + // Parameter Geometrieerzeugung setzen/lesen + BOOL GetCreateNormals() const { return bCreateNormals; } + void SetCreateNormals(BOOL bNew); + + BOOL GetCreateTexture() const { return bCreateTexture; } + void SetCreateTexture(BOOL bNew); + + // Copy-Operator + virtual void operator=(const SdrObject&); + + // Ausgabeparameter an 3D-Kontext setzen + void SetBase3DParams(XOutputDevice& rOut, Base3D*, + BOOL& bDrawObject, BOOL& bDrawOutline, UINT16 nDrawFlags, BOOL bGhosted, + BOOL bIsLineDraft = FALSE, BOOL bIsFillDraft = FALSE); +private: + SVX_DLLPRIVATE sal_Bool ImpSet3DParForFill(XOutputDevice& rOut, Base3D* pBase3D, UINT16 nDrawFlags, BOOL bGhosted, BOOL bIsFillDraft); + SVX_DLLPRIVATE sal_Bool ImpSet3DParForLine(XOutputDevice& rOut, Base3D* pBase3D, UINT16 nDrawFlags, BOOL bGhosted, BOOL bIsLineDraft, BOOL bIsFillDraft); +public: + + // DisplayGeometry rausruecken + const B3dGeometry& GetDisplayGeometry() const; + + // Schattenattribute holen + Color GetShadowColor() const; + BOOL DrawShadowAsOutline() const; + INT32 GetShadowXDistance() const; + INT32 GetShadowYDistance() const; + UINT16 GetShadowTransparence() const; + BOOL DoDrawShadow(); + + // WireFrame Darstellung eines Objektes + void DrawObjectWireframe(XOutputDevice& rOut); + + // Nromalen invertiert benutzen +private: + SVX_DLLPRIVATE void SetInvertNormals(BOOL bNew); +public: + + // Material des Objektes + const Color& GetMaterialAmbientColor() const { return aMaterialAmbientColor; } + void SetMaterialAmbientColor(const Color& rColor); + + const B3dMaterial& GetBackMaterial() const { return aBackMaterial; } + void SetBackMaterial(const B3dMaterial& rNew); + BOOL GetUseDifferentBackMaterial() const { return bUseDifferentBackMaterial; } + void SetUseDifferentBackMaterial(BOOL bNew); + + // #110988# + double GetMinimalDepthInViewCoor(E3dScene& rScene) const; + sal_Bool IsAOrdNumRemapCandidate(E3dScene*& prScene) const; +}; + +#endif // _E3D_OBJ3D_HXX diff --git a/svx/inc/svx/optlingu.hxx b/svx/inc/svx/optlingu.hxx new file mode 100644 index 000000000000..3a980eb69e87 --- /dev/null +++ b/svx/inc/svx/optlingu.hxx @@ -0,0 +1,209 @@ +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: optlingu.hxx,v $ + * + * $Revision: 1.2 $ + * + * last change: $Author: vg $ $Date: 2007-04-11 16:03:02 $ + * + * The Contents of this file are made available subject to + * the terms of GNU Lesser General Public License Version 2.1. + * + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2005 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + ************************************************************************/ +#ifndef _SVX_OPTLINGU_HXX +#define _SVX_OPTLINGU_HXX + +// include --------------------------------------------------------------- + +#ifndef _GROUP_HXX //autogen +#include <vcl/group.hxx> +#endif +#ifndef _FIXED_HXX //autogen +#include <vcl/fixed.hxx> +#endif +#ifndef _TOOLBOX_HXX //autogen +#include <vcl/toolbox.hxx> +#endif +#ifndef _FIELD_HXX //autogen +#include <vcl/field.hxx> +#endif +#ifndef _SFXTABDLG_HXX //autogen +#include <sfx2/tabdlg.hxx> +#endif +#ifndef _SVX_CHECKLBX_HXX //autogen +#include <svx/checklbx.hxx> +#endif +#ifndef _SVX_LANGBOX_HXX +#include <svx/langbox.hxx> +#endif +#ifndef _COM_SUN_STAR_UNO_REFERENCE_HXX_ +#include <com/sun/star/uno/Reference.hxx> +#endif +#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_ +#include <com/sun/star/uno/Sequence.hxx> +#endif +#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_ +#include <com/sun/star/beans/XPropertySet.hpp> +#endif + +#ifndef INCLUDED_SVXDLLAPI_H +#include "svx/svxdllapi.h" +#endif + +namespace com{namespace sun{namespace star{ +namespace beans{ + class XPropertySet; +} +namespace linguistic2{ + class XDictionary; + class XDictionaryList; + class XSpellChecker1; +}}}} + +class SvLBoxEntry; +class SvxLinguData_Impl; + +// define ---------------------------------------------------------------- + +#define GROUP_MODULES ((sal_uInt16)0x0008) + +// forward --------------------------------------------------------------- + +class SvxEditModulesDlg : public ModalDialog +{ + OKButton aClosePB; + HelpButton aHelpPB; + + FixedLine aModulesFL; + + FixedText aLanguageFT; + SvxLanguageBox aLanguageLB; + + SvxCheckListBox aModulesCLB; + PushButton aPrioUpPB; + PushButton aPrioDownPB; + PushButton aBackPB; + + String sSpell; + String sHyph; + String sThes; + + SvxLinguData_Impl* pDefaultLinguData; + SvxLinguData_Impl& rLinguData; + + SvLBoxButtonData* pCheckButtonData; + + SvLBoxEntry* CreateEntry(String& rTxt, USHORT nCol); + +#ifdef _SVX_OPTLINGU_CXX + DECL_LINK( SelectHdl_Impl, SvxCheckListBox * ); + DECL_LINK( UpDownHdl_Impl, PushButton * ); + DECL_LINK( ClickHdl_Impl, PushButton * ); + DECL_LINK( BackHdl_Impl, PushButton * ); + DECL_LINK( SelectHdlLB_Impl, ListBox * ); + DECL_LINK( LangSelectHdl_Impl, ListBox* ); + DECL_LINK( BoxCheckButtonHdl_Impl, SvTreeListBox * ); +#endif + +public: + SvxEditModulesDlg(Window* pParent, SvxLinguData_Impl& rData); + virtual ~SvxEditModulesDlg(); +}; + +// class SvxLinguTabPage ------------------------------------------------- + +class SVX_DLLPUBLIC SvxLinguTabPage : public SfxTabPage +{ +private: + FixedLine aLinguisticFL; + FixedText aLinguModulesFT; + SvxCheckListBox aLinguModulesCLB; + PushButton aLinguModulesEditPB; + FixedText aLinguDicsFT; + SvxCheckListBox aLinguDicsCLB; + PushButton aLinguDicsNewPB; + PushButton aLinguDicsEditPB; + PushButton aLinguDicsDelPB; + FixedText aLinguOptionsFT; + SvxCheckListBox aLinguOptionsCLB; + PushButton aLinguOptionsEditPB; + + String sCapitalWords; + String sWordsWithDigits; + String sCapitalization; + String sSpellSpecial; + String sAllLanguages; + String sSpellAuto; + String sHideMarkings; + String sOldGerman; + String sNumMinWordlen; + String sNumPreBreak; + String sNumPostBreak; + String sHyphAuto; + String sHyphSpecial; + + com::sun::star::uno::Reference< + com::sun::star::beans::XPropertySet > xProp; + + com::sun::star::uno::Reference< + com::sun::star::linguistic2::XDictionaryList > xDicList; + com::sun::star::uno::Sequence< + com::sun::star::uno::Reference< + com::sun::star::linguistic2::XDictionary > > aDics; + + SvLBoxButtonData* pCheckButtonData; + + SvxLinguData_Impl* pLinguData; + + SVX_DLLPRIVATE SvxLinguTabPage( Window* pParent, const SfxItemSet& rCoreSet ); + SVX_DLLPRIVATE SvLBoxEntry* CreateEntry(String& rTxt, USHORT nCol); + + SVX_DLLPRIVATE void AddDicBoxEntry( const com::sun::star::uno::Reference< com::sun::star::linguistic2::XDictionary > &rxDic, USHORT nIdx ); + SVX_DLLPRIVATE ULONG GetDicUserData( const com::sun::star::uno::Reference< com::sun::star::linguistic2::XDictionary > &rxDic, USHORT nIdx ); + +#ifdef _SVX_OPTLINGU_CXX + DECL_LINK( SelectHdl_Impl, SvxCheckListBox * ); + DECL_LINK( ClickHdl_Impl, PushButton * ); + DECL_LINK( BoxDoubleClickHdl_Impl, SvTreeListBox * ); + DECL_LINK( BoxCheckButtonHdl_Impl, SvTreeListBox * ); + DECL_LINK( PostDblClickHdl_Impl, SvTreeListBox * ); + + SVX_DLLPRIVATE void UpdateModulesBox_Impl(); + SVX_DLLPRIVATE void UpdateDicBox_Impl(); +#endif + +public: + virtual ~SvxLinguTabPage(); + static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet ); + static sal_uInt16* GetRanges(); + + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); + virtual void Reset( const SfxItemSet& rSet ); + + void HideGroups( sal_uInt16 nGrp ); +}; + +#endif + diff --git a/svx/inc/svx/orphitem.hxx b/svx/inc/svx/orphitem.hxx new file mode 100644 index 000000000000..dc4cd890a7c1 --- /dev/null +++ b/svx/inc/svx/orphitem.hxx @@ -0,0 +1,90 @@ +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: orphitem.hxx,v $ + * + * $Revision: 1.2 $ + * + * last change: $Author: vg $ $Date: 2007-04-11 16:03:13 $ + * + * The Contents of this file are made available subject to + * the terms of GNU Lesser General Public License Version 2.1. + * + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2005 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + ************************************************************************/ +#ifndef _SVX_ORPHITEM_HXX +#define _SVX_ORPHITEM_HXX + +// include --------------------------------------------------------------- + +#ifndef _SFXINTITEM_HXX //autogen +#include <svtools/intitem.hxx> +#endif +#ifndef _SVX_SVXIDS_HRC +#include <svx/svxids.hrc> +#endif + +class SvXMLUnitConverter; +namespace rtl +{ + class OUString; +} + +#ifndef INCLUDED_SVXDLLAPI_H +#include "svx/svxdllapi.h" +#endif + +// class SvxOrphansItem -------------------------------------------------- + +/* +[Beschreibung] +Dieses Item beschreibt die Anzahl der Zeilen fuer die Schusterjungenregelung. +*/ + +class SVX_DLLPUBLIC SvxOrphansItem: public SfxByteItem +{ + friend SvStream & operator<<( SvStream & aS, SvxOrphansItem & ); +public: + TYPEINFO(); + + SvxOrphansItem( const BYTE nL=0, const USHORT nId = ITEMID_ORPHANS ); + + // "pure virtual Methoden" vom SfxPoolItem + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create(SvStream &, USHORT) const; + virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + String &rText, const IntlWrapper * = 0 ) const; + + inline SvxOrphansItem& operator=( const SvxOrphansItem& rOrphans ) + { + SetValue( rOrphans.GetValue() ); + return *this; + } +}; + +#endif + |