rpms/openoffice.org/devel openoffice.org-1.9.87.rh151357.patch, 1.7, 1.8 openoffice.org.spec, 1.255, 1.256

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Wed Jun 29 11:05:14 UTC 2005


Author: caolanm

Update of /cvs/dist/rpms/openoffice.org/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv25853

Modified Files:
	openoffice.org-1.9.87.rh151357.patch openoffice.org.spec 
Log Message:
partial support file coverage fallbacks

openoffice.org-1.9.87.rh151357.patch:
 desktop/source/app/langselect.cxx                                        |   10 
 desktop/source/app/langselect.hxx                                        |    2 
 desktop/source/app/userinstall.cxx                                       |   15 
 desktop/source/migration/wizard.cxx                                      |   19 -
 openoffice.org/registry/registry/schema/org/openoffice/Office/Common.xcs |    8 
 registry/schema/org/openoffice/Office/Common.xcs                         |    0 
 sfx2/source/appl/sfxhelp.cxx                                             |   59 ++-
 source/app/langselect.cxx                                                |    0 
 source/app/langselect.hxx                                                |    0 
 source/app/userinstall.cxx                                               |    0 
 source/appl/sfxhelp.cxx                                                  |    0 
 source/migration/wizard.cxx                                              |    0 
 source/services/documentlist.cxx                                         |  171 ----------
 source/services/substitutepathvars.cxx                                   |   93 +++++
 source/ui/misc/glosdoc.cxx                                               |   14 
 util/makefile.mk                                                         |    1 
 16 files changed, 161 insertions(+), 231 deletions(-)

Index: openoffice.org-1.9.87.rh151357.patch
===================================================================
RCS file: /cvs/dist/rpms/openoffice.org/devel/openoffice.org-1.9.87.rh151357.patch,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- openoffice.org-1.9.87.rh151357.patch	10 Jun 2005 17:00:38 -0000	1.7
+++ openoffice.org-1.9.87.rh151357.patch	29 Jun 2005 11:05:09 -0000	1.8
@@ -235,13 +235,387 @@
              v.Value = makeAny(OUString::createFromAscii("org.openoffice.Setup"));
              theArgs[0] <<= v;
              Reference< XHierarchicalPropertySet> hpset(
+Index: source/services/documentlist.cxx
+===================================================================
+RCS file: /cvs/framework/framework/source/services/documentlist.cxx,v
+retrieving revision 1.11
+diff -u -p -r1.11 documentlist.cxx
+--- openoffice.org.origframework/source/services/documentlist.cxx	13 Apr 2005 08:41:32 -0000	1.11
++++ openoffice.org/framework/source/services/documentlist.cxx	29 Jun 2005 10:45:58 -0000
+@@ -552,8 +552,6 @@ ModifiedDocumentsWindow::ModifiedDocumen
+ 	)
+ :	WorkWindow( NULL, WB_STDWORK | WB_CLIPCHILDREN | WB_3DLOOK )
+ {
+-	// ctor reads in the file recovery list, so it must be called before the first document is loaded
+-	// it is not made visible if recovery list is empty, only adding an entry makes it visible
+     SetSizePixel( Size(300, 100) );
+     SetText( String( impl_getResId( STR_MODIFIEDDOCS ) ) );
+ 
+@@ -564,35 +562,6 @@ ModifiedDocumentsWindow::ModifiedDocumen
+ 	pImp->Show();
+     pImp->SetPosPixel( Point( 6,6 ) );
+ 
+-	// get all entries from the file recovery list
+-    ::rtl::OUString sName;
+-    ::rtl::OUString sFilter;
+-    ::rtl::OUString sTempName;
+-    SvtInternalOptions aInternalOptions;
+-    while( !aInternalOptions.IsRecoveryListEmpty() )
+-    {
+-        // Read and delete top recovery item from list0
+-        aInternalOptions.PopRecoveryItem( sName, sFilter, sTempName );
+-        ModifiedDocumentInfo_Impl* pUserData = new ModifiedDocumentInfo_Impl;
+-
+-        INetURLObject aObj( sName );
+-        if ( INetURLObject::CompareProtocolScheme( sName ) != INET_PROT_NOT_VALID )
+-        {
+-            pUserData->aURL = sName;
+-            pUserData->aTitle = aObj.GetMainURL( INetURLObject::DECODE_WITH_CHARSET );
+-        }
+-        else
+-        {
+-            pUserData->aTitle = sName;
+-        }
+-
+-        pUserData->aFilter = sFilter;
+-        pUserData->aTempName = sTempName;
+-
+-        USHORT nPos = pImp->InsertEntry( pUserData->aTitle );
+-        pImp->SetEntryData( nPos, pUserData );
+-    }
+-
+ 	if ( pImp->GetEntryCount() )
+ 		Show();
+ }
+@@ -620,146 +589,6 @@ void ModifiedDocumentsWindow::Remove(
+     ::osl::MutexGuard aGuard( GetStaticMutex_Impl() );
+     if ( !pWindow )
+         return;
+-
+-    // store to storage path ( this is local to the running soffice process )
+-    String aSavePath( SvtPathOptions().GetStoragePath() );
+-    String aSaveDir;
+-    ::utl::LocalFileHelper::ConvertPhysicalNameToURL( aSavePath, aSaveDir );
+-
+-    // add all document from the list to the RecoveryList
+-    SvtInternalOptions aOpt;
+-
+-    // save all documents in the list, if they are kept by a hidden task
+-    // documents represented as TempFiles can be added to the list directly
+-    try
+-    {
+-	// #110897#
+-	// uno::Reference < frame::XFramesSupplier > xDesk( ::comphelper::getProcessServiceFactory()->createInstance(
+-	//	SERVICENAME_DESKTOP), uno::UNO_QUERY );
+-    uno::Reference < frame::XFramesSupplier > xDesk( xServiceFactory->createInstance(
+-		SERVICENAME_DESKTOP), uno::UNO_QUERY );
+-
+-	uno::Reference < container::XIndexAccess > xTasks ( xDesk->getFrames(), uno::UNO_QUERY );
+-    uno::Reference < frame::XFrame > xTask;
+-    uno::Reference < frame::XController > xController;
+-    uno::Reference < frame::XModel > xModel;
+-    sal_Int32 nCount = xTasks->getCount();
+-    for (sal_Int32 i=0; i<nCount; ++i)
+-    {
+-        // it's cheaper to iterate over tasks first ( inner loop should be the faster one )
+-        uno::Any aElement = xTasks->getByIndex(i);
+-        if ( !(aElement>>=xTask) || !xTask.is() )
+-            continue;
+-
+-        xController = xTask->getController();
+-        if ( xController.is() )
+-            xModel = xController->getModel();
+-
+-        uno::Reference < util::XModifiable > xModify( xModel, uno::UNO_QUERY );
+-		if ( xModify.is() && xModify->isModified() )
+-		{
+-			// search in the list for this model
+-			ModifiedDocumentInfo_Impl* pUserData = NULL;
+-			USHORT i;
+-			for ( i=0; i<pWindow->pImp->GetEntryCount(); i++ )
+-        	{
+-                // compare the model with the internal references
+-            	pUserData = ( ModifiedDocumentInfo_Impl* ) pWindow->pImp->GetEntryData( i );
+-                if ( xModel == pUserData->xModel )
+-                	break;
+-        	}
+-
+-            rtl::OUString aTitle;
+-            if ( i == pWindow->pImp->GetEntryCount() )
+-				// list searched until end and not found
+-				xController = NULL;
+-			else
+-			{
+-				// remove from list
+-                aTitle = pUserData->aTitle;
+-            	DELETEZ( pUserData );
+-            	pWindow->pImp->RemoveEntry( i );
+-			}
+-
+-            // document found ?
+-            if ( xController.is() )
+-            {
+-                // clear modify flag to avoid messages when task is closed
+-                uno::Reference < util::XModifiable > xModify( xModel, uno::UNO_QUERY );
+-                if ( xModify.is() )
+-                    xModify->setModified( sal_False );
+-
+-                // store document as temporary file
+-                uno::Reference < frame::XStorable > xStor( xModel, uno::UNO_QUERY );
+-                if ( xStor.is() )
+-                {
+-                    // get the media descriptor and retrieve filter name and password
+-                    ::rtl::OUString aOrigPassword, aOrigFilterName;
+-                    uno::Sequence < beans::PropertyValue > aArgs( xModel->getArgs() );
+-                    sal_Int32 nProps = aArgs.getLength();
+-                    for ( sal_Int32 nProp = 0; nProp<nProps; nProp++ )
+-                    {
+-                        const beans::PropertyValue& rProp = aArgs[nProp];
+-                        if( rProp.Name == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FilterName")) )
+-                            rProp.Value >>= aOrigFilterName;
+-                        if( rProp.Name == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Password")) )
+-                            rProp.Value >>= aOrigPassword;
+-                    }
+-
+-                    // save document as tempfile in backup directory
+-                    // remember old name or title
+-                    ::rtl::OUString aOrigURL = xModel->getURL();
+-                    ::rtl::OUString aOldName, aSaveURL;
+-                    if ( aOrigURL.getLength() )
+-                    {
+-                        ::utl::TempFile aTempFile( &aSaveDir );
+-                        aSaveURL = aTempFile.GetURL();
+-                        aOldName = aOrigURL;
+-                    }
+-                    else
+-                    {
+-                        // untitled document
+-                        String aExt( RTL_CONSTASCII_USTRINGPARAM( ".sav" ) );
+-                        ::utl::TempFile aTempFile( String( RTL_CONSTASCII_USTRINGPARAM( "exc" ) ), &aExt, &aSaveDir );
+-                        aSaveURL = aTempFile.GetURL();
+-                        aOldName = aTitle;
+-                    }
+-
+-                    if ( aOrigPassword.getLength() )
+-                    {
+-                        // if the document was loaded with a password, it should be stored with password
+-                        uno::Sequence < beans::PropertyValue > aSaveArgs(1);
+-                        aSaveArgs[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Password") );
+-                        aSaveArgs[0].Value <<= aOrigPassword;
+-
+-                        xStor->storeToURL( aSaveURL, aSaveArgs );
+-                    }
+-                    else
+-                        xStor->storeToURL( aSaveURL, uno::Sequence < beans::PropertyValue >() );
+-
+-                    // remember original name and filter
+-                    aOpt.PushRecoveryItem( aOldName, aOrigFilterName, aSaveURL );
+-                }
+-            }
+-        }
+-    }
+-    }
+-    catch ( uno::Exception& )
+-    {
+-    }
+-
+-    // now handle all documents in TempFiles
+-    for ( USHORT i=0; i<pWindow->pImp->GetEntryCount(); )
+-	{
+-        ModifiedDocumentInfo_Impl* pUserData = ( ModifiedDocumentInfo_Impl* ) pWindow->pImp->GetEntryData( i );
+-        if ( pUserData->aTempName.Len() )
+-            aOpt.PushRecoveryItem( pUserData->aTitle, pUserData->aFilter, pUserData->aTempName );
+-        else
+-            OSL_ENSURE(sal_False, "Suspicous entry: no model, no TempFile!");
+-		delete pUserData;
+-        pWindow->pImp->RemoveEntry( i );
+-	}
+-
+     DELETEZ( pWindow );
+ }
+ 
+Index: source/services/substitutepathvars.cxx
+===================================================================
+RCS file: /cvs/framework/framework/source/services/substitutepathvars.cxx,v
+retrieving revision 1.10
+diff -u -p -r1.10 substitutepathvars.cxx
+--- openoffice.org.origframework/source/services/substitutepathvars.cxx	13 Jan 2005 19:14:36 -0000	1.10
++++ openoffice.org/framework/source/services/substitutepathvars.cxx	29 Jun 2005 10:45:59 -0000
+@@ -151,6 +151,14 @@
+ #include <rtl/ustrbuf.hxx>
+ #endif
+ 
++#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
++#include <com/sun/star/container/XNameAccess.hpp>
++#endif
++
++#ifndef _COMPHELPER_PROCESSFACTORY_HXX_
++#include <comphelper/processfactory.hxx>
++#endif
++
+ //_________________________________________________________________________________________________________________
+ //	Defines
+ //_________________________________________________________________________________________________________________
+@@ -1215,6 +1223,88 @@ throw ( NoSuchElementException, RuntimeE
+ 	return rtl::OUString();
+ }
+ 
++using rtl::OUString;
++using rtl::OString;
++
++Reference< XNameAccess > getConfigAccess(const sal_Char* pPath, sal_Bool bUpdate)
++{
++    Reference< XNameAccess > xNameAccess;
++    try{
++        OUString sConfigSrvc = OUString::createFromAscii("com.sun.star.configuration.ConfigurationProvider");
++        OUString sAccessSrvc;
++        if (bUpdate)
++            sAccessSrvc = OUString::createFromAscii("com.sun.star.configuration.ConfigurationUpdateAccess");
++        else
++            sAccessSrvc = OUString::createFromAscii("com.sun.star.configuration.ConfigurationAccess");
++
++        OUString sConfigURL = OUString::createFromAscii(pPath);
++
++        // get configuration provider
++        Reference< XMultiServiceFactory > theMSF = comphelper::getProcessServiceFactory();
++        if (theMSF.is()) {
++            Reference< XMultiServiceFactory > theConfigProvider = Reference< XMultiServiceFactory > (
++                theMSF->createInstance( sConfigSrvc ),UNO_QUERY_THROW );
++
++            // access the provider
++            Sequence< Any > theArgs(1);
++            theArgs[ 0 ] <<= sConfigURL;
++            xNameAccess = Reference< XNameAccess > (
++                theConfigProvider->createInstanceWithArguments(
++                    sAccessSrvc, theArgs ), UNO_QUERY_THROW );
++        }
++    } catch (com::sun::star::uno::Exception& e)
++    {
++        OString aMsg = OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US);
++        OSL_ENSURE(sal_False, aMsg.getStr());
++    }
++    return xNameAccess;
++}
++
++void getInstallMapping(OUString& usLocale)
++{
++    Sequence< OUString > seqLanguages;
++    Reference< XNameAccess > xAccess = 
++		getConfigAccess(
++			"org.openoffice.Setup/Office/InstalledLocales", sal_False);    
++    if (xAccess.is())
++    	seqLanguages = xAccess->getElementNames();
++
++    for (sal_Int32 i=0; i<seqLanguages.getLength(); i++)
++    {
++        if (usLocale.equals(seqLanguages[i]))
++			return;
++    }
++
++    // try fallback locales
++    if (usLocale.equalsAscii("zh-HK")) 
++	{
++		OUString sTemp = OUString::createFromAscii("zh-TW");
++    	for (sal_Int32 i=0; i<seqLanguages.getLength(); i++)
++    	{
++        	if (sTemp.equals(seqLanguages[i]))
++			{
++                usLocale = sTemp;
++				return;
++			}
++    	}
++	}
++
++    // no exact match was found, well try to find a substitute
++    OUString aInstalledLocale;
++    for (sal_Int32 i=0; i<seqLanguages.getLength(); i++)
++    {
++        if (usLocale.indexOf(seqLanguages[i]) == 0)
++        {
++            // requested locale starts with the installed locale
++            // (i.e. installed locale has index 0 in requested locale)
++            usLocale = seqLanguages[i];
++	    return;
++            break;
++        }
++    }
++    usLocale = OUString::createFromAscii("en-US");
++}
++
+ void SubstitutePathVariables::SetPredefinedPathVariables( PredefinedPathVariables& aPreDefPathVariables )
+ {
+ 	utl::ConfigManager* pCfgMgr = utl::ConfigManager::GetConfigManager();
+@@ -1278,7 +1368,10 @@ void SubstitutePathVariables::SetPredefi
+ 	Any aLocale = utl::ConfigManager::GetConfigManager()->GetDirectConfigProperty( utl::ConfigManager::LOCALE );
+ 	rtl::OUString aLocaleStr;
+ 	if ( aLocale >>= aLocaleStr )
++	{
++		getInstallMapping(aLocaleStr);
+ 		aPreDefPathVariables.m_eLanguageType = ConvertIsoStringToLanguage( aLocaleStr );
++	}
+ 	else
+ 	{
+ 		LOG_ERROR( "SubstitutePathVariables::SetPredefinedPathVariables", "Wrong Any type for language!" );
+Index: util/makefile.mk
+===================================================================
+RCS file: /cvs/framework/framework/util/makefile.mk,v
+retrieving revision 1.96
+diff -u -p -r1.96 makefile.mk
+--- openoffice.org.origframework/util/makefile.mk	22 Apr 2005 11:36:59 -0000	1.96
++++ openoffice.org/framework/util/makefile.mk	29 Jun 2005 10:45:59 -0000
+@@ -212,6 +212,7 @@ SHL3STDLIBS=	\
+ 				$(CPPUHELPERLIB)					\
+ 				$(CPPULIB)							\
+ 				$(VOSLIB)							\
++				$(COMPHELPERLIB)						\
+ 				$(SALLIB)
+ 
+ SHL3DEF=        $(MISC)$/$(SHL3TARGET).def
+Index: source/ui/misc/glosdoc.cxx
+===================================================================
+RCS file: /cvs/sw/sw/source/ui/misc/glosdoc.cxx,v
+retrieving revision 1.19
+diff -u -p -r1.19 glosdoc.cxx
+--- openoffice.org.origsw/source/ui/misc/glosdoc.cxx	11 Jan 2005 12:42:19 -0000	1.19
++++ openoffice.org/sw/source/ui/misc/glosdoc.cxx	29 Jun 2005 11:02:03 -0000
+@@ -577,19 +577,7 @@ void SwGlossaries::UpdateGlosPath(sal_Bo
+ 		}
+ 		aDirArr.DeleteAndDestroy(0, aDirArr.Count());
+ 
+-		if(!nTokenCount ||
+-			sErrPath.Len() && (bPathChanged || sOldErrPath != sErrPath) )
+-		{
+-			sOldErrPath = sErrPath;
+-			// Falscher Pfad, d.h. AutoText-Verzeichnis existiert nicht
+-
+-			ErrorHandler::HandleError( *new StringErrorInfo(
+-									ERR_AUTOPATH_ERROR, sErrPath,
+-									ERRCODE_BUTTON_OK | ERRCODE_MSG_ERROR ));
+-			bError = sal_True;
+-		}
+-		else
+-			bError = sal_False;
++		bError = sal_False;
+ 
+ 		if(pGlosArr)
+ 		{
 Index: registry/schema/org/openoffice/Office/Common.xcs
 ===================================================================
 RCS file: /cvs/util/officecfg/registry/schema/org/openoffice/Office/Common.xcs,v
 retrieving revision 1.107
-diff -u -p -r1.107 Common.xcs
---- openoffice.org.orig/officecfg/registry/schema/org/openoffice/Office/Common.xcs	2 Feb 2005 16:41:38 -0000	1.107
-+++ openoffice.org/officecfg/registry/schema/org/openoffice/Office/Common.xcs	18 Apr 2005 10:15:58 -0000
+diff -u -p -u -r1.107 Common.xcs
+--- openoffice.org.orig
+egistry/registry/schema/org/openoffice/Office/Common.xcs	2 Feb 2005 16:41:38 -0000	1.107
++++ openoffice.org/registry/registry/schema/org/openoffice/Office/Common.xcs	29 Jun 2005 11:08:26 -0000
+@@ -1288,7 +1288,7 @@ Dymamic border coloring means that when 
+ 						<author>OS</author>
+ 						<desc>Contains the directory which contains the AutoText modules.</desc>
+ 					</info>
+-					<value oor:separator=":">$(insturl)/share/autotext/$(vlang):$(userurl)/autotext</value>
++					<value oor:separator=":">$(insturl)/share/autotext/$(vlang):$(insturl)/share/autotext/en-US:$(userurl)/autotext</value>
+ 				</prop>
+ 				<prop oor:name="Backup" oor:type="xs:string">
+ 					<info>
 @@ -1408,7 +1408,7 @@ Dymamic border coloring means that when 
  						<author>MBA</author>
  						<desc>Specifies the templates originate from these folders and sub-folders.</desc>
@@ -251,6 +625,15 @@
  				</prop>
  				<prop oor:name="UIConfig" oor:type="oor:string-list">
  					<info>
+@@ -1460,7 +1460,7 @@ Dymamic border coloring means that when 
+ 					<info>
+ 						<desc>Specifies the default directory where the AutoText modules are located.</desc>
+ 					</info>
+-					<value oor:separator=":">$(insturl)/share/autotext/$(vlang):$(userurl)/autotext</value>
++					<value oor:separator=":">$(insturl)/share/autotext/$(vlang):$(insturl)/share/autotext/en-US:$(userurl)/autotext</value>
+ 				</prop>
+ 				<prop oor:name="Backup" oor:type="xs:string">
+ 					<info>
 @@ -1556,7 +1556,7 @@ Dymamic border coloring means that when 
  					<info>
  						<desc>Specifies the default directory where all provided templates are located in folders and sub-folders.</desc>
@@ -260,41 +643,3 @@
  				</prop>
  				<prop oor:name="UIConfig" oor:type="oor:string-list">
  					<info>
---- openoffice.org.orig/desktop/source/app/langselect.cxx	2005-04-29 15:46:20.000000000 +0100
-+++ openoffice.org/desktop/source/app/langselect.cxx	2005-04-29 15:47:04.000000000 +0100
-@@ -178,24 +178,17 @@
-             usName = OUString::createFromAscii("DefaultLocale_CTL");
-             break;
-     }
--    OUString usValue;
--    xProp->getPropertyValue(usName) >>= usValue;
--    if (usValue.getLength() == 0)
--    {
--        // there is no document language set, for the script type selected
--        // in the UI
--        // covert the LanguageType we've got from the LanguageTable back to
--        // an iso string and store it
--        OUString usDefault = ConvertLanguageToIsoString(ltUILocale);
--        try
--        {
--            xProp->setPropertyValue(usName, makeAny(usDefault));
--            Reference< XChangesBatch >(xProp, UNO_QUERY_THROW)->commitChanges();
--        }
--        catch ( PropertyVetoException )
--        {
--            // we are not allowed to change this
--        }
-+    // covert the LanguageType we've got from the LanguageTable back to
-+    // an iso string and store it
-+    OUString usDefault = ConvertLanguageToIsoString(ltUILocale);
-+    try
-+    {
-+        xProp->setPropertyValue(usName, makeAny(usDefault));
-+        Reference< XChangesBatch >(xProp, UNO_QUERY_THROW)->commitChanges();
-+    }
-+    catch ( PropertyVetoException )
-+    {
-+        // we are not allowed to change this
-     }
- }
- 


Index: openoffice.org.spec
===================================================================
RCS file: /cvs/dist/rpms/openoffice.org/devel/openoffice.org.spec,v
retrieving revision 1.255
retrieving revision 1.256
diff -u -r1.255 -r1.256
--- openoffice.org.spec	29 Jun 2005 09:38:01 -0000	1.255
+++ openoffice.org.spec	29 Jun 2005 11:05:09 -0000	1.256
@@ -2586,6 +2586,7 @@
 %changelog
 * Wed Jun 29 2005 Caolan McNamara <caolanm at redhat.com> - 1:1.9.112-2
 - wrong userdir
+- allow fallbacks for translations with partial support file coverage
 
 * Mon Jun 27 2005 Caolan McNamara <caolanm at redhat.com> - 1:1.9.112-1
 - bump to next version




More information about the fedora-cvs-commits mailing list