summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2009-10-09 17:54:26 +0200
committerMathias Bauer <mba@openoffice.org>2009-10-09 17:54:26 +0200
commitb1b5009015a70525edc7515d4f9723d53788aafc (patch)
tree269b77a1986a658f7d6aaea67c9832070df15384 /svl
parent83e74faedcb1204f33db435c63fca13fbd0011b7 (diff)
#i103496#: unused code removed
Diffstat (limited to 'svl')
-rw-r--r--svl/inc/svl/cstitem.hxx94
-rw-r--r--svl/inc/svl/dateitem.hxx109
-rw-r--r--svl/inc/svl/svtools.hrc11
-rw-r--r--svl/source/items/cstitem.cxx252
-rw-r--r--svl/source/items/cstitem.src112
-rw-r--r--svl/source/items/dateitem.cxx284
-rw-r--r--svl/source/items/makefile.mk6
-rw-r--r--svl/util/makefile.mk5
8 files changed, 3 insertions, 870 deletions
diff --git a/svl/inc/svl/cstitem.hxx b/svl/inc/svl/cstitem.hxx
deleted file mode 100644
index 001731d68b41..000000000000
--- a/svl/inc/svl/cstitem.hxx
+++ /dev/null
@@ -1,94 +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: cstitem.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 _CSTITEM_HXX
-#define _CSTITEM_HXX
-
-#include <tools/rtti.hxx>
-
-#include <svl/poolitem.hxx>
-
-class SvStream;
-
-enum CrawlStatus
-{
- CSTAT_NEVER_UPD = 0, /* noch nie ueberprueft */
- CSTAT_IN_UPD = 1, /* Ueberpruefung laeuft */
- CSTAT_UPD_NEWER = 2, /* wurde ueberprueft und ist neuer */
- CSTAT_UPD_NOT_NEWER = 3, /* wurde ueberprueft und ist nicht neuer */
- CSTAT_UPD_CANCEL = 4, /* Ueberpruefung vom Benutzer abgebrochen */
- CSTAT_ERR_GENERAL = 5, /* allgemeiner Fehler */
- CSTAT_ERR_NOTEXISTS = 6, /* Server existiert nicht */
- CSTAT_ERR_NOTREACHED = 7, /* Server nicht ereicht */
- CSTAT_UPD_IMMEDIATELY = 8, /* es wird gleich ueberprueftt */
- CSTAT_ERR_OFFLINE = 9 /* Ueberpruefung nicht m�glich, da Offline */
-};
-
-DBG_NAMEEX(SfxCrawlStatusItem)
-
-// class SfxDateTimeRangeItem -------------------------------------------------
-
-class SfxCrawlStatusItem : public SfxPoolItem
-{
-private:
- CrawlStatus eStatus;
-public:
- TYPEINFO();
-
- SfxCrawlStatusItem( const SfxCrawlStatusItem& rCpy );
- SfxCrawlStatusItem( USHORT nWhich );
- SfxCrawlStatusItem( USHORT nWhich, CrawlStatus eStat );
- ~SfxCrawlStatusItem() { DBG_DTOR(SfxCrawlStatusItem, 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;
-
- CrawlStatus GetStatus() const { return eStatus; }
- void SetStatus(CrawlStatus eNew) { eStatus = eNew; }
-
- 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;
-};
-
-#endif
-
diff --git a/svl/inc/svl/dateitem.hxx b/svl/inc/svl/dateitem.hxx
deleted file mode 100644
index c66c9a84285d..000000000000
--- a/svl/inc/svl/dateitem.hxx
+++ /dev/null
@@ -1,109 +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: 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/svtools.hrc b/svl/inc/svl/svtools.hrc
index 2bccf2ee74c4..60095caa8784 100644
--- a/svl/inc/svl/svtools.hrc
+++ b/svl/inc/svl/svtools.hrc
@@ -90,17 +90,6 @@
#define STR_SVT_SAMPLES_HELP (RID_SVTOOLS_START+66)
#define STR_WARNING_ITEM (RID_SVTOOLS_START+90)
-#define STR_CSTAT_NEVER_UPD (RID_SVTOOLS_START+91)
-#define STR_CSTAT_IN_UPD (RID_SVTOOLS_START+92)
-#define STR_CSTAT_UPD_NEWER (RID_SVTOOLS_START+93)
-#define STR_CSTAT_UPD_NOT_NEWER (RID_SVTOOLS_START+94)
-#define STR_CSTAT_UPD_CANCEL (RID_SVTOOLS_START+95)
-#define STR_CSTAT_ERR_GENERAL (RID_SVTOOLS_START+96)
-#define STR_CSTAT_ERR_NOTEXISTS (RID_SVTOOLS_START+97)
-#define STR_CSTAT_ERR_NOTREACHED (RID_SVTOOLS_START+98)
-#define STR_COLUM_DT_AUTO (RID_SVTOOLS_START+99)
-#define STR_CSTAT_UPD_IMMEDIATELY (RID_SVTOOLS_START+100)
-#define STR_CSTAT_ERR_OFFLINE (RID_SVTOOLS_START+101)
#define CONFIG_BASIC_FORMAT_START (RID_SVTOOLS_START+102)
#define STR_BASICKEY_FORMAT_ON (RID_SVTOOLS_START+103)
diff --git a/svl/source/items/cstitem.cxx b/svl/source/items/cstitem.cxx
deleted file mode 100644
index af2bfbc18fb9..000000000000
--- a/svl/source/items/cstitem.cxx
+++ /dev/null
@@ -1,252 +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: cstitem.cxx,v $
- * $Revision: 1.9 $
- *
- * 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 <unotools/intlwrapper.hxx>
-
-#include <tools/stream.hxx>
-#include <tools/debug.hxx>
-#include <tools/datetime.hxx>
-
-#include <svl/svldata.hxx>
-#include <svl/cstitem.hxx>
-
-#include <svl/svtools.hrc>
-#include <com/sun/star/lang/Locale.hpp>
-
-DBG_NAME( SfxCrawlStatusItem )
-TYPEINIT1( SfxCrawlStatusItem, SfxPoolItem );
-
-// -----------------------------------------------------------------------
-
-SfxCrawlStatusItem::SfxCrawlStatusItem( USHORT which ) :
- SfxPoolItem( which )
-{
- DBG_CTOR( SfxCrawlStatusItem, 0 );
-}
-
-// -----------------------------------------------------------------------
-
-SfxCrawlStatusItem::SfxCrawlStatusItem( USHORT which, CrawlStatus eStat ) :
- SfxPoolItem( which ),
- eStatus( eStat )
-{
- DBG_CTOR( SfxCrawlStatusItem, 0 );
-}
-
-// -----------------------------------------------------------------------
-
-SfxCrawlStatusItem::SfxCrawlStatusItem( const SfxCrawlStatusItem& rItem ) :
- SfxPoolItem( rItem ),
- eStatus( rItem.eStatus )
-{
- DBG_CTOR( SfxCrawlStatusItem, 0 );
-}
-
-// -----------------------------------------------------------------------
-
-int SfxCrawlStatusItem::operator==( const SfxPoolItem& rItem ) const
-{
- DBG_CHKTHIS( SfxCrawlStatusItem, 0 );
- DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
-
- return ((SfxCrawlStatusItem&)rItem).eStatus == eStatus;
-}
-
-// -----------------------------------------------------------------------
-
-int SfxCrawlStatusItem::Compare( const SfxPoolItem& rItem ) const
-{
- DBG_CHKTHIS( SfxCrawlStatusItem, 0 );
- DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
-
- if( ((const SfxCrawlStatusItem&)rItem).eStatus < eStatus )
- return -1;
- else if( ((const SfxCrawlStatusItem&)rItem).eStatus == eStatus )
- return 0;
- else
- return 1;
-}
-
-// -----------------------------------------------------------------------
-
-SfxPoolItem* SfxCrawlStatusItem::Create( SvStream& rStream, USHORT ) const
-{
- DBG_CHKTHIS(SfxCrawlStatusItem, 0);
-
- USHORT _eStatus;
- rStream >> _eStatus;
-
- return new SfxCrawlStatusItem( Which(), (CrawlStatus)_eStatus );
-}
-
-// -----------------------------------------------------------------------
-
-SvStream& SfxCrawlStatusItem::Store( SvStream& rStream, USHORT ) const
-{
- DBG_CHKTHIS( SfxCrawlStatusItem, 0 );
-
- USHORT nStatus = (USHORT)eStatus;
- rStream << (USHORT) nStatus;
-
- return rStream;
-}
-
-// -----------------------------------------------------------------------
-
-SfxPoolItem* SfxCrawlStatusItem::Clone( SfxItemPool* ) const
-{
- DBG_CHKTHIS( SfxCrawlStatusItem, 0 );
- return new SfxCrawlStatusItem( *this );
-}
-// -----------------------------------------------------------------------
-
-SfxItemPresentation SfxCrawlStatusItem::GetPresentation
-(
- SfxItemPresentation /*ePresentation*/,
- SfxMapUnit /*eCoreMetric*/,
- SfxMapUnit /*ePresentationMetric*/,
- XubString& rText,
- const IntlWrapper * pIntlWrapper
-) const
-{
- DBG_CHKTHIS(SfxCrawlStatusItem, 0);
- DBG_ASSERT(pIntlWrapper,
- "SfxCrawlStatusItem::GetPresentation():"
- " Using default IntlWrapper");
-
- ::com::sun::star::lang::Locale aLocale;
-
- switch (eStatus)
- {
- case CSTAT_NEVER_UPD:
- rText = String(SvtSimpleResId(STR_CSTAT_NEVER_UPD,
- pIntlWrapper ?
- pIntlWrapper->getLocale() :
- aLocale));
- break;
-
- case CSTAT_IN_UPD:
- rText = String(SvtSimpleResId(STR_CSTAT_IN_UPD,
- pIntlWrapper ?
- pIntlWrapper->getLocale() :
- aLocale));
- break;
-
- case CSTAT_UPD_NEWER:
- rText = String(SvtSimpleResId(STR_CSTAT_UPD_NEWER,
- pIntlWrapper ?
- pIntlWrapper->getLocale() :
- aLocale));
- break;
-
- case CSTAT_UPD_NOT_NEWER:
- rText = String(SvtSimpleResId(STR_CSTAT_UPD_NOT_NEWER,
- pIntlWrapper ?
- pIntlWrapper->getLocale() :
- aLocale));
- break;
-
- case CSTAT_UPD_CANCEL:
- rText = String(SvtSimpleResId(STR_CSTAT_UPD_CANCEL,
- pIntlWrapper ?
- pIntlWrapper->getLocale() :
- aLocale));
- break;
-
- case CSTAT_ERR_GENERAL:
- rText = String(SvtSimpleResId(STR_CSTAT_ERR_GENERAL,
- pIntlWrapper ?
- pIntlWrapper->getLocale() :
- aLocale));
- break;
-
- case CSTAT_ERR_NOTEXISTS:
- rText = String(SvtSimpleResId(STR_CSTAT_ERR_NOTEXISTS,
- pIntlWrapper ?
- pIntlWrapper->getLocale() :
- aLocale));
- break;
-
- case CSTAT_ERR_NOTREACHED:
- rText = String(SvtSimpleResId(STR_CSTAT_ERR_NOTREACHED,
- pIntlWrapper ?
- pIntlWrapper->getLocale() :
- aLocale));
- break;
-
- case CSTAT_UPD_IMMEDIATELY:
- rText = String(SvtSimpleResId(STR_CSTAT_UPD_IMMEDIATELY,
- pIntlWrapper ?
- pIntlWrapper->getLocale() :
- aLocale));
- break;
-
- case CSTAT_ERR_OFFLINE:
- rText = String(SvtSimpleResId(STR_CSTAT_ERR_OFFLINE,
- pIntlWrapper ?
- pIntlWrapper->getLocale() :
- aLocale));
- break;
-
- default:
- rText.Erase();
- break;
- }
- return SFX_ITEM_PRESENTATION_NAMELESS;
-}
-
-//----------------------------------------------------------------------------
-// virtual
-BOOL SfxCrawlStatusItem::PutValue( const com::sun::star::uno::Any& rVal,BYTE )
-{
- sal_Int16 aValue = sal_Int16();
- if ( rVal >>= aValue )
- {
- SetStatus( static_cast< CrawlStatus >( aValue ) );
- return TRUE;
- }
-
- DBG_ERROR( "SfxCrawlStatusItem::PutValue - Wrong type!" );
- return FALSE;
-}
-
-//----------------------------------------------------------------------------
-// virtual
-BOOL SfxCrawlStatusItem::QueryValue( com::sun::star::uno::Any& rVal,BYTE ) const
-{
- sal_Int16 aValue = sal::static_int_cast< sal_Int16 >(GetStatus());
- rVal <<= aValue;
- return TRUE;
-}
-
diff --git a/svl/source/items/cstitem.src b/svl/source/items/cstitem.src
deleted file mode 100644
index b25b980e39cf..000000000000
--- a/svl/source/items/cstitem.src
+++ /dev/null
@@ -1,112 +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: cstitem.src,v $
- * $Revision: 1.7 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include <svl/svtools.hrc>
-String STR_CSTAT_NEVER_UPD
-{
- Text [ en-US ] = "No update has occurred" ;
-};
-String STR_CSTAT_IN_UPD
-{
- Text [ en-US ] = "Updating in progress" ;
-};
-String STR_CSTAT_UPD_NEWER
-{
- Text [ en-US ] = "Changes discovered" ;
-};
-String STR_CSTAT_UPD_NOT_NEWER
-{
- Text [ en-US ] = "No changes discovered" ;
-};
-String STR_CSTAT_UPD_CANCEL
-{
- Text [ en-US ] = "Canceled by user" ;
-};
-String STR_CSTAT_UPD_IMMEDIATELY
-{
- Text [ en-US ] = "Updating immediately" ;
-};
-String STR_CSTAT_ERR_OFFLINE
-{
- Text [ en-US ] = "failed, you have not been online" ;
-};
-String STR_CSTAT_ERR_GENERAL
-{
- Text [ en-US ] = "General error" ;
-};
-String STR_CSTAT_ERR_NOTEXISTS
-{
- Text [ en-US ] = "Server does not exist" ;
-};
-String STR_CSTAT_ERR_NOTREACHED
-{
- Text [ en-US ] = "Server not available" ;
-};
-String STR_COLUM_DT_AUTO
-{
- Text [ en-US ] = "automatic" ;
-};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/svl/source/items/dateitem.cxx b/svl/source/items/dateitem.cxx
deleted file mode 100644
index 7f901dac9cd8..000000000000
--- a/svl/source/items/dateitem.cxx
+++ /dev/null
@@ -1,284 +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: 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 <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>
-#include <svl/svtools.hrc>
-
-// 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/makefile.mk b/svl/source/items/makefile.mk
index ea376eeb08ee..525fff0bc90a 100644
--- a/svl/source/items/makefile.mk
+++ b/svl/source/items/makefile.mk
@@ -60,10 +60,8 @@ SLOFILES=\
$(SLO)$/cenumitm.obj \
$(SLO)$/cintitem.obj \
$(SLO)$/cntwall.obj \
- $(SLO)$/cstitem.obj \
$(SLO)$/ctypeitm.obj \
$(SLO)$/custritm.obj \
- $(SLO)$/dateitem.obj \
$(SLO)$/dtritem.obj \
$(SLO)$/frqitem.obj \
$(SLO)$/ilstitem.obj \
@@ -83,10 +81,6 @@ SLOFILES=\
$(SLO)$/whiter.obj \
$(SLO)$/visitem.obj
-SRS1NAME=$(TARGET)
-SRC1FILES=\
- cstitem.src
-
# --- Targets -------------------------------------------------------
.INCLUDE : target.mk
diff --git a/svl/util/makefile.mk b/svl/util/makefile.mk
index 56f3d0bfed15..a8bdd52fd81c 100644
--- a/svl/util/makefile.mk
+++ b/svl/util/makefile.mk
@@ -45,8 +45,8 @@ ENABLE_EXCEPTIONS=TRUE
# --- general section ----------------------------------------------------
.IF "$(GUI)"!="UNX"
-LIB1TARGET= $(LB)$/isvl.lib
-LIB1FILES= $(LB)$/_isvl.lib
+LIB2TARGET= $(LB)$/isvl.lib
+LIB2FILES= $(LB)$/_isvl.lib
.ENDIF
LIB1TARGET= $(SLB)$/svl.lib
@@ -88,6 +88,7 @@ SHL1STDLIBS= \
$(CPPULIB) \
$(VOSLIB) \
$(VCLLIB) \
+ $(SOTLIB) \
$(SALLIB)
.IF "$(GUI)"=="WNT"