[Libreoffice-commits] .: hwpfilter/source lingucomponent/source rsc/source sal/osl sal/rtl

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Oct 17 00:33:49 PDT 2012


 hwpfilter/source/drawing.h                          |    5 ---
 lingucomponent/source/lingutil/lingutil.cxx         |   16 ----------
 lingucomponent/source/lingutil/lingutil.hxx         |    6 ---
 lingucomponent/source/thesaurus/libnth/nthesdta.cxx |   12 -------
 lingucomponent/source/thesaurus/libnth/nthesdta.hxx |    7 ----
 lingucomponent/source/thesaurus/libnth/nthesimp.cxx |   14 ---------
 rsc/source/parser/rscinit.cxx                       |    6 ---
 sal/osl/w32/security.c                              |   31 --------------------
 sal/rtl/source/strimp.hxx                           |   14 ---------
 9 files changed, 111 deletions(-)

New commits:
commit 625e91c75fe66d4e067213a561f19e626cfbfa93
Author: Marcos Paulo de Souza <marcos.souza.org at gmail.com>
Date:   Mon Oct 8 20:02:03 2012 -0300

    More useless code, "#if 0" blocks in lingucomponent, sal, and rsc
    
    Change-Id: I1dda0f2b3bc2bb4a4a877c160026e53a90471d54
    Signed-off-by: Marcos Paulo de Souza <marcos.souza.org at gmail.com>

diff --git a/hwpfilter/source/drawing.h b/hwpfilter/source/drawing.h
index 00d9225..dfc31bf 100644
--- a/hwpfilter/source/drawing.h
+++ b/hwpfilter/source/drawing.h
@@ -652,11 +652,6 @@ HWPDrawingObject::HWPDrawingObject()
 
 HWPDrawingObject::~HWPDrawingObject()
 {
-#if 0
-    if (hdo->property.pictype == PICTYP_EMBED)
-        RemoveEmbeddedPic(hdo->property.szPatternFile);
-    hdo->property.szPatternFile[0] = 0;
-#endif
     if (child)
         delete child;
 
diff --git a/lingucomponent/source/lingutil/lingutil.cxx b/lingucomponent/source/lingutil/lingutil.cxx
index 89dcc77..ca5f34b 100644
--- a/lingucomponent/source/lingutil/lingutil.cxx
+++ b/lingucomponent/source/lingutil/lingutil.cxx
@@ -47,22 +47,6 @@
 using ::com::sun::star::lang::Locale;
 using namespace ::com::sun::star;
 
-#if 0
-//////////////////////////////////////////////////////////////////////
-
-String GetDirectoryPathFromFileURL( const String &rFileURL )
-{
-    // get file URL
-    INetURLObject aURLObj;
-    aURLObj.SetSmartProtocol( INET_PROT_FILE );
-    aURLObj.SetSmartURL( rFileURL );
-    aURLObj.removeSegment();
-    DBG_ASSERT( !aURLObj.HasError(), "invalid URL" );
-    String aRes = aURLObj.GetMainURL( INetURLObject::DECODE_TO_IURI );
-    return aRes;
-}
-#endif
-
 #if defined(WNT)
 rtl::OString Win_GetShortPathName( const rtl::OUString &rLongPathName )
 {
diff --git a/lingucomponent/source/lingutil/lingutil.hxx b/lingucomponent/source/lingutil/lingutil.hxx
index f1e0e45..3f1c998 100644
--- a/lingucomponent/source/lingutil/lingutil.hxx
+++ b/lingucomponent/source/lingutil/lingutil.hxx
@@ -58,12 +58,6 @@ inline sal_Bool operator == ( const ::com::sun::star::lang::Locale &rL1, const :
             rL1.Variant  ==  rL2.Variant;
 }
 
-#if 0
-///////////////////////////////////////////////////////////////////////////
-
-String GetDirectoryPathFromFileURL( const String &rFileURL );
-#endif
-
 #if defined(WNT)
 ///////////////////////////////////////////////////////////////////////////
 // to be use to get a short path name under Windows that still can be used with
diff --git a/lingucomponent/source/thesaurus/libnth/nthesdta.cxx b/lingucomponent/source/thesaurus/libnth/nthesdta.cxx
index 88503c0..4468f2e 100644
--- a/lingucomponent/source/thesaurus/libnth/nthesdta.cxx
+++ b/lingucomponent/source/thesaurus/libnth/nthesdta.cxx
@@ -39,12 +39,7 @@ namespace linguistic
 ///////////////////////////////////////////////////////////////////////////
 
 Meaning::Meaning(
-#if 0
-            const OUString &rTerm, sal_Int16 nLang,
-            const PropertyHelper_Thes &rHelper ) :
-#else
             const OUString &rTerm, sal_Int16 nLang) :
-#endif
 
     aSyn        ( Sequence< OUString >(1) ),
     aTerm       (rTerm),
@@ -91,13 +86,6 @@ void Meaning::SetMeaning( const OUString &rTerm )
         aTerm = rTerm;
 }
 
-///////////////////////////////////////////////////////////////////////////
-
 }   // namespace linguistic
 
-
-
-
-
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lingucomponent/source/thesaurus/libnth/nthesdta.hxx b/lingucomponent/source/thesaurus/libnth/nthesdta.hxx
index ddc98bd..7e5eb00 100644
--- a/lingucomponent/source/thesaurus/libnth/nthesdta.hxx
+++ b/lingucomponent/source/thesaurus/libnth/nthesdta.hxx
@@ -52,11 +52,7 @@ class Meaning :
     Meaning & operator = (const Meaning &);
 
 public:
-#if 0
-    Meaning(const ::rtl::OUString &rTerm, sal_Int16 nLang, const PropertyHelper_Thes &rHelper);
-#else
     Meaning(const ::rtl::OUString &rTerm, sal_Int16 nLang);
-#endif
     virtual ~Meaning();
 
     // XMeaning
@@ -68,9 +64,6 @@ public:
     void    SetMeaning( const ::rtl::OUString  &rTerm );
 };
 
-
-///////////////////////////////////////////////////////////////////////////
-
 }   // namespace linguistic
 
 #endif
diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
index 6867aa9..b5869c9 100644
--- a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
+++ b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
@@ -415,10 +415,6 @@ Sequence < Reference < ::com::sun::star::linguistic2::XMeaning > > SAL_CALL Thes
                     codeTerm = seq[0];
                     stem2 = 1;
                 }
-#if 0
-                OString o = OUStringToOString(codeTerm, RTL_TEXTENCODING_UTF8);
-                fprintf(stderr, "CODETERM: %s\n", o.pData->buffer);
-#endif
             }
         }
 
@@ -479,9 +475,6 @@ Sequence < Reference < ::com::sun::star::linguistic2::XMeaning > > SAL_CALL Thes
                     OUString aAlt( cTerm + catst);
                     pStr[i] = aAlt;
                 }
-#if 0
-                Meaning * pMn = new Meaning(rTerm,nLanguage,rHelper);
-#endif
                 Meaning * pMn = new Meaning(rTerm,nLanguage);
                 OUString dTerm(pe->defn,strlen(pe->defn),eEnc );
                 pMn->SetMeaning(dTerm);
@@ -514,13 +507,6 @@ Sequence < Reference < ::com::sun::star::linguistic2::XMeaning > > SAL_CALL Thes
         if (xTmpRes.is())
         {
             Sequence<OUString>seq = xTmpRes->getAlternatives();
-#if 0
-            for (int i = 0; i < seq.getLength(); i++)
-            {
-                OString o = OUStringToOString(seq[i], RTL_TEXTENCODING_UTF8);
-                fprintf(stderr, "%d: %s\n", i + 1, o.pData->buffer);
-            }
-#endif
             if (seq.getLength() > 0)
             {
                 rTerm = seq[0];  // XXX Use only the first stem
diff --git a/rsc/source/parser/rscinit.cxx b/rsc/source/parser/rscinit.cxx
index f027b56..541af05 100644
--- a/rsc/source/parser/rscinit.cxx
+++ b/rsc/source/parser/rscinit.cxx
@@ -173,12 +173,6 @@ void RscTypCont::Init()
     aNmTb.Put( "TRUE",               BOOLEAN,        (long)sal_True  );
     aNmTb.Put( "FALSE",              BOOLEAN,        (long)sal_False );
 
-    #if 0
-/* Vordefinierte HilfeId's */
-    aNmTb.Put( "HELP_INDEX",         NUMBER,     OOO_HELP_INDEX      );
-    aNmTb.Put( "HELP_HELPONHELP",    NUMBER,     OOO_HELP_HELPONHELP );
-    #endif
-
     aNmTb.Put( "XSCALE",             XSCALE ,        (long)0     );
     aNmTb.Put( "YSCALE",             YSCALE ,        (long)0     );
     aNmTb.Put( "RGB",                RGB    ,        (long)0     );
diff --git a/sal/osl/w32/security.c b/sal/osl/w32/security.c
index 82fd833..a05614b 100644
--- a/sal/osl/w32/security.c
+++ b/sal/osl/w32/security.c
@@ -464,37 +464,6 @@ sal_Bool SAL_CALL osl_getHomeDir(oslSecurity Security, rtl_uString **pustrDirect
         }
         else
         {
-#if 0
-            if (pSecImpl->m_hToken)
-            {
-                DWORD  nInfoBuffer = 512;
-                UCHAR* pInfoBuffer = malloc(nInfoBuffer);
-
-                while (!GetTokenInformation(pSecImpl->m_hToken, TokenUser,
-                                               pInfoBuffer, nInfoBuffer, &nInfoBuffer))
-                {
-                    if (GetLastError() == ERROR_INSUFFICIENT_BUFFER)
-                        pInfoBuffer = realloc(pInfoBuffer, nInfoBuffer);
-                    else
-                    {
-                        free(pInfoBuffer);
-                        pInfoBuffer = NULL;
-                        break;
-                    }
-                }
-
-                /* not implemented */
-                OSL_ASSERT(sal_False);
-
-                if (pInfoBuffer)
-                {
-                    /* if (EqualSid() ... */
-
-                }
-            }
-            else
-#endif
-
                 bSuccess = (sal_Bool)(GetSpecialFolder(&ustrSysDir, CSIDL_PERSONAL) &&
                                      (osl_File_E_None == osl_getFileURLFromSystemPath(ustrSysDir, pustrDirectory)));
         }
diff --git a/sal/rtl/source/strimp.hxx b/sal/rtl/source/strimp.hxx
index 82f7f41..6face21 100644
--- a/sal/rtl/source/strimp.hxx
+++ b/sal/rtl/source/strimp.hxx
@@ -55,22 +55,8 @@ sal_Int16 rtl_ImplGetDigit( sal_Unicode ch, sal_Int16 nRadix );
 sal_Bool rtl_ImplIsWhitespace( sal_Unicode c );
 
 // string lifetime instrumentation / diagnostics
-#if 0
-#  include <rtl/ustring.hxx>
-#  define RTL_LOG_STRING_NEW(s)                                              \
-      do {                                                                     \
-          fprintf (stderr, "+%s\n",                                            \
-                   rtl::OUStringToOString(s, RTL_TEXTENCODING_UTF8).getStr()); \
-      } while (0)
-#  define RTL_LOG_STRING_DELETE(s)                                           \
-      do {                                                                     \
-          fprintf (stderr, "-%s\n",                                            \
-                   rtl::OUStringToOString(s, RTL_TEXTENCODING_UTF8).getStr()); \
-      } while (0)
-#else
 #  define RTL_LOG_STRING_NEW(s)
 #  define RTL_LOG_STRING_DELETE(s)
-#endif
 
 #endif /* INCLUDED_RTL_SOURCE_STRIMP_HXX */
 


More information about the Libreoffice-commits mailing list