diff options
Diffstat (limited to 'editeng')
229 files changed, 2694 insertions, 2019 deletions
diff --git a/editeng/inc/editeng.hrc b/editeng/inc/editeng.hrc deleted file mode 100644 index 66fcf0cb92..0000000000 --- a/editeng/inc/editeng.hrc +++ /dev/null @@ -1,43 +0,0 @@ -/************************************************************************* - * - * 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 - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _EDITENG_HRC -#define _EDITENG_HRC - -#include <editeng/editrids.hrc> - -#define MN_SPELLING 1 -#define MN_INSERT 2 -#define MN_IGNORE 3 -#define MN_AUTOCORR 4 -#define MN_WORDLANGUAGE 5 -#define MN_PARALANGUAGE 6 - -#define MN_ALTSTART 1000 -#define MN_AUTOSTART 2000 -#define MN_DICTSTART 3000 - -#endif // _EDITENG_HRC diff --git a/editeng/inc/editeng/AccessibleComponentBase.hxx b/editeng/inc/editeng/AccessibleComponentBase.hxx index b4a596c3b2..d2b41b9f63 100644 --- a/editeng/inc/editeng/AccessibleComponentBase.hxx +++ b/editeng/inc/editeng/AccessibleComponentBase.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -145,3 +146,5 @@ public: } // end of namespace accessibility #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/AccessibleContextBase.hxx b/editeng/inc/editeng/AccessibleContextBase.hxx index e5fdd015c8..b3ae2c1b42 100644 --- a/editeng/inc/editeng/AccessibleContextBase.hxx +++ b/editeng/inc/editeng/AccessibleContextBase.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -398,3 +399,5 @@ private: } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/AccessibleEditableTextPara.hxx b/editeng/inc/editeng/AccessibleEditableTextPara.hxx index 3bf863862a..365290ac80 100644 --- a/editeng/inc/editeng/AccessibleEditableTextPara.hxx +++ b/editeng/inc/editeng/AccessibleEditableTextPara.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -79,13 +80,12 @@ namespace accessibility public: /// Create accessible object for given parent - // --> OD 2006-01-11 #i27138# + // #i27138# // - add parameter <_pParaManager> (default value NULL) // This has to be the the instance of <AccessibleParaManager>, which // created and manages this accessible paragraph. AccessibleEditableTextPara ( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rParent, const AccessibleParaManager* _pParaManager = NULL ); - // <-- virtual ~AccessibleEditableTextPara (); @@ -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 @@ -417,3 +417,4 @@ namespace accessibility #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/AccessibleImageBullet.hxx b/editeng/inc/editeng/AccessibleImageBullet.hxx index a8c2b9d08f..444917fede 100644 --- a/editeng/inc/editeng/AccessibleImageBullet.hxx +++ b/editeng/inc/editeng/AccessibleImageBullet.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -32,9 +33,7 @@ #include <cppuhelper/weakref.hxx> #include <cppuhelper/implbase5.hxx> -#ifndef _CPPUHELPER_INTERFACECONTAINER_H_ #include <cppuhelper/interfacecontainer.hxx> -#endif #include <com/sun/star/uno/Reference.hxx> #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/accessibility/XAccessible.hpp> @@ -235,3 +234,4 @@ namespace accessibility #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/AccessibleParaManager.hxx b/editeng/inc/editeng/AccessibleParaManager.hxx index f2e8b77e78..e3c538ba6a 100644 --- a/editeng/inc/editeng/AccessibleParaManager.hxx +++ b/editeng/inc/editeng/AccessibleParaManager.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -345,3 +346,4 @@ namespace accessibility #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/AccessibleSelectionBase.hxx b/editeng/inc/editeng/AccessibleSelectionBase.hxx index 867ee7e603..fd39bd960a 100644 --- a/editeng/inc/editeng/AccessibleSelectionBase.hxx +++ b/editeng/inc/editeng/AccessibleSelectionBase.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -71,3 +72,5 @@ namespace accessibility } #endif // _SVX_ACCESSIBILITY_ACCESSIBLE_SELECTION_BASE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/AccessibleStringWrap.hxx b/editeng/inc/editeng/AccessibleStringWrap.hxx index 9e951b9765..b833e091ba 100644 --- a/editeng/inc/editeng/AccessibleStringWrap.hxx +++ b/editeng/inc/editeng/AccessibleStringWrap.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -61,3 +62,5 @@ private: }; #endif /* _ACCESSIBLESTRINGWRAP_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/SpellPortions.hxx b/editeng/inc/editeng/SpellPortions.hxx index 846ac8d4f1..e13aed8a26 100644 --- a/editeng/inc/editeng/SpellPortions.hxx +++ b/editeng/inc/editeng/SpellPortions.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -93,3 +94,5 @@ struct SpellPortion typedef std::vector<SpellPortion> SpellPortions; }//namespace svx #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/UnoForbiddenCharsTable.hxx b/editeng/inc/editeng/UnoForbiddenCharsTable.hxx index afc0bd04e9..f34e2d260e 100644 --- a/editeng/inc/editeng/UnoForbiddenCharsTable.hxx +++ b/editeng/inc/editeng/UnoForbiddenCharsTable.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,7 +31,7 @@ #include <com/sun/star/i18n/XForbiddenCharacters.hpp> #include <com/sun/star/linguistic2/XSupportedLocales.hpp> -#include <vos/ref.hxx> +#include <rtl/ref.hxx> #include <cppuhelper/implbase2.hxx> #include "editeng/editengdllapi.h" @@ -45,10 +46,10 @@ protected: /** this virtual function is called if the forbidden characters are changed */ virtual void onChange(); - vos::ORef<SvxForbiddenCharactersTable> mxForbiddenChars; + rtl::Reference<SvxForbiddenCharactersTable> mxForbiddenChars; public: - SvxUnoForbiddenCharsTable(vos::ORef<SvxForbiddenCharactersTable> xForbiddenChars); + SvxUnoForbiddenCharsTable(rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars); ~SvxUnoForbiddenCharsTable(); // XForbiddenCharacters @@ -63,3 +64,5 @@ public: }; #endif // _SVX_UNOFORBIDDENCHARSTABLE_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/acorrcfg.hxx b/editeng/inc/editeng/acorrcfg.hxx index ea1a6e5c56..b9a9e7b75a 100644 --- a/editeng/inc/editeng/acorrcfg.hxx +++ b/editeng/inc/editeng/acorrcfg.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -31,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 @@ -50,7 +49,6 @@ 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 @@ -131,3 +129,5 @@ public: #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/adjitem.hxx b/editeng/inc/editeng/adjitem.hxx index f72c8eb568..1e1545352f 100644 --- a/editeng/inc/editeng/adjitem.hxx +++ b/editeng/inc/editeng/adjitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -70,8 +71,8 @@ public: // "pure virtual Methoden" vom SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + 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 SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -141,3 +142,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/akrnitem.hxx b/editeng/inc/editeng/akrnitem.hxx index af4daaea70..6bcf6a3bee 100644 --- a/editeng/inc/editeng/akrnitem.hxx +++ b/editeng/inc/editeng/akrnitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -72,3 +73,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/blnkitem.hxx b/editeng/inc/editeng/blnkitem.hxx index 20eec33466..304f0f50f7 100644 --- a/editeng/inc/editeng/blnkitem.hxx +++ b/editeng/inc/editeng/blnkitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -70,3 +71,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/bolnitem.hxx b/editeng/inc/editeng/bolnitem.hxx index 4e21750de0..af1b6a0bba 100644 --- a/editeng/inc/editeng/bolnitem.hxx +++ b/editeng/inc/editeng/bolnitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -56,8 +57,8 @@ public: ~SvxLineItem(); SvxLineItem &operator=( const SvxLineItem& rLine ); - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + 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 int operator==( const SfxPoolItem& ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -67,8 +68,8 @@ public: virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; virtual SfxPoolItem* Create(SvStream &, USHORT) const; virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; - virtual int ScaleMetrics( long nMult, long nDiv ); - virtual int HasMetrics() const; + virtual bool ScaleMetrics( long nMult, long nDiv ); + virtual bool HasMetrics() const; const SvxBorderLine* GetLine () const { return pLine; } void SetLine ( const SvxBorderLine *pNew ); @@ -81,3 +82,5 @@ private: #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/borderline.hxx b/editeng/inc/editeng/borderline.hxx index 78d173b021..a4fd47c54d 100644 --- a/editeng/inc/editeng/borderline.hxx +++ b/editeng/inc/editeng/borderline.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -97,9 +98,11 @@ protected: USHORT nOutWidth; USHORT nInWidth; USHORT nDistance; + SvxBorderStyle m_nStyle; public: - SvxBorderLine( const Color *pCol = 0, USHORT nOut = 0, USHORT nIn = 0, USHORT nDist = 0 ); + 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 ); @@ -109,10 +112,13 @@ public: 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; @@ -132,3 +138,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/boxitem.hxx b/editeng/inc/editeng/boxitem.hxx index d85f7c2dcd..45b32c617e 100644 --- a/editeng/inc/editeng/boxitem.hxx +++ b/editeng/inc/editeng/boxitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -70,8 +71,8 @@ public: // "pure virtual Methoden" vom SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + 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 SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -83,8 +84,8 @@ public: virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; virtual USHORT GetVersion( USHORT nFileVersion ) const; - virtual int ScaleMetrics( long nMult, long nDiv ); - virtual int HasMetrics() const; + virtual bool ScaleMetrics( long nMult, long nDiv ); + virtual bool HasMetrics() const; const SvxBorderLine* GetTop() const { return pTop; } const SvxBorderLine* GetBottom() const { return pBottom; } @@ -185,14 +186,14 @@ public: SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText, const IntlWrapper * = 0 ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + 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* Clone( SfxItemPool *pPool = 0 ) const; virtual SfxPoolItem* Create(SvStream &, USHORT) const; virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; - virtual int ScaleMetrics( long nMult, long nDiv ); - virtual int HasMetrics() const; + virtual bool ScaleMetrics( long nMult, long nDiv ); + virtual bool HasMetrics() const; const SvxBorderLine* GetHori() const { return pHori; } const SvxBorderLine* GetVert() const { return pVert; } @@ -224,3 +225,4 @@ public: }; #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/brkitem.hxx b/editeng/inc/editeng/brkitem.hxx index 206f4598b4..1409f31520 100644 --- a/editeng/inc/editeng/brkitem.hxx +++ b/editeng/inc/editeng/brkitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -59,8 +60,8 @@ public: // "pure virtual Methoden" vom SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + 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 SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -101,3 +102,4 @@ inline SvxFmtBreakItem& SvxFmtBreakItem::operator=( #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/brshitem.hxx b/editeng/inc/editeng/brshitem.hxx index 837dd87e23..025c39161e 100644 --- a/editeng/inc/editeng/brshitem.hxx +++ b/editeng/inc/editeng/brshitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -99,8 +100,8 @@ public: String &rText, const IntlWrapper * = 0 ) const; virtual int operator==( const SfxPoolItem& ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + 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* Clone( SfxItemPool *pPool = 0 ) const; virtual SfxPoolItem* Create( SvStream&, USHORT nVersion ) const; @@ -138,3 +139,4 @@ public: #endif // #ifndef _SVX_BRSHITEM_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/bulitem.hxx b/editeng/inc/editeng/bulitem.hxx index 2f2bd994cd..ea41ef5e5f 100644 --- a/editeng/inc/editeng/bulitem.hxx +++ b/editeng/inc/editeng/bulitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -158,3 +159,5 @@ public: #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/charhiddenitem.hxx b/editeng/inc/editeng/charhiddenitem.hxx index b6debc4285..0e4ae84bf2 100644 --- a/editeng/inc/editeng/charhiddenitem.hxx +++ b/editeng/inc/editeng/charhiddenitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -59,3 +60,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/charreliefitem.hxx b/editeng/inc/editeng/charreliefitem.hxx index 3d5b36fa59..376090a536 100644 --- a/editeng/inc/editeng/charreliefitem.hxx +++ b/editeng/inc/editeng/charreliefitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -64,9 +65,9 @@ public: String &rText, const IntlWrapper * = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, + virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId ); - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, + virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId ) const; inline SvxCharReliefItem& operator=( const SvxCharReliefItem& rItem ) @@ -78,3 +79,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/charrotateitem.hxx b/editeng/inc/editeng/charrotateitem.hxx index a8eaca8c68..f085beb2fe 100644 --- a/editeng/inc/editeng/charrotateitem.hxx +++ b/editeng/inc/editeng/charrotateitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -64,9 +65,9 @@ public: String &rText, const IntlWrapper * = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, + virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId ); - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, + virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId ) const; inline SvxCharRotateItem& operator=( const SvxCharRotateItem& rItem ) @@ -90,3 +91,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/charscaleitem.hxx b/editeng/inc/editeng/charscaleitem.hxx index 925e84a1eb..6c6e0db5b5 100644 --- a/editeng/inc/editeng/charscaleitem.hxx +++ b/editeng/inc/editeng/charscaleitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -61,9 +62,9 @@ public: String &rText, const IntlWrapper * = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, + virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId ); - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, + virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId ) const; inline SvxCharScaleWidthItem& operator=(const SvxCharScaleWidthItem& rItem ) @@ -76,3 +77,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/cmapitem.hxx b/editeng/inc/editeng/cmapitem.hxx index 94fb80ae04..b436b1e1f3 100644 --- a/editeng/inc/editeng/cmapitem.hxx +++ b/editeng/inc/editeng/cmapitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -81,9 +82,10 @@ public: { return (SvxCaseMap)GetValue(); } void SetCaseMap( SvxCaseMap eNew ) { SetValue( (USHORT)eNew ); } - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + 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 ); }; #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/cntritem.hxx b/editeng/inc/editeng/cntritem.hxx index 7ca2faac28..d1b4bfeb87 100644 --- a/editeng/inc/editeng/cntritem.hxx +++ b/editeng/inc/editeng/cntritem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -66,3 +67,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/colritem.hxx b/editeng/inc/editeng/colritem.hxx index 6c73008213..c71829bcee 100644 --- a/editeng/inc/editeng/colritem.hxx +++ b/editeng/inc/editeng/colritem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -64,8 +65,8 @@ public: // "pure virtual Methoden" vom SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + 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 SfxItemPresentation GetPresentation( SfxItemPresentation ePres, @@ -93,3 +94,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/crsditem.hxx b/editeng/inc/editeng/crsditem.hxx index c62f5bd246..6c832f503c 100644 --- a/editeng/inc/editeng/crsditem.hxx +++ b/editeng/inc/editeng/crsditem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -65,8 +66,8 @@ public: virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; virtual String GetValueTextByPos( USHORT nPos ) const; virtual USHORT GetValueCount() const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + 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 ) @@ -91,3 +92,4 @@ public: #endif // #ifndef _SVX_CRSDITEM_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/cscoitem.hxx b/editeng/inc/editeng/cscoitem.hxx index 144bab81cd..4ddbfe32df 100644 --- a/editeng/inc/editeng/cscoitem.hxx +++ b/editeng/inc/editeng/cscoitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -73,3 +74,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/editdata.hxx b/editeng/inc/editeng/editdata.hxx index d39dc25c75..6d252b336a 100644 --- a/editeng/inc/editeng/editdata.hxx +++ b/editeng/inc/editeng/editdata.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -386,3 +387,5 @@ struct EENotify }; #endif // _MyEDITDATA_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/editeng.hxx b/editeng/inc/editeng/editeng.hxx index 3ba1e820aa..300cd322ca 100755 --- a/editeng/inc/editeng/editeng.hxx +++ b/editeng/inc/editeng/editeng.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -53,6 +54,7 @@ class Rectangle; class SvStream; class Link; class OutputDevice; +class Window; class SvUShorts; class SfxPoolItem; class SvxNumBulletItem; @@ -63,7 +65,7 @@ class SvxForbiddenCharactersTable; class SvxNumberFormat; class FontList; -#include <vos/ref.hxx> +#include <rtl/ref.hxx> #include <vector> #include <com/sun/star/uno/Reference.h> @@ -373,8 +375,8 @@ public: void SetHyphenator( ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XHyphenator >& xHyph ); - void SetForbiddenCharsTable( vos::ORef<SvxForbiddenCharactersTable> xForbiddenChars ); - vos::ORef<SvxForbiddenCharactersTable> GetForbiddenCharsTable() const; + void SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars ); + rtl::Reference<SvxForbiddenCharactersTable> GetForbiddenCharsTable() const; void SetDefaultLanguage( LanguageType eLang ); LanguageType GetDefaultLanguage() const; @@ -443,6 +445,14 @@ public: const Color& rOverlineColor, const Color& rTextLineColor); + virtual void DrawingTab( + const Point& rStartPos, long nWidth, const String& rChar, + const SvxFont& rFont, USHORT nPara, xub_StrLen nIndex, BYTE nRightToLeft, + bool bEndOfLine, + bool bEndOfParagraph, + const Color& rOverlineColor, + const Color& rTextLineColor); + virtual String GetUndoComment( USHORT nUndoId ) const; virtual BOOL FormattingParagraph( USHORT nPara ); virtual BOOL SpellNextDocument(); @@ -485,3 +495,5 @@ public: }; #endif // _MyEDITENG_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/pch/precompiled_editeng.cxx b/editeng/inc/editeng/editengdllapi.h.orig index 888d78efa1..a2fca4f87a 100644 --- a/editeng/inc/pch/precompiled_editeng.cxx +++ b/editeng/inc/editeng/editengdllapi.h.orig @@ -6,8 +6,8 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: precompiled_svx.cxx,v $ - * $Revision: 1.3 $ + * $RCSfile: editengdllapi.h,v $ + * $Revision: 1.4 $ * * This file is part of OpenOffice.org. * @@ -28,5 +28,16 @@ * ************************************************************************/ -#include "precompiled_editeng.hxx" +#ifndef INCLUDED_EDITENGDLLAPI_H +#define INCLUDED_EDITENGDLLAPI_H +#include "sal/types.h" + +#if defined(EDITENG_DLLIMPLEMENTATION) +#define EDITENG_DLLPUBLIC SAL_DLLPUBLIC_EXPORT +#else +#define EDITENG_DLLPUBLIC SAL_DLLPUBLIC_IMPORT +#endif +#define EDITENG_DLLPRIVATE SAL_DLLPRIVATE + +#endif diff --git a/editeng/inc/editeng/editerr.hxx b/editeng/inc/editeng/editerr.hxx index 7ded1075db..d98d6eba4f 100644 --- a/editeng/inc/editeng/editerr.hxx +++ b/editeng/inc/editeng/editerr.hxx @@ -2,7 +2,7 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * diff --git a/editeng/inc/editeng/editobj.hxx b/editeng/inc/editeng/editobj.hxx index 3a64a5914a..c995ea2565 100644 --- a/editeng/inc/editeng/editobj.hxx +++ b/editeng/inc/editeng/editobj.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -124,3 +125,5 @@ public: }; #endif // _EDITOBJ_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/editstat.hxx b/editeng/inc/editeng/editstat.hxx index 230ace8bf3..15de80a6a0 100644 --- a/editeng/inc/editeng/editstat.hxx +++ b/editeng/inc/editeng/editstat.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -88,7 +89,7 @@ EE_STAT_CRSRLEFTPARA zur Zeit bei Cursorbewegungen und Return. */ -inline void SetFlags( ULONG& rBits, const ULONG nMask, FASTBOOL bOn ) +inline void SetFlags( ULONG& rBits, const ULONG nMask, bool bOn ) { if ( bOn ) rBits |= nMask; @@ -107,7 +108,7 @@ public: EditStatus() { nStatusBits = 0; nControlBits = 0; nPrevPara = 0xFFFF; } void Clear() { nStatusBits = 0; } - void SetControlBits( ULONG nMask, FASTBOOL bOn ) + void SetControlBits( ULONG nMask, bool bOn ) { SetFlags( nControlBits, nMask, bOn ); } ULONG GetStatusWord() const { return nStatusBits; } @@ -148,3 +149,4 @@ struct SpellCallbackInfo #endif // _EDITSTAT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/editund2.hxx b/editeng/inc/editeng/editund2.hxx index dc2c81b831..a4c7917ec8 100644 --- a/editeng/inc/editeng/editund2.hxx +++ b/editeng/inc/editeng/editund2.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -74,3 +75,4 @@ public: #endif // _EDITUND2_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/editview.hxx b/editeng/inc/editeng/editview.hxx index 761f2821af..aab021794f 100644 --- a/editeng/inc/editeng/editview.hxx +++ b/editeng/inc/editeng/editview.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -145,7 +146,7 @@ public: void InsertText( const String& rNew, BOOL bSelect = FALSE ); - BOOL PostKeyEvent( const KeyEvent& rKeyEvent ); + BOOL PostKeyEvent( const KeyEvent& rKeyEvent, Window* pFrameWin = NULL ); BOOL MouseButtonUp( const MouseEvent& rMouseEvent ); BOOL MouseButtonDown( const MouseEvent& rMouseEvent ); @@ -208,7 +209,7 @@ public: BOOL MatchGroup(); - void CompleteAutoCorrect(); + void CompleteAutoCorrect( Window* pFrameWin = NULL ); EESpellState StartSpeller( BOOL bMultipleDoc = FALSE ); EESpellState StartThesaurus(); @@ -248,3 +249,5 @@ public: }; #endif // _MyEDITVIEW_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/eeitemid.hxx b/editeng/inc/editeng/eeitemid.hxx index 736fafd7fc..3e28e0e5e1 100644 --- a/editeng/inc/editeng/eeitemid.hxx +++ b/editeng/inc/editeng/eeitemid.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -134,3 +135,4 @@ #endif //_EEITEMID_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/emphitem.hxx b/editeng/inc/editeng/emphitem.hxx index 915320d797..2715f5057e 100644 --- a/editeng/inc/editeng/emphitem.hxx +++ b/editeng/inc/editeng/emphitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -66,9 +67,9 @@ public: virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; virtual USHORT GetVersion( USHORT nFileVersion ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, + virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, + virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); inline SvxEmphasisMarkItem& operator=(const SvxEmphasisMarkItem& rItem ) @@ -86,3 +87,4 @@ public: #endif // #ifndef _SVX_EMPHITEM_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/escpitem.hxx b/editeng/inc/editeng/escpitem.hxx index ecdc6e31da..f37f763b74 100644 --- a/editeng/inc/editeng/escpitem.hxx +++ b/editeng/inc/editeng/escpitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -72,8 +73,8 @@ public: SfxMapUnit ePresMetric, String &rText, const IntlWrapper * = 0 ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + 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* Clone( SfxItemPool *pPool = 0 ) const; virtual SfxPoolItem* Create(SvStream &, USHORT) const; @@ -112,3 +113,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/fhgtitem.hxx b/editeng/inc/editeng/fhgtitem.hxx index e4cbb86ef2..e4305a6ed1 100644 --- a/editeng/inc/editeng/fhgtitem.hxx +++ b/editeng/inc/editeng/fhgtitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -63,8 +64,8 @@ public: // "pure virtual Methoden" vom SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + 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 SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -75,8 +76,8 @@ public: virtual SfxPoolItem* Create(SvStream &, USHORT) const; virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; virtual USHORT GetVersion( USHORT nItemVersion) const; - virtual int ScaleMetrics( long nMult, long nDiv ); - virtual int HasMetrics() const; + virtual bool ScaleMetrics( long nMult, long nDiv ); + virtual bool HasMetrics() const; inline SvxFontHeightItem& operator=(const SvxFontHeightItem& rSize) { @@ -114,3 +115,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/flditem.hxx b/editeng/inc/editeng/flditem.hxx index ee15fb3d4f..6a680b070b 100644 --- a/editeng/inc/editeng/flditem.hxx +++ b/editeng/inc/editeng/flditem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -425,3 +426,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/flstitem.hxx b/editeng/inc/editeng/flstitem.hxx index c16b8128bb..b2d35dd040 100644 --- a/editeng/inc/editeng/flstitem.hxx +++ b/editeng/inc/editeng/flstitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -61,7 +62,7 @@ public: virtual int operator==( const SfxPoolItem& ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -77,3 +78,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/fontitem.hxx b/editeng/inc/editeng/fontitem.hxx index ed251fd519..c0ac85b1da 100644 --- a/editeng/inc/editeng/fontitem.hxx +++ b/editeng/inc/editeng/fontitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -72,8 +73,8 @@ public: virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; virtual SfxPoolItem* Create(SvStream &, USHORT) const; virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + 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 SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -116,3 +117,4 @@ EDITENG_DLLPUBLIC void GetDefaultFonts( SvxFontItem& rLatin, SvxFontItem& rAsian #endif // #ifndef _SVX_FONTITEM_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/forbiddencharacterstable.hxx b/editeng/inc/editeng/forbiddencharacterstable.hxx index 07a3b37595..872fdef4d1 100644 --- a/editeng/inc/editeng/forbiddencharacterstable.hxx +++ b/editeng/inc/editeng/forbiddencharacterstable.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,11 +29,9 @@ #ifndef _FORBIDDENCHARACTERSTABLE_HXX #define _FORBIDDENCHARACTERSTABLE_HXX -#ifndef _TABLE_HXX //autogen #include <tools/table.hxx> -#endif -#include <vos/refernce.hxx> +#include <salhelper/simplereferenceobject.hxx> #include <com/sun/star/uno/Reference.hxx> #include <com/sun/star/i18n/ForbiddenCharacters.hpp> #include "editeng/editengdllapi.h" @@ -54,9 +53,9 @@ DECLARE_TABLE( SvxForbiddenCharactersTableImpl, ForbiddenCharactersInfo* ) class EDITENG_DLLPUBLIC SvxForbiddenCharactersTable : public SvxForbiddenCharactersTableImpl, public vos::OReference { -private: +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(); @@ -68,3 +67,4 @@ public: #endif // _FORBIDDENCHARACTERSTABLE_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/forbiddenruleitem.hxx b/editeng/inc/editeng/forbiddenruleitem.hxx index afc86474a3..f1fb7fd37b 100644 --- a/editeng/inc/editeng/forbiddenruleitem.hxx +++ b/editeng/inc/editeng/forbiddenruleitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -67,3 +68,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/frmdir.hxx b/editeng/inc/editeng/frmdir.hxx index 7831ab84ae..a2006b6be9 100644 --- a/editeng/inc/editeng/frmdir.hxx +++ b/editeng/inc/editeng/frmdir.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -58,3 +59,4 @@ enum SvxFrameDirection #endif // #ifndef _SVX_FRMDIR_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/frmdiritem.hxx b/editeng/inc/editeng/frmdiritem.hxx index fe46b5c21b..1420ee4b6a 100644 --- a/editeng/inc/editeng/frmdiritem.hxx +++ b/editeng/inc/editeng/frmdiritem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -64,9 +65,9 @@ public: String &rText, const IntlWrapper * = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, + virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId ); - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, + virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId ) const; inline SvxFrameDirectionItem& operator=( const SvxFrameDirectionItem& rItem ) @@ -78,3 +79,4 @@ public: #endif // #ifndef _SVX_FRMDIRITEM_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/fwdtitem.hxx b/editeng/inc/editeng/fwdtitem.hxx index d8dfecaf30..cbf4a7071a 100644 --- a/editeng/inc/editeng/fwdtitem.hxx +++ b/editeng/inc/editeng/fwdtitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -54,8 +55,8 @@ public: // "pure virtual Methoden" vom SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + 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 SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -65,8 +66,8 @@ public: virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; virtual SfxPoolItem* Create(SvStream &, USHORT) const; virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; - virtual int ScaleMetrics( long nMult, long nDiv ); - virtual int HasMetrics() const; + virtual bool ScaleMetrics( long nMult, long nDiv ); + virtual bool HasMetrics() const; inline SvxFontWidthItem& operator=(const SvxFontWidthItem& rItem ) { @@ -106,3 +107,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/hangulhanja.hxx b/editeng/inc/editeng/hangulhanja.hxx index 8843133034..15a80b5e8c 100644 --- a/editeng/inc/editeng/hangulhanja.hxx +++ b/editeng/inc/editeng/hangulhanja.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -300,3 +301,5 @@ namespace editeng //............................................................................. #endif // SVX_HANGUL_HANJA_CONVERSION_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/hngpnctitem.hxx b/editeng/inc/editeng/hngpnctitem.hxx index fe56817bc8..4dcafd2845 100644 --- a/editeng/inc/editeng/hngpnctitem.hxx +++ b/editeng/inc/editeng/hngpnctitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -67,3 +68,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/hyznitem.hxx b/editeng/inc/editeng/hyznitem.hxx index 2ae3ffcf93..f586b1818e 100644 --- a/editeng/inc/editeng/hyznitem.hxx +++ b/editeng/inc/editeng/hyznitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -64,8 +65,8 @@ public: // "pure virtual Methoden" vom SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + 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 SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -104,3 +105,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/itemtype.hxx b/editeng/inc/editeng/itemtype.hxx index eca02c7684..8dd7edb220 100644 --- a/editeng/inc/editeng/itemtype.hxx +++ b/editeng/inc/editeng/itemtype.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -73,3 +74,4 @@ inline long Scale( long nVal, long nMult, long nDiv ) #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/justifyitem.hxx b/editeng/inc/editeng/justifyitem.hxx new file mode 100644 index 0000000000..d6046073b1 --- /dev/null +++ b/editeng/inc/editeng/justifyitem.hxx @@ -0,0 +1,130 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * 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 + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __EDITENG_JUSTIFYITEM_HXX__ +#define __EDITENG_JUSTIFYITEM_HXX__ + +#include "editeng/editengdllapi.h" +#include "editeng/svxenum.hxx" +#include <svl/eitem.hxx> +#include <sal/types.h> + +class EDITENG_DLLPUBLIC SvxHorJustifyItem: public SfxEnumItem +{ +public: + TYPEINFO(); + + SvxHorJustifyItem( const USHORT nId ); + + SvxHorJustifyItem( + const SvxCellHorJustify eJustify /*= SVX_HOR_JUSTIFY_STANDARD*/, + const USHORT 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 USHORT GetValueCount() const; + virtual String GetValueText( USHORT nVal ) const; + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create( SvStream& rStream, USHORT nVer ) const; + + inline SvxHorJustifyItem& operator=(const SvxHorJustifyItem& rHorJustify) + { + SetValue( rHorJustify.GetValue() ); + return *this; + } +}; + +//------------------------------------------------------------------------ + +class EDITENG_DLLPUBLIC SvxVerJustifyItem: public SfxEnumItem +{ +public: + TYPEINFO(); + + SvxVerJustifyItem( const USHORT nId ); + + SvxVerJustifyItem( + const SvxCellVerJustify eJustify /*= SVX_VER_JUSTIFY_STANDARD*/, + const USHORT 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 USHORT GetValueCount() const; + virtual String GetValueText( USHORT nVal ) const; + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create( SvStream& rStream, USHORT nVer ) const; + + inline SvxVerJustifyItem& operator=(const SvxVerJustifyItem& rVerJustify) + { + SetValue( rVerJustify.GetValue() ); + return *this; + } +}; + +//------------------------------------------------------------------------ + +class EDITENG_DLLPUBLIC SvxJustifyMethodItem: public SfxEnumItem +{ +public: + SvxJustifyMethodItem( const USHORT nId ); + + SvxJustifyMethodItem( + const SvxCellJustifyMethod eMethod, + const USHORT 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 USHORT GetValueCount() const; + virtual String GetValueText( USHORT nVal ) const; + virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; + virtual SfxPoolItem* Create( SvStream& rStream, USHORT nVer ) const; + + SvxJustifyMethodItem& operator=(const SvxJustifyMethodItem& r); +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/keepitem.hxx b/editeng/inc/editeng/keepitem.hxx index c95944a2c9..b98aff4dfc 100644 --- a/editeng/inc/editeng/keepitem.hxx +++ b/editeng/inc/editeng/keepitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -76,3 +77,4 @@ inline SvxFmtKeepItem& SvxFmtKeepItem::operator=( const SvxFmtKeepItem& rKeep ) #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/kernitem.hxx b/editeng/inc/editeng/kernitem.hxx index 1766c7ba8f..d6463784f6 100644 --- a/editeng/inc/editeng/kernitem.hxx +++ b/editeng/inc/editeng/kernitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -59,8 +60,8 @@ public: virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; virtual SfxPoolItem* Create(SvStream &, USHORT) const; virtual SvStream& Store(SvStream &, USHORT nItemVersion) const; - virtual int ScaleMetrics( long nMult, long nDiv ); - virtual int HasMetrics() const; + virtual bool ScaleMetrics( long nMult, long nDiv ); + virtual bool HasMetrics() const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -72,9 +73,10 @@ 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, BYTE nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); }; #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/langitem.hxx b/editeng/inc/editeng/langitem.hxx index da70a1d9e6..4d4ddf272a 100644 --- a/editeng/inc/editeng/langitem.hxx +++ b/editeng/inc/editeng/langitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -76,9 +77,10 @@ public: { return (LanguageType)GetValue(); } void SetLanguage( const LanguageType eLang ) { SetValue( (USHORT)eLang ); } - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + 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 ); }; #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/lcolitem.hxx b/editeng/inc/editeng/lcolitem.hxx index 468a003c10..00b116f1f0 100644 --- a/editeng/inc/editeng/lcolitem.hxx +++ b/editeng/inc/editeng/lcolitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -63,3 +64,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/lrspitem.hxx b/editeng/inc/editeng/lrspitem.hxx index 7f5dbfc1dd..d0e03995a7 100644 --- a/editeng/inc/editeng/lrspitem.hxx +++ b/editeng/inc/editeng/lrspitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -87,8 +88,8 @@ public: // "pure virtual Methoden" vom SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + 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 SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -99,8 +100,8 @@ public: virtual SfxPoolItem* Create(SvStream &, USHORT) const; virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; virtual USHORT GetVersion( USHORT nFileVersion ) const; - virtual int ScaleMetrics( long nMult, long nDiv ); - virtual int HasMetrics() 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 ); @@ -177,3 +178,4 @@ inline void SvxLRSpaceItem::SetTxtLeft( const long nL, const USHORT nProp ) #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/lspcitem.hxx b/editeng/inc/editeng/lspcitem.hxx index 659e61864e..edc631f646 100644 --- a/editeng/inc/editeng/lspcitem.hxx +++ b/editeng/inc/editeng/lspcitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -70,8 +71,8 @@ public: // "pure virtual Methoden" vom SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + 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 SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -121,3 +122,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/mutxhelp.hxx b/editeng/inc/editeng/mutxhelp.hxx index 73c4690850..72cff69e3c 100644 --- a/editeng/inc/editeng/mutxhelp.hxx +++ b/editeng/inc/editeng/mutxhelp.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -42,3 +43,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/nhypitem.hxx b/editeng/inc/editeng/nhypitem.hxx index fbc9697887..2ffcffccf1 100644 --- a/editeng/inc/editeng/nhypitem.hxx +++ b/editeng/inc/editeng/nhypitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -66,3 +67,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/nlbkitem.hxx b/editeng/inc/editeng/nlbkitem.hxx index 391819eb6f..f498cf500c 100644 --- a/editeng/inc/editeng/nlbkitem.hxx +++ b/editeng/inc/editeng/nlbkitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -71,3 +72,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/numdef.hxx b/editeng/inc/editeng/numdef.hxx index c2a7e3915b..4e5b901990 100644 --- a/editeng/inc/editeng/numdef.hxx +++ b/editeng/inc/editeng/numdef.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,3 +29,4 @@ #define SVX_MAX_NUM 10 // max. moegliche Numerierungsebenen #define SVX_DEF_BULLET (0xF000 + 149)// Charakter fuer Aufzaehlungen +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/numitem.hxx b/editeng/inc/editeng/numitem.hxx index 48d91bb83e..20150247d3 100644 --- a/editeng/inc/editeng/numitem.hxx +++ b/editeng/inc/editeng/numitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -103,7 +104,6 @@ public: class EDITENG_DLLPUBLIC SvxNumberFormat : public SvxNumberType { public: - // --> OD 2008-01-08 #newlistlevelattrs# enum SvxNumPositionAndSpaceMode { LABEL_WIDTH_AND_POSITION, @@ -115,7 +115,6 @@ public: SPACE, NOTHING }; - // <-- private: String sPrefix; @@ -130,7 +129,6 @@ private: USHORT nBulletRelSize; //proz. Groesse des Bullets Color nBulletColor; //Bullet color - // --> OD 2008-01-08 #newlistlevelattrs# // mode indicating, if the position and spacing of the list label is // determined by the former attributes (nFirstLineOffset, nAbsLSpace, // nLSpace and nCharTextDistance) called position and spacing via label @@ -141,14 +139,12 @@ private: // Note 2: The values of the former attributes are treated as 0, if mode // 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 - // --> OD 2008-01-08 #newlistlevelattrs# // specifies what follows the list label before the text of the first line // of the list item starts SvxNumLabelFollowedBy meLabelFollowedBy; @@ -158,7 +154,6 @@ private: long mnFirstLineIndent; // 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 @@ -173,10 +168,8 @@ private: DECL_STATIC_LINK( SvxNumberFormat, GraphicArrived, void * ); virtual void NotifyGraphicArrived(); public: - // --> OD 2008-01-09 #newlistlevelattrs# SvxNumberFormat( sal_Int16 nNumberingType, SvxNumPositionAndSpaceMode ePositionAndSpaceMode = LABEL_WIDTH_AND_POSITION ); - // <-- SvxNumberFormat(const SvxNumberFormat& rFormat); SvxNumberFormat(SvStream &rStream); @@ -220,29 +213,18 @@ public: void SetGraphicSize(const Size& rSet) {aGraphicSize = rSet;} const Size& GetGraphicSize() const {return aGraphicSize;} - // --> OD 2008-01-09 #newlistlevelattrs# SvxNumPositionAndSpaceMode GetPositionAndSpaceMode() const; void SetPositionAndSpaceMode( SvxNumPositionAndSpaceMode ePositionAndSpaceMode ); - // <-- void SetLSpace(short nSet) {nLSpace = nSet;} - // --> OD 2008-01-09 #newlistlevelattrs# short GetLSpace() const; - // <-- void SetAbsLSpace(short nSet) {nAbsLSpace = nSet;} - // --> OD 2008-01-09 #newlistlevelattrs# short GetAbsLSpace() const; - // <-- void SetFirstLineOffset(short nSet) { nFirstLineOffset = nSet;} - // --> OD 2008-01-09 #newlistlevelattrs# short GetFirstLineOffset() const; - // <-- void SetCharTextDistance(short nSet) { nCharTextDistance = nSet; } - // --> OD 2008-01-09 #newlistlevelattrs# short GetCharTextDistance() const; - // <-- - // --> OD 2008-01-09 #newlistlevelattrs# void SetLabelFollowedBy( const SvxNumLabelFollowedBy eLabelFollowedBy ); SvxNumLabelFollowedBy GetLabelFollowedBy() const; void SetListtabPos( const long nListtabPos ); @@ -251,7 +233,6 @@ public: long GetFirstLineIndent() const; void SetIndentAt( const long nIndentAt ); long GetIndentAt() const; - // <-- static Size GetGraphicSizeMM100(const Graphic* pGraphic); static String CreateRomanString( ULONG nNo, BOOL bUpper ); @@ -278,7 +259,6 @@ class EDITENG_DLLPUBLIC SvxNumRule static sal_Int32 nRefCount; com::sun::star::lang::Locale aLocale; public: - // --> OD 2008-02-11 #newlistlevelattrs# SvxNumRule( ULONG nFeatures, USHORT nLevels, BOOL bCont, @@ -286,7 +266,6 @@ public: SvxNumberFormat::SvxNumPositionAndSpaceMode eDefaultNumberFormatPositionAndSpaceMode = SvxNumberFormat::LABEL_WIDTH_AND_POSITION ); - // <-- SvxNumRule(const SvxNumRule& rCopy); SvxNumRule(SvStream &rStream); virtual ~SvxNumRule(); @@ -341,12 +320,10 @@ public: SvxNumRule* GetNumRule() const {return pNumRule;} - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + 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 ); }; -/* -----------------28.10.98 15:21------------------- - * - * --------------------------------------------------*/ + class SvxNodeNum { USHORT nLevelVal[ SVX_MAX_NUM ]; // Nummern aller Levels @@ -394,3 +371,4 @@ SvxNumRule* SvxConvertNumRule( const SvxNumRule* pRule, USHORT nLevel, SvxNumRul #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/opaqitem.hxx b/editeng/inc/editeng/opaqitem.hxx index e302c9b9de..1ba364836a 100644 --- a/editeng/inc/editeng/opaqitem.hxx +++ b/editeng/inc/editeng/opaqitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -79,3 +80,4 @@ inline SvxOpaqueItem &SvxOpaqueItem::operator=( const SvxOpaqueItem &rCpy ) #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/optitems.hxx b/editeng/inc/editeng/optitems.hxx index 8776693516..fc4e23d040 100644 --- a/editeng/inc/editeng/optitems.hxx +++ b/editeng/inc/editeng/optitems.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -109,3 +110,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/orphitem.hxx b/editeng/inc/editeng/orphitem.hxx index cf05974672..d975116832 100644 --- a/editeng/inc/editeng/orphitem.hxx +++ b/editeng/inc/editeng/orphitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -72,3 +73,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/outliner.hxx b/editeng/inc/editeng/outliner.hxx index 5e1e62aded..45eadc6c82 100644 --- a/editeng/inc/editeng/outliner.hxx +++ b/editeng/inc/editeng/outliner.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -259,7 +260,7 @@ public: void Scroll( long nHorzScroll, long nVertScroll ); void Paint( const Rectangle& rRect ); - BOOL PostKeyEvent( const KeyEvent& rKEvt ); + BOOL PostKeyEvent( const KeyEvent& rKEvt, Window* pFrameWin = NULL ); BOOL MouseButtonDown( const MouseEvent& ); BOOL MouseButtonUp( const MouseEvent& ); BOOL MouseMove( const MouseEvent& ); @@ -422,6 +423,9 @@ public: // #101498# BiDi level needs to be transported, too. BYTE mnBiDiLevel; + bool mbFilled; + long mnWidthToFill; + // bitfield unsigned mbEndOfLine : 1; unsigned mbEndOfParagraph : 1; @@ -445,6 +449,8 @@ public: const Color& rOverlineColor, const Color& rTextLineColor, BYTE nBiDiLevel, + bool bFilled, + long nWidthToFill, bool bEndOfLine, bool bEndOfParagraph, bool bEndOfBullet) @@ -462,6 +468,8 @@ public: maOverlineColor(rOverlineColor), maTextLineColor(rTextLineColor), mnBiDiLevel(nBiDiLevel), + mbFilled( bFilled ), + mnWidthToFill( nWidthToFill ), mbEndOfLine(bEndOfLine), mbEndOfParagraph(bEndOfParagraph), mbEndOfBullet(bEndOfBullet) @@ -723,11 +731,11 @@ public: void SetAddExtLeading( BOOL b ); 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 ); void SetText( const OutlinerParaObject& ); @@ -764,9 +772,7 @@ public: BOOL HasChilds( Paragraph* pParagraph ) const; ULONG GetChildCount( Paragraph* pParent ) const; BOOL IsExpanded( Paragraph* pPara ) const; -// Paragraph* GetParagraph( Paragraph* pParent, ULONG nRelPos ) const; Paragraph* GetParent( Paragraph* pParagraph ) const; -// ULONG GetRelPos( Paragraph* pParent, Paragraph* pPara ) const; ULONG GetAbsPos( Paragraph* pPara ); sal_Int16 GetDepth( ULONG nPara ) const; @@ -895,6 +901,14 @@ public: const Color& rOverlineColor, const Color& rTextLineColor); + virtual void DrawingTab( + const Point& rStartPos, long nWidth, const String& rChar, + const SvxFont& rFont, USHORT nPara, xub_StrLen nIndex, BYTE nRightToLeft, + bool bEndOfLine, + bool bEndOfParagraph, + const Color& rOverlineColor, + const Color& rTextLineColor); + Size CalcTextSize(); Point GetDocPos( Paragraph* pPara ); @@ -968,8 +982,8 @@ public: void SetHyphenator( ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XHyphenator >& xHyph ); - void SetForbiddenCharsTable( vos::ORef<SvxForbiddenCharactersTable> xForbiddenChars ); - vos::ORef<SvxForbiddenCharactersTable> GetForbiddenCharsTable() const; + void SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars ); + rtl::Reference<SvxForbiddenCharactersTable> GetForbiddenCharsTable() const; // Depricated void SetDefaultLanguage( LanguageType eLang ); @@ -1051,3 +1065,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/outlobj.hxx b/editeng/inc/editeng/outlobj.hxx index 0666af5141..c402675bcd 100644 --- a/editeng/inc/editeng/outlobj.hxx +++ b/editeng/inc/editeng/outlobj.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -94,3 +95,5 @@ public: ////////////////////////////////////////////////////////////////////////////// #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/paperinf.hxx b/editeng/inc/editeng/paperinf.hxx index c58ba9c37a..a4c32f6788 100644 --- a/editeng/inc/editeng/paperinf.hxx +++ b/editeng/inc/editeng/paperinf.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -71,3 +72,5 @@ inline Size &LandscapeSwap(Size &rSize) } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/paravertalignitem.hxx b/editeng/inc/editeng/paravertalignitem.hxx index 119532fd57..ed8f0af6d8 100644 --- a/editeng/inc/editeng/paravertalignitem.hxx +++ b/editeng/inc/editeng/paravertalignitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -61,9 +62,9 @@ public: String &rText, const IntlWrapper * = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, + virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId ); - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, + virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId ) const; inline SvxParaVertAlignItem& operator=( const SvxParaVertAlignItem& rItem ) @@ -78,3 +79,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/pbinitem.hxx b/editeng/inc/editeng/pbinitem.hxx index 94b50d595e..6f217a1f2c 100644 --- a/editeng/inc/editeng/pbinitem.hxx +++ b/editeng/inc/editeng/pbinitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -75,3 +76,4 @@ inline SvxPaperBinItem &SvxPaperBinItem::operator=( #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/pgrditem.hxx b/editeng/inc/editeng/pgrditem.hxx index 96d6cbb290..16877f55a4 100644 --- a/editeng/inc/editeng/pgrditem.hxx +++ b/editeng/inc/editeng/pgrditem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -62,3 +63,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/pmdlitem.hxx b/editeng/inc/editeng/pmdlitem.hxx index 1bcc2b5b6f..a474e287b2 100644 --- a/editeng/inc/editeng/pmdlitem.hxx +++ b/editeng/inc/editeng/pmdlitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -59,8 +60,8 @@ public: SfxMapUnit ePresMetric, String &rText, const IntlWrapper * = 0 ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + 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; } }; @@ -84,3 +85,4 @@ inline SvxPageModelItem& SvxPageModelItem::operator=( const SvxPageModelItem& rM #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/postitem.hxx b/editeng/inc/editeng/postitem.hxx index 03fe0152ca..2b0e8639fc 100644 --- a/editeng/inc/editeng/postitem.hxx +++ b/editeng/inc/editeng/postitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -66,8 +67,8 @@ public: virtual String GetValueTextByPos( USHORT nPos ) const; virtual USHORT GetValueCount() const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + 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 int HasBoolValue() const; virtual BOOL GetBoolValue() const; @@ -87,3 +88,4 @@ public: #endif // #ifndef _SVX_POSTITEM_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/prntitem.hxx b/editeng/inc/editeng/prntitem.hxx index 430c11726e..d05b9355db 100644 --- a/editeng/inc/editeng/prntitem.hxx +++ b/editeng/inc/editeng/prntitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -77,3 +78,4 @@ inline SvxPrintItem &SvxPrintItem::operator=( const SvxPrintItem &rCpy ) #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/protitem.hxx b/editeng/inc/editeng/protitem.hxx index a69643a096..dec9414fdc 100644 --- a/editeng/inc/editeng/protitem.hxx +++ b/editeng/inc/editeng/protitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -80,8 +81,8 @@ public: void SetSizeProtect ( BOOL bNew ) { bSize = bNew; } void SetPosProtect ( BOOL bNew ) { bPos = bNew; } - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + 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 ); }; inline SvxProtectItem::SvxProtectItem( const USHORT nId ) @@ -103,3 +104,4 @@ inline SvxProtectItem &SvxProtectItem::operator=( const SvxProtectItem &rCpy ) #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/prszitem.hxx b/editeng/inc/editeng/prszitem.hxx index 8d9751699f..d0eec00ffb 100644 --- a/editeng/inc/editeng/prszitem.hxx +++ b/editeng/inc/editeng/prszitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -66,3 +67,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/scriptspaceitem.hxx b/editeng/inc/editeng/scriptspaceitem.hxx index 175759b277..a2c9b419e9 100644 --- a/editeng/inc/editeng/scriptspaceitem.hxx +++ b/editeng/inc/editeng/scriptspaceitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -68,3 +69,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/scripttypeitem.hxx b/editeng/inc/editeng/scripttypeitem.hxx index 3231861d54..45d93ea15d 100644 --- a/editeng/inc/editeng/scripttypeitem.hxx +++ b/editeng/inc/editeng/scripttypeitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -89,3 +90,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/shaditem.hxx b/editeng/inc/editeng/shaditem.hxx index 0f231ac0d7..1ecaa39917 100644 --- a/editeng/inc/editeng/shaditem.hxx +++ b/editeng/inc/editeng/shaditem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -67,8 +68,8 @@ public: // "pure virtual Methoden" vom SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + 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 SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -78,8 +79,8 @@ public: virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; virtual SfxPoolItem* Create(SvStream &, USHORT) const; virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; - virtual int ScaleMetrics( long nMult, long nDiv ); - virtual int HasMetrics() 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; } @@ -109,3 +110,4 @@ inline SvxShadowItem &SvxShadowItem::operator=( const SvxShadowItem& rFmtShadow #endif // #ifndef _SVX_SHADITEM_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/shdditem.hxx b/editeng/inc/editeng/shdditem.hxx index 8905a19a08..ec47d7e4e5 100644 --- a/editeng/inc/editeng/shdditem.hxx +++ b/editeng/inc/editeng/shdditem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -72,3 +73,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/sizeitem.hxx b/editeng/inc/editeng/sizeitem.hxx index ef2b00bb57..a3b71805c7 100644 --- a/editeng/inc/editeng/sizeitem.hxx +++ b/editeng/inc/editeng/sizeitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -55,8 +56,8 @@ public: // "pure virtual Methoden" vom SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + 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 SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -66,8 +67,8 @@ public: virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; virtual SfxPoolItem* Create(SvStream &, USHORT) const; virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; - virtual int ScaleMetrics( long nMult, long nDiv ); - virtual int HasMetrics() 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; } @@ -81,3 +82,4 @@ inline SvxSizeItem& SvxSizeItem::operator=( const SvxSizeItem &rCpy ) #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/spltitem.hxx b/editeng/inc/editeng/spltitem.hxx index 3de7928f25..311f0e14f0 100644 --- a/editeng/inc/editeng/spltitem.hxx +++ b/editeng/inc/editeng/spltitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -79,3 +80,4 @@ inline SvxFmtSplitItem& SvxFmtSplitItem::operator=( #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/splwrap.hxx b/editeng/inc/editeng/splwrap.hxx index 8d2926adcf..67d03a7b77 100755 --- a/editeng/inc/editeng/splwrap.hxx +++ b/editeng/inc/editeng/splwrap.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -158,3 +159,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/svxacorr.hxx b/editeng/inc/editeng/svxacorr.hxx index 333235bf70..6408ba8dbb 100644 --- a/editeng/inc/editeng/svxacorr.hxx +++ b/editeng/inc/editeng/svxacorr.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -47,6 +48,7 @@ class SvxAutoCorrLanguageTable_Impl; class SvxAutoCorrLastFileAskTable_Impl; class SotStorageRef; class SotStorage; +class Window; // Flags fuer die AutoKorrekt-Flags const long CptlSttSntnc = 0x00000001; // Gross-Buchstaben am SatzAnfang @@ -62,6 +64,7 @@ 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 CorrectCapsLock = 0x00002000; // Correct accidental use of cAPS LOCK key const long ChgWordLstLoad = 0x20000000; // Ersetzungsliste geladen const long CplSttLstLoad = 0x40000000; // Exceptionlist fuer CplStart geladen @@ -235,7 +238,7 @@ protected: // koennen aus der Wortliste herausgeholt werden!) // rShort ist der Stream-Name - gecryptet! public: - //The method below is changed from private to public by BerryJia for Bug95846 Time:2002-8-13 15:50 + sal_Unicode GetQuote( sal_Unicode cInsChar, 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 ); @@ -250,7 +253,7 @@ public: // 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 ); + xub_StrLen nPos, sal_Unicode cInsChar, BOOL bInsert, Window* pFrameWin = NULL ); // return fuer die Autotext Expandierung das vorherige Wort, was dem // AutoCorrect - Algorythmus entspricht. @@ -375,6 +378,11 @@ public: BOOL FnCptlSttSntnc( SvxAutoCorrDoc&, const String&, BOOL bNormalPos, xub_StrLen nSttPos, xub_StrLen nEndPos, LanguageType eLang = LANGUAGE_SYSTEM); + bool FnCorrectCapsLock( SvxAutoCorrDoc&, const String&, + xub_StrLen nSttPos, xub_StrLen nEndPos, + LanguageType eLang = LANGUAGE_SYSTEM ); + + bool HasRunNext() { return bRunNext; } bool HasRunNext() { return bRunNext; } @@ -397,3 +405,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/svxenum.hxx b/editeng/inc/editeng/svxenum.hxx index fc0bb18946..37f0276aa1 100644 --- a/editeng/inc/editeng/svxenum.hxx +++ b/editeng/inc/editeng/svxenum.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -124,12 +125,19 @@ enum SvxCellHorJustify SVX_HOR_JUSTIFY_REPEAT }; +enum SvxCellJustifyMethod +{ + SVX_JUSTIFY_METHOD_AUTO, + SVX_JUSTIFY_METHOD_DISTRIBUTE +}; + enum SvxCellVerJustify { SVX_VER_JUSTIFY_STANDARD, SVX_VER_JUSTIFY_TOP, SVX_VER_JUSTIFY_CENTER, - SVX_VER_JUSTIFY_BOTTOM + SVX_VER_JUSTIFY_BOTTOM, + SVX_VER_JUSTIFY_BLOCK }; enum SvxCellOrientation @@ -216,3 +224,5 @@ enum SvxExtNumType #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/svxfont.hxx b/editeng/inc/editeng/svxfont.hxx index 3a6c347c85..120dd2c03c 100644 --- a/editeng/inc/editeng/svxfont.hxx +++ b/editeng/inc/editeng/svxfont.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -124,3 +125,4 @@ public: #endif // #ifndef _SVX_SVXFONT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/svxrtf.hxx b/editeng/inc/editeng/svxrtf.hxx index c1039f9347..33c0932ed1 100644 --- a/editeng/inc/editeng/svxrtf.hxx +++ b/editeng/inc/editeng/svxrtf.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -479,3 +480,4 @@ inline SfxItemSet& SvxRTFParser::GetAttrSet() #endif //_SVXRTF_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/swafopt.hxx b/editeng/inc/editeng/swafopt.hxx index 121ffc52f8..8292df4d82 100644 --- a/editeng/inc/editeng/swafopt.hxx +++ b/editeng/inc/editeng/swafopt.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -103,3 +104,4 @@ struct EDITENG_DLLPUBLIC SvxSwAutoFmtFlags #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/tstpitem.hxx b/editeng/inc/editeng/tstpitem.hxx index 6ed88c95e9..6d80024d44 100644 --- a/editeng/inc/editeng/tstpitem.hxx +++ b/editeng/inc/editeng/tstpitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -165,8 +166,8 @@ public: // "pure virtual Methoden" vom SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + 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 SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -183,3 +184,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/twolinesitem.hxx b/editeng/inc/editeng/twolinesitem.hxx index aede9984a0..c5f48e55ea 100644 --- a/editeng/inc/editeng/twolinesitem.hxx +++ b/editeng/inc/editeng/twolinesitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -61,9 +62,9 @@ public: String &rText, const IntlWrapper* pIntl = 0 ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, + virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, + virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); virtual USHORT GetVersion( USHORT nFFVer ) const; @@ -88,3 +89,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/txtrange.hxx b/editeng/inc/editeng/txtrange.hxx index 0ae674d94c..90b5512e76 100644 --- a/editeng/inc/editeng/txtrange.hxx +++ b/editeng/inc/editeng/txtrange.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -49,10 +50,6 @@ typedef SvLongs* SvLongsPtr; |* |* class TextRanger |* -|* Beschreibung -|* Ersterstellung 20.01.97 -|* Letzte Aenderung AMA 20.01.97 -|* *************************************************************************/ class EDITENG_DLLPUBLIC TextRanger { @@ -116,3 +113,5 @@ public: #endif // _TXTRANGE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/udlnitem.hxx b/editeng/inc/editeng/udlnitem.hxx index c4307ac896..8f5d13c65f 100644 --- a/editeng/inc/editeng/udlnitem.hxx +++ b/editeng/inc/editeng/udlnitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -65,9 +66,9 @@ public: virtual String GetValueTextByPos( USHORT nPos ) const; virtual USHORT GetValueCount() const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, + virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, + virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); // MS VC4.0 kommt durcheinander @@ -131,3 +132,5 @@ public: }; #endif // #ifndef _SVX_UDLNITEM_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/ulspitem.hxx b/editeng/inc/editeng/ulspitem.hxx index 209cb92c89..83bc118938 100644 --- a/editeng/inc/editeng/ulspitem.hxx +++ b/editeng/inc/editeng/ulspitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -62,8 +63,8 @@ public: // "pure virtual Methoden" vom SfxPoolItem virtual int operator==( const SfxPoolItem& ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + 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 SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, @@ -74,8 +75,8 @@ public: virtual SfxPoolItem* Create(SvStream &, USHORT) const; virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; virtual USHORT GetVersion( USHORT nFileVersion ) const; - virtual int ScaleMetrics( long nMult, long nDiv ); - virtual int HasMetrics() 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 ); @@ -111,3 +112,4 @@ inline void SvxULSpaceItem::SetLower( const USHORT nL, const USHORT nProp ) #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/unoedhlp.hxx b/editeng/inc/editeng/unoedhlp.hxx index c0a32ca29d..b352548440 100644 --- a/editeng/inc/editeng/unoedhlp.hxx +++ b/editeng/inc/editeng/unoedhlp.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -187,3 +188,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/unoedprx.hxx b/editeng/inc/editeng/unoedprx.hxx index 162a75ee95..2dfd05ec77 100644 --- a/editeng/inc/editeng/unoedprx.hxx +++ b/editeng/inc/editeng/unoedprx.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -177,3 +178,5 @@ private: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/unoedsrc.hxx b/editeng/inc/editeng/unoedsrc.hxx index c7ba241a6b..8e1d584ebb 100644 --- a/editeng/inc/editeng/unoedsrc.hxx +++ b/editeng/inc/editeng/unoedsrc.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -36,7 +37,6 @@ #include <tools/gen.hxx> #include <vcl/mapmod.hxx> #include <tools/string.hxx> -#ifndef _SV_COLOR_HXX //autogen #include <tools/color.hxx> #endif #include <svl/poolitem.hxx> @@ -550,3 +550,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/unofdesc.hxx b/editeng/inc/editeng/unofdesc.hxx index c21677274d..f46aeb32b8 100644 --- a/editeng/inc/editeng/unofdesc.hxx +++ b/editeng/inc/editeng/unofdesc.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -52,3 +53,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/unofield.hxx b/editeng/inc/editeng/unofield.hxx index b519d9482d..5c004494b7 100644 --- a/editeng/inc/editeng/unofield.hxx +++ b/editeng/inc/editeng/unofield.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -135,3 +136,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/unofored.hxx b/editeng/inc/editeng/unofored.hxx index be8d27eb80..b13118c390 100644 --- a/editeng/inc/editeng/unofored.hxx +++ b/editeng/inc/editeng/unofored.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -98,3 +99,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/unoforou.hxx b/editeng/inc/editeng/unoforou.hxx index aa0b9ed90c..80f053a767 100644 --- a/editeng/inc/editeng/unoforou.hxx +++ b/editeng/inc/editeng/unoforou.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -127,3 +128,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/unoipset.hxx b/editeng/inc/editeng/unoipset.hxx index 3875ba82e0..e2fa405aa2 100644 --- a/editeng/inc/editeng/unoipset.hxx +++ b/editeng/inc/editeng/unoipset.hxx @@ -1,10 +1,11 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * 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 + * Copyright 2000, 2010 Oracle and/or its affiliates. * * This file is part of OpenOffice.org. * @@ -33,10 +34,12 @@ #include "editeng/editengdllapi.h" #include <svl/itemprop.hxx> -class SvxIDPropertyCombineList; class SdrItemPool; class SfxItemSet; class SvxShape; +struct SvxIDPropertyCombine; + +#define SFX_METRIC_ITEM (0x40) #define SFX_METRIC_ITEM (0x40) @@ -82,3 +85,4 @@ EDITENG_DLLPUBLIC void SvxUnoConvertFromMM( const SfxMapUnit eDestinationMapUnit #endif // _SVX_UNOIPSET_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/unolingu.hxx b/editeng/inc/editeng/unolingu.hxx index ed455b2c09..e50884e4de 100644 --- a/editeng/inc/editeng/unolingu.hxx +++ b/editeng/inc/editeng/unolingu.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,7 +31,6 @@ #include <i18npool/lang.h> #include <tools/string.hxx> -#include <vos/refernce.hxx> #include <com/sun/star/util/Language.hpp> #include <com/sun/star/lang/Locale.hpp> #include <com/sun/star/linguistic2/XLinguServiceManager.hpp> @@ -74,8 +74,6 @@ class EDITENG_DLLPUBLIC LinguMgr { friend class LinguMgrExitLstnr; - //static ::VOS::ORefCount aRefCount; - static ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XLinguServiceManager > xLngSvcMgr; static ::com::sun::star::uno::Reference< @@ -234,3 +232,4 @@ EDITENG_DLLPUBLIC short SvxDicError( Window *pParent, sal_Int16 nError ); +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/unopracc.hxx b/editeng/inc/editeng/unopracc.hxx index 072bcfa119..da4d92d2b7 100644 --- a/editeng/inc/editeng/unopracc.hxx +++ b/editeng/inc/editeng/unopracc.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -71,3 +72,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/unoprnms.hxx b/editeng/inc/editeng/unoprnms.hxx index dd8a2e544d..625ccfa00d 100644 --- a/editeng/inc/editeng/unoprnms.hxx +++ b/editeng/inc/editeng/unoprnms.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -374,3 +375,4 @@ #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/unotext.hxx b/editeng/inc/editeng/unotext.hxx index 965a8d5d65..ebd0576934 100644 --- a/editeng/inc/editeng/unotext.hxx +++ b/editeng/inc/editeng/unotext.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -675,3 +676,5 @@ EDITENG_DLLPUBLIC const SvxItemPropertySet* ImplGetSvxTextPortionSvxPropertySet( EDITENG_DLLPUBLIC const SfxItemPropertyMapEntry* ImplGetSvxTextPortionPropertyMap(); #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/unoviwed.hxx b/editeng/inc/editeng/unoviwed.hxx index ac2380d7fc..7e023fd377 100644 --- a/editeng/inc/editeng/unoviwed.hxx +++ b/editeng/inc/editeng/unoviwed.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -60,3 +61,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/unoviwou.hxx b/editeng/inc/editeng/unoviwou.hxx index 0752826835..b0efc092b8 100644 --- a/editeng/inc/editeng/unoviwou.hxx +++ b/editeng/inc/editeng/unoviwou.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -66,3 +67,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/wghtitem.hxx b/editeng/inc/editeng/wghtitem.hxx index ef18c3a142..8a77027bfe 100644 --- a/editeng/inc/editeng/wghtitem.hxx +++ b/editeng/inc/editeng/wghtitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -66,8 +67,8 @@ public: virtual String GetValueTextByPos( USHORT nPos ) const; virtual USHORT GetValueCount() const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + 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 int HasBoolValue() const; virtual BOOL GetBoolValue() const; @@ -87,3 +88,4 @@ public: #endif // #ifndef _SVX_WGHTITEM_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/widwitem.hxx b/editeng/inc/editeng/widwitem.hxx index 034bb9119d..f8aaeba29e 100644 --- a/editeng/inc/editeng/widwitem.hxx +++ b/editeng/inc/editeng/widwitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -72,3 +73,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/writingmodeitem.hxx b/editeng/inc/editeng/writingmodeitem.hxx index 7c33fc7e86..a7d569d158 100644 --- a/editeng/inc/editeng/writingmodeitem.hxx +++ b/editeng/inc/editeng/writingmodeitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -58,11 +59,12 @@ public: String &rText, const IntlWrapper * = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, + virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId ); - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, + virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId ) const; }; #endif // #ifndef _SVX_WRITINGMODEITEM_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/wrlmitem.hxx b/editeng/inc/editeng/wrlmitem.hxx index 307209b0db..de29f41368 100644 --- a/editeng/inc/editeng/wrlmitem.hxx +++ b/editeng/inc/editeng/wrlmitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -73,3 +74,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/editeng/xmlcnitm.hxx b/editeng/inc/editeng/xmlcnitm.hxx index 2e283e5e69..0c048c7c3c 100644 --- a/editeng/inc/editeng/xmlcnitm.hxx +++ b/editeng/inc/editeng/xmlcnitm.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -62,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, BYTE nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); virtual SfxPoolItem *Clone( SfxItemPool * = 0) const { return new SvXMLAttrContainerItem( *this ); } @@ -89,3 +90,4 @@ public: #endif // _SVX_XMLCNITM_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/inc/makefile.mk b/editeng/inc/makefile.mk index b2196bab46..9b586546f1 100644 --- a/editeng/inc/makefile.mk +++ b/editeng/inc/makefile.mk @@ -2,7 +2,7 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # diff --git a/editeng/source/accessibility/AccessibleComponentBase.cxx b/editeng/source/accessibility/AccessibleComponentBase.cxx index d2d1a19bf3..181e048592 100644 --- a/editeng/source/accessibility/AccessibleComponentBase.cxx +++ b/editeng/source/accessibility/AccessibleComponentBase.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -199,7 +200,7 @@ sal_Int32 SAL_CALL AccessibleComponentBase::getBackground (void) ::rtl::OUString SAL_CALL AccessibleComponentBase::getTitledBorderText (void) throw (::com::sun::star::uno::RuntimeException) { - return ::rtl::OUString::createFromAscii (""); + return ::rtl::OUString (); } @@ -208,7 +209,7 @@ sal_Int32 SAL_CALL AccessibleComponentBase::getBackground (void) ::rtl::OUString SAL_CALL AccessibleComponentBase::getToolTipText (void) throw (::com::sun::star::uno::RuntimeException) { - return ::rtl::OUString::createFromAscii (""); + return ::rtl::OUString (); } @@ -235,3 +236,5 @@ uno::Sequence<uno::Type> SAL_CALL } // end of namespace accessibility + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/accessibility/AccessibleContextBase.cxx b/editeng/source/accessibility/AccessibleContextBase.cxx index b9d5a66301..f70d9fb803 100644 --- a/editeng/source/accessibility/AccessibleContextBase.cxx +++ b/editeng/source/accessibility/AccessibleContextBase.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -244,7 +245,7 @@ uno::Reference<XAccessible> SAL_CALL { ThrowIfDisposed (); throw lang::IndexOutOfBoundsException ( - ::rtl::OUString::createFromAscii ("no child with index " + nIndex), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("no child with index ") + nIndex), NULL); } @@ -638,7 +639,7 @@ void AccessibleContextBase::SetAccessibleName ( ::rtl::OUString AccessibleContextBase::CreateAccessibleDescription (void) throw (::com::sun::star::uno::RuntimeException) { - return ::rtl::OUString::createFromAscii ("Empty Description"); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM ("Empty Description")); } @@ -647,7 +648,7 @@ void AccessibleContextBase::SetAccessibleName ( ::rtl::OUString AccessibleContextBase::CreateAccessibleName (void) throw (::com::sun::star::uno::RuntimeException) { - return ::rtl::OUString::createFromAscii ("Empty Name"); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM ("Empty Name")); } @@ -713,3 +714,5 @@ void AccessibleContextBase::SetAccessibleRole( sal_Int16 _nRole ) } // end of namespace accessibility + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx index 1ead09ce47..8473370598 100644 --- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx +++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -37,7 +38,7 @@ #include <limits.h> #include <vector> #include <algorithm> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <vcl/window.hxx> #include <vcl/svapp.hxx> #include <editeng/flditem.hxx> @@ -114,7 +115,7 @@ namespace accessibility DBG_NAME( AccessibleEditableTextPara ) - // --> OD 2006-01-11 #i27138# - add parameter <_pParaManager> + // #i27138# - add parameter <_pParaManager> AccessibleEditableTextPara::AccessibleEditableTextPara( const uno::Reference< XAccessible >& rParent, const AccessibleParaManager* _pParaManager ) @@ -130,9 +131,8 @@ namespace accessibility // exceptions, thus no chance for exceptions once the Id is // fetched. Nevertheless, normally should employ RAII here... mnNotifierClientId(::comphelper::AccessibleEventNotifier::registerClient()), - // --> OD 2006-01-11 #i27138# + // #i27138# mpParaManager( _pParaManager ) - // <-- { #ifdef DBG_UTIL DBG_CTOR( AccessibleEditableTextPara, NULL ); @@ -845,7 +845,7 @@ namespace accessibility { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; return HaveChildren() ? 1 : 0; } @@ -854,7 +854,7 @@ namespace accessibility { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( !HaveChildren() ) throw lang::IndexOutOfBoundsException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("No childs available")), @@ -921,7 +921,7 @@ namespace accessibility { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); -// ::vos::OGuard aGuard( Application::GetSolarMutex() ); +// SolarMutexGuard aGuard; return ::rtl::OUString(); } @@ -930,7 +930,7 @@ namespace accessibility { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); -// ::vos::OGuard aGuard( Application::GetSolarMutex() ); +// SolarMutexGuard aGuard; return ::rtl::OUString(); } @@ -939,7 +939,7 @@ namespace accessibility { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); - // --> OD 2006-01-11 #i27138# - provide relations CONTENT_FLOWS_FROM + // #i27138# - provide relations CONTENT_FLOWS_FROM // and CONTENT_FLOWS_TO if ( mpParaManager ) { @@ -977,14 +977,13 @@ namespace accessibility // no relations, therefore empty return uno::Reference< XAccessibleRelationSet >(); } - // <-- } uno::Reference< XAccessibleStateSet > SAL_CALL AccessibleEditableTextPara::getAccessibleStateSet() throw (uno::RuntimeException) { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; // Create a copy of the state set and return it. ::utl::AccessibleStateSetHelper* pStateSet = static_cast< ::utl::AccessibleStateSetHelper*>(mxStateSet.get()); @@ -999,7 +998,7 @@ namespace accessibility { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; return implGetLocale(); } @@ -1025,7 +1024,7 @@ namespace accessibility { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; DBG_ASSERT(GetParagraphIndex() >= 0 && GetParagraphIndex() <= USHRT_MAX, "AccessibleEditableTextPara::contains: index value overflow"); @@ -1041,7 +1040,7 @@ namespace accessibility { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( HaveChildren() ) { @@ -1076,7 +1075,7 @@ namespace accessibility { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; DBG_ASSERT(GetParagraphIndex() >= 0 && GetParagraphIndex() <= USHRT_MAX, "AccessibleEditableTextPara::getBounds: index value overflow"); @@ -1102,7 +1101,7 @@ namespace accessibility { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; awt::Rectangle aRect = getBounds(); @@ -1113,7 +1112,7 @@ namespace accessibility { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; // relate us to parent uno::Reference< XAccessible > xParent = getAccessibleParent(); @@ -1160,7 +1159,7 @@ namespace accessibility { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; awt::Rectangle aRect = getBounds(); @@ -1203,7 +1202,7 @@ namespace accessibility { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( !HaveEditView() ) return -1; @@ -1231,7 +1230,7 @@ namespace accessibility { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; DBG_ASSERT(GetParagraphIndex() >= 0 && GetParagraphIndex() <= USHRT_MAX, "AccessibleEditableTextPara::getCharacter: index value overflow"); @@ -1261,7 +1260,7 @@ namespace accessibility #ifdef TL_DEBUG { uno::Sequence< rtl::OUString > aNames(1); - aNames.getArray()[0] = rtl::OUString::createFromAscii("CharHeight"); + aNames.getArray()[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CharHeight")); const rtl::OUString *pNames = aNames.getConstArray(); const uno::Sequence< beans::PropertyValue > aAttribs( getRunAttributes( nIndex, aNames ) ); const beans::PropertyValue *pAttribs = aAttribs.getConstArray(); @@ -1306,7 +1305,7 @@ namespace accessibility { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; DBG_ASSERT(GetParagraphIndex() >= 0 && GetParagraphIndex() <= USHRT_MAX, "AccessibleEditableTextPara::getCharacterBounds: index value overflow"); @@ -1341,7 +1340,7 @@ namespace accessibility { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; DBG_ASSERT(GetParagraphIndex() >= 0 && GetParagraphIndex() <= USHRT_MAX, "AccessibleEditableTextPara::getCharacterCount: index value overflow"); @@ -1353,7 +1352,7 @@ namespace accessibility { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; USHORT nPara, nIndex; @@ -1400,7 +1399,7 @@ namespace accessibility { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; DBG_ASSERT(GetParagraphIndex() >= 0 && GetParagraphIndex() <= USHRT_MAX, "AccessibleEditableTextPara::getSelectedText: index value overflow"); @@ -1415,7 +1414,7 @@ namespace accessibility { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; DBG_ASSERT(GetParagraphIndex() >= 0 && GetParagraphIndex() <= USHRT_MAX, "AccessibleEditableTextPara::getSelectionStart: index value overflow"); @@ -1430,7 +1429,7 @@ namespace accessibility { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; DBG_ASSERT(GetParagraphIndex() >= 0 && GetParagraphIndex() <= USHRT_MAX, "AccessibleEditableTextPara::getSelectionEnd: index value overflow"); @@ -1445,7 +1444,7 @@ namespace accessibility { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; DBG_ASSERT(GetParagraphIndex() >= 0 && GetParagraphIndex() <= USHRT_MAX, "AccessibleEditableTextPara::setSelection: paragraph index value overflow"); @@ -1479,7 +1478,7 @@ namespace accessibility { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; DBG_ASSERT(GetParagraphIndex() >= 0 && GetParagraphIndex() <= USHRT_MAX, "AccessibleEditableTextPara::getTextRange: paragraph index value overflow"); @@ -1491,7 +1490,7 @@ namespace accessibility { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; DBG_ASSERT(GetParagraphIndex() >= 0 && GetParagraphIndex() <= USHRT_MAX, "AccessibleEditableTextPara::getTextAtIndex: paragraph index value overflow"); @@ -1539,7 +1538,7 @@ namespace accessibility { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; DBG_ASSERT(GetParagraphIndex() >= 0 && GetParagraphIndex() <= USHRT_MAX, "AccessibleEditableTextPara::getTextBeforeIndex: paragraph index value overflow"); @@ -1598,7 +1597,7 @@ namespace accessibility { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; DBG_ASSERT(GetParagraphIndex() >= 0 && GetParagraphIndex() <= USHRT_MAX, "AccessibleEditableTextPara::getTextBehindIndex: paragraph index value overflow"); @@ -1641,7 +1640,7 @@ namespace accessibility { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; try { @@ -1681,7 +1680,7 @@ namespace accessibility { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; try { @@ -1711,7 +1710,7 @@ namespace accessibility { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; try { @@ -1741,7 +1740,7 @@ namespace accessibility { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; try { @@ -1774,7 +1773,7 @@ namespace accessibility { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; try { @@ -1809,7 +1808,7 @@ namespace accessibility { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; try { @@ -1844,7 +1843,7 @@ namespace accessibility { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; try { @@ -1904,7 +1903,7 @@ namespace accessibility { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; return replaceText(0, getCharacterCount(), sText); } @@ -1915,7 +1914,7 @@ namespace accessibility throw (uno::RuntimeException) { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; #if OSL_DEBUG_LEVEL > 0 SvxAccessibleTextAdapter& rCacheTF = @@ -2014,7 +2013,7 @@ namespace accessibility { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; #if OSL_DEBUG_LEVEL > 0 SvxAccessibleTextAdapter& rCacheTF = @@ -2309,3 +2308,5 @@ namespace accessibility } // end of namespace accessibility //------------------------------------------------------------------------ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/accessibility/AccessibleImageBullet.cxx b/editeng/source/accessibility/AccessibleImageBullet.cxx index 9024283c54..3d65307c4c 100644 --- a/editeng/source/accessibility/AccessibleImageBullet.cxx +++ b/editeng/source/accessibility/AccessibleImageBullet.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,7 +29,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_editeng.hxx" #include <tools/gen.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <vcl/svapp.hxx> #include <rtl/ustring.hxx> #include <com/sun/star/awt/Point.hpp> @@ -167,7 +168,7 @@ namespace accessibility { DBG_CHKTHIS( AccessibleImageBullet, NULL ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; // Get the string from the resource for the specified id. return ::rtl::OUString( String( EditResId (RID_SVXSTR_A11Y_IMAGEBULLET_DESCRIPTION) ) ); @@ -177,7 +178,7 @@ namespace accessibility { DBG_CHKTHIS( AccessibleImageBullet, NULL ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; // Get the string from the resource for the specified id. return ::rtl::OUString( String ( EditResId (RID_SVXSTR_A11Y_IMAGEBULLET_NAME) ) ); @@ -195,7 +196,7 @@ namespace accessibility { DBG_CHKTHIS( AccessibleImageBullet, NULL ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; // Create a copy of the state set and return it. ::utl::AccessibleStateSetHelper* pStateSet = static_cast< ::utl::AccessibleStateSetHelper*>(mxStateSet.get()); @@ -210,7 +211,7 @@ namespace accessibility { DBG_CHKTHIS( AccessibleImageBullet, NULL ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; lang::Locale aLocale; @@ -241,7 +242,7 @@ namespace accessibility { DBG_CHKTHIS( AccessibleImageBullet, NULL ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; DBG_ASSERT(GetParagraphIndex() >= 0 && GetParagraphIndex() <= USHRT_MAX, "AccessibleEditableTextPara::contains: index value overflow"); @@ -265,7 +266,7 @@ namespace accessibility { DBG_CHKTHIS( AccessibleImageBullet, NULL ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; DBG_ASSERT(GetParagraphIndex() >= 0 && GetParagraphIndex() <= USHRT_MAX, "AccessibleEditableTextPara::getBounds: index value overflow"); @@ -304,7 +305,7 @@ namespace accessibility { DBG_CHKTHIS( AccessibleImageBullet, NULL ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; awt::Rectangle aRect = getBounds(); @@ -315,7 +316,7 @@ namespace accessibility { DBG_CHKTHIS( AccessibleImageBullet, NULL ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; // relate us to parent uno::Reference< XAccessible > xParent = getAccessibleParent(); @@ -342,7 +343,7 @@ namespace accessibility { DBG_CHKTHIS( AccessibleImageBullet, NULL ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; awt::Rectangle aRect = getBounds(); @@ -649,3 +650,4 @@ namespace accessibility } // end of namespace accessibility +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/accessibility/AccessibleParaManager.cxx b/editeng/source/accessibility/AccessibleParaManager.cxx index 6ce6edaa54..99932e13fe 100644 --- a/editeng/source/accessibility/AccessibleParaManager.cxx +++ b/editeng/source/accessibility/AccessibleParaManager.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -195,9 +196,8 @@ namespace accessibility if( !IsReferencable( nParagraphIndex ) ) { // there is no hard reference available, create object then - // --> OD 2006-01-11 #i27138# + // #i27138# AccessibleEditableTextPara* pChild = new AccessibleEditableTextPara( xFrontEnd, this ); - // <-- uno::Reference< XAccessible > xChild( static_cast< ::cppu::OWeakObject* > (pChild), uno::UNO_QUERY ); if( !xChild.is() ) @@ -418,3 +418,5 @@ namespace accessibility } //------------------------------------------------------------------------ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/accessibility/AccessibleSelectionBase.cxx b/editeng/source/accessibility/AccessibleSelectionBase.cxx index 784b1ac5cd..7235169368 100644 --- a/editeng/source/accessibility/AccessibleSelectionBase.cxx +++ b/editeng/source/accessibility/AccessibleSelectionBase.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -106,3 +107,5 @@ namespace accessibility OCommonAccessibleSelection::deselectAccessibleChild( nSelectedChildIndex ); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/accessibility/AccessibleStaticTextBase.cxx b/editeng/source/accessibility/AccessibleStaticTextBase.cxx index 93e06493f1..ad35aab519 100644 --- a/editeng/source/accessibility/AccessibleStaticTextBase.cxx +++ b/editeng/source/accessibility/AccessibleStaticTextBase.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -38,7 +39,7 @@ #include <vector> #include <algorithm> #include <boost/bind.hpp> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <vcl/window.hxx> #include <vcl/svapp.hxx> #include <comphelper/sequenceasvector.hxx> @@ -491,7 +492,7 @@ namespace accessibility AccessibleStaticTextBase::AccessibleStaticTextBase( ::std::auto_ptr< SvxEditSource > pEditSource ) : mpImpl( new AccessibleStaticTextBase_Impl() ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; SetEditSource( pEditSource ); } @@ -641,7 +642,7 @@ namespace accessibility // XAccessibleText sal_Int32 SAL_CALL AccessibleStaticTextBase::getCaretPosition() throw (uno::RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; sal_Int32 i, nPos, nParas; for( i=0, nPos=-1, nParas=mpImpl->GetParagraphCount(); i<nParas; ++i ) @@ -660,7 +661,7 @@ namespace accessibility sal_Unicode SAL_CALL AccessibleStaticTextBase::getCharacter( sal_Int32 nIndex ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; EPosition aPos( mpImpl->Index2Internal(nIndex) ); @@ -669,7 +670,7 @@ namespace accessibility uno::Sequence< beans::PropertyValue > SAL_CALL AccessibleStaticTextBase::getCharacterAttributes( sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRequestedAttributes ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; EPosition aPos( mpImpl->Index2Internal(nIndex) ); @@ -678,7 +679,7 @@ namespace accessibility awt::Rectangle SAL_CALL AccessibleStaticTextBase::getCharacterBounds( sal_Int32 nIndex ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; // #108900# Allow ranges for nIndex, as one-past-the-end // values are now legal, too. @@ -696,7 +697,7 @@ namespace accessibility sal_Int32 SAL_CALL AccessibleStaticTextBase::getCharacterCount() throw (uno::RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; sal_Int32 i, nCount, nParas; for( i=0, nCount=0, nParas=mpImpl->GetParagraphCount(); i<nParas; ++i ) @@ -707,7 +708,7 @@ namespace accessibility sal_Int32 SAL_CALL AccessibleStaticTextBase::getIndexAtPoint( const awt::Point& rPoint ) throw (uno::RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; const sal_Int32 nParas( mpImpl->GetParagraphCount() ); sal_Int32 nIndex; @@ -735,7 +736,7 @@ namespace accessibility ::rtl::OUString SAL_CALL AccessibleStaticTextBase::getSelectedText() throw (uno::RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; sal_Int32 nStart( getSelectionStart() ); sal_Int32 nEnd( getSelectionEnd() ); @@ -749,7 +750,7 @@ namespace accessibility sal_Int32 SAL_CALL AccessibleStaticTextBase::getSelectionStart() throw (uno::RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; sal_Int32 i, nPos, nParas; for( i=0, nPos=-1, nParas=mpImpl->GetParagraphCount(); i<nParas; ++i ) @@ -763,7 +764,7 @@ namespace accessibility sal_Int32 SAL_CALL AccessibleStaticTextBase::getSelectionEnd() throw (uno::RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; sal_Int32 i, nPos, nParas; for( i=0, nPos=-1, nParas=mpImpl->GetParagraphCount(); i<nParas; ++i ) @@ -777,7 +778,7 @@ namespace accessibility sal_Bool SAL_CALL AccessibleStaticTextBase::setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; EPosition aStartIndex( mpImpl->Range2Internal(nStartIndex) ); EPosition aEndIndex( mpImpl->Range2Internal(nEndIndex) ); @@ -788,7 +789,7 @@ namespace accessibility ::rtl::OUString SAL_CALL AccessibleStaticTextBase::getText() throw (uno::RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; sal_Int32 i, nParas; ::rtl::OUString aRes; @@ -800,7 +801,7 @@ namespace accessibility ::rtl::OUString SAL_CALL AccessibleStaticTextBase::getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( nStartIndex > nEndIndex ) ::std::swap(nStartIndex, nEndIndex); @@ -833,7 +834,7 @@ namespace accessibility ::com::sun::star::accessibility::TextSegment SAL_CALL AccessibleStaticTextBase::getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; EPosition aPos( mpImpl->Range2Internal(nIndex) ); @@ -868,7 +869,7 @@ namespace accessibility ::com::sun::star::accessibility::TextSegment SAL_CALL AccessibleStaticTextBase::getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; EPosition aPos( mpImpl->Range2Internal(nIndex) ); @@ -908,7 +909,7 @@ namespace accessibility ::com::sun::star::accessibility::TextSegment SAL_CALL AccessibleStaticTextBase::getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; EPosition aPos( mpImpl->Range2Internal(nIndex) ); @@ -942,7 +943,7 @@ namespace accessibility sal_Bool SAL_CALL AccessibleStaticTextBase::copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( nStartIndex > nEndIndex ) ::std::swap(nStartIndex, nEndIndex); @@ -959,7 +960,7 @@ namespace accessibility { // get the intersection of the default attributes of all paragraphs - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; PropertyValueVector aDefAttrVec( mpImpl->GetParagraph( 0 ).getDefaultAttributes( RequestedAttributes ) ); @@ -997,7 +998,7 @@ namespace accessibility // get those default attributes of the paragraph, which are not part // of the intersection of all paragraphs and add them to the run attributes - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; EPosition aPos( mpImpl->Index2Internal( nIndex ) ); AccessibleEditableTextPara& rPara = mpImpl->GetParagraph( aPos.nPara ); @@ -1045,3 +1046,5 @@ namespace accessibility } // end of namespace accessibility //------------------------------------------------------------------------ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/accessibility/AccessibleStringWrap.cxx b/editeng/source/accessibility/AccessibleStringWrap.cxx index c530d118da..30d6467227 100644 --- a/editeng/source/accessibility/AccessibleStringWrap.cxx +++ b/editeng/source/accessibility/AccessibleStringWrap.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -98,3 +99,5 @@ sal_Int32 AccessibleStringWrap::GetIndexAtPoint( const Point& rPoint ) return -1; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/accessibility/makefile.mk b/editeng/source/accessibility/makefile.mk index 11e4eff220..ab3a647eeb 100644 --- a/editeng/source/accessibility/makefile.mk +++ b/editeng/source/accessibility/makefile.mk @@ -2,7 +2,7 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # diff --git a/editeng/source/editeng/editattr.cxx b/editeng/source/editeng/editattr.cxx index ca7d461114..f73284ba14 100644 --- a/editeng/source/editeng/editattr.cxx +++ b/editeng/source/editeng/editattr.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -443,3 +444,5 @@ void EditCharAttribRelief::SetFont( SvxFont& rFont, OutputDevice* ) { rFont.SetRelief( (FontRelief)((const SvxCharReliefItem*)GetItem())->GetValue() ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/editeng/editattr.hxx b/editeng/source/editeng/editattr.hxx index da0de76b11..27e20f3218 100644 --- a/editeng/source/editeng/editattr.hxx +++ b/editeng/source/editeng/editattr.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -424,3 +425,5 @@ public: #endif // _EDITATTR_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/editeng/editdbg.cxx b/editeng/source/editeng/editdbg.cxx index c6035c1bb6..1011ba1342 100644 --- a/editeng/source/editeng/editdbg.cxx +++ b/editeng/source/editeng/editdbg.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -584,3 +585,4 @@ BOOL CheckOrderedList( CharAttribArray& rAttribs, BOOL bStart ) #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/editeng/editdbg.hxx b/editeng/source/editeng/editdbg.hxx index f33d6ec1f3..45cff0d210 100644 --- a/editeng/source/editeng/editdbg.hxx +++ b/editeng/source/editeng/editdbg.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -55,3 +56,5 @@ public: #endif // _EDITDBG_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx index 4d8a8273dd..5f372e35e1 100644 --- a/editeng/source/editeng/editdoc.cxx +++ b/editeng/source/editeng/editdoc.cxx @@ -1,10 +1,11 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * 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 + * Copyright 2000, 2010 Oracle and/or its affiliates. * * This file is part of OpenOffice.org. * @@ -74,11 +75,11 @@ using namespace ::com::sun::star; USHORT GetScriptItemId( USHORT nItemId, short nScriptType ) { USHORT nId = nItemId; - + if ( ( nScriptType == i18n::ScriptType::ASIAN ) || ( nScriptType == i18n::ScriptType::COMPLEX ) ) { - switch ( nItemId ) + switch ( nItemId ) { case EE_CHAR_LANGUAGE: nId = ( nScriptType == i18n::ScriptType::ASIAN ) ? EE_CHAR_LANGUAGE_CJK : EE_CHAR_LANGUAGE_CTL; @@ -97,15 +98,15 @@ USHORT GetScriptItemId( USHORT nItemId, short nScriptType ) break; } } - + return nId; } BOOL IsScriptItemValid( USHORT nItemId, short nScriptType ) { BOOL bValid = TRUE; - - switch ( nItemId ) + + switch ( nItemId ) { case EE_CHAR_LANGUAGE: bValid = nScriptType == i18n::ScriptType::LATIN; @@ -178,13 +179,15 @@ SfxItemInfo aItemInfos[EDITITEMCOUNT] = { { 0, SFX_ITEM_POOLABLE }, // EE_PARA_HYPHENATE { 0, SFX_ITEM_POOLABLE }, // EE_PARA_BULLETSTATE { 0, SFX_ITEM_POOLABLE }, // EE_PARA_OUTLLRSPACE - { SID_ATTR_PARA_OUTLLEVEL, SFX_ITEM_POOLABLE }, - { SID_ATTR_PARA_BULLET, SFX_ITEM_POOLABLE }, - { SID_ATTR_LRSPACE, SFX_ITEM_POOLABLE }, - { SID_ATTR_ULSPACE, SFX_ITEM_POOLABLE }, - { SID_ATTR_PARA_LINESPACE, SFX_ITEM_POOLABLE }, - { SID_ATTR_PARA_ADJUST, SFX_ITEM_POOLABLE }, - { SID_ATTR_TABSTOP, SFX_ITEM_POOLABLE }, + { SID_ATTR_PARA_OUTLLEVEL, SFX_ITEM_POOLABLE }, // EE_PARA_OUTLLEVEL + { SID_ATTR_PARA_BULLET, SFX_ITEM_POOLABLE }, // EE_PARA_BULLET + { SID_ATTR_LRSPACE, SFX_ITEM_POOLABLE }, // EE_PARA_LRSPACE + { SID_ATTR_ULSPACE, SFX_ITEM_POOLABLE }, // EE_PARA_ULSPACE + { SID_ATTR_PARA_LINESPACE, SFX_ITEM_POOLABLE }, // EE_PARA_SBL + { SID_ATTR_PARA_ADJUST, SFX_ITEM_POOLABLE }, // EE_PARA_JUST + { SID_ATTR_TABSTOP, SFX_ITEM_POOLABLE }, // EE_PARA_TABS + { SID_ATTR_ALIGN_HOR_JUSTIFY_METHOD, SFX_ITEM_POOLABLE }, // EE_PARA_JUST_METHOD + { SID_ATTR_ALIGN_VER_JUSTIFY, SFX_ITEM_POOLABLE }, // EE_PARA_VER_JUST { SID_ATTR_CHAR_COLOR, SFX_ITEM_POOLABLE }, { SID_ATTR_CHAR_FONT, SFX_ITEM_POOLABLE }, { SID_ATTR_CHAR_FONTHEIGHT, SFX_ITEM_POOLABLE }, @@ -238,11 +241,11 @@ USHORT aV3Map[] = { }; USHORT aV4Map[] = { - 3994, 3995, 3996, 3997, 3998, 3999, 4000, 4001, 4002, 4003, - 4004, 4005, 4006, 4007, 4008, 4009, 4010, 4011, 4012, 4013, - 4014, 4015, 4016, 4017, 4018, + 3994, 3995, 3996, 3997, 3998, 3999, 4000, 4001, 4002, 4003, + 4004, 4005, 4006, 4007, 4008, 4009, 4010, 4011, 4012, 4013, + 4014, 4015, 4016, 4017, 4018, /* CJK Items inserted here: EE_CHAR_LANGUAGE - EE_CHAR_XMLATTRIBS */ - 4034, 4035, 4036, 4037 + 4034, 4035, 4036, 4037 }; USHORT aV5Map[] = { @@ -1072,7 +1075,7 @@ void ContentNode::CreateDefFont() SfxStyleSheet* pS = aContentAttribs.GetStyleSheet(); if ( pS ) CreateFont( GetCharAttribs().GetDefFont(), pS->GetItemSet() ); - + // ... dann die harte Absatzformatierung rueberbuegeln... CreateFont( GetCharAttribs().GetDefFont(), GetContentAttribs().GetItems(), pS == NULL ); @@ -1081,7 +1084,7 @@ void ContentNode::CreateDefFont() void ContentNode::SetStyleSheet( SfxStyleSheet* pS, const SvxFont& rFontFromStyle ) { aContentAttribs.SetStyleSheet( pS ); - + // Erst alle Informationen aus dem Style verwenden... GetCharAttribs().GetDefFont() = rFontFromStyle; // ... dann die harte Absatzformatierung rueberbuegeln... @@ -1112,10 +1115,10 @@ void ContentNode::CreateWrongList() #endif } -void ContentNode::SetWrongList( WrongList* p ) -{ +void ContentNode::SetWrongList( WrongList* p ) +{ DBG_ASSERT( !pWrongList, "WrongList existiert schon!" ); - pWrongList = p; + pWrongList = p; } // ------------------------------------------------------------------------- @@ -1199,13 +1202,38 @@ BOOL ContentAttribs::HasItem( USHORT nWhich ) // ---------------------------------------------------------------------- // class ItemList // ---------------------------------------------------------------------- +ItemList::ItemList() : CurrentItem( 0 ) +{ +} + const SfxPoolItem* ItemList::FindAttrib( USHORT nWhich ) { - const SfxPoolItem* pItem = First(); - while ( pItem && ( pItem->Which() != nWhich ) ) - pItem = Next(); + for ( size_t i = 0, n = aItemPool.size(); i < n; ++i ) + if ( aItemPool[ i ]->Which() == nWhich ) + return aItemPool[ i ]; + return NULL; +} + +const SfxPoolItem* ItemList::First() +{ + CurrentItem = 0; + return aItemPool.empty() ? NULL : aItemPool[ 0 ]; +} - return pItem; +const SfxPoolItem* ItemList::Next() +{ + if ( CurrentItem + 1 < aItemPool.size() ) + { + ++CurrentItem; + return aItemPool[ CurrentItem ]; + } + return NULL; +} + +void ItemList::Insert( const SfxPoolItem* pItem ) +{ + aItemPool.push_back( pItem ); + CurrentItem = aItemPool.size() - 1; } // ------------------------------------------------------------------------- @@ -1213,7 +1241,7 @@ const SfxPoolItem* ItemList::FindAttrib( USHORT nWhich ) // ------------------------------------------------------------------------- EditDoc::EditDoc( SfxItemPool* pPool ) { - if ( pPool ) + if ( pPool ) { pItemPool = pPool; bOwnerOfPool = FALSE; @@ -1223,7 +1251,7 @@ EditDoc::EditDoc( SfxItemPool* pPool ) pItemPool = new EditEngineItemPool( FALSE ); bOwnerOfPool = TRUE; } - + nDefTab = DEFTAB; bIsVertical = FALSE; bIsFixedCellHeight = FALSE; @@ -1236,7 +1264,7 @@ EditDoc::EditDoc( SfxItemPool* pPool ) EditDoc::~EditDoc() { ImplDestroyContents(); - if ( bOwnerOfPool ) + if ( bOwnerOfPool ) SfxItemPool::Free(pItemPool); } @@ -1420,7 +1448,7 @@ XubString EditDoc::GetParaAsString( ContentNode* pNode, USHORT nStartPos, USHORT pNextFeature = 0; // Feature interessiert unten nicht DBG_ASSERT( nEnd >= nIndex, "Ende vorm Index?" ); - //!! beware of sub string length of -1 which is also defined as STRING_LEN and + //!! beware of sub string length of -1 which is also defined as STRING_LEN and //!! thus would result in adding the whole sub string up to the end of the node !! if (nEnd > nIndex) aStr += XubString( *pNode, nIndex, nEnd - nIndex ); @@ -1452,7 +1480,7 @@ ULONG EditDoc::GetTextLen() const { ContentNode* pNode = GetObject( nNode ); nLen += pNode->Len(); - // Felder k”nnen laenger sein als der Platzhalter im Node. + // Fields can be longer than the placeholder in the Node const CharAttribArray& rAttrs = pNode->GetCharAttribs().GetAttribs(); for ( USHORT nAttr = rAttrs.Count(); nAttr; ) { @@ -1485,8 +1513,8 @@ EditPaM EditDoc::Clear() return aPaM; } -void EditDoc::SetModified( BOOL b ) -{ +void EditDoc::SetModified( BOOL b ) +{ bModified = b; if ( bModified ) { @@ -1934,12 +1962,11 @@ void EditDoc::FindAttribs( ContentNode* pNode, USHORT nStartPos, USHORT nEndPos, { // pItem = pAttr->GetItem(); // s.o. - /*-----------------31.05.95 16:01------------------- - Ist falsch, wenn das gleiche Attribut sofort wieder - eingestellt wird! - => Sollte am besten nicht vorkommen, also gleich beim - Setzen von Attributen richtig machen! - --------------------------------------------------*/ + /* Ist falsch, wenn das gleiche Attribut sofort wieder + eingestellt wird! + => Sollte am besten nicht vorkommen, also gleich beim + Setzen von Attributen richtig machen! + */ rCurSet.InvalidateItem( pAttr->GetItem()->Which() ); } @@ -2242,33 +2269,47 @@ ULONG SvxFontTable::GetId( const SvxFontItem& rFontItem ) return 0; } +//============================================================================= SvxColorList::SvxColorList() { } SvxColorList::~SvxColorList() { - SvxColorItem* pItem = First(); - while( pItem ) - { - delete pItem; - pItem = Next(); - } + for ( size_t i = 0, n = aColorList.size(); i < n; ++i ) + delete aColorList[ i ]; + aColorList.clear(); } -ULONG SvxColorList::GetId( const SvxColorItem& rColorItem ) +size_t SvxColorList::GetId( const SvxColorItem& rColorItem ) { - SvxColorItem* pItem = First(); - while ( pItem ) - { - if ( *pItem == rColorItem ) - return GetCurPos(); - pItem = Next(); - } + for ( size_t i = 0, n = aColorList.size(); i < n; ++i ) + if ( *aColorList[ i ] == rColorItem ) + return i; DBG_WARNING( "Color nicht gefunden: GetId()" ); return 0; } +void SvxColorList::Insert( SvxColorItem* pItem, size_t nIndex ) +{ + if ( nIndex >= aColorList.size() ) + { + aColorList.push_back( pItem ); + } + else + { + DummyColorList::iterator it = aColorList.begin(); + ::std::advance( it, nIndex ); + aColorList.insert( it, pItem ); + } +} + +SvxColorItem* SvxColorList::GetObject( size_t nIndex ) +{ + return ( nIndex >= aColorList.size() ) ? NULL : aColorList[ nIndex ]; +} + +//============================================================================= EditEngineItemPool::EditEngineItemPool( BOOL bPersistenRefCounts ) : SfxItemPool( String( "EditEngineItemPool", RTL_TEXTENCODING_ASCII_US ), EE_ITEMS_START, EE_ITEMS_END, aItemInfos, 0, bPersistenRefCounts ) @@ -2308,3 +2349,5 @@ SvStream& EditEngineItemPool::Store( SvStream& rStream ) const return SfxItemPool::Store( rStream ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/editeng/editdoc.hxx b/editeng/source/editeng/editdoc.hxx index 1da0b0b0b5..d85455cfe6 100644 --- a/editeng/source/editeng/editdoc.hxx +++ b/editeng/source/editeng/editdoc.hxx @@ -1,10 +1,11 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * 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 + * Copyright 2000, 2010 Oracle and/or its affiliates. * * This file is part of OpenOffice.org. * @@ -28,9 +29,7 @@ #ifndef _EDITDOC_HXX #define _EDITDOC_HXX -#ifndef _COM_SUN_STAR_I18N_XEXTENDEDINPUTSEQUENCECHECKER_HDL_ #include <com/sun/star/i18n/XExtendedInputSequenceChecker.hpp> -#endif #include <editattr.hxx> #include <edtspell.hxx> @@ -39,6 +38,7 @@ #include <svl/style.hxx> #include <svl/itempool.hxx> #include <tools/table.hxx> +#include <vector> #include <deque> @@ -142,6 +142,7 @@ SV_DECL_PTRARR( ContentInfoArray, ContentAttribsInfoPtr, 1, 1 ) // class SvxFontTable // ---------------------------------------------------------------------- DECLARE_TABLE( DummyFontTable, SvxFontItem* ) + class SvxFontTable : public DummyFontTable { public: @@ -155,25 +156,43 @@ public: // class SvxColorList // ---------------------------------------------------------------------- typedef ContentNode* ContentNodePtr; -DECLARE_LIST( DummyColorList, SvxColorItem* ) -class SvxColorList : public DummyColorList +typedef ::std::vector< SvxColorItem* > DummyColorList; + +class SvxColorList { +private: + DummyColorList aColorList; + public: SvxColorList(); ~SvxColorList(); - ULONG GetId( const SvxColorItem& rColor ); + size_t GetId( const SvxColorItem& rColor ); + size_t Count() { return aColorList.size(); }; + void Insert( SvxColorItem* pItem, size_t nIndex ); + SvxColorItem* GetObject( size_t nIndex ); }; // ---------------------------------------------------------------------- // class ItemList // ---------------------------------------------------------------------- typedef const SfxPoolItem* ConstPoolItemPtr; -DECLARE_LIST( DummyItemList, ConstPoolItemPtr ) -class ItemList : public DummyItemList +typedef ::std::vector< ConstPoolItemPtr > DummyItemList; + +class ItemList { +private: + DummyItemList aItemPool; + size_t CurrentItem; + public: - const SfxPoolItem* FindAttrib( USHORT nWhich ); + ItemList(); + const SfxPoolItem* FindAttrib( USHORT nWhich ); + const SfxPoolItem* First(); + const SfxPoolItem* Next(); + size_t Count() { return aItemPool.size(); }; + void Insert( const SfxPoolItem* pItem ); + void Clear() { aItemPool.clear(); }; }; // ------------------------------------------------------------------------- @@ -754,7 +773,7 @@ public: SfxItemPool& GetItemPool() { return *pItemPool; } const SfxItemPool& GetItemPool() const { return *pItemPool; } - + void RemoveItemsFromPool( ContentNode* pNode ); void InsertAttrib( const SfxPoolItem& rItem, ContentNode* pNode, USHORT nStart, USHORT nEnd ); @@ -803,3 +822,5 @@ public: }; #endif // _EDITDOC_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/editeng/editdoc2.cxx b/editeng/source/editeng/editdoc2.cxx index 9f23dcba44..89704a7983 100644 --- a/editeng/source/editeng/editdoc2.cxx +++ b/editeng/source/editeng/editdoc2.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -540,3 +541,4 @@ void ConvertAndPutItems( SfxItemSet& rDest, const SfxItemSet& rSource, const Map } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index 2a6e5f32a5..32b67339ec 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -1081,7 +1082,7 @@ sal_Bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditVie if ( bSel ) pImpEditEngine->UndoActionStart( EDITUNDO_INSERT ); if ( pImpEditEngine->GetStatus().DoAutoCorrect() ) - aCurSel = pImpEditEngine->AutoCorrect( aCurSel, 0, !pEditView->IsInsertMode() ); + aCurSel = pImpEditEngine->AutoCorrect( aCurSel, 0, !pEditView->IsInsertMode(), pFrameWin ); aCurSel = pImpEditEngine->InsertTab( aCurSel ); if ( bSel ) pImpEditEngine->UndoActionEnd( EDITUNDO_INSERT ); @@ -1102,7 +1103,7 @@ sal_Bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditVie pImpEditEngine->UndoActionStart( EDITUNDO_INSERT ); if ( rKeyEvent.GetKeyCode().IsShift() ) { - aCurSel = pImpEditEngine->AutoCorrect( aCurSel, 0, !pEditView->IsInsertMode() ); + aCurSel = pImpEditEngine->AutoCorrect( aCurSel, 0, !pEditView->IsInsertMode(), pFrameWin ); aCurSel = pImpEditEngine->InsertLineBreak( aCurSel ); } else @@ -1110,7 +1111,7 @@ sal_Bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditVie if ( !aAutoText.Len() ) { if ( pImpEditEngine->GetStatus().DoAutoCorrect() ) - aCurSel = pImpEditEngine->AutoCorrect( aCurSel, 0, !pEditView->IsInsertMode() ); + aCurSel = pImpEditEngine->AutoCorrect( aCurSel, 0, !pEditView->IsInsertMode(), pFrameWin ); aCurSel = pImpEditEngine->InsertParaBreak( aCurSel ); } else @@ -1158,7 +1159,8 @@ sal_Bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditVie ( SvxAutoCorrect::IsAutoCorrectChar( nCharCode ) || pAutoCorrect->HasRunNext() ) ) { - aCurSel = pImpEditEngine->AutoCorrect( aCurSel, nCharCode, !pEditView->IsInsertMode() ); + aCurSel = pImpEditEngine->AutoCorrect( + aCurSel, nCharCode, !pEditView->IsInsertMode(), pFrameWin ); } else { @@ -1791,7 +1793,8 @@ void EditEngine::SetControlWord( sal_uInt32 nWord ) ContentNode* pNode = pImpEditEngine->GetEditDoc().GetObject( n ); pNode->CreateWrongList(); } - pImpEditEngine->StartOnlineSpellTimer(); + if (pImpEditEngine->IsFormatted()) + pImpEditEngine->StartOnlineSpellTimer(); } else { @@ -2144,13 +2147,13 @@ void EditEngine::SetHyphenator( Reference< XHyphenator > & xHyph ) pImpEditEngine->SetHyphenator( xHyph ); } -void EditEngine::SetForbiddenCharsTable( vos::ORef<SvxForbiddenCharactersTable> xForbiddenChars ) +void EditEngine::SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars ) { DBG_CHKTHIS( EditEngine, 0 ); pImpEditEngine->SetForbiddenCharsTable( xForbiddenChars ); } -vos::ORef<SvxForbiddenCharactersTable> EditEngine::GetForbiddenCharsTable() const +rtl::Reference<SvxForbiddenCharactersTable> EditEngine::GetForbiddenCharsTable() const { DBG_CHKTHIS( EditEngine, 0 ); return pImpEditEngine->GetForbiddenCharsTable( FALSE ); @@ -2169,7 +2172,7 @@ LanguageType EditEngine::GetDefaultLanguage() const return pImpEditEngine->GetDefaultLanguage(); } -sal_Bool __EXPORT EditEngine::SpellNextDocument() +sal_Bool EditEngine::SpellNextDocument() { DBG_CHKTHIS( EditEngine, 0 ); return sal_False; @@ -2183,40 +2186,30 @@ EESpellState EditEngine::HasSpellErrors() return pImpEditEngine->HasSpellErrors(); } -/*-- 13.10.2003 16:56:23--------------------------------------------------- - -----------------------------------------------------------------------*/ void EditEngine::StartSpelling(EditView& rEditView, sal_Bool bMultipleDoc) { DBG_CHKTHIS( EditEngine, 0 ); pImpEditEngine->StartSpelling(rEditView, bMultipleDoc); } -/*-- 13.10.2003 16:56:23--------------------------------------------------- - -----------------------------------------------------------------------*/ void EditEngine::EndSpelling() { DBG_CHKTHIS( EditEngine, 0 ); pImpEditEngine->EndSpelling(); } -/*-- 13.10.2003 16:43:27--------------------------------------------------- - - -----------------------------------------------------------------------*/ bool EditEngine::SpellSentence(EditView& rView, ::svx::SpellPortions& rToFill, bool bIsGrammarChecking ) { DBG_CHKTHIS( EditEngine, 0 ); return pImpEditEngine->SpellSentence( rView, rToFill, bIsGrammarChecking ); } -/*-- 08.09.2008 11:38:32--------------------------------------------------- - -----------------------------------------------------------------------*/ void EditEngine::PutSpellingToSentenceStart( EditView& rEditView ) { DBG_CHKTHIS( EditEngine, 0 ); pImpEditEngine->PutSpellingToSentenceStart( rEditView ); } -/*-- 13.10.2003 16:43:27--------------------------------------------------- -----------------------------------------------------------------------*/ void EditEngine::ApplyChangedSentence(EditView& rEditView, const ::svx::SpellPortions& rNewPortions, bool bRecheck ) @@ -2231,7 +2224,7 @@ sal_Bool EditEngine::HasConvertibleTextPortion( LanguageType nLang ) return pImpEditEngine->HasConvertibleTextPortion( nLang ); } -sal_Bool __EXPORT EditEngine::ConvertNextDocument() +sal_Bool EditEngine::ConvertNextDocument() { DBG_CHKTHIS( EditEngine, 0 ); return sal_False; @@ -2471,7 +2464,7 @@ ParagraphInfos EditEngine::GetParagraphInfos( sal_uInt16 nPara ) // ===================================================================== // ====================== Virtuelle Methoden ======================= // ===================================================================== -void __EXPORT EditEngine::DrawingText( const Point&, const XubString&, USHORT, USHORT, +void EditEngine::DrawingText( const Point&, const XubString&, USHORT, USHORT, const sal_Int32*, const SvxFont&, sal_uInt16, sal_uInt16, BYTE, const EEngineData::WrongSpellVector*, const SvxFieldData*, bool, bool, bool, const ::com::sun::star::lang::Locale*, const Color&, const Color&) @@ -2480,12 +2473,22 @@ void __EXPORT EditEngine::DrawingText( const Point&, const XubString&, USHORT, U DBG_CHKTHIS( EditEngine, 0 ); } -void __EXPORT EditEngine::PaintingFirstLine( sal_uInt16, const Point&, long, const Point&, short, OutputDevice* ) +void EditEngine::DrawingTab( const Point& /*rStartPos*/, long /*nWidth*/, + const String& /*rChar*/, const SvxFont& /*rFont*/, + USHORT /*nPara*/, xub_StrLen /*nIndex*/, + BYTE /*nRightToLeft*/, bool /*bEndOfLine*/, + bool /*bEndOfParagraph*/, const Color& /*rOverlineColor*/, + const Color& /*rTextLineColor*/) { DBG_CHKTHIS( EditEngine, 0 ); } -void __EXPORT EditEngine::ParagraphInserted( sal_uInt16 nPara ) +void EditEngine::PaintingFirstLine( sal_uInt16, const Point&, long, const Point&, short, OutputDevice* ) +{ + DBG_CHKTHIS( EditEngine, 0 ); +} + +void EditEngine::ParagraphInserted( sal_uInt16 nPara ) { DBG_CHKTHIS( EditEngine, 0 ); @@ -2498,7 +2501,7 @@ void __EXPORT EditEngine::ParagraphInserted( sal_uInt16 nPara ) } } -void __EXPORT EditEngine::ParagraphDeleted( sal_uInt16 nPara ) +void EditEngine::ParagraphDeleted( sal_uInt16 nPara ) { DBG_CHKTHIS( EditEngine, 0 ); @@ -2515,24 +2518,24 @@ void EditEngine::ParagraphConnected( USHORT /*nLeftParagraph*/, USHORT /*nRightP DBG_CHKTHIS( EditEngine, 0 ); } -sal_Bool __EXPORT EditEngine::FormattingParagraph( sal_uInt16 ) +sal_Bool EditEngine::FormattingParagraph( sal_uInt16 ) { // return sal_True, wenn die Attribute geaendert wurden... DBG_CHKTHIS( EditEngine, 0 ); return sal_False; } -void __EXPORT EditEngine::ParaAttribsChanged( sal_uInt16 /* nParagraph */ ) +void EditEngine::ParaAttribsChanged( sal_uInt16 /* nParagraph */ ) { DBG_CHKTHIS( EditEngine, 0 ); } -void __EXPORT EditEngine::StyleSheetChanged( SfxStyleSheet* /* pStyle */ ) +void EditEngine::StyleSheetChanged( SfxStyleSheet* /* pStyle */ ) { DBG_CHKTHIS( EditEngine, 0 ); } -void __EXPORT EditEngine::ParagraphHeightChanged( sal_uInt16 nPara ) +void EditEngine::ParagraphHeightChanged( sal_uInt16 nPara ) { DBG_CHKTHIS( EditEngine, 0 ); @@ -2545,7 +2548,7 @@ void __EXPORT EditEngine::ParagraphHeightChanged( sal_uInt16 nPara ) } } -XubString __EXPORT EditEngine::GetUndoComment( sal_uInt16 nId ) const +XubString EditEngine::GetUndoComment( sal_uInt16 nId ) const { DBG_CHKTHIS( EditEngine, 0 ); XubString aComment; @@ -2603,18 +2606,18 @@ Rectangle EditEngine::GetBulletArea( sal_uInt16 ) return Rectangle( Point(), Point() ); } -XubString __EXPORT EditEngine::CalcFieldValue( const SvxFieldItem&, sal_uInt16, sal_uInt16, Color*&, Color*& ) +XubString EditEngine::CalcFieldValue( const SvxFieldItem&, sal_uInt16, sal_uInt16, Color*&, Color*& ) { DBG_CHKTHIS( EditEngine, 0 ); return ' '; } -void __EXPORT EditEngine::FieldClicked( const SvxFieldItem&, sal_uInt16, sal_uInt16 ) +void EditEngine::FieldClicked( const SvxFieldItem&, sal_uInt16, sal_uInt16 ) { DBG_CHKTHIS( EditEngine, 0 ); } -void __EXPORT EditEngine::FieldSelected( const SvxFieldItem&, sal_uInt16, sal_uInt16 ) +void EditEngine::FieldSelected( const SvxFieldItem&, sal_uInt16, sal_uInt16 ) { DBG_CHKTHIS( EditEngine, 0 ); } @@ -2948,3 +2951,5 @@ EFieldInfo& EFieldInfo::operator= ( const EFieldInfo& rFldInfo ) return *this; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx index 6370ec605f..f433f60ea9 100644 --- a/editeng/source/editeng/editobj.cxx +++ b/editeng/source/editeng/editobj.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -301,7 +302,7 @@ EditTextObject::EditTextObject( const EditTextObject& r ) nWhich = r.nWhich; } -__EXPORT EditTextObject::~EditTextObject() +EditTextObject::~EditTextObject() { DBG_DTOR( EE_EditTextObject, 0 ); } @@ -424,14 +425,14 @@ void EditTextObject::SetStyleSheet( USHORT /*nPara*/, const XubString& /*rName*/ DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); } -BOOL __EXPORT EditTextObject::ChangeStyleSheets( const XubString&, SfxStyleFamily, +BOOL EditTextObject::ChangeStyleSheets( const XubString&, SfxStyleFamily, const XubString&, SfxStyleFamily ) { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); return FALSE; } -void __EXPORT EditTextObject::ChangeStyleSheetName( SfxStyleFamily /*eFamily*/, +void EditTextObject::ChangeStyleSheetName( SfxStyleFamily /*eFamily*/, const XubString& /*rOldName*/, const XubString& /*rNewName*/ ) { DBG_ERROR( "V-Methode direkt vom EditTextObject!" ); @@ -556,12 +557,12 @@ void EditTextObject::Skip( SvStream& rIStream ) rIStream.Seek( nStartPos + nFullSz ); } -void __EXPORT EditTextObject::StoreData( SvStream& ) const +void EditTextObject::StoreData( SvStream& ) const { DBG_ERROR( "StoreData: Basisklasse!" ); } -void __EXPORT EditTextObject::CreateData( SvStream& ) +void EditTextObject::CreateData( SvStream& ) { DBG_ERROR( "CreateData: Basisklasse!" ); } @@ -718,7 +719,7 @@ BinTextObject::BinTextObject( const BinTextObject& r ) : } } -__EXPORT BinTextObject::~BinTextObject() +BinTextObject::~BinTextObject() { if(!bOwnerOfPool && pPool) { @@ -792,7 +793,7 @@ void BinTextObject::DeleteContents() aContents.Remove( 0, aContents.Count() ); } -EditTextObject* __EXPORT BinTextObject::Clone() const +EditTextObject* BinTextObject::Clone() const { return new BinTextObject( *this ); } @@ -1150,7 +1151,7 @@ BOOL BinTextObject::ImpChangeStyleSheets( return bChanges; } -BOOL __EXPORT BinTextObject::ChangeStyleSheets( +BOOL BinTextObject::ChangeStyleSheets( const XubString& rOldName, SfxStyleFamily eOldFamily, const XubString& rNewName, SfxStyleFamily eNewFamily ) { @@ -1161,13 +1162,13 @@ BOOL __EXPORT BinTextObject::ChangeStyleSheets( return bChanges; } -void __EXPORT BinTextObject::ChangeStyleSheetName( SfxStyleFamily eFamily, +void BinTextObject::ChangeStyleSheetName( SfxStyleFamily eFamily, const XubString& rOldName, const XubString& rNewName ) { ImpChangeStyleSheets( rOldName, eFamily, rNewName, eFamily ); } -void __EXPORT BinTextObject::StoreData( SvStream& rOStream ) const +void BinTextObject::StoreData( SvStream& rOStream ) const { USHORT nVer = 602; rOStream << nVer; @@ -1342,7 +1343,7 @@ void __EXPORT BinTextObject::StoreData( SvStream& rOStream ) const } } -void __EXPORT BinTextObject::CreateData( SvStream& rIStream ) +void BinTextObject::CreateData( SvStream& rIStream ) { rIStream >> nVersion; @@ -1660,7 +1661,7 @@ bool BinTextObject::isWrongListEqual(const BinTextObject& rCompare) const #define CHARSETMARKER 0x9999 -void __EXPORT BinTextObject::CreateData300( SvStream& rIStream ) +void BinTextObject::CreateData300( SvStream& rIStream ) { // Fuer Aufwaertskompatibilitaet. @@ -1723,3 +1724,5 @@ void __EXPORT BinTextObject::CreateData300( SvStream& rIStream ) rIStream >> nCharSet; } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/editeng/editobj2.hxx b/editeng/source/editeng/editobj2.hxx index b7eae5dc22..74fa0b4c4e 100644 --- a/editeng/source/editeng/editobj2.hxx +++ b/editeng/source/editeng/editobj2.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -112,12 +113,16 @@ class XParaPortionList : public XBaseParaPortionList ULONG nRefDevPtr; OutDevType eRefDevType; MapMode aRefMapMode; + sal_uInt16 nStretchX; + sal_uInt16 nStretchY; ULONG nPaperWidth; public: - XParaPortionList( OutputDevice* pRefDev, ULONG nPW ) : - aRefMapMode( pRefDev->GetMapMode() ) + XParaPortionList( OutputDevice* pRefDev, ULONG nPW, sal_uInt16 _nStretchX, sal_uInt16 _nStretchY ) : + aRefMapMode( pRefDev->GetMapMode() ), + nStretchX(_nStretchX), + nStretchY(_nStretchY) { nRefDevPtr = (ULONG)pRefDev; nPaperWidth = nPW; eRefDevType = pRefDev->GetOutDevType(); @@ -127,6 +132,8 @@ public: ULONG GetPaperWidth() const { return nPaperWidth; } OutDevType GetRefDevType() const { return eRefDevType; } const MapMode& GetRefMapMode() const { return aRefMapMode; } + sal_uInt16 GetStretchX() const { return nStretchX; } + sal_uInt16 GetStretchY() const { return nStretchY; } }; /* cl removed because not needed anymore since binfilter @@ -307,3 +314,4 @@ public: #endif // _EDITOBJ2_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/editeng/editsel.cxx b/editeng/source/editeng/editsel.cxx index 55dca7e631..fa68068046 100644 --- a/editeng/source/editeng/editsel.cxx +++ b/editeng/source/editeng/editsel.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -42,18 +43,18 @@ EditSelFunctionSet::EditSelFunctionSet() pCurView = NULL; } -void __EXPORT EditSelFunctionSet::CreateAnchor() +void EditSelFunctionSet::CreateAnchor() { if ( pCurView ) pCurView->pImpEditView->CreateAnchor(); } -void __EXPORT EditSelFunctionSet::DestroyAnchor() +void EditSelFunctionSet::DestroyAnchor() { // Nur bei Mehrfachselektion } -BOOL __EXPORT EditSelFunctionSet::SetCursorAtPoint( const Point& rPointPixel, BOOL ) +BOOL EditSelFunctionSet::SetCursorAtPoint( const Point& rPointPixel, BOOL ) { if ( pCurView ) return pCurView->pImpEditView->SetCursorAtPoint( rPointPixel ); @@ -61,7 +62,7 @@ BOOL __EXPORT EditSelFunctionSet::SetCursorAtPoint( const Point& rPointPixel, BO return FALSE; } -BOOL __EXPORT EditSelFunctionSet::IsSelectionAtPoint( const Point& rPointPixel ) +BOOL EditSelFunctionSet::IsSelectionAtPoint( const Point& rPointPixel ) { if ( pCurView ) return pCurView->pImpEditView->IsSelectionAtPoint( rPointPixel ); @@ -69,20 +70,20 @@ BOOL __EXPORT EditSelFunctionSet::IsSelectionAtPoint( const Point& rPointPixel ) return FALSE; } -void __EXPORT EditSelFunctionSet::DeselectAtPoint( const Point& ) +void EditSelFunctionSet::DeselectAtPoint( const Point& ) { // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! // ! Implementieren, wenn Mehrfachselektion moeglich ! // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! } -void __EXPORT EditSelFunctionSet::BeginDrag() +void EditSelFunctionSet::BeginDrag() { // Nur bei Mehrfachselektion } -void __EXPORT EditSelFunctionSet::DeselectAll() +void EditSelFunctionSet::DeselectAll() { if ( pCurView ) pCurView->pImpEditView->DeselectAll(); @@ -119,3 +120,4 @@ EditView* EditSelectionEngine::GetCurView() return pView; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/editeng/editsel.hxx b/editeng/source/editeng/editsel.hxx index 82b6724edf..78e7a118b4 100644 --- a/editeng/source/editeng/editsel.hxx +++ b/editeng/source/editeng/editsel.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -73,3 +74,5 @@ public: }; #endif // _EDITSEL_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/editeng/editstt2.hxx b/editeng/source/editeng/editstt2.hxx index 3ca3829c32..3bab4db1b8 100644 --- a/editeng/source/editeng/editstt2.hxx +++ b/editeng/source/editeng/editstt2.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -128,3 +129,4 @@ public: #endif // _EDITSTT2_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/editeng/editundo.cxx b/editeng/source/editeng/editundo.cxx index 9d6f8bedbb..e92812638a 100644 --- a/editeng/source/editeng/editundo.cxx +++ b/editeng/source/editeng/editundo.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -74,7 +75,7 @@ EditUndoManager::EditUndoManager( ImpEditEngine* p ) pImpEE = p; } -BOOL __EXPORT EditUndoManager::Undo( USHORT nCount ) +BOOL EditUndoManager::Undo( USHORT nCount ) { if ( GetUndoActionCount() == 0 ) return FALSE; @@ -109,7 +110,7 @@ BOOL __EXPORT EditUndoManager::Undo( USHORT nCount ) return bDone; } -BOOL __EXPORT EditUndoManager::Redo( USHORT nCount ) +BOOL EditUndoManager::Redo( USHORT nCount ) { if ( GetRedoActionCount() == 0 ) return FALSE; @@ -159,18 +160,18 @@ EditUndo::~EditUndo() DBG_DTOR( EditUndo, 0 ); } -USHORT __EXPORT EditUndo::GetId() const +USHORT EditUndo::GetId() const { DBG_CHKTHIS( EditUndo, 0 ); return nId; } -BOOL __EXPORT EditUndo::CanRepeat(SfxRepeatTarget&) const +BOOL EditUndo::CanRepeat(SfxRepeatTarget&) const { return FALSE; } -XubString __EXPORT EditUndo::GetComment() const +XubString EditUndo::GetComment() const { XubString aComment; if ( pImpEE ) @@ -198,7 +199,7 @@ EditUndoDelContent::~EditUndoDelContent() delete pContentNode; } -void __EXPORT EditUndoDelContent::Undo() +void EditUndoDelContent::Undo() { DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" ); GetImpEditEngine()->InsertContent( pContentNode, nNode ); @@ -207,7 +208,7 @@ void __EXPORT EditUndoDelContent::Undo() GetImpEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection( aSel ); } -void __EXPORT EditUndoDelContent::Redo() +void EditUndoDelContent::Redo() { DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" ); @@ -272,7 +273,7 @@ EditUndoConnectParas::~EditUndoConnectParas() { } -void __EXPORT EditUndoConnectParas::Undo() +void EditUndoConnectParas::Undo() { DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" ); @@ -302,7 +303,7 @@ void __EXPORT EditUndoConnectParas::Undo() GetImpEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection( EditSelection( aPaM, aPaM ) ); } -void __EXPORT EditUndoConnectParas::Redo() +void EditUndoConnectParas::Redo() { DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" ); EditPaM aPaM = GetImpEditEngine()->ConnectContents( nNode, bBackward ); @@ -324,14 +325,14 @@ EditUndoSplitPara::~EditUndoSplitPara() { } -void __EXPORT EditUndoSplitPara::Undo() +void EditUndoSplitPara::Undo() { DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" ); EditPaM aPaM = GetImpEditEngine()->ConnectContents( nNode, FALSE ); GetImpEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection( EditSelection( aPaM, aPaM ) ); } -void __EXPORT EditUndoSplitPara::Redo() +void EditUndoSplitPara::Redo() { DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" ); EditPaM aPaM = GetImpEditEngine()->SplitContent( nNode, nSepPos ); @@ -347,7 +348,7 @@ EditUndoInsertChars::EditUndoInsertChars( ImpEditEngine* _pImpEE, const EPaM& rE { } -void __EXPORT EditUndoInsertChars::Undo() +void EditUndoInsertChars::Undo() { DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" ); EditPaM aPaM( GetImpEditEngine()->CreateEditPaM( aEPaM ) ); @@ -357,7 +358,7 @@ void __EXPORT EditUndoInsertChars::Undo() GetImpEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection( EditSelection( aNewPaM, aNewPaM ) ); } -void __EXPORT EditUndoInsertChars::Redo() +void EditUndoInsertChars::Redo() { DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" ); EditPaM aPaM( GetImpEditEngine()->CreateEditPaM( aEPaM ) ); @@ -367,7 +368,7 @@ void __EXPORT EditUndoInsertChars::Redo() GetImpEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection( EditSelection( aPaM, aNewPaM ) ); } -BOOL __EXPORT EditUndoInsertChars::Merge( SfxUndoAction* pNextAction ) +BOOL EditUndoInsertChars::Merge( SfxUndoAction* pNextAction ) { if ( !pNextAction->ISA( EditUndoInsertChars ) ) return FALSE; @@ -394,7 +395,7 @@ EditUndoRemoveChars::EditUndoRemoveChars( ImpEditEngine* _pImpEE, const EPaM& rE { } -void __EXPORT EditUndoRemoveChars::Undo() +void EditUndoRemoveChars::Undo() { DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" ); EditPaM aPaM( GetImpEditEngine()->CreateEditPaM( aEPaM ) ); @@ -404,7 +405,7 @@ void __EXPORT EditUndoRemoveChars::Undo() GetImpEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection( aSel ); } -void __EXPORT EditUndoRemoveChars::Redo() +void EditUndoRemoveChars::Redo() { DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" ); EditPaM aPaM( GetImpEditEngine()->CreateEditPaM( aEPaM ) ); @@ -429,19 +430,19 @@ EditUndoInsertFeature::~EditUndoInsertFeature() delete pFeature; } -void __EXPORT EditUndoInsertFeature::Undo() +void EditUndoInsertFeature::Undo() { DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" ); EditPaM aPaM( GetImpEditEngine()->CreateEditPaM( aEPaM ) ); EditSelection aSel( aPaM, aPaM ); // Attribute werden dort implizit vom Dokument korrigiert... aSel.Max().GetIndex()++; - EditPaM aNewPaM = GetImpEditEngine()->ImpDeleteSelection( aSel ); + GetImpEditEngine()->ImpDeleteSelection( aSel ); aSel.Max().GetIndex()--; // Fuer Selektion GetImpEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection( aSel ); } -void __EXPORT EditUndoInsertFeature::Redo() +void EditUndoInsertFeature::Redo() { DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" ); EditPaM aPaM( GetImpEditEngine()->CreateEditPaM( aEPaM ) ); @@ -468,7 +469,7 @@ EditUndoMoveParagraphs::~EditUndoMoveParagraphs() { } -void __EXPORT EditUndoMoveParagraphs::Undo() +void EditUndoMoveParagraphs::Undo() { DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" ); Range aTmpRange( nParagraphs ); @@ -491,7 +492,7 @@ void __EXPORT EditUndoMoveParagraphs::Undo() GetImpEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection( aNewSel ); } -void __EXPORT EditUndoMoveParagraphs::Redo() +void EditUndoMoveParagraphs::Redo() { DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" ); EditSelection aNewSel( GetImpEditEngine()->MoveParagraphs( nParagraphs, nDest, 0 ) ); @@ -517,7 +518,7 @@ EditUndoSetStyleSheet::~EditUndoSetStyleSheet() { } -void __EXPORT EditUndoSetStyleSheet::Undo() +void EditUndoSetStyleSheet::Undo() { DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" ); GetImpEditEngine()->SetStyleSheet( nPara, (SfxStyleSheet*)GetImpEditEngine()->GetStyleSheetPool()->Find( aPrevName, ePrevFamily ) ); @@ -525,7 +526,7 @@ void __EXPORT EditUndoSetStyleSheet::Undo() lcl_DoSetSelection( GetImpEditEngine()->GetActiveView(), nPara ); } -void __EXPORT EditUndoSetStyleSheet::Redo() +void EditUndoSetStyleSheet::Redo() { DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" ); GetImpEditEngine()->SetStyleSheet( nPara, (SfxStyleSheet*)GetImpEditEngine()->GetStyleSheetPool()->Find( aNewName, eNewFamily ) ); @@ -547,14 +548,14 @@ EditUndoSetParaAttribs::~EditUndoSetParaAttribs() { } -void __EXPORT EditUndoSetParaAttribs::Undo() +void EditUndoSetParaAttribs::Undo() { DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" ); GetImpEditEngine()->SetParaAttribs( nPara, aPrevItems ); lcl_DoSetSelection( GetImpEditEngine()->GetActiveView(), nPara ); } -void __EXPORT EditUndoSetParaAttribs::Redo() +void EditUndoSetParaAttribs::Redo() { DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" ); GetImpEditEngine()->SetParaAttribs( nPara, aNewItems ); @@ -600,7 +601,7 @@ EditUndoSetAttribs::~EditUndoSetAttribs() } } -void __EXPORT EditUndoSetAttribs::Undo() +void EditUndoSetAttribs::Undo() { DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" ); ImpEditEngine* _pImpEE = GetImpEditEngine(); @@ -633,7 +634,7 @@ void __EXPORT EditUndoSetAttribs::Undo() ImpSetSelection( GetImpEditEngine()->GetActiveView() ); } -void __EXPORT EditUndoSetAttribs::Redo() +void EditUndoSetAttribs::Redo() { DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" ); ImpEditEngine* _pImpEE = GetImpEditEngine(); @@ -669,7 +670,7 @@ EditUndoTransliteration::~EditUndoTransliteration() delete pTxtObj; } -void __EXPORT EditUndoTransliteration::Undo() +void EditUndoTransliteration::Undo() { DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" ); @@ -709,7 +710,7 @@ void __EXPORT EditUndoTransliteration::Undo() GetImpEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection( aNewSel ); } -void __EXPORT EditUndoTransliteration::Redo() +void EditUndoTransliteration::Redo() { DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" ); ImpEditEngine* _pImpEE = GetImpEditEngine(); @@ -731,7 +732,7 @@ EditUndoMarkSelection::~EditUndoMarkSelection() { } -void __EXPORT EditUndoMarkSelection::Undo() +void EditUndoMarkSelection::Undo() { DBG_ASSERT( GetImpEditEngine()->GetActiveView(), "Undo/Redo: Keine Active View!" ); if ( GetImpEditEngine()->GetActiveView() ) @@ -743,8 +744,9 @@ void __EXPORT EditUndoMarkSelection::Undo() } } -void __EXPORT EditUndoMarkSelection::Redo() +void EditUndoMarkSelection::Redo() { // Fuer Redo unwichtig, weil am Anfang der Undo-Klammerung } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/editeng/editundo.hxx b/editeng/source/editeng/editundo.hxx index ae8e7fae81..7c230eb38a 100644 --- a/editeng/source/editeng/editundo.hxx +++ b/editeng/source/editeng/editundo.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -313,3 +314,5 @@ public: #endif // _EDITUNDO_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index decb2dda5a..a7726ead3d 100755 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -146,7 +147,7 @@ LanguageType lcl_CheckLanguage( lang::Locale a3( SvxCreateLocale( aLangList[3] ) ); #endif - INT32 nCount = sizeof(aLangList) / sizeof(aLangList[0]); + INT32 nCount = SAL_N_ELEMENTS(aLangList); for (INT32 i = 0; i < nCount; i++) { INT16 nTmpLang = aLangList[i]; @@ -419,11 +420,11 @@ void EditView::InsertText( const XubString& rStr, sal_Bool bSelect ) pImpEE->FormatAndUpdate( this ); } -sal_Bool EditView::PostKeyEvent( const KeyEvent& rKeyEvent ) +sal_Bool EditView::PostKeyEvent( const KeyEvent& rKeyEvent, Window* pFrameWin ) { DBG_CHKTHIS( EditView, 0 ); DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 ); - return pImpEditView->PostKeyEvent( rKeyEvent ); + return pImpEditView->PostKeyEvent( rKeyEvent, pFrameWin ); } sal_Bool EditView::MouseButtonUp( const MouseEvent& rMouseEvent ) @@ -920,7 +921,7 @@ sal_Bool EditView::MatchGroup() return sal_False; } -void EditView::CompleteAutoCorrect() +void EditView::CompleteAutoCorrect( Window* pFrameWin ) { DBG_CHKTHIS( EditView, 0 ); DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 ); @@ -930,7 +931,7 @@ void EditView::CompleteAutoCorrect() EditSelection aSel = pImpEditView->GetEditSelection(); aSel = PIMPEE->EndOfWord( aSel.Max() ); // MT 06/00: Why pass EditSelection to AutoCorrect, not EditPaM?! - aSel = PIMPEE->AutoCorrect( aSel, 0, !IsInsertMode() ); + aSel = PIMPEE->AutoCorrect( aSel, 0, !IsInsertMode(), pFrameWin ); pImpEditView->SetEditSelection( aSel ); if ( PIMPEE->IsModified() ) PIMPEE->FormatAndUpdate( this ); @@ -1065,7 +1066,7 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link* pCallBack ) // implementation here by providing an additional parameter. Sequence< PropertyValue > aPropVals(1); PropertyValue &rVal = aPropVals.getArray()[0]; - rVal.Name = OUString::createFromAscii( UPN_MAX_NUMBER_OF_SUGGESTIONS ); + rVal.Name = OUString(RTL_CONSTASCII_USTRINGPARAM( UPN_MAX_NUMBER_OF_SUGGESTIONS )); rVal.Value <<= (INT16) 7; // // Gibt es Replace-Vorschlaege? diff --git a/editeng/source/editeng/edtspell.cxx b/editeng/source/editeng/edtspell.cxx index 0d91f179b7..5a6fccd020 100644 --- a/editeng/source/editeng/edtspell.cxx +++ b/editeng/source/editeng/edtspell.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -63,7 +64,7 @@ EditSpellWrapper::EditSpellWrapper( Window* _pWin, pEditView = pView; } -void __EXPORT EditSpellWrapper::SpellStart( SvxSpellArea eArea ) +void EditSpellWrapper::SpellStart( SvxSpellArea eArea ) { ImpEditEngine* pImpEE = pEditView->GetImpEditEngine(); SpellInfo* pSpellInfo = pImpEE->GetSpellInfo(); @@ -125,18 +126,18 @@ sal_Bool EditSpellWrapper::SpellContinue() return GetLast().is(); } -void __EXPORT EditSpellWrapper::SpellEnd() +void EditSpellWrapper::SpellEnd() { // Base class will show language errors... SvxSpellWrapper::SpellEnd(); } -sal_Bool __EXPORT EditSpellWrapper::HasOtherCnt() +sal_Bool EditSpellWrapper::HasOtherCnt() { return sal_False; } -sal_Bool __EXPORT EditSpellWrapper::SpellMore() +sal_Bool EditSpellWrapper::SpellMore() { ImpEditEngine* pImpEE = pEditView->GetImpEditEngine(); SpellInfo* pSpellInfo = pImpEE->GetSpellInfo(); @@ -156,14 +157,14 @@ sal_Bool __EXPORT EditSpellWrapper::SpellMore() return bMore; } -void __EXPORT EditSpellWrapper::ScrollArea() +void EditSpellWrapper::ScrollArea() { // Keine weitere Aktion noetig... // Es sei denn, der Bereich soll in die Mitte gescrollt werden, // und nicht irgendwo stehen. } -void __EXPORT EditSpellWrapper::ReplaceAll( const String &rNewText, +void EditSpellWrapper::ReplaceAll( const String &rNewText, sal_Int16 ) { // Wird gerufen, wenn Wort in ReplaceList des SpellCheckers @@ -171,7 +172,7 @@ void __EXPORT EditSpellWrapper::ReplaceAll( const String &rNewText, CheckSpellTo(); } -void __EXPORT EditSpellWrapper::ChangeWord( const String& rNewWord, +void EditSpellWrapper::ChangeWord( const String& rNewWord, const sal_uInt16 ) { // Wird gerufen, wenn Wort Button Change @@ -184,13 +185,13 @@ void __EXPORT EditSpellWrapper::ChangeWord( const String& rNewWord, CheckSpellTo(); } -void __EXPORT EditSpellWrapper::ChangeThesWord( const String& rNewWord ) +void EditSpellWrapper::ChangeThesWord( const String& rNewWord ) { pEditView->InsertText( rNewWord ); CheckSpellTo(); } -void __EXPORT EditSpellWrapper::AutoCorrect( const String&, const String& ) +void EditSpellWrapper::AutoCorrect( const String&, const String& ) { } @@ -292,6 +293,7 @@ void WrongList::TextInserted( sal_uInt16 nPos, sal_uInt16 nNew, sal_Bool bPosIsS } DBG_ASSERT( !bRefIsValid || ( rWrong.nStart < rWrong.nEnd ), "TextInserted, WrongRange: Start >= End?!" ); + (void)bRefIsValid; } DBG_ASSERT( !DbgIsBuggy(), "InsertWrong: WrongList kaputt!" ); @@ -756,3 +758,4 @@ void EdtAutoCorrDoc::ImplStartUndoAction() bAllowUndoAction = sal_False; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/editeng/edtspell.hxx b/editeng/source/editeng/edtspell.hxx index 4873a16898..992a94f39d 100644 --- a/editeng/source/editeng/edtspell.hxx +++ b/editeng/source/editeng/edtspell.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -177,3 +178,4 @@ public: #endif // EDTSPELL +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/editeng/eehtml.cxx b/editeng/source/editeng/eehtml.cxx index 651b232848..50a776a5a9 100644 --- a/editeng/source/editeng/eehtml.cxx +++ b/editeng/source/editeng/eehtml.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -633,15 +634,30 @@ void EditHTMLParser::ImpSetStyleSheet( USHORT nHLevel ) SfxItemSet aItems( aCurSel.Max().GetNode()->GetContentAttribs().GetItems() ); aItems.ClearItem( EE_PARA_ULSPACE ); + aItems.ClearItem( EE_CHAR_FONTHEIGHT ); aItems.ClearItem( EE_CHAR_FONTINFO ); aItems.ClearItem( EE_CHAR_WEIGHT ); + aItems.ClearItem( EE_CHAR_FONTHEIGHT_CJK ); + aItems.ClearItem( EE_CHAR_FONTINFO_CJK ); + aItems.ClearItem( EE_CHAR_WEIGHT_CJK ); + + aItems.ClearItem( EE_CHAR_FONTHEIGHT_CTL ); + aItems.ClearItem( EE_CHAR_FONTINFO_CTL ); + aItems.ClearItem( EE_CHAR_WEIGHT_CTL ); + // Fett in den ersten 3 Headings if ( ( nHLevel >= 1 ) && ( nHLevel <= 3 ) ) { SvxWeightItem aWeightItem( WEIGHT_BOLD, EE_CHAR_WEIGHT ); aItems.Put( aWeightItem ); + + SvxWeightItem aWeightItemCJK( WEIGHT_BOLD, EE_CHAR_WEIGHT_CJK ); + aItems.Put( aWeightItem ); + + SvxWeightItem aWeightItemCTL( WEIGHT_BOLD, EE_CHAR_WEIGHT_CTL ); + aItems.Put( aWeightItem ); } // Fonthoehe und Abstaende, wenn LogicToLogic moeglich: @@ -660,9 +676,16 @@ void EditHTMLParser::ImpSetStyleSheet( USHORT nHLevel ) nPoints = 11; nPoints = OutputDevice::LogicToLogic( nPoints, MAP_POINT, eUnit ); + SvxFontHeightItem aHeightItem( nPoints, 100, EE_CHAR_FONTHEIGHT ); aItems.Put( aHeightItem ); + SvxFontHeightItem aHeightItemCJK( nPoints, 100, EE_CHAR_FONTHEIGHT_CJK ); + aItems.Put( aHeightItemCJK ); + + SvxFontHeightItem aHeightItemCTL( nPoints, 100, EE_CHAR_FONTHEIGHT_CTL ); + aItems.Put( aHeightItemCTL ); + // Absatzabstaende, wenn Heading: if ( !nHLevel || ((nHLevel >= 1) && (nHLevel <= 6)) ) { @@ -679,6 +702,12 @@ void EditHTMLParser::ImpSetStyleSheet( USHORT nHLevel ) Font aFont = OutputDevice::GetDefaultFont( DEFAULTFONT_FIXED, LANGUAGE_SYSTEM, 0 ); SvxFontItem aFontItem( aFont.GetFamily(), aFont.GetName(), XubString(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO ); aItems.Put( aFontItem ); + + SvxFontItem aFontItemCJK( aFont.GetFamily(), aFont.GetName(), XubString(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO_CJK ); + aItems.Put( aFontItemCJK ); + + SvxFontItem aFontItemCTL( aFont.GetFamily(), aFont.GetName(), XubString(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO_CTL ); + aItems.Put( aFontItemCTL ); } pImpEditEngine->SetParaAttribs( nNode, aItems ); @@ -867,3 +896,5 @@ void EditHTMLParser::HeadingEnd( int ) bWasInPara = FALSE; } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/editeng/eehtml.hxx b/editeng/source/editeng/eehtml.hxx index 4035cb1598..75dcfdae53 100644 --- a/editeng/source/editeng/eehtml.hxx +++ b/editeng/source/editeng/eehtml.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -97,3 +98,5 @@ SV_DECL_REF( EditHTMLParser ) SV_IMPL_REF( EditHTMLParser ); #endif // _EEHTML_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/editeng/eeng_pch.cxx b/editeng/source/editeng/eeng_pch.cxx index 2b471257cf..31a3b5e376 100644 --- a/editeng/source/editeng/eeng_pch.cxx +++ b/editeng/source/editeng/eeng_pch.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,3 +29,5 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_editeng.hxx" #include <eeng_pch.hxx> + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/editeng/eeng_pch.hxx b/editeng/source/editeng/eeng_pch.hxx index d62f5a428a..1ae7d8beed 100644 --- a/editeng/source/editeng/eeng_pch.hxx +++ b/editeng/source/editeng/eeng_pch.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -32,3 +33,4 @@ #include <vcl/svapp.hxx> +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/editeng/eeobj.cxx b/editeng/source/editeng/eeobj.cxx index ab573f9b1f..db7387ae4f 100644 --- a/editeng/source/editeng/eeobj.cxx +++ b/editeng/source/editeng/eeobj.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -110,3 +111,5 @@ sal_Bool EditDataObject::isDataFlavorSupported( const datatransfer::DataFlavor& return bSupported; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/editeng/eeobj.hxx b/editeng/source/editeng/eeobj.hxx index 390992f2b7..f6fa28f4b1 100644 --- a/editeng/source/editeng/eeobj.hxx +++ b/editeng/source/editeng/eeobj.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -70,3 +71,4 @@ public: #endif // _DATAOBJ_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/editeng/eerdll.cxx b/editeng/source/editeng/eerdll.cxx index fa1510ab9c..2a4d3bd4ce 100644 --- a/editeng/source/editeng/eerdll.cxx +++ b/editeng/source/editeng/eerdll.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -107,7 +108,7 @@ SfxPoolItem** GlobalEditData::GetDefItems() { ppDefItems = new SfxPoolItem*[EDITITEMCOUNT]; - // Absatzattribute: + // Paragraph attributes: SvxNumRule aTmpNumRule( 0, 0, FALSE ); ppDefItems[0] = new SvxFrameDirectionItem( FRMDIR_HORI_LEFT_TOP, EE_PARA_WRITINGDIR ); @@ -120,57 +121,59 @@ SfxPoolItem** GlobalEditData::GetDefItems() ppDefItems[7] = new SfxBoolItem( EE_PARA_BULLETSTATE, TRUE ); ppDefItems[8] = new SvxLRSpaceItem( EE_PARA_OUTLLRSPACE ); ppDefItems[9] = new SfxInt16Item( EE_PARA_OUTLLEVEL, -1 ); - ppDefItems[10] = new SvxBulletItem( EE_PARA_BULLET ); - ppDefItems[11] = new SvxLRSpaceItem( EE_PARA_LRSPACE ); - ppDefItems[12] = new SvxULSpaceItem( EE_PARA_ULSPACE ); - ppDefItems[13] = new SvxLineSpacingItem( 0, EE_PARA_SBL ); - ppDefItems[14] = new SvxAdjustItem( SVX_ADJUST_LEFT, EE_PARA_JUST ); - ppDefItems[15] = new SvxTabStopItem( 0, 0, SVX_TAB_ADJUST_LEFT, EE_PARA_TABS ); - - // Zeichenattribute: - ppDefItems[16] = new SvxColorItem( Color( COL_AUTO ), EE_CHAR_COLOR ); - ppDefItems[17] = new SvxFontItem( EE_CHAR_FONTINFO ); - ppDefItems[18] = new SvxFontHeightItem( 240, 100, EE_CHAR_FONTHEIGHT ); - ppDefItems[19] = new SvxCharScaleWidthItem( 100, EE_CHAR_FONTWIDTH ); - ppDefItems[20] = new SvxWeightItem( WEIGHT_NORMAL, EE_CHAR_WEIGHT ); - ppDefItems[21] = new SvxUnderlineItem( UNDERLINE_NONE, EE_CHAR_UNDERLINE ); - ppDefItems[22] = new SvxCrossedOutItem( STRIKEOUT_NONE, EE_CHAR_STRIKEOUT ); - ppDefItems[23] = new SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC ); - ppDefItems[24] = new SvxContourItem( FALSE, EE_CHAR_OUTLINE ); - ppDefItems[25] = new SvxShadowedItem( FALSE, EE_CHAR_SHADOW ); - ppDefItems[26] = new SvxEscapementItem( 0, 100, EE_CHAR_ESCAPEMENT ); - ppDefItems[27] = new SvxAutoKernItem( FALSE, EE_CHAR_PAIRKERNING ); - ppDefItems[28] = new SvxKerningItem( 0, EE_CHAR_KERNING ); - ppDefItems[29] = new SvxWordLineModeItem( FALSE, EE_CHAR_WLM ); - ppDefItems[30] = new SvxLanguageItem( LANGUAGE_DONTKNOW, EE_CHAR_LANGUAGE ); - ppDefItems[31] = new SvxLanguageItem( LANGUAGE_DONTKNOW, EE_CHAR_LANGUAGE_CJK ); - ppDefItems[32] = new SvxLanguageItem( LANGUAGE_DONTKNOW, EE_CHAR_LANGUAGE_CTL ); - ppDefItems[33] = new SvxFontItem( EE_CHAR_FONTINFO_CJK ); - ppDefItems[34] = new SvxFontItem( EE_CHAR_FONTINFO_CTL ); - ppDefItems[35] = new SvxFontHeightItem( 240, 100, EE_CHAR_FONTHEIGHT_CJK ); - ppDefItems[36] = new SvxFontHeightItem( 240, 100, EE_CHAR_FONTHEIGHT_CTL ); - ppDefItems[37] = new SvxWeightItem( WEIGHT_NORMAL, EE_CHAR_WEIGHT_CJK ); - ppDefItems[38] = new SvxWeightItem( WEIGHT_NORMAL, EE_CHAR_WEIGHT_CTL ); - ppDefItems[39] = new SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC_CJK ); - ppDefItems[40] = new SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC_CTL ); - ppDefItems[41] = new SvxEmphasisMarkItem( EMPHASISMARK_NONE, EE_CHAR_EMPHASISMARK ); - ppDefItems[42] = new SvxCharReliefItem( RELIEF_NONE, EE_CHAR_RELIEF ); - ppDefItems[43] = new SfxVoidItem( EE_CHAR_RUBI_DUMMY ); + ppDefItems[10] = new SvxBulletItem( EE_PARA_BULLET ); + ppDefItems[11] = new SvxLRSpaceItem( EE_PARA_LRSPACE ); + ppDefItems[12] = new SvxULSpaceItem( EE_PARA_ULSPACE ); + ppDefItems[13] = new SvxLineSpacingItem( 0, EE_PARA_SBL ); + ppDefItems[14] = new SvxAdjustItem( SVX_ADJUST_LEFT, EE_PARA_JUST ); + ppDefItems[15] = new SvxTabStopItem( 0, 0, SVX_TAB_ADJUST_LEFT, EE_PARA_TABS ); + ppDefItems[16] = new SvxJustifyMethodItem( SVX_JUSTIFY_METHOD_AUTO, EE_PARA_JUST_METHOD ); + ppDefItems[17] = new SvxVerJustifyItem( SVX_VER_JUSTIFY_STANDARD, EE_PARA_VER_JUST ); + + // Character attributes: + ppDefItems[18] = new SvxColorItem( Color( COL_AUTO ), EE_CHAR_COLOR ); + ppDefItems[19] = new SvxFontItem( EE_CHAR_FONTINFO ); + ppDefItems[20] = new SvxFontHeightItem( 240, 100, EE_CHAR_FONTHEIGHT ); + ppDefItems[21] = new SvxCharScaleWidthItem( 100, EE_CHAR_FONTWIDTH ); + ppDefItems[22] = new SvxWeightItem( WEIGHT_NORMAL, EE_CHAR_WEIGHT ); + ppDefItems[23] = new SvxUnderlineItem( UNDERLINE_NONE, EE_CHAR_UNDERLINE ); + ppDefItems[24] = new SvxCrossedOutItem( STRIKEOUT_NONE, EE_CHAR_STRIKEOUT ); + ppDefItems[25] = new SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC ); + ppDefItems[26] = new SvxContourItem( FALSE, EE_CHAR_OUTLINE ); + ppDefItems[27] = new SvxShadowedItem( FALSE, EE_CHAR_SHADOW ); + ppDefItems[28] = new SvxEscapementItem( 0, 100, EE_CHAR_ESCAPEMENT ); + ppDefItems[29] = new SvxAutoKernItem( FALSE, EE_CHAR_PAIRKERNING ); + ppDefItems[30] = new SvxKerningItem( 0, EE_CHAR_KERNING ); + ppDefItems[31] = new SvxWordLineModeItem( FALSE, EE_CHAR_WLM ); + ppDefItems[32] = new SvxLanguageItem( LANGUAGE_DONTKNOW, EE_CHAR_LANGUAGE ); + ppDefItems[33] = new SvxLanguageItem( LANGUAGE_DONTKNOW, EE_CHAR_LANGUAGE_CJK ); + ppDefItems[34] = new SvxLanguageItem( LANGUAGE_DONTKNOW, EE_CHAR_LANGUAGE_CTL ); + ppDefItems[35] = new SvxFontItem( EE_CHAR_FONTINFO_CJK ); + ppDefItems[36] = new SvxFontItem( EE_CHAR_FONTINFO_CTL ); + ppDefItems[37] = new SvxFontHeightItem( 240, 100, EE_CHAR_FONTHEIGHT_CJK ); + ppDefItems[38] = new SvxFontHeightItem( 240, 100, EE_CHAR_FONTHEIGHT_CTL ); + ppDefItems[39] = new SvxWeightItem( WEIGHT_NORMAL, EE_CHAR_WEIGHT_CJK ); + ppDefItems[40] = new SvxWeightItem( WEIGHT_NORMAL, EE_CHAR_WEIGHT_CTL ); + ppDefItems[41] = new SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC_CJK ); + ppDefItems[42] = new SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC_CTL ); + ppDefItems[43] = new SvxEmphasisMarkItem( EMPHASISMARK_NONE, EE_CHAR_EMPHASISMARK ); + ppDefItems[44] = new SvxCharReliefItem( RELIEF_NONE, EE_CHAR_RELIEF ); + ppDefItems[45] = new SfxVoidItem( EE_CHAR_RUBI_DUMMY ); #ifndef SVX_LIGHT - ppDefItems[44] = new SvXMLAttrContainerItem( EE_CHAR_XMLATTRIBS ); + ppDefItems[46] = new SvXMLAttrContainerItem( EE_CHAR_XMLATTRIBS ); #else // no need to have alien attributes persistent - ppDefItems[44] = new SfxVoidItem( EE_CHAR_XMLATTRIBS ); + ppDefItems[46] = new SfxVoidItem( EE_CHAR_XMLATTRIBS ); #endif // #ifndef SVX_LIGHT - ppDefItems[45] = new SvxOverlineItem( UNDERLINE_NONE, EE_CHAR_OVERLINE ); + ppDefItems[47] = new SvxOverlineItem( UNDERLINE_NONE, EE_CHAR_OVERLINE ); // Features - ppDefItems[46] = new SfxVoidItem( EE_FEATURE_TAB ); - ppDefItems[47] = new SfxVoidItem( EE_FEATURE_LINEBR ); - ppDefItems[48] = new SvxCharSetColorItem( Color( COL_RED ), RTL_TEXTENCODING_DONTKNOW, EE_FEATURE_NOTCONV ); - ppDefItems[49] = new SvxFieldItem( SvxFieldData(), EE_FEATURE_FIELD ); + ppDefItems[48] = new SfxVoidItem( EE_FEATURE_TAB ); + ppDefItems[49] = new SfxVoidItem( EE_FEATURE_LINEBR ); + ppDefItems[50] = new SvxCharSetColorItem( Color( COL_RED ), RTL_TEXTENCODING_DONTKNOW, EE_FEATURE_NOTCONV ); + ppDefItems[51] = new SvxFieldItem( SvxFieldData(), EE_FEATURE_FIELD ); - DBG_ASSERT( EDITITEMCOUNT == 50, "ITEMCOUNT geaendert, DefItems nicht angepasst!" ); + DBG_ASSERT( EDITITEMCOUNT == 52, "ITEMCOUNT geaendert, DefItems nicht angepasst!" ); // Init DefFonts: GetDefaultFonts( *(SvxFontItem*)ppDefItems[EE_CHAR_FONTINFO - EE_ITEMS_START], @@ -181,9 +184,9 @@ SfxPoolItem** GlobalEditData::GetDefItems() return ppDefItems; } -vos::ORef<SvxForbiddenCharactersTable> GlobalEditData::GetForbiddenCharsTable() +rtl::Reference<SvxForbiddenCharactersTable> GlobalEditData::GetForbiddenCharsTable() { - if ( !xForbiddenCharsTable.isValid() ) + if ( !xForbiddenCharsTable.is() ) { ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory(); xForbiddenCharsTable = new SvxForbiddenCharactersTable( xMSF ); @@ -200,7 +203,7 @@ uno::Reference< linguistic2::XLanguageGuessing > GlobalEditData::GetLanguageGues { xLanguageGuesser = uno::Reference< linguistic2::XLanguageGuessing >( xMgr->createInstance( - rtl::OUString::createFromAscii( "com.sun.star.linguistic2.LanguageGuessing" ) ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.linguistic2.LanguageGuessing" )) ), uno::UNO_QUERY ); } } @@ -235,3 +238,5 @@ EditDLL::~EditDLL() delete pResMgr; delete pGlobalData; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/editeng/eerdll2.hxx b/editeng/source/editeng/eerdll2.hxx index 5ca92b7e47..e1080e99ba 100644 --- a/editeng/source/editeng/eerdll2.hxx +++ b/editeng/source/editeng/eerdll2.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -42,7 +43,7 @@ private: SfxPoolItem** ppDefItems; OutputDevice* pStdRefDevice; - vos::ORef<SvxForbiddenCharactersTable> xForbiddenCharsTable; + rtl::Reference<SvxForbiddenCharactersTable> xForbiddenCharsTable; public: GlobalEditData(); @@ -51,11 +52,12 @@ public: SfxPoolItem** GetDefItems(); OutputDevice* GetStdRefDevice(); - vos::ORef<SvxForbiddenCharactersTable> GetForbiddenCharsTable(); - void SetForbiddenCharsTable( vos::ORef<SvxForbiddenCharactersTable> xForbiddenChars ) { xForbiddenCharsTable = xForbiddenChars; } + rtl::Reference<SvxForbiddenCharactersTable> GetForbiddenCharsTable(); + void SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars ) { xForbiddenCharsTable = xForbiddenChars; } ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XLanguageGuessing > GetLanguageGuesser(); }; #endif //_EERDLL2_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/editeng/eertfpar.cxx b/editeng/source/editeng/eertfpar.cxx index 6ea9ea0b09..3b8d109d4e 100644 --- a/editeng/source/editeng/eertfpar.cxx +++ b/editeng/source/editeng/eertfpar.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -98,7 +99,7 @@ EditRTFParser::~EditRTFParser() { } -SvParserState __EXPORT EditRTFParser::CallParser() +SvParserState EditRTFParser::CallParser() { DBG_ASSERT( !aCurSel.HasRange(), "Selection bei CallParser!" ); // Den Teil, in den importiert wird, vom Rest abtrennen. @@ -189,7 +190,7 @@ void EditRTFParser::AddRTFDefaultValues( const EditPaM& rStart, const EditPaM& r } } -void __EXPORT EditRTFParser::NextToken( int nToken ) +void EditRTFParser::NextToken( int nToken ) { switch( nToken ) { @@ -241,7 +242,7 @@ void __EXPORT EditRTFParser::NextToken( int nToken ) } } -void __EXPORT EditRTFParser::UnknownAttrToken( int nToken, SfxItemSet* ) +void EditRTFParser::UnknownAttrToken( int nToken, SfxItemSet* ) { // fuer Tokens, die im ReadAttr nicht ausgewertet werden // Eigentlich nur fuer Calc (RTFTokenHdl), damit RTF_INTBL @@ -254,7 +255,7 @@ void __EXPORT EditRTFParser::UnknownAttrToken( int nToken, SfxItemSet* ) } } -void __EXPORT EditRTFParser::InsertText() +void EditRTFParser::InsertText() { String aText( aToken ); if ( pImpEditEngine->aImportHdl.IsSet() ) @@ -267,7 +268,7 @@ void __EXPORT EditRTFParser::InsertText() nLastAction = ACTION_INSERTTEXT; } -void __EXPORT EditRTFParser::InsertPara() +void EditRTFParser::InsertPara() { if ( pImpEditEngine->aImportHdl.IsSet() ) { @@ -278,7 +279,7 @@ void __EXPORT EditRTFParser::InsertPara() nLastAction = ACTION_INSERTPARABRK; } -void __EXPORT EditRTFParser::MovePos( int bForward ) +void EditRTFParser::MovePos( int bForward ) { if( bForward ) aCurSel = pImpEditEngine->CursorRight( aCurSel.Max(), ::com::sun::star::i18n::CharacterIteratorMode::SKIPCHARACTER ); @@ -286,7 +287,7 @@ void __EXPORT EditRTFParser::MovePos( int bForward ) aCurSel = pImpEditEngine->CursorLeft( aCurSel.Max(), ::com::sun::star::i18n::CharacterIteratorMode::SKIPCHARACTER ); } -void __EXPORT EditRTFParser::SetEndPrevPara( SvxNodeIdx*& rpNodePos, +void EditRTFParser::SetEndPrevPara( SvxNodeIdx*& rpNodePos, USHORT& rCntPos ) { // Gewollt ist: von der aktuellen Einfuegeposition den vorherigen @@ -305,12 +306,12 @@ void __EXPORT EditRTFParser::SetEndPrevPara( SvxNodeIdx*& rpNodePos, rCntPos = pPrevNode->Len(); } -int __EXPORT EditRTFParser::IsEndPara( SvxNodeIdx* pNd, USHORT nCnt ) const +int EditRTFParser::IsEndPara( SvxNodeIdx* pNd, USHORT nCnt ) const { return ( nCnt == ( ((EditNodeIdx*)pNd)->GetNode()->Len()) ); } -void __EXPORT EditRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet ) +void EditRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet ) { ContentNode* pSttNode = ((EditNodeIdx&)rSet.GetSttNode()).GetNode(); ContentNode* pEndNode = ((EditNodeIdx&)rSet.GetEndNode()).GetNode(); @@ -498,7 +499,7 @@ void EditRTFParser::CreateStyleSheets() } } -void __EXPORT EditRTFParser::CalcValue() +void EditRTFParser::CalcValue() { const MapUnit eDestUnit = static_cast< MapUnit >( aEditMapMode.GetMapUnit() ); const MapUnit eSrcUnit = aRTFMapMode.GetMapUnit(); @@ -601,33 +602,35 @@ void EditRTFParser::SkipGroup() SkipToken( -1 ); // die schliesende Klammer wird "oben" ausgewertet } -ULONG __EXPORT EditNodeIdx::GetIdx() const +ULONG EditNodeIdx::GetIdx() const { return pImpEditEngine->GetEditDoc().GetPos( pNode ); } -SvxNodeIdx* __EXPORT EditNodeIdx::Clone() const +SvxNodeIdx* EditNodeIdx::Clone() const { return new EditNodeIdx( pImpEditEngine, pNode ); } -SvxPosition* __EXPORT EditPosition::Clone() const +SvxPosition* EditPosition::Clone() const { return new EditPosition( pImpEditEngine, pCurSel ); } -SvxNodeIdx* __EXPORT EditPosition::MakeNodeIdx() const +SvxNodeIdx* EditPosition::MakeNodeIdx() const { return new EditNodeIdx( pImpEditEngine, pCurSel->Max().GetNode() ); } -ULONG __EXPORT EditPosition::GetNodeIdx() const +ULONG EditPosition::GetNodeIdx() const { ContentNode* pN = pCurSel->Max().GetNode(); return pImpEditEngine->GetEditDoc().GetPos( pN ); } -USHORT __EXPORT EditPosition::GetCntIdx() const +USHORT EditPosition::GetCntIdx() const { return pCurSel->Max().GetIndex(); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/editeng/eertfpar.hxx b/editeng/source/editeng/eertfpar.hxx index 3216dece6b..9656c9e870 100644 --- a/editeng/source/editeng/eertfpar.hxx +++ b/editeng/source/editeng/eertfpar.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -126,3 +127,5 @@ SV_IMPL_REF( EditRTFParser ); #endif // !SVX_LIGH #endif //_EERTFPAR_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx index dd38c4c16b..24696c8781 100755 --- a/editeng/source/editeng/impedit.cxx +++ b/editeng/source/editeng/impedit.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -72,7 +73,7 @@ inline void lcl_AllignToPixel( Point& rPoint, OutputDevice* pOutDev, short nDiff rPoint = pOutDev->PixelToLogic( rPoint ); } -// ---------------------------------------------------------------------- +// ---------------------------------------------------------------------- // class ImpEditView // ---------------------------------------------------------------------- ImpEditView::ImpEditView( EditView* pView, EditEngine* pEng, Window* pWindow ) : @@ -183,7 +184,6 @@ void ImpEditView::DrawSelection( EditSelection aTmpSel, Region* pRegion ) ContentNode* pEndNode = aTmpSel.Max().GetNode(); sal_uInt16 nStartPara = pEditEngine->pImpEditEngine->GetEditDoc().GetPos( pStartNode ); sal_uInt16 nEndPara = pEditEngine->pImpEditEngine->GetEditDoc().GetPos( pEndNode ); - // ueber die Absaetze iterieren.... for ( sal_uInt16 nPara = nStartPara; nPara <= nEndPara; nPara++ ) { ParaPortion* pTmpPortion = pEditEngine->pImpEditEngine->GetParaPortions().SaveGetObject( nPara ); @@ -206,7 +206,6 @@ void ImpEditView::DrawSelection( EditSelection aTmpSel, Region* pRegion ) if ( nPara == nEndPara ) nEndLine = pTmpPortion->GetLines().FindLine( aTmpSel.Max().GetIndex(), sal_True ); - // ueber die Zeilen iterieren.... for ( sal_uInt16 nLine = nStartLine; nLine <= nEndLine; nLine++ ) { EditLine* pLine = pTmpPortion->GetLines().GetObject( nLine ); @@ -846,10 +845,8 @@ void ImpEditView::ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, US GetCursor()->SetOrientation( 2700 ); } else - // --> FME 2004-10-18 #i32593# - // Reset correct orientation in horizontal layout + // #i32593# Reset correct orientation in horizontal layout GetCursor()->SetOrientation( 0 ); - // <-- GetCursor()->SetSize( aCursorSz ); @@ -993,7 +990,7 @@ Pair ImpEditView::Scroll( long ndX, long ndY, BYTE nRangeCheck ) return Pair( nRealDiffX, nRealDiffY ); } -sal_Bool ImpEditView::PostKeyEvent( const KeyEvent& rKeyEvent ) +sal_Bool ImpEditView::PostKeyEvent( const KeyEvent& rKeyEvent, Window* pFrameWin ) { BOOL bDone = FALSE; @@ -1037,7 +1034,7 @@ sal_Bool ImpEditView::PostKeyEvent( const KeyEvent& rKeyEvent ) } if( !bDone ) - bDone = pEditEngine->PostKeyEvent( rKeyEvent, GetEditViewPtr() ); + bDone = pEditEngine->PostKeyEvent( rKeyEvent, GetEditViewPtr(), pFrameWin ); return bDone; } @@ -1448,7 +1445,7 @@ BOOL ImpEditView::SetCursorAtPoint( const Point& rPointPixel ) // aTmpNewSel: Diff zwischen alt und neu, nicht die neue Selektion EditSelection aTmpNewSel( GetEditSelection().Max(), aPaM ); - // --> OD 2005-12-16 #i27299# + // #i27299# // work on copy of current selection and set new selection, if it has changed. EditSelection aNewEditSelection( GetEditSelection() ); @@ -1469,7 +1466,6 @@ BOOL ImpEditView::SetCursorAtPoint( const Point& rPointPixel ) { SetEditSelection( aNewEditSelection ); } - // <-- BOOL bForceCursor = ( pDragAndDropInfo ? FALSE : TRUE ) && !pEditEngine->pImpEditEngine->IsInSelectionMode(); ShowCursor( bGotoCursor, bForceCursor ); @@ -1542,7 +1538,9 @@ void ImpEditView::dragGestureRecognized( const ::com::sun::star::datatransfer::d { DBG_ASSERT( !pDragAndDropInfo, "dragGestureRecognized - DragAndDropInfo exist!" ); - vos::OGuard aVclGuard( Application::GetSolarMutex() ); + SolarMutexGuard aVclGuard; + + pDragAndDropInfo = NULL; pDragAndDropInfo = NULL; @@ -1622,7 +1620,7 @@ void ImpEditView::dragGestureRecognized( const ::com::sun::star::datatransfer::d void ImpEditView::dragDropEnd( const ::com::sun::star::datatransfer::dnd::DragSourceDropEvent& rDSDE ) throw (::com::sun::star::uno::RuntimeException) { - vos::OGuard aVclGuard( Application::GetSolarMutex() ); + SolarMutexGuard aVclGuard; DBG_ASSERT( pDragAndDropInfo, "ImpEditView::dragDropEnd: pDragAndDropInfo is NULL!" ); @@ -1715,7 +1713,7 @@ void ImpEditView::dragDropEnd( const ::com::sun::star::datatransfer::dnd::DragSo void ImpEditView::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEvent& rDTDE ) throw (::com::sun::star::uno::RuntimeException) { - vos::OGuard aVclGuard( Application::GetSolarMutex() ); + SolarMutexGuard aVclGuard; DBG_ASSERT( pDragAndDropInfo, "Drop - No Drag&Drop info?!" ); @@ -1788,7 +1786,7 @@ void ImpEditView::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDro void ImpEditView::dragEnter( const ::com::sun::star::datatransfer::dnd::DropTargetDragEnterEvent& rDTDEE ) throw (::com::sun::star::uno::RuntimeException) { - vos::OGuard aVclGuard( Application::GetSolarMutex() ); + SolarMutexGuard aVclGuard; if ( !pDragAndDropInfo ) pDragAndDropInfo = new DragAndDropInfo( ); @@ -1815,7 +1813,7 @@ void ImpEditView::dragEnter( const ::com::sun::star::datatransfer::dnd::DropTarg void ImpEditView::dragExit( const ::com::sun::star::datatransfer::dnd::DropTargetEvent& ) throw (::com::sun::star::uno::RuntimeException) { - vos::OGuard aVclGuard( Application::GetSolarMutex() ); + SolarMutexGuard aVclGuard; HideDDCursor(); @@ -1828,7 +1826,7 @@ void ImpEditView::dragExit( const ::com::sun::star::datatransfer::dnd::DropTarge void ImpEditView::dragOver( const ::com::sun::star::datatransfer::dnd::DropTargetDragEvent& rDTDE ) throw (::com::sun::star::uno::RuntimeException) { - vos::OGuard aVclGuard( Application::GetSolarMutex() ); + SolarMutexGuard aVclGuard; Point aMousePos( rDTDE.LocationX, rDTDE.LocationY ); aMousePos = GetWindow()->PixelToLogic( aMousePos ); @@ -2003,3 +2001,5 @@ void ImpEditView::RemoveDragAndDropListeners() bActiveDragAndDropListener = FALSE; } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index 709475a219..b7b197a97a 100755 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -211,7 +212,7 @@ public: EditView* GetView() { return pView; } }; -// ---------------------------------------------------------------------- +// ---------------------------------------------------------------------- // class ImpEditView // ---------------------------------------------------------------------- class ImpEditView : public vcl::unohelper::DragAndDropClient @@ -289,7 +290,7 @@ public: BOOL IsVertical() const; - BOOL PostKeyEvent( const KeyEvent& rKeyEvent ); + BOOL PostKeyEvent( const KeyEvent& rKeyEvent, Window* pFrameWin = NULL ); BOOL MouseButtonUp( const MouseEvent& rMouseEvent ); BOOL MouseButtonDown( const MouseEvent& rMouseEvent ); @@ -517,7 +518,7 @@ private: Link maBeginDropHdl; Link maEndDropHdl; - vos::ORef<SvxForbiddenCharactersTable> xForbiddenCharsTable; + rtl::Reference<SvxForbiddenCharactersTable> xForbiddenCharsTable; // ================================================================ @@ -664,6 +665,8 @@ private: void SetBackgroundColor( const Color& rColor ) { maBackgroundColor = rColor; } Color GetBackgroundColor() const { return maBackgroundColor; } + long CalcVertLineSpacing(Point& rStartPos) const; + Color GetAutoColor() const; void EnableAutoColor( BOOL b ) { bUseAutoColor = b; } BOOL IsAutoColorEnabled() const { return bUseAutoColor; } @@ -781,7 +784,7 @@ public: EditPaM DeleteSelected( EditSelection aEditSelection); EditPaM InsertText( const EditSelection& rCurEditSelection, sal_Unicode c, sal_Bool bOverwrite, sal_Bool bIsUserInput = sal_False ); EditPaM InsertText( EditSelection aCurEditSelection, const String& rStr ); - EditPaM AutoCorrect( const EditSelection& rCurEditSelection, sal_Unicode c, sal_Bool bOverwrite ); + EditPaM AutoCorrect( const EditSelection& rCurEditSelection, sal_Unicode c, bool bOverwrite, Window* pFrameWin = NULL ); EditPaM DeleteLeftOrRight( const EditSelection& rEditSelection, BYTE nMode, BYTE nDelMode = DELMODE_SIMPLE ); EditPaM InsertParaBreak( EditSelection aEditSelection ); EditPaM InsertLineBreak( EditSelection aEditSelection ); @@ -986,6 +989,8 @@ public: const SvxLRSpaceItem& GetLRSpaceItem( ContentNode* pNode ); SvxAdjust GetJustification( USHORT nPara ) const; + SvxCellJustifyMethod GetJustifyMethod( USHORT nPara ) const; + SvxCellVerJustify GetVerJustification( USHORT nPara ) const; void SetCharStretching( sal_uInt16 nX, sal_uInt16 nY ); inline void GetCharStretching( sal_uInt16& rX, sal_uInt16& rY ); @@ -1015,8 +1020,8 @@ public: void SetAddExtLeading( BOOL b ); BOOL IsAddExtLeading() const { return bAddExtLeading; } - vos::ORef<SvxForbiddenCharactersTable> GetForbiddenCharsTable( BOOL bGetInternal = TRUE ) const; - void SetForbiddenCharsTable( vos::ORef<SvxForbiddenCharactersTable> xForbiddenChars ); + rtl::Reference<SvxForbiddenCharactersTable> GetForbiddenCharsTable( BOOL bGetInternal = TRUE ) const; + void SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars ); BOOL mbLastTryMerge; @@ -1212,3 +1217,4 @@ Point Rotate( const Point& rPoint, short nOrientation, const Point& rOrigin ); #endif // _IMPEDIT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index e489b04d0a..868df41a07 100755 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -2134,6 +2135,20 @@ SvxAdjust ImpEditEngine::GetJustification( USHORT nPara ) const return eJustification; } +SvxCellJustifyMethod ImpEditEngine::GetJustifyMethod( USHORT nPara ) const +{ + const SvxJustifyMethodItem& rItem = static_cast<const SvxJustifyMethodItem&>( + GetParaAttrib(nPara, EE_PARA_JUST_METHOD)); + return static_cast<SvxCellJustifyMethod>(rItem.GetEnumValue()); +} + +SvxCellVerJustify ImpEditEngine::GetVerJustification( USHORT nPara ) const +{ + const SvxVerJustifyItem& rItem = static_cast<const SvxVerJustifyItem&>( + GetParaAttrib(nPara, EE_PARA_VER_JUST)); + return static_cast<SvxCellVerJustify>(rItem.GetEnumValue()); +} + // ---------------------------------------------------------------------- // Textaenderung @@ -2574,7 +2589,8 @@ void ImpEditEngine::ImpRemoveParagraph( USHORT nPara ) } } -EditPaM ImpEditEngine::AutoCorrect( const EditSelection& rCurSel, xub_Unicode c, BOOL bOverwrite ) +EditPaM ImpEditEngine::AutoCorrect( const EditSelection& rCurSel, xub_Unicode c, + bool bOverwrite, Window* pFrameWin ) { EditSelection aSel( rCurSel ); #ifndef SVX_LIGHT @@ -2624,7 +2640,7 @@ EditPaM ImpEditEngine::AutoCorrect( const EditSelection& rCurSel, xub_Unicode c, ContentNode* pNode = aSel.Max().GetNode(); USHORT nIndex = aSel.Max().GetIndex(); EdtAutoCorrDoc aAuto( this, pNode, nIndex, c ); - pAutoCorrect->AutoCorrect( aAuto, *pNode, nIndex, c, !bOverwrite ); + pAutoCorrect->AutoCorrect( aAuto, *pNode, nIndex, c, !bOverwrite, pFrameWin ); aSel.Max().SetIndex( aAuto.GetCursor() ); // #i78661 since the SvxAutoCorrect object used here is @@ -4529,15 +4545,15 @@ void ImpEditEngine::IndentBlock( EditView* pEditView, BOOL bRight ) } } -vos::ORef<SvxForbiddenCharactersTable> ImpEditEngine::GetForbiddenCharsTable( BOOL bGetInternal ) const +rtl::Reference<SvxForbiddenCharactersTable> ImpEditEngine::GetForbiddenCharsTable( BOOL bGetInternal ) const { - vos::ORef<SvxForbiddenCharactersTable> xF = xForbiddenCharsTable; - if ( !xF.isValid() && bGetInternal ) + rtl::Reference<SvxForbiddenCharactersTable> xF = xForbiddenCharsTable; + if ( !xF.is() && bGetInternal ) xF = EE_DLL()->GetGlobalData()->GetForbiddenCharsTable(); return xF; } -void ImpEditEngine::SetForbiddenCharsTable( vos::ORef<SvxForbiddenCharactersTable> xForbiddenChars ) +void ImpEditEngine::SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars ) { EE_DLL()->GetGlobalData()->SetForbiddenCharsTable( xForbiddenChars ); } @@ -4640,3 +4656,5 @@ IMPL_LINK( ImpEditEngine, DocModified, void*, EMPTYARG ) aModifyHdl.Call( NULL /*GetEditEnginePtr()*/ ); // NULL, because also used for Outliner return 0; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index ea0c31aa61..dd7e3d6542 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -932,6 +933,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY ) } DBG_ASSERT( pPortion->GetKind() != PORTIONKIND_HYPHENATOR, "CreateLines: Hyphenator-Portion!" ); DBG_ASSERT( pPortion->GetLen() || bProcessingEmptyLine, "Leere Portion in CreateLines ?!" ); + (void)bProcessingEmptyLine; if ( pNextFeature && ( pNextFeature->GetStart() == nTmpPos ) ) { sal_uInt16 nWhich = pNextFeature->GetItem()->Which(); @@ -1052,6 +1054,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY ) else { DBG_ASSERT( pPortion->GetLen() || bProcessingEmptyLine, "Empty Portion - Extra Space?!" ); + (void)bProcessingEmptyLine; SeekCursor( pNode, nTmpPos+1, aTmpFont ); aTmpFont.SetPhysFont( GetRefDevice() ); ImplInitDigitMode( GetRefDevice(), 0, 0, 0, aTmpFont.GetLanguage() ); @@ -1427,9 +1430,10 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY ) break; case SVX_ADJUST_BLOCK: { + bool bDistLastLine = (GetJustifyMethod(nPara) == SVX_JUSTIFY_METHOD_DISTRIBUTE); long nRemainingSpace = nMaxLineWidth - aTextSize.Width(); pLine->SetStartPosX( (sal_uInt16)nStartX ); - if ( !bEOC && ( nRemainingSpace > 0 ) ) // nicht die letzte Zeile... + if ( nRemainingSpace > 0 && (!bEOC || bDistLastLine) ) ImpAdjustBlocks( pParaPortion, pLine, nRemainingSpace ); } break; @@ -2003,22 +2007,42 @@ void ImpEditEngine::ImpAdjustBlocks( ParaPortion* pParaPortion, EditLine* pLine, // Search blanks or Kashidas... SvUShorts aPositions; - USHORT nChar; - for ( nChar = nFirstChar; nChar <= nLastChar; nChar++ ) + USHORT nLastScript = i18n::ScriptType::LATIN; + for ( USHORT nChar = nFirstChar; nChar <= nLastChar; nChar++ ) { + EditPaM aPaM( pNode, nChar+1 ); + LanguageType eLang = GetLanguage(aPaM); + USHORT nScript = GetScriptType(aPaM); + if ( MsLangId::getPrimaryLanguage( eLang) == LANGUAGE_ARABIC_PRIMARY_ONLY ) + // Arabic script is handled later. + continue; + if ( pNode->GetChar(nChar) == ' ' ) { - // Don't use blank if language is arabic - LanguageType eLang = GetLanguage( EditPaM( pNode, nChar ) ); - if ( MsLangId::getPrimaryLanguage( eLang) != LANGUAGE_ARABIC_PRIMARY_ONLY ) - aPositions.Insert( nChar, aPositions.Count() ); + // Normal latin script. + aPositions.Insert( nChar, aPositions.Count() ); + } + else if (nChar > nFirstChar) + { + if (nLastScript == i18n::ScriptType::ASIAN) + { + // Set break position between this and the last character if + // the last character is asian script. + aPositions.Insert( nChar-1, aPositions.Count() ); + } + else if (nScript == i18n::ScriptType::ASIAN) + { + // Set break position between a latin script and asian script. + aPositions.Insert( nChar-1, aPositions.Count() ); + } } + + nLastScript = nScript; } // Kashidas ? ImpFindKashidas( pNode, nFirstChar, nLastChar, aPositions ); - if ( !aPositions.Count() ) return; @@ -2058,12 +2082,13 @@ void ImpEditEngine::ImpAdjustBlocks( ParaPortion* pParaPortion, EditLine* pLine, // Letztes Zeichen wird schon nicht mehr beachtet... for ( USHORT n = 0; n < aPositions.Count(); n++ ) { - nChar = aPositions[n]; + USHORT nChar = aPositions[n]; if ( nChar < nLastChar ) { USHORT nPortionStart, nPortion; - nPortion = pParaPortion->GetTextPortions().FindPortion( nChar, nPortionStart ); + nPortion = pParaPortion->GetTextPortions().FindPortion( nChar, nPortionStart, true ); TextPortion* pLastPortion = pParaPortion->GetTextPortions()[ nPortion ]; + USHORT nPortionEnd = nPortionStart + pLastPortion->GetLen(); // Die Breite der Portion: pLastPortion->GetSize().Width() += nMore4Everyone; @@ -2072,7 +2097,7 @@ void ImpEditEngine::ImpAdjustBlocks( ParaPortion* pParaPortion, EditLine* pLine, // Correct positions in array // Even for kashidas just change positions, VCL will then draw the kashida automaticly - USHORT nPortionEnd = nPortionStart + pLastPortion->GetLen(); + for ( USHORT _n = nChar; _n < nPortionEnd; _n++ ) { pLine->GetCharPosArray()[_n-nFirstChar] += nMore4Everyone; @@ -2657,36 +2682,44 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_uInt16 nPos, SvxFont& rF } if ( nStretchX != 100 ) { - aRealSz.Width() *= nStretchX; - aRealSz.Width() /= 100; - - // Auch das Kerning: (long wegen Zwischenergebnis) - long nKerning = rFont.GetFixKerning(); -/* - Die Ueberlegung war: Wenn neg. Kerning, aber StretchX = 200 - => Nicht das Kerning verdoppelt, also die Buchstaben weiter - zusammenziehen - --------------------------- - Kern StretchX =>Kern - --------------------------- - >0 <100 < (Proportional) - <0 <100 < (Proportional) - >0 >100 > (Proportional) - <0 >100 < (Der Betrag, also Antiprop) -*/ - if ( ( nKerning < 0 ) && ( nStretchX > 100 ) ) + if ( nStretchX == nStretchY && + nRelWidth == 100 ) { - // Antiproportional - nKerning *= 100; - nKerning /= nStretchX; + aRealSz.Width() = 0; } - else if ( nKerning ) + else { - // Proportional - nKerning *= nStretchX; - nKerning /= 100; + aRealSz.Width() *= nStretchX; + aRealSz.Width() /= 100; + + // Auch das Kerning: (long wegen Zwischenergebnis) + long nKerning = rFont.GetFixKerning(); +/* + Die Ueberlegung war: Wenn neg. Kerning, aber StretchX = 200 + => Nicht das Kerning verdoppelt, also die Buchstaben weiter + zusammenziehen + --------------------------- + Kern StretchX =>Kern + --------------------------- + >0 <100 < (Proportional) + <0 <100 < (Proportional) + >0 >100 > (Proportional) + <0 >100 < (Der Betrag, also Antiprop) +*/ + if ( ( nKerning < 0 ) && ( nStretchX > 100 ) ) + { + // Antiproportional + nKerning *= 100; + nKerning /= nStretchX; + } + else if ( nKerning ) + { + // Proportional + nKerning *= nStretchX; + nKerning /= 100; + } + rFont.SetFixKerning( (short)nKerning ); } - rFont.SetFixKerning( (short)nKerning ); } } if ( nRelWidth != 100 ) @@ -2875,6 +2908,8 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta // if( GetStatus().DoOnlineSpelling() && pActiveView ) // aCurPos = pActiveView->pImpEditView->GetEditSelections().Max(); + long nVertLineSpacing = CalcVertLineSpacing(aStartPos); + // -------------------------------------------------- // Ueber alle Absaetze... // -------------------------------------------------- @@ -2923,12 +2958,16 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta aTmpPos.X() += pLine->GetStartPosX(); aTmpPos.Y() += pLine->GetMaxAscent(); aStartPos.Y() += pLine->GetHeight(); + if (nLine != nLastLine) + aStartPos.Y() += nVertLineSpacing; } else { aTmpPos.Y() += pLine->GetStartPosX(); aTmpPos.X() -= pLine->GetMaxAscent(); aStartPos.X() -= pLine->GetHeight(); + if (nLine != nLastLine) + aStartPos.X() -= nVertLineSpacing; } if ( ( !IsVertical() && ( aStartPos.Y() > aClipRec.Top() ) ) @@ -3038,7 +3077,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta nTextLen = pTextPortion->GetLen(); pDXArray = pLine->GetCharPosArray().GetData()+( nIndex-pLine->GetStart() ); - // --> FME 2005-10-18 #i55716# Paint control characters + // Paint control characters (#i55716#) if ( aStatus.MarkFields() ) { xub_StrLen nTmpIdx; @@ -3126,7 +3165,6 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta } } } - // <-- } else if ( pTextPortion->GetKind() == PORTIONKIND_FIELD ) { @@ -3377,14 +3415,13 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta aRealOutPos.X() += pTextPortion->GetExtraInfos()->nPortionOffsetX; } - // --> FME 2005-06-17 #i37132# RTL portions with + // RTL portions with (#i37132#) // compressed blank should not paint this blank: if ( pTextPortion->IsRightToLeft() && nTextLen >= 2 && pDXArray[ nTextLen - 1 ] == pDXArray[ nTextLen - 2 ] && ' ' == aText.GetChar( nTextStart + nTextLen - 1 ) ) --nTextLen; - // <-- // output directly aTmpFont.QuickDrawText( pOutDev, aRealOutPos, aText, nTextStart, nTextLen, pDXArray ); @@ -3399,7 +3436,6 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta pOutDev->DrawRect( aRect ); } - // PDF export: if ( pPDFExtOutDevData ) { @@ -3517,7 +3553,26 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta String aText; aText.Fill( (USHORT)nChars, pTextPortion->GetExtraValue() ); + aTmpFont.QuickDrawText( pOutDev, aTmpPos, aText, 0, aText.Len(), NULL ); pOutDev->DrawStretchText( aTmpPos, pTextPortion->GetSize().Width(), aText ); + + if ( bStripOnly ) + { + // create EOL and EOP bools + const bool bEndOfLine(y == pLine->GetEndPortion()); + const bool bEndOfParagraph(bEndOfLine && nLine + 1 == nLines); + + const Color aOverlineColor(pOutDev->GetOverlineColor()); + const Color aTextLineColor(pOutDev->GetTextLineColor()); + + // StripPortions() data callback + GetEditEnginePtr()->DrawingTab( aTmpPos, + pTextPortion->GetSize().Width(), + pTextPortion->GetExtraValue(), + aTmpFont, n, nIndex, pTextPortion->GetRightToLeft(), + bEndOfLine, bEndOfParagraph, + aOverlineColor, aTextLineColor); + } } } break; @@ -4011,6 +4066,54 @@ ParaPortion* ImpEditEngine::GetNextVisPortion( ParaPortion* pCurPortion ) return pPortion; } +long ImpEditEngine::CalcVertLineSpacing(Point& rStartPos) const +{ + long nTotalOccupiedHeight = 0; + sal_uInt16 nTotalLineCount = 0; + const ParaPortionList& rParaPortions = GetParaPortions(); + sal_uInt16 nParaCount = rParaPortions.Count(); + + for (sal_uInt16 i = 0; i < nParaCount; ++i) + { + if (GetVerJustification(i) != SVX_VER_JUSTIFY_BLOCK) + // All paragraphs must have the block justification set. + return 0; + + ParaPortion* pPortion = rParaPortions.GetObject(i); + nTotalOccupiedHeight += pPortion->GetFirstLineOffset(); + + const SvxLineSpacingItem& rLSItem = (const SvxLineSpacingItem&)pPortion->GetNode()->GetContentAttribs().GetItem(EE_PARA_SBL); + sal_uInt16 nSBL = ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_FIX ) + ? GetYValue( rLSItem.GetInterLineSpace() ) : 0; + + const SvxULSpaceItem& rULItem = (const SvxULSpaceItem&)pPortion->GetNode()->GetContentAttribs().GetItem(EE_PARA_ULSPACE); + long nUL = GetYValue( rULItem.GetLower() ); + + EditLineList& rLines = pPortion->GetLines(); + sal_uInt16 nLineCount = rLines.Count(); + nTotalLineCount += nLineCount; + for (sal_uInt16 j = 0; j < nLineCount; ++j) + { + EditLine* pLine = rLines.GetObject(j); + nTotalOccupiedHeight += pLine->GetHeight(); + if (j < nLineCount-1) + nTotalOccupiedHeight += nSBL; + nTotalOccupiedHeight += nUL; + } + } + + long nTotalSpace = IsVertical() ? aPaperSize.Width() : aPaperSize.Height(); + nTotalSpace -= nTotalOccupiedHeight; + if (nTotalSpace <= 0 || nTotalLineCount <= 1) + return 0; + + if (IsVertical()) + // Shift the text to the right for the asian layout mode. + rStartPos.X() += nTotalSpace; + + return nTotalSpace / (nTotalLineCount-1); +} + EditPaM ImpEditEngine::InsertParagraph( sal_uInt16 nPara ) { EditPaM aPaM; @@ -4076,20 +4179,25 @@ void ImpEditEngine::SetFlatMode( sal_Bool bFlat ) void ImpEditEngine::SetCharStretching( sal_uInt16 nX, sal_uInt16 nY ) { + bool bChanged(false); if ( !IsVertical() ) { + bChanged = nStretchX!=nX || nStretchY!=nY; nStretchX = nX; nStretchY = nY; } else { + bChanged = nStretchX!=nY || nStretchY!=nX; nStretchX = nY; nStretchY = nX; } - if ( aStatus.DoStretch() ) + if (bChanged && aStatus.DoStretch()) { FormatFullDoc(); + // (potentially) need everything redrawn + aInvalidRec=Rectangle(0,0,1000000,1000000); UpdateViews( GetActiveView() ); } } @@ -4417,7 +4525,7 @@ Reference < i18n::XBreakIterator > ImpEditEngine::ImplGetBreakIterator() const if ( !xBI.is() ) { Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory() ); - xBI.set( xMSF->createInstance( OUString::createFromAscii( "com.sun.star.i18n.BreakIterator" ) ), UNO_QUERY ); + xBI.set( xMSF->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.i18n.BreakIterator" )) ), UNO_QUERY ); } return xBI; } @@ -4427,7 +4535,7 @@ Reference < i18n::XExtendedInputSequenceChecker > ImpEditEngine::ImplGetInputSeq if ( !xISC.is() ) { Reference< lang::XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory(); - Reference < XInterface > xI = xMSF->createInstance( OUString::createFromAscii( "com.sun.star.i18n.InputSequenceChecker" ) ); + Reference < XInterface > xI = xMSF->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.i18n.InputSequenceChecker" )) ); if ( xI.is() ) { Any x = xI->queryInterface( ::getCppuType((const Reference< i18n::XExtendedInputSequenceChecker >*)0) ); @@ -4675,3 +4783,5 @@ void ImpEditEngine::ImplFillTextMarkingVector(const lang::Locale& rLocale, EEngi } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx index a2ff143495..4045739d45 100755 --- a/editeng/source/editeng/impedit4.cxx +++ b/editeng/source/editeng/impedit4.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -321,7 +322,7 @@ void lcl_FindValidAttribs( ItemList& rLst, ContentNode* pNode, sal_uInt16 nIndex if ( pAttr->GetEnd() > nIndex ) { if ( IsScriptItemValid( pAttr->GetItem()->Which(), nScriptType ) ) - rLst.Insert( pAttr->GetItem(), LIST_APPEND ); + rLst.Insert( pAttr->GetItem() ); } nAttr++; pAttr = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr ); @@ -684,11 +685,11 @@ sal_uInt32 ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel ) if ( !n || IsScriptChange( EditPaM( pNode, nIndex ) ) ) { SfxItemSet aAttribs = GetAttribs( nNode, nIndex+1, nIndex+1 ); - aAttribItems.Insert( &aAttribs.Get( GetScriptItemId( EE_CHAR_FONTINFO, nScriptType ) ), LIST_APPEND ); - aAttribItems.Insert( &aAttribs.Get( GetScriptItemId( EE_CHAR_FONTHEIGHT, nScriptType ) ), LIST_APPEND ); - aAttribItems.Insert( &aAttribs.Get( GetScriptItemId( EE_CHAR_WEIGHT, nScriptType ) ), LIST_APPEND ); - aAttribItems.Insert( &aAttribs.Get( GetScriptItemId( EE_CHAR_ITALIC, nScriptType ) ), LIST_APPEND ); - aAttribItems.Insert( &aAttribs.Get( GetScriptItemId( EE_CHAR_LANGUAGE, nScriptType ) ), LIST_APPEND ); + aAttribItems.Insert( &aAttribs.Get( GetScriptItemId( EE_CHAR_FONTINFO, nScriptType ) ) ); + aAttribItems.Insert( &aAttribs.Get( GetScriptItemId( EE_CHAR_FONTHEIGHT, nScriptType ) ) ); + aAttribItems.Insert( &aAttribs.Get( GetScriptItemId( EE_CHAR_WEIGHT, nScriptType ) ) ); + aAttribItems.Insert( &aAttribs.Get( GetScriptItemId( EE_CHAR_ITALIC, nScriptType ) ) ); + aAttribItems.Insert( &aAttribs.Get( GetScriptItemId( EE_CHAR_LANGUAGE, nScriptType ) ) ); } // #96298# Insert hard attribs AFTER CJK attribs... lcl_FindValidAttribs( aAttribItems, pNode, nIndex, nScriptType ); @@ -1159,7 +1160,7 @@ EditTextObject* ImpEditEngine::CreateBinTextObject( EditSelection aSel, SfxItemP // Schwelle rauf setzen, wenn Olli die Absaetze nicht mehr zerhackt! if ( bAllowBigObjects && bOnlyFullParagraphs && IsFormatted() && GetUpdateMode() && ( nTextPortions >= nBigObjectStart ) ) { - XParaPortionList* pXList = new XParaPortionList( GetRefDevice(), aPaperSize.Width() ); + XParaPortionList* pXList = new XParaPortionList( GetRefDevice(), aPaperSize.Width(), nStretchX, nStretchY ); pTxtObj->SetPortionInfo( pXList ); for ( nNode = nStartNode; nNode <= nEndNode; nNode++ ) { @@ -1250,7 +1251,9 @@ EditSelection ImpEditEngine::InsertBinTextObject( BinTextObject& rTextObject, Ed XParaPortionList* pPortionInfo = rTextObject.GetPortionInfo(); if ( pPortionInfo && ( (long)pPortionInfo->GetPaperWidth() == aPaperSize.Width() ) - && ( pPortionInfo->GetRefMapMode() == GetRefDevice()->GetMapMode() ) ) + && ( pPortionInfo->GetRefMapMode() == GetRefDevice()->GetMapMode() ) + && ( pPortionInfo->GetStretchX() == nStretchX ) + && ( pPortionInfo->GetStretchY() == nStretchY ) ) { if ( ( pPortionInfo->GetRefDevPtr() == (sal_uIntPtr)GetRefDevice() ) || ( ( pPortionInfo->GetRefDevType() == OUTDEV_VIRDEV ) && @@ -1956,16 +1959,12 @@ Reference< XSpellAlternatives > ImpEditEngine::ImpSpell( EditView* pEditView ) return xSpellAlt; #endif } -/*-- 13.10.2003 16:43:27--------------------------------------------------- - -----------------------------------------------------------------------*/ void ImpEditEngine::EndSpelling() { DELETEZ(pSpellInfo); } -/*-- 13.10.2003 16:43:27--------------------------------------------------- - -----------------------------------------------------------------------*/ void ImpEditEngine::StartSpelling(EditView& rEditView, sal_Bool bMultipleDoc) { DBG_ASSERT(!pSpellInfo, "pSpellInfo already set?"); @@ -1973,9 +1972,7 @@ void ImpEditEngine::StartSpelling(EditView& rEditView, sal_Bool bMultipleDoc) EditSelection aCurSel( rEditView.pImpEditView->GetEditSelection() ); pSpellInfo = CreateSpellInfo( aCurSel, bMultipleDoc ); } -/*-- 13.10.2003 16:43:27--------------------------------------------------- - Search for the next wrong word within the given selection - -----------------------------------------------------------------------*/ + Reference< XSpellAlternatives > ImpEditEngine::ImpFindNextError(EditSelection& rSelection) { /* ContentNode* pLastNode = */ aEditDoc.SaveGetObject( (aEditDoc.Count()-1) ); @@ -2021,7 +2018,6 @@ Reference< XSpellAlternatives > ImpEditEngine::ImpFindNextError(EditSelection& r } return xSpellAlt; } -/*-- 13.10.2003 16:43:27--------------------------------------------------- -----------------------------------------------------------------------*/ bool ImpEditEngine::SpellSentence(EditView& rEditView, @@ -2087,9 +2083,7 @@ bool ImpEditEngine::SpellSentence(EditView& rEditView, return bRet; } -/*-- 15.10.2003 16:09:12--------------------------------------------------- - adds one portion to the SpellPortions - -----------------------------------------------------------------------*/ +// Adds one portion to the SpellPortions void ImpEditEngine::AddPortion( const EditSelection rSel, uno::Reference< XSpellAlternatives > xAlt, @@ -2115,9 +2109,7 @@ void ImpEditEngine::AddPortion( #endif } -/*-- 15.10.2003 16:07:47--------------------------------------------------- - adds one or more portions of text to the SpellPortions depending on language changes - -----------------------------------------------------------------------*/ +// Adds one or more portions of text to the SpellPortions depending on language changes void ImpEditEngine::AddPortionIterated( EditView& rEditView, const EditSelection rSel, @@ -2323,9 +2315,7 @@ void ImpEditEngine::ApplyChangedSentence(EditView& rEditView, } #endif } -/*-- 08.09.2008 11:33:02--------------------------------------------------- - -----------------------------------------------------------------------*/ void ImpEditEngine::PutSpellingToSentenceStart( EditView& rEditView ) { #ifdef SVX_LIGHT @@ -2334,7 +2324,7 @@ void ImpEditEngine::PutSpellingToSentenceStart( EditView& rEditView ) { rEditView.pImpEditView->SetEditSelection( pSpellInfo->aLastSpellContentSelections.begin()->Min() ); } - + #endif } @@ -2912,6 +2902,54 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection, SvxCreateLocale( GetLanguage( EditPaM( pNode, aEndBndry.startPos + 1 ) ) ), nWordType); } + // prevent advancing to the next word if selection is at word boundary + if (aEndBndry.startPos >= nEndPos) + { + aEndBndry = _xBI->previousWord( + *pNode, aEndBndry.startPos, + SvxCreateLocale( GetLanguage( EditPaM( pNode, aEndBndry.startPos + 1 ) ) ), + nWordType); + } + + i18n::Boundary aCurWordBndry( aSttBndry ); + while (aCurWordBndry.startPos <= aEndBndry.startPos) + { + nCurrentStart = (xub_StrLen)aCurWordBndry.startPos; + nCurrentEnd = (xub_StrLen)aCurWordBndry.endPos; + sal_Int32 nLen = nCurrentEnd - nCurrentStart; + DBG_ASSERT( nLen > 0, "invalid word length of 0" ); +#if OSL_DEBUG_LEVEL > 1 + String aText( pNode->Copy( nCurrentStart, nLen ) ); +#endif + + Sequence< sal_Int32 > aOffsets; + String aNewText( aTranslitarationWrapper.transliterate( *pNode, + GetLanguage( EditPaM( pNode, nCurrentStart + 1 ) ), + nCurrentStart, nLen, &aOffsets )); + + if (!pNode->Equals( aNewText, nCurrentStart, nLen )) + { + aChgData.nStart = nCurrentStart; + aChgData.nLen = nLen; + aChgData.aSelection = EditSelection( EditPaM( pNode, nCurrentStart ), EditPaM( pNode, nCurrentEnd ) ); + aChgData.aNewText = aNewText; + aChgData.aOffsets = aOffsets; + aChanges.push_back( aChgData ); + } +#if OSL_DEBUG_LEVEL > 1 + String aSelTxt ( GetSelected( aChgData.aSelection ) ); + (void) aSelTxt; +#endif + + aCurWordBndry = _xBI->nextWord( *pNode, nCurrentEnd, + SvxCreateLocale( GetLanguage( EditPaM( pNode, nCurrentEnd + 1 ) ) ), + nWordType); + } + DBG_ASSERT( nCurrentEnd >= aEndBndry.endPos, "failed to reach end of transliteration" ); + } + else if (nTransliterationMode == i18n::TransliterationModulesExtra::SENTENCE_CASE) + { + // for 'sentence case' we need to iterate sentence by sentence i18n::Boundary aCurWordBndry( aSttBndry ); while (aCurWordBndry.startPos <= aEndBndry.startPos) @@ -3249,3 +3287,4 @@ long ImpEditEngine::LogicToTwips( long n ) } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/editeng/impedit5.cxx b/editeng/source/editeng/impedit5.cxx index 55c65ef3cf..8709b197c1 100644 --- a/editeng/source/editeng/impedit5.cxx +++ b/editeng/source/editeng/impedit5.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -898,7 +899,7 @@ ImplIMEInfos::~ImplIMEInfos() void ImplIMEInfos::CopyAttribs( const USHORT* pA, USHORT nL ) { nLen = nL; - delete pAttribs; + delete[] pAttribs; pAttribs = new USHORT[ nL ]; memcpy( pAttribs, pA, nL*sizeof(USHORT) ); } @@ -909,3 +910,5 @@ void ImplIMEInfos::DestroyAttribs() pAttribs = NULL; nLen = 0; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/editeng/makefile.mk b/editeng/source/editeng/makefile.mk index 79d6ef3d57..4a8f8f2540 100644 --- a/editeng/source/editeng/makefile.mk +++ b/editeng/source/editeng/makefile.mk @@ -49,32 +49,32 @@ CDEFS+=-DEDITDEBUG .ENDIF SLOFILES = \ - $(SLO)$/textconv.obj \ - $(SLO)$/editattr.obj \ - $(SLO)$/editdbg.obj \ - $(SLO)$/editdoc.obj \ - $(SLO)$/editdoc2.obj \ - $(SLO)$/editeng.obj \ - $(SLO)$/editobj.obj \ - $(SLO)$/editsel.obj \ - $(SLO)$/editundo.obj \ - $(SLO)$/editview.obj \ - $(SLO)$/edtspell.obj \ - $(SLO)$/eehtml.obj \ - $(SLO)$/eerdll.obj \ - $(SLO)$/eeobj.obj \ - $(SLO)$/eertfpar.obj \ - $(SLO)$/impedit.obj \ - $(SLO)$/impedit2.obj \ - $(SLO)$/impedit3.obj \ - $(SLO)$/impedit4.obj \ - $(SLO)$/impedit5.obj + $(SLO)$/textconv.obj \ + $(SLO)$/editattr.obj \ + $(SLO)$/editdbg.obj \ + $(SLO)$/editdoc.obj \ + $(SLO)$/editdoc2.obj \ + $(SLO)$/editeng.obj \ + $(SLO)$/editobj.obj \ + $(SLO)$/editsel.obj \ + $(SLO)$/editundo.obj \ + $(SLO)$/editview.obj \ + $(SLO)$/edtspell.obj \ + $(SLO)$/eehtml.obj \ + $(SLO)$/eerdll.obj \ + $(SLO)$/eeobj.obj \ + $(SLO)$/eertfpar.obj \ + $(SLO)$/impedit.obj \ + $(SLO)$/impedit2.obj \ + $(SLO)$/impedit3.obj \ + $(SLO)$/impedit4.obj \ + $(SLO)$/impedit5.obj SRS1NAME=$(TARGET) SRC1FILES= editeng.src EXCEPTIONSFILES= \ - $(SLO)$/unolingu.obj + $(SLO)$/unolingu.obj .INCLUDE : target.mk diff --git a/editeng/source/editeng/textconv.cxx b/editeng/source/editeng/textconv.cxx index 41ec376497..b37e767a6f 100644 --- a/editeng/source/editeng/textconv.cxx +++ b/editeng/source/editeng/textconv.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -627,3 +628,4 @@ sal_Bool TextConvWrapper::HasRubySupport() const ////////////////////////////////////////////////////////////////////// +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/editeng/textconv.hxx b/editeng/source/editeng/textconv.hxx index 4a478af5d0..e8d17075d7 100644 --- a/editeng/source/editeng/textconv.hxx +++ b/editeng/source/editeng/textconv.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -120,3 +121,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/items/bulitem.cxx b/editeng/source/items/bulitem.cxx index ff81548d0a..f14d985ec4 100644 --- a/editeng/source/items/bulitem.cxx +++ b/editeng/source/items/bulitem.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -532,3 +533,5 @@ void SvxBulletItem::SetGraphicObject( const GraphicObject& rGraphicObject ) pGraphicObject = new GraphicObject( rGraphicObject ); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/items/charhiddenitem.cxx b/editeng/source/items/charhiddenitem.cxx index 515aef9282..fca652ed7d 100644 --- a/editeng/source/items/charhiddenitem.cxx +++ b/editeng/source/items/charhiddenitem.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -35,23 +36,16 @@ TYPEINIT1_FACTORY(SvxCharHiddenItem, SfxBoolItem, new SvxCharHiddenItem(sal_False, 0)); -/*-- 16.12.2003 15:24:25--------------------------------------------------- - - -----------------------------------------------------------------------*/ SvxCharHiddenItem::SvxCharHiddenItem( const sal_Bool bHidden, const USHORT nId ) : SfxBoolItem( nId, bHidden ) { } -/*-- 16.12.2003 15:24:25--------------------------------------------------- - -----------------------------------------------------------------------*/ SfxPoolItem* SvxCharHiddenItem::Clone( SfxItemPool * ) const { return new SvxCharHiddenItem( *this ); } -/*-- 16.12.2003 15:24:25--------------------------------------------------- - -----------------------------------------------------------------------*/ SfxItemPresentation SvxCharHiddenItem::GetPresentation ( SfxItemPresentation ePres, @@ -80,3 +74,4 @@ SfxItemPresentation SvxCharHiddenItem::GetPresentation return SFX_ITEM_PRESENTATION_NONE; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/items/flditem.cxx b/editeng/source/items/flditem.cxx index b6e2efb976..981446747f 100644 --- a/editeng/source/items/flditem.cxx +++ b/editeng/source/items/flditem.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -434,21 +435,21 @@ MetaAction* SvxURLField::createBeginComment() const SV_IMPL_PERSIST1( SvxPageField, SvxFieldData ); -SvxFieldData* __EXPORT SvxPageField::Clone() const +SvxFieldData* SvxPageField::Clone() const { return new SvxPageField; // leer } -int __EXPORT SvxPageField::operator==( const SvxFieldData& rCmp ) const +int SvxPageField::operator==( const SvxFieldData& rCmp ) const { return ( rCmp.Type() == TYPE(SvxPageField) ); } -void __EXPORT SvxPageField::Load( SvPersistStream & /*rStm*/ ) +void SvxPageField::Load( SvPersistStream & /*rStm*/ ) { } -void __EXPORT SvxPageField::Save( SvPersistStream & /*rStm*/ ) +void SvxPageField::Save( SvPersistStream & /*rStm*/ ) { } @@ -460,41 +461,41 @@ MetaAction* SvxPageField::createBeginComment() const SV_IMPL_PERSIST1( SvxPagesField, SvxFieldData ); -SvxFieldData* __EXPORT SvxPagesField::Clone() const +SvxFieldData* SvxPagesField::Clone() const { return new SvxPagesField; // leer } -int __EXPORT SvxPagesField::operator==( const SvxFieldData& rCmp ) const +int SvxPagesField::operator==( const SvxFieldData& rCmp ) const { return ( rCmp.Type() == TYPE(SvxPagesField) ); } -void __EXPORT SvxPagesField::Load( SvPersistStream & /*rStm*/ ) +void SvxPagesField::Load( SvPersistStream & /*rStm*/ ) { } -void __EXPORT SvxPagesField::Save( SvPersistStream & /*rStm*/ ) +void SvxPagesField::Save( SvPersistStream & /*rStm*/ ) { } SV_IMPL_PERSIST1( SvxTimeField, SvxFieldData ); -SvxFieldData* __EXPORT SvxTimeField::Clone() const +SvxFieldData* SvxTimeField::Clone() const { return new SvxTimeField; // leer } -int __EXPORT SvxTimeField::operator==( const SvxFieldData& rCmp ) const +int SvxTimeField::operator==( const SvxFieldData& rCmp ) const { return ( rCmp.Type() == TYPE(SvxTimeField) ); } -void __EXPORT SvxTimeField::Load( SvPersistStream & /*rStm*/ ) +void SvxTimeField::Load( SvPersistStream & /*rStm*/ ) { } -void __EXPORT SvxTimeField::Save( SvPersistStream & /*rStm*/ ) +void SvxTimeField::Save( SvPersistStream & /*rStm*/ ) { } @@ -505,41 +506,41 @@ MetaAction* SvxTimeField::createBeginComment() const SV_IMPL_PERSIST1( SvxFileField, SvxFieldData ); -SvxFieldData* __EXPORT SvxFileField::Clone() const +SvxFieldData* SvxFileField::Clone() const { return new SvxFileField; // leer } -int __EXPORT SvxFileField::operator==( const SvxFieldData& rCmp ) const +int SvxFileField::operator==( const SvxFieldData& rCmp ) const { return ( rCmp.Type() == TYPE(SvxFileField) ); } -void __EXPORT SvxFileField::Load( SvPersistStream & /*rStm*/ ) +void SvxFileField::Load( SvPersistStream & /*rStm*/ ) { } -void __EXPORT SvxFileField::Save( SvPersistStream & /*rStm*/ ) +void SvxFileField::Save( SvPersistStream & /*rStm*/ ) { } SV_IMPL_PERSIST1( SvxTableField, SvxFieldData ); -SvxFieldData* __EXPORT SvxTableField::Clone() const +SvxFieldData* SvxTableField::Clone() const { return new SvxTableField; // leer } -int __EXPORT SvxTableField::operator==( const SvxFieldData& rCmp ) const +int SvxTableField::operator==( const SvxFieldData& rCmp ) const { return ( rCmp.Type() == TYPE(SvxTableField) ); } -void __EXPORT SvxTableField::Load( SvPersistStream & /*rStm*/ ) +void SvxTableField::Load( SvPersistStream & /*rStm*/ ) { } -void __EXPORT SvxTableField::Save( SvPersistStream & /*rStm*/ ) +void SvxTableField::Save( SvPersistStream & /*rStm*/ ) { } @@ -963,21 +964,21 @@ SvClassManager& SvxFieldItem::GetClassManager() SV_IMPL_PERSIST1( SvxHeaderField, SvxFieldData ); -SvxFieldData* __EXPORT SvxHeaderField::Clone() const +SvxFieldData* SvxHeaderField::Clone() const { return new SvxHeaderField; // leer } -int __EXPORT SvxHeaderField::operator==( const SvxFieldData& rCmp ) const +int SvxHeaderField::operator==( const SvxFieldData& rCmp ) const { return ( rCmp.Type() == TYPE(SvxHeaderField) ); } -void __EXPORT SvxHeaderField::Load( SvPersistStream & /*rStm*/ ) +void SvxHeaderField::Load( SvPersistStream & /*rStm*/ ) { } -void __EXPORT SvxHeaderField::Save( SvPersistStream & /*rStm*/ ) +void SvxHeaderField::Save( SvPersistStream & /*rStm*/ ) { } @@ -985,21 +986,21 @@ void __EXPORT SvxHeaderField::Save( SvPersistStream & /*rStm*/ ) SV_IMPL_PERSIST1( SvxFooterField, SvxFieldData ); -SvxFieldData* __EXPORT SvxFooterField::Clone() const +SvxFieldData* SvxFooterField::Clone() const { return new SvxFooterField; // leer } -int __EXPORT SvxFooterField::operator==( const SvxFieldData& rCmp ) const +int SvxFooterField::operator==( const SvxFieldData& rCmp ) const { return ( rCmp.Type() == TYPE(SvxFooterField) ); } -void __EXPORT SvxFooterField::Load( SvPersistStream & /*rStm*/ ) +void SvxFooterField::Load( SvPersistStream & /*rStm*/ ) { } -void __EXPORT SvxFooterField::Save( SvPersistStream & /*rStm*/ ) +void SvxFooterField::Save( SvPersistStream & /*rStm*/ ) { } @@ -1007,21 +1008,21 @@ void __EXPORT SvxFooterField::Save( SvPersistStream & /*rStm*/ ) SV_IMPL_PERSIST1( SvxDateTimeField, SvxFieldData ); -SvxFieldData* __EXPORT SvxDateTimeField::Clone() const +SvxFieldData* SvxDateTimeField::Clone() const { return new SvxDateTimeField; // leer } -int __EXPORT SvxDateTimeField::operator==( const SvxFieldData& rCmp ) const +int SvxDateTimeField::operator==( const SvxFieldData& rCmp ) const { return ( rCmp.Type() == TYPE(SvxDateTimeField) ); } -void __EXPORT SvxDateTimeField::Load( SvPersistStream & /*rStm*/ ) +void SvxDateTimeField::Load( SvPersistStream & /*rStm*/ ) { } -void __EXPORT SvxDateTimeField::Save( SvPersistStream & /*rStm*/ ) +void SvxDateTimeField::Save( SvPersistStream & /*rStm*/ ) { } @@ -1049,3 +1050,4 @@ String SvxDateTimeField::GetFormatted( Date& rDate, Time& rTime, int eFormat, Sv return aRet; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index a7cc6bdaad..ca16e8f0f5 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -39,9 +40,10 @@ #include <com/sun/star/table/CellRangeAddress.hpp> #include <com/sun/star/table/CellContentType.hpp> #include <com/sun/star/table/TableOrientation.hpp> -#include <com/sun/star/table/CellHoriJustify.hpp> #include <com/sun/star/util/SortField.hpp> #include <com/sun/star/util/SortFieldType.hpp> +#include <com/sun/star/table/BorderLine2.hpp> +#include <com/sun/star/table/BorderLineStyle.hpp> #include <com/sun/star/table/CellOrientation.hpp> #include <com/sun/star/table/CellAddress.hpp> #include <com/sun/star/style/PageStyleLayout.hpp> @@ -218,7 +220,7 @@ SvxSizeItem::SvxSizeItem( const sal_uInt16 nId, const Size& rSize ) : } // ----------------------------------------------------------------------- -sal_Bool SvxSizeItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +bool SvxSizeItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -235,13 +237,13 @@ sal_Bool SvxSizeItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const case MID_SIZE_SIZE: rVal <<= aTmp; break; case MID_SIZE_WIDTH: rVal <<= aTmp.Width; break; case MID_SIZE_HEIGHT: rVal <<= aTmp.Height; break; - default: DBG_ERROR("Wrong MemberId!"); return sal_False; + default: DBG_ERROR("Wrong MemberId!"); return false; } - return sal_True; + return true; } // ----------------------------------------------------------------------- -sal_Bool SvxSizeItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +bool SvxSizeItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -262,7 +264,7 @@ sal_Bool SvxSizeItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) } else { - return sal_False; + return false; } } break; @@ -270,7 +272,7 @@ sal_Bool SvxSizeItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) { sal_Int32 nVal = 0; if(!(rVal >>= nVal )) - return sal_False; + return false; aSize.Width() = bConvert ? MM100_TO_TWIP(nVal) : nVal; } @@ -279,15 +281,15 @@ sal_Bool SvxSizeItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) { sal_Int32 nVal = 0; if(!(rVal >>= nVal)) - return sal_True; + return true; aSize.Height() = bConvert ? MM100_TO_TWIP(nVal) : nVal; } break; default: DBG_ERROR("Wrong MemberId!"); - return sal_False; + return false; } - return sal_True; + return true; } // ----------------------------------------------------------------------- @@ -365,18 +367,18 @@ SvStream& SvxSizeItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) co // ----------------------------------------------------------------------- -int SvxSizeItem::ScaleMetrics( long nMult, long nDiv ) +bool SvxSizeItem::ScaleMetrics( long nMult, long nDiv ) { aSize.Width() = Scale( aSize.Width(), nMult, nDiv ); aSize.Height() = Scale( aSize.Height(), nMult, nDiv ); - return 1; + return true; } // ----------------------------------------------------------------------- -int SvxSizeItem::HasMetrics() const +bool SvxSizeItem::HasMetrics() const { - return 1; + return true; } // ----------------------------------------------------------------------- @@ -430,9 +432,9 @@ SvxLRSpaceItem::SvxLRSpaceItem( const long nLeft, const long nRight, } // ----------------------------------------------------------------------- -sal_Bool SvxLRSpaceItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +bool SvxLRSpaceItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const { - sal_Bool bRet = sal_True; + bool bRet = true; sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; switch( nMemberId ) @@ -468,14 +470,14 @@ sal_Bool SvxLRSpaceItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const break; default: - bRet = sal_False; + bRet = false; DBG_ERROR("unknown MemberId"); } return bRet; } // ----------------------------------------------------------------------- -sal_Bool SvxLRSpaceItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +bool SvxLRSpaceItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -510,7 +512,7 @@ sal_Bool SvxLRSpaceItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) nPropRightMargin = (USHORT)nRel; } else - return FALSE; + return false; } break; case MID_FIRST_LINE_INDENT : @@ -527,9 +529,9 @@ sal_Bool SvxLRSpaceItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) default: DBG_ERROR("unknown MemberId"); - return sal_False; + return false; } - return sal_True; + return true; } // ----------------------------------------------------------------------- @@ -780,20 +782,20 @@ sal_uInt16 SvxLRSpaceItem::GetVersion( sal_uInt16 nFileVersion ) const // ----------------------------------------------------------------------- -int SvxLRSpaceItem::ScaleMetrics( long nMult, long nDiv ) +bool SvxLRSpaceItem::ScaleMetrics( long nMult, long nDiv ) { nFirstLineOfst = (short)Scale( nFirstLineOfst, nMult, nDiv ); nTxtLeft = Scale( nTxtLeft, nMult, nDiv ); nLeftMargin = Scale( nLeftMargin, nMult, nDiv ); nRightMargin = Scale( nRightMargin, nMult, nDiv ); - return 1; + return true; } // ----------------------------------------------------------------------- -int SvxLRSpaceItem::HasMetrics() const +bool SvxLRSpaceItem::HasMetrics() const { - return 1; + return true; } // class SvxULSpaceItem -------------------------------------------------- @@ -824,9 +826,9 @@ SvxULSpaceItem::SvxULSpaceItem( const sal_uInt16 nUp, const sal_uInt16 nLow, } // ----------------------------------------------------------------------- -sal_Bool SvxULSpaceItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +bool SvxULSpaceItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const { - sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); + bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; switch( nMemberId ) { @@ -846,11 +848,11 @@ sal_Bool SvxULSpaceItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const case MID_UP_REL_MARGIN: rVal <<= (sal_Int16) nPropUpper; break; case MID_LO_REL_MARGIN: rVal <<= (sal_Int16) nPropLower; break; } - return sal_True; + return true; } // ----------------------------------------------------------------------- -sal_Bool SvxULSpaceItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +bool SvxULSpaceItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -861,7 +863,7 @@ sal_Bool SvxULSpaceItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) { ::com::sun::star::frame::status::UpperLowerMarginScale aUpperLowerMarginScale; if ( !(rVal >>= aUpperLowerMarginScale )) - return sal_False; + return false; { SetUpper((sal_uInt16)(bConvert ? MM100_TO_TWIP( aUpperLowerMarginScale.Upper ) : aUpperLowerMarginScale.Upper)); SetLower((sal_uInt16)(bConvert ? MM100_TO_TWIP( aUpperLowerMarginScale.Lower ) : aUpperLowerMarginScale.Lower)); @@ -874,12 +876,12 @@ sal_Bool SvxULSpaceItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) case MID_UP_MARGIN : if(!(rVal >>= nVal) || nVal < 0) - return sal_False; + return false; SetUpper((USHORT)(bConvert ? MM100_TO_TWIP(nVal) : nVal)); break; case MID_LO_MARGIN : if(!(rVal >>= nVal) || nVal < 0) - return sal_False; + return false; SetLower((USHORT)(bConvert ? MM100_TO_TWIP(nVal) : nVal)); break; case MID_UP_REL_MARGIN: @@ -894,16 +896,16 @@ sal_Bool SvxULSpaceItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) nPropLower = (USHORT)nRel; } else - return FALSE; + return false; } break; default: DBG_ERROR("unknown MemberId"); - return sal_False; + return false; } - return sal_True; + return true; } // ----------------------------------------------------------------------- @@ -1025,18 +1027,18 @@ sal_uInt16 SvxULSpaceItem::GetVersion( sal_uInt16 /*nFileVersion*/ ) const // ----------------------------------------------------------------------- -int SvxULSpaceItem::ScaleMetrics( long nMult, long nDiv ) +bool SvxULSpaceItem::ScaleMetrics( long nMult, long nDiv ) { nUpper = (sal_uInt16)Scale( nUpper, nMult, nDiv ); nLower = (sal_uInt16)Scale( nLower, nMult, nDiv ); - return 1; + return true; } // ----------------------------------------------------------------------- -int SvxULSpaceItem::HasMetrics() const +bool SvxULSpaceItem::HasMetrics() const { - return 1; + return true; } @@ -1165,9 +1167,7 @@ int SvxProtectItem::operator==( const SfxPoolItem& rAttr ) const bPos == ( (SvxProtectItem&)rAttr ).bPos ); } -/*-----------------16.03.98 12:42------------------- ---------------------------------------------------*/ -sal_Bool SvxProtectItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +bool SvxProtectItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -1179,16 +1179,14 @@ sal_Bool SvxProtectItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const case MID_PROTECT_POSITION: bValue = bPos; break; default: DBG_ERROR("falsche MemberId"); - return sal_False; + return false; } rVal = Bool2Any( bValue ); - return sal_True; + return true; } -/*-----------------16.03.98 12:42------------------- ---------------------------------------------------*/ -sal_Bool SvxProtectItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +bool SvxProtectItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -1200,9 +1198,9 @@ sal_Bool SvxProtectItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) case MID_PROTECT_POSITION: bPos = bVal; break; default: DBG_ERROR("falsche MemberId"); - return sal_False; + return false; } - return sal_True; + return true; } // ----------------------------------------------------------------------- @@ -1297,7 +1295,7 @@ SvxShadowItem::SvxShadowItem( const USHORT nId, } // ----------------------------------------------------------------------- -sal_Bool SvxShadowItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +bool SvxShadowItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -1324,20 +1322,20 @@ sal_Bool SvxShadowItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const case MID_TRANSPARENT: rVal <<= aShadow.IsTransparent; break; case MID_BG_COLOR: rVal <<= aShadow.Color; break; case 0: rVal <<= aShadow; break; - default: DBG_ERROR("Wrong MemberId!"); return sal_False; + default: DBG_ERROR("Wrong MemberId!"); return false; } - return sal_True; + return true; } // ----------------------------------------------------------------------- -sal_Bool SvxShadowItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +bool SvxShadowItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; table::ShadowFormat aShadow; uno::Any aAny; - sal_Bool bRet = QueryValue( aAny, bConvert ? CONVERT_TWIPS : 0 ) && ( aAny >>= aShadow ); + bool bRet = QueryValue( aAny, bConvert ? CONVERT_TWIPS : 0 ) && ( aAny >>= aShadow ); switch ( nMemberId ) { case MID_LOCATION: @@ -1507,17 +1505,17 @@ SvStream& SvxShadowItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) // ----------------------------------------------------------------------- -int SvxShadowItem::ScaleMetrics( long nMult, long nDiv ) +bool SvxShadowItem::ScaleMetrics( long nMult, long nDiv ) { nWidth = (sal_uInt16)Scale( nWidth, nMult, nDiv ); - return 1; + return true; } // ----------------------------------------------------------------------- -int SvxShadowItem::HasMetrics() const +bool SvxShadowItem::HasMetrics() const { - return 1; + return true; } // ----------------------------------------------------------------------- @@ -1567,10 +1565,12 @@ void SvxShadowItem::SetEnumValue( sal_uInt16 nVal ) // class SvxBorderLine -------------------------------------------------- -SvxBorderLine::SvxBorderLine( const Color *pCol, sal_uInt16 nOut, sal_uInt16 nIn, sal_uInt16 nDist ) +SvxBorderLine::SvxBorderLine( const Color *pCol, sal_uInt16 nOut, sal_uInt16 nIn, sal_uInt16 nDist, + SvxBorderStyle nStyle ) : nOutWidth( nOut ) , nInWidth ( nIn ) , nDistance( nDist ) +, m_nStyle( nStyle ) { if ( pCol ) aColor = *pCol; @@ -1591,6 +1591,7 @@ SvxBorderLine& SvxBorderLine::operator=( const SvxBorderLine& r ) nOutWidth = r.nOutWidth; nInWidth = r.nInWidth; nDistance = r.nDistance; + m_nStyle = r.m_nStyle; return *this; } @@ -1610,7 +1611,8 @@ sal_Bool SvxBorderLine::operator==( const SvxBorderLine& rCmp ) const return ( ( aColor == rCmp.GetColor() ) && ( nInWidth == rCmp.GetInWidth() ) && ( nOutWidth == rCmp.GetOutWidth() ) && - ( nDistance == rCmp.GetDistance() ) ); + ( nDistance == rCmp.GetDistance() ) && + ( m_nStyle == rCmp.GetStyle() ) ); } // ----------------------------------------------------------------------- @@ -1829,27 +1831,27 @@ int SvxBoxItem::operator==( const SfxPoolItem& rAttr ) const // ----------------------------------------------------------------------- table::BorderLine SvxBoxItem::SvxLineToLine(const SvxBorderLine* pLine, sal_Bool bConvert) { - table::BorderLine aLine; + table::BorderLine2 aLine; if(pLine) { aLine.Color = pLine->GetColor().GetColor() ; aLine.InnerLineWidth = sal_uInt16( bConvert ? TWIP_TO_MM100_UNSIGNED(pLine->GetInWidth() ): pLine->GetInWidth() ); aLine.OuterLineWidth = sal_uInt16( bConvert ? TWIP_TO_MM100_UNSIGNED(pLine->GetOutWidth()): pLine->GetOutWidth() ); aLine.LineDistance = sal_uInt16( bConvert ? TWIP_TO_MM100_UNSIGNED(pLine->GetDistance()): pLine->GetDistance() ); + aLine.LineStyle = pLine->GetStyle( ); } else aLine.Color = aLine.InnerLineWidth = aLine.OuterLineWidth = aLine.LineDistance = 0; return aLine; } // ----------------------------------------------------------------------- -sal_Bool SvxBoxItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +bool SvxBoxItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); - table::BorderLine aRetLine; + table::BorderLine2 aRetLine; sal_uInt16 nDist = 0; sal_Bool bDistMember = sal_False; nMemberId &= ~CONVERT_TWIPS; - sal_Bool bSerialize = sal_False; switch(nMemberId) { case 0: @@ -1869,22 +1871,18 @@ sal_Bool SvxBoxItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const return sal_True; } case MID_LEFT_BORDER: - bSerialize = sal_True; // intentionally no break! case LEFT_BORDER: aRetLine = SvxBoxItem::SvxLineToLine(GetLeft(), bConvert); break; case MID_RIGHT_BORDER: - bSerialize = sal_True; // intentionally no break! case RIGHT_BORDER: aRetLine = SvxBoxItem::SvxLineToLine(GetRight(), bConvert); break; case MID_BOTTOM_BORDER: - bSerialize = sal_True; // intentionally no break! case BOTTOM_BORDER: aRetLine = SvxBoxItem::SvxLineToLine(GetBottom(), bConvert); break; case MID_TOP_BORDER: - bSerialize = sal_True; // intentionally no break! case TOP_BORDER: aRetLine = SvxBoxItem::SvxLineToLine(GetTop(), bConvert); break; @@ -1913,23 +1911,9 @@ sal_Bool SvxBoxItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const if( bDistMember ) rVal <<= (sal_Int32)(bConvert ? TWIP_TO_MM100_UNSIGNED(nDist) : nDist); else - { -/* - if ( bSerialize ) - { - ::com::sun::star::uno::Sequence < ::com::sun::star::uno::Any > aSeq(4); - aSeq[0] <<= aRetLine.Color; - aSeq[1] <<= aRetLine.InnerLineWidth; - aSeq[2] <<= aRetLine.OuterLineWidth; - aSeq[3] <<= aRetLine.LineDistance; - rVal <<= aSeq; - } - else -*/ - rVal <<= aRetLine; - } + rVal <<= aRetLine; - return sal_True; + return true; } // ----------------------------------------------------------------------- @@ -1939,15 +1923,87 @@ sal_Bool SvxBoxItem::LineToSvxLine(const ::com::sun::star::table::BorderLine& rL rSvxLine.SetInWidth( sal_uInt16( bConvert ? MM100_TO_TWIP(rLine.InnerLineWidth) : rLine.InnerLineWidth )); rSvxLine.SetOutWidth( sal_uInt16( bConvert ? MM100_TO_TWIP(rLine.OuterLineWidth) : rLine.OuterLineWidth )); rSvxLine.SetDistance( sal_uInt16( bConvert ? MM100_TO_TWIP(rLine.LineDistance ) : rLine.LineDistance )); + sal_Bool bRet = rLine.InnerLineWidth > 0 || rLine.OuterLineWidth > 0; return bRet; } +} + // ----------------------------------------------------------------------- +sal_Bool SvxBoxItem::LineToSvxLine(const ::com::sun::star::table::BorderLine& rLine, SvxBorderLine& rSvxLine, sal_Bool bConvert) +{ + return lcl_lineToSvxLine(rLine, rSvxLine, bConvert); +} -sal_Bool SvxBoxItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +sal_Bool +SvxBoxItem::LineToSvxLine(const ::com::sun::star::table::BorderLine2& rLine, SvxBorderLine& rSvxLine, sal_Bool bConvert) { - sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); + const bool bRet(lcl_lineToSvxLine(rLine, rSvxLine, bConvert)); + + switch ( rLine.LineStyle ) + { + default: + case table::BorderLineStyle::SOLID: + rSvxLine.SetStyle( SOLID ); + break; + case table::BorderLineStyle::DOTTED: + rSvxLine.SetStyle( DOTTED ); + break; + case table::BorderLineStyle::DASHED: + rSvxLine.SetStyle( DASHED ); + break; + } + + return bRet; +} + +// ----------------------------------------------------------------------- + +namespace +{ + +bool +lcl_extractBorderLine(const uno::Any& rAny, table::BorderLine2& rLine) +{ + if (rAny >>= rLine) + return true; + + table::BorderLine aBorderLine; + if (rAny >>= aBorderLine) + { + rLine.Color = aBorderLine.Color; + rLine.InnerLineWidth = aBorderLine.InnerLineWidth; + rLine.OuterLineWidth = aBorderLine.OuterLineWidth; + rLine.LineDistance = aBorderLine.LineDistance; + rLine.LineStyle = table::BorderLineStyle::SOLID; + return true; + } + + return false; +} + +template<typename Item> +bool +lcl_setLine(const uno::Any& rAny, Item& rItem, USHORT nLine, const bool bConvert) +{ + bool bSet(false); + table::BorderLine2 aBorderLine; + if (lcl_extractBorderLine(rAny, aBorderLine)) + { + SvxBorderLine aLine; + bSet = SvxBoxItem::LineToSvxLine(aBorderLine, aLine, bConvert); + if (bSet) + rItem.SetLine(&aLine, nLine); + } + return bSet; +} + +} + +bool SvxBoxItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +{ + bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); sal_uInt16 nLine = BOX_LINE_TOP; sal_Bool bDistMember = sal_False; nMemberId &= ~CONVERT_TWIPS; @@ -1994,9 +2050,11 @@ sal_Bool SvxBoxItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) else return sal_False; + // WTH are the borders and the distances saved in different order? sal_uInt16 nLines[4] = { BOX_LINE_TOP, BOX_LINE_BOTTOM, BOX_LINE_LEFT, BOX_LINE_RIGHT }; for ( sal_Int32 n = 4; n < 9; n++ ) { + sal_Int32 nDist = 0; if ( aSeq[n] >>= nDist ) { if( bConvert ) @@ -2063,8 +2121,8 @@ sal_Bool SvxBoxItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) if( !rVal.hasValue() ) return sal_False; - table::BorderLine aBorderLine; - if( rVal >>= aBorderLine ) + table::BorderLine2 aBorderLine; + if( lcl_extractBorderLine(rVal, aBorderLine) ) { // usual struct } @@ -2072,7 +2130,7 @@ sal_Bool SvxBoxItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) { // serialization for basic macro recording uno::Reference < script::XTypeConverter > xConverter - ( ::comphelper::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.script.Converter")), + ( ::comphelper::getProcessServiceFactory()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.script.Converter"))), uno::UNO_QUERY ); uno::Sequence < uno::Any > aSeq; uno::Any aNew; @@ -2314,7 +2372,7 @@ sal_uInt16 SvxBoxItem::GetVersion( sal_uInt16 nFFVer ) const // ----------------------------------------------------------------------- -int SvxBoxItem::ScaleMetrics( long nMult, long nDiv ) +bool SvxBoxItem::ScaleMetrics( long nMult, long nDiv ) { if ( pTop ) pTop->ScaleMetrics( nMult, nDiv ); if ( pBottom ) pBottom->ScaleMetrics( nMult, nDiv ); @@ -2324,14 +2382,14 @@ int SvxBoxItem::ScaleMetrics( long nMult, long nDiv ) nBottomDist = (sal_uInt16)Scale( nBottomDist, nMult, nDiv ); nLeftDist = (sal_uInt16)Scale( nLeftDist, nMult, nDiv ); nRightDist = (sal_uInt16)Scale( nRightDist, nMult, nDiv ); - return 1; + return true; } // ----------------------------------------------------------------------- -int SvxBoxItem::HasMetrics() const +bool SvxBoxItem::HasMetrics() const { - return 1; + return true; } // ----------------------------------------------------------------------- @@ -2721,19 +2779,19 @@ SvStream& SvxBoxInfoItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) // ----------------------------------------------------------------------- -int SvxBoxInfoItem::ScaleMetrics( long nMult, long nDiv ) +bool SvxBoxInfoItem::ScaleMetrics( long nMult, long nDiv ) { if ( pHori ) pHori->ScaleMetrics( nMult, nDiv ); if ( pVert ) pVert->ScaleMetrics( nMult, nDiv ); nDefDist = (sal_uInt16)Scale( nDefDist, nMult, nDiv ); - return 1; + return true; } // ----------------------------------------------------------------------- -int SvxBoxInfoItem::HasMetrics() const +bool SvxBoxInfoItem::HasMetrics() const { - return 1; + return true; } // ----------------------------------------------------------------------- @@ -2779,14 +2837,13 @@ void SvxBoxInfoItem::ResetFlags() nValidFlags = 0x7F; // alles g"ultig au/ser Disable } -sal_Bool SvxBoxInfoItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +bool SvxBoxInfoItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); - table::BorderLine aRetLine; + table::BorderLine2 aRetLine; sal_Int16 nVal=0; sal_Bool bIntMember = sal_False; nMemberId &= ~CONVERT_TWIPS; - sal_Bool bSerialize = sal_False; switch(nMemberId) { case 0: @@ -2836,32 +2893,18 @@ sal_Bool SvxBoxInfoItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const bIntMember = sal_True; rVal <<= (sal_Int32)(bConvert ? TWIP_TO_MM100_UNSIGNED(GetDefDist()) : GetDefDist()); break; - default: DBG_ERROR("Wrong MemberId!"); return sal_False; + default: DBG_ERROR("Wrong MemberId!"); return false; } if( !bIntMember ) - { -/* - if ( bSerialize ) - { - ::com::sun::star::uno::Sequence < ::com::sun::star::uno::Any > aSeq(4); - aSeq[0] <<= aRetLine.Color; - aSeq[1] <<= aRetLine.InnerLineWidth; - aSeq[2] <<= aRetLine.OuterLineWidth; - aSeq[3] <<= aRetLine.LineDistance; - rVal <<= aSeq; - } - else - */ - rVal <<= aRetLine; - } + rVal <<= aRetLine; - return sal_True; + return true; } // ----------------------------------------------------------------------- -sal_Bool SvxBoxInfoItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +bool SvxBoxInfoItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); // sal_uInt16 nLine = BOX_LINE_TOP; @@ -2896,6 +2939,9 @@ sal_Bool SvxBoxInfoItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) } else return sal_False; + + sal_Int16 nFlags( 0 ); + sal_Int32 nVal( 0 ); if ( aSeq[2] >>= nFlags ) { SetTable ( ( nFlags & 0x01 ) != 0 ); @@ -2924,8 +2970,8 @@ sal_Bool SvxBoxInfoItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) if( !rVal.hasValue() ) return sal_False; - table::BorderLine aBorderLine; - if( rVal >>= aBorderLine ) + table::BorderLine2 aBorderLine; + if( lcl_extractBorderLine(rVal, aBorderLine) ) { // usual struct } @@ -2933,7 +2979,7 @@ sal_Bool SvxBoxInfoItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) { // serialization for basic macro recording uno::Reference < script::XTypeConverter > xConverter - ( ::comphelper::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.script.Converter")), + ( ::comphelper::getProcessServiceFactory()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.script.Converter"))), uno::UNO_QUERY ); uno::Any aNew; uno::Sequence < uno::Any > aSeq; @@ -3064,7 +3110,7 @@ XubString SvxFmtBreakItem::GetValueTextByPos( sal_uInt16 nPos ) const } // ----------------------------------------------------------------------- -sal_Bool SvxFmtBreakItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const +bool SvxFmtBreakItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const { style::BreakType eBreak = style::BreakType_NONE; switch ( (SvxBreak)GetValue() ) @@ -3078,10 +3124,10 @@ sal_Bool SvxFmtBreakItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const default: ;//prevent warning } rVal <<= eBreak; - return sal_True; + return true; } // ----------------------------------------------------------------------- -sal_Bool SvxFmtBreakItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ ) +bool SvxFmtBreakItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ ) { style::BreakType nBreak; @@ -3107,7 +3153,7 @@ sal_Bool SvxFmtBreakItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ ) } SetValue((sal_uInt16) eBreak); - return sal_True; + return true; } // ----------------------------------------------------------------------- @@ -3266,7 +3312,7 @@ SfxPoolItem* SvxLineItem::Clone( SfxItemPool* ) const return new SvxLineItem( *this ); } -sal_Bool SvxLineItem::QueryValue( uno::Any& rVal, BYTE nMemId ) const +bool SvxLineItem::QueryValue( uno::Any& rVal, BYTE nMemId ) const { sal_Bool bConvert = 0!=(nMemId&CONVERT_TWIPS); nMemId &= ~CONVERT_TWIPS; @@ -3285,32 +3331,32 @@ sal_Bool SvxLineItem::QueryValue( uno::Any& rVal, BYTE nMemId ) const case MID_DISTANCE: rVal <<= sal_Int32(pLine->GetDistance()); break; default: DBG_ERROR( "Wrong MemberId" ); - return sal_False; + return false; } } - return TRUE; + return true; } // ----------------------------------------------------------------------- -sal_Bool SvxLineItem::PutValue( const uno::Any& rVal, BYTE nMemId ) +bool SvxLineItem::PutValue( const uno::Any& rVal, BYTE nMemId ) { sal_Bool bConvert = 0!=(nMemId&CONVERT_TWIPS); nMemId &= ~CONVERT_TWIPS; sal_Int32 nVal = 0; if ( nMemId == 0 ) { - table::BorderLine aLine; - if ( rVal >>= aLine ) + table::BorderLine2 aLine; + if ( lcl_extractBorderLine(rVal, aLine) ) { if ( !pLine ) pLine = new SvxBorderLine; if( !SvxBoxItem::LineToSvxLine(aLine, *pLine, bConvert) ) DELETEZ( pLine ); - return sal_True; + return true; } - return sal_False; + return false; } else if ( rVal >>= nVal ) { @@ -3323,15 +3369,16 @@ sal_Bool SvxLineItem::PutValue( const uno::Any& rVal, BYTE nMemId ) case MID_OUTER_WIDTH: pLine->SetOutWidth((USHORT)nVal); break; case MID_INNER_WIDTH: pLine->SetInWidth((USHORT)nVal); break; case MID_DISTANCE: pLine->SetDistance((USHORT)nVal); break; + case MID_LINE_STYLE: pLine->SetStyle((SvxBorderStyle)nVal); break; default: DBG_ERROR( "Wrong MemberId" ); return sal_False; } - return sal_True; + return true; } - return sal_False; + return false; } //------------------------------------------------------------------------ @@ -3383,17 +3430,17 @@ SvStream& SvxLineItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) co // ----------------------------------------------------------------------- -int SvxLineItem::ScaleMetrics( long nMult, long nDiv ) +bool SvxLineItem::ScaleMetrics( long nMult, long nDiv ) { if ( pLine ) pLine->ScaleMetrics( nMult, nDiv ); - return 1; + return true; } // ----------------------------------------------------------------------- -int SvxLineItem::HasMetrics() const +bool SvxLineItem::HasMetrics() const { - return 1; + return true; } // ----------------------------------------------------------------------- @@ -3701,7 +3748,7 @@ inline sal_Int8 lcl_TransparencyToPercent(sal_Int32 nTrans) return (sal_Int8)((nTrans * 100 + 127) / 254); } -sal_Bool SvxBrushItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +bool SvxBrushItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -3758,12 +3805,12 @@ sal_Bool SvxBrushItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const break; } - return sal_True; + return true; } // ----------------------------------------------------------------------- -sal_Bool SvxBrushItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +bool SvxBrushItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -3874,7 +3921,7 @@ sal_Bool SvxBrushItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) break; } - return sal_True; + return true; } // ----------------------------------------------------------------------- @@ -4308,9 +4355,7 @@ CntWallpaperItem* SvxBrushItem::CreateCntWallpaperItem() const #ifdef _MSC_VER #pragma optimize ( "", on ) #endif -/* -----------------------------16.08.2002 09:18------------------------------ - ---------------------------------------------------------------------------*/ void SvxBrushItem::ApplyGraphicTransparency_Impl() { DBG_ASSERT(pImpl->pGraphicObject, "no GraphicObject available" ); @@ -4394,7 +4439,7 @@ SfxItemPresentation SvxFrameDirectionItem::GetPresentation( return eRet; } -sal_Bool SvxFrameDirectionItem::PutValue( const com::sun::star::uno::Any& rVal, +bool SvxFrameDirectionItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE ) { sal_Int16 nVal = sal_Int16(); @@ -4420,7 +4465,7 @@ sal_Bool SvxFrameDirectionItem::PutValue( const com::sun::star::uno::Any& rVal, SetValue( FRMDIR_ENVIRONMENT ); break; default: - bRet = sal_False; + bRet = false; break; } } @@ -4428,12 +4473,12 @@ sal_Bool SvxFrameDirectionItem::PutValue( const com::sun::star::uno::Any& rVal, return bRet; } -sal_Bool SvxFrameDirectionItem::QueryValue( com::sun::star::uno::Any& rVal, +bool SvxFrameDirectionItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE ) const { // translate SvxFrameDirection into WritingDirection2 sal_Int16 nVal; - sal_Bool bRet = sal_True; + bool bRet = true; switch( GetValue() ) { case FRMDIR_HORI_LEFT_TOP: @@ -4453,7 +4498,7 @@ sal_Bool SvxFrameDirectionItem::QueryValue( com::sun::star::uno::Any& rVal, break; default: DBG_ERROR("Unknown SvxFrameDirection value!"); - bRet = sal_False; + bRet = false; break; } @@ -4465,3 +4510,4 @@ sal_Bool SvxFrameDirectionItem::QueryValue( com::sun::star::uno::Any& rVal, return bRet; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/items/itemtype.cxx b/editeng/source/items/itemtype.cxx index a5c7110e9f..db3f8f6f02 100644 --- a/editeng/source/items/itemtype.cxx +++ b/editeng/source/items/itemtype.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -155,10 +156,9 @@ XubString GetColorString( const Color& rCol ) { XubString sStr; - FASTBOOL bFound = sal_False; ColorData nColData = RGB_COLORDATA( rCol.GetRed(), rCol.GetGreen(), rCol.GetBlue() ); - sal_uInt16 nColor = 0, nColCount = 16; + sal_uInt16 nColor = 0; static ColorData aColAry[] = { COL_BLACK, COL_BLUE, COL_GREEN, COL_CYAN, @@ -166,12 +166,10 @@ XubString GetColorString( const Color& rCol ) COL_LIGHTGRAY, COL_LIGHTBLUE, COL_LIGHTGREEN, COL_LIGHTCYAN, COL_LIGHTRED, COL_LIGHTMAGENTA, COL_YELLOW, COL_WHITE }; - while ( !bFound && nColor < nColCount ) + while ( nColor < sizeof(aColAry)/sizeof(ColorData) && + aColAry[nColor] != nColData ) { - if ( aColAry[nColor] == nColData ) - bFound = sal_True; - else - nColor++; + nColor += 1; } if ( nColor < nColCount ) @@ -237,3 +235,4 @@ sal_uInt16 GetMetricId( SfxMapUnit eUnit ) } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/items/justifyitem.cxx b/editeng/source/items/justifyitem.cxx new file mode 100644 index 0000000000..e6dc9db391 --- /dev/null +++ b/editeng/source/items/justifyitem.cxx @@ -0,0 +1,482 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * 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 + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_editeng.hxx" + +// include --------------------------------------------------------------- + +#include "editeng/justifyitem.hxx" +#include "editeng/memberids.hrc" +#include "editeng/editrids.hrc" +#include "editeng/eerdll.hxx" + +#include <tools/stream.hxx> + +#include <com/sun/star/table/CellHoriJustify.hpp> +#include <com/sun/star/style/ParagraphAdjust.hpp> +#include <com/sun/star/table/CellJustifyMethod.hpp> +#include <com/sun/star/table/CellVertJustify2.hpp> +#include <com/sun/star/style/VerticalAlignment.hpp> + +// STATIC DATA ----------------------------------------------------------- + +TYPEINIT1_FACTORY( SvxHorJustifyItem, SfxEnumItem, new SvxHorJustifyItem(SVX_HOR_JUSTIFY_STANDARD, 0) ); +TYPEINIT1_FACTORY( SvxVerJustifyItem, SfxEnumItem, new SvxVerJustifyItem(SVX_VER_JUSTIFY_STANDARD, 0) ); + +using namespace ::com::sun::star; + +// class SvxHorJustifyItem ----------------------------------------------- + + +SvxHorJustifyItem::SvxHorJustifyItem( const USHORT nId ) : + SfxEnumItem( nId, (USHORT)SVX_HOR_JUSTIFY_STANDARD ) +{ +} + +SvxHorJustifyItem::SvxHorJustifyItem( const SvxCellHorJustify eJustify, + const USHORT nId ) : + SfxEnumItem( nId, (USHORT)eJustify ) +{ +} + +//------------------------------------------------------------------------ + +SfxItemPresentation SvxHorJustifyItem::GetPresentation +( + SfxItemPresentation ePres, + SfxMapUnit /*eCoreUnit*/, + SfxMapUnit /*ePresUnit*/, + XubString& rText, const IntlWrapper *) const +{ + switch ( ePres ) + { + case SFX_ITEM_PRESENTATION_NONE: + rText.Erase(); + return SFX_ITEM_PRESENTATION_NONE; + case SFX_ITEM_PRESENTATION_NAMELESS: + case SFX_ITEM_PRESENTATION_COMPLETE: + rText = GetValueText( GetValue() ); + return SFX_ITEM_PRESENTATION_COMPLETE; + default: ; //prevent warning + } + return SFX_ITEM_PRESENTATION_NONE; +} + +//------------------------------------------------------------------------ + +bool SvxHorJustifyItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +{ + nMemberId &= ~CONVERT_TWIPS; + switch ( nMemberId ) + { + case MID_HORJUST_HORJUST: + { + table::CellHoriJustify eUno = table::CellHoriJustify_STANDARD; + switch ( (SvxCellHorJustify)GetValue() ) + { + case SVX_HOR_JUSTIFY_STANDARD: eUno = table::CellHoriJustify_STANDARD; break; + case SVX_HOR_JUSTIFY_LEFT: eUno = table::CellHoriJustify_LEFT; break; + case SVX_HOR_JUSTIFY_CENTER: eUno = table::CellHoriJustify_CENTER; break; + case SVX_HOR_JUSTIFY_RIGHT: eUno = table::CellHoriJustify_RIGHT; break; + case SVX_HOR_JUSTIFY_BLOCK: eUno = table::CellHoriJustify_BLOCK; break; + case SVX_HOR_JUSTIFY_REPEAT: eUno = table::CellHoriJustify_REPEAT; break; + } + rVal <<= eUno; + } + break; + case MID_HORJUST_ADJUST: + { + // ParagraphAdjust values, as in SvxAdjustItem + // (same value for ParaAdjust and ParaLastLineAdjust) + + sal_Int16 nAdjust = style::ParagraphAdjust_LEFT; + switch ( (SvxCellHorJustify)GetValue() ) + { + // ParagraphAdjust_LEFT is used for STANDARD and REPEAT + case SVX_HOR_JUSTIFY_STANDARD: + case SVX_HOR_JUSTIFY_REPEAT: + case SVX_HOR_JUSTIFY_LEFT: nAdjust = style::ParagraphAdjust_LEFT; break; + case SVX_HOR_JUSTIFY_CENTER: nAdjust = style::ParagraphAdjust_CENTER; break; + case SVX_HOR_JUSTIFY_RIGHT: nAdjust = style::ParagraphAdjust_RIGHT; break; + case SVX_HOR_JUSTIFY_BLOCK: nAdjust = style::ParagraphAdjust_BLOCK; break; + } + rVal <<= nAdjust; // as sal_Int16 + } + break; + } + return true; +} + +bool SvxHorJustifyItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +{ + nMemberId &= ~CONVERT_TWIPS; + switch ( nMemberId ) + { + case MID_HORJUST_HORJUST: + { + table::CellHoriJustify eUno; + if(!(rVal >>= eUno)) + { + sal_Int32 nValue = 0; + if(!(rVal >>= nValue)) + return false; + eUno = (table::CellHoriJustify)nValue; + } + SvxCellHorJustify eSvx = SVX_HOR_JUSTIFY_STANDARD; + switch (eUno) + { + case table::CellHoriJustify_STANDARD: eSvx = SVX_HOR_JUSTIFY_STANDARD; break; + case table::CellHoriJustify_LEFT: eSvx = SVX_HOR_JUSTIFY_LEFT; break; + case table::CellHoriJustify_CENTER: eSvx = SVX_HOR_JUSTIFY_CENTER; break; + case table::CellHoriJustify_RIGHT: eSvx = SVX_HOR_JUSTIFY_RIGHT; break; + case table::CellHoriJustify_BLOCK: eSvx = SVX_HOR_JUSTIFY_BLOCK; break; + case table::CellHoriJustify_REPEAT: eSvx = SVX_HOR_JUSTIFY_REPEAT; break; + default: ; //prevent warning + } + SetValue( (USHORT)eSvx ); + } + break; + case MID_HORJUST_ADJUST: + { + // property contains ParagraphAdjust values as sal_Int16 + sal_Int16 nVal = sal_Int16(); + if(!(rVal >>= nVal)) + return false; + + SvxCellHorJustify eSvx = SVX_HOR_JUSTIFY_STANDARD; + switch (nVal) + { + // STRETCH is treated as BLOCK + case style::ParagraphAdjust_LEFT: eSvx = SVX_HOR_JUSTIFY_LEFT; break; + case style::ParagraphAdjust_RIGHT: eSvx = SVX_HOR_JUSTIFY_RIGHT; break; + case style::ParagraphAdjust_STRETCH: + case style::ParagraphAdjust_BLOCK: eSvx = SVX_HOR_JUSTIFY_BLOCK; break; + case style::ParagraphAdjust_CENTER: eSvx = SVX_HOR_JUSTIFY_CENTER; break; + } + SetValue( (USHORT)eSvx ); + } + } + return true; +} + +//------------------------------------------------------------------------ + +XubString SvxHorJustifyItem::GetValueText( USHORT nVal ) const +{ + DBG_ASSERT( nVal <= SVX_HOR_JUSTIFY_REPEAT, "enum overflow!" ); + return EE_RESSTR(RID_SVXITEMS_HORJUST_STANDARD + nVal); +} + +//------------------------------------------------------------------------ + +SfxPoolItem* SvxHorJustifyItem::Clone( SfxItemPool* ) const +{ + return new SvxHorJustifyItem( *this ); +} + +//------------------------------------------------------------------------ + +SfxPoolItem* SvxHorJustifyItem::Create( SvStream& rStream, USHORT ) const +{ + USHORT nVal; + rStream >> nVal; + return new SvxHorJustifyItem( (SvxCellHorJustify)nVal, Which() ); +} +//------------------------------------------------------------------------ + +USHORT SvxHorJustifyItem::GetValueCount() const +{ + return SVX_HOR_JUSTIFY_REPEAT + 1; // letzter Enum-Wert + 1 +} + +// class SvxVerJustifyItem ----------------------------------------------- + +SvxVerJustifyItem::SvxVerJustifyItem( const USHORT nId ) : + SfxEnumItem( nId, (USHORT)SVX_VER_JUSTIFY_STANDARD ) +{ +} + +SvxVerJustifyItem::SvxVerJustifyItem( const SvxCellVerJustify eJustify, + const USHORT nId ) : + SfxEnumItem( nId, (USHORT)eJustify ) +{ +} + +//------------------------------------------------------------------------ + +SfxItemPresentation SvxVerJustifyItem::GetPresentation +( + SfxItemPresentation ePres, + SfxMapUnit /*eCoreUnit*/, + SfxMapUnit /*ePresUnit*/, + XubString& rText, + const IntlWrapper * ) const +{ + switch ( ePres ) + { + case SFX_ITEM_PRESENTATION_NONE: + rText.Erase(); + return SFX_ITEM_PRESENTATION_NONE; + case SFX_ITEM_PRESENTATION_NAMELESS: + case SFX_ITEM_PRESENTATION_COMPLETE: + rText = GetValueText( GetValue() ); + return SFX_ITEM_PRESENTATION_COMPLETE; + default: ; //prevent warning + } + return SFX_ITEM_PRESENTATION_NONE; +} + +//------------------------------------------------------------------------ + +bool SvxVerJustifyItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +{ + nMemberId &= ~CONVERT_TWIPS; + switch ( nMemberId ) + { + case MID_HORJUST_ADJUST: + { + style::VerticalAlignment eUno = style::VerticalAlignment_TOP; + switch ( (SvxCellVerJustify)GetValue() ) + { + case SVX_VER_JUSTIFY_TOP: eUno = style::VerticalAlignment_TOP; break; + case SVX_VER_JUSTIFY_CENTER: eUno = style::VerticalAlignment_MIDDLE; break; + case SVX_VER_JUSTIFY_BOTTOM: eUno = style::VerticalAlignment_BOTTOM; break; + default: ; //prevent warning + } + rVal <<= eUno; + break; + } + default: + { + sal_Int32 nUno = table::CellVertJustify2::STANDARD; + switch ( (SvxCellVerJustify)GetValue() ) + { + case SVX_VER_JUSTIFY_STANDARD: nUno = table::CellVertJustify2::STANDARD; break; + case SVX_VER_JUSTIFY_TOP: nUno = table::CellVertJustify2::TOP; break; + case SVX_VER_JUSTIFY_CENTER: nUno = table::CellVertJustify2::CENTER; break; + case SVX_VER_JUSTIFY_BOTTOM: nUno = table::CellVertJustify2::BOTTOM; break; + case SVX_VER_JUSTIFY_BLOCK: nUno = table::CellVertJustify2::BLOCK; break; + default: ; //prevent warning + } + rVal <<= nUno; + break; + } + } + return true; +} + +bool SvxVerJustifyItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +{ + nMemberId &= ~CONVERT_TWIPS; + switch ( nMemberId ) + { + case MID_HORJUST_ADJUST: + { + // property contains ParagraphAdjust values as sal_Int16 + style::VerticalAlignment nVal = style::VerticalAlignment_TOP; + if(!(rVal >>= nVal)) + return false; + + SvxCellVerJustify eSvx = SVX_VER_JUSTIFY_STANDARD; + switch (nVal) + { + case style::VerticalAlignment_TOP: eSvx = SVX_VER_JUSTIFY_TOP; break; + case style::VerticalAlignment_MIDDLE: eSvx = SVX_VER_JUSTIFY_CENTER; break; + case style::VerticalAlignment_BOTTOM: eSvx = SVX_VER_JUSTIFY_BOTTOM; break; + default:; + } + SetValue( (USHORT)eSvx ); + break; + } + default: + { + sal_Int32 eUno = table::CellVertJustify2::STANDARD; + rVal >>= eUno; + + SvxCellVerJustify eSvx = SVX_VER_JUSTIFY_STANDARD; + switch (eUno) + { + case table::CellVertJustify2::STANDARD: eSvx = SVX_VER_JUSTIFY_STANDARD; break; + case table::CellVertJustify2::TOP: eSvx = SVX_VER_JUSTIFY_TOP; break; + case table::CellVertJustify2::CENTER: eSvx = SVX_VER_JUSTIFY_CENTER; break; + case table::CellVertJustify2::BOTTOM: eSvx = SVX_VER_JUSTIFY_BOTTOM; break; + case table::CellVertJustify2::BLOCK: eSvx = SVX_VER_JUSTIFY_BLOCK; break; + default: ; //prevent warning + } + SetValue( (USHORT)eSvx ); + break; + } + } + + return true; +} + +//------------------------------------------------------------------------ + +XubString SvxVerJustifyItem::GetValueText( USHORT nVal ) const +{ + DBG_ASSERT( nVal <= SVX_VER_JUSTIFY_BOTTOM, "enum overflow!" ); + return EE_RESSTR(RID_SVXITEMS_VERJUST_STANDARD + nVal); +} + +//------------------------------------------------------------------------ + +SfxPoolItem* SvxVerJustifyItem::Clone( SfxItemPool* ) const +{ + return new SvxVerJustifyItem( *this ); +} + +//------------------------------------------------------------------------ + +SfxPoolItem* SvxVerJustifyItem::Create( SvStream& rStream, USHORT ) const +{ + USHORT nVal; + rStream >> nVal; + return new SvxVerJustifyItem( (SvxCellVerJustify)nVal, Which() ); +} + +//------------------------------------------------------------------------ + +USHORT SvxVerJustifyItem::GetValueCount() const +{ + return SVX_VER_JUSTIFY_BOTTOM + 1; // letzter Enum-Wert + 1 +} + + +// class SvxJustifyMethodItem ----------------------------------------------- + +SvxJustifyMethodItem::SvxJustifyMethodItem( const USHORT nId ) : + SfxEnumItem( nId, (USHORT)SVX_JUSTIFY_METHOD_AUTO ) +{ +} + +SvxJustifyMethodItem::SvxJustifyMethodItem( const SvxCellJustifyMethod eJustify, + const USHORT nId ) : + SfxEnumItem( nId, (USHORT)eJustify ) +{ +} + +//------------------------------------------------------------------------ + +SfxItemPresentation SvxJustifyMethodItem::GetPresentation +( + SfxItemPresentation ePres, + SfxMapUnit /*eCoreUnit*/, + SfxMapUnit /*ePresUnit*/, + XubString& rText, + const IntlWrapper * ) const +{ + switch ( ePres ) + { + case SFX_ITEM_PRESENTATION_NONE: + rText.Erase(); + return SFX_ITEM_PRESENTATION_NONE; + case SFX_ITEM_PRESENTATION_NAMELESS: + case SFX_ITEM_PRESENTATION_COMPLETE: + rText = GetValueText( GetValue() ); + return SFX_ITEM_PRESENTATION_COMPLETE; + default: ; //prevent warning + } + return SFX_ITEM_PRESENTATION_NONE; +} + +//------------------------------------------------------------------------ + +bool SvxJustifyMethodItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const +{ + sal_Int32 nUno = table::CellJustifyMethod::AUTO; + switch (static_cast<SvxCellJustifyMethod>(GetValue())) + { + case SVX_JUSTIFY_METHOD_AUTO: nUno = table::CellJustifyMethod::AUTO; break; + case SVX_JUSTIFY_METHOD_DISTRIBUTE: nUno = table::CellJustifyMethod::DISTRIBUTE; break; + default:; + } + rVal <<= nUno; + return true; +} + +bool SvxJustifyMethodItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ ) +{ + sal_Int32 nVal = table::CellJustifyMethod::AUTO; + if (!(rVal >>= nVal)) + return false; + + SvxCellJustifyMethod eSvx = SVX_JUSTIFY_METHOD_AUTO; + switch (nVal) + { + case table::CellJustifyMethod::AUTO: + eSvx = SVX_JUSTIFY_METHOD_AUTO; + break; + case table::CellJustifyMethod::DISTRIBUTE: + eSvx = SVX_JUSTIFY_METHOD_DISTRIBUTE; + break; + default:; + } + SetValue(static_cast<USHORT>(eSvx)); + return true; +} + +//------------------------------------------------------------------------ + +XubString SvxJustifyMethodItem::GetValueText( USHORT nVal ) const +{ + DBG_ASSERT( nVal <= SVX_VER_JUSTIFY_BOTTOM, "enum overflow!" ); + return EE_RESSTR(RID_SVXITEMS_JUSTMETHOD_AUTO + nVal); +} + +//------------------------------------------------------------------------ + +SfxPoolItem* SvxJustifyMethodItem::Clone( SfxItemPool* ) const +{ + return new SvxJustifyMethodItem( *this ); +} + +//------------------------------------------------------------------------ + +SfxPoolItem* SvxJustifyMethodItem::Create( SvStream& rStream, USHORT ) const +{ + USHORT nVal; + rStream >> nVal; + return new SvxJustifyMethodItem( (SvxCellJustifyMethod)nVal, Which() ); +} + +//------------------------------------------------------------------------ + +USHORT SvxJustifyMethodItem::GetValueCount() const +{ + return SVX_JUSTIFY_METHOD_DISTRIBUTE + 1; // letzter Enum-Wert + 1 +} + +SvxJustifyMethodItem& SvxJustifyMethodItem::operator=(const SvxJustifyMethodItem& r) +{ + SetValue( r.GetValue() ); + return *this; +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/items/makefile.mk b/editeng/source/items/makefile.mk deleted file mode 100644 index 90e90815ab..0000000000 --- a/editeng/source/items/makefile.mk +++ /dev/null @@ -1,79 +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.19 $ -# -# 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=..$/.. - -#PROJECTPCH4DLL=TRUE -#PROJECTPCH=svxpch -#PROJECTPCHSOURCE=$(PRJ)$/util$/svxpch -#ENABLE_EXCEPTIONS=TRUE - -PRJNAME=editeng -TARGET=items - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SRS1NAME=items -SRC1FILES = \ - page.src \ - svxitems.src - -SLOFILES= \ - $(SLO)$/optitems.obj \ - $(SLO)$/svdfield.obj \ - $(SLO)$/writingmodeitem.obj \ - $(SLO)$/frmitems.obj \ - $(SLO)$/paraitem.obj \ - $(SLO)$/textitem.obj \ - $(SLO)$/flditem.obj \ - $(SLO)$/svxfont.obj \ - $(SLO)$/paperinf.obj \ - $(SLO)$/itemtype.obj \ - $(SLO)$/bulitem.obj \ - $(SLO)$/numitem.obj \ - $(SLO)$/xmlcnitm.obj \ - $(SLO)$/charhiddenitem.obj - -EXCEPTIONSFILES= \ - $(SLO)$/svdfield.obj \ - $(SLO)$/paraitem.obj \ - $(SLO)$/frmitems.obj \ - $(SLO)$/numitem.obj\ - $(SLO)$/xmlcnitm.obj\ - $(SLO)$/flditem.obj - -.INCLUDE : target.mk - diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx index fd4ccfa005..5745ce3184 100644 --- a/editeng/source/items/numitem.cxx +++ b/editeng/source/items/numitem.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -78,7 +79,7 @@ void lcl_getFormatter(com::sun::star::uno::Reference<com::sun::star::text::XNumb { Reference< XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory(); Reference < XInterface > xI = xMSF->createInstance( - ::rtl::OUString::createFromAscii( "com.sun.star.text.DefaultNumberingProvider" ) ); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.text.DefaultNumberingProvider" )) ); Reference<XDefaultNumberingProvider> xRet(xI, UNO_QUERY); DBG_ASSERT(xRet.is(), "service missing: \"com.sun.star.text.DefaultNumberingProvider\""); _xFormatter = Reference<XNumberingFormatter> (xRet, UNO_QUERY); @@ -88,44 +89,34 @@ void lcl_getFormatter(com::sun::star::uno::Reference<com::sun::star::text::XNumb } } } -/* -----------------------------22.02.01 14:24-------------------------------- - ---------------------------------------------------------------------------*/ SvxNumberType::SvxNumberType(sal_Int16 nType) : nNumType(nType), bShowSymbol(sal_True) { nRefCount++; } -/* -----------------------------22.02.01 14:31-------------------------------- - ---------------------------------------------------------------------------*/ SvxNumberType::SvxNumberType(const SvxNumberType& rType) : nNumType(rType.nNumType), bShowSymbol(rType.bShowSymbol) { nRefCount++; } -/* -----------------------------22.02.01 14:24-------------------------------- - ---------------------------------------------------------------------------*/ SvxNumberType::~SvxNumberType() { if(!--nRefCount) xFormatter = 0; } -/* -----------------------------22.02.01 11:09-------------------------------- - ---------------------------------------------------------------------------*/ String SvxNumberType::GetNumStr( ULONG nNo ) const { LanguageType eLang = Application::GetSettings().GetLanguage(); Locale aLocale = SvxCreateLocale(eLang); return GetNumStr( nNo, aLocale ); } -/* -----------------28.10.98 15:56------------------- - * - * --------------------------------------------------*/ + String SvxNumberType::GetNumStr( ULONG nNo, const Locale& rLocale ) const { lcl_getFormatter(xFormatter); @@ -167,13 +158,9 @@ String SvxNumberType::GetNumStr( ULONG nNo, const Locale& rLocale ) const } return aTmpStr; } -/* -----------------27.10.98 10:33------------------- - * - * --------------------------------------------------*/ -// --> OD 2008-01-09 #newlistlevelattrs# + SvxNumberFormat::SvxNumberFormat( sal_Int16 eType, SvxNumPositionAndSpaceMode ePositionAndSpaceMode ) -// <-- : SvxNumberType(eType), eNumAdjust(SVX_ADJUST_LEFT), nInclUpperLevels(0), @@ -181,40 +168,30 @@ SvxNumberFormat::SvxNumberFormat( sal_Int16 eType, cBullet(SVX_DEF_BULLET), nBulletRelSize(100), nBulletColor(COL_BLACK), - // --> OD 2008-01-09 #newlistlevelattrs# mePositionAndSpaceMode( ePositionAndSpaceMode ), - // <-- nFirstLineOffset(0), nAbsLSpace(0), nLSpace(0), nCharTextDistance(0), - // --> OD 2008-01-09 #newlistlevelattrs# meLabelFollowedBy( LISTTAB ), mnListtabPos( 0 ), mnFirstLineIndent( 0 ), mnIndentAt( 0 ), - // <-- pGraphicBrush(0), eVertOrient(text::VertOrientation::NONE), pBulletFont(0) { } -/* -----------------27.10.98 10:56------------------- - * - * --------------------------------------------------*/ + SvxNumberFormat::SvxNumberFormat(const SvxNumberFormat& rFormat) : SvxNumberType(rFormat), - // --> OD 2008-01-09 #newlistlevelattrs# mePositionAndSpaceMode( rFormat.mePositionAndSpaceMode ), - // <-- pGraphicBrush(0), pBulletFont(0) { *this = rFormat; } -/* -----------------27.10.98 10:56------------------- - * - * --------------------------------------------------*/ + SvxNumberFormat::~SvxNumberFormat() { delete pGraphicBrush; @@ -411,19 +388,15 @@ SvxNumberFormat& SvxNumberFormat::operator=( const SvxNumberFormat& rFormat ) nInclUpperLevels = rFormat.nInclUpperLevels ; nStart = rFormat.nStart ; cBullet = rFormat.cBullet ; - // --> OD 2008-01-09 #newlistlevelattrs# mePositionAndSpaceMode = rFormat.mePositionAndSpaceMode; - // <-- nFirstLineOffset = rFormat.nFirstLineOffset; nAbsLSpace = rFormat.nAbsLSpace ; nLSpace = rFormat.nLSpace ; nCharTextDistance = rFormat.nCharTextDistance ; - // --> OD 2008-01-09 #newlistlevelattrs# meLabelFollowedBy = rFormat.meLabelFollowedBy; mnListtabPos = rFormat.mnListtabPos; mnFirstLineIndent = rFormat.mnFirstLineIndent; mnIndentAt = rFormat.mnIndentAt; - // <-- eVertOrient = rFormat.eVertOrient ; sPrefix = rFormat.sPrefix ; sSuffix = rFormat.sSuffix ; @@ -443,9 +416,7 @@ SvxNumberFormat& SvxNumberFormat::operator=( const SvxNumberFormat& rFormat ) pBulletFont = new Font(*rFormat.pBulletFont); return *this; } -/* -----------------27.10.98 10:56------------------- - * - * --------------------------------------------------*/ + BOOL SvxNumberFormat::operator==( const SvxNumberFormat& rFormat) const { if( GetNumberingType() != rFormat.GetNumberingType() || @@ -453,19 +424,15 @@ BOOL SvxNumberFormat::operator==( const SvxNumberFormat& rFormat) const nInclUpperLevels != rFormat.nInclUpperLevels || nStart != rFormat.nStart || cBullet != rFormat.cBullet || - // --> OD 2008-01-09 #newlistlevelattrs# mePositionAndSpaceMode != rFormat.mePositionAndSpaceMode || - // <-- nFirstLineOffset != rFormat.nFirstLineOffset || nAbsLSpace != rFormat.nAbsLSpace || nLSpace != rFormat.nLSpace || nCharTextDistance != rFormat.nCharTextDistance || - // --> OD 2008-01-09 #newlistlevelattrs# meLabelFollowedBy != rFormat.meLabelFollowedBy || mnListtabPos != rFormat.mnListtabPos || mnFirstLineIndent != rFormat.mnFirstLineIndent || mnIndentAt != rFormat.mnIndentAt || - // <-- eVertOrient != rFormat.eVertOrient || sPrefix != rFormat.sPrefix || sSuffix != rFormat.sSuffix || @@ -494,9 +461,7 @@ BOOL SvxNumberFormat::operator==( const SvxNumberFormat& rFormat) const } return TRUE; } -/* -----------------28.10.98 09:53------------------- - * - * --------------------------------------------------*/ + void SvxNumberFormat::SetGraphicBrush( const SvxBrushItem* pBrushItem, const Size* pSize, const sal_Int16* pOrient) { @@ -521,9 +486,7 @@ void SvxNumberFormat::SetGraphicBrush( const SvxBrushItem* pBrushItem, else aGraphicSize.Width() = aGraphicSize.Height() = 0; } -/* -----------------28.10.98 09:59------------------- - * - * --------------------------------------------------*/ + void SvxNumberFormat::SetGraphic( const String& rName ) { const String* pName; @@ -541,30 +504,23 @@ void SvxNumberFormat::SetGraphic( const String& rName ) aGraphicSize.Width() = aGraphicSize.Height() = 0; } -/* -----------------------------22.02.01 15:55-------------------------------- - ---------------------------------------------------------------------------*/ void SvxNumberFormat::SetVertOrient(sal_Int16 eSet) { eVertOrient = eSet; } -/* -----------------------------22.02.01 15:55-------------------------------- - ---------------------------------------------------------------------------*/ sal_Int16 SvxNumberFormat::GetVertOrient() const { return eVertOrient; } -/* -----------------28.10.98 09:59------------------- - * - * --------------------------------------------------*/ + void SvxNumberFormat::SetBulletFont(const Font* pFont) { delete pBulletFont; pBulletFont = pFont ? new Font(*pFont): 0; } -// --> OD 2008-01-09 #newlistlevelattrs# SvxNumberFormat::SvxNumPositionAndSpaceMode SvxNumberFormat::GetPositionAndSpaceMode() const { return mePositionAndSpaceMode; @@ -576,38 +532,22 @@ void SvxNumberFormat::SetPositionAndSpaceMode( SvxNumPositionAndSpaceMode ePosit short SvxNumberFormat::GetLSpace() const { -//#if OSL_DEBUG_LEVEL > 1 -// DBG_ASSERT( mePositionAndSpaceMode == LABEL_WIDTH_AND_POSITION, -// "<SvxNumberFormat::GetLSpace()> - misusage: position-and-space-mode does not equal LABEL_WIDTH_AND_POSITION"); -//#endif return mePositionAndSpaceMode == LABEL_WIDTH_AND_POSITION ? nLSpace : 0; } short SvxNumberFormat::GetAbsLSpace() const { -//#if OSL_DEBUG_LEVEL > 1 -// DBG_ASSERT( mePositionAndSpaceMode == LABEL_WIDTH_AND_POSITION, -// "<SvxNumberFormat::GetAbsLSpace()> - misusage: position-and-space-mode does not equal LABEL_WIDTH_AND_POSITION"); -//#endif return mePositionAndSpaceMode == LABEL_WIDTH_AND_POSITION ? nAbsLSpace : static_cast<short>( GetFirstLineIndent() + GetIndentAt() ); } short SvxNumberFormat::GetFirstLineOffset() const { -//#if OSL_DEBUG_LEVEL > 1 -// DBG_ASSERT( mePositionAndSpaceMode == LABEL_WIDTH_AND_POSITION, -// "<SvxNumberFormat::GetFirstLineOffset()> - misusage: position-and-space-mode does not equal LABEL_WIDTH_AND_POSITION"); -//#endif return mePositionAndSpaceMode == LABEL_WIDTH_AND_POSITION ? nFirstLineOffset : static_cast<short>( GetFirstLineIndent() ); } short SvxNumberFormat::GetCharTextDistance() const { -//#if OSL_DEBUG_LEVEL > 1 -// DBG_ASSERT( mePositionAndSpaceMode == LABEL_WIDTH_AND_POSITION, -// "<SvxNumberFormat::GetCharTextDistance()> - misusage: position-and-space-mode does not equal LABEL_WIDTH_AND_POSITION"); -//#endif return mePositionAndSpaceMode == LABEL_WIDTH_AND_POSITION ? nCharTextDistance : 0; } @@ -643,11 +583,7 @@ long SvxNumberFormat::GetIndentAt() const { return mnIndentAt; } -// <-- -/* -----------------28.10.98 10:03------------------- - * - * --------------------------------------------------*/ IMPL_STATIC_LINK( SvxNumberFormat, GraphicArrived, void *, EMPTYARG ) { // ggfs. die GrfSize setzen: @@ -660,16 +596,11 @@ IMPL_STATIC_LINK( SvxNumberFormat, GraphicArrived, void *, EMPTYARG ) pThis->NotifyGraphicArrived(); return 0; } -/* -----------------------------02.07.01 15:36-------------------------------- - ---------------------------------------------------------------------------*/ void SvxNumberFormat::NotifyGraphicArrived() { } -/* -----------------28.10.98 10:38------------------- - * - * --------------------------------------------------*/ Size SvxNumberFormat::GetGraphicSizeMM100(const Graphic* pGraphic) { const MapMode aMapMM100( MAP_100TH_MM ); @@ -687,9 +618,7 @@ Size SvxNumberFormat::GetGraphicSizeMM100(const Graphic* pGraphic) aRetSize = OutputDevice::LogicToLogic( rSize, pGraphic->GetPrefMapMode(), aMapMM100 ); return aRetSize; } -/* -----------------28.10.98 15:57------------------- - * - * --------------------------------------------------*/ + String SvxNumberFormat::CreateRomanString( ULONG nNo, BOOL bUpper ) { nNo %= 4000; // mehr kann nicht dargestellt werden @@ -769,20 +698,15 @@ void SvxNumberFormat::GetCharStrN( ULONG nNo, String& rStr ) const rStr.Fill( (USHORT)(nNo / coDiff) + 1, sal_Unicode(cChar) ); } #endif //OLD_NUMBER_FORMATTING -/* -----------------------------22.02.01 13:31-------------------------------- - ---------------------------------------------------------------------------*/ const String& SvxNumberFormat::GetCharFmtName()const { return sCharStyleName; } -/* -----------------27.10.98 10:38------------------- - * - * --------------------------------------------------*/ + sal_Int32 SvxNumRule::nRefCount = 0; static SvxNumberFormat* pStdNumFmt = 0; static SvxNumberFormat* pStdOutlineNumFmt = 0; -// --> OD 2008-02-11 #newlistlevelattrs# SvxNumRule::SvxNumRule( ULONG nFeatures, USHORT nLevels, BOOL bCont, @@ -805,7 +729,6 @@ SvxNumRule::SvxNumRule( ULONG nFeatures, //daran wird zwischen writer und draw unterschieden if(nFeatures & NUM_CONTINUOUS) { - // --> OD 2008-02-11 #newlistlevelattrs# if ( eDefaultNumberFormatPositionAndSpaceMode == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) { @@ -828,7 +751,6 @@ SvxNumRule::SvxNumRule( ULONG nFeatures, aFmts[i]->SetFirstLineIndent( cFirstLineIndent ); aFmts[i]->SetIndentAt( cIndentAt * (i+2) ); } - // <-- } else { @@ -841,9 +763,7 @@ SvxNumRule::SvxNumRule( ULONG nFeatures, aFmtsSet[i] = FALSE; } } -/* -----------------27.10.98 10:41------------------- - * - * --------------------------------------------------*/ + SvxNumRule::SvxNumRule(const SvxNumRule& rCopy) { ++nRefCount; @@ -952,9 +872,7 @@ SvxNumRule::~SvxNumRule() DELETEZ(pStdOutlineNumFmt); } } -/* -----------------29.10.98 16:07------------------- - * - * --------------------------------------------------*/ + SvxNumRule& SvxNumRule::operator=( const SvxNumRule& rCopy ) { nLevelCount = rCopy.nLevelCount; @@ -972,9 +890,7 @@ SvxNumRule& SvxNumRule::operator=( const SvxNumRule& rCopy ) } return *this; } -/* -----------------27.10.98 10:41------------------- - * - * --------------------------------------------------*/ + int SvxNumRule::operator==( const SvxNumRule& rCopy) const { if(nLevelCount != rCopy.nLevelCount || @@ -996,9 +912,7 @@ int SvxNumRule::operator==( const SvxNumRule& rCopy) const } return TRUE; } -/* -----------------27.10.98 10:41------------------- - * - * --------------------------------------------------*/ + const SvxNumberFormat* SvxNumRule::Get(USHORT nLevel)const { DBG_ASSERT(nLevel < SVX_MAX_NUM, "falsches Level" ); @@ -1007,9 +921,7 @@ const SvxNumberFormat* SvxNumRule::Get(USHORT nLevel)const else return 0; } -/* -----------------02.11.98 09:10------------------- - * - * --------------------------------------------------*/ + const SvxNumberFormat& SvxNumRule::GetLevel(USHORT nLevel)const { if(!pStdNumFmt) @@ -1025,9 +937,7 @@ const SvxNumberFormat& SvxNumRule::GetLevel(USHORT nLevel)const *pStdNumFmt : *pStdOutlineNumFmt; } -/* -----------------29.10.98 09:08------------------- - * - * --------------------------------------------------*/ + void SvxNumRule::SetLevel( USHORT i, const SvxNumberFormat& rNumFmt, BOOL bIsValid ) { DBG_ASSERT(i < SVX_MAX_NUM, "falsches Level" ); @@ -1037,12 +947,9 @@ void SvxNumRule::SetLevel( USHORT i, const SvxNumberFormat& rNumFmt, BOOL bIsVal delete aFmts[ i ]; aFmts[ i ] = new SvxNumberFormat( rNumFmt ); aFmtsSet[i] = bIsValid; -// bInvalidRuleFlag = TRUE; } } -/* -----------------30.10.98 12:44------------------- - * - * --------------------------------------------------*/ + void SvxNumRule::SetLevel(USHORT nLevel, const SvxNumberFormat* pFmt) { DBG_ASSERT(nLevel < SVX_MAX_NUM, "falsches Level" ); @@ -1059,9 +966,7 @@ void SvxNumRule::SetLevel(USHORT nLevel, const SvxNumberFormat* pFmt) } } } -/* -----------------28.10.98 15:38------------------- - * - * --------------------------------------------------*/ + String SvxNumRule::MakeNumString( const SvxNodeNum& rNum, BOOL bInclStrings ) const { String aStr; @@ -1119,9 +1024,8 @@ String SvxNumRule::MakeNumString( const SvxNodeNum& rNum, BOOL bInclStrings ) c } return aStr; } -/* -----------------18.08.99 10:18------------------- - Description: changes linked to embedded bitmaps - --------------------------------------------------*/ + +// changes linked to embedded bitmaps BOOL SvxNumRule::UnLinkGraphics() { BOOL bRet = FALSE; @@ -1153,18 +1057,12 @@ BOOL SvxNumRule::UnLinkGraphics() return bRet; } -/* -----------------27.10.98 10:41------------------- - * - * --------------------------------------------------*/ SvxNumBulletItem::SvxNumBulletItem(SvxNumRule& rRule) : SfxPoolItem(SID_ATTR_NUMBERING_RULE), pNumRule(new SvxNumRule(rRule)) { } -/*-----------------23.11.98 10:36------------------- - MT: Das sind ja sehr sinnige Kommentare... ---------------------------------------------------*/ SvxNumBulletItem::SvxNumBulletItem(SvxNumRule& rRule, USHORT _nWhich ) : SfxPoolItem(_nWhich), pNumRule(new SvxNumRule(rRule)) @@ -1184,24 +1082,17 @@ SvxNumBulletItem::SvxNumBulletItem(const SvxNumBulletItem& rCopy) : { pNumRule = new SvxNumRule(*rCopy.pNumRule); } -/* -----------------27.10.98 10:41------------------- - * - * --------------------------------------------------*/ + SvxNumBulletItem::~SvxNumBulletItem() { delete pNumRule; } -/* -----------------27.10.98 10:41------------------- - * - * --------------------------------------------------*/ int SvxNumBulletItem::operator==( const SfxPoolItem& rCopy) const { return *pNumRule == *((SvxNumBulletItem&)rCopy).pNumRule; } -/* -----------------27.10.98 10:41------------------- - * - * --------------------------------------------------*/ + SfxPoolItem* SvxNumBulletItem::Clone( SfxItemPool * ) const { return new SvxNumBulletItem(*this); @@ -1226,13 +1117,24 @@ SvStream& SvxNumBulletItem::Store(SvStream &rStream, USHORT /*nItemVersion*/ ) * * --------------------------------------------------*/ -sal_Bool SvxNumBulletItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) const +USHORT SvxNumBulletItem::GetVersion( USHORT /*nFileVersion*/ ) const +{ + return NUMITEM_VERSION_03; +} + +SvStream& SvxNumBulletItem::Store(SvStream &rStream, USHORT /*nItemVersion*/ )const +{ + pNumRule->Store(rStream); + return rStream; +} + +bool SvxNumBulletItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) const { rVal <<= SvxCreateNumRule( pNumRule ); - return sal_True; + return true; } -sal_Bool SvxNumBulletItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) +bool SvxNumBulletItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) { uno::Reference< container::XIndexReplace > xRule; if( rVal >>= xRule ) @@ -1249,18 +1151,15 @@ sal_Bool SvxNumBulletItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE } delete pNumRule; pNumRule = pNewRule; - return sal_True; + return true; } catch(lang::IllegalArgumentException&) { } } - return sal_False; + return false; } -/* -----------------08.12.98 10:43------------------- - * - * --------------------------------------------------*/ SvxNumRule* SvxConvertNumRule( const SvxNumRule* pRule, USHORT nLevels, SvxNumRuleType eType ) { const USHORT nSrcLevels = pRule->GetLevelCount(); @@ -1271,3 +1170,5 @@ SvxNumRule* SvxConvertNumRule( const SvxNumRule* pRule, USHORT nLevels, SvxNumRu return pNewRule; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/items/optitems.cxx b/editeng/source/items/optitems.cxx index 9b126e3f0d..82df688afd 100644 --- a/editeng/source/items/optitems.cxx +++ b/editeng/source/items/optitems.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -201,3 +202,4 @@ SvStream& SfxHyphenRegionItem::Store( SvStream& rStrm, sal_uInt16 ) const } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/items/paperinf.cxx b/editeng/source/items/paperinf.cxx index 1c7c7d8b08..280bd7650b 100644 --- a/editeng/source/items/paperinf.cxx +++ b/editeng/source/items/paperinf.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -183,3 +184,4 @@ String SvxPaperInfo::GetName( Paper ePaper ) } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/items/paraitem.cxx b/editeng/source/items/paraitem.cxx index 217bdf3b6a..0d33ed716f 100644 --- a/editeng/source/items/paraitem.cxx +++ b/editeng/source/items/paraitem.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -140,15 +141,13 @@ int SvxLineSpacingItem::operator==( const SfxPoolItem& rAttr ) const 1 : 0; } -/*-----------------18.03.98 16:32------------------- - os: wer weiss noch, wieso das LineSpacingItem so - kompliziert ist? Fuer UNO koennen wir das nicht - gebrauchen. Da gibt es nur zwei Werte: - - ein sal_uInt16 fuer den Modus - - ein sal_uInt32 fuer alle Werte (Abstand, Hoehe, rel. Angaben) - ---------------------------------------------------*/ -sal_Bool SvxLineSpacingItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +/* wer weiss noch, wieso das LineSpacingItem so + kompliziert ist? Fuer UNO koennen wir das nicht + gebrauchen. Da gibt es nur zwei Werte: + - ein sal_uInt16 fuer den Modus + - ein sal_uInt32 fuer alle Werte (Abstand, Hoehe, rel. Angaben) +*/ +bool SvxLineSpacingItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -190,12 +189,10 @@ sal_Bool SvxLineSpacingItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const default: DBG_ERROR("Wrong MemberId!"); break; } - return sal_True; + return true; } -/*-----------------18.03.98 16:32------------------- ---------------------------------------------------*/ -sal_Bool SvxLineSpacingItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +bool SvxLineSpacingItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -387,10 +384,7 @@ int SvxAdjustItem::operator==( const SfxPoolItem& rAttr ) const ? 1 : 0 ); } -/*-----------------18.03.98 16:15------------------- - ---------------------------------------------------*/ -sal_Bool SvxAdjustItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +bool SvxAdjustItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -406,13 +400,10 @@ sal_Bool SvxAdjustItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const } default: ;//prevent warning } - return sal_True; + return true; } -/*-----------------18.03.98 16:15------------------- - ---------------------------------------------------*/ -sal_Bool SvxAdjustItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +bool SvxAdjustItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -445,7 +436,7 @@ sal_Bool SvxAdjustItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) bOneBlock = Any2Bool(rVal); break; } - return sal_True; + return true; } // ----------------------------------------------------------------------- @@ -709,7 +700,7 @@ SvxHyphenZoneItem::SvxHyphenZoneItem( const sal_Bool bHyph, const sal_uInt16 nId } // ----------------------------------------------------------------------- -sal_Bool SvxHyphenZoneItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +bool SvxHyphenZoneItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -728,10 +719,10 @@ sal_Bool SvxHyphenZoneItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const rVal <<= (sal_Int16)nMaxHyphens; break; } - return sal_True; + return true; } // ----------------------------------------------------------------------- -sal_Bool SvxHyphenZoneItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +bool SvxHyphenZoneItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -739,7 +730,7 @@ sal_Bool SvxHyphenZoneItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) if( nMemberId != MID_IS_HYPHEN ) if(!(rVal >>= nNewVal)) - return sal_False; + return false; switch(nMemberId) { @@ -756,7 +747,7 @@ sal_Bool SvxHyphenZoneItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) nMaxHyphens = (BYTE)nNewVal; break; } - return sal_True; + return true; } // ----------------------------------------------------------------------- @@ -1011,11 +1002,8 @@ struct ::com::sun::star::style::TabStop typedef sequence ::com::sun::star::style::TabStop> TabSTopSequence; */ -/*-----------------19.03.98 08:50------------------- - ---------------------------------------------------*/ -sal_Bool SvxTabStopItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +bool SvxTabStopItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -1055,11 +1043,8 @@ sal_Bool SvxTabStopItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const } return sal_True; } -/*-----------------19.03.98 08:50------------------- ---------------------------------------------------*/ - -sal_Bool SvxTabStopItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +bool SvxTabStopItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -1140,9 +1125,12 @@ sal_Bool SvxTabStopItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) sal_Int32 nNewPos = 0; if (!(rVal >>= nNewPos) ) return sal_False; + if (bConvert) + nNewPos = MM100_TO_TWIP ( nNewPos ); + if (nNewPos <= 0) + return sal_False; const SvxTabStop& rTab = *(GetStart()); - SvxTabStop aNewTab ( bConvert ? MM100_TO_TWIP ( nNewPos ) : nNewPos, - rTab.GetAdjustment(), rTab.GetDecimal(), rTab.GetFill() ); + SvxTabStop aNewTab ( nNewPos, rTab.GetAdjustment(), rTab.GetDecimal(), rTab.GetFill() ); Remove ( 0 ); Insert( aNewTab ); break; @@ -1242,7 +1230,7 @@ SvStream& SvxTabStopItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) //Alles nur SWG! const SfxItemPool *pPool = SfxItemPool::GetStoringPool(); - const FASTBOOL bStoreDefTabs = pPool + const bool bStoreDefTabs = pPool && pPool->GetName().EqualsAscii("SWG") && ::IsDefaultItem( this ); @@ -1380,7 +1368,7 @@ SfxPoolItem* SvxPageModelItem::Clone( SfxItemPool* ) const //------------------------------------------------------------------------ -sal_Bool SvxPageModelItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId ) const +bool SvxPageModelItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -1395,7 +1383,7 @@ sal_Bool SvxPageModelItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMem return sal_True; } -sal_Bool SvxPageModelItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId ) +bool SvxPageModelItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -1420,7 +1408,7 @@ SfxItemPresentation SvxPageModelItem::GetPresentation ) const { rText.Erase(); - FASTBOOL bSet = ( GetValue().Len() > 0 ); + bool bSet = ( GetValue().Len() > 0 ); switch ( ePres ) { @@ -1556,25 +1544,19 @@ SvxForbiddenRuleItem::SvxForbiddenRuleItem( : SfxBoolItem( nId, bOn ) { } -/* -----------------------------29.11.00 11:23-------------------------------- - ---------------------------------------------------------------------------*/ SfxPoolItem* SvxForbiddenRuleItem::Clone( SfxItemPool * ) const { return new SvxForbiddenRuleItem( GetValue(), Which() ); } -/* -----------------------------29.11.00 11:23-------------------------------- - ---------------------------------------------------------------------------*/ SfxPoolItem* SvxForbiddenRuleItem::Create(SvStream & rStrm, USHORT) const { sal_Bool nValue; rStrm >> nValue; return new SvxForbiddenRuleItem( nValue, Which() ); } -/* -----------------------------29.11.00 11:23-------------------------------- - ---------------------------------------------------------------------------*/ USHORT SvxForbiddenRuleItem::GetVersion( USHORT nFFVer ) const { DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer || @@ -1584,9 +1566,7 @@ USHORT SvxForbiddenRuleItem::GetVersion( USHORT nFFVer ) const return SOFFICE_FILEFORMAT_50 > nFFVer ? USHRT_MAX : 0; } -/* -----------------------------29.11.00 11:23-------------------------------- - ---------------------------------------------------------------------------*/ SfxItemPresentation SvxForbiddenRuleItem::GetPresentation( SfxItemPresentation ePres, SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, @@ -1675,14 +1655,14 @@ SfxItemPresentation SvxParaVertAlignItem::GetPresentation( return SFX_ITEM_PRESENTATION_NONE; } -sal_Bool SvxParaVertAlignItem::QueryValue( com::sun::star::uno::Any& rVal, +bool SvxParaVertAlignItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) const { rVal <<= (sal_Int16)GetValue(); return sal_True; } -sal_Bool SvxParaVertAlignItem::PutValue( const com::sun::star::uno::Any& rVal, +bool SvxParaVertAlignItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) { sal_Int16 nVal = sal_Int16(); @@ -1755,3 +1735,4 @@ SfxItemPresentation SvxParaGridItem::GetPresentation( } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/items/svdfield.cxx b/editeng/source/items/svdfield.cxx index 4b97762bd5..8f262716f0 100644 --- a/editeng/source/items/svdfield.cxx +++ b/editeng/source/items/svdfield.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -63,3 +64,5 @@ void __EXPORT SdrMeasureField::Save(SvPersistStream& rOut) ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/items/svxfont.cxx b/editeng/source/items/svxfont.cxx index 91a8c2e137..027ffd23c8 100644 --- a/editeng/source/items/svxfont.cxx +++ b/editeng/source/items/svxfont.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -45,12 +46,9 @@ // Minimum: Prozentwert fuers kernen #define MINKERNPERCENT 5 -// prop. Groesse der Kleinbuchstaben bei Kapitaelchen -#define KAPITAELCHENPROP 66 - #ifndef REDUCEDSVXFONT const sal_Unicode CH_BLANK = sal_Unicode(' '); // ' ' Leerzeichen - static sal_Char __READONLY_DATA sDoubleSpace[] = " "; + static sal_Char const sDoubleSpace[] = " "; #endif /************************************************************************* @@ -708,7 +706,7 @@ void SvxDoGetCapitalSize::Do( const XubString &_rTxt, const xub_StrLen _nIdx, if ( !bUpper ) { BYTE nProp = pFont->GetPropr(); - pFont->SetProprRel( KAPITAELCHENPROP ); + pFont->SetProprRel( SMALL_CAPS_PERCENTAGE ); pFont->SetPhysFont( pOut ); aPartSize.setWidth( pOut->GetTextWidth( _rTxt, _nIdx, _nLen ) ); aPartSize.setHeight( pOut->GetTextHeight() ); @@ -816,7 +814,7 @@ void SvxDoDrawCapital::Do( const XubString &_rTxt, const xub_StrLen _nIdx, if ( !bUpper ) { nProp = pFont->GetPropr(); - pFont->SetProprRel( KAPITAELCHENPROP ); + pFont->SetProprRel( SMALL_CAPS_PERCENTAGE ); } pFont->SetPhysFont( pOut ); @@ -855,3 +853,4 @@ void SvxFont::DrawCapital( OutputDevice *pOut, #endif // !REDUCEDSVXFONT +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx index 6b21048046..1e5bb01ed9 100644 --- a/editeng/source/items/textitem.cxx +++ b/editeng/source/items/textitem.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -209,10 +210,10 @@ int SvxFontListItem::operator==( const SfxPoolItem& rAttr ) const return( pFontList == ((SvxFontListItem&)rAttr).pFontList ); } -sal_Bool SvxFontListItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) const +bool SvxFontListItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) const { rVal <<= aFontNameSeq; - return sal_True; + return true; } //------------------------------------------------------------------------ @@ -257,7 +258,7 @@ SvxFontItem::SvxFontItem( const FontFamily eFam, const XubString& aName, // ----------------------------------------------------------------------- -sal_Bool SvxFontItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +bool SvxFontItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -284,10 +285,10 @@ sal_Bool SvxFontItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const case MID_FONT_CHAR_SET : rVal <<= (sal_Int16)(eTextEncoding); break; case MID_FONT_PITCH : rVal <<= (sal_Int16)(ePitch); break; } - return sal_True; + return true; } // ----------------------------------------------------------------------- -sal_Bool SvxFontItem::PutValue( const uno::Any& rVal, BYTE nMemberId) +bool SvxFontItem::PutValue( const uno::Any& rVal, BYTE nMemberId) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -347,7 +348,7 @@ sal_Bool SvxFontItem::PutValue( const uno::Any& rVal, BYTE nMemberId) } break; } - return sal_True; + return true; } // ----------------------------------------------------------------------- @@ -571,11 +572,7 @@ XubString SvxPostureItem::GetValueTextByPos( USHORT nPos ) const return sTxt; } - -/*-----------------13.03.98 14:28------------------- - ---------------------------------------------------*/ -sal_Bool SvxPostureItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +bool SvxPostureItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -588,12 +585,10 @@ sal_Bool SvxPostureItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const rVal <<= (awt::FontSlant)GetValue(); // Werte von awt::FontSlant und FontItalic sind gleich break; } - return sal_True; + return true; } -/*-----------------13.03.98 14:28------------------- ---------------------------------------------------*/ -sal_Bool SvxPostureItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +bool SvxPostureItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -616,7 +611,7 @@ sal_Bool SvxPostureItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) SetValue((USHORT)eSlant); } } - return sal_True; + return true; } // ----------------------------------------------------------------------- @@ -627,7 +622,7 @@ int SvxPostureItem::HasBoolValue() const // ----------------------------------------------------------------------- -sal_Bool SvxPostureItem::GetBoolValue() const +BOOL SvxPostureItem::GetBoolValue() const { return ( (FontItalic)GetValue() >= ITALIC_OBLIQUE ); } @@ -732,10 +727,7 @@ XubString SvxWeightItem::GetValueTextByPos( USHORT nPos ) const return EE_RESSTR( RID_SVXITEMS_WEIGHT_BEGIN + nPos ); } -/*-----------------13.03.98 14:18------------------- - ---------------------------------------------------*/ -sal_Bool SvxWeightItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +bool SvxWeightItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -750,12 +742,10 @@ sal_Bool SvxWeightItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const } break; } - return sal_True; + return true; } -/*-----------------13.03.98 14:18------------------- ---------------------------------------------------*/ -sal_Bool SvxWeightItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +bool SvxWeightItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -778,7 +768,7 @@ sal_Bool SvxWeightItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) } break; } - return sal_True; + return true; } // class SvxFontHeightItem ----------------------------------------------- @@ -854,10 +844,7 @@ int SvxFontHeightItem::operator==( const SfxPoolItem& rItem ) const GetPropUnit() == ((SvxFontHeightItem&)rItem).GetPropUnit(); } -/*-----------------13.03.98 14:53------------------- - ---------------------------------------------------*/ -sal_Bool SvxFontHeightItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +bool SvxFontHeightItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const { // In StarOne sind im uno::Any immer 1/100mm. Ueber die MemberId wird // gesteuert, ob der Wert im Item 1/100mm oder Twips sind. @@ -956,9 +943,8 @@ sal_Bool SvxFontHeightItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const } return sal_True; } -/* -----------------01.07.98 13:43------------------- - * Relative Abweichung aus der Hoehe herausrechnen - * --------------------------------------------------*/ + +// Relative Abweichung aus der Hoehe herausrechnen sal_uInt32 lcl_GetRealHeight_Impl(sal_uInt32 nHeight, sal_uInt16 nProp, SfxMapUnit eProp, sal_Bool bCoreInTwip) { sal_uInt32 nRet = nHeight; @@ -992,10 +978,7 @@ sal_uInt32 lcl_GetRealHeight_Impl(sal_uInt32 nHeight, sal_uInt16 nProp, SfxMapUn return nRet; } -/*-----------------13.03.98 14:53------------------- - ---------------------------------------------------*/ -sal_Bool SvxFontHeightItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +bool SvxFontHeightItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -1131,17 +1114,17 @@ USHORT SvxFontHeightItem::GetVersion(USHORT nFileVersion) const // ----------------------------------------------------------------------- -int SvxFontHeightItem::ScaleMetrics( long nMult, long nDiv ) +bool SvxFontHeightItem::ScaleMetrics( long nMult, long nDiv ) { nHeight = (sal_uInt32)Scale( nHeight, nMult, nDiv ); - return 1; + return true; } // ----------------------------------------------------------------------- -int SvxFontHeightItem::HasMetrics() const +bool SvxFontHeightItem::HasMetrics() const { - return 1; + return true; } void SvxFontHeightItem::SetHeight( sal_uInt32 nNewHeight, const USHORT nNewProp, @@ -1212,17 +1195,17 @@ SvStream& SvxFontWidthItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) c // ----------------------------------------------------------------------- -int SvxFontWidthItem::ScaleMetrics( long nMult, long nDiv ) +bool SvxFontWidthItem::ScaleMetrics( long nMult, long nDiv ) { nWidth = (USHORT)Scale( nWidth, nMult, nDiv ); - return 1; + return true; } // ----------------------------------------------------------------------- -int SvxFontWidthItem::HasMetrics() const +bool SvxFontWidthItem::HasMetrics() const { - return 1; + return true; } // ----------------------------------------------------------------------- @@ -1249,10 +1232,7 @@ int SvxFontWidthItem::operator==( const SfxPoolItem& rItem ) const GetProp() == ((SvxFontWidthItem&)rItem).GetProp(); } -/*-----------------13.03.98 16:03------------------- - ---------------------------------------------------*/ -sal_Bool SvxFontWidthItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +bool SvxFontWidthItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -1265,12 +1245,10 @@ sal_Bool SvxFontWidthItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const rVal <<= (sal_Int16)(nProp); break; } - return sal_True; + return true; } -/*-----------------13.03.98 16:03------------------- ---------------------------------------------------*/ -sal_Bool SvxFontWidthItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +bool SvxFontWidthItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -1287,7 +1265,7 @@ sal_Bool SvxFontWidthItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) nWidth = nVal; break; } - return sal_True; + return true; } //------------------------------------------------------------------------ @@ -1422,10 +1400,7 @@ XubString SvxTextLineItem::GetValueTextByPos( USHORT /*nPos*/ ) const return XubString(); } -/*-----------------13.03.98 16:25------------------- - ---------------------------------------------------*/ -sal_Bool SvxTextLineItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +bool SvxTextLineItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -1444,13 +1419,11 @@ sal_Bool SvxTextLineItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const rVal = Bool2Any( !mColor.GetTransparency() ); break; } - return sal_True; + return true; } -/*-----------------13.03.98 16:28------------------- ---------------------------------------------------*/ -sal_Bool SvxTextLineItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +bool SvxTextLineItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -1655,10 +1628,7 @@ XubString SvxCrossedOutItem::GetValueTextByPos( USHORT nPos ) const return EE_RESSTR( RID_SVXITEMS_STRIKEOUT_BEGIN + nPos ); } -/*-----------------13.03.98 16:28------------------- - ---------------------------------------------------*/ -sal_Bool SvxCrossedOutItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +bool SvxCrossedOutItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -1671,12 +1641,10 @@ sal_Bool SvxCrossedOutItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const rVal <<= (sal_Int16)(GetValue()); break; } - return sal_True; + return true; } -/*-----------------13.03.98 16:29------------------- ---------------------------------------------------*/ -sal_Bool SvxCrossedOutItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +bool SvxCrossedOutItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -2047,22 +2015,22 @@ int SvxColorItem::operator==( const SfxPoolItem& rAttr ) const // ----------------------------------------------------------------------- -sal_Bool SvxColorItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const +bool SvxColorItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const { rVal <<= (sal_Int32)(mColor.GetColor()); - return sal_True; + return true; } // ----------------------------------------------------------------------- -sal_Bool SvxColorItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ ) +bool SvxColorItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ ) { sal_Int32 nColor = 0; if(!(rVal >>= nColor)) return sal_False; mColor.SetColor( nColor ); - return sal_True; + return true; } // ----------------------------------------------------------------------- @@ -2211,17 +2179,17 @@ SvStream& SvxKerningItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) con // ----------------------------------------------------------------------- -int SvxKerningItem::ScaleMetrics( long nMult, long nDiv ) +bool SvxKerningItem::ScaleMetrics( long nMult, long nDiv ) { SetValue( (sal_Int16)Scale( GetValue(), nMult, nDiv ) ); - return 1; + return true; } // ----------------------------------------------------------------------- -int SvxKerningItem::HasMetrics() const +bool SvxKerningItem::HasMetrics() const { - return 1; + return true; } // ----------------------------------------------------------------------- @@ -2274,27 +2242,25 @@ SfxItemPresentation SvxKerningItem::GetPresentation #endif return SFX_ITEM_PRESENTATION_NONE; } -/* -----------------------------19.02.01 12:21-------------------------------- - ---------------------------------------------------------------------------*/ -sal_Bool SvxKerningItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +bool SvxKerningItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const { sal_Int16 nVal = GetValue(); if(nMemberId & CONVERT_TWIPS) nVal = (sal_Int16)TWIP_TO_MM100(nVal); rVal <<= nVal; - return sal_True; + return true; } // ----------------------------------------------------------------------- -sal_Bool SvxKerningItem::PutValue( const uno::Any& rVal, BYTE nMemberId) +bool SvxKerningItem::PutValue( const uno::Any& rVal, BYTE nMemberId) { sal_Int16 nVal = sal_Int16(); if(!(rVal >>= nVal)) - return sal_False; + return false; if(nMemberId & CONVERT_TWIPS) nVal = (sal_Int16)MM100_TO_TWIP(nVal); SetValue(nVal); - return sal_True; + return true; } // class SvxCaseMapItem -------------------------------------------------- @@ -2367,10 +2333,7 @@ XubString SvxCaseMapItem::GetValueTextByPos( USHORT nPos ) const return EE_RESSTR( RID_SVXITEMS_CASEMAP_BEGIN + nPos ); } -/*-----------------13.03.98 16:29------------------- - ---------------------------------------------------*/ -sal_Bool SvxCaseMapItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const +bool SvxCaseMapItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const { sal_Int16 nRet = style::CaseMap::NONE; switch( GetValue() ) @@ -2382,12 +2345,10 @@ sal_Bool SvxCaseMapItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const case SVX_CASEMAP_KAPITAELCHEN: nRet = style::CaseMap::SMALLCAPS; break; } rVal <<= (sal_Int16)(nRet); - return sal_True; + return true; } -/*-----------------13.03.98 16:29------------------- ---------------------------------------------------*/ -sal_Bool SvxCaseMapItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ ) +bool SvxCaseMapItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ ) { sal_uInt16 nVal = sal_uInt16(); if(!(rVal >>= nVal)) @@ -2402,7 +2363,7 @@ sal_Bool SvxCaseMapItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ ) case style::CaseMap::SMALLCAPS: nVal = SVX_CASEMAP_KAPITAELCHEN; break; } SetValue(nVal); - return sal_True; + return true; } // class SvxEscapementItem ----------------------------------------------- @@ -2549,10 +2510,7 @@ void SvxEscapementItem::SetEnumValue( USHORT nVal ) SetEscapement( (const SvxEscapement)nVal ); } -/*-----------------13.03.98 17:05------------------- - ---------------------------------------------------*/ -sal_Bool SvxEscapementItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +bool SvxEscapementItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -2568,12 +2526,10 @@ sal_Bool SvxEscapementItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const rVal = Bool2Any(DFLT_ESC_AUTO_SUB == nEsc || DFLT_ESC_AUTO_SUPER == nEsc); break; } - return sal_True; + return true; } -/*-----------------13.03.98 17:05------------------- ---------------------------------------------------*/ -sal_Bool SvxEscapementItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +bool SvxEscapementItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -2615,7 +2571,7 @@ sal_Bool SvxEscapementItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) } break; } - return sal_True; + return true; } // class SvxLanguageItem ------------------------------------------------- @@ -2690,10 +2646,7 @@ SfxItemPresentation SvxLanguageItem::GetPresentation return SFX_ITEM_PRESENTATION_NONE; } -/*-----------------14.03.98 14:13------------------- - ---------------------------------------------------*/ -sal_Bool SvxLanguageItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +bool SvxLanguageItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -2707,12 +2660,10 @@ sal_Bool SvxLanguageItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const rVal <<= aRet; break; } - return sal_True; + return true; } -/*-----------------14.03.98 14:13------------------- ---------------------------------------------------*/ -sal_Bool SvxLanguageItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +bool SvxLanguageItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -2722,7 +2673,7 @@ sal_Bool SvxLanguageItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) { sal_Int32 nValue = 0; if(!(rVal >>= nValue)) - return sal_False; + return false; SetValue((sal_Int16)nValue); } @@ -2740,11 +2691,11 @@ sal_Bool SvxLanguageItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) } break; } - return sal_True; + return true; } // class SvxNoLinebreakItem ---------------------------------------------- -SvxNoLinebreakItem::SvxNoLinebreakItem( const sal_Bool bBreak, const USHORT nId ) : +SvxNoLinebreakItem::SvxNoLinebreakItem( const BOOL bBreak, const USHORT nId ) : SfxBoolItem( nId, bBreak ) { } @@ -3021,7 +2972,7 @@ SfxItemPresentation SvxEmphasisMarkItem::GetPresentation // ----------------------------------------------------------------------- -sal_Bool SvxEmphasisMarkItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +bool SvxEmphasisMarkItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -3045,14 +2996,14 @@ sal_Bool SvxEmphasisMarkItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const } break; } - return sal_True; + return true; } -sal_Bool SvxEmphasisMarkItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +bool SvxEmphasisMarkItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; - sal_Bool bRet = sal_True; + sal_Bool bRet = true; switch( nMemberId ) { case MID_EMPHASIS: @@ -3070,7 +3021,7 @@ sal_Bool SvxEmphasisMarkItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) case FontEmphasis::CIRCLE_BELOW: nValue = EMPHASISMARK_CIRCLE|EMPHASISMARK_POS_BELOW; break; case FontEmphasis::DISK_BELOW : nValue = EMPHASISMARK_DISC|EMPHASISMARK_POS_BELOW; break; case FontEmphasis::ACCENT_BELOW: nValue = EMPHASISMARK_ACCENT|EMPHASISMARK_POS_BELOW; break; - default: return sal_False; + default: return false; } SetValue( (sal_Int16)nValue ); } @@ -3126,12 +3077,12 @@ SfxPoolItem* SvxTwoLinesItem::Clone( SfxItemPool* ) const return new SvxTwoLinesItem( *this ); } -sal_Bool SvxTwoLinesItem::QueryValue( com::sun::star::uno::Any& rVal, +bool SvxTwoLinesItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; - sal_Bool bRet = sal_True; + sal_Bool bRet = true; switch( nMemberId ) { case MID_TWOLINES: @@ -3154,13 +3105,13 @@ sal_Bool SvxTwoLinesItem::QueryValue( com::sun::star::uno::Any& rVal, } break; default: - bRet = sal_False; + bRet = false; break; } return bRet; } -sal_Bool SvxTwoLinesItem::PutValue( const com::sun::star::uno::Any& rVal, +bool SvxTwoLinesItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); @@ -3312,12 +3263,12 @@ SfxItemPresentation SvxCharRotateItem::GetPresentation( return SFX_ITEM_PRESENTATION_NONE; } -sal_Bool SvxCharRotateItem::QueryValue( com::sun::star::uno::Any& rVal, +bool SvxCharRotateItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; - sal_Bool bRet = sal_True; + bool bRet = true; switch( nMemberId ) { case MID_ROTATE: @@ -3327,18 +3278,18 @@ sal_Bool SvxCharRotateItem::QueryValue( com::sun::star::uno::Any& rVal, rVal = Bool2Any( IsFitToLine() ); break; default: - bRet = sal_False; + bRet = false; break; } return bRet; } -sal_Bool SvxCharRotateItem::PutValue( const com::sun::star::uno::Any& rVal, +bool SvxCharRotateItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; - sal_Bool bRet = sal_True; + bool bRet = true; switch( nMemberId ) { case MID_ROTATE: @@ -3355,7 +3306,7 @@ sal_Bool SvxCharRotateItem::PutValue( const com::sun::star::uno::Any& rVal, SetFitToLine( Any2Bool( rVal ) ); break; default: - bRet = sal_False; + bRet = false; } return bRet; } @@ -3455,7 +3406,7 @@ SfxItemPresentation SvxCharScaleWidthItem::GetPresentation( return SFX_ITEM_PRESENTATION_NONE; } -sal_Bool SvxCharScaleWidthItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ ) +bool SvxCharScaleWidthItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ ) { // SfxUInt16Item::QueryValue returns sal_Int32 in Any now... (srx642w) // where we still want this to be a sal_Int16 @@ -3463,19 +3414,19 @@ sal_Bool SvxCharScaleWidthItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId if (rVal >>= nValue) { SetValue( (UINT16) nValue ); - return TRUE; + return true; } DBG_ERROR( "SvxCharScaleWidthItem::PutValue - Wrong type!" ); - return FALSE; + return false; } -sal_Bool SvxCharScaleWidthItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const +bool SvxCharScaleWidthItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const { // SfxUInt16Item::QueryValue returns sal_Int32 in Any now... (srx642w) // where we still want this to be a sal_Int16 rVal <<= (sal_Int16)GetValue(); - return TRUE; + return true; } /************************************************************************* @@ -3550,12 +3501,12 @@ SfxItemPresentation SvxCharReliefItem::GetPresentation return eRet; } -sal_Bool SvxCharReliefItem::PutValue( const com::sun::star::uno::Any& rVal, +bool SvxCharReliefItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; - sal_Bool bRet = sal_True; + bool bRet = true; switch( nMemberId ) { case MID_RELIEF: @@ -3565,29 +3516,29 @@ sal_Bool SvxCharReliefItem::PutValue( const com::sun::star::uno::Any& rVal, if(nVal >= 0 && nVal <= RELIEF_ENGRAVED) SetValue( (USHORT)nVal ); else - bRet = sal_False; + bRet = false; } break; default: - bRet = sal_False; + bRet = false; break; } return bRet; } -sal_Bool SvxCharReliefItem::QueryValue( com::sun::star::uno::Any& rVal, +bool SvxCharReliefItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; - sal_Bool bRet = sal_True; + bool bRet = true; switch( nMemberId ) { case MID_RELIEF: rVal <<= (sal_Int16)GetValue(); break; default: - bRet = sal_False; + bRet = false; break; } return bRet; @@ -3841,3 +3792,5 @@ short GetI18NScriptType( USHORT nItemType ) } return 0; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/items/writingmodeitem.cxx b/editeng/source/items/writingmodeitem.cxx index 732664f46e..efc9b5359b 100644 --- a/editeng/source/items/writingmodeitem.cxx +++ b/editeng/source/items/writingmodeitem.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -104,10 +105,10 @@ SfxItemPresentation SvxWritingModeItem::GetPresentation( SfxItemPresentation ePr return eRet; } -sal_Bool SvxWritingModeItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE ) +bool SvxWritingModeItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE ) { sal_Int32 nVal = 0; - sal_Bool bRet = ( rVal >>= nVal ); + bool bRet = ( rVal >>= nVal ); if( !bRet ) { @@ -139,7 +140,7 @@ sal_Bool SvxWritingModeItem::PutValue( const com::sun::star::uno::Any& rVal, BYT return bRet; } -sal_Bool SvxWritingModeItem::QueryValue( com::sun::star::uno::Any& rVal, +bool SvxWritingModeItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE ) const { rVal <<= (WritingMode)GetValue(); @@ -151,3 +152,5 @@ SvxWritingModeItem& SvxWritingModeItem::operator=( const SvxWritingModeItem& rIt SetValue( rItem.GetValue() ); return *this; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/items/xmlcnitm.cxx b/editeng/source/items/xmlcnitm.cxx index 843106ba5c..54c604d9ca 100644 --- a/editeng/source/items/xmlcnitm.cxx +++ b/editeng/source/items/xmlcnitm.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -90,15 +91,16 @@ USHORT SvXMLAttrContainerItem::GetVersion( USHORT /*nFileFormatVersion*/ ) const return USHRT_MAX; } -BOOL SvXMLAttrContainerItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) const +bool SvXMLAttrContainerItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) const { Reference<XNameContainer> xContainer = new SvUnoAttributeContainer( new SvXMLAttrContainerData( *pImpl ) ); rVal.setValue( &xContainer, ::getCppuType((Reference<XNameContainer>*)0) ); - return TRUE; + return true; } -BOOL SvXMLAttrContainerItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) + +bool SvXMLAttrContainerItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) { Reference<XInterface> xRef; SvUnoAttributeContainer* pContainer = NULL; @@ -174,16 +176,16 @@ BOOL SvXMLAttrContainerItem::PutValue( const com::sun::star::uno::Any& rVal, BYT else { delete pNewImpl; - return FALSE; + return false; } } catch(...) { delete pNewImpl; - return FALSE; + return false; } } - return TRUE; + return true; } @@ -246,3 +248,4 @@ const ::rtl::OUString& SvXMLAttrContainerItem::GetPrefix( USHORT i ) const return pImpl->GetPrefix( i ); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/misc/SvXMLAutoCorrectExport.cxx b/editeng/source/misc/SvXMLAutoCorrectExport.cxx index 71602b53e3..de5f2af022 100644 --- a/editeng/source/misc/SvXMLAutoCorrectExport.cxx +++ b/editeng/source/misc/SvXMLAutoCorrectExport.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -115,3 +116,5 @@ sal_uInt32 SvXMLExceptionListExport::exportDoc(enum XMLTokenEnum /*eClass*/) GetDocHandler()->endDocument(); return 0; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/misc/SvXMLAutoCorrectExport.hxx b/editeng/source/misc/SvXMLAutoCorrectExport.hxx index 224d9e3586..9a2bb77ee7 100644 --- a/editeng/source/misc/SvXMLAutoCorrectExport.hxx +++ b/editeng/source/misc/SvXMLAutoCorrectExport.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -73,3 +74,5 @@ public: void _ExportContent() {} }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/misc/SvXMLAutoCorrectImport.cxx b/editeng/source/misc/SvXMLAutoCorrectImport.cxx index e6cc0e61c8..e81e912ed6 100644 --- a/editeng/source/misc/SvXMLAutoCorrectImport.cxx +++ b/editeng/source/misc/SvXMLAutoCorrectImport.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,9 +29,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_editeng.hxx" #include <SvXMLAutoCorrectImport.hxx> -#ifndef _APP_HXX //autogen #include <vcl/svapp.hxx> -#endif #define _SVSTDARR_STRINGSISORTDTOR #define _SVSTDARR_STRINGSDTOR @@ -264,3 +263,5 @@ SvXMLExceptionContext::SvXMLExceptionContext( SvXMLExceptionContext::~SvXMLExceptionContext ( void ) { } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/misc/SvXMLAutoCorrectImport.hxx b/editeng/source/misc/SvXMLAutoCorrectImport.hxx index 2175a453a7..d79f4509cf 100644 --- a/editeng/source/misc/SvXMLAutoCorrectImport.hxx +++ b/editeng/source/misc/SvXMLAutoCorrectImport.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -27,9 +28,7 @@ #ifndef _SV_XMLAUTOCORRECTIMPORT_HXX #define _SV_XMLAUTOCORRECTIMPORT_HXX -#ifndef _SVSTOR_HXX #include <sot/storage.hxx> -#endif #include <xmloff/xmlictxt.hxx> #include <xmloff/xmlimp.hxx> #include <xmloff/nmspmap.hxx> @@ -146,3 +145,5 @@ public: #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/misc/acorrcfg.cxx b/editeng/source/misc/acorrcfg.cxx index 3bf26ec629..8a8a179dcc 100644 --- a/editeng/source/misc/acorrcfg.cxx +++ b/editeng/source/misc/acorrcfg.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -95,9 +96,7 @@ void SvxAutoCorrCfg::SetAutoCorrect( SvxAutoCorrect* pNew ) pAutoCorrect = pNew; } } -/*-- 12.10.00 11:44:17--------------------------------------------------- - -----------------------------------------------------------------------*/ Sequence<OUString> SvxBaseAutoCorrCfg::GetPropertyNames() { static const char* aPropNames[] = @@ -118,18 +117,17 @@ Sequence<OUString> SvxBaseAutoCorrCfg::GetPropertyNames() "SingleQuoteAtEnd", // 13 "ReplaceDoubleQuote", // 14 "DoubleQuoteAtStart", // 15 - "DoubleQuoteAtEnd" // 16 + "DoubleQuoteAtEnd", // 16 + "CorrectAccidentalCapsLock" // 17 }; - const int nCount = 17; + const int nCount = 18; Sequence<OUString> aNames(nCount); OUString* pNames = aNames.getArray(); for(int i = 0; i < nCount; i++) pNames[i] = OUString::createFromAscii(aPropNames[i]); return aNames; } -/*-- 12.10.00 11:44:18--------------------------------------------------- - -----------------------------------------------------------------------*/ void SvxBaseAutoCorrCfg::Load(sal_Bool bInit) { Sequence<OUString> aNames = GetPropertyNames(); @@ -220,6 +218,10 @@ void SvxBaseAutoCorrCfg::Load(sal_Bool bInit) rParent.pAutoCorrect->SetEndDoubleQuote( sal::static_int_cast< sal_Unicode >( nTemp ) ); break;//"DoubleQuoteAtEnd" + case 17: + if(*(sal_Bool*)pValues[nProp].getValue()) + nFlags |= CorrectCapsLock; + break;//"CorrectAccidentalCapsLock" } } } @@ -229,23 +231,17 @@ void SvxBaseAutoCorrCfg::Load(sal_Bool bInit) } } -/*-- 12.10.00 11:44:19--------------------------------------------------- - -----------------------------------------------------------------------*/ SvxBaseAutoCorrCfg::SvxBaseAutoCorrCfg(SvxAutoCorrCfg& rPar) : utl::ConfigItem(C2U("Office.Common/AutoCorrect")), rParent(rPar) { } -/*-- 12.10.00 11:44:19--------------------------------------------------- - -----------------------------------------------------------------------*/ SvxBaseAutoCorrCfg::~SvxBaseAutoCorrCfg() { } -/*-- 12.10.00 11:44:20--------------------------------------------------- - -----------------------------------------------------------------------*/ void SvxBaseAutoCorrCfg::Commit() { Sequence<OUString> aNames( GetPropertyNames() ); @@ -324,20 +320,20 @@ void SvxBaseAutoCorrCfg::Commit() case 16: pValues[nProp] <<= (sal_Int32) rParent.pAutoCorrect->GetEndDoubleQuote(); break;//"DoubleQuoteAtEnd" + case 17: + bVal = 0 != (nFlags & CorrectCapsLock); + pValues[nProp].setValue(&bVal, rType); + break;//"CorrectAccidentalCapsLock" } } PutProperties(aNames, aValues); } -/*-- 12.10.00 11:44:21--------------------------------------------------- - -----------------------------------------------------------------------*/ void SvxBaseAutoCorrCfg::Notify( const Sequence<OUString>& /* aPropertyNames */) { Load(sal_False); } -/*-- 12.10.00 11:51:48--------------------------------------------------- - -----------------------------------------------------------------------*/ Sequence<OUString> SvxSwAutoCorrCfg::GetPropertyNames() { static const char* aPropNames[] = @@ -397,9 +393,7 @@ Sequence<OUString> SvxSwAutoCorrCfg::GetPropertyNames() pNames[i] = OUString::createFromAscii(aPropNames[i]); return aNames; } -/*-- 12.10.00 11:51:48--------------------------------------------------- - -----------------------------------------------------------------------*/ void SvxSwAutoCorrCfg::Load(sal_Bool bInit) { Sequence<OUString> aNames = GetPropertyNames(); @@ -546,23 +540,17 @@ void SvxSwAutoCorrCfg::Load(sal_Bool bInit) } } } -/*-- 12.10.00 11:51:48--------------------------------------------------- - -----------------------------------------------------------------------*/ SvxSwAutoCorrCfg::SvxSwAutoCorrCfg(SvxAutoCorrCfg& rPar) : utl::ConfigItem(C2U("Office.Writer/AutoFunction")), rParent(rPar) { } -/*-- 12.10.00 11:51:48--------------------------------------------------- - -----------------------------------------------------------------------*/ SvxSwAutoCorrCfg::~SvxSwAutoCorrCfg() { } -/*-- 12.10.00 11:51:48--------------------------------------------------- - -----------------------------------------------------------------------*/ void SvxSwAutoCorrCfg::Commit() { Sequence<OUString> aNames = GetPropertyNames(); @@ -659,9 +647,7 @@ void SvxSwAutoCorrCfg::Commit() } PutProperties(aNames, aValues); } -/*-- 12.10.00 11:51:49--------------------------------------------------- - -----------------------------------------------------------------------*/ void SvxSwAutoCorrCfg::Notify( const Sequence<OUString>& /* aPropertyNames */ ) { Load(sal_False); @@ -673,3 +659,5 @@ SvxAutoCorrCfg* SvxAutoCorrCfg::Get() pAutoCorrCfg = new SvxAutoCorrCfg; return pAutoCorrCfg; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/misc/edtdlg.cxx b/editeng/source/misc/edtdlg.cxx index f02b4733c7..50760cf5b4 100755 --- a/editeng/source/misc/edtdlg.cxx +++ b/editeng/source/misc/edtdlg.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. diff --git a/editeng/source/misc/forbiddencharacterstable.cxx b/editeng/source/misc/forbiddencharacterstable.cxx index da7b654a8b..6a57ef606a 100644 --- a/editeng/source/misc/forbiddencharacterstable.cxx +++ b/editeng/source/misc/forbiddencharacterstable.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -90,3 +91,5 @@ void SvxForbiddenCharactersTable::ClearForbiddenCharacters( USHORT nLanguage ) delete pInf; } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/misc/hangulhanja.cxx b/editeng/source/misc/hangulhanja.cxx index b200bbf091..e45b6ad733 100644 --- a/editeng/source/misc/hangulhanja.cxx +++ b/editeng/source/misc/hangulhanja.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -106,7 +107,7 @@ namespace editeng static StringMap m_aRecentlyUsedList; // general - AbstractHangulHanjaConversionDialog* //CHINA001 HangulHanjaConversionDialog* + AbstractHangulHanjaConversionDialog* m_pConversionDialog; // the dialog to display for user interaction Window* m_pUIParent; // the parent window for any UI we raise Reference< XMultiServiceFactory > @@ -967,7 +968,7 @@ namespace editeng if( sChangeInto.getLength() ) { - // change the current occurence + // change the current occurrence implChange( sChangeInto ); // put into the "change all" list @@ -1169,3 +1170,4 @@ namespace editeng } // namespace svx //............................................................................. +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/misc/splwrap.cxx b/editeng/source/misc/splwrap.cxx index 68cc6c5309..d644e78cda 100644 --- a/editeng/source/misc/splwrap.cxx +++ b/editeng/source/misc/splwrap.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -179,7 +180,7 @@ SvxSpellWrapper::SvxSpellWrapper( Window* pWn, Reference< beans::XPropertySet > xProp( SvxGetLinguPropertySet() ); sal_Bool bWrapReverse = xProp.is() ? *(sal_Bool*)xProp->getPropertyValue( - ::rtl::OUString::createFromAscii(UPN_IS_WRAP_REVERSE) ).getValue() + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UPN_IS_WRAP_REVERSE)) ).getValue() : sal_False; bReverse = bRevAllow && bWrapReverse; bStartDone = bOther || ( !bReverse && bStart ); @@ -427,7 +428,7 @@ sal_Bool SvxSpellWrapper::SpellNext( ) Reference< beans::XPropertySet > xProp( SvxGetLinguPropertySet() ); sal_Bool bWrapReverse = xProp.is() ? *(sal_Bool*)xProp->getPropertyValue( - ::rtl::OUString::createFromAscii(UPN_IS_WRAP_REVERSE) ).getValue() + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UPN_IS_WRAP_REVERSE)) ).getValue() : sal_False; sal_Bool bActRev = bRevAllowed && bWrapReverse; @@ -473,7 +474,7 @@ sal_Bool SvxSpellWrapper::SpellNext( ) { sal_Bool bIsSpellSpecial = xProp.is() ? *(sal_Bool*)xProp->getPropertyValue( - ::rtl::OUString::createFromAscii(UPN_IS_SPELL_SPECIAL) ).getValue() + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UPN_IS_SPELL_SPECIAL)) ).getValue() : sal_False; // Bodybereich erledigt, Frage nach Sonderbereich if( !IsHyphen() && bIsSpellSpecial && HasOtherCnt() ) @@ -630,3 +631,4 @@ sal_Bool SvxSpellWrapper::FindSpellError() +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index e3efca33ad..229f578299 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -219,7 +220,6 @@ static TransliterationWrapper& GetIgnoreTranslWrapper() { static int bIsInit = 0; static TransliterationWrapper aWrp( GetProcessFact(), - ::com::sun::star::i18n::TransliterationModules_IGNORE_CASE | ::com::sun::star::i18n::TransliterationModules_IGNORE_KANA | ::com::sun::star::i18n::TransliterationModules_IGNORE_WIDTH ); if( !bIsInit ) @@ -288,9 +288,6 @@ BOOL SvxAutocorrWordList::Seek_Entry( const SvxAutocorrWordPtr aE, USHORT* pP ) return FALSE; } -/* -----------------18.11.98 15:28------------------- - * - * --------------------------------------------------*/ void lcl_ClearTable(SvxAutoCorrLanguageTable_Impl& rLangTable) { SvxAutoCorrectLanguageListsPtr pLists = rLangTable.Last(); @@ -302,10 +299,6 @@ void lcl_ClearTable(SvxAutoCorrLanguageTable_Impl& rLangTable) rLangTable.Clear(); } -/* -----------------03.11.06 10:15------------------- - * - * --------------------------------------------------*/ - sal_Bool SvxAutoCorrect::IsAutoCorrectChar( sal_Unicode cChar ) { return cChar == '\0' || cChar == '\t' || cChar == 0x0a || @@ -321,9 +314,6 @@ sal_Bool SvxAutoCorrect::NeedsHardspaceAutocorr( sal_Unicode cChar ) cChar == '/' /*case for the urls exception*/; } -/* -----------------19.11.98 10:15------------------- - * - * --------------------------------------------------*/ long SvxAutoCorrect::GetDefaultFlags() { long nRet = Autocorrect @@ -336,7 +326,8 @@ long SvxAutoCorrect::GetDefaultFlags() | SetINetAttr | ChgQuotes | SaveWordCplSttLst - | SaveWordWrdSttLst; + | SaveWordWrdSttLst + | CorrectCapsLock; LanguageType eLang = GetAppLang(); switch( eLang ) { @@ -489,12 +480,12 @@ BOOL SvxAutoCorrect::FnChgOrdinalNumber( if( 2 < nEndPos - nSttPos && rCC.isDigit( rTxt, nEndPos - 3 ) ) { - static sal_Char __READONLY_DATA + static sal_Char const sAll[] = "th", /* rest */ sFirst[] = "st", /* 1 */ sSecond[] = "nd", /* 2 */ sThird[] = "rd"; /* 3 */ - static const sal_Char* __READONLY_DATA aNumberTab[ 4 ] = + static const sal_Char* const aNumberTab[ 4 ] = { sAll, sFirst, sSecond, sThird }; @@ -815,7 +806,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, *pWordStt = 0, *pDelim = 0; - BOOL bAtStart = FALSE, bPrevPara = FALSE; + BOOL bAtStart = FALSE; do { --pStr; if( rCC.isLetter( @@ -832,10 +823,8 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, { if( lcl_IsInAsciiArr( sImplWordChars, *pStr ) && pWordStt - 1 == pStr && - // --> FME 2005-02-14 #i38971# - // l'intallazione at beginning of paragraph. Replaced < by <= + // l'intallazione at beginning of paragraph. Replaced < by <= (#i38971#) (long)(pStart + 1) <= (long)pStr && - // <-- rCC.isLetter( aText, sal::static_int_cast< xub_StrLen >( pStr-1 - pStart ) ) ) @@ -892,7 +881,6 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, } aText = *pPrevPara; - bPrevPara = TRUE; bAtStart = FALSE; pStart = aText.GetBuffer(); pStr = pStart + aText.Len(); @@ -1076,7 +1064,50 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, return bRet; } -//The method below is renamed from _GetQuote to GetQuote by BerryJia for Bug95846 Time:2002-8-13 15:50 + +bool SvxAutoCorrect::FnCorrectCapsLock( SvxAutoCorrDoc& rDoc, const String& rTxt, + xub_StrLen nSttPos, xub_StrLen nEndPos, + LanguageType eLang ) +{ + if (nEndPos - nSttPos < 2) + // string must be at least 2-character long. + return false; + + CharClass& rCC = GetCharClass( eLang ); + + // Check the first 2 letters. + if ( !IsLowerLetter(rCC.getCharacterType(rTxt, nSttPos)) ) + return false; + + if ( !IsUpperLetter(rCC.getCharacterType(rTxt, nSttPos+1)) ) + return false; + + String aConverted; + aConverted.Append( rCC.upper(rTxt.GetChar(nSttPos)) ); + aConverted.Append( rCC.lower(rTxt.GetChar(nSttPos+1)) ); + + for (xub_StrLen i = nSttPos+2; i < nEndPos; ++i) + { + if ( IsLowerLetter(rCC.getCharacterType(rTxt, i)) ) + // A lowercase letter disqualifies the whole text. + return false; + + if ( IsUpperLetter(rCC.getCharacterType(rTxt, i)) ) + // Another uppercase letter. Convert it. + aConverted.Append( rCC.lower(rTxt.GetChar(i)) ); + else + // This is not an alphabetic letter. Leave it as-is. + aConverted.Append(rTxt.GetChar(i)); + } + + // Replace the word. + rDoc.Delete(nSttPos, nEndPos); + rDoc.Insert(nSttPos, aConverted); + + return true; +} + + sal_Unicode SvxAutoCorrect::GetQuote( sal_Unicode cInsChar, BOOL bSttQuote, LanguageType eLang ) const { @@ -1189,7 +1220,7 @@ String SvxAutoCorrect::GetQuote( SvxAutoCorrDoc& rDoc, xub_StrLen nInsPos, ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt, xub_StrLen nInsPos, sal_Unicode cChar, - BOOL bInsert ) + BOOL bInsert, Window* pFrameWin ) { ULONG nRet = 0; bool bIsNextRun = bRunNext; @@ -1367,7 +1398,19 @@ ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt, ; else { + bool bLockKeyOn = pFrameWin && (pFrameWin->GetIndicatorState() & INDICATOR_CAPSLOCK); + nRet = 0; + if ( bLockKeyOn && IsAutoCorrFlag( CorrectCapsLock ) && + FnCorrectCapsLock( rDoc, rTxt, nCapLttrPos, nInsPos, eLang ) ) + { + // Correct accidental use of cAPS LOCK key (do this only when + // the caps or shift lock key is pressed). Turn off the caps + // lock afterwords. + nRet |= CorrectCapsLock; + pFrameWin->SimulateKeyPress( KEY_CAPSLOCK ); + } + // Grossbuchstabe am Satz-Anfang ?? if( IsAutoCorrFlag( CptlSttSntnc ) && FnCptlSttSntnc( rDoc, rTxt, TRUE, nCapLttrPos, nInsPos, eLang ) ) @@ -1726,10 +1769,6 @@ void DecryptBlockName_Imp( String& rName ) } } - -/* -----------------18.11.98 16:00------------------- - * - * --------------------------------------------------*/ const SvxAutocorrWord* lcl_SearchWordsInList( SvxAutoCorrectLanguageListsPtr pList, const String& rTxt, xub_StrLen& rStt, xub_StrLen nEndPos, SvxAutoCorrDoc& ) @@ -1821,9 +1860,7 @@ const SvxAutocorrWord* SvxAutoCorrect::SearchWordsInList( } return 0; } -/* -----------------18.11.98 13:46------------------- - * - * --------------------------------------------------*/ + BOOL SvxAutoCorrect::FindInWrdSttExceptList( LanguageType eLang, const String& sWord ) { @@ -1865,9 +1902,7 @@ BOOL SvxAutoCorrect::FindInWrdSttExceptList( LanguageType eLang, } return FALSE; } -/* -----------------18.11.98 14:28------------------- - * - * --------------------------------------------------*/ + BOOL lcl_FindAbbreviation( const SvStringsISortDtor* pList, const String& sWord) { String sAbk( '~' ); @@ -1901,9 +1936,7 @@ BOOL lcl_FindAbbreviation( const SvStringsISortDtor* pList, const String& sWord) "falsch sortierte ExeptionListe?" ); return FALSE; } -/* -----------------18.11.98 14:49------------------- - * - * --------------------------------------------------*/ + BOOL SvxAutoCorrect::FindInCplSttExceptList(LanguageType eLang, const String& sWord, BOOL bAbbreviation) { @@ -1952,9 +1985,6 @@ BOOL SvxAutoCorrect::FindInCplSttExceptList(LanguageType eLang, } -/* -----------------20.11.98 11:53------------------- - * - * --------------------------------------------------*/ String SvxAutoCorrect::GetAutoCorrFileName( LanguageType eLang, BOOL bNewFile, BOOL bTst ) const { @@ -1975,9 +2005,6 @@ String SvxAutoCorrect::GetAutoCorrFileName( LanguageType eLang, return sRet; } -/* -----------------18.11.98 11:16------------------- - * - * --------------------------------------------------*/ SvxAutoCorrectLanguageLists::SvxAutoCorrectLanguageLists( SvxAutoCorrect& rParent, const String& rShareAutoCorrectFile, @@ -1994,9 +2021,6 @@ SvxAutoCorrectLanguageLists::SvxAutoCorrectLanguageLists( { } -/* -----------------18.11.98 11:16------------------- - * - * --------------------------------------------------*/ SvxAutoCorrectLanguageLists::~SvxAutoCorrectLanguageLists() { delete pCplStt_ExcptLst; @@ -2004,9 +2028,6 @@ SvxAutoCorrectLanguageLists::~SvxAutoCorrectLanguageLists() delete pAutocorr_List; } -/* -----------------18.11.98 11:26------------------- - * - * --------------------------------------------------*/ BOOL SvxAutoCorrectLanguageLists::IsFileChanged_Imp() { // nur alle 2 Minuten aufs FileSystem zugreifen um den @@ -2082,7 +2103,7 @@ void SvxAutoCorrectLanguageLists::LoadXMLExceptList_Imp( // get parser uno::Reference< XInterface > xXMLParser = xServiceFactory->createInstance( - OUString::createFromAscii("com.sun.star.xml.sax.Parser") ); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser")) ); DBG_ASSERT( xXMLParser.is(), "XMLReader::Read: com.sun.star.xml.sax.Parser service missing" ); if( !xXMLParser.is() ) @@ -2126,9 +2147,7 @@ void SvxAutoCorrectLanguageLists::LoadXMLExceptList_Imp( } } -/* -----------------18.11.98 11:26------------------- - * - * --------------------------------------------------*/ + void SvxAutoCorrectLanguageLists::SaveExceptList_Imp( const SvStringsISortDtor& rLst, const sal_Char* pStrmName, @@ -2200,9 +2219,7 @@ void SvxAutoCorrectLanguageLists::SaveExceptList_Imp( } } } -/* -----------------18.11.98 11:26------------------- - * - * --------------------------------------------------*/ + SvxAutocorrWordList* SvxAutoCorrectLanguageLists::LoadAutocorrWordList() { if( pAutocorr_List ) @@ -2223,7 +2240,7 @@ SvxAutocorrWordList* SvxAutoCorrectLanguageLists::LoadAutocorrWordList() aParserInput.aInputStream = xStrm->getInputStream(); // get parser - uno::Reference< XInterface > xXMLParser = xServiceFactory->createInstance( OUString::createFromAscii("com.sun.star.xml.sax.Parser") ); + uno::Reference< XInterface > xXMLParser = xServiceFactory->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser")) ); DBG_ASSERT( xXMLParser.is(), "XMLReader::Read: com.sun.star.xml.sax.Parser service missing" ); if( xXMLParser.is() ) { @@ -2249,10 +2266,6 @@ SvxAutocorrWordList* SvxAutoCorrectLanguageLists::LoadAutocorrWordList() return pAutocorr_List; } -/* -----------------18.11.98 11:26------------------- - * - * --------------------------------------------------*/ - void SvxAutoCorrectLanguageLists::SetAutocorrWordList( SvxAutocorrWordList* pList ) { if( pAutocorr_List && pList != pAutocorr_List ) @@ -2266,27 +2279,20 @@ void SvxAutoCorrectLanguageLists::SetAutocorrWordList( SvxAutocorrWordList* pLis nFlags |= ChgWordLstLoad; } -/* -----------------18.11.98 11:26------------------- - * - * --------------------------------------------------*/ const SvxAutocorrWordList* SvxAutoCorrectLanguageLists::GetAutocorrWordList() { if( !( ChgWordLstLoad & nFlags ) || IsFileChanged_Imp() ) SetAutocorrWordList( LoadAutocorrWordList() ); return pAutocorr_List; } -/* -----------------18.11.98 11:26------------------- - * - * --------------------------------------------------*/ + SvStringsISortDtor* SvxAutoCorrectLanguageLists::GetCplSttExceptList() { if( !( CplSttLstLoad & nFlags ) || IsFileChanged_Imp() ) SetCplSttExceptList( LoadCplSttExceptList() ); return pCplStt_ExcptLst; } -/* -----------------18.11.98 11:26------------------- - * - * --------------------------------------------------*/ + BOOL SvxAutoCorrectLanguageLists::AddToCplSttExceptList(const String& rNew) { String* pNew = new String( rNew ); @@ -2307,9 +2313,7 @@ BOOL SvxAutoCorrectLanguageLists::AddToCplSttExceptList(const String& rNew) delete pNew, pNew = 0; return 0 != pNew; } -/* -----------------18.11.98 15:20------------------- - * - * --------------------------------------------------*/ + BOOL SvxAutoCorrectLanguageLists::AddToWrdSttExceptList(const String& rNew) { String* pNew = new String( rNew ); @@ -2332,9 +2336,6 @@ BOOL SvxAutoCorrectLanguageLists::AddToWrdSttExceptList(const String& rNew) return 0 != pNew; } -/* -----------------18.11.98 11:26------------------- - * - * --------------------------------------------------*/ SvStringsISortDtor* SvxAutoCorrectLanguageLists::LoadCplSttExceptList() { SotStorageRef xStg = new SotStorage( sShareAutoCorrFile, STREAM_READ | STREAM_SHARE_DENYNONE, TRUE ); @@ -2345,9 +2346,6 @@ SvStringsISortDtor* SvxAutoCorrectLanguageLists::LoadCplSttExceptList() return pCplStt_ExcptLst; } -/* -----------------18.11.98 11:26------------------- - * - * --------------------------------------------------*/ void SvxAutoCorrectLanguageLists::SaveCplSttExceptList() { MakeUserStorage_Impl(); @@ -2363,9 +2361,6 @@ void SvxAutoCorrectLanguageLists::SaveCplSttExceptList() aLastCheckTime = Time(); } -/* -----------------18.11.98 11:26------------------- - * - * --------------------------------------------------*/ void SvxAutoCorrectLanguageLists::SetCplSttExceptList( SvStringsISortDtor* pList ) { if( pCplStt_ExcptLst && pList != pCplStt_ExcptLst ) @@ -2379,9 +2374,7 @@ void SvxAutoCorrectLanguageLists::SetCplSttExceptList( SvStringsISortDtor* pList } nFlags |= CplSttLstLoad; } -/* -----------------18.11.98 11:26------------------- - * - * --------------------------------------------------*/ + SvStringsISortDtor* SvxAutoCorrectLanguageLists::LoadWrdSttExceptList() { SotStorageRef xStg = new SotStorage( sShareAutoCorrFile, STREAM_READ | STREAM_SHARE_DENYNONE, TRUE ); @@ -2390,9 +2383,7 @@ SvStringsISortDtor* SvxAutoCorrectLanguageLists::LoadWrdSttExceptList() LoadXMLExceptList_Imp( pWrdStt_ExcptLst, pXMLImplWrdStt_ExcptLstStr, xStg ); return pWrdStt_ExcptLst; } -/* -----------------18.11.98 11:26------------------- - * - * --------------------------------------------------*/ + void SvxAutoCorrectLanguageLists::SaveWrdSttExceptList() { MakeUserStorage_Impl(); @@ -2406,9 +2397,7 @@ void SvxAutoCorrectLanguageLists::SaveWrdSttExceptList() &aModifiedDate, &aModifiedTime ); aLastCheckTime = Time(); } -/* -----------------18.11.98 11:26------------------- - * - * --------------------------------------------------*/ + void SvxAutoCorrectLanguageLists::SetWrdSttExceptList( SvStringsISortDtor* pList ) { if( pWrdStt_ExcptLst && pList != pWrdStt_ExcptLst ) @@ -2421,18 +2410,14 @@ void SvxAutoCorrectLanguageLists::SetWrdSttExceptList( SvStringsISortDtor* pList } nFlags |= WrdSttLstLoad; } -/* -----------------18.11.98 11:26------------------- - * - * --------------------------------------------------*/ + SvStringsISortDtor* SvxAutoCorrectLanguageLists::GetWrdSttExceptList() { if( !( WrdSttLstLoad & nFlags ) || IsFileChanged_Imp() ) SetWrdSttExceptList( LoadWrdSttExceptList() ); return pWrdStt_ExcptLst; } -/* -----------------18.11.98 11:26------------------- - * - * --------------------------------------------------*/ + void SvxAutoCorrectLanguageLists::RemoveStream_Imp( const String& rName ) { if( sShareAutoCorrFile != sUserAutoCorrFile ) @@ -2557,9 +2542,6 @@ void SvxAutoCorrectLanguageLists::MakeUserStorage_Impl() sShareAutoCorrFile = sUserAutoCorrFile; } -/* -----------------18.11.98 11:26------------------- - * - * --------------------------------------------------*/ BOOL SvxAutoCorrectLanguageLists::MakeBlocklist_Imp( SvStorage& rStg ) { String sStrmName( pXMLImplAutocorr_ListStr, RTL_TEXTENCODING_MS_1252 ); @@ -2669,9 +2651,6 @@ BOOL SvxAutoCorrectLanguageLists::MakeBlocklist_Imp( SvStorage& rStg ) return bRet; } -/* -----------------18.11.98 11:26------------------- - * - * --------------------------------------------------*/ BOOL SvxAutoCorrectLanguageLists::PutText( const String& rShort, const String& rLong ) { @@ -2723,10 +2702,8 @@ BOOL SvxAutoCorrectLanguageLists::PutText( const String& rShort, } return bRet; } -/* -----------------18.11.98 11:26------------------- - * - * --------------------------------------------------*/ - // - Text mit Attributierung (kann nur der SWG - SWG-Format!) + +// Text mit Attributierung (kann nur der SWG - SWG-Format!) BOOL SvxAutoCorrectLanguageLists::PutText( const String& rShort, SfxObjectShell& rShell ) { @@ -2766,10 +2743,7 @@ BOOL SvxAutoCorrectLanguageLists::PutText( const String& rShort, return bRet; } -/* -----------------18.11.98 11:26------------------- - * - * --------------------------------------------------*/ - // - loesche einen Eintrag +// loesche einen Eintrag BOOL SvxAutoCorrectLanguageLists::DeleteText( const String& rShort ) { // erstmal akt. Liste besorgen! @@ -2810,3 +2784,5 @@ BOOL SvxAutoCorrectLanguageLists::DeleteText( const String& rShort ) } return bRet; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/misc/swafopt.cxx b/editeng/source/misc/swafopt.cxx index 357ae7b095..6c1a60a245 100644 --- a/editeng/source/misc/swafopt.cxx +++ b/editeng/source/misc/swafopt.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -156,3 +157,4 @@ SvxSwAutoFmtFlags& SvxSwAutoFmtFlags::operator=( const SvxSwAutoFmtFlags& rAFFla return *this; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/misc/txtrange.cxx b/editeng/source/misc/txtrange.cxx index 244cefd2b1..c59f228131 100644 --- a/editeng/source/misc/txtrange.cxx +++ b/editeng/source/misc/txtrange.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -39,10 +40,6 @@ |* |* TextRanger::TextRanger() |* -|* Beschreibung -|* Ersterstellung 20.01.97 -|* Letzte Aenderung 20.01.97 AMA -|* *************************************************************************/ TextRanger::TextRanger( const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::B2DPolyPolygon* pLinePolyPolygon, @@ -97,10 +94,6 @@ TextRanger::TextRanger( const basegfx::B2DPolyPolygon& rPolyPolygon, const baseg |* |* TextRanger::~TextRanger() |* -|* Beschreibung -|* Ersterstellung 20.01.97 -|* Letzte Aenderung 20.01.97 AMA -|* *************************************************************************/ TextRanger::~TextRanger() @@ -113,12 +106,10 @@ TextRanger::~TextRanger() delete mpLinePolyPolygon; } -/*-----------------17.11.00 09:49------------------- - * TextRanger::SetVertical(..) - * If there's is a change in the writing direction, - * the cache has to be cleared. - * --------------------------------------------------*/ - +/* TextRanger::SetVertical(..) + If there's is a change in the writing direction, + the cache has to be cleared. +*/ void TextRanger::SetVertical( BOOL bNew ) { if( IsVertical() != bNew ) @@ -135,10 +126,6 @@ void TextRanger::SetVertical( BOOL bNew ) |* |* SvxBoundArgs |* -|* Beschreibung -|* Ersterstellung 20.01.97 -|* Letzte Aenderung 20.01.97 AMA -|* *************************************************************************/ class SvxBoundArgs @@ -709,3 +696,4 @@ const Rectangle& TextRanger::_GetBoundRect() } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/misc/unolingu.cxx b/editeng/source/misc/unolingu.cxx index 60ef854c56..a35dd217f5 100755 --- a/editeng/source/misc/unolingu.cxx +++ b/editeng/source/misc/unolingu.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -263,9 +264,9 @@ void SvxLinguConfigUpdate::UpdateAll( sal_Bool bForceCheck ) for (int k = 0; k < nNumServices; ++k) { - OUString aService( A2OU( apServices[k] ) ); - OUString aActiveList( A2OU( apCurLists[k] ) ); - OUString aLastFoundList( A2OU( apLastFoundLists[k] ) ); + OUString aService( ::rtl::OUString::createFromAscii( apServices[k] ) ); + OUString aActiveList( ::rtl::OUString::createFromAscii( apCurLists[k] ) ); + OUString aLastFoundList( ::rtl::OUString::createFromAscii( apLastFoundLists[k] ) ); INT32 i; // @@ -363,7 +364,7 @@ void SvxLinguConfigUpdate::UpdateAll( sal_Bool bForceCheck ) for (int i = 0; i < 2; ++i) { const sal_Char *pSubNodeName = (i == 0) ? apCurLists[k] : apLastFoundLists[k]; - OUString aSubNodeName( A2OU(pSubNodeName) ); + OUString aSubNodeName( ::rtl::OUString::createFromAscii(pSubNodeName) ); list_entry_map_t &rCurMap = (i == 0) ? aCurSvcs[k] : aLastFoundSvcs[k]; list_entry_map_t::const_iterator aIt( rCurMap.begin() ); @@ -1375,3 +1376,4 @@ Locale SvxCreateLocale( LanguageType eLang ) } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/outliner/outl_pch.cxx b/editeng/source/outliner/outl_pch.cxx index a321fb5f65..1eff044ef9 100644 --- a/editeng/source/outliner/outl_pch.cxx +++ b/editeng/source/outliner/outl_pch.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -29,3 +30,4 @@ #include "precompiled_editeng.hxx" #include <outl_pch.hxx> +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/outliner/outl_pch.hxx b/editeng/source/outliner/outl_pch.hxx deleted file mode 100644 index d0155ac091..0000000000 --- a/editeng/source/outliner/outl_pch.hxx +++ /dev/null @@ -1,33 +0,0 @@ -/************************************************************************* - * - * 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 - * - * 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. - * - ************************************************************************/ -#include <svl/intitem.hxx> -#include <editeng/editeng.hxx> -#include <editeng/editview.hxx> -#include <editeng/editdata.hxx> -#include <editeng/eerdll.hxx> -#include <editeng/lrspitem.hxx> -#include <editeng/fhgtitem.hxx> diff --git a/editeng/source/outliner/outleeng.cxx b/editeng/source/outliner/outleeng.cxx index f8d4b9a199..6db152dbfd 100644 --- a/editeng/source/outliner/outleeng.cxx +++ b/editeng/source/outliner/outleeng.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -157,7 +158,6 @@ XubString OutlinerEditEng::GetUndoComment( USHORT nUndoId ) const } } -// #101498# void OutlinerEditEng::DrawingText( const Point& rStartPos, const XubString& rText, USHORT nTextStart, USHORT nTextLen, const sal_Int32* pDXArray, const SvxFont& rFont, USHORT nPara, USHORT nIndex, BYTE nRightToLeft, const EEngineData::WrongSpellVector* pWrongSpellVector, @@ -169,41 +169,19 @@ void OutlinerEditEng::DrawingText( const Point& rStartPos, const XubString& rTex const Color& rOverlineColor, const Color& rTextLineColor) { - // why do bullet here at all? Just use GetEditEnginePtr()->PaintingFirstLine - // inside of ImpEditEngine::Paint which calls pOwner->PaintBullet with the correct - // values for hor and ver. No change for not-layouting (painting). - // changed, bullet rendering now using PaintBullet via -/* if ( nIndex == 0 ) - { - // Dann das Bullet 'malen', dort wird bStrippingPortions ausgewertet - // und Outliner::DrawingText gerufen - - // DrawingText liefert die BaseLine, DrawBullet braucht Top(). - - if(true) - { - // ## - // another error: This call happens when only stripping, but the position - // is already aligned to text output. For bullet rendering, it needs to be reset - // to the correct value in x and y. PaintBullet takes care of X-start offset itself - const Point aDocPosTopLeft(GetDocPosTopLeft( nPara )); - const Point aCorrectedPos(rStartPos.X() - aDocPosTopLeft.X(), aDocPosTopLeft.Y() + GetFirstLineOffset( nPara )); - pOwner->PaintBullet( nPara, aCorrectedPos, Point(), 0, GetRefDevice() ); - } - else - { - Point aCorrectedPos( rStartPos ); - aCorrectedPos.Y() = GetDocPosTopLeft( nPara ).Y(); - aCorrectedPos.Y() += GetFirstLineOffset( nPara ); - pOwner->PaintBullet( nPara, aCorrectedPos, Point(), 0, GetRefDevice() ); - } - } */ - - // #101498# pOwner->DrawingText(rStartPos,rText,nTextStart,nTextLen,pDXArray,rFont,nPara,nIndex,nRightToLeft, pWrongSpellVector, pFieldData, bEndOfLine, bEndOfParagraph, bEndOfBullet, pLocale, rOverlineColor, rTextLineColor); } +void OutlinerEditEng::DrawingTab( const Point& rStartPos, long nWidth, const String& rChar, + const SvxFont& rFont, USHORT nPara, xub_StrLen nIndex, BYTE nRightToLeft, + bool bEndOfLine, bool bEndOfParagraph, + const Color& rOverlineColor, const Color& rTextLineColor) +{ + pOwner->DrawingTab(rStartPos, nWidth, rChar, rFont, nPara, nIndex, nRightToLeft, + bEndOfLine, bEndOfParagraph, rOverlineColor, rTextLineColor ); +} + void OutlinerEditEng::FieldClicked( const SvxFieldItem& rField, USHORT nPara, USHORT nPos ) { EditEngine::FieldClicked( rField, nPara, nPos ); // Falls URL @@ -231,14 +209,14 @@ void OutlinerEditEng::SetParaAttribs( USHORT nPara, const SfxItemSet& rSet ) EditEngine::SetParaAttribs( (USHORT)nPara, rSet ); pOwner->ImplCheckNumBulletItem( (USHORT)nPara ); - // --> OD 2009-03-10 #i100014# + // #i100014# // It is not a good idea to substract 1 from a count and cast the result // to USHORT without check, if the count is 0. pOwner->ImplCheckParagraphs( (USHORT)nPara, (USHORT) (pOwner->pParaList->GetParagraphCount()) ); - // <-- if ( !IsInUndo() && IsUndoEnabled() ) pOwner->UndoActionEnd( OLUNDO_ATTR ); } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/outliner/outleeng.hxx b/editeng/source/outliner/outleeng.hxx index 96cafc8aea..cca55f8200 100644 --- a/editeng/source/outliner/outleeng.hxx +++ b/editeng/source/outliner/outleeng.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -68,6 +69,14 @@ public: const Color& rOverlineColor, const Color& rTextLineColor); + virtual void DrawingTab( + const Point& rStartPos, long nWidth, const String& rChar, + const SvxFont& rFont, USHORT nPara, xub_StrLen nIndex, BYTE nRightToLeft, + bool bEndOfLine, + bool bEndOfParagraph, + const Color& rOverlineColor, + const Color& rTextLineColor); + virtual void StyleSheetChanged( SfxStyleSheet* pStyle ); virtual void ParaAttribsChanged( USHORT nPara ); virtual BOOL SpellNextDocument(); @@ -91,3 +100,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/outliner/outlin2.cxx b/editeng/source/outliner/outlin2.cxx index c3d968d6d1..e9776e26e0 100644 --- a/editeng/source/outliner/outlin2.cxx +++ b/editeng/source/outliner/outlin2.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -533,13 +534,13 @@ Reference< XSpellChecker1 > Outliner::GetSpeller() return pEditEngine->GetSpeller(); } -void Outliner::SetForbiddenCharsTable( vos::ORef<SvxForbiddenCharactersTable> xForbiddenChars ) +void Outliner::SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars ) { DBG_CHKTHIS(Outliner,0); pEditEngine->SetForbiddenCharsTable( xForbiddenChars ); } -vos::ORef<SvxForbiddenCharactersTable> Outliner::GetForbiddenCharsTable() const +rtl::Reference<SvxForbiddenCharactersTable> Outliner::GetForbiddenCharsTable() const { DBG_CHKTHIS(Outliner,0); return pEditEngine->GetForbiddenCharsTable(); @@ -776,38 +777,31 @@ BOOL Outliner::IsForceAutoColor() const DBG_CHKTHIS(Outliner,0); return pEditEngine->IsForceAutoColor(); } -/*-- 13.10.2003 16:56:23--------------------------------------------------- - -----------------------------------------------------------------------*/ void Outliner::StartSpelling(EditView& rEditView, sal_Bool bMultipleDoc) { pEditEngine->StartSpelling(rEditView, bMultipleDoc); } -/*-- 13.10.2003 16:56:23--------------------------------------------------- - -----------------------------------------------------------------------*/ void Outliner::EndSpelling() { pEditEngine->EndSpelling(); } -/*-- 13.10.2003 16:56:23--------------------------------------------------- - -----------------------------------------------------------------------*/ bool Outliner::SpellSentence(EditView& rEditView, ::svx::SpellPortions& rToFill, bool bIsGrammarChecking ) { return pEditEngine->SpellSentence(rEditView, rToFill, bIsGrammarChecking ); } -/*-- 08.09.2008 11:39:05--------------------------------------------------- - -----------------------------------------------------------------------*/ void Outliner::PutSpellingToSentenceStart( EditView& rEditView ) { pEditEngine->PutSpellingToSentenceStart( rEditView ); } -/*-- 13.10.2003 16:56:25--------------------------------------------------- -----------------------------------------------------------------------*/ void Outliner::ApplyChangedSentence(EditView& rEditView, const ::svx::SpellPortions& rNewPortions, bool bRecheck ) { pEditEngine->ApplyChangedSentence( rEditView, rNewPortions, bRecheck ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx index e0a89aae91..2a9d963218 100644 --- a/editeng/source/outliner/outliner.cxx +++ b/editeng/source/outliner/outliner.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -65,6 +66,8 @@ // #101498# calculate if it's RTL or not #include <unicode/ubidi.h> +using ::std::advance; + #define DEFAULT_SCALE 75 static const USHORT nDefStyles = 3; // Sonderbehandlung fuer die ersten 3 Ebenen @@ -335,11 +338,10 @@ void Outliner::SetNumberingStartValue( sal_uInt16 nPara, sal_Int16 nNumberingSta pPara->IsParaIsNumberingRestart(), pPara->IsParaIsNumberingRestart() ) ); pPara->SetNumberingStartValue( nNumberingStartValue ); - // --> OD 2009-03-10 #i100014# + // #i100014# // It is not a good idea to substract 1 from a count and cast the result // to USHORT without check, if the count is 0. ImplCheckParagraphs( nPara, (USHORT) (pParaList->GetParagraphCount()) ); - // <-- pEditEngine->SetModified(); } } @@ -363,11 +365,10 @@ void Outliner::SetParaIsNumberingRestart( sal_uInt16 nPara, sal_Bool bParaIsNumb pPara->IsParaIsNumberingRestart(), bParaIsNumberingRestart ) ); pPara->SetParaIsNumberingRestart( bParaIsNumberingRestart ); - // --> OD 2009-03-10 #i100014# + // #i100014# // It is not a good idea to substract 1 from a count and cast the result // to USHORT without check, if the count is 0. ImplCheckParagraphs( nPara, (USHORT) (pParaList->GetParagraphCount()) ); - // <-- pEditEngine->SetModified(); } } @@ -607,11 +608,10 @@ void Outliner::SetText( const OutlinerParaObject& rPObj ) ImplCheckNumBulletItem( nCurPara ); } - // --> OD 2009-03-10 #i100014# + // #i100014# // It is not a good idea to substract 1 from a count and cast the result // to USHORT without check, if the count is 0. ImplCheckParagraphs( 0, (USHORT) (pParaList->GetParagraphCount()) ); - // <-- EnableUndo( bUndo ); ImplBlockInsertionCallbacks( FALSE ); @@ -654,17 +654,16 @@ void Outliner::AddText( const OutlinerParaObject& rPObj ) } DBG_ASSERT( pEditEngine->GetParagraphCount()==pParaList->GetParagraphCount(), "SetText: OutOfSync" ); - // --> OD 2009-03-10 #i100014# + // #i100014# // It is not a good idea to substract 1 from a count and cast the result // to USHORT without check, if the count is 0. ImplCheckParagraphs( (USHORT)nPara, (USHORT) (pParaList->GetParagraphCount()) ); - // <-- ImplBlockInsertionCallbacks( FALSE ); pEditEngine->SetUpdateMode( bUpdate ); } -void __EXPORT Outliner::FieldClicked( const SvxFieldItem& rField, USHORT nPara, USHORT nPos ) +void Outliner::FieldClicked( const SvxFieldItem& rField, USHORT nPara, USHORT nPos ) { DBG_CHKTHIS(Outliner,0); @@ -677,7 +676,7 @@ void __EXPORT Outliner::FieldClicked( const SvxFieldItem& rField, USHORT nPara, } -void __EXPORT Outliner::FieldSelected( const SvxFieldItem& rField, USHORT nPara, USHORT nPos ) +void Outliner::FieldSelected( const SvxFieldItem& rField, USHORT nPara, USHORT nPos ) { DBG_CHKTHIS(Outliner,0); if ( !aFieldClickedHdl.IsSet() ) @@ -689,7 +688,7 @@ void __EXPORT Outliner::FieldSelected( const SvxFieldItem& rField, USHORT nPara, } -XubString __EXPORT Outliner::CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor ) +XubString Outliner::CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor ) { DBG_CHKTHIS(Outliner,0); if ( !aCalcFieldValueHdl.IsSet() ) @@ -925,7 +924,10 @@ Font Outliner::ImpCalcBulletFont( USHORT nPara ) const } // #107508# Use original scale... - USHORT nScale = /* pEditEngine->IsFlatMode() ? DEFAULT_SCALE : */ pFmt->GetBulletRelSize(); + USHORT nStretchX, nStretchY; + const_cast<Outliner*>(this)->GetGlobalCharStretching(nStretchX, nStretchY); + + USHORT nScale = pFmt->GetBulletRelSize() * nStretchY / 100; ULONG nScaledLineHeight = aStdFont.GetSize().Height(); nScaledLineHeight *= nScale*10; nScaledLineHeight /= 1000; @@ -968,6 +970,12 @@ void Outliner::PaintBullet( USHORT nPara, const Point& rStartPos, BOOL bRightToLeftPara = pEditEngine->IsRightToLeft( nPara ); Rectangle aBulletArea( ImpCalcBulletArea( nPara, TRUE, FALSE ) ); + USHORT nStretchX, nStretchY; + GetGlobalCharStretching(nStretchX, nStretchY); + aBulletArea = Rectangle( Point(aBulletArea.Left()*nStretchX/100, + aBulletArea.Top()), + Size(aBulletArea.GetWidth()*nStretchX/100, + aBulletArea.GetHeight()) ); Paragraph* pPara = pParaList->GetParagraph( nPara ); const SvxNumberFormat* pFmt = GetNumberFormat( nPara ); @@ -1135,9 +1143,9 @@ void Outliner::InvalidateBullet( Paragraph* /*pPara*/, ULONG nPara ) DBG_CHKTHIS(Outliner,0); long nLineHeight = (long)pEditEngine->GetLineHeight((USHORT)nPara ); - OutlinerView* pView = aViewList.First(); - while( pView ) + for ( size_t i = 0, n = aViewList.size(); i < n; ++i ) { + OutlinerView* pView = aViewList[ i ]; Point aPos( pView->pEditView->GetWindowPosTopLeft((USHORT)nPara ) ); Rectangle aRect( pView->GetOutputArea() ); aRect.Right() = aPos.X(); @@ -1146,7 +1154,6 @@ void Outliner::InvalidateBullet( Paragraph* /*pPara*/, ULONG nPara ) aRect.Bottom() += nLineHeight; pView->GetWindow()->Invalidate( aRect ); - pView = aViewList.Next(); } } @@ -1243,8 +1250,6 @@ void Outliner::ImpTextPasted( ULONG nStartPara, USHORT nCount ) const ULONG nStart = nStartPara; Paragraph* pPara = pParaList->GetParagraph( nStartPara ); -// Paragraph* pLastConverted = NULL; -// bool bFirst = true; while( nCount && pPara ) { @@ -1359,30 +1364,44 @@ Outliner::~Outliner() delete pEditEngine; } -ULONG Outliner::InsertView( OutlinerView* pView, ULONG nIndex ) +size_t Outliner::InsertView( OutlinerView* pView, size_t nIndex ) { DBG_CHKTHIS(Outliner,0); - - aViewList.Insert( pView, nIndex ); + size_t ActualIndex; +//joe + if ( nIndex >= aViewList.size() ) + { + aViewList.push_back( pView ); + ActualIndex = aViewList.size() - 1; + } + else + { + ViewList::iterator it = aViewList.begin(); + advance( it, nIndex ); + ActualIndex = nIndex; + } pEditEngine->InsertView( pView->pEditView, (USHORT)nIndex ); - return aViewList.GetPos( pView ); + return ActualIndex; } OutlinerView* Outliner::RemoveView( OutlinerView* pView ) { DBG_CHKTHIS(Outliner,0); - ULONG nPos = aViewList.GetPos( pView ); - if ( nPos != LIST_ENTRY_NOTFOUND ) + for ( ViewList::iterator it = aViewList.begin(); it < aViewList.end(); ++it ) { - pView->pEditView->HideCursor(); // HACK wg. BugId 10006 - pEditEngine->RemoveView( pView->pEditView ); - aViewList.Remove( nPos ); + if ( *it == pView ) + { + pView->pEditView->HideCursor(); // HACK wg. BugId 10006 + pEditEngine->RemoveView( pView->pEditView ); + aViewList.erase( it ); + break; + } } return NULL; // MT: return ueberfluessig } -OutlinerView* Outliner::RemoveView( ULONG nIndex ) +OutlinerView* Outliner::RemoveView( size_t nIndex ) { DBG_CHKTHIS(Outliner,0); @@ -1390,21 +1409,27 @@ OutlinerView* Outliner::RemoveView( ULONG nIndex ) pEditView->HideCursor(); // HACK wg. BugId 10006 pEditEngine->RemoveView( (USHORT)nIndex ); - aViewList.Remove( nIndex ); + + { + ViewList::iterator it = aViewList.begin(); + advance( it, nIndex ); + aViewList.erase( it ); + } + return NULL; // MT: return ueberfluessig } -OutlinerView* Outliner::GetView( ULONG nIndex ) const +OutlinerView* Outliner::GetView( size_t nIndex ) const { DBG_CHKTHIS(Outliner,0); - return aViewList.GetObject( nIndex ); + return ( nIndex >= aViewList.size() ) ? NULL : aViewList[ nIndex ]; } -ULONG Outliner::GetViewCount() const +size_t Outliner::GetViewCount() const { DBG_CHKTHIS(Outliner,0); - return aViewList.Count(); + return aViewList.size(); } void Outliner::ParagraphInsertedHdl() @@ -1520,10 +1545,9 @@ void Outliner::ImplCheckParagraphs( USHORT nStart, USHORT nEnd ) { DBG_CHKTHIS( Outliner, 0 ); - // --> OD 2009-03-10 #i100014# + // i100014# // assure that the following for-loop does not loop forever for ( USHORT n = nStart; n < nEnd; n++ ) - // <-- { Paragraph* pPara = pParaList->GetParagraph( n ); if (pPara) @@ -1790,7 +1814,20 @@ void Outliner::DrawingText( const Point& rStartPos, const XubString& rText, USHO { // #101498# DrawPortionInfo aInfo( rStartPos, rText, nTextStart, nTextLen, rFont, nPara, nIndex, pDXArray, pWrongSpellVector, - pFieldData, pLocale, rOverlineColor, rTextLineColor, nRightToLeft, bEndOfLine, bEndOfParagraph, bEndOfBullet); + pFieldData, pLocale, rOverlineColor, rTextLineColor, nRightToLeft, false, 0, bEndOfLine, bEndOfParagraph, bEndOfBullet); + + aDrawPortionHdl.Call( &aInfo ); + } +} + +void Outliner::DrawingTab( const Point& rStartPos, long nWidth, const String& rChar, const SvxFont& rFont, + USHORT nPara, xub_StrLen nIndex, BYTE nRightToLeft, bool bEndOfLine, bool bEndOfParagraph, + const Color& rOverlineColor, const Color& rTextLineColor) +{ + if(aDrawPortionHdl.IsSet()) + { + DrawPortionInfo aInfo( rStartPos, rChar, 0, rChar.Len(), rFont, nPara, nIndex, NULL, NULL, + NULL, NULL, rOverlineColor, rTextLineColor, nRightToLeft, true, nWidth, bEndOfLine, bEndOfParagraph, false); aDrawPortionHdl.Call( &aInfo ); } @@ -1874,13 +1911,13 @@ static bool isSameNumbering( const SvxNumberFormat& rN1, const SvxNumberFormat& { if( rN1.GetNumberingType() != rN2.GetNumberingType() ) return false; - + if( rN1.GetNumStr(1) != rN2.GetNumStr(1) ) return false; - + if( (rN1.GetPrefix() != rN2.GetPrefix()) || (rN1.GetSuffix() != rN2.GetSuffix()) ) return false; - + return true; } @@ -1905,10 +1942,10 @@ sal_uInt16 Outliner::ImplGetNumbering( USHORT nPara, const SvxNumberFormat* pPar break; const SvxNumberFormat* pFmt = GetNumberFormat( nPara ); - + if( pFmt == 0 ) continue; // ignore paragraphs without bullets - + // check if numbering is the same if( !isSameNumbering( *pFmt, *pParaFmt ) ) break; @@ -2161,8 +2198,6 @@ sal_Bool DrawPortionInfo::IsRTL() const ubidi_setPara(pBidi, reinterpret_cast<const UChar *>(mrText.GetBuffer()), mrText.Len(), nDefaultDir, NULL, &nError); // UChar != sal_Unicode in MinGW nError = U_ZERO_ERROR; -// sal_Int32 nCount(ubidi_countRuns(pBidi, &nError)); - int32_t nStart(0); int32_t nEnd; UBiDiLevel nCurrDir; @@ -2179,3 +2214,5 @@ sal_Bool DrawPortionInfo::IsRTL() const } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/outliner/outliner.src b/editeng/source/outliner/outliner.src deleted file mode 100644 index e7e557e040..0000000000 --- a/editeng/source/outliner/outliner.src +++ /dev/null @@ -1,84 +0,0 @@ -/************************************************************************* - * - * 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 - * - * 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. - * - ************************************************************************/ - -#include <editeng/editrids.hrc> - -String RID_OUTLUNDO_HEIGHT -{ - Text [ en-US ] = "Move" ; -}; -String RID_OUTLUNDO_DEPTH -{ - Text [ en-US ] = "Indent" ; -}; -String RID_OUTLUNDO_EXPAND -{ - Text [ en-US ] = "Show subpoints" ; -}; -String RID_OUTLUNDO_COLLAPSE -{ - Text [ en-US ] = "Collapse" ; -}; -String RID_OUTLUNDO_ATTR -{ - Text [ en-US ] = "Apply attributes" ; -}; -String RID_OUTLUNDO_INSERT -{ - Text [ en-US ] = "Insert" ; -}; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/editeng/source/outliner/outlobj.cxx b/editeng/source/outliner/outlobj.cxx index df2c8b5977..2412dd2af9 100644 --- a/editeng/source/outliner/outlobj.cxx +++ b/editeng/source/outliner/outlobj.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -269,3 +270,5 @@ void OutlinerParaObject::SetStyleSheets(sal_uInt16 nLevel, const XubString rNewN ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/outliner/outlundo.cxx b/editeng/source/outliner/outlundo.cxx index 65bd725f84..051460d36d 100644 --- a/editeng/source/outliner/outlundo.cxx +++ b/editeng/source/outliner/outlundo.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -232,3 +233,5 @@ void OLUndoExpand::Repeat() DBG_CHKTHIS(OLUndoExpand,0); DBG_ERROR("Not implemented"); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/outliner/outlundo.hxx b/editeng/source/outliner/outlundo.hxx index de9d24b3f6..9e12bb3df7 100644 --- a/editeng/source/outliner/outlundo.hxx +++ b/editeng/source/outliner/outlundo.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -138,3 +139,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx index 4034b03d01..bdb6b1c264 100755 --- a/editeng/source/outliner/outlvw.cxx +++ b/editeng/source/outliner/outlvw.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -103,7 +104,7 @@ void OutlinerView::Paint( const Rectangle& rRect ) pEditView->Paint( rRect ); } -BOOL OutlinerView::PostKeyEvent( const KeyEvent& rKEvt ) +BOOL OutlinerView::PostKeyEvent( const KeyEvent& rKEvt, Window* pFrameWin ) { DBG_CHKTHIS( OutlinerView, 0 ); @@ -268,7 +269,7 @@ BOOL OutlinerView::PostKeyEvent( const KeyEvent& rKEvt ) } } - return bKeyProcessed ? TRUE : pEditView->PostKeyEvent( rKEvt ); + return bKeyProcessed ? TRUE : pEditView->PostKeyEvent( rKEvt, pFrameWin ); } @@ -316,7 +317,7 @@ ULONG OutlinerView::ImpCheckMousePos(const Point& rPosPix, MouseTarget& reTarget return nPara; } -BOOL __EXPORT OutlinerView::MouseMove( const MouseEvent& rMEvt ) +BOOL OutlinerView::MouseMove( const MouseEvent& rMEvt ) { DBG_CHKTHIS(OutlinerView,0); @@ -333,7 +334,7 @@ BOOL __EXPORT OutlinerView::MouseMove( const MouseEvent& rMEvt ) } -BOOL __EXPORT OutlinerView::MouseButtonDown( const MouseEvent& rMEvt ) +BOOL OutlinerView::MouseButtonDown( const MouseEvent& rMEvt ) { DBG_CHKTHIS(OutlinerView,0); if ( ( pOwner->ImplGetOutlinerMode() == OUTLINERMODE_TEXTOBJECT ) || pEditView->GetEditEngine()->IsInSelectionMode() ) @@ -384,7 +385,7 @@ BOOL __EXPORT OutlinerView::MouseButtonDown( const MouseEvent& rMEvt ) } -BOOL __EXPORT OutlinerView::MouseButtonUp( const MouseEvent& rMEvt ) +BOOL OutlinerView::MouseButtonUp( const MouseEvent& rMEvt ) { DBG_CHKTHIS(OutlinerView,0); if ( ( pOwner->ImplGetOutlinerMode() == OUTLINERMODE_TEXTOBJECT ) || pEditView->GetEditEngine()->IsInSelectionMode() ) @@ -433,7 +434,6 @@ void OutlinerView::ImpPaintDDCursor() Point aStartPointWin, aEndPointWin; Rectangle aOutputArWin = pEditView->GetOutputArea(); - Rectangle aVisAreaRef = pEditView->GetVisArea(); if( bDDChangingDepth ) { @@ -553,7 +553,9 @@ void OutlinerView::SetAttribs( const SfxItemSet& rAttrs ) for( USHORT nPara= aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ ) { pOwner->ImplCheckNumBulletItem( nPara ); - pOwner->ImplCalcBulletText( nPara, FALSE, FALSE ); + // update following paras as well, numbering depends on + // previous paras + pOwner->ImplCalcBulletText( nPara, TRUE, FALSE ); if( !pOwner->IsInUndo() && pOwner->IsUndoEnabled() ) pOwner->InsertUndo( new OutlinerUndoCheckPara( pOwner, nPara ) ); @@ -1223,11 +1225,10 @@ void OutlinerView::ToggleBullets() } } - // --> OD 2009-03-10 #i100014# + // #i100014# // It is not a good idea to substract 1 from a count and cast the result // to USHORT without check, if the count is 0. USHORT nParaCount = (USHORT) (pOwner->pParaList->GetParagraphCount()); - // <-- pOwner->ImplCheckParagraphs( aSel.nStartPara, nParaCount ); pOwner->pEditEngine->QuickMarkInvalid( ESelection( aSel.nStartPara, 0, nParaCount, 0 ) ); @@ -1257,11 +1258,10 @@ void OutlinerView::EnableBullets() } } - // --> OD 2009-03-10 #i100014# + // #i100014# // It is not a good idea to substract 1 from a count and cast the result // to USHORT without check, if the count is 0. USHORT nParaCount = (USHORT) (pOwner->pParaList->GetParagraphCount()); - // <-- pOwner->ImplCheckParagraphs( aSel.nStartPara, nParaCount ); pOwner->pEditEngine->QuickMarkInvalid( ESelection( aSel.nStartPara, 0, nParaCount, 0 ) ); diff --git a/editeng/source/outliner/paralist.cxx b/editeng/source/outliner/paralist.cxx index bb586f0a8f..938db521c2 100644 --- a/editeng/source/outliner/paralist.cxx +++ b/editeng/source/outliner/paralist.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -285,3 +286,5 @@ ULONG ParagraphList::GetVisPos( Paragraph* pPara ) } return nVisPos; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/outliner/paralist.hxx b/editeng/source/outliner/paralist.hxx index 66715bcb8e..355979e86a 100644 --- a/editeng/source/outliner/paralist.hxx +++ b/editeng/source/outliner/paralist.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -69,3 +70,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/rtf/makefile.mk b/editeng/source/rtf/makefile.mk deleted file mode 100644 index 228683cdba..0000000000 --- a/editeng/source/rtf/makefile.mk +++ /dev/null @@ -1,50 +0,0 @@ -#************************************************************************* -# -# 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 -# -# 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=rtf -ENABLE_EXCEPTIONS=TRUE -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk -# --- Files -------------------------------------------------------- - -EXCEPTIONSFILES= \ - $(SLO)$/rtfitem.obj \ - $(SLO)$/svxrtf.obj - -SLOFILES= \ - $(EXCEPTIONSFILES) \ - $(SLO)$/rtfgrf.obj - -# ========================================================================== - -.INCLUDE : target.mk - diff --git a/editeng/source/rtf/rtfgrf.cxx b/editeng/source/rtf/rtfgrf.cxx index f8053f03c7..d7a30707c8 100644 --- a/editeng/source/rtf/rtfgrf.cxx +++ b/editeng/source/rtf/rtfgrf.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,7 +29,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_editeng.hxx" -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */ #include <osl/endian.h> #include <tools/cachestr.hxx> #include <vcl/graph.hxx> @@ -73,12 +73,12 @@ void GrfWindow::Paint( const Rectangle& ) } #endif -static BYTE __FAR_DATA aPal1[ 2 * 4 ] = { +static BYTE aPal1[ 2 * 4 ] = { 0x00, 0x00, 0x00, 0x00, // Schwarz 0xFF, 0xFF, 0xFF, 0x00 // Weiss }; -static BYTE __FAR_DATA aPal4[ 16 * 4 ] = { +static BYTE aPal4[ 16 * 4 ] = { 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, @@ -97,7 +97,7 @@ static BYTE __FAR_DATA aPal4[ 16 * 4 ] = { 0xFF, 0xFF, 0xFF, 0x00 }; -static BYTE __FAR_DATA aPal8[ 256 * 4 ] = +static BYTE aPal8[ 256 * 4 ] = { 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x92, 0x00, 0x00, 0x80, 0x92, 0x00, 0x00, 0x00, 0x00, 0xAA, 0x00, 0x80, 0x00, 0xAA, 0x00, @@ -423,8 +423,6 @@ BOOL SvxRTFParser::ReadBmpData( Graphic& rGrf, SvxRTFPictureType& rPicType ) rPicType.uPicLen = nTokenValue; if (rPicType.uPicLen) { - ULONG nPos = rStrm.Tell(); - nPos = nPos; rStrm.SeekRel(-1); sal_uInt8 aData[4096]; ULONG nSize = sizeof(aData); @@ -440,8 +438,6 @@ BOOL SvxRTFParser::ReadBmpData( Graphic& rGrf, SvxRTFPictureType& rPicType ) } nNextCh = GetNextChar(); bValidBmp = !pTmpFile->GetError(); - nPos = rStrm.Tell(); - nPos = nPos; } break; case RTF_PICSCALEX: rPicType.nScalX = nVal; break; @@ -585,4 +581,4 @@ BOOL SvxRTFParser::ReadBmpData( Graphic& rGrf, SvxRTFPictureType& rPicType ) return bValidBmp; } -/* vi:set tabstop=4 shiftwidth=4 expandtab: */ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/rtf/rtfitem.cxx b/editeng/source/rtf/rtfitem.cxx index 4f0ecccef7..30fa89178b 100644 --- a/editeng/source/rtf/rtfitem.cxx +++ b/editeng/source/rtf/rtfitem.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -311,34 +312,6 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet ) pAkt->nStyleNo = USHORT( nStyleNo ); -#if 0 -// JP 05.09.95: zuruecksetzen der Style-Attribute fuehrt nur zu Problemen. -// Es muss reichen, wenn das ueber pard/plain erfolgt -// ansonsten Bugdoc 15304.rtf - nach nur "\pard" falscher Font !! - - SvxRTFStyleType* pStyle = aStyleTbl.Get( pAkt->nStyleNo ); - if( pStyle && pStyle->aAttrSet.Count() ) - { - //JP 07.07.95: - // alle Attribute, die in der Vorlage gesetzt werden - // auf defaults setzen. In RTF werden die Attribute - // der Vorlage danach ja wiederholt. - // WICHTIG: Attribute die in der Vorlage definiert - // sind, werden zurueckgesetzt !!!! - // pAkt->aAttrSet.Put( pStyle->aAttrSet ); - - SfxItemIter aIter( pStyle->aAttrSet ); - SfxItemPool* pPool = pStyle->aAttrSet.GetPool(); - USHORT nWh = aIter.GetCurItem()->Which(); - while( TRUE ) - { - pAkt->aAttrSet.Put( pPool->GetDefaultItem( nWh )); - if( aIter.IsAtEnd() ) - break; - nWh = aIter.NextItem()->Which(); - } - } -#endif } break; @@ -990,17 +963,9 @@ ATTR_SETOVERLINE: PLAINID->nColor )); } break; -#if 0 //#i12501# While cb is clearly documented in the rtf spec, word //doesn't accept it at all - case RTF_CB: - if( PLAINID->nBgColor ) - { - pSet->Put( SvxBrushItem( GetColor( USHORT(nTokenValue) ), - PLAINID->nBgColor )); - } - break; -#endif + case RTF_LANG: if( PLAINID->nLanguage ) { @@ -1627,10 +1592,15 @@ case RTF_BRDRBAR: break; } goto SETBORDERLINE; - case RTF_BRDRS: case RTF_BRDRDOT: - case RTF_BRDRHAIR: + aBrd.SetStyle( DOTTED ); + break; case RTF_BRDRDASH: + aBrd.SetStyle( DASHED ); + break; + case RTF_BRDRS: + case RTF_BRDRHAIR: + aBrd.SetStyle( SOLID ); SETBORDERLINE: SetBorderLine( nBorderTyp, aAttr, aBrd ); break; @@ -2051,9 +2021,7 @@ void SvxRTFParser::SetDefault( int nToken, int nValue ) // Verhaeltnis der def. TabWidth / Tabs errechnen und // enstsprechend die neue Anzahl errechnen. -/*-----------------14.12.94 19:32------------------- - ?? wie kommt man auf die 13 ?? ---------------------------------------------------*/ + // ?? wie kommt man auf die 13 ?? USHORT nAnzTabs = (SVX_TAB_DEFDIST * 13 ) / USHORT(nValue); /* cmc, make sure we have at least one, or all hell breaks loose in @@ -2098,4 +2066,4 @@ void SvxRTFParser::UnknownAttrToken( int, SfxItemSet* ) { } -/* vi:set tabstop=4 shiftwidth=4 expandtab: */ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/rtf/svxrtf.cxx b/editeng/source/rtf/svxrtf.cxx index 83222c7033..c8ecde5358 100644 --- a/editeng/source/rtf/svxrtf.cxx +++ b/editeng/source/rtf/svxrtf.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -66,10 +67,10 @@ CharSet lcl_GetDefaultTextEncodingForRTF() aLocale = Application::GetSettings().GetLocale(); aLangString = aLocale.Language; - if ( aLangString.equals( ::rtl::OUString::createFromAscii( "ru" ) ) - || aLangString.equals( ::rtl::OUString::createFromAscii( "uk" ) ) ) + if ( aLangString.equals( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ru" )) ) + || aLangString.equals( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "uk" )) ) ) return RTL_TEXTENCODING_MS_1251; - if ( aLangString.equals( ::rtl::OUString::createFromAscii( "tr" ) ) ) + if ( aLangString.equals( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "tr" )) ) ) return RTL_TEXTENCODING_MS_1254; else return RTL_TEXTENCODING_MS_1252; @@ -180,13 +181,8 @@ void SvxRTFParser::Continue( int nToken ) if( SVPAR_PENDING != GetStatus() ) { SetAllAttrOfStk(); -#if 0 //Regardless of what "color 0" is, word defaults to auto as the default colour. //e.g. see #i7713# - if( bNewDoc && ((RTFPlainAttrMapIds*)aPlainMap.GetData())->nColor ) - pAttrPool->SetPoolDefaultItem( SvxColorItem( GetColor( 0 ), - ((RTFPlainAttrMapIds*)aPlainMap.GetData())->nColor )); -#endif } } @@ -293,10 +289,7 @@ INSINGLECHAR: case RTF_TC: case RTF_NEXTFILE: case RTF_TEMPLATE: -#if 0 - //disabled for #i19718# - case RTF_SHPRSLT: // RTF_SHP fehlt noch !! -#endif + // RTF_SHPRSLT disabled for #i19718# SkipGroup(); break; // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -440,9 +433,6 @@ void SvxRTFParser::ReadStyleTable() if( '{' == GetStackPtr( -1 )->nTokenId ) { nToken = SkipToken( -1 ); -#if 0 - --_nOpenBrakets; // korrigieren!! -#endif } } ReadAttr( nToken, &pStyle->aAttrSet ); @@ -991,12 +981,6 @@ void SvxRTFParser::AttrGroupEnd() // den akt. Bearbeiten, vom Stack loeschen if( ( pOld->pSttNd->GetIdx() < pInsPos->GetNodeIdx() || ( pOld->pSttNd->GetIdx() == pInsPos->GetNodeIdx() && pOld->nSttCnt <= pInsPos->GetCntIdx() )) -#if 0 -//BUG 68555 - dont test for empty paragraph or any range - && ( nOldSttNdIdx != pInsPos->GetNodeIdx() || - pOld->nSttCnt != pInsPos->GetCntIdx() || - !pOld->nSttCnt ) -#endif ) { if( !bCrsrBack ) @@ -1005,25 +989,6 @@ void SvxRTFParser::AttrGroupEnd() // den akt. Bearbeiten, vom Stack loeschen // Absatz !! if( nOldSttNdIdx == pInsPos->GetNodeIdx() ) { -#if 0 -//BUG 68555 - dont reset pard attrs, if the group not begins not at start of -// paragraph - // Bereich innerhalb eines Absatzes: - // alle Absatz-Attribute und StyleNo loeschen - // aber nur wenn mitten drin angefangen wurde - if( pOld->nSttCnt ) - { - pOld->nStyleNo = 0; - for( USHORT n = 0; n < aPardMap.Count() && - pOld->aAttrSet.Count(); ++n ) - if( aPardMap[n] ) - pOld->aAttrSet.ClearItem( aPardMap[n] ); - - if( !pOld->aAttrSet.Count() && !pOld->pChildList && - !pOld->nStyleNo ) - break; // auch dieser verlaesst uns jetzt - } -#endif } else { @@ -1082,10 +1047,6 @@ void SvxRTFParser::AttrGroupEnd() // den akt. Bearbeiten, vom Stack loeschen pOld->pEndNd = pInsPos->MakeNodeIdx(); pOld->nEndCnt = pInsPos->GetCntIdx(); -#if 0 - if( IsChkStyleAttr() ) - _ClearStyleAttr( *pOld ); -#else /* #i21422# If the parent (pAkt) sets something e.g. , and the child (pOld) @@ -1098,7 +1059,6 @@ void SvxRTFParser::AttrGroupEnd() // den akt. Bearbeiten, vom Stack loeschen */ if (IsChkStyleAttr() && !pAkt) _ClearStyleAttr( *pOld ); -#endif if( pAkt ) { @@ -1294,18 +1254,6 @@ void SvxRTFItemStackType::Add( SvxRTFItemStackType* pIns ) pChildList->Insert( pIns, pChildList->Count() ); } -#if 0 -//cmc: This is the original. nEndCnt is redundantly assigned to itself, and -//pEndNd can leak if not equal to pSttNd. -void SvxRTFItemStackType::SetStartPos( const SvxPosition& rPos ) -{ - delete pSttNd; - pSttNd = rPos.MakeNodeIdx(); - nSttCnt = rPos.GetCntIdx(); - pEndNd = pSttNd; - nEndCnt = nEndCnt; -} -#else void SvxRTFItemStackType::SetStartPos( const SvxPosition& rPos ) { if (pSttNd != pEndNd) @@ -1315,7 +1263,6 @@ void SvxRTFItemStackType::SetStartPos( const SvxPosition& rPos ) pEndNd = pSttNd; nSttCnt = rPos.GetCntIdx(); } -#endif void SvxRTFItemStackType::MoveFullNode(const SvxNodeIdx &rOldNode, const SvxNodeIdx &rNewNode) @@ -1515,4 +1462,4 @@ RTFPardAttrMapIds ::RTFPardAttrMapIds ( const SfxItemPool& rPool ) nDirection = rPool.GetTrueWhich( SID_ATTR_FRAMEDIRECTION, FALSE ); } -/* vi:set tabstop=4 shiftwidth=4 expandtab: */ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/uno/UnoForbiddenCharsTable.cxx b/editeng/source/uno/UnoForbiddenCharsTable.cxx index 12483c63fc..59a8831630 100644 --- a/editeng/source/uno/UnoForbiddenCharsTable.cxx +++ b/editeng/source/uno/UnoForbiddenCharsTable.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -39,10 +40,9 @@ using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::i18n; using namespace ::rtl; -using namespace ::vos; using namespace ::cppu; -SvxUnoForbiddenCharsTable::SvxUnoForbiddenCharsTable(ORef<SvxForbiddenCharactersTable> xForbiddenChars) : +SvxUnoForbiddenCharsTable::SvxUnoForbiddenCharsTable(::rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars) : mxForbiddenChars( xForbiddenChars ) { } @@ -58,9 +58,9 @@ void SvxUnoForbiddenCharsTable::onChange() ForbiddenCharacters SvxUnoForbiddenCharsTable::getForbiddenCharacters( const Locale& rLocale ) throw(NoSuchElementException, RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; - if(!mxForbiddenChars.isValid()) + if(!mxForbiddenChars.is()) throw RuntimeException(); const LanguageType eLang = SvxLocaleToLanguage( rLocale ); @@ -74,9 +74,9 @@ ForbiddenCharacters SvxUnoForbiddenCharsTable::getForbiddenCharacters( const Loc sal_Bool SvxUnoForbiddenCharsTable::hasForbiddenCharacters( const Locale& rLocale ) throw(RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; - if(!mxForbiddenChars.isValid()) + if(!mxForbiddenChars.is()) return sal_False; const LanguageType eLang = SvxLocaleToLanguage( rLocale ); @@ -88,9 +88,9 @@ sal_Bool SvxUnoForbiddenCharsTable::hasForbiddenCharacters( const Locale& rLocal void SvxUnoForbiddenCharsTable::setForbiddenCharacters(const Locale& rLocale, const ForbiddenCharacters& rForbiddenCharacters ) throw(RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; - if(!mxForbiddenChars.isValid()) + if(!mxForbiddenChars.is()) throw RuntimeException(); const LanguageType eLang = SvxLocaleToLanguage( rLocale ); @@ -102,9 +102,9 @@ void SvxUnoForbiddenCharsTable::setForbiddenCharacters(const Locale& rLocale, co void SvxUnoForbiddenCharsTable::removeForbiddenCharacters( const Locale& rLocale ) throw(RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; - if(!mxForbiddenChars.isValid()) + if(!mxForbiddenChars.is()) throw RuntimeException(); const LanguageType eLang = SvxLocaleToLanguage( rLocale ); @@ -117,9 +117,9 @@ void SvxUnoForbiddenCharsTable::removeForbiddenCharacters( const Locale& rLocale Sequence< Locale > SAL_CALL SvxUnoForbiddenCharsTable::getLocales() throw(RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; - const sal_Int32 nCount = mxForbiddenChars.isValid() ? mxForbiddenChars->Count() : 0; + const sal_Int32 nCount = mxForbiddenChars.is() ? mxForbiddenChars->Count() : 0; Sequence< Locale > aLocales( nCount ); if( nCount ) @@ -139,7 +139,9 @@ Sequence< Locale > SAL_CALL SvxUnoForbiddenCharsTable::getLocales() sal_Bool SAL_CALL SvxUnoForbiddenCharsTable::hasLocale( const Locale& aLocale ) throw(RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; return hasForbiddenCharacters( aLocale ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/uno/makefile.mk b/editeng/source/uno/makefile.mk deleted file mode 100644 index 88b27526ef..0000000000 --- a/editeng/source/uno/makefile.mk +++ /dev/null @@ -1,61 +0,0 @@ -#************************************************************************* -# -# 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 -# -# 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=uno -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES= \ - $(SLO)$/unonrule.obj \ - $(SLO)$/unoedsrc.obj \ - $(SLO)$/unoedhlp.obj \ - $(SLO)$/unofdesc.obj \ - $(SLO)$/unoviwou.obj \ - $(SLO)$/unofored.obj \ - $(SLO)$/unoforou.obj \ - $(SLO)$/unoipset.obj \ - $(SLO)$/unotext.obj \ - $(SLO)$/unotext2.obj \ - $(SLO)$/unofield.obj \ - $(SLO)$/UnoForbiddenCharsTable.obj \ - $(SLO)$/unopracc.obj \ - $(SLO)$/unoedprx.obj \ - $(SLO)$/unoviwed.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/editeng/source/uno/unoedhlp.cxx b/editeng/source/uno/unoedhlp.cxx index 4788f014a8..d186a3c2c2 100644 --- a/editeng/source/uno/unoedhlp.cxx +++ b/editeng/source/uno/unoedhlp.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -195,3 +196,5 @@ Rectangle SvxEditSourceHelper::UserSpaceToEE( const Rectangle& rRect, const Size return bIsVertical ? Rectangle( UserSpaceToEE(rRect.TopRight(), rEESize, bIsVertical), UserSpaceToEE(rRect.BottomLeft(), rEESize, bIsVertical) ) : rRect; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/uno/unoedprx.cxx b/editeng/source/uno/unoedprx.cxx index 1068049d8a..23f9878ecc 100644 --- a/editeng/source/uno/unoedprx.cxx +++ b/editeng/source/uno/unoedprx.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -37,7 +38,7 @@ #include <limits.h> #include <vector> #include <algorithm> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <vcl/window.hxx> #include <vcl/svapp.hxx> #include <com/sun/star/uno/Any.hxx> @@ -1314,3 +1315,4 @@ void SvxAccessibleTextEditViewAdapter::SetForwarder( SvxEditViewForwarder& rFo mrTextForwarder = &rTextForwarder; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/uno/unoedsrc.cxx b/editeng/source/uno/unoedsrc.cxx index e0149b3f36..91bca0a9e3 100644 --- a/editeng/source/uno/unoedsrc.cxx +++ b/editeng/source/uno/unoedsrc.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -88,3 +89,5 @@ SfxBroadcaster& SvxEditSource::GetBroadcaster() const return aBroadcaster; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/uno/unofdesc.cxx b/editeng/source/uno/unofdesc.cxx index 162f3457c7..eb7619daa3 100644 --- a/editeng/source/uno/unofdesc.cxx +++ b/editeng/source/uno/unofdesc.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -31,7 +32,6 @@ #include <editeng/eeitem.hxx> #include <com/sun/star/uno/Any.hxx> -#ifndef _TOOLKIT_HELPRE_VCLUNOHELPER_HXX_ #include <toolkit/helper/vclunohelper.hxx> #endif #include <editeng/fontitem.hxx> @@ -264,3 +264,4 @@ uno::Any SvxUnoFontDescriptor::getPropertyDefault( SfxItemPool* pPool ) +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/uno/unofield.cxx b/editeng/source/uno/unofield.cxx index 1c05f3e239..2b371ef754 100644 --- a/editeng/source/uno/unofield.cxx +++ b/editeng/source/uno/unofield.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -32,7 +33,7 @@ #include <com/sun/star/lang/NoSupportException.hpp> #include <com/sun/star/beans/PropertyAttribute.hpp> #include <vcl/svapp.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <rtl/uuid.h> #include <rtl/memory.h> @@ -45,7 +46,6 @@ #include <comphelper/serviceinfohelper.hxx> using namespace ::rtl; -using namespace ::vos; using namespace ::cppu; using namespace ::com::sun::star; @@ -604,7 +604,7 @@ void SAL_CALL SvxUnoTextField::release() throw( ) OUString SAL_CALL SvxUnoTextField::getPresentation( sal_Bool bShowCommand ) throw(uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if(bShowCommand) { @@ -662,14 +662,14 @@ void SAL_CALL SvxUnoTextField::removeEventListener( const uno::Reference< lang:: uno::Reference< beans::XPropertySetInfo > SAL_CALL SvxUnoTextField::getPropertySetInfo( ) throw(uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; return mpPropSet->getPropertySetInfo(); } void SAL_CALL SvxUnoTextField::setPropertyValue( const OUString& aPropertyName, const uno::Any& aValue ) throw(beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( mpImpl == NULL ) throw uno::RuntimeException(); @@ -839,7 +839,7 @@ void SAL_CALL SvxUnoTextField::setPropertyValue( const OUString& aPropertyName, uno::Any SAL_CALL SvxUnoTextField::getPropertyValue( const OUString& PropertyName ) throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; uno::Any aValue; @@ -1104,8 +1104,8 @@ uno::Sequence< OUString > SAL_CALL SvxUnoTextField::getSupportedServiceNames() OUString* pServices = aSeq.getArray(); pServices[0] = OUString::createFromAscii( pNewServiceNames[mnServiceId] ); pServices[1] = OUString::createFromAscii( pOldServiceNames[mnServiceId] ); - pServices[2] = OUString::createFromAscii( "com.sun.star.text.TextContent" ), - pServices[3] = OUString::createFromAscii( "com.sun.star.text.TextField" ); + pServices[2] = OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.text.TextContent" )), + pServices[3] = OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.text.TextField" )); return aSeq; } diff --git a/editeng/source/uno/unofored.cxx b/editeng/source/uno/unofored.cxx index 46c1703655..51ba135f07 100644 --- a/editeng/source/uno/unofored.cxx +++ b/editeng/source/uno/unofored.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -555,3 +556,5 @@ void SvxEditEngineForwarder::CopyText(const SvxTextForwarder& rSource) } //------------------------------------------------------------------------ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/uno/unoforou.cxx b/editeng/source/uno/unoforou.cxx index 215d2ec552..a7b67a3426 100644 --- a/editeng/source/uno/unoforou.cxx +++ b/editeng/source/uno/unoforou.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -613,3 +614,4 @@ void SvxTextForwarder::SetParaIsNumberingRestart( sal_uInt16, sal_Bool ) //------------------------------------------------------------------------ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/uno/unoipset.cxx b/editeng/source/uno/unoipset.cxx index a6c30e9eb0..c5d688d546 100644 --- a/editeng/source/uno/unoipset.cxx +++ b/editeng/source/uno/unoipset.cxx @@ -1,10 +1,11 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * 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 + * Copyright 2000, 2010 Oracle and/or its affiliates. * * This file is part of OpenOffice.org. * @@ -44,6 +45,8 @@ using namespace ::com::sun::star; using namespace ::rtl; +using ::std::vector; + //---------------------------------------------------------------------- struct SfxItemPropertyMapEntryHash @@ -59,13 +62,11 @@ struct SvxIDPropertyCombine uno::Any aAny; }; -DECLARE_LIST( SvxIDPropertyCombineList, SvxIDPropertyCombine * ) SvxItemPropertySet::SvxItemPropertySet( const SfxItemPropertyMapEntry* pMap, SfxItemPool& rItemPool, sal_Bool bConvertTwips ) : m_aPropertyMap( pMap ), _pMap(pMap), mbConvertTwips(bConvertTwips), mrItemPool( rItemPool ) { - pCombiList = NULL; } //---------------------------------------------------------------------- @@ -77,16 +78,11 @@ SvxItemPropertySet::~SvxItemPropertySet() //---------------------------------------------------------------------- uno::Any* SvxItemPropertySet::GetUsrAnyForID(sal_uInt16 nWID) const { - if(pCombiList && pCombiList->Count()) + for ( size_t i = 0, n = aCombineList.size(); i < n; ++i ) { - SvxIDPropertyCombine* pActual = pCombiList->First(); - while(pActual) - { - if(pActual->nWID == nWID) - return &pActual->aAny; - pActual = pCombiList->Next(); - - } + SvxIDPropertyCombine* pActual = aCombineList[ i ]; + if( pActual->nWID == nWID ) + return &pActual->aAny; } return NULL; } @@ -94,13 +90,10 @@ uno::Any* SvxItemPropertySet::GetUsrAnyForID(sal_uInt16 nWID) const //---------------------------------------------------------------------- void SvxItemPropertySet::AddUsrAnyForID(const uno::Any& rAny, sal_uInt16 nWID) { - if(!pCombiList) - pCombiList = new SvxIDPropertyCombineList(); - SvxIDPropertyCombine* pNew = new SvxIDPropertyCombine; pNew->nWID = nWID; pNew->aAny = rAny; - pCombiList->Insert(pNew); + aCombineList.push_back( pNew ); } //---------------------------------------------------------------------- @@ -151,7 +144,7 @@ uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry* { if ( !bDontConvertNegativeValues || SvxUnoCheckForPositiveValue( aVal ) ) SvxUnoConvertToMM( eMapUnit, aVal ); - } + } } else if ( pMap->pType->getTypeClass() == uno::TypeClass_ENUM && aVal.getValueType() == ::getCppuType((const sal_Int32*)0) ) @@ -266,7 +259,7 @@ uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry* if(pMap->nMemberId & SFX_METRIC_ITEM && eMapUnit != SFX_MAPUNIT_100TH_MM) { SvxUnoConvertToMM( eMapUnit, aVal ); - } + } } if ( pMap->pType->getTypeClass() == uno::TypeClass_ENUM && @@ -392,3 +385,4 @@ void SvxUnoConvertFromMM( const SfxMapUnit eDestinationMapUnit, uno::Any & rMetr } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/uno/unonrule.cxx b/editeng/source/uno/unonrule.cxx index dd68f547fc..9f4744a885 100644 --- a/editeng/source/uno/unonrule.cxx +++ b/editeng/source/uno/unonrule.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -34,7 +35,7 @@ #include <com/sun/star/awt/XBitmap.hpp> #include <vcl/svapp.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <vcl/graph.hxx> #include <svtools/grfmgr.hxx> #include <toolkit/unohlp.hxx> @@ -56,7 +57,6 @@ using ::com::sun::star::util::XCloneable; using ::com::sun::star::ucb::XAnyCompare; -using namespace ::vos; using namespace ::std; using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -115,7 +115,7 @@ SvxUnoNumberingRules::~SvxUnoNumberingRules() throw() void SAL_CALL SvxUnoNumberingRules::replaceByIndex( sal_Int32 Index, const uno::Any& Element ) throw( IllegalArgumentException, IndexOutOfBoundsException, WrappedTargetException, RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( Index < 0 || Index >= maRule.GetLevelCount() ) throw IndexOutOfBoundsException(); @@ -130,7 +130,7 @@ void SAL_CALL SvxUnoNumberingRules::replaceByIndex( sal_Int32 Index, const uno:: // XIndexAccess sal_Int32 SAL_CALL SvxUnoNumberingRules::getCount() throw( RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; return maRule.GetLevelCount(); } @@ -138,7 +138,7 @@ sal_Int32 SAL_CALL SvxUnoNumberingRules::getCount() throw( RuntimeException ) Any SAL_CALL SvxUnoNumberingRules::getByIndex( sal_Int32 Index ) throw( IndexOutOfBoundsException, WrappedTargetException, RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( Index < 0 || Index >= maRule.GetLevelCount() ) throw IndexOutOfBoundsException(); diff --git a/editeng/source/uno/unopracc.cxx b/editeng/source/uno/unopracc.cxx index 06b5a4be3a..759c8c686d 100644 --- a/editeng/source/uno/unopracc.cxx +++ b/editeng/source/uno/unopracc.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -33,7 +34,7 @@ // Global header // //------------------------------------------------------------------------ -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <com/sun/star/uno/Any.hxx> #include <com/sun/star/uno/Reference.hxx> #include <cppuhelper/weakref.hxx> @@ -169,3 +170,4 @@ uno::Sequence< ::rtl::OUString> SAL_CALL SvxAccessibleTextPropertySet::getSuppor } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx index 98a993e9f7..63bdda47f9 100644 --- a/editeng/source/uno/unotext.cxx +++ b/editeng/source/uno/unotext.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -56,7 +57,6 @@ #include <comphelper/serviceinfohelper.hxx> using namespace ::rtl; -using namespace ::vos; using namespace ::cppu; using namespace ::com::sun::star; @@ -213,7 +213,7 @@ void check_me::add( SvxUnoTextRangeBase* pRange ) void check_me::remove( SvxUnoTextRangeBase* pRange ) { std::list< std::pair< sal_uInt32, SvxUnoTextRangeBase* > >::iterator aIter; - for( aIter = maRanges.begin(); aIter != maRanges.end(); aIter++ ) + for( aIter = maRanges.begin(); aIter != maRanges.end(); ++aIter ) { if( pRange == (*aIter).second ) { @@ -229,7 +229,7 @@ check_me::~check_me() { DBG_ERROR("living text range detected!"); std::list< std::pair< sal_uInt32, SvxUnoTextRangeBase* > >::iterator aIter; - for( aIter = maRanges.begin(); aIter != maRanges.end(); aIter++ ) + for( aIter = maRanges.begin(); aIter != maRanges.end(); ++aIter ) { sal_Int32 nAllocNum; SvxUnoTextRangeBase* pRange; @@ -255,7 +255,7 @@ SvxUnoTextRangeBase::SvxUnoTextRangeBase( const SvxItemPropertySet* _pSet ) thro SvxUnoTextRangeBase::SvxUnoTextRangeBase( const SvxEditSource* pSource, const SvxItemPropertySet* _pSet ) throw() : mpPropSet(_pSet) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; DBG_ASSERT(pSource,"SvxUnoTextRangeBase: I need a valid SvxEditSource!"); @@ -284,7 +284,7 @@ SvxUnoTextRangeBase::SvxUnoTextRangeBase( const SvxUnoTextRangeBase& rRange ) th , lang::XUnoTunnel() , mpPropSet(rRange.getPropertySet()) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; mpEditSource = rRange.mpEditSource ? rRange.mpEditSource->Clone() : NULL; @@ -332,7 +332,7 @@ void SvxUnoTextRangeBase::SetEditSource( SvxEditSource* pSource ) throw() corresponding with this range */ void SvxUnoTextRangeBase::attachField( const SvxFieldData* pData ) throw() { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( pData ) { @@ -347,7 +347,7 @@ void SvxUnoTextRangeBase::attachField( const SvxFieldData* pData ) throw() void SvxUnoTextRangeBase::SetSelection( const ESelection& rSelection ) throw() { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; maSelection = rSelection; if (mpEditSource != NULL) @@ -359,7 +359,7 @@ void SvxUnoTextRangeBase::SetSelection( const ESelection& rSelection ) throw() uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextRangeBase::getStart(void) throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; uno::Reference< text::XTextRange > xRange; @@ -389,7 +389,7 @@ uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextRangeBase::getStart(void) uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextRangeBase::getEnd(void) throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; uno::Reference< text::XTextRange > xRet; @@ -417,7 +417,7 @@ uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextRangeBase::getEnd(void) OUString SAL_CALL SvxUnoTextRangeBase::getString(void) throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() : NULL; if( pForwarder ) @@ -436,7 +436,7 @@ OUString SAL_CALL SvxUnoTextRangeBase::getString(void) void SAL_CALL SvxUnoTextRangeBase::setString(const OUString& aString) throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() : NULL; if( pForwarder ) @@ -476,7 +476,7 @@ void SAL_CALL SvxUnoTextRangeBase::setPropertyValue(const OUString& PropertyName void SAL_CALL SvxUnoTextRangeBase::_setPropertyValue( const OUString& PropertyName, const uno::Any& aValue, sal_Int32 nPara ) throw( beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() : NULL; if( pForwarder ) @@ -642,7 +642,7 @@ uno::Any SAL_CALL SvxUnoTextRangeBase::getPropertyValue(const OUString& Property uno::Any SAL_CALL SvxUnoTextRangeBase::_getPropertyValue(const OUString& PropertyName, sal_Int32 nPara ) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; uno::Any aAny; @@ -803,7 +803,7 @@ void SAL_CALL SvxUnoTextRangeBase::setPropertyValues( const uno::Sequence< ::rtl void SAL_CALL SvxUnoTextRangeBase::_setPropertyValues( const uno::Sequence< ::rtl::OUString >& aPropertyNames, const uno::Sequence< uno::Any >& aValues, sal_Int32 nPara ) throw (beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() : NULL; if( pForwarder ) @@ -927,7 +927,7 @@ uno::Sequence< uno::Any > SAL_CALL SvxUnoTextRangeBase::getPropertyValues( const uno::Sequence< uno::Any > SAL_CALL SvxUnoTextRangeBase::_getPropertyValues( const uno::Sequence< ::rtl::OUString >& aPropertyNames, sal_Int32 nPara ) throw (uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; sal_Int32 nCount = aPropertyNames.getLength(); @@ -1081,7 +1081,7 @@ beans::PropertyState SAL_CALL SvxUnoTextRangeBase::_getPropertyState(const SfxIt beans::PropertyState SAL_CALL SvxUnoTextRangeBase::_getPropertyState(const OUString& PropertyName, sal_Int32 nPara /* = -1 */) throw( beans::UnknownPropertyException, uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; return _getPropertyState( mpPropSet->getPropertyMapEntry( PropertyName ), nPara); } @@ -1232,7 +1232,7 @@ void SAL_CALL SvxUnoTextRangeBase::setPropertyToDefault( const OUString& Propert void SvxUnoTextRangeBase::_setPropertyToDefault(const OUString& PropertyName, sal_Int32 nPara /* = -1 */) throw( beans::UnknownPropertyException, uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() : NULL; @@ -1295,7 +1295,7 @@ void SvxUnoTextRangeBase::_setPropertyToDefault(SvxTextForwarder* pForwarder, co uno::Any SAL_CALL SvxUnoTextRangeBase::getPropertyDefault( const OUString& aPropertyName ) throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() : NULL; if( pForwarder ) @@ -1341,7 +1341,7 @@ uno::Any SAL_CALL SvxUnoTextRangeBase::getPropertyDefault( const OUString& aProp // beans::XMultiPropertyStates void SAL_CALL SvxUnoTextRangeBase::setAllPropertiesToDefault( ) throw (uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() : NULL; @@ -1855,14 +1855,14 @@ uno::Reference< text::XTextCursor > SvxUnoTextBase::createTextCursorBySelection( uno::Reference< text::XTextCursor > SAL_CALL SvxUnoTextBase::createTextCursor() throw(uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; return new SvxUnoTextCursor( *this ); } uno::Reference< text::XTextCursor > SAL_CALL SvxUnoTextBase::createTextCursorByRange( const uno::Reference< text::XTextRange >& aTextPosition ) throw(uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; uno::Reference< text::XTextCursor > xCursor; @@ -1879,7 +1879,7 @@ uno::Reference< text::XTextCursor > SAL_CALL SvxUnoTextBase::createTextCursorByR void SAL_CALL SvxUnoTextBase::insertString( const uno::Reference< text::XTextRange >& xRange, const OUString& aString, sal_Bool bAbsorb ) throw(uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( !xRange.is() ) return; @@ -1907,7 +1907,7 @@ void SAL_CALL SvxUnoTextBase::insertString( const uno::Reference< text::XTextRan void SAL_CALL SvxUnoTextBase::insertControlCharacter( const uno::Reference< text::XTextRange >& xRange, sal_Int16 nControlCharacter, sal_Bool bAbsorb ) throw(lang::IllegalArgumentException, uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; SvxTextForwarder* pForwarder = GetEditSource() ? GetEditSource()->GetTextForwarder() : NULL; @@ -1995,7 +1995,7 @@ void SAL_CALL SvxUnoTextBase::insertControlCharacter( const uno::Reference< text void SAL_CALL SvxUnoTextBase::insertTextContent( const uno::Reference< text::XTextRange >& xRange, const uno::Reference< text::XTextContent >& xContent, sal_Bool bAbsorb ) throw(lang::IllegalArgumentException, uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; SvxTextForwarder* pForwarder = GetEditSource() ? GetEditSource()->GetTextForwarder() : NULL; if( pForwarder ) @@ -2042,7 +2042,7 @@ void SAL_CALL SvxUnoTextBase::removeTextContent( const uno::Reference< text::XTe uno::Reference< text::XText > SAL_CALL SvxUnoTextBase::getText() throw(uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if (GetEditSource()) { @@ -2081,7 +2081,7 @@ void SAL_CALL SvxUnoTextBase::setString( const OUString& aString ) throw(uno::Ru uno::Reference< container::XEnumeration > SAL_CALL SvxUnoTextBase::createEnumeration() throw(uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; ESelection aSelection; ::GetSelection( aSelection, GetEditSource()->GetTextForwarder() ); @@ -2099,7 +2099,7 @@ uno::Type SAL_CALL SvxUnoTextBase::getElementType( ) throw(uno::RuntimeExceptio sal_Bool SAL_CALL SvxUnoTextBase::hasElements( ) throw(uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if(GetEditSource()) { @@ -2195,7 +2195,7 @@ uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextBase::appendParagraph( const uno::Sequence< beans::PropertyValue >& rCharAndParaProps ) throw (lang::IllegalArgumentException, beans::UnknownPropertyException, uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; uno::Reference< text::XTextRange > xRet; SvxEditSource *pEditSource = GetEditSource(); SvxTextForwarder *pTextForwarder = pEditSource ? pEditSource->GetTextForwarder() : 0; @@ -2225,7 +2225,7 @@ uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextBase::finishParagraph( const uno::Sequence< beans::PropertyValue >& rCharAndParaProps ) throw (lang::IllegalArgumentException, beans::UnknownPropertyException, uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; uno::Reference< text::XTextRange > xRet; SvxEditSource *pEditSource = GetEditSource(); @@ -2257,7 +2257,7 @@ uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextBase::appendTextPortion( const uno::Sequence< beans::PropertyValue >& rCharAndParaProps ) throw (lang::IllegalArgumentException, beans::UnknownPropertyException, uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; SvxEditSource *pEditSource = GetEditSource(); SvxTextForwarder *pTextForwarder = pEditSource ? pEditSource->GetTextForwarder() : 0; @@ -2290,13 +2290,11 @@ uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextBase::appendTextPortion( } return xRet; } -/*-- 25.03.2008 08:16:09--------------------------------------------------- - -----------------------------------------------------------------------*/ void SvxUnoTextBase::copyText( const uno::Reference< text::XTextCopy >& xSource ) throw ( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; uno::Reference< lang::XUnoTunnel > xUT( xSource, uno::UNO_QUERY ); SvxEditSource *pEditSource = GetEditSource(); SvxTextForwarder *pTextForwarder = pEditSource ? pEditSource->GetTextForwarder() : 0; @@ -2722,3 +2720,4 @@ void SvxDummyTextSource::CopyText(const SvxTextForwarder& ) { } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/uno/unotext2.cxx b/editeng/source/uno/unotext2.cxx index fbb1aff288..5f4a19aa93 100644 --- a/editeng/source/uno/unotext2.cxx +++ b/editeng/source/uno/unotext2.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,7 +29,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_editeng.hxx" #include <vcl/svapp.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #define _SVSTDARR_USHORTS #include <svl/svstdarr.hxx> @@ -43,7 +44,6 @@ #include <comphelper/serviceinfohelper.hxx> using namespace ::rtl; -using namespace ::vos; using namespace ::cppu; using namespace ::com::sun::star; @@ -75,7 +75,7 @@ SvxUnoTextContentEnumeration::~SvxUnoTextContentEnumeration() throw() sal_Bool SAL_CALL SvxUnoTextContentEnumeration::hasMoreElements(void) throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( mpEditSource && mpEditSource->GetTextForwarder() ) return mnNextParagraph < mpEditSource->GetTextForwarder()->GetParagraphCount(); else @@ -84,7 +84,7 @@ sal_Bool SAL_CALL SvxUnoTextContentEnumeration::hasMoreElements(void) uno::Any SvxUnoTextContentEnumeration::nextElement(void) throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if(!hasMoreElements()) throw container::NoSuchElementException(); @@ -93,7 +93,7 @@ uno::Any SvxUnoTextContentEnumeration::nextElement(void) throw( container::NoSuc const SvxUnoTextRangeBaseList& rRanges( mpEditSource->getRanges() ); SvxUnoTextRangeBaseList::const_iterator aIter; - for( aIter = rRanges.begin(); (aIter != rRanges.end()) && (pContent == 0); aIter++ ) + for( aIter = rRanges.begin(); (aIter != rRanges.end()) && (pContent == 0); ++aIter ) { SvxUnoTextContent* pIterContent = dynamic_cast< SvxUnoTextContent* >( (*aIter ) ); if( pIterContent && (pIterContent->mnParagraph == mnNextParagraph) ) @@ -259,7 +259,7 @@ uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextContent::getAnchor() throw void SAL_CALL SvxUnoTextContent::dispose() throw(uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( mbDisposing ) return; // catched a recursion @@ -291,7 +291,7 @@ void SAL_CALL SvxUnoTextContent::removeEventListener( const uno::Reference< lang uno::Reference< container::XEnumeration > SAL_CALL SvxUnoTextContent::createEnumeration( ) throw(uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; return new SvxUnoTextRangeEnumeration( mrParentText, mnParagraph ); } @@ -307,7 +307,7 @@ uno::Type SAL_CALL SvxUnoTextContent::getElementType() sal_Bool SAL_CALL SvxUnoTextContent::hasElements() throw(uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; SvxTextForwarder* pForwarder = GetEditSource() ? GetEditSource()->GetTextForwarder() : NULL; if( pForwarder ) @@ -437,7 +437,7 @@ SvxUnoTextRangeEnumeration::~SvxUnoTextRangeEnumeration() throw() sal_Bool SAL_CALL SvxUnoTextRangeEnumeration::hasMoreElements() throw(uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; return mpPortions && mnNextPortion < mpPortions->Count(); } @@ -445,7 +445,7 @@ sal_Bool SAL_CALL SvxUnoTextRangeEnumeration::hasMoreElements() uno::Any SAL_CALL SvxUnoTextRangeEnumeration::nextElement() throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( mpPortions == NULL || mnNextPortion >= mpPortions->Count() ) throw container::NoSuchElementException(); @@ -463,7 +463,7 @@ uno::Any SAL_CALL SvxUnoTextRangeEnumeration::nextElement() SvxUnoTextRange* pRange = 0; SvxUnoTextRangeBaseList::const_iterator aIter; - for( aIter = rRanges.begin(); (aIter != rRanges.end()) && (pRange == 0); aIter++ ) + for( aIter = rRanges.begin(); (aIter != rRanges.end()) && (pRange == 0); ++aIter ) { SvxUnoTextRange* pIterRange = dynamic_cast< SvxUnoTextRange* >( (*aIter ) ); if( pIterRange && pIterRange->mbPortion && (aSel.IsEqual( pIterRange->maSelection ) ) ) @@ -591,49 +591,49 @@ uno::Sequence< sal_Int8 > SAL_CALL SvxUnoTextCursor::getImplementationId() void SAL_CALL SvxUnoTextCursor::collapseToStart() throw(uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; CollapseToStart(); } void SAL_CALL SvxUnoTextCursor::collapseToEnd() throw(uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; CollapseToEnd(); } sal_Bool SAL_CALL SvxUnoTextCursor::isCollapsed() throw(uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; return IsCollapsed(); } sal_Bool SAL_CALL SvxUnoTextCursor::goLeft( sal_Int16 nCount, sal_Bool bExpand ) throw(uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; return GoLeft( nCount, bExpand ); } sal_Bool SAL_CALL SvxUnoTextCursor::goRight( sal_Int16 nCount, sal_Bool bExpand ) throw(uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; return GoRight( nCount, bExpand ); } void SAL_CALL SvxUnoTextCursor::gotoStart( sal_Bool bExpand ) throw(uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; GotoStart( bExpand ); } void SAL_CALL SvxUnoTextCursor::gotoEnd( sal_Bool bExpand ) throw(uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; GotoEnd( bExpand ); } @@ -709,3 +709,4 @@ uno::Sequence< OUString > SAL_CALL SvxUnoTextCursor::getSupportedServiceNames() } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/uno/unoviwed.cxx b/editeng/source/uno/unoviwed.cxx index 32c885a59d..2ea5fddd09 100644 --- a/editeng/source/uno/unoviwed.cxx +++ b/editeng/source/uno/unoviwed.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -135,3 +136,5 @@ sal_Bool SvxEditEngineViewForwarder::Paste() mrView.Paste(); return sal_True; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/uno/unoviwou.cxx b/editeng/source/uno/unoviwou.cxx index 121ee4ee14..6c4c024de3 100644 --- a/editeng/source/uno/unoviwou.cxx +++ b/editeng/source/uno/unoviwou.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -171,3 +172,5 @@ void SvxDrawOutlinerViewForwarder::SetShapePos( const Point& rShapePosTopLeft ) { maTextShapeTopLeft = rShapePosTopLeft; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/xml/editsource.hxx b/editeng/source/xml/editsource.hxx index 73ed41e84e..e412e99d64 100644 --- a/editeng/source/xml/editsource.hxx +++ b/editeng/source/xml/editsource.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -50,3 +51,5 @@ private: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/xml/makefile.mk b/editeng/source/xml/makefile.mk index dbf9271d4f..a1c530cb00 100644 --- a/editeng/source/xml/makefile.mk +++ b/editeng/source/xml/makefile.mk @@ -6,10 +6,6 @@ # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.12 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify @@ -42,8 +38,8 @@ ENABLE_EXCEPTIONS=TRUE # --- Files -------------------------------------------------------- SLOFILES = \ - $(SLO)$/xmltxtimp.obj \ - $(SLO)$/xmltxtexp.obj + $(SLO)$/xmltxtimp.obj \ + $(SLO)$/xmltxtexp.obj # --- Targets -------------------------------------------------------------- diff --git a/editeng/source/xml/xmltxtexp.cxx b/editeng/source/xml/xmltxtexp.cxx index 873185ba40..5062aa730f 100644 --- a/editeng/source/xml/xmltxtexp.cxx +++ b/editeng/source/xml/xmltxtexp.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -498,3 +499,5 @@ void SvxXMLTextExportComponent::_ExportContent() } void SvxXMLTextExportComponent::_ExportMasterStyles() {} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/source/xml/xmltxtimp.cxx b/editeng/source/xml/xmltxtimp.cxx index 6135fa1554..78f26b7907 100644 --- a/editeng/source/xml/xmltxtimp.cxx +++ b/editeng/source/xml/xmltxtimp.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -258,3 +259,4 @@ SvXMLImportContext *SvxXMLXTextImportComponent::CreateChildContext( USHORT nPref return pContext; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/editeng/util/makefile.pmk b/editeng/util/makefile.pmk deleted file mode 100644 index fac1139d7b..0000000000 --- a/editeng/util/makefile.pmk +++ /dev/null @@ -1,47 +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.pmk,v $ -# -# $Revision: 1.6 $ -# -# 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. -# -#************************************************************************* - -# define EDITENG_DLLIMPLEMENTATION (see @ editengdllapi.h) -CDEFS += -DEDITENG_DLLIMPLEMENTATION - -.IF "$(ENABLE_GTK)" != "" -CFLAGS+=-DENABLE_GTK -.ENDIF - -.IF "$(ENABLE_KDE)" != "" -CFLAGS+=-DENABLE_KDE -.ENDIF - -.IF "$(ENABLE_KDE4)" != "" -CFLAGS+=-DENABLE_KDE4 -.ENDIF - -VISIBILITY_HIDDEN=TRUE |