[Libreoffice-commits] .: 5 commits - comphelper/source cppcanvas/source i18npool/inc i18npool/source svtools/inc svtools/source

Thomas Arnhold tarnhold at kemper.freedesktop.org
Mon Jan 24 13:21:07 PST 2011


 comphelper/source/property/propertystatecontainer.cxx    |  144 -------
 cppcanvas/source/mtfrenderer/polypolyaction.cxx          |   14 
 cppcanvas/source/mtfrenderer/textaction.cxx              |   14 
 cppcanvas/source/mtfrenderer/transparencygroupaction.cxx |   15 
 i18npool/inc/xdictionary.hxx                             |   13 
 i18npool/source/breakiterator/xdictionary.cxx            |   34 -
 i18npool/source/search/levdis.cxx                        |  302 ---------------
 svtools/inc/apearcfg.hxx                                 |    6 
 svtools/source/config/apearcfg.cxx                       |   12 
 9 files changed, 9 insertions(+), 545 deletions(-)

New commits:
commit 1bda821d6466d96b473ac34c04361372dddceb4e
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Mon Jan 24 22:18:43 2011 +0100

    Remove SPECIAL_DEBUG directive.

diff --git a/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx b/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx
index cab85f3..40f580d 100644
--- a/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx
+++ b/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx
@@ -462,21 +462,6 @@ namespace cppcanvas
                 rendering::RenderState aLocalState( maState );
                 ::canvas::tools::setRenderStateTransform(aLocalState, aTransform);
 
-#ifdef SPECIAL_DEBUG
-                aLocalState.Clip.clear();
-                aLocalState.DeviceColor = 
-                    ::vcl::unotools::colorToDoubleSequence( 
-                        ::Color( 0x80FF0000 ),
-                        mpCanvas->getUNOCanvas()->getDevice()->getDeviceColorSpace() );
-
-                if( maState.Clip.is() )
-                    mpCanvas->getUNOCanvas()->fillPolyPolygon( maState.Clip, 
-                                                               mpCanvas->getViewState(), 
-                                                               aLocalState );
-
-                aLocalState.DeviceColor = maState.DeviceColor;
-#endif
-
                 if( ::rtl::math::approxEqual(mnAlpha, 1.0) )
                 {
                     // no further alpha changes necessary -> draw directly
commit d3ebbf4f51042cd018302db50396d1827e0ea9d1
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Mon Jan 24 22:18:18 2011 +0100

    Remove erTEST directive.

diff --git a/i18npool/source/search/levdis.cxx b/i18npool/source/search/levdis.cxx
index e1aecab..5acfb39 100644
--- a/i18npool/source/search/levdis.cxx
+++ b/i18npool/source/search/levdis.cxx
@@ -76,13 +76,6 @@
 
 #include "levdis.hxx"
 
-
-#ifdef erTEST
-#include <stdlib.h>
-#include <stdio.h>
-#include <iostream.h>
-#endif
-
 #ifdef SOLARIS
 #undef min
 #endif
@@ -127,25 +120,12 @@ static sal_Int32 Impl_WLD_StringLen( const sal_Unicode* pStr )
     return (sal_Int32)(pTempStr-pStr);
 }
 
-#ifdef erTESTMAT
-#define erTESTMATMAX 180
-static int npMatrix[erTESTMATMAX][erTESTMATMAX];        // nearly 64K
-#endif
-
 // Distanz von String zu Pattern
 int WLevDistance::WLD( const sal_Unicode* cString, sal_Int32 nStringLen )
 {
     int nSPMin = 0;     // StrafPunkteMinimum
     int nRepS = 0;      // fuer SplitCount
 
-#ifdef erTESTMAT
-{
-    for ( sal_Int32 r=0; r<=nStringLen && r < erTESTMATMAX; r++ )
-        for ( sal_Int32 c=0; c<=nPatternLen && c < erTESTMATMAX; c++ )
-            npMatrix[r][c] = 99;    // Matrix initialisieren, nur visuell
-}
-#endif
-
     // Laengendifferenz von Pattern und String
     int nLenDiff = nPatternLen - nStars - nStringLen;
     // mehr Einfuegungen oder Loeschungen noetig als Limit? => raus hier
@@ -164,13 +144,6 @@ int WLevDistance::WLD( const sal_Unicode* cString, sal_Int32 nStringLen )
         else
             nArrayLen = nStringLen + 1;
         npDistance = aDisMem.NewMem( nArrayLen );
-#ifdef erTEST
-        if ( !npDistance )
-        {
-            cerr << "DOOM! (Damned, Out Of Memory)" << endl;
-            exit(1);
-        }
-#endif
     }
 
     // Anfangswerte der zweiten Spalte (erstes Pattern-Zeichen) berechnen
@@ -215,9 +188,6 @@ int WLevDistance::WLD( const sal_Unicode* cString, sal_Int32 nStringLen )
                 {   // diese Stelle wird ersetzt
                     nRepS++;
                     nReplacePos = i;
-#ifdef erTESTMAT
-                    npMatrix[i][1] = -npDistance[i];
-#endif
                 }
                 else if ( nReplacePos > 0 && !nP )
                 {
@@ -226,9 +196,6 @@ int WLevDistance::WLD( const sal_Unicode* cString, sal_Int32 nStringLen )
                     if ( !nBalance )
                     {   // einer wurde ersetzt, der ein Insert war
                         nRepS--;
-#ifdef erTESTMAT
-                        npMatrix[nReplacePos][1] = npDistance[nReplacePos];
-#endif
                         nReplacePos = 0;
                     }
                 }
@@ -236,16 +203,6 @@ int WLevDistance::WLD( const sal_Unicode* cString, sal_Int32 nStringLen )
         }
         nSPMin = Min3( npDistance[0], npDistance[1], npDistance[2] );
     }
-#ifdef erTESTMAT
-{
-    for ( sal_Int32 r=0; r<=nStringLen && r < erTESTMATMAX; r++ )
-    {
-        npMatrix[r][0] = r * nInsQ0;
-        if ( npMatrix[r][1] >= 0)
-            npMatrix[r][1] = npDistance[r];
-    }
-}
-#endif
 
     // Distanzmatrix berechnen
     sal_Int32 j = 0;        // fuer alle Spalten des Pattern, solange nicht Limit
@@ -306,9 +263,6 @@ int WLevDistance::WLD( const sal_Unicode* cString, sal_Int32 nStringLen )
                 {   // diese Stelle wird ersetzt
                     nRepS++;
                     nReplacePos = i;
-#ifdef erTESTMAT
-                    npMatrix[i][j+1] = -npDistance[i];
-#endif
                 }
                 else if ( nReplacePos > 0 && !nPij )
                 {   // Zeichen in String und Pattern gleich.
@@ -323,25 +277,12 @@ int WLevDistance::WLD( const sal_Unicode* cString, sal_Int32 nStringLen )
                     if ( !nBalance )
                     {   // einer wurde ersetzt, der ein Insert war
                         nRepS--;
-#ifdef erTESTMAT
-                        npMatrix[nReplacePos][j+1] = npDistance[nReplacePos];
-#endif
                         nReplacePos = 0;
                     }
                 }
             }
         }
-#ifdef erTESTMAT
-{
-        for ( sal_Int32 r=0; r<=nStringLen && r < erTESTMATMAX; r++ )
-            if ( npMatrix[r][j+1] >= 0)
-                npMatrix[r][j+1] = npDistance[r];
-}
-#endif
     }
-#ifdef erTESTSPLIT
-    printf(" nRepS: %d ", nRepS );
-#endif
     if ( (nSPMin <= nLimit) && (npDistance[nStringLen] <= nLimit) )
         return(npDistance[nStringLen]);
     else
@@ -350,9 +291,6 @@ int WLevDistance::WLD( const sal_Unicode* cString, sal_Int32 nStringLen )
         {
             if ( nRepS && nLenDiff > 0 )
                 nRepS -= nLenDiff;      // Inserts wurden mitgezaehlt
-#ifdef erTESTSPLIT
-            printf(" nRepSdiff: %d ", nRepS );
-#endif
             if ( (nSPMin <= 2 * nLimit)
                     && (npDistance[nStringLen] <= 2 * nLimit)
                     && (nRepS * nRepP0 <= nLimit) )
@@ -494,27 +432,6 @@ void WLevDistance::InitData( const sal_Unicode* cPattern )
 }
 
 
-// CTor
-
-#ifdef erTEST
-
-WLevDistance::WLevDistance( const ::rtl::OUString& rPattern ) :
-    nPatternLen( rPattern.getLength() ),
-    aPatMem( nPatternLen + 1 ),
-    nArrayLen( nPatternLen + 1 ),
-    aDisMem( nArrayLen ),
-    nLimit( LEVDISDEFAULTLIMIT ),
-    nRepP0( LEVDISDEFAULT_P0 ),
-    nInsQ0( LEVDISDEFAULT_Q0 ),
-    nDelR0( LEVDISDEFAULT_R0 ),
-    bSplitCount( false )
-{
-    InitData( rPattern.getStr() );
-}
-
-#endif  // erTEST
-
-
 WLevDistance::WLevDistance( const sal_Unicode* cPattern,
                             int nOtherX, int nShorterY, int nLongerZ,
                             bool bRelaxed ) :
@@ -559,223 +476,4 @@ WLevDistance::~WLevDistance()
 {
 }
 
-/*************************************************************************
- * Test
- *************************************************************************/
-
-#ifdef erTEST
-
-#define LINESIZE 1000
-typedef char MAXSTRING [LINESIZE+1];
-
-#ifdef erTESTMAT
-
-void WLevDistance::ShowMatrix( const sal_Unicode* cString )
-{
-    sal_Int32 r, c, l = Impl_WLD_StringLen(cString);
-    printf("   |   ");
-    for ( c=0; c<nPatternLen; c++ )
-#error Error: conversion from sal_Unicode to char needed!
-        printf( " %c ", cpPattern[c] );
-    printf("\n---+---");
-    for ( c=0; c<nPatternLen; c++ )
-        printf( "---" );
-    for ( r=0; r<=l && r < erTESTMATMAX; r++ )
-    {
-#error Error: conversion from sal_Unicode to char needed!
-        printf( "\n %c |", ( r==0 ? ' ' : cString[r-1] ) );
-        for ( c=0; c<=nPatternLen && c < erTESTMATMAX; c++ )
-            printf( "%2d ", npMatrix[r][c] );
-    }
-    printf("\n\n");
-}
-
-#endif  // erTESTMAT
-
-// Delimiter fuer Token, \t Tab bleibt fuer immer an der ersten Stelle
-MAXSTRING cDelim = "\t, ;(){}[]<>&=+-/%!|.\\'\"~";
-
-void WLevDistance::ShowTest()
-{
-    printf("  \n");
-#error Error: conversion from sal_Unicode to char needed!
-    printf(" a *cpPattern . . . . : %s\n", cpPattern);
-    printf(" b *bpPatIsWild . . . : ");
-    for ( sal_Int32 i=0; i<nPatternLen; i++ )
-        printf("%d", bpPatIsWild[i]);
-    printf("\n");
-    printf(" c nPatternLen  . . . : %d\n", (int)nPatternLen);
-    printf(" d nStars . . . . . . : %d\n", nStars);
-    printf(" e nLimit . . . . . . : %d\n", nLimit);
-    printf(" f nRepP0 (Ersetzen)  : %d\n", nRepP0);
-    printf(" g nInsQ0 (Einfuegen) : %d\n", nInsQ0);
-    printf(" h nDelR0 (Loeschen)  : %d\n", nDelR0);
-    printf(" i bSplitCount  . . . : %d\n", bSplitCount);
-#error Error: conversion from sal_Unicode to char needed!
-    printf(" j cDelim . . . . . . : '%s'\n", cDelim);
-    printf(" ~\n");
-}
-
-inline bool IsDelim( char c )
-{
-    char* cp = cDelim;
-    while ( *cp )
-        if ( *cp++ == c )
-            return( true );
-    return( false );
-}
-
-MAXSTRING cString, cLine, cIgString;
-
-int main( int argc, char **argv )
-{
-    int nLim, nP0, nQ0, nR0, nX, nY, nZ;
-    int args = 0;
-    bool IgnoreCase = false, Direct = false, bStrict = false;
-    WLevDistance* pTest;
-    if ( argc < 2 )
-    {
-        printf("%s  Syntax:\n"
-            " ... [-i] cPattern [nOtherX, nShorterY, nLongerZ [bStrict [cDelim]]] [<stdin] [>stdout]\n"
-            " ...  -d  cPattern [nLimit [nRepP0 nInsQ0 nDelR0 [cDelim]]] [<stdin] [>stdout]\n"
-            , argv[0]);
-        exit(1);
-    }
-    if ( *argv[1] == '-' )
-    {
-        args++;
-        argc--;
-        switch ( *(argv[1]+1) )
-        {
-            case 'i':
-            {
-                IgnoreCase = true;
-                char* cp = argv[args+1];
-                while ( (*cp = tolower( *cp )) != 0 )
-                    cp++;
-        break;
-            }
-            case 'd':
-                Direct = true;
-        break;
-        }
-    }
-    if ( Direct )
-    {
-        if ( argc > 2 )
-            nLim = atoi(argv[args+2]);
-        else
-            nLim = LEVDISDEFAULTLIMIT;
-        if ( argc > 3 )
-        {
-            nP0 = atoi(argv[args+3]);
-            nQ0 = atoi(argv[args+4]);
-            nR0 = atoi(argv[args+5]);
-        }
-        else
-        {
-            nP0 = LEVDISDEFAULT_P0;
-            nQ0 = LEVDISDEFAULT_Q0;
-            nR0 = LEVDISDEFAULT_R0;
-        }
-        if ( argc > 6 )
-        {
-            strncpy( cDelim+1, argv[args+6], LINESIZE );    // \t Tab always remains
-            cDelim[LINESIZE-1] = 0;
-        }
-    }
-    else
-    {
-        if ( argc > 2 )
-        {
-            nX = atoi(argv[args+2]);
-            nY = atoi(argv[args+3]);
-            nZ = atoi(argv[args+4]);
-        }
-        else
-        {
-            nX = LEVDISDEFAULT_XOTHER;
-            nY = LEVDISDEFAULT_YSHORTER;
-            nZ = LEVDISDEFAULT_ZLONGER;
-        }
-        if ( argc > 5 )
-            bStrict = atoi(argv[args+5]);
-        if ( argc > 6 )
-        {
-            strncpy( cDelim+1, argv[args+6], LINESIZE );    // \t Tab always remains
-            cDelim[LINESIZE-1] = 0;
-        }
-    }
-    if ( Direct )
-    {
-#error Error: conversion from char to OUString needed!
-        pTest = new WLevDistance( argv[args+1] );
-#ifdef erTESTDEFAULT
-        pTest->ShowTest();
-#endif
-        pTest->SetLimit( nLim );
-        pTest->SetReplaceP0( nP0 );
-        pTest->SetInsertQ0( nQ0 );
-        pTest->SetDeleteR0( nR0 );
-    }
-    else
-    {
-#error Error: conversion from char to sal_Unicode needed!
-        pTest = new WLevDistance( argv[args+1], nX, nY, nZ, !bStrict );
-#ifdef erTESTCCTOR
-        WLevDistance aTmp( *pTest );
-        aTmp.ShowTest();
-#endif
-        nLim = pTest->GetLimit();
-    }
-    pTest->ShowTest();
-    do
-    {
-        char* cp1, *cp2;
-        static long unsigned int nLine = 0;
-        cp1 = cLine;
-        cin.getline( cLine, LINESIZE ) ;
-        nLine++;
-        while ( *cp1 )
-        {
-            while ( *cp1 && IsDelim(*cp1) )
-                cp1++;
-            cp2 = cString;
-            while ( *cp1 && !IsDelim(*cp1) )
-                *cp2++ = *cp1++;
-            *cp2 = '\0';
-            while ( *cp1 && IsDelim(*cp1) )
-                cp1++;
-            if ( *cString )
-            {
-                int ret;
-                if ( IgnoreCase )
-                {
-                    char* cpi1 = cString;
-                    char* cpi2 = cIgString;
-                    while ( *cpi1 )
-                        *cpi2++ = tolower( *cpi1++ );
-                    *cpi2 = '\0';
-#error Error: conversion from char to OUString / sal_Unicode,length needed!
-                    ret = pTest->WLD( cIgString );
-                }
-                else
-#error Error: conversion from char to OUString / sal_Unicode,length needed!
-                    ret = pTest->WLD( cString );
-#ifdef erTESTMAT
-                printf("\n# %3d : %s\n", ret, cString);
-#error Error: conversion from char to sal_Unicode needed!
-                pTest->ShowMatrix( cString );
-#else
-                if ( ret <= nLim )
-                    printf("# %3d : %s\t(line %lu)\t%s\n", ret, cString, nLine, cLine);
-#endif
-            }
-        }
-    } while ( !cin.eof() );
-    return 0;
-}
-
-#endif  // erTEST
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 757cd8183728d33eb05e586d59f50e3a14cbed2f
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Mon Jan 24 22:17:41 2011 +0100

    Remove  USE_CELL_BOUNDARY_CODE directive.

diff --git a/i18npool/inc/xdictionary.hxx b/i18npool/inc/xdictionary.hxx
index 5b73948..d121e7b 100644
--- a/i18npool/inc/xdictionary.hxx
+++ b/i18npool/inc/xdictionary.hxx
@@ -35,9 +35,6 @@
 
 namespace com { namespace sun { namespace star { namespace i18n {
 
-// Whether to use cell boundary code, currently unused but prepared.
-#define USE_CELL_BOUNDARY_CODE 0
-
 #define CACHE_MAX 32		// max cache structure number
 #define DEFAULT_SIZE 256	// for boundary size, to avoid alloc and release memory
 
@@ -64,12 +61,6 @@ private:
     Boundary boundary;
     sal_Bool japaneseWordBreak;
 
-#if USE_CELL_BOUNDARY_CODE
-    // For CTL breakiterator, where the word boundary should not be inside cell.
-    sal_Bool useCellBoundary;
-    sal_Int32* cellBoundary;
-#endif
-
 public:
     xdictionary(const sal_Char *lang);
     ~xdictionary();
@@ -78,10 +69,6 @@ public:
     Boundary getWordBoundary( const rtl::OUString& rText, sal_Int32 nPos, sal_Int16 wordType, sal_Bool bDirection );
     void setJapaneseWordBreak();
 
-#if USE_CELL_BOUNDARY_CODE
-    void setCellBoundary(sal_Int32* cellArray);
-#endif
-
 private:
     WordBreakCache cache[CACHE_MAX];
 
diff --git a/i18npool/source/breakiterator/xdictionary.cxx b/i18npool/source/breakiterator/xdictionary.cxx
index 4f75f63..0d7f456 100644
--- a/i18npool/source/breakiterator/xdictionary.cxx
+++ b/i18npool/source/breakiterator/xdictionary.cxx
@@ -61,12 +61,6 @@ xdictionary::xdictionary(const sal_Char *lang) :
     hModule( NULL ),
     boundary(),
     japaneseWordBreak( sal_False )
-#if USE_CELL_BOUNDARY_CODE
-    // For CTL breakiterator, where the word boundary should not be inside cell.
-    ,
-    useCellBoundary( sal_False ),
-    cellBoundary( NULL )
-#endif
 {
     index1 = 0;
 #ifdef SAL_DLLPREFIX
@@ -102,10 +96,6 @@ xdictionary::xdictionary(const sal_Char *lang) :
         for (sal_Int32 i = 0; i < CACHE_MAX; i++)
             cache[i].size = 0;
 
-#if USE_CELL_BOUNDARY_CODE
-        useCellBoundary = sal_False;
-        cellBoundary = NULL;
-#endif
         japaneseWordBreak = sal_False;
 }
 
@@ -295,28 +285,12 @@ WordBreakCache& xdictionary::getCache(const sal_Unicode *text, Boundary& wordBou
                 if (count) {
                     aCache.wordboundary[i+1] = aCache.wordboundary[i] + count;
                     i++;
-
-#if USE_CELL_BOUNDARY_CODE
-                    if (useCellBoundary) {
-                        sal_Int32 cBoundary = cellBoundary[aCache.wordboundary[i] + wordBoundary.startPos - 1];
-                        if (cBoundary > 0)
-                            aCache.wordboundary[i] = cBoundary - wordBoundary.startPos;
-                    }
-#endif
                 }
             }
 
             if (len) {
                 aCache.wordboundary[i+1] = aCache.wordboundary[i] + len;
                 i++;
-
-#if USE_CELL_BOUNDARY_CODE
-                if (useCellBoundary) {
-                    sal_Int32 cBoundary = cellBoundary[aCache.wordboundary[i] + wordBoundary.startPos - 1];
-                    if (cBoundary > 0)
-                        aCache.wordboundary[i] = cBoundary - wordBoundary.startPos;
-                }
-#endif
             }
         }
         aCache.wordboundary[i + 1] = aCache.length + 1;
@@ -392,14 +366,6 @@ Boundary xdictionary::getWordBoundary(const OUString& rText, sal_Int32 anyPos, s
         return boundary;
 }
 
-#if USE_CELL_BOUNDARY_CODE
-void xdictionary::setCellBoundary(sal_Int32* cellArray)
-{
-        useCellBoundary = sal_True;
-        cellBoundary = cellArray;
-}
-#endif
-
 } } } }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit f2572d04bd79a57119394b58ba13e599f04fd426
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Mon Jan 24 17:28:12 2011 +0100

    Remove SPECIAL_DEBUG directive.

diff --git a/cppcanvas/source/mtfrenderer/polypolyaction.cxx b/cppcanvas/source/mtfrenderer/polypolyaction.cxx
index e0727b9..8bb18e5 100644
--- a/cppcanvas/source/mtfrenderer/polypolyaction.cxx
+++ b/cppcanvas/source/mtfrenderer/polypolyaction.cxx
@@ -169,20 +169,6 @@ namespace cppcanvas
                 rendering::RenderState aLocalState( maState );
                 ::canvas::tools::prependToRenderState(aLocalState, rTransformation);
 
-#ifdef SPECIAL_DEBUG
-                aLocalState.Clip.clear();
-                aLocalState.DeviceColor = 
-                    ::vcl::unotools::colorToDoubleSequence( mpCanvas->getUNOCanvas()->getDevice(),
-                                                            ::Color( 0x80FF0000 ) );
-
-                if( maState.Clip.is() )
-                    mpCanvas->getUNOCanvas()->fillPolyPolygon( maState.Clip, 
-                                                               mpCanvas->getViewState(), 
-                                                               aLocalState );
-
-                aLocalState.DeviceColor = maState.DeviceColor;
-#endif
-
                 if( maFillColor.getLength() )
                 {
                     // TODO(E3): Use DBO's finalizer here,
diff --git a/cppcanvas/source/mtfrenderer/textaction.cxx b/cppcanvas/source/mtfrenderer/textaction.cxx
index dd041b3..f3704c2 100644
--- a/cppcanvas/source/mtfrenderer/textaction.cxx
+++ b/cppcanvas/source/mtfrenderer/textaction.cxx
@@ -1122,20 +1122,6 @@ namespace cppcanvas
                 rendering::RenderState aLocalState( maState );
                 ::canvas::tools::prependToRenderState(aLocalState, rTransformation);
 
-#ifdef SPECIAL_DEBUG
-                aLocalState.Clip.clear();
-                aLocalState.DeviceColor = 
-                    ::vcl::unotools::colorToDoubleSequence( mpCanvas->getUNOCanvas()->getDevice(),
-                                                            ::Color( 0x80FF0000 ) );
-
-                if( maState.Clip.is() )
-                    mpCanvas->getUNOCanvas()->drawPolyPolygon( maState.Clip, 
-                                                               mpCanvas->getViewState(), 
-                                                               aLocalState );
-
-                aLocalState.DeviceColor = maState.DeviceColor;
-#endif
-
                 mpCanvas->getUNOCanvas()->drawTextLayout( mxTextLayout, 
                                                           mpCanvas->getViewState(), 
                                                           aLocalState );
commit 6bbd065de5dc5912c32ebbffcee032f9e3517a0b
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Mon Jan 24 17:16:29 2011 +0100

    Remove FS_PRIV_DEBUG directive.

diff --git a/comphelper/source/property/propertystatecontainer.cxx b/comphelper/source/property/propertystatecontainer.cxx
index 835dfbf..0dd36fe 100644
--- a/comphelper/source/property/propertystatecontainer.cxx
+++ b/comphelper/source/property/propertystatecontainer.cxx
@@ -194,148 +194,4 @@ namespace comphelper
 }	// namespace comphelper
 //.........................................................................
 
-#ifdef FS_PRIV_DEBUG
-#define STATECONTAINER_TEST
-#endif
-
-#ifdef STATECONTAINER_TEST
-#include <com/sun/star/beans/PropertyAttribute.hpp>
-#include <comphelper/proparrhlp.hxx>
-#include <comphelper/broadcasthelper.hxx>
-
-//.........................................................................
-namespace comphelper
-{
-//.........................................................................
-
-    using namespace ::com::sun::star::uno;
-    using namespace ::com::sun::star::beans;
-
-    //=====================================================================
-    //= Test - compiler test
-    //=====================================================================
-    typedef ::cppu::OWeakAggObject	Test_RefCountBase;
-    class Test	:public OMutexAndBroadcastHelper
-                ,public OPropertyStateContainer
-                ,public OPropertyArrayUsageHelper< Test >
-                ,public Test_RefCountBase
-    {
-    private:
-        ::rtl::OUString			m_sStringProperty;
-        Reference< XInterface >	m_xInterfaceProperty;
-        Any						m_aMayBeVoidProperty;
-
-    protected:
-        Test( );
-
-        DECLARE_XINTERFACE( )
-
-    public:
-        static Test* Create( );
-
-    protected:
-        virtual Reference< XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(RuntimeException);
-        virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
-        virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const;
-
-    protected:
-        // OPropertyStateContainer overridables
-        virtual void getPropertyDefaultByHandle( sal_Int32 _nHandle, Any& _rDefault ) const;
-    };
-
-    //---------------------------------------------------------------------
-    Test::Test( )
-        :OPropertyStateContainer( GetBroadcastHelper() )
-    {
-        registerProperty(
-            ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StringProperty" )),
-            1,
-            PropertyAttribute::BOUND,
-            &m_sStringProperty,
-            ::getCppuType( &m_sStringProperty )
-        );
-
-        registerProperty(
-            ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "InterfaceProperty" )),
-            2,
-            PropertyAttribute::BOUND,
-            &m_xInterfaceProperty,
-            ::getCppuType( &m_xInterfaceProperty )
-        );
-
-        registerMayBeVoidProperty(
-            ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IntProperty" )),
-            3,
-            PropertyAttribute::BOUND,
-            &m_aMayBeVoidProperty,
-            ::getCppuType( static_cast< sal_Int32* >( NULL ) )
-        );
-
-        registerPropertyNoMember(
-            ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OtherInterfaceProperty" )),
-            4,
-            PropertyAttribute::BOUND | PropertyAttribute::MAYBEVOID,
-            ::getCppuType( static_cast< Reference< XInterface >* >( NULL ) ),
-            NULL
-        );
-    }
-
-    //---------------------------------------------------------------------
-    IMPLEMENT_FORWARD_XINTERFACE2( Test, Test_RefCountBase, OPropertyStateContainer )
-
-    //---------------------------------------------------------------------
-    void Test::getPropertyDefaultByHandle( sal_Int32 _nHandle, Any& _rDefault ) const
-    {
-        switch ( _nHandle )
-        {
-            case 1:
-                _rDefault = makeAny( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StringPropertyDefault" ) ) );
-                break;
-            case 2:
-                _rDefault = makeAny( Reference< XInterface >( ) );
-                break;
-            case 3:
-                // void
-                break;
-            case 4:
-                _rDefault = makeAny( Reference< XInterface >( ) );
-                break;
-            default:
-                OSL_ENSURE( sal_False, "Test::getPropertyDefaultByHandle: invalid handle!" );
-        }
-    }
-
-    //---------------------------------------------------------------------
-    Reference< XPropertySetInfo > SAL_CALL Test::getPropertySetInfo(  ) throw(RuntimeException)
-    {
-        return createPropertySetInfo( getInfoHelper() );
-    }
-
-    //---------------------------------------------------------------------
-    ::cppu::IPropertyArrayHelper& SAL_CALL Test::getInfoHelper()
-    {
-        return *getArrayHelper();
-    }
-
-    //---------------------------------------------------------------------
-    ::cppu::IPropertyArrayHelper* Test::createArrayHelper( ) const
-    {
-        Sequence< Property > aProps;
-        describeProperties( aProps );
-        return new ::cppu::OPropertyArrayHelper( aProps );
-    }
-
-    //---------------------------------------------------------------------
-    Test* Test::Create( )
-    {
-        Test* pInstance = new Test;
-        return pInstance;
-    }
-
-//.........................................................................
-}	// namespace comphelper
-//.........................................................................
-
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/inc/apearcfg.hxx b/svtools/inc/apearcfg.hxx
index 6a286fe..21b4610 100644
--- a/svtools/inc/apearcfg.hxx
+++ b/svtools/inc/apearcfg.hxx
@@ -62,14 +62,14 @@ class SVT_DLLPUBLIC SvtTabAppearanceCfg : public utl::ConfigItem
     short           nScaleFactor		;
     short           nSnapMode			;
     short           nMiddleMouse;
-#if defined( UNX ) || defined ( FS_PRIV_DEBUG )
+#if defined( UNX )
     short			nAAMinPixelHeight	;
 #endif
 
     BOOL            bMenuMouseFollow        ;
     BOOL            bSingleLineTabCtrl      ;
     BOOL            bColoredTabCtrl         ;
-#if defined( UNX ) || defined ( FS_PRIV_DEBUG )
+#if defined( UNX )
     BOOL			bFontAntialiasing		;
 #endif
 
@@ -107,7 +107,7 @@ public:
     void        SetSingleLineTabCtrl(BOOL bSet) {bSingleLineTabCtrl = bSet; SetModified();}
     BOOL        IsSingleLineTabCtrl()const {return   bSingleLineTabCtrl;}
 
-#if defined( UNX ) || defined ( FS_PRIV_DEBUG )
+#if defined( UNX )
     void		SetFontAntiAliasing( BOOL bSet )	{ bFontAntialiasing = bSet; SetModified(); }
     BOOL		IsFontAntiAliasing() const { return bFontAntialiasing; }
 
diff --git a/svtools/source/config/apearcfg.cxx b/svtools/source/config/apearcfg.cxx
index 7f6956a..4d11632 100644
--- a/svtools/source/config/apearcfg.cxx
+++ b/svtools/source/config/apearcfg.cxx
@@ -56,13 +56,13 @@ SvtTabAppearanceCfg::SvtTabAppearanceCfg()
     ,nScaleFactor       ( DEFAULT_SCALEFACTOR )
     ,nSnapMode			( DEFAULT_SNAPMODE )
     ,nMiddleMouse       ( MOUSE_MIDDLE_AUTOSCROLL )
-#if defined( UNX ) || defined ( FS_PRIV_DEBUG )
+#if defined( UNX )
     ,nAAMinPixelHeight	( DEFAULT_AAMINHEIGHT )
 #endif
     ,bMenuMouseFollow(FALSE)
     ,bSingleLineTabCtrl(FALSE)
     ,bColoredTabCtrl(FALSE)
-#if defined( UNX ) || defined ( FS_PRIV_DEBUG )
+#if defined( UNX )
     ,bFontAntialiasing	( TRUE )
 #endif
 {
@@ -89,7 +89,7 @@ SvtTabAppearanceCfg::SvtTabAppearanceCfg()
                     case  5: bColoredTabCtrl = *(sal_Bool*)pValues->getValue(); break; //"Dialog/ColoredTab",
                     case  6: *pValues >>= nSnapMode; break; //"Dialog/MousePositioning",
                     case  7: *pValues >>= nMiddleMouse; break; //"Dialog/MiddleMouseButton",
-#if defined( UNX ) || defined ( FS_PRIV_DEBUG )
+#if defined( UNX )
                     case  8: bFontAntialiasing = *(sal_Bool*)pValues->getValue(); break;    // "FontAntialising/Enabled",
                     case  9: *pValues >>= nAAMinPixelHeight; break;                         // "FontAntialising/MinPixelHeight",
 #endif
@@ -118,7 +118,7 @@ const Sequence<OUString>& SvtTabAppearanceCfg::GetPropertyNames()
             ,"Dialog/ColoredTab"                 //  5
             ,"Dialog/MousePositioning"           //  6
             ,"Dialog/MiddleMouseButton"          //  7
-#if defined( UNX ) || defined ( FS_PRIV_DEBUG )
+#if defined( UNX )
             ,"FontAntiAliasing/Enabled"         //  8
             ,"FontAntiAliasing/MinPixelHeight"  //  9
 #endif
@@ -153,7 +153,7 @@ void  SvtTabAppearanceCfg::Commit()
             case  5: pValues[nProp].setValue(&bColoredTabCtrl, rType); break; //"Dialog/ColoredTab",
             case  6: pValues[nProp] <<= nSnapMode; break;               //"Dialog/MousePositioning",
             case  7: pValues[nProp] <<= nMiddleMouse; break;               //"Dialog/MiddleMouseButton",
-#if defined( UNX ) || defined ( FS_PRIV_DEBUG )
+#if defined( UNX )
             case  8: pValues[nProp].setValue(&bFontAntialiasing, rType); break; // "FontAntialising/Enabled",
             case  9: pValues[nProp] <<= nAAMinPixelHeight; break;               // "FontAntialising/MinPixelHeight",
 #endif
@@ -234,7 +234,7 @@ void SvtTabAppearanceCfg::SetApplicationDefaults ( Application* pApp )
     hAppStyle.SetScreenZoom( nScaleFactor );
     hAppStyle.SetScreenFontZoom( nScaleFactor );
 
-#if defined( UNX ) || defined ( FS_PRIV_DEBUG )
+#if defined( UNX )
     // font anti aliasing
     hAppStyle.SetAntialiasingMinPixelHeight( nAAMinPixelHeight );
     hAppStyle.SetDisplayOptions( bFontAntialiasing ? 0 : DISPLAY_OPTION_AA_DISABLE );


More information about the Libreoffice-commits mailing list