Date: prev next · Thread: first prev next last
2010 Archives by date, by thread · List index


Some more unused code, this time in ure and impress. All code has been
commented out at least since 2005.


Anders Jonsson
(LGPLv3+,MPL)
From 055470cbc7c315c37032667822417f109b7235d1 Mon Sep 17 00:00:00 2001
From: Anders Jonsson <anders.jonsson@norsjonet.se>
Date: Wed, 22 Dec 2010 08:22:12 +0100
Subject: Remove commented code

---
 codemaker/source/cunomaker/cunotype.cxx |  233 -------------------------------
 sal/qa/osl/socket/sockethelper.cxx      |   90 ------------
 stoc/test/testsmgr_cpnt.cxx             |  123 ----------------
 3 files changed, 0 insertions(+), 446 deletions(-)

diff --git a/codemaker/source/cunomaker/cunotype.cxx b/codemaker/source/cunomaker/cunotype.cxx
index 40637c7..1258885 100644
--- a/codemaker/source/cunomaker/cunotype.cxx
+++ b/codemaker/source/cunomaker/cunotype.cxx
@@ -295,15 +295,6 @@ void CunoType::dumpDefaultHIncludes(FileStream& o)
     o << "#ifndef _UNO_CUNO_H_\n"
       << "#include <uno/cuno.h>\n"
       << "#endif\n";
-/*
-    if (m_typeMgr.getTypeClass(m_typeName) == RT_TYPE_INTERFACE &&
-        !m_typeName.equals("com/sun/star/uno/XInterface") )
-    {
-        o << "#ifndef _COM_SUN_STAR_UNO_XINTERFACE_H_\n"
-          << "#include <com/sun/star/uno/XInterface.h>\n"
-          << "#endif\n";
-    }
-*/
 }
 
 void CunoType::dumpDefaultCIncludes(FileStream& o)
@@ -415,12 +406,6 @@ void CunoType::dumpDepIncludes(FileStream& o, const OString& typeName, 
sal_Char*
 
                             iLastS = outerNamespace.lastIndexOf('/');
                             OString outerClass(outerNamespace.copy(iLastS+1));
-
-//                                                     o << "\n";
-//                                                     dumpNameSpace(o, sal_True, sal_False, 
outerNamespace);
-//                                                     o << "\nclass " << outerClass << "::" << 
innerClass << ";\n";
-//                                                     dumpNameSpace(o, sal_False, sal_False, 
outerNamespace);
-//                                                     o << "\n\n";
                         }
                         else
                         {
@@ -1548,27 +1533,6 @@ sal_Bool InterfaceType::dumpHFile(FileStream& o)
           << "#endif\n\n";
     }
 
-/*
-    if (getNestedTypeNames().getLength() > 0)
-    {
-        o << indent() << "// nested types\n\n";
-        for (sal_uInt32 i = 0; i < getNestedTypeNames().getLength(); i++)
-        {
-            OUString s(getNestedTypeNames().getElement(i));
-
-            OString nestedName(s.getStr(), s.getLength(), RTL_TEXTENCODING_UTF8);
-
-            nestedName = checkRealBaseType(nestedName.copy(5));
-
-            if (nestedName.lastIndexOf(']') < 0)
-            {
-                o << "inline const ::com::sun::star::uno::Type& SAL_CALL getCunoType( ";
-                dumpType(o, nestedName, sal_True, sal_False);
-                o << "* ) SAL_THROW( () );\n\n";
-            }
-        }
-    }
-*/
     dumpCloseExternC(o);
 
     o << "#endif /* "<< headerDefine << " */\n";
@@ -1598,65 +1562,7 @@ sal_Bool InterfaceType::dumpDeclaration(FileStream& o)
     OString superType(m_reader.getSuperTypeName());
     if (superType.getLength() > 0)
         dumpInheritedFunctions(o, superType);
-/*
-    if (getNestedTypeNames().getLength() > 0)
-    {
-        inc();
-        o << indent() << "// nested types\n\n";
-        for (sal_uInt32 i = 0; i < getNestedTypeNames().getLength(); i++)
-        {
-            OUString s(getNestedTypeNames().getElement(i));
-
-            OString nestedName(s.getStr(), s.getLength(), RTL_TEXTENCODING_UTF8);
-
-            nestedName = nestedName.copy(5);
 
-            o << indent() << "// " << nestedName.getStr() << "\n";
-
-            TypeReader reader(m_typeMgr.getTypeReader(nestedName));
-
-            if (reader.isValid())
-            {
-                RTTypeClass typeClass = reader.getTypeClass();
-                switch (typeClass) {
-                    case RT_TYPE_INTERFACE:
-                        {
-                            InterfaceType iType(reader, nestedName, m_typeMgr, m_dependencies);
-                            iType.dumpDeclaration(o);
-                        }
-                        break;
-                    case RT_TYPE_STRUCT:
-                        {
-                            StructureType sType(reader, nestedName, m_typeMgr, m_dependencies);
-                            sType.dumpDeclaration(o);
-                        }
-                        break;
-                    case RT_TYPE_ENUM:
-                        {
-                            EnumType enType(reader, nestedName, m_typeMgr, m_dependencies);
-                            enType.dumpDeclaration(o);
-                        }
-                        break;
-                    case RT_TYPE_EXCEPTION:
-                        {
-                            ExceptionType eType(reader, nestedName, m_typeMgr, m_dependencies);
-                            eType.dumpDeclaration(o);
-                        }
-                        break;
-                    case RT_TYPE_TYPEDEF:
-                        {
-                            TypeDefType tdType(reader, nestedName, m_typeMgr, m_dependencies);
-                            tdType.dumpDeclaration(o);
-                        }
-                        break;
-                    default:
-                        break;
-                }
-            }
-        }
-        dec();
-    }
-*/
     dumpAttributes(o, m_name, m_reader);
     dumpMethods(o, m_name, m_reader);
 
@@ -1676,63 +1582,7 @@ sal_Bool InterfaceType::dumpCFile(FileStream& o)
     dumpDepIncludes(o, m_typeName, "h");
     o << "\n";
     dumpGetCunoType(o);
-/*
-    if (getNestedTypeNames().getLength() > 0)
-    {
-        o << indent() << "// nested types\n\n";
-        for (sal_uInt32 i = 0; i < getNestedTypeNames().getLength(); i++)
-        {
-            OUString s(getNestedTypeNames().getElement(i));
 
-            OString nestedName(s.getStr(), s.getLength(), RTL_TEXTENCODING_UTF8);
-
-            nestedName = nestedName.copy(5);
-
-            o << indent() << "// " << nestedName.getStr() << "\n";
-
-            TypeReader reader(m_typeMgr.getTypeReader(nestedName));
-
-            if (reader.isValid())
-            {
-                RTTypeClass typeClass = reader.getTypeClass();
-                switch (typeClass) {
-                    case RT_TYPE_INTERFACE:
-                        {
-                            InterfaceType iType(reader, nestedName, m_typeMgr, m_dependencies);
-                            iType.dumpGetCunoType(o);
-                        }
-                        break;
-                    case RT_TYPE_STRUCT:
-                        {
-                            StructureType sType(reader, nestedName, m_typeMgr, m_dependencies);
-                            sType.dumpGetCunoType(o);
-                        }
-                        break;
-                    case RT_TYPE_ENUM:
-                        {
-                            EnumType enType(reader, nestedName, m_typeMgr, m_dependencies);
-                            enType.dumpGetCunoType(o);
-                        }
-                        break;
-                    case RT_TYPE_EXCEPTION:
-                        {
-                            ExceptionType eType(reader, nestedName, m_typeMgr, m_dependencies);
-                            eType.dumpGetCunoType(o);
-                        }
-                        break;
-                    case RT_TYPE_TYPEDEF:
-                        {
-                            TypeDefType tdType(reader, nestedName, m_typeMgr, m_dependencies);
-                            tdType.dumpGetCunoType(o);
-                        }
-                        break;
-                    default:
-                        break;
-                }
-            }
-        }
-    }
-*/
     return sal_True;
 }
 
@@ -2586,49 +2436,7 @@ sal_Bool ModuleType::dump(CunoOptions* pOptions)
             ret = checkFileContent(hFileName, tmpFileName);
         }
     }
-/*
-    bFileExists = sal_False;
-    bFileCheck = sal_False;
-    OString cFileName = createFileNameFromType(outPath, tmpName, ".c");
-
-    if ( pOptions->isValid("-G") || pOptions->isValid("-Gc") )
-    {
-        bFileExists = fileExists( cFileName );
-        ret = sal_True;
-    }
-
-    if ( bFileExists && pOptions->isValid("-Gc") )
-    {
-        tmpFileName     = createFileNameFromType(outPath, m_typeName, ".tmc");
-        bFileCheck = sal_True;
-    }
-
-
-    if ( !bFileExists || bFileCheck )
-    {
-        FileStream hxxFile;
-
-        if ( bFileCheck )
-            cFile.open(tmpFileName);
-        else
-            cFile.open(cFileName);
 
-        if(!cFile.isValid())
-        {
-            OString message("cannot open ");
-            message += cFileName + " for writing";
-            throw CannotDumpException(message);
-        }
-
-        ret = dumpCFile(cFile);
-
-        cFile.close();
-        if (ret && bFileCheck)
-        {
-            ret = checkFileContent(cFileName, tmpFileName);
-        }
-    }
-*/
     return ret;
 }
 
@@ -2779,48 +2587,7 @@ sal_Bool ConstantsType::dump(CunoOptions* pOptions)
             ret = checkFileContent(hFileName, tmpFileName);
         }
     }
-/*
-    bFileExists = sal_False;
-    bFileCheck = sal_False;
-    OString cFileName = createFileNameFromType(outPath, m_typeName, ".c");
-
-    if ( pOptions->isValid("-G") || pOptions->isValid("-Gc") )
-    {
-        bFileExists = fileExists( cFileName );
-        ret = sal_True;
-    }
 
-    if ( bFileExists && pOptions->isValid("-Gc") )
-    {
-        tmpFileName     = createFileNameFromType(outPath, m_typeName, ".tmc");
-        bFileCheck = sal_True;
-    }
-
-    if ( !bFileExists || bFileCheck )
-    {
-        FileStream cFile;
-
-        if ( bFileCheck )
-            cFile.open(tmpFileName);
-        else
-            cFile.open(cFileName);
-
-        if(!cFile.isValid())
-        {
-            OString message("cannot open ");
-            message += cFileName + " for writing";
-            throw CannotDumpException(message);
-        }
-
-        ret = dumpCFile(cFile);
-
-        cFile.close();
-        if (ret && bFileCheck)
-        {
-            ret = checkFileContent(cFileName, tmpFileName);
-        }
-    }
-*/
     return ret;
 }
 
diff --git a/sal/qa/osl/socket/sockethelper.cxx b/sal/qa/osl/socket/sockethelper.cxx
index dc1adb0..cbb88d0 100644
--- a/sal/qa/osl/socket/sockethelper.cxx
+++ b/sal/qa/osl/socket/sockethelper.cxx
@@ -67,15 +67,6 @@ sal_Bool compareSocketAddr( const ::osl::SocketAddr & addr1 , const ::osl::Socke
     return ( ( sal_True == compareUString( addr1.getHostname( 0 ), addr2.getHostname( 0 ) )    ) 
&& ( addr2.getPort( ) == addr2.getPort( ) ) );
 }
 
-/*char * oustring2char(        const ::rtl::OUString & str )
-{
-    rtl::OString aString;
-    aString    = ::rtl::OUStringToOString( str, RTL_TEXTENCODING_ASCII_US );
-    t_print("oustring2char %s\n", aString.getStr( )    );
-    sal_Char * sStr    = aString.getStr( );
-    return (char *)sStr;
-}*/
-
 /** print a UNI_CODE String. And also print some comments of the string.
 */
 void printUString( const ::rtl::OUString & str,        const char* msg)
@@ -288,87 +279,6 @@ sal_Bool ifIpv4is( const ::rtl::ByteSequence Ipaddr, sal_Int8 seq1, sal_Int8 
seq
     return sal_False;
 }
 
-/** if the IP or hostname is availble( alive )
-*/
-/*sal_Bool ifAvailable( const char *  stringAddrOrHostName )
-{
-    sal_Bool result;
-    int         p[2];
-    sal_Char buffer[2000];
-    char stringhost[20];
-    strcpy(stringhost, stringAddrOrHostName    );
-
-    result = sal_False;
-    if (pipe (p) ==    0)
-    {
-    pid_t pid;
-    int nStatus;
-    pid = fork();
-    if (pid    == 0)
-    {
-#if ( defined LINUX )
-        char *argv[] =
-        {
-            "/bin/ping",
-            "-c", "3",
-            "-W", "3",
-            stringhost,
-            NULL
-        };
-#endif
-#if ( defined SOLARIS )
-        char *argv[] =
-            {
-                "/usr/sbin/ping",
-                stringhost,
-                "3",
-                NULL
-            };
-#endif
-        close (p[0]);
-        dup2  (p[1], 1);
-        close (p[1]);
-#if ( defined LINUX )
-        execv ("/bin/ping", argv);
-#endif
-#if ( defined SOLARIS )
-        execv ("/usr/sbin/ping", argv);
-#endif
-        // arriving here means exec failed
-        _exit(-1);
-    }
-    else if    (pid > 0)
-    {
-        sal_Int32 k = 0, n = 2000;
-        close (p[1]);
-        if ((k = read (p[0], buffer, n - 1)) > 0)
-        {
-            buffer[k] = 0;
-            if (buffer[k - 1] == '\n')
-            buffer[k - 1] =    0;
-#if ( defined LINUX )
-            char strOK[] = "bytes from";
-#endif
-#if ( defined SOLARIS )
-            char strOK[] = "is alive";
-#endif
-            if (strstr( buffer, strOK ) != NULL )
-                result = sal_True;
-            t_print("buffer    is %s\n", buffer );
-        }
-        close (p[0]);
-        waitpid        (pid, &nStatus, 0);
-    }
-    else
-    {
-        close (p[0]);
-        close (p[1]);
-    }
-
-    }
-    return result;
-}*/
-
 sal_Bool ifAvailable( rtl::OUString const&  strAddrOrHostName )
 {
     ::osl::ConnectorSocket aSocket(    osl_Socket_FamilyInet, osl_Socket_ProtocolIp, 
osl_Socket_TypeStream );
diff --git a/stoc/test/testsmgr_cpnt.cxx b/stoc/test/testsmgr_cpnt.cxx
index fb81b6f..4933ff5 100644
--- a/stoc/test/testsmgr_cpnt.cxx
+++ b/stoc/test/testsmgr_cpnt.cxx
@@ -277,129 +277,6 @@ extern "C" void SAL_CALL test_ServiceManager()
                         "revoke implementation failed" );
     }
 
-
-//     Reference < XSimpleRegistry > xSReg(  
xSMgr->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("com::sun::star.uno.repos.SimpleRegistry"))),
 UNO_QUERY );
-//     TEST_ENSHURE( xSReg.is() , "Simple registry couldn't be instantiated" );
-
-//     xSReg->open(OUString(RTL_CONSTASCII_USTRINGPARAM("dummy.reg")), sal_False, sal_True);
-//     xSReg->close();
-
-    // laut dbo : C-API muss nicht mehr unterstuezt werden
-    //TEST_ENSHURE( registerExternService(atModule, "dummy.reg"), "install failed" );
-    //TEST_ENSHURE( deregisterExternService(atModule, "dummy.reg"), "deinstall failed" );
-
-
-//     UNO_INTERFACE(XMultiServiceFactory) xUnoSMgr = {0,0};
-//     smart2uno(xSMgr, xUnoSMgr);
-
-//     TEST_ENSHURE(registerExternImplementation(xUnoSMgr, "com::sun::star.loader.SharedLibrary", 
atModule2, "dummy.reg"), "install failed" );
-//     TEST_ENSHURE(revokeExternImplementation(xUnoSMgr, atModule2, "dummy.reg"), "deinstall 
failed" );
-
-//     TEST_ENSHURE(registerExternImplementation(xUnoSMgr, "com::sun::star.loader.SharedLibrary", 
atModule2, "dummy2.reg"), "install failed" );
-
-//TODO : Java loader test
-//     String testUrl(getTestJarUrl());
-//     TEST_ENSHURE(registerExternImplementation(xUnoSMgr, "com::sun::star.loader.Java", testUrl, 
"dummy.reg"), "install failed" );
-//     TEST_ENSHURE(revokeExternImplementation(xUnoSMgr, testUrl, "dummy.reg"), "deinstall failed" 
);
-
-//     if (!UNO_isNull((UNO_Ifc*)&xUnoSMgr))
-//             xUnoSMgr.m_pVmt->release(xUnoSMgr.m_pCtx);
-
-//     xSReg->open(OUString(RTL_CONSTASCII_USTRINGPARAM("dummy.reg")), sal_True, sal_False);
-//     
TEST_ENSHURE(!xSReg->getRootKey()->openKey(OUString(RTL_CONSTASCII_USTRINGPARAM("/SERVICES/com::sun::star/ts/TestManagerImpl/URL"))).is(),
-//                             "deinstall failed" );
-
-//     xSReg->close();
-
-//     xSReg->open(OUString(RTL_CONSTASCII_USTRINGPARAM("dummy.reg")), sal_False, sal_False);
-//     xSReg->destroy();
-//     xSReg->open(OUString(RTL_CONSTASCII_USTRINGPARAM("dummy2.reg")), sal_False, sal_False);
-//     xSReg->destroy();
-
-
-    // Test initialisieren
-/*
-    XServiceProviderRef xSiSP1 = createSimpleServiceProvider( 
OUString(RTL_CONSTASCII_USTRINGPARAM("com::sun::star.usr.Test_Manager_Impl1")), 
Test_Manager_Impl_getReflection );
-    XServiceProviderRef xSiSP11 = createSimpleServiceProvider( 
OUString(RTL_CONSTASCII_USTRINGPARAM("com::sun::star.usr.Test_Manager_Impl1")), 
Test_Manager_Impl_getReflection );
-    XServiceProviderRef xSiSP2 = createSimpleServiceProvider( 
OUString(RTL_CONSTASCII_USTRINGPARAM("com::sun::star.usr.Test_Manager_Impl2")), 
Test_Manager_Impl_getReflection );
-*/
-/*
-    // second test
-    // create XServiceProvider via createSingleFactory and write them directly into the registry
-    // For this is needed a sequence of supported servicenames and a createComponent function 
pointer
-    {
-        Reference< XServiceProvider > xSiSP1(createSingleFactory(
-            xSMgr,
-            OUString(RTL_CONSTASCII_USTRINGPARAM("com::sun::star.usr.Test_Manager_Impl1)),
-            Test_Manager_Impl_CreateInstance,
-            Test_Manager_Impl::getSupportedServiceNames_Static() ), UNO_QUERY);
-        Reference< XServiceProvider > xSiSP11(createSingleFactory(
-            xSMgr,
-            OUString(RTL_CONSTASCII_USTRINGPARAM("com::sun::star.usr.Test_Manager_Impl1")),
-            Test_Manager_Impl_CreateInstance,
-            Test_Manager_Impl::getSupportedServiceNames_Static() ),UNO_QUERY);
-        Reference< XServiceProvider > xSiSP2(createSingleFactory(
-            xSMgr,
-            L"com::sun::star.usr.Test_Manager_Impl2",
-            Test_Manager_Impl_CreateInstance,
-            Test_Manager_Impl::getSupportedServiceNames_Static() ), UNO_QUERY);
-
-        // put the service providers into the registry
-        xReg->registerServiceProvider( L"com::sun::star.test.TestManager1", xSiSP1 );
-        xReg->registerServiceProvider( L"com::sun::star.test.TestManager1", xSiSP11 );
-        xReg->registerServiceProvider( L"com::sun::star.test.TestManager2", xSiSP2 );
-
-        // TestManager1
-        Reference< XServiceProvider > xProv = xSMgr->queryServiceProvider( 
L"com::sun::star.test.TestManager1");
-        Reference< XSingleServiceFactory > xFact( xProv, UNO_QUERY );
-        TEST_ENSHURE( xFact.is(), "Service com::sun::star.test.TestManager1 not found" );
-
-        Reference< XInterface > xTest1 = xFact->createInstance();
-        TEST_ENSHURE( nInstanceCount == 1, "wrong service instanciated" );
-
-        // TestManager2
-        xProv = xSMgr->queryServiceProvider( L"com::sun::star.test.TestManager2");
-        xFact = Reference < XSingleServiceFactory > ( xProv , UNO_QUERY );
-        TEST_ENSHURE( xFact.is(), "Service com::sun::star.test.TestManager2 not found" );
-
-        Reference < XInterface > xTest2 = xFact->createInstance();
-        TEST_ENSHURE( nInstanceCount == 2, "wrong service instanciated" );
-
-        xTest1 = Reference< XInterface >();
-        xTest2 = Reference< XInterface >();
-        TEST_ENSHURE( nInstanceCount == 0, "wrong service deleted" );
-
-        Reference< XEnumeration > xEnum = xSMgr->createProviderEnumeration( 
L"com::sun::star.test.TestManager1");
-        TEST_ENSHURE( xEnum.is() , "no provider enumeration" );
-
-        sal_Int32 nSPTestManagerImplLen2 = 0;
-
-        while (xEnum.is() && xEnum->hasMoreElements())
-        {
-            nSPTestManagerImplLen2++;
-            xEnum->nextElement();
-
-        }
-        TEST_ENSHURE( nSPTestManagerImplLen2 == 2, "queryServiceProviders() wrong length" );
-
-        sal_Int32 nCount = 0;
-        xEnum = xSMgr->createProviderEnumeration( L"com::sun::star.test.TestManager1");
-        while (xEnum->hasMoreElements())
-        {
-            Reference< XServiceProvider > xProv;
-            xEnum->nextElement() >>= xProv;
-            if (xProv == xSiSP1 || xProv == xSiSP11)
-                nCount++;
-        }
-
-        TEST_ENSHURE( nCount == 2 , "not all com::sun::star.testimpl.TestManagerImpl registered" );
-*/
-/*
-    {
-        Reference< XMultiServiceFactory > 
xTestManager(createRegistryServiceManager(L"testmanager.rdb"));
-        TEST_ENSHURE( xTestManager.is(), "create Test ServiceManager failed!" );
-    }
-*/
     Reference<XComponent> xComp(xSMgr, UNO_QUERY);
     xComp->dispose();
 
-- 
1.7.1

From f451afa4a7259514ca8c19b913d6556b0314f60b Mon Sep 17 00:00:00 2001
From: Anders Jonsson <anders.jonsson@norsjonet.se>
Date: Wed, 22 Dec 2010 07:50:53 +0100
Subject: Remove unused code

---
 sd/source/ui/app/tbxww.cxx        |  134 -------------------------------------
 sd/source/ui/notes/EditWindow.cxx |   94 +-------------------------
 2 files changed, 1 insertions(+), 227 deletions(-)

diff --git a/sd/source/ui/app/tbxww.cxx b/sd/source/ui/app/tbxww.cxx
index e4a7d38..313e7b9 100644
--- a/sd/source/ui/app/tbxww.cxx
+++ b/sd/source/ui/app/tbxww.cxx
@@ -55,140 +55,6 @@ SFX_IMPL_TOOLBOX_CONTROL( SdTbxControl, TbxImageItem )
 
 /*************************************************************************
 |*
-|* PopUp-Window
-|*
-\************************************************************************/
-/*
-SdPopupWindowTbx::SdPopupWindowTbx( USHORT nId, WindowAlign eAlign,
-                                    SdResId aRIdWin, SdResId aRIdTbx,
-                                    SfxBindings& rBindings ) :
-                SfxPopupWindow ( nId, aRIdWin, rBindings ),
-                aTbx            ( this, GetBindings(), aRIdTbx ),
-                aSdResIdWin       ( aRIdWin ),
-                aSdResIdTbx       ( aRIdTbx ),
-                eTbxAlign              ( eAlign )
-{
-    aTbx.UseDefault();
-    aSelectLink = aTbx.GetToolBox().GetSelectHdl();
-    aTbx.GetToolBox().SetSelectHdl( LINK( this, SdPopupWindowTbx, TbxSelectHdl ) );
-
-    FreeResource();
-
-    if( ( eAlign == WINDOWALIGN_TOP ) || ( eAlign == WINDOWALIGN_BOTTOM ) )
-    {
-        if ( aSdResIdWin.GetId() != RID_TEXT )
-            aTbx.GetToolBox().SetAlign( WINDOWALIGN_LEFT );
-
-        SetText( String() );
-    }
-
-    AdaptToCTL();
-}
-
-
-void SdPopupWindowTbx::AdaptToCTL (void)
-{
-    Size aSize = aTbx.CalcWindowSizePixel();
-    if (aSdResIdWin.GetId() == RID_TEXT)
-    {
-        SvtCJKOptions aCJKOptions;
-        if ( ! aCJKOptions.IsVerticalTextEnabled())
-        {
-            ToolBox& aToolBox = aTbx.GetToolBox();
-
-            // Iterate over all tool box items and remove those that are
-            // specific to complex text layout.
-            USHORT i=0;
-            while (i < aToolBox.GetItemCount())
-            {
-                USHORT nIndex = aToolBox.GetItemId(i);
-                switch (nIndex)
-                {
-                    case 0: // Line break.
-                    case SID_ATTR_CHAR_VERTICAL:
-                    case SID_TEXT_FITTOSIZE_VERTICAL:
-                    case SID_DRAW_CAPTION_VERTICAL:
-                    case SID_DRAW_FONTWORK_VERTICAL:
-                        aToolBox.RemoveItem (i);
-                        break;
-
-                    default:
-                        // Leave the item unmodified.  Advance to the next one.
-                        i+=1;
-                }
-            }
-            aToolBox.RecalcItems();
-            // Why is this necessary?
-            aToolBox.SetLineCount(1);
-            USHORT nLineCount = aToolBox.GetLineCount();
-            aSize = aToolBox.CalcWindowSizePixel(nLineCount);
-        }
-    }
-    aTbx.SetPosSizePixel( Point(), aSize );
-    SetOutputSizePixel( aSize );
-}
-*/
-
-/*-------------------------------------------------------------------------*/
-/*
-SdPopupWindowTbx::~SdPopupWindowTbx()
-{
-}
-*/
-/*-------------------------------------------------------------------------*/
-/*
-SfxPopupWindow* SdPopupWindowTbx::Clone() const
-{
-    SfxBindings& rBindings = (SfxBindings&)GetBindings();
-
-    return( new SdPopupWindowTbx( GetId(), eTbxAlign,
-                    aSdResIdWin, aSdResIdTbx, rBindings ) );
-
-    //return( SfxPopupWindow::Clone() );
-}
-*/
-/*-------------------------------------------------------------------------*/
-/*
-void SdPopupWindowTbx::Update()
-{
-    AdaptToCTL();
-
-    ToolBox *pBox = &aTbx.GetToolBox();
-    aTbx.Activate( pBox );
-    aTbx.Deactivate( pBox );
-}
-*/
-/*-------------------------------------------------------------------------*/
-/*
-void SdPopupWindowTbx::PopupModeEnd()
-{
-    aTbx.GetToolBox().EndSelection();
-
-    SfxPopupWindow::PopupModeEnd();
-}
-*/
-/*-------------------------------------------------------------------------*/
-/*
-IMPL_LINK( SdPopupWindowTbx, TbxSelectHdl, ToolBox*, pBox)
-{
-    if( IsInPopupMode() )
-        EndPopupMode();
-
-    aSelectLink.Call( &aTbx.GetToolBox() );
-
-    if ( pBox->GetModifier() & KEY_MOD1 )
-    {
-        //     #99013# if selected with control key, return focus to current view
-        Window* pShellWnd = SfxViewShell::Current()->GetWindow();
-        if ( pShellWnd )
-            pShellWnd->GrabFocus();
-    }
-
-    return( 0L );
-}
-*/
-/*************************************************************************
-|*
 |* Klasse fuer Toolbox
 |*
 \************************************************************************/
diff --git a/sd/source/ui/notes/EditWindow.cxx b/sd/source/ui/notes/EditWindow.cxx
index 5a76617..1ea0075 100644
--- a/sd/source/ui/notes/EditWindow.cxx
+++ b/sd/source/ui/notes/EditWindow.cxx
@@ -354,34 +354,7 @@ void EditWindow::MouseButtonDown(const MouseEvent &rEvt)
 
 void EditWindow::Command(const CommandEvent& rCEvt)
 {
-    /* if (rCEvt.GetCommand() == COMMAND_CONTEXTMENU)
-    {
-        GetParent()->ToTop();
-
-        Point aPoint = rCEvt.GetMousePosPixel();
-        PopupMenu* pPopupMenu = new PopupMenu(SmResId(RID_COMMANDMENU));
-
-        // added for replaceability of context menus #96085, #93782
-        Menu* pMenu = NULL;
-        ::com::sun::star::ui::ContextMenuExecuteEvent aEvent;
-        aEvent.SourceWindow = VCLUnoHelper::GetInterface( this );
-        aEvent.ExecutePosition.X = aPoint.X();
-        aEvent.ExecutePosition.Y = aPoint.Y();
-        if ( GetView()->TryContextMenuInterception( *pPopupMenu, pMenu, aEvent ) )
-        {
-            if ( pMenu )
-            {
-                delete pPopupMenu;
-                pPopupMenu = (PopupMenu*) pMenu;
-            }
-        }
-
-        pPopupMenu->SetSelectHdl(LINK(this, EditWindow, MenuSelectHdl));
-
-        pPopupMenu->Execute( this, aPoint );
-        delete pPopupMenu;
-    }
-    else*/ if (mpEditView)
+    if (mpEditView)
         mpEditView->Command( rCEvt );
     else
         Window::Command (rCEvt);
@@ -389,78 +362,13 @@ void EditWindow::Command(const CommandEvent& rCEvt)
 }
 IMPL_LINK_INLINE_START( EditWindow, MenuSelectHdl, Menu *, EMPTYARG )
 {
-    /*    SmViewShell *pViewSh = rCmdBox.GetView();
-    if (pViewSh)
-        pViewSh->GetViewFrame()->GetDispatcher()->Execute(
-                SID_INSERTCOMMAND, SFX_CALLMODE_STANDARD,
-                new SfxInt16Item(SID_INSERTCOMMAND, pMenu->GetCurItemId()), 0L);
-*/
     return 0;
 }
 IMPL_LINK_INLINE_END( EditWindow, MenuSelectHdl, Menu *, EMPTYARG )
 
 void EditWindow::KeyInput(const KeyEvent& )
 {
-    /* if (rKEvt.GetKeyCode().GetCode() == KEY_ESCAPE)
-    {
-        BOOL bCallBase = TRUE;
-        SfxViewShell* pViewShell = SfxViewShell::Current();
-        if ( pViewShell && pViewShell->ISA(SmViewShell) )
-        {
-            SmDocShell* pDocSh = (SmDocShell*) pViewShell->GetViewFrame()->GetObjectShell();
-            if (pDocSh)
-            {
-    // fuert zum (sofortigen) Zerstoeren von this!
-                pDocSh->DoInPlaceActivate( FALSE );
-                bCallBase = FALSE;
-            }
-        }
-        if ( bCallBase )
-            Window::KeyInput( rKEvt );
-    }
-    else
-    {
-        // Timer neu starten, um den Handler (auch bei längeren Eingaben)
-        // möglichst nur einmal am Ende aufzurufen.
-        aCursorMoveTimer.Start();
 
-        DBG_ASSERT( mpEditView, "EditView missing (NULL pointer)" );
-        if (!mpEditView)
-            CreateEditView();
-        if ( !mpEditView->PostKeyEvent(rKEvt) )
-        {
-            if ( !SfxViewShell::Current()->KeyInput(rKEvt) )
-            {
-    // fuert bei F1 (Hilfe) zum Zerstoeren von this!
-                Flush();
-                if ( aModifyTimer.IsActive() )
-                    aModifyTimer.Stop();
-                Window::KeyInput(rKEvt);
-            }
-            else
-            {
-                //SFX hat evtl. Slot an der View gecallt und dabei (wg. Hack
-                //im SFX) den Focus auf die View gesetzt
-                SfxViewShell* pVShell = SfxViewShell::Current();
-                if ( pVShell && pVShell->ISA(SmViewShell) &&
-                     ((SmViewShell*)pVShell)->GetGraphicWindow().HasFocus() )
-                {
-                    GrabFocus();
-                }
-            }
-        }
-        else
-        {
-            // have doc-shell modified only for formula input/change and not
-            // cursor travelling and such things...
-            SmDocShell *pDocShell = GetDoc();
-            if (pDocShell)
-                pDocShell->SetModified( GetEditEngine()->IsModified() );
-
-            aModifyTimer.Start();
-        }
-    }
-    */
 }
 
 
-- 
1.7.1


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.