diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-07-21 18:56:16 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-07-21 18:56:16 +0200 |
commit | a233dac0653f3f3054f7ad2da114ed989747e89a (patch) | |
tree | bf1e11438321c06125a94308649c496648061ccb /svl | |
parent | acb6133d89abe071108577f821d7eaa381378879 (diff) | |
parent | e5647de7dd26775e45af24f11ac4f82a5518bd9e (diff) |
resyncing to master
Diffstat (limited to 'svl')
34 files changed, 188 insertions, 1107 deletions
diff --git a/svl/Library_fsstorage.mk b/svl/Library_fsstorage.mk index 3e27ae8f4357..121049b9cff7 100644 --- a/svl/Library_fsstorage.mk +++ b/svl/Library_fsstorage.mk @@ -37,10 +37,14 @@ $(eval $(call gb_Library_set_include,fsstorage,\ -I$(realpath $(SRCDIR)/svl/inc/svl) \ -I$(realpath $(SRCDIR)/svl/source/inc) \ -I$(realpath $(SRCDIR)/svl/inc/pch) \ - -I$(OUTDIR)/inc/offuh \ -I$(OUTDIR)/inc \ )) +$(eval $(call gb_Library_add_api,fsstorage,\ + udkapi \ + offapi \ +)) + $(eval $(call gb_Library_add_linked_libs,fsstorage,\ comphelper \ cppu \ diff --git a/svl/Library_passwordcontainer.mk b/svl/Library_passwordcontainer.mk index 58b4b6edb6a7..3826dca597dd 100644 --- a/svl/Library_passwordcontainer.mk +++ b/svl/Library_passwordcontainer.mk @@ -37,10 +37,14 @@ $(eval $(call gb_Library_set_include,passwordcontainer,\ -I$(realpath $(SRCDIR)/svl/inc/svl) \ -I$(realpath $(SRCDIR)/svl/source/inc) \ -I$(realpath $(SRCDIR)/svl/inc/pch) \ - -I$(OUTDIR)/inc/offuh \ -I$(OUTDIR)/inc \ )) +$(eval $(call gb_Library_add_api,passwordcontainer,\ + udkapi \ + offapi \ +)) + $(eval $(call gb_Library_add_linked_libs,passwordcontainer,\ cppu \ cppuhelper \ diff --git a/svl/Library_svl.mk b/svl/Library_svl.mk index d1996dc0dc52..08988c41f681 100644 --- a/svl/Library_svl.mk +++ b/svl/Library_svl.mk @@ -37,7 +37,12 @@ $(eval $(call gb_Library_set_include,svl,\ $$(SOLARINC) \ -I$(realpath $(SRCDIR)/svl/source/inc) \ -I$(realpath $(SRCDIR)/svl/inc/pch) \ - -I$(OUTDIR)/inc/offuh \ + -I$(SRCDIR)/svl/inc/pch \ +)) + +$(eval $(call gb_Library_add_api,svl,\ + udkapi \ + offapi \ )) $(eval $(call gb_Library_add_defs,svl,\ diff --git a/svl/inc/svl/adrparse.hxx b/svl/inc/svl/adrparse.hxx index dbb671889ec3..e9f479af9e09 100644 --- a/svl/inc/svl/adrparse.hxx +++ b/svl/inc/svl/adrparse.hxx @@ -67,28 +67,6 @@ public: 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) diff --git a/svl/inc/svl/httpcook.hxx b/svl/inc/svl/httpcook.hxx index 2d5d434592af..40bf4e408015 100644 --- a/svl/inc/svl/httpcook.hxx +++ b/svl/inc/svl/httpcook.hxx @@ -33,6 +33,7 @@ #include <tools/stream.hxx> #include <tools/string.hxx> #include <svl/poolitem.hxx> +#include <vector> /*======================================================================= * @@ -132,21 +133,28 @@ enum CntHTTPCookieRequestType CNTHTTP_COOKIE_REQUEST_SEND }; +typedef ::std::vector< CntHTTPCookie* > CntHTTPCookieList_impl; + struct CntHTTPCookieRequest { - const String& m_rURL; - List& m_rCookieList; - CntHTTPCookieRequestType m_eType; - sal_uInt16 m_nRet; + const String& m_rURL; + CntHTTPCookieList_impl& m_rCookieList; + CntHTTPCookieRequestType m_eType; + sal_uInt16 m_nRet; CntHTTPCookieRequest ( const String& rURL, - List& rCookieList, + CntHTTPCookieList_impl& rCookieList, CntHTTPCookieRequestType eType) : m_rURL (rURL), m_rCookieList (rCookieList), m_eType(eType), m_nRet (CNTHTTP_COOKIE_POLICY_BANNED) {} + ~CntHTTPCookieRequest() { + for ( size_t i = 0, n = m_rCookieList.size(); i < n; ++i ) { + delete m_rCookieList[ i ]; + } + } }; #endif // SVTOOLS_HTTPCOOK_HXX diff --git a/svl/inc/svl/ilstitem.hxx b/svl/inc/svl/ilstitem.hxx index a0527cec556c..2973c066c4d8 100644 --- a/svl/inc/svl/ilstitem.hxx +++ b/svl/inc/svl/ilstitem.hxx @@ -32,8 +32,7 @@ #include "svl/svldllapi.h" #include <svl/poolitem.hxx> #include <com/sun/star/uno/Sequence.hxx> - -class SvULongs; +#include <vector> class SVL_DLLPUBLIC SfxIntegerListItem : public SfxPoolItem { @@ -43,7 +42,8 @@ public: TYPEINFO(); SfxIntegerListItem(); - SfxIntegerListItem( sal_uInt16 nWhich, const SvULongs& rList ); + SfxIntegerListItem( sal_uInt16 nWhich, const ::std::vector < sal_Int32 >& rList ); + SfxIntegerListItem( sal_uInt16 nWhich, const ::com::sun::star::uno::Sequence < sal_Int32 >& rList ); SfxIntegerListItem( const SfxIntegerListItem& rItem ); ~SfxIntegerListItem(); @@ -52,7 +52,7 @@ public: ::com::sun::star::uno::Sequence < sal_Int32 > GetConstSequence() const { return SAL_CONST_CAST(SfxIntegerListItem *, this)->GetSequence(); } - void GetList( SvULongs& rList ) const; + void GetList( ::std::vector < sal_Int32 >& rList ) const; virtual int operator==( const SfxPoolItem& ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; diff --git a/svl/inc/svl/inettype.hxx b/svl/inc/svl/inettype.hxx index 3abe09c0e37c..f88373dd5303 100644 --- a/svl/inc/svl/inettype.hxx +++ b/svl/inc/svl/inettype.hxx @@ -352,8 +352,6 @@ enum INetContentType class SVL_DLLPUBLIC INetContentTypes { public: - static void Uninitialize(); - static INetContentType RegisterContentType(UniString const & rTypeName, UniString const & rPresentation, @@ -369,8 +367,6 @@ public: static UniString GetPresentation(INetContentType eTypeID, const ::com::sun::star::lang::Locale& aLocale); - static UniString GetExtension(UniString const & rTypeName); - static INetContentType GetContentType4Extension(UniString const & rExtension); @@ -379,40 +375,6 @@ public: static bool GetExtensionFromURL(UniString const & rURL, UniString & rExtension); - static INetContentType MapStringToContentType(UniString const & - rPresentation); - - /** Parse the body of an RFC 2045 Content-Type header field. - - @param rMediaType The body of the Content-Type header field. It must - be of the form - - token "/" token *(";" token "=" (token / quoted-string)) - - with intervening linear white space and comments (cf. RFCs 822, 2045). - The RFC 2231 extension are supported. The encoding of rMediaType - should be US-ASCII, but any values in the range 0x80--0xFF are - interpretet 'as appropriate.' - - @param rType Returns the type (the first of the above tokens), in US- - ASCII encoding and converted to lower case. - - @param rSubType Returns the sub type (the second of the above - tokens), in US-ASCII encoding and converted to lower case. - - @param rParameters If not null, returns the parameters as a list of - INetContentTypeParameters (the attributes are in US-ASCII encoding and - converted to lower case, the values are in Unicode encoding). If - null, only the syntax of the parameters is checked, but they are not - returned. - - @return True if the syntax of the field body is correct. If false is - returned, none of the output parameters will be modified! - */ - static bool parse(ByteString const & rMediaType, ByteString & rType, - ByteString & rSubType, - INetContentTypeParameterList * pParameters = 0); - /** Parse the body of an RFC 2045 Content-Type header field. @param rMediaType The body of the Content-Type header field. It must @@ -443,42 +405,6 @@ public: static bool parse(UniString const & rMediaType, UniString & rType, UniString & rSubType, INetContentTypeParameterList * pParameters = 0); - - /** Append a parameter to the string representation of a MIME media type. - - @param rMediaType The string representation of a MIME media type. - - @param rAttribute The name of the parameter. Must be a valid RFC - 2045 token. - - @param rValue The value of the paramter. Must only consist of US- - ASCII characters. - - @return The string representation of rMediaType with the new - parameter appended. It is not checked whether a parameter with that - name already existed in rMediaType. - */ - static ByteString appendUSASCIIParameter(ByteString const & rMediaType, - ByteString const & rAttribute, - ByteString const & rValue); - - /** Append a parameter to the string representation of a MIME media type. - - @param rMediaType The string representation of a MIME media type. - - @param rAttribute The name of the parameter. Must be a valid RFC - 2045 token. - - @param rValue The value of the paramter. Must only consist of US- - ASCII characters. - - @return The string representation of rMediaType with the new - parameter appended. It is not checked whether a parameter with that - name already existed in rMediaType. - */ - static UniString appendUSASCIIParameter(UniString const & rMediaType, - UniString const & rAttribute, - UniString const & rValue); }; #endif // _INETTYPE_HXX diff --git a/svl/inc/svl/itempool.hxx b/svl/inc/svl/itempool.hxx index 3cec7f75dee2..bceedeee1591 100644 --- a/svl/inc/svl/itempool.hxx +++ b/svl/inc/svl/itempool.hxx @@ -266,7 +266,6 @@ public: sal_uInt16 GetFileFormatVersion() const { return _nFileFormatVersion; } void SetFileFormatVersion( sal_uInt16 nFileFormatVersion ); - sal_uInt16 GetLoadingVersion() const; bool IsCurrentVersionLoading() const; static int IsWhich(sal_uInt16 nId) { diff --git a/svl/inc/svl/ownlist.hxx b/svl/inc/svl/ownlist.hxx index 6bb9f311119b..ea1fc3842f4d 100644 --- a/svl/inc/svl/ownlist.hxx +++ b/svl/inc/svl/ownlist.hxx @@ -61,19 +61,6 @@ public: } const String & GetCommand() const { return aCommand; } const String & GetArgument() const { return aArgument; } - - friend SvStream& operator >> ( SvStream& rStm, SvCommand & rThis ) - { - rStm.ReadByteString( rThis.aCommand, gsl_getSystemTextEncoding() ); - rStm.ReadByteString( rThis.aArgument, gsl_getSystemTextEncoding() ); - return rStm; - } - friend SvStream& operator << ( SvStream& rStm, const SvCommand & rThis ) - { - rStm.WriteByteString( rThis.aCommand, gsl_getSystemTextEncoding() ); - rStm.WriteByteString( rThis.aArgument, gsl_getSystemTextEncoding() ); - return rStm; - } }; typedef ::std::vector< SvCommand > SvCommandList_impl; @@ -98,9 +85,6 @@ public: sal_Bool FillFromSequence( const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& ); void FillSequence( com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& ); - SVL_DLLPUBLIC friend SvStream& operator >> ( SvStream& rStm, SvCommandList & ); - SVL_DLLPUBLIC friend SvStream& operator << ( SvStream&, const SvCommandList & ); - size_t size() const { return aCommandList.size(); } SvCommand operator[]( size_t i) { diff --git a/svl/inc/svl/style.hxx b/svl/inc/svl/style.hxx index 615d5d690aba..a6f0ca59cb2d 100644 --- a/svl/inc/svl/style.hxx +++ b/svl/inc/svl/style.hxx @@ -54,7 +54,7 @@ class SvStream; /* Everyone changing instances of SfxStyleSheetBasePool or SfxStyleSheetBase -mußt broadcast this using <SfxStyleSheetBasePool::GetBroadcaster()> broadcasten. +must broadcast this using <SfxStyleSheetBasePool::GetBroadcaster()> broadcasts. The class <SfxStyleSheetHint> is used for this, it contains an Action-Id and a pointer to the <SfxStyleSheetBase>. The actions are: diff --git a/svl/inc/svl/svstdarr.hxx b/svl/inc/svl/svstdarr.hxx index 0d46662237d4..bfeeb35d1c79 100644 --- a/svl/inc/svl/svstdarr.hxx +++ b/svl/inc/svl/svstdarr.hxx @@ -93,31 +93,11 @@ SV_DECL_PTRARR_VISIBILITY( SvByteStrings, ByteStringPtr, 1, 1, SVL_DLLPUBLIC ) #define _SVSTDARR_BYTESTRINGS_DECL #endif -#ifndef _SVSTDARR_BYTESTRINGSDTOR_DECL -SV_DECL_PTRARR_DEL_VISIBILITY( SvByteStringsDtor, ByteStringPtr, 1, 1, SVL_DLLPUBLIC ) -#define _SVSTDARR_BYTESTRINGSDTOR_DECL -#endif - -#ifndef _SVSTDARR_BYTESTRINGSSORT_DECL -SV_DECL_PTRARR_SORT_VISIBILITY( SvByteStringsSort, ByteStringPtr, 1, 1, SVL_DLLPUBLIC ) -#define _SVSTDARR_BYTESTRINGSSORT_DECL -#endif - #ifndef _SVSTDARR_BYTESTRINGSSORTDTOR_DECL SV_DECL_PTRARR_SORT_DEL_VISIBILITY( SvByteStringsSortDtor, ByteStringPtr, 1, 1, SVL_DLLPUBLIC ) #define _SVSTDARR_BYTESTRINGSSORTDTOR_DECL #endif -#ifndef _SVSTDARR_BYTESTRINGSISORT_DECL -SV_DECL_PTRARR_SORT_VISIBILITY( SvByteStringsISort, ByteStringPtr, 1, 1, SVL_DLLPUBLIC ) -#define _SVSTDARR_BYTESTRINGSISORT_DECL -#endif - -#ifndef _SVSTDARR_BYTESTRINGSISORTDTOR_DECL -SV_DECL_PTRARR_SORT_DEL_VISIBILITY( SvByteStringsISortDtor, ByteStringPtr, 1, 1, SVL_DLLPUBLIC ) -#define _SVSTDARR_BYTESTRINGSISORTDTOR_DECL -#endif - typedef std::deque< xub_StrLen > SvXub_StrLens; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svl/inc/svl/urihelper.hxx b/svl/inc/svl/urihelper.hxx index 3baab37f7896..61be9f6c831d 100644 --- a/svl/inc/svl/urihelper.hxx +++ b/svl/inc/svl/urihelper.hxx @@ -42,7 +42,6 @@ namespace com { namespace sun { namespace star { namespace uri { class XUriReference; } } } } namespace rtl { class OUString; } -class ByteString; class CharClass; class UniString; @@ -64,33 +63,6 @@ namespace URIHelper { */ 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, @@ -205,32 +177,6 @@ removePassword(UniString const & rURI, 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/prj/build.lst b/svl/prj/build.lst index 67366a6aee68..5fc7d0e223a3 100644 --- a/svl/prj/build.lst +++ b/svl/prj/build.lst @@ -1,3 +1,3 @@ -sl svl : TRANSLATIONS:translations rsc offuh ucbhelper unotools cppu cppuhelper comphelper sal sot LIBXSLT:libxslt NULL +sl svl : TRANSLATIONS:translations DESKTOP:rsc offapi ucbhelper unotools cppu cppuhelper comphelper sal sot LIBXSLT:libxslt NULL sl svl\prj nmake - all svl_prj NULL # sl svl\qa\unit nmake - all svl_qa_cppunit svl_util NULL diff --git a/svl/qa/complex/ConfigItems/helper/ConfigItemTest.cxx b/svl/qa/complex/ConfigItems/helper/ConfigItemTest.cxx index 3172fd9322d6..a287fa499886 100644 --- a/svl/qa/complex/ConfigItems/helper/ConfigItemTest.cxx +++ b/svl/qa/complex/ConfigItems/helper/ConfigItemTest.cxx @@ -222,13 +222,6 @@ static ::cppu::ImplementationEntry const lRegEntries[] = }; //============================================================================= -extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(const char** pEnvTypeName, - uno_Environment** ) -{ - *pEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - -//============================================================================= extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(const char* sImplName , void* pServiceManager, void* pRegistryKey ) diff --git a/svl/source/fsstor/fsfactory.cxx b/svl/source/fsstor/fsfactory.cxx index a641a5d80c04..61a8f7f15048 100644 --- a/svl/source/fsstor/fsfactory.cxx +++ b/svl/source/fsstor/fsfactory.cxx @@ -235,13 +235,7 @@ uno::Sequence< ::rtl::OUString > SAL_CALL FSStorageFactory::getSupportedServiceN extern "C" { -SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment ( - const sal_Char ** ppEnvTypeName, uno_Environment ** /* ppEnv */) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - -SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory ( +SAL_DLLPUBLIC_EXPORT void * SAL_CALL fsstorage_component_getFactory ( const sal_Char * pImplementationName, void * pServiceManager, void * /* pRegistryKey */) { void * pResult = 0; diff --git a/svl/source/fsstor/fsstorage.component b/svl/source/fsstor/fsstorage.component index 3ef0be825972..f9f08487b8a5 100644 --- a/svl/source/fsstor/fsstorage.component +++ b/svl/source/fsstor/fsstorage.component @@ -26,7 +26,7 @@ * **********************************************************************--> -<component loader="com.sun.star.loader.SharedLibrary" +<component loader="com.sun.star.loader.SharedLibrary" prefix="fsstorage" xmlns="http://openoffice.org/2010/uno-components"> <implementation name="com.sun.star.comp.embed.FileSystemStorageFactory"> <service name="com.sun.star.comp.embed.FileSystemStorageFactory"/> diff --git a/svl/source/items/ilstitem.cxx b/svl/source/items/ilstitem.cxx index f8d575b52175..dbf8825e90ba 100644 --- a/svl/source/items/ilstitem.cxx +++ b/svl/source/items/ilstitem.cxx @@ -35,20 +35,25 @@ #include <svl/ilstitem.hxx> -#define _SVSTDARR_ULONGS -#include <svl/svstdarr.hxx> - TYPEINIT1_AUTOFACTORY(SfxIntegerListItem, SfxPoolItem); SfxIntegerListItem::SfxIntegerListItem() { } -SfxIntegerListItem::SfxIntegerListItem( sal_uInt16 which, const SvULongs& rList ) +SfxIntegerListItem::SfxIntegerListItem( sal_uInt16 which, const ::std::vector < sal_Int32 >& rList ) + : SfxPoolItem( which ) +{ + m_aList.realloc( rList.size() ); + for ( sal_uInt16 n=0; n<rList.size(); ++n ) + m_aList[n] = rList[n]; +} + +SfxIntegerListItem::SfxIntegerListItem( sal_uInt16 which, const ::com::sun::star::uno::Sequence < sal_Int32 >& rList ) : SfxPoolItem( which ) { - m_aList.realloc( rList.Count() ); - for ( sal_uInt16 n=0; n<rList.Count(); n++ ) + m_aList.realloc( rList.getLength() ); + for ( sal_Int32 n=0; n<rList.getLength(); ++n ) m_aList[n] = rList[n]; } @@ -97,10 +102,11 @@ bool SfxIntegerListItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 ) return true; } -void SfxIntegerListItem::GetList( SvULongs& rList ) const +void SfxIntegerListItem::GetList( ::std::vector< sal_Int32 >& rList ) const { - for ( sal_Int32 n=0; n<m_aList.getLength(); n++ ) - rList.Insert( m_aList[n], sal::static_int_cast< sal_uInt16 >(n) ); + rList.reserve( m_aList.getLength() ); + for ( sal_Int32 n=0; n<m_aList.getLength(); ++n ) + rList.push_back( m_aList[n] ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svl/source/items/poolio.cxx b/svl/source/items/poolio.cxx index d75560f5a26d..4811340af938 100644 --- a/svl/source/items/poolio.cxx +++ b/svl/source/items/poolio.cxx @@ -1324,7 +1324,6 @@ void SfxItemPool::SetVersionMap <SfxItemPool::IsLoadingVersionCurrent()const> <SfxItemPool::GetNewWhich(sal_uInt16)> <SfxItemPool::GetVersion()const> - <SfxItemPool::GetLoadingVersion()const> */ { @@ -1381,7 +1380,6 @@ sal_uInt16 SfxItemPool::GetNewWhich <SfxItemPool::IsLoadingVersionCurrent()const> <SfxItemPool::SetVersionMap(sal_uInt16,sal_uInt16,sal_uInt16,sal_uInt16*)> <SfxItemPool::GetVersion()const> - <SfxItemPool::GetLoadingVersion()const> */ { @@ -1470,7 +1468,6 @@ bool SfxItemPool::IsCurrentVersionLoading() const <SfxItemPool::SetVersionMap(sal_uInt16,sal_uInt16,sal_uInt16,sal_uInt16*)> <SfxItemPool::GetNewWhich(sal_uInt16)const> <SfxItemPool::GetVersion()const> - <SfxItemPool::GetLoadingVersion()const> */ { @@ -1503,7 +1500,6 @@ sal_uInt16 SfxItemPool::GetVersion() const <SfxItemPool::IsLoadingVersionCurrent()const> <SfxItemPool::SetVersionMap(sal_uInt16,sal_uInt16,sal_uInt16,sal_uInt16*)> <SfxItemPool::GetNewWhich(sal_uInt16)const> - <SfxItemPool::GetLoadingVersion()const> */ { @@ -1512,36 +1508,6 @@ sal_uInt16 SfxItemPool::GetVersion() const // ----------------------------------------------------------------------- -sal_uInt16 SfxItemPool::GetLoadingVersion() const - -/* [Beschreibung] - - Diese Methode liefert die Versionsnummer des SfxItemPool-Aufbaus - (also des Which-Bereichs), die bei Laden vorgefunden wurde. - - Precondition: Pool mu\s geladen sein - Postcondition: unver"andert - Laufzeit: 2 - - - [Anmerkung] - - Achtung: Es mu\s ggf. die Versionsnummer von Sekund"arpools - ber"ucksichtigt werden. - - - [Querverweise] - - <SfxItemPool::IsLoadingVersionCurrent()const> - <SfxItemPool::SetVersionMap(sal_uInt16,sal_uInt16,sal_uInt16,sal_uInt16*)> - <SfxItemPool::GetNewWhich(sal_uInt16)const> - <SfxItemPool::GetVersion()const> -*/ - -{ - return pImp->nLoadingVersion; -} - //------------------------------------------------------------------------- bool SfxItemPool::IsVer2_Impl() const diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx index 815247cb4724..2bfbfc40b269 100644 --- a/svl/source/items/style.cxx +++ b/svl/source/items/style.cxx @@ -1153,8 +1153,8 @@ sal_Bool SfxStyleSheetBasePool::Store( SvStream& rStream, sal_Bool bUsed ) sal_uInt16 nInsPos, nAdd = aSortConvNames.Count(); while( !aSortConvNames.Insert( pConvName, nInsPos ) ) - (pConvName->Append( '_' )).Append( - ByteString::CreateFromInt32( nAdd++ )); + (pConvName->Append( '_' )).Append(ByteString( + rtl::OString::valueOf(static_cast<sal_Int32>(nAdd++)))); aOrigNames.Insert( pName, nInsPos ); } } diff --git a/svl/source/items/whassert.hxx b/svl/source/items/whassert.hxx index 0fa492b19443..379d4794458d 100644 --- a/svl/source/items/whassert.hxx +++ b/svl/source/items/whassert.hxx @@ -29,7 +29,7 @@ #define _SFX_WHASSERT_HXX #include <tools/debug.hxx> -#include <tools/string.hxx> +#include <rtl/strbuf.hxx> //------------------------------------------------------------------------ @@ -40,10 +40,10 @@ { \ if ( !(bCondition) ) \ { \ - ByteString aMsg( sMessage ); \ - aMsg.Append(RTL_CONSTASCII_STRINGPARAM("\nwith Id/Pos: ")); \ - aMsg += ByteString::CreateFromInt32( nId ); \ - DbgError( aMsg.GetBuffer(), __FILE__, __LINE__); \ + rtl::OStringBuffer aMsg(sMessage); \ + aMsg.append(RTL_CONSTASCII_STRINGPARAM("\nwith Id/Pos: ")); \ + aMsg.append(static_cast<sal_Int32>(nId)); \ + DbgError(aMsg.getStr(), __FILE__, __LINE__); \ } \ } \ } diff --git a/svl/source/memtools/svarray.cxx b/svl/source/memtools/svarray.cxx index 43eb637ae991..4032800e0a8b 100644 --- a/svl/source/memtools/svarray.cxx +++ b/svl/source/memtools/svarray.cxx @@ -71,12 +71,8 @@ SV_IMPL_OP_PTRARR_SORT( SvStringsSort, StringPtr ) SV_IMPL_OP_PTRARR_SORT( SvStringsSortDtor, StringPtr ) SV_IMPL_PTRARR( SvByteStrings, ByteStringPtr ) -SV_IMPL_PTRARR( SvByteStringsDtor, ByteStringPtr ) -SV_IMPL_OP_PTRARR_SORT( SvByteStringsSort, ByteStringPtr ) SV_IMPL_OP_PTRARR_SORT( SvByteStringsSortDtor, ByteStringPtr ) - - // ---------------- strings ------------------------------------- // Array mit anderer Seek-Methode! @@ -171,97 +167,4 @@ sal_Bool SvStringsISortDtor::Seek_Entry( const StringPtr aE, sal_uInt16* pP ) co return sal_False; } -// ---------------- bytestrings ------------------------------------- - -// Array mit anderer Seek-Methode! -_SV_IMPL_SORTAR_ALG( SvByteStringsISort, ByteStringPtr ) -void SvByteStringsISort::DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL ) -{ - if( nL ) - { - DBG_ASSERT( nP < nA && nP + nL <= nA, "ERR_VAR_DEL" ); - for( sal_uInt16 n=nP; n < nP + nL; n++ ) - delete *((ByteStringPtr*)pData+n); - SvPtrarr::Remove( nP, nL ); - } -} -sal_Bool SvByteStringsISort::Seek_Entry( const ByteStringPtr aE, sal_uInt16* pP ) const -{ - register sal_uInt16 nO = SvByteStringsISort_SAR::Count(), - nM, - nU = 0; - if( nO > 0 ) - { - nO--; - while( nU <= nO ) - { - nM = nU + ( nO - nU ) / 2; - StringCompare eCmp = (*((ByteStringPtr*)pData + nM))-> - CompareIgnoreCaseToAscii( *(aE) ); - if( COMPARE_EQUAL == eCmp ) - { - if( pP ) *pP = nM; - return sal_True; - } - else if( COMPARE_LESS == eCmp ) - nU = nM + 1; - else if( nM == 0 ) - { - if( pP ) *pP = nU; - return sal_False; - } - else - nO = nM - 1; - } - } - if( pP ) *pP = nU; - return sal_False; -} - - -// Array mit anderer Seek-Methode! -_SV_IMPL_SORTAR_ALG( SvByteStringsISortDtor, ByteStringPtr ) -void SvByteStringsISortDtor::DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL ) -{ - if( nL ) - { - DBG_ASSERT( nP < nA && nP + nL <= nA, "ERR_VAR_DEL" ); - for( sal_uInt16 n=nP; n < nP + nL; n++ ) - delete *((ByteStringPtr*)pData+n); - SvPtrarr::Remove( nP, nL ); - } -} -sal_Bool SvByteStringsISortDtor::Seek_Entry( const ByteStringPtr aE, sal_uInt16* pP ) const -{ - register sal_uInt16 nO = SvByteStringsISortDtor_SAR::Count(), - nM, - nU = 0; - if( nO > 0 ) - { - nO--; - while( nU <= nO ) - { - nM = nU + ( nO - nU ) / 2; - StringCompare eCmp = (*((ByteStringPtr*)pData + nM))-> - CompareIgnoreCaseToAscii( *(aE) ); - if( COMPARE_EQUAL == eCmp ) - { - if( pP ) *pP = nM; - return sal_True; - } - else if( COMPARE_LESS == eCmp ) - nU = nM + 1; - else if( nM == 0 ) - { - if( pP ) *pP = nU; - return sal_False; - } - else - nO = nM - 1; - } - } - if( pP ) *pP = nU; - return sal_False; -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svl/source/misc/adrparse.cxx b/svl/source/misc/adrparse.cxx index e0087aa5220d..b6aa9d9e6ff2 100644 --- a/svl/source/misc/adrparse.cxx +++ b/svl/source/misc/adrparse.cxx @@ -780,142 +780,4 @@ SvAddressParser::~SvAddressParser() m_aRest.clear(); } -//============================================================================ -// static -bool SvAddressParser::createRFC822Mailbox(String const & rPhrase, - String const & rAddrSpec, - String & rMailbox) -{ - String aTheAddrSpec; - sal_Unicode const * p = rAddrSpec.GetBuffer(); - sal_Unicode const * pEnd = p + rAddrSpec.Len(); - {for (bool bSegment = false;;) - { - p = INetMIME::skipLinearWhiteSpaceComment(p, pEnd); - if (p == pEnd) - return false; - if (bSegment) - { - sal_Unicode c = *p++; - if (c == '@') - break; - else if (c != '.') - return false; - aTheAddrSpec += '.'; - p = INetMIME::skipLinearWhiteSpaceComment(p, pEnd); - if (p == pEnd) - return false; - } - else - bSegment = true; - if (*p == '"') - { - aTheAddrSpec += *p++; - for (;;) - { - if (INetMIME::startsWithLineFolding(p, pEnd)) - p += 2; - if (p == pEnd) - return false; - if (*p == '"') - break; - if (*p == '\x0D' || (*p == '\\' && ++p == pEnd) - || !INetMIME::isUSASCII(*p)) - return false; - if (INetMIME::needsQuotedStringEscape(*p)) - aTheAddrSpec += '\\'; - aTheAddrSpec += *p++; - } - aTheAddrSpec += *p++; - } - else if (INetMIME::isAtomChar(*p)) - while (p != pEnd && INetMIME::isAtomChar(*p)) - aTheAddrSpec += *p++; - else - return false; - }} - aTheAddrSpec += '@'; - {for (bool bSegment = false;;) - { - p = INetMIME::skipLinearWhiteSpaceComment(p, pEnd); - if (p == pEnd) - { - if (bSegment) - break; - else - return false; - } - if (bSegment) - { - if (*p++ != '.') - return false; - aTheAddrSpec += '.'; - p = INetMIME::skipLinearWhiteSpaceComment(p, pEnd); - if (p == pEnd) - return false; - } - else - bSegment = true; - if (*p == '[') - { - aTheAddrSpec += *p++; - for (;;) - { - if (INetMIME::startsWithLineFolding(p, pEnd)) - p += 2; - if (p == pEnd) - return false; - if (*p == ']') - break; - if (*p == '\x0D' || *p == '[' || (*p == '\\' && ++p == pEnd) - || !INetMIME::isUSASCII(*p)) - return false; - if (*p >= '[' && *p <= ']') - aTheAddrSpec += '\\'; - aTheAddrSpec += *p++; - } - aTheAddrSpec += *p++; - } - else if (INetMIME::isAtomChar(*p)) - while (p != pEnd && INetMIME::isAtomChar(*p)) - aTheAddrSpec += *p++; - else - return false; - }} - - if (rPhrase.Len() == 0) - rMailbox = aTheAddrSpec; - else - { - bool bQuotedString = false; - p = rPhrase.GetBuffer(); - pEnd = p + rPhrase.Len(); - for (;p != pEnd; ++p) - if (!(INetMIME::isAtomChar(*p))) - { - bQuotedString = true; - break; - } - String aTheMailbox; - if (bQuotedString) - { - aTheMailbox = '"'; - for (p = rPhrase.GetBuffer(); p != pEnd; ++p) - { - if (INetMIME::needsQuotedStringEscape(*p)) - aTheMailbox += '\\'; - aTheMailbox += *p; - } - aTheMailbox += '"'; - } - else - aTheMailbox = rPhrase; - aTheMailbox.AppendAscii(RTL_CONSTASCII_STRINGPARAM(" <")); - aTheMailbox += aTheAddrSpec; - aTheMailbox += '>'; - rMailbox = aTheMailbox; - } - return true; -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svl/source/misc/inethist.cxx b/svl/source/misc/inethist.cxx index eba1e4083d38..c52c03cf6cef 100644 --- a/svl/source/misc/inethist.cxx +++ b/svl/source/misc/inethist.cxx @@ -156,9 +156,6 @@ class INetURLHistory_Impl */ void initialize (void); - void downheap (hash_entry a[], sal_uInt16 n, sal_uInt16 k); - void heapsort (hash_entry a[], sal_uInt16 n); - /** capacity. */ sal_uInt16 capacity (void) const @@ -258,42 +255,6 @@ void INetURLHistory_Impl::initialize (void) } /* - * downheap. - */ -void INetURLHistory_Impl::downheap (hash_entry a[], sal_uInt16 n, sal_uInt16 k) -{ - hash_entry h = a[k]; - while (k < n / 2) - { - sal_uInt16 i = k + k + 1; - if (((i + 1) < n) && (a[i] < a[i + 1])) i++; - if (!(h < a[i])) break; - a[k] = a[i]; - k = i; - } - a[k] = h; -} - -/* - * heapsort. - */ -void INetURLHistory_Impl::heapsort (hash_entry a[], sal_uInt16 n) -{ - hash_entry h; - - for (sal_uInt16 k = (n - 1) / 2 + 1; k > 0; k--) - downheap (a, n, k - 1); - - while (n > 0) - { - h = a[0 ]; - a[0 ] = a[n - 1]; - a[n - 1] = h; - downheap (a, --n, 0); - } -} - -/* * find. */ sal_uInt16 INetURLHistory_Impl::find (sal_uInt32 nHash) const diff --git a/svl/source/misc/inettype.cxx b/svl/source/misc/inettype.cxx index cb16349ab487..6234bc0dbe02 100644 --- a/svl/source/misc/inettype.cxx +++ b/svl/source/misc/inettype.cxx @@ -116,8 +116,6 @@ public: static UniString GetPresentation(INetContentType eTypeID); - static UniString GetExtension(const UniString & rTypeName); - static INetContentType GetContentType4Extension(UniString const & rExtension); @@ -768,24 +766,6 @@ UniString Registration::GetPresentation(INetContentType eTypeID) //============================================================================ // static -UniString Registration::GetExtension(UniString const & rTypeName) -{ - if (!m_pRegistration) - m_pRegistration = new Registration; - - UniString aTheTypeName = rTypeName; - aTheTypeName.ToLowerAscii(); - sal_uInt16 nPos; - return m_pRegistration->m_aTypeNameMap.Seek_Entry(&aTheTypeName, &nPos) ? - static_cast< TypeNameMapEntry * >(m_pRegistration-> - m_aTypeNameMap. - GetObject(nPos))-> - m_aExtension : - UniString(); -} - -//============================================================================ -// static INetContentType Registration::GetContentType4Extension(UniString const & rExtension) { @@ -848,19 +828,6 @@ MediaTypeEntry const * seekEntry(UniString const & rTypeName, } -//============================================================================ -// -// INetContentTypes -// -//============================================================================ - -//static -void INetContentTypes::Uninitialize() -{ - Registration::deinitialize(); -} - -//============================================================================ //static INetContentType INetContentTypes::RegisterContentType(UniString const & rTypeName, @@ -970,25 +937,6 @@ UniString INetContentTypes::GetPresentation(INetContentType eTypeID, //============================================================================ //static -UniString INetContentTypes::GetExtension(UniString const & rTypeName) -{ - MediaTypeEntry const * pEntry = seekEntry(rTypeName, aStaticTypeNameMap, - CONTENT_TYPE_LAST + 1); - if (pEntry) - return UniString::CreateFromAscii(pEntry->m_pExtension); - - UniString aExtension = Registration::GetExtension(rTypeName); - if (aExtension.Len() != 0) - return aExtension; - // special handling of text types, which come in uncounted variations: - return rTypeName.EqualsIgnoreCaseAscii("text", 0, - RTL_CONSTASCII_LENGTH("text")) ? - UniString::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("txt")) : - UniString::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("tmp")); -} - -//============================================================================ -//static INetContentType INetContentTypes::GetContentType4Extension(UniString const & rExtension) { @@ -1136,63 +1084,6 @@ bool INetContentTypes::GetExtensionFromURL(UniString const & rURL, } //============================================================================ -//static -INetContentType INetContentTypes::MapStringToContentType(UniString const & - rPresentation) -{ - MediaTypeEntry const * pEntry = seekEntry(rPresentation, - aStaticPresentationMap, - sizeof aStaticPresentationMap - / sizeof (MediaTypeEntry)); - return pEntry ? pEntry->m_eTypeID : CONTENT_TYPE_UNKNOWN; -} - -//============================================================================ -// static -bool INetContentTypes::parse(ByteString const & rMediaType, - ByteString & rType, ByteString & rSubType, - INetContentTypeParameterList * pParameters) -{ - sal_Char const * p = rMediaType.GetBuffer(); - sal_Char const * pEnd = p + rMediaType.Len(); - - p = INetMIME::skipLinearWhiteSpaceComment(p, pEnd); - sal_Char const * pToken = p; - bool bDowncase = false; - while (p != pEnd && INetMIME::isTokenChar(*p)) - { - bDowncase = bDowncase || INetMIME::isUpperCase(*p); - ++p; - } - if (p == pToken) - return false; - rType = ByteString(pToken, sal::static_int_cast< xub_StrLen >(p - pToken)); - if (bDowncase) - rType.ToLowerAscii(); - - p = INetMIME::skipLinearWhiteSpaceComment(p, pEnd); - if (p == pEnd || *p++ != '/') - return false; - - p = INetMIME::skipLinearWhiteSpaceComment(p, pEnd); - pToken = p; - bDowncase = false; - while (p != pEnd && INetMIME::isTokenChar(*p)) - { - bDowncase = bDowncase || INetMIME::isUpperCase(*p); - ++p; - } - if (p == pToken) - return false; - rSubType = ByteString( - pToken, sal::static_int_cast< xub_StrLen >(p - pToken)); - if (bDowncase) - rSubType.ToLowerAscii(); - - return INetMIME::scanParameters(p, pEnd, pParameters) == pEnd; -} - -//============================================================================ // static bool INetContentTypes::parse(UniString const & rMediaType, UniString & rType, UniString & rSubType, @@ -1237,116 +1128,4 @@ bool INetContentTypes::parse(UniString const & rMediaType, return INetMIME::scanParameters(p, pEnd, pParameters) == pEnd; } -//============================================================================ -// static -ByteString INetContentTypes::appendUSASCIIParameter(ByteString const & - rMediaType, - ByteString const & - rAttribute, - ByteString const & rValue) -{ - ByteString aResult = rMediaType; - aResult.Append(RTL_CONSTASCII_STRINGPARAM("; ")); - aResult += rAttribute; - aResult += '='; - bool bQuote = false; - for (xub_StrLen i = 0; i < rValue.Len(); ++i) - { - // When the value contains any ' characters, use a quoted string - // instead of a token, in order to avoid confusion with RFC 2231 - // extensions: - sal_uInt32 nChar = sal_uChar(rValue.GetChar(i)); - DBG_ASSERT(INetMIME::isUSASCII(nChar), - "INetContentTypes::appendUSASCIIParameter(): Bad value"); - if (!INetMIME::isTokenChar(nChar) || nChar == '\'') - { - bQuote = true; - break; - } - } - if (bQuote) - { - aResult += '"'; - for (xub_StrLen i = 0; i < rValue.Len(); ++i) - { - // Escape LF as well as CR to avoid confusion with line folding: - sal_uInt32 nChar = sal_uChar(rValue.GetChar(i)); - DBG_ASSERT(INetMIME::isUSASCII(nChar), - "INetContentTypes::appendUSASCIIParameter():" - " Bad value"); - switch (nChar) - { - case 0x0A: // LF - case 0x0D: // CR - case '"': - case '\\': - aResult += '\\'; - default: - aResult += static_cast< char >(nChar); - break; - } - } - aResult += '"'; - } - else - aResult += rValue; - return aResult; -} - -//============================================================================ -// static -UniString INetContentTypes::appendUSASCIIParameter(UniString const & - rMediaType, - UniString const & - rAttribute, - UniString const & rValue) -{ - UniString aResult = rMediaType; - aResult.AppendAscii(RTL_CONSTASCII_STRINGPARAM("; ")); - aResult += rAttribute; - aResult += '='; - bool bQuote = false; - for (xub_StrLen i = 0; i < rValue.Len(); ++i) - { - // When the value contains any ' characters, use a quoted string - // instead of a token, in order to avoid confusion with RFC 2231 - // extensions: - sal_uInt32 nChar = rValue.GetChar(i); - DBG_ASSERT(INetMIME::isUSASCII(nChar), - "INetContentTypes::appendUSASCIIParameter(): Bad value"); - if (!INetMIME::isTokenChar(nChar) || nChar == '\'') - { - bQuote = true; - break; - } - } - if (bQuote) - { - aResult += '"'; - for (xub_StrLen i = 0; i < rValue.Len(); ++i) - { - // Escape LF as well as CR to avoid confusion with line folding: - sal_uInt32 nChar = rValue.GetChar(i); - DBG_ASSERT(INetMIME::isUSASCII(nChar), - "INetContentTypes::appendUSASCIIParameter():" - " Bad value"); - switch (nChar) - { - case 0x0A: // LF - case 0x0D: // CR - case '"': - case '\\': - aResult += '\\'; - default: - aResult += sal_Unicode(nChar); - break; - } - } - aResult += '"'; - } - else - aResult += rValue; - return aResult; -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svl/source/misc/ownlist.cxx b/svl/source/misc/ownlist.cxx index 0e3fae02ff8e..bb018ba85782 100644 --- a/svl/source/misc/ownlist.cxx +++ b/svl/source/misc/ownlist.cxx @@ -166,64 +166,6 @@ SvCommand & SvCommandList::Append return aCommandList.back(); } -//========================================================================= -SvStream & operator >> -( - SvStream & rStm, /* Stream aus dem gelesen wird */ - SvCommandList & rThis /* Die zu f"ullende Liste */ -) -/* [Beschreibung] - - Die Liste mit ihren Elementen wird gelesen. Das Format ist: - 1. Anzahl der Elemente - 2. Alle Elemente - - [R"uckgabewert] - - SvStream & Der "ubergebene Stream. -*/ -{ - sal_uInt32 nCount = 0; - rStm >> nCount; - if( !rStm.GetError() ) - { - while( nCount-- ) - { - SvCommand aCmd; - rStm >> aCmd; - rThis.aCommandList.push_back( aCmd ); - } - } - return rStm; -} - -//========================================================================= -SvStream & operator << -( - SvStream & rStm, /* Stream in den geschrieben wird */ - const SvCommandList & rThis /* Die zu schreibende Liste */ -) -/* [Beschreibung] - - Die Liste mit ihren Elementen wir geschrieben. Das Format ist: - 1. Anzahl der Elemente - 2. Alle Elemente - - [R"uckgabewert] - - SvStream & Der "ubergebene Stream. -*/ -{ - sal_uInt32 nCount = rThis.aCommandList.size(); - rStm << nCount; - - for( sal_uInt32 i = 0; i < nCount; i++ ) - { - rStm << rThis.aCommandList[ i ]; - } - return rStm; -} - sal_Bool SvCommandList::FillFromSequence( const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& aCommandSequence ) { const sal_Int32 nCount = aCommandSequence.getLength(); diff --git a/svl/source/misc/strmadpt.cxx b/svl/source/misc/strmadpt.cxx index d7905f470290..79adbb551d02 100644 --- a/svl/source/misc/strmadpt.cxx +++ b/svl/source/misc/strmadpt.cxx @@ -178,7 +178,7 @@ ErrCode SvOutputStreamOpenLockBytes::Flush() const { m_xOutputStream->flush(); } - catch (io::IOException) + catch (const io::IOException&) { return ERRCODE_IO_CANTWRITE; } @@ -223,7 +223,7 @@ ErrCode SvOutputStreamOpenLockBytes::FillAppend(void const * pBuffer, writeBytes(uno::Sequence< sal_Int8 >( static_cast< sal_Int8 const * >(pBuffer), nCount)); } - catch (io::IOException) + catch (const io::IOException&) { return ERRCODE_IO_CANTWRITE; } @@ -252,11 +252,15 @@ sal_uLong SvOutputStreamOpenLockBytes::Seek(sal_uLong) void SvOutputStreamOpenLockBytes::Terminate() { if (m_xOutputStream.is()) + { try { m_xOutputStream->closeOutput(); } - catch (io::IOException) {} + catch (const io::IOException&) + { + } + } } //============================================================================ @@ -492,7 +496,7 @@ sal_uLong SvInputStream::GetData(void * pData, sal_uLong nSize) { m_xSeekable->seek(m_nSeekedFrom); } - catch (io::IOException) + catch (const io::IOException&) { SetError(ERRCODE_IO_CANTREAD); return 0; @@ -513,7 +517,7 @@ sal_uLong SvInputStream::GetData(void * pData, sal_uLong nSize) { nCount = m_xStream->readBytes(aBuffer, nRemain); } - catch (io::IOException) + catch (const io::IOException&) { SetError(ERRCODE_IO_CANTREAD); return nRead; @@ -550,7 +554,7 @@ sal_uLong SvInputStream::GetData(void * pData, sal_uLong nSize) { nCount = m_xStream->readBytes(aBuffer, nRemain); } - catch (io::IOException) + catch (const io::IOException&) { SetError(ERRCODE_IO_CANTREAD); break; @@ -604,7 +608,9 @@ sal_uLong SvInputStream::SeekPos(sal_uLong nPos) return sal_uLong(nLength); } } - catch (io::IOException) {} + catch (const io::IOException&) + { + } else return Tell(); //@@@ } @@ -617,13 +623,17 @@ sal_uLong SvInputStream::SeekPos(sal_uLong nPos) return nPos; } else if (m_xSeekable.is()) + { try { m_xSeekable->seek(nPos); m_nSeekedFrom = STREAM_SEEK_TO_END; return nPos; } - catch (io::IOException) {} + catch (const io::IOException&) + { + } + } else if (m_pPipe->setReadPosition(nPos) == SvDataPipe_Impl::SEEK_OK) { m_nSeekedFrom = STREAM_SEEK_TO_END; @@ -658,11 +668,15 @@ SvInputStream::SvInputStream( SvInputStream::~SvInputStream() { if (m_xStream.is()) + { try { m_xStream->closeInput(); } - catch (io::IOException) {} + catch (const io::IOException&) + { + } + } delete m_pPipe; } @@ -727,7 +741,7 @@ sal_uLong SvOutputStream::PutData(void const * pData, sal_uLong nSize) + nWritten, nRemain)); } - catch (io::IOException) + catch (const io::IOException&) { SetError(ERRCODE_IO_CANTWRITE); break; @@ -758,7 +772,9 @@ void SvOutputStream::FlushData() { m_xStream->flush(); } - catch (io::IOException) {} + catch (const io::IOException&) + { + } } //============================================================================ @@ -781,11 +797,15 @@ SvOutputStream::SvOutputStream(uno::Reference< io::XOutputStream > const & SvOutputStream::~SvOutputStream() { if (m_xStream.is()) + { try { m_xStream->closeOutput(); } - catch (io::IOException) {} + catch (const io::IOException&) + { + } + } } //============================================================================ diff --git a/svl/source/misc/urihelper.cxx b/svl/source/misc/urihelper.cxx index ac70f8a6e467..1bef290f3dfd 100644 --- a/svl/source/misc/urihelper.cxx +++ b/svl/source/misc/urihelper.cxx @@ -65,10 +65,6 @@ #include <unotools/charclass.hxx> #include "rtl/instance.hxx" -namespace unnamed_svl_urihelper {} -using namespace unnamed_svl_urihelper; - // unnamed namespaces don't work well yet... - namespace css = com::sun::star; using namespace com::sun::star; @@ -78,7 +74,7 @@ using namespace com::sun::star; // //============================================================================ -namespace unnamed_svl_urihelper { +namespace { inline UniString toUniString(ByteString const & rString) { @@ -152,24 +148,6 @@ inline UniString SmartRel2Abs_Impl(INetURLObject const & rTheBaseURIRef, UniString URIHelper::SmartRel2Abs(INetURLObject const & rTheBaseURIRef, - ByteString const & rTheRelURIRef, - Link const & rMaybeFileHdl, - bool bCheckFileExists, - bool bIgnoreFragment, - INetURLObject::EncodeMechanism eEncodeMechanism, - INetURLObject::DecodeMechanism eDecodeMechanism, - rtl_TextEncoding eCharset, - bool bRelativeNonURIs, - INetURLObject::FSysStyle eStyle) -{ - return SmartRel2Abs_Impl(rTheBaseURIRef, rTheRelURIRef, rMaybeFileHdl, - bCheckFileExists, bIgnoreFragment, - eEncodeMechanism, eDecodeMechanism, eCharset, - bRelativeNonURIs, eStyle); -} - -UniString -URIHelper::SmartRel2Abs(INetURLObject const & rTheBaseURIRef, UniString const & rTheRelURIRef, Link const & rMaybeFileHdl, bool bCheckFileExists, @@ -422,7 +400,7 @@ rtl::OUString URIHelper::simpleNormalizedMakeRelative( // //============================================================================ -namespace unnamed_svl_urihelper { +namespace { inline xub_StrLen nextChar(UniString const & rStr, xub_StrLen nPos) { @@ -887,65 +865,4 @@ URIHelper::removePassword(UniString const & rURI, String(aObj.GetURLNoPass(eDecodeMechanism, eCharset)); } -//============================================================================ -// -// queryFSysStyle -// -//============================================================================ - -INetURLObject::FSysStyle URIHelper::queryFSysStyle(UniString const & rFileUrl, - bool bAddConvenienceStyles) - throw (uno::RuntimeException) -{ - ::ucbhelper::ContentBroker const * pBroker = ::ucbhelper::ContentBroker::get(); - uno::Reference< ucb::XContentProviderManager > xManager; - if (pBroker) - xManager = pBroker->getContentProviderManagerInterface(); - uno::Reference< beans::XPropertySet > xProperties; - if (xManager.is()) - xProperties - = uno::Reference< beans::XPropertySet >( - xManager->queryContentProvider(rFileUrl), uno::UNO_QUERY); - sal_Int32 nNotation = ucb::FileSystemNotation::UNKNOWN_NOTATION; - if (xProperties.is()) - try - { - xProperties->getPropertyValue(rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "FileSystemNotation"))) - >>= nNotation; - } - catch (beans::UnknownPropertyException const &) {} - catch (lang::WrappedTargetException const &) {} - - // The following code depends on the fact that the - // com::sun::star::ucb::FileSystemNotation constants range from UNKNOWN to - // MAC, without any holes. The table below has two entries per notation, - // the first is used if bAddConvenienceStyles == false, while the second - // is used if bAddConvenienceStyles == true: - static INetURLObject::FSysStyle const aMap[][2] - = { { INetURLObject::FSysStyle(0), - INetURLObject::FSYS_DETECT }, - // UNKNOWN - { INetURLObject::FSYS_UNX, - INetURLObject::FSysStyle(INetURLObject::FSYS_VOS - | INetURLObject::FSYS_UNX) }, - // UNIX - { INetURLObject::FSYS_DOS, - INetURLObject::FSysStyle(INetURLObject::FSYS_VOS - | INetURLObject::FSYS_UNX - | INetURLObject::FSYS_DOS) }, - // DOS - { INetURLObject::FSYS_MAC, - INetURLObject::FSysStyle(INetURLObject::FSYS_VOS - | INetURLObject::FSYS_UNX - | INetURLObject::FSYS_MAC) } }; - return aMap[nNotation < ucb::FileSystemNotation::UNKNOWN_NOTATION - || nNotation > ucb::FileSystemNotation::MAC_NOTATION ? - 0 : - nNotation - - ucb::FileSystemNotation::UNKNOWN_NOTATION] - [bAddConvenienceStyles]; -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index ffdb583261f7..8ff4867274c0 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -57,6 +57,7 @@ #include <unotools/digitgroupingiterator.hxx> #include <rtl/logfile.hxx> #include <rtl/instance.hxx> +#include <rtl/strbuf.hxx> #include <math.h> #include <limits> @@ -99,26 +100,28 @@ static sal_uInt32 theIndexTable[NF_INDEX_TABLE_ENTRIES]; also handles one instance of the SysLocale options */ +typedef ::std::vector< SvNumberFormatter* > SvNumberFormatterList_impl; + class SvNumberFormatterRegistry_Impl : public utl::ConfigurationListener { - List aFormatters; - SvtSysLocaleOptions aSysLocaleOptions; - LanguageType eSysLanguage; + SvNumberFormatterList_impl aFormatters; + SvtSysLocaleOptions aSysLocaleOptions; + LanguageType eSysLanguage; public: SvNumberFormatterRegistry_Impl(); virtual ~SvNumberFormatterRegistry_Impl(); - void Insert( SvNumberFormatter* pThis ) - { aFormatters.Insert( pThis, LIST_APPEND ); } - SvNumberFormatter* Remove( SvNumberFormatter* pThis ) - { return (SvNumberFormatter*)aFormatters.Remove( pThis ); } - sal_uInt32 Count() - { return aFormatters.Count(); } + void Insert( SvNumberFormatter* pThis ) + { aFormatters.push_back( pThis ); } - virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 ); -}; + SvNumberFormatter* Remove( SvNumberFormatter* pThis ); + size_t Count() + { return aFormatters.size(); } + + virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 ); +}; SvNumberFormatterRegistry_Impl::SvNumberFormatterRegistry_Impl() { @@ -133,26 +136,37 @@ SvNumberFormatterRegistry_Impl::~SvNumberFormatterRegistry_Impl() } -void SvNumberFormatterRegistry_Impl::ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 nHint ) +SvNumberFormatter* SvNumberFormatterRegistry_Impl::Remove( SvNumberFormatter* pThis ) { + for( + SvNumberFormatterList_impl::iterator it = aFormatters.begin(); + it < aFormatters.end(); + ++it + ) { + if ( *it == pThis ) { + aFormatters.erase( it ); + break; + } + } + return pThis; +} + +void SvNumberFormatterRegistry_Impl::ConfigurationChanged( + utl::ConfigurationBroadcaster*, + sal_uInt32 nHint +) { if ( nHint & SYSLOCALEOPTIONS_HINT_LOCALE ) { ::osl::MutexGuard aGuard( SvNumberFormatter::GetMutex() ); - for ( SvNumberFormatter* p = (SvNumberFormatter*)aFormatters.First(); - p; p = (SvNumberFormatter*)aFormatters.Next() ) - { - p->ReplaceSystemCL( eSysLanguage ); - } + for( size_t i = 0, n = aFormatters.size(); i < n; ++i ) + aFormatters[ i ]->ReplaceSystemCL( eSysLanguage ); eSysLanguage = MsLangId::getRealLanguage( LANGUAGE_SYSTEM ); } if ( nHint & SYSLOCALEOPTIONS_HINT_CURRENCY ) { ::osl::MutexGuard aGuard( SvNumberFormatter::GetMutex() ); - for ( SvNumberFormatter* p = (SvNumberFormatter*)aFormatters.First(); - p; p = (SvNumberFormatter*)aFormatters.Next() ) - { - p->ResetDefaultSystemCurrency(); - } + for( size_t i = 0, n = aFormatters.size(); i < n; ++i ) + aFormatters[ i ]->ResetDefaultSystemCurrency(); } } @@ -2091,8 +2105,9 @@ sal_Int32 SvNumberFormatter::ImpAdjustFormatCodeDefault( if ( !nCnt ) return -1; if (bCheckCorrectness && LocaleDataWrapper::areChecksEnabled()) - { // check the locale data for correctness - ByteString aMsg; + { + // check the locale data for correctness + rtl::OStringBuffer aMsg; sal_Int32 nElem, nShort, nMedium, nLong, nShortDef, nMediumDef, nLongDef; nShort = nMedium = nLong = nShortDef = nMediumDef = nLongDef = -1; for ( nElem = 0; nElem < nCnt; nElem++ ) @@ -2109,7 +2124,7 @@ sal_Int32 SvNumberFormatter::ImpAdjustFormatCodeDefault( nLong = nElem; break; default: - aMsg = "unknown type"; + aMsg.append(RTL_CONSTASCII_STRINGPARAM("unknown type")); } if ( pFormatArr[nElem].Default ) { @@ -2117,47 +2132,44 @@ sal_Int32 SvNumberFormatter::ImpAdjustFormatCodeDefault( { case i18n::KNumberFormatType::SHORT : if ( nShortDef != -1 ) - aMsg = "dupe short type default"; + aMsg.append(RTL_CONSTASCII_STRINGPARAM("dupe short type default")); nShortDef = nElem; break; case i18n::KNumberFormatType::MEDIUM : if ( nMediumDef != -1 ) - aMsg = "dupe medium type default"; + aMsg.append(RTL_CONSTASCII_STRINGPARAM("dupe medium type default")); nMediumDef = nElem; break; case i18n::KNumberFormatType::LONG : if ( nLongDef != -1 ) - aMsg = "dupe long type default"; + aMsg.append(RTL_CONSTASCII_STRINGPARAM("dupe long type default")); nLongDef = nElem; break; } } - if ( aMsg.Len() ) + if (aMsg.getLength()) { - aMsg.Insert( "SvNumberFormatter::ImpAdjustFormatCodeDefault: ", 0 ); - aMsg += "\nXML locale data FormatElement formatindex: "; - aMsg += ByteString::CreateFromInt32( pFormatArr[nElem].Index ); - String aUMsg( aMsg, RTL_TEXTENCODING_ASCII_US); - LocaleDataWrapper::outputCheckMessage( - xLocaleData->appendLocaleInfo( aUMsg)); - aMsg.Erase(); + aMsg.insert(0, RTL_CONSTASCII_STRINGPARAM("SvNumberFormatter::ImpAdjustFormatCodeDefault: ")); + aMsg.append(RTL_CONSTASCII_STRINGPARAM("\nXML locale data FormatElement formatindex: ")); + aMsg.append(static_cast<sal_Int32>(pFormatArr[nElem].Index)); + rtl::OUString aUMsg(rtl::OStringToOUString(aMsg.makeStringAndClear(), + RTL_TEXTENCODING_ASCII_US)); + LocaleDataWrapper::outputCheckMessage(xLocaleData->appendLocaleInfo(aUMsg)); } } if ( nShort != -1 && nShortDef == -1 ) - aMsg += "no short type default "; + aMsg.append(RTL_CONSTASCII_STRINGPARAM("no short type default ")); if ( nMedium != -1 && nMediumDef == -1 ) - aMsg += "no medium type default "; + aMsg.append(RTL_CONSTASCII_STRINGPARAM("no medium type default ")); if ( nLong != -1 && nLongDef == -1 ) - aMsg += "no long type default "; - if ( aMsg.Len() ) + aMsg.append(RTL_CONSTASCII_STRINGPARAM("no long type default ")); + if (aMsg.getLength()) { - aMsg.Insert( "SvNumberFormatter::ImpAdjustFormatCodeDefault: ", 0 ); - aMsg += "\nXML locale data FormatElement group of: "; - String aUMsg( aMsg, RTL_TEXTENCODING_ASCII_US); - aUMsg += String( pFormatArr[0].NameID ); + aMsg.insert(0, RTL_CONSTASCII_STRINGPARAM("SvNumberFormatter::ImpAdjustFormatCodeDefault: ")); + aMsg.append(RTL_CONSTASCII_STRINGPARAM("\nXML locale data FormatElement group of: ")); + rtl::OUString aUMsg(rtl::OStringToOUString(aMsg.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US)); LocaleDataWrapper::outputCheckMessage( - xLocaleData->appendLocaleInfo( aUMsg)); - aMsg.Erase(); + xLocaleData->appendLocaleInfo(aUMsg + pFormatArr[0].NameID)); } } // find the default (medium preferred, then long) and reset all other defaults @@ -2749,7 +2761,6 @@ void SvNumberFormatter::GenerateFormat(String& sString, const String& rThSep = GetNumThousandSep(); SvNumberformat* pFormat = (SvNumberformat*) aFTable.Get(nIndex); - sal_Bool insertBrackets = pFormat->IsNegativeInBracket(); if (nAnzLeading == 0) { @@ -2843,36 +2854,42 @@ void SvNumberFormatter::GenerateFormat(String& sString, sString += ';'; sString += sNegStr; } - if ( (IsRed || insertBrackets ) && eType != NUMBERFORMAT_CURRENCY) + if (eType != NUMBERFORMAT_CURRENCY) { - String sTmpStr = sString; - - if ( pFormat->HasPositiveBracketPlaceholder() ) + bool insertBrackets = false; + if ( eType != NUMBERFORMAT_UNDEFINED) + insertBrackets = pFormat->IsNegativeInBracket(); + if (IsRed || insertBrackets) { - sTmpStr += '_'; - sTmpStr += ')'; - } - sTmpStr += ';'; + String sTmpStr = sString; - if (IsRed) - { - sTmpStr += '['; - sTmpStr += pFormatScanner->GetRedString(); - sTmpStr += ']'; - } + if ( pFormat->HasPositiveBracketPlaceholder() ) + { + sTmpStr += '_'; + sTmpStr += ')'; + } + sTmpStr += ';'; - if (insertBrackets) - { - sTmpStr += '('; - sTmpStr += sString; - sTmpStr += ')'; - } - else - { - sTmpStr += '-'; - sTmpStr +=sString; - } - sString = sTmpStr; + if (IsRed) + { + sTmpStr += '['; + sTmpStr += pFormatScanner->GetRedString(); + sTmpStr += ']'; + } + + if (insertBrackets) + { + sTmpStr += '('; + sTmpStr += sString; + sTmpStr += ')'; + } + else + { + sTmpStr += '-'; + sTmpStr +=sString; + } + sString = sTmpStr; + } } } @@ -3533,21 +3550,12 @@ void SvNumberFormatter::GetCompatibilityCurrency( String& rSymbol, String& rAbbr void lcl_CheckCurrencySymbolPosition( const NfCurrencyEntry& rCurr ) { - short nPos = -1; // -1:=unknown, 0:=vorne, 1:=hinten - short nNeg = -1; switch ( rCurr.GetPositiveFormat() ) { case 0: // $1 - nPos = 0; - break; case 1: // 1$ - nPos = 1; - break; case 2: // $ 1 - nPos = 0; - break; case 3: // 1 $ - nPos = 1; break; default: LocaleDataWrapper::outputCheckMessage( @@ -3557,75 +3565,27 @@ void lcl_CheckCurrencySymbolPosition( const NfCurrencyEntry& rCurr ) switch ( rCurr.GetNegativeFormat() ) { case 0: // ($1) - nNeg = 0; - break; case 1: // -$1 - nNeg = 0; - break; case 2: // $-1 - nNeg = 0; - break; case 3: // $1- - nNeg = 0; - break; case 4: // (1$) - nNeg = 1; - break; case 5: // -1$ - nNeg = 1; - break; case 6: // 1-$ - nNeg = 1; - break; case 7: // 1$- - nNeg = 1; - break; case 8: // -1 $ - nNeg = 1; - break; case 9: // -$ 1 - nNeg = 0; - break; case 10: // 1 $- - nNeg = 1; - break; case 11: // $ -1 - nNeg = 0; - break; case 12 : // $ 1- - nNeg = 0; - break; case 13 : // 1- $ - nNeg = 1; - break; case 14 : // ($ 1) - nNeg = 0; - break; case 15 : // (1 $) - nNeg = 1; break; default: LocaleDataWrapper::outputCheckMessage( "lcl_CheckCurrencySymbolPosition: unknown NegativeFormat"); break; } - if ( nPos >= 0 && nNeg >= 0 && nPos != nNeg ) - { - ByteString aStr( "positions of currency symbols differ\nLanguage: " ); - aStr += ByteString::CreateFromInt32( rCurr.GetLanguage() ); - aStr += " <"; - aStr += ByteString( rCurr.GetSymbol(), RTL_TEXTENCODING_UTF8 ); - aStr += "> positive: "; - aStr += ByteString::CreateFromInt32( rCurr.GetPositiveFormat() ); - aStr += ( nPos ? " (postfix)" : " (prefix)" ); - aStr += ", negative: "; - aStr += ByteString::CreateFromInt32( rCurr.GetNegativeFormat() ); - aStr += ( nNeg ? " (postfix)" : " (prefix)" ); -#if 0 -// seems that there really are some currencies which differ, e.g. YugoDinar - DBG_ERRORFILE( aStr.GetBuffer() ); -#endif - } } diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index 00ebf41a3dd7..cfc916993885 100644 --- a/svl/source/numbers/zformat.cxx +++ b/svl/source/numbers/zformat.cxx @@ -2007,15 +2007,7 @@ sal_Bool SvNumberformat::GetOutputString(String& sString, } return sal_False; } -/* -void SvNumberformat::GetNextFareyNumber(sal_uLong nPrec, sal_uLong x0, sal_uLong x1, - sal_uLong y0, sal_uLong y1, - sal_uLong& x2,sal_uLong& y2) -{ - x2 = ((y0+nPrec)/y1)*x1 - x0; - y2 = ((y0+nPrec)/y1)*y1 - y0; -} -*/ + sal_uLong SvNumberformat::ImpGGT(sal_uLong x, sal_uLong y) { if (y == 0) @@ -2417,7 +2409,6 @@ sal_Bool SvNumberformat::GetOutputString(double fNumber, { sal_uLong x2 = ((y0+nBasis)/y1)*x1 - x0; // naechste Farey-Zahl sal_uLong y2 = ((y0+nBasis)/y1)*y1 - y0; -// GetNextFareyNumber(nBasis, x0, x1, y0, y1, x2, y2); x0 = x1; y0 = y1; x1 = x2; @@ -2446,11 +2437,6 @@ sal_Bool SvNumberformat::GetOutputString(double fNumber, else // grosse Nenner { // 0,1234->123/1000 sal_uLong nGgt; -/* - nDiv = nBasis+1; - nFrac = ((sal_uLong)floor(0.5 + fNumber * - pow(10.0,rInfo.nCntExp))); -*/ nDiv = 10000000; nFrac = ((sal_uLong)floor(0.5 + fNumber * 10000000.0)); nGgt = ImpGGT(nDiv, nFrac); @@ -4421,7 +4407,6 @@ String SvNumberformat::GetMappedFormatstring( case NF_SYMBOLTYPE_CALDEL : if ( pStr[j+1].EqualsAscii("buddhist") ) { - //aStr.InsertAscii( "[$-", aStr.Len() ); aStr.InsertAscii( "[$-", 0 ); if ( rNum.IsSet() && rNum.GetNatNum() == 1 && MsLangId::getRealLanguage( rNum.GetLang() ) == diff --git a/svl/source/passwordcontainer/passwordcontainer.component b/svl/source/passwordcontainer/passwordcontainer.component index 42eb47cf14dd..3fc55af1861e 100644 --- a/svl/source/passwordcontainer/passwordcontainer.component +++ b/svl/source/passwordcontainer/passwordcontainer.component @@ -26,7 +26,7 @@ * **********************************************************************--> -<component loader="com.sun.star.loader.SharedLibrary" +<component loader="com.sun.star.loader.SharedLibrary" prefix="passwordcontainer" xmlns="http://openoffice.org/2010/uno-components"> <implementation name="stardiv.svl.PasswordContainer"> <service name="com.sun.star.task.PasswordContainer"/> diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx index 6e922ea29cd7..86c72fb3619b 100644 --- a/svl/source/passwordcontainer/passwordcontainer.cxx +++ b/svl/source/passwordcontainer/passwordcontainer.cxx @@ -1538,13 +1538,7 @@ MasterPasswordRequest_Impl::MasterPasswordRequest_Impl( PasswordRequestMode Mode extern "C" { -SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment ( - const sal_Char ** ppEnvTypeName, uno_Environment ** /* ppEnv */) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - -SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory ( +SAL_DLLPUBLIC_EXPORT void * SAL_CALL passwordcontainer_component_getFactory ( const sal_Char * pImplementationName, void * pServiceManager, void * /* pRegistryKey */) { void * pResult = 0; diff --git a/svl/source/svdde/ddesvr.cxx b/svl/source/svdde/ddesvr.cxx index 99b8cce0ae71..08894db00556 100644 --- a/svl/source/svdde/ddesvr.cxx +++ b/svl/source/svdde/ddesvr.cxx @@ -88,7 +88,6 @@ HDDEDATA CALLBACK _export DdeInternal::SvrCallback( { int nTopics = 0; -#if 1 TCHAR chTopicBuf[250]; if( hText1 ) DdeQueryString( pInst->hDdeInstSvr, hText1, chTopicBuf, @@ -117,20 +116,6 @@ HDDEDATA CALLBACK _export DdeInternal::SvrCallback( } } -#else - for( pService = rAll.First();pService;pService = rAll.Next() ) - { - if ( !hText2 || ( *pService->pName == hText2 ) ) - { - std::vector<DdeTopic*>::const_iterator iter; - for (iter = pService->aTopics.begin(); iter != pService->aTopics.end(); ++iter) - { - if ( !hText1 || iter->pName == hText1 ) - nTopics++; - } - } - } -#endif if( !nTopics ) return (HDDEDATA)NULL; @@ -143,18 +128,6 @@ HDDEDATA CALLBACK _export DdeInternal::SvrCallback( { if ( !hText2 || (*pService->pName == hText2 ) ) { -#if 0 - for ( pTopic = pService->aTopics.First(); pTopic; - pTopic = pService->aTopics.Next() ) - { - if ( !hText1 || (*pTopic->pName == hText1) ) - { - q->hszSvc = *pService->pName; - q->hszTopic = *pTopic->pName; - q++; - } - } -#else String sTopics( pService->Topics() ); sal_uInt16 n = 0; while( STRING_NOTFOUND != n ) @@ -173,8 +146,6 @@ HDDEDATA CALLBACK _export DdeInternal::SvrCallback( } } } - -#endif } } diff --git a/svl/source/uno/registerservices.cxx b/svl/source/uno/registerservices.cxx index 5caca580694f..d001c73da633 100644 --- a/svl/source/uno/registerservices.cxx +++ b/svl/source/uno/registerservices.cxx @@ -55,13 +55,7 @@ DECLARE_CREATEINSTANCE( PathService ) extern "C" { -SVL_DLLPUBLIC void SAL_CALL component_getImplementationEnvironment ( - const sal_Char ** ppEnvTypeName, uno_Environment ** /* ppEnv */) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - -SVL_DLLPUBLIC void* SAL_CALL component_getFactory ( +SVL_DLLPUBLIC void* SAL_CALL svl_component_getFactory ( const sal_Char * pImplementationName, void * _pServiceManager, void * /* _pRegistryKey*/) { void * pResult = 0; diff --git a/svl/util/svl.component b/svl/util/svl.component index 4af1a31f5782..78fc22928ac5 100644 --- a/svl/util/svl.component +++ b/svl/util/svl.component @@ -26,7 +26,7 @@ * **********************************************************************--> -<component loader="com.sun.star.loader.SharedLibrary" +<component loader="com.sun.star.loader.SharedLibrary" prefix="svl" xmlns="http://openoffice.org/2010/uno-components"> <implementation name="com.sun.star.comp.svl.PathService"> <service name="com.sun.star.config.SpecialConfigManager"/> |