diff options
author | Jan Holesovsky <kendy@suse.cz> | 2011-03-18 15:49:47 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2011-03-18 15:49:47 +0100 |
commit | 091e4aee3386f3bfee081dc8646494e0eb97f88a (patch) | |
tree | dd79298b4e8729ca7dc874274d4a33ea88fe107d /linguistic/source/lngopt.cxx | |
parent | f0681adbf092e2b455db52535f2df882bc87343a (diff) | |
parent | 224bd63b3fa459baa0a6bb5cd03f5dc2ca475d82 (diff) |
Merge remote-tracking branch 'origin/integration/dev300_m101'
Conflicts:
avmedia/source/framework/mediacontrol.cxx
connectivity/source/commontools/DateConversion.cxx
desktop/source/deployment/registry/component/dp_component.cxx
editeng/inc/editeng/numitem.hxx
editeng/inc/editeng/txtrange.hxx
editeng/source/editeng/editobj.cxx
editeng/source/editeng/editview.cxx
editeng/source/editeng/eehtml.cxx
editeng/source/editeng/impedit3.cxx
editeng/source/editeng/impedit4.cxx
editeng/source/misc/txtrange.cxx
editeng/source/outliner/outlin2.cxx
editeng/source/outliner/outlvw.cxx
framework/source/layoutmanager/layoutmanager.cxx
linguistic/source/lngsvcmgr.hxx
sfx2/source/appl/app.cxx
sfx2/source/appl/app.src
sfx2/source/appl/appbas.cxx
sfx2/source/appl/appcfg.cxx
sfx2/source/appl/appdde.cxx
sfx2/source/appl/appmain.cxx
sfx2/source/appl/appopen.cxx
sfx2/source/appl/appquit.cxx
sfx2/source/appl/appserv.cxx
sfx2/source/appl/childwin.cxx
sfx2/source/appl/fileobj.cxx
sfx2/source/appl/fileobj.hxx
sfx2/source/appl/workwin.cxx
sfx2/source/control/dispatch.cxx
sfx2/source/control/macro.cxx
sfx2/source/control/objface.cxx
sfx2/source/control/request.cxx
sfx2/source/control/shell.cxx
sfx2/source/control/statcach.cxx
sfx2/source/dialog/dinfdlg.cxx
sfx2/source/dialog/dockwin.cxx
sfx2/source/dialog/mailmodel.cxx
sfx2/source/dialog/mailmodelapi.cxx
sfx2/source/dialog/mgetempl.cxx
sfx2/source/dialog/splitwin.cxx
sfx2/source/dialog/styledlg.cxx
sfx2/source/dialog/tabdlg.cxx
sfx2/source/dialog/templdlg.cxx
sfx2/source/dialog/tplcitem.cxx
sfx2/source/dialog/tplpitem.cxx
sfx2/source/doc/doctempl.cxx
sfx2/source/doc/docvor.cxx
sfx2/source/doc/new.cxx
sfx2/source/doc/objcont.cxx
sfx2/source/doc/objserv.cxx
sfx2/source/doc/objxtor.cxx
sfx2/source/inc/appdata.hxx
sfx2/source/inc/helpid.hrc
sfx2/source/inc/sfxlocal.hrc
sfx2/source/inc/statcach.hxx
sfx2/source/inc/templdgi.hxx
sfx2/source/inc/virtmenu.hxx
sfx2/source/inc/workwin.hxx
sfx2/source/menu/mnumgr.cxx
sfx2/source/menu/virtmenu.cxx
sfx2/source/statbar/stbitem.cxx
sfx2/source/view/frame.cxx
sfx2/source/view/frame2.cxx
sfx2/source/view/orgmgr.cxx
sfx2/source/view/printer.cxx
sfx2/source/view/prnmon.cxx
sfx2/source/view/sfxbasecontroller.cxx
sfx2/source/view/viewfrm.cxx
sfx2/source/view/viewfrm2.cxx
sfx2/source/view/viewprn.cxx
sfx2/source/view/viewsh.cxx
svx/inc/svx/svditer.hxx
svx/source/dialog/sdstring.src
svx/source/form/fmpage.cxx
svx/source/form/formcontroller.cxx
svx/source/svdraw/svdcrtv.cxx
svx/source/svdraw/svditer.cxx
svx/source/svdraw/svdview.cxx
xmloff/source/forms/elementimport.cxx
Diffstat (limited to 'linguistic/source/lngopt.cxx')
-rwxr-xr-x[-rw-r--r--] | linguistic/source/lngopt.cxx | 89 |
1 files changed, 33 insertions, 56 deletions
diff --git a/linguistic/source/lngopt.cxx b/linguistic/source/lngopt.cxx index a96f211cd99e..8fa1ff68a42a 100644..100755 --- a/linguistic/source/lngopt.cxx +++ b/linguistic/source/lngopt.cxx @@ -31,8 +31,8 @@ #include <sal/macros.h> #include "lngopt.hxx" -#include "lngprops.hxx" -#include "misc.hxx" +#include "linguistic/lngprops.hxx" +#include "linguistic/misc.hxx" #include <tools/debug.hxx> #include <unotools/lingucfg.hxx> @@ -101,33 +101,33 @@ LinguOptions::~LinguOptions() } -BOOL LinguOptions::SetLocale_Impl( INT16 &rLanguage, Any &rOld, const Any &rVal, sal_Int16 nType) +sal_Bool LinguOptions::SetLocale_Impl( sal_Int16 &rLanguage, Any &rOld, const Any &rVal, sal_Int16 nType) { - BOOL bRes = FALSE; + sal_Bool bRes = sal_False; Locale aNew; rVal >>= aNew; - INT16 nNew = MsLangId::resolveSystemLanguageByScriptType(MsLangId::convertLocaleToLanguage(aNew), nType); + sal_Int16 nNew = MsLangId::resolveSystemLanguageByScriptType(MsLangId::convertLocaleToLanguage(aNew), nType); if (nNew != rLanguage) { Locale aLocale( CreateLocale( rLanguage ) ); rOld.setValue( &aLocale, ::getCppuType((Locale*)0 )); rLanguage = nNew; - bRes = TRUE; + bRes = sal_True; } return bRes; } -BOOL LinguOptions::SetValue( Any &rOld, const Any &rVal, INT32 nWID ) +sal_Bool LinguOptions::SetValue( Any &rOld, const Any &rVal, sal_Int32 nWID ) { MutexGuard aGuard( GetLinguMutex() ); - BOOL bRes = FALSE; + sal_Bool bRes = sal_False; - INT16 *pnVal = 0; - BOOL *pbVal = 0; + sal_Int16 *pnVal = 0; + sal_Bool *pbVal = 0; switch( nWID ) { @@ -166,30 +166,30 @@ BOOL LinguOptions::SetValue( Any &rOld, const Any &rVal, INT32 nWID ) default : { DBG_ASSERT( 0,"lng : unknown WID"); - bRes = FALSE; + bRes = sal_False; } } if (pbVal) { - BOOL bNew = FALSE; + sal_Bool bNew = sal_False; rVal >>= bNew; if (bNew != *pbVal) { rOld <<= *pbVal; *pbVal = bNew; - bRes = TRUE; + bRes = sal_True; } } if (pnVal) { - INT16 nNew = 0; + sal_Int16 nNew = 0; rVal >>= nNew; if (nNew != *pnVal) { rOld <<= *pnVal; *pnVal = nNew; - bRes = TRUE; + bRes = sal_True; } } @@ -199,13 +199,13 @@ BOOL LinguOptions::SetValue( Any &rOld, const Any &rVal, INT32 nWID ) return bRes; } -void LinguOptions::GetValue( Any &rVal, INT32 nWID ) const +void LinguOptions::GetValue( Any &rVal, sal_Int32 nWID ) const { MutexGuard aGuard( GetLinguMutex() ); - INT16 *pnVal = 0; - BOOL *pbVal = 0; - BOOL bDummy = FALSE; + sal_Int16 *pnVal = 0; + sal_Bool *pbVal = 0; + sal_Bool bDummy = sal_False; switch( nWID ) { @@ -259,7 +259,7 @@ void LinguOptions::GetValue( Any &rVal, INT32 nWID ) const struct WID_Name { - INT32 nWID; + sal_Int32 nWID; const char *pPropertyName; }; @@ -294,13 +294,13 @@ WID_Name aWID_Name[] = }; -OUString LinguOptions::GetName( INT32 nWID ) +OUString LinguOptions::GetName( sal_Int32 nWID ) { MutexGuard aGuard( GetLinguMutex() ); OUString aRes; - INT32 nLen = SAL_N_ELEMENTS( aWID_Name ); + sal_Int32 nLen = SAL_N_ELEMENTS( aWID_Name ); if (0 <= nWID && nWID < nLen && aWID_Name[ nWID ].nWID == nWID) aRes = OUString::createFromAscii(aWID_Name[nWID].pPropertyName); else @@ -366,7 +366,7 @@ LinguProps::LinguProps() : aPropListeners (GetLinguMutex()), aPropertyMap(lcl_GetLinguProps()) { - bDisposing = FALSE; + bDisposing = sal_False; } void LinguProps::launchEvent( const PropertyChangeEvent &rEvt ) const @@ -417,7 +417,7 @@ void SAL_CALL LinguProps::setPropertyValue( if (aOld != rValue && aConfig.SetProperty( pCur->nWID, rValue )) { PropertyChangeEvent aChgEvt( (XPropertySet *) this, rPropertyName, - FALSE, pCur->nWID, aOld, rValue ); + sal_False, pCur->nWID, aOld, rValue ); launchEvent( aChgEvt ); } } @@ -520,7 +520,7 @@ void SAL_CALL LinguProps::setFastPropertyValue( sal_Int32 nHandle, const Any& rV if (aOld != rValue && aConfig.SetProperty( nHandle, rValue )) { PropertyChangeEvent aChgEvt( (XPropertySet *) this, - LinguOptions::GetName( nHandle ), FALSE, nHandle, aOld, rValue ); + LinguOptions::GetName( nHandle ), sal_False, nHandle, aOld, rValue ); launchEvent( aChgEvt ); } } @@ -542,12 +542,12 @@ Sequence< PropertyValue > SAL_CALL { MutexGuard aGuard( GetLinguMutex() ); - INT32 nLen = aPropertyMap.getSize(); + sal_Int32 nLen = aPropertyMap.getSize(); Sequence< PropertyValue > aProps( nLen ); PropertyValue *pProp = aProps.getArray(); PropertyEntryVector_t aPropEntries = aPropertyMap.getPropertyEntries(); PropertyEntryVector_t::const_iterator aIt = aPropEntries.begin(); - for (INT32 i = 0; i < nLen; ++i, ++aIt) + for (sal_Int32 i = 0; i < nLen; ++i, ++aIt) { PropertyValue &rVal = pProp[i]; Any aAny( aConfig.GetProperty( aIt->nWID ) ); @@ -567,9 +567,9 @@ void SAL_CALL { MutexGuard aGuard( GetLinguMutex() ); - INT32 nLen = rProps.getLength(); + sal_Int32 nLen = rProps.getLength(); const PropertyValue *pVal = rProps.getConstArray(); - for (INT32 i = 0; i < nLen; ++i) + for (sal_Int32 i = 0; i < nLen; ++i) { const PropertyValue &rVal = pVal[i]; setPropertyValue( rVal.Name, rVal.Value ); @@ -584,7 +584,7 @@ void SAL_CALL if (!bDisposing) { - bDisposing = TRUE; + bDisposing = sal_True; //! its too late to save the options here! // (see AppExitListener for saving) @@ -637,10 +637,10 @@ sal_Bool SAL_CALL LinguProps::supportsService( const OUString& ServiceName ) uno::Sequence< OUString > aSNL = getSupportedServiceNames(); const OUString * pArray = aSNL.getConstArray(); - for( INT32 i = 0; i < aSNL.getLength(); i++ ) + for( sal_Int32 i = 0; i < aSNL.getLength(); i++ ) if( pArray[i] == ServiceName ) - return TRUE; - return FALSE; + return sal_True; + return sal_False; } // XServiceInfo @@ -662,29 +662,6 @@ uno::Sequence< OUString > LinguProps::getSupportedServiceNames_Static() return aSNS; } - -sal_Bool SAL_CALL LinguProps_writeInfo( void * /*pServiceManager*/, - XRegistryKey * pRegistryKey ) -{ - try - { - String aImpl( '/' ); - aImpl += LinguProps::getImplementationName_Static().getStr(); - aImpl.AppendAscii( "/UNO/SERVICES" ); - Reference< XRegistryKey > xNewKey = - pRegistryKey->createKey(aImpl ); - uno::Sequence< OUString > aServices = LinguProps::getSupportedServiceNames_Static(); - for( INT32 i = 0; i < aServices.getLength(); i++ ) - xNewKey->createKey( aServices.getConstArray()[i]); - - return sal_True; - } - catch(Exception &) - { - return sal_False; - } -} - void * SAL_CALL LinguProps_getFactory( const sal_Char * pImplName, XMultiServiceFactory *pServiceManager, void * ) { |