[Libreoffice-commits] .: 5 commits - l10ntools/inc l10ntools/source svl/inc svl/source svtools/inc svtools/source tools/inc tools/source vcl/inc vcl/source

Caolán McNamara caolan at kemper.freedesktop.org
Mon Jul 18 04:26:05 PDT 2011


 l10ntools/inc/export.hxx                |    1 
 l10ntools/inc/l10ntools/file.hxx        |    1 
 l10ntools/source/file.cxx               |    5 -
 l10ntools/source/localize.cxx           |  144 --------------------------------
 l10ntools/source/merge.cxx              |    8 -
 svl/inc/svl/urihelper.hxx               |   26 -----
 svl/source/misc/urihelper.cxx           |   61 -------------
 svtools/inc/svtools/syntaxhighlight.hxx |    8 -
 svtools/source/edit/syntaxhighlight.cxx |   35 -------
 tools/inc/tools/inetmime.hxx            |    3 
 tools/inc/tools/inetmsg.hxx             |    1 
 tools/inc/tools/stream.hxx              |    2 
 tools/source/inet/inetmime.cxx          |   17 ---
 tools/source/inet/inetmsg.cxx           |    8 -
 tools/source/stream/stream.cxx          |   12 ++
 vcl/inc/vcl/canvastools.hxx             |    5 -
 vcl/inc/vcl/print.hxx                   |    1 
 vcl/inc/vcl/window.hxx                  |    1 
 vcl/source/gdi/print.cxx                |   10 --
 vcl/source/helper/canvastools.cxx       |   17 ---
 vcl/source/window/toolbox.cxx           |   25 -----
 vcl/source/window/window2.cxx           |    5 -
 22 files changed, 14 insertions(+), 382 deletions(-)

New commits:
commit 7c7824a9563b5c176f7bb41285e19511560c2125
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Jul 17 22:27:38 2011 +0100

    callcatcher: remove unused getTunnelIdentifier

diff --git a/vcl/inc/vcl/canvastools.hxx b/vcl/inc/vcl/canvastools.hxx
index 556af31..1a134e8 100644
--- a/vcl/inc/vcl/canvastools.hxx
+++ b/vcl/inc/vcl/canvastools.hxx
@@ -144,11 +144,6 @@ namespace vcl
         ::BitmapEx VCL_DLLPUBLIC bitmapExFromXBitmap( const ::com::sun::star::uno::Reference< 
                                                             ::com::sun::star::rendering::XIntegerReadOnlyBitmap >& xInputBitmap );
 
-        /** get a unique identifier for identification in XUnoTunnel interface
-         */
-         enum TunnelIdentifierType { Id_BitmapEx = 0 };
-         const com::sun::star::uno::Sequence< sal_Int8 > VCL_DLLPUBLIC getTunnelIdentifier( TunnelIdentifierType eType );
-
         // Color conversions (vcl/tools Color <-> canvas standard color space)
         // ===================================================================
 
diff --git a/vcl/source/helper/canvastools.cxx b/vcl/source/helper/canvastools.cxx
index 04c88a7..3fa0930 100644
--- a/vcl/source/helper/canvastools.cxx
+++ b/vcl/source/helper/canvastools.cxx
@@ -185,23 +185,6 @@ namespace vcl
 
         //---------------------------------------------------------------------------------------
 
-        const uno::Sequence< sal_Int8 > getTunnelIdentifier( TunnelIdentifierType eType )
-        {
-            static boost::unordered_map< int, uno::Sequence< sal_Int8 > > aIds;
-            boost::unordered_map< int, uno::Sequence< sal_Int8 > >::iterator it =
-                aIds.find( eType );
-            if( it == aIds.end() )
-            {
-                uno::Sequence< sal_Int8 > aNewId( 16 );
-                rtl_createUuid( (sal_uInt8*)aNewId.getArray(), NULL, sal_True );
-                aIds[ eType ] = aNewId;
-                it = aIds.find( eType );
-            }
-            return it->second;
-        }
-
-        //---------------------------------------------------------------------------------------
-
         namespace
         {
             inline bool operator==( const rendering::IntegerBitmapLayout& rLHS, 
commit 525d855f6d8ee67d230297070e89aaf79cfcf1e1
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Jul 16 22:15:49 2011 +0100

    add a SvStream::remainingSize

diff --git a/tools/inc/tools/stream.hxx b/tools/inc/tools/stream.hxx
index db135f6..cc6302d 100644
--- a/tools/inc/tools/stream.hxx
+++ b/tools/inc/tools/stream.hxx
@@ -390,6 +390,8 @@ public:
     sal_Size		Seek( sal_Size nPos );
     sal_Size		SeekRel( sal_sSize nPos );
     sal_Size		Tell() const { return nBufFilePos+nBufActualPos;  }
+    //length between current (Tell()) pos and end of stream
+    sal_Size		remainingSize();
     void			Flush();
     sal_Bool		IsEof() const { return bIsEof; }
     // next Tell() <= nSize
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index eecd612..ab2698f 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -1797,6 +1797,18 @@ sal_Size SvStream::Seek( sal_Size nFilePos )
     return nBufFilePos + nBufActualPos;
 }
 
+//probably not as inefficient as it looks seeing as STREAM_SEEK_TO_END in the
+//Seek backends is nomally special cased feel free to make this virtual and add
+//good implementations for SvFileStream etc
+sal_Size SvStream::remainingSize()
+{
+    sal_Size nCurr = Tell();
+    sal_Size nEnd = Seek(STREAM_SEEK_TO_END);
+    sal_Size nMaxAvailable = nEnd-nCurr;
+    Seek(nCurr);
+    return nMaxAvailable;
+}
+
 /*************************************************************************
 |*
 |*    Stream::Flush()
commit fc30e063840016ad930fa64c8a58360f1cab8b38
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jul 15 22:18:44 2011 +0100

    callcatcher: unused methods

diff --git a/tools/inc/tools/inetmime.hxx b/tools/inc/tools/inetmime.hxx
index 059c34a..cf8f817 100644
--- a/tools/inc/tools/inetmime.hxx
+++ b/tools/inc/tools/inetmime.hxx
@@ -533,9 +533,6 @@ public:
 
     static void writeUTF8(INetMIMEOutputSink & rSink, sal_uInt32 nChar);
 
-    static void writeUnsigned(INetMIMEOutputSink & rSink, sal_uInt32 nValue,
-                              int nMinDigits = 1);
-
     static void writeHeaderFieldBody(INetMIMEOutputSink & rSink,
                                      HeaderFieldType eType,
                                      const UniString & rBody,
diff --git a/tools/inc/tools/inetmsg.hxx b/tools/inc/tools/inetmsg.hxx
index cf96dc9..b06541a 100644
--- a/tools/inc/tools/inetmsg.hxx
+++ b/tools/inc/tools/inetmsg.hxx
@@ -482,7 +482,6 @@ public:
         return GetHeaderValue (m_nIndex[INETMSG_MIME_VERSION]);
     }
 
-    void      SetContentDescription (const UniString& rDescription);
     UniString GetContentDescription (void) const
     {
         return GetHeaderValue (m_nIndex[INETMSG_MIME_CONTENT_DESCRIPTION]);
diff --git a/tools/source/inet/inetmime.cxx b/tools/source/inet/inetmime.cxx
index 2e201cc..6ec7278 100644
--- a/tools/source/inet/inetmime.cxx
+++ b/tools/source/inet/inetmime.cxx
@@ -1958,23 +1958,6 @@ void INetMIME::writeUTF8(INetMIMEOutputSink & rSink, sal_uInt32 nChar)
 
 //============================================================================
 // static
-void INetMIME::writeUnsigned(INetMIMEOutputSink & rSink, sal_uInt32 nValue,
-                             int nMinDigits)
-{
-    sal_Char aBuffer[10];
-        // max unsigned 32 bit value (4294967295) has 10 places
-    sal_Char * p = aBuffer;
-    for (; nValue > 0; nValue /= 10)
-        *p++ = sal_Char(getDigit(nValue % 10));
-    nMinDigits -= p - aBuffer;
-    while (nMinDigits-- > 0)
-        rSink << '0';
-    while (p != aBuffer)
-        rSink << *--p;
-}
-
-//============================================================================
-// static
 void INetMIME::writeHeaderFieldBody(INetMIMEOutputSink & rSink,
                                     HeaderFieldType eType,
                                     const UniString & rBody,
diff --git a/tools/source/inet/inetmsg.cxx b/tools/source/inet/inetmsg.cxx
index aa6a003..1645e9b 100644
--- a/tools/source/inet/inetmsg.cxx
+++ b/tools/source/inet/inetmsg.cxx
@@ -1005,14 +1005,6 @@ void INetMIMEMessage::SetMIMEVersion (const UniString& rVersion)
         m_nIndex[INETMSG_MIME_VERSION]);
 }
 
-void INetMIMEMessage::SetContentDescription (const String& rDescription)
-{
-    SetHeaderField_Impl (
-        INetMIME::HEADER_FIELD_TEXT,
-        MIMEHDR(INETMSG_MIME_CONTENT_DESCRIPTION), rDescription,
-        m_nIndex[INETMSG_MIME_CONTENT_DESCRIPTION]);
-}
-
 void INetMIMEMessage::SetContentDisposition (const String& rDisposition)
 {
     SetHeaderField_Impl (
diff --git a/vcl/inc/vcl/print.hxx b/vcl/inc/vcl/print.hxx
index a04fd3f..c917169 100644
--- a/vcl/inc/vcl/print.hxx
+++ b/vcl/inc/vcl/print.hxx
@@ -265,7 +265,6 @@ private:
     SAL_DLLPRIVATE void			ImplUpdatePageData();
     SAL_DLLPRIVATE void			ImplUpdateFontList();
     SAL_DLLPRIVATE void			ImplFindPaperFormatForUserSize( JobSetup&, bool bMatchNearest );
-    DECL_DLLPRIVATE_LINK(       ImplDestroyPrinterAsync, void* );
 
     SAL_DLLPRIVATE bool StartJob( const rtl::OUString& rJobName, boost::shared_ptr<vcl::PrinterController>& );
     
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index dcb55ef..734f2c8 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -1440,16 +1440,6 @@ sal_uLong Printer::ImplSalPrinterErrorCodeToVCL( sal_uLong nError )
 
 // -----------------------------------------------------------------------
 
-IMPL_LINK( Printer, ImplDestroyPrinterAsync, void*, pSalPrinter )
-{
-    SalPrinter* pPrinter = (SalPrinter*)pSalPrinter;
-    ImplSVData* pSVData = ImplGetSVData();
-    pSVData->mpDefInst->DestroyPrinter( pPrinter );
-    return 0;
-}
-
-// -----------------------------------------------------------------------
-
 sal_Bool Printer::EndJob()
 {
     sal_Bool bRet = sal_False;
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 7907b45..e25ac80 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -194,8 +194,6 @@ public:
     void            UpdateDragRect();
                     DECL_LINK( SelectHdl, Accelerator* );
 
-    void            StartCustomizeMode();
-    void            EndCustomizeMode();
     sal_Bool            IsCustomizeMode() { return mbCustomizeMode; }
     sal_Bool            IsResizeMode() { return mbResizeMode; }
 };
@@ -1503,29 +1501,6 @@ IMPL_LINK( ImplTBDragMgr, SelectHdl, Accelerator*, pAccel )
 
 // -----------------------------------------------------------------------
 
-void ImplTBDragMgr::StartCustomizeMode()
-{
-    mbCustomizeMode = sal_True;
-
-    for ( size_t i = 0, n = mpBoxList->size(); i < n; ++i ) {
-        (*mpBoxList)[ i ]->ImplStartCustomizeMode();
-    }
-}
-
-// -----------------------------------------------------------------------
-
-void ImplTBDragMgr::EndCustomizeMode()
-{
-    mbCustomizeMode = sal_False;
-
-    for ( size_t i = 0, n = mpBoxList->size(); i < n; ++i ) {
-        (*mpBoxList)[ i ]->ImplEndCustomizeMode();
-    }
-}
-
-// -----------------------------------------------------------------------
-
-
 static void ImplDrawOutButton( OutputDevice* pOutDev, const Rectangle& rRect,
                                sal_uInt16 nStyle )
 {
commit 97ca75689ae93533d4eb3ef012d308a7d0a0d42c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jul 14 22:07:32 2011 +0100

    callcatcher: remove unused methods

diff --git a/svl/inc/svl/urihelper.hxx b/svl/inc/svl/urihelper.hxx
index f89dc40..4607c1b 100644
--- a/svl/inc/svl/urihelper.hxx
+++ b/svl/inc/svl/urihelper.hxx
@@ -177,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/source/misc/urihelper.cxx b/svl/source/misc/urihelper.cxx
index a30439d..feed4a8 100644
--- a/svl/source/misc/urihelper.cxx
+++ b/svl/source/misc/urihelper.cxx
@@ -865,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/svtools/inc/svtools/syntaxhighlight.hxx b/svtools/inc/svtools/syntaxhighlight.hxx
index 2856566..9c81704 100644
--- a/svtools/inc/svtools/syntaxhighlight.hxx
+++ b/svtools/inc/svtools/syntaxhighlight.hxx
@@ -129,14 +129,6 @@ class SimpleTokenizer_Impl
     sal_Bool getNextToken( /*out*/TokenTypes& reType,
         /*out*/const sal_Unicode*& rpStartPos, /*out*/const sal_Unicode*& rpEndPos );
 
-    String getTokStr( /*out*/const sal_Unicode* pStartPos, /*out*/const sal_Unicode* pEndPos );
-
-#ifdef DBG_UTIL
-    // TEST: Token ausgeben
-    String getFullTokenStr( /*out*/TokenTypes eType,
-        /*out*/const sal_Unicode* pStartPos, /*out*/const sal_Unicode* pEndPos );
-#endif
-
     const char** ppListKeyWords;
     sal_uInt16 nKeyWordCount;
 
diff --git a/svtools/source/edit/syntaxhighlight.cxx b/svtools/source/edit/syntaxhighlight.cxx
index a8263fa..d0ad721 100644
--- a/svtools/source/edit/syntaxhighlight.cxx
+++ b/svtools/source/edit/syntaxhighlight.cxx
@@ -675,41 +675,6 @@ sal_Bool SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType,
     return sal_True;
 }
 
-String SimpleTokenizer_Impl::getTokStr
-    ( /*out*/const sal_Unicode* pStartPos, /*out*/const sal_Unicode* pEndPos )
-{
-    return String( pStartPos, (sal_uInt16)( pEndPos - pStartPos ) );
-}
-
-#ifdef DBG_UTIL
-// TEST: Token ausgeben
-String SimpleTokenizer_Impl::getFullTokenStr( /*out*/TokenTypes eType,
-    /*out*/const sal_Unicode* pStartPos, /*out*/const sal_Unicode* pEndPos )
-{
-    String aOut;
-    switch( eType )
-    {
-        case TT_UNKNOWN:	aOut = String( RTL_CONSTASCII_USTRINGPARAM("TT_UNKNOWN:") ); break;
-        case TT_IDENTIFIER:	aOut = String( RTL_CONSTASCII_USTRINGPARAM("TT_IDENTIFIER:") ); break;
-        case TT_WHITESPACE:	aOut = String( RTL_CONSTASCII_USTRINGPARAM("TT_WHITESPACE:") ); break;
-        case TT_NUMBER:		aOut = String( RTL_CONSTASCII_USTRINGPARAM("TT_NUMBER:") ); break;
-        case TT_STRING:		aOut = String( RTL_CONSTASCII_USTRINGPARAM("TT_STRING:") ); break;
-        case TT_EOL:		aOut = String( RTL_CONSTASCII_USTRINGPARAM("TT_EOL:") ); break;
-        case TT_COMMENT:	aOut = String( RTL_CONSTASCII_USTRINGPARAM("TT_COMMENT:") ); break;
-        case TT_ERROR:		aOut = String( RTL_CONSTASCII_USTRINGPARAM("TT_ERROR:") ); break;
-        case TT_OPERATOR:	aOut = String( RTL_CONSTASCII_USTRINGPARAM("TT_OPERATOR:") ); break;
-        case TT_KEYWORDS:	aOut = String( RTL_CONSTASCII_USTRINGPARAM("TT_KEYWORD:") ); break;
-        case TT_PARAMETER:	aOut = String( RTL_CONSTASCII_USTRINGPARAM("TT_PARAMETER:") ); break;
-    }
-    if( eType != TT_EOL )
-    {
-        aOut += String( pStartPos, (sal_uInt16)( pEndPos - pStartPos ) );
-    }
-    aOut += String( RTL_CONSTASCII_USTRINGPARAM("\n") );
-    return aOut;
-}
-#endif
-
 SimpleTokenizer_Impl::SimpleTokenizer_Impl( HighlighterLanguage aLang ): aLanguage(aLang)
 {
     memset( aCharTypeTab, 0, sizeof( aCharTypeTab ) );
diff --git a/vcl/inc/vcl/window.hxx b/vcl/inc/vcl/window.hxx
index d08d1bd..8d45bf8 100644
--- a/vcl/inc/vcl/window.hxx
+++ b/vcl/inc/vcl/window.hxx
@@ -914,7 +914,6 @@ public:
     void                SetFakeFocus( bool bFocus );
 
     sal_Bool                IsCompoundControl() const;
-    sal_Bool                HasCompoundControlFocus() const;
 
     static sal_uIntPtr  SaveFocus();
     static sal_Bool         EndSaveFocus( sal_uIntPtr nSaveId, sal_Bool bRestore = sal_True );
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index c4dae46..e4f001e 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -1759,11 +1759,6 @@ sal_Bool Window::IsCompoundControl() const
     return mpWindowImpl->mbCompoundControl; 
 }
 
-sal_Bool Window::HasCompoundControlFocus() const 
-{ 
-    return mpWindowImpl->mbCompoundControlHasFocus; 
-}
-
 sal_Bool Window::IsChildPointerOverwrite() const 
 {
     return mpWindowImpl->mbChildPtrOverwrite; 
commit e69d830ef834e314b35ae695c7987032372a8749
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jul 14 22:06:47 2011 +0100

    callcatcher: remove unused methods

diff --git a/l10ntools/inc/export.hxx b/l10ntools/inc/export.hxx
index 9d3b895..eaa618e 100644
--- a/l10ntools/inc/export.hxx
+++ b/l10ntools/inc/export.hxx
@@ -480,7 +480,6 @@ public:
     MergeData( const ByteString &rTyp, const ByteString &rGID, const ByteString &rLID , const ByteString &rFilename )
             : sTyp( rTyp ), sGID( rGID ), sLID( rLID ) , sFilename( rFilename ) {};
     ~MergeData();
-    PFormEntrys* InsertEntry( const ByteString &rPForm );
     PFormEntrys* GetPFormEntrys( ResData *pResData );
 
     void Insert( const ByteString& rPFO , PFormEntrys* pfEntrys );
diff --git a/l10ntools/inc/l10ntools/file.hxx b/l10ntools/inc/l10ntools/file.hxx
index 9b90c27..fae252e 100644
--- a/l10ntools/inc/l10ntools/file.hxx
+++ b/l10ntools/inc/l10ntools/file.hxx
@@ -14,7 +14,6 @@ class File
     rtl::OUString getFileName(){ return sFileName; }
     rtl::OUString getFullName(){ return sFullName; }
 
-    File( const rtl::OUString sFile );
     File( const rtl::OUString sFullName , const rtl::OUString sFile );
 
     static bool lessFile ( const File& rKey1, const File& rKey2 );
diff --git a/l10ntools/source/file.cxx b/l10ntools/source/file.cxx
index 097d1a7..de2df9a 100644
--- a/l10ntools/source/file.cxx
+++ b/l10ntools/source/file.cxx
@@ -34,11 +34,6 @@
 namespace transex
 {
     
-File::File( const rtl::OUString sFile )
-{
-    sFileName = sFile;
-}
-
 File::File( const rtl::OUString sFullPath , const rtl::OUString sFile )
 {
     sFileName = sFile;
diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx
index 4a992bb..670d646 100644
--- a/l10ntools/source/localize.cxx
+++ b/l10ntools/source/localize.cxx
@@ -204,12 +204,6 @@ private:
         const ByteString &rCollectMode
     );
     void WorkOnDirectory( const ByteString &rDirectory );
-    sal_Bool MergeSingleFile(
-        const ByteString &rPrj,
-        const ByteString &rFile,
-        const ByteString &rSDFFile
-    );
-
 public:
     SourceTreeLocalizer( const ByteString &rRoot, const ByteString &rVersion , bool bLocal , bool skip_links );
     ~SourceTreeLocalizer();
@@ -561,144 +555,6 @@ sal_Bool SourceTreeLocalizer::Extract( const ByteString &rDestinationFile )
     return bReturn;
 }
 
-/*****************************************************************************/
-sal_Bool SourceTreeLocalizer::MergeSingleFile( 
-    const ByteString &rPrj, 
-    const ByteString &rFile, 
-    const ByteString &rSDFFile 
-)
-/*****************************************************************************/
-{
-    //printf("MergeSingleFile(%s,%s,%s)",rPrj.GetBuffer(),rFile.GetBuffer(),rSDFFile.GetBuffer());
-    if ( !rFile.Len())
-        return sal_True;
-
-    ByteString sRoot( Export::GetEnv( "SRC_ROOT" ));
-    DirEntry aEntry( String( sRoot, RTL_TEXTENCODING_ASCII_US ));
-    aEntry += DirEntry( String( rPrj, RTL_TEXTENCODING_ASCII_US ));
-
-    ByteString sDelimiter( 
-        DirEntry::GetAccessDelimiter(), RTL_TEXTENCODING_ASCII_US );
-
-    ByteString sCur( rFile );
-    sCur.SearchAndReplaceAll( "\\", sDelimiter );
-    sCur.SearchAndReplaceAll( "/", sDelimiter );
-
-    aEntry += DirEntry( String( sCur, RTL_TEXTENCODING_ASCII_US ));
-    ByteString sFile( aEntry.GetFull(), RTL_TEXTENCODING_ASCII_US );
-
-    ByteString sBCur( aEntry.GetFull(), RTL_TEXTENCODING_ASCII_US );
-
-    sal_uLong nIndex = 0;
-    ByteString sExtension( aEntry.GetExtension(), RTL_TEXTENCODING_ASCII_US );
-    ByteString sCandidate( ExeTable[ nIndex ][ 0 ] );
-
-    while( !sCandidate.Equals ("NULL") && !sCandidate.Equals(sExtension) ) 
-        sCandidate = ExeTable[ ++nIndex ][ 0 ];
-
-    if ( !sCandidate.Equals( "NULL" ) ) {
-        if( !aEntry.Exists()) {
-            DirEntryKind theDir=FSYS_KIND_FILE;
-            Dir myDir( aEntry.GetPath(), theDir);
-            DirEntry current;
-            sal_Bool found=sal_False;
-            for( sal_uInt16 x=0; x < myDir.Count() && !found;){
-                current=myDir[x++];
-                StringCompare result=current.GetName().CompareIgnoreCaseToAscii( aEntry.GetName() );
-                if( result==COMPARE_EQUAL ){
-                    fprintf(stderr,"WARNING: %s not found\n", ByteString(aEntry.GetFull(),RTL_TEXTENCODING_ASCII_US).GetBuffer() );
-                    fprintf(stderr,"but use  %s instead \n" , ByteString(current.GetFull(), RTL_TEXTENCODING_ASCII_US).GetBuffer() );
-                    aEntry=current;
-                    found=sal_True;
-                }
-            }
-            if(!found)	return sal_True;
-        
-        } 
-    
-        DirEntry aOut( Export::GetTempFile() );
-        ByteString sOutput;
-        if( sOutputFile.Len() == 0 )
-            sOutput = ByteString ( aOut.GetFull(), RTL_TEXTENCODING_ASCII_US );
-        else
-            sOutput = sOutputFile;
-        ByteString sCommand( ExeTable[ nIndex ][ 1 ] );
-        sCommand += " -i ";
-        sCommand += ByteString( aEntry.GetName(), RTL_TEXTENCODING_ASCII_US );
-        sCommand += " -m ";
-        sCommand += rSDFFile;
-        sCommand += " -o ";
-        sCommand += sOutput;
-        sCommand += " ";
-        sCommand += ByteString( ExeTable[ nIndex ][ 2 ] );
-        if ( sLanguageRestriction.Len()) {
-            sCommand += " -l ";
-            sCommand += sLanguageRestriction;
-        }
-
-        DirEntry aPath( aEntry.GetPath());
-        DirEntry aOldCWD;
-        aPath.SetCWD();
-
-        if (system(sCommand.GetBuffer()) == -1)
-            fprintf(stderr, "%s failed\n", sCommand.GetBuffer());
-        nFileCnt++;
-        printf(".");
-        SvFileStream aInStream( aOut.GetFull(), STREAM_READ );
-        if ( !aInStream.IsOpen()) {
-            fprintf( stderr, 
-                "ERROR: Unable to open file %s for reading!\n", 
-                sOutput.GetBuffer());
-        }
-        else {
-            FileStat::SetReadOnlyFlag( aEntry, sal_False );
-            String myStr2(aEntry.GetFull());
-            String aTemp22 = String::CreateFromAscii("_tmp");
-            myStr2.Append(aTemp22);
-
-            ByteString test(myStr2,RTL_TEXTENCODING_ASCII_US);
-            SvFileStream aOutStream( myStr2, STREAM_STD_WRITE | STREAM_TRUNC );
-            if ( !aOutStream.IsOpen()) {
-                ByteString test2(myStr2,RTL_TEXTENCODING_ASCII_US);
-                fprintf( stderr,"ERROR: Unable to open file %s for modification!\n", test2.GetBuffer());
-                aInStream.Close();
-            }                                                
-            
-            else {
-                ByteString sLine; 
-                aOutStream.SetLineDelimiter( LINEEND_LF );
-                
-                aInStream.ReadLine( sLine );
-                while ( !aInStream.IsEof()) {
-                    aOutStream.WriteLine( sLine );
-                    aInStream.ReadLine( sLine );
-                }
-                aInStream.Close();
-                aOutStream.Close();
-                
-                                    
-                    DirEntry myTempFile(ByteString(myStr2,RTL_TEXTENCODING_ASCII_US));		// xxx_tmp ->
-                    DirEntry myFile(ByteString(aEntry.GetFull(),RTL_TEXTENCODING_ASCII_US));// xxx
-
-                    DirEntry oldFile(ByteString(aEntry.GetFull(),RTL_TEXTENCODING_ASCII_US));
-                    
-                    if(oldFile.Kill()==ERRCODE_NONE){
-                        if(myTempFile.MoveTo(myFile)!=ERRCODE_NONE){
-                            fprintf( stderr, "ERROR: Can't rename file %s\n",ByteString(myStr2,RTL_TEXTENCODING_ASCII_US).GetBuffer());	
-                        }
-                    }    
-                    else{
-                        fprintf( stderr, "ERROR: Can't remove file %s\n",ByteString(aEntry.GetFull(),RTL_TEXTENCODING_ASCII_US).GetBuffer());
-                    }
-                } // else
-                
-                aOldCWD.SetCWD();
-                aOut.Kill();
-            }	// else
-        }
-    return sal_True;
-}
-
 } 
 using namespace transex3;
 
diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx
index e057b68..2304a08 100644
--- a/l10ntools/source/merge.cxx
+++ b/l10ntools/source/merge.cxx
@@ -155,14 +155,6 @@ PFormEntrys* MergeData::GetPFObject( const ByteString& rPFO ){
     return NULL;
 }
 
-
-PFormEntrys *MergeData::InsertEntry( const ByteString &rPForm )
-{
-    PFormEntrys* pFEntrys = new PFormEntrys( rPForm );
-    aMap.insert( PFormEntrysHashMap::value_type( rPForm , pFEntrys ) );
-    return pFEntrys;
-}
-
 sal_Bool MergeData::operator==( ResData *pData )
 {
     ByteString sResTyp_upper( pData->sResTyp );


More information about the Libreoffice-commits mailing list