diff options
author | Anders Jonsson <anders.jonsson@norsjonet.se> | 2011-01-11 00:44:39 +0100 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2011-01-10 19:28:58 -0600 |
commit | 303067c83c4be23cb0798af13f3f323cd8521b87 (patch) | |
tree | b081a0a57b53e6e84eae9ea7ae737676e294ecc5 /framework | |
parent | 2749cbd4a2dcc5e3764242b7734d2adcf66025a9 (diff) |
Remove commented code
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/uiconfiguration/moduleuicfgsupplier.cxx | 155 | ||||
-rw-r--r-- | framework/test/test.cxx | 47 | ||||
-rw-r--r-- | framework/test/typecfg/xml2xcd.cxx | 47 |
3 files changed, 1 insertions, 248 deletions
diff --git a/framework/source/uiconfiguration/moduleuicfgsupplier.cxx b/framework/source/uiconfiguration/moduleuicfgsupplier.cxx index 4127bb66b5..db799fd39a 100644 --- a/framework/source/uiconfiguration/moduleuicfgsupplier.cxx +++ b/framework/source/uiconfiguration/moduleuicfgsupplier.cxx @@ -112,100 +112,6 @@ DEFINE_XSERVICEINFO_ONEINSTANCESERVICE ( ModuleUIConfigurationManagerSupplier DEFINE_INIT_SERVICE ( ModuleUIConfigurationManagerSupplier, {} ) -/*TODO_AS -void ModuleUIConfigurationManagerSupplier::impl_initStorages() -{ -RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManagerSupplier::impl_initStorages" ); - if ( !m_bInit ) - { - RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::ModuleUIConfigurationManagerSupplier::impl_initStorages" ); - - rtl::OUString aFinalSlash( RTL_CONSTASCII_USTRINGPARAM( "/" )); - rtl::OUString aConfigRootFolder( RTL_CONSTASCII_USTRINGPARAM( "soffice.cfg/modules" )); - rtl::OUString aConfigSubFolder( RTL_CONSTASCII_USTRINGPARAM( "soffice.cfg/modules/soffice.cfg" )); - rtl::OUString aConfigRootFolder( RTL_CONSTASCII_USTRINGPARAM( "soffice.cfg" )); - rtl::OUString aConfigSubFolder( RTL_CONSTASCII_USTRINGPARAM( "soffice.cfg/soffice.cfg" )); - rtl::OUString aConfigFileName( RTL_CONSTASCII_USTRINGPARAM( "soffice.cfg/uiconfig.zip" )); - - Reference< XPropertySet > xPathSettings( m_xServiceManager->createInstance( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.PathSettings" ))), - UNO_QUERY_THROW ); - - Any a = xPathSettings->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "UIConfig" ))); - a >>= m_aDefaultConfigURL; - a = xPathSettings->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "UserConfig" ))); - a >>= m_aUserConfigURL; - - // Use only the first entry from "UIConfig" - sal_Int32 nIndex = m_aDefaultConfigURL.indexOf( ';' ); - if ( nIndex > 0 ) - m_aDefaultConfigURL = m_aDefaultConfigURL.copy( 0, nIndex ); - - rtl::OUString aDefaultConfigFolderURL( m_aDefaultConfigURL ); - - nIndex = m_aDefaultConfigURL.lastIndexOf( '/' ); - if (( nIndex > 0 ) && ( nIndex != ( m_aDefaultConfigURL.getLength()-1 ))) - { - m_aDefaultConfigURL += aFinalSlash; - aDefaultConfigFolderURL += aFinalSlash; - } - - nIndex = m_aUserConfigURL.lastIndexOf( '/' ); - if (( nIndex > 0 ) && ( nIndex != ( m_aUserConfigURL.getLength()-1 ))) - m_aUserConfigURL += aFinalSlash; - -// aDefaultConfigFolderURL += aConfigRootFolder; - - // Create root storages for user interface configuration data (default and customizable) - Reference< XSingleServiceFactory > xStorageFactory( m_xServiceManager->createInstance( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.StorageFactory" ))), - UNO_QUERY_THROW ); - - Sequence< Any > aArgs( 2 ); - - // Default root storage (READ-ACCESS) - aArgs[0] <<= m_aDefaultConfigURL + aConfigFileName; //aConfigSubFolder; - aArgs[1] <<= ElementModes::READ; - m_xDefaultCfgRootStorage = Reference< XStorage >( xStorageFactory->createInstanceWithArguments( aArgs ), UNO_QUERY_THROW ); - - Reference < XOutputStream > xTempOut( m_xServiceManager->createInstance ( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.TempFile")) ), - UNO_QUERY ); - - Reference< XPackageStructureCreator > xPackageStructCreator( m_xServiceManager->createInstance( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.PackageStructureCreator" ))), - UNO_QUERY_THROW ); - - RTL_LOGFILE_CONTEXT_TRACE( aLog, "{ convertToPackage" ); - xPackageStructCreator->convertToPackage( aDefaultConfigFolderURL, xTempOut ); - RTL_LOGFILE_CONTEXT_TRACE( aLog, "} convertToPackage" ); - - xTempOut->closeOutput(); - Reference< XInputStream > xTempIn( xTempOut, UNO_QUERY ); - Reference< XSeekable > xTempSeek( xTempOut, UNO_QUERY ); - - // Default root storage (READ-ACCESS) - xTempSeek->seek( 0 ); - - aArgs[0] <<= xTempIn; - aArgs[1] <<= ElementModes::READ; - m_xDefaultCfgRootStorage = Reference< XStorage >( xStorageFactory->createInstanceWithArguments( aArgs ), UNO_QUERY_THROW ); - - // Customizable root storage (READWRITE-ACCESS) - aArgs[0] <<= m_aUserConfigURL + aConfigSubFolder; - aArgs[1] <<= ElementModes::READWRITE; - m_xUserCfgRootStorage = Reference< XStorage >( xStorageFactory->createInstanceWithArguments( aArgs ), UNO_QUERY ); - - // Create wrapper object for module user interface configuration managers, so they are able to call commit/revert on - // root storage and nothing more (saftey)! - RootStorageWrapper* pUserRootStorageWrapper = new RootStorageWrapper( Reference< XTransactedObject >( m_xUserCfgRootStorage, UNO_QUERY )); - m_xUserRootCommit = Reference< XTransactedObject>( static_cast< OWeakObject *>( pUserRootStorageWrapper ), UNO_QUERY ); - } - - m_bInit = true; -} -*/ - ModuleUIConfigurationManagerSupplier::ModuleUIConfigurationManagerSupplier( const Reference< XMultiServiceFactory >& xServiceManager ) : ThreadHelpBase( &Application::GetSolarMutex() ) @@ -237,20 +143,6 @@ ModuleUIConfigurationManagerSupplier::~ModuleUIConfigurationManagerSupplier() xComponent->dispose(); ++pIter; } -/*TODO_AS - // Dispose our root configuration storages - if ( m_xDefaultCfgRootStorage.is() ) - { - Reference< XComponent > xComponent( m_xDefaultCfgRootStorage, UNO_QUERY ); - xComponent->dispose(); - } - - if ( m_xUserCfgRootStorage.is() ) - { - Reference< XComponent > xComponent( m_xUserCfgRootStorage, UNO_QUERY ); - xComponent->dispose(); - } -*/ } // XComponent @@ -311,53 +203,6 @@ throw ( NoSuchElementException, RuntimeException) // Create instance on demand if ( !pIter->second.is() ) { - /*TODO_AS - Reference< XStorage > xDefaultConfigModuleStorage; - Reference< XStorage > xUserConfigModuleStorage; - - try - { - xDefaultConfigModuleStorage = Reference< XStorage >( m_xDefaultCfgRootStorage->openStorageElement( - sShort, ElementModes::READ ), UNO_QUERY_THROW ); - - if ( m_xUserCfgRootStorage.is() ) - { - try - { - xUserConfigModuleStorage = Reference< XStorage >( m_xUserCfgRootStorage->openStorageElement( - sShort, ElementModes::READWRITE ), UNO_QUERY ); - } - catch( ::com::sun::star::io::IOException& ) - { - try - { - xUserConfigModuleStorage = Reference< XStorage >( m_xUserCfgRootStorage->openStorageElement( - sShort, ElementModes::READ ), UNO_QUERY ); - } - catch( com::sun::star::uno::Exception& ) - { - } - } - } - } - catch ( com::sun::star::uno::Exception& ) - { - } - PropertyValue aArg; - Sequence< Any > aArgs( 5 ); - aArg.Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ModuleIdentifier" )); - aArg.Value <<= ModuleIdentifier; - aArgs[0] <<= aArg; - aArg.Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultConfigStorage" )); - aArg.Value <<= xDefaultConfigModuleStorage; - aArgs[1] <<= aArg; - aArg.Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "UserConfigStorage" )); - aArg.Value <<= xUserConfigModuleStorage; - aArgs[2] <<= aArg; - aArg.Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "UserRootCommit" )); - aArg.Value <<= m_xUserRootCommit; - aArgs[3] <<= aArg; - */ ::rtl::OUString sShort; try { diff --git a/framework/test/test.cxx b/framework/test/test.cxx index 3f817ae590..f69a9f175f 100644 --- a/framework/test/test.cxx +++ b/framework/test/test.cxx @@ -369,52 +369,7 @@ void TestApplication::impl_testFilterCache() } else { -/* - // Step over all types and log his values. - // These simulate a XNameAccess! - const Sequence< OUString > seqAllTypeNames = aCache.getAllTypeNames(); - sal_uInt32 nCount = seqAllTypeNames.getLength(); - for( sal_uInt32 nPosition=0; nPosition<nCount; ++nPosition ) - { - sBuffer.appendAscii( "--------------------------------------------------------------------------------\n" ); - const TType* pType = aCache.getTypeByName( seqAllTypeNames[nPosition] ); - if( pType == NULL ) - { - sBuffer.appendAscii ( "Type [" ); - sBuffer.append ( (sal_Int32)nPosition ); - sBuffer.appendAscii ( "] \"" ); - sBuffer.append ( seqAllTypeNames[nPosition]); - sBuffer.appendAscii ( "\" isn't valid!" ); - } - else - { - sBuffer.appendAscii ( "Type [" ); - sBuffer.append ( (sal_Int32)nPosition ); - sBuffer.appendAscii ( "] \"" ); - sBuffer.append ( seqAllTypeNames[nPosition] ); - sBuffer.appendAscii ( "\"\n\t\tUIName\t=\t" ); - sBuffer.append ( pType->sUIName ); - sBuffer.appendAscii ( "\n\t\tMediaType\t=\t" ); - sBuffer.append ( pType->sMediaType ); - sBuffer.appendAscii ( "\n\t\tClipboardFormat\t=\t" ); - sBuffer.append ( pType->sClipboardFormat ); - sBuffer.appendAscii ( "\n\t\tURLPattern\t=\t{" ); - for( TConstStringIterator aIterator=pType->lURLPattern.begin(); aIterator!=pType->lURLPattern.end(); ++aIterator ) - { - sBuffer.append ( *aIterator ); - sBuffer.appendAscii ( ";\n\t\t" ); - } - sBuffer.appendAscii( "}\nExtensions\t=\t" ); - for( aIterator=pType->lExtensions.begin(); aIterator!=pType->lExtensions.end(); ++aIterator ) - { - sBuffer.append ( *aIterator ); - sBuffer.appendAscii ( ";\n\t\t" ); - } - sBuffer.appendAscii ( "}\nDocumentIconID\t=\t" ); - sBuffer.append ( (sal_Int32)pType->nDocumentIconID ); - } - } -*/ + // searchFirstType( URL, MediaType, ClipboardFormat, startEntry ) TCheckedTypeIterator aIterator; sBuffer.appendAscii( "search type for \"file://c|/temp/test.sdw\"; no media type; no clipboard format\n" ); diff --git a/framework/test/typecfg/xml2xcd.cxx b/framework/test/typecfg/xml2xcd.cxx index adb4cea5a2..420da0ee6b 100644 --- a/framework/test/typecfg/xml2xcd.cxx +++ b/framework/test/typecfg/xml2xcd.cxx @@ -2310,53 +2310,6 @@ sal_Bool XCDGenerator::impl_isUsAsciiAlphaDigit(sal_Unicode c, sal_Bool bDigitAl ::rtl::OUString XCDGenerator::impl_encodeSetName( const ::rtl::OUString& rSource ) { return impl_encodeSpecialSigns( rSource ); -/* - rtl::OUStringBuffer aTarget; - - sal_Unicode const * pBegin = rSource.getStr(); - sal_Unicode const * pEnd = pBegin + rSource.getLength(); - sal_Unicode const * pCopyEnd = pBegin; - sal_Unicode const * p = pBegin; - while (p != pEnd) - { - sal_Unicode c = *p; - if (!impl_isUsAsciiAlphaDigit(c,p != pBegin)) - switch (c) - { - case '-': - case '.': - if (p != pBegin) - break; - default: - aTarget.append(pCopyEnd, p - pCopyEnd); - aTarget.append(sal_Unicode('_')); - ModifiedUTF7Buffer aBuffer(&aTarget); - for (;;) - { - aBuffer.write(c); - ++p; - if (p == pEnd) - break; - c = *p; - if (impl_isUsAsciiAlphaDigit(c) || c == '-' || c == '.') - break; - } - aBuffer.flush(); - aTarget.append(sal_Unicode('_')); - pCopyEnd = p; - continue; - } - ++p; - } - - if (pCopyEnd == pBegin) - return rSource; - else - { - aTarget.append(pCopyEnd, pEnd - pCopyEnd); - return aTarget.makeStringAndClear(); - } -*/ } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |