[Libreoffice-commits] .: 3 commits - tools/inc tools/source

Caolán McNamara caolan at kemper.freedesktop.org
Tue Sep 13 09:30:26 PDT 2011


 tools/inc/tools/shl.hxx          |   74 +++++++++++++++++++--------------------
 tools/inc/toolsin.hxx            |   55 ----------------------------
 tools/source/generic/toolsin.cxx |   31 ----------------
 tools/source/string/strcvt.cxx   |   50 --------------------------
 tools/source/string/tstring.cxx  |    3 -
 5 files changed, 38 insertions(+), 175 deletions(-)

New commits:
commit 527c515873cd2337e666c817f322fdbc8f4a74bd
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Sep 13 16:40:23 2011 +0100

    include tools/tools.h for visibility markup

diff --git a/tools/source/generic/toolsin.cxx b/tools/source/generic/toolsin.cxx
index 93b3697..33c9808 100644
--- a/tools/source/generic/toolsin.cxx
+++ b/tools/source/generic/toolsin.cxx
@@ -29,7 +29,7 @@
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_tools.hxx"
 
-#define _TOOLS_TOOLSIN_CXX
+#include <tools/tools.h>
 
 #include <string.h>
 #include <tools/debug.hxx>
commit 0f4ca3860d047aee399f5bf7eda3358f14e50e77
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Sep 13 16:29:43 2011 +0100

    toolsin.hxx can go now

diff --git a/tools/inc/toolsin.hxx b/tools/inc/toolsin.hxx
deleted file mode 100644
index fa6c783..0000000
--- a/tools/inc/toolsin.hxx
+++ /dev/null
@@ -1,36 +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 _TOOLSIN_HXX
-#define _TOOLSIN_HXX
-
-#include <tools/tools.h>
-
-#endif // _TOOLSIN_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/tools/source/generic/toolsin.cxx b/tools/source/generic/toolsin.cxx
index b313865..93b3697 100644
--- a/tools/source/generic/toolsin.cxx
+++ b/tools/source/generic/toolsin.cxx
@@ -32,9 +32,7 @@
 #define _TOOLS_TOOLSIN_CXX
 
 #include <string.h>
-#include <tools/shl.hxx>
 #include <tools/debug.hxx>
-#include <toolsin.hxx>
 
 #if defined WNT
 #include <dll.hxx>
diff --git a/tools/source/string/tstring.cxx b/tools/source/string/tstring.cxx
index ec74b24..b35e9da 100644
--- a/tools/source/string/tstring.cxx
+++ b/tools/source/string/tstring.cxx
@@ -40,9 +40,6 @@
 #include <tools/string.hxx>
 #include <impstrg.hxx>
 
-// For shared byte convert tables
-#include <toolsin.hxx>
-
 #include <tools/debug.hxx>
 
 // =======================================================================
commit d1b38349da216f29c8ce7c34b4ea5e5e23dc7610
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Sep 13 16:28:20 2011 +0100

    ImplDeleteCharTabData unneeded, as nothing created to delete, ditto SHL_TOOLS

diff --git a/tools/inc/tools/shl.hxx b/tools/inc/tools/shl.hxx
index 0abf98c..aeda54d 100644
--- a/tools/inc/tools/shl.hxx
+++ b/tools/inc/tools/shl.hxx
@@ -38,57 +38,57 @@
 
 #define SHL_SHL1        0
 #define SHL_SHL2        1
-#define SHL_SHL3        2
-#define SHL_APP1        3
-#define SHL_APP2        4
-#define SHL_APP3        5
-#define SHL_TOOLS       6
-#define SHL_SV          7
+// 2 (SHL_SHL3) removed
+// 3 (SHL_APP1) removed
+// 4 (SHL_APP2) removed
+// 5 (SHL_APP3) removed
+// 6 (SHL_TOOLS) removed
+// 7 (SHL_SV) removed
 #define SHL_SVT         8
 #define SHL_SVDDE       9
 #define SHL_ERR         10
-#define SHL_IPC         11
-#define SHL_SVX         12
-#define SHL_ITEM        13
+//11 (SHL_IPC) removed
+//12 (SHL_SVX) removed
+//13 (SHL_ITEM) removed
 #define SHL_SVD         14
-#define SHL_SI          15
-#define SHL_SFC         16
-#define SHL_SFX         17
-//#define SHL_SO2       18
+//15 (SHL_SI) removed
+//16 (SHL_SFC) removed
+//17 (SHL_SFX) removed
+//18 (SHL_SO2) removed
 #define SHL_IDL         19
 #define SHL_IDE         20
-#define SHL_EDIT        21
-#define SHL_VCED        22
+//21 (SHL_EDIT) removed
+//22 (SHL_VCED) removed
 #define SHL_BASIC       23
-#define SHL_HELP        24
-#define SHL_LNKCCH      25
-#define SHL_CHANNEL     26
+//24 (SHL_HELP) removed
+//25 (SHL_LNKCCH) removed
+//26 (SHL_CHANNEL) removed
 #define SHL_SBX         27
 #define SHL_SBC         28
-#define SHL_SDB         29
-#define SHL_SBA         30
-#define SHL_SBA2        31
-#define SHL_SCH         32
-#define SHL_SIM         33
+//29 (SHL_SDB) removed
+//30 (SHL_SBA) removed
+//31 (SHL_SBA2) removed
+//32 (SHL_SCH) removed
+//33 (SHL_SIM) removed
 #define SHL_SM          34
-#define SHL_SGA         35
-#define SHL_DOCMGR      36
-// 37 removed
-#define SHL_MAIL        38
-#define SHL_NEWS        39
-#define SHL_OFFAPP      40
-#define SHL_INET        41
-#define SHL_CHAOS       42
-#define SHL_HISTORY     43
-#define SHL_SJ          44
+//35 (SHL_SGA) removed
+//36 (SHL_DOCMGR) removed
+//37 removed
+//38 (SHL_MAIL) removed
+//39 (SHL_NEWS) removed
+//40 (SHL_OFFAPP) removed
+//41 (SHL_INET) removed
+//43 (SHL_CHAOS) removed
+//43 (SHL_HISTORY) removed
+//44 (SHL_SJ) removed
 #define SHL_CALC        45
 #define SHL_DRAW        46
 #define SHL_WRITER      47
-#define SHL_MONEY       48
-#define SHL_HBCI        49
-#define SHL_BASE3D      50
+//48 (SHL_MONEY) removed
+//49 (SHL_HBCI) removed
+//50 (SHL_BASE3D) removed
 #define SHL_BRUSHITEM   51
-#define SHL_SFONTITEM   52
+//52 (SHL_SFONTITEM) removed
 
 // #110743#
 // #define SHL_COUNT        53
diff --git a/tools/inc/toolsin.hxx b/tools/inc/toolsin.hxx
index de88389..fa6c783 100644
--- a/tools/inc/toolsin.hxx
+++ b/tools/inc/toolsin.hxx
@@ -31,25 +31,6 @@
 
 #include <tools/tools.h>
 
-struct ImplRegisterLanguageData;
-struct ImplRegisterFormatData;
-struct Impl1ByteUnicodeTabData;
-struct Impl1ByteConvertTabData;
-
-// --------------
-// - TOOLSNDATA -
-// --------------
-
-struct TOOLSINDATA
-{
-    ImplRegisterLanguageData*   mpFirstLangData;
-    ImplRegisterFormatData*     mpFirstFormatData;
-    Impl1ByteUnicodeTabData*    mpFirstUniTabData;
-    Impl1ByteConvertTabData*    mpFirstConvertTabData;
-};
-
-TOOLSINDATA* ImplGetToolsInData();
-
 #endif // _TOOLSIN_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/tools/source/generic/toolsin.cxx b/tools/source/generic/toolsin.cxx
index 36ae300..b313865 100644
--- a/tools/source/generic/toolsin.cxx
+++ b/tools/source/generic/toolsin.cxx
@@ -40,23 +40,6 @@
 #include <dll.hxx>
 #endif
 
-void ImplDeleteCharTabData();
-
-// =======================================================================
-
-TOOLSINDATA* ImplGetToolsInData()
-{
-    TOOLSINDATA** ppData = (TOOLSINDATA**)GetAppData( SHL_TOOLS );
-    if ( !(*ppData) )
-    {
-        TOOLSINDATA* pData = new TOOLSINDATA;
-        memset( pData, 0, sizeof( TOOLSINDATA ) );
-        *ppData = pData;
-    }
-
-    return *ppData;
-}
-
 // =======================================================================
 
 void InitTools()
@@ -68,16 +51,6 @@ void InitTools()
 
 void DeInitTools()
 {
-    TOOLSINDATA**   ppData = (TOOLSINDATA**)GetAppData( SHL_TOOLS );
-    TOOLSINDATA*    pData = *ppData;
-
-    if ( pData )
-    {
-        ImplDeleteCharTabData();
-        delete pData;
-        *ppData = NULL;
-    }
-
     DBG_DEBUGEND();
 }
 
diff --git a/tools/source/string/strcvt.cxx b/tools/source/string/strcvt.cxx
index 2515ebf..b22685d 100644
--- a/tools/source/string/strcvt.cxx
+++ b/tools/source/string/strcvt.cxx
@@ -57,56 +57,6 @@ ByteString::ByteString( const UniString& rUniStr, rtl_TextEncoding eTextEncoding
 
 // =======================================================================
 
-struct Impl1ByteUnicodeTabData
-{
-    rtl_TextEncoding            meTextEncoding;
-    sal_Unicode                 maUniTab[256];
-    Impl1ByteUnicodeTabData*    mpNext;
-};
-
-// -----------------------------------------------------------------------
-
-struct Impl1ByteConvertTabData
-{
-    rtl_TextEncoding            meSrcTextEncoding;
-    rtl_TextEncoding            meDestTextEncoding;
-    sal_uChar                   maConvertTab[256];
-    sal_uChar                   maRepConvertTab[256];
-    Impl1ByteConvertTabData*    mpNext;
-};
-
-// =======================================================================
-
-void ImplDeleteCharTabData()
-{
-#ifndef BOOTSTRAP
-    TOOLSINDATA*                pToolsData = ImplGetToolsInData();
-#else
-    TOOLSINDATA*                pToolsData = 0x0;
-#endif
-    Impl1ByteUnicodeTabData*    pTempUniTab;
-    Impl1ByteUnicodeTabData*    pUniTab = pToolsData->mpFirstUniTabData;
-    while ( pUniTab )
-    {
-        pTempUniTab = pUniTab->mpNext;
-        delete pUniTab;
-        pUniTab = pTempUniTab;
-    }
-    pToolsData->mpFirstUniTabData = NULL;
-
-    Impl1ByteConvertTabData*    pTempConvertTab;
-    Impl1ByteConvertTabData*    pConvertTab = pToolsData->mpFirstConvertTabData;
-    while ( pConvertTab )
-    {
-        pTempConvertTab = pConvertTab->mpNext;
-        delete pConvertTab;
-        pConvertTab = pTempConvertTab;
-    }
-    pToolsData->mpFirstConvertTabData = NULL;
-}
-
-// =======================================================================
-
 ByteString::ByteString( const rtl::OString& rStr )
     : mpData(NULL)
 {


More information about the Libreoffice-commits mailing list