LOG -update to 3.6.1.2

This commit is contained in:
akdengi 2012-09-17 13:37:52 +04:00
parent 8a0c08544f
commit 7c1bc4f7bf
21 changed files with 2210 additions and 584 deletions

View file

@ -0,0 +1,970 @@
diff -ru libreoffice-3.5.5.3.orig/cui/source/options/optlingu.cxx libreoffice-3.5.5.3/cui/source/options/optlingu.cxx
--- libreoffice-3.5.5.3.orig/cui/source/options/optlingu.cxx 2012-07-13 12:37:15.032259144 +0100
+++ libreoffice-3.5.5.3/cui/source/options/optlingu.cxx 2012-07-16 08:49:26.294209540 +0100
@@ -1150,12 +1150,6 @@
aLinguDicsEditPB.SetAccessibleName(sAccessibleNameDicsEdit);
aLinguOptionsEditPB.SetAccessibleName(sAccessibleNameOptionEdit);
- // force recalculation of hash value used for checking the need of updating
- // because new dictionaries might be installed / downloaded.
- //! Thus it needs to be called now since it may infuence the supported languages
- //! to be reported AND the found user-dictionaries(!) as well.
- SvxLinguConfigUpdate::UpdateAll( sal_True );
-
xProp = uno::Reference< XPropertySet >( SvxGetLinguPropertySet(), UNO_QUERY );
xDicList = uno::Reference< XDictionaryList >( SvxGetDictionaryList(), UNO_QUERY );
if (xDicList.is())
diff -ru libreoffice-3.5.5.3.orig/editeng/inc/editeng/unolingu.hxx libreoffice-3.5.5.3/editeng/inc/editeng/unolingu.hxx
--- libreoffice-3.5.5.3.orig/editeng/inc/editeng/unolingu.hxx 2012-07-13 12:37:16.109269892 +0100
+++ libreoffice-3.5.5.3/editeng/inc/editeng/unolingu.hxx 2012-07-16 08:49:26.294209540 +0100
@@ -46,29 +46,6 @@
class Window;
///////////////////////////////////////////////////////////////////////////
-// SvxLinguConfigUpdate
-// class to update configuration items when (before!) the linguistic is used.
-//
-// This class is called by all the dummy implementations to update all of the
-// configuration (list of used/available services) when the linguistic is
-// accessed for the first time.
-
-class SvxLinguConfigUpdate
-{
- static sal_Int32 nCurrentDataFilesChangedCheckValue;
- static sal_Int16 nNeedUpdating; // n == -1 => needs to be checked
- // n == 0 => already updated, nothing to be done
- // n == 1 => needs to be updated
-
- static sal_Int32 CalcDataFilesChangedCheckValue();
-
-public:
-
- EDITENG_DLLPUBLIC static void UpdateAll( sal_Bool bForceCheck = sal_False );
- static sal_Bool IsNeedUpdateAll( sal_Bool bForceCheck = sal_False );
-};
-
-///////////////////////////////////////////////////////////////////////////
class EDITENG_DLLPUBLIC LinguMgr
{
diff -ru libreoffice-3.5.5.3.orig/editeng/source/misc/unolingu.cxx libreoffice-3.5.5.3/editeng/source/misc/unolingu.cxx
--- libreoffice-3.5.5.3.orig/editeng/source/misc/unolingu.cxx 2012-07-13 12:37:15.900267806 +0100
+++ libreoffice-3.5.5.3/editeng/source/misc/unolingu.cxx 2012-07-16 08:52:53.919596778 +0100
@@ -90,365 +90,6 @@
return xRes;
}
-sal_Bool lcl_FindEntry( const OUString &rEntry, const Sequence< OUString > &rCfgSvcs )
-{
- sal_Int32 nRes = -1;
- sal_Int32 nEntries = rCfgSvcs.getLength();
- const OUString *pEntry = rCfgSvcs.getConstArray();
- for (sal_Int32 i = 0; i < nEntries && nRes == -1; ++i)
- {
- if (rEntry == pEntry[i])
- nRes = i;
- }
- return nRes != -1;
-}
-
-
-Sequence< OUString > lcl_RemoveMissingEntries(
- const Sequence< OUString > &rCfgSvcs,
- const Sequence< OUString > &rAvailSvcs )
-{
- Sequence< OUString > aRes( rCfgSvcs.getLength() );
- OUString *pRes = aRes.getArray();
- sal_Int32 nCnt = 0;
-
- sal_Int32 nEntries = rCfgSvcs.getLength();
- const OUString *pEntry = rCfgSvcs.getConstArray();
- for (sal_Int32 i = 0; i < nEntries; ++i)
- {
- if (!pEntry[i].isEmpty() && lcl_FindEntry( pEntry[i], rAvailSvcs ))
- pRes[ nCnt++ ] = pEntry[i];
- }
-
- aRes.realloc( nCnt );
- return aRes;
-}
-
-
-Sequence< OUString > lcl_GetLastFoundSvcs(
- SvtLinguConfig &rCfg,
- const OUString &rLastFoundList ,
- const Locale &rAvailLocale )
-{
- Sequence< OUString > aRes;
-
- OUString aCfgLocaleStr( MsLangId::convertLanguageToIsoString(
- SvxLocaleToLanguage( rAvailLocale ) ) );
-
- Sequence< OUString > aNodeNames( rCfg.GetNodeNames(rLastFoundList) );
- sal_Bool bFound = lcl_FindEntry( aCfgLocaleStr, aNodeNames);
-
- if (bFound)
- {
- Sequence< OUString > aNames(1);
- OUString &rNodeName = aNames.getArray()[0];
- rNodeName = rLastFoundList;
- rNodeName += OUString::valueOf( (sal_Unicode)'/' );
- rNodeName += aCfgLocaleStr;
- Sequence< Any > aValues( rCfg.GetProperties( aNames ) );
- if (aValues.getLength())
- {
- OSL_ENSURE( aValues.getLength() == 1, "unexpected length of sequence" );
- Sequence< OUString > aSvcImplNames;
- if (aValues.getConstArray()[0] >>= aSvcImplNames)
- aRes = aSvcImplNames;
- else
- {
- OSL_FAIL( "type mismatch" );
- }
- }
- }
-
- return aRes;
-}
-
-
-Sequence< OUString > lcl_GetNewEntries(
- const Sequence< OUString > &rLastFoundSvcs,
- const Sequence< OUString > &rAvailSvcs )
-{
- sal_Int32 nLen = rAvailSvcs.getLength();
- Sequence< OUString > aRes( nLen );
- OUString *pRes = aRes.getArray();
- sal_Int32 nCnt = 0;
-
- const OUString *pEntry = rAvailSvcs.getConstArray();
- for (sal_Int32 i = 0; i < nLen; ++i)
- {
- if (!pEntry[i].isEmpty() && !lcl_FindEntry( pEntry[i], rLastFoundSvcs ))
- pRes[ nCnt++ ] = pEntry[i];
- }
-
- aRes.realloc( nCnt );
- return aRes;
-}
-
-
-Sequence< OUString > lcl_MergeSeq(
- const Sequence< OUString > &rCfgSvcs,
- const Sequence< OUString > &rNewSvcs )
-{
- Sequence< OUString > aRes( rCfgSvcs.getLength() + rNewSvcs.getLength() );
- OUString *pRes = aRes.getArray();
- sal_Int32 nCnt = 0;
-
- for (sal_Int32 k = 0; k < 2; ++k)
- {
- // add previously configuerd service first and append
- // new found services at the end
- const Sequence< OUString > &rSeq = k == 0 ? rCfgSvcs : rNewSvcs;
-
- sal_Int32 nLen = rSeq.getLength();
- const OUString *pEntry = rSeq.getConstArray();
- for (sal_Int32 i = 0; i < nLen; ++i)
- {
- if (!pEntry[i].isEmpty() && !lcl_FindEntry( pEntry[i], aRes ))
- pRes[ nCnt++ ] = pEntry[i];
- }
- }
-
- aRes.realloc( nCnt );
- return aRes;
-}
-
-sal_Int16 SvxLinguConfigUpdate::nNeedUpdating = -1;
-sal_Int32 SvxLinguConfigUpdate::nCurrentDataFilesChangedCheckValue = -1;
-
-void SvxLinguConfigUpdate::UpdateAll( sal_Bool bForceCheck )
-{
- RTL_LOGFILE_CONTEXT( aLog, "svx: SvxLinguConfigUpdate::UpdateAll" );
-
- if (IsNeedUpdateAll( bForceCheck ))
- {
- typedef OUString OUstring_t;
- typedef Sequence< OUString > Sequence_OUString_t;
- typedef std::map< OUstring_t, Sequence_OUString_t > list_entry_map_t;
-
- RTL_LOGFILE_CONTEXT( aLog, "svx: SvxLinguConfigUpdate::UpdateAll - updating..." );
-
- OSL_ENSURE( nNeedUpdating == 1, "SvxLinguConfigUpdate::UpdateAll already updated!" );
-
- uno::Reference< XLinguServiceManager > xLngSvcMgr( GetLngSvcMgr_Impl() );
- OSL_ENSURE( xLngSvcMgr.is(), "service manager missing");
- if (!xLngSvcMgr.is())
- return;
-
- SvtLinguConfig aCfg;
-
- const int nNumServices = 4;
- const sal_Char * apServices[nNumServices] = { SN_SPELLCHECKER, SN_GRAMMARCHECKER, SN_HYPHENATOR, SN_THESAURUS };
- const sal_Char * apCurLists[nNumServices] = { "ServiceManager/SpellCheckerList", "ServiceManager/GrammarCheckerList", "ServiceManager/HyphenatorList", "ServiceManager/ThesaurusList" };
- const sal_Char * apLastFoundLists[nNumServices] = { "ServiceManager/LastFoundSpellCheckers", "ServiceManager/LastFoundGrammarCheckers", "ServiceManager/LastFoundHyphenators", "ServiceManager/LastFoundThesauri" };
-
- // usage of indices as above: 0 = spell checker, 1 = grammar checker, 2 = hyphenator, 3 = thesaurus
- std::vector< list_entry_map_t > aLastFoundSvcs(nNumServices);
- std::vector< list_entry_map_t > aCurSvcs(nNumServices);
-
- for (int k = 0; k < nNumServices; ++k)
- {
- OUString aService( ::rtl::OUString::createFromAscii( apServices[k] ) );
- OUString aActiveList( ::rtl::OUString::createFromAscii( apCurLists[k] ) );
- OUString aLastFoundList( ::rtl::OUString::createFromAscii( apLastFoundLists[k] ) );
- sal_Int32 i;
-
- //
- // remove configured but not available language/services entries
- //
- Sequence< OUString > aNodeNames( aCfg.GetNodeNames( aActiveList ) ); // list of configured locales
- sal_Int32 nNodeNames = aNodeNames.getLength();
- const OUString *pNodeName = aNodeNames.getConstArray();
- for (i = 0; i < nNodeNames; ++i)
- {
- Locale aLocale( SvxCreateLocale( MsLangId::convertIsoStringToLanguage(pNodeName[i]) ) );
- Sequence< OUString > aCfgSvcs(
- xLngSvcMgr->getConfiguredServices( aService, aLocale ));
- Sequence< OUString > aAvailSvcs(
- xLngSvcMgr->getAvailableServices( aService, aLocale ));
-#if OSL_DEBUG_LEVEL > 1
- const OUString * pCfgSvcs = aCfgSvcs.getConstArray();
- const OUString * pAvailSvcs = aAvailSvcs.getConstArray();
- (void) pCfgSvcs;
- (void) pAvailSvcs;
-#endif
- aCfgSvcs = lcl_RemoveMissingEntries( aCfgSvcs, aAvailSvcs );
-
- aCurSvcs[k][ pNodeName[i] ] = aCfgSvcs;
- }
-
- //
- // add new available language/servcice entries
- //
- uno::Reference< XAvailableLocales > xAvail( xLngSvcMgr, UNO_QUERY );
- Sequence< Locale > aAvailLocales( xAvail->getAvailableLocales(aService) );
- sal_Int32 nAvailLocales = aAvailLocales.getLength();
- const Locale *pAvailLocale = aAvailLocales.getConstArray();
- for (i = 0; i < nAvailLocales; ++i)
- {
- Sequence< OUString > aAvailSvcs(
- xLngSvcMgr->getAvailableServices( aService, pAvailLocale[i] ));
- Sequence< OUString > aLastSvcs(
- lcl_GetLastFoundSvcs( aCfg, aLastFoundList , pAvailLocale[i] ));
- Sequence< OUString > aNewSvcs =
- lcl_GetNewEntries( aLastSvcs, aAvailSvcs );
-#if OSL_DEBUG_LEVEL > 1
- const OUString * pAvailSvcs = aAvailSvcs.getConstArray();
- const OUString * pLastSvcs = aLastSvcs.getConstArray();
- const OUString * pNewSvcs = aNewSvcs.getConstArray();
- (void) pAvailSvcs;
- (void) pLastSvcs;
- (void) pNewSvcs;
-#endif
-
- OUString aCfgLocaleStr( MsLangId::convertLanguageToIsoString(
- SvxLocaleToLanguage( pAvailLocale[i] ) ) );
- Sequence< OUString > aCfgSvcs( aCurSvcs[k][ aCfgLocaleStr ] );
-
- // merge services list (previously configured to be listed first).
- aCfgSvcs = lcl_MergeSeq( aCfgSvcs, aNewSvcs );
-
-/*
- // there is at most one Hyphenator per language allowed
- // to be configured, thus we only use the first one found.
- if (k == 2 && aCfgSvcs.getLength() > 1)
- aCfgSvcs.realloc(1);
-*/
- aCurSvcs[k][ aCfgLocaleStr ] = aCfgSvcs;
- }
-
- //
- // set last found services to currently available ones
- //
- for (i = 0; i < nAvailLocales; ++i)
- {
- Sequence< OUString > aSvcImplNames(
- xLngSvcMgr->getAvailableServices( aService, pAvailLocale[i] ) );
-
-#if OSL_DEBUG_LEVEL > 1
- sal_Int32 nSvcs = aSvcImplNames.getLength();
- const OUString *pSvcImplName = aSvcImplNames.getConstArray();
- for (sal_Int32 j = 0; j < nSvcs; ++j)
- {
- OUString aImplName( pSvcImplName[j] );
- }
-#endif
-
- OUString aCfgLocaleStr( MsLangId::convertLanguageToIsoString(
- SvxLocaleToLanguage( pAvailLocale[i] ) ) );
- aLastFoundSvcs[k][ aCfgLocaleStr ] = aSvcImplNames;
- }
- }
-
- //
- // write new data back to configuration
- //
- for (int k = 0; k < nNumServices; ++k)
- {
- for (int i = 0; i < 2; ++i)
- {
- const sal_Char *pSubNodeName = (i == 0) ? apCurLists[k] : apLastFoundLists[k];
- OUString aSubNodeName( ::rtl::OUString::createFromAscii(pSubNodeName) );
-
- list_entry_map_t &rCurMap = (i == 0) ? aCurSvcs[k] : aLastFoundSvcs[k];
- list_entry_map_t::const_iterator aIt( rCurMap.begin() );
- sal_Int32 nVals = static_cast< sal_Int32 >( rCurMap.size() );
- Sequence< PropertyValue > aNewValues( nVals );
- PropertyValue *pNewValue = aNewValues.getArray();
- while (aIt != rCurMap.end())
- {
- OUString aCfgEntryName( aSubNodeName );
- aCfgEntryName += OUString::valueOf( (sal_Unicode) '/' );
- aCfgEntryName += (*aIt).first;
-
-#if OSL_DEBUG_LEVEL > 1
- Sequence< OUString > aSvcImplNames( (*aIt).second );
- sal_Int32 nSvcs = aSvcImplNames.getLength();
- const OUString *pSvcImplName = aSvcImplNames.getConstArray();
- for (sal_Int32 j = 0; j < nSvcs; ++j)
- {
- OUString aImplName( pSvcImplName[j] );
- }
-#endif
- pNewValue->Name = aCfgEntryName;
- pNewValue->Value <<= (*aIt).second;
- ++pNewValue;
- ++aIt;
- }
- OSL_ENSURE( pNewValue - aNewValues.getArray() == nVals,
- "possible mismatch of sequence size and property number" );
-
- {
- RTL_LOGFILE_CONTEXT( aLog, "svx: SvxLinguConfigUpdate::UpdateAll - ReplaceSetProperties" );
- // add new or replace existing entries.
- sal_Bool bRes = aCfg.ReplaceSetProperties( aSubNodeName, aNewValues );
- if (!bRes)
- {
-#if OSL_DEBUG_LEVEL > 1
- OSL_FAIL( "failed to set new configuration values" );
-#endif
- }
- }
- }
- }
- OSL_ENSURE( nCurrentDataFilesChangedCheckValue != -1, "SvxLinguConfigUpdate::UpdateAll DataFilesChangedCheckValue not yet calculated!" );
- Any aAny;
-
- // for the time being (developer builds until OOo 3.0)
- // we should always check for everything available
- // otherwise we may miss a new installed extension dicitonary
- // just because e.g. the spellchecker is not asked what
- // languages it does support currently...
- // Since the check is on-demand occuring and executed once it should
- // not be too troublesome.
- // In OOo 3.0 we will not need the respective code anymore at all.
-// aAny <<= nCurrentDataFilesChangedCheckValue;
- aAny <<= (sal_Int32) -1; // keep the value set to 'need to check'
-
- aCfg.SetProperty( A2OU( "DataFilesChangedCheckValue" ), aAny );
-
- //! Note 1: the new values are commited when the 'aCfg' object
- //! gets destroyed.
- //! Note 2: the new settings in the configuration get applied
- //! because the 'LngSvcMgr' (in linguistic/source/lngsvcmgr.hxx)
- //! listens to the configuration for changes of the relevant
- //! properties and then applies the new settings.
-
- // nothing needs to be done anymore
- nNeedUpdating = 0;
- }
-}
-
-
-sal_Int32 SvxLinguConfigUpdate::CalcDataFilesChangedCheckValue()
-{
- RTL_LOGFILE_CONTEXT( aLog, "svx: SvxLinguConfigUpdate::CalcDataFilesChangedCheckValue" );
-
- sal_Int32 nHashVal = 0;
- // nothing to be checked anymore since those old directory paths are gone by now
- return nHashVal;
-}
-
-
-sal_Bool SvxLinguConfigUpdate::IsNeedUpdateAll( sal_Bool bForceCheck )
-{
- RTL_LOGFILE_CONTEXT( aLog, "svx: SvxLinguConfigUpdate::IsNeedUpdateAll" );
- if (nNeedUpdating == -1 || bForceCheck ) // need to check if updating is necessary
- {
- // calculate hash value for current data files
- nCurrentDataFilesChangedCheckValue = CalcDataFilesChangedCheckValue();
-
- // compare hash value and check value to see if anything has changed
- // and thus the configuration needs to be updated
- SvtLinguOptions aLinguOpt;
- SvtLinguConfig aCfg;
- aCfg.GetOptions( aLinguOpt );
- nNeedUpdating = (nCurrentDataFilesChangedCheckValue == aLinguOpt.nDataFilesChangedCheckValue) ? 0 : 1;
- }
- OSL_ENSURE( nNeedUpdating != -1,
- "need for linguistic configuration update should have been already checked." );
-
- return nNeedUpdating == 1;
-}
-
//! Dummy implementation in order to avoid loading of lingu DLL
//! when only the XSupportedLocales interface is used.
@@ -520,10 +158,6 @@
void ThesDummy_Impl::GetThes_Impl()
{
- // update configuration before accessing the service
- if (SvxLinguConfigUpdate::IsNeedUpdateAll())
- SvxLinguConfigUpdate::UpdateAll();
-
if (!xThes.is())
{
uno::Reference< XLinguServiceManager > xLngSvcMgr( GetLngSvcMgr_Impl() );
@@ -543,8 +177,7 @@
ThesDummy_Impl::getLocales()
throw(uno::RuntimeException)
{
- if (!SvxLinguConfigUpdate::IsNeedUpdateAll()) // configuration already update and thus lingu DLL's already loaded ?
- GetThes_Impl();
+ GetThes_Impl();
if (xThes.is())
return xThes->getLocales();
else if (!pLocaleSeq) // if not already loaded save startup time by avoiding loading them now
@@ -557,8 +190,7 @@
ThesDummy_Impl::hasLocale( const lang::Locale& rLocale )
throw(uno::RuntimeException)
{
- if (!SvxLinguConfigUpdate::IsNeedUpdateAll()) // configuration already update and thus lingu DLL's already loaded ?
- GetThes_Impl();
+ GetThes_Impl();
if (xThes.is())
return xThes->hasLocale( rLocale );
else if (!pLocaleSeq) // if not already loaded save startup time by avoiding loading them now
@@ -632,10 +264,6 @@
void SpellDummy_Impl::GetSpell_Impl()
{
- // update configuration before accessing the service
- if (SvxLinguConfigUpdate::IsNeedUpdateAll())
- SvxLinguConfigUpdate::UpdateAll();
-
if (!xSpell.is())
{
uno::Reference< XLinguServiceManager > xLngSvcMgr( GetLngSvcMgr_Impl() );
@@ -748,10 +376,6 @@
void HyphDummy_Impl::GetHyph_Impl()
{
- // update configuration before accessing the service
- if (SvxLinguConfigUpdate::IsNeedUpdateAll())
- SvxLinguConfigUpdate::UpdateAll();
-
if (!xHyph.is())
{
uno::Reference< XLinguServiceManager > xLngSvcMgr( GetLngSvcMgr_Impl() );
diff -ru libreoffice-3.5.5.3.orig/linguistic/Library_lng.mk libreoffice-3.5.5.3/linguistic/Library_lng.mk
--- libreoffice-3.5.5.3.orig/linguistic/Library_lng.mk 2012-07-13 12:23:35.568866084 +0100
+++ libreoffice-3.5.5.3/linguistic/Library_lng.mk 2012-07-16 08:49:27.810226966 +0100
@@ -56,6 +56,7 @@
tl \
ucbhelper \
utl \
+ vcl \
xo \
$(gb_STDLIBS) \
))
diff -ru libreoffice-3.5.5.3.orig/linguistic/prj/build.lst libreoffice-3.5.5.3/linguistic/prj/build.lst
--- libreoffice-3.5.5.3.orig/linguistic/prj/build.lst 2012-07-13 12:23:35.611866523 +0100
+++ libreoffice-3.5.5.3/linguistic/prj/build.lst 2012-07-16 08:49:27.820227082 +0100
@@ -1,2 +1,2 @@
-lg linguistic : svl xmloff ucbhelper comphelper ICU:icu LIBXSLT:libxslt NULL
+lg linguistic : svl vcl xmloff ucbhelper comphelper ICU:icu LIBXSLT:libxslt NULL
lg linguistic\prj nmake - all lg_prj NULL
diff -ru libreoffice-3.5.5.3.orig/linguistic/source/lngsvcmgr.cxx libreoffice-3.5.5.3/linguistic/source/lngsvcmgr.cxx
--- libreoffice-3.5.5.3.orig/linguistic/source/lngsvcmgr.cxx 2012-07-13 12:23:35.585866257 +0100
+++ libreoffice-3.5.5.3/linguistic/source/lngsvcmgr.cxx 2012-07-16 08:49:27.829227184 +0100
@@ -27,6 +27,7 @@
************************************************************************/
+#include <com/sun/star/deployment/ExtensionManager.hpp>
#include <com/sun/star/registry/XRegistryKey.hpp>
#include <com/sun/star/container/XContentEnumerationAccess.hpp>
#include <com/sun/star/container/XEnumeration.hpp>
@@ -270,8 +271,6 @@
}
}
-
-//IMPL_LINK( LngSvcMgrListenerHelper, TimeOut, Timer*, pTimer )
long LngSvcMgrListenerHelper::Timeout()
{
osl::MutexGuard aGuard( GetLinguMutex() );
@@ -483,11 +482,98 @@
pNames[2] = "ServiceManager/HyphenatorList";
pNames[3] = "ServiceManager/ThesaurusList";
EnableNotification( aNames );
+
+ UpdateAll();
+
+ aUpdateTimer.SetTimeout(500);
+ aUpdateTimer.SetTimeoutHdl(LINK(this, LngSvcMgr, updateAndBroadcast));
+
+ // request to be notified if an extension has been added/removed
+ uno::Reference<uno::XComponentContext> xContext(comphelper::getProcessComponentContext());
+
+ uno::Reference<deployment::XExtensionManager> xExtensionManager(
+ deployment::ExtensionManager::get(xContext));
+ if (xExtensionManager.is())
+ {
+ xMB = uno::Reference<util::XModifyBroadcaster>(xExtensionManager, uno::UNO_QUERY_THROW);
+
+ uno::Reference<util::XModifyListener> xListener(this);
+ xMB->addModifyListener( xListener );
+ }
+}
+
+// ::com::sun::star::util::XModifyListener
+void LngSvcMgr::modified(const lang::EventObject&)
+ throw(uno::RuntimeException)
+{
+ osl::MutexGuard aGuard(GetLinguMutex());
+ //assume that if an extension has been added/removed that
+ //it might be a dictionary extension, so drop our cache
+
+ delete pAvailSpellSvcs;
+ pAvailSpellSvcs = NULL;
+ delete pAvailGrammarSvcs;
+ pAvailGrammarSvcs = NULL;
+ delete pAvailHyphSvcs;
+ pAvailHyphSvcs = NULL;
+ delete pAvailThesSvcs;
+ pAvailThesSvcs = NULL;
+
+ //schedule in an update to execute in the main thread
+ aUpdateTimer.Start();
+}
+
+//run update, and inform everyone that dictionaries (may) have changed, this
+//needs to be run in the main thread because
+//utl::ConfigChangeListener_Impl::changesOccurred grabs the SolarMutex and we
+//get notified that an extension was added from an extension manager thread
+IMPL_LINK_NOARG(LngSvcMgr, updateAndBroadcast)
+{
+ osl::MutexGuard aGuard( GetLinguMutex() );
+
+ UpdateAll();
+
+ if (pListenerHelper)
+ {
+ pListenerHelper->AddLngSvcEvt(
+ linguistic2::LinguServiceEventFlags::SPELL_CORRECT_WORDS_AGAIN |
+ linguistic2::LinguServiceEventFlags::SPELL_WRONG_WORDS_AGAIN |
+ linguistic2::LinguServiceEventFlags::PROOFREAD_AGAIN |
+ linguistic2::LinguServiceEventFlags::HYPHENATE_AGAIN );
+ }
+
+ return 0;
}
+void LngSvcMgr::stopListening()
+{
+ osl::MutexGuard aGuard(GetLinguMutex());
+
+ if (xMB.is())
+ {
+ try
+ {
+ uno::Reference<util::XModifyListener> xListener(this);
+ xMB->removeModifyListener(xListener);
+ }
+ catch (const uno::Exception&)
+ {
+ }
+
+ xMB.clear();
+ }
+}
+
+void LngSvcMgr::disposing(const lang::EventObject&)
+ throw (uno::RuntimeException)
+{
+ stopListening();
+}
LngSvcMgr::~LngSvcMgr()
{
+ stopListening();
+
// memory for pSpellDsp, pHyphDsp, pThesDsp, pListenerHelper
// will be freed in the destructor of the respective Reference's
// xSpellDsp, xGrammarDsp, xHyphDsp, xThesDsp
@@ -498,6 +584,252 @@
delete pAvailThesSvcs;
}
+namespace
+{
+ using lang::Locale;
+ using uno::Any;
+ using uno::Sequence;
+
+ sal_Bool lcl_FindEntry( const OUString &rEntry, const Sequence< OUString > &rCfgSvcs )
+ {
+ sal_Int32 nRes = -1;
+ sal_Int32 nEntries = rCfgSvcs.getLength();
+ const OUString *pEntry = rCfgSvcs.getConstArray();
+ for (sal_Int32 i = 0; i < nEntries && nRes == -1; ++i)
+ {
+ if (rEntry == pEntry[i])
+ nRes = i;
+ }
+ return nRes != -1;
+ }
+
+ Sequence< OUString > lcl_GetLastFoundSvcs(
+ SvtLinguConfig &rCfg,
+ const OUString &rLastFoundList ,
+ const Locale &rAvailLocale )
+ {
+ Sequence< OUString > aRes;
+
+ OUString aCfgLocaleStr( MsLangId::convertLanguageToIsoString(
+ LocaleToLanguage( rAvailLocale ) ) );
+
+ Sequence< OUString > aNodeNames( rCfg.GetNodeNames(rLastFoundList) );
+ sal_Bool bFound = lcl_FindEntry( aCfgLocaleStr, aNodeNames);
+
+ if (bFound)
+ {
+ Sequence< OUString > aNames(1);
+ OUString &rNodeName = aNames.getArray()[0];
+ rNodeName = rLastFoundList;
+ rNodeName += OUString::valueOf( (sal_Unicode)'/' );
+ rNodeName += aCfgLocaleStr;
+ Sequence< Any > aValues( rCfg.GetProperties( aNames ) );
+ if (aValues.getLength())
+ {
+ OSL_ENSURE( aValues.getLength() == 1, "unexpected length of sequence" );
+ Sequence< OUString > aSvcImplNames;
+ if (aValues.getConstArray()[0] >>= aSvcImplNames)
+ aRes = aSvcImplNames;
+ else
+ {
+ OSL_FAIL( "type mismatch" );
+ }
+ }
+ }
+
+ return aRes;
+ }
+
+ Sequence< OUString > lcl_RemoveMissingEntries(
+ const Sequence< OUString > &rCfgSvcs,
+ const Sequence< OUString > &rAvailSvcs )
+ {
+ Sequence< OUString > aRes( rCfgSvcs.getLength() );
+ OUString *pRes = aRes.getArray();
+ sal_Int32 nCnt = 0;
+
+ sal_Int32 nEntries = rCfgSvcs.getLength();
+ const OUString *pEntry = rCfgSvcs.getConstArray();
+ for (sal_Int32 i = 0; i < nEntries; ++i)
+ {
+ if (!pEntry[i].isEmpty() && lcl_FindEntry( pEntry[i], rAvailSvcs ))
+ pRes[ nCnt++ ] = pEntry[i];
+ }
+
+ aRes.realloc( nCnt );
+ return aRes;
+ }
+
+ Sequence< OUString > lcl_GetNewEntries(
+ const Sequence< OUString > &rLastFoundSvcs,
+ const Sequence< OUString > &rAvailSvcs )
+ {
+ sal_Int32 nLen = rAvailSvcs.getLength();
+ Sequence< OUString > aRes( nLen );
+ OUString *pRes = aRes.getArray();
+ sal_Int32 nCnt = 0;
+
+ const OUString *pEntry = rAvailSvcs.getConstArray();
+ for (sal_Int32 i = 0; i < nLen; ++i)
+ {
+ if (!pEntry[i].isEmpty() && !lcl_FindEntry( pEntry[i], rLastFoundSvcs ))
+ pRes[ nCnt++ ] = pEntry[i];
+ }
+
+ aRes.realloc( nCnt );
+ return aRes;
+ }
+
+ Sequence< OUString > lcl_MergeSeq(
+ const Sequence< OUString > &rCfgSvcs,
+ const Sequence< OUString > &rNewSvcs )
+ {
+ Sequence< OUString > aRes( rCfgSvcs.getLength() + rNewSvcs.getLength() );
+ OUString *pRes = aRes.getArray();
+ sal_Int32 nCnt = 0;
+
+ for (sal_Int32 k = 0; k < 2; ++k)
+ {
+ // add previously configuerd service first and append
+ // new found services at the end
+ const Sequence< OUString > &rSeq = k == 0 ? rCfgSvcs : rNewSvcs;
+
+ sal_Int32 nLen = rSeq.getLength();
+ const OUString *pEntry = rSeq.getConstArray();
+ for (sal_Int32 i = 0; i < nLen; ++i)
+ {
+ if (!pEntry[i].isEmpty() && !lcl_FindEntry( pEntry[i], aRes ))
+ pRes[ nCnt++ ] = pEntry[i];
+ }
+ }
+
+ aRes.realloc( nCnt );
+ return aRes;
+ }
+}
+
+void LngSvcMgr::UpdateAll()
+{
+ using beans::PropertyValue;
+ using lang::Locale;
+ using uno::Sequence;
+
+ typedef OUString OUstring_t;
+ typedef Sequence< OUString > Sequence_OUString_t;
+ typedef std::map< OUstring_t, Sequence_OUString_t > list_entry_map_t;
+
+ SvtLinguConfig aCfg;
+
+ const int nNumServices = 4;
+ const sal_Char * apServices[nNumServices] = { SN_SPELLCHECKER, SN_GRAMMARCHECKER, SN_HYPHENATOR, SN_THESAURUS };
+ const sal_Char * apCurLists[nNumServices] = { "ServiceManager/SpellCheckerList", "ServiceManager/GrammarCheckerList", "ServiceManager/HyphenatorList", "ServiceManager/ThesaurusList" };
+ const sal_Char * apLastFoundLists[nNumServices] = { "ServiceManager/LastFoundSpellCheckers", "ServiceManager/LastFoundGrammarCheckers", "ServiceManager/LastFoundHyphenators", "ServiceManager/LastFoundThesauri" };
+
+ // usage of indices as above: 0 = spell checker, 1 = grammar checker, 2 = hyphenator, 3 = thesaurus
+ std::vector< list_entry_map_t > aLastFoundSvcs(nNumServices);
+ std::vector< list_entry_map_t > aCurSvcs(nNumServices);
+
+ for (int k = 0; k < nNumServices; ++k)
+ {
+ OUString aService( ::rtl::OUString::createFromAscii( apServices[k] ) );
+ OUString aActiveList( ::rtl::OUString::createFromAscii( apCurLists[k] ) );
+ OUString aLastFoundList( ::rtl::OUString::createFromAscii( apLastFoundLists[k] ) );
+ sal_Int32 i;
+
+ //
+ // remove configured but not available language/services entries
+ //
+ Sequence< OUString > aNodeNames( aCfg.GetNodeNames( aActiveList ) ); // list of configured locales
+ sal_Int32 nNodeNames = aNodeNames.getLength();
+ const OUString *pNodeName = aNodeNames.getConstArray();
+ for (i = 0; i < nNodeNames; ++i)
+ {
+ Locale aLocale( CreateLocale( MsLangId::convertIsoStringToLanguage(pNodeName[i]) ) );
+ Sequence< OUString > aCfgSvcs( getConfiguredServices( aService, aLocale ));
+ Sequence< OUString > aAvailSvcs( getAvailableServices( aService, aLocale ));
+
+ aCfgSvcs = lcl_RemoveMissingEntries( aCfgSvcs, aAvailSvcs );
+
+ aCurSvcs[k][ pNodeName[i] ] = aCfgSvcs;
+ }
+
+ //
+ // add new available language/service entries
+ // and
+ // set last found services to currently available ones
+ //
+ Sequence< Locale > aAvailLocales( getAvailableLocales(aService) );
+ sal_Int32 nAvailLocales = aAvailLocales.getLength();
+ const Locale *pAvailLocale = aAvailLocales.getConstArray();
+ for (i = 0; i < nAvailLocales; ++i)
+ {
+ OUString aCfgLocaleStr( MsLangId::convertLanguageToIsoString(
+ LocaleToLanguage( pAvailLocale[i] ) ) );
+
+ Sequence< OUString > aAvailSvcs( getAvailableServices( aService, pAvailLocale[i] ));
+
+ aLastFoundSvcs[k][ aCfgLocaleStr ] = aAvailSvcs;
+
+ Sequence< OUString > aLastSvcs(
+ lcl_GetLastFoundSvcs( aCfg, aLastFoundList , pAvailLocale[i] ));
+ Sequence< OUString > aNewSvcs =
+ lcl_GetNewEntries( aLastSvcs, aAvailSvcs );
+
+ Sequence< OUString > aCfgSvcs( aCurSvcs[k][ aCfgLocaleStr ] );
+
+ // merge services list (previously configured to be listed first).
+ aCfgSvcs = lcl_MergeSeq( aCfgSvcs, aNewSvcs );
+
+ aCurSvcs[k][ aCfgLocaleStr ] = aCfgSvcs;
+ }
+ }
+
+ //
+ // write new data back to configuration
+ //
+ for (int k = 0; k < nNumServices; ++k)
+ {
+ for (int i = 0; i < 2; ++i)
+ {
+ const sal_Char *pSubNodeName = (i == 0) ? apCurLists[k] : apLastFoundLists[k];
+ OUString aSubNodeName( ::rtl::OUString::createFromAscii(pSubNodeName) );
+
+ list_entry_map_t &rCurMap = (i == 0) ? aCurSvcs[k] : aLastFoundSvcs[k];
+ list_entry_map_t::const_iterator aIt( rCurMap.begin() );
+ sal_Int32 nVals = static_cast< sal_Int32 >( rCurMap.size() );
+ Sequence< PropertyValue > aNewValues( nVals );
+ PropertyValue *pNewValue = aNewValues.getArray();
+ while (aIt != rCurMap.end())
+ {
+ OUString aCfgEntryName( aSubNodeName );
+ aCfgEntryName += OUString::valueOf( (sal_Unicode) '/' );
+ aCfgEntryName += (*aIt).first;
+
+ pNewValue->Name = aCfgEntryName;
+ pNewValue->Value <<= (*aIt).second;
+ ++pNewValue;
+ ++aIt;
+ }
+ OSL_ENSURE( pNewValue - aNewValues.getArray() == nVals,
+ "possible mismatch of sequence size and property number" );
+
+ {
+ // add new or replace existing entries.
+ sal_Bool bRes = aCfg.ReplaceSetProperties( aSubNodeName, aNewValues );
+ if (!bRes)
+ {
+#if OSL_DEBUG_LEVEL > 1
+ OSL_FAIL( "failed to set new configuration values" );
+#endif
+ }
+ }
+ }
+ }
+
+ //The new settings in the configuration get applied ! because we are
+ //listening to the configuration for changes of the relevant ! properties
+ //and Notify applies the new settings.
+}
void LngSvcMgr::Notify( const uno::Sequence< OUString > &rPropertyNames )
{
@@ -1263,32 +1595,21 @@
if (0 == rServiceName.compareToAscii( SN_SPELLCHECKER ))
{
- // don't used cached data here (force re-evaluation in order to have downloaded dictionaries
- // already found without the need to restart the office
- delete pAvailSpellSvcs; pAvailSpellSvcs = 0;
GetAvailableSpellSvcs_Impl();
pInfoArray = pAvailSpellSvcs;
}
else if (0 == rServiceName.compareToAscii( SN_GRAMMARCHECKER ))
{
-// disable force re-loading of the cache - re-start needed for new grammer checkers: fdo#35270
-// delete pAvailGrammarSvcs; pAvailGrammarSvcs = 0;
GetAvailableGrammarSvcs_Impl();
pInfoArray = pAvailGrammarSvcs;
}
else if (0 == rServiceName.compareToAscii( SN_HYPHENATOR ))
{
- // don't used cached data here (force re-evaluation in order to have downloaded dictionaries
- // already found without the need to restart the office
- delete pAvailHyphSvcs; pAvailHyphSvcs = 0;
GetAvailableHyphSvcs_Impl();
pInfoArray = pAvailHyphSvcs;
}
else if (0 == rServiceName.compareToAscii( SN_THESAURUS ))
{
- // don't used cached data here (force re-evaluation in order to have downloaded dictionaries
- // already found without the need to restart the office
- delete pAvailThesSvcs; pAvailThesSvcs = 0;
GetAvailableThesSvcs_Impl();
pInfoArray = pAvailThesSvcs;
}
diff -ru libreoffice-3.5.5.3.orig/linguistic/source/lngsvcmgr.hxx libreoffice-3.5.5.3/linguistic/source/lngsvcmgr.hxx
--- libreoffice-3.5.5.3.orig/linguistic/source/lngsvcmgr.hxx 2012-07-13 12:23:35.598866391 +0100
+++ libreoffice-3.5.5.3/linguistic/source/lngsvcmgr.hxx 2012-07-16 08:49:27.833227231 +0100
@@ -30,7 +30,7 @@
#define _LINGUISTIC_LNGSVCMGR_HXX_
#include <uno/lbnames.h> // CPPU_CURRENT_LANGUAGE_BINDING_NAME macro, which specify the environment type
-#include <cppuhelper/implbase4.hxx> // helper for implementations
+#include <cppuhelper/implbase5.hxx> // helper for implementations
#include <cppuhelper/interfacecontainer.h> //OMultiTypeInterfaceContainerHelper
@@ -39,8 +39,10 @@
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/linguistic2/XLinguServiceManager.hpp>
#include <com/sun/star/linguistic2/XAvailableLocales.hpp>
+#include <com/sun/star/util/XModifyBroadcaster.hpp>
+#include <com/sun/star/util/XModifyListener.hpp>
#include <unotools/configitem.hxx>
-
+#include <vcl/timer.hxx>
#include <boost/ptr_container/ptr_vector.hpp>
#include "linguistic/misc.hxx"
@@ -65,12 +67,13 @@
class LngSvcMgr :
- public cppu::WeakImplHelper4
+ public cppu::WeakImplHelper5
<
com::sun::star::linguistic2::XLinguServiceManager,
com::sun::star::linguistic2::XAvailableLocales,
com::sun::star::lang::XComponent,
- com::sun::star::lang::XServiceInfo
+ com::sun::star::lang::XServiceInfo,
+ com::sun::star::util::XModifyListener
>,
private utl::ConfigItem
{
@@ -90,6 +93,12 @@
com::sun::star::uno::Reference<
::com::sun::star::lang::XEventListener > xListenerHelper;
+ com::sun::star::uno::Reference<
+ ::com::sun::star::util::XModifyBroadcaster> xMB;
+
+ Timer aUpdateTimer;
+
+
com::sun::star::uno::Sequence<
com::sun::star::lang::Locale > aAvailSpellLocales;
com::sun::star::uno::Sequence<
@@ -140,6 +149,10 @@
virtual void Notify( const com::sun::star::uno::Sequence< rtl::OUString > &rPropertyNames );
virtual void Commit();
+ void UpdateAll();
+ void stopListening();
+ DECL_LINK( updateAndBroadcast, void* );
+
public:
LngSvcMgr();
virtual ~LngSvcMgr();
@@ -167,6 +180,11 @@
virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException);
+ // XEventListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& rSource ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XModifyListener
+ virtual void SAL_CALL modified( const ::com::sun::star::lang::EventObject& rEvent ) throw(::com::sun::star::uno::RuntimeException);
static inline ::rtl::OUString getImplementationName_Static();
static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static() throw();

View file

@ -0,0 +1,37 @@
From 4fc8af89257436b9cad70de574a166aa11ec42f1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Mon, 9 Jul 2012 12:51:16 +0100
Subject: [PATCH] Resolves: rhbz#838368 --view ignored while -view accepted
and our ooviewdoc script uses --view
Change-Id: Ice708f1c72c8d29d411ba21e93cb19876af13881
---
desktop/source/app/cmdlineargs.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx
index af7ee26..c67db8c 100644
--- a/desktop/source/app/cmdlineargs.cxx
+++ b/desktop/source/app/cmdlineargs.cxx
@@ -217,7 +217,7 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier )
bStartEvent = false;
bDisplaySpec = false;
}
- else if ( aArg.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM( "-view" )))
+ else if ( oArg.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM( "view" )))
{
// open in viewmode
bOpenEvent = false;
@@ -229,7 +229,7 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier )
bStartEvent = false;
bDisplaySpec = false;
}
- else if ( aArg.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM( "-show" )))
+ else if ( oArg.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM( "show" )))
{
// open in viewmode
bOpenEvent = false;
--
1.7.10.4

View file

@ -0,0 +1,25 @@
From b2d583e88ac53aafe96e71eb9b1068f6014100b7 Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
Date: Thu, 21 Jun 2012 12:14:39 +0200
Subject: [PATCH] disable failing check
Change-Id: I746cd1178c40c78127e04dbc1876de052794bd57
---
sdext/Module_sdext.mk | 1 -
1 file changed, 1 deletion(-)
diff --git a/sdext/Module_sdext.mk b/sdext/Module_sdext.mk
index 6280984..ffafa6b 100644
--- a/sdext/Module_sdext.mk
+++ b/sdext/Module_sdext.mk
@@ -50,7 +50,6 @@ $(eval $(call gb_Module_add_targets,sdext,\
))
$(eval $(call gb_Module_add_check_targets,sdext,\
- CppunitTest_pdfimport \
))
endif
--
1.7.10.2

View file

@ -1,11 +0,0 @@
--- ./vcl/unx/kde4/KDEXLib.cxx 2011-09-19 15:55:17.000000000 +0000
+++ ./vcl/unx/kde4/KDEXLib.cxx 2011-09-19 15:55:34.000000000 +0000
@@ -58,7 +58,7 @@
#include <stdio.h>
#if QT_VERSION >= QT_VERSION_CHECK( 4, 8, 1 )
-#define QT_UNIX_EVENT_LOOP_SUPPORT
+// #define QT_UNIX_EVENT_LOOP_SUPPORT
#ifdef KDE_HAVE_GLIB
#define GLIB_EVENT_LOOP_SUPPORT
#endif

11
fix-build.diff Normal file
View file

@ -0,0 +1,11 @@
--- configure.in.tv 2012-08-02 10:07:41.303904565 +0000
+++ configure.in 2012-08-02 10:08:26.854002828 +0000
@@ -11707,7 +11707,7 @@
echo "setting up the build environment variables..."
if test -z "$COMPATH"; then
- AC_MSG_ERROR([No compiler found.])
+ COMPATH=/usr/bin
fi
AC_SUBST(COMPATH)

View file

@ -1,11 +0,0 @@
--- ./ucb/source/ucp/gvfs/gvfs_content.hxx 2011-11-04 18:24:28.000000000 +0000
+++ ./ucb/source/ucp/gvfs/gvfs_content.hxx 2011-11-04 18:50:10.000000000 +0000
@@ -35,7 +35,7 @@
#include <com/sun/star/ucb/XContentCreator.hpp>
#include <ucbhelper/contenthelper.hxx>
-#include <glib/gthread.h>
+#include <glib.h>
#include <libgnomevfs/gnome-vfs-ops.h>
#include <libgnomevfs/gnome-vfs-directory.h>

View file

@ -1,29 +0,0 @@
--- libreoffice-3.4.5/fpicker/source/unx/kde4/KDE4FilePicker.cxx 2012-04-19 15:41:14.571469364 +0300
+++ libreoffice-3.4.5/fpicker/source/unx/kde4/KDE4FilePicker.cxx 2012-04-19 15:42:56.414093242 +0300
@@ -56,7 +56,12 @@
#define Region QtXRegion
//kde has an enum that uses this...OO does too
+#define LO_SETTINGS_MOUSE SETTINGS_MOUSE
#undef SETTINGS_MOUSE
+#define LO_SETTINGS_LOCALE SETTINGS_LOCALE
+#undef SETTINGS_LOCALE
+#define LO_SETTINGS_STYLE SETTINGS_STYLE
+#undef SETTINGS_STYLE
#include <kfiledialog.h>
#include <kwindowsystem.h>
@@ -70,6 +75,13 @@
#undef Region
+#define SETTINGS_MOUSE LO_SETTINGS_MOUSE
+#undef LO_SETTINGS_MOUSE
+#define SETTINGS_LOCALE LO_SETTINGS_LOCALE
+#undef LO_SETTINGS_LOCALE
+#define SETTINGS_STYLE LO_SETTINGS_STYLE
+#undef LO_SETTINGS_STYLE
+
using namespace ::com::sun::star;
using namespace ::com::sun::star::ui::dialogs;

View file

@ -0,0 +1,11 @@
--- libreoffice-3.5.2/sysui/desktop/slackware/makefile.mk.bero 2012-04-06 16:49:47.906638015 +0200
+++ libreoffice-3.5.2/sysui/desktop/slackware/makefile.mk 2012-04-06 16:49:52.325637730 +0200
@@ -46,7 +46,7 @@ MENUFILES=$(PKGDIR)$/{$(PRODUCTLIST)}$(P
.INCLUDE : target.mk
-.IF "$(OS)" == "LINUX"
+.IF "$(OS)" == "SLACKWARELINUX"
ALLTAR : $(MENUFILES)

View file

@ -0,0 +1,49 @@
From 0c08a84c04b166ab6479716e2c33cd444d7e3dbe Mon Sep 17 00:00:00 2001
From: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
Date: Mon, 02 Apr 2012 16:46:32 +0000
Subject: Make ICU build with icu-49 by removing no-longer used variables.
Signed-off-by: Tomas Chvatal <tchvatal@suse.cz>
---
diff --git a/i18npool/source/breakiterator/data/char.txt b/i18npool/source/breakiterator/data/char.txt
index 8e49a56..acb932e 100644
--- a/i18npool/source/breakiterator/data/char.txt
+++ b/i18npool/source/breakiterator/data/char.txt
@@ -16,7 +16,6 @@
$CR = [\p{Grapheme_Cluster_Break = CR}];
$LF = [\p{Grapheme_Cluster_Break = LF}];
$Control = [\p{Grapheme_Cluster_Break = Control}];
-$Prepend = [\p{Grapheme_Cluster_Break = Prepend}];
$Extend = [\p{Grapheme_Cluster_Break = Extend}];
$SpacingMark = [\p{Grapheme_Cluster_Break = SpacingMark}];
# True Indic wants to move by syllables. Break up SpacingMark. This based on Unicode 6.0 data
diff --git a/i18npool/source/breakiterator/data/char_in.txt b/i18npool/source/breakiterator/data/char_in.txt
index 5e1ed67..5ad12a7 100644
--- a/i18npool/source/breakiterator/data/char_in.txt
+++ b/i18npool/source/breakiterator/data/char_in.txt
@@ -15,7 +15,6 @@
$CR = [\p{Grapheme_Cluster_Break = CR}];
$LF = [\p{Grapheme_Cluster_Break = LF}];
$Control = [\p{Grapheme_Cluster_Break = Control}];
-$Prepend = [\p{Grapheme_Cluster_Break = Prepend}];
$Extend = [\p{Grapheme_Cluster_Break = Extend}];
$SpacingMark = [\p{Grapheme_Cluster_Break = SpacingMark}];
$BengaliLetter = [\u0985-\u09B9 \u09CE \u09DC-\u09E1 \u09F0-\u09F1];
@@ -72,7 +71,6 @@ $L ($L | $V | $LV | $LVT);
[^$Control $CR $LF] $Extend;
[^$Control $CR $LF] $SpacingMark;
-$Prepend [^$Control $CR $LF];
## -------------------------------------------------
@@ -94,7 +92,6 @@ $T ($LVT | $T);
$Extend [^$Control $CR $LF];
$SpacingMark [^$Control $CR $LF];
-[^$Control $CR $LF] $Prepend;
## -------------------------------------------------
--
cgit v0.9.0.2-2-gbebe

View file

@ -23,3 +23,21 @@ addFilter('E: invalid-desktopfile')
# FIXME: Dependencies of the l10n packages should be sorted out better
# Not a priority though because directory dependencies work
addFilter('E: no-dependency-on')
# FIXME:
addFilter('E: script-without-shebang')
# libreoffice-base.x86_64: E: outside-libdir-files (Badness: 1) /usr/bin/lobase
# libreoffice-calc.x86_64: E: outside-libdir-files (Badness: 1) /usr/share/icons/hicolor/scalable/apps/mandriva-rosa-lo-calc_72.svg
# libreoffice-common.x86_64: E: outside-libdir-files (Badness: 1) /usr/share/icons/gnome/48x48/mimetypes/libreoffice-oasis-spreadsheet.png
# libreoffice-draw.x86_64: E: outside-libdir-files (Badness: 1) /usr/bin/lodraw
# libreoffice-impress.x86_64: E: outside-libdir-files (Badness: 1) /usr/share/icons/hicolor/scalable/apps/mandriva-rosa-lo-impress_72.svg
# libreoffice-math.x86_64: E: outside-libdir-files (Badness: 1) /usr/bin/lomath
# libreoffice-writer.x86_64: E: outside-libdir-files (Badness: 1) /usr/bin/loweb
# /usr/bin files for start up libreoffice apps then does not makes sense being
# considerated as libdir-files
addFilter('E: outside-libdir-files')
# openoffice.org64 in the core package conflicts
addFilter('E: incoherent-version-in-name')

File diff suppressed because it is too large Load diff

View file

@ -1,138 +0,0 @@
--- ./framework/source/accelerators/acceleratorcache.cxx.orig 2011-12-15 15:08:41.329168423 -0200
+++ ./framework/source/accelerators/acceleratorcache.cxx 2011-12-15 15:17:59.473190664 -0200
@@ -61,7 +61,7 @@ AcceleratorCache::AcceleratorCache()
AcceleratorCache::AcceleratorCache(const AcceleratorCache& rCopy)
: ThreadHelpBase(&Application::GetSolarMutex())
{
- m_lCommand2Keys = rCopy.m_lCommand2Keys;
+ m_lCommand2Keys = const_cast< framework::BaseHash<comphelper::SequenceAsVector<com::sun::star::awt::KeyEvent> >& > (rCopy.m_lCommand2Keys);
m_lKey2Commands = rCopy.m_lKey2Commands;
}
@@ -78,7 +78,7 @@ void AcceleratorCache::takeOver(const Ac
// SAFE -> ----------------------------------
WriteGuard aWriteLock(m_aLock);
- m_lCommand2Keys = rCopy.m_lCommand2Keys;
+ m_lCommand2Keys = const_cast< framework::BaseHash<comphelper::SequenceAsVector<com::sun::star::awt::KeyEvent> >& > (rCopy.m_lCommand2Keys);
m_lKey2Commands = rCopy.m_lKey2Commands;
aWriteLock.unlock();
--- ./framework/source/loadenv/loadenv.cxx.orig 2011-12-15 15:08:15.771487938 -0200
+++ ./framework/source/loadenv/loadenv.cxx 2011-12-15 15:19:06.038358483 -0200
@@ -255,7 +255,8 @@ void LoadEnv::initializeLoading(const ::
// take over all new parameters.
m_xTargetFrame.clear();
m_xBaseFrame = xBaseFrame ;
- m_lMediaDescriptor = impl_mergeMediaDescriptorWithMightExistingModelArgs(lMediaDescriptor);
+ ::comphelper::MediaDescriptor tmp = impl_mergeMediaDescriptorWithMightExistingModelArgs(lMediaDescriptor);
+ m_lMediaDescriptor = tmp;
m_sTarget = sTarget ;
m_nSearchFlags = nSearchFlags ;
m_eFeature = eFeature ;
--- ./framework/source/uiconfiguration/uiconfigurationmanagerimpl.hxx.orig 2011-12-15 15:08:49.033072112 -0200
+++ ./framework/source/uiconfiguration/uiconfigurationmanagerimpl.hxx 2011-12-15 15:11:07.209344668 -0200
@@ -175,6 +175,15 @@ namespace framework
sal_Int16 nElementType;
UIElementDataHashMap aElementsHashMap;
com::sun::star::uno::Reference< com::sun::star::embed::XStorage > xStorage;
+ UIElementType& operator=(const UIElementType& rRight) {
+ bModified = rRight.bModified;
+ bLoaded = rRight.bLoaded;
+ bDefaultLayer = rRight.bDefaultLayer;
+ nElementType = rRight.nElementType;
+ aElementsHashMap = rRight.aElementsHashMap;
+ xStorage = rRight.xStorage;
+ return *this;
+ };
};
typedef ::std::vector< UIElementType > UIElementTypesVector;
--- ./framework/inc/uiconfiguration/moduleuiconfigurationmanager.hxx.orig 2011-12-19 11:10:56.000000000 +0000
+++ ./framework/inc/uiconfiguration/moduleuiconfigurationmanager.hxx 2011-12-19 11:12:06.000000000 +0000
@@ -185,6 +185,15 @@ namespace framework
sal_Int16 nElementType;
UIElementDataHashMap aElementsHashMap;
com::sun::star::uno::Reference< com::sun::star::embed::XStorage > xStorage;
+ UIElementType& operator=(const UIElementType& rRight) {
+ bModified = rRight.bModified;
+ bLoaded = rRight.bLoaded;
+ bDefaultLayer = rRight.bDefaultLayer;
+ nElementType = rRight.nElementType;
+ aElementsHashMap = rRight.aElementsHashMap;
+ xStorage = rRight.xStorage;
+ return *this;
+ };
};
typedef ::std::vector< UIElementType > UIElementTypesVector;
--- ./framework/inc/uiconfiguration/uiconfigurationmanager.hxx.orig 2011-12-19 11:14:17.000000000 +0000
+++ ./framework/inc/uiconfiguration/uiconfigurationmanager.hxx 2011-12-19 11:15:16.000000000 +0000
@@ -171,6 +171,15 @@ namespace framework
sal_Int16 nElementType;
UIElementDataHashMap aElementsHashMap;
com::sun::star::uno::Reference< com::sun::star::embed::XStorage > xStorage;
+ UIElementType& operator=(const UIElementType& rRight) {
+ bModified = rRight.bModified;
+ bLoaded = rRight.bLoaded;
+ bDefaultLayer = rRight.bDefaultLayer;
+ nElementType = rRight.nElementType;
+ aElementsHashMap = rRight.aElementsHashMap;
+ xStorage = rRight.xStorage;
+ return *this;
+ };
};
typedef ::std::vector< UIElementType > UIElementTypesVector;
--- ./padmin/source/prtsetup.cxx.orig 2011-12-15 15:09:05.133870823 -0200
+++ ./padmin/source/prtsetup.cxx 2011-12-15 15:13:55.626239170 -0200
@@ -813,7 +813,7 @@ extern "C" {
if( aDialog.Execute() )
{
- rJobData = aDialog.getSetup();
+ rJobData = const_cast< ::psp::PrinterInfo & > ( aDialog.getSetup() );
nRet = 1;
}
--- ./sfx2/source/doc/guisaveas.cxx.orig 2011-12-15 15:08:58.332955848 -0200
+++ ./sfx2/source/doc/guisaveas.cxx 2011-12-15 15:12:39.953185212 -0200
@@ -731,7 +731,7 @@ sal_Int8 ModelData_Impl::CheckFilter( co
if ( aFilterName.getLength() )
m_pOwner->GetFilterConfiguration()->getByName( aFilterName ) >>= aFilterProps;
- aFiltPropsHM = ::comphelper::SequenceAsHashMap( aFilterProps );
+ aFiltPropsHM << aFilterProps;
nFiltFlags = aFiltPropsHM.getUnpackedValueOrDefault( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Flags")), (sal_Int32)0 );
}
--- ./framework/inc/classes/filtercachedata.hxx.orig 2011-12-17 13:14:22.102898902 +0000
+++ ./framework/inc/classes/filtercachedata.hxx 2011-12-17 13:17:51.524424012 +0000
@@ -230,7 +230,7 @@
{
bPreferred = rCopy.bPreferred ;
sName = rCopy.sName ;
- lUINames = rCopy.lUINames ;
+ lUINames = const_cast < framework::BaseHash<rtl::OUString>& > (rCopy.lUINames);
sMediaType = rCopy.sMediaType ;
sClipboardFormat = rCopy.sClipboardFormat;
nDocumentIconID = rCopy.nDocumentIconID ;
@@ -298,7 +298,7 @@
nOrder = rCopy.nOrder ;
sName = rCopy.sName ;
sType = rCopy.sType ;
- lUINames = rCopy.lUINames ;
+ lUINames = const_cast < framework::BaseHash<rtl::OUString>& > (rCopy.lUINames);
sDocumentService = rCopy.sDocumentService ;
sFilterService = rCopy.sFilterService ;
sUIComponent = rCopy.sUIComponent ;
@@ -405,7 +405,7 @@
inline Loader& impl_copy( const Loader& rCopy )
{
sName = rCopy.sName ;
- lUINames = rCopy.lUINames ;
+ lUINames = const_cast < framework::BaseHash<rtl::OUString>& > (rCopy.lUINames);
lTypes = rCopy.lTypes ;
return (*this);
}

View file

@ -1,11 +0,0 @@
--- sysui/prj/build.lst.old1 2011-08-01 18:41:26.000000000 +0000
+++ sysui/prj/build.lst 2011-08-01 18:42:37.000000000 +0000
@@ -13,7 +13,6 @@
su sysui\desktop\mandriva nmake - u su_dtmdk su_dtshare.u NULL
su sysui\desktop\freedesktop nmake - u su_dtfreedesktop su_dtredhat.u NULL
su sysui\desktop\debian nmake - u su_dtdebian su_dtshare.u NULL
-su sysui\desktop\slackware nmake - u su_dtslackware su_dtshare.u NULL
su sysui\desktop\solaris nmake - u su_dtsolaris su_dtshare.u NULL
-su sysui\desktop\util nmake - u su_desktop su_dtredhat.u su_dtsuse.u su_dtmdk.u su_dtfreedesktop.u su_dtdebian.u su_dtslackware.u NULL
+su sysui\desktop\util nmake - u su_desktop su_dtredhat.u su_dtsuse.u su_dtmdk.u su_dtfreedesktop.u su_dtdebian.u NULL
su sysui\util nmake - all su_util su_dtsolaris.u su_desktop.u su_iconsw.w NULL

View file

@ -0,0 +1,15 @@
Index: configuration/ppds/SGENPRT.PS
===================================================================
RCS file: /cvs/external/psprint_config/configuration/ppds/SGENPRT.PS,v
retrieving revision 1.3
diff -u -p -u -r1.3 SGENPRT.PS
--- openoffice.org.orig/psprint_config/configuration/ppds/SGENPRT.PS 26 Nov 2004 16:10:35 -0000 1.3
+++ openoffice.org/psprint_config/configuration/ppds/SGENPRT.PS 30 Aug 2005 11:17:51 -0000
@@ -58,6 +58,7 @@
*ColorDevice: True
*DefaultColorSpace: RGB
*LanguageLevel: "2"
+*TTRasterizer: Type42
*% --- For None Color or old PostScript(R) printers use following lines ---
*% *ColorDevice: False

View file

@ -0,0 +1,47 @@
--- openoffice.org.orig/desktop/scripts/unopkg.sh 2008-01-14 15:55:26.000000000 +0000
+++ openoffice.org/desktop/scripts/unopkg.sh 2008-02-14 10:52:10.000000000 +0000
@@ -62,6 +62,33 @@
;;
esac
+isnotuser=0
+for arg in $@
+do
+if [ "$arg" = "--shared" -o "$arg" = "--bundled" ]; then
+ isnotuser=1
+fi
+done
+if [ $isnotuser -eq 1 ]; then
+ echo $@ | grep -q env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY
+ if [ $? -ne 0 ]; then
+ set -- $@ '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'
+ fi
+ echo $@ | grep -q env:UNO_JAVA_JFW_INSTALL_DATA
+ if [ $? -ne 0 -a -w $sd_prog/../share/config/javasettingsunopkginstall.xml ]; then
+ set -- $@ '-env:UNO_JAVA_JFW_INSTALL_DATA=$$ORIGIN/../share/config/javasettingsunopkginstall.xml'
+ fi
+ echo $@ | grep -q env:UserInstallation
+ if [ $? -ne 0 ]; then
+ INSTDIR=`/bin/mktemp -d --tmpdir unoinstall.XXXXXX`
+ if [ $? -ne 0 ]; then
+ echo "Could not create tmp dir" >&2
+ exit 1
+ fi
+ set -- $@ '-env:UserInstallation=file://'$INSTDIR
+ fi
+fi
+
#collect all bootstrap variables specified on the command line
#so that they can be passed as arguments to javaldx later on
for arg in $@
@@ -110,6 +137,8 @@
# SAL_NO_XINITTHREADS=true; export SAL_NO_XINITTHREADS
# execute binary
-exec "$sd_prog/unopkg.bin" "$@" \
+"$sd_prog/unopkg.bin" "$@" \
"-env:INIFILENAME=vnd.sun.star.pathname:$sd_prog/redirectrc"
-
+if [ -n "$INSTDIR" ]; then
+ rm -rf $INSTDIR
+fi

View file

@ -0,0 +1,141 @@
From 5316edea6948f3e2a77e4fc68799f67de21fada7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Mon, 5 Dec 2011 15:28:19 +0100
Subject: [PATCH] vertical content overflowing out of cell (#i88341#)
---
sc/source/ui/inc/output.hxx | 2 +
sc/source/ui/view/output2.cxx | 66 ++++++++++++++++++++++++++--------------
2 files changed, 45 insertions(+), 23 deletions(-)
diff --git a/sc/source/ui/inc/output.hxx b/sc/source/ui/inc/output.hxx
index 72934cf..3a91c14 100644
--- a/sc/source/ui/inc/output.hxx
+++ b/sc/source/ui/inc/output.hxx
@@ -306,6 +306,8 @@ public:
void DrawExtraShadow(sal_Bool bLeft, sal_Bool bTop, sal_Bool bRight, sal_Bool bBottom);
void DrawFrame();
+ bool UseNormalClip(SCROW nCellY, const SfxItemSet* pCondSet);
+
// with logic MapMode set!
void DrawEdit(sal_Bool bPixelToLogic);
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index de1506a..5522e69 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -2818,13 +2818,7 @@ void ScOutputData::DrawEditStandard(DrawEditParam& rParam)
(ScMergeAttr*)&rParam.mpPattern->GetItem(ATTR_MERGE);
bool bMerged = pMerge->GetColMerge() > 1 || pMerge->GetRowMerge() > 1;
- // Don't clip for text height when printing rows with optimal height,
- // except when font size is from conditional formatting.
- //! Allow clipping when vertically merged?
- if ( eType != OUTTYPE_PRINTER ||
- ( pDoc->GetRowFlags( rParam.mnCellY, nTab ) & CR_MANUALSIZE ) ||
- ( rParam.mpCondSet && SFX_ITEM_SET ==
- rParam.mpCondSet->GetItemState(ATTR_FONT_HEIGHT, true) ) )
+ if (UseNormalClip(rParam.mnCellY, rParam.mpCondSet))
bClip = true;
else
bSimClip = true;
@@ -2859,6 +2853,19 @@ void ScOutputData::DrawEditStandard(DrawEditParam& rParam)
}
Rectangle aLogicClip;
+ if (
+ ((nAttrRotate == 9000) || (nAttrRotate == 27000)) &&
+ (!(rParam.meOrient==SVX_ORIENTATION_STANDARD &&
+ !rParam.mbAsianVertical)) &&
+ (!(bClip || bSimClip))
+ )
+ {
+ if (UseNormalClip(rParam.mnCellY, rParam.mpCondSet))
+ bClip = true;
+ else
+ bSimClip = true;
+ }
+
if (bClip || bSimClip)
{
// Clip marks are already handled in GetOutputArea
@@ -3191,13 +3198,8 @@ void ScOutputData::DrawEditBottomTop(DrawEditParam& rParam)
(ScMergeAttr*)&rParam.mpPattern->GetItem(ATTR_MERGE);
bool bMerged = pMerge->GetColMerge() > 1 || pMerge->GetRowMerge() > 1;
- // Don't clip for text height when printing rows with optimal height,
- // except when font size is from conditional formatting.
- //! Allow clipping when vertically merged?
- if ( eType != OUTTYPE_PRINTER ||
- ( pDoc->GetRowFlags( rParam.mnCellY, nTab ) & CR_MANUALSIZE ) ||
- ( rParam.mpCondSet && SFX_ITEM_SET ==
- rParam.mpCondSet->GetItemState(ATTR_FONT_HEIGHT, true) ) )
+
+ if (UseNormalClip(rParam.mnCellY, rParam.mpCondSet))
bClip = true;
else
bSimClip = true;
@@ -3563,13 +3565,7 @@ void ScOutputData::DrawEditTopBottom(DrawEditParam& rParam)
(ScMergeAttr*)&rParam.mpPattern->GetItem(ATTR_MERGE);
bool bMerged = pMerge->GetColMerge() > 1 || pMerge->GetRowMerge() > 1;
- // Don't clip for text height when printing rows with optimal height,
- // except when font size is from conditional formatting.
- //! Allow clipping when vertically merged?
- if ( eType != OUTTYPE_PRINTER ||
- ( pDoc->GetRowFlags( rParam.mnCellY, nTab ) & CR_MANUALSIZE ) ||
- ( rParam.mpCondSet && SFX_ITEM_SET ==
- rParam.mpCondSet->GetItemState(ATTR_FONT_HEIGHT, true) ) )
+ if (UseNormalClip(rParam.mnCellY, rParam.mpCondSet))
bClip = true;
else
bSimClip = true;
@@ -4460,6 +4456,20 @@ void ScOutputData::DrawEditAsianVertical(DrawEditParam& rParam)
rParam.adjustForHyperlinkInPDF(aURLStart, pDev);
}
+bool ScOutputData::UseNormalClip(SCROW nCellY, const SfxItemSet* pCondSet)
+{
+ bool bNormalClip = false;
+ // Don't clip for text height when printing rows with optimal height,
+ // except when font size is from conditional formatting.
+ //! Allow clipping when vertically merged?
+ if ( eType != OUTTYPE_PRINTER ||
+ ( pDoc->GetRowFlags( nCellY, nTab ) & CR_MANUALSIZE ) ||
+ ( pCondSet && SFX_ITEM_SET ==
+ pCondSet->GetItemState(ATTR_FONT_HEIGHT, sal_True) ) )
+ bNormalClip = true;
+ return bNormalClip;
+}
+
void ScOutputData::DrawEdit(sal_Bool bPixelToLogic)
{
ScFieldEditEngine* pEngine = NULL;
@@ -5168,11 +5178,21 @@ void ScOutputData::DrawRotated(sal_Bool bPixelToLogic)
else
{
// bei gedrehtem Text ist Standard zentriert
+ long nDiff = 0;
if (eHorJust==SVX_HOR_JUSTIFY_RIGHT)
- aLogicStart.X() += nAvailWidth - nEngineWidth;
+ nDiff = nAvailWidth - nEngineWidth;
else if (eHorJust==SVX_HOR_JUSTIFY_CENTER ||
eHorJust==SVX_HOR_JUSTIFY_STANDARD)
- aLogicStart.X() += (nAvailWidth - nEngineWidth) / 2;
+ nDiff = (nAvailWidth - nEngineWidth) / 2;
+
+ if (nEngineWidth > nAvailWidth)
+ {
+ if (nAttrRotate == 9000)
+ nDiff = 0;
+ else if (nAttrRotate == 27000)
+ nDiff = nAvailWidth - nEngineWidth;
+ }
+ aLogicStart.X() += nDiff;
}
}
--
1.7.7.3

View file

@ -0,0 +1,187 @@
From 7e3bdb601c02e60b772e64ec9d11c56881c9a643 Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
Date: Thu, 1 Dec 2011 14:02:07 +0100
Subject: [PATCH 1/2] #i101274 a directory on command line is silently ignored
---
.../source/misc/stillreadwriteinteraction.cxx | 1 +
ucbhelper/source/client/content.cxx | 75 ++++++++++++++++++++
2 files changed, 76 insertions(+), 0 deletions(-)
diff --git a/comphelper/source/misc/stillreadwriteinteraction.cxx b/comphelper/source/misc/stillreadwriteinteraction.cxx
index 124564d..506f31c 100644
--- a/comphelper/source/misc/stillreadwriteinteraction.cxx
+++ b/comphelper/source/misc/stillreadwriteinteraction.cxx
@@ -96,6 +96,7 @@ ucbhelper::InterceptedInteraction::EInterceptionState StillReadWriteInteraction:
bAbort = (
(exIO.Code == css::ucb::IOErrorCode_ACCESS_DENIED )
|| (exIO.Code == css::ucb::IOErrorCode_LOCKING_VIOLATION )
+ || (exIO.Code == css::ucb::IOErrorCode_NO_FILE )
|| (exIO.Code == css::ucb::IOErrorCode_NOT_EXISTING )
#ifdef MACOSX
// this is a workaround for MAC, on this platform if the file is locked
diff --git a/ucbhelper/source/client/content.cxx b/ucbhelper/source/client/content.cxx
index 676acd5..4a599c9 100644
--- a/ucbhelper/source/client/content.cxx
+++ b/ucbhelper/source/client/content.cxx
@@ -38,6 +38,7 @@
#include <cppuhelper/weak.hxx>
#include <cppuhelper/implbase1.hxx>
+#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/ucb/ContentCreationError.hpp>
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
#include <com/sun/star/ucb/XCommandInfo.hpp>
@@ -47,6 +48,8 @@
#include <com/sun/star/ucb/ContentAction.hpp>
#include <com/sun/star/ucb/OpenCommandArgument2.hpp>
#include <com/sun/star/ucb/InsertCommandArgument.hpp>
+#include <com/sun/star/ucb/IOErrorCode.hpp>
+#include <com/sun/star/ucb/InteractiveAugmentedIOException.hpp>
#include <com/sun/star/ucb/GlobalTransferCommandArgument.hpp>
#include <com/sun/star/ucb/NameClash.hpp>
#include <com/sun/star/ucb/OpenMode.hpp>
@@ -64,6 +67,8 @@
#include <com/sun/star/sdbc/XRow.hpp>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
#include <com/sun/star/beans/UnknownPropertyException.hpp>
+#include <com/sun/star/task/XInteractionRequest.hpp>
+
#include <ucbhelper/macros.hxx>
#include <ucbhelper/content.hxx>
#include <ucbhelper/contentbroker.hxx>
@@ -71,6 +76,10 @@
#include <ucbhelper/activedatastreamer.hxx>
#include <ucbhelper/interactionrequest.hxx>
#include <ucbhelper/cancelcommandexecution.hxx>
+#include <ucbhelper/fileidentifierconverter.hxx>
+#include <ucbhelper/simpleinteractionrequest.hxx>
+
+#include <memory>
using namespace com::sun::star::container;
using namespace com::sun::star::beans;
@@ -373,6 +382,54 @@ static Reference< XContent > getContent(
return Reference< XContent >();
}
+namespace
+{
+
+void
+lcl_displayMessage(
+ const Reference<XCommandEnvironment>& rEnvironment,
+ const rtl::OUString& rUri)
+{
+ // Create exception
+ const Reference<XContentProviderManager> xCPM(
+ getContentBroker(true)->getContentProviderManagerInterface());
+ const PropertyValue aUriProperty(
+ rtl::OUString::createFromAscii("Uri"),
+ -1,
+ makeAny(getSystemPathFromFileURL(xCPM, rUri)),
+ PropertyState_DIRECT_VALUE)
+ ;
+ Sequence<Any> lArguments(1);
+ lArguments[0] <<= aUriProperty;
+ const InteractiveAugmentedIOException xError(
+ rtl::OUString(),
+ 0,
+ InteractionClassification_ERROR,
+ IOErrorCode_NO_FILE,
+ lArguments)
+ ;
+
+ // Create interaction request
+ std::auto_ptr<ucbhelper::SimpleInteractionRequest> aRequest(
+ new ucbhelper::SimpleInteractionRequest(makeAny(xError), CONTINUATION_APPROVE));
+ {
+ Reference<XInteractionContinuation> xContinuation(
+ new ::ucbhelper::InteractionApprove(aRequest.get()));
+ Sequence<Reference<XInteractionContinuation> > lContinuations(1);
+ lContinuations[0].set(xContinuation);
+ aRequest->setContinuations(lContinuations);
+ }
+
+ Reference<XInteractionHandler> xInteraction(rEnvironment->getInteractionHandler());
+ if (xInteraction.is())
+ {
+ Reference<XInteractionRequest> xRequest(aRequest.release());
+ xInteraction->handle(xRequest);
+ }
+}
+
+}
+
//=========================================================================
//=========================================================================
//
@@ -787,7 +902,10 @@ Reference< XInputStream > Content::openStream()
throw( CommandAbortedException, RuntimeException, Exception )
{
if ( !isDocument() )
+ {
+ lcl_displayMessage(m_xImpl->getEnvironment(), getURL());
return Reference< XInputStream >();
+ }
Reference< XActiveDataSink > xSink = new ActiveDataSink;
@@ -813,7 +930,10 @@ Reference< XInputStream > Content::openStreamNoLock()
throw( CommandAbortedException, RuntimeException, Exception )
{
if ( !isDocument() )
+ {
+ lcl_displayMessage(m_xImpl->getEnvironment(), getURL());
return Reference< XInputStream >();
+ }
Reference< XActiveDataSink > xSink = new ActiveDataSink;
@@ -838,7 +965,10 @@ Reference< XStream > Content::openWriteableStream()
throw( CommandAbortedException, RuntimeException, Exception )
{
if ( !isDocument() )
+ {
+ lcl_displayMessage(m_xImpl->getEnvironment(), getURL());
return Reference< XStream >();
+ }
Reference< XActiveDataStreamer > xStreamer = new ActiveDataStreamer;
@@ -863,7 +990,10 @@ Reference< XStream > Content::openWriteableStreamNoLock()
throw( CommandAbortedException, RuntimeException, Exception )
{
if ( !isDocument() )
+ {
+ lcl_displayMessage(m_xImpl->getEnvironment(), getURL());
return Reference< XStream >();
+ }
Reference< XActiveDataStreamer > xStreamer = new ActiveDataStreamer;
@@ -888,7 +1019,10 @@ sal_Bool Content::openStream( const Reference< XActiveDataSink >& rSink )
throw( CommandAbortedException, RuntimeException, Exception )
{
if ( !isDocument() )
+ {
+ lcl_displayMessage(m_xImpl->getEnvironment(), getURL());
return sal_False;
+ }
OpenCommandArgument2 aArg;
aArg.Mode = OpenMode::DOCUMENT;
@@ -911,7 +1045,10 @@ sal_Bool Content::openStream( const Reference< XOutputStream >& rStream )
throw( CommandAbortedException, RuntimeException, Exception )
{
if ( !isDocument() )
+ {
+ lcl_displayMessage(m_xImpl->getEnvironment(), getURL());
return sal_False;
+ }
OpenCommandArgument2 aArg;
aArg.Mode = OpenMode::DOCUMENT;
--
1.7.7.3

View file

@ -0,0 +1,78 @@
Index: bin/modules/installer/scriptitems.pm
===================================================================
RCS file: /cvs/tools/solenv/bin/modules/installer/scriptitems.pm,v
retrieving revision 1.17
diff -u -p -r1.17 scriptitems.pm
--- openoffice.org.orig/solenv/bin/modules/installer/scriptitems.pm 24 Feb 2005 16:21:15 -0000 1.17
+++ openoffice.org/solenv/bin/modules/installer/scriptitems.pm 18 Mar 2005 22:39:42 -0000
@@ -1066,7 +1066,7 @@
}
else
{
- $infoline = "ERROR: Source for $$searchfilenameref not found!\n"; # Important message in log file
+ $infoline = "WARNING: Source for $$searchfilenameref not found!\n"; # Important message in log file
}
push( @installer::globals::logfileinfo, $infoline);
@@ -1144,7 +1144,7 @@
}
else
{
- $infoline = "ERROR: Source for $$searchfilenameref not found!\n"; # Important message in log file
+ $infoline = "WARNING: Source for $$searchfilenameref not found!\n"; # Important message in log file
}
push( @installer::globals::logfileinfo, $infoline);
@@ -1356,11 +1356,10 @@
if ( ! $installer::globals::languagepack && !$installer::globals::helppack)
{
- $infoline = "ERROR: Removing file $filename from file list.\n";
+ $infoline = "WARNING: Removing file $filename from file list.\n";
push( @installer::globals::logfileinfo, $infoline);
- push(@missingfiles, "ERROR: File not found: $filename\n");
- $error_occurred = 1;
+ push(@missingfiles, "WARNING: File not found: $filename\n");
next; # removing this file from list, if sourcepath is empty
}
@@ -1368,11 +1367,10 @@
{
if (( $onefile->{'ismultilingual'} ) || ( $styles =~ /\bFORCELANGUAGEPACK\b/ ))
{
- $infoline = "ERROR: Removing file $filename from file list.\n";
+ $infoline = "WARNING: Removing file $filename from file list.\n";
push( @installer::globals::logfileinfo, $infoline);
- push(@missingfiles, "ERROR: File not found: $filename\n");
- $error_occurred = 1;
+ push(@missingfiles, "WARNING: File not found: $filename\n");
next; # removing this file from list, if sourcepath is empty
}
@@ -1390,11 +1388,10 @@
{
if (( $onefile->{'ismultilingual'} ) || ( $styles =~ /\bFORCEHELPPACK\b/ ))
{
- $infoline = "ERROR: Removing file $filename from file list.\n";
+ $infoline = "WARNING: Removing file $filename from file list.\n";
push( @installer::globals::logfileinfo, $infoline);
- push(@missingfiles, "ERROR: File not found: $filename\n");
- $error_occurred = 1;
+ push(@missingfiles, "WARNING: File not found: $filename\n");
next; # removing this file from list, if sourcepath is empty
}
--- openoffice.org.orig/solenv/bin/modules/installer/simplepackage.pm 2010-07-12 10:27:26.000000000 +0100
+++ openoffice.org/solenv/bin/modules/installer/simplepackage.pm 2010-07-12 10:27:54.000000000 +0100
@@ -53,7 +53,7 @@
( $installer::globals::packageformat eq "archive" ))
{
$installer::globals::is_simple_packager_project = 1;
- $installer::globals::patch_user_dir = 1;
+ $installer::globals::patch_user_dir = 0;
}
elsif( $installer::globals::packageformat eq "dmg" )
{

View file

@ -0,0 +1,199 @@
From 36644331aad8382ccab7fb19d7ab3339bbff0c20 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Thu, 1 Dec 2011 14:18:09 +0100
Subject: [PATCH 2/2] #i105784# vcl: improve selection of fallback font by
supplying language hint when none exists
---
vcl/generic/fontmanager/fontconfig.cxx | 143 +++++++++++++++++++++++++++++++-
1 files changed, 141 insertions(+), 2 deletions(-)
diff --git a/vcl/generic/fontmanager/fontconfig.cxx b/vcl/generic/fontmanager/fontconfig.cxx
index 4d02a76..ecd3b5d 100644
--- a/vcl/generic/fontmanager/fontconfig.cxx
+++ b/vcl/generic/fontmanager/fontconfig.cxx
@@ -89,6 +89,9 @@ using namespace psp;
#include "sal/alloca.h"
+#include <i18nutil/unicode.hxx> //unicode::getUnicodeScriptType
+#include <com/sun/star/i18n/ScriptType.hdl> //ScriptType
+
#include <utility>
#include <algorithm>
@@ -747,6 +750,138 @@ static void addtopattern(FcPattern *pPattern,
}
}
+static const char* pick_sample_language(const sal_uInt32 cCode)
+{
+ using namespace ::com::sun::star::i18n;
+
+ static ScriptTypeList aScripts[] =
+ {
+ { UnicodeScript_kBasicLatin, UnicodeScript_kBasicLatin, UnicodeScript_kBasicLatin },
+ { UnicodeScript_kLatin1Supplement, UnicodeScript_kLatin1Supplement, UnicodeScript_kLatin1Supplement },
+ { UnicodeScript_kLatinExtendedA, UnicodeScript_kLatinExtendedA, UnicodeScript_kLatinExtendedA },
+ { UnicodeScript_kLatinExtendedB, UnicodeScript_kLatinExtendedB, UnicodeScript_kLatinExtendedB },
+ { UnicodeScript_kGreek, UnicodeScript_kGreek, UnicodeScript_kGreek },
+ { UnicodeScript_kCyrillic, UnicodeScript_kCyrillic, UnicodeScript_kCyrillic },
+ { UnicodeScript_kArmenian, UnicodeScript_kArmenian, UnicodeScript_kArmenian },
+ { UnicodeScript_kHebrew, UnicodeScript_kHebrew, UnicodeScript_kHebrew },
+ { UnicodeScript_kArabic, UnicodeScript_kArabic, UnicodeScript_kArabic },
+ { UnicodeScript_kSyriac, UnicodeScript_kSyriac, UnicodeScript_kSyriac },
+ { UnicodeScript_kThaana, UnicodeScript_kThaana, UnicodeScript_kThaana },
+ { UnicodeScript_kDevanagari, UnicodeScript_kDevanagari, UnicodeScript_kDevanagari },
+ { UnicodeScript_kBengali, UnicodeScript_kBengali, UnicodeScript_kBengali },
+ { UnicodeScript_kGurmukhi, UnicodeScript_kGurmukhi, UnicodeScript_kGurmukhi },
+ { UnicodeScript_kGujarati, UnicodeScript_kGujarati, UnicodeScript_kGujarati },
+ { UnicodeScript_kOriya, UnicodeScript_kOriya, UnicodeScript_kOriya },
+ { UnicodeScript_kTamil, UnicodeScript_kTamil, UnicodeScript_kTamil },
+ { UnicodeScript_kTelugu, UnicodeScript_kTelugu, UnicodeScript_kTelugu },
+ { UnicodeScript_kKannada, UnicodeScript_kKannada, UnicodeScript_kKannada },
+ { UnicodeScript_kMalayalam, UnicodeScript_kMalayalam, UnicodeScript_kMalayalam },
+ { UnicodeScript_kSinhala, UnicodeScript_kSinhala, UnicodeScript_kSinhala },
+ { UnicodeScript_kThai, UnicodeScript_kThai, UnicodeScript_kThai },
+ { UnicodeScript_kLao, UnicodeScript_kLao, UnicodeScript_kLao },
+ { UnicodeScript_kTibetan, UnicodeScript_kTibetan, UnicodeScript_kTibetan },
+ { UnicodeScript_kMyanmar, UnicodeScript_kMyanmar, UnicodeScript_kMyanmar },
+ { UnicodeScript_kGeorgian, UnicodeScript_kGeorgian, UnicodeScript_kGeorgian },
+ { UnicodeScript_kHangulJamo, UnicodeScript_kHangulJamo, UnicodeScript_kHangulJamo },
+ { UnicodeScript_kEthiopic, UnicodeScript_kEthiopic, UnicodeScript_kEthiopic },
+ { UnicodeScript_kCherokee, UnicodeScript_kCherokee, UnicodeScript_kCherokee },
+ { UnicodeScript_kUnifiedCanadianAboriginalSyllabics,
+ UnicodeScript_kUnifiedCanadianAboriginalSyllabics,
+ UnicodeScript_kUnifiedCanadianAboriginalSyllabics },
+ { UnicodeScript_kKhmer, UnicodeScript_kKhmer, UnicodeScript_kKhmer },
+ { UnicodeScript_kMongolian, UnicodeScript_kMongolian, UnicodeScript_kMongolian },
+ { UnicodeScript_kLatinExtendedAdditional, UnicodeScript_kLatinExtendedAdditional,
+ UnicodeScript_kLatinExtendedAdditional },
+ { UnicodeScript_kGreekExtended, UnicodeScript_kGreekExtended, UnicodeScript_kGreekExtended },
+ { UnicodeScript_kHiragana, UnicodeScript_kHiragana, UnicodeScript_kHiragana },
+ { UnicodeScript_kKatakana, UnicodeScript_kKatakana, UnicodeScript_kKatakana },
+ { UnicodeScript_kHangulCompatibilityJamo, UnicodeScript_kHangulCompatibilityJamo,
+ UnicodeScript_kHangulCompatibilityJamo },
+ { UnicodeScript_kHangulSyllable, UnicodeScript_kHangulSyllable,
+ UnicodeScript_kHangulSyllable },
+ { UnicodeScript_kArabicPresentationB, UnicodeScript_kArabicPresentationB,
+ UnicodeScript_kArabicPresentationB },
+ { UnicodeScript_kScriptCount, UnicodeScript_kScriptCount, UnicodeScript_kScriptCount }
+ };
+
+ switch (unicode::getUnicodeScriptType(cCode, aScripts, UnicodeScript_kScriptCount))
+ {
+ case UnicodeScript_kBasicLatin:
+ case UnicodeScript_kLatin1Supplement:
+ case UnicodeScript_kLatinExtendedA:
+ case UnicodeScript_kLatinExtendedB:
+ case UnicodeScript_kLatinExtendedAdditional:
+ return "en";
+ case UnicodeScript_kGreek:
+ case UnicodeScript_kGreekExtended:
+ return "el";
+ case UnicodeScript_kCyrillic:
+ return "ru";
+ case UnicodeScript_kArmenian:
+ return "hy";
+ case UnicodeScript_kHebrew:
+ return "he";
+ case UnicodeScript_kArabic:
+ case UnicodeScript_kArabicPresentationB:
+ return "ar";
+ case UnicodeScript_kSyriac:
+ return "syr";
+ case UnicodeScript_kThaana:
+ return "dv";
+ case UnicodeScript_kDevanagari:
+ return "hi";
+ case UnicodeScript_kBengali:
+ return "bn";
+ case UnicodeScript_kGurmukhi:
+ return "pa";
+ case UnicodeScript_kGujarati:
+ return "gu";
+ case UnicodeScript_kOriya:
+ return "or";
+ case UnicodeScript_kTamil:
+ return "ta";
+ case UnicodeScript_kTelugu:
+ return "te";
+ case UnicodeScript_kKannada:
+ return "ka";
+ case UnicodeScript_kMalayalam:
+ return "ml";
+ case UnicodeScript_kSinhala:
+ return "si";
+ case UnicodeScript_kThai:
+ return "th";
+ case UnicodeScript_kLao:
+ return "lo";
+ case UnicodeScript_kTibetan:
+ return "bo";
+ case UnicodeScript_kMyanmar:
+ return "my";
+ case UnicodeScript_kGeorgian:
+ return "ka";
+ case UnicodeScript_kHangulJamo:
+ case UnicodeScript_kHangulCompatibilityJamo:
+ case UnicodeScript_kHangulSyllable:
+ return "ko";
+ case UnicodeScript_kEthiopic:
+ return "am";
+ case UnicodeScript_kCherokee:
+ return "chr";
+ case UnicodeScript_kUnifiedCanadianAboriginalSyllabics:
+ return "ui";
+ case UnicodeScript_kKhmer:
+ return "km";
+ case UnicodeScript_kMongolian:
+ return "mn";
+ case UnicodeScript_kHiragana:
+ case UnicodeScript_kKatakana:
+ return "ja";
+ default:
+ break;
+ }
+
+ return NULL;
+}
+
bool PrintFontManager::Substitute( FontSelectPattern &rPattern, rtl::OUString& rMissingCodes )
{
bool bRet = false;
@@ -764,14 +899,13 @@ bool PrintFontManager::Substitute( FontSelectPattern &rPattern, rtl::OUString& r
FcPatternAddString(pPattern, FC_FAMILY, pTargetNameUtf8);
const rtl::OString aLangAttrib = MsLangId::convertLanguageToIsoByteString(rPattern.meLanguage);
+ const FcChar8* pLangAttribUtf8 = NULL;
if( !aLangAttrib.isEmpty() )
{
- const FcChar8* pLangAttribUtf8;
if (aLangAttrib.equalsIgnoreAsciiCase(OString(RTL_CONSTASCII_STRINGPARAM("pa-in"))))
pLangAttribUtf8 = (FcChar8*)"pa";
else
pLangAttribUtf8 = (FcChar8*)aLangAttrib.getStr();
- FcPatternAddString(pPattern, FC_LANG, pLangAttribUtf8);
}
// Add required Unicode characters, if any
@@ -783,11 +917,16 @@ bool PrintFontManager::Substitute( FontSelectPattern &rPattern, rtl::OUString& r
// also handle unicode surrogates
const sal_uInt32 nCode = rMissingCodes.iterateCodePoints( &nStrIndex );
FcCharSetAddChar( unicodes, nCode );
+ if (!pLangAttribUtf8)
+ pLangAttribUtf8 = (const FcChar8*)pick_sample_language(nCode);
}
FcPatternAddCharSet(pPattern, FC_CHARSET, unicodes);
FcCharSetDestroy(unicodes);
}
+ if( pLangAttribUtf8 )
+ FcPatternAddString( pPattern, FC_LANG, pLangAttribUtf8 );
+
addtopattern(pPattern, rPattern.meItalic, rPattern.meWeight,
rPattern.meWidthType, rPattern.mePitch);
--
1.7.7.3

View file

@ -1,31 +0,0 @@
--- ./sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx 2011-11-14 20:32:45.000000000 +0000
+++ ./sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx 2011-11-14 20:30:53.000000000 +0000
@@ -150,7 +150,7 @@ void writeBinaryBuffer( const OutputBuff
void writeJpeg_( OutputBuffer& o_rOutputBuf, Stream* str, bool bWithLinefeed )
{
// dump JPEG file as-is
-#if POPPLER_CHECK_VERSION(0, 17, 3)
+#if POPPLER_CHECK_VERSION(0, 17, 3) || POPPLER_CHECK_VERSION(0, 18, 1)
str = str->getBaseStream();
#else
str = ((DCTStream *)str)->getRawStream();
@@ -493,7 +493,7 @@ void PDFOutDev::endPage()
printf("endPage\n");
}
-#if POPPLER_CHECK_VERSION(0, 17, 0)
+#if POPPLER_CHECK_VERSION(0, 17, 0) || POPPLER_CHECK_VERSION(0, 18, 1)
void PDFOutDev::processLink(AnnotLink *link, Catalog *)
#else
void PDFOutDev::processLink(Link* link, Catalog*)
--- ./sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx 2011-11-14 20:22:04.000000000 +0000
+++ ./sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx 2011-11-14 20:22:55.000000000 +0000
@@ -201,7 +201,7 @@ namespace pdfi
// virtual void cvtDevToUser(double dx, double dy, double *ux, double *uy);
// virtual void cvtUserToDev(double ux, double uy, int *dx, int *dy);
- #if POPPLER_CHECK_VERSION(0, 17, 0)
+ #if POPPLER_CHECK_VERSION(0, 17, 0) || POPPLER_CHECK_VERSION(0, 18, 1)
virtual void processLink(AnnotLink *link, Catalog *catalog);
#else
//----- link borders

View file

@ -1,33 +0,0 @@
--- vbahelper/inc/vbahelper/vbacollectionimpl.hxx 2011-01-28 20:27:51.507604173 +0000
+++ vbahelper/inc/vbahelper/vbacollectionimpl.hxx 2011-01-28 20:28:26.230045727 +0000
@@ -238,7 +238,7 @@
// including a HelperInterface implementation
template< typename Ifc1 >
-class ScVbaCollectionBase : public InheritedHelperInterfaceImpl< Ifc1 >
+class VBAHELPER_DLLPUBLIC ScVbaCollectionBase : public InheritedHelperInterfaceImpl< Ifc1 >
{
typedef InheritedHelperInterfaceImpl< Ifc1 > BaseColBase;
protected:
--- sc/Library_vbaobj.mk
+++ sc/Library_vbaobj.mk
@@ -118,7 +118,6 @@ $(eval $(call gb_Library_add_exception_objects,vbaobj,\
sc/source/ui/vba/vbaquerytable \
sc/source/ui/vba/vbarange \
sc/source/ui/vba/vbasheetobject \
- sc/source/ui/vba/vbasheetobjects \
sc/source/ui/vba/vbastyle \
sc/source/ui/vba/vbastyles \
sc/source/ui/vba/vbatextboxshape \
@@ -133,6 +132,11 @@ $(eval $(call gb_Library_add_exception_objects,vbaobj,\
sc/source/ui/vba/vbawsfunction \
))
+$(eval $(call gb_Library_add_cxxobjects,vbaobj,\
+ sc/source/ui/vba/vbasheetobjects \
+ , $(gb_COMPILERNOOPTFLAGS) $(gb_LinkTarget_EXCEPTIONFLAGS) \
+))
+
ifneq (,$(filter LINUX DRAGONFLY OPENBSD FREEBSD NETBSD, $(OS)))
$(eval $(call gb_Library_set_ldflags,vbaobj,\
$$(LDFLAGS) \