diff options
Diffstat (limited to 'editeng/inc')
114 files changed, 2311 insertions, 2479 deletions
diff --git a/editeng/inc/editeng.hrc b/editeng/inc/editeng.hrc index 66fcf0cb92..66fcf0cb92 100644..100755 --- a/editeng/inc/editeng.hrc +++ b/editeng/inc/editeng.hrc diff --git a/editeng/inc/editeng/AccessibleContextBase.hxx b/editeng/inc/editeng/AccessibleContextBase.hxx index a9e3c321d4..4313035ba5 100644 --- a/editeng/inc/editeng/AccessibleContextBase.hxx +++ b/editeng/inc/editeng/AccessibleContextBase.hxx @@ -61,7 +61,7 @@ struct MutexOwner {mutable ::osl::Mutex maMutex;}; */ class EDITENG_DLLPUBLIC AccessibleContextBase : public MutexOwner, - public cppu::WeakComponentImplHelper4< + public cppu::PartialWeakComponentImplHelper4< ::com::sun::star::accessibility::XAccessible, ::com::sun::star::accessibility::XAccessibleContext, ::com::sun::star::accessibility::XAccessibleEventBroadcaster, @@ -345,8 +345,8 @@ protected: /** Check whether or not the object has been disposed (or is in the state of beeing disposed). - @return sal_True, if the object is disposed or in the course - of being disposed. Otherwise, sal_False is returned. + @return TRUE, if the object is disposed or in the course + of being disposed. Otherwise, FALSE is returned. */ sal_Bool IsDisposed (void); diff --git a/editeng/inc/editeng/AccessibleEditableTextPara.hxx b/editeng/inc/editeng/AccessibleEditableTextPara.hxx index ee97b4b7fb..5253d6a606 100644 --- a/editeng/inc/editeng/AccessibleEditableTextPara.hxx +++ b/editeng/inc/editeng/AccessibleEditableTextPara.hxx @@ -55,7 +55,7 @@ namespace accessibility { - typedef ::cppu::WeakComponentImplHelper9< ::com::sun::star::accessibility::XAccessible, + typedef ::cppu::PartialWeakComponentImplHelper9< ::com::sun::star::accessibility::XAccessible, ::com::sun::star::accessibility::XAccessibleContext, ::com::sun::star::accessibility::XAccessibleComponent, ::com::sun::star::accessibility::XAccessibleEditableText, @@ -320,7 +320,7 @@ namespace accessibility @return sal_False, if the method was not able to determine the range */ - sal_Bool GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, sal_Int32 nIndex ); + sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_Int32 nIndex ); // syntactic sugar for FireEvent void GotPropertyEvent( const ::com::sun::star::uno::Any& rNewValue, const sal_Int16 nEventId ) const; @@ -353,13 +353,13 @@ namespace accessibility // Get text from forwarder String GetText( sal_Int32 nIndex ) SAL_THROW((::com::sun::star::uno::RuntimeException)); String GetTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) SAL_THROW((::com::sun::star::uno::RuntimeException)); - USHORT GetTextLen() const SAL_THROW((::com::sun::star::uno::RuntimeException)); + sal_uInt16 GetTextLen() const SAL_THROW((::com::sun::star::uno::RuntimeException)); /** Get the current selection of this paragraph @return sal_False, if nothing in this paragraph is selected */ - sal_Bool GetSelection( USHORT& nStartPos, USHORT& nEndPos ) SAL_THROW((::com::sun::star::uno::RuntimeException)); + sal_Bool GetSelection( sal_uInt16& nStartPos, sal_uInt16& nEndPos ) SAL_THROW((::com::sun::star::uno::RuntimeException)); /** create selection from Accessible selection. @@ -405,7 +405,7 @@ namespace accessibility /// Our listeners (guarded by maMutex) int mnNotifierClientId; - // --> OD 2006-01-11 #i27138# + // Text paragraphs should provide FLOWS_TO and FLOWS_FROM relations (#i27138#) // the paragraph manager, which created this instance - is NULL, if // instance isn't created by AccessibleParaManager. // Needed for method <getAccessibleRelationSet()> to retrieve predecessor diff --git a/editeng/inc/editeng/AccessibleStaticTextBase.hxx b/editeng/inc/editeng/AccessibleStaticTextBase.hxx index 9f4eae4ed3..4edc38ced9 100644 --- a/editeng/inc/editeng/AccessibleStaticTextBase.hxx +++ b/editeng/inc/editeng/AccessibleStaticTextBase.hxx @@ -7,9 +7,6 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: AccessibleStaticTextBase.hxx,v $ - * $Revision: 1.14 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/editeng/inc/editeng/acorrcfg.hxx b/editeng/inc/editeng/acorrcfg.hxx index 3261847337..f9d62672d8 100644 --- a/editeng/inc/editeng/acorrcfg.hxx +++ b/editeng/inc/editeng/acorrcfg.hxx @@ -32,9 +32,7 @@ #include "editeng/editengdllapi.h" #include <unotools/configitem.hxx> -/* -----------------------------12.10.00 11:40-------------------------------- - ---------------------------------------------------------------------------*/ class SvxAutoCorrect; class SvxAutoCorrCfg; class EDITENG_DLLPUBLIC SvxBaseAutoCorrCfg : public utl::ConfigItem @@ -51,9 +49,7 @@ public: virtual void Notify( const com::sun::star::uno::Sequence<rtl::OUString>& aPropertyNames); void SetModified() {ConfigItem::SetModified();} }; -/* -----------------------------12.10.00 11:40-------------------------------- - ---------------------------------------------------------------------------*/ class EDITENG_DLLPUBLIC SvxSwAutoCorrCfg : public utl::ConfigItem { SvxAutoCorrCfg& rParent; @@ -69,7 +65,7 @@ public: void SetModified() {ConfigItem::SetModified();} }; /*-------------------------------------------------------------------- - Beschreibung: Konfiguration fuer Auto Correction + Description: Configuration for Auto Correction --------------------------------------------------------------------*/ class EDITENG_DLLPUBLIC SvxAutoCorrCfg { @@ -81,10 +77,10 @@ class EDITENG_DLLPUBLIC SvxAutoCorrCfg SvxBaseAutoCorrCfg aBaseConfig; SvxSwAutoCorrCfg aSwConfig; - // Flags f"ur Autotext: + // Flags for Autotext: sal_Bool bFileRel; sal_Bool bNetRel; - // Tiphilfe f"ur Autotext w"ahrend der Eingabe + // Help tip for Autotext as you type sal_Bool bAutoTextTip; sal_Bool bAutoTextPreview; sal_Bool bAutoFmtByInput; @@ -104,7 +100,7 @@ public: SvxAutoCorrect* GetAutoCorrect() { return pAutoCorrect; } const SvxAutoCorrect* GetAutoCorrect() const { return pAutoCorrect; } - // der Pointer geht in den Besitz des ConfigItems! + // the pointer is transfered to the possession of the ConfigItems! void SetAutoCorrect( SvxAutoCorrect* ); sal_Bool IsAutoFmtByInput() const { return bAutoFmtByInput; } diff --git a/editeng/inc/editeng/adjitem.hxx b/editeng/inc/editeng/adjitem.hxx index 1e1545352f..ad4bf30393 100644 --- a/editeng/inc/editeng/adjitem.hxx +++ b/editeng/inc/editeng/adjitem.hxx @@ -44,48 +44,48 @@ namespace rtl // class SvxAdjustItem --------------------------------------------------- /* -[Beschreibung] -Dieses Item beschreibt die Zeilenausrichtung. +[Description] +This item describes the row orientation. */ -#define ADJUST_LASTBLOCK_VERSION ((USHORT)0x0001) +#define ADJUST_LASTBLOCK_VERSION ((sal_uInt16)0x0001) class EDITENG_DLLPUBLIC SvxAdjustItem : public SfxEnumItemInterface { - BOOL bLeft : 1; - BOOL bRight : 1; - BOOL bCenter : 1; - BOOL bBlock : 1; + sal_Bool bLeft : 1; + sal_Bool bRight : 1; + sal_Bool bCenter : 1; + sal_Bool bBlock : 1; - // nur aktiv, wenn bBlock - BOOL bOneBlock : 1; - BOOL bLastCenter : 1; - BOOL bLastBlock : 1; + // only activ when bBlock + sal_Bool bOneBlock : 1; + sal_Bool bLastCenter : 1; + sal_Bool bLastBlock : 1; friend SvStream& operator<<( SvStream&, SvxAdjustItem& ); //$ ostream public: TYPEINFO(); SvxAdjustItem( const SvxAdjust eAdjst /*= SVX_ADJUST_LEFT*/, - const USHORT nId ); + const sal_uInt16 nId ); - // "pure virtual Methoden" vom SfxPoolItem + // "pure virtual Methods" from SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText, const IntlWrapper * = 0 ) const; - virtual USHORT GetValueCount() const; - virtual String GetValueTextByPos( USHORT nPos ) const; - virtual USHORT GetEnumValue() const; - virtual void SetEnumValue( USHORT nNewVal ); + virtual sal_uInt16 GetValueCount() const; + virtual String GetValueTextByPos( sal_uInt16 nPos ) const; + virtual sal_uInt16 GetEnumValue() const; + virtual void SetEnumValue( sal_uInt16 nNewVal ); 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 SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; inline void SetOneWord( const SvxAdjust eType ) { diff --git a/editeng/inc/editeng/akrnitem.hxx b/editeng/inc/editeng/akrnitem.hxx index 6bcf6a3bee..47860ddd1a 100644 --- a/editeng/inc/editeng/akrnitem.hxx +++ b/editeng/inc/editeng/akrnitem.hxx @@ -42,8 +42,8 @@ namespace rtl // class SvxAutoKernItem ------------------------------------------------- /* - [Beschreibung] - Attribut fuer Pair-Kerning. + [Description] + Attribute for Pair-Kerning. */ class EDITENG_DLLPUBLIC SvxAutoKernItem : public SfxBoolItem @@ -51,13 +51,13 @@ class EDITENG_DLLPUBLIC SvxAutoKernItem : public SfxBoolItem public: TYPEINFO(); - SvxAutoKernItem( const BOOL bAutoKern /*= FALSE*/, - const USHORT nId ); + SvxAutoKernItem( const sal_Bool bAutoKern /*= sal_False*/, + const sal_uInt16 nId ); - // "pure virtual Methoden" vom SfxPoolItem + // "pure virtual Methods" from SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, diff --git a/editeng/inc/editeng/blnkitem.hxx b/editeng/inc/editeng/blnkitem.hxx index 304f0f50f7..2384a48892 100644 --- a/editeng/inc/editeng/blnkitem.hxx +++ b/editeng/inc/editeng/blnkitem.hxx @@ -43,8 +43,8 @@ namespace rtl // class SvxBlinkItem ------------------------------------------------- /* - [Beschreibung] - Dieses Item beschreibt, ob geblinkt werden soll. + [Description] + This item describes, whether to flash. */ class EDITENG_DLLPUBLIC SvxBlinkItem : public SfxBoolItem @@ -52,12 +52,12 @@ class EDITENG_DLLPUBLIC SvxBlinkItem : public SfxBoolItem public: TYPEINFO(); - SvxBlinkItem( const BOOL bBlink /*= FALSE*/, const USHORT nId ); + SvxBlinkItem( const sal_Bool bBlink /*= sal_False*/, const sal_uInt16 nId ); - // "pure virtual Methoden" vom SfxPoolItem + // "pure virtual Methods" from SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, diff --git a/editeng/inc/editeng/bolnitem.hxx b/editeng/inc/editeng/bolnitem.hxx index af1b6a0bba..ee15661587 100644 --- a/editeng/inc/editeng/bolnitem.hxx +++ b/editeng/inc/editeng/bolnitem.hxx @@ -41,24 +41,26 @@ /* -[Beschreibung] -Dieses Item transportiert eine SvxBorderLine. +[Description] +This Item transports a editeng::SvxBorderLine. */ -class SvxBorderLine; +namespace editeng { + class SvxBorderLine; +} class EDITENG_DLLPUBLIC SvxLineItem : public SfxPoolItem { public: TYPEINFO(); - SvxLineItem( const USHORT nId ); + SvxLineItem( const sal_uInt16 nId ); SvxLineItem( const SvxLineItem& rCpy ); ~SvxLineItem(); SvxLineItem &operator=( const SvxLineItem& rLine ); - virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual int operator==( const SfxPoolItem& ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -66,16 +68,16 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const; virtual bool ScaleMetrics( long nMult, long nDiv ); virtual bool HasMetrics() const; - const SvxBorderLine* GetLine () const { return pLine; } - void SetLine ( const SvxBorderLine *pNew ); + const editeng::SvxBorderLine* GetLine () const { return pLine; } + void SetLine ( const editeng::SvxBorderLine *pNew ); private: - SvxBorderLine* pLine; + editeng::SvxBorderLine* pLine; }; diff --git a/editeng/inc/editeng/borderline.hxx b/editeng/inc/editeng/borderline.hxx index ecaf3ce93f..17e137a53c 100644 --- a/editeng/inc/editeng/borderline.hxx +++ b/editeng/inc/editeng/borderline.hxx @@ -32,6 +32,7 @@ #include <tools/color.hxx> #include <svl/poolitem.hxx> #include <editeng/editengdllapi.h> +#include <svtools/ctrlbox.hxx> // Line defaults in twips (former Writer defaults): @@ -42,107 +43,138 @@ #define DEF_LINE_WIDTH_4 100 #define DEF_LINE_WIDTH_5 10 -#define DEF_MAX_LINE_WIDHT DEF_LINE_WIDTH_4 -#define DEF_MAX_LINE_DIST DEF_LINE_WIDTH_2 - -#define DEF_DOUBLE_LINE0_OUT DEF_LINE_WIDTH_0 -#define DEF_DOUBLE_LINE0_IN DEF_LINE_WIDTH_0 -#define DEF_DOUBLE_LINE0_DIST DEF_LINE_WIDTH_1 - -#define DEF_DOUBLE_LINE1_OUT DEF_LINE_WIDTH_1 -#define DEF_DOUBLE_LINE1_IN DEF_LINE_WIDTH_1 -#define DEF_DOUBLE_LINE1_DIST DEF_LINE_WIDTH_1 - -#define DEF_DOUBLE_LINE2_OUT DEF_LINE_WIDTH_2 -#define DEF_DOUBLE_LINE2_IN DEF_LINE_WIDTH_2 -#define DEF_DOUBLE_LINE2_DIST DEF_LINE_WIDTH_2 - -#define DEF_DOUBLE_LINE3_OUT DEF_LINE_WIDTH_2 -#define DEF_DOUBLE_LINE3_IN DEF_LINE_WIDTH_1 -#define DEF_DOUBLE_LINE3_DIST DEF_LINE_WIDTH_2 - -#define DEF_DOUBLE_LINE4_OUT DEF_LINE_WIDTH_1 -#define DEF_DOUBLE_LINE4_IN DEF_LINE_WIDTH_2 -#define DEF_DOUBLE_LINE4_DIST DEF_LINE_WIDTH_1 - -#define DEF_DOUBLE_LINE5_OUT DEF_LINE_WIDTH_3 -#define DEF_DOUBLE_LINE5_IN DEF_LINE_WIDTH_2 -#define DEF_DOUBLE_LINE5_DIST DEF_LINE_WIDTH_2 - -#define DEF_DOUBLE_LINE6_OUT DEF_LINE_WIDTH_2 -#define DEF_DOUBLE_LINE6_IN DEF_LINE_WIDTH_3 -#define DEF_DOUBLE_LINE6_DIST DEF_LINE_WIDTH_2 - -#define DEF_DOUBLE_LINE7_OUT DEF_LINE_WIDTH_0 -#define DEF_DOUBLE_LINE7_IN DEF_LINE_WIDTH_0 -#define DEF_DOUBLE_LINE7_DIST DEF_LINE_WIDTH_2 - -#define DEF_DOUBLE_LINE8_OUT DEF_LINE_WIDTH_1 -#define DEF_DOUBLE_LINE8_IN DEF_LINE_WIDTH_0 -#define DEF_DOUBLE_LINE8_DIST DEF_LINE_WIDTH_2 - -#define DEF_DOUBLE_LINE9_OUT DEF_LINE_WIDTH_2 -#define DEF_DOUBLE_LINE9_IN DEF_LINE_WIDTH_0 -#define DEF_DOUBLE_LINE9_DIST DEF_LINE_WIDTH_2 - -#define DEF_DOUBLE_LINE10_OUT DEF_LINE_WIDTH_3 -#define DEF_DOUBLE_LINE10_IN DEF_LINE_WIDTH_0 -#define DEF_DOUBLE_LINE10_DIST DEF_LINE_WIDTH_2 - // ============================================================================ -enum SvxBorderStyle -{ - SOLID, - DOTTED, - DASHED -}; - -class EDITENG_DLLPUBLIC SvxBorderLine -{ -protected: - Color aColor; - USHORT nOutWidth; - USHORT nInWidth; - USHORT nDistance; - SvxBorderStyle m_nStyle; - -public: - SvxBorderLine( const Color *pCol = 0, USHORT nOut = 0, USHORT nIn = 0, USHORT nDist = 0, - SvxBorderStyle nStyle = SOLID ); - SvxBorderLine( const SvxBorderLine& r ); - - SvxBorderLine& operator=( const SvxBorderLine& r ); - - const Color& GetColor() const { return aColor; } - USHORT GetOutWidth() const { return nOutWidth; } - USHORT GetInWidth() const { return nInWidth; } - USHORT GetDistance() const { return nDistance; } - - SvxBorderStyle GetStyle() const { return m_nStyle; } - - void SetColor( const Color &rColor ) { aColor = rColor; } - void SetOutWidth( USHORT nNew ) { nOutWidth = nNew; } - void SetInWidth( USHORT nNew ) { nInWidth = nNew; } - void SetDistance( USHORT nNew ) { nDistance = nNew; } - void SetStyle( SvxBorderStyle nNew ) { m_nStyle = nNew; } - void ScaleMetrics( long nMult, long nDiv ); - - BOOL operator==( const SvxBorderLine &rCmp ) const; - - String GetValueString( SfxMapUnit eSrcUnit, SfxMapUnit eDestUnit, - const IntlWrapper* pIntl, - BOOL bMetricStr = FALSE ) const; - - bool HasPriority( const SvxBorderLine& rOtherLine ) const; - - bool isEmpty() const { return (0 == nOutWidth && 0 == nInWidth && 0 == nDistance); } - bool isDouble() const { return (0 != nOutWidth && 0 != nInWidth); } - sal_uInt16 getWidth() const { return nOutWidth + nInWidth + nDistance; } -}; +namespace editeng { + + enum SvxBorderStyle + { + SOLID, + DOTTED, + DASHED, + DOUBLE, + THINTHICK_SMALLGAP, + THINTHICK_MEDIUMGAP, + THINTHICK_LARGEGAP, + THICKTHIN_SMALLGAP, + THICKTHIN_MEDIUMGAP, + THICKTHIN_LARGEGAP, + EMBOSSED, + ENGRAVED, + OUTSET, + INSET, + NO_STYLE = -1 + }; + + class EDITENG_DLLPUBLIC SvxBorderLine + { + protected: + Color aColor; + + long m_nWidth; + bool m_bMirrorWidths; + BorderWidthImpl m_aWidthImpl; + long m_nMult; + long m_nDiv; + + SvxBorderStyle m_nStyle; + sal_uInt16 nOutWidth; + sal_uInt16 nInWidth; + sal_uInt16 nDistance; + + bool m_bUseLeftTop; + Color (*m_pColorOutFn)( Color ); + Color (*m_pColorInFn)( Color ); + Color (*m_pColorGapFn)( Color ); + + public: + SvxBorderLine( const Color *pCol = 0, + long nWidth = 0, SvxBorderStyle nStyle = SOLID, + bool bUseLeftTop = false, + Color (*pColorOutFn)( Color ) = &darkColor, + Color (*pColorInFn)( Color ) = &darkColor, + Color (*pColorGapFn)( Color ) = NULL ); + SvxBorderLine( const SvxBorderLine& r ); + + SvxBorderLine& operator=( const SvxBorderLine& r ); + + const Color& GetColor() const { return aColor; } + Color GetColorOut( bool bLeftOrTop = true ) const; + Color GetColorIn( bool bLeftOrTop = true ) const; + bool HasGapColor() const { return m_pColorGapFn != NULL; } + Color GetColorGap() const; + + void SetWidth( long nWidth = 0 ) { m_nWidth = nWidth; } + /** Guess the style and width from the three lines widths values. + + When the value of nStyle is SvxBorderLine::DOUBLE, the style set will be guessed + using the three values to match the best possible style among the following: + - SvxBorderLine::DOUBLE + - SvxBorderLine::THINTHICK_SMALLGAP + - SvxBorderLine::THINTHICK_MEDIUMGAP + - SvxBorderLine::THINTHICK_LARGEGAP + - SvxBorderLine::THICKTHIN_SMALLGAP + - SvxBorderLine::THICKTHIN_MEDIUMGAP + - SvxBorderLine::THICKTHIN_LARGEGAP + + If no styles matches the width, then the width is set to 0. + + There is one known case that could fit several styles: \a nIn = \a nDist = 0.75 pt, + \a nOut = 1.5 pt. This case fits SvxBorderLine::THINTHICK_SMALLGAP and + SvxBorderLine::THINTHICK_MEDIUMGAP with a 1.5 pt width and + SvxBorderLine::THINTHICK_LARGEGAP with a 0.75 pt width. The same case happens + also for thick-thin styles. + + \param nStyle the border style used to guess the width. + \param nIn the width of the inner line in 1th pt + \param nOut the width of the outer line in 1th pt + \param nDist the width of the gap between the lines in 1th pt + */ + void GuessLinesWidths( SvxBorderStyle nStyle, sal_uInt16 nOut, sal_uInt16 nIn = 0, sal_uInt16 nDist = 0 ); + + // TODO Hacky method to mirror lines in only a few cases + void SetMirrorWidths( bool bMirror = true ) { m_bMirrorWidths = bMirror; } + long GetWidth( ) const { return m_nWidth; } + sal_uInt16 GetOutWidth() const; + sal_uInt16 GetInWidth() const; + sal_uInt16 GetDistance() const; + + SvxBorderStyle GetStyle() const { return m_nStyle; } + + void SetColor( const Color &rColor ) { aColor = rColor; } + void SetColorOutFn( Color (*pColorOutFn)( Color ) ) { m_pColorOutFn = pColorOutFn; } + void SetColorInFn( Color (*pColorInFn)( Color ) ) { m_pColorInFn = pColorInFn; } + void SetColorGapFn( Color (*pColorGapFn)( Color ) ) { m_pColorGapFn = pColorGapFn; } + void SetUseLeftTop( bool bUseLeftTop ) { m_bUseLeftTop = bUseLeftTop; } + void SetStyle( SvxBorderStyle nNew ); + void ScaleMetrics( long nMult, long nDiv ); + + sal_Bool operator==( const SvxBorderLine &rCmp ) const; + + String GetValueString( SfxMapUnit eSrcUnit, SfxMapUnit eDestUnit, + const IntlWrapper* pIntl, + sal_Bool bMetricStr = sal_False ) const; + + bool HasPriority( const SvxBorderLine& rOtherLine ) const; + + bool isEmpty() const { return m_aWidthImpl.IsEmpty( ) || m_nStyle == NO_STYLE || m_nWidth == 0; } + bool isDouble() const { return m_aWidthImpl.IsDouble(); } + sal_uInt16 GetScaledWidth() const { return GetOutWidth() + GetInWidth() + GetDistance(); } + + static Color darkColor( Color aMain ); + static Color lightColor( Color aMain ); + + static Color threeDLightColor( Color aMain ); + static Color threeDMediumColor( Color aMain ); + static Color threeDDarkColor( Color aMain ); + + static BorderWidthImpl getWidthImpl( SvxBorderStyle nStyle ); + }; // ============================================================================ +} // namespace editeng + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/boxitem.hxx b/editeng/inc/editeng/boxitem.hxx index 35fd036e30..7fa52f2839 100644 --- a/editeng/inc/editeng/boxitem.hxx +++ b/editeng/inc/editeng/boxitem.hxx @@ -37,26 +37,26 @@ namespace rtl { class OUString; } // class SvxBoxItem ------------------------------------------------------ -/* -[Beschreibung] -Dieses Item beschreibt ein Umrandungsattribut (alle vier Kanten und -Abstand nach innen. +/* [Description] + + This item describes a border attribute + (all four edges and the inward distance) */ -#define BOX_LINE_TOP ((USHORT)0) -#define BOX_LINE_BOTTOM ((USHORT)1) -#define BOX_LINE_LEFT ((USHORT)2) -#define BOX_LINE_RIGHT ((USHORT)3) +#define BOX_LINE_TOP ((sal_uInt16)0) +#define BOX_LINE_BOTTOM ((sal_uInt16)1) +#define BOX_LINE_LEFT ((sal_uInt16)2) +#define BOX_LINE_RIGHT ((sal_uInt16)3) -#define BOX_4DISTS_VERSION ((USHORT)1) +#define BOX_4DISTS_VERSION ((sal_uInt16)1) class EDITENG_DLLPUBLIC SvxBoxItem : public SfxPoolItem { - SvxBorderLine *pTop, - *pBottom, - *pLeft, - *pRight; - USHORT nTopDist, + editeng::SvxBorderLine *pTop, + *pBottom, + *pLeft, + *pRight; + sal_uInt16 nTopDist, nBottomDist, nLeftDist, nRightDist; @@ -64,15 +64,15 @@ class EDITENG_DLLPUBLIC SvxBoxItem : public SfxPoolItem public: TYPEINFO(); - SvxBoxItem( const USHORT nId ); + SvxBoxItem( const sal_uInt16 nId ); SvxBoxItem( const SvxBoxItem &rCpy ); ~SvxBoxItem(); SvxBoxItem &operator=( const SvxBoxItem& rBox ); - // "pure virtual Methoden" vom SfxPoolItem + // "pure virtual Methods" from SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -80,56 +80,55 @@ public: String &rText, const IntlWrapper * = 0 ) const; 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 SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; virtual bool ScaleMetrics( long nMult, long nDiv ); virtual bool HasMetrics() const; - const SvxBorderLine* GetTop() const { return pTop; } - const SvxBorderLine* GetBottom() const { return pBottom; } - const SvxBorderLine* GetLeft() const { return pLeft; } - const SvxBorderLine* GetRight() const { return pRight; } + const editeng::SvxBorderLine* GetTop() const { return pTop; } + const editeng::SvxBorderLine* GetBottom() const { return pBottom; } + const editeng::SvxBorderLine* GetLeft() const { return pLeft; } + const editeng::SvxBorderLine* GetRight() const { return pRight; } - const SvxBorderLine* GetLine( USHORT nLine ) const; + const editeng::SvxBorderLine* GetLine( sal_uInt16 nLine ) const; - //Die Pointer werden kopiert! - void SetLine( const SvxBorderLine* pNew, USHORT nLine ); + //The Pointers are being copied! + void SetLine( const editeng::SvxBorderLine* pNew, sal_uInt16 nLine ); - USHORT GetDistance( USHORT nLine ) const; - USHORT GetDistance() const; + sal_uInt16 GetDistance( sal_uInt16 nLine ) const; + sal_uInt16 GetDistance() const; - void SetDistance( USHORT nNew, USHORT nLine ); - inline void SetDistance( USHORT nNew ); + void SetDistance( sal_uInt16 nNew, sal_uInt16 nLine ); + inline void SetDistance( sal_uInt16 nNew ); - //Breite der Linien plus Zwischenraum plus Abstand nach innen. - //JP 09.06.99: bIgnoreLine = TRUE -> Distance auch returnen, wenn - // keine Line gesetzt ist - USHORT CalcLineSpace( USHORT nLine, BOOL bIgnoreLine = FALSE ) const; - static com::sun::star::table::BorderLine2 SvxLineToLine( const SvxBorderLine* pLine, sal_Bool bConvert ); - static sal_Bool LineToSvxLine(const ::com::sun::star::table::BorderLine& rLine, SvxBorderLine& rSvxLine, sal_Bool bConvert); + // Line width plus Space plus inward distance + //bIgnoreLine = TRUE -> Also return distance, when no Line is set + sal_uInt16 CalcLineSpace( sal_uInt16 nLine, sal_Bool bIgnoreLine = sal_False ) const; + static com::sun::star::table::BorderLine2 SvxLineToLine( const editeng::SvxBorderLine* pLine, sal_Bool bConvert ); + static sal_Bool LineToSvxLine(const ::com::sun::star::table::BorderLine& rLine, editeng::SvxBorderLine& rSvxLine, sal_Bool bConvert); + static sal_Bool LineToSvxLine(const ::com::sun::star::table::BorderLine2& rLine, editeng::SvxBorderLine& rSvxLine, sal_Bool bConvert); static sal_Bool LineToSvxLine(const ::com::sun::star::table::BorderLine2& rLine, SvxBorderLine& rSvxLine, sal_Bool bConvert); }; -inline void SvxBoxItem::SetDistance( USHORT nNew ) +inline void SvxBoxItem::SetDistance( sal_uInt16 nNew ) { nTopDist = nBottomDist = nLeftDist = nRightDist = nNew; } // class SvxBoxInfoItem -------------------------------------------------- -/* -[Beschreibung] -Noch ein Item fuer die Umrandung. Dieses Item hat lediglich SS-Funktionalitaet. -Einerseits wird dem allgemeinen Dialog mit diesem Item mitgeteilt, welche -Moeglichkeiten er anbieten soll. -Andererseits werden ueber dieses Attribut ggf. die BorderLines fuer die -horizontalen und vertikalen innerern Linien transportiert. +/* [Description] + + Another item for the border. This item has only limited functionality. + On one hand, the general Dialog is told by the item which options it + should offer. On the other hand, this attribute may be used to + transported the borderline for the inner horizontal and vertical lines. */ -#define BOXINFO_LINE_HORI ((USHORT)0) -#define BOXINFO_LINE_VERT ((USHORT)1) +#define BOXINFO_LINE_HORI ((sal_uInt16)0) +#define BOXINFO_LINE_VERT ((sal_uInt16)1) #define VALID_TOP 0x01 #define VALID_BOTTOM 0x02 @@ -142,84 +141,84 @@ horizontalen und vertikalen innerern Linien transportiert. class EDITENG_DLLPUBLIC SvxBoxInfoItem : public SfxPoolItem { - SvxBorderLine* pHori; //innere horizontale Linie - SvxBorderLine* pVert; //innere vertikale Linie + editeng::SvxBorderLine* pHori; //inner horizontal Line + editeng::SvxBorderLine* pVert; //inner vertical Line - bool mbEnableHor; /// true = Enable inner horizonal line. + bool mbEnableHor; /// true = Enable inner horizontal line. bool mbEnableVer; /// true = Enable inner vertical line. /* - z.Z. nur fuer StarWriter: Abstand nach innen von SvxBoxItem. - Wenn der Abstand gewuenscht ist, so muss das Feld fuer den Abstand vom - Dialog freigeschaltet werden. nDefDist ist als Defaultwert anzusehen. - Wenn irgendeine Linie eingeschalt ist oder wird, so muss dieser - Abstand defaultet werden. bMinDist gibt an, ob der Wert durch den - Anwender unterschritten werden darf. Mit nDist wird der aktuelle - Abstand von der App zum Dialog und zurueck transportiert. + Currently only for StarWriter: distance inward from SvxBoxItem. If the + distance is requested, then the field for the distance from the dialog be + activated. nDefDist is regarded as a default value. If any line is + turned on or will be turned on it must this distance be set to default. + bMinDist indicates whether the user can go below this value or not. + With NDIST is the current distance from the app transported back and + forth to the dialogue. */ - BOOL bDist :1; // TRUE, Abstand freischalten. - BOOL bMinDist :1; // TRUE, Abstand darf nicht unterschritten werden. + sal_Bool bDist :1; // TRUE, Unlock Distance. + sal_Bool bMinDist :1; // TRUE, Going below minimum Distance is prohibited - BYTE nValidFlags; // 0000 0000 - // ³³³³ ³³³ÀÄ VALID_TOP - // ³³³³ ³³ÀÄÄ VALID_BOTTOM - // ³³³³ ³ÀÄÄÄ VALID_LEFT - // ³³³³ ÀÄÄÄÄ VALID_RIGHT - // ³³³ÀÄÄÄÄÄÄ VALID_HORI - // ³³ÀÄÄÄÄÄÄÄ VALID_VERT - // ³ÀÄÄÄÄÄÄÄÄ VALID_DIST - // ÀÄÄÄÄÄÄÄÄÄ VALID_DISABLE + sal_uInt8 nValidFlags; // 0000 0000 + // ³³³³ ³³³ÀÄ VALID_TOP + // ³³³³ ³³ÀÄÄ VALID_BOTTOM + // ³³³³ ³ÀÄÄÄ VALID_LEFT + // ³³³³ ÀÄÄÄÄ VALID_RIGHT + // ³³³ÀÄÄÄÄÄÄ VALID_HORI + // ³³ÀÄÄÄÄÄÄÄ VALID_VERT + // ³ÀÄÄÄÄÄÄÄÄ VALID_DIST + // ÀÄÄÄÄÄÄÄÄÄ VALID_DISABLE - USHORT nDefDist; // Der Default- bzw. Minimalabstand. + sal_uInt16 nDefDist; // The default or minimum distance. public: TYPEINFO(); - SvxBoxInfoItem( const USHORT nId ); + SvxBoxInfoItem( const sal_uInt16 nId ); SvxBoxInfoItem( const SvxBoxInfoItem &rCpy ); ~SvxBoxInfoItem(); SvxBoxInfoItem &operator=( const SvxBoxInfoItem &rCpy ); - // "pure virtual Methoden" vom SfxPoolItem + // "pure virtual Methods" from SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText, const IntlWrapper * = 0 ) const; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; - virtual bool ScaleMetrics( long nMult, long nDiv ); - virtual bool HasMetrics() const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const; + virtual bool ScaleMetrics( long nMult, long nDiv ); + virtual bool HasMetrics() const; - const SvxBorderLine* GetHori() const { return pHori; } - const SvxBorderLine* GetVert() const { return pVert; } + const editeng::SvxBorderLine* GetHori() const { return pHori; } + const editeng::SvxBorderLine* GetVert() const { return pVert; } - //Die Pointer werden kopiert! - void SetLine( const SvxBorderLine* pNew, USHORT nLine ); + //The Pointers are being copied! + void SetLine( const editeng::SvxBorderLine* pNew, sal_uInt16 nLine ); - BOOL IsTable() const { return mbEnableHor && mbEnableVer; } - void SetTable( BOOL bNew ) { mbEnableHor = mbEnableVer = bNew; } + sal_Bool IsTable() const { return mbEnableHor && mbEnableVer; } + void SetTable( sal_Bool bNew ) { mbEnableHor = mbEnableVer = bNew; } inline bool IsHorEnabled() const { return mbEnableHor; } inline void EnableHor( bool bEnable ) { mbEnableHor = bEnable; } inline bool IsVerEnabled() const { return mbEnableVer; } inline void EnableVer( bool bEnable ) { mbEnableVer = bEnable; } - BOOL IsDist() const { return bDist; } - void SetDist( BOOL bNew ) { bDist = bNew; } - BOOL IsMinDist() const { return bMinDist; } - void SetMinDist( BOOL bNew ) { bMinDist = bNew; } - USHORT GetDefDist() const { return nDefDist; } - void SetDefDist( USHORT nNew ) { nDefDist = nNew; } + sal_Bool IsDist() const { return bDist; } + void SetDist( sal_Bool bNew ) { bDist = bNew; } + sal_Bool IsMinDist() const { return bMinDist; } + void SetMinDist( sal_Bool bNew ) { bMinDist = bNew; } + sal_uInt16 GetDefDist() const { return nDefDist; } + void SetDefDist( sal_uInt16 nNew ) { nDefDist = nNew; } - BOOL IsValid( BYTE nValid ) const + sal_Bool IsValid( sal_uInt8 nValid ) const { return ( nValidFlags & nValid ) == nValid; } - void SetValid( BYTE nValid, BOOL bValid = TRUE ) + void SetValid( sal_uInt8 nValid, sal_Bool bValid = sal_True ) { bValid ? ( nValidFlags |= nValid ) : ( nValidFlags &= ~nValid ); } void ResetFlags(); diff --git a/editeng/inc/editeng/brkitem.hxx b/editeng/inc/editeng/brkitem.hxx index 1409f31520..bb697fa305 100644 --- a/editeng/inc/editeng/brkitem.hxx +++ b/editeng/inc/editeng/brkitem.hxx @@ -41,12 +41,12 @@ namespace rtl // class SvxFmtBreakItem ------------------------------------------------- -/* - [Beschreibung] - Dieses Item beschreibt ein Umbruch-Attribut - Automatisch?, Seiten- oder Spaltenumbruch, davor oder danach? +/* [Description] + + This item Describes a wrap-attribute + Automatic?, Page or column break, before or after? */ -#define FMTBREAK_NOAUTO ((USHORT)0x0001) +#define FMTBREAK_NOAUTO ((sal_uInt16)0x0001) class EDITENG_DLLPUBLIC SvxFmtBreakItem : public SfxEnumItem { @@ -54,39 +54,39 @@ public: TYPEINFO(); inline SvxFmtBreakItem( const SvxBreak eBrk /*= SVX_BREAK_NONE*/, - const USHORT nWhich ); + const sal_uInt16 nWhich ); inline SvxFmtBreakItem( const SvxFmtBreakItem& rBreak ); inline SvxFmtBreakItem& operator=( const SvxFmtBreakItem& rCpy ); - // "pure virtual Methoden" vom SfxPoolItem + // "pure virtual Methods" from SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText, const IntlWrapper * = 0 ) const; - virtual String GetValueTextByPos( USHORT nPos ) const; + virtual String GetValueTextByPos( sal_uInt16 nPos ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SvStream& Store( SvStream& , USHORT nItemVersion ) const; - virtual USHORT GetVersion( USHORT nFileVersion ) const; - virtual SfxPoolItem* Create( SvStream&, USHORT ) const; - virtual USHORT GetValueCount() const; + virtual SvStream& Store( SvStream& , sal_uInt16 nItemVersion ) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; + virtual SfxPoolItem* Create( SvStream&, sal_uInt16 ) const; + virtual sal_uInt16 GetValueCount() const; - // MS VC4.0 kommt durcheinander - void SetValue( USHORT nNewVal ) + // MS VC4.0 messes things up + void SetValue( sal_uInt16 nNewVal ) {SfxEnumItem::SetValue(nNewVal); } SvxBreak GetBreak() const { return SvxBreak( GetValue() ); } void SetBreak( const SvxBreak eNew ) - { SetValue( (USHORT)eNew ); } + { SetValue( (sal_uInt16)eNew ); } }; inline SvxFmtBreakItem::SvxFmtBreakItem( const SvxBreak eBreak, - const USHORT _nWhich ) : - SfxEnumItem( _nWhich, (USHORT)eBreak ) + const sal_uInt16 _nWhich ) : + SfxEnumItem( _nWhich, (sal_uInt16)eBreak ) {} inline SvxFmtBreakItem::SvxFmtBreakItem( const SvxFmtBreakItem& rBreak ) : diff --git a/editeng/inc/editeng/brshitem.hxx b/editeng/inc/editeng/brshitem.hxx index 025c39161e..3fe014ab3d 100644 --- a/editeng/inc/editeng/brshitem.hxx +++ b/editeng/inc/editeng/brshitem.hxx @@ -45,7 +45,7 @@ namespace rtl class OUString; } -#define BRUSH_GRAPHIC_VERSION ((USHORT)0x0001) +#define BRUSH_GRAPHIC_VERSION ((sal_uInt16)0x0001) enum SvxGraphicPosition { @@ -67,28 +67,28 @@ class EDITENG_DLLPUBLIC SvxBrushItem : public SfxPoolItem String* pStrLink; String* pStrFilter; SvxGraphicPosition eGraphicPos; - BOOL bLoadAgain; + sal_Bool bLoadAgain; void ApplyGraphicTransparency_Impl(); DECL_STATIC_LINK( SvxBrushItem, DoneHdl_Impl, void *); // wird nur von Create benutzt SvxBrushItem( SvStream& rStrm, - USHORT nVersion, USHORT nWhich ); + sal_uInt16 nVersion, sal_uInt16 nWhich ); public: TYPEINFO(); - SvxBrushItem( USHORT nWhich ); - SvxBrushItem( const Color& rColor, USHORT nWhich ); + SvxBrushItem( sal_uInt16 nWhich ); + SvxBrushItem( const Color& rColor, sal_uInt16 nWhich ); SvxBrushItem( const Graphic& rGraphic, - SvxGraphicPosition ePos, USHORT nWhich ); + SvxGraphicPosition ePos, sal_uInt16 nWhich ); SvxBrushItem( const GraphicObject& rGraphicObj, - SvxGraphicPosition ePos, USHORT nWhich ); + SvxGraphicPosition ePos, sal_uInt16 nWhich ); SvxBrushItem( const String& rLink, const String& rFilter, - SvxGraphicPosition ePos, USHORT nWhich ); + SvxGraphicPosition ePos, sal_uInt16 nWhich ); SvxBrushItem( const SvxBrushItem& ); - SvxBrushItem( const CntWallpaperItem&, USHORT nWhich ); + SvxBrushItem( const CntWallpaperItem&, sal_uInt16 nWhich ); ~SvxBrushItem(); @@ -100,13 +100,13 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual int operator==( const SfxPoolItem& ) const; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create( SvStream&, USHORT nVersion ) const; - virtual SvStream& Store( SvStream& , USHORT nItemVersion ) const; - virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual SfxPoolItem* Create( SvStream&, sal_uInt16 nVersion ) const; + virtual SvStream& Store( SvStream& , sal_uInt16 nItemVersion ) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; const Color& GetColor() const { return aColor; } Color& GetColor() { return aColor; } diff --git a/editeng/inc/editeng/bulitem.hxx b/editeng/inc/editeng/bulitem.hxx index ea41ef5e5f..94e11dd072 100644 --- a/editeng/inc/editeng/bulitem.hxx +++ b/editeng/inc/editeng/bulitem.hxx @@ -54,7 +54,7 @@ #define BJ_VCENTER 0x20 // Valid-Bits -// Erstmal nur die Werte, die vom Dialog geaendert werden... +// First, only the values that are changed by the dialogue ... #define VALID_FONTCOLOR 0x0001 #define VALID_FONTNAME 0x0002 #define VALID_SYMBOL 0x0004 @@ -76,13 +76,14 @@ class EDITENG_DLLPUBLIC SvxBulletItem : public SfxPoolItem GraphicObject* pGraphicObject; String aPrevText; String aFollowText; - USHORT nStart; - USHORT nStyle; + sal_uInt16 nStart; + sal_uInt16 nStyle; long nWidth; - USHORT nScale; + sal_uInt16 nScale; sal_Unicode cSymbol; - BYTE nJustify; - USHORT nValidMask; // Nur temporaer fuer GetAttribs/SetAttribs, wegen des grossen Bullets + sal_uInt8 nJustify; + sal_uInt16 nValidMask; // Only temporary for GetAttribs / setAttribs, + // because of the large Bullets #ifdef _SVX_BULITEM_CXX void SetDefaultFont_Impl(); @@ -92,30 +93,30 @@ class EDITENG_DLLPUBLIC SvxBulletItem : public SfxPoolItem public: TYPEINFO(); - SvxBulletItem( USHORT nWhich = 0 ); - SvxBulletItem( BYTE nStyle, const Font& rFont, USHORT nStart = 0, USHORT nWhich = 0 ); - SvxBulletItem( const Font& rFont, sal_Unicode cSymbol, USHORT nWhich=0 ); - SvxBulletItem( const Bitmap&, USHORT nWhich = 0 ); - SvxBulletItem( const GraphicObject&, USHORT nWhich = 0 ); - SvxBulletItem( SvStream& rStrm, USHORT nWhich = 0 ); + SvxBulletItem( sal_uInt16 nWhich = 0 ); + SvxBulletItem( sal_uInt8 nStyle, const Font& rFont, sal_uInt16 nStart = 0, sal_uInt16 nWhich = 0 ); + SvxBulletItem( const Font& rFont, sal_Unicode cSymbol, sal_uInt16 nWhich=0 ); + SvxBulletItem( const Bitmap&, sal_uInt16 nWhich = 0 ); + SvxBulletItem( const GraphicObject&, sal_uInt16 nWhich = 0 ); + SvxBulletItem( SvStream& rStrm, sal_uInt16 nWhich = 0 ); SvxBulletItem( const SvxBulletItem& ); ~SvxBulletItem(); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create( SvStream&, USHORT nVersion ) const; - virtual SvStream& Store( SvStream & , USHORT nItemVersion ) const; + virtual SfxPoolItem* Create( SvStream&, sal_uInt16 nVersion ) const; + virtual SvStream& Store( SvStream & , sal_uInt16 nItemVersion ) const; String GetFullText() const; sal_Unicode GetSymbol() const { return cSymbol; } String GetPrevText() const { return aPrevText; } String GetFollowText() const { return aFollowText; } - USHORT GetStart() const { return nStart; } + sal_uInt16 GetStart() const { return nStart; } long GetWidth() const { return nWidth; } - USHORT GetStyle() const { return nStyle; } - BYTE GetJustification() const { return nJustify; } + sal_uInt16 GetStyle() const { return nStyle; } + sal_uInt8 GetJustification() const { return nJustify; } Font GetFont() const { return aFont; } - USHORT GetScale() const { return nScale; } + sal_uInt16 GetScale() const { return nScale; } Bitmap GetBitmap() const; void SetBitmap( const Bitmap& rBmp ); @@ -127,14 +128,14 @@ public: void SetPrevText( const String& rStr) { aPrevText = rStr;} void SetFollowText(const String& rStr) { aFollowText=rStr;} - void SetStart( USHORT nNew ) { nStart = nNew; } + void SetStart( sal_uInt16 nNew ) { nStart = nNew; } void SetWidth( long nNew ) { nWidth = nNew; } - void SetStyle( USHORT nNew ) { nStyle = nNew; } - void SetJustification( BYTE nNew ) { nJustify = nNew; } + void SetStyle( sal_uInt16 nNew ) { nStyle = nNew; } + void SetJustification( sal_uInt8 nNew ) { nJustify = nNew; } void SetFont( const Font& rNew) { aFont = rNew; } - void SetScale( USHORT nNew ) { nScale = nNew; } + void SetScale( sal_uInt16 nNew ) { nScale = nNew; } - virtual USHORT GetVersion(USHORT nFileVersion) const; + virtual sal_uInt16 GetVersion(sal_uInt16 nFileVersion) const; virtual int operator==( const SfxPoolItem& ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -142,12 +143,12 @@ public: String &rText, const IntlWrapper * = 0 ) const; static void StoreFont( SvStream&, const Font& ); - static Font CreateFont( SvStream&, USHORT nVer ); + static Font CreateFont( SvStream&, sal_uInt16 nVer ); - USHORT& GetValidMask() { return nValidMask; } - USHORT GetValidMask() const { return nValidMask; } - USHORT IsValid( USHORT nFlag ) const { return nValidMask & nFlag; } - void SetValid( USHORT nFlag, BOOL bValid ) + sal_uInt16& GetValidMask() { return nValidMask; } + sal_uInt16 GetValidMask() const { return nValidMask; } + sal_uInt16 IsValid( sal_uInt16 nFlag ) const { return nValidMask & nFlag; } + void SetValid( sal_uInt16 nFlag, sal_Bool bValid ) { if ( bValid ) nValidMask |= nFlag; diff --git a/editeng/inc/editeng/charhiddenitem.hxx b/editeng/inc/editeng/charhiddenitem.hxx index 0e4ae84bf2..2ae454368d 100644 --- a/editeng/inc/editeng/charhiddenitem.hxx +++ b/editeng/inc/editeng/charhiddenitem.hxx @@ -35,8 +35,8 @@ #include "editeng/editengdllapi.h" // class SvxCharHiddenItem ------------------------------------------------- -/* - [Description] +/* [Description] + This item marks text as hidden */ @@ -45,7 +45,7 @@ class EDITENG_DLLPUBLIC SvxCharHiddenItem : public SfxBoolItem public: TYPEINFO(); - SvxCharHiddenItem( const BOOL bHidden /*= FALSE*/, const USHORT nId ); + SvxCharHiddenItem( const sal_Bool bHidden /*= sal_False*/, const sal_uInt16 nId ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, diff --git a/editeng/inc/editeng/charreliefitem.hxx b/editeng/inc/editeng/charreliefitem.hxx index 376090a536..d32f3b4aeb 100644 --- a/editeng/inc/editeng/charreliefitem.hxx +++ b/editeng/inc/editeng/charreliefitem.hxx @@ -40,7 +40,6 @@ This item defines a character relief and has currently the values emboss, relief. - */ class EDITENG_DLLPUBLIC SvxCharReliefItem : public SfxEnumItem @@ -52,12 +51,12 @@ public: const sal_uInt16 nId ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream & rStrm, USHORT nIVer) const; - virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream & rStrm, sal_uInt16 nIVer) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; - virtual String GetValueTextByPos( USHORT nPos ) const; - virtual USHORT GetValueCount() const; + virtual String GetValueTextByPos( sal_uInt16 nPos ) const; + virtual sal_uInt16 GetValueCount() const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -65,10 +64,8 @@ public: String &rText, const IntlWrapper * = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, - BYTE nMemberId ); - virtual bool QueryValue( com::sun::star::uno::Any& rVal, - BYTE nMemberId ) const; + virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); inline SvxCharReliefItem& operator=( const SvxCharReliefItem& rItem ) { diff --git a/editeng/inc/editeng/charrotateitem.hxx b/editeng/inc/editeng/charrotateitem.hxx index f085beb2fe..4e9e0ab44f 100644 --- a/editeng/inc/editeng/charrotateitem.hxx +++ b/editeng/inc/editeng/charrotateitem.hxx @@ -55,9 +55,9 @@ public: const sal_uInt16 nId ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream & rStrm, USHORT nIVer) const; - virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream & rStrm, sal_uInt16 nIVer) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -65,10 +65,8 @@ public: String &rText, const IntlWrapper * = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, - BYTE nMemberId ); - virtual bool QueryValue( com::sun::star::uno::Any& rVal, - BYTE nMemberId ) const; + virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); inline SvxCharRotateItem& operator=( const SvxCharRotateItem& rItem ) { diff --git a/editeng/inc/editeng/charscaleitem.hxx b/editeng/inc/editeng/charscaleitem.hxx index 6c6e0db5b5..19967f6a23 100644 --- a/editeng/inc/editeng/charscaleitem.hxx +++ b/editeng/inc/editeng/charscaleitem.hxx @@ -52,9 +52,9 @@ public: const sal_uInt16 nId ); 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 SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store( SvStream& , sal_uInt16 nItemVersion ) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -62,10 +62,8 @@ public: String &rText, const IntlWrapper * = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, - BYTE nMemberId ); - virtual bool QueryValue( com::sun::star::uno::Any& rVal, - BYTE nMemberId ) const; + virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); inline SvxCharScaleWidthItem& operator=(const SvxCharScaleWidthItem& rItem ) { diff --git a/editeng/inc/editeng/cmapitem.hxx b/editeng/inc/editeng/cmapitem.hxx index b436b1e1f3..f4b747747b 100644 --- a/editeng/inc/editeng/cmapitem.hxx +++ b/editeng/inc/editeng/cmapitem.hxx @@ -42,9 +42,9 @@ namespace rtl // class SvxCaseMapItem -------------------------------------------------- -/* [Beschreibung] +/* [Description] - Dieses Item beschreibt die Schrift-Ausrichtung (Versalien, Kapitaelchen,...). + This item describe the font type (uppercase, small caps ,...). */ class EDITENG_DLLPUBLIC SvxCaseMapItem : public SfxEnumItem @@ -53,22 +53,22 @@ public: TYPEINFO(); SvxCaseMapItem( const SvxCaseMap eMap /*= SVX_CASEMAP_NOT_MAPPED*/, - const USHORT nId ); + const sal_uInt16 nId ); - // "pure virtual Methoden" vom SfxPoolItem + SfxEnumItem + // "pure virtual Methods" from SfxPoolItem + SfxEnumItem virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; - virtual String GetValueTextByPos( USHORT nPos ) const; - virtual USHORT GetValueCount() const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; + virtual String GetValueTextByPos( sal_uInt16 nPos ) const; + virtual sal_uInt16 GetValueCount() const; // MS VC4.0 kommt durcheinander - void SetValue( USHORT nNewVal ) + void SetValue( sal_uInt16 nNewVal ) {SfxEnumItem::SetValue(nNewVal); } inline SvxCaseMapItem& operator=(const SvxCaseMapItem& rMap) @@ -81,9 +81,9 @@ public: SvxCaseMap GetCaseMap() const { return (SvxCaseMap)GetValue(); } void SetCaseMap( SvxCaseMap eNew ) - { SetValue( (USHORT)eNew ); } - virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + { SetValue( (sal_uInt16)eNew ); } + virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); }; #endif diff --git a/editeng/inc/editeng/cntritem.hxx b/editeng/inc/editeng/cntritem.hxx index d1b4bfeb87..b3ea8892d6 100644 --- a/editeng/inc/editeng/cntritem.hxx +++ b/editeng/inc/editeng/cntritem.hxx @@ -35,9 +35,8 @@ // class SvxContourItem -------------------------------------------------- -/* - [Beschreibung] - Dieses Item beschreibt, ob Konturschrift eingestellt ist. +/* [Description] + This item describes, if contour is employed. */ class EDITENG_DLLPUBLIC SvxContourItem : public SfxBoolItem @@ -45,13 +44,13 @@ class EDITENG_DLLPUBLIC SvxContourItem : public SfxBoolItem public: TYPEINFO(); - SvxContourItem( const BOOL bContoured /*= FALSE*/, - const USHORT nId ); + SvxContourItem( const sal_Bool bContoured /*= sal_False*/, + const sal_uInt16 nId ); - // "pure virtual Methoden" vom SfxPoolItem + // "pure virtual Methods" from SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, diff --git a/editeng/inc/editeng/colritem.hxx b/editeng/inc/editeng/colritem.hxx index c71829bcee..6d0373f122 100644 --- a/editeng/inc/editeng/colritem.hxx +++ b/editeng/inc/editeng/colritem.hxx @@ -42,9 +42,9 @@ namespace rtl // class SvxColorItem ---------------------------------------------------- -/* [Beschreibung] +/* [Description] - Dieses Item beschreibt eine Farbe. + This item describes a color. */ #define VERSION_USEAUTOCOLOR 1 @@ -57,17 +57,17 @@ private: public: TYPEINFO(); - SvxColorItem( const USHORT nId ); - SvxColorItem( const Color& aColor, const USHORT nId ); - SvxColorItem( SvStream& rStrm, const USHORT nId ); + SvxColorItem( const sal_uInt16 nId ); + SvxColorItem( const Color& aColor, const sal_uInt16 nId ); + SvxColorItem( SvStream& rStrm, const sal_uInt16 nId ); SvxColorItem( const SvxColorItem& rCopy ); ~SvxColorItem(); - // "pure virtual Methoden" vom SfxPoolItem + // "pure virtual Methods" from SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); - virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -75,8 +75,8 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; inline SvxColorItem& operator=(const SvxColorItem& rColor) { diff --git a/editeng/inc/editeng/crsditem.hxx b/editeng/inc/editeng/crsditem.hxx index 6c832f503c..2d67e5288a 100644 --- a/editeng/inc/editeng/crsditem.hxx +++ b/editeng/inc/editeng/crsditem.hxx @@ -42,9 +42,8 @@ namespace rtl // class SvxCrossedOutItem ----------------------------------------------- -/* - [Beschreibung] - Dieses Item beschreibt, ob und wie durchstrichen ist. +/* [Description] + This item describes, whether and how it is striked out. */ class EDITENG_DLLPUBLIC SvxCrossedOutItem : public SfxEnumItem @@ -53,29 +52,29 @@ public: TYPEINFO(); SvxCrossedOutItem( const FontStrikeout eSt /*= STRIKEOUT_NONE*/, - const USHORT nId ); + const sal_uInt16 nId ); - // "pure virtual Methoden" vom SfxPoolItem + // "pure virtual Methods" from SfxPoolItem virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; - virtual String GetValueTextByPos( USHORT nPos ) const; - virtual USHORT GetValueCount() const; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; + virtual String GetValueTextByPos( sal_uInt16 nPos ) const; + virtual sal_uInt16 GetValueCount() const; + virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); - // MS VC4.0 kommt durcheinander - void SetValue( USHORT nNewVal ) + // MS VC4.0 messes things up + void SetValue( sal_uInt16 nNewVal ) {SfxEnumItem::SetValue(nNewVal); } virtual int HasBoolValue() const; - virtual BOOL GetBoolValue() const; - virtual void SetBoolValue( BOOL bVal ); + virtual sal_Bool GetBoolValue() const; + virtual void SetBoolValue( sal_Bool bVal ); inline SvxCrossedOutItem& operator=(const SvxCrossedOutItem& rCross) { @@ -87,7 +86,7 @@ public: FontStrikeout GetStrikeout() const { return (FontStrikeout)GetValue(); } void SetStrikeout( FontStrikeout eNew ) - { SetValue( (USHORT)eNew ); } + { SetValue( (sal_uInt16)eNew ); } }; #endif // #ifndef _SVX_CRSDITEM_HXX diff --git a/editeng/inc/editeng/cscoitem.hxx b/editeng/inc/editeng/cscoitem.hxx index 4ddbfe32df..41067ffe93 100644 --- a/editeng/inc/editeng/cscoitem.hxx +++ b/editeng/inc/editeng/cscoitem.hxx @@ -36,9 +36,9 @@ // class SvxCharSetColorItem --------------------------------------------- -/* [Beschreibung] +/* [Description] - PB: wird nur intern im Reader des Writers benoetigt + Is only needed internally in the reader of Writer. */ class EDITENG_DLLPUBLIC SvxCharSetColorItem : public SvxColorItem @@ -47,19 +47,19 @@ class EDITENG_DLLPUBLIC SvxCharSetColorItem : public SvxColorItem public: TYPEINFO(); - SvxCharSetColorItem( const USHORT nId ); + SvxCharSetColorItem( const sal_uInt16 nId ); SvxCharSetColorItem( const Color& aColor, const rtl_TextEncoding eFrom, - const USHORT nId ); + const sal_uInt16 nId ); - // "pure virtual Methoden" vom SfxPoolItem + // "pure virtual Methods" from SfxPoolItem virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; inline rtl_TextEncoding& GetCharSet() { return eFrom; } inline rtl_TextEncoding GetCharSet() const { return eFrom; } diff --git a/editeng/inc/editeng/editdata.hxx b/editeng/inc/editeng/editdata.hxx index 6d252b336a..f5ef746005 100644 --- a/editeng/inc/editeng/editdata.hxx +++ b/editeng/inc/editeng/editdata.hxx @@ -57,7 +57,7 @@ enum EVAnchorMode { #define EE_APPEND 0xFFFF #define EE_INDEX_NOT_FOUND 0xFFFF -// Fehlermeldungen fuer Read/Write-Methode +// Error messages for Read / Write Method #define EE_READWRITE_OK (SVSTREAM_OK) #define EE_READWRITE_WRONGFORMAT (SVSTREAM_ERRBASE_USER+1) #define EE_READWRITE_GENERALERROR (SVSTREAM_ERRBASE_USER+2) @@ -104,13 +104,13 @@ class ImpEditEngine; class EditTextObject; class SfxStyleSheet; -#define RGCHK_NONE 0 // Keine Korrektur der ViusArea beim Scrollen -#define RGCHK_NEG 1 // Keine neg. ViusArea beim Scrollen -#define RGCHK_PAPERSZ1 2 // VisArea muss in Papierbreite,Texthoehe liegen +#define RGCHK_NONE 0 // No correction of ViusArea when scrolling +#define RGCHK_NEG 1 // No negative ViusArea when scrolling +#define RGCHK_PAPERSZ1 2 // VisArea must be within paper width, Text Size struct EPosition { - USHORT nPara; + sal_uInt16 nPara; xub_StrLen nIndex; EPosition() : @@ -119,7 +119,7 @@ struct EPosition { } - EPosition( USHORT nPara_, xub_StrLen nPos_ ) : + EPosition( sal_uInt16 nPara_, xub_StrLen nPos_ ) : nPara( nPara_ ), nIndex( nPos_ ) { @@ -128,14 +128,14 @@ struct EPosition struct ESelection { - USHORT nStartPara; + sal_uInt16 nStartPara; xub_StrLen nStartPos; - USHORT nEndPara; + sal_uInt16 nEndPara; xub_StrLen nEndPos; ESelection() : nStartPara( 0 ), nStartPos( 0 ), nEndPara( 0 ), nEndPos( 0 ) {} - ESelection( USHORT nStPara, xub_StrLen nStPos, USHORT nEPara, xub_StrLen nEPos ) : + ESelection( sal_uInt16 nStPara, xub_StrLen nStPos, sal_uInt16 nEPara, xub_StrLen nEPos ) : nStartPara( nStPara ), nStartPos( nStPos ), nEndPara( nEPara ), @@ -143,7 +143,7 @@ struct ESelection { } - ESelection( USHORT nPara, xub_StrLen nPos ) : + ESelection( sal_uInt16 nPara, xub_StrLen nPos ) : nStartPara( nPara ), nStartPos( nPos ), nEndPara( nPara ), @@ -152,14 +152,14 @@ struct ESelection } void Adjust(); - BOOL IsEqual( const ESelection& rS ) const; - BOOL IsLess( const ESelection& rS ) const; - BOOL IsGreater( const ESelection& rS ) const; - BOOL IsZero() const; - BOOL HasRange() const; + sal_Bool IsEqual( const ESelection& rS ) const; + sal_Bool IsLess( const ESelection& rS ) const; + sal_Bool IsGreater( const ESelection& rS ) const; + sal_Bool IsZero() const; + sal_Bool HasRange() const; }; -inline BOOL ESelection::HasRange() const +inline sal_Bool ESelection::HasRange() const { return ( nStartPara != nEndPara ) || ( nStartPos != nEndPos ); } @@ -178,8 +178,8 @@ inline sal_Bool ESelection::IsEqual( const ESelection& rS ) const inline sal_Bool ESelection::IsLess( const ESelection& rS ) const { - // Selektion muss justiert sein. - // => Nur pueffen, ob Ende von 'this' < Start von rS + // The selection must be adjusted. + // => Only check if end of 'this' < Start of rS if ( ( nEndPara < rS.nStartPara ) || ( ( nEndPara == rS.nStartPara ) && ( nEndPos < rS.nStartPos ) && !IsEqual( rS ) ) ) @@ -191,8 +191,8 @@ inline sal_Bool ESelection::IsLess( const ESelection& rS ) const inline sal_Bool ESelection::IsGreater( const ESelection& rS ) const { - // Selektion muss justiert sein. - // => Nur pueffen, ob Ende von 'this' > Start von rS + // The selection must be adjusted. + // => Only check if end of 'this' < Start of rS if ( ( nStartPara > rS.nEndPara ) || ( ( nStartPara == rS.nEndPara ) && ( nStartPos > rS.nEndPos ) && !IsEqual( rS ) ) ) @@ -225,7 +225,7 @@ struct EDITENG_DLLPUBLIC EFieldInfo EPosition aPosition; EFieldInfo(); - EFieldInfo( const SvxFieldItem& rFieldItem, USHORT nPara, USHORT nPos ); + EFieldInfo( const SvxFieldItem& rFieldItem, sal_uInt16 nPara, sal_uInt16 nPos ); ~EFieldInfo(); EFieldInfo( const EFieldInfo& ); @@ -235,12 +235,12 @@ struct EDITENG_DLLPUBLIC EFieldInfo // ----------------------------------------------------------------------- enum ImportState { - RTFIMP_START, RTFIMP_END, // nur pParser, nPara, nIndex + RTFIMP_START, RTFIMP_END, // only pParser, nPara, nIndex RTFIMP_NEXTTOKEN, RTFIMP_UNKNOWNATTR, // nToken+nTokenValue RTFIMP_SETATTR, // pAttrs RTFIMP_INSERTTEXT, // aText RTFIMP_INSERTPARA, // - - HTMLIMP_START, HTMLIMP_END, // nur pParser, nPara, nIndex + HTMLIMP_START, HTMLIMP_END, // only pParser, nPara, nIndex HTMLIMP_NEXTTOKEN, HTMLIMP_UNKNOWNATTR, // nToken HTMLIMP_SETATTR, // pAttrs HTMLIMP_INSERTTEXT, // aText @@ -283,24 +283,24 @@ struct ParagraphInfos , nFirstLineMaxAscent( 0 ) , bValid( 0 ) {} - USHORT nParaHeight; - USHORT nLines; + sal_uInt16 nParaHeight; + sal_uInt16 nLines; - USHORT nFirstLineStartX; + sal_uInt16 nFirstLineStartX; - USHORT nFirstLineOffset; - USHORT nFirstLineHeight; - USHORT nFirstLineTextHeight; - USHORT nFirstLineMaxAscent; + sal_uInt16 nFirstLineOffset; + sal_uInt16 nFirstLineHeight; + sal_uInt16 nFirstLineTextHeight; + sal_uInt16 nFirstLineMaxAscent; - BOOL bValid; // Bei einer Abfrage waehrend der Formatierung ungueltig! + sal_Bool bValid; // A query during formatting is not valid! }; struct EECharAttrib { const SfxPoolItem* pAttr; - USHORT nPara; + sal_uInt16 nPara; xub_StrLen nStart; xub_StrLen nEnd; }; @@ -309,11 +309,11 @@ SV_DECL_VARARR_VISIBILITY( EECharAttribArray, EECharAttrib, 0, 4, EDITENG_DLLPUB struct MoveParagraphsInfo { - USHORT nStartPara; - USHORT nEndPara; - USHORT nDestPara; + sal_uInt16 nStartPara; + sal_uInt16 nEndPara; + sal_uInt16 nDestPara; - MoveParagraphsInfo( USHORT nS, USHORT nE, USHORT nD ) + MoveParagraphsInfo( sal_uInt16 nS, sal_uInt16 nE, sal_uInt16 nD ) { nStartPara = nS; nEndPara = nE; nDestPara = nD; } }; @@ -322,9 +322,9 @@ struct MoveParagraphsInfo struct PasteOrDropInfos { - USHORT nAction; - USHORT nStartPara; - USHORT nEndPara; + sal_uInt16 nAction; + sal_uInt16 nStartPara; + sal_uInt16 nEndPara; PasteOrDropInfos() : nAction(0), nStartPara(0xFFFF), nEndPara(0xFFFF) {} }; @@ -377,10 +377,10 @@ struct EENotify EditEngine* pEditEngine; EditView* pEditView; - USHORT nParagraph; // only valid in PARAGRAPHINSERTED/EE_NOTIFY_PARAGRAPHREMOVED + sal_uInt16 nParagraph; // only valid in PARAGRAPHINSERTED/EE_NOTIFY_PARAGRAPHREMOVED - USHORT nParam1; - USHORT nParam2; + sal_uInt16 nParam1; + sal_uInt16 nParam2; EENotify( EENotifyType eType ) { eNotificationType = eType; pEditEngine = NULL; pEditView = NULL; nParagraph = EE_PARA_NOT_FOUND; nParam1 = 0; nParam2 = 0; } diff --git a/editeng/inc/editeng/editeng.hxx b/editeng/inc/editeng/editeng.hxx index 75750ba74f..ed62964750 100644 --- a/editeng/inc/editeng/editeng.hxx +++ b/editeng/inc/editeng/editeng.hxx @@ -25,7 +25,7 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -// MyEDITENG, wegen exportiertem EditEng +// MyEDITENG, due to exported EditEng #ifndef _MyEDITENG_HXX #define _MyEDITENG_HXX @@ -34,7 +34,6 @@ class EditView; class OutputDevice; class EditUndo; class SvxFont; -class SfxUndoManager; class SfxItemPool; class SfxStyleSheet; class String; @@ -85,6 +84,9 @@ namespace svx{ struct SpellPortion; typedef std::vector<SpellPortion> SpellPortions; } +namespace svl{ +class IUndoManager; +} namespace basegfx { class B2DPolyPolygon; } #include <rsc/rscsfx.hxx> @@ -92,7 +94,7 @@ namespace basegfx { class B2DPolyPolygon; } #include <i18npool/lang.h> #include "editeng/editengdllapi.h" -#include <tools/rtti.hxx> // wegen typedef TypeId +#include <tools/rtti.hxx> // due to typedef TypeId #include <editeng/eedata.hxx> class SvxFieldData; @@ -122,7 +124,7 @@ private: EDITENG_DLLPRIVATE EditEngine( const EditEngine& ); EDITENG_DLLPRIVATE EditEngine& operator=( const EditEngine& ); - EDITENG_DLLPRIVATE BOOL PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pView, Window* pFrameWin = NULL ); + EDITENG_DLLPRIVATE sal_uInt8 PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pView, Window* pFrameWin = NULL ); protected: @@ -133,8 +135,8 @@ public: const SfxItemSet& GetEmptyItemSet(); - void SetDefTab( USHORT nDefTab ); - USHORT GetDefTab() const; + void SetDefTab( sal_uInt16 nDefTab ); + sal_uInt16 GetDefTab() const; void SetRefDevice( OutputDevice* pRefDef ); OutputDevice* GetRefDevice() const; @@ -142,51 +144,51 @@ public: void SetRefMapMode( const MapMode& rMapMode ); MapMode GetRefMapMode(); - void SetUpdateMode( BOOL bUpdate ); - BOOL GetUpdateMode() const; + void SetUpdateMode( sal_Bool bUpdate ); + sal_Bool GetUpdateMode() const; void SetBackgroundColor( const Color& rColor ); Color GetBackgroundColor() const; Color GetAutoColor() const; - void EnableAutoColor( BOOL b ); - BOOL IsAutoColorEnabled() const; - void ForceAutoColor( BOOL b ); - BOOL IsForceAutoColor() const; + void EnableAutoColor( sal_Bool b ); + sal_Bool IsAutoColorEnabled() const; + void ForceAutoColor( sal_Bool b ); + sal_Bool IsForceAutoColor() const; - void InsertView( EditView* pEditView, USHORT nIndex = EE_APPEND ); + void InsertView( EditView* pEditView, sal_uInt16 nIndex = EE_APPEND ); EditView* RemoveView( EditView* pEditView ); - EditView* RemoveView( USHORT nIndex = EE_APPEND ); - EditView* GetView( USHORT nIndex = 0 ) const; - USHORT GetViewCount() const; - BOOL HasView( EditView* pView ) const; + EditView* RemoveView( sal_uInt16 nIndex = EE_APPEND ); + EditView* GetView( sal_uInt16 nIndex = 0 ) const; + sal_uInt16 GetViewCount() const; + sal_Bool HasView( EditView* pView ) const; EditView* GetActiveView() const; void SetActiveView( EditView* pView ); void SetPaperSize( const Size& rSize ); const Size& GetPaperSize() const; - void SetVertical( BOOL bVertical ); - BOOL IsVertical() const; + void SetVertical( sal_Bool bVertical ); + sal_Bool IsVertical() const; - void SetFixedCellHeight( BOOL bUseFixedCellHeight ); - BOOL IsFixedCellHeight() const; + void SetFixedCellHeight( sal_Bool bUseFixedCellHeight ); + sal_Bool IsFixedCellHeight() const; void SetDefaultHorizontalTextDirection( EEHorizontalTextDirection eHTextDir ); EEHorizontalTextDirection GetDefaultHorizontalTextDirection() const; - USHORT GetScriptType( const ESelection& rSelection ) const; - LanguageType GetLanguage( USHORT nPara, USHORT nPos ) const; + sal_uInt16 GetScriptType( const ESelection& rSelection ) const; + LanguageType GetLanguage( sal_uInt16 nPara, sal_uInt16 nPos ) const; void TransliterateText( const ESelection& rSelection, sal_Int32 nTransliterationMode ); - void SetAsianCompressionMode( USHORT nCompression ); - USHORT GetAsianCompressionMode() const; + void SetAsianCompressionMode( sal_uInt16 nCompression ); + sal_uInt16 GetAsianCompressionMode() const; - void SetKernAsianPunctuation( BOOL bEnabled ); - BOOL IsKernAsianPunctuation() const; + void SetKernAsianPunctuation( sal_Bool bEnabled ); + sal_Bool IsKernAsianPunctuation() const; - void SetAddExtLeading( BOOL b ); - BOOL IsAddExtLeading() const; + void SetAddExtLeading( sal_Bool b ); + sal_Bool IsAddExtLeading() const; void SetPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon ); void SetPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::B2DPolyPolygon* pLinePolyPolygon); @@ -203,108 +205,110 @@ public: String GetText( const ESelection& rSelection, const LineEnd eEnd = LINEEND_LF ) const; sal_uInt32 GetTextLen() const; sal_uInt32 GetTextHeight() const; + sal_uInt32 GetTextHeightNTP() const; sal_uInt32 CalcTextWidth(); - String GetText( USHORT nParagraph ) const; - xub_StrLen GetTextLen( USHORT nParagraph ) const; - sal_uInt32 GetTextHeight( USHORT nParagraph ) const; + String GetText( sal_uInt16 nParagraph ) const; + xub_StrLen GetTextLen( sal_uInt16 nParagraph ) const; + sal_uInt32 GetTextHeight( sal_uInt16 nParagraph ) const; - USHORT GetParagraphCount() const; + sal_uInt16 GetParagraphCount() const; - USHORT GetLineCount( USHORT nParagraph ) const; - xub_StrLen GetLineLen( USHORT nParagraph, USHORT nLine ) const; - void GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const; - USHORT GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const; - sal_uInt32 GetLineHeight( USHORT nParagraph, USHORT nLine = 0 ); - USHORT GetFirstLineOffset( USHORT nParagraph ); - ParagraphInfos GetParagraphInfos( USHORT nPara ); - USHORT FindParagraph( long nDocPosY ); + sal_uInt16 GetLineCount( sal_uInt16 nParagraph ) const; + xub_StrLen GetLineLen( sal_uInt16 nParagraph, sal_uInt16 nLine ) const; + void GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nParagraph, sal_uInt16 nLine ) const; + sal_uInt16 GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const; + sal_uInt32 GetLineHeight( sal_uInt16 nParagraph, sal_uInt16 nLine = 0 ); + sal_uInt16 GetFirstLineOffset( sal_uInt16 nParagraph ); + ParagraphInfos GetParagraphInfos( sal_uInt16 nPara ); + sal_uInt16 FindParagraph( long nDocPosY ); EPosition FindDocPosition( const Point& rDocPos ) const; Rectangle GetCharacterBounds( const EPosition& rPos ) const; - String GetWord( USHORT nPara, xub_StrLen nIndex ); + String GetWord( sal_uInt16 nPara, xub_StrLen nIndex ); - ESelection GetWord( const ESelection& rSelection, USHORT nWordType ) const; - ESelection WordLeft( const ESelection& rSelection, USHORT nWordType ) const; - ESelection WordRight( const ESelection& rSelection, USHORT nWordType ) const; - ESelection CursorLeft( const ESelection& rSelection, USHORT nCharacterIteratorMode ) const; - ESelection CursorRight( const ESelection& rSelection, USHORT nCharacterIteratorMode ) const; + ESelection GetWord( const ESelection& rSelection, sal_uInt16 nWordType ) const; + ESelection WordLeft( const ESelection& rSelection, sal_uInt16 nWordType ) const; + ESelection WordRight( const ESelection& rSelection, sal_uInt16 nWordType ) const; + ESelection CursorLeft( const ESelection& rSelection, sal_uInt16 nCharacterIteratorMode ) const; + ESelection CursorRight( const ESelection& rSelection, sal_uInt16 nCharacterIteratorMode ) const; ESelection SelectSentence( const ESelection& rCurSel ) const; void Clear(); void SetText( const String& rStr ); EditTextObject* CreateTextObject(); - EditTextObject* CreateTextObject( USHORT nPara, USHORT nParas = 1 ); + EditTextObject* CreateTextObject( sal_uInt16 nPara, sal_uInt16 nParas = 1 ); EditTextObject* CreateTextObject( const ESelection& rESelection ); void SetText( const EditTextObject& rTextObject ); - void RemoveParagraph( USHORT nPara ); - void InsertParagraph( USHORT nPara, const EditTextObject& rTxtObj ); - void InsertParagraph( USHORT nPara, const String& rText); + void RemoveParagraph( sal_uInt16 nPara ); + void InsertParagraph( sal_uInt16 nPara, const EditTextObject& rTxtObj ); + void InsertParagraph( sal_uInt16 nPara, const String& rText); - void SetText( USHORT nPara, const EditTextObject& rTxtObj ); - void SetText( USHORT nPara, const String& rText); + void SetText( sal_uInt16 nPara, const EditTextObject& rTxtObj ); + void SetText( sal_uInt16 nPara, const String& rText); - virtual void SetParaAttribs( USHORT nPara, const SfxItemSet& rSet ); - virtual const SfxItemSet& GetParaAttribs( USHORT nPara ) const; + virtual void SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet ); + virtual const SfxItemSet& GetParaAttribs( sal_uInt16 nPara ) const; - void GetCharAttribs( USHORT nPara, EECharAttribArray& rLst ) const; + void GetCharAttribs( sal_uInt16 nPara, EECharAttribArray& rLst ) const; - SfxItemSet GetAttribs( USHORT nPara, USHORT nStart, USHORT nEnd, sal_uInt8 nFlags = 0xFF ) const; - SfxItemSet GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib = EditEngineAttribs_All ); + SfxItemSet GetAttribs( sal_uInt16 nPara, sal_uInt16 nStart, sal_uInt16 nEnd, sal_uInt8 nFlags = 0xFF ) const; + SfxItemSet GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = EditEngineAttribs_All ); - BOOL HasParaAttrib( USHORT nPara, USHORT nWhich ) const; - const SfxPoolItem& GetParaAttrib( USHORT nPara, USHORT nWhich ); + sal_Bool HasParaAttrib( sal_uInt16 nPara, sal_uInt16 nWhich ) const; + const SfxPoolItem& GetParaAttrib( sal_uInt16 nPara, sal_uInt16 nWhich ); - Font GetStandardFont( USHORT nPara ); - SvxFont GetStandardSvxFont( USHORT nPara ); + Font GetStandardFont( sal_uInt16 nPara ); + SvxFont GetStandardSvxFont( sal_uInt16 nPara ); void RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich ); - void ShowParagraph( USHORT nParagraph, BOOL bShow = TRUE ); - BOOL IsParagraphVisible( USHORT nParagraph ); + void ShowParagraph( sal_uInt16 nParagraph, sal_Bool bShow = sal_True ); + sal_Bool IsParagraphVisible( sal_uInt16 nParagraph ); - SfxUndoManager& GetUndoManager(); - void UndoActionStart( USHORT nId ); - void UndoActionEnd( USHORT nId ); - BOOL IsInUndo(); + ::svl::IUndoManager& + GetUndoManager(); + void UndoActionStart( sal_uInt16 nId ); + void UndoActionEnd( sal_uInt16 nId ); + sal_Bool IsInUndo(); - void EnableUndo( BOOL bEnable ); - BOOL IsUndoEnabled(); + void EnableUndo( sal_Bool bEnable ); + sal_Bool IsUndoEnabled(); /** returns the value last used for bTryMerge while calling ImpEditEngine::InsertUndo This is currently used in a bad but needed hack to get undo actions merged in the OutlineView in impress. Do not use it unless you want to sell your soul too! */ - BOOL HasTriedMergeOnLastAddUndo() const; + sal_Bool HasTriedMergeOnLastAddUndo() const; void ClearModifyFlag(); void SetModified(); - BOOL IsModified() const; + sal_Bool IsModified() const; void SetModifyHdl( const Link& rLink ); Link GetModifyHdl() const; - BOOL IsInSelectionMode() const; + sal_Bool IsInSelectionMode() const; void StopSelectionMode(); void StripPortions(); - void GetPortions( USHORT nPara, SvUShorts& rList ); + void GetPortions( sal_uInt16 nPara, SvUShorts& rList ); - long GetFirstLineStartX( USHORT nParagraph ); - Point GetDocPosTopLeft( USHORT nParagraph ); + long GetFirstLineStartX( sal_uInt16 nParagraph ); + Point GetDocPosTopLeft( sal_uInt16 nParagraph ); Point GetDocPos( const Point& rPaperPos ) const; - BOOL IsTextPos( const Point& rPaperPos, USHORT nBorder = 0 ); + sal_Bool IsTextPos( const Point& rPaperPos, sal_uInt16 nBorder = 0 ); - // StartDocPos entspr. VisArea.TopLeft(). + // StartDocPos corrresponds to VisArea.TopLeft(). void Draw( OutputDevice* pOutDev, const Rectangle& rOutRect ); void Draw( OutputDevice* pOutDev, const Rectangle& rOutRect, const Point& rStartDocPos ); - void Draw( OutputDevice* pOutDev, const Rectangle& rOutRect, const Point& rStartDocPos, BOOL bClip ); + void Draw( OutputDevice* pOutDev, const Rectangle& rOutRect, const Point& rStartDocPos, sal_Bool bClip ); void Draw( OutputDevice* pOutDev, const Point& rStartPos, short nOrientation = 0 ); -// ULONG: Fehlercode des Streams. - ULONG Read( SvStream& rInput, const String& rBaseURL, EETextFormat, SvKeyValueIterator* pHTTPHeaderAttrs = NULL ); - ULONG Write( SvStream& rOutput, EETextFormat ); +// sal_uInt32: Error code of the stream. + sal_uLong Read( SvStream& rInput, const String& rBaseURL, EETextFormat, SvKeyValueIterator* pHTTPHeaderAttrs = NULL ); + sal_uLong Write( SvStream& rOutput, EETextFormat ); void SetStatusEventHdl( const Link& rLink ); Link GetStatusEventHdl() const; @@ -315,26 +319,26 @@ public: void SetImportHdl( const Link& rLink ); Link GetImportHdl() const; - // Flat-Mode: Keine Zeichenformatierung auswerten => Fuer Outliner - BOOL IsFlatMode() const; - void SetFlatMode( BOOL bFlat ); + // Do not evaluate font formatting => For Outliner + sal_Bool IsFlatMode() const; + void SetFlatMode( sal_Bool bFlat ); void SetControlWord( sal_uInt32 nWord ); sal_uInt32 GetControlWord() const; void QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel ); - void QuickRemoveCharAttribs( USHORT nPara, USHORT nWhich = 0 ); + void QuickRemoveCharAttribs( sal_uInt16 nPara, sal_uInt16 nWhich = 0 ); void QuickMarkInvalid( const ESelection& rSel ); - void QuickFormatDoc( BOOL bFull = FALSE ); + void QuickFormatDoc( sal_Bool bFull = sal_False ); void QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel ); void QuickInsertLineBreak( const ESelection& rSel ); void QuickInsertText( const String& rText, const ESelection& rSel ); void QuickDelete( const ESelection& rSel ); - void QuickMarkToBeRepainted( USHORT nPara ); + void QuickMarkToBeRepainted( sal_uInt16 nPara ); - void SetGlobalCharStretching( USHORT nX = 100, USHORT nY = 100 ); - void GetGlobalCharStretching( USHORT& rX, USHORT& rY ); - void DoStretchChars( USHORT nX, USHORT nY ); + void SetGlobalCharStretching( sal_uInt16 nX = 100, sal_uInt16 nY = 100 ); + void GetGlobalCharStretching( sal_uInt16& rX, sal_uInt16& rY ); + void DoStretchChars( sal_uInt16 nX, sal_uInt16 nY ); void SetEditTextObjectPool( SfxItemPool* pPool ); SfxItemPool* GetEditTextObjectPool() const; @@ -342,8 +346,8 @@ public: void SetStyleSheetPool( SfxStyleSheetPool* pSPool ); SfxStyleSheetPool* GetStyleSheetPool(); - void SetStyleSheet( USHORT nPara, SfxStyleSheet* pStyle ); - SfxStyleSheet* GetStyleSheet( USHORT nPara ) const; + void SetStyleSheet( sal_uInt16 nPara, SfxStyleSheet* pStyle ); + SfxStyleSheet* GetStyleSheet( sal_uInt16 nPara ) const; void SetWordDelimiters( const String& rDelimiters ); String GetWordDelimiters() const; @@ -351,11 +355,11 @@ public: void SetGroupChars( const String& rChars ); String GetGroupChars() const; - void EnablePasteSpecial( BOOL bEnable ); - BOOL IsPasteSpecialEnabled() const; + void EnablePasteSpecial( sal_Bool bEnable ); + sal_Bool IsPasteSpecialEnabled() const; - void EnableIdleFormatter( BOOL bEnable ); - BOOL IsIdleFormatterEnabled() const; + void EnableIdleFormatter( sal_Bool bEnable ); + sal_Bool IsIdleFormatterEnabled() const; void EraseVirtualDevice(); @@ -376,16 +380,16 @@ public: void SetDefaultLanguage( LanguageType eLang ); LanguageType GetDefaultLanguage() const; - BOOL HasOnlineSpellErrors() const; + sal_Bool HasOnlineSpellErrors() const; void CompleteOnlineSpelling(); - void SetBigTextObjectStart( USHORT nStartAtPortionCount ); - USHORT GetBigTextObjectStart() const; - BOOL ShouldCreateBigTextObject() const; + void SetBigTextObjectStart( sal_uInt16 nStartAtPortionCount ); + sal_uInt16 GetBigTextObjectStart() const; + sal_Bool ShouldCreateBigTextObject() const; - // Zum schnellen Vorab-Pruefen ohne View: + // For fast Pre-Test without view: EESpellState HasSpellErrors(); - BOOL HasText( const SvxSearchItem& rSearchItem ); + sal_Bool HasText( const SvxSearchItem& rSearchItem ); //initialize sentence spelling void StartSpelling(EditView& rEditView, sal_Bool bMultipleDoc); @@ -400,15 +404,15 @@ public: // for text conversion (see also HasSpellErrors) sal_Bool HasConvertibleTextPortion( LanguageType nLang ); - virtual BOOL ConvertNextDocument(); + virtual sal_Bool ConvertNextDocument(); - BOOL UpdateFields(); - void RemoveFields( BOOL bKeepFieldText, TypeId aType = NULL ); + sal_Bool UpdateFields(); + void RemoveFields( sal_Bool bKeepFieldText, TypeId aType = NULL ); - USHORT GetFieldCount( USHORT nPara ) const; - EFieldInfo GetFieldInfo( USHORT nPara, USHORT nField ) const; + sal_uInt16 GetFieldCount( sal_uInt16 nPara ) const; + EFieldInfo GetFieldInfo( sal_uInt16 nPara, sal_uInt16 nField ) const; - BOOL IsRightToLeft( USHORT nPara ) const; + sal_Bool IsRightToLeft( sal_uInt16 nPara ) const; ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > CreateTransferable( const ESelection& rSelection ) const; @@ -419,18 +423,17 @@ public: void SetBeginPasteOrDropHdl( const Link& rLink ); void SetEndPasteOrDropHdl( const Link& rLink ); - virtual void PaintingFirstLine( USHORT nPara, const Point& rStartPos, long nBaseLineY, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev ); - virtual void ParagraphInserted( USHORT nNewParagraph ); - virtual void ParagraphDeleted( USHORT nDeletedParagraph ); - virtual void ParagraphConnected( USHORT nLeftParagraph, USHORT nRightParagraph ); - virtual void ParaAttribsChanged( USHORT nParagraph ); + virtual void PaintingFirstLine( sal_uInt16 nPara, const Point& rStartPos, long nBaseLineY, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev ); + virtual void ParagraphInserted( sal_uInt16 nNewParagraph ); + virtual void ParagraphDeleted( sal_uInt16 nDeletedParagraph ); + virtual void ParagraphConnected( sal_uInt16 nLeftParagraph, sal_uInt16 nRightParagraph ); + virtual void ParaAttribsChanged( sal_uInt16 nParagraph ); virtual void StyleSheetChanged( SfxStyleSheet* pStyle ); - virtual void ParagraphHeightChanged( USHORT nPara ); + virtual void ParagraphHeightChanged( sal_uInt16 nPara ); - // #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 Point& rStartPos, const String& rText, sal_uInt16 nTextStart, sal_uInt16 nTextLen, const sal_Int32* pDXArray, + const SvxFont& rFont, sal_uInt16 nPara, xub_StrLen nIndex, sal_uInt8 nRightToLeft, const EEngineData::WrongSpellVector* pWrongSpellVector, const SvxFieldData* pFieldData, bool bEndOfLine, @@ -442,39 +445,38 @@ public: virtual void DrawingTab( const Point& rStartPos, long nWidth, const String& rChar, - const SvxFont& rFont, USHORT nPara, xub_StrLen nIndex, BYTE nRightToLeft, + const SvxFont& rFont, sal_uInt16 nPara, xub_StrLen nIndex, sal_uInt8 nRightToLeft, bool bEndOfLine, bool bEndOfParagraph, const Color& rOverlineColor, const Color& rTextLineColor); - - virtual String GetUndoComment( USHORT nUndoId ) const; - virtual BOOL FormattingParagraph( USHORT nPara ); - virtual BOOL SpellNextDocument(); - 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 ); + virtual String GetUndoComment( sal_uInt16 nUndoId ) const; + virtual sal_Bool FormattingParagraph( sal_uInt16 nPara ); + virtual sal_Bool SpellNextDocument(); + virtual void FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos ); + virtual void FieldSelected( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos ); + virtual String CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos, Color*& rTxtColor, Color*& rFldColor ); // to be overloaded if access to bullet information needs to be provided - virtual const SvxNumberFormat * GetNumberFormat( USHORT nPara ) const; + virtual const SvxNumberFormat * GetNumberFormat( sal_uInt16 nPara ) const; - virtual Rectangle GetBulletArea( USHORT nPara ); + virtual Rectangle GetBulletArea( sal_uInt16 nPara ); - static SfxItemPool* CreatePool( BOOL bLoadRefCounts = TRUE ); + static SfxItemPool* CreatePool( sal_Bool bLoadRefCounts = sal_True ); static SfxItemPool& GetGlobalItemPool(); static sal_uInt32 RegisterClipboardFormatName(); - static BOOL DoesKeyChangeText( const KeyEvent& rKeyEvent ); - static BOOL DoesKeyMoveCursor( const KeyEvent& rKeyEvent ); - static BOOL IsSimpleCharInput( const KeyEvent& rKeyEvent ); - static USHORT GetAvailableSearchOptions(); + static sal_Bool DoesKeyChangeText( const KeyEvent& rKeyEvent ); + static sal_Bool DoesKeyMoveCursor( const KeyEvent& rKeyEvent ); + static sal_Bool IsSimpleCharInput( const KeyEvent& rKeyEvent ); + static sal_uInt16 GetAvailableSearchOptions(); static void SetFontInfoInItemSet( SfxItemSet& rItemSet, const Font& rFont ); static void SetFontInfoInItemSet( SfxItemSet& rItemSet, const SvxFont& rFont ); static Font CreateFontFromItemSet( const SfxItemSet& rItemSet ); - static Font CreateFontFromItemSet( const SfxItemSet& rItemSet, USHORT nScriptType ); + static Font CreateFontFromItemSet( const SfxItemSet& rItemSet, sal_uInt16 nScriptType ); static SvxFont CreateSvxFontFromItemSet( const SfxItemSet& rItemSet ); - static void ImportBulletItem( SvxNumBulletItem& rNumBullet, USHORT nLevel, const SvxBulletItem* pOldBullet, const SvxLRSpaceItem* pOldLRSpace ); - static BOOL IsPrintable( sal_Unicode c ) { return ( ( c >= 32 ) && ( c != 127 ) ); } - static BOOL HasValidData( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rTransferable ); + static void ImportBulletItem( SvxNumBulletItem& rNumBullet, sal_uInt16 nLevel, const SvxBulletItem* pOldBullet, const SvxLRSpaceItem* pOldLRSpace ); + static sal_Bool IsPrintable( sal_Unicode c ) { return ( ( c >= 32 ) && ( c != 127 ) ); } + static sal_Bool HasValidData( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rTransferable ); /** sets a link that is called at the beginning of a drag operation at an edit view */ void SetBeginDropHdl( const Link& rLink ); @@ -485,8 +487,8 @@ public: Link GetEndDropHdl() const; /// specifies if auto-correction should capitalize the first word or not (default is on) - void SetFirstWordCapitalization( BOOL bCapitalize ); - BOOL IsFirstWordCapitalization() const; + void SetFirstWordCapitalization( sal_Bool bCapitalize ); + sal_Bool IsFirstWordCapitalization() const; }; #endif // _MyEDITENG_HXX diff --git a/editeng/inc/editeng/editengdllapi.h b/editeng/inc/editeng/editengdllapi.h index 9ec0aeaaa0..6e916385ac 100644..100755 --- a/editeng/inc/editeng/editengdllapi.h +++ b/editeng/inc/editeng/editengdllapi.h @@ -7,9 +7,6 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: editengdllapi.h,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/editeng/inc/editeng/editerr.hxx b/editeng/inc/editeng/editerr.hxx index f5791b83e4..cb1968bb0f 100644 --- a/editeng/inc/editeng/editerr.hxx +++ b/editeng/inc/editeng/editerr.hxx @@ -7,9 +7,6 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: svxids.hrc,v $ - * $Revision: 1.10.132.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/editeng/inc/editeng/editids.hrc b/editeng/inc/editeng/editids.hrc index 386dd0b411..d48a6f3108 100644..100755 --- a/editeng/inc/editeng/editids.hrc +++ b/editeng/inc/editeng/editids.hrc @@ -6,9 +6,6 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: svxids.hrc,v $ - * $Revision: 1.10.132.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/editeng/inc/editeng/editobj.hxx b/editeng/inc/editeng/editobj.hxx index c995ea2565..3ac253c630 100644 --- a/editeng/inc/editeng/editobj.hxx +++ b/editeng/inc/editeng/editobj.hxx @@ -49,11 +49,11 @@ class EECharAttribArray; class EDITENG_DLLPUBLIC EditTextObject { private: - USHORT nWhich; + sal_uInt16 nWhich; EDITENG_DLLPRIVATE EditTextObject& operator=( const EditTextObject& ); protected: - EditTextObject( USHORT nWhich ); + EditTextObject( sal_uInt16 nWhich ); EditTextObject( const EditTextObject& r ); virtual void StoreData( SvStream& rOStream ) const; @@ -62,59 +62,59 @@ protected: public: virtual ~EditTextObject(); - USHORT Which() const { return nWhich; } + sal_uInt16 Which() const { return nWhich; } - virtual USHORT GetUserType() const; // Fuer OutlinerMode, der kann das aber nicht kompatibel speichern - virtual void SetUserType( USHORT n ); + virtual sal_uInt16 GetUserType() const; // For OutlinerMode, it can however not save in compatible format + virtual void SetUserType( sal_uInt16 n ); - virtual ULONG GetObjectSettings() const; - virtual void SetObjectSettings( ULONG n ); + virtual sal_uLong GetObjectSettings() const; + virtual void SetObjectSettings( sal_uLong n ); - virtual BOOL IsVertical() const; - virtual void SetVertical( BOOL bVertical ); + virtual sal_Bool IsVertical() const; + virtual void SetVertical( sal_Bool bVertical ); - virtual USHORT GetScriptType() const; + virtual sal_uInt16 GetScriptType() const; - virtual USHORT GetVersion() const; // Solange der Outliner keine Recordlaenge speichert + virtual sal_uInt16 GetVersion() const; // As long as the outliner does not store any record length. virtual EditTextObject* Clone() const = 0; - BOOL Store( SvStream& rOStream ) const; + sal_Bool Store( SvStream& rOStream ) const; static EditTextObject* Create( SvStream& rIStream, SfxItemPool* pGlobalTextObjectPool = 0 ); void Skip( SvStream& rIStream ); - virtual USHORT GetParagraphCount() const; + virtual sal_uInt16 GetParagraphCount() const; - virtual XubString GetText( USHORT nParagraph ) const; - virtual void Insert( const EditTextObject& rObj, USHORT nPara ); - virtual void RemoveParagraph( USHORT nPara ); - virtual EditTextObject* CreateTextObject( USHORT nPara, USHORT nParas = 1 ) const; + virtual XubString GetText( sal_uInt16 nParagraph ) const; + virtual void Insert( const EditTextObject& rObj, sal_uInt16 nPara ); + virtual void RemoveParagraph( sal_uInt16 nPara ); + virtual EditTextObject* CreateTextObject( sal_uInt16 nPara, sal_uInt16 nParas = 1 ) const; - virtual BOOL HasPortionInfo() const; + virtual sal_Bool HasPortionInfo() const; virtual void ClearPortionInfo(); - virtual BOOL HasOnlineSpellErrors() const; + virtual sal_Bool HasOnlineSpellErrors() const; - virtual BOOL HasCharAttribs( USHORT nWhich = 0 ) const; - virtual void GetCharAttribs( USHORT nPara, EECharAttribArray& rLst ) const; + virtual sal_Bool HasCharAttribs( sal_uInt16 nWhich = 0 ) const; + virtual void GetCharAttribs( sal_uInt16 nPara, EECharAttribArray& rLst ) const; - virtual BOOL RemoveCharAttribs( USHORT nWhich = 0 ); - virtual BOOL RemoveParaAttribs( USHORT nWhich = 0 ); + virtual sal_Bool RemoveCharAttribs( sal_uInt16 nWhich = 0 ); + virtual sal_Bool RemoveParaAttribs( sal_uInt16 nWhich = 0 ); - virtual void MergeParaAttribs( const SfxItemSet& rAttribs, USHORT nStart = EE_CHAR_START, USHORT nEnd = EE_CHAR_END ); + virtual void MergeParaAttribs( const SfxItemSet& rAttribs, sal_uInt16 nStart = EE_CHAR_START, sal_uInt16 nEnd = EE_CHAR_END ); - virtual BOOL IsFieldObject() const; + virtual sal_Bool IsFieldObject() const; virtual const SvxFieldItem* GetField() const; - virtual BOOL HasField( TypeId aType = NULL ) const; + virtual sal_Bool HasField( TypeId aType = NULL ) const; - virtual SfxItemSet GetParaAttribs( USHORT nPara ) const; - virtual void SetParaAttribs( USHORT nPara, const SfxItemSet& rAttribs ); + virtual SfxItemSet GetParaAttribs( sal_uInt16 nPara ) const; + virtual void SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rAttribs ); - virtual BOOL HasStyleSheet( const XubString& rName, SfxStyleFamily eFamily ) const; - virtual void GetStyleSheet( USHORT nPara, XubString& rName, SfxStyleFamily& eFamily ) const; - virtual void SetStyleSheet( USHORT nPara, const XubString& rName, const SfxStyleFamily& eFamily ); - virtual BOOL ChangeStyleSheets( const XubString& rOldName, SfxStyleFamily eOldFamily, + virtual sal_Bool HasStyleSheet( const XubString& rName, SfxStyleFamily eFamily ) const; + virtual void GetStyleSheet( sal_uInt16 nPara, XubString& rName, SfxStyleFamily& eFamily ) const; + virtual void SetStyleSheet( sal_uInt16 nPara, const XubString& rName, const SfxStyleFamily& eFamily ); + virtual sal_Bool ChangeStyleSheets( const XubString& rOldName, SfxStyleFamily eOldFamily, const XubString& rNewName, SfxStyleFamily eNewFamily ); virtual void ChangeStyleSheetName( SfxStyleFamily eFamily, const XubString& rOldName, const XubString& rNewName ); diff --git a/editeng/inc/editeng/editrids.hrc b/editeng/inc/editeng/editrids.hrc index 6e11e0617c..c0a61e2b40 100644..100755 --- a/editeng/inc/editeng/editrids.hrc +++ b/editeng/inc/editeng/editrids.hrc @@ -6,9 +6,6 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: svxids.hrc,v $ - * $Revision: 1.10.132.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -240,45 +237,6 @@ #define RID_SVXITEMS_WEIGHT_ULTRABOLD (RID_EDIT_START + 167) #define RID_SVXITEMS_WEIGHT_BLACK (RID_EDIT_START + 168) -// paper formats -#define RID_SVXSTR_PAPER_A0 (RID_SVX_START + 169) -#define RID_SVXSTR_PAPER_A1 (RID_SVX_START + 170) -#define RID_SVXSTR_PAPER_A2 (RID_SVX_START + 171) -#define RID_SVXSTR_PAPER_A3 (RID_SVX_START + 172) -#define RID_SVXSTR_PAPER_A4 (RID_SVX_START + 173) -#define RID_SVXSTR_PAPER_A5 (RID_SVX_START + 174) -#define RID_SVXSTR_PAPER_B4_ISO (RID_SVX_START + 175) -#define RID_SVXSTR_PAPER_B5_ISO (RID_SVX_START + 176) -#define RID_SVXSTR_PAPER_LETTER (RID_SVX_START + 177) -#define RID_SVXSTR_PAPER_LEGAL (RID_SVX_START + 178) -#define RID_SVXSTR_PAPER_TABLOID (RID_SVX_START + 179) -#define RID_SVXSTR_PAPER_USER (RID_SVX_START + 180) -#define RID_SVXSTR_PAPER_B6_ISO (RID_SVX_START + 181) -#define RID_SVXSTR_PAPER_C4 (RID_SVX_START + 182) -#define RID_SVXSTR_PAPER_C5 (RID_SVX_START + 183) -#define RID_SVXSTR_PAPER_C6 (RID_SVX_START + 184) -#define RID_SVXSTR_PAPER_C65 (RID_SVX_START + 185) -#define RID_SVXSTR_PAPER_DL (RID_SVX_START + 186) -#define RID_SVXSTR_PAPER_DIA (RID_SVX_START + 187) -#define RID_SVXSTR_PAPER_SCREEN (RID_SVX_START + 188) -#define RID_SVXSTR_PAPER_C (RID_SVX_START + 189) -#define RID_SVXSTR_PAPER_D (RID_SVX_START + 190) -#define RID_SVXSTR_PAPER_E (RID_SVX_START + 191) -#define RID_SVXSTR_PAPER_EXECUTIVE (RID_SVX_START + 192) -#define RID_SVXSTR_PAPER_LEGAL2 (RID_SVX_START + 193) -#define RID_SVXSTR_PAPER_MONARCH (RID_SVX_START + 194) -#define RID_SVXSTR_PAPER_COM675 (RID_SVX_START + 195) -#define RID_SVXSTR_PAPER_COM9 (RID_SVX_START + 196) -#define RID_SVXSTR_PAPER_COM10 (RID_SVX_START + 197) -#define RID_SVXSTR_PAPER_COM11 (RID_SVX_START + 198) -#define RID_SVXSTR_PAPER_COM12 (RID_SVX_START + 199) -#define RID_SVXSTR_PAPER_KAI16 (RID_SVX_START + 200) -#define RID_SVXSTR_PAPER_KAI32 (RID_SVX_START + 201) -#define RID_SVXSTR_PAPER_KAI32BIG (RID_SVX_START + 202) -#define RID_SVXSTR_PAPER_B4_JIS (RID_SVX_START + 203) -#define RID_SVXSTR_PAPER_B5_JIS (RID_SVX_START + 204) -#define RID_SVXSTR_PAPER_B6_JIS (RID_SVX_START + 205) - // enum FontItalic ------------------------------------------------------- #define RID_SVXITEMS_ITALIC_BEGIN (RID_EDIT_START + 206) #define RID_SVXITEMS_ITALIC_NONE (RID_EDIT_START + 206) @@ -321,25 +279,23 @@ #define RID_SVXITEMS_SHADOW_BOTTOMLEFT (RID_EDIT_START + 232) #define RID_SVXITEMS_SHADOW_BOTTOMRIGHT (RID_EDIT_START + 233) -// Umrandungslinien -#define RID_SINGLE_LINE0 (RID_EDIT_START + 234) -#define RID_SINGLE_LINE1 (RID_EDIT_START + 235) -#define RID_SINGLE_LINE2 (RID_EDIT_START + 236) -#define RID_SINGLE_LINE3 (RID_EDIT_START + 237) -#define RID_SINGLE_LINE4 (RID_EDIT_START + 238) -#define RID_DOUBLE_LINE0 (RID_EDIT_START + 239) -#define RID_DOUBLE_LINE1 (RID_EDIT_START + 240) -#define RID_DOUBLE_LINE2 (RID_EDIT_START + 241) -#define RID_DOUBLE_LINE3 (RID_EDIT_START + 242) -#define RID_DOUBLE_LINE4 (RID_EDIT_START + 243) -#define RID_DOUBLE_LINE5 (RID_EDIT_START + 244) -#define RID_DOUBLE_LINE6 (RID_EDIT_START + 245) -#define RID_DOUBLE_LINE7 (RID_EDIT_START + 246) -#define RID_DOUBLE_LINE8 (RID_EDIT_START + 247) -#define RID_DOUBLE_LINE9 (RID_EDIT_START + 248) -#define RID_DOUBLE_LINE10 (RID_EDIT_START + 249) - -// Metric-Texte +// Border lines +#define RID_SOLID (RID_EDIT_START + 234) +#define RID_DOTTED (RID_EDIT_START + 235) +#define RID_DASHED (RID_EDIT_START + 236) +#define RID_DOUBLE (RID_EDIT_START + 237) +#define RID_THINTHICK_SMALLGAP (RID_EDIT_START + 238) +#define RID_THINTHICK_MEDIUMGAP (RID_EDIT_START + 239) +#define RID_THINTHICK_LARGEGAP (RID_EDIT_START + 240) +#define RID_THICKTHIN_SMALLGAP (RID_EDIT_START + 241) +#define RID_THICKTHIN_MEDIUMGAP (RID_EDIT_START + 242) +#define RID_THICKTHIN_LARGEGAP (RID_EDIT_START + 243) +#define RID_EMBOSSED (RID_EDIT_START + 244) +#define RID_ENGRAVED (RID_EDIT_START + 245) +#define RID_OUTSET (RID_EDIT_START + 246) +#define RID_INSET (RID_EDIT_START + 247) + +// Metric-Text #define RID_SVXITEMS_METRIC_MM (RID_EDIT_START + 250) #define RID_SVXITEMS_METRIC_CM (RID_EDIT_START + 251) #define RID_SVXITEMS_METRIC_INCH (RID_EDIT_START + 252) diff --git a/editeng/inc/editeng/editstat.hxx b/editeng/inc/editeng/editstat.hxx index 15de80a6a0..e554f721ff 100644 --- a/editeng/inc/editeng/editstat.hxx +++ b/editeng/inc/editeng/editstat.hxx @@ -32,43 +32,43 @@ #include <tools/string.hxx> #include <i18npool/lang.h> -#define EE_CNTRL_USECHARATTRIBS 0x00000001 // Verwendung harter ZeichenAttr. -#define EE_CNTRL_USEPARAATTRIBS 0x00000002 // Verwendung von AbsatzAttr. -#define EE_CNTRL_CRSRLEFTPARA 0x00000004 // Cursor ist in einen anderen Absatz gewandert -#define EE_CNTRL_DOIDLEFORMAT 0x00000008 // Idle-Formatierung +#define EE_CNTRL_USECHARATTRIBS 0x00000001 // Use of hard character attributes +#define EE_CNTRL_USEPARAATTRIBS 0x00000002 // Using paragraph attributes. +#define EE_CNTRL_CRSRLEFTPARA 0x00000004 // Cursor is moved to another paragraph +#define EE_CNTRL_DOIDLEFORMAT 0x00000008 // Formatting idle #define EE_CNTRL_PASTESPECIAL 0x00000010 // Allow PasteSpecial -#define EE_CNTRL_AUTOINDENTING 0x00000020 // Automatisches einruecken -#define EE_CNTRL_UNDOATTRIBS 0x00000040 // Undo fuer Attribute.... -#define EE_CNTRL_ONECHARPERLINE 0x00000080 // Ein Zeichen pro Zeile -#define EE_CNTRL_NOCOLORS 0x00000100 // Engine: Keine Farben -#define EE_CNTRL_OUTLINER 0x00000200 // Sonderbehandlung Outliner/Gliederungsmodus -#define EE_CNTRL_OUTLINER2 0x00000400 // Sonderbehandlung Outliner/Seite -#define EE_CNTRL_ALLOWBIGOBJS 0x00000800 // PortionInfo in Textobjekten -#define EE_CNTRL_ONLINESPELLING 0x00001000 // Waehrend des editieren Spelling -#define EE_CNTRL_STRETCHING 0x00002000 // Stretch-Modus -#define EE_CNTRL_MARKFIELDS 0x00004000 // Felder farblich hinterlegen +#define EE_CNTRL_AUTOINDENTING 0x00000020 // Automatic indenting +#define EE_CNTRL_UNDOATTRIBS 0x00000040 // Undo for Attributes.... +#define EE_CNTRL_ONECHARPERLINE 0x00000080 // One character per line +#define EE_CNTRL_NOCOLORS 0x00000100 // Engine: No Color +#define EE_CNTRL_OUTLINER 0x00000200 // Special treatment Outliner/Outline mode +#define EE_CNTRL_OUTLINER2 0x00000400 // Special treatment Outliner/Page +#define EE_CNTRL_ALLOWBIGOBJS 0x00000800 // Portion info in text object +#define EE_CNTRL_ONLINESPELLING 0x00001000 // During the edit Spelling +#define EE_CNTRL_STRETCHING 0x00002000 // Stretch mode +#define EE_CNTRL_MARKFIELDS 0x00004000 // Mark Fields with color #define EE_CNTRL_URLSFXEXECUTE 0x00008000 // !!!OLD!!!: SFX-URL-Execute. -#define EE_CNTRL_RESTOREFONT 0x00010000 // Font im OutDev restaurieren -#define EE_CNTRL_RTFSTYLESHEETS 0x00020000 // Stylesheets bei Import verwenden -//#define EE_CNTRL_NOREDLINES 0x00040000 // Keine RedLines bei OnlineSpellError /* removed #i91949 */ -#define EE_CNTRL_AUTOCORRECT 0x00080000 // AutoKorrektur +#define EE_CNTRL_RESTOREFONT 0x00010000 // Restore Font in OutDev +#define EE_CNTRL_RTFSTYLESHEETS 0x00020000 // Use Stylesheets when imported +//#define EE_CNTRL_NOREDLINES 0x00040000 // No RedLines when OnlineSpellError /* removed #i91949 */ +#define EE_CNTRL_AUTOCORRECT 0x00080000 // AutoCorrect #define EE_CNTRL_AUTOCOMPLETE 0x00100000 // AutoComplete -#define EE_CNTRL_AUTOPAGESIZEX 0x00200000 // Papierbreite an Text anpassen -#define EE_CNTRL_AUTOPAGESIZEY 0x00400000 // Papierhoehe an Text anpassen +#define EE_CNTRL_AUTOPAGESIZEX 0x00200000 // Adjust paper width to Text +#define EE_CNTRL_AUTOPAGESIZEY 0x00400000 // Adjust paper height to Text #define EE_CNTRL_AUTOPAGESIZE (EE_CNTRL_AUTOPAGESIZEX|EE_CNTRL_AUTOPAGESIZEY) -#define EE_CNTRL_TABINDENTING 0x00800000 // Einruecken mit Tab -#define EE_CNTRL_FORMAT100 0x01000000 // Immer nach 100% formatieren -#define EE_CNTRL_ULSPACESUMMATION 0x02000000 // MS Compat: SA und SB aufsummieren, nicht maximalwert -#define EE_CNTRL_ULSPACEFIRSTPARA 0x04000000 // MS Compat: SB auch beim ersten Absatz auswerten - -#define EV_CNTRL_AUTOSCROLL 0x00000001 // Autom. Scrollen horiz. -#define EV_CNTRL_BIGSCROLL 0x00000002 // Weiter Scrollen, als nur zum Cursor -#define EV_CNTRL_ENABLEPASTE 0x00000004 // Paste erlauben -#define EV_CNTRL_SINGLELINEPASTE 0x00000008 // View: Paste in Eingabezeile... -#define EV_CNTRL_OVERWRITE 0x00000010 // Ueberschreibmodus -#define EV_CNTRL_INVONEMORE 0x00000020 // Ein Pixel mehr invalidieren -#define EV_CNTRL_AUTOSIZEX 0x00000040 // Automatisch an Textbreite anpassen -#define EV_CNTRL_AUTOSIZEY 0x00000080 // Automatisch an Texthoehe anpassen +#define EE_CNTRL_TABINDENTING 0x00800000 // Indent with tab +#define EE_CNTRL_FORMAT100 0x01000000 // Always format to 100% +#define EE_CNTRL_ULSPACESUMMATION 0x02000000 // MS Compat: sum SA and SB, not maximum value +#define EE_CNTRL_ULSPACEFIRSTPARA 0x04000000 // MS Compat: evaluate also at the first paragraph + +#define EV_CNTRL_AUTOSCROLL 0x00000001 // Auto scrolling horizontally +#define EV_CNTRL_BIGSCROLL 0x00000002 // Scroll further to the cursor +#define EV_CNTRL_ENABLEPASTE 0x00000004 // Enable Paste +#define EV_CNTRL_SINGLELINEPASTE 0x00000008 // View: Paste in input line ... +#define EV_CNTRL_OVERWRITE 0x00000010 // Overwrite mode +#define EV_CNTRL_INVONEMORE 0x00000020 // Invalidate one pixel more +#define EV_CNTRL_AUTOSIZEX 0x00000040 // Automatically adapt to text width +#define EV_CNTRL_AUTOSIZEY 0x00000080 // Automatically adapt to Text width #define EV_CNTRL_AUTOSIZE (EV_CNTRL_AUTOSIZEX|EV_CNTRL_AUTOSIZEY) #define EE_STAT_HSCROLL 0x00000001 @@ -81,15 +81,15 @@ #define EE_STAT_WRONGWORDCHANGED 0x00000080 // #define EE_STAT_MODIFIED 0x00000100 -// Nur fuer Update: +// Only for Update: #define EE_CNTRL_AUTOCENTER EE_CNTRL_AUTOPAGESIZE #define EE_STAT_GROWY EE_STAT_TEXTHEIGHTCHANGED /* - EE_STAT_CRSRLEFTPARA zur Zeit bei Cursorbewegungen und Return. + EE_STAT_CRSRLEFTPARA at the time cursor movement and the enter. */ -inline void SetFlags( ULONG& rBits, const ULONG nMask, bool bOn ) +inline void SetFlags( sal_uLong& rBits, const sal_uInt32 nMask, bool bOn ) { if ( bOn ) rBits |= nMask; @@ -100,25 +100,25 @@ inline void SetFlags( ULONG& rBits, const ULONG nMask, bool bOn ) class EditStatus { protected: - ULONG nStatusBits; - ULONG nControlBits; - USHORT nPrevPara; // fuer EE_STAT_CRSRLEFTPARA + sal_uLong nStatusBits; + sal_uLong nControlBits; + sal_uInt16 nPrevPara; // for EE_STAT_CRSRLEFTPARA public: EditStatus() { nStatusBits = 0; nControlBits = 0; nPrevPara = 0xFFFF; } void Clear() { nStatusBits = 0; } - void SetControlBits( ULONG nMask, bool bOn ) + void SetControlBits( sal_uLong nMask, bool bOn ) { SetFlags( nControlBits, nMask, bOn ); } - ULONG GetStatusWord() const { return nStatusBits; } - ULONG& GetStatusWord() { return nStatusBits; } + sal_uLong GetStatusWord() const { return nStatusBits; } + sal_uLong& GetStatusWord() { return nStatusBits; } - ULONG GetControlWord() const { return nControlBits; } - ULONG& GetControlWord() { return nControlBits; } + sal_uLong GetControlWord() const { return nControlBits; } + sal_uLong& GetControlWord() { return nControlBits; } - USHORT GetPrevParagraph() const { return nPrevPara; } - USHORT& GetPrevParagraph() { return nPrevPara; } + sal_uInt16 GetPrevParagraph() const { return nPrevPara; } + sal_uInt16& GetPrevParagraph() { return nPrevPara; } }; #define SPELLCMD_IGNOREWORD 0x0001 @@ -129,18 +129,18 @@ public: struct SpellCallbackInfo { - USHORT nCommand; + sal_uInt16 nCommand; String aWord; LanguageType eLanguage; - SpellCallbackInfo( USHORT nCMD, const String& rWord ) + SpellCallbackInfo( sal_uInt16 nCMD, const String& rWord ) : aWord( rWord ) { nCommand = nCMD; eLanguage = LANGUAGE_DONTKNOW; } - SpellCallbackInfo( USHORT nCMD, LanguageType eLang ) + SpellCallbackInfo( sal_uInt16 nCMD, LanguageType eLang ) { nCommand = nCMD; eLanguage = eLang; diff --git a/editeng/inc/editeng/editund2.hxx b/editeng/inc/editeng/editund2.hxx index a4c7917ec8..09e95e1a3d 100644 --- a/editeng/inc/editeng/editund2.hxx +++ b/editeng/inc/editeng/editund2.hxx @@ -34,7 +34,7 @@ class ImpEditEngine; -class EDITENG_DLLPUBLIC EditUndoManager : public SfxUndoManager +class EDITENG_DLLPRIVATE EditUndoManager : public SfxUndoManager { using SfxUndoManager::Undo; using SfxUndoManager::Redo; @@ -44,8 +44,8 @@ private: public: EditUndoManager( ImpEditEngine* pImpEE ); - virtual BOOL Undo( USHORT nCount=1 ); - virtual BOOL Redo( USHORT nCount=1 ); + virtual sal_Bool Undo(); + virtual sal_Bool Redo(); }; // ----------------------------------------------------------------------- @@ -54,12 +54,12 @@ public: class EDITENG_DLLPUBLIC EditUndo : public SfxUndoAction { private: - USHORT nId; + sal_uInt16 nId; ImpEditEngine* pImpEE; public: TYPEINFO(); - EditUndo( USHORT nI, ImpEditEngine* pImpEE ); + EditUndo( sal_uInt16 nI, ImpEditEngine* pImpEE ); virtual ~EditUndo(); ImpEditEngine* GetImpEditEngine() const { return pImpEE; } @@ -67,9 +67,9 @@ public: virtual void Undo() = 0; virtual void Redo() = 0; - virtual BOOL CanRepeat(SfxRepeatTarget&) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget&) const; virtual String GetComment() const; - virtual USHORT GetId() const; + virtual sal_uInt16 GetId() const; }; #endif // _EDITUND2_HXX diff --git a/editeng/inc/editeng/editview.hxx b/editeng/inc/editeng/editview.hxx index 39756b53c3..304187d595 100644 --- a/editeng/inc/editeng/editview.hxx +++ b/editeng/inc/editeng/editview.hxx @@ -25,7 +25,7 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -// MyEDITVIEW, wegen exportiertem EditView +// MyEDITVIEW, due to exported EditView #ifndef _MyEDITVIEW_HXX #define _MyEDITVIEW_HXX @@ -76,7 +76,7 @@ class EDITENG_DLLPUBLIC EditView friend class ImpEditEngine; friend class EditSelFunctionSet; -public: // brauche ich fuer Undo +public: // Needed for Undo ImpEditView* GetImpEditView() const { return pImpEditView; } ImpEditEngine* GetImpEditEngine() const; @@ -98,41 +98,41 @@ public: void Paint( const Rectangle& rRect ); void Invalidate(); - Pair Scroll( long nHorzScroll, long nVertScroll, BYTE nRangeCheck = RGCHK_NEG ); + Pair Scroll( long nHorzScroll, long nVertScroll, sal_uInt8 nRangeCheck = RGCHK_NEG ); - void ShowCursor( BOOL bGotoCursor = TRUE, BOOL bForceVisCursor = TRUE ); + void ShowCursor( sal_Bool bGotoCursor = sal_True, sal_Bool bForceVisCursor = sal_True ); void HideCursor(); EESelectionMode GetSelectionMode() const; void SetSelectionMode( EESelectionMode eMode ); - void SetReadOnly( BOOL bReadOnly ); - BOOL IsReadOnly() const; + void SetReadOnly( sal_Bool bReadOnly ); + sal_Bool IsReadOnly() const; - BOOL HasSelection() const; + sal_Bool HasSelection() const; ESelection GetSelection() const; void SetSelection( const ESelection& rNewSel ); - BOOL SelectCurrentWord( sal_Int16 nWordType = ::com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ); + sal_Bool SelectCurrentWord( sal_Int16 nWordType = ::com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ); void IndentBlock(); void UnindentBlock(); - BOOL IsInsertMode() const; - void SetInsertMode( BOOL bInsert ); + sal_Bool IsInsertMode() const; + void SetInsertMode( sal_Bool bInsert ); void ReplaceSelected( const String& rStr ); String GetSelected(); void DeleteSelected(); - USHORT GetSelectedScriptType() const; + sal_uInt16 GetSelectedScriptType() const; - // Position der VisArea im Ausgabefenster. - // Eine Groessenaenderung betrifft auch die VisArea + // VisArea position of the Output window. + // A size change also affects the VisArea void SetOutputArea( const Rectangle& rRec ); const Rectangle& GetOutputArea() const; - // Dokumentposition. - // Eine Groessenaenderung betrifft auch die VisArea + // Document position. + // A size change also affects the VisArea void SetVisArea( const Rectangle& rRec ); const Rectangle& GetVisArea() const; @@ -142,17 +142,17 @@ public: void SetCursor( const Cursor& rCursor ); Cursor* GetCursor() const; - void InsertText( const String& rNew, BOOL bSelect = FALSE ); + void InsertText( const String& rNew, sal_Bool bSelect = sal_False ); - BOOL PostKeyEvent( const KeyEvent& rKeyEvent, Window* pFrameWin = NULL ); + sal_Bool PostKeyEvent( const KeyEvent& rKeyEvent, Window* pFrameWin = NULL ); - BOOL MouseButtonUp( const MouseEvent& rMouseEvent ); - BOOL MouseButtonDown( const MouseEvent& rMouseEvent ); - BOOL MouseMove( const MouseEvent& rMouseEvent ); + sal_Bool MouseButtonUp( const MouseEvent& rMouseEvent ); + sal_Bool MouseButtonDown( const MouseEvent& rMouseEvent ); + sal_Bool MouseMove( const MouseEvent& rMouseEvent ); void Command( const CommandEvent& rCEvt ); - BOOL Drop( const DropEvent& rEvt ); - BOOL QueryDrop( DropEvent& rEvt ); + sal_Bool Drop( const DropEvent& rEvt ); + sal_Bool QueryDrop( DropEvent& rEvt ); ESelection GetDropPos(); void Cut(); @@ -160,28 +160,28 @@ public: void Paste(); void PasteSpecial(); - void EnablePaste( BOOL bEnable ); - BOOL IsPasteEnabled() const; + void EnablePaste( sal_Bool bEnable ); + sal_Bool IsPasteEnabled() const; void Undo(); void Redo(); - // speziell fuer Olli - USHORT GetParagraph( const Point& rMousePosPixel ); - Point GetWindowPosTopLeft( USHORT nParagraph ); - void MoveParagraphs( Range aParagraphs, USHORT nNewPos ); + // especially for Oliver Specht + sal_uInt16 GetParagraph( const Point& rMousePosPixel ); + Point GetWindowPosTopLeft( sal_uInt16 nParagraph ); + void MoveParagraphs( Range aParagraphs, sal_uInt16 nNewPos ); void MoveParagraphs( long nDiff ); const SfxItemSet& GetEmptyItemSet(); SfxItemSet GetAttribs(); void SetAttribs( const SfxItemSet& rSet ); - void SetParaAttribs( const SfxItemSet& rSet, USHORT nPara ); - void RemoveAttribs( BOOL bRemoveParaAttribs = FALSE, USHORT nWhich = 0 ); - void RemoveCharAttribs( USHORT nPara, USHORT nWhich = 0 ); - void RemoveAttribsKeepLanguages( BOOL bRemoveParaAttribs = FALSE ); + void SetParaAttribs( const SfxItemSet& rSet, sal_uInt16 nPara ); + void RemoveAttribs( sal_Bool bRemoveParaAttribs = sal_False, sal_uInt16 nWhich = 0 ); + void RemoveCharAttribs( sal_uInt16 nPara, sal_uInt16 nWhich = 0 ); + void RemoveAttribsKeepLanguages( sal_Bool bRemoveParaAttribs = sal_False ); - ULONG Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFormat, BOOL bSelect = FALSE, SvKeyValueIterator* pHTTPHeaderAttrs = NULL ); - ULONG Write( SvStream& rOutput, EETextFormat eFormat ); + sal_uLong Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFormat, sal_Bool bSelect = sal_False, SvKeyValueIterator* pHTTPHeaderAttrs = NULL ); + sal_uLong Write( SvStream& rOutput, EETextFormat eFormat ); void SetBackgroundColor( const Color& rColor ); Color GetBackgroundColor() const; @@ -191,12 +191,12 @@ public: EditTextObject* CreateTextObject(); void InsertText( const EditTextObject& rTextObject ); - void InsertText( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > xDataObj, const String& rBaseURL, BOOL bUseSpecial ); + void InsertText( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > xDataObj, const String& rBaseURL, sal_Bool bUseSpecial ); ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > GetTransferable(); - // An EditView, damit bei TRUE flackerfreies Update: - void SetEditEngineUpdateMode( BOOL bUpdate ); + // An EditView, so that when TRUE the update will be free from flickering: + void SetEditEngineUpdateMode( sal_Bool bUpdate ); void ForceUpdate(); SfxStyleSheet* GetStyleSheet() const; @@ -205,37 +205,37 @@ public: void SetAnchorMode( EVAnchorMode eMode ); EVAnchorMode GetAnchorMode() const; - BOOL MatchGroup(); + sal_Bool MatchGroup(); void CompleteAutoCorrect( Window* pFrameWin = NULL ); - EESpellState StartSpeller( BOOL bMultipleDoc = FALSE ); + EESpellState StartSpeller( sal_Bool bMultipleDoc = sal_False ); EESpellState StartThesaurus(); - USHORT StartSearchAndReplace( const SvxSearchItem& rSearchItem ); + sal_uInt16 StartSearchAndReplace( const SvxSearchItem& rSearchItem ); // for text conversion - void StartTextConversion( LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont, INT32 nOptions, BOOL bIsInteractive, BOOL bMultipleDoc ); + void StartTextConversion( LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont, sal_Int32 nOptions, sal_Bool bIsInteractive, sal_Bool bMultipleDoc ); sal_Bool HasConvertibleTextPortion( LanguageType nLang ); void TransliterateText( sal_Int32 nTransliterationMode ); - BOOL IsCursorAtWrongSpelledWord( BOOL bMarkIfWrong = FALSE ); - BOOL IsWrongSpelledWordAtPos( const Point& rPosPixel, BOOL bMarkIfWrong = FALSE ); + sal_Bool IsCursorAtWrongSpelledWord( sal_Bool bMarkIfWrong = sal_False ); + sal_Bool IsWrongSpelledWordAtPos( const Point& rPosPixel, sal_Bool bMarkIfWrong = sal_False ); void SpellIgnoreWord(); void ExecuteSpellPopup( const Point& rPosPixel, Link* pCallBack = 0 ); void InsertField( const SvxFieldItem& rFld ); const SvxFieldItem* GetFieldUnderMousePointer() const; - const SvxFieldItem* GetFieldUnderMousePointer( USHORT& nPara, xub_StrLen& nPos ) const; - const SvxFieldItem* GetField( const Point& rPos, USHORT* pnPara = NULL, xub_StrLen* pnPos = NULL ) const; + const SvxFieldItem* GetFieldUnderMousePointer( sal_uInt16& nPara, xub_StrLen& nPos ) const; + const SvxFieldItem* GetField( const Point& rPos, sal_uInt16* pnPara = NULL, xub_StrLen* pnPos = NULL ) const; const SvxFieldItem* GetFieldAtSelection() const; String GetWordUnderMousePointer() const; String GetWordUnderMousePointer( Rectangle& rWordRect ) const; - void SetInvalidateMore( USHORT nPixel ); - USHORT GetInvalidateMore() const; + void SetInvalidateMore( sal_uInt16 nPixel ); + sal_uInt16 GetInvalidateMore() const; // grows or shrinks the font height for the current selection void ChangeFontSize( bool bGrow, const FontList* pList ); diff --git a/editeng/inc/editeng/edtdlg.hxx b/editeng/inc/editeng/edtdlg.hxx index 7fe32ac5e1..8e586b5600 100644 --- a/editeng/inc/editeng/edtdlg.hxx +++ b/editeng/inc/editeng/edtdlg.hxx @@ -7,9 +7,6 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: abstdlg.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/editeng/inc/editeng/eeitemid.hxx b/editeng/inc/editeng/eeitemid.hxx index 3e28e0e5e1..62b5a523dc 100644 --- a/editeng/inc/editeng/eeitemid.hxx +++ b/editeng/inc/editeng/eeitemid.hxx @@ -80,7 +80,7 @@ #undef ITEMID_BRUSH #endif -// Zeichenattribute.... +// Character Attributes.... #define ITEMID_FONT EE_CHAR_FONTINFO #define ITEMID_POSTURE EE_CHAR_ITALIC #define ITEMID_WEIGHT EE_CHAR_WEIGHT @@ -105,7 +105,7 @@ #define ITEMID_EMPHASISMARK EE_CHAR_EMPHASISMARK #define ITEMID_CHARRELIEF EE_CHAR_RELIEF -// Absatzattribute +// Paragraph Attributes #define ITEMID_SCRIPTSPACE EE_PARA_ASIANCJKSPACING #define ITEMID_ADJUST EE_PARA_JUST #define ITEMID_LINESPACING EE_PARA_SBL diff --git a/editeng/inc/editeng/eerdll.hxx b/editeng/inc/editeng/eerdll.hxx index f942c7d6fc..7388b09f50 100644 --- a/editeng/inc/editeng/eerdll.hxx +++ b/editeng/inc/editeng/eerdll.hxx @@ -38,7 +38,7 @@ class GlobalEditData; class EDITENG_DLLPUBLIC EditResId: public ResId { public: - EditResId( USHORT nId ); + EditResId( sal_uInt16 nId ); }; class EditDLL diff --git a/editeng/inc/editeng/emphitem.hxx b/editeng/inc/editeng/emphitem.hxx index 2715f5057e..3ba2f3e1ab 100644 --- a/editeng/inc/editeng/emphitem.hxx +++ b/editeng/inc/editeng/emphitem.hxx @@ -42,9 +42,9 @@ namespace rtl // class SvxEmphasisMarkItem ---------------------------------------------- -/* [Beschreibung] +/* [Description] - Dieses Item beschreibt die Font-Betonung. + This item describes the Font emphasis. */ class EDITENG_DLLPUBLIC SvxEmphasisMarkItem : public SfxUInt16Item @@ -53,9 +53,9 @@ public: TYPEINFO(); SvxEmphasisMarkItem( const FontEmphasisMark eVal /*= EMPHASISMARK_NONE*/, - const USHORT nId ); + const sal_uInt16 nId ); - // "pure virtual Methoden" vom SfxPoolItem + SfxEnumItem + // "pure virtual Methods" from SfxPoolItem + SfxEnumItem virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, @@ -63,14 +63,12 @@ public: const IntlWrapper * = 0 ) const; 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 SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, - BYTE nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, - BYTE nMemberId = 0 ); + virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); inline SvxEmphasisMarkItem& operator=(const SvxEmphasisMarkItem& rItem ) { @@ -82,7 +80,7 @@ public: FontEmphasisMark GetEmphasisMark() const { return (FontEmphasisMark)GetValue(); } void SetEmphasisMark( FontEmphasisMark eNew ) - { SetValue( (USHORT)eNew ); } + { SetValue( (sal_uInt16)eNew ); } }; #endif // #ifndef _SVX_EMPHITEM_HXX diff --git a/editeng/inc/editeng/escpitem.hxx b/editeng/inc/editeng/escpitem.hxx index f37f763b74..59f66e798e 100644 --- a/editeng/inc/editeng/escpitem.hxx +++ b/editeng/inc/editeng/escpitem.hxx @@ -43,42 +43,42 @@ namespace rtl // class SvxEscapementItem ----------------------------------------------- #define DFLT_ESC_SUPER 33 // 1/3 -#define DFLT_ESC_SUB -33 // auch 1/3 fr"uher 8/100 +#define DFLT_ESC_SUB -33 // also 1/3 previously 8/100 #define DFLT_ESC_PROP 58 #define DFLT_ESC_AUTO_SUPER 101 #define DFLT_ESC_AUTO_SUB -101 -/* [Beschreibung] +/* [Description] - Dieses Item beschreibt die Schrift-Position. + This item describes the writing position. */ class EDITENG_DLLPUBLIC SvxEscapementItem : public SfxEnumItemInterface { short nEsc; - BYTE nProp; + sal_uInt8 nProp; public: TYPEINFO(); - SvxEscapementItem( const USHORT nId ); + SvxEscapementItem( const sal_uInt16 nId ); SvxEscapementItem( const SvxEscapement eEscape, - const USHORT nId ); - SvxEscapementItem( const short nEsc, const BYTE nProp, - const USHORT nId ); + const sal_uInt16 nId ); + SvxEscapementItem( const short nEsc, const sal_uInt8 nProp, + const sal_uInt16 nId ); - // "pure virtual Methoden" vom SfxPoolItem + // "pure virtual Methods" from SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText, const IntlWrapper * = 0 ) const; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; inline void SetEscapement( const SvxEscapement eNew ) { @@ -95,8 +95,8 @@ public: inline short &GetEsc() { return nEsc; } inline short GetEsc() const { return nEsc; } - inline BYTE &GetProp() { return nProp; } - inline BYTE GetProp() const { return nProp; } + inline sal_uInt8 &GetProp() { return nProp; } + inline sal_uInt8 GetProp() const { return nProp; } inline SvxEscapementItem& operator=(const SvxEscapementItem& rEsc) { @@ -105,10 +105,10 @@ public: return *this; } - virtual USHORT GetValueCount() const; - virtual String GetValueTextByPos( USHORT nPos ) const; - virtual USHORT GetEnumValue() const; - virtual void SetEnumValue( USHORT nNewVal ); + virtual sal_uInt16 GetValueCount() const; + virtual String GetValueTextByPos( sal_uInt16 nPos ) const; + virtual sal_uInt16 GetEnumValue() const; + virtual void SetEnumValue( sal_uInt16 nNewVal ); }; #endif diff --git a/editeng/inc/editeng/fhgtitem.hxx b/editeng/inc/editeng/fhgtitem.hxx index e4305a6ed1..cd847d4f4f 100644 --- a/editeng/inc/editeng/fhgtitem.hxx +++ b/editeng/inc/editeng/fhgtitem.hxx @@ -41,31 +41,31 @@ namespace rtl // class SvxFontHeightItem ----------------------------------------------- -// Achtung: Twips-Werte +// Warning: twips values -/* [Beschreibung] +/* [Description] - Dieses Item beschreibt die Font-Hoehe. + This item describes the font height */ -#define FONTHEIGHT_16_VERSION ((USHORT)0x0001) -#define FONTHEIGHT_UNIT_VERSION ((USHORT)0x0002) +#define FONTHEIGHT_16_VERSION ((sal_uInt16)0x0001) +#define FONTHEIGHT_UNIT_VERSION ((sal_uInt16)0x0002) class EDITENG_DLLPUBLIC SvxFontHeightItem : public SfxPoolItem { - UINT32 nHeight; - USHORT nProp; // default 100% + sal_uInt32 nHeight; + sal_uInt16 nProp; // default 100% SfxMapUnit ePropUnit; // Percent, Twip, ... public: TYPEINFO(); - SvxFontHeightItem( const ULONG nSz /*= 240*/, const USHORT nPropHeight /*= 100*/, - const USHORT nId ); + SvxFontHeightItem( const sal_uLong nSz /*= 240*/, const sal_uInt16 nPropHeight /*= 100*/, + const sal_uInt16 nId ); - // "pure virtual Methoden" vom SfxPoolItem + // "pure virtual Methods" from SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -73,11 +73,11 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; - virtual USHORT GetVersion( USHORT nItemVersion) const; - virtual bool ScaleMetrics( long nMult, long nDiv ); - virtual bool HasMetrics() const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nItemVersion) const; + virtual bool ScaleMetrics( long nMult, long nDiv ); + virtual bool HasMetrics() const; inline SvxFontHeightItem& operator=(const SvxFontHeightItem& rSize) { @@ -86,21 +86,21 @@ public: return *this; } - void SetHeight( UINT32 nNewHeight, const USHORT nNewProp = 100, + void SetHeight( sal_uInt32 nNewHeight, const sal_uInt16 nNewProp = 100, SfxMapUnit eUnit = SFX_MAPUNIT_RELATIVE ); - void SetHeight( UINT32 nNewHeight, USHORT nNewProp, + void SetHeight( sal_uInt32 nNewHeight, sal_uInt16 nNewProp, SfxMapUnit eUnit, SfxMapUnit eCoreUnit ); - UINT32 GetHeight() const { return nHeight; } + sal_uInt32 GetHeight() const { return nHeight; } - void SetHeightValue( UINT32 nNewHeight ) + void SetHeightValue( sal_uInt32 nNewHeight ) { DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" ); nHeight = nNewHeight; } - void SetProp( const USHORT nNewProp, + void SetProp( const sal_uInt16 nNewProp, SfxMapUnit eUnit = SFX_MAPUNIT_RELATIVE ) { DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" ); @@ -108,7 +108,7 @@ public: ePropUnit = eUnit; } - USHORT GetProp() const { return nProp; } + sal_uInt16 GetProp() const { return nProp; } SfxMapUnit GetPropUnit() const { return ePropUnit; } // Percent, Twip, ... }; diff --git a/editeng/inc/editeng/flditem.hxx b/editeng/inc/editeng/flditem.hxx index 6a680b070b..4f5cacee09 100644 --- a/editeng/inc/editeng/flditem.hxx +++ b/editeng/inc/editeng/flditem.hxx @@ -58,7 +58,7 @@ public: }; /* -[Beschreibung] +[Description] In diesem Item wird ein Feld (SvxFieldData) gespeichert. Das Feld gehoert dem Item. Das Feld selbst wird durch eine Ableitung von SvxFieldData bestimmt. (RTTI) @@ -69,32 +69,32 @@ class EDITENG_DLLPUBLIC SvxFieldItem : public SfxPoolItem private: SvxFieldData* pField; - EDITENG_DLLPRIVATE SvxFieldItem( SvxFieldData* pField, const USHORT nId ); + EDITENG_DLLPRIVATE SvxFieldItem( SvxFieldData* pField, const sal_uInt16 nId ); public: TYPEINFO(); - SvxFieldItem( const SvxFieldData& rField, const USHORT nId ); + SvxFieldItem( const SvxFieldData& rField, const sal_uInt16 nId ); SvxFieldItem( const SvxFieldItem& rItem ); ~SvxFieldItem(); virtual int operator==( const SfxPoolItem& ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create( SvStream&, USHORT nVer ) const; - virtual SvStream& Store( SvStream& , USHORT nItemVersion ) const; + virtual SfxPoolItem* Create( SvStream&, sal_uInt16 nVer ) const; + virtual SvStream& Store( SvStream& , sal_uInt16 nItemVersion ) const; const SvxFieldData* GetField() const { return pField; } static SvClassManager& GetClassManager(); }; // ================================================================= -// Es folgen die Ableitungen von SvxFieldData... +// The following are the derivatives of SvxFieldData ... // ================================================================= #define SVX_DATEFIELD 2 #define SVX_URLFIELD 3 -#define SVX_PAGEFIELD 100 // Ex-Calc-Felder +#define SVX_PAGEFIELD 100 // Ex-Calc Fields #define SVX_PAGESFIELD 101 #define SVX_TIMEFIELD 102 #define SVX_FILEFIELD 103 @@ -106,19 +106,19 @@ public: #define SVX_FOOTERFIELD 109 #define SVX_DATEFIMEFIELD 110 -#define SVX_USERFIELD 200 // Ab hier eigene Felder, nicht im SVX +#define SVX_USERFIELD 200 // From here on own fields, not in the SVX enum SvxDateType { SVXDATETYPE_FIX, SVXDATETYPE_VAR }; -enum SvxDateFormat { SVXDATEFORMAT_APPDEFAULT, // Wie in App eingestellt - SVXDATEFORMAT_SYSTEM, // Wie im System eingestellt +enum SvxDateFormat { SVXDATEFORMAT_APPDEFAULT, // Set as in App + SVXDATEFORMAT_SYSTEM, // Set as in System SVXDATEFORMAT_STDSMALL, SVXDATEFORMAT_STDBIG, SVXDATEFORMAT_A, // 13.02.96 SVXDATEFORMAT_B, // 13.02.1996 SVXDATEFORMAT_C, // 13.Feb 1996 - SVXDATEFORMAT_D, // 13.Februar 1996 - SVXDATEFORMAT_E, // Die, 13.Februar 1996 - SVXDATEFORMAT_F // Dienstag, 13.Februar 1996 + SVXDATEFORMAT_D, // 13.February 1996 + SVXDATEFORMAT_E, // Tue, 13.February 1996 + SVXDATEFORMAT_F // Tuesday, 13.February 1996 }; class EDITENG_DLLPUBLIC SvxDateField : public SvxFieldData @@ -159,18 +159,18 @@ public: }; -enum SvxURLFormat { SVXURLFORMAT_APPDEFAULT, // Wie in App eingestellt - SVXURLFORMAT_URL, // URL darstellen - SVXURLFORMAT_REPR // Repraesentation darstellen +enum SvxURLFormat { SVXURLFORMAT_APPDEFAULT, // Set as in App + SVXURLFORMAT_URL, // Represent URL + SVXURLFORMAT_REPR // Constitute repraesentation }; class EDITENG_DLLPUBLIC SvxURLField : public SvxFieldData { private: SvxURLFormat eFormat; - XubString aURL; // URL-Adresse - XubString aRepresentation; // Was wird dargestellt - XubString aTargetFrame; // In welchem Frame + XubString aURL; // URL-Address + XubString aRepresentation; // What is shown + XubString aTargetFrame; // In what Frame public: SV_DECL_PERSIST1( SvxURLField, SvxFieldData, SVX_URLFIELD ) @@ -247,8 +247,8 @@ public: enum SvxTimeType { SVXTIMETYPE_FIX, SVXTIMETYPE_VAR }; -enum SvxTimeFormat { SVXTIMEFORMAT_APPDEFAULT, // Wie in App eingestellt - SVXTIMEFORMAT_SYSTEM, // Wie im System eingestellt +enum SvxTimeFormat { SVXTIMEFORMAT_APPDEFAULT, // Set as in App + SVXTIMEFORMAT_SYSTEM, // Set as in System SVXTIMEFORMAT_STANDARD, SVXTIMEFORMAT_24_HM, // 13:49 SVXTIMEFORMAT_24_HMS, // 13:49:38 @@ -300,10 +300,10 @@ public: enum SvxFileType { SVXFILETYPE_FIX, SVXFILETYPE_VAR }; -enum SvxFileFormat { SVXFILEFORMAT_NAME_EXT, // Dateiname mit Extension - SVXFILEFORMAT_FULLPATH, // vollst„ndiger Pfad - SVXFILEFORMAT_PATH, // nur Pfad - SVXFILEFORMAT_NAME // nur Dateiname +enum SvxFileFormat { SVXFILEFORMAT_NAME_EXT, // File name with Extension + SVXFILEFORMAT_FULLPATH, // full path + SVXFILEFORMAT_PATH, // only path + SVXFILEFORMAT_NAME // only file name }; @@ -339,10 +339,10 @@ public: enum SvxAuthorType { SVXAUTHORTYPE_FIX, SVXAUTHORTYPE_VAR }; -enum SvxAuthorFormat { SVXAUTHORFORMAT_FULLNAME, // vollst„ndiger Name - SVXAUTHORFORMAT_NAME, // nur Nachname - SVXAUTHORFORMAT_FIRSTNAME, // nur Vorname - SVXAUTHORFORMAT_SHORTNAME // Initialen +enum SvxAuthorFormat { SVXAUTHORFORMAT_FULLNAME, // full name + SVXAUTHORFORMAT_NAME, // Only Last name + SVXAUTHORFORMAT_FIRSTNAME, // Only first name + SVXAUTHORFORMAT_SHORTNAME // Initials }; class EDITENG_DLLPUBLIC SvxAuthorField : public SvxFieldData diff --git a/editeng/inc/editeng/flstitem.hxx b/editeng/inc/editeng/flstitem.hxx index b2d35dd040..82b268d537 100644 --- a/editeng/inc/editeng/flstitem.hxx +++ b/editeng/inc/editeng/flstitem.hxx @@ -40,10 +40,10 @@ class FontList; /* - [Beschreibung] + [Description] - Dieses Item dient als Transport-Medium fuer eine FontListe. - Die Fontliste wird nicht kopiert und nicht geloescht! + This item serves as a transport medium for a font list. The font list is + not copied and not deleted! */ class EDITENG_DLLPUBLIC SvxFontListItem : public SfxPoolItem @@ -56,13 +56,13 @@ public: TYPEINFO(); SvxFontListItem( const FontList* pFontLst, - const USHORT nId ); + const sal_uInt16 nId ); SvxFontListItem( const SvxFontListItem& rItem ); virtual int operator==( const SfxPoolItem& ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, diff --git a/editeng/inc/editeng/fontitem.hxx b/editeng/inc/editeng/fontitem.hxx index c0ac85b1da..95b4b8e5ec 100644 --- a/editeng/inc/editeng/fontitem.hxx +++ b/editeng/inc/editeng/fontitem.hxx @@ -43,9 +43,9 @@ namespace rtl // class SvxFontItem ----------------------------------------------------- -/* - [Beschreibung] - Dieses Item beschreibt einen Font. +/* [Description] + + This item describes a Font. */ class EDITENG_DLLPUBLIC SvxFontItem : public SfxPoolItem @@ -56,58 +56,51 @@ class EDITENG_DLLPUBLIC SvxFontItem : public SfxPoolItem FontPitch ePitch; rtl_TextEncoding eTextEncoding; - static BOOL bEnableStoreUnicodeNames; + static sal_Bool bEnableStoreUnicodeNames; public: TYPEINFO(); - SvxFontItem( const USHORT nId ); + SvxFontItem( const sal_uInt16 nId ); SvxFontItem( const FontFamily eFam, const String& rFamilyName, const String& rStyleName, const FontPitch eFontPitch /*= PITCH_DONTKNOW*/, const rtl_TextEncoding eFontTextEncoding /*= RTL_TEXTENCODING_DONTKNOW*/, - const USHORT nId ); + const sal_uInt16 nId ); - // "pure virtual Methoden" vom SfxPoolItem + // "pure virtual Methods" from SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; + virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText, const IntlWrapper * = 0 ) const; - // ZugriffsMethoden: - inline String &GetFamilyName() { return aFamilyName; } + // Access methods: + void SetFamilyName( const String& rFamilyName ) { aFamilyName = rFamilyName; } inline const String &GetFamilyName() const { return aFamilyName; } - inline String &GetStyleName() { return aStyleName; } + void SetStyleName(const String &rStyleName ) { aStyleName = rStyleName; } inline const String &GetStyleName() const { return aStyleName; } - inline FontFamily &GetFamily() { return eFamily; } + void SetFamily( FontFamily _eFamily ) { eFamily = _eFamily; } inline FontFamily GetFamily() const { return eFamily; } - inline FontPitch &GetPitch() { return ePitch; } + void SetPitch(FontPitch _ePitch ) { ePitch = _ePitch; } inline FontPitch GetPitch() const { return ePitch; } - inline rtl_TextEncoding &GetCharSet() { return eTextEncoding; } + void SetCharSet(rtl_TextEncoding _eEncoding) { eTextEncoding = _eEncoding; } + inline rtl_TextEncoding GetCharSet() const { return eTextEncoding; } - inline SvxFontItem& operator=(const SvxFontItem& rFont) - { - aFamilyName = rFont.GetFamilyName(); - aStyleName = rFont.GetStyleName(); - eFamily = rFont.GetFamily(); - ePitch = rFont.GetPitch(); - eTextEncoding = rFont.GetCharSet(); - return *this; - } - - static void EnableStoreUnicodeNames( BOOL bEnable ); + SvxFontItem& operator=(const SvxFontItem& rFont); + + static void EnableStoreUnicodeNames( sal_Bool bEnable ); }; diff --git a/editeng/inc/editeng/forbiddencharacterstable.hxx b/editeng/inc/editeng/forbiddencharacterstable.hxx index 477274f98b..e933033d99 100644 --- a/editeng/inc/editeng/forbiddencharacterstable.hxx +++ b/editeng/inc/editeng/forbiddencharacterstable.hxx @@ -46,7 +46,7 @@ namespace lang { struct ForbiddenCharactersInfo { com::sun::star::i18n::ForbiddenCharacters aForbiddenChars; - BOOL bTemporary; + sal_Bool bTemporary; }; DECLARE_TABLE( SvxForbiddenCharactersTableImpl, ForbiddenCharactersInfo* ) @@ -57,12 +57,12 @@ private: ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMSF; public: - SvxForbiddenCharactersTable( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMSF, USHORT nISize = 4, USHORT nGrow = 4 ); + SvxForbiddenCharactersTable( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMSF, sal_uInt16 nISize = 4, sal_uInt16 nGrow = 4 ); ~SvxForbiddenCharactersTable(); - const com::sun::star::i18n::ForbiddenCharacters* GetForbiddenCharacters( USHORT nLanuage, BOOL bGetDefault ) const; - void SetForbiddenCharacters( USHORT nLanuage , const com::sun::star::i18n::ForbiddenCharacters& ); - void ClearForbiddenCharacters( USHORT nLanuage ); + const com::sun::star::i18n::ForbiddenCharacters* GetForbiddenCharacters( sal_uInt16 nLanuage, sal_Bool bGetDefault ) const; + void SetForbiddenCharacters( sal_uInt16 nLanuage , const com::sun::star::i18n::ForbiddenCharacters& ); + void ClearForbiddenCharacters( sal_uInt16 nLanuage ); }; #endif // _FORBIDDENCHARACTERSTABLE_HXX diff --git a/editeng/inc/editeng/forbiddenruleitem.hxx b/editeng/inc/editeng/forbiddenruleitem.hxx index f1fb7fd37b..53a9137cf9 100644 --- a/editeng/inc/editeng/forbiddenruleitem.hxx +++ b/editeng/inc/editeng/forbiddenruleitem.hxx @@ -49,8 +49,8 @@ public: const sal_uInt16 nId ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, diff --git a/editeng/inc/editeng/frmdiritem.hxx b/editeng/inc/editeng/frmdiritem.hxx index 1420ee4b6a..b9cf24747f 100644 --- a/editeng/inc/editeng/frmdiritem.hxx +++ b/editeng/inc/editeng/frmdiritem.hxx @@ -48,15 +48,15 @@ class EDITENG_DLLPUBLIC SvxFrameDirectionItem : public SfxUInt16Item public: TYPEINFO(); - SvxFrameDirectionItem( USHORT nWhich ); + SvxFrameDirectionItem( sal_uInt16 nWhich ); SvxFrameDirectionItem( SvxFrameDirection nValue /*= FRMDIR_HORI_LEFT_TOP*/, - USHORT nWhich ); + sal_uInt16 nWhich ); virtual ~SvxFrameDirectionItem(); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream & rStrm, USHORT nIVer) const; - virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream & rStrm, sal_uInt16 nIVer) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; virtual int operator==( const SfxPoolItem& ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, @@ -65,10 +65,8 @@ public: String &rText, const IntlWrapper * = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, - BYTE nMemberId ); - virtual bool QueryValue( com::sun::star::uno::Any& rVal, - BYTE nMemberId ) const; + virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); inline SvxFrameDirectionItem& operator=( const SvxFrameDirectionItem& rItem ) { diff --git a/editeng/inc/editeng/fwdtitem.hxx b/editeng/inc/editeng/fwdtitem.hxx index cbf4a7071a..9fbdf7dee0 100644 --- a/editeng/inc/editeng/fwdtitem.hxx +++ b/editeng/inc/editeng/fwdtitem.hxx @@ -37,26 +37,26 @@ // class SvxFontWidthItem ----------------------------------------------- -/* [Beschreibung] +/* [Description] - Dieses Item beschreibt die Font-Breite. + This item describes the font width. */ class SvxFontWidthItem : public SfxPoolItem { - UINT16 nWidth; // 0 = default - USHORT nProp; // default 100% + sal_uInt16 nWidth; // 0 = default + sal_uInt16 nProp; // default 100% public: TYPEINFO(); - SvxFontWidthItem( const USHORT nSz /*= 0*/, - const USHORT nPropWidth /*= 100*/, - const USHORT nId ); + SvxFontWidthItem( const sal_uInt16 nSz /*= 0*/, + const sal_uInt16 nPropWidth /*= 100*/, + const sal_uInt16 nId ); - // "pure virtual Methoden" vom SfxPoolItem + // "pure virtual Methods" from SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -64,10 +64,10 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; - virtual bool ScaleMetrics( long nMult, long nDiv ); - virtual bool HasMetrics() const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; + virtual bool ScaleMetrics( long nMult, long nDiv ); + virtual bool HasMetrics() const; inline SvxFontWidthItem& operator=(const SvxFontWidthItem& rItem ) { @@ -76,28 +76,28 @@ public: return *this; } - void SetWidth( UINT16 nNewWidth, const USHORT nNewProp = 100 ) + void SetWidth( sal_uInt16 nNewWidth, const sal_uInt16 nNewProp = 100 ) { DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" ); - nWidth = UINT16(( (UINT32)nNewWidth * nNewProp ) / 100 ); + nWidth = sal_uInt16(( (sal_uInt32)nNewWidth * nNewProp ) / 100 ); nProp = nNewProp; } - UINT16 GetWidth() const { return nWidth; } + sal_uInt16 GetWidth() const { return nWidth; } - void SetWidthValue( UINT16 nNewWidth ) + void SetWidthValue( sal_uInt16 nNewWidth ) { DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" ); nWidth = nNewWidth; } - void SetProp( const USHORT nNewProp ) + void SetProp( const sal_uInt16 nNewProp ) { DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" ); nProp = nNewProp; } - USHORT GetProp() const { return nProp; } + sal_uInt16 GetProp() const { return nProp; } }; diff --git a/editeng/inc/editeng/hngpnctitem.hxx b/editeng/inc/editeng/hngpnctitem.hxx index 4dcafd2845..a6a12c9611 100644 --- a/editeng/inc/editeng/hngpnctitem.hxx +++ b/editeng/inc/editeng/hngpnctitem.hxx @@ -49,8 +49,8 @@ public: const sal_uInt16 nId ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, diff --git a/editeng/inc/editeng/hyznitem.hxx b/editeng/inc/editeng/hyznitem.hxx index f586b1818e..19f62c48bc 100644 --- a/editeng/inc/editeng/hyznitem.hxx +++ b/editeng/inc/editeng/hyznitem.hxx @@ -41,32 +41,32 @@ namespace rtl // class SvxHyphenZoneItem ----------------------------------------------- -/* -[Beschreibung] -Dieses Item beschreibt ein Silbentrennungsattribut (Automatisch?, Anzahl der -Zeichen am Zeilenende und -anfang). +/* [Description] + + This item describes a hyphenation attribute (automatic?, number of + characters at the end of the line and start). */ class EDITENG_DLLPUBLIC SvxHyphenZoneItem : public SfxPoolItem { - BOOL bHyphen: 1; - BOOL bPageEnd: 1; - BYTE nMinLead; - BYTE nMinTrail; - BYTE nMaxHyphens; + sal_Bool bHyphen: 1; + sal_Bool bPageEnd: 1; + sal_uInt8 nMinLead; + sal_uInt8 nMinTrail; + sal_uInt8 nMaxHyphens; friend SvStream & operator<<( SvStream & aS, SvxHyphenZoneItem & ); public: TYPEINFO(); - SvxHyphenZoneItem( const BOOL bHyph /*= FALSE*/, - const USHORT nId ); + SvxHyphenZoneItem( const sal_Bool bHyph /*= sal_False*/, + const sal_uInt16 nId ); - // "pure virtual Methoden" vom SfxPoolItem + // "pure virtual Methods" from SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -74,23 +74,23 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const; - inline void SetHyphen( const BOOL bNew ) { bHyphen = bNew; } - inline BOOL IsHyphen() const { return bHyphen; } + inline void SetHyphen( const sal_Bool bNew ) { bHyphen = bNew; } + inline sal_Bool IsHyphen() const { return bHyphen; } - inline void SetPageEnd( const BOOL bNew ) { bPageEnd = bNew; } - inline BOOL IsPageEnd() const { return bPageEnd; } + inline void SetPageEnd( const sal_Bool bNew ) { bPageEnd = bNew; } + inline sal_Bool IsPageEnd() const { return bPageEnd; } - inline BYTE &GetMinLead() { return nMinLead; } - inline BYTE GetMinLead() const { return nMinLead; } + inline sal_uInt8 &GetMinLead() { return nMinLead; } + inline sal_uInt8 GetMinLead() const { return nMinLead; } - inline BYTE &GetMinTrail() { return nMinTrail; } - inline BYTE GetMinTrail() const { return nMinTrail; } + inline sal_uInt8 &GetMinTrail() { return nMinTrail; } + inline sal_uInt8 GetMinTrail() const { return nMinTrail; } - inline BYTE &GetMaxHyphens() { return nMaxHyphens; } - inline BYTE GetMaxHyphens() const { return nMaxHyphens; } + inline sal_uInt8 &GetMaxHyphens() { return nMaxHyphens; } + inline sal_uInt8 GetMaxHyphens() const { return nMaxHyphens; } inline SvxHyphenZoneItem &operator=( const SvxHyphenZoneItem &rNew ) { diff --git a/editeng/inc/editeng/itemtype.hxx b/editeng/inc/editeng/itemtype.hxx index 8dd7edb220..77c5f41db3 100644 --- a/editeng/inc/editeng/itemtype.hxx +++ b/editeng/inc/editeng/itemtype.hxx @@ -49,14 +49,14 @@ class IntlWrapper; static const sal_Unicode cDelim = ','; static const sal_Unicode cpDelim[] = { ',' , ' ', '\0' }; -EDITENG_DLLPUBLIC String GetSvxString( USHORT nId ); +EDITENG_DLLPUBLIC String GetSvxString( sal_uInt16 nId ); EDITENG_DLLPUBLIC String GetMetricText( long nVal, SfxMapUnit eSrcUnit, SfxMapUnit eDestUnit, const IntlWrapper * pIntl ); String GetColorString( const Color& rCol ); -EDITENG_DLLPUBLIC USHORT GetMetricId( SfxMapUnit eUnit ); +EDITENG_DLLPUBLIC sal_uInt16 GetMetricId( SfxMapUnit eUnit ); // ----------------------------------------------------------------------- -inline String GetBoolString( BOOL bVal ) +inline String GetBoolString( sal_Bool bVal ) { return String( EditResId( bVal ? RID_SVXITEMS_TRUE : RID_SVXITEMS_FALSE ) ); } diff --git a/editeng/inc/editeng/justifyitem.hxx b/editeng/inc/editeng/justifyitem.hxx index d6046073b1..67f8dc2e0e 100644 --- a/editeng/inc/editeng/justifyitem.hxx +++ b/editeng/inc/editeng/justifyitem.hxx @@ -39,24 +39,24 @@ class EDITENG_DLLPUBLIC SvxHorJustifyItem: public SfxEnumItem public: TYPEINFO(); - SvxHorJustifyItem( const USHORT nId ); + SvxHorJustifyItem( const sal_uInt16 nId ); SvxHorJustifyItem( const SvxCellHorJustify eJustify /*= SVX_HOR_JUSTIFY_STANDARD*/, - const USHORT nId ); + const sal_uInt16 nId ); virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText, const IntlWrapper * = 0 ) const; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); - virtual USHORT GetValueCount() const; - virtual String GetValueText( USHORT nVal ) const; + virtual sal_uInt16 GetValueCount() const; + virtual String GetValueText( sal_uInt16 nVal ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create( SvStream& rStream, USHORT nVer ) const; + virtual SfxPoolItem* Create( SvStream& rStream, sal_uInt16 nVer ) const; inline SvxHorJustifyItem& operator=(const SvxHorJustifyItem& rHorJustify) { @@ -72,24 +72,24 @@ class EDITENG_DLLPUBLIC SvxVerJustifyItem: public SfxEnumItem public: TYPEINFO(); - SvxVerJustifyItem( const USHORT nId ); + SvxVerJustifyItem( const sal_uInt16 nId ); SvxVerJustifyItem( const SvxCellVerJustify eJustify /*= SVX_VER_JUSTIFY_STANDARD*/, - const USHORT nId ); + const sal_uInt16 nId ); virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText, const IntlWrapper * = 0 ) const; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); - virtual USHORT GetValueCount() const; - virtual String GetValueText( USHORT nVal ) const; + virtual sal_uInt16 GetValueCount() const; + virtual String GetValueText( sal_uInt16 nVal ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create( SvStream& rStream, USHORT nVer ) const; + virtual SfxPoolItem* Create( SvStream& rStream, sal_uInt16 nVer ) const; inline SvxVerJustifyItem& operator=(const SvxVerJustifyItem& rVerJustify) { @@ -103,24 +103,24 @@ public: class EDITENG_DLLPUBLIC SvxJustifyMethodItem: public SfxEnumItem { public: - SvxJustifyMethodItem( const USHORT nId ); + SvxJustifyMethodItem( const sal_uInt16 nId ); SvxJustifyMethodItem( const SvxCellJustifyMethod eMethod, - const USHORT nId ); + const sal_uInt16 nId ); virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText, const IntlWrapper * = 0 ) const; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); - virtual USHORT GetValueCount() const; - virtual String GetValueText( USHORT nVal ) const; + virtual sal_uInt16 GetValueCount() const; + virtual String GetValueText( sal_uInt16 nVal ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create( SvStream& rStream, USHORT nVer ) const; + virtual SfxPoolItem* Create( SvStream& rStream, sal_uInt16 nVer ) const; SvxJustifyMethodItem& operator=(const SvxJustifyMethodItem& r); }; diff --git a/editeng/inc/editeng/keepitem.hxx b/editeng/inc/editeng/keepitem.hxx index b98aff4dfc..8c986fb7ae 100644 --- a/editeng/inc/editeng/keepitem.hxx +++ b/editeng/inc/editeng/keepitem.hxx @@ -40,9 +40,9 @@ namespace rtl // class SvxFmtKeepItem ------------------------------------------------ -/* -[Beschreibung] -Dieses Item beschreibt eine logische Variable "Absaetze zusammenhalten?". +/* [Description] + + This item describes a logical variable "keep paragraphs together?". */ class EDITENG_DLLPUBLIC SvxFmtKeepItem : public SfxBoolItem @@ -50,14 +50,14 @@ class EDITENG_DLLPUBLIC SvxFmtKeepItem : public SfxBoolItem public: TYPEINFO(); - inline SvxFmtKeepItem( const BOOL bKeep /*= FALSE*/, - const USHORT _nWhich ); + inline SvxFmtKeepItem( const sal_Bool bKeep /*= sal_False*/, + const sal_uInt16 _nWhich ); inline SvxFmtKeepItem& operator=( const SvxFmtKeepItem& rSplit ); - // "pure virtual Methoden" vom SfxPoolItem + // "pure virtual Methods" from SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create( SvStream&, USHORT ) const; - virtual SvStream& Store( SvStream& , USHORT nItemVersion ) const; + virtual SfxPoolItem* Create( SvStream&, sal_uInt16 ) const; + virtual SvStream& Store( SvStream& , sal_uInt16 nItemVersion ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -65,7 +65,7 @@ public: String &rText, const IntlWrapper * = 0 ) const; }; -inline SvxFmtKeepItem::SvxFmtKeepItem( const BOOL bKeep, const USHORT _nWhich ) : +inline SvxFmtKeepItem::SvxFmtKeepItem( const sal_Bool bKeep, const sal_uInt16 _nWhich ) : SfxBoolItem( _nWhich, bKeep ) {} diff --git a/editeng/inc/editeng/kernitem.hxx b/editeng/inc/editeng/kernitem.hxx index d6463784f6..0a69842998 100644 --- a/editeng/inc/editeng/kernitem.hxx +++ b/editeng/inc/editeng/kernitem.hxx @@ -41,12 +41,12 @@ namespace rtl // class SvxKerningItem -------------------------------------------------- -// Achtung: Twips-Werte -// Twips: 0 = kein Kerning +// Note: Twips value +// Twips: 0 = no kerning -/* [Beschreibung] +/* [Description] - Dieses Item beschreibt die Schrift-Laufweite. + This item describes the kerning. */ class EDITENG_DLLPUBLIC SvxKerningItem : public SfxInt16Item @@ -54,14 +54,14 @@ class EDITENG_DLLPUBLIC SvxKerningItem : public SfxInt16Item public: TYPEINFO(); - SvxKerningItem( const short nKern /*= 0*/, const USHORT nId ); + SvxKerningItem( const short nKern /*= 0*/, const sal_uInt16 nId ); - // "pure virtual Methoden" vom SfxPoolItem + // "pure virtual Methods" from SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; - virtual bool ScaleMetrics( long nMult, long nDiv ); - virtual bool HasMetrics() const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; + virtual bool ScaleMetrics( long nMult, long nDiv ); + virtual bool HasMetrics() const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -73,8 +73,8 @@ public: return *this; } - virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); }; #endif diff --git a/editeng/inc/editeng/langitem.hxx b/editeng/inc/editeng/langitem.hxx index 4d4ddf272a..f01a7733fa 100644 --- a/editeng/inc/editeng/langitem.hxx +++ b/editeng/inc/editeng/langitem.hxx @@ -42,9 +42,9 @@ namespace rtl // class SvxLanguageItem ------------------------------------------------- -/* [Beschreibung] +/* [Description] - Dieses Item beschreibt eine Sprache. + This item describes a Language. */ class EDITENG_DLLPUBLIC SvxLanguageItem : public SfxEnumItem @@ -53,18 +53,18 @@ public: TYPEINFO(); SvxLanguageItem( const LanguageType eLang /*= LANGUAGE_GERMAN*/, - const USHORT nId ); + const sal_uInt16 nId ); - // "pure virtual Methoden" vom SfxPoolItem + // "pure virtual Methods" from SfxPoolItem virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; - virtual USHORT GetValueCount() const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; + virtual sal_uInt16 GetValueCount() const; inline SvxLanguageItem& operator=(const SvxLanguageItem& rLang) { @@ -76,9 +76,9 @@ public: LanguageType GetLanguage() const { return (LanguageType)GetValue(); } void SetLanguage( const LanguageType eLang ) - { SetValue( (USHORT)eLang ); } - virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + { SetValue( (sal_uInt16)eLang ); } + virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); }; #endif diff --git a/editeng/inc/editeng/lcolitem.hxx b/editeng/inc/editeng/lcolitem.hxx index 00b116f1f0..0108f35808 100644 --- a/editeng/inc/editeng/lcolitem.hxx +++ b/editeng/inc/editeng/lcolitem.hxx @@ -34,7 +34,7 @@ #include <editeng/editengdllapi.h> /* - * dummy-Item fuer ToolBox-Controller: + * Dummy item for ToolBox controller: * */ @@ -43,9 +43,9 @@ class EDITENG_DLLPUBLIC SvxLineColorItem : public SvxColorItem public: TYPEINFO(); - SvxLineColorItem( const USHORT nId ); - SvxLineColorItem( const Color& aColor, const USHORT nId ); - SvxLineColorItem( SvStream& rStrm, const USHORT nId ); + SvxLineColorItem( const sal_uInt16 nId ); + SvxLineColorItem( const Color& aColor, const sal_uInt16 nId ); + SvxLineColorItem( SvStream& rStrm, const sal_uInt16 nId ); SvxLineColorItem( const SvxLineColorItem& rCopy ); ~SvxLineColorItem(); diff --git a/editeng/inc/editeng/lrspitem.hxx b/editeng/inc/editeng/lrspitem.hxx index d0e03995a7..68a9fa5ba9 100644 --- a/editeng/inc/editeng/lrspitem.hxx +++ b/editeng/inc/editeng/lrspitem.hxx @@ -40,56 +40,55 @@ namespace rtl // class SvxLRSpaceItem -------------------------------------------------- -/* -[Beschreibung] -Linker/Rechter Rand sowie Erstzeileneinzug - -SvxLRSpaceItem bietet zwei Schnittstellen zur Befragung des linken -Randes und des Erstzeileneinzuges an. Die Get-Methoden liefern -die Member zurueck, wie sie das Layout bisher auch erwartete: -Der linke Rand verschiebt sich beim negativem Erstzeileneinzug -nach links. Die SetTxt/GetTxt-Methoden setzen voraus, dass der -linke Rand der 0-Punkt des Erstzeileneinzugs darstellt: - - UI UI LAYOUT UI/TEXT UI/TEXT (Wo?) -SetTxtLeft SetTxtFirst GetLeft GetTxtLeft GetTxtFirst (Was?) - 500 -500 0 500 -500 (Wieviel?) +/* [Description] + + Left/Right margin and first line indent + + SvxLRSpaceItem offers two interfaces for views from the left margin and + first line indent. The get methods return the member, with the layout also + as expected: the left edge shifts to the negative first line indent to the + left. The SetTxt/Gettxt methods assume that the left side represents the + 0 coordinate for the first line indent: + + UI UI LAYOUT UI/TEXT UI/TEXT (Where?) + SetTxtLeft SetTxtFirst GetLeft GetTxtLeft GetTxtFirst (What?) + 500 -500 0 500 -500 (How much?) 500 0 500 500 0 500 +500 500 500 +500 700 -500 200 700 -500 */ -#define LRSPACE_16_VERSION ((USHORT)0x0001) -#define LRSPACE_TXTLEFT_VERSION ((USHORT)0x0002) -#define LRSPACE_AUTOFIRST_VERSION ((USHORT)0x0003) -#define LRSPACE_NEGATIVE_VERSION ((USHORT)0x0004) +#define LRSPACE_16_VERSION ((sal_uInt16)0x0001) +#define LRSPACE_TXTLEFT_VERSION ((sal_uInt16)0x0002) +#define LRSPACE_AUTOFIRST_VERSION ((sal_uInt16)0x0003) +#define LRSPACE_NEGATIVE_VERSION ((sal_uInt16)0x0004) class EDITENG_DLLPUBLIC SvxLRSpaceItem : public SfxPoolItem { - short nFirstLineOfst; // Erstzeileneinzug _immer_ relativ zu nTxtLeft - long nTxtLeft; // wir spendieren einen USHORT - long nLeftMargin; // nLeft oder der neg. Erstzeileneinzug - long nRightMargin; // der unproblematische rechte Rand + short nFirstLineOfst; // First-line indent _always_ relative to nTxtLeft + long nTxtLeft; // We spend a sal_uInt16 + long nLeftMargin; // nLeft or the negative first-line indent + long nRightMargin; // The unproblematic right edge - USHORT nPropFirstLineOfst, nPropLeftMargin, nPropRightMargin; - BOOL bAutoFirst : 1; // Automatische Berechnung der Erstzeileneinzugs + sal_uInt16 nPropFirstLineOfst, nPropLeftMargin, nPropRightMargin; + sal_Bool bAutoFirst : 1; // Automatic calculation of the first line indent - void AdjustLeft(); // nLeftMargin und nTxtLeft werden angepasst. + void AdjustLeft(); // nLeftMargin and nTxtLeft are being adjusted. public: TYPEINFO(); - SvxLRSpaceItem( const USHORT nId ); + SvxLRSpaceItem( const sal_uInt16 nId ); SvxLRSpaceItem( const long nLeft, const long nRight, const long nTLeft /*= 0*/, const short nOfset /*= 0*/, - const USHORT nId ); + const sal_uInt16 nId ); inline SvxLRSpaceItem& operator=( const SvxLRSpaceItem &rCpy ); - // "pure virtual Methoden" vom SfxPoolItem + // "pure virtual Methods" from SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -97,41 +96,41 @@ public: String &rText, const IntlWrapper * = 0 ) const; 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 bool ScaleMetrics( long nMult, long nDiv ); - virtual bool HasMetrics() const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; + virtual bool ScaleMetrics( long nMult, long nDiv ); + virtual bool HasMetrics() const; // Die "Layout-Schnittstelle": - inline void SetLeft ( const long nL, const USHORT nProp = 100 ); - inline void SetRight( const long nR, const USHORT nProp = 100 ); + inline void SetLeft ( const long nL, const sal_uInt16 nProp = 100 ); + inline void SetRight( const long nR, const sal_uInt16 nProp = 100 ); - // abfragen / direktes setzen der absoluten Werte + // Query/direct setting of the absolute values inline long GetLeft() const { return nLeftMargin; } inline long GetRight() const { return nRightMargin;} inline void SetLeftValue( const long nL ) { nTxtLeft = nLeftMargin = nL; } inline void SetRightValue( const long nR ) { nRightMargin = nR; } - inline BOOL IsAutoFirst() const { return bAutoFirst; } - inline void SetAutoFirst( const BOOL bNew ) { bAutoFirst = bNew; } + inline sal_Bool IsAutoFirst() const { return bAutoFirst; } + inline void SetAutoFirst( const sal_Bool bNew ) { bAutoFirst = bNew; } - // abfragen / setzen der Prozent-Werte - inline void SetPropLeft( const USHORT nProp = 100 ) + // Query/Setting the percentage values + inline void SetPropLeft( const sal_uInt16 nProp = 100 ) { nPropLeftMargin = nProp; } - inline void SetPropRight( const USHORT nProp = 100 ) + inline void SetPropRight( const sal_uInt16 nProp = 100 ) { nPropRightMargin = nProp;} - inline USHORT GetPropLeft() const { return nPropLeftMargin; } - inline USHORT GetPropRight() const { return nPropRightMargin;} + inline sal_uInt16 GetPropLeft() const { return nPropLeftMargin; } + inline sal_uInt16 GetPropRight() const { return nPropRightMargin;} - // Die "UI/Text-Schnittstelle": - inline void SetTxtLeft( const long nL, const USHORT nProp = 100 ); + // The UI/text interface: + inline void SetTxtLeft( const long nL, const sal_uInt16 nProp = 100 ); inline long GetTxtLeft() const { return nTxtLeft; } - inline void SetTxtFirstLineOfst( const short nF, const USHORT nProp = 100 ); + inline void SetTxtFirstLineOfst( const short nF, const sal_uInt16 nProp = 100 ); inline short GetTxtFirstLineOfst() const { return nFirstLineOfst; } - inline void SetPropTxtFirstLineOfst( const USHORT nProp = 100 ) + inline void SetPropTxtFirstLineOfst( const sal_uInt16 nProp = 100 ) { nPropFirstLineOfst = nProp; } - inline USHORT GetPropTxtFirstLineOfst() const + inline sal_uInt16 GetPropTxtFirstLineOfst() const { return nPropFirstLineOfst; } inline void SetTxtFirstLineOfstValue( const short nValue ) { nFirstLineOfst = nValue; } @@ -150,26 +149,26 @@ inline SvxLRSpaceItem &SvxLRSpaceItem::operator=( const SvxLRSpaceItem &rCpy ) return *this; } -inline void SvxLRSpaceItem::SetLeft( const long nL, const USHORT nProp ) +inline void SvxLRSpaceItem::SetLeft( const long nL, const sal_uInt16 nProp ) { nLeftMargin = (nL * nProp) / 100; nTxtLeft = nLeftMargin; nPropLeftMargin = nProp; } -inline void SvxLRSpaceItem::SetRight( const long nR, const USHORT nProp ) +inline void SvxLRSpaceItem::SetRight( const long nR, const sal_uInt16 nProp ) { nRightMargin = (nR * nProp) / 100; nPropRightMargin = nProp; } inline void SvxLRSpaceItem::SetTxtFirstLineOfst( const short nF, - const USHORT nProp ) + const sal_uInt16 nProp ) { nFirstLineOfst = short((long(nF) * nProp ) / 100); nPropFirstLineOfst = nProp; AdjustLeft(); } -inline void SvxLRSpaceItem::SetTxtLeft( const long nL, const USHORT nProp ) +inline void SvxLRSpaceItem::SetTxtLeft( const long nL, const sal_uInt16 nProp ) { nTxtLeft = (nL * nProp) / 100; nPropLeftMargin = nProp; diff --git a/editeng/inc/editeng/lspcitem.hxx b/editeng/inc/editeng/lspcitem.hxx index edc631f646..bd60901d3f 100644 --- a/editeng/inc/editeng/lspcitem.hxx +++ b/editeng/inc/editeng/lspcitem.hxx @@ -42,9 +42,8 @@ namespace rtl // class SvxLineSpacingItem ---------------------------------------------- -/* -[Beschreibung] -Dieses Item beschreibt den Abstand zwischen den Zeilen. +/* [Description] + This item describes the distance between the lines. */ #define LINE_SPACE_DEFAULT_HEIGHT 200 @@ -53,26 +52,25 @@ class EDITENG_DLLPUBLIC SvxLineSpacingItem : public SfxEnumItemInterface friend SvStream& operator<<( SvStream&, SvxLineSpacingItem& ); //$ ostream short nInterLineSpace; - USHORT nLineHeight; - BYTE nPropLineSpace; + sal_uInt16 nLineHeight; + sal_uInt8 nPropLineSpace; SvxLineSpace eLineSpace; SvxInterLineSpace eInterLineSpace; public: TYPEINFO(); - // Der Writer verlaesst sich auf eine Default-Hoehe von 200! - // Eigentlich wuerde ich alle Werte mit 0 initialisieren, aber wer kann - // die Folgen beim Writer absehen ? - // => lieber einen krummen Wert als Default, aber der Programmierer - // sieht, dass dort etwas besonderes passiert. + // The writer relies on a default height of 200! Actually, I would + // initialize all values to 0, but who can ignore the consequences in + // writer? => Rather have a crooked vales as the default, but the + // programmer sees that there's something special happening. - SvxLineSpacingItem( USHORT nHeight /*= LINE_SPACE_DEFAULT_HEIGHT*/, const USHORT nId ); + SvxLineSpacingItem( sal_uInt16 nHeight /*= LINE_SPACE_DEFAULT_HEIGHT*/, const sal_uInt16 nId ); - // "pure virtual Methoden" vom SfxPoolItem + // "pure virtual Methods" from SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -80,11 +78,10 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const; - // Methoden zum Abfragen und Aendern - // Interlinespace wird zur Hoehe addiert. + // Methods to query and edit. InterlineSpace is added to the height. inline short GetInterLineSpace() const { return nInterLineSpace; } inline void SetInterLineSpace( const short nSpace ) { @@ -92,17 +89,17 @@ public: eInterLineSpace = SVX_INTER_LINE_SPACE_FIX; } - // Bestimmt absolute oder minimale Zeilenhoehe. - inline USHORT GetLineHeight() const { return nLineHeight; } - inline void SetLineHeight( const USHORT nHeight ) + // Determines the absolute or minimum row height. + inline sal_uInt16 GetLineHeight() const { return nLineHeight; } + inline void SetLineHeight( const sal_uInt16 nHeight ) { nLineHeight = nHeight; eLineSpace = SVX_LINE_SPACE_MIN; } - // Vergroessert oder verkleinert die Zeilenhoehe. - BYTE GetPropLineSpace() const { return nPropLineSpace; } - inline void SetPropLineSpace( const BYTE nProp ) + // To increase or decrease the row height. + sal_uInt8 GetPropLineSpace() const { return nPropLineSpace; } + inline void SetPropLineSpace( const sal_uInt8 nProp ) { nPropLineSpace = nProp; eInterLineSpace = SVX_INTER_LINE_SPACE_PROP; @@ -114,10 +111,10 @@ public: inline SvxInterLineSpace &GetInterLineSpaceRule() { return eInterLineSpace; } inline SvxInterLineSpace GetInterLineSpaceRule() const { return eInterLineSpace; } - virtual USHORT GetValueCount() const; - virtual String GetValueTextByPos( USHORT nPos ) const; - virtual USHORT GetEnumValue() const; - virtual void SetEnumValue( USHORT nNewVal ); + virtual sal_uInt16 GetValueCount() const; + virtual String GetValueTextByPos( sal_uInt16 nPos ) const; + virtual sal_uInt16 GetEnumValue() const; + virtual void SetEnumValue( sal_uInt16 nNewVal ); }; #endif diff --git a/editeng/inc/editeng/measfld.hxx b/editeng/inc/editeng/measfld.hxx index 174f8388f4..904d8bdf03 100644 --- a/editeng/inc/editeng/measfld.hxx +++ b/editeng/inc/editeng/measfld.hxx @@ -33,8 +33,8 @@ #ifndef _FLDITEM_HXX #ifndef ITEMID_FIELD -#include <editeng/editdata.hxx> /* das include wird wg. EE_FEATURE_FIELD benoetigt */ -#define ITEMID_FIELD EE_FEATURE_FIELD /* wird fuer #include <editeng/flditem.hxx> benoetigt */ +#include <editeng/editdata.hxx> /* this include is needed due to EE_FEATURE_FIELD */ +#define ITEMID_FIELD EE_FEATURE_FIELD /* is needed for #include <editeng/flditem.hxx> */ #endif #include <editeng/flditem.hxx> #endif diff --git a/editeng/inc/editeng/memberids.hrc b/editeng/inc/editeng/memberids.hrc index 0a4ac48f1c..e3e57292f8 100644..100755 --- a/editeng/inc/editeng/memberids.hrc +++ b/editeng/inc/editeng/memberids.hrc @@ -6,9 +6,6 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unomid.hxx,v $ - * $Revision: 1.3.212.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/editeng/inc/editeng/nhypitem.hxx b/editeng/inc/editeng/nhypitem.hxx index 2ffcffccf1..291af342c4 100644 --- a/editeng/inc/editeng/nhypitem.hxx +++ b/editeng/inc/editeng/nhypitem.hxx @@ -34,24 +34,18 @@ #include <editeng/editengdllapi.h> // class SvxNoHyphenItem ------------------------------------------------- - -/* [Beschreibung] - - PB: ??? -*/ - class EDITENG_DLLPUBLIC SvxNoHyphenItem : public SfxBoolItem { public: TYPEINFO(); - SvxNoHyphenItem( const BOOL bHyphen /*= TRUE*/, - const USHORT nId ); + SvxNoHyphenItem( const sal_Bool bHyphen /*= sal_True*/, + const sal_uInt16 nId ); - // "pure virtual Methoden" vom SfxPoolItem + // "pure virtual Methods" from SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, diff --git a/editeng/inc/editeng/nlbkitem.hxx b/editeng/inc/editeng/nlbkitem.hxx index f498cf500c..97508edbd3 100644 --- a/editeng/inc/editeng/nlbkitem.hxx +++ b/editeng/inc/editeng/nlbkitem.hxx @@ -35,25 +35,18 @@ #include "editeng/editengdllapi.h" // class SvxNoLinebreakItem ---------------------------------------------- - - -/* [Beschreibung] - - PB: ??? -*/ - class EDITENG_DLLPUBLIC SvxNoLinebreakItem : public SfxBoolItem { public: TYPEINFO(); - SvxNoLinebreakItem( const BOOL bBreak /*= TRUE*/, - const USHORT nId ); + SvxNoLinebreakItem( const sal_Bool bBreak /*= sal_True*/, + const sal_uInt16 nId ); - // "pure virtual Methoden" vom SfxPoolItem + // "pure virtual Methods" from SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, diff --git a/editeng/inc/editeng/numdef.hxx b/editeng/inc/editeng/numdef.hxx index 4e5b901990..5d997c2891 100644 --- a/editeng/inc/editeng/numdef.hxx +++ b/editeng/inc/editeng/numdef.hxx @@ -26,7 +26,7 @@ * ************************************************************************/ -#define SVX_MAX_NUM 10 // max. moegliche Numerierungsebenen -#define SVX_DEF_BULLET (0xF000 + 149)// Charakter fuer Aufzaehlungen +#define SVX_MAX_NUM 10 // max. possible numbering level +#define SVX_DEF_BULLET (0xF000 + 149)// Character for lists /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/numitem.hxx b/editeng/inc/editeng/numitem.hxx index 3b694d0720..6ffa3c86ee 100644 --- a/editeng/inc/editeng/numitem.hxx +++ b/editeng/inc/editeng/numitem.hxx @@ -56,18 +56,18 @@ namespace com{namespace sun{ namespace star{ }}} // ----------------------------------------------------------------------- -//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? +//Feature-Flags (only sal_uInt16!) +#define NUM_CONTINUOUS 0x0001 // consecutive numbers possible? +#define NUM_CHAR_TEXT_DISTANCE 0x0002 // Distance Symbol<->Text? +#define NUM_CHAR_STYLE 0x0004 // Character styles? +#define NUM_BULLET_REL_SIZE 0x0008 // relative bullet size? #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_SYMBOL_ALIGNMENT 0x0040 // alignment to be shown in the options +#define NUM_NO_NUMBERS 0x0080 // Numbering are not allowed #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_NUM 200 // Marker for no numbering #define SVX_NO_NUMLEVEL 0x20 #define LINK_TOKEN 0x80 //indicate linked bitmaps - for use in dialog only @@ -77,15 +77,15 @@ class EDITENG_DLLPUBLIC SvxNumberType static com::sun::star::uno::Reference<com::sun::star::text::XNumberingFormatter> xFormatter; sal_Int16 nNumType; - sal_Bool bShowSymbol; // Symbol auch anzeigen? + sal_Bool bShowSymbol; // Also show Symbol ? 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; + String GetNumStr( sal_uLong nNo ) const; + String GetNumStr( sal_uLong nNo, const com::sun::star::lang::Locale& rLocale ) const; void SetNumberingType(sal_Int16 nSet) {nNumType = nSet;} sal_Int16 GetNumberingType() const {return nNumType;} @@ -122,12 +122,12 @@ private: SvxAdjust eNumAdjust; - BYTE nInclUpperLevels; //Nummern aus der vorigen Ebenen uebernehmen - USHORT nStart; //Start der Zaehlung + sal_uInt8 nInclUpperLevels; // Take over numbers from the previous level. + sal_uInt16 nStart; // Start of counting - sal_Unicode cBullet; //Symbol - USHORT nBulletRelSize; //proz. Groesse des Bullets - Color nBulletColor; //Bullet color + sal_Unicode cBullet; // Symbol + sal_uInt16 nBulletRelSize; // percentage size of bullets + Color nBulletColor; // Bullet color // mode indicating, if the position and spacing of the list label is // determined by the former attributes (nFirstLineOffset, nAbsLSpace, @@ -140,10 +140,10 @@ private: // LABEL_ALIGNMENT is active. SvxNumPositionAndSpaceMode mePositionAndSpaceMode; - short nFirstLineOffset; //Erstzeileneinzug - short nAbsLSpace; //Abstand Rand<->Nummer - short nLSpace; //relative Einrueckung zum Vorgaenger - short nCharTextDistance; //Abstand Nummer<->Text + short nFirstLineOffset; // First line indent + short nAbsLSpace; // Distance Border<->Number + short nLSpace; // relative to the previous indentation + short nCharTextDistance; // Distance Number<->Text // specifies what follows the list label before the text of the first line // of the list item starts @@ -155,13 +155,13 @@ private: // specifies the indent before the text, e.g. in L2R-layout the left margin long mnIndentAt; - SvxBrushItem* pGraphicBrush; // - sal_Int16 eVertOrient; // vert. Ausrichtung einer Bitmap + SvxBrushItem* pGraphicBrush; + sal_Int16 eVertOrient; // vertical alignment of a bitmap - Size aGraphicSize; // immer! in 1/100 mm - Font* pBulletFont; // Pointer auf den BulletFont + Size aGraphicSize; // Always! in 1/100 mm + Font* pBulletFont; // Pointer to the bullet font - String sCharStyleName; // Zeichenvorlage + String sCharStyleName; // Character Style BitmapEx* pScaledImageCache; // Image scaled to aGraphicSize, only cached for WINDOW/VDEV @@ -178,8 +178,8 @@ public: SvStream& Store(SvStream &rStream, FontToSubsFontConverter pConverter); SvxNumberFormat& operator=( const SvxNumberFormat& ); - BOOL operator==( const SvxNumberFormat& ) const; - BOOL operator!=( const SvxNumberFormat& rFmt) const {return !(*this == rFmt);} + sal_Bool operator==( const SvxNumberFormat& ) const; + sal_Bool operator!=( const SvxNumberFormat& rFmt) const {return !(*this == rFmt);} void SetNumAdjust(SvxAdjust eSet) {eNumAdjust = eSet;} SvxAdjust GetNumAdjust() const {return eNumAdjust;} @@ -195,15 +195,15 @@ public: 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 SetBulletRelSize(sal_uInt16 nSet) {nBulletRelSize = nSet;} + sal_uInt16 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;} + void SetIncludeUpperLevels( sal_uInt8 nSet ) { nInclUpperLevels = nSet;} + sal_uInt8 GetIncludeUpperLevels()const { return nInclUpperLevels;} + void SetStart(sal_uInt16 nSet) {nStart = nSet;} + sal_uInt16 GetStart() const {return nStart;} virtual void SetGraphicBrush( const SvxBrushItem* pBrushItem, const Size* pSize = 0, const sal_Int16* pOrient = 0); const SvxBrushItem* GetBrush() const {return pGraphicBrush;} @@ -235,7 +235,7 @@ public: long GetIndentAt() const; static Size GetGraphicSizeMM100(const Graphic* pGraphic); - static String CreateRomanString( ULONG nNo, BOOL bUpper ); + static String CreateRomanString( sal_uLong nNo, sal_Bool bUpper ); }; enum SvxNumRuleType @@ -248,20 +248,20 @@ enum SvxNumRuleType class EDITENG_DLLPUBLIC SvxNumRule { - USHORT nLevelCount; // Anzahl der unterstuetzten Levels - ULONG nFeatureFlags; // was wird unterstuetzt? - SvxNumRuleType eNumberingType; // was fuer eine Numerierung - BOOL bContinuousNumbering; // fortlaufende Numerierung + sal_uInt16 nLevelCount; // Number of supported levels + sal_uInt32 nFeatureFlags; // What is supported? + SvxNumRuleType eNumberingType; // Type of numbering + sal_Bool bContinuousNumbering; // sequential numbering SvxNumberFormat* aFmts[SVX_MAX_NUM]; - BOOL aFmtsSet[SVX_MAX_NUM]; //Flags ueber Gueltigkeit der Ebenen + sal_Bool aFmtsSet[SVX_MAX_NUM]; // Flags indicating valid levels static sal_Int32 nRefCount; com::sun::star::lang::Locale aLocale; public: - SvxNumRule( ULONG nFeatures, - USHORT nLevels, - BOOL bCont, + SvxNumRule( sal_uLong nFeatures, + sal_uInt16 nLevels, + sal_Bool bCont, SvxNumRuleType eType = SVX_RULETYPE_NUMBERING, SvxNumberFormat::SvxNumPositionAndSpaceMode eDefaultNumberFormatPositionAndSpaceMode @@ -277,81 +277,77 @@ public: 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); + const SvxNumberFormat* Get(sal_uInt16 nLevel)const; + const SvxNumberFormat& GetLevel(sal_uInt16 nLevel)const; + void SetLevel(sal_uInt16 nLevel, const SvxNumberFormat& rFmt, sal_Bool bIsValid = sal_True); + void SetLevel(sal_uInt16 nLevel, const SvxNumberFormat* pFmt); - BOOL IsContinuousNumbering()const + sal_Bool IsContinuousNumbering()const {return bContinuousNumbering;} - void SetContinuousNumbering(BOOL bSet) + void SetContinuousNumbering(sal_Bool bSet) {bContinuousNumbering = bSet;} - USHORT GetLevelCount() const {return nLevelCount;} - BOOL IsFeatureSupported(ULONG nFeature) const + sal_uInt16 GetLevelCount() const {return nLevelCount;} + sal_Bool IsFeatureSupported(sal_uInt32 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; } + sal_uInt32 GetFeatureFlags() const {return nFeatureFlags;} + void SetFeatureFlag( sal_uInt32 nFlag, sal_Bool bSet = sal_True ) { if(bSet) nFeatureFlags |= nFlag; else nFeatureFlags &= ~nFlag; } - String MakeNumString( const SvxNodeNum&, BOOL bInclStrings = TRUE ) const; + String MakeNumString( const SvxNodeNum&, sal_Bool bInclStrings = sal_True ) const; SvxNumRuleType GetNumRuleType() const { return eNumberingType; } void SetNumRuleType( const SvxNumRuleType& rType ) { eNumberingType = rType; } - BOOL UnLinkGraphics(); + sal_Bool UnLinkGraphics(); }; -/* -----------------27.10.98 13:04------------------- - * - * --------------------------------------------------*/ + class EDITENG_DLLPUBLIC SvxNumBulletItem : public SfxPoolItem { SvxNumRule* pNumRule; public: SvxNumBulletItem(SvxNumRule& rRule); - SvxNumBulletItem(SvxNumRule& rRule, USHORT nWhich ); + SvxNumBulletItem(SvxNumRule& rRule, sal_uInt16 nWhich ); SvxNumBulletItem(const SvxNumBulletItem& rCopy); virtual ~SvxNumBulletItem(); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - USHORT GetVersion( USHORT nFileVersion ) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const; virtual int operator==( const SfxPoolItem& ) const; SvxNumRule* GetNumRule() const {return pNumRule;} - virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 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 + sal_uInt16 nLevelVal[ SVX_MAX_NUM ]; // Numbers of all levels + sal_uInt16 nSetValue; // predetermined number + sal_uInt8 nMyLevel; // Current Level + sal_Bool bStartNum; // Restart numbering public: - inline SvxNodeNum( BYTE nLevel = SVX_NO_NUM, USHORT nSetVal = USHRT_MAX ); + inline SvxNodeNum( sal_uInt8 nLevel = SVX_NO_NUM, sal_uInt16 nSetVal = USHRT_MAX ); inline SvxNodeNum& operator=( const SvxNodeNum& rCpy ); - BYTE GetLevel() const { return nMyLevel; } - void SetLevel( BYTE nVal ) { nMyLevel = nVal; } + sal_uInt8 GetLevel() const { return nMyLevel; } + void SetLevel( sal_uInt8 nVal ) { nMyLevel = nVal; } - BOOL IsStart() const { return bStartNum; } - void SetStart( BOOL bFlag = TRUE ) { bStartNum = bFlag; } + sal_Bool IsStart() const { return bStartNum; } + void SetStart( sal_Bool bFlag = sal_True ) { bStartNum = bFlag; } - USHORT GetSetValue() const { return nSetValue; } - void SetSetValue( USHORT nVal ) { nSetValue = nVal; } + sal_uInt16 GetSetValue() const { return nSetValue; } + void SetSetValue( sal_uInt16 nVal ) { nSetValue = nVal; } - const USHORT* GetLevelVal() const { return nLevelVal; } - USHORT* GetLevelVal() { return nLevelVal; } + const sal_uInt16* GetLevelVal() const { return nLevelVal; } + sal_uInt16* GetLevelVal() { return nLevelVal; } }; -SvxNodeNum::SvxNodeNum( BYTE nLevel, USHORT nSetVal ) - : nSetValue( nSetVal ), nMyLevel( nLevel ), bStartNum( FALSE ) +SvxNodeNum::SvxNodeNum( sal_uInt8 nLevel, sal_uInt16 nSetVal ) + : nSetValue( nSetVal ), nMyLevel( nLevel ), bStartNum( sal_False ) { memset( nLevelVal, 0, sizeof( nLevelVal ) ); } @@ -366,10 +362,7 @@ inline SvxNodeNum& SvxNodeNum::operator=( const SvxNodeNum& rCpy ) return *this; } -/* -------------------------------------------------- - * - * --------------------------------------------------*/ -SvxNumRule* SvxConvertNumRule( const SvxNumRule* pRule, USHORT nLevel, SvxNumRuleType eType ); +SvxNumRule* SvxConvertNumRule( const SvxNumRule* pRule, sal_uInt16 nLevel, SvxNumRuleType eType ); #endif diff --git a/editeng/inc/editeng/opaqitem.hxx b/editeng/inc/editeng/opaqitem.hxx index 1ba364836a..5676b47ddd 100644 --- a/editeng/inc/editeng/opaqitem.hxx +++ b/editeng/inc/editeng/opaqitem.hxx @@ -42,9 +42,9 @@ namespace rtl // class SvxOpaqueItem --------------------------------------------------- -/* -[Beschreibung] -Dieses Item beschreibt eine logische Variable "Undurchsichtig ja oder nein". +/* [Description] + + This item describes a logical variable "Opaque yes or no." */ class EDITENG_DLLPUBLIC SvxOpaqueItem : public SfxBoolItem @@ -52,13 +52,13 @@ class EDITENG_DLLPUBLIC SvxOpaqueItem : public SfxBoolItem public: TYPEINFO(); - SvxOpaqueItem( const USHORT nId , const BOOL bOpa = TRUE ); + SvxOpaqueItem( const sal_uInt16 nId , const sal_Bool bOpa = sal_True ); inline SvxOpaqueItem &operator=( const SvxOpaqueItem &rCpy ); - // "pure virtual Methoden" vom SfxPoolItem + // "pure virtual Methods" from SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -66,7 +66,7 @@ public: String &rText, const IntlWrapper * = 0 ) const; }; -inline SvxOpaqueItem::SvxOpaqueItem( const USHORT nId, const BOOL bOpa ) +inline SvxOpaqueItem::SvxOpaqueItem( const sal_uInt16 nId, const sal_Bool bOpa ) : SfxBoolItem( nId, bOpa ) {} diff --git a/editeng/inc/editeng/orphitem.hxx b/editeng/inc/editeng/orphitem.hxx index d975116832..2d61bfcf7a 100644 --- a/editeng/inc/editeng/orphitem.hxx +++ b/editeng/inc/editeng/orphitem.hxx @@ -41,9 +41,9 @@ namespace rtl // class SvxOrphansItem -------------------------------------------------- -/* -[Beschreibung] -Dieses Item beschreibt die Anzahl der Zeilen fuer die Schusterjungenregelung. +/* [Description] + + This item describes the number of lines for the orphans system. */ class EDITENG_DLLPUBLIC SvxOrphansItem: public SfxByteItem @@ -52,12 +52,12 @@ class EDITENG_DLLPUBLIC SvxOrphansItem: public SfxByteItem public: TYPEINFO(); - SvxOrphansItem( const BYTE nL /*= 0*/, const USHORT nId ); + SvxOrphansItem( const sal_uInt8 nL /*= 0*/, const sal_uInt16 nId ); - // "pure virtual Methoden" vom SfxPoolItem + // "pure virtual Methods" from SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, diff --git a/editeng/inc/editeng/outliner.hxx b/editeng/inc/editeng/outliner.hxx index 004cb6a51c..e42ae9305e 100644 --- a/editeng/inc/editeng/outliner.hxx +++ b/editeng/inc/editeng/outliner.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -38,14 +38,13 @@ #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 "editeng/editengdllapi.h" #include <svtools/grfmgr.hxx> -#include <tools/rtti.hxx> // wegen typedef TypeId +#include <tools/rtti.hxx> // due to typedef TypeId #include <vector> class OutlinerEditEng; @@ -75,10 +74,15 @@ class SfxItemSet; class SvxNumBulletItem; class SvxNumberFormat; class SvxLRSpaceItem; -class SfxUndoManager; class EditEngine; class SvKeyValueIterator; class SvxForbiddenCharactersTable; + +namespace svl +{ + class IUndoManager; +} + #include <com/sun/star/uno/Reference.h> #include <rtl/ref.hxx> @@ -100,7 +104,7 @@ typedef std::vector<SpellPortion> SpellPortions; namespace basegfx { class B2DPolyPolygon; } -// nur interner Gebrauch! +// internal use only! #define PARAFLAG_DROPTARGET 0x1000 #define PARAFLAG_DROPTARGET_EMPTY 0x2000 #define PARAFLAG_HOLDDEPTH 0x4000 @@ -132,12 +136,12 @@ private: Paragraph& operator=(const Paragraph& rPara ); - USHORT nFlags; + sal_uInt16 nFlags; XubString aBulText; Size aBulSize; - BOOL bVisible; + sal_Bool bVisible; - BOOL IsVisible() const { return bVisible; } + sal_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; } @@ -156,27 +160,27 @@ private: 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; } + void SetFlag( sal_uInt16 nFlag ) { nFlags |= nFlag; } + void RemoveFlag( sal_uInt16 nFlag ) { nFlags &= ~nFlag; } + bool HasFlag( sal_uInt16 nFlag ) const { return (nFlags & nFlag) != 0; } }; struct ParaRange { - USHORT nStartPara; - USHORT nEndPara; + sal_uInt16 nStartPara; + sal_uInt16 nEndPara; - ParaRange( USHORT nS, USHORT nE ) { nStartPara = nS, nEndPara = nE; } + ParaRange( sal_uInt16 nS, sal_uInt16 nE ) { nStartPara = nS, nEndPara = nE; } void Adjust(); - USHORT Len() const { return 1 + ( ( nEndPara > nStartPara ) ? (nEndPara-nStartPara) : (nStartPara-nEndPara) ); } + sal_uInt16 Len() const { return 1 + ( ( nEndPara > nStartPara ) ? (nEndPara-nStartPara) : (nStartPara-nEndPara) ); } }; inline void ParaRange::Adjust() { if ( nStartPara > nEndPara ) { - USHORT nTmp = nStartPara; + sal_uInt16 nTmp = nStartPara; nStartPara = nEndPara; nEndPara = nTmp; } @@ -194,18 +198,18 @@ private: EditView* pEditView; // Drag & Drop - BOOL bBeginDragAtMove_OLDMEMBER; - BOOL bInDragMode; + sal_Bool bBeginDragAtMove_OLDMEMBER; + sal_Bool bInDragMode; Point aDDStartPosRef; Point aDDStartPosPix; - ULONG nDDStartPara; - ULONG nDDStartParaVisChildCount; - ULONG nDDCurPara; - USHORT nDDStartDepth; - USHORT nDDCurDepth; - USHORT nDDMaxDepth; - BOOL bDDChangingDepth; - BOOL bDDCursorVisible; + sal_uLong nDDStartPara; + sal_uLong nDDStartParaVisChildCount; + sal_uLong nDDCurPara; + sal_uInt16 nDDStartDepth; + sal_uInt16 nDDCurDepth; + sal_uInt16 nDDMaxDepth; + sal_Bool bDDChangingDepth; + sal_Bool bDDCursorVisible; long* pHorTabArrDoc; long nDDScrollLRBorderWidthWin; // Left Right long nDDScrollTBBorderWidthWin; // Top Bottom @@ -213,24 +217,24 @@ private: long nDDScrollTDOffs; void* pDummy; - ULONG nDummy; + sal_uLong nDummy; enum MouseTarget { MouseText = 0, MouseBullet = 1, - MouseHypertext = 2, // ausserhalb OutputArea - MouseOutside = 3, // ausserhalb OutputArea + MouseHypertext = 2, // Outside OutputArea + MouseOutside = 3, // Outside OutputArea MouseDontKnow = 4 }; MouseTarget OLD_ePrevMouseTarget; #ifdef _OUTLINER_CXX - EDITENG_DLLPRIVATE void ImplExpandOrCollaps( USHORT nStartPara, USHORT nEndPara, BOOL bExpand ); + EDITENG_DLLPRIVATE void ImplExpandOrCollaps( sal_uInt16 nStartPara, sal_uInt16 nEndPara, sal_Bool bExpand ); - EDITENG_DLLPRIVATE ULONG ImpCheckMousePos( const Point& rPosPixel, MouseTarget& reTarget); + EDITENG_DLLPRIVATE sal_uLong ImpCheckMousePos( const Point& rPosPixel, MouseTarget& reTarget); EDITENG_DLLPRIVATE void ImpToggleExpand( Paragraph* pParentPara ); - EDITENG_DLLPRIVATE ParaRange ImpGetSelectedParagraphs( BOOL bIncludeHiddenChilds ); + EDITENG_DLLPRIVATE ParaRange ImpGetSelectedParagraphs( sal_Bool bIncludeHiddenChilds ); EDITENG_DLLPRIVATE void ImpHideDDCursor(); EDITENG_DLLPRIVATE void ImpShowDDCursor(); EDITENG_DLLPRIVATE void ImpPaintDDCursor(); @@ -241,13 +245,13 @@ private: EDITENG_DLLPRIVATE void ImpScrollUp(); EDITENG_DLLPRIVATE void ImpScrollDown(); - EDITENG_DLLPRIVATE ULONG ImpGetInsertionPara( const Point& rPosPixel ); + EDITENG_DLLPRIVATE sal_uLong ImpGetInsertionPara( const Point& rPosPixel ); EDITENG_DLLPRIVATE Point ImpGetDocPos( const Point& rPosPixel ); EDITENG_DLLPRIVATE Pointer ImpGetMousePointer( MouseTarget eTarget ); - EDITENG_DLLPRIVATE USHORT ImpInitPaste( ULONG& rStart ); - EDITENG_DLLPRIVATE void ImpPasted( ULONG nStart, ULONG nPrevParaCount, USHORT nSize); - EDITENG_DLLPRIVATE USHORT ImpCalcSelectedPages( BOOL bIncludeFirstSelected ); - EDITENG_DLLPRIVATE BOOL ImpIsIndentingPages(); + EDITENG_DLLPRIVATE sal_uInt16 ImpInitPaste( sal_uLong& rStart ); + EDITENG_DLLPRIVATE void ImpPasted( sal_uLong nStart, sal_uLong nPrevParaCount, sal_uInt16 nSize); + EDITENG_DLLPRIVATE sal_uInt16 ImpCalcSelectedPages( sal_Bool bIncludeFirstSelected ); + EDITENG_DLLPRIVATE sal_Bool ImpIsIndentingPages(); #endif @@ -260,12 +264,12 @@ public: void Scroll( long nHorzScroll, long nVertScroll ); void Paint( const Rectangle& rRect ); - BOOL PostKeyEvent( const KeyEvent& rKEvt, Window* pFrameWin = NULL ); - BOOL MouseButtonDown( const MouseEvent& ); - BOOL MouseButtonUp( const MouseEvent& ); - BOOL MouseMove( const MouseEvent& ); + sal_Bool PostKeyEvent( const KeyEvent& rKEvt, Window* pFrameWin = NULL ); + sal_Bool MouseButtonDown( const MouseEvent& ); + sal_Bool MouseButtonUp( const MouseEvent& ); + sal_Bool MouseMove( const MouseEvent& ); - void ShowCursor( BOOL bGotoCursor = TRUE ); + void ShowCursor( sal_Bool bGotoCursor = sal_True ); void HideCursor(); void SetOutliner( Outliner* pOutliner ); @@ -274,38 +278,37 @@ public: void SetWindow( Window* pWindow ); Window* GetWindow() const; - void SetReadOnly( BOOL bReadOnly ); - BOOL IsReadOnly() const; + void SetReadOnly( sal_Bool bReadOnly ); + sal_Bool IsReadOnly() const; void SetOutputArea( const Rectangle& rRect ); Rectangle GetOutputArea() const; Rectangle GetVisArea() const; - List* CreateSelectionList(); + void CreateSelectionList (std::vector<Paragraph*> &aSelList) ; - // gibt Anzahl selektierter Absaetze zurueck - // MT 07/00: Who needs this? - ULONG Select( Paragraph* pParagraph, - BOOL bSelect=TRUE, - BOOL bWChilds=TRUE); + // Retruns the number of selected paragraphs + sal_uLong Select( Paragraph* pParagraph, + sal_Bool bSelect=sal_True, + sal_Bool bWChilds=sal_True); String GetSelected() const; - void SelectRange( ULONG nFirst, USHORT nCount ); + void SelectRange( sal_uLong nFirst, sal_uInt16 nCount ); void SetAttribs( const SfxItemSet& ); void Indent( short nDiff ); - void AdjustDepth( short nDX ); // Spaeter gegeb Indent ersetzen! + void AdjustDepth( short nDX ); // Later replace with Indent! - BOOL AdjustHeight( long nDY ); + sal_Bool AdjustHeight( long nDY ); void AdjustDepth( Paragraph* pPara, short nDX, - BOOL bWithChilds = FALSE ); + sal_Bool bWithChilds = sal_False ); void AdjustHeight( Paragraph* pPara, long nDY, - BOOL bWithChilds=FALSE ); + sal_Bool bWithChilds=sal_False ); - ULONG Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFormat, BOOL bSelect = FALSE, SvKeyValueIterator* pHTTPHeaderAttrs = NULL ); - ULONG Write( SvStream& rOutput, EETextFormat eFormat ); + sal_uLong Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFormat, sal_Bool bSelect = sal_False, SvKeyValueIterator* pHTTPHeaderAttrs = NULL ); + sal_uLong Write( SvStream& rOutput, EETextFormat eFormat ); - void InsertText( const String& rNew, BOOL bSelect = FALSE ); + void InsertText( const String& rNew, sal_Bool bSelect = sal_False ); void InsertText( const OutlinerParaObject& rParaObj ); void Expand(); void Collapse(); @@ -323,7 +326,7 @@ public: void Copy(); void Paste(); void PasteSpecial(); - void EnablePaste( BOOL bEnable ); + void EnablePaste( sal_Bool bEnable ); void Undo(); void Redo(); @@ -331,41 +334,41 @@ public: void SetStyleSheet( SfxStyleSheet* ); SfxStyleSheet* GetStyleSheet() const; - void SetControlWord( ULONG nWord ); - ULONG GetControlWord() const; + void SetControlWord( sal_uLong nWord ); + sal_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 RemoveCharAttribs( sal_uLong nPara, sal_uInt16 nWhich = 0 ); void CompleteAutoCorrect(); - EESpellState StartSpeller( BOOL bMultipleDoc = FALSE ); + EESpellState StartSpeller( sal_Bool bMultipleDoc = sal_False ); EESpellState StartThesaurus(); - USHORT StartSearchAndReplace( const SvxSearchItem& rSearchItem ); + sal_uInt16 StartSearchAndReplace( const SvxSearchItem& rSearchItem ); // for text conversion - void StartTextConversion( LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont, INT32 nOptions, BOOL bIsInteractive, BOOL bMultipleDoc ); + void StartTextConversion( LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont, sal_Int32 nOptions, sal_Bool bIsInteractive, sal_Bool bMultipleDoc ); void TransliterateText( sal_Int32 nTransliterationMode ); ESelection GetSelection(); - USHORT GetSelectedScriptType() const; + sal_uInt16 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 RemoveAttribs( sal_Bool bRemoveParaAttribs = sal_False, sal_uInt16 nWhich = 0, sal_Bool bKeepLanguages = sal_False ); + void RemoveAttribsKeepLanguages( sal_Bool bRemoveParaAttribs ); + sal_Bool HasSelection() const; void InsertField( const SvxFieldItem& rFld ); const SvxFieldItem* GetFieldUnderMousePointer() const; - const SvxFieldItem* GetFieldUnderMousePointer( USHORT& nPara, xub_StrLen& nPos ) const; + const SvxFieldItem* GetFieldUnderMousePointer( sal_uInt16& nPara, xub_StrLen& nPos ) const; const SvxFieldItem* GetFieldAtSelection() const; /** enables numbering for the selected paragraphs if the numbering of the first paragraph is off @@ -378,13 +381,13 @@ public: */ void EnableBullets(); - BOOL IsCursorAtWrongSpelledWord( BOOL bMarkIfWrong = FALSE ); - BOOL IsWrongSpelledWordAtPos( const Point& rPosPixel, BOOL bMarkIfWrong = FALSE ); + sal_Bool IsCursorAtWrongSpelledWord( sal_Bool bMarkIfWrong = sal_False ); + sal_Bool IsWrongSpelledWordAtPos( const Point& rPosPixel, sal_Bool bMarkIfWrong = sal_False ); void SpellIgnoreWord(); void ExecuteSpellPopup( const Point& rPosPixel, Link* pCallBack = 0 ); - void SetInvalidateMore( USHORT nPixel ); - USHORT GetInvalidateMore() const; + void SetInvalidateMore( sal_uInt16 nPixel ); + sal_uInt16 GetInvalidateMore() const; String GetSurroundingText() const; Selection GetSurroundingTextSelection() const; @@ -395,8 +398,7 @@ public: bool EDITENG_DLLPUBLIC GetStatusValueForThesaurusFromContext( String &rStatusVal, LanguageType &rLang, const EditView &rEditView ); void EDITENG_DLLPUBLIC ReplaceTextWithSynonym( EditView &rEditView, const String &rSynonmText ); - -DECLARE_LIST(ViewList,OutlinerView*) +typedef ::std::vector< OutlinerView* > ViewList; class EDITENG_DLLPUBLIC DrawPortionInfo { @@ -416,8 +418,7 @@ public: const Color maOverlineColor; const Color maTextLineColor; - // #101498# BiDi level needs to be transported, too. - BYTE mnBiDiLevel; + sal_uInt8 mnBiDiLevel; bool mbFilled; long mnWidthToFill; @@ -427,7 +428,7 @@ public: unsigned mbEndOfParagraph : 1; unsigned mbEndOfBullet : 1; - BYTE GetBiDiLevel() const { return mnBiDiLevel; } + sal_uInt8 GetBiDiLevel() const { return mnBiDiLevel; } sal_Bool IsRTL() const; DrawPortionInfo( @@ -444,7 +445,7 @@ public: const ::com::sun::star::lang::Locale* pLocale, const Color& rOverlineColor, const Color& rTextLineColor, - BYTE nBiDiLevel, + sal_uInt8 nBiDiLevel, bool bFilled, long nWidthToFill, bool bEndOfLine, @@ -491,14 +492,14 @@ public: struct EDITENG_DLLPUBLIC PaintFirstLineInfo { - USHORT mnPara; + sal_uInt16 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 ) + PaintFirstLineInfo( sal_uInt16 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 ) {} }; @@ -516,9 +517,9 @@ private: String aRepresentation; - USHORT nPara; + sal_uInt16 nPara; xub_StrLen nPos; - BOOL bSimpleClick; + sal_Bool bSimpleClick; EditFieldInfo(); EditFieldInfo( const EditFieldInfo& ); @@ -526,12 +527,12 @@ private: SdrPage* mpSdrPage; public: - EditFieldInfo( Outliner* pOutl, const SvxFieldItem& rFItem, USHORT nPa, xub_StrLen nPo ) + EditFieldInfo( Outliner* pOutl, const SvxFieldItem& rFItem, sal_uInt16 nPa, xub_StrLen nPo ) : rFldItem( rFItem ) { pOutliner = pOutl; nPara = nPa; nPos = nPo; - pTxtColor = 0; pFldColor = 0; bSimpleClick = FALSE; + pTxtColor = 0; pFldColor = 0; bSimpleClick = sal_False; mpSdrPage = 0; } ~EditFieldInfo() @@ -554,11 +555,11 @@ public: void ClearFldColor() { delete pFldColor; pFldColor = 0; } - USHORT GetPara() const { return nPara; } + sal_uInt16 GetPara() const { return nPara; } xub_StrLen GetPos() const { return nPos; } - BOOL IsSimpleClick() const { return bSimpleClick; } - void SetSimpleClick( BOOL bSimple ) { bSimpleClick = bSimple; } + sal_Bool IsSimpleClick() const { return bSimpleClick; } + void SetSimpleClick( sal_Bool bSimple ) { bSimpleClick = bSimple; } const String& GetRepresentation() const { return aRepresentation; } String& GetRepresentation() { return aRepresentation; } @@ -570,15 +571,15 @@ public: struct EBulletInfo { - BOOL bVisible; - USHORT nType; // see SvxNumberType + sal_Bool bVisible; + sal_uInt16 nType; // see SvxNumberType String aText; SvxFont aFont; Graphic aGraphic; - USHORT nParagraph; + sal_uInt16 nParagraph; Rectangle aBounds; - EBulletInfo() : bVisible( FALSE ), nType( 0 ), nParagraph( EE_PARA_NOT_FOUND ) {} + EBulletInfo() : bVisible( sal_False ), nType( 0 ), nParagraph( EE_PARA_NOT_FOUND ) {} }; #define OUTLINERMODE_DONTKNOW 0x0000 @@ -608,7 +609,7 @@ class EDITENG_DLLPUBLIC Outliner : public SfxBroadcaster ViewList aViewList; Paragraph* pHdlParagraph; - ULONG mnFirstSelPage; + sal_uLong mnFirstSelPage; Link aDrawPortionHdl; Link aDrawBulletHdl; Link aExpandHdl; @@ -627,20 +628,20 @@ class EDITENG_DLLPUBLIC Outliner : public SfxBroadcaster Link maEndPasteOrDropHdl; sal_Int16 nDepthChangedHdlPrevDepth; - USHORT mnDepthChangeHdlPrevFlags; + sal_uInt16 mnDepthChangeHdlPrevFlags; sal_Int16 nMaxDepth; const sal_Int16 nMinDepth; - USHORT nFirstPage; + sal_uInt16 nFirstPage; - USHORT nOutlinerMode; + sal_uInt16 nOutlinerMode; - BOOL bIsExpanding; // Nur in Expand/Collaps-Hdl gueltig, mal umstellen - BOOL bFirstParaIsEmpty; - BOOL bBlockInsCallback; - BOOL bStrippingPortions; - BOOL bPasting; + sal_Bool bIsExpanding; // Only valid in Expand/Collaps-Hdl, reset + sal_Bool bFirstParaIsEmpty; + sal_Bool bBlockInsCallback; + sal_Bool bStrippingPortions; + sal_Bool bPasting; - ULONG nDummy; + sal_uLong nDummy; #ifdef _OUTLINER_CXX @@ -650,96 +651,96 @@ class EDITENG_DLLPUBLIC Outliner : public SfxBroadcaster 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 ); + void ImplCheckParagraphs( sal_uInt16 nStart, sal_uInt16 nEnd ); + sal_Bool ImplHasBullet( sal_uInt16 nPara ) const; + Size ImplGetBulletSize( sal_uInt16 nPara ); + sal_uInt16 ImplGetNumbering( sal_uInt16 nPara, const SvxNumberFormat* pParaFmt ); + void ImplCalcBulletText( sal_uInt16 nPara, sal_Bool bRecalcLevel, sal_Bool bRecalcChilds ); + String ImplGetBulletText( sal_uInt16 nPara ); + void ImplCheckNumBulletItem( sal_uInt16 nPara ); + void ImplInitDepth( sal_uInt16 nPara, sal_Int16 nDepth, sal_Bool bCreateUndo, sal_Bool bUndoAction = sal_False ); + void ImplSetLevelDependendStyleSheet( sal_uInt16 nPara, SfxStyleSheet* pLevelStyle = NULL ); + + void ImplBlockInsertionCallbacks( sal_Bool b ); + + void ImplCheckStyleSheet( sal_uInt16 nPara, sal_Bool bReplaceExistingStyle ); + void ImpRecalcBulletIndent( sal_uLong nPara ); + + const SvxBulletItem& ImpGetBullet( sal_uLong nPara, sal_uInt16& ); + void ImpFilterIndents( sal_uLong nFirstPara, sal_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 ); + void ImpTextPasted( sal_uLong nStartPara, sal_uInt16 nCount ); + long ImpCalcMaxBulletWidth( sal_uInt16 nPara, const SvxBulletItem& rBullet ); + Font ImpCalcBulletFont( sal_uInt16 nPara ) const; + Rectangle ImpCalcBulletArea( sal_uInt16 nPara, sal_Bool bAdjust, sal_Bool bReturnPaperPos ); + long ImpGetTextIndent( sal_uLong nPara ); + sal_Bool ImpCanIndentSelectedPages( OutlinerView* pCurView ); + sal_Bool ImpCanDeleteSelectedPages( OutlinerView* pCurView ); + sal_Bool ImpCanDeleteSelectedPages( OutlinerView* pCurView, sal_uInt16 nFirstPage, sal_uInt16 nPages ); - USHORT ImplGetOutlinerMode() const { return nOutlinerMode & OUTLINERMODE_USERMASK; } + sal_uInt16 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 ); + void ParagraphInserted( sal_uInt16 nParagraph ); + void ParagraphDeleted( sal_uInt16 nParagraph ); + void ParaAttribsChanged( sal_uInt16 nParagraph ); virtual void StyleSheetChanged( SfxStyleSheet* pStyle ); - void InvalidateBullet( Paragraph* pPara, ULONG nPara ); - void PaintBullet( USHORT nPara, const Point& rStartPos, + void InvalidateBullet( Paragraph* pPara, sal_uLong nPara ); + void PaintBullet( sal_uInt16 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; + virtual const SvxNumberFormat* GetNumberFormat( sal_uInt16 nPara ) const; public: - Outliner( SfxItemPool* pPool, USHORT nOutlinerMode ); + Outliner( SfxItemPool* pPool, sal_uInt16 nOutlinerMode ); virtual ~Outliner(); - void Init( USHORT nOutlinerMode ); - USHORT GetMode() const { return nOutlinerMode; } + void Init( sal_uInt16 nOutlinerMode ); + sal_uInt16 GetMode() const { return nOutlinerMode; } - void SetVertical( BOOL bVertical ); - BOOL IsVertical() const; + void SetVertical( sal_Bool bVertical ); + sal_Bool IsVertical() const; - void SetFixedCellHeight( BOOL bUseFixedCellHeight ); - BOOL IsFixedCellHeight() const; + void SetFixedCellHeight( sal_Bool bUseFixedCellHeight ); + sal_Bool IsFixedCellHeight() const; void SetDefaultHorizontalTextDirection( EEHorizontalTextDirection eHTextDir ); EEHorizontalTextDirection GetDefaultHorizontalTextDirection() const; - USHORT GetScriptType( const ESelection& rSelection ) const; - LanguageType GetLanguage( USHORT nPara, USHORT nPos ) const; + sal_uInt16 GetScriptType( const ESelection& rSelection ) const; + LanguageType GetLanguage( sal_uInt16 nPara, sal_uInt16 nPos ) const; - void SetAsianCompressionMode( USHORT nCompressionMode ); - USHORT GetAsianCompressionMode() const; + void SetAsianCompressionMode( sal_uInt16 nCompressionMode ); + sal_uInt16 GetAsianCompressionMode() const; - void SetKernAsianPunctuation( BOOL bEnabled ); - BOOL IsKernAsianPunctuation() const; + void SetKernAsianPunctuation( sal_Bool bEnabled ); + sal_Bool IsKernAsianPunctuation() const; - void SetAddExtLeading( BOOL b ); - BOOL IsAddExtLeading() const; + void SetAddExtLeading( sal_Bool b ); + sal_Bool IsAddExtLeading() const; - ULONG InsertView( OutlinerView* pView, ULONG nIndex=LIST_APPEND); + size_t InsertView( OutlinerView* pView, size_t nIndex = size_t(-1) ); OutlinerView* RemoveView( OutlinerView* pView ); - OutlinerView* RemoveView( ULONG nIndex ); - OutlinerView* GetView( ULONG nIndex ) const; - ULONG GetViewCount() const; + OutlinerView* RemoveView( size_t nIndex ); + OutlinerView* GetView( size_t nIndex ) const; + size_t GetViewCount() const; - Paragraph* Insert( const String& rText, ULONG nAbsPos = LIST_APPEND, sal_Int16 nDepth = 0 ); + Paragraph* Insert( const String& rText, sal_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; + String GetText( Paragraph* pPara, sal_uLong nParaCount=1 ) const; - OutlinerParaObject* CreateParaObject( USHORT nStartPara = 0, USHORT nParaCount = 0xFFFF ) const; + OutlinerParaObject* CreateParaObject( sal_uInt16 nStartPara = 0, sal_uInt16 nParaCount = 0xFFFF ) const; const SfxItemSet& GetEmptyItemSet() const; @@ -751,46 +752,44 @@ public: sal_Int16 GetMinDepth() const { return -1; } - void SetMaxDepth( sal_Int16 nDepth, BOOL bCheckParas = FALSE ); + void SetMaxDepth( sal_Int16 nDepth, sal_Bool bCheckParas = sal_False ); sal_Int16 GetMaxDepth() const { return nMaxDepth; } - void SetUpdateMode( BOOL bUpdate ); - BOOL GetUpdateMode() const; + void SetUpdateMode( sal_Bool bUpdate ); + sal_Bool GetUpdateMode() const; void Clear(); void RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich ); - ULONG GetParagraphCount() const; - Paragraph* GetParagraph( ULONG nAbsPos ) const; + sal_uLong GetParagraphCount() const; + Paragraph* GetParagraph( sal_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_Bool HasParent( Paragraph* pParagraph ) const; + sal_Bool HasChilds( Paragraph* pParagraph ) const; + sal_uLong GetChildCount( Paragraph* pParent ) const; + sal_Bool IsExpanded( Paragraph* pPara ) const; + Paragraph* GetParent( Paragraph* pParagraph ) const; + sal_uLong GetAbsPos( Paragraph* pPara ); - sal_Int16 GetDepth( ULONG nPara ) const; + sal_Int16 GetDepth( sal_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 SetVisible( Paragraph* pPara, sal_Bool bVisible ); + sal_Bool IsVisible( Paragraph* pPara ) const { return pPara->IsVisible(); } - void EnableUndo( BOOL bEnable ); - BOOL IsUndoEnabled() const; - void UndoActionStart( USHORT nId ); - void UndoActionEnd( USHORT nId ); + void EnableUndo( sal_Bool bEnable ); + sal_Bool IsUndoEnabled() const; + void UndoActionStart( sal_uInt16 nId ); + void UndoActionEnd( sal_uInt16 nId ); void InsertUndo( EditUndo* pUndo ); - BOOL IsInUndo(); + sal_Bool IsInUndo(); void ClearModifyFlag(); - BOOL IsModified() const; + sal_Bool IsModified() const; Paragraph* GetHdlParagraph() const { return pHdlParagraph; } - BOOL IsExpanding() const { return bIsExpanding; } + sal_Bool IsExpanding() const { return bIsExpanding; } virtual void ExpandHdl(); void SetExpandHdl( const Link& rLink ) { aExpandHdl = rLink; } @@ -808,7 +807,7 @@ public: void SetDepthChangedHdl(const Link& rLink){aDepthChangedHdl=rLink;} Link GetDepthChangedHdl() const { return aDepthChangedHdl; } sal_Int16 GetPrevDepth() const { return nDepthChangedHdlPrevDepth; } - USHORT GetPrevFlags() const { return mnDepthChangeHdlPrevFlags; } + sal_uInt16 GetPrevFlags() const { return mnDepthChangeHdlPrevFlags; } virtual long RemovingPagesHdl( OutlinerView* ); void SetRemovingPagesHdl(const Link& rLink){aRemovingPagesHdl=rLink;} @@ -816,10 +815,11 @@ public: 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; } + // valid only in the two upper handlers + sal_uInt16 GetSelPageCount() const { return nDepthChangedHdlPrevDepth; } + + // valid only in the two upper handlers + sal_uLong GetFirstSelPage() const { return mnFirstSelPage; } void SetCalcFieldValueHdl(const Link& rLink ) { aCalcFieldValueHdl= rLink; } Link GetCalcFieldValueHdl() const { return aCalcFieldValueHdl; } @@ -852,8 +852,8 @@ public: const Size& GetPaperSize() const; void SetPaperSize( const Size& rSize ); - void SetFirstPageNumber( USHORT n ) { nFirstPage = n; } - USHORT GetFirstPageNumber() const { return nFirstPage; } + void SetFirstPageNumber( sal_uInt16 n ) { nFirstPage = n; } + sal_uInt16 GetFirstPageNumber() const { return nFirstPage; } void SetPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon ); void SetPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::B2DPolyPolygon* pLinePolyPolygon); @@ -866,30 +866,29 @@ public: const Size& GetMaxAutoPaperSize() const; void SetMaxAutoPaperSize( const Size& rSz ); - void SetDefTab( USHORT nTab ); - USHORT GetDefTab() const; + void SetDefTab( sal_uInt16 nTab ); + sal_uInt16 GetDefTab() const; - BOOL IsFlatMode() const; - void SetFlatMode( BOOL bFlat ); + sal_Bool IsFlatMode() const; + void SetFlatMode( sal_Bool bFlat ); - void EnableAutoColor( BOOL b ); - BOOL IsAutoColorEnabled() const; + void EnableAutoColor( sal_Bool b ); + sal_Bool IsAutoColorEnabled() const; - void ForceAutoColor( BOOL b ); - BOOL IsForceAutoColor() const; + void ForceAutoColor( sal_Bool b ); + sal_Bool IsForceAutoColor() const; - EBulletInfo GetBulletInfo( USHORT nPara ); + EBulletInfo GetBulletInfo( sal_uInt16 nPara ); void SetWordDelimiters( const String& rDelimiters ); String GetWordDelimiters() const; - String GetWord( USHORT nPara, xub_StrLen nIndex ); + String GetWord( sal_uInt16 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 Point& rStartPos, const String& rText, sal_uInt16 nTextStart, sal_uInt16 nTextLen, + const sal_Int32* pDXArray, const SvxFont& rFont, sal_uInt16 nPara, xub_StrLen nIndex, sal_uInt8 nRightToLeft, const EEngineData::WrongSpellVector* pWrongSpellVector, const SvxFieldData* pFieldData, bool bEndOfLine, @@ -901,73 +900,75 @@ public: virtual void DrawingTab( const Point& rStartPos, long nWidth, const String& rChar, - const SvxFont& rFont, USHORT nPara, xub_StrLen nIndex, BYTE nRightToLeft, + const SvxFont& rFont, sal_uInt16 nPara, xub_StrLen nIndex, sal_uInt8 nRightToLeft, bool bEndOfLine, bool bEndOfParagraph, const Color& rOverlineColor, const Color& rTextLineColor); Size CalcTextSize(); + Size CalcTextSizeNTP(); Point GetDocPos( Paragraph* pPara ); void SetStyleSheetPool( SfxStyleSheetPool* pSPool ); SfxStyleSheetPool* GetStyleSheetPool(); - BOOL IsInSelectionMode() const; + sal_Bool IsInSelectionMode() const; - void SetStyleSheet( ULONG nPara, SfxStyleSheet* pStyle ); - SfxStyleSheet* GetStyleSheet( ULONG nPara ); + void SetStyleSheet( sal_uLong nPara, SfxStyleSheet* pStyle ); + SfxStyleSheet* GetStyleSheet( sal_uLong nPara ); - void SetParaAttribs( USHORT nPara, const SfxItemSet& ); - SfxItemSet GetParaAttribs( USHORT nPara ); + void SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& ); + SfxItemSet GetParaAttribs( sal_uInt16 nPara ); - void Remove( Paragraph* pPara, ULONG nParaCount ); - BOOL Expand( Paragraph* ); - BOOL Collapse( Paragraph* ); + void Remove( Paragraph* pPara, sal_uLong nParaCount ); + sal_Bool Expand( Paragraph* ); + sal_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. + // Returns an array containing the widths of the Bullet Indentations + // Last value must be -1. Is deleted by the outliner. Link GetWidthArrReqHdl() const{ return aWidthArrReqHdl; } void SetWidthArrReqHdl(const Link& rLink){aWidthArrReqHdl=rLink; } - void SetControlWord( ULONG nWord ); - ULONG GetControlWord() const; + void SetControlWord( sal_uLong nWord ); + sal_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 ); + sal_uLong GetLineCount( sal_uLong nParagraph ) const; + sal_uInt16 GetLineLen( sal_uLong nParagraph, sal_uInt16 nLine ) const; + sal_uLong GetLineHeight( sal_uLong nParagraph, sal_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 ); + // nFormat must be a value from the enum EETextFormat (due to CLOOKS) + sal_uLong Read( SvStream& rInput, const String& rBaseURL, sal_uInt16, SvKeyValueIterator* pHTTPHeaderAttrs = NULL ); - SfxUndoManager& GetUndoManager(); + ::svl::IUndoManager& + 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 + // Only for EditEngine mode 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 ); + void QuickRemoveCharAttribs( sal_uInt16 nPara, sal_uInt16 nWhich = 0 ); + void QuickFormatDoc( sal_Bool bFull = sal_False ); - BOOL UpdateFields(); - void RemoveFields( BOOL bKeepFieldText, TypeId aType = NULL ); + sal_Bool UpdateFields(); + void RemoveFields( sal_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 ); + virtual void FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos ); + virtual void FieldSelected( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos ); + virtual String CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos, Color*& rTxtColor, Color*& rFldColor ); void SetSpeller( ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XSpellChecker1 > &xSpeller ); @@ -987,16 +988,16 @@ public: void SetDefaultLanguage( LanguageType eLang ); LanguageType GetDefaultLanguage() const; - BOOL HasOnlineSpellErrors() const; + sal_Bool HasOnlineSpellErrors() const; void CompleteOnlineSpelling(); EESpellState HasSpellErrors(); - BOOL HasText( const SvxSearchItem& rSearchItem ); - virtual BOOL SpellNextDocument(); + sal_Bool HasText( const SvxSearchItem& rSearchItem ); + virtual sal_Bool SpellNextDocument(); // for text conversion sal_Bool HasConvertibleTextPortion( LanguageType nLang ); - virtual BOOL ConvertNextDocument(); + virtual sal_Bool ConvertNextDocument(); void SetEditTextObjectPool( SfxItemPool* pPool ); SfxItemPool* GetEditTextObjectPool() const; @@ -1004,37 +1005,37 @@ public: void SetRefDevice( OutputDevice* pRefDev ); OutputDevice* GetRefDevice() const; - USHORT GetFirstLineOffset( ULONG nParagraph ); + sal_uInt16 GetFirstLineOffset( sal_uLong nParagraph ); - ULONG GetTextHeight() const; - ULONG GetTextHeight( ULONG nParagraph ) const; - Point GetDocPosTopLeft( ULONG nParagraph ); + sal_uLong GetTextHeight() const; + sal_uLong GetTextHeight( sal_uLong nParagraph ) const; + Point GetDocPosTopLeft( sal_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 ); + sal_Bool IsTextPos( const Point& rPaperPos, sal_uInt16 nBorder = 0 ); + sal_Bool IsTextPos( const Point& rPaperPos, sal_uInt16 nBorder, sal_Bool* pbBuuletPos ); - void SetGlobalCharStretching( USHORT nX = 100, USHORT nY = 100 ); - void GetGlobalCharStretching( USHORT& rX, USHORT& rY ); - void DoStretchChars( USHORT nX, USHORT nY ); + void SetGlobalCharStretching( sal_uInt16 nX = 100, sal_uInt16 nY = 100 ); + void GetGlobalCharStretching( sal_uInt16& rX, sal_uInt16& rY ); + void DoStretchChars( sal_uInt16 nX, sal_uInt16 nY ); void EraseVirtualDevice(); - void SetBigTextObjectStart( USHORT nStartAtPortionCount ); - USHORT GetBigTextObjectStart() const; - BOOL ShouldCreateBigTextObject() const; + void SetBigTextObjectStart( sal_uInt16 nStartAtPortionCount ); + sal_uInt16 GetBigTextObjectStart() const; + sal_Bool ShouldCreateBigTextObject() const; const EditEngine& GetEditEngine() const { return *((EditEngine*)pEditEngine); } // this is needed for StarOffice Api - void SetLevelDependendStyleSheet( USHORT nPara ); + void SetLevelDependendStyleSheet( sal_uInt16 nPara ); - USHORT GetOutlinerMode() const { return nOutlinerMode & OUTLINERMODE_USERMASK; } + sal_uInt16 GetOutlinerMode() const { return nOutlinerMode & OUTLINERMODE_USERMASK; } void StartSpelling(EditView& rEditView, sal_Bool bMultipleDoc); - //spell and return a sentence + // spell and return a sentence bool SpellSentence(EditView& rEditView, ::svx::SpellPortions& rToFill, bool bIsGrammarChecking ); // put spell position to start of current sentence void PutSpellingToSentenceStart( EditView& rEditView ); - //applies a changed sentence + // applies a changed sentence void ApplyChangedSentence(EditView& rEditView, const ::svx::SpellPortions& rNewPortions, bool bRecheck ); void EndSpelling(); diff --git a/editeng/inc/editeng/paperinf.hxx b/editeng/inc/editeng/paperinf.hxx index a4c32f6788..3c1a7cc493 100644 --- a/editeng/inc/editeng/paperinf.hxx +++ b/editeng/inc/editeng/paperinf.hxx @@ -49,7 +49,7 @@ public: static Size GetDefaultPaperSize( MapUnit eUnit = MAP_TWIP ); static Size GetPaperSize( Paper ePaper, MapUnit eUnit = MAP_TWIP ); static Size GetPaperSize( const Printer* pPrinter ); - static Paper GetSvxPaper( const Size &rSize, MapUnit eUnit = MAP_TWIP, bool bSloppy = FALSE ); + static Paper GetSvxPaper( const Size &rSize, MapUnit eUnit = MAP_TWIP, bool bSloppy = sal_False ); static long GetSloppyPaperDimension( long nSize, MapUnit eUnit = MAP_TWIP ); static String GetName( Paper ePaper ); }; diff --git a/editeng/inc/editeng/paragraphdata.hxx b/editeng/inc/editeng/paragraphdata.hxx index b869a801e1..778dbdea97 100644 --- a/editeng/inc/editeng/paragraphdata.hxx +++ b/editeng/inc/editeng/paragraphdata.hxx @@ -33,10 +33,10 @@ #include <vector> ////////////////////////////////////////////////////////////////////////////// -// MT 07/00: Only for internal use, oder some kind like hPara for the few +// Only for internal use, oder some kind like hPara for the few // functions where you need it outside ( eg. moving paragraphs... ) // -// AW: Unfortunately NOT only local (formally in outliner.hxx), but also +// Unfortunately NOT only local (formally in outliner.hxx), but also // used in outlobj.hxx. Moved to own header class ParagraphData diff --git a/editeng/inc/editeng/paravertalignitem.hxx b/editeng/inc/editeng/paravertalignitem.hxx index ed8f0af6d8..d1e94d6a54 100644 --- a/editeng/inc/editeng/paravertalignitem.hxx +++ b/editeng/inc/editeng/paravertalignitem.hxx @@ -52,9 +52,9 @@ public: const sal_uInt16 nId ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream & rStrm, USHORT nIVer) const; - virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream & rStrm, sal_uInt16 nIVer) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -62,10 +62,8 @@ public: String &rText, const IntlWrapper * = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, - BYTE nMemberId ); - virtual bool QueryValue( com::sun::star::uno::Any& rVal, - BYTE nMemberId ) const; + virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); inline SvxParaVertAlignItem& operator=( const SvxParaVertAlignItem& rItem ) { diff --git a/editeng/inc/editeng/pbinitem.hxx b/editeng/inc/editeng/pbinitem.hxx index 6f217a1f2c..c13b14a251 100644 --- a/editeng/inc/editeng/pbinitem.hxx +++ b/editeng/inc/editeng/pbinitem.hxx @@ -35,13 +35,13 @@ // define ---------------------------------------------------------------- -#define PAPERBIN_PRINTER_SETTINGS ((BYTE)0xFF) +#define PAPERBIN_PRINTER_SETTINGS ((sal_uInt8)0xFF) // class SvxPaperBinItem ------------------------------------------------- -/* [Beschreibung] +/* [Description] - Dieses Item beschreibt die Auswahl eines Papierschachts des Drucker. + This item describes selecting a paper tray of the printer. */ class EDITENG_DLLPUBLIC SvxPaperBinItem : public SfxByteItem @@ -49,21 +49,21 @@ class EDITENG_DLLPUBLIC SvxPaperBinItem : public SfxByteItem public: TYPEINFO(); - inline SvxPaperBinItem( const USHORT nId , - const BYTE nTray = PAPERBIN_PRINTER_SETTINGS ); + inline SvxPaperBinItem( const sal_uInt16 nId , + const sal_uInt8 nTray = PAPERBIN_PRINTER_SETTINGS ); inline SvxPaperBinItem &operator=( const SvxPaperBinItem &rCpy ); - // "pure virtual Methoden" vom SfxPoolItem + // "pure virtual Methods" from SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create( SvStream &, USHORT ) const; - virtual SvStream& Store( SvStream &, USHORT nItemVersion ) const; + virtual SfxPoolItem* Create( SvStream &, sal_uInt16 ) const; + virtual SvStream& Store( SvStream &, sal_uInt16 nItemVersion ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText, const IntlWrapper * = 0 ) const; }; -inline SvxPaperBinItem::SvxPaperBinItem( const USHORT nId, const BYTE nT ) +inline SvxPaperBinItem::SvxPaperBinItem( const sal_uInt16 nId, const sal_uInt8 nT ) : SfxByteItem( nId, nT ) {} diff --git a/editeng/inc/editeng/pgrditem.hxx b/editeng/inc/editeng/pgrditem.hxx index 16877f55a4..f79f5f8b33 100644 --- a/editeng/inc/editeng/pgrditem.hxx +++ b/editeng/inc/editeng/pgrditem.hxx @@ -36,8 +36,8 @@ // class SvxParaGridItem ------------------------------------------------- -/* - [Beschreibung] +/* [Description] + Paragraph snap to grid */ @@ -46,13 +46,13 @@ class EDITENG_DLLPUBLIC SvxParaGridItem : public SfxBoolItem public: TYPEINFO(); - SvxParaGridItem( const BOOL bSnapToGrid /*= TRUE*/, - const USHORT nId ); + SvxParaGridItem( const sal_Bool bSnapToGrid /*= sal_True*/, + const sal_uInt16 nId ); - // "pure virtual Methoden" vom SfxPoolItem + // "pure virtual Methods" from SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, diff --git a/editeng/inc/editeng/pmdlitem.hxx b/editeng/inc/editeng/pmdlitem.hxx index a474e287b2..fa5a38c3a3 100644 --- a/editeng/inc/editeng/pmdlitem.hxx +++ b/editeng/inc/editeng/pmdlitem.hxx @@ -35,22 +35,22 @@ // class SvxPageModelItem ------------------------------------------------ -/* -[Beschreibung] -Dieses Item enthaelt einen Namen einer Seitenvorlage. +/* [Description] + + This item contains a name of a page template. */ class EDITENG_DLLPUBLIC SvxPageModelItem : public SfxStringItem { private: - BOOL bAuto; + sal_Bool bAuto; public: TYPEINFO(); - inline SvxPageModelItem( USHORT nWh ); - inline SvxPageModelItem( const String& rModel, BOOL bA /*= FALSE*/, - USHORT nWh ); + inline SvxPageModelItem( sal_uInt16 nWh ); + inline SvxPageModelItem( const String& rModel, sal_Bool bA /*= sal_False*/, + sal_uInt16 nWh ); inline SvxPageModelItem& operator=( const SvxPageModelItem& rModel ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; @@ -60,19 +60,19 @@ public: SfxMapUnit ePresMetric, String &rText, const IntlWrapper * = 0 ) const; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); - BOOL IsAuto() const { return bAuto; } + virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); + sal_Bool IsAuto() const { return bAuto; } }; -inline SvxPageModelItem::SvxPageModelItem( USHORT nWh ) - : bAuto( FALSE ) +inline SvxPageModelItem::SvxPageModelItem( sal_uInt16 nWh ) + : bAuto( sal_False ) { SetWhich( nWh ); } -inline SvxPageModelItem::SvxPageModelItem( const String& rModel, BOOL bA, - USHORT nWh ) : +inline SvxPageModelItem::SvxPageModelItem( const String& rModel, sal_Bool bA, + sal_uInt16 nWh ) : SfxStringItem( nWh, rModel ), bAuto( bA ) {} diff --git a/editeng/inc/editeng/postitem.hxx b/editeng/inc/editeng/postitem.hxx index 2b0e8639fc..6f55626e85 100644 --- a/editeng/inc/editeng/postitem.hxx +++ b/editeng/inc/editeng/postitem.hxx @@ -42,9 +42,9 @@ namespace rtl // class SvxPostureItem -------------------------------------------------- -/* - [Beschreibung] - Dieses Item beschreibt die Font-Stellung (Italic) +/* [Description] + + This item describes the font setting (Italic) */ class EDITENG_DLLPUBLIC SvxPostureItem : public SfxEnumItem @@ -53,26 +53,26 @@ public: TYPEINFO(); SvxPostureItem( const FontItalic ePost /*= ITALIC_NONE*/, - const USHORT nId ); + const sal_uInt16 nId ); - // "pure virtual Methoden" vom SfxPoolItem + SwEnumItem + // "pure virtual Methods" from SfxPoolItem + SwEnumItem virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; - virtual String GetValueTextByPos( USHORT nPos ) const; - virtual USHORT GetValueCount() const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; + virtual String GetValueTextByPos( sal_uInt16 nPos ) const; + virtual sal_uInt16 GetValueCount() const; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual int HasBoolValue() const; - virtual BOOL GetBoolValue() const; - virtual void SetBoolValue( BOOL bVal ); + virtual sal_Bool GetBoolValue() const; + virtual void SetBoolValue( sal_Bool bVal ); inline SvxPostureItem& operator=(const SvxPostureItem& rPost) { SetValue( rPost.GetValue() ); @@ -83,7 +83,7 @@ public: FontItalic GetPosture() const { return (FontItalic)GetValue(); } void SetPosture( FontItalic eNew ) - { SetValue( (USHORT)eNew ); } + { SetValue( (sal_uInt16)eNew ); } }; #endif // #ifndef _SVX_POSTITEM_HXX diff --git a/editeng/inc/editeng/prntitem.hxx b/editeng/inc/editeng/prntitem.hxx index d05b9355db..57735fb55a 100644 --- a/editeng/inc/editeng/prntitem.hxx +++ b/editeng/inc/editeng/prntitem.hxx @@ -38,9 +38,9 @@ // class SvxPrintItem ---------------------------------------------------- -/* -[Beschreibung] -Dieses Item beschreibt eine logische Variable "Drucken ja oder nein". +/* [Description] + + This item describes a logical variable "Print yes or no". */ @@ -49,13 +49,13 @@ class EDITENG_DLLPUBLIC SvxPrintItem : public SfxBoolItem public: TYPEINFO(); - SvxPrintItem( const USHORT nId , const BOOL bPrt = TRUE ); + SvxPrintItem( const sal_uInt16 nId , const sal_Bool bPrt = sal_True ); inline SvxPrintItem &operator=( const SvxPrintItem &rCpy ); - // "pure virtual Methoden" vom SfxPoolItem + // "pure virtual Methods" from SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -63,7 +63,7 @@ public: String &rText, const IntlWrapper * = 0 ) const; }; -inline SvxPrintItem::SvxPrintItem( const USHORT nId, const BOOL bPrt ) +inline SvxPrintItem::SvxPrintItem( const sal_uInt16 nId, const sal_Bool bPrt ) : SfxBoolItem( nId, bPrt ) {} diff --git a/editeng/inc/editeng/protitem.hxx b/editeng/inc/editeng/protitem.hxx index dec9414fdc..0d93de7a57 100644 --- a/editeng/inc/editeng/protitem.hxx +++ b/editeng/inc/editeng/protitem.hxx @@ -43,25 +43,24 @@ namespace rtl // class SvxProtectItem -------------------------------------------------- -/* -[Beschreibung] -Dieses Item beschreibt, ob Inhalt, Groesse oder Position geschuetzt werden -sollen. +/* [Description] + + This item describes, if content, size or position should be protected. */ class EDITENG_DLLPUBLIC SvxProtectItem : public SfxPoolItem { - BOOL bCntnt :1; //Inhalt geschuetzt - BOOL bSize :1; //Groesse geschuetzt - BOOL bPos :1; //Position geschuetzt + sal_Bool bCntnt :1; // Content protected + sal_Bool bSize :1; // Size protected + sal_Bool bPos :1; // Position protected public: TYPEINFO(); - inline SvxProtectItem( const USHORT nId ); + inline SvxProtectItem( const sal_uInt16 nId ); inline SvxProtectItem &operator=( const SvxProtectItem &rCpy ); - // "pure virtual Methoden" vom SfxPoolItem + // "pure virtual Methods" from SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, @@ -71,24 +70,24 @@ public: virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; - - BOOL IsCntntProtected() const { return bCntnt; } - BOOL IsSizeProtected() const { return bSize; } - BOOL IsPosProtected() const { return bPos; } - void SetCntntProtect( BOOL bNew ) { bCntnt = bNew; } - void SetSizeProtect ( BOOL bNew ) { bSize = bNew; } - void SetPosProtect ( BOOL bNew ) { bPos = bNew; } - - virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const; + + sal_Bool IsCntntProtected() const { return bCntnt; } + sal_Bool IsSizeProtected() const { return bSize; } + sal_Bool IsPosProtected() const { return bPos; } + void SetCntntProtect( sal_Bool bNew ) { bCntnt = bNew; } + void SetSizeProtect ( sal_Bool bNew ) { bSize = bNew; } + void SetPosProtect ( sal_Bool bNew ) { bPos = bNew; } + + virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); }; -inline SvxProtectItem::SvxProtectItem( const USHORT nId ) +inline SvxProtectItem::SvxProtectItem( const sal_uInt16 nId ) : SfxPoolItem( nId ) { - bCntnt = bSize = bPos = FALSE; + bCntnt = bSize = bPos = sal_False; } inline SvxProtectItem &SvxProtectItem::operator=( const SvxProtectItem &rCpy ) diff --git a/editeng/inc/editeng/prszitem.hxx b/editeng/inc/editeng/prszitem.hxx index d0eec00ffb..cc0d3e532f 100644 --- a/editeng/inc/editeng/prszitem.hxx +++ b/editeng/inc/editeng/prszitem.hxx @@ -35,9 +35,9 @@ // class SvxPropSizeItem ------------------------------------------------- -/* [Beschreibung] +/* [Description] - Dieses Item beschreibt die relative Schriftgroesse. + This item describes the relative Font Size. */ class EDITENG_DLLPUBLIC SvxPropSizeItem : public SfxUInt16Item @@ -45,13 +45,13 @@ class EDITENG_DLLPUBLIC SvxPropSizeItem : public SfxUInt16Item public: TYPEINFO(); - SvxPropSizeItem( const USHORT nPercent /*= 100*/, - const USHORT nID ); + SvxPropSizeItem( const sal_uInt16 nPercent /*= 100*/, + const sal_uInt16 nID ); - // "pure virtual Methoden" vom SfxPoolItem + // "pure virtual Methods" from SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, diff --git a/editeng/inc/editeng/scriptspaceitem.hxx b/editeng/inc/editeng/scriptspaceitem.hxx index a2c9b419e9..0357b59904 100644 --- a/editeng/inc/editeng/scriptspaceitem.hxx +++ b/editeng/inc/editeng/scriptspaceitem.hxx @@ -37,7 +37,7 @@ /* [Description] - This item describe the scriptype of the selected text and is only + This item describe the script type of the selected text and is only used for the user interface. */ @@ -50,8 +50,8 @@ public: const sal_uInt16 nId ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, diff --git a/editeng/inc/editeng/scripttypeitem.hxx b/editeng/inc/editeng/scripttypeitem.hxx index 45d93ea15d..b15f171c04 100644 --- a/editeng/inc/editeng/scripttypeitem.hxx +++ b/editeng/inc/editeng/scripttypeitem.hxx @@ -38,13 +38,13 @@ /* [Description] - This item describe the scriptype of the selected text and is only + This item describes the script type of the selected text and is only used for the user interface. */ -EDITENG_DLLPUBLIC USHORT GetI18NScriptTypeOfLanguage( USHORT nLang ); -USHORT GetItemScriptType( short nI18NType ); -short GetI18NScriptType( USHORT nItemType ); +EDITENG_DLLPUBLIC sal_uInt16 GetI18NScriptTypeOfLanguage( sal_uInt16 nLang ); +sal_uInt16 GetItemScriptType( short nI18NType ); +short GetI18NScriptType( sal_uInt16 nItemType ); class EDITENG_DLLPUBLIC SvxScriptTypeItem : public SfxUInt16Item { @@ -61,30 +61,30 @@ class EDITENG_DLLPUBLIC SvxScriptSetItem : public SfxSetItem public: TYPEINFO(); - SvxScriptSetItem( USHORT nSlotId, SfxItemPool& rPool ); + SvxScriptSetItem( sal_uInt16 nSlotId, SfxItemPool& rPool ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create( SvStream &, USHORT nVersion ) const; + virtual SfxPoolItem* Create( SvStream &, sal_uInt16 nVersion ) const; static const SfxPoolItem* GetItemOfScriptSet( const SfxItemSet& rSet, - USHORT nWhich ); - inline const SfxPoolItem* GetItemOfScriptSet( USHORT _nWhich ) const + sal_uInt16 nWhich ); + inline const SfxPoolItem* GetItemOfScriptSet( sal_uInt16 _nWhich ) const { return SvxScriptSetItem::GetItemOfScriptSet( GetItemSet(), _nWhich ); } - static const SfxPoolItem* GetItemOfScript( USHORT nSlotId, const SfxItemSet& rSet, USHORT nScript ); + static const SfxPoolItem* GetItemOfScript( sal_uInt16 nSlotId, const SfxItemSet& rSet, sal_uInt16 nScript ); - const SfxPoolItem* GetItemOfScript( USHORT nScript ) const; + const SfxPoolItem* GetItemOfScript( sal_uInt16 nScript ) const; - void PutItemForScriptType( USHORT nScriptType, const SfxPoolItem& rItem ); + void PutItemForScriptType( sal_uInt16 nScriptType, const SfxPoolItem& rItem ); - static void GetWhichIds( USHORT nSlotId, const SfxItemSet& rSet, USHORT& rLatin, USHORT& rAsian, USHORT& rComplex); + static void GetWhichIds( sal_uInt16 nSlotId, const SfxItemSet& rSet, sal_uInt16& rLatin, sal_uInt16& rAsian, sal_uInt16& rComplex); - void GetWhichIds( USHORT& rLatin, USHORT& rAsian, USHORT& rComplex) const; + void GetWhichIds( sal_uInt16& rLatin, sal_uInt16& rAsian, sal_uInt16& rComplex) const; - static void GetSlotIds( USHORT nSlotId, USHORT& rLatin, USHORT& rAsian, - USHORT& rComplex ); - inline void GetSlotIds( USHORT& rLatin, USHORT& rAsian, - USHORT& rComplex ) const + static void GetSlotIds( sal_uInt16 nSlotId, sal_uInt16& rLatin, sal_uInt16& rAsian, + sal_uInt16& rComplex ); + inline void GetSlotIds( sal_uInt16& rLatin, sal_uInt16& rAsian, + sal_uInt16& rComplex ) const { GetSlotIds( Which(), rLatin, rAsian, rComplex ); } }; diff --git a/editeng/inc/editeng/shaditem.hxx b/editeng/inc/editeng/shaditem.hxx index 1ecaa39917..570c86f336 100644 --- a/editeng/inc/editeng/shaditem.hxx +++ b/editeng/inc/editeng/shaditem.hxx @@ -42,34 +42,34 @@ namespace rtl // class SvxShadowItem --------------------------------------------------- -/* [Beschreibung] +/* [Description] - Dieses Item beschreibt ein Schattenattribut (Farbe, Breite, Lage). + This item describes the shadow attribute (color, width and position). */ -#define SHADOW_TOP ((USHORT)0) -#define SHADOW_BOTTOM ((USHORT)1) -#define SHADOW_LEFT ((USHORT)2) -#define SHADOW_RIGHT ((USHORT)3) +#define SHADOW_TOP ((sal_uInt16)0) +#define SHADOW_BOTTOM ((sal_uInt16)1) +#define SHADOW_LEFT ((sal_uInt16)2) +#define SHADOW_RIGHT ((sal_uInt16)3) class EDITENG_DLLPUBLIC SvxShadowItem : public SfxEnumItemInterface { Color aShadowColor; - USHORT nWidth; + sal_uInt16 nWidth; SvxShadowLocation eLocation; public: TYPEINFO(); - SvxShadowItem( const USHORT nId , - const Color *pColor = 0, const USHORT nWidth = 100 /*5pt*/, + SvxShadowItem( const sal_uInt16 nId , + const Color *pColor = 0, const sal_uInt16 nWidth = 100 /*5pt*/, const SvxShadowLocation eLoc = SVX_SHADOW_NONE ); inline SvxShadowItem& operator=( const SvxShadowItem& rFmtShadow ); - // "pure virtual Methoden" vom SfxPoolItem + // "pure virtual Methods" from SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -77,27 +77,27 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; - virtual bool ScaleMetrics( long nMult, long nDiv ); - virtual bool HasMetrics() const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const; + virtual bool ScaleMetrics( long nMult, long nDiv ); + virtual bool HasMetrics() const; const Color& GetColor() const { return aShadowColor;} void SetColor( const Color &rNew ) { aShadowColor = rNew; } - USHORT GetWidth() const { return nWidth; } + sal_uInt16 GetWidth() const { return nWidth; } SvxShadowLocation GetLocation() const { return eLocation; } - void SetWidth( USHORT nNew ) { nWidth = nNew; } + void SetWidth( sal_uInt16 nNew ) { nWidth = nNew; } void SetLocation( SvxShadowLocation eNew ) { eLocation = eNew; } - //Breite des Schattens auf der jeweiligen Seite berechnen. - USHORT CalcShadowSpace( USHORT nShadow ) const; + // Calculate width of the shadow on the page. + sal_uInt16 CalcShadowSpace( sal_uInt16 nShadow ) const; - virtual USHORT GetValueCount() const; - virtual String GetValueTextByPos( USHORT nPos ) const; - virtual USHORT GetEnumValue() const; - virtual void SetEnumValue( USHORT nNewVal ); + virtual sal_uInt16 GetValueCount() const; + virtual String GetValueTextByPos( sal_uInt16 nPos ) const; + virtual sal_uInt16 GetEnumValue() const; + virtual void SetEnumValue( sal_uInt16 nNewVal ); }; inline SvxShadowItem &SvxShadowItem::operator=( const SvxShadowItem& rFmtShadow ) diff --git a/editeng/inc/editeng/shdditem.hxx b/editeng/inc/editeng/shdditem.hxx index ec47d7e4e5..01019debc1 100644 --- a/editeng/inc/editeng/shdditem.hxx +++ b/editeng/inc/editeng/shdditem.hxx @@ -41,9 +41,9 @@ namespace rtl // class SvxShadowedItem ------------------------------------------------- -/* - [Beschreibung] - Dieses Item beschreibt, ob und wie schattiert ist. +/* [Description] + + This item describes, whether and how it is shaded. */ class EDITENG_DLLPUBLIC SvxShadowedItem : public SfxBoolItem @@ -51,13 +51,13 @@ class EDITENG_DLLPUBLIC SvxShadowedItem : public SfxBoolItem public: TYPEINFO(); - SvxShadowedItem( const BOOL bShadowed /*= FALSE*/, - const USHORT nId ); + SvxShadowedItem( const sal_Bool bShadowed /*= sal_False*/, + const sal_uInt16 nId ); - // "pure virtual Methoden" vom SfxPoolItem + // "pure virtual Methods" from SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, diff --git a/editeng/inc/editeng/sizeitem.hxx b/editeng/inc/editeng/sizeitem.hxx index a3b71805c7..967995e68c 100644 --- a/editeng/inc/editeng/sizeitem.hxx +++ b/editeng/inc/editeng/sizeitem.hxx @@ -36,9 +36,9 @@ // class SvxSizeItem ----------------------------------------------------- -/* -[Beschreibung] -Dieses Item beschreibt eine zweidimensionale Groesse (Size). +/* [Description] + + This item describes a two-dimensional size. */ class EDITENG_DLLPUBLIC SvxSizeItem : public SfxPoolItem @@ -49,15 +49,15 @@ class EDITENG_DLLPUBLIC SvxSizeItem : public SfxPoolItem public: TYPEINFO(); - SvxSizeItem( const USHORT nId ); - SvxSizeItem( const USHORT nId, const Size& rSize); + SvxSizeItem( const sal_uInt16 nId ); + SvxSizeItem( const sal_uInt16 nId, const Size& rSize); inline SvxSizeItem& operator=( const SvxSizeItem &rCpy ); - // "pure virtual Methoden" vom SfxPoolItem + // "pure virtual Methods" from SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -65,10 +65,10 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; - virtual bool ScaleMetrics( long nMult, long nDiv ); - virtual bool HasMetrics() const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const; + virtual bool ScaleMetrics( long nMult, long nDiv ); + virtual bool HasMetrics() const; const Size& GetSize() const { return aSize; } void SetSize(const Size& rSize) { aSize = rSize; } diff --git a/editeng/inc/editeng/spltitem.hxx b/editeng/inc/editeng/spltitem.hxx index 311f0e14f0..4b3c0c6d27 100644 --- a/editeng/inc/editeng/spltitem.hxx +++ b/editeng/inc/editeng/spltitem.hxx @@ -41,9 +41,9 @@ namespace rtl // class SvxFmtSplitItem ------------------------------------------------- -/* -[Beschreibung] -Dieses Item beschreibt eine logische Variable "Absatz trennen ja oder nein". +/* [Description] + + This item describes a logical variable "split paragraph yes or no". */ class EDITENG_DLLPUBLIC SvxFmtSplitItem : public SfxBoolItem @@ -52,14 +52,14 @@ public: TYPEINFO(); ~SvxFmtSplitItem(); - inline SvxFmtSplitItem( const BOOL bSplit /*= TRUE*/, - const USHORT nWh ); + inline SvxFmtSplitItem( const sal_Bool bSplit /*= sal_True*/, + const sal_uInt16 nWh ); inline SvxFmtSplitItem& operator=( const SvxFmtSplitItem& rSplit ); - // "pure virtual Methoden" vom SfxPoolItem + // "pure virtual Methods" from SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create( SvStream&, USHORT ) const; - virtual SvStream& Store( SvStream& , USHORT nItemVersion ) const; + virtual SfxPoolItem* Create( SvStream&, sal_uInt16 ) const; + virtual SvStream& Store( SvStream& , sal_uInt16 nItemVersion ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -67,7 +67,7 @@ public: String &rText, const IntlWrapper * = 0 ) const; }; -inline SvxFmtSplitItem::SvxFmtSplitItem( const BOOL bSplit, const USHORT nWh ) : +inline SvxFmtSplitItem::SvxFmtSplitItem( const sal_Bool bSplit, const sal_uInt16 nWh ) : SfxBoolItem( nWh, bSplit ) {} diff --git a/editeng/inc/editeng/splwrap.hxx b/editeng/inc/editeng/splwrap.hxx index 67d03a7b77..bc45535d96 100644 --- a/editeng/inc/editeng/splwrap.hxx +++ b/editeng/inc/editeng/splwrap.hxx @@ -50,7 +50,7 @@ class Window; void EDITENG_DLLPUBLIC SvxPrepareAutoCorrect( String &rOldText, String &rNewText ); /*-------------------------------------------------------------------- - Beschreibung: Der SpellWrapper + Description: The SpellWrapper --------------------------------------------------------------------*/ class EDITENG_DLLPUBLIC SvxSpellWrapper { @@ -66,21 +66,21 @@ private: ::com::sun::star::linguistic2::XSpellChecker1 > xSpell; ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XHyphenator > xHyph; - sal_uInt16 nOldLang; // Sprache merken, nur bei Aenderung SetLanguage rufen - sal_Bool bOtherCntnt : 1; // gesetzt => Sonderbereiche zunaechst pruefen - sal_Bool bDialog : 1; // Ist pWin der Svx...Dialog? - sal_Bool bHyphen : 1; // Trennen statt Spellen - sal_Bool bAuto : 1; // Autokorrektur vorhanden? - sal_Bool bReverse : 1; // Rueckwaerts Spellen - sal_Bool bStartDone : 1; // Vorderen Teil bereits korrigiert - sal_Bool bEndDone : 1; // Hinteren Teil bereits korrigiert - sal_Bool bStartChk : 1; // Vorderen Teil pruefen - sal_Bool bRevAllowed : 1; // Niemals rueckwaerts spellen - sal_Bool bAllRight : 1; // falsche Woerter in geignetes Woerterbuch - // aufnehmen und nicht den Dialog starten. - - EDITENG_DLLPRIVATE sal_Bool SpellNext(); // naechsten Bereich anwaehlen - sal_Bool FindSpellError(); // Suche nach Fehlern ( ueber Bereiche hinweg ) + sal_uInt16 nOldLang; // Set Language, only call SetLanguage on changes + sal_Bool bOtherCntnt : 1; // set => Check special sections initially + sal_Bool bDialog : 1; // Is pWin the Svx...Dialog? + sal_Bool bHyphen : 1; // Split instead of spell checking + sal_Bool bAuto : 1; // AutoCorrect available? + sal_Bool bReverse : 1; // Reverse spell check + sal_Bool bStartDone : 1; // Beginning already corrected + sal_Bool bEndDone : 1; // End part already corrected + sal_Bool bStartChk : 1; // Examine the beginning + sal_Bool bRevAllowed : 1; // Reverse spell check prohibited + sal_Bool bAllRight : 1; // Record wrong words in the dedicated + // dictionary and do not start the dialog. + + EDITENG_DLLPRIVATE sal_Bool SpellNext(); // select next area + sal_Bool FindSpellError(); // Check for errors (over areas) public: SvxSpellWrapper( Window* pWn, @@ -106,12 +106,12 @@ public: static void ShowLanguageErrors(); - void SpellDocument(); // Rechtschreibpruefung durchfuehren + void SpellDocument(); // Perform Spell Checking inline sal_Bool IsStartDone(){ return bStartDone; } inline sal_Bool IsEndDone(){ return bEndDone; } inline sal_Bool IsReverse(){ return bReverse; } inline sal_Bool IsDialog(){ return bDialog; } // SvxSpellCheckDialog OnScreen - inline sal_Bool IsHyphen(){ return bHyphen; } // Trennen statt Spellen + inline sal_Bool IsHyphen(){ return bHyphen; } // Split instead of Spell check inline void SetHyphen( const sal_Bool bNew = sal_True ){ bHyphen = bNew; } inline ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XSpellChecker1 > @@ -121,10 +121,10 @@ public: GetXHyphenator() { return xHyph; } inline sal_Bool IsAllRight() { return bAllRight; } inline Window* GetWin() { return pWin; } - // kann evtl entfallen in ONE_LINGU: + // can possibly be omitted in ONE_LINGU: inline void SetOldLang( const sal_uInt16 nNew ){ nOldLang = nNew; } - // kann evtl entfallen in ONE_LINGU: - inline void ChangeLanguage( const sal_uInt16 nNew ) // rufe ggf. SetLanguage + // can possibly be omitted in ONE_LINGU: + inline void ChangeLanguage( const sal_uInt16 nNew ) // call SetLanguage if needed. { if ( nNew != nOldLang ) { SetLanguage( nNew ); nOldLang = nNew; } } inline void EnableAutoCorrect() { bAuto = sal_True; } @@ -135,26 +135,26 @@ protected: void SetLast(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > &xNewLast) { xLast = xNewLast; } - virtual sal_Bool SpellMore(); // weitere Dokumente pruefen? - virtual sal_Bool HasOtherCnt(); // gibt es ueberhaupt Sonderbereiche - virtual void SpellStart( SvxSpellArea eSpell ); // Bereich vorbereiten - virtual sal_Bool SpellContinue(); // Bereich pruefen - // Ergebnis mit GetLast verfuegbar - virtual void ReplaceAll( const String &rNewText, sal_Int16 nLanguage ); // Wort aus Replace-Liste ersetzen - virtual void StartThesaurus( const String &rWord, sal_uInt16 nLang ); // Thesaurus starten + virtual sal_Bool SpellMore(); // examine further documents? + virtual sal_Bool HasOtherCnt(); // Are there any special areas? + virtual void SpellStart( SvxSpellArea eSpell ); // Preparing the area + virtual sal_Bool SpellContinue(); // Check Areas + // Result avaliable through GetLast + virtual void ReplaceAll( const String &rNewText, sal_Int16 nLanguage ); //Replace word from the replace list + virtual void StartThesaurus( const String &rWord, sal_uInt16 nLang ); virtual ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XDictionary > GetAllRightDic() const; - virtual void SpellEnd(); // Bereich abschliessen - virtual void ScrollArea(); // ScrollArea einstellen - // Wort ersetzen + virtual void SpellEnd(); // Finish area + virtual void ScrollArea(); // Set ScrollArea + // Replace word virtual void ChangeWord( const String& rNewWord, const sal_uInt16 nLang ); virtual String GetThesWord(); // Wort via Thesaurus ersetzen virtual void ChangeThesWord( const String& rNewWord ); - virtual void SetLanguage( const sal_uInt16 nLang ); // Sprache aendern + virtual void SetLanguage( const sal_uInt16 nLang ); // Change Language virtual void AutoCorrect( const String& rAktStr, const String& rNewStr ); - virtual void InsertHyphen( const sal_uInt16 nPos ); // Hyphen einfuegen + virtual void InsertHyphen( const sal_uInt16 nPos ); // Insert hyphen }; diff --git a/editeng/inc/editeng/svxacorr.hxx b/editeng/inc/editeng/svxacorr.hxx index fe8b7ca4ba..3f2ae90c56 100644 --- a/editeng/inc/editeng/svxacorr.hxx +++ b/editeng/inc/editeng/svxacorr.hxx @@ -50,82 +50,81 @@ class SotStorageRef; class SotStorage; class Window; -// Flags fuer die AutoKorrekt-Flags -const long CptlSttSntnc = 0x00000001; // Gross-Buchstaben am SatzAnfang -const long CptlSttWrd = 0x00000002; // keine 2 Gr.-Buchst. am WordAnfang +// Auto correct flags +const long CptlSttSntnc = 0x00000001; // Capital letters at the beginning of a sentence +const long CptlSttWrd = 0x00000002; // not two Capital letters at the beginning of a word const long AddNonBrkSpace = 0x00000004; // Add non breaking space before :;?! const long ChgOrdinalNumber = 0x00000008; // Ordinal-Number 1st, 2nd,.. const long ChgToEnEmDash = 0x00000010; // - -> Endash/Emdash -const long ChgWeightUnderl = 0x00000020; // * -> Fett, _ -> unterstreichen -const long SetINetAttr = 0x00000040; // INetAttribut setzen -const long Autocorrect = 0x00000080; // Autokorrektur aufrufen -const long ChgQuotes = 0x00000100; // doppelte Quotes ersetzen -const long SaveWordCplSttLst= 0x00000200; // GrB. am SatzAnf. auto. aufnehmen -const long SaveWordWrdSttLst= 0x00000400; // 2 GrB. am WortAnf. auto. aufnehmen -const long IgnoreDoubleSpace= 0x00000800; // 2 Spaces ignorieren -const long ChgSglQuotes = 0x00001000; // einfache Quotes ersetzen +const long ChgWeightUnderl = 0x00000020; // * -> Bold, _ -> Underscore +const long SetINetAttr = 0x00000040; // Set INetAttribut +const long Autocorrect = 0x00000080; // Call AutoCorrect +const long ChgQuotes = 0x00000100; // replace double quotes +const long SaveWordCplSttLst= 0x00000200; // Save Auto correction of Capital letter at beginning of sentence. +const long SaveWordWrdSttLst= 0x00000400; // Save Auto correction of 2 Capital letter at beginning of word. +const long IgnoreDoubleSpace= 0x00000800; // Ignore 2 Spaces +const long ChgSglQuotes = 0x00001000; // Replace simple quotes const long CorrectCapsLock = 0x00002000; // Correct accidental use of cAPS LOCK key -const long ChgWordLstLoad = 0x20000000; // Ersetzungsliste geladen -const long CplSttLstLoad = 0x40000000; // Exceptionlist fuer CplStart geladen -const long WrdSttLstLoad = 0x80000000; // Exceptionlist fuer WordStart geladen +const long ChgWordLstLoad = 0x20000000; // Replacement list loaded +const long CplSttLstLoad = 0x40000000; // Exception list for Capital letters Start loaded +const long WrdSttLstLoad = 0x80000000; // Exception list for Word Start loaded // TODO: handle unicodes > U+FFFF and check users of this class -// nur eine Mappingklasse +// only a mapping class class EDITENG_DLLPUBLIC SvxAutoCorrDoc { public: SvxAutoCorrDoc() {} virtual ~SvxAutoCorrDoc(); - virtual BOOL Delete( xub_StrLen nStt, xub_StrLen nEnd ) = 0; - virtual BOOL Insert( xub_StrLen nPos, const String& rTxt ) = 0; - virtual BOOL Replace( xub_StrLen nPos, const String& rTxt ) = 0; + virtual sal_Bool Delete( xub_StrLen nStt, xub_StrLen nEnd ) = 0; + virtual sal_Bool Insert( xub_StrLen nPos, const String& rTxt ) = 0; + virtual sal_Bool Replace( xub_StrLen nPos, const String& rTxt ) = 0; + virtual sal_Bool ReplaceRange( xub_StrLen nPos, xub_StrLen nLen, const String& rTxt ) = 0; - virtual BOOL SetAttr( xub_StrLen nStt, xub_StrLen nEnd, USHORT nSlotId, + virtual sal_Bool SetAttr( xub_StrLen nStt, xub_StrLen nEnd, sal_uInt16 nSlotId, SfxPoolItem& ) = 0; - virtual BOOL SetINetAttr( xub_StrLen nStt, xub_StrLen nEnd, const String& rURL ) = 0; + virtual sal_Bool SetINetAttr( xub_StrLen nStt, xub_StrLen nEnd, const String& rURL ) = 0; - // returne den Text eines vorherigen Absatzes. - // Dieser darf nicht leer sein! - // Gibt es diesen nicht oder gibt es davor nur Leere, dann returne 0 - // Das Flag gibt an: - // TRUE: den, vor der normalen Einfuegeposition (TRUE) - // FALSE: den, in den das korrigierte Wort eingfuegt wurde. - // (Muss nicht der gleiche Absatz sein!!!!) - virtual const String* GetPrevPara( BOOL bAtNormalPos ) = 0; + // Return the text of a previous paragraph. This must not be empty! + // If no paragraph exits or just an empty one, then return 0. + // The flag indicates: + // TRUE: before the normal insertion position (TRUE) + // FALSE: in which the corrected word was inserted. + // (Does not to have to be the same paragraph !!!!) + virtual const String* GetPrevPara( sal_Bool bAtNormalPos ) = 0; - virtual BOOL ChgAutoCorrWord( xub_StrLen& rSttPos, xub_StrLen nEndPos, + virtual sal_Bool ChgAutoCorrWord( xub_StrLen& rSttPos, xub_StrLen nEndPos, SvxAutoCorrect& rACorrect, const String** ppPara ) = 0; - // wird nach dem austauschen der Zeichen von den Funktionen + // Is called after the change of the signs by the functions // - FnCptlSttWrd // - FnCptlSttSntnc - // gerufen. Dann koennen die Worte ggfs. in die Ausnahmelisten - // aufgenommen werden. - virtual void SaveCpltSttWord( ULONG nFlag, xub_StrLen nPos, + // As an option, the words can then be inserted into the exception lists. + virtual void SaveCpltSttWord( sal_uLong nFlag, xub_StrLen nPos, const String& rExceptWord, sal_Unicode cChar ); - // welche Sprache gilt an der Position? - virtual LanguageType GetLanguage( xub_StrLen nPos, BOOL bPrevPara = FALSE ) const; + // which language at the position? + virtual LanguageType GetLanguage( xub_StrLen nPos, sal_Bool bPrevPara = sal_False ) const; }; class EDITENG_DLLPUBLIC SvxAutocorrWord { String sShort, sLong; - BOOL bIsTxtOnly; // ist reiner ASCII - Text + sal_Bool bIsTxtOnly; // Is pure ASCII - Text public: - SvxAutocorrWord( const String& rS, const String& rL, BOOL bFlag = TRUE ) + SvxAutocorrWord( const String& rS, const String& rL, sal_Bool bFlag = sal_True ) : sShort( rS ), sLong( rL ), bIsTxtOnly( bFlag ) {} const String& GetShort() const { return sShort; } const String& GetLong() const { return sLong; } - BOOL IsTextOnly() const { return bIsTxtOnly; } + sal_Bool IsTextOnly() const { return bIsTxtOnly; } }; typedef SvxAutocorrWord* SvxAutocorrWordPtr; @@ -134,11 +133,11 @@ SV_DECL_PTRARR_SORT_DEL_VISIBILITY( SvxAutocorrWordList, SvxAutocorrWordPtr, 10, class EDITENG_DLLPUBLIC SvxAutoCorrectLanguageLists { String sShareAutoCorrFile, sUserAutoCorrFile; - // falls die AutoCorr Datei neuer ist + // If the AutoCorr file is newer Date aModifiedDate; Time aModifiedTime, aLastCheckTime; - LanguageType eLanguage; //LANGUAGE_DONTKNOW fuer alle Sprachen verwenden + LanguageType eLanguage; //LANGUAGE_DONTKNOW use for all languages SvStringsISortDtor* pCplStt_ExcptLst; SvStringsISortDtor* pWrdStt_ExcptLst; SvxAutocorrWordList* pAutocorr_List; @@ -146,16 +145,16 @@ class EDITENG_DLLPUBLIC SvxAutoCorrectLanguageLists long nFlags; - BOOL IsFileChanged_Imp(); + sal_Bool IsFileChanged_Imp(); void LoadXMLExceptList_Imp( SvStringsISortDtor*& rpLst, const sal_Char* pStrmName, SotStorageRef& rStg); void SaveExceptList_Imp( const SvStringsISortDtor& rLst, const sal_Char* pStrmName, SotStorageRef& rStg, - BOOL bConvert = FALSE); + sal_Bool bConvert = sal_False); - BOOL MakeBlocklist_Imp( SotStorage& rStg ); + sal_Bool MakeBlocklist_Imp( SotStorage& rStg ); void RemoveStream_Imp( const String& rName ); void MakeUserStorage_Impl(); @@ -166,36 +165,36 @@ public: LanguageType eLang); ~SvxAutoCorrectLanguageLists(); - // Lade, Setze, Gebe - die Ersetzungsliste + // Load, Set, Get - the replacement list SvxAutocorrWordList* LoadAutocorrWordList(); void SetAutocorrWordList( SvxAutocorrWordList* pList ); const SvxAutocorrWordList* GetAutocorrWordList(); - // Lade, Setze, Gebe - die Ausnahmeliste fuer Grossbuchstabe am - // Satzanfang + // Load, Set, Get - the exception list for Capital letter at the + // beginning of a sentence SvStringsISortDtor* LoadCplSttExceptList(); void SaveCplSttExceptList(); void SetCplSttExceptList( SvStringsISortDtor* pList ); SvStringsISortDtor* GetCplSttExceptList(); - BOOL AddToCplSttExceptList(const String& rNew); + sal_Bool AddToCplSttExceptList(const String& rNew); - // Lade, Setze, Gebe die Ausnahmeliste fuer 2 Grossbuchstaben am - // Wortanfang + // Load, Set, Get the exception list for 2 Capital letters at the + // begining of a word. SvStringsISortDtor* LoadWrdSttExceptList(); void SaveWrdSttExceptList(); void SetWrdSttExceptList( SvStringsISortDtor* pList ); SvStringsISortDtor* GetWrdSttExceptList(); - BOOL AddToWrdSttExceptList(const String& rNew); - - // Speichern von Wortersetzungen: - // Diese speichern direkt im Storage. Die Wortliste wird - // entsprechend aktualisiert! - // - purer Text - BOOL PutText( const String& rShort, const String& rLong ); - // - Text mit Attributierung (kann nur der SWG - SWG-Format!) - BOOL PutText( const String& rShort, SfxObjectShell& ); - // - loesche einen Eintrag - BOOL DeleteText( const String& rShort ); + sal_Bool AddToWrdSttExceptList(const String& rNew); + + // Save word substitutions: + // Store these directly in the storage. The word list is updated + // accordingly! + // - pure Text + sal_Bool PutText( const String& rShort, const String& rLong ); + // - Text with attribution (only the SWG - SWG format!) + sal_Bool PutText( const String& rShort, SfxObjectShell& ); + // - Deleting an entry + sal_Bool DeleteText( const String& rShort ); }; @@ -205,9 +204,9 @@ class EDITENG_DLLPUBLIC SvxAutoCorrect String sShareAutoCorrFile, sUserAutoCorrFile; - SvxSwAutoFmtFlags aSwFlags; // StarWriter AutoFormat-Flags + SvxSwAutoFmtFlags aSwFlags; // StarWriter AutoFormat Flags - // alle Sprachen in einer Tabelle + // all languages in a table SvxAutoCorrLanguageTable_Impl* pLangTable; SvxAutoCorrLastFileAskTable_Impl* pLastFileTable; CharClass* pCharClass; @@ -227,21 +226,21 @@ class EDITENG_DLLPUBLIC SvxAutoCorrect void _GetCharClass( LanguageType eLang ); protected: - // - Text mit Attributierung (kann nur der SWG - SWG-Format!) - // rShort ist der Stream-Name - gecryptet! - virtual BOOL PutText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rStg, const String& rFileName, const String& rShort, SfxObjectShell& , + // - Text with attribution (only the SWG - SWG format!) + // rShort is the stream name - encrypted! + virtual sal_Bool PutText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rStg, const String& rFileName, const String& rShort, SfxObjectShell& , String& ); - // geforderte Sprache in die Tabelle eintragen gfs. nur wenn das file existiert - BOOL CreateLanguageFile(LanguageType eLang, BOOL bNewFile = TRUE); - // - return den Ersetzungstext (nur fuer SWG-Format, alle anderen - // koennen aus der Wortliste herausgeholt werden!) - // rShort ist der Stream-Name - gecryptet! + // required language in the table add if possible only when the file exists + sal_Bool CreateLanguageFile(LanguageType eLang, sal_Bool bNewFile = sal_True); + // - Return the replacement text (only for SWG format, all others can be + // taken from the word list!) + // rShort is the stream name - encrypted! public: - sal_Unicode GetQuote( sal_Unicode cInsChar, BOOL bSttQuote, + sal_Unicode GetQuote( sal_Unicode cInsChar, sal_Bool bSttQuote, LanguageType eLang ) const; - virtual BOOL GetLongText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rStg, const String& rFileName, const String& rShort, String& rLong ); + virtual sal_Bool GetLongText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rStg, const String& rFileName, const String& rShort, String& rLong ); TYPEINFO(); @@ -250,28 +249,28 @@ public: SvxAutoCorrect( const SvxAutoCorrect& ); virtual ~SvxAutoCorrect(); - // fuehre eine AutoKorrektur aus. - // returnt was ausgefuehrt wurde; entsprechend den obigen Flags - ULONG AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt, - xub_StrLen nPos, sal_Unicode cInsChar, BOOL bInsert, Window* pFrameWin = NULL ); + // Execute an AutoCorrect. + // Returns what has been executed, according to the above flags + sal_uLong AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt, + xub_StrLen nPos, sal_Unicode cInsChar, sal_Bool bInsert, Window* pFrameWin = NULL ); - // return fuer die Autotext Expandierung das vorherige Wort, was dem - // AutoCorrect - Algorythmus entspricht. - BOOL GetPrevAutoCorrWord( SvxAutoCorrDoc& rDoc, const String& rTxt, + // Return for the autotext expansion the previous word, + // AutoCorrect - corresponding algorithm + sal_Bool GetPrevAutoCorrWord( SvxAutoCorrDoc& rDoc, const String& rTxt, xub_StrLen nPos, String& rWord ) const; - // suche das oder die Worte in der ErsetzungsTabelle. - // rText - ueberpruefe in diesem Text die Worte der Liste - // rStt - die gefundene Startposition - // nEnd - zu ueberpruefende Position - ab dieser Pos nach vorne - // rLang - Input: in welcher Sprache wird gesucht - // Output: in welcher "Sprach-Liste" wurde es gefunden + // Search for or or the words in the replacement table. + // rText - check in this text the words of the list + // rStt - the detected starting position + // nEnd - to check position - as of this item forward + // rLang - Input: in which language is searched + // Output: in which "language list" was it found const SvxAutocorrWord* SearchWordsInList( const String& rTxt, xub_StrLen& rStt, xub_StrLen nEndPos, SvxAutoCorrDoc& rDoc, LanguageType& rLang ); - // erfrage / setze die Zeichen fuer die Quote-Ersetzung + // Query/Set the Character for the Quote substitution sal_Unicode GetStartSingleQuote() const { return cStartSQuote; } sal_Unicode GetEndSingleQuote() const { return cEndSQuote; } sal_Unicode GetStartDoubleQuote() const { return cStartDQuote; } @@ -283,26 +282,26 @@ public: void SetEndDoubleQuote( const sal_Unicode cEnd ) { cEndDQuote = cEnd; } String GetQuote( SvxAutoCorrDoc& rDoc, xub_StrLen nInsPos, - sal_Unicode cInsChar, BOOL bSttQuote ); + sal_Unicode cInsChar, sal_Bool bSttQuote ); void InsertQuote( SvxAutoCorrDoc& rDoc, xub_StrLen nInsPos, - sal_Unicode cInsChar, BOOL bSttQuote, BOOL bIns ); + sal_Unicode cInsChar, sal_Bool bSttQuote, sal_Bool bIns ); - // erfrage / setze den Namen der AutoKorrektur-Datei - // defaultet auf "autocorr.dat" + // Query/Set the name of the AutoCorrect file + // the default is "autocorr.dat" String GetAutoCorrFileName( LanguageType eLang = LANGUAGE_SYSTEM, - BOOL bNewFile = FALSE, - BOOL bTstUserExist = FALSE ) const; + sal_Bool bNewFile = sal_False, + sal_Bool bTstUserExist = sal_False ) const; void SetUserAutoCorrFileName( const String& rNew ); void SetShareAutoCorrFileName( const String& rNew ); - // erfrage / setze die aktuellen Einstellungen der AutoKorrektur + // Query/Set the current settings of AutoCorrect long GetFlags() const { return nFlags; } inline SvxSwAutoFmtFlags& GetSwFlags() { return aSwFlags;} - BOOL IsAutoCorrFlag( long nFlag ) const - { return nFlags & nFlag ? TRUE : FALSE; } - void SetAutoCorrFlag( long nFlag, BOOL bOn = TRUE ); + sal_Bool IsAutoCorrFlag( long nFlag ) const + { return nFlags & nFlag ? sal_True : sal_False; } + void SetAutoCorrFlag( long nFlag, sal_Bool bOn = sal_True ); - // Lade, Setze, Gebe - die Ersetzungsliste + // Load, Set, Get - the replacement list SvxAutocorrWordList* LoadAutocorrWordList( LanguageType eLang = LANGUAGE_SYSTEM ) { return _GetLanguageList( eLang ).LoadAutocorrWordList(); } @@ -310,21 +309,21 @@ public: LanguageType eLang = LANGUAGE_SYSTEM ) { return _GetLanguageList( eLang ).GetAutocorrWordList(); } - // Speichern von Wortersetzungen: - // Diese speichern direkt im Storage. Die Wortliste wird - // entsprechend aktualisiert! - // - purer Text - BOOL PutText( const String& rShort, const String& rLong, LanguageType eLang = LANGUAGE_SYSTEM ); - // - Text mit Attributierung (kann nur der SWG - SWG-Format!) - BOOL PutText( const String& rShort, SfxObjectShell& rShell, + // Save word substitutions: + // Save these directly in the storage. The word list is updated + // accordingly! + // - pure Text + sal_Bool PutText( const String& rShort, const String& rLong, LanguageType eLang = LANGUAGE_SYSTEM ); + // - Text with attribution (only in the SWG - SWG format!) + sal_Bool PutText( const String& rShort, SfxObjectShell& rShell, LanguageType eLang = LANGUAGE_SYSTEM ) { return _GetLanguageList( eLang ).PutText(rShort, rShell ); } - // - loesche einen Eintrag - BOOL DeleteText( const String& rShort, LanguageType eLang = LANGUAGE_SYSTEM); + // - Delete a entry + sal_Bool DeleteText( const String& rShort, LanguageType eLang = LANGUAGE_SYSTEM); - // Lade, Setze, Gebe - die Ausnahmeliste fuer Grossbuchstabe am - // Satzanfang + // Load, Set, Get - the exception list for capital letters at the + // beginning of a sentence void SaveCplSttExceptList( LanguageType eLang = LANGUAGE_SYSTEM ); SvStringsISortDtor* LoadCplSttExceptList( LanguageType eLang = LANGUAGE_SYSTEM) @@ -333,13 +332,12 @@ public: LanguageType eLang = LANGUAGE_SYSTEM ) { return _GetLanguageList( eLang ).GetCplSttExceptList(); } - // fuegt ein einzelnes Wort hinzu. Die Liste wird sofort - // in die Datei geschrieben! - BOOL AddCplSttException( const String& rNew, + // Adds a single word. The list will be immediately written to the file! + sal_Bool AddCplSttException( const String& rNew, LanguageType eLang = LANGUAGE_SYSTEM ); - // Lade, Setze, Gebe die Ausnahmeliste fuer 2 Grossbuchstaben am - // Wortanfang + // Load, Set, Get the exception list for 2 Capital letters at the + // beginning of a word. void SaveWrdSttExceptList( LanguageType eLang = LANGUAGE_SYSTEM ); SvStringsISortDtor* LoadWrdSttExceptList( LanguageType eLang = LANGUAGE_SYSTEM ) @@ -347,35 +345,34 @@ public: const SvStringsISortDtor* GetWrdSttExceptList( LanguageType eLang = LANGUAGE_SYSTEM ) { return _GetLanguageList( eLang ).GetWrdSttExceptList(); } - // fuegt ein einzelnes Wort hinzu. Die Liste wird sofort - // in die Datei geschrieben! - BOOL AddWrtSttException( const String& rNew, LanguageType eLang = LANGUAGE_SYSTEM); + // Adds a single word. The list will be immediately written to the file! + sal_Bool AddWrtSttException( const String& rNew, LanguageType eLang = LANGUAGE_SYSTEM); - //ueber die Sprachen nach dem Eintrag suchen - BOOL FindInWrdSttExceptList( LanguageType eLang, const String& sWord ); - BOOL FindInCplSttExceptList( LanguageType eLang, const String& sWord, - BOOL bAbbreviation = FALSE); + // Search through the Languages for the entry + sal_Bool FindInWrdSttExceptList( LanguageType eLang, const String& sWord ); + sal_Bool FindInCplSttExceptList( LanguageType eLang, const String& sWord, + sal_Bool bAbbreviation = sal_False); - // die einzelnen Methoden fuer die Autokorrektur - BOOL FnCptlSttWrd( SvxAutoCorrDoc&, const String&, + // Methods for the auto-correction + sal_Bool FnCptlSttWrd( SvxAutoCorrDoc&, const String&, xub_StrLen nSttPos, xub_StrLen nEndPos, LanguageType eLang = LANGUAGE_SYSTEM ); - BOOL FnChgOrdinalNumber( SvxAutoCorrDoc&, const String&, + sal_Bool FnChgOrdinalNumber( SvxAutoCorrDoc&, const String&, xub_StrLen nSttPos, xub_StrLen nEndPos, LanguageType eLang = LANGUAGE_SYSTEM ); - BOOL FnChgToEnEmDash( SvxAutoCorrDoc&, const String&, + sal_Bool FnChgToEnEmDash( SvxAutoCorrDoc&, const String&, xub_StrLen nSttPos, xub_StrLen nEndPos, LanguageType eLang = LANGUAGE_SYSTEM ); - BOOL FnAddNonBrkSpace( SvxAutoCorrDoc&, const String&, + sal_Bool FnAddNonBrkSpace( SvxAutoCorrDoc&, const String&, xub_StrLen nSttPos, xub_StrLen nEndPos, LanguageType eLang = LANGUAGE_SYSTEM ); - BOOL FnSetINetAttr( SvxAutoCorrDoc&, const String&, + sal_Bool FnSetINetAttr( SvxAutoCorrDoc&, const String&, xub_StrLen nSttPos, xub_StrLen nEndPos, LanguageType eLang = LANGUAGE_SYSTEM ); - BOOL FnChgWeightUnderl( SvxAutoCorrDoc&, const String&, + sal_Bool FnChgWeightUnderl( SvxAutoCorrDoc&, const String&, xub_StrLen nSttPos, xub_StrLen nEndPos, LanguageType eLang = LANGUAGE_SYSTEM ); - BOOL FnCptlSttSntnc( SvxAutoCorrDoc&, const String&, BOOL bNormalPos, + sal_Bool FnCptlSttSntnc( SvxAutoCorrDoc&, const String&, sal_Bool bNormalPos, xub_StrLen nSttPos, xub_StrLen nEndPos, LanguageType eLang = LANGUAGE_SYSTEM); bool FnCorrectCapsLock( SvxAutoCorrDoc&, const String&, @@ -386,7 +383,7 @@ public: static long GetDefaultFlags(); -// returns TRUE for charcters where the function +// returns sal_True for charcters where the function // 'SvxAutoCorrect::AutoCorrect' should be called. // (used to avoid occasional 'collisions' with (Thai) input-sequence-checking) static sal_Bool IsAutoCorrectChar( sal_Unicode cChar ); diff --git a/editeng/inc/editeng/svxenum.hxx b/editeng/inc/editeng/svxenum.hxx index 37f0276aa1..f9305e0f76 100644 --- a/editeng/inc/editeng/svxenum.hxx +++ b/editeng/inc/editeng/svxenum.hxx @@ -202,23 +202,23 @@ enum SvxSpellArea enum SvxFrameAnchor { - SVX_FLY_AT_CNTNT, //Absatzgebundener Rahmen - SVX_FLY_IN_CNTNT, //Zeichengebundener Rahmen - SVX_FLY_PAGE //Seitengebundener Rahmen + SVX_FLY_AT_CNTNT, // Paragraph-based frame + SVX_FLY_IN_CNTNT, // Character-based frame + SVX_FLY_PAGE // Page-based frame }; enum SvxExtNumType { - SVX_NUM_CHARS_UPPER_LETTER, // zaehlt von a-z, aa - az, ba - bz, ... + SVX_NUM_CHARS_UPPER_LETTER, // Counts from a-z, aa - az, ba - bz, ... SVX_NUM_CHARS_LOWER_LETTER, SVX_NUM_ROMAN_UPPER, SVX_NUM_ROMAN_LOWER, SVX_NUM_ARABIC, SVX_NUM_NUMBER_NONE, - SVX_NUM_CHAR_SPECIAL, //Bullet - SVX_NUM_PAGEDESC, // Numerierung aus der Seitenvorlage + SVX_NUM_CHAR_SPECIAL, // Bullet + SVX_NUM_PAGEDESC, // Numbering from the page template SVX_NUM_BITMAP, - SVX_NUM_CHARS_UPPER_LETTER_N, // zaehlt von a-z, aa-zz, aaa-zzz + SVX_NUM_CHARS_UPPER_LETTER_N, // Counts from a-z, aa-zz, aaa-zzz SVX_NUM_CHARS_LOWER_LETTER_N }; diff --git a/editeng/inc/editeng/svxfont.hxx b/editeng/inc/editeng/svxfont.hxx index 120dd2c03c..fbfe9de3c8 100644 --- a/editeng/inc/editeng/svxfont.hxx +++ b/editeng/inc/editeng/svxfont.hxx @@ -34,6 +34,10 @@ #include <vcl/font.hxx> #include "editeng/editengdllapi.h" +// Percentage of height of lower case small capital letters compared to upper case letters +// See i#1526# for full explanation +#define SMALL_CAPS_PERCENTAGE 80 + class SvxDoCapitals; class OutputDevice; class Printer; @@ -41,9 +45,9 @@ class Printer; class EDITENG_DLLPUBLIC SvxFont : public Font { LanguageType eLang; // Language - SvxCaseMap eCaseMap; // Textauszeichnung - short nEsc; // Grad der Hoch-/Tiefstellung - BYTE nPropr; // Grad der Verkleinerung der Fonthoehe + SvxCaseMap eCaseMap; // Text Markup + short nEsc; // Degree of Superscript/Subscript + sal_uInt8 nPropr; // Degree of reduction of the font height short nKern; // Kerning in Pt public: @@ -51,14 +55,14 @@ public: SvxFont( const Font &rFont ); SvxFont( const SvxFont &rFont ); - // Methoden fuer die Hoch-/Tiefstellung + // Methods for Superscript/Subscript inline short GetEscapement() const { return nEsc; } inline void SetEscapement( const short nNewEsc ) { nEsc = nNewEsc; } - inline BYTE GetPropr() const { return nPropr; } - inline void SetPropr( const BYTE nNewPropr ) { nPropr = nNewPropr; } - inline void SetProprRel( const BYTE nNewPropr ) - { SetPropr( (BYTE)( (long)nNewPropr * (long)nPropr / 100L ) ); } + inline sal_uInt8 GetPropr() const { return nPropr; } + inline void SetPropr( const sal_uInt8 nNewPropr ) { nPropr = nNewPropr; } + inline void SetProprRel( const sal_uInt8 nNewPropr ) + { SetPropr( (sal_uInt8)( (long)nNewPropr * (long)nPropr / 100L ) ); } // Kerning inline short GetFixKerning() const { return nKern; } @@ -71,54 +75,53 @@ public: inline void SetLanguage( const LanguageType eNewLan ) { eLang = eNewLan; Font::SetLanguage(eNewLan); } - // Is-Methoden: - inline BOOL IsCaseMap() const { return SVX_CASEMAP_NOT_MAPPED != eCaseMap; } - inline BOOL IsCapital() const { return SVX_CASEMAP_KAPITAELCHEN == eCaseMap; } - inline BOOL IsKern() const { return 0 != nKern; } - inline BOOL IsEsc() const { return 0 != nEsc; } + // Is-Methods: + inline sal_Bool IsCaseMap() const { return SVX_CASEMAP_NOT_MAPPED != eCaseMap; } + inline sal_Bool IsCapital() const { return SVX_CASEMAP_KAPITAELCHEN == eCaseMap; } + inline sal_Bool IsKern() const { return 0 != nKern; } + inline sal_Bool IsEsc() const { return 0 != nEsc; } - // Versalien, Gemeine etc. beruecksichtigen + // Consider Upper case, Lower case letters etc. String CalcCaseMap( const String &rTxt ) const; -// Der folgende Bereich wird nicht von jedem benoetigt, er kann deshalb -// ausgeklammert werden. +// The following section is not needed by anyone, so it can be excluded. #ifndef REDUCEDSVXFONT - // Kapitaelchenbearbeitung + // Handle upper case letters void DoOnCapitals( SvxDoCapitals &rDo, - const USHORT nPartLen = USHRT_MAX ) const; + const sal_uInt16 nPartLen = USHRT_MAX ) const; void SetPhysFont( OutputDevice *pOut ) const; Font ChgPhysFont( OutputDevice *pOut ) const; Size GetCapitalSize( const OutputDevice *pOut, const String &rTxt, - const USHORT nIdx, const USHORT nLen) const; + const sal_uInt16 nIdx, const sal_uInt16 nLen) const; void DrawCapital( OutputDevice *pOut, const Point &rPos, const String &rTxt, - const USHORT nIdx, const USHORT nLen ) const; + const sal_uInt16 nIdx, const sal_uInt16 nLen ) const; Size GetPhysTxtSize( const OutputDevice *pOut, const String &rTxt, - const USHORT nIdx, const USHORT nLen ) const; + const sal_uInt16 nIdx, const sal_uInt16 nLen ) const; Size GetPhysTxtSize( const OutputDevice *pOut, const String &rTxt ); Size GetTxtSize( const OutputDevice *pOut, const String &rTxt, - const USHORT nIdx = 0, const USHORT nLen = STRING_LEN ); + const sal_uInt16 nIdx = 0, const sal_uInt16 nLen = STRING_LEN ); void DrawText( OutputDevice *pOut, const Point &rPos, const String &rTxt, - const USHORT nIdx = 0, const USHORT nLen = STRING_LEN ) const; + const sal_uInt16 nIdx = 0, const sal_uInt16 nLen = STRING_LEN ) const; void QuickDrawText( OutputDevice *pOut, const Point &rPos, const String &rTxt, - const USHORT nIdx = 0, const USHORT nLen = STRING_LEN, const sal_Int32* pDXArray = NULL ) const; + const sal_uInt16 nIdx = 0, const sal_uInt16 nLen = STRING_LEN, const sal_Int32* pDXArray = NULL ) const; Size QuickGetTextSize( const OutputDevice *pOut, const String &rTxt, - const USHORT nIdx, const USHORT nLen, sal_Int32* pDXArray = NULL ) const; + const sal_uInt16 nIdx, const sal_uInt16 nLen, sal_Int32* pDXArray = NULL ) const; void DrawPrev( OutputDevice* pOut, Printer* pPrinter, const Point &rPos, const String &rTxt, - const USHORT nIdx = 0, const USHORT nLen = STRING_LEN ) const; + const sal_uInt16 nIdx = 0, const sal_uInt16 nLen = STRING_LEN ) const; #endif // !REDUCEDSVXFONT static void DrawArrow( OutputDevice &rOut, const Rectangle& rRect, - const Size& rSize, const Color& rCol, BOOL bLeft ); + const Size& rSize, const Color& rCol, sal_Bool bLeft ); SvxFont& operator=( const SvxFont& rFont ); SvxFont& operator=( const Font& rFont ); }; diff --git a/editeng/inc/editeng/svxrtf.hxx b/editeng/inc/editeng/svxrtf.hxx index 5c92d5a5d7..17854b3bc3 100644 --- a/editeng/inc/editeng/svxrtf.hxx +++ b/editeng/inc/editeng/svxrtf.hxx @@ -34,9 +34,11 @@ #include <svl/itemset.hxx> #include <svtools/parrtf.hxx> -#define _SVSTDARR_USHORTS +#define _SVSTDARR_sal_uInt16S #include <svl/svstdarr.hxx> #include <editeng/editengdllapi.h> + +#include <deque> #include <utility> #include <vector> class Font; @@ -57,17 +59,17 @@ namespace com { namespace sun { namespace star { } } } -// Mapper-Klassen fuer die verschiedenen Anforderungen an Doc-Positionen -// Swg - NodePosition ist ein SwIndex, der intern veraendert wird -// EditEngine - ULONG auf Liste von Absaetzen +// Mapper-Classes for the various requirements on Document positions +// Swg - NodePosition is a SwIndex, which is used internally +// EditEngine - ULONG to list of paragraphs // ..... class SvxNodeIdx { public: virtual ~SvxNodeIdx() {} - virtual ULONG GetIdx() const = 0; - virtual SvxNodeIdx* Clone() const = 0; // erzeuge von sich eine Kopie + virtual sal_uLong GetIdx() const = 0; + virtual SvxNodeIdx* Clone() const = 0; // Cloning itself }; class SvxPosition @@ -75,33 +77,36 @@ class SvxPosition public: virtual ~SvxPosition() {} - virtual ULONG GetNodeIdx() const = 0; + virtual sal_uLong GetNodeIdx() const = 0; virtual xub_StrLen GetCntIdx() const = 0; - virtual SvxPosition* Clone() const = 0; // erzeuge von sich eine Kopie - virtual SvxNodeIdx* MakeNodeIdx() const = 0; // erzeuge vom NodeIndex eine Kopie + virtual SvxPosition* Clone() const = 0; // Cloning itself + virtual SvxNodeIdx* MakeNodeIdx() const = 0; // Cloning NodeIndex }; typedef Color* ColorPtr; -SV_DECL_PTRARR( SvxRTFColorTbl, ColorPtr, 16, 4 ) +typedef std::deque< ColorPtr > SvxRTFColorTbl; DECLARE_TABLE( SvxRTFFontTbl, Font* ) DECLARE_TABLE( SvxRTFStyleTbl, SvxRTFStyleType* ) typedef SvxRTFItemStackType* SvxRTFItemStackTypePtr; SV_DECL_PTRARR_DEL( SvxRTFItemStackList, SvxRTFItemStackTypePtr, 1, 1 ) -SV_DECL_PTRARR_STACK( SvxRTFItemStack, SvxRTFItemStackTypePtr, 0, 1 ) -// einige Hilfsklassen fuer den RTF-Parser +// SvxRTFItemStack can't be "std::stack< SvxRTFItemStackTypePtr >" type, because +// the methods are using operator[] in sw/source/filter/rtf/rtftbl.cxx file +typedef std::deque< SvxRTFItemStackTypePtr > SvxRTFItemStack; + +// own helper classes for the RTF Parser struct SvxRTFStyleType { - SfxItemSet aAttrSet; // die Attribute vom Style (+Ableitung!) + SfxItemSet aAttrSet; // the attributes of Style (+ derivate!) String sName; - USHORT nBasedOn, nNext; - BOOL bBasedOnIsSet; //$flr #117411# - BYTE nOutlineNo; - BOOL bIsCharFmt; + sal_uInt16 nBasedOn, nNext; + sal_Bool bBasedOnIsSet; + sal_uInt8 nOutlineNo; + sal_Bool bIsCharFmt; - SvxRTFStyleType( SfxItemPool& rPool, const USHORT* pWhichRange ); + SvxRTFStyleType( SfxItemPool& rPool, const sal_uInt16* pWhichRange ); }; @@ -109,17 +114,17 @@ struct SvxRTFStyleType typedef ::std::vector< ::std::pair< ::rtl::OUString, ::rtl::OUString > > PictPropertyNameValuePairs; struct EDITENG_DLLPUBLIC SvxRTFPictureType { - // Format der Bitmap + // Bitmap Format enum RTF_BMPSTYLE { - RTF_BITMAP, // Bitmap, die Planes sind in den Pict.Daten - WIN_METAFILE, // in den Pict.Daten steht ein Window-Metafile - MAC_QUICKDRAW, // in den Pict.Daten steht ein Mac-QuickDraw - OS2_METAFILE, // in den Pict.Daten steht ein OS2-Metafile - RTF_DI_BMP, // Device Independent Bitmap - ENHANCED_MF, // in den Pict.Daten steht ein Enhanced-Metafile - RTF_PNG, // in den Pict.Daten steht ein PNG file - RTF_JPG // in den Pict.Daten steht ein JPG file + RTF_BITMAP, // Meta data: Bitmap + WIN_METAFILE, // Meta data: Window-Metafile + MAC_QUICKDRAW, // Meta data: Mac-QuickDraw + OS2_METAFILE, // Meta data: OS2-Metafile + RTF_DI_BMP, // Meta data: Device Independent Bitmap + ENHANCED_MF, // Meta data: Enhanced-Metafile + RTF_PNG, // Meta data: PNG file + RTF_JPG // Meta data: JPG file } eStyle; enum RTF_BMPMODE @@ -128,27 +133,27 @@ struct EDITENG_DLLPUBLIC SvxRTFPictureType HEX_MODE } nMode; - USHORT nType; + sal_uInt16 nType; sal_uInt32 uPicLen; - USHORT nWidth, nHeight; - USHORT nGoalWidth, nGoalHeight; - USHORT nBitsPerPixel; - USHORT nPlanes; - USHORT nWidthBytes; - USHORT nScalX, nScalY; + sal_uInt16 nWidth, nHeight; + sal_uInt16 nGoalWidth, nGoalHeight; + sal_uInt16 nBitsPerPixel; + sal_uInt16 nPlanes; + sal_uInt16 nWidthBytes; + sal_uInt16 nScalX, nScalY; short nCropT, nCropB, nCropL, nCropR; PictPropertyNameValuePairs aPropertyPairs; SvxRTFPictureType() { ResetValues(); } - // alle Werte auf default; wird nach einlesen der Bitmap aufgerufen ! + // Reset all values to default; is called after loading the Bitmap void ResetValues(); }; -// Hier sind die Ids fuer alle Charakter-Attribute, die vom SvxParser -// erkannt und in einem SfxItemSet gesetzt werden koennen. -// Die Ids werden ueber die SlotIds vom POOL richtig gesetzt. +// Here are the IDs for all character attributes, which can be detected by +// SvxParser and can be set in a SfxItemSet. The IDs are set correctly throught +// the SlotIds from POOL. struct RTFPlainAttrMapIds { - USHORT nCaseMap, + sal_uInt16 nCaseMap, nBgColor, nColor, nContour, @@ -186,12 +191,12 @@ struct RTFPlainAttrMapIds RTFPlainAttrMapIds( const SfxItemPool& rPool ); }; -// Hier sind die Ids fuer alle Paragraph-Attribute, die vom SvxParser -// erkannt und in einem SfxItemSet gesetzt werden koennen. -// Die Ids werden ueber die SlotIds vom POOL richtig gesetzt. +// Here are the IDs for all paragraph attributes, which can be detected by +// SvxParser and can be set in a SfxItemSet. The IDs are set correctly throught +// the SlotIds from POOL. struct RTFPardAttrMapIds { - USHORT nLinespacing, + sal_uInt16 nLinespacing, nAdjust, nTabStop, nHyphenzone, @@ -242,31 +247,31 @@ class EDITENG_DLLPUBLIC SvxRTFParser : public SvRTFParser long nVersionNo; int nDfltFont; - BOOL bNewDoc : 1; // FALSE - in ein bestehendes lesen - BOOL bNewGroup : 1; // TRUE - es gab eine oeffnende Klammer - BOOL bIsSetDfltTab : 1; // TRUE - DefTab wurde eingelesen - BOOL bChkStyleAttr : 1; // TRUE - StyleSheets werden ausgewertet - BOOL bCalcValue : 1; // TRUE - Twipwerte an APP anpassen - BOOL bPardTokenRead : 1; // TRUE - Token \pard wurde erkannt - BOOL bReadDocInfo : 1; // TRUE - DocInfo mit einlesen - BOOL bIsLeftToRightDef : 1; // TRUE - in LeftToRight char run def. - // FALSE - in RightToLeft char run def. - BOOL bIsInReadStyleTab : 1; // TRUE - in ReadStyleTable + sal_Bool bNewDoc : 1; // FALSE - Reading in an existing + sal_Bool bNewGroup : 1; // TRUE - there was an opening parenthesis + sal_Bool bIsSetDfltTab : 1; // TRUE - DefTab was loaded + sal_Bool bChkStyleAttr : 1; // TRUE - StyleSheets are evaluated + sal_Bool bCalcValue : 1; // TRUE - Twip values adapt to App + sal_Bool bPardTokenRead : 1; // TRUE - Token \pard was detected + sal_Bool bReadDocInfo : 1; // TRUE - DocInfo to read + sal_Bool bIsLeftToRightDef : 1; // TRUE - in LeftToRight char run def. + // FALSE - in RightToLeft char run def. + sal_Bool bIsInReadStyleTab : 1; // TRUE - in ReadStyleTable void ClearColorTbl(); void ClearFontTbl(); void ClearStyleTbl(); void ClearAttrStack(); - SvxRTFItemStackTypePtr _GetAttrSet( int bCopyAttr=FALSE ); // neue ItemStackType anlegen + SvxRTFItemStackTypePtr _GetAttrSet( int bCopyAttr=sal_False ); // Create new ItemStackType:s void _ClearStyleAttr( SvxRTFItemStackType& rStkType ); - // setzt alle Attribute, die unterschiedlich zum aktuellen sind + // Sets all the attributes that are different from the current void SetAttrSet( SfxItemSet& rAttrSet, SvxPosition& rSttPos ); void SetAttrSet( SvxRTFItemStackType &rSet ); void SetDefault( int nToken, int nValue ); - // pard / plain abarbeiten + // Excecute pard / plain void RTFPardPlain( int bPard, SfxItemSet** ppSet ); void BuildWhichTbl(); @@ -292,7 +297,7 @@ protected: String& DelCharAtEnd( String& rStr, const sal_Unicode cDel ); - // wird fuer jedes Token gerufen, das in CallParser erkannt wird + // is called for each token that is recognized in CallParser virtual void NextToken( int nToken ); virtual void ReadBitmapData(); @@ -304,34 +309,34 @@ protected: void ReadAttr( int nToken, SfxItemSet* pSet ); void ReadTabAttr( int nToken, SfxItemSet& rSet ); - // Dokument-Info lesen + // Read Document-Info ::com::sun::star::util::DateTime GetDateTimeStamp( ); String& GetTextToEndGroup( String& rStr ); virtual void ReadInfo( const sal_Char* pChkForVerNo = 0 ); inline SfxItemSet& GetAttrSet(); - // wurde noch kein Text eingefuegt ? (SttPos vom obersten StackEintrag!) + // no text yet inserted? (SttPos from the top stack entry!) int IsAttrSttPos(); - void AttrGroupEnd(); // den akt. Bearbeiten, vom Stack loeschen + void AttrGroupEnd(); // edit the current, delete from stack void SetAllAttrOfStk(); // end all Attr. and set it into doc virtual void InsertText() = 0; - virtual void MovePos( int bForward = TRUE ) = 0; + virtual void MovePos( int bForward = sal_True ) = 0; virtual void SetEndPrevPara( SvxNodeIdx*& rpNodePos, xub_StrLen& rCntPos )=0; virtual void SetAttrInDoc( SvxRTFItemStackType &rSet ); - // fuer Tokens, die im ReadAttr nicht ausgewertet werden + // for Tokens, which are not evaluated in ReadAttr virtual void UnknownAttrToken( int nToken, SfxItemSet* pSet ); - // falls jemand keine Twips haben moechte + // if no-one would like to have any twips virtual void CalcValue(); SvxRTFParser( SfxItemPool& rAttrPool, SvStream& rIn, ::com::sun::star::uno::Reference< ::com::sun::star::document::XDocumentProperties> i_xDocProps, - int bReadNewDoc = TRUE ); + int bReadNewDoc = sal_True ); virtual ~SvxRTFParser(); int IsNewDoc() const { return bNewDoc; } @@ -347,16 +352,16 @@ protected: int IsReadDocInfo() const { return bReadDocInfo; } void SetReadDocInfo( int bFlag ) { bReadDocInfo = bFlag; } - // erfrage/setze die aktuelle Einfuegeposition + // Query/Set the current insert position SvxPosition& GetInsPos() const { return *pInsPos; } void SetInsPos( const SvxPosition& rNew ); long GetVersionNo() const { return nVersionNo; } - // erfrage/setze die Mapping-Ids fuer die Pard/Plain Attribute - // (Set: es werden sich die Pointer gemerkt, also keine Kopie erzeugt!!! ) - void AddPardAttr( USHORT nWhich ) { aPardMap.Insert( nWhich, aPardMap.Count() ); } - void AddPlainAttr( USHORT nWhich ) { aPlainMap.Insert( nWhich, aPlainMap.Count() ); } + // Query/Set the mapping IDs for the Pard/Plain attributes + //(Set: It is noted in the pointers, which thus does not create a copy) + void AddPardAttr( sal_uInt16 nWhich ) { aPardMap.Insert( nWhich, aPardMap.Count() ); } + void AddPlainAttr( sal_uInt16 nWhich ) { aPlainMap.Insert( nWhich, aPlainMap.Count() ); } SvxRTFStyleTbl& GetStyleTbl() { return aStyleTbl; } SvxRTFItemStack& GetAttrStack() { return aAttrStack; } @@ -365,37 +370,37 @@ protected: const String& GetBaseURL() const { return sBaseURL; } - // lesen die GrafikDaten und fuelle damit die Grafik und die - // die PicDaten. - // Return - TRUE: die Grafik ist gueltig - BOOL ReadBmpData( Graphic& rGrf, SvxRTFPictureType& rPicType ); - // wandel die ASCII-HexCodes in binaere Zeichen um. Werden - // ungueltige Daten gefunden (Zeichen ausser 0-9|a-f|A-F, so - // wird USHRT_MAX returnt, ansonsten die Anzahl der umgewandelten Ze. + // Read the graphics data and make up for the graphics and the picture + // meta data. + // Return - TRUE: the graphic is valid + sal_Bool ReadBmpData( Graphic& rGrf, SvxRTFPictureType& rPicType ); + // Change the ASCII-HexCodes into binary characters. If invalid data is + // found (strings not 0-9 | a-f | A-F, then USHRT_MAX is returned, + // otherwise the number of the converted character. xub_StrLen HexToBin( String& rToken ); public: - virtual SvParserState CallParser(); // Aufruf des Parsers + virtual SvParserState CallParser(); - inline const Color& GetColor( USHORT nId ) const; - const Font& GetFont( USHORT nId ); // aendert den dflt Font + inline const Color& GetColor( size_t nId ) const; + const Font& GetFont( sal_uInt16 nId ); // Changes the dflt Font virtual int IsEndPara( SvxNodeIdx* pNd, xub_StrLen nCnt ) const = 0; - // um einen anderen Attribut-Pool setzen zukoennen. Darf nur vorm - // CallParser erfolgen!! Die Maps werden nicht neu erzeugt! + // to det a different attribute pool. May only be done prior to CallParser! + // The maps are not generated anew! void SetAttrPool( SfxItemPool* pNewPool ) { pAttrPool = pNewPool; } - // um andere WhichIds fuer einen anderen Pool zusetzen. + // to set different WhichIds for a different pool. RTFPardAttrMapIds& GetPardMap() { return (RTFPardAttrMapIds&)*aPardMap.GetData(); } RTFPlainAttrMapIds& GetPlainMap() { return (RTFPlainAttrMapIds&)*aPlainMap.GetData(); } - // um diese von aussen z.B. Tabellenzellen zuordnen zu koennen - void ReadBorderAttr( int nToken, SfxItemSet& rSet, int bTableDef=FALSE ); - void ReadBackgroundAttr( int nToken, SfxItemSet& rSet, int bTableDef=FALSE ); + // to be able to assign them from the outside as for example table cells + void ReadBorderAttr( int nToken, SfxItemSet& rSet, int bTableDef=sal_False ); + void ReadBackgroundAttr( int nToken, SfxItemSet& rSet, int bTableDef=sal_False ); - // fuers asynchrone lesen aus dem SvStream + // for asynchronous read from the SvStream virtual void Continue( int nToken ); // get RTF default ItemSets. Must be used by pard/plain tokens or in @@ -404,8 +409,8 @@ public: virtual bool UncompressableStackEntry(const SvxRTFItemStackType &rSet) const; }; -// der Stack fuer die Attribute: -// diese Klasse darf nur vom SvxRTFParser benutzt werden! +// The stack for the attributes: +// this class may only be used by SvxRTFParser! class EDITENG_DLLPUBLIC SvxRTFItemStackType { friend class SvxRTFParser; @@ -415,9 +420,9 @@ class EDITENG_DLLPUBLIC SvxRTFItemStackType SvxNodeIdx *pSttNd, *pEndNd; xub_StrLen nSttCnt, nEndCnt; SvxRTFItemStackList* pChildList; - USHORT nStyleNo; + sal_uInt16 nStyleNo; - SvxRTFItemStackType( SfxItemPool&, const USHORT* pWhichRange, + SvxRTFItemStackType( SfxItemPool&, const sal_uInt16* pWhichRange, const SvxPosition& ); ~SvxRTFItemStackType(); @@ -426,7 +431,7 @@ class EDITENG_DLLPUBLIC SvxRTFItemStackType public: SvxRTFItemStackType( const SvxRTFItemStackType&, const SvxPosition&, - int bCopyAttr = FALSE ); + int bCopyAttr = sal_False ); //cmc, I'm very suspicios about SetStartPos, it doesn't change //its children's starting position, and the implementation looks //bad, consider this deprecated. @@ -435,8 +440,8 @@ public: void MoveFullNode(const SvxNodeIdx &rOldNode, const SvxNodeIdx &rNewNode); - ULONG GetSttNodeIdx() const { return pSttNd->GetIdx(); } - ULONG GetEndNodeIdx() const { return pEndNd->GetIdx(); } + sal_uLong GetSttNodeIdx() const { return pSttNd->GetIdx(); } + sal_uLong GetEndNodeIdx() const { return pEndNd->GetIdx(); } const SvxNodeIdx& GetSttNode() const { return *pSttNd; } const SvxNodeIdx& GetEndNode() const { return *pEndNd; } @@ -447,18 +452,18 @@ public: SfxItemSet& GetAttrSet() { return aAttrSet; } const SfxItemSet& GetAttrSet() const { return aAttrSet; } - USHORT StyleNo() const { return nStyleNo; } + sal_uInt16 StyleNo() const { return nStyleNo; } void SetRTFDefaults( const SfxItemSet& rDefaults ); }; -// ----------- Inline Implementierungen -------------- +// ----------- Inline Implementations -------------- -inline const Color& SvxRTFParser::GetColor( USHORT nId ) const +inline const Color& SvxRTFParser::GetColor( size_t nId ) const { ColorPtr pColor = (ColorPtr)pDfltColor; - if( nId < aColorTbl.Count() ) + if( nId < aColorTbl.size() ) pColor = aColorTbl[ nId ]; return *pColor; } @@ -466,7 +471,7 @@ inline const Color& SvxRTFParser::GetColor( USHORT nId ) const inline SfxItemSet& SvxRTFParser::GetAttrSet() { SvxRTFItemStackTypePtr pTmp; - if( bNewGroup || 0 == ( pTmp = aAttrStack.Top()) ) + if( bNewGroup || 0 == ( pTmp = aAttrStack.empty() ? 0 : aAttrStack.back()) ) pTmp = _GetAttrSet(); return pTmp->aAttrSet; } diff --git a/editeng/inc/editeng/swafopt.hxx b/editeng/inc/editeng/swafopt.hxx index 8292df4d82..0f1583744a 100644 --- a/editeng/inc/editeng/swafopt.hxx +++ b/editeng/inc/editeng/swafopt.hxx @@ -34,7 +34,7 @@ class SvStringsISortDtor; class SmartTagMgr; -// Klasse fuer Optionen vom Autoformat +// Class of options for AutoFormat struct EDITENG_DLLPUBLIC SvxSwAutoFmtFlags { Font aBulletFont; @@ -45,54 +45,54 @@ struct EDITENG_DLLPUBLIC SvxSwAutoFmtFlags sal_Unicode cBullet; sal_Unicode cByInputBullet; - USHORT nAutoCmpltWordLen, nAutoCmpltListLen; - USHORT nAutoCmpltExpandKey; + sal_uInt16 nAutoCmpltWordLen, nAutoCmpltListLen; + sal_uInt16 nAutoCmpltExpandKey; - BYTE nRightMargin; + sal_uInt8 nRightMargin; - BOOL bAutoCorrect : 1; - BOOL bCptlSttSntnc : 1; - BOOL bCptlSttWrd : 1; - BOOL bChkFontAttr : 1; + sal_Bool bAutoCorrect : 1; + sal_Bool bCptlSttSntnc : 1; + sal_Bool bCptlSttWrd : 1; + sal_Bool bChkFontAttr : 1; - BOOL bChgUserColl : 1; - BOOL bChgEnumNum : 1; + sal_Bool bChgUserColl : 1; + sal_Bool bChgEnumNum : 1; - BOOL bAFmtByInput : 1; - BOOL bDelEmptyNode : 1; - BOOL bSetNumRule : 1; + sal_Bool bAFmtByInput : 1; + sal_Bool bDelEmptyNode : 1; + sal_Bool bSetNumRule : 1; - BOOL bChgOrdinalNumber : 1; - BOOL bChgToEnEmDash : 1; - BOOL bAddNonBrkSpace : 1; - BOOL bChgWeightUnderl : 1; - BOOL bSetINetAttr : 1; + sal_Bool bChgOrdinalNumber : 1; + sal_Bool bChgToEnEmDash : 1; + sal_Bool bAddNonBrkSpace : 1; + sal_Bool bChgWeightUnderl : 1; + sal_Bool bSetINetAttr : 1; - BOOL bSetBorder : 1; - BOOL bCreateTable : 1; - BOOL bReplaceStyles : 1; - BOOL bDummy : 1; + sal_Bool bSetBorder : 1; + sal_Bool bCreateTable : 1; + sal_Bool bReplaceStyles : 1; + sal_Bool bDummy : 1; - BOOL bWithRedlining : 1; + sal_Bool bWithRedlining : 1; - BOOL bRightMargin : 1; + sal_Bool bRightMargin : 1; - BOOL bAutoCompleteWords : 1; - BOOL bAutoCmpltCollectWords : 1; - BOOL bAutoCmpltEndless : 1; -// -- under NT hier starts a new long - BOOL bAutoCmpltAppendBlanc : 1; - BOOL bAutoCmpltShowAsTip : 1; + sal_Bool bAutoCompleteWords : 1; + sal_Bool bAutoCmpltCollectWords : 1; + sal_Bool bAutoCmpltEndless : 1; +// -- under NT here starts a new long + sal_Bool bAutoCmpltAppendBlanc : 1; + sal_Bool bAutoCmpltShowAsTip : 1; - BOOL bAFmtDelSpacesAtSttEnd : 1; - BOOL bAFmtDelSpacesBetweenLines : 1; - BOOL bAFmtByInpDelSpacesAtSttEnd : 1; - BOOL bAFmtByInpDelSpacesBetweenLines : 1; + sal_Bool bAFmtDelSpacesAtSttEnd : 1; + sal_Bool bAFmtDelSpacesBetweenLines : 1; + sal_Bool bAFmtByInpDelSpacesAtSttEnd : 1; + sal_Bool bAFmtByInpDelSpacesBetweenLines : 1; - BOOL bAutoCmpltKeepList : 1; + sal_Bool bAutoCmpltKeepList : 1; // some dummies for any new options - BOOL bDummy6 : 1, + sal_Bool bDummy6 : 1, bDummy7 : 1, bDummy8 : 1 ; diff --git a/editeng/inc/editeng/tstpitem.hxx b/editeng/inc/editeng/tstpitem.hxx index 6d80024d44..eb0411c6b4 100644 --- a/editeng/inc/editeng/tstpitem.hxx +++ b/editeng/inc/editeng/tstpitem.hxx @@ -39,7 +39,7 @@ #define SVX_TAB_DEFCOUNT 10 #define SVX_TAB_DEFDIST 1134 // 2cm in twips #define SVX_TAB_NOTFOUND USHRT_MAX -#define cDfltDecimalChar (sal_Unicode(0x00)) // aus IntlWrapper besorgen +#define cDfltDecimalChar (sal_Unicode(0x00)) // Get from IntlWrapper #define cDfltFillChar (sal_Unicode(' ')) class EDITENG_DLLPUBLIC SvxTabStop @@ -83,8 +83,8 @@ public: String GetValueString() const; - // das "alte" operator==() - BOOL IsEqual( const SvxTabStop& rTS ) const + // the "old" operator==() + sal_Bool IsEqual( const SvxTabStop& rTS ) const { return ( nTabPos == rTS.nTabPos && eAdjustment == rTS.eAdjustment && @@ -92,10 +92,10 @@ public: cFill == rTS.cFill ); } - // Fuer das SortedArray: - BOOL operator==( const SvxTabStop& rTS ) const + // For the SortedArray: + sal_Bool operator==( const SvxTabStop& rTS ) const { return nTabPos == rTS.nTabPos; } - BOOL operator <( const SvxTabStop& rTS ) const + sal_Bool operator <( const SvxTabStop& rTS ) const { return nTabPos < rTS.nTabPos; } SvxTabStop& operator=( const SvxTabStop& rTS ) @@ -112,9 +112,9 @@ public: SV_DECL_VARARR_SORT_VISIBILITY( SvxTabStopArr, SvxTabStop, SVX_TAB_DEFCOUNT, 1, EDITENG_DLLPUBLIC ) -/* -[Beschreibung] -Dieses Item beschreibt eine Liste von TabStops. +/* [Description] + + This item describes a list of TabStops. */ class EDITENG_DLLPUBLIC SvxTabStopItem : public SfxPoolItem, private SvxTabStopArr @@ -124,38 +124,38 @@ class EDITENG_DLLPUBLIC SvxTabStopItem : public SfxPoolItem, private SvxTabStopA public: TYPEINFO(); - SvxTabStopItem( USHORT nWhich ); - SvxTabStopItem( const USHORT nTabs, - const USHORT nDist, + SvxTabStopItem( sal_uInt16 nWhich ); + SvxTabStopItem( const sal_uInt16 nTabs, + const sal_uInt16 nDist, const SvxTabAdjust eAdjst /*= SVX_TAB_ADJUST_DEFAULT*/, - USHORT nWhich ); + sal_uInt16 nWhich ); SvxTabStopItem( const SvxTabStopItem& rTSI ); - // Liefert Index-Position des Tabs zurueck oder TAB_NOTFOUND - USHORT GetPos( const SvxTabStop& rTab ) const; + // Returns index of the tab or TAB_NOTFOUND + sal_uInt16 GetPos( const SvxTabStop& rTab ) const; - // Liefert Index-Position des Tabs an nPos zurueck oder TAB_NOTFOUND - USHORT GetPos( const long nPos ) const; + // Returns index of the tab at nPos, or TAB_NOTFOUND + sal_uInt16 GetPos( const long nPos ) const; - // entprivatisiert: - USHORT Count() const { return SvxTabStopArr::Count(); } - BOOL Insert( const SvxTabStop& rTab ); - void Insert( const SvxTabStopItem* pTabs, USHORT nStart = 0, - USHORT nEnd = USHRT_MAX ); + // unprivatized: + sal_uInt16 Count() const { return SvxTabStopArr::Count(); } + sal_Bool Insert( const SvxTabStop& rTab ); + void Insert( const SvxTabStopItem* pTabs, sal_uInt16 nStart = 0, + sal_uInt16 nEnd = USHRT_MAX ); void Remove( SvxTabStop& rTab ) { SvxTabStopArr::Remove( rTab ); } - void Remove( const USHORT nPos, const USHORT nLen = 1 ) + void Remove( const sal_uInt16 nPos, const sal_uInt16 nLen = 1 ) { SvxTabStopArr::Remove( nPos, nLen ); } - // Zuweisungsoperator, Gleichheitsoperator (vorsicht: teuer!) + // Assignment operator, equality operator (caution: expensive!) SvxTabStopItem& operator=( const SvxTabStopItem& rTSI ); // this is already included in SfxPoolItem declaration //int operator!=( const SvxTabStopItem& rTSI ) const // { return !( operator==( rTSI ) ); } - // SortedArrays liefern nur Stackobjekte zurueck! - const SvxTabStop& operator[]( const USHORT nPos ) const + // SortedArrays returns only Stackobjects! + const SvxTabStop& operator[]( const sal_uInt16 nPos ) const { DBG_ASSERT( GetStart() && nPos < Count(), "op[]" ); @@ -164,10 +164,10 @@ public: const SvxTabStop* GetStart() const { return SvxTabStopArr::GetData(); } - // "pure virtual Methoden" vom SfxPoolItem + // "pure virtual Methods" from SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -175,8 +175,8 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create( SvStream&, USHORT ) const; - virtual SvStream& Store( SvStream& , USHORT nItemVersion ) const; + virtual SfxPoolItem* Create( SvStream&, sal_uInt16 ) const; + virtual SvStream& Store( SvStream& , sal_uInt16 nItemVersion ) const; using SvxTabStopArr::Insert; using SvxTabStopArr::Remove; diff --git a/editeng/inc/editeng/twolinesitem.hxx b/editeng/inc/editeng/twolinesitem.hxx index c5f48e55ea..6bcf02b0bd 100644 --- a/editeng/inc/editeng/twolinesitem.hxx +++ b/editeng/inc/editeng/twolinesitem.hxx @@ -44,30 +44,28 @@ class EDITENG_DLLPUBLIC SvxTwoLinesItem : public SfxPoolItem sal_Bool bOn; public: TYPEINFO(); - SvxTwoLinesItem( sal_Bool bOn /*= TRUE*/, + SvxTwoLinesItem( sal_Bool bOn /*= sal_True*/, sal_Unicode nStartBracket /*= 0*/, sal_Unicode nEndBracket /*= 0*/, sal_uInt16 nId ); SvxTwoLinesItem( const SvxTwoLinesItem& rAttr ); virtual ~SvxTwoLinesItem(); - // "pure virtual Methoden" vom SfxPoolItem + // "pure virtual Methods" from SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT nVer) const; - virtual SvStream& Store(SvStream &, USHORT nIVer) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16 nVer) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nIVer) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText, const IntlWrapper* pIntl = 0 ) const; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, - BYTE nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, - BYTE nMemberId = 0 ); + virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); - virtual USHORT GetVersion( USHORT nFFVer ) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFFVer ) const; SvxTwoLinesItem& operator=( const SvxTwoLinesItem& rCpy ) { diff --git a/editeng/inc/editeng/txtrange.hxx b/editeng/inc/editeng/txtrange.hxx index 44c33bd95d..1655b2967a 100644 --- a/editeng/inc/editeng/txtrange.hxx +++ b/editeng/inc/editeng/txtrange.hxx @@ -29,89 +29,89 @@ #ifndef _MyTXTRANGE_HXX #define _MyTXTRANGE_HXX -#ifndef _TXTRANGE_HXX -#define _SVSTDARR_BOOLS -#define _SVSTDARR_LONGS -#include <svl/svstdarr.hxx> -#endif #include "editeng/editengdllapi.h" +#include "tools/solar.h" +#include "tools/gen.hxx" + +#include <deque> class PolyPolygon; -class Range; class Rectangle; namespace basegfx { class B2DPolyPolygon; } -typedef SvLongs* SvLongsPtr; +typedef std::deque<long>* LongDqPtr; /************************************************************************* |* |* class TextRanger |* -|* Beschreibung -|* Ersterstellung 20.01.97 -|* Letzte Aenderung AMA 20.01.97 -|* *************************************************************************/ class EDITENG_DLLPUBLIC TextRanger { - Range *pRangeArr; - SvLongsPtr *pCache; - PolyPolygon *mpPolyPolygon; // Flaechenpolygon - PolyPolygon *mpLinePolyPolygon; // Linienpolygon - Rectangle *pBound; // Umfassendes Rechteck - USHORT nCacheSize; // Cache-Size - USHORT nCacheIdx; // Cache-Index - USHORT nRight; // Abstand Kontur-Text - USHORT nLeft; // Abstand Text-Kontur - USHORT nUpper; // Abstand Kontur-Text - USHORT nLower; // Abstand Text-Kontur - sal_uInt32 nPointCount; // Anzahl der Polygonpunkte - BOOL bSimple : 1; // Nur Aussenkante - BOOL bInner : 1; // TRUE: Objekt beschriften (EditEngine); - // FALSE: Objekt umfliessen (StarWriter); - BOOL bVertical :1; // for vertical writing mode - BOOL bFlag3 :1; - BOOL bFlag4 :1; - BOOL bFlag5 :1; - BOOL bFlag6 :1; - BOOL bFlag7 :1; + //! The RangeCache class is used to cache the result of a single range calculation. + struct RangeCache + { + Range range; //!< Range for which we calculated results. + std::deque<long> results; //!< Calculated results for the range. + RangeCache(const Range& rng) : range(rng) {}; + }; + std::deque<RangeCache> mRangeCache; //!< Cached range calculations. + PolyPolygon *mpPolyPolygon; // Surface polygon + PolyPolygon *mpLinePolyPolygon; // Line polygon + Rectangle *pBound; // Comprehensive rectangle + sal_uInt16 nCacheSize; // Cache-Size + sal_uInt16 nRight; // Distance Contour-Text + sal_uInt16 nLeft; // Distance Text-Contour + sal_uInt16 nUpper; // Distance Contour-Text + sal_uInt16 nLower; // Distance Text-Contour + sal_uInt32 nPointCount; // Number of polygon points + sal_Bool bSimple : 1; // Just outside edge + sal_Bool bInner : 1; // TRUE: Objekt inline (EditEngine); + // FALSE: Objekt flow (StarWriter); + sal_Bool bVertical :1; // for vertical writing mode + sal_Bool bFlag3 :1; + sal_Bool bFlag4 :1; + sal_Bool bFlag5 :1; + sal_Bool bFlag6 :1; + sal_Bool bFlag7 :1; TextRanger( const TextRanger& ); // not implemented const Rectangle& _GetBoundRect(); public: - TextRanger( const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::B2DPolyPolygon* pLinePolyPolygon, - USHORT nCacheSize, USHORT nLeft, USHORT nRight, - BOOL bSimple, BOOL bInner, BOOL bVert = sal_False ); + TextRanger( const basegfx::B2DPolyPolygon& rPolyPolygon, + const basegfx::B2DPolyPolygon* pLinePolyPolygon, + sal_uInt16 nCacheSize, sal_uInt16 nLeft, sal_uInt16 nRight, + sal_Bool bSimple, sal_Bool bInner, sal_Bool bVert = sal_False ); ~TextRanger(); - SvLongsPtr GetTextRanges( const Range& rRange ); - USHORT GetRight() const { return nRight; } - USHORT GetLeft() const { return nLeft; } - USHORT GetUpper() const { return nUpper; } - USHORT GetLower() const { return nLower; } + LongDqPtr GetTextRanges( const Range& rRange ); + sal_uInt16 GetRight() const { return nRight; } + sal_uInt16 GetLeft() const { return nLeft; } + sal_uInt16 GetUpper() const { return nUpper; } + sal_uInt16 GetLower() const { return nLower; } sal_uInt32 GetPointCount() const { return nPointCount; } - BOOL IsSimple() const { return bSimple; } - BOOL IsInner() const { return bInner; } - BOOL IsVertical() const { return bVertical; } - BOOL HasBorder() const { return nRight || nLeft; } + sal_Bool IsSimple() const { return bSimple; } + sal_Bool IsInner() const { return bInner; } + sal_Bool IsVertical() const { return bVertical; } + sal_Bool HasBorder() const { return nRight || nLeft; } const PolyPolygon& GetPolyPolygon() const { return *mpPolyPolygon; } const PolyPolygon* GetLinePolygon() const { return mpLinePolyPolygon; } const Rectangle& GetBoundRect() { return pBound ? static_cast< const Rectangle& >(*pBound) : _GetBoundRect(); } - void SetUpper( USHORT nNew ){ nUpper = nNew; } - void SetLower( USHORT nNew ){ nLower = nNew; } - void SetVertical( BOOL bNew ); - BOOL IsFlag3() const { return bFlag3; } - void SetFlag3( BOOL bNew ) { bFlag3 = bNew; } - BOOL IsFlag4() const { return bFlag4; } - void SetFlag4( BOOL bNew ) { bFlag4 = bNew; } - BOOL IsFlag5() const { return bFlag5; } - void SetFlag5( BOOL bNew ) { bFlag5 = bNew; } - BOOL IsFlag6() const { return bFlag6; } - void SetFlag6( BOOL bNew ) { bFlag6 = bNew; } - BOOL IsFlag7() const { return bFlag7; } - void SetFlag7( BOOL bNew ) { bFlag7 = bNew; } + void SetUpper( sal_uInt16 nNew ){ nUpper = nNew; } + void SetLower( sal_uInt16 nNew ){ nLower = nNew; } + void SetVertical( sal_Bool bNew ); + sal_Bool IsFlag3() const { return bFlag3; } + void SetFlag3( sal_Bool bNew ) { bFlag3 = bNew; } + sal_Bool IsFlag4() const { return bFlag4; } + void SetFlag4( sal_Bool bNew ) { bFlag4 = bNew; } + sal_Bool IsFlag5() const { return bFlag5; } + void SetFlag5( sal_Bool bNew ) { bFlag5 = bNew; } + sal_Bool IsFlag6() const { return bFlag6; } + void SetFlag6( sal_Bool bNew ) { bFlag6 = bNew; } + sal_Bool IsFlag7() const { return bFlag7; } + void SetFlag7( sal_Bool bNew ) { bFlag7 = bNew; } }; diff --git a/editeng/inc/editeng/udlnitem.hxx b/editeng/inc/editeng/udlnitem.hxx index 8f5d13c65f..c06bae4e81 100644 --- a/editeng/inc/editeng/udlnitem.hxx +++ b/editeng/inc/editeng/udlnitem.hxx @@ -52,31 +52,29 @@ public: TYPEINFO(); SvxTextLineItem( const FontUnderline eSt, - const USHORT nId ); + const sal_uInt16 nId ); - // "pure virtual Methoden" vom SfxPoolItem + // "pure virtual Methods" from SfxPoolItem virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; - virtual String GetValueTextByPos( USHORT nPos ) const; - virtual USHORT GetValueCount() const; - - virtual bool QueryValue( com::sun::star::uno::Any& rVal, - BYTE nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, - BYTE nMemberId = 0 ); - - // MS VC4.0 kommt durcheinander - void SetValue( USHORT nNewVal ) + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; + virtual String GetValueTextByPos( sal_uInt16 nPos ) const; + virtual sal_uInt16 GetValueCount() const; + + virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); + + // MS VC4.0 messes things up + void SetValue( sal_uInt16 nNewVal ) {SfxEnumItem::SetValue(nNewVal); } virtual int HasBoolValue() const; - virtual BOOL GetBoolValue() const; - virtual void SetBoolValue( BOOL bVal ); + virtual sal_Bool GetBoolValue() const; + virtual void SetBoolValue( sal_Bool bVal ); virtual int operator==( const SfxPoolItem& ) const; @@ -91,7 +89,7 @@ public: FontUnderline GetLineStyle() const { return (FontUnderline)GetValue(); } void SetLineStyle( FontUnderline eNew ) - { SetValue((USHORT) eNew); } + { SetValue((sal_uInt16) eNew); } const Color& GetColor() const { return mColor; } void SetColor( const Color& rCol ) { mColor = rCol; } @@ -107,11 +105,11 @@ public: TYPEINFO(); SvxUnderlineItem( const FontUnderline eSt, - const USHORT nId ); + const sal_uInt16 nId ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual String GetValueTextByPos( USHORT nPos ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual String GetValueTextByPos( sal_uInt16 nPos ) const; }; // class SvxOverlineItem ------------------------------------------------ @@ -124,11 +122,11 @@ public: TYPEINFO(); SvxOverlineItem( const FontUnderline eSt, - const USHORT nId ); + const sal_uInt16 nId ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual String GetValueTextByPos( USHORT nPos ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual String GetValueTextByPos( sal_uInt16 nPos ) const; }; #endif // #ifndef _SVX_UDLNITEM_HXX diff --git a/editeng/inc/editeng/ulspitem.hxx b/editeng/inc/editeng/ulspitem.hxx index 83bc118938..d0e38e8dc3 100644 --- a/editeng/inc/editeng/ulspitem.hxx +++ b/editeng/inc/editeng/ulspitem.hxx @@ -40,31 +40,31 @@ namespace rtl // class SvxULSpaceItem -------------------------------------------------- -/* -[Beschreibung] -Dieses Item beschreibt den oberen und unteren Rand einer Seite oder Absatz. +/* [Description] + + This item describes the Upper- and Lower space of a page or paragraph. */ -#define ULSPACE_16_VERSION ((USHORT)0x0001) +#define ULSPACE_16_VERSION ((sal_uInt16)0x0001) class EDITENG_DLLPUBLIC SvxULSpaceItem : public SfxPoolItem { - USHORT nUpper; //Oberer Rand - USHORT nLower; //Unterer Rand - USHORT nPropUpper, nPropLower; // relativ oder absolut (=100%) + sal_uInt16 nUpper; // Upper space + sal_uInt16 nLower; // Lower space + sal_uInt16 nPropUpper, nPropLower; // relative or absolute (=100%) public: TYPEINFO(); - SvxULSpaceItem( const USHORT nId ); - SvxULSpaceItem( const USHORT nUp, const USHORT nLow, - const USHORT nId ); + SvxULSpaceItem( const sal_uInt16 nId ); + SvxULSpaceItem( const sal_uInt16 nUp, const sal_uInt16 nLow, + const sal_uInt16 nId ); inline SvxULSpaceItem& operator=( const SvxULSpaceItem &rCpy ); - // "pure virtual Methoden" vom SfxPoolItem + // "pure virtual Methods" from SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -72,24 +72,24 @@ public: String &rText, const IntlWrapper * = 0 ) const; 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 bool ScaleMetrics( long nMult, long nDiv ); - virtual bool HasMetrics() const; - - inline void SetUpper( const USHORT nU, const USHORT nProp = 100 ); - inline void SetLower( const USHORT nL, const USHORT nProp = 100 ); - - void SetUpperValue( const USHORT nU ) { nUpper = nU; } - void SetLowerValue( const USHORT nL ) { nLower = nL; } - void SetPropUpper( const USHORT nU ) { nPropUpper = nU; } - void SetPropLower( const USHORT nL ) { nPropLower = nL; } - - USHORT GetUpper() const { return nUpper; } - USHORT GetLower() const { return nLower; } - USHORT GetPropUpper() const { return nPropUpper; } - USHORT GetPropLower() const { return nPropLower; } + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; + virtual bool ScaleMetrics( long nMult, long nDiv ); + virtual bool HasMetrics() const; + + inline void SetUpper( const sal_uInt16 nU, const sal_uInt16 nProp = 100 ); + inline void SetLower( const sal_uInt16 nL, const sal_uInt16 nProp = 100 ); + + void SetUpperValue( const sal_uInt16 nU ) { nUpper = nU; } + void SetLowerValue( const sal_uInt16 nL ) { nLower = nL; } + void SetPropUpper( const sal_uInt16 nU ) { nPropUpper = nU; } + void SetPropLower( const sal_uInt16 nL ) { nPropLower = nL; } + + sal_uInt16 GetUpper() const { return nUpper; } + sal_uInt16 GetLower() const { return nLower; } + sal_uInt16 GetPropUpper() const { return nPropUpper; } + sal_uInt16 GetPropLower() const { return nPropLower; } }; inline SvxULSpaceItem &SvxULSpaceItem::operator=( const SvxULSpaceItem &rCpy ) @@ -101,13 +101,13 @@ inline SvxULSpaceItem &SvxULSpaceItem::operator=( const SvxULSpaceItem &rCpy ) return *this; } -inline void SvxULSpaceItem::SetUpper( const USHORT nU, const USHORT nProp ) +inline void SvxULSpaceItem::SetUpper( const sal_uInt16 nU, const sal_uInt16 nProp ) { - nUpper = USHORT((ULONG(nU) * nProp ) / 100); nPropUpper = nProp; + nUpper = sal_uInt16((sal_uInt32(nU) * nProp ) / 100); nPropUpper = nProp; } -inline void SvxULSpaceItem::SetLower( const USHORT nL, const USHORT nProp ) +inline void SvxULSpaceItem::SetLower( const sal_uInt16 nL, const sal_uInt16 nProp ) { - nLower = USHORT((ULONG(nL) * nProp ) / 100); nPropLower = nProp; + nLower = sal_uInt16((sal_uInt32(nL) * nProp ) / 100); nPropLower = nProp; } #endif diff --git a/editeng/inc/editeng/unoedhlp.hxx b/editeng/inc/editeng/unoedhlp.hxx index b352548440..f065cdc0b3 100644 --- a/editeng/inc/editeng/unoedhlp.hxx +++ b/editeng/inc/editeng/unoedhlp.hxx @@ -50,20 +50,20 @@ class EditEngine; class EDITENG_DLLPUBLIC SvxEditSourceHint : public TextHint { private: - ULONG mnStart; - ULONG mnEnd; + sal_uLong mnStart; + sal_uLong mnEnd; public: TYPEINFO(); - SvxEditSourceHint( ULONG nId ); - SvxEditSourceHint( ULONG nId, ULONG nValue, ULONG nStart=0, ULONG nEnd=0 ); - - ULONG GetValue() const; - ULONG GetStartValue() const; - ULONG GetEndValue() const; - void SetValue( ULONG n ); - void SetStartValue( ULONG n ); - void SetEndValue( ULONG n ); + SvxEditSourceHint( sal_uLong nId ); + SvxEditSourceHint( sal_uLong nId, sal_uLong nValue, sal_uLong nStart=0, sal_uLong nEnd=0 ); + + sal_uLong GetValue() const; + sal_uLong GetStartValue() const; + sal_uLong GetEndValue() const; + void SetValue( sal_uLong n ); + void SetStartValue( sal_uLong n ); + void SetEndValue( sal_uLong n ); }; /** Helper class for common functionality in edit sources @@ -102,7 +102,7 @@ public: @return sal_True, if the range has been successfully determined */ - static sal_Bool GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, const EditEngine& rEE, USHORT nPara, USHORT nIndex ); + static sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, const EditEngine& rEE, sal_uInt16 nPara, sal_uInt16 nIndex ); /** Convert point from edit engine to user coordinate space diff --git a/editeng/inc/editeng/unoedprx.hxx b/editeng/inc/editeng/unoedprx.hxx index 2dfd05ec77..a82ab075f5 100644 --- a/editeng/inc/editeng/unoedprx.hxx +++ b/editeng/inc/editeng/unoedprx.hxx @@ -42,20 +42,20 @@ public: SvxAccessibleTextAdapter(); virtual ~SvxAccessibleTextAdapter(); - virtual USHORT GetParagraphCount() const; - virtual USHORT GetTextLen( USHORT nParagraph ) const; + virtual sal_uInt16 GetParagraphCount() const; + virtual sal_uInt16 GetTextLen( sal_uInt16 nParagraph ) const; virtual String GetText( const ESelection& rSel ) const; - virtual SfxItemSet GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib = 0 ) const; - virtual SfxItemSet GetParaAttribs( USHORT nPara ) const; - virtual void SetParaAttribs( USHORT nPara, const SfxItemSet& rSet ); + virtual SfxItemSet GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = 0 ) const; + virtual SfxItemSet GetParaAttribs( sal_uInt16 nPara ) const; + virtual void SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet ); virtual void RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich ); - virtual void GetPortions( USHORT nPara, SvUShorts& rList ) const; + virtual void GetPortions( sal_uInt16 nPara, SvUShorts& rList ) const; - virtual sal_Int32 CalcLogicalIndex( USHORT nPara, USHORT nEEIndex ); - virtual USHORT CalcEditEngineIndex( USHORT nPara, sal_Int32 nLogicalIndex ); + virtual sal_Int32 CalcLogicalIndex( sal_uInt16 nPara, sal_uInt16 nEEIndex ); + virtual sal_uInt16 CalcEditEngineIndex( sal_uInt16 nPara, sal_Int32 nLogicalIndex ); - virtual USHORT GetItemState( const ESelection& rSel, USHORT nWhich ) const; - virtual USHORT GetItemState( USHORT nPara, USHORT nWhich ) const; + virtual sal_uInt16 GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const; + virtual sal_uInt16 GetItemState( sal_uInt16 nPara, sal_uInt16 nWhich ) const; virtual void QuickInsertText( const String& rText, const ESelection& rSel ); virtual void QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel ); @@ -64,46 +64,46 @@ public: virtual SfxItemPool* GetPool() const; - virtual XubString CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor ); - virtual void FieldClicked( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos ); + virtual XubString CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor ); + virtual void FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos ); - virtual BOOL IsValid() const; - - virtual LanguageType GetLanguage( USHORT, USHORT ) const; - virtual USHORT GetFieldCount( USHORT nPara ) const; - virtual EFieldInfo GetFieldInfo( USHORT nPara, USHORT nField ) const; - virtual EBulletInfo GetBulletInfo( USHORT nPara ) const; - virtual Rectangle GetCharBounds( USHORT nPara, USHORT nIndex ) const; - virtual Rectangle GetParaBounds( USHORT nPara ) const; + virtual sal_Bool IsValid() const; + + virtual LanguageType GetLanguage( sal_uInt16, sal_uInt16 ) const; + virtual sal_uInt16 GetFieldCount( sal_uInt16 nPara ) const; + virtual EFieldInfo GetFieldInfo( sal_uInt16 nPara, sal_uInt16 nField ) const; + virtual EBulletInfo GetBulletInfo( sal_uInt16 nPara ) const; + virtual Rectangle GetCharBounds( sal_uInt16 nPara, sal_uInt16 nIndex ) const; + virtual Rectangle GetParaBounds( sal_uInt16 nPara ) const; virtual MapMode GetMapMode() const; virtual OutputDevice* GetRefDevice() const; - virtual sal_Bool GetIndexAtPoint( const Point&, USHORT& nPara, USHORT& nIndex ) const; - virtual sal_Bool GetWordIndices( USHORT nPara, USHORT nIndex, USHORT& nStart, USHORT& nEnd ) const; - virtual sal_Bool GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const; - virtual USHORT GetLineCount( USHORT nPara ) const; - virtual USHORT GetLineLen( USHORT nPara, USHORT nLine ) const; - virtual void GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const; - virtual USHORT GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const; + virtual sal_Bool GetIndexAtPoint( const Point&, sal_uInt16& nPara, sal_uInt16& nIndex ) const; + virtual sal_Bool GetWordIndices( sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt16& nStart, sal_uInt16& nEnd ) const; + virtual sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const; + virtual sal_uInt16 GetLineCount( sal_uInt16 nPara ) const; + virtual sal_uInt16 GetLineLen( sal_uInt16 nPara, sal_uInt16 nLine ) const; + virtual void GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nParagraph, sal_uInt16 nLine ) const; + virtual sal_uInt16 GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const; virtual sal_Bool Delete( const ESelection& ); virtual sal_Bool InsertText( const String&, const ESelection& ); - virtual sal_Bool QuickFormatDoc( BOOL bFull=FALSE ); - virtual sal_Int16 GetDepth( USHORT nPara ) const; - virtual sal_Bool SetDepth( USHORT nPara, sal_Int16 nNewDepth ); + virtual sal_Bool QuickFormatDoc( sal_Bool bFull=sal_False ); + virtual sal_Int16 GetDepth( sal_uInt16 nPara ) const; + virtual sal_Bool SetDepth( sal_uInt16 nPara, sal_Int16 nNewDepth ); virtual const SfxItemSet* GetEmptyItemSetPtr(); // implementation functions for XParagraphAppend and XTextPortionAppend // (not needed for accessibility, only for new import API) virtual void AppendParagraph(); - virtual xub_StrLen AppendTextPortion( USHORT nPara, const String &rText, const SfxItemSet &rSet ); + virtual xub_StrLen AppendTextPortion( sal_uInt16 nPara, const String &rText, const SfxItemSet &rSet ); //XTextCopy virtual void CopyText(const SvxTextForwarder& rSource); void SetForwarder( SvxTextForwarder& ); - sal_Bool HaveImageBullet( USHORT nPara ) const; - sal_Bool HaveTextBullet( USHORT nPara ) const; + sal_Bool HaveImageBullet( sal_uInt16 nPara ) const; + sal_Bool HaveTextBullet( sal_uInt16 nPara ) const; /** Query whether all text in given selection is editable @@ -125,7 +125,7 @@ public: virtual ~SvxAccessibleTextEditViewAdapter(); // SvxViewForwarder interface - virtual BOOL IsValid() const; + virtual sal_Bool IsValid() const; virtual Rectangle GetVisArea() const; virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const; virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const; diff --git a/editeng/inc/editeng/unoedsrc.hxx b/editeng/inc/editeng/unoedsrc.hxx index db401d59ce..24b90f8ccb 100644 --- a/editeng/inc/editeng/unoedsrc.hxx +++ b/editeng/inc/editeng/unoedsrc.hxx @@ -152,25 +152,25 @@ class EDITENG_DLLPUBLIC SvxTextForwarder public: virtual ~SvxTextForwarder(); - virtual USHORT GetParagraphCount() const = 0; - virtual USHORT GetTextLen( USHORT nParagraph ) const = 0; + virtual sal_uInt16 GetParagraphCount() const = 0; + virtual sal_uInt16 GetTextLen( sal_uInt16 nParagraph ) const = 0; virtual String GetText( const ESelection& rSel ) const = 0; - virtual SfxItemSet GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib = 0 ) const = 0; - virtual SfxItemSet GetParaAttribs( USHORT nPara ) const = 0; - virtual void SetParaAttribs( USHORT nPara, const SfxItemSet& rSet ) = 0; + virtual SfxItemSet GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = 0 ) const = 0; + virtual SfxItemSet GetParaAttribs( sal_uInt16 nPara ) const = 0; + virtual void SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet ) = 0; virtual void RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich ) = 0; - virtual void GetPortions( USHORT nPara, SvUShorts& rList ) const = 0; + virtual void GetPortions( sal_uInt16 nPara, SvUShorts& rList ) const = 0; - virtual USHORT GetItemState( const ESelection& rSel, USHORT nWhich ) const = 0; - virtual USHORT GetItemState( USHORT nPara, USHORT nWhich ) const = 0; + virtual sal_uInt16 GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const = 0; + virtual sal_uInt16 GetItemState( sal_uInt16 nPara, sal_uInt16 nWhich ) const = 0; virtual void QuickInsertText( const String& rText, const ESelection& rSel ) = 0; virtual void QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel ) = 0; virtual void QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel ) = 0; virtual void QuickInsertLineBreak( const ESelection& rSel ) = 0; - virtual XubString CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor ) = 0; - virtual void FieldClicked( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos ) = 0; + virtual XubString CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor ) = 0; + virtual void FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos ) = 0; virtual SfxItemPool* GetPool() const = 0; @@ -178,7 +178,7 @@ public: // implementation functions for XParagraphAppend and XTextPortionAppend virtual void AppendParagraph() = 0; - virtual xub_StrLen AppendTextPortion( USHORT nPara, const String &rText, const SfxItemSet &rSet ) = 0; + virtual xub_StrLen AppendTextPortion( sal_uInt16 nPara, const String &rText, const SfxItemSet &rSet ) = 0; // XTextCopy virtual void CopyText(const SvxTextForwarder& rSource) = 0; @@ -187,7 +187,7 @@ public: @return sal_False, if no longer valid */ - virtual BOOL IsValid() const = 0; + virtual sal_Bool IsValid() const = 0; /** Query language of character at given position on the underlying edit engine @@ -197,14 +197,14 @@ public: @param nIndex[0 .. m-1] Index of character to query language of */ - virtual LanguageType GetLanguage( USHORT nPara, USHORT nIndex ) const = 0; + virtual LanguageType GetLanguage( sal_uInt16 nPara, sal_uInt16 nIndex ) const = 0; /** Query number of fields in the underlying edit engine @param nPara[0 .. n-1] Index of paragraph to query field number in */ - virtual USHORT GetFieldCount( USHORT nPara ) const = 0; + virtual sal_uInt16 GetFieldCount( sal_uInt16 nPara ) const = 0; /** Query information for given field number in the underlying edit engine @@ -214,14 +214,14 @@ public: @param nField[0 .. m-1] Index of field to query information of */ - virtual EFieldInfo GetFieldInfo( USHORT nPara, USHORT nField ) const = 0; + virtual EFieldInfo GetFieldInfo( sal_uInt16 nPara, sal_uInt16 nField ) const = 0; /** Query information regarding bullets for given paragraph on the underlying edit engine @param nPara[0 .. n-1] Index of paragraph to query bullet info on */ - virtual EBulletInfo GetBulletInfo( USHORT nPara ) const = 0; + virtual EBulletInfo GetBulletInfo( sal_uInt16 nPara ) const = 0; /** Query the bounding rectangle of the given character @@ -244,7 +244,7 @@ public: left corner of text. The coordinates returned here are to be interpreted in the map mode given by GetMapMode(). */ - virtual Rectangle GetCharBounds( USHORT nPara, USHORT nIndex ) const = 0; + virtual Rectangle GetCharBounds( sal_uInt16 nPara, sal_uInt16 nIndex ) const = 0; /** Query the bounding rectangle of the given paragraph @@ -255,7 +255,7 @@ public: left corner of text. The coordinates returned here are to be interpreted in the map mode given by GetMapMode(). */ - virtual Rectangle GetParaBounds( USHORT nPara ) const = 0; + virtual Rectangle GetParaBounds( sal_uInt16 nPara ) const = 0; /** Query the map mode of the underlying EditEngine/Outliner @@ -292,7 +292,7 @@ public: @return sal_True, if the point is over any text and both rPara and rIndex are valid */ - virtual sal_Bool GetIndexAtPoint( const Point& rPoint, USHORT& rPara, USHORT& rIndex ) const = 0; + virtual sal_Bool GetIndexAtPoint( const Point& rPoint, sal_uInt16& rPara, sal_uInt16& rIndex ) const = 0; /** Get the start and the end index of the word at the given index @@ -317,7 +317,7 @@ public: @return sal_True, if the result is non-empty */ - virtual sal_Bool GetWordIndices( USHORT nPara, USHORT nIndex, USHORT& rStart, USHORT& rEnd ) const = 0; + virtual sal_Bool GetWordIndices( sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt16& rStart, sal_uInt16& rEnd ) const = 0; /** Query range of similar attributes @@ -334,7 +334,7 @@ public: @return sal_True, if the range has been successfully determined */ - virtual sal_Bool GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const = 0; + virtual sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const = 0; /** Query number of lines in the formatted paragraph @@ -344,7 +344,7 @@ public: @return number of lines in given paragraph */ - virtual USHORT GetLineCount( USHORT nPara ) const = 0; + virtual sal_uInt16 GetLineCount( sal_uInt16 nPara ) const = 0; /** Query line length @@ -355,7 +355,7 @@ public: Index of line in paragraph to query line length of */ - virtual USHORT GetLineLen( USHORT nPara, USHORT nLine ) const = 0; + virtual sal_uInt16 GetLineLen( sal_uInt16 nPara, sal_uInt16 nLine ) const = 0; /** Query bounds of line in paragraph @@ -372,7 +372,7 @@ public: Index of line in paragraph to query line length of */ - virtual void GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const = 0; + virtual void GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nParagraph, sal_uInt16 nLine ) const = 0; /** Query the line number for a index in the paragraphs text @@ -385,7 +385,7 @@ public: @returns [0 .. k-1] The line number of the chara in the paragraph */ - virtual USHORT GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const = 0; + virtual sal_uInt16 GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const = 0; /** Delete given text range and reformat text @@ -414,7 +414,7 @@ public: @return sal_True if text have been successfully reformatted */ - virtual sal_Bool QuickFormatDoc( BOOL bFull=FALSE ) = 0; + virtual sal_Bool QuickFormatDoc( sal_Bool bFull=sal_False ) = 0; /** Get the outline depth of given paragraph @@ -424,7 +424,7 @@ public: @return the outline level of the given paragraph. The range is [0,n), where n is the maximal outline level. */ - virtual sal_Int16 GetDepth( USHORT nPara ) const = 0; + virtual sal_Int16 GetDepth( sal_uInt16 nPara ) const = 0; /** Set the outline depth of given paragraph @@ -435,11 +435,11 @@ public: The depth to set on the given paragraph. The range is [0,n), where n is the maximal outline level. - @return TRUE, if depth could be successfully set. Reasons for + @return sal_True, if depth could be successfully set. Reasons for failure are e.g. the text does not support outline level (EditEngine), or the depth range is exceeded. */ - virtual sal_Bool SetDepth( USHORT nPara, sal_Int16 nNewDepth ) = 0; + virtual sal_Bool SetDepth( sal_uInt16 nPara, sal_Int16 nNewDepth ) = 0; virtual sal_Int16 GetNumberingStartValue( sal_uInt16 nPara ); virtual void SetNumberingStartValue( sal_uInt16 nPara, sal_Int16 nNumberingStartValue ); @@ -463,7 +463,7 @@ public: @return sal_False, if no longer valid */ - virtual BOOL IsValid() const = 0; + virtual sal_Bool IsValid() const = 0; /** Query visible area of the view containing the text diff --git a/editeng/inc/editeng/unofield.hxx b/editeng/inc/editeng/unofield.hxx index 5c004494b7..33f5ae25b6 100644 --- a/editeng/inc/editeng/unofield.hxx +++ b/editeng/inc/editeng/unofield.hxx @@ -87,7 +87,7 @@ public: SvxUnoTextField( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > xAnchor, const ::rtl::OUString& rPresentation, const SvxFieldData* pFieldData ) throw(); virtual ~SvxUnoTextField() throw(); - // Intern + // Internal virtual sal_Int32 GetFieldId( const SvxFieldData* pFieldData ) const throw(); SvxFieldData* CreateFieldData() const throw(); void SetAnchor( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > xAnchor ) { mxAnchor = xAnchor; } diff --git a/editeng/inc/editeng/unofored.hxx b/editeng/inc/editeng/unofored.hxx index b13118c390..3bcf45cb63 100644 --- a/editeng/inc/editeng/unofored.hxx +++ b/editeng/inc/editeng/unofored.hxx @@ -33,7 +33,7 @@ #include <editeng/unoedsrc.hxx> #include "editeng/editengdllapi.h" -// SvxEditEngineForwarder - SvxTextForwarder fuer EditEngine +// SvxEditEngineForwarder - SvxTextForwarder for EditEngine class EDITENG_DLLPUBLIC SvxEditEngineForwarder : public SvxTextForwarder { @@ -44,17 +44,17 @@ public: SvxEditEngineForwarder( EditEngine& rEngine ); virtual ~SvxEditEngineForwarder(); - virtual USHORT GetParagraphCount() const; - virtual USHORT GetTextLen( USHORT nParagraph ) const; + virtual sal_uInt16 GetParagraphCount() const; + virtual sal_uInt16 GetTextLen( sal_uInt16 nParagraph ) const; virtual String GetText( const ESelection& rSel ) const; - virtual SfxItemSet GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib = EditEngineAttribs_All ) const; - virtual SfxItemSet GetParaAttribs( USHORT nPara ) const; - virtual void SetParaAttribs( USHORT nPara, const SfxItemSet& rSet ); + virtual SfxItemSet GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = EditEngineAttribs_All ) const; + virtual SfxItemSet GetParaAttribs( sal_uInt16 nPara ) const; + virtual void SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet ); virtual void RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich ); - virtual void GetPortions( USHORT nPara, SvUShorts& rList ) const; + virtual void GetPortions( sal_uInt16 nPara, SvUShorts& rList ) const; - virtual USHORT GetItemState( const ESelection& rSel, USHORT nWhich ) const; - virtual USHORT GetItemState( USHORT nPara, USHORT nWhich ) const; + virtual sal_uInt16 GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const; + virtual sal_uInt16 GetItemState( sal_uInt16 nPara, sal_uInt16 nWhich ) const; virtual void QuickInsertText( const String& rText, const ESelection& rSel ); virtual void QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel ); @@ -63,36 +63,36 @@ public: virtual SfxItemPool* GetPool() const; - virtual XubString CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor ); - virtual void FieldClicked( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos ); - virtual BOOL IsValid() const; + virtual XubString CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor ); + virtual void FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos ); + virtual sal_Bool IsValid() const; - virtual LanguageType GetLanguage( USHORT, USHORT ) const; - virtual USHORT GetFieldCount( USHORT nPara ) const; - virtual EFieldInfo GetFieldInfo( USHORT nPara, USHORT nField ) const; - virtual EBulletInfo GetBulletInfo( USHORT nPara ) const; - virtual Rectangle GetCharBounds( USHORT nPara, USHORT nIndex ) const; - virtual Rectangle GetParaBounds( USHORT nPara ) const; + virtual LanguageType GetLanguage( sal_uInt16, sal_uInt16 ) const; + virtual sal_uInt16 GetFieldCount( sal_uInt16 nPara ) const; + virtual EFieldInfo GetFieldInfo( sal_uInt16 nPara, sal_uInt16 nField ) const; + virtual EBulletInfo GetBulletInfo( sal_uInt16 nPara ) const; + virtual Rectangle GetCharBounds( sal_uInt16 nPara, sal_uInt16 nIndex ) const; + virtual Rectangle GetParaBounds( sal_uInt16 nPara ) const; virtual MapMode GetMapMode() const; virtual OutputDevice* GetRefDevice() const; - virtual sal_Bool GetIndexAtPoint( const Point&, USHORT& nPara, USHORT& nIndex ) const; - virtual sal_Bool GetWordIndices( USHORT nPara, USHORT nIndex, USHORT& nStart, USHORT& nEnd ) const; - virtual sal_Bool GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const; - virtual USHORT GetLineCount( USHORT nPara ) const; - virtual USHORT GetLineLen( USHORT nPara, USHORT nLine ) const; - virtual void GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const; - virtual USHORT GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const; + virtual sal_Bool GetIndexAtPoint( const Point&, sal_uInt16& nPara, sal_uInt16& nIndex ) const; + virtual sal_Bool GetWordIndices( sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt16& nStart, sal_uInt16& nEnd ) const; + virtual sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const; + virtual sal_uInt16 GetLineCount( sal_uInt16 nPara ) const; + virtual sal_uInt16 GetLineLen( sal_uInt16 nPara, sal_uInt16 nLine ) const; + virtual void GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nParagraph, sal_uInt16 nLine ) const; + virtual sal_uInt16 GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const; virtual sal_Bool Delete( const ESelection& ); virtual sal_Bool InsertText( const String&, const ESelection& ); - virtual sal_Bool QuickFormatDoc( BOOL bFull=FALSE ); - virtual sal_Int16 GetDepth( USHORT nPara ) const; - virtual sal_Bool SetDepth( USHORT nPara, sal_Int16 nNewDepth ); + virtual sal_Bool QuickFormatDoc( sal_Bool bFull=sal_False ); + virtual sal_Int16 GetDepth( sal_uInt16 nPara ) const; + virtual sal_Bool SetDepth( sal_uInt16 nPara, sal_Int16 nNewDepth ); virtual const SfxItemSet* GetEmptyItemSetPtr(); // implementation functions for XParagraphAppend and XTextPortionAppend virtual void AppendParagraph(); - virtual xub_StrLen AppendTextPortion( USHORT nPara, const String &rText, const SfxItemSet &rSet ); + virtual xub_StrLen AppendTextPortion( sal_uInt16 nPara, const String &rText, const SfxItemSet &rSet ); //XTextCopy virtual void CopyText(const SvxTextForwarder& rSource); }; diff --git a/editeng/inc/editeng/unoforou.hxx b/editeng/inc/editeng/unoforou.hxx index 80f053a767..7c17672646 100644 --- a/editeng/inc/editeng/unoforou.hxx +++ b/editeng/inc/editeng/unoforou.hxx @@ -36,13 +36,13 @@ class Outliner; -// SvxOutlinerForwarder - SvxTextForwarder fuer Outliner +// SvxOutlinerForwarder - SvxTextForwarder for Outliner class EDITENG_DLLPUBLIC SvxOutlinerForwarder : public SvxTextForwarder { private: Outliner& rOutliner; - BOOL bOutlinerText; + sal_Bool bOutlinerText; /** this pointer may be null or point to an item set for the attribs of the selection maAttribsSelection */ @@ -56,23 +56,23 @@ private: mutable SfxItemSet* mpParaAttribsCache; /** if we have a cached para attribute item set, this is the paragraph of it */ - mutable USHORT mnParaAttribsCache; + mutable sal_uInt16 mnParaAttribsCache; public: - SvxOutlinerForwarder( Outliner& rOutl, BOOL bOutlText = FALSE ); + SvxOutlinerForwarder( Outliner& rOutl, sal_Bool bOutlText = sal_False ); virtual ~SvxOutlinerForwarder(); - virtual USHORT GetParagraphCount() const; - virtual USHORT GetTextLen( USHORT nParagraph ) const; + virtual sal_uInt16 GetParagraphCount() const; + virtual sal_uInt16 GetTextLen( sal_uInt16 nParagraph ) const; virtual String GetText( const ESelection& rSel ) const; - virtual SfxItemSet GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib = 0 ) const; - virtual SfxItemSet GetParaAttribs( USHORT nPara ) const; - virtual void SetParaAttribs( USHORT nPara, const SfxItemSet& rSet ); + virtual SfxItemSet GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = 0 ) const; + virtual SfxItemSet GetParaAttribs( sal_uInt16 nPara ) const; + virtual void SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet ); virtual void RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich ); - virtual void GetPortions( USHORT nPara, SvUShorts& rList ) const; + virtual void GetPortions( sal_uInt16 nPara, SvUShorts& rList ) const; - virtual USHORT GetItemState( const ESelection& rSel, USHORT nWhich ) const; - virtual USHORT GetItemState( USHORT nPara, USHORT nWhich ) const; + virtual sal_uInt16 GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const; + virtual sal_uInt16 GetItemState( sal_uInt16 nPara, sal_uInt16 nWhich ) const; virtual void QuickInsertText( const String& rText, const ESelection& rSel ); virtual void QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel ); @@ -81,33 +81,33 @@ public: virtual SfxItemPool* GetPool() const; - virtual XubString CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor ); - virtual void FieldClicked( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos ); + virtual XubString CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor ); + virtual void FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos ); - virtual BOOL IsValid() const; + virtual sal_Bool IsValid() const; Outliner& GetOutliner() const { return rOutliner; } - virtual LanguageType GetLanguage( USHORT, USHORT ) const; - virtual USHORT GetFieldCount( USHORT nPara ) const; - virtual EFieldInfo GetFieldInfo( USHORT nPara, USHORT nField ) const; - virtual EBulletInfo GetBulletInfo( USHORT nPara ) const; - virtual Rectangle GetCharBounds( USHORT nPara, USHORT nIndex ) const; - virtual Rectangle GetParaBounds( USHORT nPara ) const; + virtual LanguageType GetLanguage( sal_uInt16, sal_uInt16 ) const; + virtual sal_uInt16 GetFieldCount( sal_uInt16 nPara ) const; + virtual EFieldInfo GetFieldInfo( sal_uInt16 nPara, sal_uInt16 nField ) const; + virtual EBulletInfo GetBulletInfo( sal_uInt16 nPara ) const; + virtual Rectangle GetCharBounds( sal_uInt16 nPara, sal_uInt16 nIndex ) const; + virtual Rectangle GetParaBounds( sal_uInt16 nPara ) const; virtual MapMode GetMapMode() const; virtual OutputDevice* GetRefDevice() const; - virtual sal_Bool GetIndexAtPoint( const Point&, USHORT& nPara, USHORT& nIndex ) const; - virtual sal_Bool GetWordIndices( USHORT nPara, USHORT nIndex, USHORT& nStart, USHORT& nEnd ) const; - virtual sal_Bool GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const; - virtual USHORT GetLineCount( USHORT nPara ) const; - virtual USHORT GetLineLen( USHORT nPara, USHORT nLine ) const; - virtual void GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nPara, USHORT nLine ) const; - virtual USHORT GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const; + virtual sal_Bool GetIndexAtPoint( const Point&, sal_uInt16& nPara, sal_uInt16& nIndex ) const; + virtual sal_Bool GetWordIndices( sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt16& nStart, sal_uInt16& nEnd ) const; + virtual sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const; + virtual sal_uInt16 GetLineCount( sal_uInt16 nPara ) const; + virtual sal_uInt16 GetLineLen( sal_uInt16 nPara, sal_uInt16 nLine ) const; + virtual void GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nPara, sal_uInt16 nLine ) const; + virtual sal_uInt16 GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const; virtual sal_Bool Delete( const ESelection& ); virtual sal_Bool InsertText( const String&, const ESelection& ); - virtual sal_Bool QuickFormatDoc( BOOL bFull=FALSE ); - virtual sal_Int16 GetDepth( USHORT nPara ) const; - virtual sal_Bool SetDepth( USHORT nPara, sal_Int16 nNewDepth ); + virtual sal_Bool QuickFormatDoc( sal_Bool bFull=sal_False ); + virtual sal_Int16 GetDepth( sal_uInt16 nPara ) const; + virtual sal_Bool SetDepth( sal_uInt16 nPara, sal_Int16 nNewDepth ); virtual sal_Int16 GetNumberingStartValue( sal_uInt16 nPara ); virtual void SetNumberingStartValue( sal_uInt16 nPara, sal_Int16 nNumberingStartValue ); @@ -121,7 +121,7 @@ public: // implementation functions for XParagraphAppend and XTextPortionAppend virtual void AppendParagraph(); - virtual xub_StrLen AppendTextPortion( USHORT nPara, const String &rText, const SfxItemSet &rSet ); + virtual xub_StrLen AppendTextPortion( sal_uInt16 nPara, const String &rText, const SfxItemSet &rSet ); //XTextCopy virtual void CopyText(const SvxTextForwarder& rSource); }; diff --git a/editeng/inc/editeng/unoipset.hxx b/editeng/inc/editeng/unoipset.hxx index b5f002d6d9..685d0aa398 100644 --- a/editeng/inc/editeng/unoipset.hxx +++ b/editeng/inc/editeng/unoipset.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -33,11 +33,12 @@ #include <com/sun/star/beans/XPropertySet.hpp> #include "editeng/editengdllapi.h" #include <svl/itemprop.hxx> +#include <vector> -class SvxIDPropertyCombineList; class SdrItemPool; class SfxItemSet; class SvxShape; +struct SvxIDPropertyCombine; #define SFX_METRIC_ITEM (0x40) @@ -46,23 +47,23 @@ class EDITENG_DLLPUBLIC SvxItemPropertySet SfxItemPropertyMap m_aPropertyMap; mutable com::sun::star::uno::Reference<com::sun::star::beans::XPropertySetInfo> m_xInfo; const SfxItemPropertyMapEntry* _pMap; - SvxIDPropertyCombineList* pCombiList; - sal_Bool mbConvertTwips; - SfxItemPool& mrItemPool; + ::std::vector< SvxIDPropertyCombine* > aCombineList; + sal_Bool mbConvertTwips; + SfxItemPool& mrItemPool; public: SvxItemPropertySet( const SfxItemPropertyMapEntry *pMap, SfxItemPool& rPool, sal_Bool bConvertTwips = sal_False ); ~SvxItemPropertySet(); - // Methoden, die direkt mit dem ItemSet arbeiten + // Methods, which work directly with the ItemSet ::com::sun::star::uno::Any getPropertyValue( const SfxItemPropertySimpleEntry* pMap, const SfxItemSet& rSet, bool bSearchInParent, bool bDontConvertNegativeValues ) const; void setPropertyValue( const SfxItemPropertySimpleEntry* pMap, const ::com::sun::star::uno::Any& rVal, SfxItemSet& rSet, bool bDontConvertNegativeValues ) const; - // Methoden, die stattdessen Any benutzen + // Methods that use Any instead ::com::sun::star::uno::Any getPropertyValue( const SfxItemPropertySimpleEntry* pMap ) const; void setPropertyValue( const SfxItemPropertySimpleEntry* pMap, const ::com::sun::star::uno::Any& rVal ) const; - sal_Bool AreThereOwnUsrAnys() const { return (pCombiList ? sal_True : sal_False); } + sal_Bool AreThereOwnUsrAnys() const { return ( aCombineList.empty() ? sal_False : sal_True ); } ::com::sun::star::uno::Any* GetUsrAnyForID(sal_uInt16 nWID) const; void AddUsrAnyForID(const ::com::sun::star::uno::Any& rAny, sal_uInt16 nWID); void ClearAllUsrAny(); diff --git a/editeng/inc/editeng/unolingu.hxx b/editeng/inc/editeng/unolingu.hxx index e50884e4de..b521917188 100644 --- a/editeng/inc/editeng/unolingu.hxx +++ b/editeng/inc/editeng/unolingu.hxx @@ -55,17 +55,17 @@ class Window; class SvxLinguConfigUpdate { - static INT32 nCurrentDataFilesChangedCheckValue; - static INT16 nNeedUpdating; // n == -1 => needs to be checked + static sal_Int32 nCurrentDataFilesChangedCheckValue; + static sal_Int16 nNeedUpdating; // n == -1 => needs to be checked // n == 0 => already updated, nothing to be done // n == 1 => needs to be updated - static INT32 CalcDataFilesChangedCheckValue(); + static sal_Int32 CalcDataFilesChangedCheckValue(); public: EDITENG_DLLPUBLIC static void UpdateAll( sal_Bool bForceCheck = sal_False ); - static BOOL IsNeedUpdateAll( sal_Bool bForceCheck = sal_False ); + static sal_Bool IsNeedUpdateAll( sal_Bool bForceCheck = sal_False ); }; /////////////////////////////////////////////////////////////////////////// @@ -155,15 +155,15 @@ struct SvxAlternativeSpelling String aReplacement; ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XHyphenatedWord > xHyphWord; - INT16 nChangedPos, + sal_Int16 nChangedPos, nChangedLength; - BOOL bIsAltSpelling; + sal_Bool bIsAltSpelling; inline SvxAlternativeSpelling(); }; inline SvxAlternativeSpelling::SvxAlternativeSpelling() : - nChangedPos(-1), nChangedLength(-1), bIsAltSpelling(FALSE) + nChangedPos(-1), nChangedLength(-1), bIsAltSpelling(sal_False) { } @@ -193,7 +193,7 @@ public: /////////////////////////////////////////////////////////////////////////// -//TL:TODO: remove those functions or make them inline +//TODO: remove those functions or make them inline EDITENG_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XSpellChecker1 > SvxGetSpellChecker(); EDITENG_DLLPUBLIC ::com::sun::star::uno::Reference< @@ -204,7 +204,7 @@ EDITENG_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XDictionaryList > SvxGetDictionaryList(); EDITENG_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SvxGetLinguPropertySet(); -//TL:TODO: remove argument or provide SvxGetIgnoreAllList with the same one +//TODO: remove argument or provide SvxGetIgnoreAllList with the same one EDITENG_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XDictionary > SvxGetOrCreatePosDic( ::com::sun::star::uno::Reference< diff --git a/editeng/inc/editeng/unonrule.hxx b/editeng/inc/editeng/unonrule.hxx index f7d0592c45..9b5e80b7ff 100644 --- a/editeng/inc/editeng/unonrule.hxx +++ b/editeng/inc/editeng/unonrule.hxx @@ -81,7 +81,7 @@ public: virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(com::sun::star::uno::RuntimeException); virtual com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(com::sun::star::uno::RuntimeException); - // intern + // internal com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> getNumberingRuleByIndex( sal_Int32 nIndex) const throw(); void setNumberingRuleByIndex( const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& rProperties, sal_Int32 nIndex) throw( com::sun::star::uno::RuntimeException, com::sun::star::lang::IllegalArgumentException ); diff --git a/editeng/inc/editeng/unoprnms.hxx b/editeng/inc/editeng/unoprnms.hxx index 625ccfa00d..8adbc60f36 100644 --- a/editeng/inc/editeng/unoprnms.hxx +++ b/editeng/inc/editeng/unoprnms.hxx @@ -258,7 +258,7 @@ #define UNO_NAME_3D_TEXTUREPOLYGON3D "D3DTexturePolygon3D" #define UNO_NAME_3D_LINEONLY "D3DLineOnly" -// #107245# New 3D properties which are possible for lathe and extrude 3d objects +// New 3D properties which are possible for lathe and extrude 3d objects #define UNO_NAME_3D_SMOOTH_NORMALS "D3DSmoothNormals" #define UNO_NAME_3D_SMOOTH_LIDS "D3DSmoothLids" #define UNO_NAME_3D_CHARACTER_MODE "D3DCharacterMode" @@ -357,7 +357,7 @@ #define UNO_NAME_CUSTOMSHAPE_ADJUSTMENT "CustomShapeAdjustment" -// Die folgenden Properties sind veraltet und koennen irgendwann mal raus +// The following properties are obsolete and can eventually be removed #define UNO_NAME_EDIT_FONT_COLOR "FontColor" #define UNO_NAME_EDIT_FONT_ESCAPEMENT "FontEscapement" #define UNO_NAME_EDIT_FONT_HEIGHT "FontHeight" @@ -370,7 +370,7 @@ #define UNO_NAME_EDIT_FONT_FAMILY "FontFamily" #define UNO_NAME_EDIT_FONT_NAME "FontName" #define UNO_NAME_EDIT_FONT_CHARSET "FontCharset" -// Ende der veralteten Properties +// End of the obsolete properties #endif diff --git a/editeng/inc/editeng/unotext.hxx b/editeng/inc/editeng/unotext.hxx index ebd0576934..3489944ba4 100644 --- a/editeng/inc/editeng/unotext.hxx +++ b/editeng/inc/editeng/unotext.hxx @@ -56,6 +56,7 @@ #include <cppuhelper/interfacecontainer.h> #include <cppuhelper/weak.hxx> #include <cppuhelper/weakagg.hxx> +#include <osl/diagnose.hxx> #include <osl/mutex.hxx> #include <comphelper/servicehelper.hxx> #include <tools/link.hxx> @@ -173,8 +174,8 @@ EDITENG_DLLPUBLIC void GetSelection( struct ESelection& rSel, SvxTextForwarder* EDITENG_DLLPUBLIC void CheckSelection( struct ESelection& rSel, SvxTextForwarder* pForwarder ) throw(); // ==================================================================== -// Diese Klasse implementiert eine SvxEditSource und einen SvxTextForwarder -// und macht ansonsten rein garnichts +// This class implements a SvxEditSource and SvxTextForwarder and does +// nothing otherwise // ==================================================================== class SvxDummyTextSource : public SvxEditSource, public SvxTextForwarder @@ -191,7 +192,7 @@ public: virtual sal_uInt16 GetParagraphCount() const; virtual sal_uInt16 GetTextLen( sal_uInt16 nParagraph ) const; virtual String GetText( const ESelection& rSel ) const; - virtual SfxItemSet GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib = 0 ) const; + virtual SfxItemSet GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = 0 ) const; virtual SfxItemSet GetParaAttribs( sal_uInt16 nPara ) const; virtual void SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet ); virtual void RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich ); @@ -208,37 +209,37 @@ public: virtual void QuickInsertLineBreak( const ESelection& rSel ); virtual XubString CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor ); - virtual void FieldClicked( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos ); + virtual void FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos ); virtual sal_Bool IsValid() const; virtual void SetNotifyHdl( const Link& ); - virtual LanguageType GetLanguage( USHORT, USHORT ) const; - virtual USHORT GetFieldCount( USHORT nPara ) const; - virtual EFieldInfo GetFieldInfo( USHORT nPara, USHORT nField ) const; - virtual EBulletInfo GetBulletInfo( USHORT nPara ) const; - virtual Rectangle GetCharBounds( USHORT nPara, USHORT nIndex ) const; - virtual Rectangle GetParaBounds( USHORT nPara ) const; + virtual LanguageType GetLanguage( sal_uInt16, sal_uInt16 ) const; + virtual sal_uInt16 GetFieldCount( sal_uInt16 nPara ) const; + virtual EFieldInfo GetFieldInfo( sal_uInt16 nPara, sal_uInt16 nField ) const; + virtual EBulletInfo GetBulletInfo( sal_uInt16 nPara ) const; + virtual Rectangle GetCharBounds( sal_uInt16 nPara, sal_uInt16 nIndex ) const; + virtual Rectangle GetParaBounds( sal_uInt16 nPara ) const; virtual MapMode GetMapMode() const; virtual OutputDevice* GetRefDevice() const; - virtual sal_Bool GetIndexAtPoint( const Point&, USHORT& nPara, USHORT& nIndex ) const; - virtual sal_Bool GetWordIndices( USHORT nPara, USHORT nIndex, USHORT& nStart, USHORT& nEnd ) const; - virtual sal_Bool GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const; - virtual USHORT GetLineCount( USHORT nPara ) const; - virtual USHORT GetLineLen( USHORT nPara, USHORT nLine ) const; - virtual void GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const; - virtual USHORT GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const; + virtual sal_Bool GetIndexAtPoint( const Point&, sal_uInt16& nPara, sal_uInt16& nIndex ) const; + virtual sal_Bool GetWordIndices( sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt16& nStart, sal_uInt16& nEnd ) const; + virtual sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const; + virtual sal_uInt16 GetLineCount( sal_uInt16 nPara ) const; + virtual sal_uInt16 GetLineLen( sal_uInt16 nPara, sal_uInt16 nLine ) const; + virtual void GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nParagraph, sal_uInt16 nLine ) const; + virtual sal_uInt16 GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const; virtual sal_Bool Delete( const ESelection& ); virtual sal_Bool InsertText( const String&, const ESelection& ); - virtual sal_Bool QuickFormatDoc( BOOL bFull=FALSE ); - virtual sal_Int16 GetDepth( USHORT nPara ) const; - virtual sal_Bool SetDepth( USHORT nPara, sal_Int16 nNewDepth ); + virtual sal_Bool QuickFormatDoc( sal_Bool bFull=sal_False ); + virtual sal_Int16 GetDepth( sal_uInt16 nPara ) const; + virtual sal_Bool SetDepth( sal_uInt16 nPara, sal_Int16 nNewDepth ); virtual const SfxItemSet* GetEmptyItemSetPtr(); // implementation functions for XParagraphAppend and XTextPortionAppend virtual void AppendParagraph(); - virtual xub_StrLen AppendTextPortion( USHORT nPara, const String &rText, const SfxItemSet &rSet ); + virtual xub_StrLen AppendTextPortion( sal_uInt16 nPara, const String &rText, const SfxItemSet &rSet ); //XTextCopy virtual void CopyText(const SvxTextForwarder& rSource); }; @@ -256,7 +257,8 @@ class EDITENG_DLLPUBLIC SvxUnoTextRangeBase : public ::com::sun::star::text::XTe public ::com::sun::star::beans::XPropertyState, public ::com::sun::star::lang::XServiceInfo, public ::com::sun::star::text::XTextRangeCompare, - public ::com::sun::star::lang::XUnoTunnel + public ::com::sun::star::lang::XUnoTunnel, + private osl::DebugBase<SvxUnoTextRangeBase> { friend class SvxUnoTextRangeEnumeration; @@ -371,9 +373,6 @@ private: ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParentText; sal_Bool mbPortion; -protected: - static ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > maTypeSequence; - public: SvxUnoTextRange( const SvxUnoTextBase& rParent, sal_Bool bPortion = sal_False ) throw(); virtual ~SvxUnoTextRange() throw(); @@ -404,7 +403,6 @@ class EDITENG_DLLPUBLIC SvxUnoTextBase : public SvxUnoTextRangeBase, { protected: ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParentText; - static ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > maTypeSequence; public: SvxUnoTextBase( ) throw(); @@ -539,8 +537,6 @@ private: bool mbDisposing; protected: - static ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > maTypeSequence; - using SvxUnoTextRangeBase::setPropertyValue; using SvxUnoTextRangeBase::getPropertyValue; @@ -628,9 +624,6 @@ class EDITENG_DLLPUBLIC SvxUnoTextCursor : public SvxUnoTextRangeBase, private: ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > mxParentText; -protected: - static ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > maTypeSequence; - public: SvxUnoTextCursor( const SvxUnoTextBase& rText ) throw(); SvxUnoTextCursor( const SvxUnoTextCursor& rCursor ) throw(); diff --git a/editeng/inc/editeng/unoviwed.hxx b/editeng/inc/editeng/unoviwed.hxx index 7e023fd377..62e6215178 100644 --- a/editeng/inc/editeng/unoviwed.hxx +++ b/editeng/inc/editeng/unoviwed.hxx @@ -45,7 +45,7 @@ public: SvxEditEngineViewForwarder( EditView& rView ); virtual ~SvxEditEngineViewForwarder(); - virtual BOOL IsValid() const; + virtual sal_Bool IsValid() const; virtual Rectangle GetVisArea() const; virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const; diff --git a/editeng/inc/editeng/unoviwou.hxx b/editeng/inc/editeng/unoviwou.hxx index b0efc092b8..da28f8d05d 100644 --- a/editeng/inc/editeng/unoviwou.hxx +++ b/editeng/inc/editeng/unoviwou.hxx @@ -48,7 +48,7 @@ public: SvxDrawOutlinerViewForwarder( OutlinerView& rOutl, const Point& rShapePosTopLeft ); virtual ~SvxDrawOutlinerViewForwarder(); - virtual BOOL IsValid() const; + virtual sal_Bool IsValid() const; virtual Rectangle GetVisArea() const; virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const; diff --git a/editeng/inc/editeng/wghtitem.hxx b/editeng/inc/editeng/wghtitem.hxx index 8a77027bfe..adbe0ab806 100644 --- a/editeng/inc/editeng/wghtitem.hxx +++ b/editeng/inc/editeng/wghtitem.hxx @@ -42,9 +42,9 @@ namespace rtl // class SvxWeightItem --------------------------------------------------- -/* [Beschreibung] +/* [Description] - Dieses Item beschreibt die Font-Staerke. + This item describes the font weight. */ class EDITENG_DLLPUBLIC SvxWeightItem : public SfxEnumItem @@ -53,26 +53,26 @@ public: TYPEINFO(); SvxWeightItem( const FontWeight eWght /*= WEIGHT_NORMAL*/, - const USHORT nId ); + const sal_uInt16 nId ); - // "pure virtual Methoden" vom SfxPoolItem + SfxEnumItem + // "pure virtual Methods" from SfxPoolItem + SfxEnumItem virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText, const IntlWrapper * = 0 ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; - virtual String GetValueTextByPos( USHORT nPos ) const; - virtual USHORT GetValueCount() const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; + virtual String GetValueTextByPos( sal_uInt16 nPos ) const; + virtual sal_uInt16 GetValueCount() const; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual int HasBoolValue() const; - virtual BOOL GetBoolValue() const; - virtual void SetBoolValue( BOOL bVal ); + virtual sal_Bool GetBoolValue() const; + virtual void SetBoolValue( sal_Bool bVal ); inline SvxWeightItem& operator=(const SvxWeightItem& rWeight) { SetValue( rWeight.GetValue() ); @@ -83,7 +83,7 @@ public: FontWeight GetWeight() const { return (FontWeight)GetValue(); } void SetWeight( FontWeight eNew ) - { SetValue( (USHORT)eNew ); } + { SetValue( (sal_uInt16)eNew ); } }; #endif // #ifndef _SVX_WGHTITEM_HXX diff --git a/editeng/inc/editeng/widwitem.hxx b/editeng/inc/editeng/widwitem.hxx index f8aaeba29e..0e280288c2 100644 --- a/editeng/inc/editeng/widwitem.hxx +++ b/editeng/inc/editeng/widwitem.hxx @@ -41,9 +41,9 @@ namespace rtl // class SvxWidowsItem --------------------------------------------------- -/* -[Beschreibung] -Dieses Item beschreibt die Anzahl der Zeilen fuer die Hurenkinderregelung. +/* [Description] + + This item describes the number of lines for the widows control. */ class EDITENG_DLLPUBLIC SvxWidowsItem: public SfxByteItem @@ -52,12 +52,12 @@ class EDITENG_DLLPUBLIC SvxWidowsItem: public SfxByteItem public: TYPEINFO(); - SvxWidowsItem( const BYTE nL /*= 0*/, const USHORT nId ); + SvxWidowsItem( const sal_uInt8 nL /*= 0*/, const sal_uInt16 nId ); - // "pure virtual Methoden" vom SfxPoolItem + // "pure virtual Methods" from SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create( SvStream &, USHORT ) const; - virtual SvStream& Store( SvStream & , USHORT nItemVersion ) const; + virtual SfxPoolItem* Create( SvStream &, sal_uInt16 ) const; + virtual SvStream& Store( SvStream & , sal_uInt16 nItemVersion ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, diff --git a/editeng/inc/editeng/writingmodeitem.hxx b/editeng/inc/editeng/writingmodeitem.hxx index a7d569d158..89efe83bce 100644 --- a/editeng/inc/editeng/writingmodeitem.hxx +++ b/editeng/inc/editeng/writingmodeitem.hxx @@ -42,15 +42,15 @@ public: TYPEINFO(); SvxWritingModeItem( ::com::sun::star::text::WritingMode eValue /*= com::sun::star::text::WritingMode_LR_TB*/, - USHORT nWhich /*= SDRATTR_TEXTDIRECTION*/ ); + sal_uInt16 nWhich /*= SDRATTR_TEXTDIRECTION*/ ); virtual ~SvxWritingModeItem(); SvxWritingModeItem& operator=( const SvxWritingModeItem& rItem ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream & rStrm, USHORT nIVer) const; - virtual USHORT GetVersion( USHORT nFileVersion ) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream & rStrm, sal_uInt16 nIVer) const; + virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const; virtual int operator==( const SfxPoolItem& ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, @@ -59,10 +59,8 @@ public: String &rText, const IntlWrapper * = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, - BYTE nMemberId ); - virtual bool QueryValue( com::sun::star::uno::Any& rVal, - BYTE nMemberId ) const; + virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); }; #endif // #ifndef _SVX_WRITINGMODEITEM_HXX diff --git a/editeng/inc/editeng/wrlmitem.hxx b/editeng/inc/editeng/wrlmitem.hxx index de29f41368..9226fca3ef 100644 --- a/editeng/inc/editeng/wrlmitem.hxx +++ b/editeng/inc/editeng/wrlmitem.hxx @@ -41,10 +41,10 @@ namespace rtl // class SvxWordLineModeItem --------------------------------------------- -/* [Beschreibung] +/* [Description] - Dieses Item beschreibt, ob Unterstrichen und Durchgestrichen auf - Wortgrenzen beschraenkt ist. + This item describes, whether underlined and strikethrough is limited + to word boundaries. */ class EDITENG_DLLPUBLIC SvxWordLineModeItem : public SfxBoolItem @@ -52,13 +52,13 @@ class EDITENG_DLLPUBLIC SvxWordLineModeItem : public SfxBoolItem public: TYPEINFO(); - SvxWordLineModeItem( const BOOL bWordLineMode /*= FALSE*/, - const USHORT nId ); + SvxWordLineModeItem( const sal_Bool bWordLineMode /*= sal_False*/, + const sal_uInt16 nId ); - // "pure virtual Methoden" vom SfxPoolItem + // "pure virtual Methods" from SfxPoolItem virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; + virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const; + virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, diff --git a/editeng/inc/editeng/xmlcnitm.hxx b/editeng/inc/editeng/xmlcnitm.hxx index 0c048c7c3c..f4469fb93e 100644 --- a/editeng/inc/editeng/xmlcnitm.hxx +++ b/editeng/inc/editeng/xmlcnitm.hxx @@ -63,8 +63,8 @@ public: virtual sal_uInt16 GetVersion( sal_uInt16 nFileFormatVersion ) const; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); virtual SfxPoolItem *Clone( SfxItemPool * = 0) const { return new SvXMLAttrContainerItem( *this ); } diff --git a/editeng/inc/helpid.hrc b/editeng/inc/helpid.hrc index 32c109aad2..83a7288c52 100644..100755 --- a/editeng/inc/helpid.hrc +++ b/editeng/inc/helpid.hrc @@ -6,9 +6,6 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: helpid.hrc,v $ - * $Revision: 1.78 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -30,52 +27,31 @@ #ifndef _EDITENG_HELPID_HRC #define _EDITENG_HELPID_HRC -// include --------------------------------------------------------------- - -#include <svl/solar.hrc> - -// Help-Ids -------------------------------------------------------------- -#define HID_EDITENG_SPELLER_WORDLANGUAGE (HID_EDIT_START) -#define HID_EDITENG_SPELLER_PARALANGUAGE (HID_EDIT_START + 1) -#define HID_EDITENG_SPELLER_ADDWORD (HID_EDIT_START + 2) -#define HID_EDITENG_SPELLER_AUTOCORRECT (HID_EDIT_START + 3) -#define HID_EDITENG_SPELLER_IGNORE (HID_EDIT_START + 4) -#define HID_EDITENG_SPELLER_START (HID_EDIT_START + 5) -#define HID_AUTOCORR_HELP_END (HID_EDIT_START + 6) -#define HID_AUTOCORR_HELP_START (HID_EDIT_START + 7) -#define HID_AUTOCORR_HELP_WORD HID_AUTOCORR_HELP_START - -#define HID_AUTOCORR_HELP_SENT (HID_AUTOCORR_HELP_START+1) -#define HID_AUTOCORR_HELP_SENTWORD (HID_AUTOCORR_HELP_START+2) -#define HID_AUTOCORR_HELP_ACORWORD (HID_AUTOCORR_HELP_START+3) - -#define HID_AUTOCORR_HELP_ACORSENTWORD (HID_AUTOCORR_HELP_START+5) - -#define HID_AUTOCORR_HELP_CHGTOENEMDASH (HID_AUTOCORR_HELP_START+7) -#define HID_AUTOCORR_HELP_WORDENEMDASH (HID_AUTOCORR_HELP_START+8) -#define HID_AUTOCORR_HELP_SENTENEMDASH (HID_AUTOCORR_HELP_START+9) -#define HID_AUTOCORR_HELP_SENTWORDENEMDASH (HID_AUTOCORR_HELP_START+10) -#define HID_AUTOCORR_HELP_ACORWORDENEMDASH (HID_AUTOCORR_HELP_START+11) - -#define HID_AUTOCORR_HELP_ACORSENTWORDENEMDASH (HID_AUTOCORR_HELP_START+13) -#define HID_AUTOCORR_HELP_CHGQUOTES (HID_AUTOCORR_HELP_START+15) -#define HID_AUTOCORR_HELP_CHGSGLQUOTES (HID_AUTOCORR_HELP_START+16) -#define HID_AUTOCORR_HELP_SETINETATTR (HID_AUTOCORR_HELP_START+17) -#define HID_AUTOCORR_HELP_INGNOREDOUBLESPACE (HID_AUTOCORR_HELP_START+18) -#define HID_AUTOCORR_HELP_CHGWEIGHTUNDERL (HID_AUTOCORR_HELP_START+19) -#define HID_AUTOCORR_HELP_CHGFRACTIONSYMBOL (HID_AUTOCORR_HELP_START+20) -#define HID_AUTOCORR_HELP_CHGORDINALNUMBER (HID_AUTOCORR_HELP_START+21) // HID_EDIT_START + 28 - -// please adjust ACT_SVX_HID_END2 below if you add entries here! - -// ----------------------------------------------------------------------- -// Overrun check --------------------------------------------------------- -// ----------------------------------------------------------------------- - -#define ACT_SVX_HID_END (HID_EDIT_START+28) -#if ACT_SVX_HID_END > HID_EDIT_END -#error Resource-Ueberlauf in #line, #file -#endif +#define HID_EDITENG_SPELLER_WORDLANGUAGE "EDITENG_HID_EDITENG_SPELLER_WORDLANGUAGE" +#define HID_EDITENG_SPELLER_PARALANGUAGE "EDITENG_HID_EDITENG_SPELLER_PARALANGUAGE" +#define HID_EDITENG_SPELLER_ADDWORD "EDITENG_HID_EDITENG_SPELLER_ADDWORD" +#define HID_EDITENG_SPELLER_AUTOCORRECT "EDITENG_HID_EDITENG_SPELLER_AUTOCORRECT" +#define HID_EDITENG_SPELLER_IGNORE "EDITENG_HID_EDITENG_SPELLER_IGNORE" +#define HID_EDITENG_SPELLER_START "EDITENG_HID_EDITENG_SPELLER_START" + +#define HID_AUTOCORR_HELP_WORD "EDITENG_HID_AUTOCORR_HELP_START" +#define HID_AUTOCORR_HELP_SENT "EDITENG_HID_AUTOCORR_HELP_SENT" +#define HID_AUTOCORR_HELP_SENTWORD "EDITENG_HID_AUTOCORR_HELP_SENTWORD" +#define HID_AUTOCORR_HELP_ACORWORD "EDITENG_HID_AUTOCORR_HELP_ACORWORD" +#define HID_AUTOCORR_HELP_ACORSENTWORD "EDITENG_HID_AUTOCORR_HELP_ACORSENTWORD" +#define HID_AUTOCORR_HELP_CHGTOENEMDASH "EDITENG_HID_AUTOCORR_HELP_CHGTOENEMDASH" +#define HID_AUTOCORR_HELP_WORDENEMDASH "EDITENG_HID_AUTOCORR_HELP_WORDENEMDASH" +#define HID_AUTOCORR_HELP_SENTENEMDASH "EDITENG_HID_AUTOCORR_HELP_SENTENEMDASH" +#define HID_AUTOCORR_HELP_SENTWORDENEMDASH "EDITENG_HID_AUTOCORR_HELP_SENTWORDENEMDASH" +#define HID_AUTOCORR_HELP_ACORWORDENEMDASH "EDITENG_HID_AUTOCORR_HELP_ACORWORDENEMDASH" +#define HID_AUTOCORR_HELP_ACORSENTWORDENEMDASH "EDITENG_HID_AUTOCORR_HELP_ACORSENTWORDENEMDASH" +#define HID_AUTOCORR_HELP_CHGQUOTES "EDITENG_HID_AUTOCORR_HELP_CHGQUOTES" +#define HID_AUTOCORR_HELP_CHGSGLQUOTES "EDITENG_HID_AUTOCORR_HELP_CHGSGLQUOTES" +#define HID_AUTOCORR_HELP_SETINETATTR "EDITENG_HID_AUTOCORR_HELP_SETINETATTR" +#define HID_AUTOCORR_HELP_INGNOREDOUBLESPACE "EDITENG_HID_AUTOCORR_HELP_INGNOREDOUBLESPACE" +#define HID_AUTOCORR_HELP_CHGWEIGHTUNDERL "EDITENG_HID_AUTOCORR_HELP_CHGWEIGHTUNDERL" +#define HID_AUTOCORR_HELP_CHGFRACTIONSYMBOL "EDITENG_HID_AUTOCORR_HELP_CHGFRACTIONSYMBOL" +#define HID_AUTOCORR_HELP_CHGORDINALNUMBER "EDITENG_HID_AUTOCORR_HELP_CHGORDINALNUMBER" #endif diff --git a/editeng/inc/makefile.mk b/editeng/inc/makefile.mk deleted file mode 100644 index 6ecb444e03..0000000000 --- a/editeng/inc/makefile.mk +++ /dev/null @@ -1,52 +0,0 @@ -#************************************************************************* -# -# 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: makefile.mk,v $ -# -# $Revision: 1.5 $ -# -# 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. -# -#************************************************************************* - -PRJ=.. - -PRJNAME=editeng -TARGET=inc - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -.INCLUDE : target.mk - -.IF "$(ENABLE_PCH)"!="" -ALLTAR : \ - $(SLO)$/precompiled.pch \ - $(SLO)$/precompiled_ex.pch - -.ENDIF # "$(ENABLE_PCH)"!="" - diff --git a/editeng/inc/pch/precompiled_editeng.cxx b/editeng/inc/pch/precompiled_editeng.cxx index 3fe7dcce13..2b5afa0f3c 100644 --- a/editeng/inc/pch/precompiled_editeng.cxx +++ b/editeng/inc/pch/precompiled_editeng.cxx @@ -7,9 +7,6 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: precompiled_svx.cxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/editeng/inc/pch/precompiled_editeng.hxx b/editeng/inc/pch/precompiled_editeng.hxx index 197fb4644f..57cd0397f3 100644 --- a/editeng/inc/pch/precompiled_editeng.hxx +++ b/editeng/inc/pch/precompiled_editeng.hxx @@ -7,9 +7,6 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: precompiled_svx.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -672,7 +669,7 @@ #include "rtl/logfile.hxx" #include "rtl/math.hxx" #include "rtl/memory.h" -#include "rlt/ref.hxx" +#include "rtl/ref.hxx" #include "rtl/tencinfo.h" #include "rtl/textenc.h" #include "rtl/ustrbuf.hxx" @@ -689,7 +686,7 @@ #include "sot/formats.hxx" #include <map> #include <set> -#include <slist> +#include <list> #include <vector> #include "svtools/FilterConfigItem.hxx" #include "svtools/accessibilityoptions.hxx" @@ -697,7 +694,6 @@ #include "svtools/apearcfg.hxx" #include "svl/brdcst.hxx" #include "unotools/cacheoptions.hxx" -#include "svl/cancel.hxx" #include "svl/cjkoptions.hxx" #include "unotools/cmdoptions.hxx" #include "svl/cntwall.hxx" @@ -742,7 +738,6 @@ #include "svtools/parhtml.hxx" #include "svtools/parrtf.hxx" #include "unotools/pathoptions.hxx" -#include "svl/pickerhelper.hxx" #include "svl/poolitem.hxx" #include "unotools/printwarningoptions.hxx" #include "svl/ptitem.hxx" @@ -800,7 +795,6 @@ #include "tools/inetdef.hxx" #include "tools/line.hxx" #include "tools/link.hxx" -#include "tools/list.hxx" #include "tools/multisel.hxx" #include "tools/poly.hxx" #include "tools/rc.h" @@ -858,7 +852,7 @@ #include "vcl/cursor.hxx" #include "vcl/decoview.hxx" #include "vcl/dndhelp.hxx" -#include "vcl/fldunit.hxx" +#include "tools/fldunit.hxx" #include "vcl/fntstyle.hxx" #include "unotools/fontcvt.hxx" #include "vcl/gdimtf.hxx" @@ -877,7 +871,7 @@ #include "vcl/unohelp.hxx" #include "vcl/unohelp2.hxx" #include "vcl/wall.hxx" -#include "vcl/wintypes.hxx" +#include "tools/wintypes.hxx" #include "xmloff/DashStyle.hxx" #include "xmloff/GradientStyle.hxx" #include "xmloff/HatchStyle.hxx" |