diff options
Diffstat (limited to 'vcl/source/app')
-rw-r--r-- | vcl/source/app/i18nhelp.cxx | 64 | ||||
-rw-r--r-- | vcl/source/app/salvtables.cxx | 5 | ||||
-rw-r--r-- | vcl/source/app/svmain.cxx | 96 |
3 files changed, 95 insertions, 70 deletions
diff --git a/vcl/source/app/i18nhelp.cxx b/vcl/source/app/i18nhelp.cxx index 5b0d45773512..1622fe3e5bea 100644 --- a/vcl/source/app/i18nhelp.cxx +++ b/vcl/source/app/i18nhelp.cxx @@ -31,25 +31,15 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" +#include "vcl/i18nhelp.hxx" +#include "com/sun/star/lang/XMultiServiceFactory.hpp" +#include "com/sun/star/i18n/TransliterationModules.hpp" +#include "unotools/localedatawrapper.hxx" +#include "unotools/transliterationwrapper.hxx" +#include "i18npool/mslangid.hxx" -#include <vcl/i18nhelp.hxx> - -/* -#include <com/sun/star/lang/XSingleServiceFactory.hpp> - - -#include <comphelper/processfactory.hxx> -*/ - -// #include <cppuhelper/servicefactory.hxx> - - -#include <com/sun/star/lang/XMultiServiceFactory.hpp> -#include <com/sun/star/i18n/TransliterationModules.hpp> -#include <unotools/localedatawrapper.hxx> -#include <unotools/transliterationwrapper.hxx> -#include <i18npool/mslangid.hxx> +#include "rtl/ustrbuf.hxx" using namespace ::com::sun::star; @@ -104,6 +94,37 @@ const ::com::sun::star::lang::Locale& vcl::I18nHelper::getLocale() const return maLocale; } +inline bool is_formatting_mark( sal_Unicode c ) +{ + if( (c >= 0x200B) && (c <= 0x200F) ) // BiDi and zero-width-markers + return true; + if( (c >= 0x2028) && (c <= 0x202E) ) // BiDi and paragraph-markers + return true; + return false; +} + +/* #i100057# filter formatting marks out of strings before passing them to + the transliteration. The real solution would have been an additional TransliterationModule + to ignore these marks during transliteration; however changin the code in i18npool that actually + implements this could produce unwanted side effects. + + Of course this copying around is not really good, but looking at i18npool, one more time + will not hurt. +*/ +String vcl::I18nHelper::filterFormattingChars( const String& rStr ) +{ + sal_Int32 nUnicodes = rStr.Len(); + rtl::OUStringBuffer aBuf( nUnicodes ); + const sal_Unicode* pStr = rStr.GetBuffer(); + while( nUnicodes-- ) + { + if( ! is_formatting_mark( *pStr ) ) + aBuf.append( *pStr ); + pStr++; + } + return aBuf.makeStringAndClear(); +} + sal_Int32 vcl::I18nHelper::CompareString( const String& rStr1, const String& rStr2 ) const { ::osl::Guard< ::osl::Mutex > aGuard( ((vcl::I18nHelper*)this)->maMutex ); @@ -117,7 +138,10 @@ sal_Int32 vcl::I18nHelper::CompareString( const String& rStr1, const String& rSt ((vcl::I18nHelper*)this)->mpTransliterationWrapper = NULL; } - return ImplGetTransliterationWrapper().compareString( rStr1, rStr2 ); + + String aStr1( filterFormattingChars(rStr1) ); + String aStr2( filterFormattingChars(rStr2) ); + return ImplGetTransliterationWrapper().compareString( aStr1, aStr2 ); } sal_Bool vcl::I18nHelper::MatchString( const String& rStr1, const String& rStr2 ) const @@ -133,7 +157,9 @@ sal_Bool vcl::I18nHelper::MatchString( const String& rStr1, const String& rStr2 ((vcl::I18nHelper*)this)->mpTransliterationWrapper = NULL; } - return ImplGetTransliterationWrapper().isMatch( rStr1, rStr2 ); + String aStr1( filterFormattingChars(rStr1) ); + String aStr2( filterFormattingChars(rStr2) ); + return ImplGetTransliterationWrapper().isMatch( aStr1, aStr2 ); } sal_Bool vcl::I18nHelper::MatchMnemonic( const String& rString, sal_Unicode cMnemonicChar ) const diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 113953753601..fe1ef6e7b992 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -65,6 +65,11 @@ SalInstance::~SalInstance() { } +void SalInstance::FillFontPathList( std::list< rtl::OString >& ) +{ + // do nothing +} + SalTimer::~SalTimer() { } diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx index e9dbe16f1fcf..6c09978e37b1 100644 --- a/vcl/source/app/svmain.cxx +++ b/vcl/source/app/svmain.cxx @@ -43,67 +43,59 @@ // building X11 graphics layers. #if defined UNX && ! defined QUARTZ -#include <svunx.h> +#include "svunx.h" #endif -#ifndef _SV_SVSYS_HXX -#include <svsys.h> -#endif -#include <vcl/salinst.hxx> -#include <vcl/salwtype.hxx> -#ifndef _VOS_SIGNAL_HXX -#include <vos/signal.hxx> -#endif -#ifndef _VOS_SOCKET_HXX -#include <vos/socket.hxx> -#endif -#include <tools/tools.h> -#include <tools/debug.hxx> -#ifndef _UNIQID_HXX -#include <tools/unqid.hxx> -#endif -#include <vcl/svdata.hxx> -#include <vcl/dbggui.hxx> -#include <vcl/svapp.hxx> -#include <vcl/wrkwin.hxx> -#include <vcl/cvtgrf.hxx> -#include <vcl/image.hxx> -#ifndef _SV_RESMGR_HXX -#include <tools/resmgr.hxx> -#endif -#include <vcl/accmgr.hxx> -#include <vcl/idlemgr.hxx> -#include <vcl/outdev.h> -#include <vcl/outfont.hxx> -#include <vcl/print.h> -#include <vcl/settings.hxx> -#include <vcl/unowrap.hxx> -#include <vcl/salsys.hxx> -#include <vcl/saltimer.hxx> -#include <vcl/salimestatus.hxx> -#include <vcl/impimagetree.hxx> -#include <vcl/xconnection.hxx> - -#include <vos/process.hxx> -#include <osl/file.hxx> -#include <comphelper/processfactory.hxx> -#include <com/sun/star/lang/XMultiServiceFactory.hpp> -#include <com/sun/star/lang/XComponent.hpp> -#include <rtl/logfile.hxx> +#include "svsys.h" +#include "vcl/salinst.hxx" +#include "vcl/salwtype.hxx" +#include "vos/signal.hxx" +#include "tools/tools.h" +#include "tools/debug.hxx" +#include "tools/unqid.hxx" +#include "vcl/svdata.hxx" +#include "vcl/dbggui.hxx" +#include "vcl/svapp.hxx" +#include "vcl/wrkwin.hxx" +#include "vcl/cvtgrf.hxx" +#include "vcl/image.hxx" +#include "tools/resmgr.hxx" +#include "vcl/accmgr.hxx" +#include "vcl/idlemgr.hxx" +#include "vcl/outdev.h" +#include "vcl/outfont.hxx" +#include "vcl/print.h" +#include "vcl/settings.hxx" +#include "vcl/unowrap.hxx" +#include "vcl/salsys.hxx" +#include "vcl/saltimer.hxx" +#include "vcl/salimestatus.hxx" +#include "vcl/impimagetree.hxx" +#include "vcl/xconnection.hxx" + +#include "vos/process.hxx" +#include "osl/file.hxx" +#include "comphelper/processfactory.hxx" +#include "com/sun/star/lang/XMultiServiceFactory.hpp" +#include "com/sun/star/lang/XComponent.hpp" +#include "rtl/logfile.hxx" + +#include "vcl/fontcfg.hxx" +#include "vcl/configsettings.hxx" +#include "vcl/lazydelete.hxx" + +#include "cppuhelper/implbase1.hxx" +#include "uno/current_context.hxx" #if OSL_DEBUG_LEVEL > 0 #include <typeinfo> -#include <rtl/strbuf.hxx> +#include "rtl/strbuf.hxx" #endif using namespace ::rtl; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; -#include <vcl/fontcfg.hxx> -#include <vcl/configsettings.hxx> -#include <cppuhelper/implbase1.hxx> -#include <uno/current_context.hxx> // ======================================================================= @@ -355,6 +347,8 @@ void DeInitVCL() ImplSVData* pSVData = ImplGetSVData(); pSVData->mbDeInit = TRUE; + vcl::DeleteOnDeinitBase::ImplDeleteOnDeInit(); + // give ime status a chance to destroy its own windows delete pSVData->mpImeStatus; pSVData->mpImeStatus = NULL; @@ -383,7 +377,7 @@ void DeInitVCL() DBG_ASSERT( nBadTopWindows==0, aBuf.getStr() ); #endif - ImplImageTree::cleanup(); + ImplImageTreeSingletonRef()->shutDown(); delete pExceptionHandler; pExceptionHandler = NULL; |