diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-07-21 18:57:42 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-07-21 18:57:42 +0200 |
commit | 2e320e52a066e29bd6a0950e5519c17fe802d830 (patch) | |
tree | 720c036ff96aa265eba5c3d04b5732de9b339203 | |
parent | 25b0e3e84e32b8e9388c2bcf7bab29c58c681910 (diff) | |
parent | 745f015341cd241f08ed9b9bc7eb01789d62c330 (diff) |
Merge branch 'master' into feature/gnumake4feature/gnumake4
43 files changed, 14 insertions, 2013 deletions
diff --git a/autodoc/source/display/html/outfile.cxx b/autodoc/source/display/html/outfile.cxx index bf290e67..cab2ba01 100644 --- a/autodoc/source/display/html/outfile.cxx +++ b/autodoc/source/display/html/outfile.cxx @@ -365,12 +365,7 @@ HtmlDocuFile::WriteBody( csv::File & io_aFile ) if ( sCopyright.length() > 0 ) { aBodyData -#ifndef COMPATIBLE_NETSCAPE_47 - >> *new html::HorizontalLine - << new html::SizeAttr( "3" ); -#else << new xml::XmlCode("<hr size=\"3\">"); -#endif aBodyData >> *new html::Paragraph diff --git a/autodoc/source/mkinc/fullcpp.mk b/autodoc/source/mkinc/fullcpp.mk index c7519d81..00f08bda 100644 --- a/autodoc/source/mkinc/fullcpp.mk +++ b/autodoc/source/mkinc/fullcpp.mk @@ -32,7 +32,7 @@ # RTTI -.IF "$(GUI)"=="WNT" +.IF "$(COM)"=="MSC" CFLAGS+= -GR .ENDIF .IF "$(OS)"=="LINUX" || "$(OS)"=="FREEBSD" || "$(OS)"=="NETBSD" || \ diff --git a/cosv/inc/cosv/comfunc.hxx b/cosv/inc/cosv/comfunc.hxx index 8b7bb1c0..003f92e8 100644 --- a/cosv/inc/cosv/comfunc.hxx +++ b/cosv/inc/cosv/comfunc.hxx @@ -51,33 +51,6 @@ inline bool in_range(E low, E val, E high); // return low <= val < hi // string functions inline const char * valid_str(const char * str); inline bool no_str(const char * str); // return !str || !strlen(str) -intt count_chars(const char * str, char c); - - -// endian functions -template <class NUMTYPE> -void switch_endian( - NUMTYPE & o_rNumber, - const NUMTYPE & i_rNumber ); - -// Zeit-Typecasts -bool str2date(const char * str, int & out_day, int & out_month, int & out_year); -void date2str(String & out_Str, int day, int month, int year); -bool str2time(const char * str, int & out_hour, int & out_min, int & out_sec); -void time2str(String & out_Str, int hour, int min, int sec); - -class noncopyable -{ - protected: - noncopyable() {} - ~noncopyable() {} - private: - // Private to make copying impossible: - noncopyable(const noncopyable&); - noncopyable & operator=(const noncopyable&); -}; - - // IMPLEMENTATION @@ -96,33 +69,11 @@ valid_str(const char * str) { return str != 0 ? str : ""; } inline bool no_str(const char * str) { return str != 0 ? *str == '\0' : true; } - -template <class NUMTYPE> -void -switch_endian( NUMTYPE & o_rNumber, - const NUMTYPE & i_rNumber ) -{ - char * pFront = reinterpret_cast< char* >(&o_rNumber); - const char * pBack = reinterpret_cast< const char* >(&i_rNumber) + sizeof(NUMTYPE); - - for ( size_t p = 0; p < sizeof(NUMTYPE); --p ) - { - *pFront++ = *(--pBack); - } -} - - } // namespace csv - - - #define NON_COPYABLE(xy) \ private: xy(const xy &); xy & operator=(const xy &) - - - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cosv/inc/cosv/datetime.hxx b/cosv/inc/cosv/datetime.hxx deleted file mode 100644 index e68be1d6..00000000 --- a/cosv/inc/cosv/datetime.hxx +++ /dev/null @@ -1,86 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef CSV_DATETIME_HXX -#define CSV_DATETIME_HXX - - - -namespace csv -{ - - -class Date -{ - public: - Date(); - Date( - unsigned i_nDay, - unsigned i_nMonth, - unsigned i_nYear ); - - unsigned Day() const { return nData >> 24; } - unsigned Month() const { return (nData & 0x00FF0000) >> 16; } - unsigned Year() const { return nData & 0x0000FFFF; } - - static const Date & Null_(); - - private: - UINT32 nData; -}; - -class Time -{ - public: - Time(); - Time( - unsigned i_nHour, - unsigned i_nMinutes, - unsigned i_nSeconds = 0, - unsigned i_nSeconds100 = 0 ); - - unsigned Hour() const { return nData >> 24; } - unsigned Minutes() const { return (nData & 0x00FF0000) >> 16; } - unsigned Seconds() const { return (nData & 0x0000FF00) >> 8; } - unsigned Seconds100() const { return nData & 0x000000FF; } - - static const Time & Null_(); - - private: - UINT32 nData; -}; - - -} // namespace csv - - - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cosv/inc/cosv/dirchain.hxx b/cosv/inc/cosv/dirchain.hxx index d4954975..b40a7089 100644 --- a/cosv/inc/cosv/dirchain.hxx +++ b/cosv/inc/cosv/dirchain.hxx @@ -55,10 +55,6 @@ class DirectoryChain public: DirectoryChain(); DirectoryChain( - const char * i_sPath, - bool i_bPathIsAlwaysDir = false, - const char * i_sDelimiter = Delimiter() ); - DirectoryChain( const DirectoryChain & i_rDC ); ~DirectoryChain(); @@ -80,18 +76,11 @@ class DirectoryChain const char * i_sPath, bool i_bPathIsAlwaysDir = false, const char * i_sDelimiter = Delimiter() ); - void PushFront( - const String & i_sName ); - void PushFront( - const DirectoryChain & - i_sPath ); void PushBack( const String & i_sName ); void PushBack( const DirectoryChain & i_sPath ); - void PopFront( - uintt i_nCount = 1 ); void PopBack( uintt i_nCount = 1 ); @@ -107,9 +96,6 @@ class DirectoryChain const String & Back() const; void Get( - ostream & o_rPath, - const char * i_sDelimiter ) const; - void Get( bostream & o_rPath, const char * i_sDelimiter ) const; private: @@ -156,15 +142,6 @@ DirectoryChain::Back() const } // namespace ploc } // namespace csv - -inline csv::ostream & -operator<<( csv::ostream & o_rOut, - const csv::ploc::DirectoryChain & i_rSubPath ) -{ - i_rSubPath.Get(o_rOut, csv::ploc::Delimiter()); - return o_rOut; -} - inline csv::bostream & operator<<( csv::bostream & o_rOut, const csv::ploc::DirectoryChain & i_rSubPath ) @@ -173,10 +150,6 @@ operator<<( csv::bostream & o_rOut, return o_rOut; } - - #endif - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cosv/inc/cosv/file.hxx b/cosv/inc/cosv/file.hxx index a6dc4050..8729f9ce 100644 --- a/cosv/inc/cosv/file.hxx +++ b/cosv/inc/cosv/file.hxx @@ -58,8 +58,6 @@ class File : public bstream, public: // LIFECYCLE File( - uintt i_nMode = CFM_RW ); - File( const ::csv::ploc::Path & i_rLocation, uintt i_nMode = CFM_RW ); @@ -71,13 +69,6 @@ class File : public bstream, uintt in_nMode = CFM_RW ); virtual ~File(); - // OPERATIONS - bool Assign( - ploc::Path i_rLocation ); - bool Assign( - const char * i_sLocation ); - bool Assign( - const String & i_sLocation ); // INQUIRY uintt Mode() const; diff --git a/cosv/inc/cosv/mbstream.hxx b/cosv/inc/cosv/mbstream.hxx deleted file mode 100644 index e04ad6a7..00000000 --- a/cosv/inc/cosv/mbstream.hxx +++ /dev/null @@ -1,95 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef CSV_MBSTREAM_HXX -#define CSV_MBSTREAM_HXX - -// USED SERVICES - // BASE CLASSES -#include <cosv/bstream.hxx> - // COMPONENTS - // PARAMETERS - - -namespace csv -{ - -class mbstream : public bstream -{ - public: - // LIFECYCLE - mbstream( - uintt i_nSize); - ~mbstream(); - // OPERATIONS - void resize( - uintt i_nSize ); - // INQUIRY - uintt size() const; - const void * data() const; - - private: - // Interface bistream: - virtual uintt do_read( - void * out_pDest, - uintt i_nNrofBytes); - virtual bool inq_eod() const; - // Interface bostream: - virtual uintt do_write( - const void * i_pSrc, - uintt i_nNrofBytes); - // Interface bstream: - virtual uintt do_seek( - intt i_nDistance, - seek_dir i_eStartPoint = ::csv::beg ); - virtual uintt inq_position() const; - - // DYN - DYN char * dpOwnedMemorySpace; - uintt nSize; - uintt nCurPosition; -}; - - -// IMPLEMENTATION - -inline uintt -mbstream::size() const - { return nSize; } -inline const void * -mbstream::data() const - { return dpOwnedMemorySpace; } - - -} // namespace csv - - -#endif - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cosv/inc/cosv/ploc.hxx b/cosv/inc/cosv/ploc.hxx index e7514c8d..3f16c8b0 100644 --- a/cosv/inc/cosv/ploc.hxx +++ b/cosv/inc/cosv/ploc.hxx @@ -79,16 +79,12 @@ class Path const DirectoryChain & DirChain() const { return aPath; } const String & File() const { return sFile; } - const char * FileExtension() const; bool IsValid() const; bool IsDirectory() const { return sFile.length() == 0; } bool IsFile() const { return sFile.length() > 0; } /// Directories have a delimiter at the end, files not. void Get( - ostream & o_rPath ) const; - /// Directories have a delimiter at the end, files not. - void Get( bostream & o_rPath ) const; // ACCESS DirectoryChain & DirChain() { return aPath; } @@ -105,17 +101,6 @@ class Path } // namespace ploc } // namespace csv - - -/// Directories produce a delimiter at the end, files not. -inline csv::ostream & -operator<<( csv::ostream & o_rOut, - const csv::ploc::Path & i_rPath ) -{ - i_rPath.Get(o_rOut); - return o_rOut; -} - /// Directories produce a delimiter at the end, files not. inline csv::bostream & operator<<( csv::bostream & o_rOut, @@ -125,8 +110,6 @@ operator<<( csv::bostream & o_rOut, return o_rOut; } - - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cosv/inc/cosv/ploc_dir.hxx b/cosv/inc/cosv/ploc_dir.hxx index 9b12b45c..a4d5eb5d 100644 --- a/cosv/inc/cosv/ploc_dir.hxx +++ b/cosv/inc/cosv/ploc_dir.hxx @@ -60,8 +60,6 @@ class Directory : public Persistent Directory( const char * i_rLocation ); Directory( - const String & i_rLocation ); - Directory( const Directory & i_rDir ); virtual ~Directory(); diff --git a/cosv/inc/cosv/streamstr.hxx b/cosv/inc/cosv/streamstr.hxx index 56765720..8890cd28 100644 --- a/cosv/inc/cosv/streamstr.hxx +++ b/cosv/inc/cosv/streamstr.hxx @@ -87,13 +87,6 @@ class StreamStr : public bostream StreamStr( const char * i_sInitStr, size_type i_nCapacity ); /// Only used if > strlen(i_sInitStr). - StreamStr( - size_type i_nGuessedCapacity, - const char * str1, // [!= 0] - const char * str2, // [!= 0] - ... ); // Has to end with NIL . - StreamStr( - csv::bstream & i_source ); /// Copies also insert_mode and current position. StreamStr( const self & i_rOther ); @@ -156,8 +149,6 @@ class StreamStr : public bostream size_type i_nMinimumCapacity ); void clear(); - void swap( - StreamStr & io_swap ); /** Sets start point for the next operator<<() call. if the intended position is not reachable, nothing happens. @@ -180,14 +171,6 @@ class StreamStr : public bostream self & set_insert_mode( insert_mode i_eMode ); - void push_front( - const char * i_str ); - void push_front( - char i_c ); - void push_back( - const char * i_str ); - void push_back( - char i_c ); void pop_front( size_type i_nCount ); void pop_back( @@ -212,38 +195,14 @@ class StreamStr : public bostream self & operator_read_line( bstream & i_src ); - void strip_front( - char i_cToRemove ); - void strip_back( - char i_cToRemove ); - void strip_frontback( - char i_cToRemove ); void strip_front_whitespace(); /// removes space, tab and crlf. void strip_back_whitespace(); void strip_frontback_whitespace(); - /** @precond i_begin is valid - @precond i_end is valid - @precond i_end >= i_begin - */ - void remove( - iterator i_begin, - iterator i_end ); - void replace( - position_type i_nStart, - size_type i_nSize, - Area i_aReplacement ); - void replace_all( char i_cCarToSearch, char i_cReplacement ); - void replace_all( - Area i_aStrToSearch, - Area i_aReplacement ); - StreamStr & to_lower( - position_type i_nStart = 0, - size_type i_nLength = str::maxsize ); StreamStr & to_upper( position_type i_nStart = 0, size_type i_nLength = str::maxsize ); @@ -264,12 +223,6 @@ class StreamStr : public bostream const_iterator cur() const; const_iterator end() const; - size_type token_count( - char i_cSplit ) const; - String token( - position_type i_nNr, /// Starting with 0. - char i_cSpli ) const; - // ACCESS iterator begin(); iterator cur(); @@ -315,20 +268,6 @@ class StreamStrLock StreamStr * pStr; }; -/** Splits a string into tokens by whitespace. - - The tokens are added to the end of o_list. -*/ -void Split( - std::vector<String> & - o_list, - const char * i_text ); -inline void Join( - StreamStr & o_text, - std::vector<String> & - i_list, - const char * i_sLink = " "); - // IMPLEMENTATION inline const char * @@ -377,17 +316,6 @@ inline StreamStr::iterator StreamStr::end() { return pEnd; } -inline void -Join( StreamStr & o_text, - std::vector<String> & i_list, - const char * i_sLink ) -{ - o_text.operator_join(i_list.begin(),i_list.end(),i_sLink); -} - - - - } // namespace csv #endif diff --git a/cosv/inc/cosv/string.hxx b/cosv/inc/cosv/string.hxx index 096b9828..08b1220d 100644 --- a/cosv/inc/cosv/string.hxx +++ b/cosv/inc/cosv/string.hxx @@ -76,13 +76,7 @@ class String String( const char * i_str, size_type i_nLength ); - /** @precond i_nLength == str::maxsize - || i_nStartPosition+i_nLength <= i_rStr.Size(). - */ - String( - const self & i_rStr, - position_type i_nStartPosition, - size_type i_nLength ); + /** @precond i_itBegin and i_itEnd are in the same valid memory-area, such that zero to finite times repetition of ++i_itBegin leads to i_itBegin == i_itEnd. @@ -119,18 +113,6 @@ class String // OPERATIONS void clear(); - void swap( - self & i_rStr ); - - /** @precond i_nLength == str::maxsize - || i_nStartPosition+i_nLength <= i_rStr.Size(). - */ - void assign( - const self & i_rStr, - position_type i_nStartPosition, - size_type i_nLength ); - void assign( - const char * i_str ); /// @precond i_nLength == str::maxsize OR i_nLength < strlen(i_str) . void assign( const char * i_str, @@ -139,13 +121,6 @@ class String void assign( size_type i_nCount, char i_c ); - /** @precond i_itBegin and i_itEnd are in the same valid - memory-area, such that zero to finite times repetition of - ++i_itBegin leads to i_itBegin == i_itEnd. - */ - void assign( - const_iterator i_itBegin, - const_iterator i_itEnd ); // INQUIRY const char * c_str() const; @@ -170,20 +145,6 @@ class String i_rOrder, const self & i_rStr ) const; - self substr( - position_type i_nStartPosition = 0, - size_type i_nLength = str::maxsize ) const; - - /** @param i_strToSearch [i_strToSearch != 0] - i_strToSearch == "" will return npos. - */ - position_type find( - const char * i_strToSearch, - position_type i_nSearchStartPosition = 0 ) const; - position_type find( - char i_charToSearch, - position_type i_nSearchStartPosition = 0 ) const; - //*********** Not yet implemented *********************// position_type rfind( const char * i_strToSearch, @@ -267,11 +228,6 @@ int compare( csv::str::position i_nStartPosition1, const char * i_s2, csv::str::size i_nLength ); -int compare( - const char * i_s1, - const String & i_s2, - csv::str::position i_nStartPosition2, - csv::str::size i_nLength ); inline int compare( const char * i_s1, const char * i_s2, @@ -291,28 +247,6 @@ int compare( const CharOrder_Table & i_rOrder, const char * i_s1, const char * i_s2 ); - - //*** Defined order, substrings - -int compare( - const CharOrder_Table & i_rOrder, - const String & i_s1, - csv::str::position i_nStartPosition1, - const char * i_s2, - csv::str::size i_nLength2 ); -int compare( - const CharOrder_Table & i_rOrder, - const char * i_s1, - const String & i_s2, - csv::str::position i_nStartPosition2, - csv::str::size i_nLength ); -int compare( - const CharOrder_Table & i_rOrder, - const char * i_s1, - const char * i_s2, - csv::str::size i_nLength ); - - } // namespace csv @@ -562,9 +496,6 @@ operator<<( csv::ostream & o_rOut, { o_rOut << i_rSrc.c_str(); return o_rOut; } - - - //****************** typedefs *********************// namespace csv @@ -574,9 +505,6 @@ typedef std::vector<String> StringVector; } - - - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cosv/source/service/comfunc.cxx b/cosv/source/service/comfunc.cxx index 82d0ae83..a7b09be6 100644 --- a/cosv/source/service/comfunc.cxx +++ b/cosv/source/service/comfunc.cxx @@ -48,110 +48,6 @@ X_Default::GetInfo( ostream & o_rOutputMedium ) const << Endl; } -intt -count_chars(const char * str, char c) -{ - intt nCount = 0; - for ( const char * pSpc = strchr(str, c); - pSpc != 0; - pSpc = strchr(pSpc+1, c) ) - { - nCount++; - } - return nCount; -} - - - -// Zeit-Typecasts -bool -str2date(const char * str, int & out_day, int & out_month, int & out_year) -{ - const char * z = str; - out_day = 0; - out_month = 0; - out_year = 0; - - while (isdigit(*z)) - out_day = 10*out_day + *(z++) - '0'; - if (*z == 0) - return false; - z++; - while (isdigit(*z)) - out_month = 10*out_month + *(z++) - '0'; - if (*z == 0) - return false; - z++; - while (isdigit(*z)) - out_year = 10*out_year + *(z++) - '0'; - return true; -} - -void -date2str(String & out_Str, int day, int month, int year) -{ - char buf[11] = "00.00.0000"; - buf[0] = static_cast<char>(day/10 + '0'); - buf[1] = static_cast<char>(day%10 + '0'); - buf[3] = static_cast<char>(month/10 + '0'); - buf[4] = static_cast<char>(month%10 + '0'); - - if (year < 100) - { - buf[6] = static_cast<char>(year/10 + '0'); - buf[7] = static_cast<char>(year%10 + '0'); - buf[8] = 0; - } - else - { - buf[6] = static_cast<char>(year/1000 + '0'); - buf[7] = static_cast<char>(year%1000/100 + '0'); - buf[8] = static_cast<char>(year%100/10 + '0'); - buf[9] = static_cast<char>(year%10 + '0'); - } - out_Str = buf; -} - -bool -str2time(const char * str, int & out_hour, int & out_min, int & out_sec) -{ - const char * z = str; - out_hour = 0; - out_min = 0; - out_sec = 0; - - while (isdigit(*z)) - out_hour = 10*out_hour + *(z++) - '0'; - if (*z == 0) - return false; - z++; - while (isdigit(*z)) - out_min = 10*out_min + *(z++) - '0'; - if (*z == 0) - return false; - z++; - while (isdigit(*z)) - out_sec = 10*out_sec + *(z++) - '0'; - return true; -} - -void -time2str(String & out_Str, int hour, int min, int sec) -{ - char buf[9] = "00:00:00"; - buf[0] = static_cast<char>(hour/10 + '0'); - buf[1] = static_cast<char>(hour%10 + '0'); - buf[3] = static_cast<char>(min/10 + '0'); - buf[4] = static_cast<char>(min%10 + '0'); - buf[6] = static_cast<char>(sec/10 + '0'); - buf[7] = static_cast<char>(sec%10 + '0'); - out_Str = buf; -} - - - } // namespace csv - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cosv/source/service/commandline.cxx b/cosv/source/service/commandline.cxx deleted file mode 100644 index c3983e6e..00000000 --- a/cosv/source/service/commandline.cxx +++ /dev/null @@ -1,345 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include <precomp.h> -#include <cosv/commandline.hxx> - -// NOT FULLY DECLARED SERVICES -#include <cosv/file.hxx> - - -namespace csv -{ - -namespace -{ - -const intt C_nNoOption = -1; - -const char * sIncludeOptionShort = "-A:"; -const char * sIncludeOptionLong = "--Arguments:"; -const uintt nIncludeOptionShort_Length = strlen(sIncludeOptionShort); -const uintt nIncludeOptionLong_Length = strlen(sIncludeOptionLong); - - -/** Analyses, if an option is the one to include a file with - further command line arguments. -*/ -bool IsIncludeOption( - const String & i_option ); - -/** Gets the file name from an include-arguments-option. -*/ -String IncludeFile_fromIncludeOption( - const String & i_option ); - - -bool -IsIncludeOption(const String & i_option) -{ - return strncmp(i_option, sIncludeOptionShort, nIncludeOptionShort_Length) == 0 - OR - strncmp(i_option, sIncludeOptionLong, nIncludeOptionLong_Length) == 0; -} - -String -IncludeFile_fromIncludeOption(const String & i_option) -{ - if ( strncmp(i_option, sIncludeOptionShort, nIncludeOptionShort_Length) - == 0 ) - { - return String(i_option, nIncludeOptionShort_Length, str::maxsize); - } - else - if ( strncmp(i_option, sIncludeOptionLong, nIncludeOptionLong_Length) - == 0 ) - { - return String(i_option, nIncludeOptionLong_Length, str::maxsize); - } - return String::Null_(); -} - - -} // end anonymous namespace - - - - -/** Local helper class for searching a possible option name in a vector of - ->OptionDescription. -*/ -struct CommandLine:: -FindOptionByText -{ - bool operator()( - const CommandLine::OptionDescription & - i_option ) - { return i_option.sText == sOption; } - - /// @param i_searchText [i_searchText != ""] - FindOptionByText( - const String & i_option ) - : sOption(i_option) { } - private: - const String sOption; -}; - - -typedef std::vector<StringVector::const_iterator> StringCIteratorList; -typedef std::vector<intt> OptionIdList; - -bool -CommandLine::Interpret( int argc, - char * argv[] ) -{ - Get_Arguments(argc,argv); - csv_assert(aOptionPoints.size() == aOptionIds.size()); - - StringVector::const_iterator - itNext = aCommandLine.begin(); - ++itNext; // Move 1 forward from program name. - StringVector::const_iterator - itEnd = aCommandLine.end(); - StringCIteratorList::const_iterator - itOptPtsEnd = aOptionPoints.end(); - - OptionIdList::const_iterator - itOptIds = aOptionIds.begin(); - for ( StringCIteratorList::const_iterator itOptPts = aOptionPoints.begin(); - itOptPts != itOptPtsEnd AND bIsOk; - ++itOptPts, ++itOptIds ) - { - // May be, there are arguments which do not belong to the last option: - // itNext != *is - Handle_FreeArguments(itNext, *itOptPts); - - itNext = do_HandleOption( *itOptIds, - *itOptPts + 1, - itOptPts+1 == itOptPtsEnd ? itEnd : *(itOptPts+1) ); - csv_assert(itNext <= itEnd); - } // end for (is) - Handle_FreeArguments(itNext, itEnd); - - return bIsOk; -} - -CommandLine::CommandLine() - : aOptions(), - aCommandLine(), - bIsOk(false) -{ -} - -void -CommandLine::Add_Option( intt i_id, - String i_text ) -{ - aOptions.push_back(OptionDescription( i_id, - i_text )); -} - -void -CommandLine::Get_Arguments( int argc, - char * argv[] ) -{ - aCommandLine.erase(aCommandLine.begin(),aCommandLine.end()); - aCommandLine.reserve(argc); - - char ** pArgEnd = argv + argc; - for ( char ** pArg = &argv[0]; - pArg != pArgEnd; - ++pArg ) - { - Store_Argument(*pArg); - } // end for - Find_OptionPoints(); - bIsOk = true; -} - -intt -CommandLine::Find_Option( const String & i_text ) const -{ - if (i_text.empty()) - return C_nNoOption; - - FindOptionByText aSearch(i_text); - OptionList::const_iterator - itFound = std::find_if( aOptions.begin(), - aOptions.end(), - aSearch ); - if (itFound != aOptions.end()) - { - return (*itFound).nId; - } - return C_nNoOption; -} - -bool -CommandLine::Store_Argument( const String & i_arg ) -{ - if ( NOT IsIncludeOption(i_arg) ) - { - aCommandLine.push_back(i_arg); - return true; - } - - return Try2Include_Options(i_arg); -} - -void -CommandLine::Find_OptionPoints() -{ - StringVector::const_iterator itEnd = aCommandLine.end(); - for ( StringVector::const_iterator it = aCommandLine.begin() + 1; - it != itEnd; - ++it ) - { - intt nOption = Find_Option(*it); - if (nOption != C_nNoOption) - { - aOptionPoints.push_back(it); - aOptionIds.push_back(nOption); - } - } // end for (i) -} - -void -CommandLine::Handle_FreeArguments( StringVector::const_iterator i_begin, - StringVector::const_iterator i_end ) -{ - for ( StringVector::const_iterator it = i_begin; - it != i_end AND bIsOk; - ++it ) - { - do_HandleFreeArgument(*it); - } -} - -bool -CommandLine::Try2Include_Options(const String & i_includeOption) -{ - static StringVector - aIncludedOptionFiles_; - - const String - aOptionFile(IncludeFile_fromIncludeOption(i_includeOption)); - - // Avoid recursion deadlock 1 - if ( std::find( aIncludedOptionFiles_.begin(), - aIncludedOptionFiles_.end(), - aOptionFile ) - != aIncludedOptionFiles_.end() ) - { - Cerr() << "\nError: Self inclusion of option file " - << aOptionFile - << ".\n" - << Endl(); - return false; - } - - // Avoid recursion deadlock 2 - aIncludedOptionFiles_.push_back(aOptionFile); - - bool ok = Include_Options(aOptionFile); - - // Avoid recursion deadlock 3 - aIncludedOptionFiles_.pop_back(); - - return ok; -} - -bool -CommandLine::Include_Options( const String & i_optionsFile ) -{ - StreamStr - aIncludedText(500); - bool ok = Load_Options(aIncludedText, i_optionsFile); - if (NOT ok) - return false; - - StringVector - aIncludedOptions; - Split(aIncludedOptions, aIncludedText.c_str()); - - StringVector::const_iterator itEnd = aIncludedOptions.end(); - for ( StringVector::const_iterator it = aIncludedOptions.begin(); - it != itEnd; - ++it ) - { - Store_Argument(*it); - } // end for - - return true; -} - -bool -CommandLine::Load_Options( StreamStr & o_text, - const String & i_optionsFile ) -{ - if (i_optionsFile.empty()) - return false; - - File - aOptionsFile(i_optionsFile, CFM_READ); - OpenCloseGuard - aOFGuard(aOptionsFile); - if (NOT aOFGuard) - { - Cerr() << "\nError: Options file " - << i_optionsFile - << " not found.\n" - << Endl(); - return false; - } - - StreamStr - aLoad(aOptionsFile); - o_text.swap(aLoad); - return true; -} - - - - -/****************** OptionDescription ***********************/ - - -CommandLine:: -OptionDescription::OptionDescription( intt i_id, - String i_text ) - : nId(i_id), - sText(i_text) -{ -} - - - - -} // namespace csv - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cosv/source/service/datetime.cxx b/cosv/source/service/datetime.cxx deleted file mode 100644 index 6738f55a..00000000 --- a/cosv/source/service/datetime.cxx +++ /dev/null @@ -1,86 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - - -#include <precomp.h> -#include <cosv/datetime.hxx> - - -// NOT FULLY DECLARED SERVICES - - -namespace csv -{ - - -Date::Date() - : nData( 0 ) -{ -} - -Date::Date( unsigned i_nDay, - unsigned i_nMonth, - unsigned i_nYear ) - : nData( (i_nDay << 24) + (i_nMonth << 16) + i_nYear ) -{ -} - -const Date & -Date::Null_() -{ - static const Date C_DateNull_(0,0,0); - return C_DateNull_; -} - - -Time::Time() - : nData( 0 ) -{ -} - -Time::Time( unsigned i_nHour, - unsigned i_nMinutes, - unsigned i_nSeconds, - unsigned i_nSeconds100 ) - : nData( (i_nHour << 24) + (i_nMinutes << 16) + (i_nSeconds << 8) + i_nSeconds100 ) -{ -} - -const Time & -Time::Null_() -{ - static const Time C_TimeNull_(0,0); - return C_TimeNull_; -} - - - -} // namespace csv - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cosv/source/service/makefile.mk b/cosv/source/service/makefile.mk index fc44f35e..fecfb635 100644 --- a/cosv/source/service/makefile.mk +++ b/cosv/source/service/makefile.mk @@ -47,7 +47,6 @@ OBJFILES= \ $(OBJ)$/comdline.obj \ $(OBJ)$/comfunc.obj \ $(OBJ)$/csv_ostream.obj \ - $(OBJ)$/datetime.obj \ $(OBJ)$/std_outp.obj diff --git a/cosv/source/storage/dirchain.cxx b/cosv/source/storage/dirchain.cxx index 52683c25..fadc1bfc 100644 --- a/cosv/source/storage/dirchain.cxx +++ b/cosv/source/storage/dirchain.cxx @@ -45,13 +45,6 @@ DirectoryChain::DirectoryChain() { } -DirectoryChain::DirectoryChain( const char * i_sSubPath, - bool i_bPathIsAlwaysDir, - const char * i_sDelimiter ) -{ - Set( i_sSubPath, i_bPathIsAlwaysDir, i_sDelimiter ); -} - DirectoryChain::~DirectoryChain() { } @@ -81,18 +74,6 @@ DirectoryChain::Set( const char * i_sSubPath, } void -DirectoryChain::PushFront( const String & i_sName ) -{ - aPath.insert( aPath.begin(), i_sName ); -} - -void -DirectoryChain::PushFront( const DirectoryChain & i_sPath ) -{ - aPath.insert( aPath.begin(), i_sPath.Begin(), i_sPath.End() ); -} - -void DirectoryChain::PushBack( const String & i_sName ) { aPath.push_back(i_sName); @@ -105,15 +86,6 @@ DirectoryChain::PushBack( const DirectoryChain & i_sPath ) } void -DirectoryChain::PopFront( uintt i_nCount ) -{ - if (i_nCount <= aPath.size()) - aPath.erase( aPath.begin(), aPath.begin() + i_nCount ); - else - aPath.erase( aPath.begin(), aPath.end() ); -} - -void DirectoryChain::PopBack( uintt i_nCount ) { if (i_nCount <= aPath.size()) @@ -123,18 +95,6 @@ DirectoryChain::PopBack( uintt i_nCount ) } void -DirectoryChain::Get( ostream & o_rPath, - const char * i_sDelimiter ) const -{ - for ( std::vector<String>::const_iterator it = aPath.begin(); - it != aPath.end(); - ++it ) - { - o_rPath << (*it).c_str() << i_sDelimiter; - } -} - -void DirectoryChain::Get( bostream & o_rPath, const char * i_sDelimiter ) const { diff --git a/cosv/source/storage/file.cxx b/cosv/source/storage/file.cxx index 7227476f..c871fd74 100644 --- a/cosv/source/storage/file.cxx +++ b/cosv/source/storage/file.cxx @@ -36,14 +36,6 @@ namespace csv { -File::File( uintt i_nMode ) - : // aPath, - pStream(0), - nMode(i_nMode), - eLastIO(io_none) -{ -} - File::File( const ploc::Path & i_rLocation, uintt i_nMode ) : aPath(i_rLocation), @@ -77,39 +69,6 @@ File::~File() close(); } -bool -File::Assign( ploc::Path i_rLocation ) -{ - if (is_open() ) - return false; - - InvalidatePath(); - aPath = i_rLocation; - return true; -} - -bool -File::Assign( const char * i_sLocation ) -{ - if (is_open() ) - return false; - - InvalidatePath(); - aPath.Set( i_sLocation ); - return true; -} - -bool -File::Assign( const String & i_sLocation ) -{ - if (is_open() ) - return false; - - InvalidatePath(); - aPath.Set( i_sLocation ); - return true; -} - uintt File::do_read( void * out_pDest, uintt i_nNrofBytes ) diff --git a/cosv/source/storage/makefile.mk b/cosv/source/storage/makefile.mk index 902e8c74..4d285867 100644 --- a/cosv/source/storage/makefile.mk +++ b/cosv/source/storage/makefile.mk @@ -42,7 +42,6 @@ ENABLE_EXCEPTIONS=true OBJFILES= \ $(OBJ)$/dirchain.obj \ $(OBJ)$/file.obj \ - $(OBJ)$/mbstream.obj \ $(OBJ)$/persist.obj \ $(OBJ)$/ploc.obj \ $(OBJ)$/ploc_dir.obj \ diff --git a/cosv/source/storage/mbstream.cxx b/cosv/source/storage/mbstream.cxx deleted file mode 100644 index c1bea8b5..00000000 --- a/cosv/source/storage/mbstream.cxx +++ /dev/null @@ -1,121 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include <precomp.h> -#include <cosv/mbstream.hxx> - -// NOT FULLY DECLARED SERVICES -#include <string.h> - - -namespace csv -{ - - - -mbstream::mbstream( uintt i_nSize ) - : dpOwnedMemorySpace( new char[i_nSize+1] ), - nSize( i_nSize ), - nCurPosition( 0 ) -{ - dpOwnedMemorySpace[i_nSize] = '\0'; -} - -mbstream::~mbstream() -{ - delete [] dpOwnedMemorySpace; -} - -void -mbstream::resize( uintt i_nSize ) -{ - DYN char * pNew = new char[i_nSize]; - memcpy( pNew, dpOwnedMemorySpace, min(i_nSize,nSize) ); - delete [] dpOwnedMemorySpace; - dpOwnedMemorySpace = pNew; - nSize = i_nSize; -} - -uintt -mbstream::do_read( void * out_pDest, - uintt i_nNrofBytes ) -{ - uintt ret = min( i_nNrofBytes, nSize - nCurPosition ); - memcpy( out_pDest, dpOwnedMemorySpace, ret ); - nCurPosition += ret; - return ret; -} - -bool -mbstream::inq_eod() const -{ - return nCurPosition == nSize; -} - -uintt -mbstream::do_write( const void * i_pSrc, - uintt i_nNrofBytes ) -{ - resize( max( 3 * (nSize+1) / 2, nCurPosition + i_nNrofBytes) ); - memcpy( dpOwnedMemorySpace+nCurPosition, i_pSrc, i_nNrofBytes ); - nCurPosition += i_nNrofBytes; - return i_nNrofBytes; -} - -uintt -mbstream::do_seek( intt i_nDistance, - seek_dir i_eStartPoint ) -{ - switch ( i_eStartPoint ) - { - case beg: if ( uintt(i_nDistance) < nSize ) - nCurPosition = uintt(i_nDistance); - break; - case cur: if ( i_nDistance < 0 - ? uintt(-i_nDistance) <= nCurPosition - : uintt(i_nDistance) + nCurPosition < nSize ) - nCurPosition = uintt( intt(nCurPosition) + i_nDistance ); - break; - case end: if ( i_nDistance < 0 - AND uintt(-i_nDistance) < nSize - 1 ) - nCurPosition = uintt( intt(nSize) - 1 + i_nDistance ); - break; - } - return position(); -} - -uintt -mbstream::inq_position() const -{ - return nCurPosition; -} - - -} // namespace csv - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cosv/source/storage/ploc.cxx b/cosv/source/storage/ploc.cxx index 000eafd7..d97d6714 100644 --- a/cosv/source/storage/ploc.cxx +++ b/cosv/source/storage/ploc.cxx @@ -106,18 +106,6 @@ Path::SetFile( const String & i_sName ) sFile = i_sName; } -const char * -Path::FileExtension() const -{ - const char * - ext = strrchr(sFile, '.'); - if (ext != 0) - ++ext; - else - ext = ""; - return ext; -} - bool Path::IsValid() const { @@ -125,20 +113,6 @@ Path::IsValid() const } void -Path::Get( ostream & o_rPath ) const -{ - if (NOT IsValid()) - return; - - pRoot->Get( o_rPath ); - aPath.Get( o_rPath, pRoot->OwnDelimiter() ); - - if ( sFile.length() > 0 ) - o_rPath << sFile; - -} - -void Path::Get( bostream & o_rPath ) const { if (NOT IsValid()) @@ -151,9 +125,6 @@ Path::Get( bostream & o_rPath ) const o_rPath.write( sFile ); } - - - } // namespace ploc } // namespace csv diff --git a/cosv/source/storage/ploc_dir.cxx b/cosv/source/storage/ploc_dir.cxx index 7770502f..e2d76081 100644 --- a/cosv/source/storage/ploc_dir.cxx +++ b/cosv/source/storage/ploc_dir.cxx @@ -59,11 +59,6 @@ Directory::Directory( const char * i_rLocation ) { } -Directory::Directory( const String & i_rLocation ) - : aPath(i_rLocation.c_str(), true) -{ -} - Directory::~Directory() { } diff --git a/cosv/source/strings/streamstr.cxx b/cosv/source/strings/streamstr.cxx index 0ae9dfd8..d3ad03da 100644 --- a/cosv/source/strings/streamstr.cxx +++ b/cosv/source/strings/streamstr.cxx @@ -84,37 +84,6 @@ StreamStr::StreamStr( const char * i_sInitStr, pEnd = pCur; } -StreamStr::StreamStr( size_type i_nGuessedCapacity, - const char * str1, - const char * str2, - ... ) - : bostream(), - nCapacity1( i_nGuessedCapacity + 1 ), - dpData( new char [i_nGuessedCapacity + 1] ), - pEnd(dpData), - pCur(dpData), - eMode(str::overwrite) -{ - *pEnd = '\0'; - - operator<<(str1); - operator<<(str2); - - ::va_list ap; - - va_start(ap, str2); - for ( const char * strAdd = va_arg(ap,const char*); - strAdd != 0; - strAdd = va_arg(ap,const char*) ) - { - size_type nLen = strlen(strAdd); - ProvideAddingSize( nLen ); - memcpy(pCur, strAdd, nLen); - Advance(nLen); - } // end for - va_end(ap); -} - StreamStr::StreamStr( const self & i_rOther ) : bostream(), nCapacity1( i_rOther.nCapacity1 ), @@ -126,25 +95,6 @@ StreamStr::StreamStr( const self & i_rOther ) strcpy( dpData, i_rOther.dpData ); // SAFE STRCPY (#100211# - checked) } -StreamStr::StreamStr(csv::bstream & i_source) - : bostream(), - nCapacity1(0), - dpData(0), - pEnd(0), - pCur(0), - eMode(str::overwrite) -{ - i_source.seek(0, csv::end); - nCapacity1 = static_cast<size_type>(i_source.position()) + 1; - i_source.seek(0); - - dpData = new char[nCapacity1]; - i_source.read(dpData, nCapacity1 - 1); - pCur = dpData + nCapacity1 - 1; - pEnd = pCur; - *pCur = '\0'; -} - StreamStr::~StreamStr() { delete [] dpData; @@ -355,33 +305,6 @@ StreamStr::resize( size_type i_nMinimumCapacity ) Resize(i_nMinimumCapacity); } -void -StreamStr::swap( StreamStr & io_swap ) -{ - size_type - n = io_swap.nCapacity1; - io_swap.nCapacity1 = nCapacity1; - nCapacity1 = n; - - char * - p = io_swap.dpData; - io_swap.dpData = dpData; - dpData = p; - - p = io_swap.pEnd; - io_swap.pEnd = pEnd; - pEnd = p; - - p = io_swap.pCur; - io_swap.pCur = pCur; - pCur = p; - - insert_mode - m = io_swap.eMode; - io_swap.eMode = eMode; - eMode = m; -} - StreamStr & StreamStr::seekp( seek_type i_nCount, seek_dir i_eDirection ) @@ -420,56 +343,6 @@ StreamStr::set_insert_mode( insert_mode i_eMode ) } void -StreamStr::push_front( const char * i_str ) -{ - insert_mode eOriginalMode = eMode; - char * pOriginalCur = pCur; - eMode = str::insert; - pCur = dpData; - - operator<<(i_str); - - eMode = eOriginalMode; - pCur = pOriginalCur + strlen(i_str); -} - -void -StreamStr::push_front( char i_c ) -{ - insert_mode eOriginalMode = eMode; - char * pOriginalCur = pCur; - eMode = str::insert; - pCur = dpData; - - operator<<(i_c); - - eMode = eOriginalMode; - pCur = pOriginalCur + 1; -} - -void -StreamStr::push_back( const char * i_str ) -{ - insert_mode eOriginalMode = eMode; - eMode = str::overwrite; - - operator<<(i_str); - - eMode = eOriginalMode; -} - -void -StreamStr::push_back( char i_c ) -{ - insert_mode eOriginalMode = eMode; - eMode = str::overwrite; - - operator<<(i_c); - - eMode = eOriginalMode; -} - -void StreamStr::pop_front( size_type i_nCount ) { size_type nCount = min(i_nCount, length()); @@ -561,33 +434,6 @@ StreamStr::operator_read_line( bstream & i_src ) } void -StreamStr::strip_front(char i_cToRemove) -{ - const_iterator it = begin(); - for ( ; - it != end() ? *it == i_cToRemove : false; - ++it ) ; - pop_front(it - begin()); -} - -void -StreamStr::strip_back(char i_cToRemove) -{ - const_iterator it = end(); - for ( ; - it != begin() ? *(it-1) == i_cToRemove : false; - --it ) ; - pop_back(end() - it); -} - -void -StreamStr::strip_frontback(char i_cToRemove) -{ - strip_front(i_cToRemove); - strip_back(i_cToRemove); -} - -void StreamStr::strip_front_whitespace() { const_iterator it = begin(); @@ -615,56 +461,6 @@ StreamStr::strip_frontback_whitespace() } void -StreamStr::remove( iterator i_begin, - iterator i_end ) -{ - csv_assert(i_begin >= dpData AND i_begin <= pEnd); - csv_assert(i_end >= dpData AND i_end <= pEnd); - csv_assert(i_end >= i_begin); - MoveData(i_end, pEnd, i_begin - i_end); - pCur = pEnd; -} - -void -StreamStr::replace( position_type i_nStart, - size_type i_nSize, - Area i_aReplacement ) -{ - if (i_nStart >= length() OR i_nSize < 1) - return; - - insert_mode eOldMode = eMode; - eMode = str::insert; - pCur = dpData + i_nStart; - - size_type anz = min( length() - i_nStart, i_nSize ); - - if ( anz < i_aReplacement.nLength ) - { - ProvideAddingSize( i_aReplacement.nLength - anz ); - } - else if ( anz > i_aReplacement.nLength ) - { - seek_type nMove = seek_type(anz - i_aReplacement.nLength); - - MoveData( dpData + i_nStart + anz, - pEnd, - -nMove ); - pEnd -= nMove; - *pEnd = '\0'; - } - - if (i_aReplacement.nLength > 0) - { - memcpy( dpData + i_nStart, i_aReplacement.sStr, i_aReplacement.nLength ); - Advance(i_aReplacement.nLength); - } - - eMode = eOldMode; - pCur = pEnd; -} - -void StreamStr::replace_all( char i_cCarToSearch, char i_cReplacement ) { @@ -675,59 +471,6 @@ StreamStr::replace_all( char i_cCarToSearch, } } -void -StreamStr::replace_all( Area i_aStrToSearch, - Area i_aReplacement ) -{ - position_type p = 0; - const char * pSearch = i_aStrToSearch.sStr; - size_type nSearch = i_aStrToSearch.nLength; - - while ( p <= length() - nSearch ) - { - if ( strncmp(dpData+p, pSearch, nSearch) == 0 ) - { - replace( p, nSearch, i_aReplacement ); - p += i_aReplacement.nLength; - } - else - { - ++p; - } - } // end while -} - -StreamStr & -StreamStr::to_lower( position_type i_nStart, - size_type i_nLength ) -{ - static char cLower[128] = - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111, - 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95, - 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111, - 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127 }; - - if ( i_nStart < length() ) - { - char * pStop = i_nStart + i_nLength < length() - ? dpData + i_nStart + i_nLength - : pEnd; - for ( char * pChange = dpData + i_nStart; - pChange != pStop; - ++pChange ) - { - *pChange = (static_cast< unsigned char >(*pChange) & 0x80) == 0 - ? cLower[ UINT8(*pChange) ] - : *pChange; - } - } - return *this; -} - StreamStr & StreamStr::to_upper( position_type i_nStart, size_type i_nLength ) @@ -759,37 +502,6 @@ StreamStr::to_upper( position_type i_nStart, return *this; } - -StreamStr::size_type -StreamStr::token_count( char i_cSplit ) const -{ - return count_chars(dpData, i_cSplit) + 1; -} - -String -StreamStr::token( position_type i_nNr, - char i_cSplit ) const -{ - // Find begin: - const char * pTokenBegin = dpData; - for ( position_type nNr = i_nNr; - nNr > 0; - --nNr ) - { - pTokenBegin = strchr(pTokenBegin,i_cSplit); - if (pTokenBegin == 0) - return String(""); - ++pTokenBegin; - } - - // Find end: - const char * pTokenEnd = strchr(pTokenBegin, i_cSplit); - if (pTokenEnd == 0) - pTokenEnd = pEnd; - - return String(pTokenBegin, size_type(pTokenEnd-pTokenBegin) ); -} - class StreamStrPool { public: @@ -942,43 +654,6 @@ c_str() // Does nothing. } - - -void -Split( std::vector<String> & o_list, - const char * i_text ) -{ - const char * - pCurrentToken = 0; - bool - white = false; - for (const char * p = i_text; *p != '\0'; ++p) - { - white = UINT8(*p) > 32; - if (pCurrentToken != 0) - { - if (white) - { - o_list.push_back(String(pCurrentToken, p)); - pCurrentToken = 0; - } - } - else - { - if ( NOT white) - pCurrentToken = p; - } // endif (bInToken) else - } // end for - - if (pCurrentToken != 0) - { - o_list.push_back(String(pCurrentToken)); - } -} - - - - } // namespace csv /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cosv/source/strings/string.cxx b/cosv/source/strings/string.cxx index 7a7429ec..a7e11271 100644 --- a/cosv/source/strings/string.cxx +++ b/cosv/source/strings/string.cxx @@ -127,15 +127,6 @@ String::String( const char * i_str, { } -/* For efficiency see the previous c'tor. -*/ -String::String( const self & i_rStr, - position_type i_nStartPosition, - size_type i_nLength ) - : pd( new S_Data(str_from_StringOffset(i_rStr, i_nStartPosition), i_nLength) ) -{ -} - String::String( const_iterator i_itBegin, const_iterator i_itEnd ) : pd( new S_Data(i_itBegin, size_type(i_itEnd - i_itBegin)) ) @@ -175,35 +166,6 @@ String::operator=( const char * i_str ) } void -String::swap( self & i_rStr ) -{ - const S_Data * pTemp = pd; - pd = i_rStr.pd; - i_rStr.pd = pTemp; -} - -void -String::assign( const self & i_rStr, - position_type i_nStartPosition, - size_type i_nLength ) -{ - const S_Data * - pTemp = new S_Data( str_from_StringOffset(i_rStr, i_nStartPosition), - i_nLength ); - pd->Release(); - pd = pTemp; -} - -void -String::assign( const char * i_str ) -{ - const S_Data * - pTemp = new S_Data( i_str ); - pd->Release(); - pd = pTemp; -} - -void String::assign( const char * i_str, size_type i_nLength ) { @@ -213,18 +175,6 @@ String::assign( const char * i_str, pd = pTemp; } -void -String::assign( const_iterator i_itBegin, - const_iterator i_itEnd ) -{ - const S_Data * - pTemp = new S_Data( i_itBegin, - size_type(i_itEnd - i_itBegin) ); - pd->Release(); - pd = pTemp; -} - - int String::compare( const self & i_rStr ) const { @@ -238,55 +188,6 @@ String::compare( const CharOrder_Table & i_rOrder, return csv::compare( i_rOrder, c_str(), i_rStr.c_str() ); } -String -String::substr( position_type i_nStartPosition, - size_type i_nLength ) const -{ - size_type nSize = size(); - - if ( i_nStartPosition < nSize ) - { - if ( i_nLength == str::maxsize - OR i_nLength >= nSize - i_nStartPosition ) - return String( c_str() + i_nStartPosition ); - else - return String( c_str() + i_nStartPosition, - i_nLength ); - } - - return Null_(); -} - -String::position_type -String::find( const char * i_strToSearch, - position_type i_nSearchStartPosition ) const -{ - csv_assert(i_strToSearch != 0); - - if ( i_nSearchStartPosition < length() - AND - *i_strToSearch != '\0' ) - { - const char * p = strstr(c_str() + i_nSearchStartPosition, i_strToSearch); - if (p != 0) - return static_cast<position_type>(p - c_str()); - } - return str::position(str::npos); -} - -String::position_type -String::find( char i_charToSearch, - position_type i_nSearchStartPosition ) const -{ - if (i_nSearchStartPosition <= length()) - { - const char * p = strchr(c_str() + i_nSearchStartPosition, i_charToSearch); - if (p != 0) - return static_cast<position_type>(p - c_str()); - } - return str::position(str::npos); -} - const String & String::Null_() { @@ -322,23 +223,6 @@ compare( const String & i_s1, } int -compare( const char * i_s1, - const String & i_s2, - csv::str::position i_nStartPosition2, - csv::str::size i_nLength ) -{ - const char * pS2 = str_from_StringOffset( i_s2, i_nStartPosition2 ); - - if ( i_nLength != csv::str::maxsize ) - return strncmp( i_s1, - pS2, - i_nLength ); - else - return strcmp( i_s1, - pS2 ); -} - -int compare( const CharOrder_Table & i_rOrder, const char * i_s1, const char * i_s2 ) @@ -350,68 +234,6 @@ compare( const CharOrder_Table & i_rOrder, return int( i_rOrder(*it1) - i_rOrder(*it2) ); } -int -compare( const CharOrder_Table & i_rOrder, - const String & i_s1, - csv::str::position i_nStartPosition1, - const char * i_s2, - csv::str::size i_nLength ) -{ - const char * pS1 = str_from_StringOffset( i_s1, i_nStartPosition1 ); - - if ( i_nLength != csv::str::maxsize ) - return compare( i_rOrder, - pS1, - i_s2, - i_nLength ); - else - return compare( i_rOrder, - pS1, - i_s2 ); -} - -int -compare( const CharOrder_Table & i_rOrder, - const char * i_s1, - const String & i_s2, - csv::str::position i_nStartPosition2, - csv::str::size i_nLength ) -{ - const char * pS2 = str_from_StringOffset( i_s2, i_nStartPosition2 ); - - if ( i_nLength != csv::str::maxsize ) - return compare( i_rOrder, - i_s1, - pS2, - i_nLength ); - else - return compare( i_rOrder, - i_s1, - pS2 ); -} - -int -compare( const CharOrder_Table & i_rOrder, - const char * i_s1, - const char * i_s2, - csv::str::size i_nLength ) -{ - const char * sEnd = i_s1 + i_nLength; - - const char * it1 = i_s1; - const char * it2 = i_s2; - for ( ; i_rOrder(*it1) == i_rOrder(*it2) AND *it1 != '\0' AND it1 != sEnd; ++it1, ++it2 ) - {} - - if ( it1 != sEnd ) - return int( i_rOrder(*it1) - i_rOrder(*it2) ); - else - return 0; -} - - - - } // namespace csv /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/odk/cfgWin.js b/odk/cfgWin.js index 398599dd..961f15ae 100644 --- a/odk/cfgWin.js +++ b/odk/cfgWin.js @@ -923,8 +923,8 @@ function writeBatFile(fdir, file) "\n" + "REM Add directory of the Win SDK to the path, if necessary.\n" + "if defined CPP_WINDOWS_SDK (\n" + - " set PATH=%CPP_WINDOWS_SDK\\bin%;%PATH%\n" + - " set INCLUDE=%CPP_WINDOWS_SDK\\Include%;%INCLUDE%\n" + + " set PATH=%CPP_WINDOWS_SDK%\\bin;%PATH%\n" + + " set INCLUDE=%CPP_WINDOWS_SDK%\\Include;%INCLUDE%\n" + ")\n" + "REM Add directory of the C# and VB.NET compilers to the path, if necessary.\n" + "if defined OO_SDK_CLI_HOME set PATH=%OO_SDK_CLI_HOME%;%PATH%\n" + diff --git a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/component.cxx b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/component.cxx index 6c4c8078..973c12fe 100644 --- a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/component.cxx +++ b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/component.cxx @@ -59,14 +59,6 @@ using namespace ::com::sun::star::registry; /** - * Gives the environment this component belongs to. - */ -extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(const sal_Char ** ppEnvTypeName, uno_Environment ** ppEnv) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - -/** * This function creates an implementation section in the registry and another subkey * * for each supported service. diff --git a/odk/examples/DevelopersGuide/Components/CppComponent/service2_impl.cxx b/odk/examples/DevelopersGuide/Components/CppComponent/service2_impl.cxx index c1d2fdfe..5d82ffc8 100644 --- a/odk/examples/DevelopersGuide/Components/CppComponent/service2_impl.cxx +++ b/odk/examples/DevelopersGuide/Components/CppComponent/service2_impl.cxx @@ -200,23 +200,6 @@ static struct ::cppu::ImplementationEntry s_component_entries [] = extern "C" { -SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - sal_Char const ** ppEnvTypeName, uno_Environment ** ) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - -// This method not longer necessary since OOo 3.4 where the component registration was -// was changed to passive component registration. For more details see -// http://wiki.services.openoffice.org/wiki/Passive_Component_Registration -// -// sal_Bool SAL_CALL component_writeInfo( -// lang::XMultiServiceFactory * xMgr, registry::XRegistryKey * xRegistry ) -// { -// return ::cppu::component_writeInfoHelper( -// xMgr, xRegistry, ::my_sc_impl::s_component_entries ); -// } - SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( sal_Char const * implName, lang::XMultiServiceFactory * xMgr, diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SServices.cxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SServices.cxx index 919b8521..e388d00d 100644 --- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SServices.cxx +++ b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SServices.cxx @@ -118,17 +118,6 @@ struct ProviderRequest }; //--------------------------------------------------------------------------------------- - -extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char **ppEnvTypeName, - uno_Environment **ppEnv - ) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - - -//--------------------------------------------------------------------------------------- extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/fdcomp.cxx b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/fdcomp.cxx index 3925eef3..acbdf194 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/fdcomp.cxx +++ b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/fdcomp.cxx @@ -50,15 +50,6 @@ using namespace ::com::sun::star::registry; 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( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey ) { diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx index 112a181c..0b85b00b 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx +++ b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx @@ -319,13 +319,6 @@ using namespace XFlatXml; 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( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey ) { diff --git a/odk/examples/cpp/complextoolbarcontrols/exports.cxx b/odk/examples/cpp/complextoolbarcontrols/exports.cxx index 769ce984..42f9eaab 100644 --- a/odk/examples/cpp/complextoolbarcontrols/exports.cxx +++ b/odk/examples/cpp/complextoolbarcontrols/exports.cxx @@ -56,16 +56,6 @@ namespace css = ::com::sun::star; 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(const sal_Char* pImplName , void* pServiceManager, void* pRegistryKey ) diff --git a/odk/examples/cpp/counter/counter.cxx b/odk/examples/cpp/counter/counter.cxx index 752ad11c..3da423bc 100644 --- a/odk/examples/cpp/counter/counter.cxx +++ b/odk/examples/cpp/counter/counter.cxx @@ -166,14 +166,6 @@ Reference< XInterface > SAL_CALL MyCounterImpl_create( /** - * Gives the environment this component belongs to. - */ -extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(const sal_Char ** ppEnvTypeName, uno_Environment ** ppEnv) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - -/** * This function creates an implementation section in the registry and another subkey * * for each supported service. diff --git a/odk/examples/cpp/remoteclient/remoteclient.cxx b/odk/examples/cpp/remoteclient/remoteclient.cxx index 2db24c76..84c83f8e 100644 --- a/odk/examples/cpp/remoteclient/remoteclient.cxx +++ b/odk/examples/cpp/remoteclient/remoteclient.cxx @@ -227,14 +227,6 @@ using namespace remotebridges_officeclient; 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( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey ) { diff --git a/odk/prj/build.lst b/odk/prj/build.lst index bbb82627..78ea3149 100644 --- a/odk/prj/build.lst +++ b/odk/prj/build.lst @@ -1,4 +1,4 @@ -od odk :: cppuhelper jurt javaunohelper udkapi ridljar offapi autodoc unodevtools external NULL +od odk :: cppuhelper jurt javaunohelper udkapi ridljar offapi autodoc DESKTOP:unodevtools external NULL od odk usr1 - all od_mkout NULL od odk\inc nmake - all od_inc NULL od odk\source\com\sun\star\lib\loader nmake - all od_loader od_inc NULL diff --git a/odk/settings/component.uno.def b/odk/settings/component.uno.def index d0c2def3..0c35f9aa 100644 --- a/odk/settings/component.uno.def +++ b/odk/settings/component.uno.def @@ -1,3 +1,2 @@ EXPORTS -component_getImplementationEnvironment component_getFactory diff --git a/odk/settings/settings.mk b/odk/settings/settings.mk index bbd18eee..e4fc05ad 100644 --- a/odk/settings/settings.mk +++ b/odk/settings/settings.mk @@ -502,11 +502,9 @@ PLATFORM=kfreebsd ifeq "$(PROCTYPE)" "x86_64" PACKAGE_LIB_DIR=kfreebsd_x86_64.plt UNOPKG_PLATFORM=kFreeBSD_x86_64 -STLPORT=no else PACKAGE_LIB_DIR=kfreebsd_x86.plt UNOPKG_PLATFORM=kFreeBSD_x86 -STLPORT=no endif else PLATFORM=freebsd @@ -570,10 +568,6 @@ CPPUHELPERLIB=-luno_cppuhelper$(COMID) SALHELPERLIB=-luno_salhelper$(COMID) REGLIB=-lreg STORELIB=-lstore -ifeq "$(STLPORT)" "yes" -endif -else -STLPORTLIB= EMPTYSTRING= PATH_SEPARATOR=: diff --git a/odk/util/makefile.pmk b/odk/util/makefile.pmk index 6e9f2013..2fd708a0 100644 --- a/odk/util/makefile.pmk +++ b/odk/util/makefile.pmk @@ -58,7 +58,11 @@ DESTDIRGENCPPREF=$(DESTDIRDOCU)/cpp/ref DESTDIRJAVADOCU=$(DESTDIRDOCU)/java DESTDIRGENJAVAREF=$(DESTDIRDOCU)/java/ref +.IF "$(CROSS_COMPILING)" == "YES" +BINOUT=$(SOLARVERSION)/$(INPATH)/bin +.ELSE BINOUT=$(SOLARBINDIR) +.ENDIF INCOUT=$(SOLARINCDIR) IDLOUT=$(SOLARIDLDIR) XMLOUT=$(SOLARXMLDIR) diff --git a/udm/inc/udm/html/htmlitem.hxx b/udm/inc/udm/html/htmlitem.hxx index 932e11ef..feef0a11 100644 --- a/udm/inc/udm/html/htmlitem.hxx +++ b/udm/inc/udm/html/htmlitem.hxx @@ -36,15 +36,11 @@ // PARAMETERS -#define COMPATIBLE_NETSCAPE_47 - namespace csi { namespace html { - - /** <BODY> */ class Body : public csi::xml::AnElement @@ -56,8 +52,6 @@ class Body : public csi::xml::AnElement virtual bool LineBreakAfterBeginTag() const; }; - -#ifdef COMPATIBLE_NETSCAPE_47 /** <BR> */ class HorizontalLine : public xml::XmlCode @@ -67,33 +61,6 @@ class HorizontalLine : public xml::XmlCode : xml::XmlCode("<hr>\n") {} }; -#else -/** <HR> -*/ -class HorizontalLine : public csi::xml::AnEmptyElement -{ - public: - HorizontalLine() - : csi::xml::AnEmptyElement("hr") {} - private: - virtual bool LineBreakAfterBeginTag() const; -}; -#endif - - -/** <IMG .... > -*/ -class Image : public csi::xml::AnEmptyElement -{ - public: - Image( - const ::csv::String & i_sSrc, - const ::csv::String & i_sWidth, - const ::csv::String & i_sHeight, - const ::csv::String & i_sAlign, - const ::csv::String & i_sBorder ); -}; - /** <A name=""> */ class Label : public csi::xml::AnElement @@ -129,7 +96,6 @@ class Headline : public csi::xml::APureElement virtual bool LineBreakAfterEndTag() const; }; -#ifdef COMPATIBLE_NETSCAPE_47 /** <BR> */ class LineBreak : public xml::XmlCode @@ -139,20 +105,6 @@ class LineBreak : public xml::XmlCode : xml::XmlCode("<br>\n") {} }; -#else -/** <BR> -*/ -class LineBreak : public csi::xml::ASglTag -{ - public: - LineBreak() - : csi::xml::ASglTag("br") {} - private: - virtual bool LineBreakAfterBeginTag() const; -}; -#endif - - /** <b> */ class Bold : public csi::xml::APureElement @@ -303,9 +255,6 @@ class NumeratedList : public csi::xml::AnElement public: NumeratedList() : csi::xml::AnElement("ol") {} - - ListItem & AddItem( - DYN csi::xml::Item* let_dpItem = 0 ); private: virtual bool LineBreakAfterBeginTag() const; }; diff --git a/udm/inc/udm/xml/xmlitem.hxx b/udm/inc/udm/xml/xmlitem.hxx index fbb76189..3e186fe2 100644 --- a/udm/inc/udm/xml/xmlitem.hxx +++ b/udm/inc/udm/xml/xmlitem.hxx @@ -203,8 +203,6 @@ class AnElement : public Element { public: AnElement( - const ::csv::String& i_sTagName ); - AnElement( const char * i_sTagName ); ~AnElement(); private: @@ -227,33 +225,10 @@ class AnElement : public Element AttrList aAttrs; }; - -class AnEmptyElement : public EmptyElement -{ - public: - AnEmptyElement( - const ::csv::String & i_sTagName ); - AnEmptyElement( - const char * i_sTagName ); - ~AnEmptyElement(); - private: - // Interface Element: - virtual const ::csv::String & - inq_TagName() const; - // Interface EmptyElement: - virtual AttrList & inq_RefAttrs(); - - // DATA - ::csv::String sTagName; - AttrList aAttrs; -}; - class APureElement : public PureElement { public: APureElement( - const ::csv::String & i_sTagName ); - APureElement( const char * i_sTagName ); ~APureElement(); private: @@ -268,23 +243,6 @@ class APureElement : public PureElement Dyn< Item > pContent; }; -class ASglTag : public SglTag -{ - public: - ASglTag( - const ::csv::String & i_sTagName ); - ASglTag( - const char * i_sTagName ); - ~ASglTag(); - private: - // Interface Element: - virtual const ::csv::String & - inq_TagName() const; - // DATA - ::csv::String sTagName; -}; - - /* Standard Attribute implementation */ class AnAttribute : public Attribute diff --git a/udm/source/html/htmlitem.cxx b/udm/source/html/htmlitem.cxx index 057b50f9..93de036c 100644 --- a/udm/source/html/htmlitem.cxx +++ b/udm/source/html/htmlitem.cxx @@ -58,29 +58,6 @@ Body::LineBreakAfterBeginTag() const return true; } -#ifndef COMPATIBLE_NETSCAPE_47 -bool -HorizontalLine::LineBreakAfterBeginTag() const -{ - return true; -} -#endif - - -Image::Image( const String & i_sSrc, - const String & i_sWidth, - const String & i_sHeight, - const String & i_sAlign, - const String & i_sBorder ) - : AnEmptyElement( "img" ) -{ - *this << new AnAttribute(String("src"),i_sSrc) - << new AnAttribute(String("width"),i_sWidth) - << new AnAttribute(String("height"),i_sHeight) - << new AnAttribute(String("align"),i_sAlign) - << new AnAttribute(String("border"),i_sBorder); -} - bool Paragraph::LineBreakAfterEndTag() const { @@ -96,23 +73,12 @@ Headline::LineBreakAfterEndTag() const return true; } -#ifndef COMPATIBLE_NETSCAPE_47 -bool -LineBreak::LineBreakAfterBeginTag() const -{ - return true; -} -#endif - - bool TableCell::LineBreakAfterEndTag() const { return true; } - - TableCell & TableRow::AddCell( DYN Item * let_dpItem ) { @@ -210,15 +176,6 @@ ListItem::LineBreakAfterEndTag() const return true; } - - - -ListItem & -NumeratedList::AddItem( DYN csi::xml::Item* let_dpItem ) -{ - return PushElem( *this, new ListItem, let_dpItem ); -} - bool NumeratedList::LineBreakAfterBeginTag() const { diff --git a/udm/source/mkinc/fullcpp.mk b/udm/source/mkinc/fullcpp.mk index 3452d4bc..5faca9c6 100644 --- a/udm/source/mkinc/fullcpp.mk +++ b/udm/source/mkinc/fullcpp.mk @@ -37,7 +37,9 @@ .IF "$(GUI)"=="WNT" # RTTI +.IF "$(COM)"=="MSC" CFLAGS+= -GR +.ENDIF .IF "$(NP_LOCALBUILD)"!="" @@ -54,7 +56,8 @@ CFLAGS+= -YX"precomp.h" /Fp$(PRJ)$/$(INPATH)$/misc$/$(PCH_NAME).pcd -DNP_LOCALBU .ENDIF -.IF "$(OS)"=="LINUX" || "$(OS)"=="FREEBSD" || "$(OS)"=="NETBSD" +# Or should we simple check for $(COM)==GCC ? +.IF "$(OS)"=="LINUX" || "$(OS)"=="FREEBSD" || "$(OS)"=="NETBSD" || "$(OS)$(COM)"=="WNTGCC" CFLAGSCXX+= -frtti .ENDIF diff --git a/udm/source/xml/xmlitem.cxx b/udm/source/xml/xmlitem.cxx index 78143a79..8c3e10d8 100644 --- a/udm/source/xml/xmlitem.cxx +++ b/udm/source/xml/xmlitem.cxx @@ -309,13 +309,6 @@ SglTag::inq_Attrs() const //*************************** AnElement **************************// -AnElement::AnElement( const String & i_sTagName ) - : sTagName( i_sTagName ) - // pContent, - // aAttrs -{ -} - AnElement::AnElement( const char * i_sTagName ) : sTagName( i_sTagName ) // pContent, @@ -363,47 +356,8 @@ AnElement::inq_Attrs() const return &aAttrs; } - -//*************************** AnEmptyElement **************************// - -AnEmptyElement::AnEmptyElement( const String & i_sTagName ) - : sTagName( i_sTagName ) - // aAttrs -{ -} - -AnEmptyElement::AnEmptyElement( const char * i_sTagName ) - : sTagName( i_sTagName ) - // aAttrs -{ -} - -AnEmptyElement::~AnEmptyElement() -{ - -} - -const String & -AnEmptyElement::inq_TagName() const -{ - return sTagName; -} - -AttrList & -AnEmptyElement::inq_RefAttrs() -{ - return aAttrs; -} - - //*************************** APureElement **************************// -APureElement::APureElement( const String & i_sTagName ) - : sTagName( i_sTagName ) - // pContent -{ -} - APureElement::APureElement( const char * i_sTagName ) : sTagName( i_sTagName ) // pContent @@ -426,31 +380,6 @@ APureElement::inq_RefContent() return pContent; } - - -//*************************** ASglTag **************************// - -ASglTag::ASglTag( const String & i_sTagName ) - : sTagName( i_sTagName ) -{ -} - -ASglTag::ASglTag( const char * i_sTagName ) - : sTagName( i_sTagName ) -{ -} - -ASglTag::~ASglTag() -{ -} - -const String & -ASglTag::inq_TagName() const -{ - return sTagName; -} - - //*************************** AnAttribute **************************// AnAttribute::AnAttribute( const String & i_sName, const String & i_sValue ) diff --git a/unodevtools/prj/build.lst b/unodevtools/prj/build.lst index cc505eee..37f2ef37 100644 --- a/unodevtools/prj/build.lst +++ b/unodevtools/prj/build.lst @@ -1,4 +1,4 @@ -udt unodevtools : codemaker cppuhelper NULL +udt unodevtools : DESKTOP:codemaker cppuhelper NULL udt unodevtools usr1 - all udt_mkout NULL udt unodevtools\inc get - all udt_inc NULL udt unodevtools\prj get - all udt_prj NULL diff --git a/unodevtools/source/skeletonmaker/cppcompskeleton.cxx b/unodevtools/source/skeletonmaker/cppcompskeleton.cxx index f20fa495..41c229d6 100644 --- a/unodevtools/source/skeletonmaker/cppcompskeleton.cxx +++ b/unodevtools/source/skeletonmaker/cppcompskeleton.cxx @@ -194,10 +194,6 @@ void generateCompFunctions(std::ostream & o, const OString & nmspace) << " &::cppu::createSingleComponentFactory, 0, 0 },\n" << " { 0, 0, 0, 0, 0, 0 }\n};\n\n"; - o << "extern \"C\" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(\n" - << " const char ** envTypeName, uno_Environment **)\n{\n" - << " *envTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;\n}\n\n"; - o << "extern \"C\" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(\n" << " const char * implName, void * serviceManager, void * registryKey)\n{\n" << " return ::cppu::component_getFactoryHelper(\n" |