diff options
175 files changed, 1054 insertions, 2260 deletions
diff --git a/goodies/inc/chtuner.hxx b/goodies/inc/chtuner.hxx index 4c7e288d2ce3..7a54c1e05a41 100644 --- a/goodies/inc/chtuner.hxx +++ b/goodies/inc/chtuner.hxx @@ -38,7 +38,7 @@ #endif -#include <svtools/lstner.hxx> +#include <svl/lstner.hxx> class ChannelItem; class ChannelList; diff --git a/goodies/inc/goodies.hrc b/goodies/inc/goodies.hrc index 18584985a603..139987c4f6ee 100644 --- a/goodies/inc/goodies.hrc +++ b/goodies/inc/goodies.hrc @@ -31,7 +31,7 @@ #define _GOODIES_HRC #ifndef _SOLAR_HRC -#include <svtools/solar.hrc> +#include <svl/solar.hrc> #endif // Dialoge --------------------------------------------------------------- diff --git a/goodies/inc/pch/precompiled_goodies.hxx b/goodies/inc/pch/precompiled_goodies.hxx index 85a97433411b..fe6f2ec433e5 100644 --- a/goodies/inc/pch/precompiled_goodies.hxx +++ b/goodies/inc/pch/precompiled_goodies.hxx @@ -98,11 +98,11 @@ #include "svtools/FilterConfigItem.hxx" #include "unotools/cacheoptions.hxx" #include "svtools/fltcall.hxx" -#include "svtools/itemprop.hxx" -#include "svtools/lstner.hxx" -#include "svtools/solar.hrc" +#include "svl/itemprop.hxx" +#include "svl/lstner.hxx" +#include "svl/solar.hrc" #include "svtools/stdctrl.hxx" -#include "svtools/svarray.hxx" +#include "svl/svarray.hxx" #include "toolkit/helper/vclunohelper.hxx" diff --git a/goodies/source/filter.vcl/egif/egif.cxx b/goodies/source/filter.vcl/egif/egif.cxx index e1547c7339d0..9f2aeaddd686 100644 --- a/goodies/source/filter.vcl/egif/egif.cxx +++ b/goodies/source/filter.vcl/egif/egif.cxx @@ -35,7 +35,7 @@ #include <vcl/svapp.hxx> #include <vcl/msgbox.hxx> #include <vcl/window.hxx> -#include <svtools/solar.hrc> +#include <svl/solar.hrc> #include <svtools/fltcall.hxx> #include <svtools/FilterConfigItem.hxx> #include "giflzwc.hxx" diff --git a/goodies/source/filter.vcl/eos2met/eos2met.cxx b/goodies/source/filter.vcl/eos2met/eos2met.cxx index b176d186a217..51ef34d79cfd 100644 --- a/goodies/source/filter.vcl/eos2met/eos2met.cxx +++ b/goodies/source/filter.vcl/eos2met/eos2met.cxx @@ -47,7 +47,7 @@ #include <vcl/virdev.hxx> #include <vcl/svapp.hxx> #include <vcl/msgbox.hxx> -#include <svtools/solar.hrc> +#include <svl/solar.hrc> #include "strings.hrc" #include "dlgeos2.hxx" diff --git a/goodies/source/filter.vcl/epbm/epbm.cxx b/goodies/source/filter.vcl/epbm/epbm.cxx index 92aeb501e141..a624e7f45cfb 100644 --- a/goodies/source/filter.vcl/epbm/epbm.cxx +++ b/goodies/source/filter.vcl/epbm/epbm.cxx @@ -35,7 +35,7 @@ #include <vcl/graph.hxx> #include <vcl/bmpacc.hxx> #include <vcl/msgbox.hxx> -#include <svtools/solar.hrc> +#include <svl/solar.hrc> #include <svtools/fltcall.hxx> #include <svtools/FilterConfigItem.hxx> #include "strings.hrc" diff --git a/goodies/source/filter.vcl/epgm/epgm.cxx b/goodies/source/filter.vcl/epgm/epgm.cxx index b6056339f11e..32d6e74a5cfe 100644 --- a/goodies/source/filter.vcl/epgm/epgm.cxx +++ b/goodies/source/filter.vcl/epgm/epgm.cxx @@ -35,7 +35,7 @@ #include <vcl/graph.hxx> #include <vcl/bmpacc.hxx> #include <vcl/msgbox.hxx> -#include <svtools/solar.hrc> +#include <svl/solar.hrc> #include <svtools/fltcall.hxx> #include <svtools/FilterConfigItem.hxx> #include "strings.hrc" diff --git a/goodies/source/filter.vcl/epict/epict.cxx b/goodies/source/filter.vcl/epict/epict.cxx index 4df7abea01fc..e176be21d6bb 100644 --- a/goodies/source/filter.vcl/epict/epict.cxx +++ b/goodies/source/filter.vcl/epict/epict.cxx @@ -33,7 +33,7 @@ #include <vcl/metaact.hxx> #include <svtools/filter.hxx> -#include <svtools/solar.hrc> +#include <svl/solar.hrc> #include <svtools/fltcall.hxx> #include <math.h> diff --git a/goodies/source/filter.vcl/eppm/eppm.cxx b/goodies/source/filter.vcl/eppm/eppm.cxx index 8cd71176e31b..d17b4f7777ae 100644 --- a/goodies/source/filter.vcl/eppm/eppm.cxx +++ b/goodies/source/filter.vcl/eppm/eppm.cxx @@ -35,7 +35,7 @@ #include <vcl/graph.hxx> #include <vcl/bmpacc.hxx> #include <vcl/msgbox.hxx> -#include <svtools/solar.hrc> +#include <svl/solar.hrc> #include <svtools/fltcall.hxx> #include <svtools/FilterConfigItem.hxx> #include "strings.hrc" diff --git a/goodies/source/filter.vcl/eps/eps.cxx b/goodies/source/filter.vcl/eps/eps.cxx index 8a163659050a..dc8e407b178e 100644 --- a/goodies/source/filter.vcl/eps/eps.cxx +++ b/goodies/source/filter.vcl/eps/eps.cxx @@ -46,7 +46,7 @@ #include <vcl/msgbox.hxx> #include <vcl/cvtgrf.hxx> #include <vcl/gradient.hxx> -#include <svtools/solar.hrc> +#include <svl/solar.hrc> #include <svtools/fltcall.hxx> #include <svtools/FilterConfigItem.hxx> #include <vcl/graphictools.hxx> diff --git a/goodies/source/filter.vcl/etiff/etiff.cxx b/goodies/source/filter.vcl/etiff/etiff.cxx index 12289cb8f0a9..3cdec42d0978 100644 --- a/goodies/source/filter.vcl/etiff/etiff.cxx +++ b/goodies/source/filter.vcl/etiff/etiff.cxx @@ -35,7 +35,7 @@ #include <vcl/svapp.hxx> #include <vcl/msgbox.hxx> #include <vcl/bmpacc.hxx> -#include <svtools/solar.hrc> +#include <svl/solar.hrc> #include <svtools/fltcall.hxx> #include <svtools/FilterConfigItem.hxx> diff --git a/goodies/source/filter.vcl/ipcd/ipcd.cxx b/goodies/source/filter.vcl/ipcd/ipcd.cxx index f70d1c8b84c5..f7a5f3652cbf 100644 --- a/goodies/source/filter.vcl/ipcd/ipcd.cxx +++ b/goodies/source/filter.vcl/ipcd/ipcd.cxx @@ -36,7 +36,7 @@ #include <vcl/bmpacc.hxx> #include <vcl/svapp.hxx> #include <svtools/fltcall.hxx> -#include <svtools/solar.hrc> +#include <svl/solar.hrc> #include <svtools/FilterConfigItem.hxx> //============================ PCDReader ================================== diff --git a/goodies/source/inv/invader.cxx b/goodies/source/inv/invader.cxx index be15ff2e75d4..0aed6e76848f 100644 --- a/goodies/source/inv/invader.cxx +++ b/goodies/source/inv/invader.cxx @@ -37,7 +37,7 @@ #include "invader.hrc" #include "strings.hrc" #include "score.hxx" -#include <svtools/solar.hrc> +#include <svl/solar.hrc> #include <cppuhelper/servicefactory.hxx> #include <comphelper/processfactory.hxx> #include <vcl/msgbox.hxx> diff --git a/goodies/source/unographic/descriptor.cxx b/goodies/source/unographic/descriptor.cxx index e75b008cfb69..c19318d6e11e 100644 --- a/goodies/source/unographic/descriptor.cxx +++ b/goodies/source/unographic/descriptor.cxx @@ -37,7 +37,7 @@ #include <vos/mutex.hxx> #include <unotools/ucbstreamhelper.hxx> #include <svtools/filter.hxx> -#include <svtools/itemprop.hxx> +#include <svl/itemprop.hxx> #ifndef _COM_SUN_STAR_BEANS_PROPERTYSTATE_HDL_ #include <com/sun/star/beans/PropertyState.hpp> diff --git a/goodies/source/unographic/provider.cxx b/goodies/source/unographic/provider.cxx index 2eb0aede9bdf..1f7de99d4473 100644 --- a/goodies/source/unographic/provider.cxx +++ b/goodies/source/unographic/provider.cxx @@ -46,7 +46,7 @@ #include <tools/resmgr.hxx> #include <unotools/ucbstreamhelper.hxx> #include <svtools/filter.hxx> -#include <svtools/solar.hrc> +#include <svl/solar.hrc> #include <vcl/salbtype.hxx> #include <vcl/virdev.hxx> #include <com/sun/star/io/XStream.hpp> diff --git a/goodies/source/unographic/renderer.cxx b/goodies/source/unographic/renderer.cxx index 78f006cc69be..d280ed832999 100644 --- a/goodies/source/unographic/renderer.cxx +++ b/goodies/source/unographic/renderer.cxx @@ -48,7 +48,7 @@ #include <toolkit/helper/vclunohelper.hxx> #include <comphelper/propertysetinfo.hxx> -#include <svtools/itemprop.hxx> +#include <svl/itemprop.hxx> #include "grfmgr.hxx" #include "graphic.hxx" #include "renderer.hxx" diff --git a/goodies/source/unographic/transformer.cxx b/goodies/source/unographic/transformer.cxx index 4422d161d7c4..7e18c10cdd41 100644 --- a/goodies/source/unographic/transformer.cxx +++ b/goodies/source/unographic/transformer.cxx @@ -43,7 +43,7 @@ #include <tools/resid.hxx> #include <tools/resmgr.hxx> #include <unotools/ucbstreamhelper.hxx> -#include <svtools/solar.hrc> +#include <svl/solar.hrc> #include <vcl/salbtype.hxx> #include <vcl/virdev.hxx> #include <vcl/bmpacc.hxx> diff --git a/svl/inc/svl/bintitem.hxx b/svl/inc/svl/bintitem.hxx deleted file mode 100644 index 4c969c0a29c7..000000000000 --- a/svl/inc/svl/bintitem.hxx +++ /dev/null @@ -1,88 +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: bintitem.hxx,v $ - * $Revision: 1.3 $ - * - * 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 _BINTITEM_HXX -#define _BINTITEM_HXX - -#include <tools/solar.h> -#include <tools/rtti.hxx> -#include <tools/bigint.hxx> -#include <tools/debug.hxx> - -#include <svl/poolitem.hxx> - -class SfxArguments; -class SvStream; - -DBG_NAMEEX(SfxBigIntItem) - -class SfxBigIntItem: public SfxPoolItem -{ - BigInt aVal; - -public: - TYPEINFO(); - SfxBigIntItem(); - SfxBigIntItem(USHORT nWhich, const BigInt& rValue); - SfxBigIntItem(USHORT nWhich, SvStream &); - SfxBigIntItem(const SfxBigIntItem&); - ~SfxBigIntItem() { DBG_DTOR(SfxBigIntItem, 0); } - - virtual SfxItemPresentation GetPresentation( - SfxItemPresentation ePres, - SfxMapUnit eCoreMetric, - SfxMapUnit ePresMetric, - XubString &rText, - const IntlWrapper * = 0 ) const; - - virtual int operator==(const SfxPoolItem&) const; - using SfxPoolItem::Compare; - virtual int Compare(const SfxPoolItem &rWith) const; - virtual SfxPoolItem* Clone(SfxItemPool *pPool = 0) const; - virtual SfxPoolItem* Create(SvStream &, USHORT nVersion) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion) 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 SfxFieldUnit GetUnit() const; // FUNIT_NONE - - const BigInt& GetValue() const { return aVal; } - void SetValue(const BigInt& rNewVal) - { - DBG_ASSERT(GetRefCount() == 0, "SetValue() with pooled item"); - aVal = rNewVal; - } -}; - -#endif /* _BINTITEM_HXX */ - diff --git a/svl/inc/svl/ctloptions.hxx b/svl/inc/svl/ctloptions.hxx index 10fc4bb98446..28b2191cad94 100644 --- a/svl/inc/svl/ctloptions.hxx +++ b/svl/inc/svl/ctloptions.hxx @@ -40,8 +40,7 @@ class SvtCTLOptions_Impl; // class SvtCTLOptions -------------------------------------------------------- -class SVL_DLLPUBLIC SvtCTLOptions: - public utl::detail::Options, public SfxBroadcaster, public SfxListener +class SVL_DLLPUBLIC SvtCTLOptions : public utl::detail::Options { private: SvtCTLOptions_Impl* m_pImp; @@ -52,8 +51,6 @@ public: SvtCTLOptions( sal_Bool bDontLoad = sal_False ); virtual ~SvtCTLOptions(); - virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); - void SetCTLFontEnabled( sal_Bool _bEnabled ); sal_Bool IsCTLFontEnabled() const; diff --git a/svl/inc/svl/dateitem.hxx b/svl/inc/svl/dateitem.hxx new file mode 100644 index 000000000000..c66c9a84285d --- /dev/null +++ b/svl/inc/svl/dateitem.hxx @@ -0,0 +1,109 @@ + /************************************************************************* + * + * 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: dateitem.hxx,v $ + * $Revision: 1.3 $ + * + * 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 _DATETIMEITEM_HXX +#define _DATETIMEITEM_HXX + +#include <tools/rtti.hxx> +#include <tools/datetime.hxx> + +#include <svl/poolitem.hxx> + +class SvStream; + +DBG_NAMEEX(SfxDateTimeItem) + +// class SfxDateTimeItem ------------------------------------------------- + +class SfxDateTimeItem : public SfxPoolItem +{ +private: + DateTime aDateTime; + +public: + TYPEINFO(); + + SfxDateTimeItem( USHORT nWhich ); + SfxDateTimeItem( USHORT nWhich, + const DateTime& rDT ); + SfxDateTimeItem( const SfxDateTimeItem& rCpy ); + + ~SfxDateTimeItem() { + DBG_DTOR(SfxDateTimeItem, 0); } + + virtual int operator==( const SfxPoolItem& ) const; + using SfxPoolItem::Compare; + virtual int Compare( const SfxPoolItem &rWith ) const; + virtual SfxPoolItem* Create( SvStream&, USHORT nItemVersion ) const; + virtual SvStream& Store( SvStream&, USHORT nItemVersion ) const; + virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + XubString &rText, + const IntlWrapper * pIntlWrapper = 0 ) + const; + + const DateTime& GetDateTime() const { return aDateTime; } + void SetDateTime( const DateTime& rDT ) { + DBG_ASSERT( GetRefCount() == 0, + "SetDateTime() with pooled item" ); + aDateTime = rDT; } + + 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; +}; + +class SfxColumnDateTimeItem : public SfxDateTimeItem +{ +public: + TYPEINFO(); + + SfxColumnDateTimeItem( USHORT nWhich ); + SfxColumnDateTimeItem( USHORT nWhich, + const DateTime& rDT ); + SfxColumnDateTimeItem( const SfxDateTimeItem& rCpy ); + + ~SfxColumnDateTimeItem() {} + + virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; + + virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresMetric, + XubString &rText, + const IntlWrapper * pIntlWrapper = 0 ) + const; +}; + +#endif + diff --git a/svl/inc/svl/dtritem.hxx b/svl/inc/svl/dtritem.hxx deleted file mode 100644 index 406cc5ee6af1..000000000000 --- a/svl/inc/svl/dtritem.hxx +++ /dev/null @@ -1,93 +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: dtritem.hxx,v $ - * $Revision: 1.3 $ - * - * 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 _DTRITEM_HXX -#define _DTRITEM_HXX - -#include <tools/rtti.hxx> -#include <tools/datetime.hxx> - -#include <svl/poolitem.hxx> - -class SvStream; - -DBG_NAMEEX(SfxDateTimeRangeItem) - -// class SfxDateTimeRangeItem ------------------------------------------------- - -class SfxDateTimeRangeItem : public SfxPoolItem -{ -private: - DateTime aStartDateTime; - DateTime aEndDateTime; - -public: - TYPEINFO(); - - SfxDateTimeRangeItem( const SfxDateTimeRangeItem& rCpy ); - SfxDateTimeRangeItem( USHORT nWhich ); - SfxDateTimeRangeItem( USHORT nWhich, const DateTime& rStartDT, - const DateTime& rEndDT ); - - ~SfxDateTimeRangeItem() - { DBG_DTOR(SfxDateTimeRangeItem, 0); } - - virtual int operator==( const SfxPoolItem& ) const; - using SfxPoolItem::Compare; - virtual int Compare( const SfxPoolItem &rWith ) const; - virtual SfxPoolItem* Create( SvStream&, USHORT nItemVersion ) const; - virtual SvStream& Store( SvStream&, USHORT nItemVersion ) const; - virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, - SfxMapUnit eCoreMetric, - SfxMapUnit ePresMetric, - XubString &rText, - const IntlWrapper * pIntlWrapper = 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; - - const DateTime& GetStartDateTime() const { return aStartDateTime; } - const DateTime& GetEndDateTime() const { return aEndDateTime; } - - void SetStartDateTime( const DateTime& rDT ) - { DBG_ASSERT( GetRefCount() == 0, "SetDateTime() with pooled item" ); - aStartDateTime = rDT; } - - void SetEndDateTime( const DateTime& rDT ) - { DBG_ASSERT( GetRefCount() == 0, "SetDateTime() with pooled item" ); - aEndDateTime = rDT; } -}; - -#endif - diff --git a/svl/inc/svl/frqitem.hxx b/svl/inc/svl/frqitem.hxx deleted file mode 100644 index 8d11c20610e2..000000000000 --- a/svl/inc/svl/frqitem.hxx +++ /dev/null @@ -1,178 +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: frqitem.hxx,v $ - * $Revision: 1.3 $ - * - * 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 _FRQITEM_HXX -#define _FRQITEM_HXX - -#include <tools/rtti.hxx> -#include <tools/time.hxx> -#include <tools/datetime.hxx> -#include <tools/string.hxx> - -#include <svl/poolitem.hxx> - -class SvStream; - -DBG_NAMEEX(SfxFrequencyItem) - -// class SfxFrequencyItem ------------------------------------------------- - -/////////////////////////////////////////////////////////////////////////////// -/* -FRQ_DAILY - * jeden X'ten Tag - nInterval1 = 1 .. 999 - - * jeden Wochentag - nInterval1 = USHRT_MAX - -FRQ_WEEKLY - + wiederhole jede X'te Woche - nInterval1 = 1 .. 99 - - + an SU, MO, TU, WE, TH, FR, SA - nInterval2 = WD_SUNDAY | WD_MONDAY | WD_TUESDAY | WD_WEDNESDAY | - WD_THURSDAY | WD_FRIDAY | WD_SATURDAY - -FRQ_MONTHLY_DAILY - * jeden X'ten Tag von jedem X'ten Monat - nInterval1 = 1 .. 31 - nInterval2 = 1 .. 6 - -FRQ_MONTHLY_LOGIC - * jeden ersten, zweiten, dritten, vierten oder letzten Wochentag jeden X'ten Monats - nInterval1 = 0 .. 4 - nInterval2 = WD_SUNDAY | WD_MONDAY | WD_TUESDAY | WD_WEDNESDAY | - WD_THURSDAY | WD_FRIDAY | WD_SATURDAY - nInterval3 = 1 .. 6 - -=============================================================================== - -FRQ_TIME_AT - * Update um Uhrzeit - nTime1 = 00:00:00 - 24:00:00 - -FRQ_TIME_REPEAT - * Wiederhole alle X Stunden - nTInterval1 = 1 .. 8 - + zwischen Uhrzeit 1 und 2 - nTime1 = 00:00:00 - 24:00:00 - nTime2 = 00:00:00 - 24:00:00 - -*/ -/////////////////////////////////////////////////////////////////////////////// - -enum FrequencyMode -{ - FRQ_DAILY = 1, - FRQ_WEEKLY = 2, - FRQ_MONTHLY_DAILY = 3, - FRQ_MONTHLY_LOGIC = 4 -}; - -enum FrequencyTimeMode -{ - FRQ_TIME_AT = 1, - FRQ_TIME_REPEAT = 2, - FRQ_TIME_REPEAT_RANGE = 3 -}; - -#define WD_SUNDAY 0x0001 -#define WD_MONDAY 0x0002 -#define WD_TUESDAY 0x0004 -#define WD_WEDNESDAY 0x0008 -#define WD_THURSDAY 0x0010 -#define WD_FRIDAY 0x0020 -#define WD_SATURDAY 0x0040 - -class SfxFrequencyItem : public SfxPoolItem -{ -private: - FrequencyMode eFrqMode; - FrequencyTimeMode eFrqTimeMode; - - USHORT nDInterval1; - USHORT nDInterval2; - USHORT nDInterval3; - - USHORT nTInterval1; - Time aTime1; - Time aTime2; - - BOOL bMissingDate; - DateTime aMissingDate; - - Time _CalcTime( BOOL bForToday ) const; -public: - TYPEINFO(); - - SfxFrequencyItem( const SfxFrequencyItem& rCpy ); - SfxFrequencyItem( USHORT nWhich ); - SfxFrequencyItem( USHORT nWhich, FrequencyMode eMode, FrequencyTimeMode eTMode, - USHORT nDI1, USHORT nDI2, USHORT nDI3, USHORT nTI1, - const Time& rT1, const Time& rT2 ); - ~SfxFrequencyItem() { DBG_DTOR(SfxFrequencyItem, 0); } - - virtual int operator==( const SfxPoolItem& ) const; - using SfxPoolItem::Compare; - virtual int Compare( const SfxPoolItem &rWith ) const; - virtual SfxPoolItem* Create( SvStream&, USHORT nItemVersion ) const; - virtual SvStream& Store( SvStream&, USHORT nItemVersion ) const; - virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, - SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, XubString &rText, - const IntlWrapper * = 0 ) const; - - DateTime CalcNextTick( const DateTime& rNow, BOOL bFirst = FALSE ); - - BOOL HasMissingDate() const { return bMissingDate; } - DateTime GetMissingDate() const { return aMissingDate; } - - FrequencyMode GetFrequencyMode() const { return eFrqMode; } - FrequencyTimeMode GetFrequencyTimeMode() const { return eFrqTimeMode; } - USHORT GetDInterval_1() const { return nDInterval1; } - USHORT GetDInterval_2() const { return nDInterval2; } - USHORT GetDInterval_3() const { return nDInterval3; } - USHORT GetTInterval_1() const { return nTInterval1; } - const Time& GetTime_1() const { return aTime1; } - const Time& GetTime_2() const { return aTime2; } - - void SetFrequencyMode(FrequencyMode eNew) { eFrqMode = eNew; } - void SetFrequencyTimeMode(FrequencyTimeMode eNew){ eFrqTimeMode = eNew; } - void SetDInterval_1(USHORT nNew) { nDInterval1 = nNew; } - void SetDInterval_2(USHORT nNew) { nDInterval2 = nNew; } - void SetDInterval_3(USHORT nNew) { nDInterval3 = nNew; } - void SetTInterval_1(USHORT nNew) { nTInterval1 = nNew; } - void SetTime_1(const Time& rNew) { aTime1 = rNew; } - void SetTime_2(const Time& rNew) { aTime2 = rNew; } -}; - -#endif - diff --git a/svl/inc/svl/languageoptions.hxx b/svl/inc/svl/languageoptions.hxx index 77682ce69765..0cba5235674a 100644 --- a/svl/inc/svl/languageoptions.hxx +++ b/svl/inc/svl/languageoptions.hxx @@ -35,6 +35,7 @@ #include <svl/brdcst.hxx> #include <svl/lstner.hxx> #include <unotools/configitem.hxx> +#include <unotools/options.hxx> #include <i18npool/lang.h> // class SvtLanguageOptions ---------------------------------------------------- @@ -47,7 +48,7 @@ class SvtCJKOptions; class SvtCTLOptions; -class SVL_DLLPUBLIC SvtLanguageOptions : public SfxBroadcaster, public SfxListener +class SVL_DLLPUBLIC SvtLanguageOptions : public ::utl::detail::Options { private: SvtCJKOptions* m_pCJKOptions; @@ -78,8 +79,6 @@ public: SvtLanguageOptions( sal_Bool _bDontLoad = sal_False ); ~SvtLanguageOptions(); - virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); - // CJK options sal_Bool IsCJKFontEnabled() const; sal_Bool IsVerticalTextEnabled() const; @@ -123,6 +122,7 @@ public: ~SvtSystemLanguageOptions(); virtual void Commit(); + virtual void Notify( const com::sun::star::uno::Sequence< rtl::OUString >& rPropertyNames ); LanguageType GetWin16SystemLanguage(); }; diff --git a/svl/inc/svl/svtools.hrc b/svl/inc/svl/svtools.hrc index 60095caa8784..e4cc91cfcb49 100644 --- a/svl/inc/svl/svtools.hrc +++ b/svl/inc/svl/svtools.hrc @@ -90,6 +90,7 @@ #define STR_SVT_SAMPLES_HELP (RID_SVTOOLS_START+66) #define STR_WARNING_ITEM (RID_SVTOOLS_START+90) +#define STR_COLUM_DT_AUTO (RID_SVTOOLS_START+99) #define CONFIG_BASIC_FORMAT_START (RID_SVTOOLS_START+102) #define STR_BASICKEY_FORMAT_ON (RID_SVTOOLS_START+103) diff --git a/svl/inc/svl/tfrmitem.hxx b/svl/inc/svl/tfrmitem.hxx deleted file mode 100644 index 82f08eccdf24..000000000000 --- a/svl/inc/svl/tfrmitem.hxx +++ /dev/null @@ -1,90 +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: tfrmitem.hxx,v $ - * $Revision: 1.3 $ - * - * 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 _TFRMITEM_HXX -#define _TFRMITEM_HXX - -#include <tools/rtti.hxx> - -#include <svl/poolitem.hxx> - -class SvStream; - -enum SfxOpenMode -{ - SfxOpenSelect = 0, // selected in view - SfxOpenOpen = 1, // doubleclicked or <enter> - SfxOpenAddTask = 2, // doubleclicked or <enter> with Ctrl-Modifier - SfxOpenDontKnow = 3, - SfxOpenReserved1 = 4, - SfxOpenReserved2 = 5, - SfxOpenModeLast = 5 -}; - -DBG_NAMEEX(SfxTargetFrameItem) - -// class SfxTargetFrameItem ------------------------------------------------- - -class SfxTargetFrameItem : public SfxPoolItem -{ -private: - String _aFrames[ (USHORT)SfxOpenModeLast+1 ]; -public: - TYPEINFO(); - - SfxTargetFrameItem( const SfxTargetFrameItem& rCpy ); - SfxTargetFrameItem( USHORT nWhich ); - SfxTargetFrameItem( - USHORT nWhich, - const String& rOpenSelectFrame, - const String& rOpenOpenFrame, - const String& rOpenAddTaskFrame ); - ~SfxTargetFrameItem(); - - virtual int operator==( const SfxPoolItem& ) const; - virtual SfxPoolItem* Create( SvStream&, USHORT nItemVersion ) const; - virtual SvStream& Store( SvStream&, USHORT nItemVersion ) const; - virtual SfxPoolItem* Clone( SfxItemPool* pPool = 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 ); - /* - Framebezeichner im Sfx: - _browser : Beamerview - _document : Desktopview - _blank : new task - "" : do nothing - */ - String GetTargetFrame( SfxOpenMode eMode ) const; -}; - -#endif - diff --git a/svl/prj/d.lst b/svl/prj/d.lst index e32ffa624397..a5c2564e81cd 100644 --- a/svl/prj/d.lst +++ b/svl/prj/d.lst @@ -1,6 +1,6 @@ mkdir: %COMMON_DEST%\bin%_EXT%\hid mkdir: %COMMON_DEST%\res%_EXT% -mkdir: %_DEST%\inc%_EXT%\svtools +mkdir: %_DEST%\inc%_EXT%\svl ..\%COMMON_OUTDIR%\misc\*.hid %COMMON_DEST%\bin%_EXT%\hid\*.hid ..\%__SRC%\lib\isvl.lib %_DEST%\lib%_EXT%\isvl.lib @@ -9,12 +9,12 @@ mkdir: %_DEST%\inc%_EXT%\svtools ..\%__SRC%\lib\*.so %_DEST%\lib%_EXT%\* ..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\* -..\inc\svl\*.hrc %_DEST%\inc%_EXT%\svtools\*.hrc -..\inc\svl\*.hxx %_DEST%\inc%_EXT%\svtools\*.hxx -..\inc\svl\*.h %_DEST%\inc%_EXT%\svtools\*.h -..\inc\*.hrc %_DEST%\inc%_EXT%\svtools\*.hrc -..\inc\*.hxx %_DEST%\inc%_EXT%\svtools\*.hxx -..\inc\*.h %_DEST%\inc%_EXT%\svtools\*.h +..\inc\svl\*.hrc %_DEST%\inc%_EXT%\svl\*.hrc +..\inc\svl\*.hxx %_DEST%\inc%_EXT%\svl\*.hxx +..\inc\svl\*.h %_DEST%\inc%_EXT%\svl\*.h +..\inc\*.hrc %_DEST%\inc%_EXT%\svl\*.hrc +..\inc\*.hxx %_DEST%\inc%_EXT%\svl\*.hxx +..\inc\*.h %_DEST%\inc%_EXT%\svl\*.h dos: sh -c "if test %OS% = MACOSX; then macosx-create-bundle %_DEST%\bin%_EXT%\bmp=%__PRJROOT%\%__SRC%\bin%_EXT%; fi" diff --git a/svl/source/config/cjkoptions.cxx b/svl/source/config/cjkoptions.cxx index 7ce2a45ce7a0..c149c91c86f5 100644 --- a/svl/source/config/cjkoptions.cxx +++ b/svl/source/config/cjkoptions.cxx @@ -168,6 +168,7 @@ void SvtCJKOptions_Impl::SetAll(sal_Bool bSet) SetModified(); Commit(); + NotifyListeners(0); } } /*-- 10.04.01 12:41:56--------------------------------------------------- @@ -240,6 +241,7 @@ void SvtCJKOptions_Impl::Load() void SvtCJKOptions_Impl::Notify( const Sequence< OUString >& ) { Load(); + NotifyListeners(0); } /*-- 10.04.01 12:41:57--------------------------------------------------- diff --git a/svl/source/config/ctloptions.cxx b/svl/source/config/ctloptions.cxx index a63944140672..a776bc4b807c 100644 --- a/svl/source/config/ctloptions.cxx +++ b/svl/source/config/ctloptions.cxx @@ -43,7 +43,6 @@ #include <vos/mutex.hxx> #include <svl/smplhint.hxx> #include <rtl/instance.hxx> -#include <tools/solarmutex.hxx> #include <unotools/syslocale.hxx> #include <itemholder2.hxx> @@ -55,7 +54,7 @@ using namespace ::com::sun::star::uno; // SvtCJKOptions_Impl ---------------------------------------------------------- -class SvtCTLOptions_Impl : public utl::ConfigItem, public SfxBroadcaster +class SvtCTLOptions_Impl : public utl::ConfigItem { private: sal_Bool m_bIsLoaded; @@ -155,7 +154,7 @@ SvtCTLOptions_Impl::~SvtCTLOptions_Impl() void SvtCTLOptions_Impl::Notify( const Sequence< rtl::OUString >& ) { Load(); - Broadcast(SfxSimpleHint(SFX_HINT_CTL_SETTINGS_CHANGED)); + NotifyListeners(SFX_HINT_CTL_SETTINGS_CHANGED); } // ----------------------------------------------------------------------------- void SvtCTLOptions_Impl::Commit() @@ -247,7 +246,7 @@ void SvtCTLOptions_Impl::Commit() aValues.realloc(nRealCount); PutProperties( aNames, aValues ); //broadcast changes - Broadcast(SfxSimpleHint(SFX_HINT_CTL_SETTINGS_CHANGED)); + NotifyListeners(SFX_HINT_CTL_SETTINGS_CHANGED); } // ----------------------------------------------------------------------------- void SvtCTLOptions_Impl::Load() @@ -325,6 +324,7 @@ void SvtCTLOptions_Impl::SetCTLFontEnabled( sal_Bool _bEnabled ) { m_bCTLFontEnabled = _bEnabled; SetModified(); + NotifyListeners(0); } } //------------------------------------------------------------------------------ @@ -334,6 +334,7 @@ void SvtCTLOptions_Impl::SetCTLSequenceChecking( sal_Bool _bEnabled ) { SetModified(); m_bCTLSequenceChecking = _bEnabled; + NotifyListeners(0); } } //------------------------------------------------------------------------------ @@ -343,6 +344,7 @@ void SvtCTLOptions_Impl::SetCTLSequenceCheckingRestricted( sal_Bool _bEnabled ) { SetModified(); m_bCTLRestricted = _bEnabled; + NotifyListeners(0); } } //------------------------------------------------------------------------------ @@ -352,6 +354,7 @@ void SvtCTLOptions_Impl::SetCTLSequenceCheckingTypeAndReplace( sal_Bool _bEnabl { SetModified(); m_bCTLTypeAndReplace = _bEnabled; + NotifyListeners(0); } } //------------------------------------------------------------------------------ @@ -361,6 +364,7 @@ void SvtCTLOptions_Impl::SetCTLCursorMovement( SvtCTLOptions::CursorMovement _eM { SetModified(); m_eCTLCursorMovement = _eMovement; + NotifyListeners(0); } } //------------------------------------------------------------------------------ @@ -370,6 +374,7 @@ void SvtCTLOptions_Impl::SetCTLTextNumerals( SvtCTLOptions::TextNumerals _eNumer { SetModified(); m_eCTLTextNumerals = _eNumerals; + NotifyListeners(0); } } // global ---------------------------------------------------------------- @@ -394,7 +399,7 @@ SvtCTLOptions::SvtCTLOptions( sal_Bool bDontLoad ) ++nCTLRefCount; m_pImp = pCTLOptions; - StartListening( *m_pImp); + m_pImp->AddListener(this); } // ----------------------------------------------------------------------- @@ -404,6 +409,7 @@ SvtCTLOptions::~SvtCTLOptions() // Global access, must be guarded (multithreading) ::osl::MutexGuard aGuard( CTLMutex::get() ); + m_pImp->RemoveListener(this); if ( !--nCTLRefCount ) DELETEZ( pCTLOptions ); } @@ -485,17 +491,5 @@ sal_Bool SvtCTLOptions::IsReadOnly(EOption eOption) const DBG_ASSERT( pCTLOptions->IsLoaded(), "CTL options not loaded" ); return pCTLOptions->IsReadOnly(eOption); } -/* -----------------30.04.2003 10:40----------------- - - --------------------------------------------------*/ -void SvtCTLOptions::Notify( SfxBroadcaster&, const SfxHint& rHint ) -{ - if ( ::tools::SolarMutex::Acquire() ) - { - Broadcast( rHint ); - ::tools::SolarMutex::Release(); - } -} - // ----------------------------------------------------------------------------- diff --git a/svl/source/config/languageoptions.cxx b/svl/source/config/languageoptions.cxx index 20a74bbba28a..f16c0b6add49 100644 --- a/svl/source/config/languageoptions.cxx +++ b/svl/source/config/languageoptions.cxx @@ -39,7 +39,6 @@ #include <osl/mutex.hxx> #include <rtl/instance.hxx> #include <com/sun/star/i18n/ScriptType.hpp> -#include <tools/solarmutex.hxx> #include <unotools/syslocale.hxx> using namespace ::com::sun::star; @@ -56,7 +55,8 @@ SvtLanguageOptions::SvtLanguageOptions( sal_Bool _bDontLoad ) m_pCJKOptions = new SvtCJKOptions( _bDontLoad ); m_pCTLOptions = new SvtCTLOptions( _bDontLoad ); - StartListening(*m_pCTLOptions); + m_pCTLOptions->AddListener(this); + m_pCJKOptions->AddListener(this); } //------------------------------------------------------------------------------ SvtLanguageOptions::~SvtLanguageOptions() @@ -64,6 +64,9 @@ SvtLanguageOptions::~SvtLanguageOptions() // Global access, must be guarded (multithreading) ::osl::MutexGuard aGuard( ALMutex::get() ); + m_pCTLOptions->RemoveListener(this); + m_pCJKOptions->RemoveListener(this); + delete m_pCJKOptions; delete m_pCTLOptions; } @@ -200,19 +203,8 @@ sal_Bool SvtLanguageOptions::IsReadOnly(SvtLanguageOptions::EOption eOption) con } return bReadOnly; } -/* -----------------30.04.2003 11:03----------------- - - --------------------------------------------------*/ -void SvtLanguageOptions::Notify( SfxBroadcaster&, const SfxHint& rHint ) -{ - if ( ::tools::SolarMutex::Acquire() ) - { - Broadcast( rHint ); - ::tools::SolarMutex::Release(); - } -} +/* -----------------30.04.2003 11:03-----------------*/ -// ----------------------------------------------------------------------------- // returns for a language the scripttype sal_uInt16 SvtLanguageOptions::GetScriptTypeOfLanguage( sal_uInt16 nLang ) { @@ -268,6 +260,12 @@ void SvtSystemLanguageOptions::Commit() { //does nothing } + +void SvtSystemLanguageOptions::Notify( const com::sun::star::uno::Sequence< rtl::OUString >& ) +{ + // no listeners supported yet +} + /*-- 27.10.2005 08:36:14--------------------------------------------------- -----------------------------------------------------------------------*/ diff --git a/svl/source/items/bintitem.cxx b/svl/source/items/bintitem.cxx deleted file mode 100644 index 5236f36504f8..000000000000 --- a/svl/source/items/bintitem.cxx +++ /dev/null @@ -1,169 +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: bintitem.cxx,v $ - * $Revision: 1.8 $ - * - * 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_svl.hxx" -#include <com/sun/star/uno/Any.hxx> -#include <tools/stream.hxx> -#include <tools/bigint.hxx> -#include <svl/bintitem.hxx> - -// STATIC DATA - -DBG_NAME(SfxBigIntItem) - -// RTTI -TYPEINIT1_AUTOFACTORY(SfxBigIntItem, SfxPoolItem); - -// SfxBigIntItem - -//============================================================================ -SfxBigIntItem::SfxBigIntItem() - : SfxPoolItem(0), - aVal(0) -{ - DBG_CTOR(SfxBigIntItem, 0); -} - -//============================================================================ -SfxBigIntItem::SfxBigIntItem(USHORT which, const BigInt& rValue) - : SfxPoolItem(which), - aVal(rValue) -{ - DBG_CTOR(SfxBigIntItem, 0); -} - -//============================================================================ -SfxBigIntItem::SfxBigIntItem(USHORT which, SvStream &rStream) - : SfxPoolItem(which) -{ - DBG_CTOR(SfxBigIntItem, 0); - ByteString sTmp; - rStream.ReadByteString(sTmp); - BigInt aTmp(sTmp); - aVal = aTmp; -} - -//============================================================================ -SfxBigIntItem::SfxBigIntItem(const SfxBigIntItem& rItem) - : SfxPoolItem(rItem), - aVal(rItem.aVal) -{ - DBG_CTOR(SfxBigIntItem, 0); -} - -//============================================================================ -SfxItemPresentation SfxBigIntItem::GetPresentation( - SfxItemPresentation /*ePresentation*/, - SfxMapUnit /*eCoreMetric*/, - SfxMapUnit /*ePresentationMetric*/, - XubString& rText, - const IntlWrapper * ) const -{ - DBG_CHKTHIS(SfxBigIntItem, 0); - rText = aVal.GetString(); - return SFX_ITEM_PRESENTATION_NAMELESS; -} - -//============================================================================ -int SfxBigIntItem::operator==(const SfxPoolItem& rItem) const -{ - DBG_CHKTHIS(SfxBigIntItem, 0); - DBG_ASSERT(SfxPoolItem::operator==(rItem), "unequal type"); - return ((SfxBigIntItem&)rItem).aVal == aVal; -} - -//============================================================================ -int SfxBigIntItem::Compare(const SfxPoolItem& rItem) const -{ - DBG_CHKTHIS(SfxBigIntItem, 0); - DBG_ASSERT(SfxPoolItem::operator==(rItem), "unequal type"); - - if (((const SfxBigIntItem&)rItem ).aVal < aVal ) - return -1; - else if (((const SfxBigIntItem&)rItem ).aVal == aVal) - return 0; - else - return 1; -} - -//============================================================================ -SfxPoolItem* SfxBigIntItem::Clone(SfxItemPool *) const -{ - DBG_CHKTHIS(SfxBigIntItem, 0); - return new SfxBigIntItem(*this); -} - -//============================================================================ -SfxPoolItem* SfxBigIntItem::Create(SvStream &rStream, USHORT) const -{ - DBG_CHKTHIS(SfxBigIntItem, 0); - return new SfxBigIntItem(Which(), rStream); -} - -//============================================================================ -SvStream& SfxBigIntItem::Store(SvStream &rStream, USHORT ) const -{ - DBG_CHKTHIS(SfxBigIntItem, 0); - rStream.WriteByteString( aVal.GetByteString() ); - return rStream; -} - -//============================================================================ -SfxFieldUnit SfxBigIntItem::GetUnit() const -{ - DBG_CHKTHIS(SfxBigIntItem, 0); - return SFX_FUNIT_NONE; -} - -//============================================================================ -// virtual -BOOL SfxBigIntItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE ) -{ - double aValue = 0.0; - if ( rVal >>= aValue ) - { - SetValue( aValue ); - return TRUE; - } - - DBG_ERROR( "SfxBigIntItem::PutValue - Wrong type!" ); - return FALSE; -} - -//============================================================================ -// virtual -BOOL SfxBigIntItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE ) const -{ - double aValue = GetValue(); - rVal <<= aValue; - return TRUE; -} - diff --git a/svl/inc/svl/tresitem.hxx b/svl/source/items/cstitem.src index c0254a1bf1fc..54951dd3761e 100644 --- a/svl/inc/svl/tresitem.hxx +++ b/svl/source/items/cstitem.src @@ -6,8 +6,8 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tresitem.hxx,v $ - * $Revision: 1.3 $ + * $RCSfile: cstitem.src,v $ + * $Revision: 1.7 $ * * This file is part of OpenOffice.org. * @@ -28,38 +28,45 @@ * ************************************************************************/ -#ifndef SVTOOLS_TRESITEM_HXX -#define SVTOOLS_TRESITEM_HXX +#include <svl/svtools.hrc> +String STR_COLUM_DT_AUTO +{ + Text [ en-US ] = "automatic" ; +}; + + + + + + + + + + + + + + + + + + + + + + + + + -#include <com/sun/star/ucb/TransferResult.hpp> -#include <svl/poolitem.hxx> -//============================================================================ -class CntTransferResultItem: public SfxPoolItem -{ - com::sun::star::ucb::TransferResult m_aResult; -public: - TYPEINFO(); - CntTransferResultItem(USHORT which = 0): SfxPoolItem(which) {} - CntTransferResultItem(USHORT which, - com::sun::star::ucb::TransferResult const & - rTheResult): - SfxPoolItem(which), m_aResult(rTheResult) {} - virtual int operator ==(SfxPoolItem const & rItem) const; - virtual BOOL QueryValue(com::sun::star::uno::Any & rVal, BYTE = 0) const; - virtual BOOL PutValue(const com::sun::star::uno::Any & rVal, BYTE = 0); - virtual SfxPoolItem * Clone(SfxItemPool * = 0) const; - com::sun::star::ucb::TransferResult const & GetValue() const - { return m_aResult; } -}; -#endif // SVTOOLS_TRESITEM_HXX diff --git a/svl/source/items/dateitem.cxx b/svl/source/items/dateitem.cxx new file mode 100644 index 000000000000..d5989d4b7a2b --- /dev/null +++ b/svl/source/items/dateitem.cxx @@ -0,0 +1,286 @@ +/************************************************************************* + * + * 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: dateitem.cxx,v $ + * $Revision: 1.8 $ + * + * 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_svl.hxx" + +// include --------------------------------------------------------------- + +#define _DATETIMEITEM_CXX +#include <svl/dateitem.hxx> + +#include <svl/svtools.hrc> + +#include <unotools/intlwrapper.hxx> +#include <comphelper/processfactory.hxx> + +#include <tools/stream.hxx> +#include <tools/debug.hxx> +#include <tools/datetime.hxx> +#include <com/sun/star/uno/Any.hxx> +#include <com/sun/star/util/DateTime.hpp> +#include <com/sun/star/lang/Locale.hpp> + + +#include <vcl/svapp.hxx> + +#include <svl/svldata.hxx> + +// STATIC DATA ----------------------------------------------------------- + +DBG_NAME(SfxDateTimeItem) + + +// ----------------------------------------------------------------------- + +TYPEINIT1(SfxDateTimeItem, SfxPoolItem); + +// ----------------------------------------------------------------------- + +SfxDateTimeItem::SfxDateTimeItem( USHORT which ) : + SfxPoolItem( which ) +{ + DBG_CTOR(SfxDateTimeItem, 0); +} + +// ----------------------------------------------------------------------- + +SfxDateTimeItem::SfxDateTimeItem( USHORT which, const DateTime& rDT ) : + SfxPoolItem( which ), + aDateTime( rDT ) + +{ + DBG_CTOR(SfxDateTimeItem, 0); +} + +// ----------------------------------------------------------------------- + +SfxDateTimeItem::SfxDateTimeItem( const SfxDateTimeItem& rItem ) : + SfxPoolItem( rItem ), + aDateTime( rItem.aDateTime ) +{ + DBG_CTOR(SfxDateTimeItem, 0); +} + +// ----------------------------------------------------------------------- + +int SfxDateTimeItem::operator==( const SfxPoolItem& rItem ) const +{ + DBG_CHKTHIS(SfxDateTimeItem, 0); + DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" ); + return ( ( (SfxDateTimeItem&)rItem ).aDateTime == aDateTime ); +} + +// ----------------------------------------------------------------------- + +int SfxDateTimeItem::Compare( const SfxPoolItem& rItem ) const +{ + DBG_CHKTHIS(SfxDateTimeItem, 0); + DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" ); + + // da X.Compare( Y ) am String einem Compare( Y, X ) entspricht, + // vergleichen wir hier Y mit X + if ( ( (const SfxDateTimeItem&)rItem ).aDateTime < aDateTime ) + return -1; + else if ( ( (const SfxDateTimeItem&)rItem ).aDateTime == aDateTime ) + return 0; + else + return 1; +} + +// ----------------------------------------------------------------------- + +SfxPoolItem* SfxDateTimeItem::Create( SvStream& rStream, USHORT ) const +{ + DBG_CHKTHIS(SfxDateTimeItem, 0); + sal_uInt32 nDate = 0; + sal_Int32 nTime = 0; + rStream >> nDate; + rStream >> nTime; + DateTime aDT(nDate, nTime); + return new SfxDateTimeItem( Which(), aDT ); +} + +// ----------------------------------------------------------------------- + +SvStream& SfxDateTimeItem::Store( SvStream& rStream, USHORT ) const +{ + DBG_CHKTHIS(SfxDateTimeItem, 0); + rStream << aDateTime.GetDate(); + rStream << aDateTime.GetTime(); + return rStream; +} + +// ----------------------------------------------------------------------- + +SfxPoolItem* SfxDateTimeItem::Clone( SfxItemPool* ) const +{ + DBG_CHKTHIS(SfxDateTimeItem, 0); + return new SfxDateTimeItem( *this ); +} + +// ----------------------------------------------------------------------- + +SfxItemPresentation SfxDateTimeItem::GetPresentation +( + SfxItemPresentation /*ePresentation*/, + SfxMapUnit /*eCoreMetric*/, + SfxMapUnit /*ePresentationMetric*/, + XubString& rText, + const IntlWrapper * pIntlWrapper +) const +{ + DBG_CHKTHIS(SfxDateTimeItem, 0); + if (aDateTime.IsValid()) + if (pIntlWrapper) + { + rText = pIntlWrapper->getLocaleData()->getDate(aDateTime); + rText.AppendAscii(RTL_CONSTASCII_STRINGPARAM(", ")); + rText += pIntlWrapper->getLocaleData()->getTime(aDateTime); + } + else + { + DBG_WARNING("SfxDateTimeItem::GetPresentation():" + " Using default en_US IntlWrapper"); + const IntlWrapper aIntlWrapper( + ::comphelper::getProcessServiceFactory(), LANGUAGE_ENGLISH_US ); + rText = aIntlWrapper.getLocaleData()->getDate(aDateTime); + rText.AppendAscii(RTL_CONSTASCII_STRINGPARAM(", ")); + rText += aIntlWrapper.getLocaleData()->getTime(aDateTime); + } + else + rText.Erase(); + return SFX_ITEM_PRESENTATION_NAMELESS; +} + +//---------------------------------------------------------------------------- +// virtual +BOOL SfxDateTimeItem::PutValue( const com::sun::star::uno::Any& rVal, + BYTE nMemberId ) +{ + nMemberId &= ~CONVERT_TWIPS; + com::sun::star::util::DateTime aValue; + if ( rVal >>= aValue ) + { + aDateTime = DateTime( Date( aValue.Day, + aValue.Month, + aValue.Year ), + Time( aValue.Hours, + aValue.Minutes, + aValue.Seconds, + aValue.HundredthSeconds ) ); + return TRUE; + } + + DBG_ERROR( "SfxDateTimeItem::PutValue - Wrong type!" ); + return FALSE; +} + +//---------------------------------------------------------------------------- +// virtual +BOOL SfxDateTimeItem::QueryValue( com::sun::star::uno::Any& rVal, + BYTE nMemberId ) const +{ + nMemberId &= ~CONVERT_TWIPS; + com::sun::star::util::DateTime aValue( aDateTime.Get100Sec(), + aDateTime.GetSec(), + aDateTime.GetMin(), + aDateTime.GetHour(), + aDateTime.GetDay(), + aDateTime.GetMonth(), + aDateTime.GetYear() ); + rVal <<= aValue; + return TRUE; +} + +// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- +// ----------------------------------------------------------------------- + +TYPEINIT1(SfxColumnDateTimeItem, SfxDateTimeItem); + + +SfxColumnDateTimeItem::SfxColumnDateTimeItem( USHORT which ) : + SfxDateTimeItem( which ) +{} + +SfxColumnDateTimeItem::SfxColumnDateTimeItem( USHORT which, const DateTime& rDT ) : + SfxDateTimeItem( which, rDT ) +{} + +SfxColumnDateTimeItem::SfxColumnDateTimeItem( const SfxDateTimeItem& rCpy ) : + SfxDateTimeItem( rCpy ) +{} + +SfxPoolItem* SfxColumnDateTimeItem::Clone( SfxItemPool* ) const +{ + return new SfxColumnDateTimeItem( *this ); +} + +SfxItemPresentation SfxColumnDateTimeItem::GetPresentation +( + SfxItemPresentation /*ePresentation*/, + SfxMapUnit /*eCoreMetric*/, + SfxMapUnit /*ePresentationMetric*/, + XubString& rText, + const IntlWrapper * pIntlWrapper +) const +{ + DBG_ASSERT(pIntlWrapper, + "SfxColumnDateTimeItem::GetPresentation():" + " Using default en_US IntlWrapper"); + + ::com::sun::star::lang::Locale aLocale; + if (GetDateTime() == DateTime(Date(1, 2, 3), Time(3, 2, 1))) + { + rText = String(SvtSimpleResId(STR_COLUM_DT_AUTO, + pIntlWrapper ? + pIntlWrapper->getLocale() : + aLocale)); + } + else if (pIntlWrapper) + { + rText = pIntlWrapper->getLocaleData()->getDate(GetDateTime()); + rText.AppendAscii(RTL_CONSTASCII_STRINGPARAM(", ")); + rText += pIntlWrapper->getLocaleData()->getTime(GetDateTime()); + } + else + { + const IntlWrapper aIntlWrapper( + ::comphelper::getProcessServiceFactory(), LANGUAGE_ENGLISH_US ); + rText = aIntlWrapper.getLocaleData()->getDate(GetDateTime()); + rText.AppendAscii(RTL_CONSTASCII_STRINGPARAM(", ")); + rText += aIntlWrapper.getLocaleData()->getTime(GetDateTime()); + } + return SFX_ITEM_PRESENTATION_NAMELESS; +} + + + diff --git a/svl/source/items/dtritem.cxx b/svl/source/items/dtritem.cxx deleted file mode 100644 index 12d7828350bb..000000000000 --- a/svl/source/items/dtritem.cxx +++ /dev/null @@ -1,241 +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: dtritem.cxx,v $ - * $Revision: 1.8 $ - * - * 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_svl.hxx" -#include <com/sun/star/uno/Any.hxx> -#include <com/sun/star/util/DateTimeRange.hpp> - -#include <unotools/intlwrapper.hxx> -#include <comphelper/processfactory.hxx> - -#include <tools/stream.hxx> -#include <tools/debug.hxx> -#include <tools/datetime.hxx> -#include <rtl/math.hxx> -#include <svl/dtritem.hxx> - - -DBG_NAME( SfxDateTimeRangeItem ) -TYPEINIT1( SfxDateTimeRangeItem, SfxPoolItem ); - -// ----------------------------------------------------------------------- - -SfxDateTimeRangeItem::SfxDateTimeRangeItem( USHORT which ) : - SfxPoolItem( which ) -{ - DBG_CTOR( SfxDateTimeRangeItem, 0 ); -} - -// ----------------------------------------------------------------------- - -SfxDateTimeRangeItem::SfxDateTimeRangeItem( USHORT which, const DateTime& rStartDT, - const DateTime& rEndDT ) : - SfxPoolItem( which ), - aStartDateTime( rStartDT ), - aEndDateTime( rEndDT ) -{ - DBG_CTOR( SfxDateTimeRangeItem, 0 ); -} - -// ----------------------------------------------------------------------- - -SfxDateTimeRangeItem::SfxDateTimeRangeItem( const SfxDateTimeRangeItem& rItem ) : - SfxPoolItem( rItem ), - aStartDateTime( rItem.aStartDateTime ), - aEndDateTime( rItem.aEndDateTime ) -{ - DBG_CTOR( SfxDateTimeRangeItem, 0 ); -} - -// ----------------------------------------------------------------------- - -int SfxDateTimeRangeItem::operator==( const SfxPoolItem& rItem ) const -{ - DBG_CHKTHIS( SfxDateTimeRangeItem, 0 ); - DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" ); - - return ((SfxDateTimeRangeItem&)rItem ).aStartDateTime == aStartDateTime && - ((SfxDateTimeRangeItem&)rItem ).aEndDateTime == aEndDateTime; -} - -// ----------------------------------------------------------------------- - -int SfxDateTimeRangeItem::Compare( const SfxPoolItem& rItem ) const -{ - DBG_CHKTHIS( SfxDateTimeRangeItem, 0 ); - DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" ); - - double fThisRange = aEndDateTime - aStartDateTime; - double fRange = ((const SfxDateTimeRangeItem&)rItem).aEndDateTime - - ((const SfxDateTimeRangeItem&)rItem).aStartDateTime; - - if ( ::rtl::math::approxEqual( fRange, fThisRange ) ) - return 0; - else if ( fRange < fThisRange ) - return -1; - else - return 1; -} - -// ----------------------------------------------------------------------- - -SfxPoolItem* SfxDateTimeRangeItem::Create( SvStream& rStream, USHORT ) const -{ - DBG_CHKTHIS(SfxDateTimeRangeItem, 0); - - sal_uInt32 nStartDate, nEndDate; - sal_Int32 nStartTime, nEndTime; - - rStream >> nStartDate; - rStream >> nStartTime; - - rStream >> nEndDate; - rStream >> nEndTime; - - DateTime aStartDT, aEndDT; - - aStartDT.SetDate( nStartDate ); - aStartDT.SetTime( nStartTime ); - - aEndDT.SetDate( nEndDate ); - aEndDT.SetTime( nEndTime ); - - return new SfxDateTimeRangeItem( Which(), aStartDT, aEndDT ); -} - -// ----------------------------------------------------------------------- - -SvStream& SfxDateTimeRangeItem::Store( SvStream& rStream, USHORT ) const -{ - DBG_CHKTHIS( SfxDateTimeRangeItem, 0 ); - - rStream << aStartDateTime.GetDate(); - rStream << aStartDateTime.GetTime(); - - rStream << aEndDateTime.GetDate(); - rStream << aEndDateTime.GetTime(); - - return rStream; -} - -// ----------------------------------------------------------------------- - -SfxPoolItem* SfxDateTimeRangeItem::Clone( SfxItemPool* ) const -{ - DBG_CHKTHIS( SfxDateTimeRangeItem, 0 ); - - return new SfxDateTimeRangeItem( *this ); -} -// ----------------------------------------------------------------------- - -SfxItemPresentation SfxDateTimeRangeItem::GetPresentation -( - SfxItemPresentation /*ePresentation*/, - SfxMapUnit /*eCoreMetric*/, - SfxMapUnit /*ePresentationMetric*/, - XubString& rText, - const IntlWrapper * pIntlWrapper -) const -{ - DBG_CHKTHIS(SfxDateTimeRangeItem, 0); - DateTime aRange(aEndDateTime - (const Time&)aStartDateTime); - if (pIntlWrapper) - { - rText = pIntlWrapper->getLocaleData()->getDate(aRange); - rText.AppendAscii(RTL_CONSTASCII_STRINGPARAM(", ")); - rText += pIntlWrapper->getLocaleData()->getTime(aRange); - } - else - { - DBG_WARNING("SfxDateTimeRangeItem::GetPresentation():" - " Using default en_US IntlWrapper"); - const IntlWrapper aIntlWrapper( - ::comphelper::getProcessServiceFactory(), LANGUAGE_ENGLISH_US ); - rText = aIntlWrapper.getLocaleData()->getDate(aRange); - rText.AppendAscii(RTL_CONSTASCII_STRINGPARAM(", ")); - rText += aIntlWrapper.getLocaleData()->getTime(aRange); - } - return SFX_ITEM_PRESENTATION_NAMELESS; -} - -//---------------------------------------------------------------------------- -// virtual -BOOL SfxDateTimeRangeItem::PutValue( const com::sun::star::uno::Any& rVal,BYTE ) -{ - com::sun::star::util::DateTimeRange aValue; - if ( rVal >>= aValue ) - { - aStartDateTime = DateTime( Date( aValue.StartDay, - aValue.StartMonth, - aValue.StartYear ), - Time( aValue.StartHours, - aValue.StartMinutes, - aValue.StartSeconds, - aValue.StartHundredthSeconds ) ); - aEndDateTime = DateTime( Date( aValue.EndDay, - aValue.EndMonth, - aValue.EndYear ), - Time( aValue.EndHours, - aValue.EndMinutes, - aValue.EndSeconds, - aValue.EndHundredthSeconds ) ); - return TRUE; - } - - DBG_ERROR( "SfxDateTimeRangeItem::PutValue - Wrong type!" ); - return FALSE; -} - -//---------------------------------------------------------------------------- -// virtual -BOOL SfxDateTimeRangeItem::QueryValue( com::sun::star::uno::Any& rVal, - BYTE nMemberId ) const -{ - nMemberId &= ~CONVERT_TWIPS; - com::sun::star::util::DateTimeRange aValue( aStartDateTime.Get100Sec(), - aStartDateTime.GetSec(), - aStartDateTime.GetMin(), - aStartDateTime.GetHour(), - aStartDateTime.GetDay(), - aStartDateTime.GetMonth(), - aStartDateTime.GetYear(), - aEndDateTime.Get100Sec(), - aEndDateTime.GetSec(), - aEndDateTime.GetMin(), - aEndDateTime.GetHour(), - aEndDateTime.GetDay(), - aEndDateTime.GetMonth(), - aEndDateTime.GetYear() ); - rVal <<= aValue; - return TRUE; -} - - diff --git a/svl/source/items/frqitem.cxx b/svl/source/items/frqitem.cxx deleted file mode 100644 index cfa1db17ef65..000000000000 --- a/svl/source/items/frqitem.cxx +++ /dev/null @@ -1,580 +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: frqitem.cxx,v $ - * $Revision: 1.8.136.1 $ - * - * 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_svl.hxx" -#ifndef GCC -#endif - -#include <unotools/intlwrapper.hxx> - -#include <tools/stream.hxx> -#include <tools/debug.hxx> -#include <tools/datetime.hxx> - -#include <svl/frqitem.hxx> - -DBG_NAME( SfxFrequencyItem ) - -TYPEINIT1( SfxFrequencyItem, SfxPoolItem ); - -#define MAX_GOTO 32000 - -#define DECL_SAVE_GOTO() \ - ULONG nSafetyMeasures = 0; - -#define SAVE_GOTO(tag) \ - if(nSafetyMeasures < MAX_GOTO) \ - { nSafetyMeasures++; goto tag; } - -// ----------------------------------------------------------------------- - -SfxFrequencyItem::SfxFrequencyItem( USHORT which ) : - SfxPoolItem ( which ), - eFrqMode ( FRQ_DAILY ), - eFrqTimeMode ( FRQ_TIME_AT ), - nDInterval1 ( 1 ), - nDInterval2 ( 0 ), - nDInterval3 ( 0 ), - nTInterval1 ( 1 ), - aTime1 ( Time( 12, 0, 0 ) ), - aTime2 ( Time( 12, 0, 0 ) ), - bMissingDate ( FALSE ), - aMissingDate ( DateTime(0, 0) ) -{ - DBG_CTOR( SfxFrequencyItem, 0 ); -} - -// ----------------------------------------------------------------------- - -SfxFrequencyItem::SfxFrequencyItem( USHORT which, FrequencyMode eMode, FrequencyTimeMode eTMode, - USHORT nDI1, USHORT nDI2, USHORT nDI3, USHORT nTI1, - const Time& rT1, const Time& rT2 ) : - SfxPoolItem ( which ), - eFrqMode ( eMode ), - eFrqTimeMode ( eTMode ), - nDInterval1 ( nDI1 ), - nDInterval2 ( nDI2 ), - nDInterval3 ( nDI3 ), - nTInterval1 ( nTI1 ), - aTime1 ( rT1 ), - aTime2 ( rT2 ), - bMissingDate ( FALSE ) -{ - DBG_CTOR( SfxFrequencyItem, 0 ); -} - -// ----------------------------------------------------------------------- - -SfxFrequencyItem::SfxFrequencyItem( const SfxFrequencyItem& rItem ) : - SfxPoolItem ( rItem ), - eFrqMode ( rItem.eFrqMode ), - eFrqTimeMode ( rItem.eFrqTimeMode ), - nDInterval1 ( rItem.nDInterval1 ), - nDInterval2 ( rItem.nDInterval2 ), - nDInterval3 ( rItem.nDInterval3 ), - nTInterval1 ( rItem.nTInterval1 ), - aTime1 ( rItem.aTime1 ), - aTime2 ( rItem.aTime2 ), - bMissingDate ( rItem.bMissingDate ) -{ - DBG_CTOR( SfxFrequencyItem, 0 ); -} - -// ----------------------------------------------------------------------- - -int SfxFrequencyItem::operator==( const SfxPoolItem& rItem ) const -{ - DBG_CHKTHIS( SfxFrequencyItem, 0 ); - DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" ); - - return ((SfxFrequencyItem&)rItem ).eFrqMode == eFrqMode && - ((SfxFrequencyItem&)rItem ).eFrqTimeMode == eFrqTimeMode && - ((SfxFrequencyItem&)rItem ).nDInterval1 == nDInterval1 && - ((SfxFrequencyItem&)rItem ).nDInterval2 == nDInterval2 && - ((SfxFrequencyItem&)rItem ).nDInterval3 == nDInterval3 && - ((SfxFrequencyItem&)rItem ).nTInterval1 == nTInterval1 && - ((SfxFrequencyItem&)rItem ).aTime1 == aTime1 && - ((SfxFrequencyItem&)rItem ).aTime2 == aTime2; -} - -// ----------------------------------------------------------------------- - -int SfxFrequencyItem::Compare( const SfxPoolItem& -#ifdef DBG_UTIL -rItem -#endif -) const -{ - DBG_CHKTHIS( SfxFrequencyItem, 0 ); - DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" ); - -/* DateTime aThisRange( aEndDateTime - aStartDateTime ); - DateTime aRange(((const SfxFrequencyItem&)rItem).aEndDateTime - - ((const SfxFrequencyItem&)rItem).aStartDateTime ); - if( aRange < aThisRange ) - return -1; - else if( aRange == aThisRange ) - return 0; - else -*/ - return 1; -} - -// ----------------------------------------------------------------------- - -SfxPoolItem* SfxFrequencyItem::Create( SvStream& rStream, USHORT ) const -{ - DBG_CHKTHIS(SfxFrequencyItem, 0); - - USHORT _eFrqMode; - USHORT _eFrqTimeMode; - USHORT _nDInterval1; - USHORT _nDInterval2; - USHORT _nDInterval3; - USHORT _nTInterval1; - long _nTime1; - long _nTime2; - - rStream >> _eFrqMode; - rStream >> _eFrqTimeMode; - rStream >> _nDInterval1; - rStream >> _nDInterval2; - rStream >> _nDInterval3; - rStream >> _nTInterval1; - rStream >> _nTime1; - rStream >> _nTime2; - - return new SfxFrequencyItem( Which(), (FrequencyMode)_eFrqMode, - (FrequencyTimeMode) _eFrqTimeMode, _nDInterval1, _nDInterval2, _nDInterval3, - _nTInterval1, Time(_nTime1), Time(_nTime2) ); -} - -// ----------------------------------------------------------------------- - -SvStream& SfxFrequencyItem::Store( SvStream& rStream, USHORT ) const -{ - DBG_CHKTHIS( SfxFrequencyItem, 0 ); - - USHORT nEMode = (USHORT)eFrqMode; - USHORT nETimeMode = (USHORT)eFrqTimeMode; - - rStream << (USHORT) nEMode; - rStream << (USHORT) nETimeMode; - - rStream << nDInterval1; - rStream << nDInterval2; - rStream << nDInterval3; - - rStream << nTInterval1; - rStream << aTime1.GetTime(); - rStream << aTime2.GetTime(); - - return rStream; -} - -// ----------------------------------------------------------------------- - -SfxPoolItem* SfxFrequencyItem::Clone( SfxItemPool* ) const -{ - DBG_CHKTHIS( SfxFrequencyItem, 0 ); - return new SfxFrequencyItem( *this ); -} - -// ----------------------------------------------------------------------- - -SfxItemPresentation SfxFrequencyItem::GetPresentation -( - SfxItemPresentation /*ePresentation*/, - SfxMapUnit /*eCoreMetric*/, - SfxMapUnit /*ePresentationMetric*/, - XubString& rText, - const IntlWrapper * -) const -{ - DBG_CHKTHIS(SfxFrequencyItem, 0); - rText.AssignAscii(RTL_CONSTASCII_STRINGPARAM("SNIY")); - return SFX_ITEM_PRESENTATION_NAMELESS; -} - -// ----------------------------------------------------------------------- - -Time SfxFrequencyItem::_CalcTime( BOOL bForToday ) const -{ - Time aNow; - Time aTime; - - DECL_SAVE_GOTO(); - - switch( eFrqTimeMode ) - { - ////////////////////////////////////////////////////////// - // FRQ_TIME_AT - // - // Update um Uhrzeit - // nTime1 = 00:00:00 - 24:00:00 - // - case FRQ_TIME_AT : - aTime = aTime1; - break; - - ////////////////////////////////////////////////////////// - // FRQ_TIME_REPEAT - // - // Wiederhole alle X Stunden - // nTInterval1 = 1 .. 8 - // - case FRQ_TIME_REPEAT : - aTime = Time( 0, 0 ); - if( bForToday ) - { - - RECALC_TIME_REPEAT: - if( aNow > aTime ) - { - aTime += Time( nTInterval1, 0 ); - SAVE_GOTO( RECALC_TIME_REPEAT ); - } - break; - } - break; - - ////////////////////////////////////////////////////////// - // FRQ_TIME_REPEAT_RANGE - // - // FRQ_TIME_REPEAT zwischen Uhrzeit 1 und 2 - // nTime1 = 00:00:00 - 24:00:00 - // nTime2 = 00:00:00 - 24:00:00 - // - case FRQ_TIME_REPEAT_RANGE : - aTime = aTime1; - if( bForToday ) - { - if( aNow > aTime2 ) - return aTime1; - - RECALC_TIME_REPEAT_RANGE: - if( aNow > aTime ) - { - aTime += Time( nTInterval1, 0 ); - if( aTime > aTime2 ) - return aTime1; - SAVE_GOTO( RECALC_TIME_REPEAT_RANGE ); - } - break; - } - break; - } - return aTime; -} - -DateTime SfxFrequencyItem::CalcNextTick( const DateTime& rBase, BOOL bFirst ) -{ - Date aDateToday; - Time aTimeToday; - Date aDateBase; - Time aTimeBase; - - if( bFirst ) - { - aDateBase = Date( 17, 2, 1969 ); - aTimeBase = Time( 8, 0, 0 ); - } - else - { - aDateBase = rBase.GetDate(); - aTimeBase = rBase.GetTime(); - } - - Time aNextTime( _CalcTime(FALSE) ); - Date aNextDate( aDateBase ); - bMissingDate = FALSE; - - DECL_SAVE_GOTO(); - - switch( eFrqMode ) - { - ////////////////////////////////////////////////////////// - // FRQ_DAILY - // - // jeden X'ten Tag - // nInterval1 = 1 .. 999 - // - // jeden Wochentag - // nInterval1 = USHRT_MAX - // - case FRQ_DAILY : - { - if( bFirst ) - { - aNextTime = _CalcTime( TRUE ); - if( aNextTime < aTimeToday ) - { - aNextTime = _CalcTime( FALSE ); - aNextDate = aDateToday + (USHORT) - ((nDInterval1 == USHRT_MAX)? 1 : nDInterval1); - } - else - aNextDate = aDateToday; - break; - } - - RECALC_FRQ_DAILY: - if( aNextDate < aDateToday ) - { - bMissingDate = TRUE; - aMissingDate.SetDate(aNextDate.GetDate()); - aMissingDate.SetTime(_CalcTime(FALSE).GetTime()); - - aNextDate += (USHORT)((nDInterval1 == USHRT_MAX)? 1 : nDInterval1); - SAVE_GOTO( RECALC_FRQ_DAILY ); - } - - if( aNextDate == aDateToday ) - { - aNextTime = _CalcTime( TRUE ); - if( aNextTime < aTimeToday ) - { - bMissingDate = TRUE; - aMissingDate.SetDate(aNextDate.GetDate()); - aMissingDate.SetTime(_CalcTime(FALSE).GetTime()); - - aNextDate += (USHORT)((nDInterval1 == USHRT_MAX)? 1 : nDInterval1); - aNextTime = _CalcTime( FALSE ); - } - } - else - aNextTime = _CalcTime( FALSE ); - } break; - - ////////////////////////////////////////////////////////// - // FRQ_WEEKLY - // wiederhole jede X'te Woche - // nInterval1 = 1 .. 99 - // - // an SU, MO, TU, WE, TH, FR, SA - // nInterval2 = WD_SUNDAY | WD_MONDAY | WD_TUESDAY | - // WD_WEDNESDAY | WD_THURSDAY | WD_FRIDAY | - // WD_SATURDAY - // - case FRQ_WEEKLY : - { - BOOL bInRecalc = FALSE; - - RECALC_FRQ_WEEKLY: - if( !bFirst || bInRecalc ) - aNextDate += (nDInterval1 - 1) * 7; - - aNextDate -= (USHORT) ((aNextDate.GetDayOfWeek() != SUNDAY) ? - aNextDate.GetDayOfWeek() + 1 : 0); - - if( nDInterval2 & WD_SUNDAY && (aNextDate >= aDateToday) ) - aNextDate += 0; - else if( nDInterval2 & WD_MONDAY && (aNextDate + 1 >= aDateToday) ) - aNextDate += 1; - else if( nDInterval2 & WD_TUESDAY && (aNextDate + 2 >= aDateToday) ) - aNextDate += 2; - else if( nDInterval2 & WD_WEDNESDAY && (aNextDate + 3 >= aDateToday) ) - aNextDate += 3; - else if( nDInterval2 & WD_THURSDAY && (aNextDate + 4 >= aDateToday) ) - aNextDate += 4; - else if( nDInterval2 & WD_FRIDAY && (aNextDate + 5 >= aDateToday) ) - aNextDate += 5; - else if( nDInterval2 & WD_SATURDAY && (aNextDate + 6 >= aDateToday) ) - aNextDate += 6; - - if( aNextDate < aDateToday ) - { - bMissingDate = TRUE; - aMissingDate.SetDate(aNextDate.GetDate()); - aMissingDate.SetTime(_CalcTime(FALSE).GetTime()); - - bInRecalc = TRUE; - aNextDate += 7; - SAVE_GOTO( RECALC_FRQ_WEEKLY ); - } - if( aNextDate == aDateToday ) - { - aNextTime = _CalcTime( TRUE ); - if( aNextTime < aTimeToday ) - { - bInRecalc = TRUE; - aNextDate += 7; - SAVE_GOTO( RECALC_FRQ_WEEKLY ); - } - } - else - aNextTime = _CalcTime( FALSE ); - } break; - - ////////////////////////////////////////////////////////// - // FRQ_MONTHLY_DAILY - // - // jeden X'ten Tag von jedem X'ten Monat - // nInterval1 = 1 .. 31 - // nInterval2 = 1 .. 6 - // - case FRQ_MONTHLY_DAILY : - { - BOOL bInRecalc = FALSE; - aNextDate.SetDay( nDInterval1 ); - - RECALC_FRQ_MONTHLY_DAILY: - if( nDInterval2 > 1 || bInRecalc ) - { - long nMonth = aNextDate.GetMonth() - 1; - nMonth += nDInterval2; - aNextDate.SetYear( - sal::static_int_cast< USHORT >( - aNextDate.GetYear() + nMonth / 12 ) ); - aNextDate.SetMonth( - sal::static_int_cast< USHORT >( ( nMonth % 12 ) + 1 ) ); - } - - if( aNextDate < aDateToday ) - { - bMissingDate = TRUE; - aMissingDate.SetDate(aNextDate.GetDate()); - aMissingDate.SetTime(_CalcTime(FALSE).GetTime()); - - bInRecalc = TRUE; - SAVE_GOTO( RECALC_FRQ_MONTHLY_DAILY ); - } - - if( aNextDate == aDateToday ) - { - aNextTime = _CalcTime( TRUE ); - if( aNextTime < aTimeToday ) - { - bMissingDate = TRUE; - aMissingDate.SetDate(aNextDate.GetDate()); - aMissingDate.SetTime(_CalcTime(FALSE).GetTime()); - - bInRecalc = TRUE; - SAVE_GOTO( RECALC_FRQ_MONTHLY_DAILY ); - } - } - else - aNextTime = _CalcTime( FALSE ); - } break; - - ////////////////////////////////////////////////////////// - // FRQ_MONTHLY_LOGIC - // - // jeden ersten, zweiten, dritten, vierten oder letzten - // Wochentag jeden X'ten Monats - // nInterval1 = 0 .. 4 - // nInterval2 = WD_SUNDAY | WD_MONDAY | WD_TUESDAY | - // WD_WEDNESDAY | WD_THURSDAY | WD_FRIDAY | - // WD_SATURDAY - // nInterval3 = 1 .. 6 - // - case FRQ_MONTHLY_LOGIC : - { - BOOL bInRecalc = FALSE; - - RECALC_FRQ_MONTHLY_LOGIC: - if( nDInterval3 > 1 || bInRecalc ) - { - long nMonth = aNextDate.GetMonth() - 1; - nMonth += nDInterval3; - aNextDate.SetYear( - sal::static_int_cast< USHORT >( - aNextDate.GetYear() + nMonth / 12 ) ); - aNextDate.SetMonth( - sal::static_int_cast< USHORT >( ( nMonth % 12 ) + 1 ) ); - } - - USHORT nDay; - if( nDInterval2 & WD_SUNDAY ) - nDay = 6; - else if( nDInterval2 & WD_MONDAY ) - nDay = 0; - else if( nDInterval2 & WD_TUESDAY ) - nDay = 1; - else if( nDInterval2 & WD_WEDNESDAY ) - nDay = 2; - else if( nDInterval2 & WD_THURSDAY ) - nDay = 3; - else if( nDInterval2 & WD_FRIDAY ) - nDay = 4; - else nDay = 5; - - if( nDInterval1 == 4 ) - { - DateTime aDT = aNextDate; - aDT.SetDay( 1 ); - aDT += (long)(aNextDate.GetDaysInMonth() - 1); - if( aDT.GetDayOfWeek() != nDay ) - for( aDT--; aDT.GetDayOfWeek() != nDay; aDT-- ) ; - aNextDate = aDT; - } - else - { - DateTime aDT = aNextDate; - aDT.SetDay( 1 ); - aDT += (long)(nDay - USHORT(aDT.GetDayOfWeek())); - if( aDT.GetMonth() != aNextDate.GetMonth() ) - aDT += 7L; - aDT += (long)(nDInterval1 * 7); - aNextDate = aDT; - } - - if( aNextDate < aDateToday ) - { - bMissingDate = TRUE; - aMissingDate.SetDate(aNextDate.GetDate()); - aMissingDate.SetTime(_CalcTime(FALSE).GetTime()); - - bInRecalc = TRUE; - SAVE_GOTO( RECALC_FRQ_MONTHLY_LOGIC ); - } - - if( aNextDate == aDateToday ) - { - aNextTime = _CalcTime( TRUE ); - if( aNextTime < aTimeToday ) - { - bMissingDate = TRUE; - aMissingDate.SetDate(aNextDate.GetDate()); - aMissingDate.SetTime(_CalcTime(FALSE).GetTime()); - - bInRecalc = TRUE; - SAVE_GOTO( RECALC_FRQ_MONTHLY_LOGIC ); - } - } - else - aNextTime = _CalcTime( FALSE ); - } break; - } - - return DateTime( aNextDate, aNextTime ); -} - diff --git a/svl/source/items/makefile.mk b/svl/source/items/makefile.mk index 525fff0bc90a..d779e16e24d1 100644 --- a/svl/source/items/makefile.mk +++ b/svl/source/items/makefile.mk @@ -43,43 +43,43 @@ ENABLE_EXCEPTIONS=TRUE SLOFILES=\ $(SLO)$/aeitem.obj \ - $(SLO)$/eitem.obj \ - $(SLO)$/flagitem.obj \ - $(SLO)$/globalnameitem.obj \ - $(SLO)$/imageitm.obj \ - $(SLO)$/intitem.obj \ - $(SLO)$/macitem.obj \ - $(SLO)$/poolcach.obj \ - $(SLO)$/ptitem.obj \ - $(SLO)$/rectitem.obj \ - $(SLO)$/rngitem.obj \ - $(SLO)$/stritem.obj \ - $(SLO)$/style.obj \ - $(SLO)$/szitem.obj \ - $(SLO)$/bintitem.obj \ $(SLO)$/cenumitm.obj \ $(SLO)$/cintitem.obj \ $(SLO)$/cntwall.obj \ $(SLO)$/ctypeitm.obj \ $(SLO)$/custritm.obj \ - $(SLO)$/dtritem.obj \ - $(SLO)$/frqitem.obj \ + $(SLO)$/dateitem.obj \ + $(SLO)$/eitem.obj \ + $(SLO)$/flagitem.obj \ + $(SLO)$/globalnameitem.obj \ $(SLO)$/ilstitem.obj \ + $(SLO)$/imageitm.obj \ + $(SLO)$/intitem.obj \ $(SLO)$/itemiter.obj \ $(SLO)$/itempool.obj \ $(SLO)$/itemprop.obj \ $(SLO)$/itemset.obj \ $(SLO)$/lckbitem.obj \ + $(SLO)$/macitem.obj \ + $(SLO)$/poolcach.obj \ $(SLO)$/poolio.obj \ - $(SLO)$/stylepool.obj \ $(SLO)$/poolitem.obj \ + $(SLO)$/ptitem.obj \ + $(SLO)$/rectitem.obj \ + $(SLO)$/rngitem.obj \ $(SLO)$/sfontitm.obj \ $(SLO)$/sitem.obj \ $(SLO)$/slstitm.obj \ - $(SLO)$/tfrmitem.obj \ - $(SLO)$/tresitem.obj \ - $(SLO)$/whiter.obj \ - $(SLO)$/visitem.obj + $(SLO)$/stritem.obj \ + $(SLO)$/style.obj \ + $(SLO)$/stylepool.obj \ + $(SLO)$/szitem.obj \ + $(SLO)$/visitem.obj \ + $(SLO)$/whiter.obj + +SRS1NAME=$(TARGET) +SRC1FILES=\ + cstitem.src # --- Targets ------------------------------------------------------- diff --git a/svl/source/items/tfrmitem.cxx b/svl/source/items/tfrmitem.cxx deleted file mode 100644 index 636b3e9eb0a1..000000000000 --- a/svl/source/items/tfrmitem.cxx +++ /dev/null @@ -1,184 +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: tfrmitem.cxx,v $ - * $Revision: 1.8 $ - * - * 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_svl.hxx" -#include <com/sun/star/uno/Any.hxx> - -#include <tools/stream.hxx> -#include <tools/debug.hxx> -#include <tools/string.hxx> - -#include <svl/tfrmitem.hxx> - -DBG_NAME( SfxTargetFrameItem ) -TYPEINIT1( SfxTargetFrameItem, SfxPoolItem ); - -// ----------------------------------------------------------------------- - -SfxTargetFrameItem::SfxTargetFrameItem( USHORT which ) : - SfxPoolItem( which ) -{ - DBG_CTOR( SfxTargetFrameItem, 0 ); -} - -// ----------------------------------------------------------------------- - -SfxTargetFrameItem::SfxTargetFrameItem( const SfxTargetFrameItem& rItem ) : - SfxPoolItem( rItem ) -{ - DBG_CTOR( SfxTargetFrameItem, 0 ); - for( USHORT nCur = 0; nCur <= (USHORT)SfxOpenModeLast; nCur++ ) - _aFrames[nCur] = rItem._aFrames[nCur]; -} - -// ----------------------------------------------------------------------- - -SfxTargetFrameItem::SfxTargetFrameItem( USHORT which, - const String& rOpenSelectFrame, const String& rOpenOpenFrame, - const String& rOpenAddTaskFrame ) : SfxPoolItem( which ) -{ - DBG_CTOR( SfxTargetFrameItem, 0 ); - _aFrames[ (USHORT)SfxOpenSelect ] = rOpenSelectFrame; - _aFrames[ (USHORT)SfxOpenOpen ] = rOpenOpenFrame; - _aFrames[ (USHORT)SfxOpenAddTask ] = rOpenAddTaskFrame; -} - -// ----------------------------------------------------------------------- - -SfxTargetFrameItem::~SfxTargetFrameItem() -{ - DBG_DTOR(SfxTargetFrameItem, 0); -} - -// ----------------------------------------------------------------------- - -String SfxTargetFrameItem::GetTargetFrame( SfxOpenMode eMode ) const -{ - DBG_CHKTHIS( SfxTargetFrameItem, 0 ); - if( eMode <= SfxOpenModeLast ) - return _aFrames[ (USHORT)eMode ]; - String aResult; - return aResult; -} - -// ----------------------------------------------------------------------- - -int SfxTargetFrameItem::operator==( const SfxPoolItem& rItem ) const -{ - DBG_CHKTHIS( SfxTargetFrameItem, 0 ); - DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" ); - - for( USHORT nCur = 0; nCur <= (USHORT)SfxOpenModeLast; nCur++ ) - { - if( _aFrames[nCur] != ((const SfxTargetFrameItem&)rItem)._aFrames[nCur] ) - return 0; - } - return 1; -} - -// ----------------------------------------------------------------------- - -SfxPoolItem* SfxTargetFrameItem::Create( SvStream& rStream, USHORT ) const -{ - DBG_CHKTHIS(SfxTargetFrameItem, 0); - SfxTargetFrameItem* pItem = new SfxTargetFrameItem( Which() ); - USHORT nCount = 0; - rStream >> nCount; - for(USHORT nCur=0; nCur<= (USHORT)SfxOpenModeLast && nCount; nCur++,nCount--) - { - readByteString(rStream, pItem->_aFrames[ nCur ]); - } - // die uebriggebliebenen ueberspringen - String aTemp; - while( nCount ) - { - readByteString(rStream, aTemp); - nCount--; - } - return pItem; -} - -// ----------------------------------------------------------------------- - -SvStream& SfxTargetFrameItem::Store( SvStream& rStream, USHORT ) const -{ - DBG_CHKTHIS( SfxTargetFrameItem, 0 ); - USHORT nCount = (USHORT)(SfxOpenModeLast+1); - rStream << nCount; - for( USHORT nCur = 0; nCur <= (USHORT)SfxOpenModeLast; nCur++ ) - { - writeByteString(rStream, _aFrames[ nCur ]); - } - return rStream; -} - -// ----------------------------------------------------------------------- - -SfxPoolItem* SfxTargetFrameItem::Clone( SfxItemPool* ) const -{ - DBG_CHKTHIS( SfxTargetFrameItem, 0 ); - return new SfxTargetFrameItem( *this ); -} - -// ----------------------------------------------------------------------- -// virtual -BOOL SfxTargetFrameItem::QueryValue( com::sun::star::uno::Any& rVal,BYTE ) const -{ - String aVal; - for ( int i = 0; i <= SfxOpenModeLast; i++ ) - { - aVal += _aFrames[ i ]; - aVal += ';' ; - } - - rVal <<= rtl::OUString( aVal ); - return TRUE; -} - -// ----------------------------------------------------------------------- -// virtual -BOOL SfxTargetFrameItem::PutValue( const com::sun::star::uno::Any& rVal,BYTE ) -{ - rtl::OUString aValue; - if ( rVal >>= aValue ) - { - const String aVal( aValue ); - - for ( USHORT i = 0; i <= SfxOpenModeLast; i++ ) - _aFrames[ i ] = aVal.GetToken( i ); - - return TRUE; - } - - DBG_ERROR( "SfxTargetFrameItem::PutValue - Wrong type!" ); - return FALSE; -} - diff --git a/svl/source/items/tresitem.cxx b/svl/source/items/tresitem.cxx deleted file mode 100644 index 3fdf3f750180..000000000000 --- a/svl/source/items/tresitem.cxx +++ /dev/null @@ -1,78 +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: tresitem.cxx,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. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_svl.hxx" -#include <svl/tresitem.hxx> - -using namespace com::sun::star; - -//============================================================================ -// -// CntTransferResultItem -// -//============================================================================ - -TYPEINIT1_AUTOFACTORY(CntTransferResultItem, SfxPoolItem) - -//============================================================================ -// virtual -int CntTransferResultItem::operator ==(SfxPoolItem const & rItem) const -{ - if (CntTransferResultItem * pResultItem = PTR_CAST(CntTransferResultItem, - &rItem)) - return m_aResult.Source == pResultItem->m_aResult.Source - && m_aResult.Target == pResultItem->m_aResult.Target - && m_aResult.Result == pResultItem->m_aResult.Result; - return false; -} - -//============================================================================ -// virtual -BOOL CntTransferResultItem::QueryValue(uno::Any & rVal, BYTE) const -{ - rVal <<= m_aResult; - return true; -} - -//============================================================================ -// virtual -BOOL CntTransferResultItem::PutValue(uno::Any const & rVal, BYTE) -{ - return rVal >>= m_aResult; -} - -//============================================================================ -// virtual -SfxPoolItem * CntTransferResultItem::Clone(SfxItemPool *) const -{ - return new CntTransferResultItem(*this); -} - diff --git a/svl/source/numbers/numuno.cxx b/svl/source/numbers/numuno.cxx index e909fb2fd4e8..3cc90998e2dc 100644 --- a/svl/source/numbers/numuno.cxx +++ b/svl/source/numbers/numuno.cxx @@ -35,7 +35,6 @@ #define _ZFORLIST_DECLARE_TABLE -#include <vcl/svapp.hxx> #include <tools/color.hxx> #include <tools/debug.hxx> #include <vos/mutex.hxx> diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index eb867f67fb57..f03ef3f31140 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -59,8 +59,6 @@ #include "numhead.hxx" #include <unotools/syslocaleoptions.hxx> -#include "listener.hxx" -#include <svl/smplhint.hxx> #include <unotools/digitgroupingiterator.hxx> #include <rtl/logfile.hxx> #include <rtl/instance.hxx> @@ -120,7 +118,7 @@ public: sal_uInt32 Count() { return aFormatters.Count(); } - virtual void ConfigurationChanged( utl::ConfigurationBroadcaster* ); + virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 ); }; @@ -137,9 +135,9 @@ SvNumberFormatterRegistry_Impl::~SvNumberFormatterRegistry_Impl() } -void SvNumberFormatterRegistry_Impl::ConfigurationChanged( utl::ConfigurationBroadcaster* ) +void SvNumberFormatterRegistry_Impl::ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 nHint ) { - //if ( pHint->GetId() & SYSLOCALEOPTIONS_HINT_LOCALE ) + if ( nHint & SYSLOCALEOPTIONS_HINT_LOCALE ) { ::osl::MutexGuard aGuard( SvNumberFormatter::GetMutex() ); for ( SvNumberFormatter* p = (SvNumberFormatter*)aFormatters.First(); @@ -149,7 +147,7 @@ void SvNumberFormatterRegistry_Impl::ConfigurationChanged( utl::ConfigurationBro } eSysLanguage = MsLangId::getRealLanguage( LANGUAGE_SYSTEM ); } - //if ( pHint->GetId() & SYSLOCALEOPTIONS_HINT_CURRENCY ) + if ( nHint & SYSLOCALEOPTIONS_HINT_CURRENCY ) { ::osl::MutexGuard aGuard( SvNumberFormatter::GetMutex() ); for ( SvNumberFormatter* p = (SvNumberFormatter*)aFormatters.First(); diff --git a/svl/source/passwordcontainer/syscreds.cxx b/svl/source/passwordcontainer/syscreds.cxx index ae43c1c70e6b..faf086e369bd 100644 --- a/svl/source/passwordcontainer/syscreds.cxx +++ b/svl/source/passwordcontainer/syscreds.cxx @@ -59,6 +59,11 @@ void SysCredentialsConfigItem::Notify( m_pOwner->persistentConfigChanged(); } +void SysCredentialsConfigItem::Commit() +{ + // does nothing +} + uno::Sequence< rtl::OUString > SysCredentialsConfigItem::getSystemCredentialsURLs() { diff --git a/svl/source/passwordcontainer/syscreds.hxx b/svl/source/passwordcontainer/syscreds.hxx index b037e17c348e..68de21049fdc 100644 --- a/svl/source/passwordcontainer/syscreds.hxx +++ b/svl/source/passwordcontainer/syscreds.hxx @@ -49,7 +49,7 @@ class SysCredentialsConfigItem : public utl::ConfigItem virtual void Notify( const com::sun::star::uno::Sequence< rtl::OUString > & seqPropertyNames ); - //virtual void Commit(); + virtual void Commit(); com::sun::star::uno::Sequence< rtl::OUString > getSystemCredentialsURLs(); diff --git a/svl/util/makefile.mk b/svl/util/makefile.mk index 522e1b3c0a3c..36e1d3f63852 100644 --- a/svl/util/makefile.mk +++ b/svl/util/makefile.mk @@ -68,6 +68,7 @@ LIB1FILES= \ RESLIB1NAME= $(RESTARGETSIMPLE) RESLIB1SRSFILES=\ + $(SRS)$/items.srs \ $(SRS)$/misc.srs # build the shared library -------------------------------------------------- @@ -85,7 +86,6 @@ SHL1STDLIBS= \ $(CPPUHELPERLIB) \ $(CPPULIB) \ $(VOSLIB) \ - $(VCLLIB) \ $(SOTLIB) \ $(SALLIB) diff --git a/svtools/bmpmaker/bmp.cxx b/svtools/bmpmaker/bmp.cxx index df20c7e05376..b91dae79bbad 100644 --- a/svtools/bmpmaker/bmp.cxx +++ b/svtools/bmpmaker/bmp.cxx @@ -43,7 +43,7 @@ using namespace std; #include <vcl/svapp.hxx> -#include "svtools/solar.hrc" +#include "svl/solar.hrc" #include "filedlg.hxx" #include "bmpcore.hxx" #include "bmp.hrc" diff --git a/svtools/bmpmaker/bmpsum.cxx b/svtools/bmpmaker/bmpsum.cxx index 0633eb4c6a09..3eee49ef695d 100644 --- a/svtools/bmpmaker/bmpsum.cxx +++ b/svtools/bmpmaker/bmpsum.cxx @@ -45,7 +45,7 @@ #include <vcl/bmpacc.hxx> #include <vcl/pngread.hxx> -#include "svtools/solar.hrc" +#include "svl/solar.hrc" #define EXIT_NOERROR 0x00000000 #define EXIT_INVALIDFILE 0x00000001 diff --git a/svtools/inc/apearcfg.hxx b/svtools/inc/apearcfg.hxx index 1123eb839eff..412faab3107b 100644 --- a/svtools/inc/apearcfg.hxx +++ b/svtools/inc/apearcfg.hxx @@ -87,6 +87,7 @@ public: ~SvtTabAppearanceCfg( ); virtual void Commit(); + virtual void Notify( const com::sun::star::uno::Sequence< rtl::OUString >& _rPropertyNames); USHORT GetLookNFeel () const { return nLookNFeel; } void SetLookNFeel ( USHORT nSet ); diff --git a/svtools/inc/extcolorcfg.hxx b/svtools/inc/extcolorcfg.hxx index f8154c86f88f..228ef9823fd2 100644 --- a/svtools/inc/extcolorcfg.hxx +++ b/svtools/inc/extcolorcfg.hxx @@ -34,8 +34,8 @@ #include <rtl/ustring.hxx> #include <tools/color.hxx> #include <com/sun/star/uno/Sequence.h> -#include <svtools/brdcst.hxx> -#include <svtools/lstner.hxx> +#include <svl/brdcst.hxx> +#include <svl/lstner.hxx> //----------------------------------------------------------------------------- namespace svtools{ diff --git a/svtools/inc/fontsubstconfig.hxx b/svtools/inc/fontsubstconfig.hxx index 7bcb20e509fe..7ce7e64362b5 100644 --- a/svtools/inc/fontsubstconfig.hxx +++ b/svtools/inc/fontsubstconfig.hxx @@ -53,6 +53,7 @@ public: virtual ~SvtFontSubstConfig(); virtual void Commit(); + virtual void Notify( const com::sun::star::uno::Sequence< rtl::OUString >& _rPropertyNames); sal_Bool IsEnabled() const {return bIsEnabled;} void Enable(sal_Bool bSet) {bIsEnabled = bSet; SetModified();} diff --git a/svtools/inc/svtools/accessibilityoptions.hxx b/svtools/inc/svtools/accessibilityoptions.hxx index 00a0efdc1b13..bde908fb1851 100644 --- a/svtools/inc/svtools/accessibilityoptions.hxx +++ b/svtools/inc/svtools/accessibilityoptions.hxx @@ -33,14 +33,14 @@ #include "svtools/svtdllapi.h" #include <unotools/configitem.hxx> #include <tools/string.hxx> -#include <svtools/brdcst.hxx> -#include <svtools/lstner.hxx> +#include <svl/brdcst.hxx> +#include <svl/lstner.hxx> #include <unotools/options.hxx> class SvtAccessibilityOptions_Impl; class SVT_DLLPUBLIC SvtAccessibilityOptions: - public utl::detail::Options, public SfxBroadcaster, private SfxListener + public utl::detail::Options, private SfxListener { private: static SvtAccessibilityOptions_Impl* volatile sm_pSingleImplConfig; diff --git a/svtools/inc/svtools/colorcfg.hxx b/svtools/inc/svtools/colorcfg.hxx index 98152e80b7c3..dd3ba4018280 100644 --- a/svtools/inc/svtools/colorcfg.hxx +++ b/svtools/inc/svtools/colorcfg.hxx @@ -34,8 +34,8 @@ #include <rtl/ustring.hxx> #include <tools/color.hxx> #include <com/sun/star/uno/Sequence.h> -#include <svtools/brdcst.hxx> -#include <svtools/lstner.hxx> +#include <svl/brdcst.hxx> +#include <svl/lstner.hxx> #include <unotools/options.hxx> //----------------------------------------------------------------------------- @@ -108,7 +108,7 @@ struct ColorConfigValue ---------------------------------------------------------------------------*/ class SVT_DLLPUBLIC ColorConfig: - public utl::detail::Options, public SfxBroadcaster, public SfxListener + public utl::detail::Options { friend class ColorConfig_Impl; private: @@ -117,12 +117,9 @@ public: ColorConfig(); virtual ~ColorConfig(); - virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); - // get the configured value - if bSmart is set the default color setting is provided // instead of the automatic color ColorConfigValue GetColorValue(ColorConfigEntry eEntry, sal_Bool bSmart = sal_True)const; - static Color GetDefaultColor(ColorConfigEntry eEntry); }; /* -----------------------------22.03.2002 15:31------------------------------ diff --git a/svtools/inc/svtools/fmtfield.hxx b/svtools/inc/svtools/fmtfield.hxx index e2fe243f8399..27e9376ea1c7 100644 --- a/svtools/inc/svtools/fmtfield.hxx +++ b/svtools/inc/svtools/fmtfield.hxx @@ -33,7 +33,7 @@ #include "svtools/svtdllapi.h" #include <vcl/spinfld.hxx> -#include <svtools/zforlist.hxx> +#include <svl/zforlist.hxx> //#define REGEXP_SUPPORT diff --git a/svtools/inc/svtools/helpid.hrc b/svtools/inc/svtools/helpid.hrc index efbb0d2628d9..937898f37af1 100644 --- a/svtools/inc/svtools/helpid.hrc +++ b/svtools/inc/svtools/helpid.hrc @@ -33,7 +33,7 @@ // include --------------------------------------------------------------- -#include <svtools/solar.hrc> +#include <svl/solar.hrc> // Help-Ids -------------------------------------------------------------- diff --git a/svtools/inc/svtools/htmlout.hxx b/svtools/inc/svtools/htmlout.hxx index 1f0b91c3c353..13df12b64ea9 100644 --- a/svtools/inc/svtools/htmlout.hxx +++ b/svtools/inc/svtools/htmlout.hxx @@ -34,7 +34,7 @@ #include "svtools/svtdllapi.h" #include <tools/solar.h> #include <rtl/textenc.h> -#include <svtools/macitem.hxx> +#include <svl/macitem.hxx> class Color; class ImageMap; diff --git a/svtools/inc/svtools/imapobj.hxx b/svtools/inc/svtools/imapobj.hxx index 3671bf50878c..b8da0e5c3ee8 100644 --- a/svtools/inc/svtools/imapobj.hxx +++ b/svtools/inc/svtools/imapobj.hxx @@ -33,7 +33,7 @@ #include "svtools/svtdllapi.h" #include <tools/string.hxx> -#include <svtools/macitem.hxx> +#include <svl/macitem.hxx> class Point; class Rectangle; diff --git a/svtools/inc/svtools/insdlg.hxx b/svtools/inc/svtools/insdlg.hxx index 191c3db68397..9721d55761f0 100644 --- a/svtools/inc/svtools/insdlg.hxx +++ b/svtools/inc/svtools/insdlg.hxx @@ -38,7 +38,7 @@ #include <sot/formats.hxx> #ifndef _OWNCONT_HXX -#include <svtools/ownlist.hxx> +#include <svl/ownlist.hxx> #endif #include <svtools/transfer.hxx> diff --git a/svtools/inc/svtools/parhtml.hxx b/svtools/inc/svtools/parhtml.hxx index f5de6aea358d..e1eb53c6e052 100644 --- a/svtools/inc/svtools/parhtml.hxx +++ b/svtools/inc/svtools/parhtml.hxx @@ -34,7 +34,7 @@ #include "svtools/svtdllapi.h" #include <tools/solar.h> #include <tools/string.hxx> -#include <svtools/svarray.hxx> +#include <svl/svarray.hxx> #include <svtools/svparser.hxx> diff --git a/svtools/inc/svtools/parrtf.hxx b/svtools/inc/svtools/parrtf.hxx index 94e81e798bdf..1882b127ae90 100644 --- a/svtools/inc/svtools/parrtf.hxx +++ b/svtools/inc/svtools/parrtf.hxx @@ -33,7 +33,7 @@ #include "svtools/svtdllapi.h" #include <svtools/svparser.hxx> -#include <svtools/svarray.hxx> +#include <svl/svarray.hxx> struct RtfParserState_Impl { diff --git a/svtools/inc/svtools/svlbox.hxx b/svtools/inc/svtools/svlbox.hxx index 7371c2feee05..a7f385941fc6 100644 --- a/svtools/inc/svtools/svlbox.hxx +++ b/svtools/inc/svtools/svlbox.hxx @@ -52,7 +52,7 @@ #include <vcl/mnemonicengine.hxx> #include <tools/gen.hxx> #include <svtools/treelist.hxx> -#include <svtools/svarray.hxx> +#include <svl/svarray.hxx> #include <svtools/transfer.hxx> class Application; diff --git a/svtools/inc/svtools/syntaxhighlight.hxx b/svtools/inc/svtools/syntaxhighlight.hxx index 27dd28b5b783..c9680821affc 100644 --- a/svtools/inc/svtools/syntaxhighlight.hxx +++ b/svtools/inc/svtools/syntaxhighlight.hxx @@ -40,7 +40,7 @@ #include <tools/stream.hxx> #include <tools/shl.hxx> -#include <svtools/brdcst.hxx> +#include <svl/brdcst.hxx> #include <svtools/svtdllapi.h> @@ -60,7 +60,7 @@ #include <tools/string.hxx> #include <tools/gen.hxx> -#include <svtools/svarray.hxx> +#include <svl/svarray.hxx> // Token-Typen TT_... diff --git a/svtools/inc/svtools/textdata.hxx b/svtools/inc/svtools/textdata.hxx index 5b44b1364492..bd119b63c095 100644 --- a/svtools/inc/svtools/textdata.hxx +++ b/svtools/inc/svtools/textdata.hxx @@ -32,8 +32,8 @@ #define _TEXTDATA_HXX #include "svtools/svtdllapi.h" -#include <svtools/brdcst.hxx> -#include <svtools/smplhint.hxx> +#include <svl/brdcst.hxx> +#include <svl/smplhint.hxx> #include <tools/string.hxx> #define TEXTUNDO_START 100 diff --git a/svtools/inc/svtools/texteng.hxx b/svtools/inc/svtools/texteng.hxx index c1d7746d73c6..e1d64aa42ecd 100644 --- a/svtools/inc/svtools/texteng.hxx +++ b/svtools/inc/svtools/texteng.hxx @@ -54,7 +54,7 @@ class Timer; class TextLine; class TETextPortion; -#include <svtools/brdcst.hxx> +#include <svl/brdcst.hxx> #include <tools/link.hxx> #include <vcl/font.hxx> #include <tools/string.hxx> diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx index 086e00674a8e..a6e47765eb06 100644 --- a/svtools/source/brwbox/editbrowsebox.cxx +++ b/svtools/source/brwbox/editbrowsebox.cxx @@ -50,7 +50,7 @@ #include <svtools/svtdata.hxx> #ifndef _SVTOOLS_HRC -#include <svtools/svtools.hrc> +#include <svl/svtools.hrc> #endif #include <algorithm> diff --git a/svtools/source/brwbox/editbrowsebox.src b/svtools/source/brwbox/editbrowsebox.src index 39991363c906..c04e1294c0af 100644 --- a/svtools/source/brwbox/editbrowsebox.src +++ b/svtools/source/brwbox/editbrowsebox.src @@ -33,7 +33,7 @@ #endif #ifndef _SVTOOLS_HRC -#include <svtools/svtools.hrc> +#include <svl/svtools.hrc> #endif ImageList RID_SVTOOLS_IMAGELIST_EDITBROWSEBOX diff --git a/svtools/source/config/accessibilityoptions.cxx b/svtools/source/config/accessibilityoptions.cxx index 147d0fea5c59..4077231c5c84 100644 --- a/svtools/source/config/accessibilityoptions.cxx +++ b/svtools/source/config/accessibilityoptions.cxx @@ -55,7 +55,7 @@ #include <unotools/loghelper.hxx> #endif -#include <svtools/smplhint.hxx> +#include <svl/smplhint.hxx> #include <vcl/settings.hxx> #include <vcl/svapp.hxx> @@ -539,7 +539,7 @@ SvtAccessibilityOptions::~SvtAccessibilityOptions() void SvtAccessibilityOptions::Notify( SfxBroadcaster&, const SfxHint& rHint ) { - Broadcast( rHint ); + NotifyListeners(0); if ( rHint.IsA(TYPE(SfxSimpleHint)) ) { if ( ((SfxSimpleHint&)rHint).GetId() == SFX_HINT_ACCESSIBILITY_CHANGED ) diff --git a/svtools/source/config/apearcfg.cxx b/svtools/source/config/apearcfg.cxx index ccfc402ac221..0d4865ee563e 100644 --- a/svtools/source/config/apearcfg.cxx +++ b/svtools/source/config/apearcfg.cxx @@ -171,6 +171,11 @@ void SvtTabAppearanceCfg::Commit() } PutProperties(rNames, aValues); } + +void SvtTabAppearanceCfg::Notify( const com::sun::star::uno::Sequence< rtl::OUString >& ) +{ +} + /*-------------------------------------------------------------------- Beschreibung: --------------------------------------------------------------------*/ diff --git a/svtools/source/config/colorcfg.cxx b/svtools/source/config/colorcfg.cxx index f600be830b41..9008d7a27ee1 100644 --- a/svtools/source/config/colorcfg.cxx +++ b/svtools/source/config/colorcfg.cxx @@ -41,8 +41,8 @@ #include <unotools/configitem.hxx> #include <unotools/configpathes.hxx> #include <com/sun/star/uno/Sequence.h> -#include <svtools/poolitem.hxx> //Any2Bool -#include <svtools/smplhint.hxx> +#include <svl/poolitem.hxx> //Any2Bool +#include <svl/smplhint.hxx> #include <vos/mutex.hxx> #include <itemholder2.hxx> @@ -76,15 +76,12 @@ ColorConfig_Impl* ColorConfig::m_pImpl = NULL; /* -----------------------------16.01.01 15:36-------------------------------- ---------------------------------------------------------------------------*/ -class ColorConfig_Impl : public utl::ConfigItem, public SfxBroadcaster +class ColorConfig_Impl : public utl::ConfigItem { ColorConfigValue m_aConfigValues[ColorConfigEntryCount]; sal_Bool m_bEditMode; rtl::OUString m_sIsVisible; rtl::OUString m_sLoadedScheme; - sal_Bool m_bIsBroadcastEnabled; - static sal_Bool m_bLockBroadcast; - static sal_Bool m_bBroadcastWhenUnlocked; uno::Sequence< ::rtl::OUString> GetPropertyNames(const rtl::OUString& rScheme); public: @@ -113,13 +110,6 @@ public: void ClearModified(){ConfigItem::ClearModified();} void SettingsChanged(); - static void DisableBroadcast(); - static void EnableBroadcast(); - static sal_Bool IsEnableBroadcast(); - - static void LockBroadcast(); - static void UnlockBroadcast(); - // #100822# DECL_LINK( DataChangedEventListener, VclWindowEvent* ); @@ -214,13 +204,10 @@ uno::Sequence< OUString> ColorConfig_Impl::GetPropertyNames(const rtl::OUString& /* -----------------------------22.03.2002 14:37------------------------------ ---------------------------------------------------------------------------*/ -sal_Bool ColorConfig_Impl::m_bLockBroadcast = sal_False; -sal_Bool ColorConfig_Impl::m_bBroadcastWhenUnlocked = sal_False; ColorConfig_Impl::ColorConfig_Impl(sal_Bool bEditMode) : ConfigItem(C2U("Office.UI/ColorScheme")), m_bEditMode(bEditMode), - m_sIsVisible(C2U("/IsVisible")), - m_bIsBroadcastEnabled(sal_True) + m_sIsVisible(C2U("/IsVisible")) { if(!m_bEditMode) { @@ -244,23 +231,6 @@ ColorConfig_Impl::~ColorConfig_Impl() // #100822# ::Application::RemoveEventListener( LINK(this, ColorConfig_Impl, DataChangedEventListener) ); } -// ----------------------------------------------------------------------------- -void ColorConfig_Impl::DisableBroadcast() -{ - if ( ColorConfig::m_pImpl ) - ColorConfig::m_pImpl->m_bIsBroadcastEnabled = sal_False; -} -// ----------------------------------------------------------------------------- -void ColorConfig_Impl::EnableBroadcast() -{ - if ( ColorConfig::m_pImpl ) - ColorConfig::m_pImpl->m_bIsBroadcastEnabled = sal_True; -} -// ----------------------------------------------------------------------------- -sal_Bool ColorConfig_Impl::IsEnableBroadcast() -{ - return ColorConfig::m_pImpl ? ColorConfig::m_pImpl->m_bIsBroadcastEnabled : sal_False; -} /* -----------------------------22.03.2002 14:38------------------------------ ---------------------------------------------------------------------------*/ @@ -303,16 +273,7 @@ void ColorConfig_Impl::Notify( const uno::Sequence<OUString>& ) { //loading via notification always uses the default setting Load(::rtl::OUString()); - - vos::OGuard aVclGuard( Application::GetSolarMutex() ); - - if(m_bLockBroadcast) - { - m_bBroadcastWhenUnlocked = sal_True; - ImplUpdateApplicationSettings(); - } - else - Broadcast(SfxSimpleHint(SFX_HINT_COLORS_CHANGED)); + NotifyListeners(0); } /* -----------------------------22.03.2002 14:38------------------------------ @@ -409,34 +370,7 @@ void ColorConfig_Impl::SettingsChanged() ImplUpdateApplicationSettings(); - Broadcast( SfxSimpleHint( SFX_HINT_COLORS_CHANGED ) ); -} -/* -----------------11.12.2002 09:21----------------- - * - * --------------------------------------------------*/ -void ColorConfig_Impl::LockBroadcast() -{ - m_bLockBroadcast = sal_True; -} -/* -----------------11.12.2002 09:21----------------- - * - * --------------------------------------------------*/ -void ColorConfig_Impl::UnlockBroadcast() -{ - if ( m_bBroadcastWhenUnlocked ) - { - m_bBroadcastWhenUnlocked = ColorConfig::m_pImpl != NULL; - if ( m_bBroadcastWhenUnlocked ) - { - ColorConfig::m_pImpl->ImplUpdateApplicationSettings(); - if ( ColorConfig::m_pImpl->IsEnableBroadcast() ) - { - m_bBroadcastWhenUnlocked = sal_False; - ColorConfig::m_pImpl->Broadcast(SfxSimpleHint(SFX_HINT_COLORS_CHANGED)); - } - } - } - m_bLockBroadcast = sal_False; + NotifyListeners(0); } /* -----------------------------2002/08/16 12:07 ----------------------------- #100822# @@ -495,7 +429,7 @@ ColorConfig::ColorConfig() ItemHolder2::holdConfigItem(E_COLORCFG); } ++nColorRefCount_Impl; - StartListening( *m_pImpl); + m_pImpl->AddListener(this); } /* -----------------------------16.01.01 15:36-------------------------------- @@ -503,7 +437,7 @@ ColorConfig::ColorConfig() ColorConfig::~ColorConfig() { ::osl::MutexGuard aGuard( ColorMutex_Impl::get() ); - EndListening( *m_pImpl); + m_pImpl->RemoveListener(this); if(!--nColorRefCount_Impl) { delete m_pImpl; @@ -631,15 +565,6 @@ ColorConfigValue ColorConfig::GetColorValue(ColorConfigEntry eEntry, sal_Bool bS return aRet; } -/* -----------------------------12.04.2002 09:25------------------------------ - - ---------------------------------------------------------------------------*/ -void ColorConfig::Notify( SfxBroadcaster&, const SfxHint& rHint ) -{ - vos::OGuard aVclGuard( Application::GetSolarMutex() ); - - Broadcast( rHint ); -} /* -----------------------------25.03.2002 12:01------------------------------ ---------------------------------------------------------------------------*/ @@ -647,14 +572,14 @@ EditableColorConfig::EditableColorConfig() : m_pImpl(new ColorConfig_Impl), m_bModified(sal_False) { - m_pImpl->LockBroadcast(); + m_pImpl->BlockBroadcasts(TRUE); } /*-- 25.03.2002 12:03:08--------------------------------------------------- -----------------------------------------------------------------------*/ EditableColorConfig::~EditableColorConfig() { - m_pImpl->UnlockBroadcast(); + m_pImpl->BlockBroadcasts(FALSE); if(m_bModified) m_pImpl->SetModified(); if(m_pImpl->IsModified()) @@ -752,12 +677,12 @@ void EditableColorConfig::Commit() // ----------------------------------------------------------------------------- void EditableColorConfig::DisableBroadcast() { - m_pImpl->DisableBroadcast(); + m_pImpl->BlockBroadcasts(TRUE); } // ----------------------------------------------------------------------------- void EditableColorConfig::EnableBroadcast() { - m_pImpl->EnableBroadcast(); + m_pImpl->BlockBroadcasts(FALSE); } // ----------------------------------------------------------------------------- diff --git a/svtools/source/config/extcolorcfg.cxx b/svtools/source/config/extcolorcfg.cxx index 66dfd8af1ebb..89bf41ac9f58 100644 --- a/svtools/source/config/extcolorcfg.cxx +++ b/svtools/source/config/extcolorcfg.cxx @@ -40,8 +40,8 @@ #include <unotools/configitem.hxx> #include <unotools/configpathes.hxx> #include <com/sun/star/uno/Sequence.h> -#include <svtools/poolitem.hxx> //Any2Bool -#include <svtools/smplhint.hxx> +#include <svl/poolitem.hxx> //Any2Bool +#include <svl/smplhint.hxx> #include <vos/mutex.hxx> /* #100822# ---- diff --git a/svtools/source/config/fontsubstconfig.cxx b/svtools/source/config/fontsubstconfig.cxx index 4d1c9b7db5c5..dc9bfa64e6d4 100644 --- a/svtools/source/config/fontsubstconfig.cxx +++ b/svtools/source/config/fontsubstconfig.cxx @@ -32,7 +32,7 @@ #include "precompiled_svtools.hxx" #include "fontsubstconfig.hxx" -#include <svtools/svarray.hxx> +#include <svl/svarray.hxx> #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/uno/Any.hxx> #include <com/sun/star/uno/Sequence.hxx> @@ -124,6 +124,10 @@ SvtFontSubstConfig::~SvtFontSubstConfig() /*-- 18.01.01 12:08:00--------------------------------------------------- -----------------------------------------------------------------------*/ +void SvtFontSubstConfig::Notify( const com::sun::star::uno::Sequence< rtl::OUString >& ) +{ +} + void SvtFontSubstConfig::Commit() { Sequence<OUString> aNames(1); diff --git a/svtools/source/config/optionsdrawinglayer.cxx b/svtools/source/config/optionsdrawinglayer.cxx index abb044c7863e..d4aeda6e6be8 100644 --- a/svtools/source/config/optionsdrawinglayer.cxx +++ b/svtools/source/config/optionsdrawinglayer.cxx @@ -191,6 +191,7 @@ public: //--------------------------------------------------------------------------------------------------------- virtual void Commit(); + virtual void Notify( const com::sun::star::uno::Sequence<rtl::OUString>& aPropertyNames); //--------------------------------------------------------------------------------------------------------- // public interface @@ -735,6 +736,10 @@ void SvtOptionsDrawinglayer_Impl::Commit() PutProperties( aSeqNames, aSeqValues ); } +void SvtOptionsDrawinglayer_Impl::Notify( const com::sun::star::uno::Sequence<rtl::OUString>& ) +{ +} + //***************************************************************************************************************** // public method //***************************************************************************************************************** diff --git a/svtools/source/contnr/contentenumeration.cxx b/svtools/source/contnr/contentenumeration.cxx index af379db9b12b..a0e6b353dfb6 100644 --- a/svtools/source/contnr/contentenumeration.cxx +++ b/svtools/source/contnr/contentenumeration.cxx @@ -31,7 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" #include "contentenumeration.hxx" -#include <svtools/urlfilter.hxx> +#include <svl/urlfilter.hxx> #include <svtools/inettbc.hxx> #include "imagemgr.hxx" diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx index 274557051c27..cea28d2d2fb5 100644 --- a/svtools/source/contnr/fileview.cxx +++ b/svtools/source/contnr/fileview.cxx @@ -37,7 +37,7 @@ #include <svtools/headbar.hxx> #include <svtools/svtabbx.hxx> -#include <svtools/svtools.hrc> +#include <svl/svtools.hrc> #include "fileview.hrc" #include "contentenumeration.hxx" #include <svtools/AccessibleBrowseBoxObjType.hxx> @@ -78,8 +78,8 @@ #include <vcl/sound.hxx> #include <unotools/ucbhelper.hxx> #include <unotools/intlwrapper.hxx> -#include <svtools/syslocale.hxx> -#include <svtools/urlfilter.hxx> +#include <unotools/syslocale.hxx> +#include <svl/urlfilter.hxx> using namespace ::com::sun::star::lang; using namespace ::com::sun::star::sdbc; diff --git a/svtools/source/contnr/fileview.src b/svtools/source/contnr/fileview.src index c86db1ce418a..9d1cdb618cda 100644 --- a/svtools/source/contnr/fileview.src +++ b/svtools/source/contnr/fileview.src @@ -30,7 +30,7 @@ // includes ------------------------------------------------------------------ -#include <svtools/svtools.hrc> +#include <svl/svtools.hrc> #include "fileview.hrc" #include <svtools/helpid.hrc> diff --git a/svtools/source/contnr/imivctl.hxx b/svtools/source/contnr/imivctl.hxx index d4ec597aebfc..d443beb7fff9 100644 --- a/svtools/source/contnr/imivctl.hxx +++ b/svtools/source/contnr/imivctl.hxx @@ -45,7 +45,7 @@ #include <limits.h> #include "ivctrl.hxx" -#include <svtools/svarray.hxx> +#include <svl/svarray.hxx> class IcnCursor_Impl; class SvtIconChoiceCtrl; diff --git a/svtools/source/contnr/svcontnr.src b/svtools/source/contnr/svcontnr.src index c26c906eb3f6..f81bc3fdfa9b 100644 --- a/svtools/source/contnr/svcontnr.src +++ b/svtools/source/contnr/svcontnr.src @@ -28,7 +28,7 @@ * ************************************************************************/ -#include <svtools/svtools.hrc> +#include <svl/svtools.hrc> Image RID_IMG_TREENODE_COLLAPSED { diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx index e17b81e548a9..f2674279f4df 100644 --- a/svtools/source/contnr/svimpbox.cxx +++ b/svtools/source/contnr/svimpbox.cxx @@ -50,7 +50,7 @@ #include <svtools/svtdata.hxx> #ifndef _SVTOOLS_HRC -#include <svtools/svtools.hrc> +#include <svl/svtools.hrc> #endif // #102891# -------------------- diff --git a/svtools/source/contnr/svimpicn.cxx b/svtools/source/contnr/svimpicn.cxx index 37ee096dc6d9..8d7a79701d27 100644 --- a/svtools/source/contnr/svimpicn.cxx +++ b/svtools/source/contnr/svimpicn.cxx @@ -46,7 +46,7 @@ #ifndef _SVLBITM_HXX #include <svtools/svlbitm.hxx> #endif -#include <svtools/svarray.hxx> +#include <svl/svarray.hxx> diff --git a/svtools/source/contnr/svlbox.cxx b/svtools/source/contnr/svlbox.cxx index e56db398b8fb..77a9a3798d6d 100644 --- a/svtools/source/contnr/svlbox.cxx +++ b/svtools/source/contnr/svlbox.cxx @@ -48,7 +48,7 @@ #include <rtl/instance.hxx> #define _SVSTDARR_ULONGSSORT -#include <svtools/svstdarr.hxx> +#include <svl/svstdarr.hxx> #ifndef _SVEDI_HXX #include <svtools/svmedit.hxx> diff --git a/svtools/source/contnr/svtabbx.cxx b/svtools/source/contnr/svtabbx.cxx index 1770810c7a5d..3b4907e7a80d 100644 --- a/svtools/source/contnr/svtabbx.cxx +++ b/svtools/source/contnr/svtabbx.cxx @@ -34,7 +34,7 @@ #include <svtools/headbar.hxx> #include <svtools/svtdata.hxx> #ifndef _SVTOOLS_HRC -#include <svtools/svtools.hrc> +#include <svl/svtools.hrc> #endif #include <com/sun/star/accessibility/AccessibleStateType.hpp> #include <com/sun/star/accessibility/AccessibleEventId.hpp> diff --git a/svtools/source/contnr/templwin.cxx b/svtools/source/contnr/templwin.cxx index 7c386b33dc82..28d541513cff 100644 --- a/svtools/source/contnr/templwin.cxx +++ b/svtools/source/contnr/templwin.cxx @@ -37,14 +37,14 @@ #include <unotools/dynamicmenuoptions.hxx> #include <unotools/extendedsecurityoptions.hxx> #include <svtools/xtextedt.hxx> -#include <svtools/inettype.hxx> +#include <svl/inettype.hxx> #include "imagemgr.hxx" #include <svtools/miscopt.hxx> #include "templatefoldercache.hxx" #include "imgdef.hxx" #include "txtattr.hxx" #ifndef _SVTOOLS_HRC -#include <svtools/svtools.hrc> +#include <svl/svtools.hrc> #endif #ifndef _SVTOOLS_TEMPLWIN_HRC #include "templwin.hrc" diff --git a/svtools/source/contnr/templwin.hxx b/svtools/source/contnr/templwin.hxx index bd3eb4afd5dd..050ba7ab6739 100644 --- a/svtools/source/contnr/templwin.hxx +++ b/svtools/source/contnr/templwin.hxx @@ -38,7 +38,7 @@ #include "fileview.hxx" #include "ivctrl.hxx" #include <svtools/svmedit2.hxx> -#include <svtools/restrictedpaths.hxx> +#include <svl/restrictedpaths.hxx> #include <com/sun/star/frame/XDispatch.hpp> #include <com/sun/star/lang/Locale.hpp> diff --git a/svtools/source/contnr/templwin.src b/svtools/source/contnr/templwin.src index 30149de4da14..f7f42b7e176b 100644 --- a/svtools/source/contnr/templwin.src +++ b/svtools/source/contnr/templwin.src @@ -33,7 +33,7 @@ #include "templwin.hrc" #include "controldims.hrc" #include <svtools/helpid.hrc> -#include <svtools/svtools.hrc> +#include <svl/svtools.hrc> // Magenta and Grey as mask colors #define MASK_COL_MAGENTA Color { Red = 0xFFFF ; Green = 0x0000 ; Blue = 0xFFFF ; }; diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx index 8ff008eaf7e4..481f6f2ceeae 100644 --- a/svtools/source/control/calendar.cxx +++ b/svtools/source/control/calendar.cxx @@ -62,7 +62,7 @@ #include <com/sun/star/i18n/CalendarFieldIndex.hpp> #define _SV_CALENDAR_CXX -#include <svtools/svtools.hrc> +#include <svl/svtools.hrc> #include <svtools/svtdata.hxx> #include <calendar.hxx> diff --git a/svtools/source/control/calendar.src b/svtools/source/control/calendar.src index 44bffd361847..043dd9808663 100644 --- a/svtools/source/control/calendar.src +++ b/svtools/source/control/calendar.src @@ -28,7 +28,7 @@ * ************************************************************************/ -#include <svtools/svtools.hrc> +#include <svl/svtools.hrc> String STR_SVT_CALENDAR_DAY { Text [ en-US ] = "Day" ; diff --git a/svtools/source/control/collatorres.cxx b/svtools/source/control/collatorres.cxx index 692d470b8f5b..c976d7442bc0 100644 --- a/svtools/source/control/collatorres.cxx +++ b/svtools/source/control/collatorres.cxx @@ -32,7 +32,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" #include <svtools/svtdata.hxx> -#include <svtools/svtools.hrc> +#include <svl/svtools.hrc> #include <collatorres.hxx> diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index 5be239a5593e..1ba8af0c8dca 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -43,7 +43,7 @@ #include <unotools/charclass.hxx> #include <svtools/svtdata.hxx> -#include <svtools/svtools.hrc> +#include <svl/svtools.hrc> #include <ctrlbox.hxx> #include <ctrltool.hxx> diff --git a/svtools/source/control/ctrlbox.src b/svtools/source/control/ctrlbox.src index 5cfee79e5f11..05c75577cdbf 100644 --- a/svtools/source/control/ctrlbox.src +++ b/svtools/source/control/ctrlbox.src @@ -27,7 +27,7 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#include <svtools/svtools.hrc> +#include <svl/svtools.hrc> #ifndef IMAGE_STDBTN_COLOR #define IMAGE_STDBTN_COLOR Color { Red = 0xFFFF; Green = 0x0000; Blue = 0xFFFF; } diff --git a/svtools/source/control/ctrltool.cxx b/svtools/source/control/ctrltool.cxx index 77bb996584bd..1573ed531662 100644 --- a/svtools/source/control/ctrltool.cxx +++ b/svtools/source/control/ctrltool.cxx @@ -45,7 +45,7 @@ #include <vcl/svapp.hxx> #include <vcl/wrkwin.hxx> -#include <svtools/svtools.hrc> +#include <svl/svtools.hrc> #include <svtools/svtdata.hxx> #include <ctrltool.hxx> diff --git a/svtools/source/control/ctrltool.src b/svtools/source/control/ctrltool.src index 267a65e98517..ab8005cd9698 100644 --- a/svtools/source/control/ctrltool.src +++ b/svtools/source/control/ctrltool.src @@ -27,7 +27,7 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#include <svtools/svtools.hrc> +#include <svl/svtools.hrc> String STR_SVT_STYLE_LIGHT { diff --git a/svtools/source/control/fileurlbox.cxx b/svtools/source/control/fileurlbox.cxx index 3ba69e826e1c..554f713fd4d6 100644 --- a/svtools/source/control/fileurlbox.cxx +++ b/svtools/source/control/fileurlbox.cxx @@ -32,7 +32,7 @@ #include "precompiled_svtools.hxx" #include <svtools/fileurlbox.hxx> #include <osl/file.h> -#include "svtools/filenotation.hxx" +#include "svl/filenotation.hxx" //......................................................................... namespace svt diff --git a/svtools/source/control/fmtfield.cxx b/svtools/source/control/fmtfield.cxx index 387c1db34fc1..bbf00329cf93 100644 --- a/svtools/source/control/fmtfield.cxx +++ b/svtools/source/control/fmtfield.cxx @@ -36,7 +36,7 @@ #include <comphelper/processfactory.hxx> #include <unotools/localedatawrapper.hxx> #include <vcl/svapp.hxx> -#include <svtools/zformat.hxx> +#include <svl/zformat.hxx> #include <svtools/fmtfield.hxx> #include <i18npool/mslangid.hxx> #include <com/sun/star/lang/Locale.hpp> @@ -45,7 +45,7 @@ #include <com/sun/star/util/SearchResult.hpp> #include <com/sun/star/util/SearchFlags.hpp> #include <com/sun/star/lang/Locale.hpp> -#include <svtools/syslocale.hxx> +#include <unotools/syslocale.hxx> #ifndef REGEXP_SUPPORT #include <map> diff --git a/svtools/source/control/indexentryres.cxx b/svtools/source/control/indexentryres.cxx index 49096144b215..f69e9b34e5ea 100644 --- a/svtools/source/control/indexentryres.cxx +++ b/svtools/source/control/indexentryres.cxx @@ -32,7 +32,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" #include <svtools/svtdata.hxx> -#include <svtools/svtools.hrc> +#include <svl/svtools.hrc> #include <indexentryres.hxx> diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx index 89f4a988aec2..b4904afee418 100644 --- a/svtools/source/control/inettbc.cxx +++ b/svtools/source/control/inettbc.cxx @@ -67,15 +67,15 @@ #endif #include <vcl/svapp.hxx> #include <unotools/historyoptions.hxx> -#include <svtools/eitem.hxx> -#include <svtools/stritem.hxx> -#include <svtools/cancel.hxx> -#include <svtools/itemset.hxx> -#include "svtools/urihelper.hxx" +#include <svl/eitem.hxx> +#include <svl/stritem.hxx> +#include <svl/cancel.hxx> +#include <svl/itemset.hxx> +#include "svl/urihelper.hxx" #include <unotools/pathoptions.hxx> #define _SVSTDARR_STRINGSDTOR -#include <svtools/svstdarr.hxx> +#include <svl/svstdarr.hxx> #include <ucbhelper/commandenvironment.hxx> #include <ucbhelper/content.hxx> #include <unotools/localfilehelper.hxx> @@ -83,7 +83,7 @@ #include "iodlg.hrc" #include <asynclink.hxx> -#include <svtools/urlfilter.hxx> +#include <svl/urlfilter.hxx> #include <vector> #include <algorithm> diff --git a/svtools/source/control/taskstat.cxx b/svtools/source/control/taskstat.cxx index 86098af7de4a..82165a711285 100644 --- a/svtools/source/control/taskstat.cxx +++ b/svtools/source/control/taskstat.cxx @@ -43,7 +43,7 @@ #include <vcl/svapp.hxx> #include <unotools/calendarwrapper.hxx> -#include <svtools/syslocale.hxx> +#include <unotools/syslocale.hxx> #include <taskbar.hxx> // ======================================================================= diff --git a/svtools/source/control/urlcontrol.cxx b/svtools/source/control/urlcontrol.cxx index 4ad0969dd732..899867414e2f 100644 --- a/svtools/source/control/urlcontrol.cxx +++ b/svtools/source/control/urlcontrol.cxx @@ -32,7 +32,7 @@ #include "precompiled_svtools.hxx" #include <svtools/urlcontrol.hxx> -#include "svtools/filenotation.hxx" +#include "svl/filenotation.hxx" //......................................................................... namespace svt diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx index ca7064e101fa..aa18a3683916 100644 --- a/svtools/source/dialogs/addresstemplate.cxx +++ b/svtools/source/dialogs/addresstemplate.cxx @@ -39,7 +39,7 @@ #include "addresstemplate.hrc" #endif #ifndef _SVTOOLS_HRC -#include <svtools/svtools.hrc> +#include <svl/svtools.hrc> #endif #ifndef _SVT_HELPID_HRC #include <svtools/helpid.hrc> @@ -70,7 +70,7 @@ #include <com/sun/star/sdb/CommandType.hpp> #include "localresaccess.hxx" #ifndef SVTOOLS_FILENOTATION_HXX_ -#include "svtools/filenotation.hxx" +#include "svl/filenotation.hxx" #endif #include <tools/urlobj.hxx> @@ -324,8 +324,20 @@ public: virtual void setDatasourceName(const ::rtl::OUString& _rName); virtual void setCommand(const ::rtl::OUString& _rCommand); + + virtual void Notify( const com::sun::star::uno::Sequence<rtl::OUString>& aPropertyNames); + virtual void Commit(); }; + +void AssignmentPersistentData::Notify( const com::sun::star::uno::Sequence<rtl::OUString>& ) +{ +} + +void AssignmentPersistentData::Commit() +{ +} + // ------------------------------------------------------------------- AssignmentPersistentData::AssignmentPersistentData() :ConfigItem( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Office.DataAccess/AddressBook" ))) diff --git a/svtools/source/dialogs/addresstemplate.src b/svtools/source/dialogs/addresstemplate.src index 9c4997cae9d2..63c0e6475597 100644 --- a/svtools/source/dialogs/addresstemplate.src +++ b/svtools/source/dialogs/addresstemplate.src @@ -29,7 +29,7 @@ ************************************************************************/ #ifndef _SVTOOLS_HRC -#include <svtools/svtools.hrc> +#include <svl/svtools.hrc> #endif #ifndef _SVT_ADDRESSTEMPLATE_HRC_ #include "addresstemplate.hrc" diff --git a/svtools/source/dialogs/logindlg.cxx b/svtools/source/dialogs/logindlg.cxx index 7ac65a77947d..791e373086af 100644 --- a/svtools/source/dialogs/logindlg.cxx +++ b/svtools/source/dialogs/logindlg.cxx @@ -38,7 +38,7 @@ #include "logindlg.hrc" #endif #ifndef _SVTOOLS_HRC -#include <svtools/svtools.hrc> +#include <svl/svtools.hrc> #endif #include <svtools/svtdata.hxx> diff --git a/svtools/source/dialogs/logindlg.src b/svtools/source/dialogs/logindlg.src index 897597f383bf..b3ef357bbae4 100644 --- a/svtools/source/dialogs/logindlg.src +++ b/svtools/source/dialogs/logindlg.src @@ -29,7 +29,7 @@ ************************************************************************/ #ifndef _SVTOOLS_HRC -#include <svtools/svtools.hrc> +#include <svl/svtools.hrc> #endif #ifndef _SVTOOLS_LOGINDLG_HRC_ diff --git a/svtools/source/dialogs/printdlg.cxx b/svtools/source/dialogs/printdlg.cxx index 5aeea754aef2..f2b269e13b6a 100644 --- a/svtools/source/dialogs/printdlg.cxx +++ b/svtools/source/dialogs/printdlg.cxx @@ -47,7 +47,7 @@ #include <svtools/printdlg.hxx> #include <svtools/svtdata.hxx> #include <filedlg.hxx> -#include "svtools/pickerhelper.hxx" +#include "svl/pickerhelper.hxx" #ifndef _SVT_HELPID_HRC #include <svtools/helpid.hrc> #endif diff --git a/svtools/source/dialogs/printdlg.hrc b/svtools/source/dialogs/printdlg.hrc index cae57cefdb0e..2f2f43e3ba10 100644 --- a/svtools/source/dialogs/printdlg.hrc +++ b/svtools/source/dialogs/printdlg.hrc @@ -28,7 +28,7 @@ * ************************************************************************/ -#include <svtools/svtools.hrc> +#include <svl/svtools.hrc> #define FL_PRINTER 1 #define LB_NAMES 2 diff --git a/svtools/source/dialogs/prnsetup.hrc b/svtools/source/dialogs/prnsetup.hrc index 33f98f7ed5e0..00623d97084c 100644 --- a/svtools/source/dialogs/prnsetup.hrc +++ b/svtools/source/dialogs/prnsetup.hrc @@ -27,7 +27,7 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#include <svtools/svtools.hrc> +#include <svl/svtools.hrc> #define FL_PRINTER 1 #define LB_NAMES 2 diff --git a/svtools/source/dialogs/propctrl.hxx b/svtools/source/dialogs/propctrl.hxx index b2698f6a1c8e..59019fc21b90 100644 --- a/svtools/source/dialogs/propctrl.hxx +++ b/svtools/source/dialogs/propctrl.hxx @@ -34,7 +34,7 @@ #include "sbx.hxx" #include "sbxbase.hxx" #include "sbxres.hxx" -#include <svtools/brdcst.hxx> +#include <svl/brdcst.hxx> */ diff --git a/svtools/source/dialogs/roadmapwizard.cxx b/svtools/source/dialogs/roadmapwizard.cxx index b0fff49e5e8d..c7473e446986 100644 --- a/svtools/source/dialogs/roadmapwizard.cxx +++ b/svtools/source/dialogs/roadmapwizard.cxx @@ -32,7 +32,7 @@ #include "precompiled_svtools.hxx" #include <svtools/roadmapwizard.hxx> -#include <svtools/svtools.hrc> +#include <svl/svtools.hrc> #include <svtools/svtdata.hxx> #include "roadmap.hxx" #include <tools/debug.hxx> diff --git a/svtools/source/dialogs/wizardmachine.cxx b/svtools/source/dialogs/wizardmachine.cxx index c436256a31c4..602c2e3e6f8a 100644 --- a/svtools/source/dialogs/wizardmachine.cxx +++ b/svtools/source/dialogs/wizardmachine.cxx @@ -36,7 +36,7 @@ #include <vcl/msgbox.hxx> #include <svtools/svtdata.hxx> #ifndef _SVTOOLS_HRC -#include <svtools/svtools.hrc> +#include <svl/svtools.hrc> #endif //......................................................................... diff --git a/svtools/source/dialogs/wizardmachine.src b/svtools/source/dialogs/wizardmachine.src index d83fdd98824b..2fa50ef20bf6 100644 --- a/svtools/source/dialogs/wizardmachine.src +++ b/svtools/source/dialogs/wizardmachine.src @@ -29,7 +29,7 @@ ************************************************************************/ #ifndef _SVTOOLS_HRC -#include <svtools/svtools.hrc> +#include <svl/svtools.hrc> #endif String STR_WIZDLG_FINISH diff --git a/svtools/source/edit/svmedit.cxx b/svtools/source/edit/svmedit.cxx index aeb1964b3893..8c60a62063df 100644 --- a/svtools/source/edit/svmedit.cxx +++ b/svtools/source/edit/svmedit.cxx @@ -43,11 +43,11 @@ #include <svtools/svmedit.hxx> #include <svtools/xtextedt.hxx> -#include <svtools/brdcst.hxx> -#include <svtools/undo.hxx> +#include <svl/brdcst.hxx> +#include <svl/undo.hxx> #include <svtools/textwindowpeer.hxx> -#include <svtools/lstner.hxx> -#include <svtools/smplhint.hxx> +#include <svl/lstner.hxx> +#include <svl/smplhint.hxx> // IDs erstmal aus VCL geklaut, muss mal richtig delivert werden... diff --git a/svtools/source/edit/textdat2.hxx b/svtools/source/edit/textdat2.hxx index 51336e75741e..7ee667db2305 100644 --- a/svtools/source/edit/textdat2.hxx +++ b/svtools/source/edit/textdat2.hxx @@ -32,7 +32,7 @@ #ifndef _TEXTDAT2_HXX #define _TEXTDAT2_HXX -#include <svtools/svarray.hxx> +#include <svl/svarray.hxx> #include <tools/list.hxx> #include <vcl/seleng.hxx> #include <vcl/virdev.hxx> diff --git a/svtools/source/edit/textdoc.hxx b/svtools/source/edit/textdoc.hxx index 45b03e70ac47..b940bb6f4da7 100644 --- a/svtools/source/edit/textdoc.hxx +++ b/svtools/source/edit/textdoc.hxx @@ -31,7 +31,7 @@ #ifndef _TEXTDOC_HXX #define _TEXTDOC_HXX -#include <svtools/svarray.hxx> +#include <svl/svarray.hxx> #include <svtools/textdata.hxx> #include <txtattr.hxx> diff --git a/svtools/source/edit/texteng.cxx b/svtools/source/edit/texteng.cxx index e7eff8385206..596ca89054e7 100644 --- a/svtools/source/edit/texteng.cxx +++ b/svtools/source/edit/texteng.cxx @@ -40,7 +40,7 @@ #include <textdat2.hxx> #include <textundo.hxx> #include <textund2.hxx> -#include <svtools/ctloptions.hxx> +#include <svl/ctloptions.hxx> #include <vcl/window.hxx> #include <vcl/edit.hxx> diff --git a/svtools/source/edit/textundo.hxx b/svtools/source/edit/textundo.hxx index fe2c53bca45e..7ce7169e1563 100644 --- a/svtools/source/edit/textundo.hxx +++ b/svtools/source/edit/textundo.hxx @@ -30,7 +30,7 @@ #ifndef _TEXTUNDO_HXX #define _TEXTUNDO_HXX -#include <svtools/undo.hxx> +#include <svl/undo.hxx> class TextEngine; diff --git a/svtools/source/edit/textview.cxx b/svtools/source/edit/textview.cxx index c21bd70b3fd9..99b6fc900885 100644 --- a/svtools/source/edit/textview.cxx +++ b/svtools/source/edit/textview.cxx @@ -36,7 +36,7 @@ #include <svtools/textdata.hxx> #include <textdat2.hxx> -#include <svtools/undo.hxx> +#include <svl/undo.hxx> #include <vcl/cursor.hxx> #include <vcl/window.hxx> #include <vcl/svapp.hxx> @@ -44,7 +44,7 @@ #include <tools/stream.hxx> #include <sot/formats.hxx> -#include <svtools/urlbmk.hxx> +#include <svl/urlbmk.hxx> #ifndef _COM_SUN_STAR_TEXT_XBREAKITERATOR_HPP_ #include <com/sun/star/i18n/XBreakIterator.hpp> diff --git a/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.cxx b/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.cxx index 1bc83575ec38..584814dd9e92 100644 --- a/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.cxx +++ b/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.cxx @@ -37,7 +37,7 @@ #include "FilterConfigCache.hxx" #include <osl/file.hxx> #include <osl/module.hxx> -#include <svtools/solar.hrc> +#include <svl/solar.hrc> #include <svtools/fltcall.hxx> #include "dlgexpor.hxx" #include "dlgejpg.hxx" @@ -49,7 +49,7 @@ #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/uno/Sequence.h> #include <com/sun/star/uno/Any.h> -#include <svtools/syslocale.hxx> +#include <unotools/syslocale.hxx> #include "vcl/svapp.hxx" #if defined WIN || (defined OS2 && !defined ICC) diff --git a/svtools/source/filter.vcl/filter/dlgejpg.hrc b/svtools/source/filter.vcl/filter/dlgejpg.hrc index 4342a89d1d24..67ac915df367 100644 --- a/svtools/source/filter.vcl/filter/dlgejpg.hrc +++ b/svtools/source/filter.vcl/filter/dlgejpg.hrc @@ -27,7 +27,7 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#include <svtools/svtools.hrc> +#include <svl/svtools.hrc> #define BTN_OK 1 #define BTN_CANCEL 1 diff --git a/svtools/source/filter.vcl/filter/dlgepng.hrc b/svtools/source/filter.vcl/filter/dlgepng.hrc index 79d4b189aa5a..d687141abf56 100644 --- a/svtools/source/filter.vcl/filter/dlgepng.hrc +++ b/svtools/source/filter.vcl/filter/dlgepng.hrc @@ -27,7 +27,7 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#include <svtools/svtools.hrc> +#include <svl/svtools.hrc> #define BTN_OK 1 #define BTN_CANCEL 1 diff --git a/svtools/source/filter.vcl/filter/dlgexpor.hrc b/svtools/source/filter.vcl/filter/dlgexpor.hrc index 28921b5f178c..cae15d7276d2 100644 --- a/svtools/source/filter.vcl/filter/dlgexpor.hrc +++ b/svtools/source/filter.vcl/filter/dlgexpor.hrc @@ -27,7 +27,7 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#include <svtools/svtools.hrc> +#include <svl/svtools.hrc> #define BTN_OK_PIX 1 #define BTN_CANCEL_PIX 1 diff --git a/svtools/source/filter.vcl/filter/filter.cxx b/svtools/source/filter.vcl/filter/filter.cxx index 3586ddd02ddd..306307a0bf91 100644 --- a/svtools/source/filter.vcl/filter/filter.cxx +++ b/svtools/source/filter.vcl/filter/filter.cxx @@ -54,7 +54,7 @@ #include "jpeg.hxx" #include "xbmread.hxx" #include "xpmread.hxx" -#include <svtools/solar.hrc> +#include <svl/solar.hrc> #include "strings.hrc" #include "sgffilt.hxx" #include "osl/module.hxx" diff --git a/svtools/source/filter.vcl/filter/strings.hrc b/svtools/source/filter.vcl/filter/strings.hrc index 0cfa4e6bf7c4..a3356982609a 100644 --- a/svtools/source/filter.vcl/filter/strings.hrc +++ b/svtools/source/filter.vcl/filter/strings.hrc @@ -27,4 +27,4 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#include <svtools/svtools.hrc> +#include <svl/svtools.hrc> diff --git a/svtools/source/inc/iodlg.hrc b/svtools/source/inc/iodlg.hrc index 36e3092064cd..9c41e06a2b6c 100644 --- a/svtools/source/inc/iodlg.hrc +++ b/svtools/source/inc/iodlg.hrc @@ -32,7 +32,7 @@ #define _SVTOOLS_IODLGIMPL_HRC #ifndef _SVTOOLS_HRC -#include <svtools/svtools.hrc> +#include <svl/svtools.hrc> #endif // ModalDialog DLG_SVT_EXPLORERFILE diff --git a/svtools/source/inc/property.hxx b/svtools/source/inc/property.hxx index cfdc62dd350c..2a756f177608 100644 --- a/svtools/source/inc/property.hxx +++ b/svtools/source/inc/property.hxx @@ -54,17 +54,17 @@ #endif #include <vcl/combobox.hxx> #include <vcl/field.hxx> -#include <svtools/svarray.hxx> +#include <svl/svarray.hxx> #define _SVSTDARR_USHORTS -#include <svtools/svstdarr.hxx> +#include <svl/svstdarr.hxx> #include <vcl/virdev.hxx> #include <vcl/scrbar.hxx> -#include <svtools/svarray.hxx> +#include <svl/svarray.hxx> #ifndef _SVSTDARR_STRINGS #define _SVSTDARR_STRINGS -#include <svtools/svstdarr.hxx> +#include <svl/svstdarr.hxx> #endif #include <vcl/tabpage.hxx> #include <vcl/tabctrl.hxx> diff --git a/svtools/source/java/javaerror.src b/svtools/source/java/javaerror.src index 3063bcd994d5..3460df859c2b 100644 --- a/svtools/source/java/javaerror.src +++ b/svtools/source/java/javaerror.src @@ -28,7 +28,7 @@ * ************************************************************************/ -#include <svtools/svtools.hrc> +#include <svl/svtools.hrc> WarningBox WARNINGBOX_JAVANOTFOUND { diff --git a/svtools/source/java/javainteractionhandler.cxx b/svtools/source/java/javainteractionhandler.cxx index 30f8775a6d5f..a7808c80992b 100644 --- a/svtools/source/java/javainteractionhandler.cxx +++ b/svtools/source/java/javainteractionhandler.cxx @@ -33,7 +33,7 @@ -#include <svtools/svtools.hrc> +#include <svl/svtools.hrc> #include <tools/resid.hxx> #include <com/sun/star/task/XInteractionContinuation.hpp> #include <com/sun/star/task/XInteractionAbort.hpp> diff --git a/svtools/source/java/patchjavaerror.src b/svtools/source/java/patchjavaerror.src index bfdfd5a8bcba..2d2ad06a9592 100644 --- a/svtools/source/java/patchjavaerror.src +++ b/svtools/source/java/patchjavaerror.src @@ -28,7 +28,7 @@ * ************************************************************************/ -#include <svtools/svtools.hrc> +#include <svl/svtools.hrc> WarningBox WARNINGBOX_JAVANOTFOUND { diff --git a/svtools/source/misc/ehdl.cxx b/svtools/source/misc/ehdl.cxx index 6e89193f1b6b..4084aa47bc80 100644 --- a/svtools/source/misc/ehdl.cxx +++ b/svtools/source/misc/ehdl.cxx @@ -45,7 +45,7 @@ #include <svtools/ehdl.hxx> #include <svtools/svtdata.hxx> -#include <svtools/svtools.hrc> +#include <svl/svtools.hrc> #include "sfxecode.hxx" //========================================================================= diff --git a/svtools/source/misc/ehdl.src b/svtools/source/misc/ehdl.src index ed32172a92e2..5267d13765c3 100644 --- a/svtools/source/misc/ehdl.src +++ b/svtools/source/misc/ehdl.src @@ -29,7 +29,7 @@ ************************************************************************/ #define __RSC -#include <svtools/svtools.hrc> +#include <svl/svtools.hrc> #include "sfxecode.hxx" // pragma ---------------------------------------------------------------- diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx index ba21db8a8e76..93a75681da52 100644 --- a/svtools/source/misc/embedhlp.cxx +++ b/svtools/source/misc/embedhlp.cxx @@ -33,7 +33,7 @@ #include <svtools/embedhlp.hxx> #include <svtools/filter.hxx> -#include <svtools/svtools.hrc> +#include <svl/svtools.hrc> #include <svtools/svtdata.hxx> #include <comphelper/embeddedobjectcontainer.hxx> diff --git a/svtools/source/misc/errtxt.src b/svtools/source/misc/errtxt.src index ebd922bfedf7..3ab58ef92dbf 100644 --- a/svtools/source/misc/errtxt.src +++ b/svtools/source/misc/errtxt.src @@ -29,7 +29,7 @@ ************************************************************************/ #define __RSC -#include <svtools/svtools.hrc> +#include <svl/svtools.hrc> #include "sfxecode.hxx" // pragma ---------------------------------------------------------------- Resource RID_ERRCTX diff --git a/svtools/source/misc/helpagent.src b/svtools/source/misc/helpagent.src index 3b9e2a450ec1..181583bc8f6d 100644 --- a/svtools/source/misc/helpagent.src +++ b/svtools/source/misc/helpagent.src @@ -29,7 +29,7 @@ ************************************************************************/ #ifndef _SVTOOLS_HRC -#include <svtools/svtools.hrc> +#include <svl/svtools.hrc> #endif Bitmap BMP_HELP_AGENT_IMAGE diff --git a/svtools/source/misc/helpagentwindow.cxx b/svtools/source/misc/helpagentwindow.cxx index 368c55a94ade..51cd7ebfb740 100644 --- a/svtools/source/misc/helpagentwindow.cxx +++ b/svtools/source/misc/helpagentwindow.cxx @@ -39,7 +39,7 @@ #include <svtools/svtdata.hxx> #ifndef _SVTOOLS_HRC -#include <svtools/svtools.hrc> +#include <svl/svtools.hrc> #endif #ifndef _SVT_HELPID_HRC #include <svtools/helpid.hrc> diff --git a/svtools/source/misc/imagemgr.cxx b/svtools/source/misc/imagemgr.cxx index ddf6a7350772..76752b27354e 100644 --- a/svtools/source/misc/imagemgr.cxx +++ b/svtools/source/misc/imagemgr.cxx @@ -55,7 +55,7 @@ #include <rtl/logfile.hxx> #include <unotools/configmgr.hxx> -#include <svtools/svtools.hrc> +#include <svl/svtools.hrc> #include "imagemgr.hrc" #include <svtools/svtdata.hxx> #include <vos/mutex.hxx> diff --git a/svtools/source/misc/imagemgr.src b/svtools/source/misc/imagemgr.src index 0aada34305da..e082398beaa1 100644 --- a/svtools/source/misc/imagemgr.src +++ b/svtools/source/misc/imagemgr.src @@ -29,7 +29,7 @@ ************************************************************************/ // includes ****************************************************************** -#include <svtools/svtools.hrc> +#include <svl/svtools.hrc> #include "imagemgr.hrc" // images ******************************************************************** diff --git a/svtools/source/misc/imap.cxx b/svtools/source/misc/imap.cxx index 8ea4296d6db3..df7760f7931b 100644 --- a/svtools/source/misc/imap.cxx +++ b/svtools/source/misc/imap.cxx @@ -36,7 +36,7 @@ #include <vcl/mapmod.hxx> #include <vcl/window.hxx> -#include "svtools/urihelper.hxx" +#include "svl/urihelper.hxx" #include <svtools/imap.hxx> #include <svtools/imapobj.hxx> #include <svtools/imapcirc.hxx> diff --git a/svtools/source/misc/imap2.cxx b/svtools/source/misc/imap2.cxx index dc18e1a9c24b..1dd10c36c81a 100644 --- a/svtools/source/misc/imap2.cxx +++ b/svtools/source/misc/imap2.cxx @@ -43,7 +43,7 @@ #endif #include <sot/formats.hxx> -#include "svtools/urihelper.hxx" +#include "svl/urihelper.hxx" #include <svtools/imap.hxx> #include <svtools/imap.hxx> #include <svtools/imapobj.hxx> diff --git a/svtools/source/misc/itemdel.cxx b/svtools/source/misc/itemdel.cxx index 4028aa497c22..9db70f852d30 100644 --- a/svtools/source/misc/itemdel.cxx +++ b/svtools/source/misc/itemdel.cxx @@ -37,8 +37,8 @@ #include <limits.h> #include <svtools/svtdata.hxx> -#include <svtools/svarray.hxx> -#include <svtools/itempool.hxx> +#include <svl/svarray.hxx> +#include <svl/itempool.hxx> // STATIC DATA ----------------------------------------------------------- diff --git a/svtools/source/misc/langtab.cxx b/svtools/source/misc/langtab.cxx index 870e6378a216..ef2cedcc50c2 100644 --- a/svtools/source/misc/langtab.cxx +++ b/svtools/source/misc/langtab.cxx @@ -42,10 +42,10 @@ #include <i18npool/lang.h> #include <i18npool/mslangid.hxx> -#include <svtools/svtools.hrc> +#include <svl/svtools.hrc> #include <svtools/svtdata.hxx> #include <svtools/langtab.hxx> -#include <svtools/syslocale.hxx> +#include <unotools/syslocale.hxx> using namespace ::com::sun::star; diff --git a/svtools/source/misc/langtab.src b/svtools/source/misc/langtab.src index 4458d4b0f132..0aa90f8e96b9 100644 --- a/svtools/source/misc/langtab.src +++ b/svtools/source/misc/langtab.src @@ -29,7 +29,7 @@ ************************************************************************/ // include --------------------------------------------------------------- -#include <svtools/svtools.hrc> +#include <svl/svtools.hrc> #define RSC_RESOURCE_USAGE 1 #include <i18npool/lang.h> diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx index e2cd8f803a04..4a814637e1af 100644 --- a/svtools/source/misc/transfer.cxx +++ b/svtools/source/misc/transfer.cxx @@ -76,7 +76,7 @@ #include <com/sun/star/frame/XDesktop.hpp> #include <com/sun/star/lang/XInitialization.hpp> -#include "svtools/urlbmk.hxx" +#include "svl/urlbmk.hxx" #include "inetimg.hxx" #include <svtools/wmf.hxx> #include <svtools/imap.hxx> diff --git a/svtools/source/misc/transfer2.cxx b/svtools/source/misc/transfer2.cxx index eebf91ab57ff..027dbc31572d 100644 --- a/svtools/source/misc/transfer2.cxx +++ b/svtools/source/misc/transfer2.cxx @@ -50,7 +50,7 @@ #include <com/sun/star/datatransfer/dnd/XDropTargetDragContext.hpp> #endif -#include "svtools/urlbmk.hxx" +#include "svl/urlbmk.hxx" #include "inetimg.hxx" #include <svtools/imap.hxx> #include <svtools/transfer.hxx> diff --git a/svtools/source/misc/wallitem.cxx b/svtools/source/misc/wallitem.cxx index 32797f69a48c..6ceb414db003 100644 --- a/svtools/source/misc/wallitem.cxx +++ b/svtools/source/misc/wallitem.cxx @@ -52,7 +52,7 @@ #include <vcl/cvtgrf.hxx> #include "wallitem.hxx" -#include <svtools/cntwall.hxx> +#include <svl/cntwall.hxx> // ----------------------------------------------------------------------- diff --git a/svtools/source/plugapp/testtool.src b/svtools/source/plugapp/testtool.src index 599675a6c494..78b63c2fb819 100644 --- a/svtools/source/plugapp/testtool.src +++ b/svtools/source/plugapp/testtool.src @@ -28,7 +28,7 @@ * ************************************************************************/ #include "testtool.hrc" -#include <svtools/solar.hrc> +#include <svl/solar.hrc> #define Control_Control 5 diff --git a/svtools/source/productregistration/productregistration.cxx b/svtools/source/productregistration/productregistration.cxx index 4f9d1bb476ef..f5fc03337cd6 100644 --- a/svtools/source/productregistration/productregistration.cxx +++ b/svtools/source/productregistration/productregistration.cxx @@ -35,7 +35,7 @@ #include "unotools/regoptions.hxx" #include "registrationdlg.hxx" #ifndef _SVTOOLS_HRC -#include <svtools/svtools.hrc> +#include <svl/svtools.hrc> #endif #include "cppuhelper/factory.hxx" #include <cppuhelper/implbase1.hxx> diff --git a/svtools/source/productregistration/registrationdlg.cxx b/svtools/source/productregistration/registrationdlg.cxx index 83018cfa804b..d3969828cb1f 100644 --- a/svtools/source/productregistration/registrationdlg.cxx +++ b/svtools/source/productregistration/registrationdlg.cxx @@ -35,7 +35,7 @@ #if 0 /* @@@ */ #include <svtools/svtdata.hxx> #ifndef _SVTOOLS_HRC -#include <svtools/svtools.hrc> +#include <svl/svtools.hrc> #endif #endif /* @@@ */ diff --git a/svtools/source/productregistration/registrationdlg.src b/svtools/source/productregistration/registrationdlg.src index 86024ef765cd..f9462a420061 100644 --- a/svtools/source/productregistration/registrationdlg.src +++ b/svtools/source/productregistration/registrationdlg.src @@ -32,7 +32,7 @@ #include "registrationdlg.hrc" #endif #ifndef _SVTOOLS_HRC -#include <svtools/svtools.hrc> +#include <svl/svtools.hrc> #endif #ifndef _SVT_HELPID_HRC #include <svtools/helpid.hrc> diff --git a/svtools/source/svhtml/htmlout.cxx b/svtools/source/svhtml/htmlout.cxx index 9783188e3b7c..5bb26367075e 100644 --- a/svtools/source/svhtml/htmlout.cxx +++ b/svtools/source/svhtml/htmlout.cxx @@ -32,11 +32,11 @@ #include "precompiled_svtools.hxx" #include <tools/urlobj.hxx> -#include <svtools/zformat.hxx> -#include <svtools/macitem.hxx> +#include <svl/zformat.hxx> +#include <svl/macitem.hxx> #include <tools/cachestr.hxx> #include <vcl/svapp.hxx> -#include <svtools/zforlist.hxx> +#include <svl/zforlist.hxx> #include <svtools/htmlout.hxx> #include "htmlkywd.hxx" @@ -44,7 +44,7 @@ #include <svtools/imaprect.hxx> #include <svtools/imapcirc.hxx> #include <svtools/imappoly.hxx> -#include "svtools/urihelper.hxx" +#include "svl/urihelper.hxx" #ifndef RTL_CONSTASCII_STRINGPARAM #define RTL_CONSTASCII_STRINGPARAM( c ) c, sizeof(c)-1 diff --git a/svtools/source/svhtml/htmlsupp.cxx b/svtools/source/svhtml/htmlsupp.cxx index 11f48e7fdf5d..9103161afb51 100644 --- a/svtools/source/svhtml/htmlsupp.cxx +++ b/svtools/source/svhtml/htmlsupp.cxx @@ -36,7 +36,7 @@ #include <tools/urlobj.hxx> #ifndef _SVSTDARR_HXX #define _SVSTDARR_ULONGS -#include <svtools/svstdarr.hxx> +#include <svl/svstdarr.hxx> #endif #include <svtools/parhtml.hxx> diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx index 215133c8efb4..b4eb6c05cffd 100644 --- a/svtools/source/svhtml/parhtml.cxx +++ b/svtools/source/svhtml/parhtml.cxx @@ -40,12 +40,12 @@ #include <rtl/strbuf.hxx> #ifndef _SVSTDARR_HXX #define _SVSTDARR_ULONGS -#include <svtools/svstdarr.hxx> +#include <svl/svstdarr.hxx> #endif #include <tools/tenccvt.hxx> #include <tools/datetime.hxx> -#include <svtools/inettype.hxx> +#include <svl/inettype.hxx> #include <comphelper/string.hxx> #include <com/sun/star/beans/PropertyAttribute.hpp> #include <com/sun/star/document/XDocumentProperties.hpp> diff --git a/svtools/source/svrtf/svparser.cxx b/svtools/source/svrtf/svparser.cxx index 6d6f4f059545..2af7af71adac 100644 --- a/svtools/source/svrtf/svparser.cxx +++ b/svtools/source/svrtf/svparser.cxx @@ -37,7 +37,7 @@ #include <tools/stream.hxx> #include <tools/debug.hxx> #define _SVSTDARR_USHORTS -#include <svtools/svstdarr.hxx> +#include <svl/svstdarr.hxx> #include <rtl/textcvt.h> #include <rtl/tencinfo.h> diff --git a/svtools/source/uno/unoevent.cxx b/svtools/source/uno/unoevent.cxx index 19d40c17ce5c..6fc8b0017ad8 100644 --- a/svtools/source/uno/unoevent.cxx +++ b/svtools/source/uno/unoevent.cxx @@ -40,7 +40,7 @@ #include <tools/rtti.hxx> #include <tools/solar.h> #include "unoevent.hxx" -#include <svtools/macitem.hxx> +#include <svl/macitem.hxx> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; diff --git a/svtools/source/uno/unoifac2.hrc b/svtools/source/uno/unoifac2.hrc index 4e8cf0303da5..4f46edffdc51 100644 --- a/svtools/source/uno/unoifac2.hrc +++ b/svtools/source/uno/unoifac2.hrc @@ -33,7 +33,7 @@ #ifndef _SOLAR_HRC -#include <svtools/solar.hrc> +#include <svl/solar.hrc> #endif //! Um den berblick ber alle benutzten HelpID's zu behalten sind diese diff --git a/svtools/source/uno/unoiface.cxx b/svtools/source/uno/unoiface.cxx index cc367c5a0264..711abe1b6617 100644 --- a/svtools/source/uno/unoiface.cxx +++ b/svtools/source/uno/unoiface.cxx @@ -48,7 +48,7 @@ #include <toolkit/helper/convert.hxx> #include <toolkit/helper/property.hxx> #include <svtools/fmtfield.hxx> -#include <svtools/numuno.hxx> +#include <svl/numuno.hxx> #include <calendar.hxx> #include <prgsbar.hxx> diff --git a/svtools/workben/unodialog/udlg_global.hrc b/svtools/workben/unodialog/udlg_global.hrc index 71a67cd2b7e8..bde0e5e86ce2 100644 --- a/svtools/workben/unodialog/udlg_global.hrc +++ b/svtools/workben/unodialog/udlg_global.hrc @@ -31,7 +31,7 @@ #ifndef SVTOOLS_UDLG_GLOBAL_HRC #define SVTOOLS_UDLG_GLOBAL_HRC -#include <svtools/solar.hrc> +#include <svl/solar.hrc> //===================================================================== //= bases diff --git a/unotools/inc/unotools/configitem.hxx b/unotools/inc/unotools/configitem.hxx index 0e938cedd47f..3cc0dc1b079e 100644 --- a/unotools/inc/unotools/configitem.hxx +++ b/unotools/inc/unotools/configitem.hxx @@ -186,7 +186,7 @@ namespace utl /** is called from the ConfigManager before application ends of from the PropertyChangeListener if the sub tree broadcasts changes. */ - virtual void Notify( const com::sun::star::uno::Sequence<rtl::OUString>& aPropertyNames); + virtual void Notify( const com::sun::star::uno::Sequence<rtl::OUString>& aPropertyNames)=0; /** is called from the ConfigManager if it is destroyed before the ConfigItem. */ void ReleaseConfigMgr(); @@ -201,7 +201,7 @@ namespace utl sal_Bool IsModified() const; /** writes the changed values into the sub tree. Always called in the Dtor of the derived class. */ - virtual void Commit(); + virtual void Commit()=0; sal_Bool IsInValueChange() const; diff --git a/unotools/inc/unotools/options.hxx b/unotools/inc/unotools/options.hxx index ca8d70657f0f..f7254589150d 100644 --- a/unotools/inc/unotools/options.hxx +++ b/unotools/inc/unotools/options.hxx @@ -34,26 +34,40 @@ #include "sal/config.h" #include "unotools/unotoolsdllapi.h" +/* + The class utl::detail::Options provides a kind of multiplexer. It implements a ConfigurationListener + that is usually registered at a ConfigItem class. At the same time it implements a ConfigurationBroadcaster + that allows further ("external") listeners to register. + Once the class deriving from Options is notified about + configuration changes by the ConfigItem if its content has been changed by calling some of its methods, + a call of the Options::NotifyListeners() method will send out notifications to all external listeners. +*/ + namespace utl { class ConfigurationBroadcaster; class IMPL_ConfigurationListenerList; + // interface for configuration listener class UNOTOOLS_DLLPUBLIC ConfigurationListener { public: - virtual void ConfigurationChanged( ConfigurationBroadcaster* ) = 0; + virtual void ConfigurationChanged( ConfigurationBroadcaster* p, sal_uInt32 nHint=0 ) = 0; }; + // complete broadcasting implementation class UNOTOOLS_DLLPUBLIC ConfigurationBroadcaster { IMPL_ConfigurationListenerList* mpList; sal_Int32 m_nBroadcastBlocked; // broadcast only if this is 0 + sal_uInt32 m_nBlockedHint; public: void AddListener( utl::ConfigurationListener* pListener ); void RemoveListener( utl::ConfigurationListener* pListener ); - void NotifyListeners(); + + // notify listeners; nHint is an implementation detail of the particular class deriving from ConfigurationBroadcaster + void NotifyListeners( sal_uInt32 nHint ); ConfigurationBroadcaster(); ~ConfigurationBroadcaster(); void BlockBroadcasts( bool bBlock ); @@ -63,7 +77,9 @@ namespace detail { // A base class for the various option classes supported by // unotools/source/config/itemholderbase.hxx (which must be public, as it is -// shared between svl and svt): +// shared between unotools, svl and svt) +// It also provides an implementation for a Configuration Listener and inherits a broadcaster implementation + class UNOTOOLS_DLLPUBLIC Options : public utl::ConfigurationBroadcaster, public utl::ConfigurationListener { public: @@ -74,7 +90,9 @@ public: private: UNOTOOLS_DLLPRIVATE Options(Options &); // not defined UNOTOOLS_DLLPRIVATE void operator =(Options &); // not defined - virtual void ConfigurationChanged( utl::ConfigurationBroadcaster* ); + +protected: + virtual void ConfigurationChanged( ::utl::ConfigurationBroadcaster* p, sal_uInt32 nHint=0 ); }; } } diff --git a/unotools/inc/unotools/syslocale.hxx b/unotools/inc/unotools/syslocale.hxx index 87482abbb117..adce66b7e84a 100644 --- a/unotools/inc/unotools/syslocale.hxx +++ b/unotools/inc/unotools/syslocale.hxx @@ -28,8 +28,8 @@ * ************************************************************************/ -#ifndef INCLUDED_SVTOOLS_SYSLOCALE_HXX -#define INCLUDED_SVTOOLS_SYSLOCALE_HXX +#ifndef INCLUDED_UNOTOOLS_SYSLOCALE_HXX +#define INCLUDED_UNOTOOLS_SYSLOCALE_HXX #include "unotools/unotoolsdllapi.h" #include <unotools/localedatawrapper.hxx> @@ -77,6 +77,8 @@ public: SvtSysLocaleOptions& GetOptions() const; com::sun::star::lang::Locale GetLocale() const; LanguageType GetLanguage() const; + com::sun::star::lang::Locale GetUILocale() const; + LanguageType GetUILanguage() const; }; #endif // INCLUDED_SVTOOLS_SYSLOCALE_HXX diff --git a/unotools/inc/unotools/syslocaleoptions.hxx b/unotools/inc/unotools/syslocaleoptions.hxx index 6c48c83a8500..2da102c161cc 100644 --- a/unotools/inc/unotools/syslocaleoptions.hxx +++ b/unotools/inc/unotools/syslocaleoptions.hxx @@ -43,6 +43,8 @@ // bits for broadcasting hints of changes in a SfxSimpleHint, may be combined const ULONG SYSLOCALEOPTIONS_HINT_LOCALE = 0x00000001; const ULONG SYSLOCALEOPTIONS_HINT_CURRENCY = 0x00000002; +const ULONG SYSLOCALEOPTIONS_HINT_UILOCALE = 0x00000004; +const ULONG SYSLOCALEOPTIONS_HINT_DECSEP = 0x00000008; class SvtSysLocaleOptions_Impl; class SvtListener; @@ -54,12 +56,14 @@ class UNOTOOLS_DLLPUBLIC SvtSysLocaleOptions: public utl::detail::Options static sal_Int32 nRefCount; UNOTOOLS_DLLPRIVATE static ::osl::Mutex& GetMutex(); + virtual void ConfigurationChanged( utl::ConfigurationBroadcaster* p, sal_uInt32 nHint ); public: enum EOption { E_LOCALE, + E_UILOCALE, E_CURRENCY }; SvtSysLocaleOptions(); @@ -102,6 +106,12 @@ public: /// The config string may be empty to denote the SYSTEM locale const ::rtl::OUString& GetLocaleConfigString() const; void SetLocaleConfigString( const ::rtl::OUString& rStr ); + com::sun::star::lang::Locale GetLocale() const; + + /// The config string may be empty to denote the SYSTEM locale + const ::rtl::OUString& GetUILocaleConfigString() const; + void SetUILocaleConfigString( const ::rtl::OUString& rStr ); + com::sun::star::lang::Locale GetUILocale() const; /// The config string may be empty to denote the default currency of the locale const ::rtl::OUString& GetCurrencyConfigString() const; @@ -113,11 +123,6 @@ public: // convenience methods - /** Get the LanguageType of the current locale, may be LANGUAGE_SYSTEM if - LocaleConfigString is empty. If you need the real locale used in the - application, call Application::GetSettings().GetLanguage() instead */ - LanguageType GetLocaleLanguageType() const; - /// Get currency abbreviation and locale from an USD-en-US or EUR-de-DE string static void GetCurrencyAbbrevAndLanguage( String& rAbbrev, diff --git a/unotools/source/config/cacheoptions.cxx b/unotools/source/config/cacheoptions.cxx index c226e8b80921..dc8031ea0078 100644 --- a/unotools/source/config/cacheoptions.cxx +++ b/unotools/source/config/cacheoptions.cxx @@ -94,6 +94,7 @@ public: //--------------------------------------------------------------------------------------------------------- virtual void Commit(); + virtual void Notify( const com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames ); //--------------------------------------------------------------------------------------------------------- // public interface @@ -247,6 +248,10 @@ void SvtCacheOptions_Impl::Commit() PutProperties( aSeqNames, aSeqValues ); } +void SvtCacheOptions_Impl::Notify( const Sequence< rtl::OUString >& ) +{ +} + //***************************************************************************************************************** // public method //***************************************************************************************************************** diff --git a/unotools/source/config/configitem.cxx b/unotools/source/config/configitem.cxx index ad83b9b79cae..3d70f99f4ec0 100644 --- a/unotools/source/config/configitem.cxx +++ b/unotools/source/config/configitem.cxx @@ -83,6 +83,13 @@ catch(Exception& rEx) \ #define CATCH_INFO(a) catch(Exception& ){} #endif +/* + The ConfigChangeListener_Impl receives notifications from the configuration about changes that + have happened. It forwards this notification to the ConfigItem it knows a pParent by calling its + "CallNotify" method. As ConfigItems are most probably not thread safe, the SolarMutex is acquired + before doing so. +*/ + namespace utl{ class ConfigChangeListener_Impl : public cppu::WeakImplHelper1 < @@ -280,13 +287,6 @@ ConfigItem::~ConfigItem() /* -----------------------------29.08.00 12:52-------------------------------- ---------------------------------------------------------------------------*/ -void ConfigItem::Commit() -{ - OSL_ENSURE(sal_False, "Base class called"); -} -/* -----------------------------29.08.00 12:52-------------------------------- - - ---------------------------------------------------------------------------*/ void ConfigItem::ReleaseConfigMgr() { Reference<XHierarchicalNameAccess> xHierarchyAccess = GetTree(); @@ -308,18 +308,13 @@ void ConfigItem::ReleaseConfigMgr() ---------------------------------------------------------------------------*/ void ConfigItem::CallNotify( const com::sun::star::uno::Sequence<OUString>& rPropertyNames ) { + // the call is forwarded to the virtual Notify() method + // it is pure virtual, so all classes deriving from ConfigItem have to decide how they + // want to notify listeners if(!IsInValueChange() || pImpl->bEnableInternalNotification) Notify(rPropertyNames); - NotifyListeners(); } -/* -----------------------------29.08.00 12:52-------------------------------- - - ---------------------------------------------------------------------------*/ -void ConfigItem::Notify( const com::sun::star::uno::Sequence<OUString>& /*rPropertyNames*/) -{ - OSL_ENSURE(sal_False, "Base class called"); -} /* -----------------------------12.12.00 17:09-------------------------------- ---------------------------------------------------------------------------*/ diff --git a/unotools/source/config/defaultoptions.cxx b/unotools/source/config/defaultoptions.cxx index 36c79b451f45..baaa4a220a93 100644 --- a/unotools/source/config/defaultoptions.cxx +++ b/unotools/source/config/defaultoptions.cxx @@ -111,6 +111,8 @@ public: SvtDefaultOptions_Impl(); String GetDefaultPath( USHORT nId ) const; + virtual void Commit(); + virtual void Notify( const com::sun::star::uno::Sequence<rtl::OUString>& aPropertyNames); }; // global ---------------------------------------------------------------- @@ -189,6 +191,16 @@ Sequence< OUString > GetDefaultPropertyNames() return aNames; } +void SvtDefaultOptions_Impl::Notify( const Sequence< rtl::OUString >& ) +{ + // no notification, will never be changed +} + +void SvtDefaultOptions_Impl::Commit() +{ + // will never be changed +} + // class SvtDefaultOptions_Impl ------------------------------------------ String SvtDefaultOptions_Impl::GetDefaultPath( USHORT nId ) const diff --git a/unotools/source/config/fltrcfg.cxx b/unotools/source/config/fltrcfg.cxx index 7050e4734401..a0870ff6a8a5 100644 --- a/unotools/source/config/fltrcfg.cxx +++ b/unotools/source/config/fltrcfg.cxx @@ -81,6 +81,7 @@ public: bSaveVBA(sal_False) {} ~SvtAppFilterOptions_Impl(); virtual void Commit(); + virtual void Notify( const com::sun::star::uno::Sequence<rtl::OUString>& aPropertyNames); void Load(); sal_Bool IsLoad() const {return bLoadVBA;} @@ -125,6 +126,13 @@ void SvtAppFilterOptions_Impl::Commit() PutProperties(aNames, aValues); } + +void SvtAppFilterOptions_Impl::Notify( const Sequence< rtl::OUString >& ) +{ + // no listeners supported yet +} + + /* -----------------------------22.01.01 10:38-------------------------------- ---------------------------------------------------------------------------*/ diff --git a/unotools/source/config/historyoptions.cxx b/unotools/source/config/historyoptions.cxx index 73d006a27507..0a28884e24c2 100644 --- a/unotools/source/config/historyoptions.cxx +++ b/unotools/source/config/historyoptions.cxx @@ -648,7 +648,7 @@ SvtHistoryOptions::SvtHistoryOptions() // ... and initialize ouer data container only if it not already exist! if( m_pDataContainer == NULL ) { - RTL_LOGFILE_CONTEXT(aLog, "svtools ( ??? ) ::SvtHistoryOptions_Impl::ctor()"); + RTL_LOGFILE_CONTEXT(aLog, "unotools ( ??? ) ::SvtHistoryOptions_Impl::ctor()"); m_pDataContainer = new SvtHistoryOptions_Impl; ItemHolder1::holdConfigItem(E_HISTORYOPTIONS); diff --git a/unotools/source/config/javaoptions.cxx b/unotools/source/config/javaoptions.cxx index 91a74f43b886..0eec89a31782 100644 --- a/unotools/source/config/javaoptions.cxx +++ b/unotools/source/config/javaoptions.cxx @@ -57,6 +57,7 @@ public: SvtExecAppletsItem_Impl(); virtual void Commit(); + void Notify( const Sequence< rtl::OUString >& ); sal_Bool IsExecuteApplets() const {return bExecute;} void SetExecuteApplets(sal_Bool bSet); @@ -108,6 +109,10 @@ void SvtExecAppletsItem_Impl::Commit() PutProperties(aNames, aValues); } +void SvtExecAppletsItem_Impl::Notify( const Sequence< rtl::OUString >& ) +{ + // no listeners supported yet +} struct SvtJavaOptions_Impl { diff --git a/unotools/source/config/lingucfg.cxx b/unotools/source/config/lingucfg.cxx index 25da00dd4a26..d4eff83efec6 100644 --- a/unotools/source/config/lingucfg.cxx +++ b/unotools/source/config/lingucfg.cxx @@ -229,6 +229,7 @@ SvtLinguConfigItem::~SvtLinguConfigItem() void SvtLinguConfigItem::Notify( const uno::Sequence< OUString > &rPropertyNames ) { LoadOptions( rPropertyNames ); + NotifyListeners(0); } @@ -573,6 +574,7 @@ BOOL SvtLinguConfigItem::SetProperty( INT32 nPropertyHandle, const uno::Any &rVa if (bMod) SetModified(); + NotifyListeners(0); return bSucc; } @@ -592,6 +594,7 @@ BOOL SvtLinguConfigItem::SetOptions( const SvtLinguOptions &rOptions ) aOpt = rOptions; SetModified(); + NotifyListeners(0); return TRUE; } diff --git a/unotools/source/config/localisationoptions.cxx b/unotools/source/config/localisationoptions.cxx index a341021ca926..2ac2524e7d08 100644 --- a/unotools/source/config/localisationoptions.cxx +++ b/unotools/source/config/localisationoptions.cxx @@ -271,6 +271,8 @@ void SvtLocalisationOptions_Impl::Notify( const Sequence< OUString >& seqPropert else DBG_ASSERT( sal_False, "SvtLocalisationOptions_Impl::Notify()\nUnkown property detected ... I can't handle these!\n" ); #endif } + + NotifyListeners(0); } //***************************************************************************************************************** diff --git a/unotools/source/config/options.cxx b/unotools/source/config/options.cxx index b4e9aec8c6dd..5bd2ed46f7ec 100644 --- a/unotools/source/config/options.cxx +++ b/unotools/source/config/options.cxx @@ -46,6 +46,7 @@ using utl::ConfigurationBroadcaster; ConfigurationBroadcaster::ConfigurationBroadcaster() : mpList(0) , m_nBroadcastBlocked( 0 ) +, m_nBlockedHint( 0 ) { } @@ -67,39 +68,42 @@ void ConfigurationBroadcaster::RemoveListener( utl::ConfigurationListener* pList mpList->Remove( pListener ); } -void ConfigurationBroadcaster::NotifyListeners() +void ConfigurationBroadcaster::NotifyListeners( sal_uInt32 nHint ) { -// if ( m_nBroadcastBlocked ) -// m_nBlockedHint |= nHint; -// else - if (!m_nBroadcastBlocked) + if ( m_nBroadcastBlocked ) + m_nBlockedHint |= nHint; + else { + nHint |= m_nBlockedHint; + m_nBlockedHint = 0; if ( mpList ) for ( sal_uInt32 n=0; n<mpList->Count(); n++ ) - mpList->GetObject(n)->ConfigurationChanged(this); + mpList->GetObject(n)->ConfigurationChanged( this, nHint ); } } -Options::Options() +void ConfigurationBroadcaster::BlockBroadcasts( bool bBlock ) { + if ( bBlock ) + ++m_nBroadcastBlocked; + else if ( m_nBroadcastBlocked ) + { + if ( --m_nBroadcastBlocked == 0 ) + NotifyListeners( 0 ); + } } -Options::~Options() +Options::Options() { } -void Options::ConfigurationChanged( utl::ConfigurationBroadcaster* ) +Options::~Options() { - NotifyListeners(); } -void ConfigurationBroadcaster::BlockBroadcasts( bool bBlock ) +void Options::ConfigurationChanged( ConfigurationBroadcaster* p, sal_uInt32 nHint ) { - if ( bBlock ) - ++m_nBroadcastBlocked; - else if ( m_nBroadcastBlocked ) - { - if ( --m_nBroadcastBlocked == 0 ) - NotifyListeners(); - } + NotifyListeners( nHint ); } + + diff --git a/unotools/source/config/printwarningoptions.cxx b/unotools/source/config/printwarningoptions.cxx index c64064c8fadc..29dfabd45ea7 100644 --- a/unotools/source/config/printwarningoptions.cxx +++ b/unotools/source/config/printwarningoptions.cxx @@ -91,6 +91,7 @@ public: //--------------------------------------------------------------------------------------------------------- virtual void Commit(); + virtual void Notify( const com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames ); //--------------------------------------------------------------------------------------------------------- // public interface @@ -242,6 +243,10 @@ void SvtPrintWarningOptions_Impl::Commit() PutProperties( aSeqNames, aSeqValues ); } +void SvtPrintWarningOptions_Impl::Notify( const Sequence< rtl::OUString >& ) +{ +} + //***************************************************************************************************************** // private method //***************************************************************************************************************** diff --git a/unotools/source/config/searchopt.cxx b/unotools/source/config/searchopt.cxx index 7ca888e8ef7b..01fbd9a3216d 100644 --- a/unotools/source/config/searchopt.cxx +++ b/unotools/source/config/searchopt.cxx @@ -75,6 +75,7 @@ public: // ConfigItem virtual void Commit(); + virtual void Notify( const com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames ); BOOL GetFlag( USHORT nOffset ) const; void SetFlag( USHORT nOffset, BOOL bVal ); @@ -104,6 +105,10 @@ void SvtSearchOptions_Impl::Commit() Save(); } +void SvtSearchOptions_Impl::Notify( const Sequence< rtl::OUString >& ) +{ +} + BOOL SvtSearchOptions_Impl::GetFlag( USHORT nOffset ) const { diff --git a/unotools/source/config/sourceviewconfig.cxx b/unotools/source/config/sourceviewconfig.cxx index 46c926ffb86e..3de0276643bf 100644 --- a/unotools/source/config/sourceviewconfig.cxx +++ b/unotools/source/config/sourceviewconfig.cxx @@ -191,7 +191,7 @@ void SourceViewConfig_Impl::Commit() } PutProperties( aNames, aValues ); - NotifyListeners(); + NotifyListeners(0); } /*-- 28.08.2002 16:32:19--------------------------------------------------- diff --git a/unotools/source/config/syslocaleoptions.cxx b/unotools/source/config/syslocaleoptions.cxx index 3815136b27f0..6c4071709e02 100644 --- a/unotools/source/config/syslocaleoptions.cxx +++ b/unotools/source/config/syslocaleoptions.cxx @@ -31,21 +31,20 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_unotools.hxx" -#include <unotools/syslocaleoptions.hxx> -#include <i18npool/mslangid.hxx> -#include <tools/string.hxx> +#include <com/sun/star/uno/Sequence.hxx> #include <rtl/ustrbuf.hxx> #include <rtl/instance.hxx> +#include <rtl/logfile.hxx> +#include <i18npool/mslangid.hxx> +#include <tools/string.hxx> +#include <tools/debug.hxx> +#include <unotools/syslocaleoptions.hxx> #include <unotools/configmgr.hxx> #include <unotools/configitem.hxx> -#include <tools/debug.hxx> #include <com/sun/star/uno/Any.hxx> -#include <com/sun/star/uno/Sequence.hxx> -#include <rtl/logfile.hxx> #include "itemholder1.hxx" - #define CFG_READONLY_DEFAULT sal_False using namespace osl; @@ -66,20 +65,18 @@ namespace class SvtSysLocaleOptions_Impl : public utl::ConfigItem { OUString m_aLocaleString; // en-US or de-DE or empty for SYSTEM - LanguageType m_eLocaleLanguageType; // same for convenience access + OUString m_aUILocaleString; // en-US or de-DE or empty for SYSTEM OUString m_aCurrencyString; // USD-en-US or EUR-de-DE ULONG m_nBlockedHint; // pending hints sal_Bool m_bDecimalSeparator; //use decimal separator same as locale sal_Bool m_bROLocale; + sal_Bool m_bROUILocale; sal_Bool m_bROCurrency; sal_Bool m_bRODecimalSeparator; static const Sequence< /* const */ OUString > GetPropertyNames(); - ULONG ChangeLocaleSettings(); - void ChangeDefaultCurrency() const; - public: SvtSysLocaleOptions_Impl(); virtual ~SvtSysLocaleOptions_Impl(); @@ -90,8 +87,10 @@ public: const OUString& GetLocaleString() const { return m_aLocaleString; } void SetLocaleString( const OUString& rStr ); - LanguageType GetLocaleLanguageType() const - { return m_eLocaleLanguageType; } + + const OUString& GetUILocaleString() const + { return m_aUILocaleString; } + void SetUILocaleString( const OUString& rStr ); const OUString& GetCurrencyString() const { return m_aCurrencyString; } @@ -104,23 +103,26 @@ public: }; -#define ROOTNODE_SYSLOCALE OUString(RTL_CONSTASCII_USTRINGPARAM("Setup/L10N")) +#define ROOTNODE_SYSLOCALE OUString(RTL_CONSTASCII_USTRINGPARAM("Setup/L10N")) -#define PROPERTYNAME_LOCALE OUString(RTL_CONSTASCII_USTRINGPARAM("ooSetupSystemLocale")) -#define PROPERTYNAME_CURRENCY OUString(RTL_CONSTASCII_USTRINGPARAM("ooSetupCurrency")) -#define PROPERTYNAME_DECIMALSEPARATOR OUString(RTL_CONSTASCII_USTRINGPARAM("DecimalSeparatorAsLocale")) +#define PROPERTYNAME_LOCALE OUString(RTL_CONSTASCII_USTRINGPARAM("ooSetupSystemLocale")) +#define PROPERTYNAME_UILOCALE OUString(RTL_CONSTASCII_USTRINGPARAM("ooLocale")) +#define PROPERTYNAME_CURRENCY OUString(RTL_CONSTASCII_USTRINGPARAM("ooSetupCurrency")) +#define PROPERTYNAME_DECIMALSEPARATOR OUString(RTL_CONSTASCII_USTRINGPARAM("DecimalSeparatorAsLocale")) -#define PROPERTYHANDLE_LOCALE 0 -#define PROPERTYHANDLE_CURRENCY 1 -#define PROPERTYHANDLE_DECIMALSEPARATOR 2 +#define PROPERTYHANDLE_LOCALE 0 +#define PROPERTYHANDLE_UILOCALE 1 +#define PROPERTYHANDLE_CURRENCY 2 +#define PROPERTYHANDLE_DECIMALSEPARATOR 3 -#define PROPERTYCOUNT 3 +#define PROPERTYCOUNT 4 const Sequence< OUString > SvtSysLocaleOptions_Impl::GetPropertyNames() { static const OUString pProperties[] = { PROPERTYNAME_LOCALE, + PROPERTYNAME_UILOCALE, PROPERTYNAME_CURRENCY, PROPERTYNAME_DECIMALSEPARATOR }; @@ -128,7 +130,6 @@ const Sequence< OUString > SvtSysLocaleOptions_Impl::GetPropertyNames() return seqPropertyNames; } - // ----------------------------------------------------------------------- SvtSysLocaleOptions_Impl::SvtSysLocaleOptions_Impl() @@ -136,13 +137,12 @@ SvtSysLocaleOptions_Impl::SvtSysLocaleOptions_Impl() , m_nBlockedHint( 0 ) , m_bDecimalSeparator( sal_True ) , m_bROLocale(CFG_READONLY_DEFAULT) + , m_bROUILocale(CFG_READONLY_DEFAULT) , m_bROCurrency(CFG_READONLY_DEFAULT) , m_bRODecimalSeparator(sal_False) { - if ( !IsValidConfigMgr() ) - ChangeLocaleSettings(); // assume SYSTEM defaults during Setup - else + if ( IsValidConfigMgr() ) { const Sequence< OUString > aNames = GetPropertyNames(); Sequence< Any > aValues = GetProperties( aNames ); @@ -172,6 +172,18 @@ SvtSysLocaleOptions_Impl::SvtSysLocaleOptions_Impl() m_bROLocale = pROStates[nProp]; } break; + case PROPERTYHANDLE_UILOCALE : + { + OUString aStr; + if ( pValues[nProp] >>= aStr ) + m_aUILocaleString = aStr; + else + { + DBG_ERRORFILE( "Wrong property type!" ); + } + m_bROUILocale = pROStates[nProp]; + } + break; case PROPERTYHANDLE_CURRENCY : { OUString aStr; @@ -203,7 +215,6 @@ SvtSysLocaleOptions_Impl::SvtSysLocaleOptions_Impl() } } // UpdateMiscSettings_Impl(); - ChangeLocaleSettings(); EnableNotification( aNames ); } } @@ -226,6 +237,11 @@ sal_Bool SvtSysLocaleOptions_Impl::IsReadOnly( SvtSysLocaleOptions::EOption eOpt bReadOnly = m_bROLocale; break; } + case SvtSysLocaleOptions::E_UILOCALE : + { + bReadOnly = m_bROUILocale; + break; + } case SvtSysLocaleOptions::E_CURRENCY : { bReadOnly = m_bROCurrency; @@ -236,25 +252,6 @@ sal_Bool SvtSysLocaleOptions_Impl::IsReadOnly( SvtSysLocaleOptions::EOption eOpt } -/*void SvtSysLocaleOptions_Impl::Broadcast( ULONG nHint ) -{ - if ( m_nBroadcastBlocked ) - m_nBlockedHint |= nHint; - else - { - nHint |= m_nBlockedHint; - m_nBlockedHint = 0; - if ( nHint ) - { - if ( nHint & SYSLOCALEOPTIONS_HINT_CURRENCY ) - ChangeDefaultCurrency(); - SfxSimpleHint aHint( nHint ); - GetBroadcaster().Broadcast( aHint ); - } - } -}*/ - - void SvtSysLocaleOptions_Impl::Commit() { const Sequence< OUString > aOrgNames = GetPropertyNames(); @@ -281,9 +278,19 @@ void SvtSysLocaleOptions_Impl::Commit() } } break; + case PROPERTYHANDLE_UILOCALE : + { + if (!m_bROUILocale) + { + pNames[nRealCount] = aOrgNames[nProp]; + pValues[nRealCount] <<= m_aUILocaleString; + ++nRealCount; + } + } + break; case PROPERTYHANDLE_CURRENCY : { - if (!m_bROLocale) + if (!m_bROCurrency) { pNames[nRealCount] = aOrgNames[nProp]; pValues[nRealCount] <<= m_aCurrencyString; @@ -317,36 +324,29 @@ void SvtSysLocaleOptions_Impl::SetLocaleString( const OUString& rStr ) m_aLocaleString = rStr; SetModified(); ULONG nHint = SYSLOCALEOPTIONS_HINT_LOCALE; - nHint |= ChangeLocaleSettings(); - //Broadcast( nHint ); - NotifyListeners(); + if ( !m_aCurrencyString.getLength() ) + nHint |= SYSLOCALEOPTIONS_HINT_CURRENCY; + NotifyListeners( nHint ); } } - -ULONG SvtSysLocaleOptions_Impl::ChangeLocaleSettings() +void SvtSysLocaleOptions_Impl::SetUILocaleString( const OUString& rStr ) { - // An empty config value denotes SYSTEM locale - if ( m_aLocaleString.getLength() ) - m_eLocaleLanguageType = MsLangId::convertIsoStringToLanguage( m_aLocaleString ); - else - m_eLocaleLanguageType = LANGUAGE_SYSTEM; - ULONG nHint = 0; - // new locale and no fixed currency => locale default currency might change - if ( !m_aCurrencyString.getLength() ) - nHint |= SYSLOCALEOPTIONS_HINT_CURRENCY; - return nHint; + if (!m_bROUILocale && rStr != m_aUILocaleString ) + { + m_aUILocaleString = rStr; + SetModified(); + NotifyListeners( SYSLOCALEOPTIONS_HINT_UILOCALE ); + } } - void SvtSysLocaleOptions_Impl::SetCurrencyString( const OUString& rStr ) { if (!m_bROCurrency && rStr != m_aCurrencyString ) { m_aCurrencyString = rStr; SetModified(); - //Broadcast( SYSLOCALEOPTIONS_HINT_CURRENCY ); - NotifyListeners(); + NotifyListeners( SYSLOCALEOPTIONS_HINT_CURRENCY ); } } @@ -356,20 +356,10 @@ void SvtSysLocaleOptions_Impl::SetDecimalSeparatorAsLocale( sal_Bool bSet) { m_bDecimalSeparator = bSet; SetModified(); - //UpdateMiscSettings_Impl(); - NotifyListeners(); + NotifyListeners( SYSLOCALEOPTIONS_HINT_DECSEP ); } } - -void SvtSysLocaleOptions_Impl::ChangeDefaultCurrency() const -{ - const Link& rLink = SvtSysLocaleOptions::GetCurrencyChangeLink(); - if ( rLink.IsSet() ) - rLink.Call( NULL ); -} - - void SvtSysLocaleOptions_Impl::Notify( const Sequence< rtl::OUString >& seqPropertyNames ) { ULONG nHint = 0; @@ -384,7 +374,15 @@ void SvtSysLocaleOptions_Impl::Notify( const Sequence< rtl::OUString >& seqPrope seqValues[nProp] >>= m_aLocaleString; m_bROLocale = seqROStates[nProp]; nHint |= SYSLOCALEOPTIONS_HINT_LOCALE; - nHint |= ChangeLocaleSettings(); + if ( !m_aCurrencyString.getLength() ) + nHint |= SYSLOCALEOPTIONS_HINT_CURRENCY; + } + if( seqPropertyNames[nProp] == PROPERTYNAME_UILOCALE ) + { + DBG_ASSERT( seqValues[nProp].getValueTypeClass() == TypeClass_STRING, "Locale property type" ); + seqValues[nProp] >>= m_aUILocaleString; + m_bROUILocale = seqROStates[nProp]; + nHint |= SYSLOCALEOPTIONS_HINT_UILOCALE; } else if( seqPropertyNames[nProp] == PROPERTYNAME_CURRENCY ) { @@ -400,8 +398,7 @@ void SvtSysLocaleOptions_Impl::Notify( const Sequence< rtl::OUString >& seqPrope } } if ( nHint ) - //Broadcast( nHint ); - NotifyListeners(); + NotifyListeners( nHint ); } // ==================================================================== @@ -417,12 +414,14 @@ SvtSysLocaleOptions::SvtSysLocaleOptions() ItemHolder1::holdConfigItem(E_SYSLOCALEOPTIONS); } ++nRefCount; + pOptions->AddListener(this); } SvtSysLocaleOptions::~SvtSysLocaleOptions() { MutexGuard aGuard( GetMutex() ); + pOptions->RemoveListener(this); if ( !--nRefCount ) { delete pOptions; @@ -477,13 +476,23 @@ const OUString& SvtSysLocaleOptions::GetLocaleConfigString() const return pOptions->GetLocaleString(); } - void SvtSysLocaleOptions::SetLocaleConfigString( const OUString& rStr ) { MutexGuard aGuard( GetMutex() ); pOptions->SetLocaleString( rStr ); } +const OUString& SvtSysLocaleOptions::GetUILocaleConfigString() const +{ + MutexGuard aGuard( GetMutex() ); + return pOptions->GetUILocaleString(); +} + +void SvtSysLocaleOptions::SetUILocaleConfigString( const OUString& rStr ) +{ + MutexGuard aGuard( GetMutex() ); + pOptions->SetUILocaleString( rStr ); +} const OUString& SvtSysLocaleOptions::GetCurrencyConfigString() const { @@ -499,11 +508,6 @@ void SvtSysLocaleOptions::SetCurrencyConfigString( const OUString& rStr ) } -LanguageType SvtSysLocaleOptions::GetLocaleLanguageType() const -{ - MutexGuard aGuard( GetMutex() ); - return pOptions->GetLocaleLanguageType(); -} /*-- 11.02.2004 13:31:41--------------------------------------------------- @@ -582,3 +586,45 @@ const Link& SvtSysLocaleOptions::GetCurrencyChangeLink() return CurrencyChangeLink::get(); } + +void SvtSysLocaleOptions::ConfigurationChanged( utl::ConfigurationBroadcaster* p, sal_uInt32 nHint ) +{ + if ( nHint & SYSLOCALEOPTIONS_HINT_CURRENCY ) + { + const Link& rLink = GetCurrencyChangeLink(); + if ( rLink.IsSet() ) + rLink.Call( NULL ); + } + + ::utl::detail::Options::ConfigurationChanged( p, nHint ); +} + +com::sun::star::lang::Locale lcl_str_to_locale( const ::rtl::OUString rStr ) +{ + com::sun::star::lang::Locale aRet; + if ( rStr.getLength() ) + { + aRet = com::sun::star::lang::Locale(); + sal_Int32 nSep = rStr.indexOf('-'); + if (nSep < 0) + aRet.Language = rStr; + else + { + aRet.Language = rStr.copy(0, nSep); + if (nSep < rStr.getLength()) + aRet.Country = rStr.copy(nSep+1, rStr.getLength() - (nSep+1)); + } + } + + return aRet; +} + +com::sun::star::lang::Locale SvtSysLocaleOptions::GetLocale() const +{ + return lcl_str_to_locale( GetLocaleConfigString() ); +} + +com::sun::star::lang::Locale SvtSysLocaleOptions::GetUILocale() const +{ + return lcl_str_to_locale( GetUILocaleConfigString() ); +} diff --git a/unotools/source/config/undoopt.cxx b/unotools/source/config/undoopt.cxx index 9b1712032e18..c2c79120995f 100644 --- a/unotools/source/config/undoopt.cxx +++ b/unotools/source/config/undoopt.cxx @@ -94,7 +94,7 @@ void SvtUndoOptions_Impl::Commit() } PutProperties( m_aPropertyNames, aValues ); - NotifyListeners(); + NotifyListeners(0); } // ----------------------------------------------------------------------- diff --git a/unotools/source/config/useroptions.cxx b/unotools/source/config/useroptions.cxx index 3b62e8225730..e06d6a794e20 100644 --- a/unotools/source/config/useroptions.cxx +++ b/unotools/source/config/useroptions.cxx @@ -772,7 +772,7 @@ void SvtUserOptions_Impl::SetApartment( const ::rtl::OUString& sApartment ) void SvtUserOptions_Impl::Notify() { - NotifyListeners(); + NotifyListeners(0); } // ----------------------------------------------------------------------- diff --git a/unotools/source/misc/syslocale.cxx b/unotools/source/misc/syslocale.cxx index a299867f83e8..f108cd2ed3df 100644 --- a/unotools/source/misc/syslocale.cxx +++ b/unotools/source/misc/syslocale.cxx @@ -50,53 +50,61 @@ sal_Int32 SvtSysLocale::nRefCount = 0; class SvtSysLocale_Impl : public utl::ConfigurationListener { - friend class SvtSysLocale; - +public: SvtSysLocaleOptions aSysLocaleOptions; LocaleDataWrapper* pLocaleData; CharClass* pCharClass; com::sun::star::lang::Locale maLocale; + com::sun::star::lang::Locale maUILocale; + LanguageType meLanguage; + LanguageType meUILanguage; -public: - SvtSysLocale_Impl(); - virtual ~SvtSysLocale_Impl(); + SvtSysLocale_Impl(); + virtual ~SvtSysLocale_Impl(); - CharClass* GetCharClass(); - SvtSysLocaleOptions& GetOptions() { return aSysLocaleOptions; } - void ConfigurationChanged( utl::ConfigurationBroadcaster* ); - com::sun::star::lang::Locale GetLocale(); + CharClass* GetCharClass(); + virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 ); + void GetLocale(); + void GetUILocale(); }; -com::sun::star::lang::Locale SvtSysLocale_Impl::GetLocale() +void SvtSysLocale_Impl::GetLocale() { // ask configuration - rtl::OUString aLocaleString = aSysLocaleOptions.GetLocaleConfigString(); - if (!aLocaleString.getLength()) - // if no configuration is set, use system locale - return maLocale; - - com::sun::star::lang::Locale aLocale; - sal_Int32 nSep = aLocaleString.indexOf('-'); - if (nSep < 0) - aLocale.Language = aLocaleString; + maLocale = aSysLocaleOptions.GetLocale(); + if ( maLocale.Language.getLength() ) + { + meLanguage = MsLangId::convertLocaleToLanguage( maLocale ); + } else { - aLocale.Language = aLocaleString.copy(0, nSep); - if (nSep < aLocaleString.getLength()) - aLocale.Country = aLocaleString.copy(nSep+1, aLocaleString.getLength() - (nSep+1)); + meLanguage = MsLangId::getSystemLanguage(); + MsLangId::convertLanguageToLocale( meLanguage, maLocale ); } +} - return aLocale; +void SvtSysLocale_Impl::GetUILocale() +{ + maLocale = aSysLocaleOptions.GetLocale(); + if ( maUILocale.Language.getLength() ) + { + meUILanguage = MsLangId::convertLocaleToLanguage( maUILocale ); + } + else + { + meUILanguage = MsLangId::getSystemUILanguage(); + MsLangId::convertLanguageToLocale( meUILanguage, maUILocale ); + } } // ----------------------------------------------------------------------- SvtSysLocale_Impl::SvtSysLocale_Impl() : pCharClass(NULL) { - // first initialize maLocale with system locale - MsLangId::convertLanguageToLocale( MsLangId::getSystemLanguage(), maLocale ); + GetLocale(); + GetUILocale(); - pLocaleData = new LocaleDataWrapper( ::comphelper::getProcessServiceFactory(), GetLocale() ); + pLocaleData = new LocaleDataWrapper( ::comphelper::getProcessServiceFactory(), maLocale ); // listen for further changes aSysLocaleOptions.AddListener( this ); @@ -113,16 +121,22 @@ SvtSysLocale_Impl::~SvtSysLocale_Impl() CharClass* SvtSysLocale_Impl::GetCharClass() { if ( !pCharClass ) - pCharClass = new CharClass(::comphelper::getProcessServiceFactory(), GetLocale() ); + pCharClass = new CharClass(::comphelper::getProcessServiceFactory(), maLocale ); return pCharClass; } -void SvtSysLocale_Impl::ConfigurationChanged( utl::ConfigurationBroadcaster* ) +void SvtSysLocale_Impl::ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 nHint ) { MutexGuard aGuard( SvtSysLocale::GetMutex() ); - lang::Locale aLocale = GetLocale(); - pLocaleData->setLocale( aLocale ); - GetCharClass()->setLocale( aLocale ); + if ( nHint & SYSLOCALEOPTIONS_HINT_LOCALE ) + { + GetLocale(); + pLocaleData->setLocale( maLocale ); + GetCharClass()->setLocale( maLocale ); + } + + if ( nHint & SYSLOCALEOPTIONS_HINT_UILOCALE ) + GetUILocale(); } // ==================================================================== @@ -191,15 +205,27 @@ const CharClass* SvtSysLocale::GetCharClassPtr() const SvtSysLocaleOptions& SvtSysLocale::GetOptions() const { - return pImpl->GetOptions(); + return pImpl->aSysLocaleOptions; } com::sun::star::lang::Locale SvtSysLocale::GetLocale() const { - return pImpl->GetLocale(); + return pImpl->maLocale; } LanguageType SvtSysLocale::GetLanguage() const { - return MsLangId::convertLocaleToLanguage( pImpl->GetLocale() ); -}
\ No newline at end of file + return pImpl->meLanguage; +} + +com::sun::star::lang::Locale SvtSysLocale::GetUILocale() const +{ + return pImpl->maUILocale; +} + +LanguageType SvtSysLocale::GetUILanguage() const +{ + return pImpl->meUILanguage; +} + + diff --git a/vcl/inc/vcl/settings.hxx b/vcl/inc/vcl/settings.hxx index 9f41b933f516..8891fdcfcf14 100644 --- a/vcl/inc/vcl/settings.hxx +++ b/vcl/inc/vcl/settings.hxx @@ -1285,8 +1285,8 @@ public: BOOL operator ==( const AllSettings& rSet ) const; BOOL operator !=( const AllSettings& rSet ) const { return !(*this == rSet); } - static void LocaleSettingsChanged(); - void StartListening(); + static void LocaleSettingsChanged( sal_uInt32 nHint ); + SvtSysLocale& GetSysLocale() { return mpData->maSysLocale; } }; #endif // _SV_SETTINGS_HXX diff --git a/vcl/inc/vcl/svdata.hxx b/vcl/inc/vcl/svdata.hxx index c044364f2064..2ca7c2818a5e 100644 --- a/vcl/inc/vcl/svdata.hxx +++ b/vcl/inc/vcl/svdata.hxx @@ -44,6 +44,7 @@ #include <tools/debug.hxx> #include <vcl/dllapi.h> #include <com/sun/star/uno/Reference.hxx> +#include <unotools/options.hxx> namespace com { namespace sun { @@ -118,6 +119,11 @@ namespace vcl { class DisplayConnection; class FontSubstConfiguration; class Set // ----------------- // - ImplSVAppData - // ----------------- +class LocaleConfigurationListener : public utl::ConfigurationListener +{ +public: + virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 ); +}; struct ImplSVAppData { @@ -131,6 +137,7 @@ struct ImplSVAppData ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMSF; String* mpMSFTempFileName; AllSettings* mpSettings; // Application settings + LocaleConfigurationListener* mpCfgListener; VclEventListeners* mpEventListeners; // listeners for vcl events (eg, extended toolkit) VclEventListeners* mpKeyListeners; // listeners for key events only (eg, extended toolkit) ImplAccelManager* mpAccelMgr; // Accelerator Manager diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx index d30a1c9745f4..ae142c170b53 100644 --- a/vcl/source/app/settings.cxx +++ b/vcl/source/app/settings.cxx @@ -67,17 +67,6 @@ DBG_NAME( AllSettings ) STYLE_OPTION_NOMNEMONICS) // ======================================================================= -class LocaleConfigurationListener : public utl::ConfigurationListener -{ -public: - virtual void ConfigurationChanged( utl::ConfigurationBroadcaster* ); -}; - -void LocaleConfigurationListener::ConfigurationChanged( utl::ConfigurationBroadcaster* ) -{ - AllSettings::LocaleSettingsChanged(); -} - ImplMachineData::ImplMachineData() { mnRefCount = 1; @@ -1543,7 +1532,6 @@ ImplAllSettingsData::ImplAllSettingsData() mpUICollatorWrapper = NULL; mpI18nHelper = NULL; mpUII18nHelper = NULL; - mpLocaleCfgListener = NULL; maMiscSettings.SetEnableLocalizedDecimalSep( maSysLocale.GetOptions().IsDecimalSeparatorAsLocale() ); } @@ -1574,7 +1562,6 @@ ImplAllSettingsData::ImplAllSettingsData( const ImplAllSettingsData& rData ) : mpUICollatorWrapper = NULL; mpI18nHelper = NULL; mpUII18nHelper = NULL; - mpLocaleCfgListener = NULL; } // ----------------------------------------------------------------------- @@ -1593,11 +1580,6 @@ ImplAllSettingsData::~ImplAllSettingsData() delete mpI18nHelper; if ( mpUII18nHelper ) delete mpUII18nHelper; - if (mpLocaleCfgListener ) - { - maSysLocale.GetOptions().RemoveListener( mpLocaleCfgListener ); - delete mpLocaleCfgListener; - } } // ----------------------------------------------------------------------- @@ -1656,13 +1638,6 @@ const AllSettings& AllSettings::operator =( const AllSettings& rSet ) return *this; } -void AllSettings::StartListening() -{ - if (!mpData->mpLocaleCfgListener) - mpData->mpLocaleCfgListener = new LocaleConfigurationListener; - mpData->maSysLocale.GetOptions().AddListener( mpData->mpLocaleCfgListener ); -} - // ----------------------------------------------------------------------- void AllSettings::CopyData() @@ -1996,8 +1971,7 @@ BOOL AllSettings::GetLayoutRTL() const const ::com::sun::star::lang::Locale& AllSettings::GetLocale() const { if ( !mpData->maLocale.Language.getLength() ) - MsLangId::convertLanguageToLocale( GetLanguage(), - ((AllSettings*)this)->mpData->maLocale ); + mpData->maLocale = mpData->maSysLocale.GetLocale(); return mpData->maLocale; } @@ -2007,8 +1981,7 @@ const ::com::sun::star::lang::Locale& AllSettings::GetLocale() const const ::com::sun::star::lang::Locale& AllSettings::GetUILocale() const { if ( !mpData->maUILocale.Language.getLength() ) - MsLangId::convertLanguageToLocale( GetUILanguage(), - ((AllSettings*)this)->mpData->maUILocale ); + mpData->maUILocale = mpData->maSysLocale.GetUILocale(); return mpData->maUILocale; } @@ -2018,7 +1991,7 @@ const ::com::sun::star::lang::Locale& AllSettings::GetUILocale() const LanguageType AllSettings::GetLanguage() const { if ( mpData->meLanguage == LANGUAGE_SYSTEM ) - return MsLangId::getSystemLanguage(); + mpData->meLanguage = mpData->maSysLocale.GetLanguage(); return mpData->meLanguage; } @@ -2028,7 +2001,7 @@ LanguageType AllSettings::GetLanguage() const LanguageType AllSettings::GetUILanguage() const { if ( mpData->meUILanguage == LANGUAGE_SYSTEM ) - return MsLangId::getSystemUILanguage(); + mpData->meUILanguage = mpData->maSysLocale.GetUILanguage(); return mpData->meUILanguage; } @@ -2098,15 +2071,26 @@ const CollatorWrapper& AllSettings::GetUICollatorWrapper() const return *mpData->mpUICollatorWrapper; } */ -void AllSettings::LocaleSettingsChanged() + +void AllSettings::LocaleSettingsChanged( sal_uInt32 nHint ) { AllSettings aAllSettings( Application::GetSettings() ); - MiscSettings aMiscSettings = aAllSettings.GetMiscSettings(); - BOOL bIsDecSepAsLocale = aAllSettings.mpData->maSysLocale.GetOptions().IsDecimalSeparatorAsLocale(); - if ( aMiscSettings.GetEnableLocalizedDecimalSep() != bIsDecSepAsLocale ) + if ( nHint & SYSLOCALEOPTIONS_HINT_DECSEP ) { - aMiscSettings.SetEnableLocalizedDecimalSep( bIsDecSepAsLocale ); - aAllSettings.SetMiscSettings( aMiscSettings ); - Application::SetSettings( aAllSettings ); + MiscSettings aMiscSettings = aAllSettings.GetMiscSettings(); + BOOL bIsDecSepAsLocale = aAllSettings.mpData->maSysLocale.GetOptions().IsDecimalSeparatorAsLocale(); + if ( aMiscSettings.GetEnableLocalizedDecimalSep() != bIsDecSepAsLocale ) + { + aMiscSettings.SetEnableLocalizedDecimalSep( bIsDecSepAsLocale ); + aAllSettings.SetMiscSettings( aMiscSettings ); + } } -}
\ No newline at end of file + + if ( nHint & SYSLOCALEOPTIONS_HINT_LOCALE ) + aAllSettings.SetLocale( aAllSettings.mpData->maSysLocale.GetOptions().GetLocale() ); + + if ( nHint & SYSLOCALEOPTIONS_HINT_UILOCALE ) + aAllSettings.SetLocale( aAllSettings.mpData->maSysLocale.GetOptions().GetUILocale() ); + + Application::SetSettings( aAllSettings ); +} diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index 9f381381fae8..19b8ea1ff14d 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -88,6 +88,7 @@ #include <utility> #include <vcl/lazydelete.hxx> +#include <unotools/syslocaleoptions.hxx> using namespace ::com::sun::star::uno; @@ -709,8 +710,7 @@ void Application::SetSettings( const AllSettings& rSettings ) ImplSVData* pSVData = ImplGetSVData(); if ( !pSVData->maAppData.mpSettings ) { - pSVData->maAppData.mpSettings = new AllSettings(); - pSVData->maAppData.mpSettings->StartListening(); + GetSettings(); *pSVData->maAppData.mpSettings = rSettings; ResMgr::SetDefaultLocale( rSettings.GetUILocale() ); } @@ -812,7 +812,12 @@ const AllSettings& Application::GetSettings() { ImplSVData* pSVData = ImplGetSVData(); if ( !pSVData->maAppData.mpSettings ) + { + pSVData->maAppData.mpCfgListener = new LocaleConfigurationListener; pSVData->maAppData.mpSettings = new AllSettings(); + pSVData->maAppData.mpSettings->GetSysLocale().GetOptions().AddListener( pSVData->maAppData.mpCfgListener ); + } + return *(pSVData->maAppData.mpSettings); } diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx index 21e1f34c1ef5..b40777eb2e01 100644 --- a/vcl/source/app/svdata.cxx +++ b/vcl/source/app/svdata.cxx @@ -523,3 +523,9 @@ Window* ImplFindWindow( const SalFrame* pFrame, Point& rSalFramePos ) return NULL; } + +void LocaleConfigurationListener::ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 nHint ) +{ + AllSettings::LocaleSettingsChanged( nHint ); +} + diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx index 6c09978e37b1..d8b1e8a833a2 100644 --- a/vcl/source/app/svmain.cxx +++ b/vcl/source/app/svmain.cxx @@ -79,7 +79,7 @@ #include "com/sun/star/lang/XMultiServiceFactory.hpp" #include "com/sun/star/lang/XComponent.hpp" #include "rtl/logfile.hxx" - +#include <unotools/syslocaleoptions.hxx> #include "vcl/fontcfg.hxx" #include "vcl/configsettings.hxx" #include "vcl/lazydelete.hxx" @@ -467,6 +467,12 @@ void DeInitVCL() if ( pSVData->maAppData.mpSettings ) { + if ( pSVData->maAppData.mpCfgListener ) + { + pSVData->maAppData.mpSettings->GetSysLocale().GetOptions().RemoveListener( pSVData->maAppData.mpCfgListener ); + delete pSVData->maAppData.mpCfgListener; + } + delete pSVData->maAppData.mpSettings; pSVData->maAppData.mpSettings = NULL; } |