diff options
author | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2010-12-23 10:01:58 +0100 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2010-12-23 10:01:58 +0100 |
commit | e4e6ad6f2abdba8ade885b9e9690e564005c9a05 (patch) | |
tree | 0c6ea0153103c9ac55ba682991becc54ed6d3572 /svl/inc/svl | |
parent | c7ad411225efebba968be4e1b851b9a95d920fde (diff) | |
parent | 7997ab5bac6fbdfe3b3427c322507a993d33acbc (diff) |
undoapi: merged after pulling DEV300_m96. Most probably still not buildable:A number of changes which happened in the CWS need to be redone due to the new build system
Diffstat (limited to 'svl/inc/svl')
30 files changed, 2617 insertions, 158 deletions
diff --git a/svl/inc/svl/PasswordHelper.hxx b/svl/inc/svl/PasswordHelper.hxx new file mode 100644 index 000000000000..da9bc5da99ea --- /dev/null +++ b/svl/inc/svl/PasswordHelper.hxx @@ -0,0 +1,54 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVTOOLS_PASSWORDHELPER_HXX +#define _SVTOOLS_PASSWORDHELPER_HXX + +#include "svl/svldllapi.h" +#include "sal/types.h" +#include "com/sun/star/uno/Sequence.hxx" + +class String; + +class SvPasswordHelper +{ + static void GetHashPassword(com::sun::star::uno::Sequence <sal_Int8>& rPassHash, const sal_Char* pPass, sal_uInt32 nLen); + static void GetHashPasswordLittleEndian(com::sun::star::uno::Sequence<sal_Int8>& rPassHash, const String& sPass); + static void GetHashPasswordBigEndian(com::sun::star::uno::Sequence<sal_Int8>& rPassHash, const String& sPass); + +public: + SVL_DLLPUBLIC static void GetHashPassword(com::sun::star::uno::Sequence<sal_Int8>& rPassHash, const String& sPass); + /** + Use this method to compare a given string with another given Hash value. + This is necessary, because in older versions exists different hashs of the same string. They were endian dependent. + We need this to handle old files. This method will compare against big and little endian. See #101326# + */ + SVL_DLLPUBLIC static bool CompareHashPassword(const com::sun::star::uno::Sequence<sal_Int8>& rOldPassHash, const String& sNewPass); +}; + +#endif + diff --git a/svl/inc/svl/adrparse.hxx b/svl/inc/svl/adrparse.hxx new file mode 100644 index 000000000000..f2a85b9cacd5 --- /dev/null +++ b/svl/inc/svl/adrparse.hxx @@ -0,0 +1,107 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _ADRPARSE_HXX +#define _ADRPARSE_HXX + +#include "svl/svldllapi.h" +#include <tools/list.hxx> +#include <tools/string.hxx> + +//============================================================================ +struct SvAddressEntry_Impl +{ + UniString m_aAddrSpec; + UniString m_aRealName; + + SvAddressEntry_Impl() {}; + SvAddressEntry_Impl(UniString const & rTheAddrSpec, + UniString const & rTheRealName): + m_aAddrSpec(rTheAddrSpec), m_aRealName(rTheRealName) {} +}; + +//============================================================================ +DECLARE_LIST(SvAddressList_Impl, SvAddressEntry_Impl *) + +//============================================================================ +class SVL_DLLPUBLIC SvAddressParser +{ + friend class SvAddressParser_Impl; + + SvAddressEntry_Impl m_aFirst; + SvAddressList_Impl m_aRest; + bool m_bHasFirst; + +public: + SvAddressParser(UniString const & rInput); + + ~SvAddressParser(); + + sal_Int32 Count() const { return m_bHasFirst ? m_aRest.Count() + 1 : 0; } + + inline UniString const & GetEmailAddress(sal_Int32 nIndex) const; + + inline UniString const &GetRealName(sal_Int32 nIndex) const; + + /** Create an RFC 822 <mailbox> (i.e., 'e-mail address'). + + @param rPhrase Either an empty string (the <mailbox> will have no + <phrase> an will be of the form <addr-spec>), or some text that will + become the <phrase> part of a <phrase route-addr> form <mailbox>. Non + US-ASCII characters within the text are put into a <qouted-string> + verbatim, so the result may actually not be a valid RFC 822 <mailbox>, + but a more human-readable representation. + + @param rAddrSpec A valid RFC 822 <addr-spec>. (An RFC 822 <mailbox> + including a <route> cannot be created by this method.) + + @param rMailbox If this method returns true, this parameter returns + the created RFC 822 <mailbox> (rather, a more human-readable + representation thereof). Otherwise, this parameter is not modified. + + @return True, if rAddrSpec is a valid RFC 822 <addr-spec>. + */ + static bool createRFC822Mailbox(String const & rPhrase, + String const & rAddrSpec, + String & rMailbox); +}; + +inline UniString const & SvAddressParser::GetEmailAddress(sal_Int32 nIndex) + const +{ + return nIndex == 0 ? m_aFirst.m_aAddrSpec : + m_aRest.GetObject(nIndex - 1)->m_aAddrSpec; +} + +inline UniString const & SvAddressParser::GetRealName(sal_Int32 nIndex) const +{ + return nIndex == 0 ? m_aFirst.m_aRealName : + m_aRest.GetObject(nIndex - 1)->m_aRealName; +} + +#endif // _ADRPARSE_HXX + diff --git a/svl/inc/svl/broadcast.hxx b/svl/inc/svl/broadcast.hxx new file mode 100644 index 000000000000..2acddb5e4f6b --- /dev/null +++ b/svl/inc/svl/broadcast.hxx @@ -0,0 +1,67 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVT_BROADCAST_HXX +#define _SVT_BROADCAST_HXX + +#include "svl/svldllapi.h" +#include <tools/rtti.hxx> + +class SvtListener; +class SfxHint; +class SvtListenerBase; + +//------------------------------------------------------------------------- + +class SVL_DLLPUBLIC SvtBroadcaster +{ +friend class SvtListener; +friend class SvtListenerBase; +friend class SvtListenerIter; + SvtListenerBase* pRoot; + + const SvtBroadcaster& operator=(const SvtBroadcaster &); // verboten + +protected: + void Forward( SvtBroadcaster& rBC, + const SfxHint& rHint ); + virtual void ListenersGone(); + +public: + TYPEINFO(); + + SvtBroadcaster(); + SvtBroadcaster( const SvtBroadcaster &rBC ); + virtual ~SvtBroadcaster(); + + void Broadcast( const SfxHint &rHint ); + + BOOL HasListeners() const { return 0 != pRoot; } +}; + + +#endif + diff --git a/svl/inc/svl/cancel.hxx b/svl/inc/svl/cancel.hxx deleted file mode 100644 index d268044a611d..000000000000 --- a/svl/inc/svl/cancel.hxx +++ /dev/null @@ -1,142 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _SFXCANCEL_HXX -#define _SFXCANCEL_HXX - -#include "svl/svldllapi.h" -#include <tools/string.hxx> -#include <tools/ref.hxx> -#include <svl/brdcst.hxx> -#include <svl/smplhint.hxx> - -class SfxCancellable; - -#ifdef _SFX_CANCEL_CXX -#include <svl/svarray.hxx> - -SV_DECL_PTRARR( SfxCancellables_Impl, SfxCancellable*, 0, 4 ) - -#else - -typedef SvPtrarr SfxCancellables_Impl; - -#endif - -//------------------------------------------------------------------------- - -class SVL_DLLPUBLIC SfxCancelManager: public SfxBroadcaster -, public SvWeakBase - -/* [Beschreibung] - - An Instanzen dieser Klasse k"onnen nebenl"aufige Prozesse angemeldet - werden, um vom Benutzer abbrechbar zu sein. Werden abbrechbare - Prozesse (Instanzen von <SfxCancellable>) an- oder abgemeldet, wird - dies durch einen <SfxSimpleHint> mit dem Flag SFX_HINT_CANCELLABLE - gebroadcastet. - - SfxCancelManager k"onnen hierarchisch angeordnet werden, so k"onnen - z.B. Dokument-lokale Prozesse getrennt gecancelt werden. - - [Beispiel] - - SfxCancelManager *pMgr = new SfxCancelManager; - StartListening( pMgr ); - pMailSystem->SetCancelManager( pMgr ) -*/ - -{ - SfxCancelManager* _pParent; - SfxCancellables_Impl _aJobs; - -public: - SfxCancelManager( SfxCancelManager *pParent = 0 ); - ~SfxCancelManager(); - - BOOL CanCancel() const; - void Cancel( BOOL bDeep ); - SfxCancelManager* GetParent() const { return _pParent; } - - void InsertCancellable( SfxCancellable *pJob ); - void RemoveCancellable( SfxCancellable *pJob ); - USHORT GetCancellableCount() const - { return _aJobs.Count(); } - SfxCancellable* GetCancellable( USHORT nPos ) const - { return (SfxCancellable*) _aJobs[nPos]; } -}; - -SV_DECL_WEAK( SfxCancelManager ) -//------------------------------------------------------------------------- - -class SVL_DLLPUBLIC SfxCancellable - -/* [Beschreibung] - - Instanzen dieser Klasse werden immer an einem Cancel-Manager angemeldet, - der dadurch dem Benutzer signalisieren kann, ob abbrechbare Prozesse - vorhanden sind und der die SfxCancellable-Instanzen auf 'abgebrochen' - setzen kann. - - Die im Ctor "ubergebene <SfxCancelManger>-Instanz mu\s die Instanz - dieser Klasse "uberleben! - - [Beispiel] - - { - SfxCancellable aCancel( pCancelMgr ); - while ( !aCancel && GetData() ) - Reschedule(); - } - -*/ - -{ - SfxCancelManager* _pMgr; - BOOL _bCancelled; - String _aTitle; - -public: - SfxCancellable( SfxCancelManager *pMgr, - const String &rTitle ) - : _pMgr( pMgr ), - _bCancelled( FALSE ), - _aTitle( rTitle ) - { pMgr->InsertCancellable( this ); } - - virtual ~SfxCancellable(); - - void SetManager( SfxCancelManager *pMgr ); - SfxCancelManager* GetManager() const { return _pMgr; } - - virtual void Cancel(); - BOOL IsCancelled() const { return _bCancelled; } - operator BOOL() const { return _bCancelled; } - const String& GetTitle() const { return _aTitle; } -}; - -#endif - diff --git a/svl/inc/svl/cntnrsrt.hxx b/svl/inc/svl/cntnrsrt.hxx new file mode 100644 index 000000000000..48ebef50ea58 --- /dev/null +++ b/svl/inc/svl/cntnrsrt.hxx @@ -0,0 +1,174 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _CNTRSRT_HXX +#define _CNTRSRT_HXX + +#if 0 +*********************************************************************** +* +* Hier folgt die Beschreibung fuer die exportierten Makros: +* +* DECLARE_CONTAINER_SORT( ClassName, Type ) +* IMPL_CONTAINER_SORT( ClassName, Type, SortFunc ) +* +* Definiert eine von Container abgeleitete Klasse "ClassName", +* in der die Elemente des Typs "Type" sortiert enthalten sind. +* Dazu muss einer Funktion "SortFunc" definiert sein, die als +* Paramter zwei "const Type&" erwartet und 0 zurueckgibt, wenn +* beide gleich sind, -1 wenn der erste Paramter kleiner ist als +* der zweite und +1 wenn der erste Paramter groesser ist als +* der zweite. +* +* Die Zugriffs-Methoden entsprechen in etwa denen der Container- +* Klasse, mit Ausnahme von Insert, DeleteAndDestroy und Seek_Entry, +* der den SV-Pointer-Arrays entsprechen. +* +* DECLARE_CONTAINER_SORT_DEL( ClassName, Type ) +* IMPL_CONTAINER_SORT( ClassName, Type, SortFunc ) +* +* Wie DECLARE_CONTAINER_SORT, nur dass beim Aufruf des Destruktors +* alle im Conatiner vorhandenen Objekte geloescht werden. +* +#endif + +#include <tools/contnr.hxx> + +#define DECLARE_CONTAINER_SORT_COMMON( ClassName, Type ) \ + ClassName( const ClassName& ); \ + ClassName& operator =( const ClassName& ); \ +public: \ + using Container::Count; \ + \ + ClassName( USHORT InitSize, USHORT ReSize ) : \ + Container( CONTAINER_MAXBLOCKSIZE, InitSize, ReSize ) {} \ + \ + BOOL Insert( Type* pObj ); \ + \ + Type *Remove( ULONG nPos ) \ + { return (Type *)Container::Remove( nPos ); } \ + \ + Type *Remove( Type* pObj ); \ + \ + void DeleteAndDestroy( ULONG nPos ) \ + { \ + Type *pObj = Remove( nPos ); \ + if( pObj ) \ + delete pObj; \ + } \ + \ + void DeleteAndDestroy() \ + { while( Count() ) DeleteAndDestroy( 0 ); } \ + \ + Type* GetObject( ULONG nPos ) const \ + { return (Type *)Container::GetObject( nPos ); } \ + \ + Type* operator[]( ULONG nPos ) const \ + { return GetObject(nPos); } \ + \ + BOOL Seek_Entry( const Type *pObj, ULONG* pPos ) const; \ + \ + ULONG GetPos( const Type* pObj ) const; \ + + +#define DECLARE_CONTAINER_SORT( ClassName, Type ) \ +class ClassName : private Container \ +{ \ + DECLARE_CONTAINER_SORT_COMMON( ClassName, Type ) \ + ~ClassName() {} \ +}; \ + + +#define DECLARE_CONTAINER_SORT_DEL( ClassName, Type ) \ +class ClassName : private Container \ +{ \ + DECLARE_CONTAINER_SORT_COMMON( ClassName, Type ) \ + ~ClassName() { DeleteAndDestroy(); } \ +}; \ + + +#define IMPL_CONTAINER_SORT( ClassName, Type, SortFunc ) \ +BOOL ClassName::Insert( Type *pObj ) \ +{ \ + ULONG nPos; \ + BOOL bExist = Seek_Entry( pObj, &nPos ); \ + if( !bExist ) \ + Container::Insert( pObj, nPos ); \ + return !bExist; \ +} \ + \ +Type *ClassName::Remove( Type* pObj ) \ +{ \ + ULONG nPos; \ + if( Seek_Entry( pObj, &nPos ) ) \ + return Remove( nPos ); \ + else \ + return 0; \ +} \ + \ +ULONG ClassName::GetPos( const Type* pObj ) const \ +{ \ + ULONG nPos; \ + if( Seek_Entry( pObj, &nPos ) ) \ + return nPos; \ + else \ + return CONTAINER_ENTRY_NOTFOUND; \ +} \ + \ +BOOL ClassName::Seek_Entry( const Type* pObj, ULONG* pPos ) const \ +{ \ + register ULONG nO = Count(), \ + nM, \ + nU = 0; \ + if( nO > 0 ) \ + { \ + nO--; \ + while( nU <= nO ) \ + { \ + nM = nU + ( nO - nU ) / 2; \ + int nCmp = SortFunc( *GetObject(nM), *pObj ); \ + \ + if( 0 == nCmp ) \ + { \ + if( pPos ) *pPos = nM; \ + return TRUE; \ + } \ + else if( nCmp < 0 ) \ + nU = nM + 1; \ + else if( nM == 0 ) \ + { \ + if( pPos ) *pPos = nU; \ + return FALSE; \ + } \ + else \ + nO = nM - 1; \ + } \ + } \ + if( pPos ) *pPos = nU; \ + return FALSE; \ +} \ + +#endif diff --git a/svl/inc/svl/cntwids.hrc b/svl/inc/svl/cntwids.hrc new file mode 100644 index 000000000000..01a965c38652 --- /dev/null +++ b/svl/inc/svl/cntwids.hrc @@ -0,0 +1,506 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _CNTWIDS_HRC +#define _CNTWIDS_HRC + +#ifndef OLD_CHAOS +#define TF_NEW_TABPAGES +#define CNT_COOL_ABO +#endif + +//========================================================================= +// ARGS, MSG, ALL, FOLDER, BOXALL, BOXEXT +//========================================================================= + +#define WID_CHAOS_START 500 + +//FUNC MSG +#define WID_MARK_THREAD_MARKED (499) +#define WID_MARK_THREAD_UNMARKED (498) + +// ARGS +#define WID_DUMMY_ARG1 (WID_CHAOS_START + 0) +#define WID_FACTORY_NO (WID_CHAOS_START + 1) +#define WID_FACTORY_NAME (WID_CHAOS_START + 2) +#define WID_NEWS_XREF (WID_CHAOS_START + 3) +#define WID_CREATION_FLAGS (WID_CHAOS_START + 4) +#define WID_FACTORY_HELP_ID (WID_CHAOS_START + 5) + +//FUNC MSG +#define WID_MSG_START (WID_CHAOS_START + 6) +#define WID_MAIL_REPLY (WID_CHAOS_START + 6) +#define WID_POST_REPLY (WID_CHAOS_START + 7) +#define WID_FORWARD (WID_CHAOS_START + 8) +#define WID_MARK_THREAD_READ (WID_CHAOS_START + 9) +#define WID_HIDE_THREAD (WID_CHAOS_START + 10) +#define WID_HIDE_AUTHOR (WID_CHAOS_START + 11) +#define WID_HIDE_SUBJECT (WID_CHAOS_START + 12) +#define WID_RESEND_MSG (WID_CHAOS_START + 13) +#define WID_MARK_THREAD_UNREAD (WID_CHAOS_START + 14) + +//PROP MSG +#define WID_PRIORITY (WID_CHAOS_START + 15) +#define WID_RULE_APPLIED (WID_CHAOS_START + 16) +#define WID_MSG_LOCK (WID_CHAOS_START + 17) +#define WID_SEEN_STATUS (WID_CHAOS_START + 18) +#define WID_REPLY_TO (WID_CHAOS_START + 19) +#define WID_IN_REPLY_TO (WID_CHAOS_START + 20) + +#define WID_MESSAGE_ID (WID_CHAOS_START + 21) +#define WID_BCC (WID_CHAOS_START + 22) +#define WID_CC (WID_CHAOS_START + 23) +#define WID_TO (WID_CHAOS_START + 24) +#define WID_FROM (WID_CHAOS_START + 25) +#define WID_TITLE (WID_CHAOS_START + 26) +#define WID_SUBJECT WID_TITLE // only here to prevent panic, should be removed +#define WID_MESSAGEBODY (WID_CHAOS_START + 27) + +#define WID_REFERENCES (WID_CHAOS_START + 28) +#define WID_NEWSGROUPS (WID_CHAOS_START + 29) +#define WID_NEWS_XREFLIST (WID_CHAOS_START + 30) + +#define WID_OUTMSGINTERNALSTATE (WID_CHAOS_START + 31) +#define WID_RECIPIENTLIST (WID_CHAOS_START + 32) +#define WID_MSG_END (WID_CHAOS_START + 32) + +//FUNC ALL +#define WID_ALL_START (WID_CHAOS_START + 33) +#define WID_DEFAULT (WID_CHAOS_START + 33) +#define WID_OPEN (WID_CHAOS_START + 34) +#define WID_DELETE (WID_CHAOS_START + 35) +#define WID_CUT (WID_CHAOS_START + 36) +#define WID_COPY (WID_CHAOS_START + 37) +#define WID_PASTE (WID_CHAOS_START + 38) +#define WID_RENAME (WID_CHAOS_START + 39) + +#define WID_HAS_DATA (WID_CHAOS_START + 40) +#define WID_GETDATA (WID_CHAOS_START + 41) +#define WID_PUTDATA (WID_CHAOS_START + 42) + +//PROP ALL +#define WID_INTERIM_URL (WID_CHAOS_START + 43) +#define WID_CONTENT_TYPE (WID_CHAOS_START + 44) + +#define WID_OWN_URL (WID_CHAOS_START + 45) +#define WID_REAL_URL (WID_CHAOS_START + 46) +#define WID_OBSOLETE_TITLE (WID_CHAOS_START + 47) +#define WID_FLAG_READONLY (WID_CHAOS_START + 48) + +#define WID_REFERED_URL (WID_CHAOS_START + 49) +#define WID_REFERER_COUNT (WID_CHAOS_START + 50) +#define WID_FLAG_IS_FOLDER (WID_CHAOS_START + 51) +#define WID_FLAG_HAS_FOLDER (WID_CHAOS_START + 52) +#define WID_FLAG_IS_MESSAGE (WID_CHAOS_START + 53) +#define WID_FLAG_IS_DOCUMENT (WID_FLAG_IS_MESSAGE) +#define WID_FLAG_HAS_MESSAGES (WID_CHAOS_START + 54) + +#define WID_DATE_CREATED (WID_CHAOS_START + 55) +#define WID_DATE_MODIFIED (WID_CHAOS_START + 56) +#define WID_VIEW_DESCRIPTION (WID_CHAOS_START + 57) +#define WID_IS_READ (WID_CHAOS_START + 58) +#define WID_IS_MARKED (WID_CHAOS_START + 59) +#define WID_ALL_END (WID_CHAOS_START + 59) + +//FUNC FOLDER +#define WID_FOLDER_START (WID_CHAOS_START + 60) +#define WID_SYNCHRONIZE (WID_CHAOS_START + 60) +#define WID_CREATE_NEW (WID_CHAOS_START + 61) +#define WID_INSERT (WID_CHAOS_START + 62) +#define WID_UPDATE (WID_CHAOS_START + 63) +#define WID_IMPORT (WID_CHAOS_START + 64) + +//PROP FOLDER VIEW +#define WID_DUMMY_PROPFOLDERVIEW1 (WID_CHAOS_START + 65) +#define WID_THREADING (WID_CHAOS_START + 66) +#define WID_MSG_COLUMN_INFO /* obsolete */ (WID_CHAOS_START + 67) +#define WID_FLD_COLUMN_INFO /* obsolete */ (WID_CHAOS_START + 68) +#define WID_FOLDERVIEW_MODE (WID_CHAOS_START + 69) +#define WID_MESSAGEVIEW_MODE (WID_CHAOS_START + 70) +#define WID_SENTMESSAGEVIEW_MODE (WID_CHAOS_START + 71) +#define WID_SORTING (WID_CHAOS_START + 72) +#define WID_THREADED (WID_CHAOS_START + 73) +#define WID_FILTERED (WID_CHAOS_START + 74) +#define WID_RULES (WID_CHAOS_START + 75) +#define WID_SUBSCRNEWSGROUPCOUNT (WID_CHAOS_START + 76) +#define WID_FLAG_SUBSCRIBED (WID_CHAOS_START + 77) +#define WID_FLAG_SUPPORTMODE (WID_CHAOS_START + 78) + +//PROP FOLDER DIR +#define WID_DUMMY_FOLDERDIR1 (WID_CHAOS_START + 79) +#define WID_TOTALCONTENTCOUNT (WID_CHAOS_START + 80) +#define WID_NEWSGROUPCOUNT /* ??? */ (WID_CHAOS_START + 81) +#define WID_ARTICLECOUNT /* ??? */ (WID_CHAOS_START + 82) +#define WID_KNOWN_RANGES (WID_CHAOS_START + 83) +#define WID_IMAPFOLDERINFO (WID_CHAOS_START + 84) + +//PROP FOLDER USER +#define WID_DUMMY_FOLDERUSER1 (WID_CHAOS_START + 85) +#define WID_SEENCONTENTCOUNT (WID_CHAOS_START + 86) +#define WID_UNREAD_ARTICLECOUNT (WID_SEENCONTENTCOUNT) +#define WID_SENTCONTENTCOUNT (WID_SEENCONTENTCOUNT) +#define WID_READ_RANGES (WID_CHAOS_START + 87) +#define WID_MARK_RANGES (WID_CHAOS_START + 88) +#define WID_FOLDER_END (WID_CHAOS_START + 88) + +//PROP BOXALL +#define WID_BOXALL_START (WID_CHAOS_START + 89) +// Used for d&d of View Storages... +#define WID_PREPARE_MOVE (WID_CHAOS_START + 89) +#define WID_OUTTRAY_WANTED (WID_CHAOS_START + 90) +#define WID_USERNAME (WID_CHAOS_START + 91) +#define WID_PASSWORD (WID_CHAOS_START + 92) +#define WID_SERVERNAME (WID_CHAOS_START + 93) +#define WID_SERVERPORT (WID_CHAOS_START + 94) +// obsolete +#define WID_MAILSEND_USERNAME (WID_CHAOS_START + 95) +#define WID_MAILSEND_PASSWORD (WID_CHAOS_START + 96) +#define WID_MAILSEND_SERVERNAME (WID_CHAOS_START + 97) +#define WID_NEWSSEND_USERNAME (WID_CHAOS_START + 98) +#define WID_NEWSSEND_PASSWORD (WID_CHAOS_START + 99) +#define WID_NEWSSEND_SERVERNAME (WID_CHAOS_START + 100) +// end obsolete +#define WID_SERVERBASE (WID_CHAOS_START + 101) +// not used +#define WID_SMTP_GATEWAY (WID_CHAOS_START + 102) + +// -> ..._DEFAULT +// obsolete +#define WID_FROM_DEFAULT (WID_CHAOS_START + 103) +// obsolete +#define WID_REPLY_TO_DEFAULT (WID_CHAOS_START + 104) + +#define WID_AUTOUPDATE_INTERVAL (WID_CHAOS_START + 105) +#define WID_UPDATE_ENABLED (WID_CHAOS_START + 106) +#define WID_BOXALL_END (WID_CHAOS_START + 106) + +//PROP BOX RNMGR +#define WID_BOXEXT_START (WID_CHAOS_START + 107) +#define WID_CONNECTION_MODE (WID_CHAOS_START + 107) +#define WID_NEWS_GROUPLIST (WID_CHAOS_START + 108) +#ifdef OLD_CHAOS +#define WID_BOX_CONNECTION_PROP (WID_CHAOS_START + 109) +#else +#define WID_MESSAGE_STOREMODE (WID_CHAOS_START + 109) +#endif +#define WID_DELETE_ON_SERVER (WID_CHAOS_START + 110) + +//PROP BOX USER + +//PROP BOX OUT DIR +#define WID_OUTMSGEXTERNALSTATE (WID_CHAOS_START + 111) + +//PROP RNM +#define WID_RNM_UPDATETIMER_LIST (WID_CHAOS_START + 112) +#define WID_BOXEXT_END (WID_CHAOS_START + 112) + +////////////////////////////////////////////////////////////////////////// +// MISC - Added after initial pool version +////////////////////////////////////////////////////////////////////////// + +// PROP BOX +#define WID_SERVER_RANGES (WID_CHAOS_START + 113) +#define WID_LAST_UPDATE (WID_CHAOS_START + 114) +#define WID_LAST_MSGID (WID_CHAOS_START + 115) +#define WID_LAST_UID (WID_CHAOS_START + 116) + +// FUNC ALL +#define WID_UNDELETE (WID_CHAOS_START + 117) +#define WID_CLOSE (WID_CHAOS_START + 118) +#define WID_REOPEN (WID_CHAOS_START + 119) + +// PROP RNM +#define WID_RNM_FILECONVERSION_LIST (WID_CHAOS_START + 120) + +// PROP FOLDER +#define WID_SHOW_MSGS_HAS_TIMELIMIT (WID_CHAOS_START + 121) +#define WID_SHOW_MSGS_TIMELIMIT (WID_CHAOS_START + 122) +#define WID_STORE_MSGS_HAS_TIMELIMIT (WID_CHAOS_START + 123) +#define WID_STORE_MSGS_TIMELIMIT (WID_CHAOS_START + 124) + +// PROP BOX +#define WID_MSG_COLUMN_WIDTHS /* obsolete */(WID_CHAOS_START + 125) + +#ifdef OLD_CHAOS + +#define WID_CHAOS_END (WID_CHAOS_START + 125) + +#else + +////////////////////////////////////////////////////////////////////////// +// WID's added after SO 4.0 release ( SUPD > 364 ) +////////////////////////////////////////////////////////////////////////// + +// PROP ALL +#define WID_PROPERTYLIST (WID_CHAOS_START + 126) + +// PROP BOXALL +#define WID_BOXALL_START2 (WID_CHAOS_START + 127) +#define WID_SEND_PUBLIC_PROT_ID (WID_CHAOS_START + 127) +#define WID_SEND_PRIVATE_PROT_ID (WID_CHAOS_START + 128) +#define WID_SEND_PUBLIC_OUTBOXPROPS (WID_CHAOS_START + 129) +#define WID_SEND_PRIVATE_OUTBOXPROPS (WID_CHAOS_START + 130) +#define WID_SEND_SERVERNAME (WID_CHAOS_START + 131) +#define WID_SEND_USERNAME (WID_CHAOS_START + 132) +#define WID_SEND_PASSWORD (WID_CHAOS_START + 133) +#define WID_SEND_REPLY_TO_DEFAULT (WID_CHAOS_START + 134) +#define WID_SEND_FROM_DEFAULT (WID_CHAOS_START + 135) +#define WID_VIM_POPATH (WID_CHAOS_START + 136) +#define WID_SEND_VIM_POPATH (WID_CHAOS_START + 137) +#define WID_PURGE (WID_CHAOS_START + 138) +#define WID_CLEAN_CACHE (WID_CHAOS_START + 139) +#define WID_SEARCH (WID_CHAOS_START + 140) +#define WID_JOURNAL (WID_CHAOS_START + 141) +#define WID_LOCALBASE (WID_CHAOS_START + 142) +#define WID_BOXALL_END2 (WID_CHAOS_START + 142) + +// PROP DOCUMENT +#define WID_DOCUMENT_HEADER (WID_CHAOS_START + 143) +#define WID_DOCUMENT_BODY (WID_CHAOS_START + 144) +#define WID_DOCUMENT_SIZE (WID_CHAOS_START + 145) + +// PROP ALL +#define WID_SIZE WID_DOCUMENT_SIZE + +// PROP PROJECT +#define WID_PRJ_MEDIUM (WID_CHAOS_START + 146) +#define WID_PRJ_FILENAMECONVENTION (WID_CHAOS_START + 147) + +// PROP FSYS +#define WID_FSYS_DISKSPACE_LEFT (WID_CHAOS_START + 148) +#define WID_TRANSFER (WID_CHAOS_START + 149) + +// PROP ALL +#define WID_KEYWORDS (WID_CHAOS_START + 150) +#define WID_IS_PROTECTED (WID_CHAOS_START + 151) + +// PROP SEARCH +#define WID_SEARCH_CRITERIA (WID_CHAOS_START + 152) +#define WID_SEARCH_LOCATIONS (WID_CHAOS_START + 153) +#define WID_SEARCH_RECURSIVE (WID_CHAOS_START + 154) +#define WID_SEARCH_FOLDER_VIEW (WID_CHAOS_START + 155) +#define WID_SEARCH_DOCUMENT_VIEW (WID_CHAOS_START + 156) + +// PROP Channel +#define WID_SCHEDULE_RANGE (WID_CHAOS_START + 157) +#define WID_ALLOWED_SCHEDULE_RANGE (WID_CHAOS_START + 158) +#define WID_TARGET_URL (WID_CHAOS_START + 159) +#define WID_FREQUENCY (WID_CHAOS_START + 160) + +// PROP HTTP +#define WID_HTTP_CONNECTION_LIMIT (WID_CHAOS_START + 161) +#define WID_HTTP_COOKIE_MANAGER (WID_CHAOS_START + 162) + +// PROP Channel +#define WID_COLUMN_NEXT_UPD (WID_CHAOS_START + 163) +#define WID_CRAWL_STATUS (WID_CHAOS_START + 164) +#define WID_CRAWL_LEVEL (WID_CHAOS_START + 165) +#define WID_CRAWL_MODE (WID_CHAOS_START + 166) +// WID_CRAWL_MAX_VOLUME shall be removed in the future! +// --> WID_SIZE_LIMIT +#define WID_CRAWL_MAX_VOLUME (WID_CHAOS_START + 167) +#define WID_CRAWL_IMAGE (WID_CHAOS_START + 168) +#define WID_CRAWL_LINK_OUT (WID_CHAOS_START + 169) +#define WID_NOTIFICATION_MODE (WID_CHAOS_START + 170) +#define WID_NOTIFICATION_ADDRESS (WID_CHAOS_START + 171) + +// PROP BOXALL +#define WID_ACCOUNT (WID_CHAOS_START + 172) + +// PROP FSYS +#define WID_FSYS_KIND (WID_CHAOS_START + 173) +#define WID_FSYS_FLAGS (WID_CHAOS_START + 174) + +// PROP FOLDER +#define WID_VIEWDATA /* obsolete */ (WID_CHAOS_START + 175) + +// PROP FSYS +#define WID_WHO_IS_MASTER (WID_CHAOS_START + 176) + +// FUNC HTTP +#define WID_HTTP_POST (WID_CHAOS_START + 177) + +// PROP ALL +#define WID_SUPPORTED_FUNCS (WID_CHAOS_START + 178) +#define WID_SIZE_LIMIT (WID_CHAOS_START + 179) + +// PROP FOLDER +#define WID_MARKED_DOCUMENT_COUNT (WID_CHAOS_START + 180) +#define WID_FOLDER_COUNT (WID_CHAOS_START + 181) + +// PROP FSYS +#define WID_FSYS_SHOW_HIDDEN (WID_CHAOS_START + 182) + +// TRASHCAN +#define WID_TRASHCAN_START (WID_CHAOS_START + 183) +#define WID_TRASHCAN_EMPTY_TRASH (WID_CHAOS_START + 183) +#define WID_TRASHCAN_FLAG_AUTODELETE (WID_CHAOS_START + 184) +#define WID_TRASHCAN_FLAG_CONFIRMEMPTY (WID_CHAOS_START + 185) +#define WID_TRASHCAN_DUMMY1 (WID_CHAOS_START + 186) +#define WID_TRASHCAN_DUMMY2 (WID_CHAOS_START + 187) +#define WID_TRASHCAN_END (WID_CHAOS_START + 187) + +// TRASH +#define WID_TRASH_START (WID_CHAOS_START + 188) +#define WID_TRASH_RESTORE (WID_CHAOS_START + 188) +#define WID_TRASH_ORIGIN (WID_CHAOS_START + 189) +#define WID_TRASH_DUMMY2 (WID_CHAOS_START + 190) +#define WID_TRASH_END (WID_CHAOS_START + 190) + +// PROP ALL +#define WID_TARGET_FRAMES (WID_CHAOS_START + 191) + +// FUNC FOLDER +#define WID_EXPORT (WID_CHAOS_START + 192) + +// COMPONENT +#define WID_COMPONENT_COMMAND (WID_CHAOS_START + 193) +#define WID_COMPONENT_MENU (WID_CHAOS_START + 194) + +// PROP Channel +#define WID_HREF (WID_CHAOS_START + 195) + +// PROP FOLDER (VIEW) +#define WID_VIEW_START (WID_CHAOS_START + 196) +#define WID_VIEW_COLS_BEAMER (WID_CHAOS_START + 196) +#define WID_VIEW_COLS_FILEDLG (WID_CHAOS_START + 197) +#define WID_VIEW_COLS_FLDWIN (WID_CHAOS_START + 198) +#define WID_VIEW_MODE_FLDWIN (WID_CHAOS_START + 199) +#define WID_VIEW_LAYOUT_FLDWIN (WID_CHAOS_START + 200) +#define WID_VIEW_ICON_POS_FLDWIN (WID_CHAOS_START + 201) +#define WID_VIEW_SORT_BEAMER (WID_CHAOS_START + 202) +#define WID_VIEW_SORT_FILEDLG (WID_CHAOS_START + 203) +#define WID_VIEW_SORT_FLDWIN_DETAILS (WID_CHAOS_START + 204) +#define WID_VIEW_SORT_FLDWIN_ICON (WID_CHAOS_START + 205) +#define WID_VIEW_WINDOW_POS_FLDWIN (WID_CHAOS_START + 206) +#define WID_VIEW_END (WID_CHAOS_START + 206) + +// PROP ALL +#define WID_IS_INVALID (WID_CHAOS_START + 207) + +// PROP Channel +#define WID_VIEW_TIPHELP (WID_CHAOS_START + 208) +#define WID_PUBLISHER_SCHEDULE (WID_CHAOS_START + 209) +#define WID_GETMODE (WID_CHAOS_START + 210) +#define WID_READ_OFFLINE (WID_CHAOS_START + 211) + +// PROP ALL +#define WID_ALL_START2 (WID_CHAOS_START + 212) +#define WID_REAL_NAME (WID_CHAOS_START + 212) +#define WID_FLAG_UPDATE_ON_OPEN (WID_CHAOS_START + 213) +#define WID_ACTION_LIST (WID_CHAOS_START + 214) +#define WID_EDIT_STRING (WID_CHAOS_START + 215) +#define WID_SET_AS_DEFAULT (WID_CHAOS_START + 216) +#define WID_ALL_END2 (WID_CHAOS_START + 216) + +// PROP FOLDER (VIEW) +#define WID_VIEW2_START (WID_CHAOS_START + 217) +#define WID_VIEW2_FLD_PIC (WID_CHAOS_START + 217) +#define WID_FLAG_EXPANDED (WID_CHAOS_START + 218) +#define WID_CHILD_DEFAULTS (WID_CHAOS_START + 219) +#define WID_VIEW2_END (WID_CHAOS_START + 219) + +// PROP HTTP +#define WID_HTTP_KEEP_EXPIRED (WID_CHAOS_START + 220) +#define WID_HTTP_VERIFY_MODE (WID_CHAOS_START + 221) +#define WID_HTTP_NOCACHE_LIST (WID_CHAOS_START + 222) +#define WID_HTTP_REFERER (WID_CHAOS_START + 223) + +// PROP FSYS +#define WID_FSYS_START (WID_CHAOS_START + 224) +#define WID_FSYS_VALUE_FOLDER (WID_CHAOS_START + 224) +#define WID_FSYS_SHOW_EXTENSION (WID_CHAOS_START + 225) +#define WID_VALUE_ADDED_MODE (WID_CHAOS_START + 226) +#define WID_FSYS_DUMMY3 (WID_CHAOS_START + 227) +#define WID_FSYS_DUMMY4 (WID_CHAOS_START + 228) +#define WID_FSYS_END (WID_CHAOS_START + 228) + +// FUNC HTTP +#define WID_HTTP_GET_COOKIE (WID_CHAOS_START + 229) +#define WID_HTTP_SET_COOKIE (WID_CHAOS_START + 230) + +// PROP HTTP +#define WID_HTTP_COOKIE (WID_CHAOS_START + 231) +#define WID_HTTP_DUMMY_1 (WID_CHAOS_START + 232) + +////////////////////////////////////////////////////////////////////////// +// WID's added after SO 5.0 release ( SUPD > 505 ) +////////////////////////////////////////////////////////////////////////// + +// PROP FOLDER +#define WID_FOLDER_START2 (WID_CHAOS_START + 233) +#define WID_USER_SORT_CRITERIUM (WID_CHAOS_START + 233) +#define WID_HEADER_CONFIG (WID_CHAOS_START + 234) +#define WID_GROUPVIEW_CONFIG (WID_CHAOS_START + 235) +#define WID_FLD_WEBVIEW_TEMPLATE (WID_CHAOS_START + 236) +// eigene Iconpositionen fuer den Explorer, da er noch +// keinen eigenen View-Storage hat +#define WID_VIEW_ICON_POS_GRPWIN (WID_CHAOS_START + 237) +#define WID_FOLDER_END2 (WID_CHAOS_START + 237) + +// PROP ALL +#define WID_SHOW_IN_EXPLORER (WID_CHAOS_START + 238) + +// PROP FOLDER (VIEW) +#define WID_VIEW3_START (WID_CHAOS_START + 239) +#define WID_FLD_FONT (WID_CHAOS_START + 239) +#define WID_FLD_WEBVIEW_USE_GLOBAL (WID_CHAOS_START + 240) +#define WID_VIEW3_DUMMY2 (WID_CHAOS_START + 241) +#define WID_VIEW3_DUMMY3 (WID_CHAOS_START + 242) +#define WID_VIEW3_END (WID_CHAOS_START + 242) + +// PROP FTP +#define WID_FTP_ACCOUNT (WID_CHAOS_START + 243) + +// PROP FOLDER +#define WID_STORE_MARKED (WID_CHAOS_START + 244) + +// REPLICATION ( Currently only here to have file compatibility between +// SO51 Client and SO51 Server, for which the functionality +// first shall be implemented ). +#define WID_REPLICATION_1 (WID_CHAOS_START + 245) +#define WID_REPLICATION_2 (WID_CHAOS_START + 246) +#define WID_REPLICATION_3 (WID_CHAOS_START + 247) +#define WID_REPLICATION_4 (WID_CHAOS_START + 248) +#define WID_REPLICATION_5 (WID_CHAOS_START + 249) + +// PROP SEARCH +#define WID_SEARCH_INDIRECTIONS (WID_CHAOS_START + 250) + +// PROP ALL +#define WID_SEND_FORMATS (WID_CHAOS_START + 251) +#define WID_SEND_COPY_TARGET (WID_CHAOS_START + 252) + +// FUNC ALL +#define WID_TRANSFER_RESULT (WID_CHAOS_START + 253) + +// END +#define WID_CHAOS_END (WID_CHAOS_START + 253) + +#endif /* OLD_CHAOS */ + +#endif /* !_CNTWIDS_HRC */ diff --git a/svl/inc/svl/cnclhint.hxx b/svl/inc/svl/converter.hxx index 17a6627f31b6..062feafe6f29 100644 --- a/svl/inc/svl/cnclhint.hxx +++ b/svl/inc/svl/converter.hxx @@ -24,25 +24,20 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef _SFXCNCLHINT_HXX -#define _SFXCNCLHINT_HXX +#ifndef _SV_CONVERTER_HXX_ +#define _SV_CONVERTER_HXX_ -#include <svl/hint.hxx> -#include <svl/cancel.hxx> -#include <tools/rtti.hxx> +#include "svl/svldllapi.h" +#include <tools/solar.h> -#define SFXCANCELHINT_REMOVED 1 - -class SfxCancelHint: public SfxHint +class SvDbaseConverter { -private: - SfxCancellable* pCancellable; - USHORT nAction; public: - TYPEINFO(); - SfxCancelHint( SfxCancellable*, USHORT nAction ); - USHORT GetAction() const { return nAction; } - const SfxCancellable& GetCancellable() const { return *pCancellable; } + SVL_DLLPUBLIC static INT32 ConvertPrecisionToDbase(INT32 _nLen, INT32 _nScale); + SVL_DLLPUBLIC static INT32 ConvertPrecisionToOdbc(INT32 _nLen, INT32 _nScale); }; -#endif +#endif //_CONVERTER_HXX_ + + + diff --git a/svl/inc/svl/filenotation.hxx b/svl/inc/svl/filenotation.hxx new file mode 100644 index 000000000000..65f28659e056 --- /dev/null +++ b/svl/inc/svl/filenotation.hxx @@ -0,0 +1,71 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SVTOOLS_FILENOTATION_HXX +#define SVTOOLS_FILENOTATION_HXX + +#include "svl/svldllapi.h" +#include <rtl/ustring.hxx> + +//......................................................................... +namespace svt +{ +//......................................................................... + + //===================================================================== + //= OFileNotation + //===================================================================== + class SVL_DLLPUBLIC OFileNotation + { + protected: + ::rtl::OUString m_sSystem; + ::rtl::OUString m_sFileURL; + + public: + enum NOTATION + { + N_SYSTEM, + N_URL + }; + + OFileNotation( const ::rtl::OUString& _rUrlOrPath ); + OFileNotation( const ::rtl::OUString& _rUrlOrPath, NOTATION _eInputNotation ); + + ::rtl::OUString get(NOTATION _eOutputNotation); + + private: + SVL_DLLPRIVATE void construct( const ::rtl::OUString& _rUrlOrPath ); + SVL_DLLPRIVATE bool implInitWithSystemNotation( const ::rtl::OUString& _rSystemPath ); + SVL_DLLPRIVATE bool implInitWithURLNotation( const ::rtl::OUString& _rURL ); + }; + +//......................................................................... +} // namespace svt +//......................................................................... + +#endif // SVTOOLS_FILENOTATION_HXX + diff --git a/svl/inc/svl/folderrestriction.hxx b/svl/inc/svl/folderrestriction.hxx new file mode 100644 index 000000000000..66a99a4d49d1 --- /dev/null +++ b/svl/inc/svl/folderrestriction.hxx @@ -0,0 +1,56 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SVTOOLS_FOLDER_RESTRICTION_HXX +#define SVTOOLS_FOLDER_RESTRICTION_HXX + +#include "svl/svldllapi.h" +#include <tools/string.hxx> + +#ifndef INCLUDED_VECTOR +#include <vector> +#define INCLUDED_VECTOR +#endif + +//........................................................................ +namespace svt +{ +//........................................................................ + + /** retrieves a list of folders which's access is not restricted. + + <p>Note that this is not meant as security feature, but only as + method to restrict some UI presentation, such as browsing + in the file open dialog.</p> + */ + SVL_DLLPUBLIC void getUnrestrictedFolders( ::std::vector< String >& _rFolders ); + +//........................................................................ +} // namespace svt +//........................................................................ + +#endif // SVTOOLS_FOLDER_RESTRICTION_HXX diff --git a/svl/inc/svl/fstathelper.hxx b/svl/inc/svl/fstathelper.hxx new file mode 100644 index 000000000000..17fa62c5bbeb --- /dev/null +++ b/svl/inc/svl/fstathelper.hxx @@ -0,0 +1,65 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVTOOLS_FSTATHELPER_HXX +#define _SVTOOLS_FSTATHELPER_HXX + +#include "svl/svldllapi.h" +#include <tools/solar.h> + +class UniString; +class Date; +class Time; + +namespace FStatHelper { + +/** Return the modified time and date stamp for this URL. + + @param URL the asking URL + + @param pDate if unequal 0, the function set the date stamp + + @param pTime if unequal 0, the function set the time stamp + + @return it was be able to get the date/time stamp +*/ +SVL_DLLPUBLIC sal_Bool GetModifiedDateTimeOfFile( const UniString& rURL, + Date* pDate, Time* pTime ); + +/** Return if under the URL a document exist. This is only a wrapper for the + UCB.IsContent. +*/ +SVL_DLLPUBLIC sal_Bool IsDocument( const UniString& rURL ); + +/** Return if under the URL a folder exist. This is only a wrapper for the + UCB.isFolder. +*/ +SVL_DLLPUBLIC sal_Bool IsFolder( const UniString& rURL ); + +} + +#endif diff --git a/svl/inc/svl/inetdef.hxx b/svl/inc/svl/inetdef.hxx new file mode 100644 index 000000000000..533530838700 --- /dev/null +++ b/svl/inc/svl/inetdef.hxx @@ -0,0 +1,29 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include <tools/inetdef.hxx> + diff --git a/svl/inc/svl/inetmsg.hxx b/svl/inc/svl/inetmsg.hxx new file mode 100644 index 000000000000..bcfc4ad714ad --- /dev/null +++ b/svl/inc/svl/inetmsg.hxx @@ -0,0 +1,29 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include <tools/inetmsg.hxx> + diff --git a/svl/inc/svl/inetstrm.hxx b/svl/inc/svl/inetstrm.hxx new file mode 100644 index 000000000000..efb6c35a1b68 --- /dev/null +++ b/svl/inc/svl/inetstrm.hxx @@ -0,0 +1,29 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include <tools/inetstrm.hxx> + diff --git a/svl/inc/svl/instrm.hxx b/svl/inc/svl/instrm.hxx new file mode 100644 index 000000000000..d7585c13c3b7 --- /dev/null +++ b/svl/inc/svl/instrm.hxx @@ -0,0 +1,80 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SVTOOLS_INSTRM_HXX +#define SVTOOLS_INSTRM_HXX + +#include "svl/svldllapi.h" +#include <com/sun/star/uno/Reference.h> +#include <tools/stream.hxx> + +namespace com { namespace sun { namespace star { namespace io { + class XInputStream; + class XSeekable; +} } } } + +class SvDataPipe_Impl; + +//============================================================================ +class SVL_DLLPUBLIC SvInputStream: public SvStream +{ + com::sun::star::uno::Reference< com::sun::star::io::XInputStream > + m_xStream; + com::sun::star::uno::Reference< com::sun::star::io::XSeekable > + m_xSeekable; + SvDataPipe_Impl * m_pPipe; + ULONG m_nSeekedFrom; + + SVL_DLLPRIVATE bool open(); + + SVL_DLLPRIVATE virtual ULONG GetData(void * pData, ULONG nSize); + + SVL_DLLPRIVATE virtual ULONG PutData(void const *, ULONG); + + SVL_DLLPRIVATE virtual ULONG SeekPos(ULONG nPos); + + SVL_DLLPRIVATE virtual void FlushData(); + + SVL_DLLPRIVATE virtual void SetSize(ULONG); + +public: + SvInputStream( + com::sun::star::uno::Reference< com::sun::star::io::XInputStream > + const & + rTheStream); + + virtual ~SvInputStream(); + + virtual USHORT IsA() const; + + virtual void AddMark(ULONG nPos); + + virtual void RemoveMark(ULONG nPos); +}; + +#endif // SVTOOLS_INSTRM_HXX + diff --git a/svl/inc/svl/listener.hxx b/svl/inc/svl/listener.hxx new file mode 100644 index 000000000000..3107f5ceee56 --- /dev/null +++ b/svl/inc/svl/listener.hxx @@ -0,0 +1,65 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVT_LISTENER_HXX +#define _SVT_LISTENER_HXX + +#include "svl/svldllapi.h" +#include <tools/rtti.hxx> + +class SvtBroadcaster; +class SfxHint; +class SvtListenerBase; + +//------------------------------------------------------------------------- + +class SVL_DLLPUBLIC SvtListener +{ + friend class SvtListenerBase; + SvtListenerBase *pBrdCastLst; + + const SvtListener& operator=(const SvtListener &); // n.i., ist verboten + +public: + TYPEINFO(); + + SvtListener(); + SvtListener( const SvtListener &rCopy ); + virtual ~SvtListener(); + + BOOL StartListening( SvtBroadcaster& rBroadcaster ); + BOOL EndListening( SvtBroadcaster& rBroadcaster ); + void EndListeningAll(); + BOOL IsListening( SvtBroadcaster& rBroadcaster ) const; + + BOOL HasBroadcaster() const { return 0 != pBrdCastLst; } + + virtual void Notify( SvtBroadcaster& rBC, const SfxHint& rHint ); +}; + + +#endif + diff --git a/svl/inc/svl/listeneriter.hxx b/svl/inc/svl/listeneriter.hxx new file mode 100644 index 000000000000..3bfb6380acaa --- /dev/null +++ b/svl/inc/svl/listeneriter.hxx @@ -0,0 +1,79 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVT_LISTENERITER_HXX +#define _SVT_LISTENERITER_HXX + +#include "svl/svldllapi.h" +#include <tools/rtti.hxx> + +class SvtListener; +class SvtListenerBase; +class SvtBroadcaster; + +//------------------------------------------------------------------------- + +class SVL_DLLPUBLIC SvtListenerIter +{ + friend class SvtListenerBase; + + SvtBroadcaster& rRoot; + SvtListenerBase *pAkt, *pDelNext; + + // for the update of all iterator's, if a listener is added or removed + // at the same time. + static SvtListenerIter *pListenerIters; + SvtListenerIter *pNxtIter; + TypeId aSrchId; // fuer First/Next - suche diesen Type + + SVL_DLLPRIVATE static void RemoveListener( SvtListenerBase& rDel, + SvtListenerBase* pNext ); + +public: + SvtListenerIter( SvtBroadcaster& ); + ~SvtListenerIter(); + + const SvtBroadcaster& GetBroadcaster() const { return rRoot; } + SvtBroadcaster& GetBroadcaster() { return rRoot; } + + SvtListener* GoNext(); // to the next + SvtListener* GoPrev(); // to the previous + + SvtListener* GoStart(); // to the start of the list + SvtListener* GoEnd(); // to the end of the list + + SvtListener* GoRoot(); // to the root + SvtListener* GetCurr() const; // returns the current + + int IsChanged() const { return pDelNext != pAkt; } + + SvtListener* First( TypeId nType ); + SvtListener* Next(); +}; + + +#endif + diff --git a/svl/inc/svl/lngmisc.hxx b/svl/inc/svl/lngmisc.hxx new file mode 100644 index 000000000000..5143d147227d --- /dev/null +++ b/svl/inc/svl/lngmisc.hxx @@ -0,0 +1,76 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVTOOLS_LNGMISC_HXX_ +#define _SVTOOLS_LNGMISC_HXX_ + +#include "svl/svldllapi.h" +#include <tools/solar.h> +#include <sal/types.h> +#include <rtl/ustring.hxx> +#include <tools/string.hxx> + +/////////////////////////////////////////////////////////////////////////// + +#define SVT_SOFT_HYPHEN ((sal_Unicode) 0x00AD) +#define SVT_HARD_HYPHEN ((sal_Unicode) 0x2011) + +// the non-breaking space +#define SVT_HARD_SPACE ((sal_Unicode) 0x00A0) + +namespace linguistic +{ + +inline BOOL IsHyphen( sal_Unicode cChar ) +{ + return cChar == SVT_SOFT_HYPHEN || cChar == SVT_HARD_HYPHEN; +} + + +inline BOOL IsControlChar( sal_Unicode cChar ) +{ + return cChar < (sal_Unicode) ' '; +} + + +inline BOOL HasHyphens( const rtl::OUString &rTxt ) +{ + return rTxt.indexOf( SVT_SOFT_HYPHEN ) != -1 || + rTxt.indexOf( SVT_HARD_HYPHEN ) != -1; +} + +SVL_DLLPUBLIC INT32 GetNumControlChars( const rtl::OUString &rTxt ); +SVL_DLLPUBLIC BOOL RemoveHyphens( rtl::OUString &rTxt ); +SVL_DLLPUBLIC BOOL RemoveControlChars( rtl::OUString &rTxt ); + +SVL_DLLPUBLIC BOOL ReplaceControlChars( rtl::OUString &rTxt, sal_Char aRplcChar = ' ' ); + +SVL_DLLPUBLIC String GetThesaurusReplaceText( const String &rText ); + +} // namespace linguistic + +#endif diff --git a/svl/inc/svl/nfsymbol.hxx b/svl/inc/svl/nfsymbol.hxx new file mode 100644 index 000000000000..8886f0e47f85 --- /dev/null +++ b/svl/inc/svl/nfsymbol.hxx @@ -0,0 +1,69 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef INCLUDED_SVTOOLS_NFSYMBOL_HXX +#define INCLUDED_SVTOOLS_NFSYMBOL_HXX + +/* ATTENTION! If new types arrive that had its content previously handled as + * SYMBOLTYPE_STRING, they have to be added at several places in zforscan.cxx + * and/or zformat.cxx, and in xmloff/source/style/xmlnumfe.cxx. Mostly these + * are places where already NF_SYMBOLTYPE_STRING together with + * NF_SYMBOLTYPE_CURRENCY or NF_SYMBOLTYPE_DATESEP are used in the same case of + * a switch respectively an if-condition. + */ + +namespace svt { + +/// Number formatter's symbol types of a token, if not key words, which are >0 +enum NfSymbolType +{ + NF_SYMBOLTYPE_STRING = -1, // literal string in output + NF_SYMBOLTYPE_DEL = -2, // special character + NF_SYMBOLTYPE_BLANK = -3, // blank for '_' + NF_SYMBOLTYPE_STAR = -4, // *-character + NF_SYMBOLTYPE_DIGIT = -5, // digit place holder + NF_SYMBOLTYPE_DECSEP = -6, // decimal separator + NF_SYMBOLTYPE_THSEP = -7, // group AKA thousand separator + NF_SYMBOLTYPE_EXP = -8, // exponent E + NF_SYMBOLTYPE_FRAC = -9, // fraction / + NF_SYMBOLTYPE_EMPTY = -10, // deleted symbols + NF_SYMBOLTYPE_FRACBLANK = -11, // delimiter between integer and fraction + NF_SYMBOLTYPE_COMMENT = -12, // comment is following + NF_SYMBOLTYPE_CURRENCY = -13, // currency symbol + NF_SYMBOLTYPE_CURRDEL = -14, // currency symbol delimiter [$] + NF_SYMBOLTYPE_CURREXT = -15, // currency symbol extension -xxx + NF_SYMBOLTYPE_CALENDAR = -16, // calendar ID + NF_SYMBOLTYPE_CALDEL = -17, // calendar delimiter [~] + NF_SYMBOLTYPE_DATESEP = -18, // date separator + NF_SYMBOLTYPE_TIMESEP = -19, // time separator + NF_SYMBOLTYPE_TIME100SECSEP = -20, // time 100th seconds separator + NF_SYMBOLTYPE_PERCENT = -21 // percent % +}; + +} // namespace svt + +#endif // INCLUDED_SVTOOLS_NFSYMBOL_HXX diff --git a/svl/inc/svl/numuno.hxx b/svl/inc/svl/numuno.hxx new file mode 100644 index 000000000000..425cff60763d --- /dev/null +++ b/svl/inc/svl/numuno.hxx @@ -0,0 +1,99 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _NUMUNO_HXX +#define _NUMUNO_HXX + +#include "svl/svldllapi.h" +#include <com/sun/star/util/XNumberFormatsSupplier.hpp> +#include <com/sun/star/lang/XUnoTunnel.hpp> +#include <cppuhelper/implbase2.hxx> + +class SvNumberFormatter; +class SvNumFmtSuppl_Impl; + +namespace comphelper +{ + class SharedMutex; +} + +//------------------------------------------------------------------ + +// SvNumberFormatterServiceObj must be registered as service somewhere + +com::sun::star::uno::Reference<com::sun::star::uno::XInterface> SAL_CALL + SvNumberFormatterServiceObj_NewInstance( + const com::sun::star::uno::Reference< + com::sun::star::lang::XMultiServiceFactory>& rSMgr ); + +//------------------------------------------------------------------ + +// SvNumberFormatsSupplierObj: aggregate to document, +// construct with SvNumberFormatter + +class SVL_DLLPUBLIC SvNumberFormatsSupplierObj : public cppu::WeakAggImplHelper2< + com::sun::star::util::XNumberFormatsSupplier, + com::sun::star::lang::XUnoTunnel> +{ +private: + SvNumFmtSuppl_Impl* pImpl; + +public: + SvNumberFormatsSupplierObj(); + SvNumberFormatsSupplierObj(SvNumberFormatter* pForm); + virtual ~SvNumberFormatsSupplierObj(); + + void SetNumberFormatter(SvNumberFormatter* pNew); + SvNumberFormatter* GetNumberFormatter() const; + + // ueberladen, um Attribute im Dokument anzupassen + virtual void NumberFormatDeleted(sal_uInt32 nKey); + // ueberladen, um evtl. neu zu formatieren + virtual void SettingsChanged(); + + // XNumberFormatsSupplier + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL + getNumberFormatSettings() + throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormats > SAL_CALL + getNumberFormats() + throw(::com::sun::star::uno::RuntimeException); + + // XUnoTunnel + virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< + sal_Int8 >& aIdentifier ) + throw(::com::sun::star::uno::RuntimeException); + + static const com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId(); + static SvNumberFormatsSupplierObj* getImplementation( const com::sun::star::uno::Reference< + com::sun::star::util::XNumberFormatsSupplier> xObj ); + + ::comphelper::SharedMutex& getSharedMutex() const; +}; + +#endif // #ifndef _NUMUNO_HXX + + diff --git a/svl/inc/svl/outstrm.hxx b/svl/inc/svl/outstrm.hxx new file mode 100644 index 000000000000..f80f6f2c9616 --- /dev/null +++ b/svl/inc/svl/outstrm.hxx @@ -0,0 +1,66 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SVTOOLS_OUTSTRM_HXX +#define SVTOOLS_OUTSTRM_HXX + +#include "svl/svldllapi.h" +#include <com/sun/star/uno/Reference.h> +#include <tools/stream.hxx> + +namespace com { namespace sun { namespace star { namespace io { + class XOutputStream; +} } } } + +//============================================================================ +class SVL_DLLPUBLIC SvOutputStream: public SvStream +{ + com::sun::star::uno::Reference< com::sun::star::io::XOutputStream > + m_xStream; + + SVL_DLLPRIVATE virtual ULONG GetData(void *, ULONG); + + SVL_DLLPRIVATE virtual ULONG PutData(void const * pData, ULONG nSize); + + SVL_DLLPRIVATE virtual ULONG SeekPos(ULONG); + + SVL_DLLPRIVATE virtual void FlushData(); + + SVL_DLLPRIVATE virtual void SetSize(ULONG); + +public: + SvOutputStream(com::sun::star::uno::Reference< + com::sun::star::io::XOutputStream > const & + rTheStream); + + virtual ~SvOutputStream(); + + virtual USHORT IsA() const; +}; + +#endif // SVTOOLS_OUTSTRM_HXX + diff --git a/svl/inc/svl/pickerhelper.hxx b/svl/inc/svl/pickerhelper.hxx new file mode 100644 index 000000000000..307031b578d1 --- /dev/null +++ b/svl/inc/svl/pickerhelper.hxx @@ -0,0 +1,69 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _PICKERHELPER_HXX +#define _PICKERHELPER_HXX + +#include "svl/svldllapi.h" +#include "sal/types.h" +#include "com/sun/star/uno/Reference.hxx" + +namespace com +{ + namespace sun + { + namespace star + { + namespace ui + { + namespace dialogs + { + class XFilePicker; + class XFolderPicker; + } + } + } + } +} + + +namespace svt +{ + + SVL_DLLPUBLIC void SetDialogHelpId( + ::com::sun::star::uno::Reference < ::com::sun::star::ui::dialogs::XFilePicker > _mxFileDlg, + sal_Int32 _nHelpId ); + + SVL_DLLPUBLIC void SetDialogHelpId( + ::com::sun::star::uno::Reference < ::com::sun::star::ui::dialogs::XFolderPicker > _mxFileDlg, + sal_Int32 _nHelpId ); + +} + +//----------------------------------------------------------------------------- + +#endif diff --git a/svl/inc/svl/pickerhistory.hxx b/svl/inc/svl/pickerhistory.hxx new file mode 100644 index 000000000000..af282e72513d --- /dev/null +++ b/svl/inc/svl/pickerhistory.hxx @@ -0,0 +1,51 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SVTOOLS_PICKERHISTORY_HXX +#define SVTOOLS_PICKERHISTORY_HXX + +#include "svl/svldllapi.h" +#include <com/sun/star/uno/XInterface.hpp> + +//......................................................................... +namespace svt +{ +//......................................................................... + + // -------------------------------------------------------------------- + SVL_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > + GetTopMostFolderPicker( ); + + SVL_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > + GetTopMostFilePicker( ); + +//......................................................................... +} // namespace svt +//......................................................................... + +#endif // SVTOOLS_PICKERHISTORY_HXX + diff --git a/svl/inc/svl/pickerhistoryaccess.hxx b/svl/inc/svl/pickerhistoryaccess.hxx new file mode 100644 index 000000000000..1a4e8ced8381 --- /dev/null +++ b/svl/inc/svl/pickerhistoryaccess.hxx @@ -0,0 +1,54 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SVTOOLS_PICKERHISTORYACCESS_HXX +#define SVTOOLS_PICKERHISTORYACCESS_HXX + +#include "svl/svldllapi.h" + +#ifndef _COM_SUN_STAR_UNO_REFERENX_HXX_ +#include <com/sun/star/uno/Reference.hxx> +#endif + +//......................................................................... +namespace svt +{ +//......................................................................... + + // -------------------------------------------------------------------- + SVL_DLLPUBLIC void addFolderPicker( + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxPicker ); + + SVL_DLLPUBLIC void addFilePicker( + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxPicker ); + +//......................................................................... +} // namespace svt +//......................................................................... + +#endif // SVTOOLS_PICKERHISTORYACCESS_HXX + diff --git a/svl/inc/svl/poolcach.hxx b/svl/inc/svl/poolcach.hxx new file mode 100644 index 000000000000..78bdca8177e6 --- /dev/null +++ b/svl/inc/svl/poolcach.hxx @@ -0,0 +1,69 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SFXPOOLCACH_HXX +#define _SFXPOOLCACH_HXX + +#include "svl/svldllapi.h" +#include <tools/solar.h> +#include <vector> + +//------------------------------------------------------------------------ + +class SfxItemPool; +class SfxItemSet; +class SfxPoolItem; +class SfxSetItem; + +struct SfxItemModifyImpl +{ + const SfxSetItem *pOrigItem; + SfxSetItem *pPoolItem; +}; + +typedef std::vector<SfxItemModifyImpl> SfxItemModifyArr_Impl; + + +class SVL_DLLPUBLIC SfxItemPoolCache +{ + SfxItemPool *pPool; + SfxItemModifyArr_Impl *pCache; + const SfxItemSet *pSetToPut; + const SfxPoolItem *pItemToPut; + +public: + SfxItemPoolCache( SfxItemPool *pPool, + const SfxPoolItem *pPutItem ); + SfxItemPoolCache( SfxItemPool *pPool, + const SfxItemSet *pPutSet ); + ~SfxItemPoolCache(); + + const SfxSetItem& ApplyTo( const SfxSetItem& rSetItem, BOOL bNew = FALSE ); +}; + + +#endif + diff --git a/svl/inc/svl/strmadpt.hxx b/svl/inc/svl/strmadpt.hxx new file mode 100644 index 000000000000..76ecf0223543 --- /dev/null +++ b/svl/inc/svl/strmadpt.hxx @@ -0,0 +1,135 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SVTOOLS_STRMADPT_HXX +#define SVTOOLS_STRMADPT_HXX + +#include "svl/svldllapi.h" +#include <com/sun/star/io/XInputStream.hpp> +#include <com/sun/star/io/XOutputStream.hpp> +#include <com/sun/star/io/XSeekable.hpp> +#include <cppuhelper/weak.hxx> +#include <tools/stream.hxx> + +//============================================================================ +class SVL_DLLPUBLIC SvOutputStreamOpenLockBytes: public SvOpenLockBytes +{ + com::sun::star::uno::Reference< com::sun::star::io::XOutputStream > + m_xOutputStream; + sal_uInt32 m_nPosition; + +public: + TYPEINFO(); + + SvOutputStreamOpenLockBytes( + const com::sun::star::uno::Reference< + com::sun::star::io::XOutputStream > & + rTheOutputStream): + m_xOutputStream(rTheOutputStream), m_nPosition(0) {} + + virtual ErrCode ReadAt(ULONG, void *, ULONG, ULONG *) const; + + virtual ErrCode WriteAt(ULONG nPos, const void * pBuffer, ULONG nCount, + ULONG * pWritten); + + virtual ErrCode Flush() const; + + virtual ErrCode SetSize(ULONG); + + virtual ErrCode Stat(SvLockBytesStat * pStat, SvLockBytesStatFlag) const; + + virtual ErrCode FillAppend(const void * pBuffer, ULONG nCount, + ULONG * pWritten); + + virtual ULONG Tell() const; + + virtual ULONG Seek(ULONG); + + virtual void Terminate(); +}; + +//============================================================================ +class SVL_DLLPUBLIC SvLockBytesInputStream: public cppu::OWeakObject, + public com::sun::star::io::XInputStream, + public com::sun::star::io::XSeekable +{ + SvLockBytesRef m_xLockBytes; + sal_Int64 m_nPosition; + bool m_bDone; + +public: + SvLockBytesInputStream(SvLockBytes * pTheLockBytes): + m_xLockBytes(pTheLockBytes), m_nPosition(0), m_bDone(false) {} + + virtual com::sun::star::uno::Any SAL_CALL + queryInterface(const com::sun::star::uno::Type & rType) + throw (com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL acquire() throw(); + + virtual void SAL_CALL release() throw(); + + virtual sal_Int32 SAL_CALL + readBytes(com::sun::star::uno::Sequence< sal_Int8 > & rData, + sal_Int32 nBytesToRead) + throw (com::sun::star::io::IOException, + com::sun::star::uno::RuntimeException); + + virtual sal_Int32 SAL_CALL + readSomeBytes(com::sun::star::uno::Sequence< sal_Int8 > & rData, + sal_Int32 nMaxBytesToRead) + throw (com::sun::star::io::IOException, + com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL skipBytes(sal_Int32 nBytesToSkip) + throw (com::sun::star::io::IOException, + com::sun::star::uno::RuntimeException); + + virtual sal_Int32 SAL_CALL available() + throw (com::sun::star::io::IOException, + com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL closeInput() + throw (com::sun::star::io::IOException, + com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL seek(sal_Int64 nLocation) + throw (com::sun::star::lang::IllegalArgumentException, + com::sun::star::io::IOException, + com::sun::star::uno::RuntimeException); + + virtual sal_Int64 SAL_CALL getPosition() + throw (com::sun::star::io::IOException, + com::sun::star::uno::RuntimeException); + + virtual sal_Int64 SAL_CALL getLength() + throw (com::sun::star::io::IOException, + com::sun::star::uno::RuntimeException); +}; + +#endif // SVTOOLS_STRMADPT_HXX + diff --git a/svl/inc/svl/stylepool.hxx b/svl/inc/svl/stylepool.hxx new file mode 100644 index 000000000000..b820c9442229 --- /dev/null +++ b/svl/inc/svl/stylepool.hxx @@ -0,0 +1,100 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef INCLUDED_SVTOOLS_STYLEPOOL_HXX +#define INCLUDED_SVTOOLS_STYLEPOOL_HXX + +#include <boost/shared_ptr.hpp> +#include <rtl/ustring.hxx> +#include <svl/itemset.hxx> + +class StylePoolImpl; +class StylePoolIterImpl; +class IStylePoolIteratorAccess; + +class SVL_DLLPUBLIC StylePool +{ +private: + StylePoolImpl *pImpl; +public: + typedef boost::shared_ptr<SfxItemSet> SfxItemSet_Pointer_t; + + // --> OD 2008-03-07 #i86923# + explicit StylePool( SfxItemSet* pIgnorableItems = 0 ); + // <-- + + /** Insert a SfxItemSet into the style pool. + + The pool makes a copy of the provided SfxItemSet. + + @param SfxItemSet + the SfxItemSet to insert + + @return a shared pointer to the SfxItemSet + */ + virtual SfxItemSet_Pointer_t insertItemSet( const SfxItemSet& rSet ); + + /** Create an iterator + + The iterator walks through the StylePool + OD 2008-03-07 #i86923# + introduce optional parameter to control, if unused SfxItemsSet are skipped or not + introduce optional parameter to control, if ignorable items are skipped or not + + @attention every change, e.g. destruction, of the StylePool could cause undefined effects. + + @param bSkipUnusedItemSets + input parameter - boolean, indicating if unused SfxItemSets are skipped or not + + @param bSkipIgnorableItems + input parameter - boolean, indicating if ignorable items are skipped or not + + @postcond the iterator "points before the first" SfxItemSet of the pool. + The first StylePoolIterator::getNext() call will deliver the first SfxItemSet. + */ + virtual IStylePoolIteratorAccess* createIterator( const bool bSkipUnusedItemSets = false, + const bool bSkipIgnorableItems = false ); + + /** Returns the number of styles + */ + virtual sal_Int32 getCount() const; + + virtual ~StylePool(); + + static ::rtl::OUString nameOf( SfxItemSet_Pointer_t pSet ); +}; + +class SVL_DLLPUBLIC IStylePoolIteratorAccess +{ +public: + /** Delivers a shared pointer to the next SfxItemSet of the pool + If there is no more SfxItemSet, the delivered share_pointer is empty. + */ + virtual StylePool::SfxItemSet_Pointer_t getNext() = 0; + virtual ::rtl::OUString getName() = 0; + virtual ~IStylePoolIteratorAccess() {}; +}; +#endif diff --git a/svl/inc/svl/urihelper.hxx b/svl/inc/svl/urihelper.hxx new file mode 100644 index 000000000000..ab2ae5878cc2 --- /dev/null +++ b/svl/inc/svl/urihelper.hxx @@ -0,0 +1,235 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SVTOOLS_URIHELPER_HXX +#define SVTOOLS_URIHELPER_HXX + +#include "svl/svldllapi.h" +#include "com/sun/star/uno/Reference.hxx" +#include <com/sun/star/uno/RuntimeException.hpp> +#include <rtl/textenc.h> +#include <tools/link.hxx> +#include <tools/solar.h> +#include <tools/urlobj.hxx> + +namespace com { namespace sun { namespace star { + namespace uno { class XComponentContext; } + namespace uri { class XUriReference; } +} } } +namespace rtl { class OUString; } +class ByteString; +class CharClass; +class UniString; + +//============================================================================ +namespace URIHelper { + +/** + @ATT + Calling this function with defaulted arguments rMaybeFileHdl = Link() and + bCheckFileExists = true often leads to results that are not intended: + Whenever the given rTheBaseURIRef is a file URL, the given rTheRelURIRef is + relative, and rTheRelURIRef could also be smart-parsed as a non-file URL + (e.g., the relative URL "foo/bar" can be smart-parsed as "http://foo/bar"), + then SmartRel2Abs called with rMaybeFileHdl = Link() and bCheckFileExists = + true returns the non-file URL interpretation. To avoid this, either pass + some non-null rMaybeFileHdl if you want to check generated file URLs for + existence (see URIHelper::GetMaybeFileHdl), or use bCheckFileExists = false + if you want to generate file URLs without checking for their existence. +*/ +SVL_DLLPUBLIC UniString +SmartRel2Abs(INetURLObject const & rTheBaseURIRef, + ByteString const & rTheRelURIRef, + Link const & rMaybeFileHdl = Link(), + bool bCheckFileExists = true, + bool bIgnoreFragment = false, + INetURLObject::EncodeMechanism eEncodeMechanism + = INetURLObject::WAS_ENCODED, + INetURLObject::DecodeMechanism eDecodeMechanism + = INetURLObject::DECODE_TO_IURI, + rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8, + bool bRelativeNonURIs = false, + INetURLObject::FSysStyle eStyle = INetURLObject::FSYS_DETECT); + +/** + @ATT + Calling this function with defaulted arguments rMaybeFileHdl = Link() and + bCheckFileExists = true often leads to results that are not intended: + Whenever the given rTheBaseURIRef is a file URL, the given rTheRelURIRef is + relative, and rTheRelURIRef could also be smart-parsed as a non-file URL + (e.g., the relative URL "foo/bar" can be smart-parsed as "http://foo/bar"), + then SmartRel2Abs called with rMaybeFileHdl = Link() and bCheckFileExists = + true returns the non-file URL interpretation. To avoid this, either pass + some non-null rMaybeFileHdl if you want to check generated file URLs for + existence (see URIHelper::GetMaybeFileHdl), or use bCheckFileExists = false + if you want to generate file URLs without checking for their existence. +*/ +SVL_DLLPUBLIC UniString +SmartRel2Abs(INetURLObject const & rTheBaseURIRef, + UniString const & rTheRelURIRef, + Link const & rMaybeFileHdl = Link(), + bool bCheckFileExists = true, + bool bIgnoreFragment = false, + INetURLObject::EncodeMechanism eEncodeMechanism + = INetURLObject::WAS_ENCODED, + INetURLObject::DecodeMechanism eDecodeMechanism + = INetURLObject::DECODE_TO_IURI, + rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8, + bool bRelativeNonURIs = false, + INetURLObject::FSysStyle eStyle = INetURLObject::FSYS_DETECT); + +//============================================================================ +SVL_DLLPUBLIC void SetMaybeFileHdl(Link const & rTheMaybeFileHdl); + +//============================================================================ +SVL_DLLPUBLIC Link GetMaybeFileHdl(); + +/** + Converts a URI reference to a relative one, ignoring certain differences (for + example, treating file URLs for case-ignoring file systems + case-insensitively). + + @param context a component context; must not be null + + @param baseUriReference a base URI reference + + @param uriReference a URI reference + + @return a URI reference representing the given uriReference relative to the + given baseUriReference; if the given baseUriReference is not an absolute, + hierarchical URI reference, or the given uriReference is not a valid URI + reference, null is returned + + @exception std::bad_alloc if an out-of-memory condition occurs + + @exception com::sun::star::uno::RuntimeException if any error occurs + */ +SVL_DLLPUBLIC com::sun::star::uno::Reference< com::sun::star::uri::XUriReference > +normalizedMakeRelative( + com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > + const & context, + rtl::OUString const & baseUriReference, rtl::OUString const & uriReference); + +/** + A variant of normalizedMakeRelative with a simplified interface. + + Internally calls normalizedMakeRelative with the default component context. + + @param baseUriReference a base URI reference, passed to + normalizedMakeRelative + + @param uriReference a URI reference, passed to normalizedMakeRelative + + @return if the XUriReference returnd by normalizedMakeRelative is empty, + uriReference is returned unmodified; otherwise, the result of calling + XUriReference::getUriReference on the XUriReference returnd by + normalizedMakeRelative is returned + + @exception std::bad_alloc if an out-of-memory condition occurs + + @exception com::sun::star::uno::RuntimeException if any error occurs + + @deprecated + No code should rely on the default component context. +*/ +SVL_DLLPUBLIC rtl::OUString simpleNormalizedMakeRelative( + rtl::OUString const & baseUriReference, rtl::OUString const & uriReference); + +//============================================================================ +SVL_DLLPUBLIC UniString +FindFirstURLInText(UniString const & rText, + xub_StrLen & rBegin, + xub_StrLen & rEnd, + CharClass const & rCharClass, + INetURLObject::EncodeMechanism eMechanism + = INetURLObject::WAS_ENCODED, + rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8, + INetURLObject::FSysStyle eStyle + = INetURLObject::FSYS_DETECT); + +//============================================================================ +/** Remove any password component from both absolute and relative URLs. + + @ATT The current implementation will not remove a password from a + relative URL that has an authority component (e.g., the password is not + removed from the relative ftp URL <//user:password@domain/path>). But + since our functions to translate between absolute and relative URLs never + produce relative URLs with authority components, this is no real problem. + + @ATT For relative URLs (or anything not recognized as an absolute URI), + the current implementation will return the input unmodified, not applying + any translations implied by the encode/decode parameters. + + @param rURI An absolute or relative URI reference. + + @param eEncodeMechanism See the general discussion for INetURLObject set- + methods. + + @param eDecodeMechanism See the general discussion for INetURLObject get- + methods. + + @param eCharset See the general discussion for INetURLObject get- and + set-methods. + + @return The input URI with any password component removed. + */ +SVL_DLLPUBLIC UniString +removePassword(UniString const & rURI, + INetURLObject::EncodeMechanism eEncodeMechanism + = INetURLObject::WAS_ENCODED, + INetURLObject::DecodeMechanism eDecodeMechanism + = INetURLObject::DECODE_TO_IURI, + rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8); + +//============================================================================ +/** Query the notational conventions used in the file system provided by some + file content provider. + + @param rFileUrl This file URL determines which file content provider is + used to query the desired information. (The UCB's usual mapping from URLs + to content providers is used.) + + @param bAddConvenienceStyles If true, the return value contains not only + the style bit corresponding to the queried content provider's conventions, + but may also contain additional style bits that make using this function + more convenient in certain situations. Currently, the effect is that + FSYS_UNX is extended with FSYS_VOS, and both FSYS_DOS and FSYS_MAC are + extended with FSYS_VOS and FSYS_UNX (i.e., the---unambiguous---detection + of VOS style and Unix style file system paths is always enabled); also, in + case the content provider's conventions cannot be determined, FSYS_DETECT + is returned instead of FSysStyle(0). + + @return The style bit corresponding to the queried content provider's + conventions, or FSysStyle(0) if these cannot be determined. + */ +SVL_DLLPUBLIC INetURLObject::FSysStyle queryFSysStyle(UniString const & rFileUrl, + bool bAddConvenienceStyles = true) + throw (com::sun::star::uno::RuntimeException); + +} + +#endif // SVTOOLS_URIHELPER_HXX diff --git a/svl/inc/svl/urlbmk.hxx b/svl/inc/svl/urlbmk.hxx new file mode 100644 index 000000000000..9a37184c8ec1 --- /dev/null +++ b/svl/inc/svl/urlbmk.hxx @@ -0,0 +1,69 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _URLBMK_HXX +#define _URLBMK_HXX + + +#include <tools/string.hxx> + +//========================================================================= + +class INetBookmark + +/* [Beschreibung] + + Diese Klasse stellt ein Bookmark dar, welches aus einer URL und + einem dazuge"horigen Beschreibungstext besteht. + + Es gibt ein eigenes Clipboardformat und Hilfsmethoden zum Kopieren + und Einf"ugen in und aus Clipboard und DragServer. +*/ + +{ + String aUrl; + String aDescr; + +protected: + + void SetURL( const String& rS ) { aUrl = rS; } + void SetDescription( const String& rS ) { aDescr = rS; } + +public: + INetBookmark( const String &rUrl, const String &rDescr ) + : aUrl( rUrl ), aDescr( rDescr ) + {} + INetBookmark() + {} + + const String& GetURL() const { return aUrl; } + const String& GetDescription() const { return aDescr; } +}; + + +#endif + diff --git a/svl/inc/svl/whiter.hxx b/svl/inc/svl/whiter.hxx new file mode 100644 index 000000000000..83a3e21e2b0e --- /dev/null +++ b/svl/inc/svl/whiter.hxx @@ -0,0 +1,60 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SFX_WHITER_HXX +#define _SFX_WHITER_HXX + +#include "svl/svldllapi.h" + +#ifndef INCLUDED_LIMITS_H +#include <limits.h> +#define INCLUDED_LIMITS_H +#endif +#include <tools/solar.h> + +class SfxItemSet; + + +// INCLUDE --------------------------------------------------------------- + +class SVL_DLLPUBLIC SfxWhichIter +{ + const USHORT *pRanges, *pStart; + USHORT nOfst, nFrom, nTo; + +public: + SfxWhichIter( const SfxItemSet& rSet, USHORT nFrom = 0, USHORT nTo = USHRT_MAX ); + ~SfxWhichIter(); + + USHORT GetCurWhich() const { return *pRanges + nOfst; } + USHORT NextWhich(); + USHORT PrevWhich(); + + USHORT FirstWhich(); + USHORT LastWhich(); +}; + +#endif diff --git a/svl/inc/svl/xmlement.hxx b/svl/inc/svl/xmlement.hxx new file mode 100644 index 000000000000..d2680fbbf404 --- /dev/null +++ b/svl/inc/svl/xmlement.hxx @@ -0,0 +1,43 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVTOOLS_XMLEMENT_HXX +#define _SVTOOLS_XMLEMENT_HXX + +#ifndef _SAL_TYPES_H +#include <sal/types.h> +#endif + +struct SvXMLEnumMapEntry +{ + const sal_Char *pName; + sal_uInt16 nValue; +}; + + +#endif // _SVTOOLS_XMLEMENT_HXX + |