From 9e18c9ee07c6e8f9a62cdcb0237b183283a275ae Mon Sep 17 00:00:00 2001 From: Vladimir Glazounov Date: Thu, 1 Oct 2009 09:16:17 +0000 Subject: CWS-TOOLING: integrate CWS cmcfixes62 2009-09-22 21:19:24 +0200 cmc r276365 : #i100000# that's the most plausible explanation, -D$(CVER) is needed by scp2 under windows 2009-09-19 16:10:36 +0200 cmc r276303 : #i100000# revert this for no partically good reason 2009-09-18 14:16:47 +0200 cmc r276279 : remove extra build depend 2009-09-18 08:56:15 +0200 cmc r276265 : #i100000# rerun autoconf 2009-09-17 14:59:38 +0200 cmc r276245 : CWS-TOOLING: rebase CWS cmcfixes62 to trunk@276192 (milestone: DEV300:m59) 2009-09-10 16:40:49 +0200 pl r276041 : fix warning 2009-09-10 11:34:55 +0200 pl r276026 : disable warning from system header 2009-09-09 19:30:45 +0200 pl r276013 : use osl_getAsciiFunctionSymbol instead of strange cast 2009-09-09 19:25:32 +0200 pl r276012 : add some casting hacks to make compile on solaris cc 2009-09-09 19:10:48 +0200 pl r276009 : add missing Configure option for solaris sparce 32bit 2009-09-09 18:37:05 +0200 pl r276008 : merge fix for #i104525# into moved code 2009-09-07 13:28:08 +0200 cmc r275894 : CWS-TOOLING: rebase CWS cmcfixes62 to trunk@275801 (milestone: DEV300:m57) 2009-08-28 12:36:27 +0200 cmc r275523 : CWS-TOOLING: rebase CWS cmcfixes62 to trunk@275331 (milestone: DEV300:m56) 2009-08-26 12:56:18 +0200 cmc r275413 : #i104088# use the right headers in the right place 2009-08-25 17:07:50 +0200 cmc r275372 : #i104500# make openssl build on linux that isn't x86 or x86_64 2009-08-25 13:08:48 +0200 cmc r275347 : #i89237# pretty picswitch up 2009-08-25 10:58:09 +0200 cmc r275342 : #i104489# remove last unused code in starmath 2009-08-25 10:23:33 +0200 cmc r275338 : #i104088# clean up the define post-move 2009-08-24 13:46:57 +0200 cmc r275310 : #i104088# 64bit odbc api changes 2009-08-24 13:42:52 +0200 cmc r275309 : #i89237# unify linux platform mks under a generic parent 2009-08-24 13:19:52 +0200 cmc r275307 : #i104455# remove unused code 2009-08-24 13:10:56 +0200 cmc r275306 : #i104088# 64bit odbc api changes 2009-08-24 10:07:50 +0200 cmc r275293 : #i104306# move recent-used to vcl 2009-08-24 09:32:08 +0200 cmc r275291 : #i104306# move recent-used to vcl 2009-08-23 22:01:07 +0200 cmc r275286 : #i104306# move recently-used to vcl 2009-08-22 15:25:25 +0200 cmc r275285 : #i104088# 64bit odbc api changes 2009-08-21 17:52:40 +0200 cmc r275268 : #i104306# move recently-used to vcl 2009-08-21 14:38:26 +0200 cmc r275257 : #i104408 make these headers ready for c++0x 2009-08-21 14:20:19 +0200 cmc r275251 : #i104406# avoid overlapping strcpy to avoid bustage on recent toolchains 2009-08-21 14:14:25 +0200 cmc r275250 : #i104385# silence 64bit warnings --- vcl/aqua/inc/salinst.h | 1 + vcl/aqua/source/app/salinst.cxx | 86 +++++++++++++++++++++++++++++++++++++ vcl/inc/vcl/salinst.hxx | 1 + vcl/inc/vcl/svapp.hxx | 14 ++++++ vcl/os2/inc/salinst.h | 1 + vcl/os2/source/app/salinst.cxx | 4 ++ vcl/source/app/svapp.cxx | 6 +++ vcl/unx/gtk/app/gtkinst.cxx | 28 ++++++++++++ vcl/unx/headless/svpinst.cxx | 4 ++ vcl/unx/headless/svpinst.hxx | 2 + vcl/unx/inc/plugins/gtk/gtkinst.hxx | 1 + vcl/unx/inc/salinst.h | 2 + vcl/unx/source/app/salinst.cxx | 19 ++++++++ vcl/win/inc/salinst.h | 1 + vcl/win/source/app/salinst.cxx | 34 ++++++++++++--- 15 files changed, 198 insertions(+), 6 deletions(-) (limited to 'vcl') diff --git a/vcl/aqua/inc/salinst.h b/vcl/aqua/inc/salinst.h index 82ac5b6f4ffd..5b1cf0d84562 100644 --- a/vcl/aqua/inc/salinst.h +++ b/vcl/aqua/inc/salinst.h @@ -143,6 +143,7 @@ public: virtual void DestroyMenuItem( SalMenuItem* ); virtual SalSession* CreateSalSession(); virtual void* GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes ); + virtual void AddToRecentDocumentList(const rtl::OUString& rFileUrl, const rtl::OUString& rMimeType); virtual void SetEventCallback( void* pInstance, bool(*pCallback)(void*,void*,int) ); virtual void SetErrorEventCallback( void* pInstance, bool(*pCallback)(void*,void*,int) ); diff --git a/vcl/aqua/source/app/salinst.cxx b/vcl/aqua/source/app/salinst.cxx index 56bf1a612b40..e4037df0c4aa 100644 --- a/vcl/aqua/source/app/salinst.cxx +++ b/vcl/aqua/source/app/salinst.cxx @@ -55,6 +55,14 @@ #include "saltimer.h" #include "vclnsapp.h" +#include + +#include +#include +#include +#include +#include + #include "premac.h" #include #include @@ -64,6 +72,7 @@ using namespace std; +using namespace ::com::sun::star; extern BOOL ImplSVMain(); @@ -1029,6 +1038,83 @@ void* AquaSalInstance::GetConnectionIdentifier( ConnectionIdentifierType& rRetur return (void*)""; } +// We need to re-encode file urls because osl_getFileURLFromSystemPath converts +// to UTF-8 before encoding non ascii characters, which is not what other apps expect. +static rtl::OUString translateToExternalUrl(const rtl::OUString& internalUrl) +{ + rtl::OUString extUrl; + + uno::Reference< lang::XMultiServiceFactory > sm = comphelper::getProcessServiceFactory(); + if (sm.is()) + { + uno::Reference< beans::XPropertySet > pset; + sm->queryInterface( getCppuType( &pset )) >>= pset; + if (pset.is()) + { + uno::Reference< uno::XComponentContext > context; + static const rtl::OUString DEFAULT_CONTEXT( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ) ); + pset->getPropertyValue(DEFAULT_CONTEXT) >>= context; + if (context.is()) + extUrl = uri::ExternalUriReferenceTranslator::create(context)->translateToExternal(internalUrl); + } + } + return extUrl; +} + +// #i104525# many versions of OSX have problems with some URLs: +// when an app requests OSX to add one of these URLs to the "Recent Items" list +// then this app gets killed (TextEdit, Preview, etc. and also OOo) +static bool isDangerousUrl( const rtl::OUString& rUrl ) +{ + // use a heuristic that detects all known cases since there is no official comment + // on the exact impact and root cause of the OSX bug + const int nLen = rUrl.getLength(); + const sal_Unicode* p = rUrl.getStr(); + for( int i = 0; i < nLen-3; ++i, ++p ) { + if( p[0] != '%' ) + continue; + // escaped percent? + if( (p[1] == '2') && (p[2] == '5') ) + return true; + // escapes are considered to be UTF-8 encoded + // => check for invalid UTF-8 leading byte + if( (p[1] != 'f') && (p[1] != 'F') ) + continue; + int cLowNibble = p[2]; + if( (cLowNibble >= '0' ) && (cLowNibble <= '9')) + return false; + if( cLowNibble >= 'a' ) + cLowNibble -= 'a' - 'A'; + if( (cLowNibble < 'A') || (cLowNibble >= 'C')) + return true; + } + + return false; +} + +void AquaSalInstance::AddToRecentDocumentList(const rtl::OUString& rFileUrl, const rtl::OUString& /*rMimeType*/) +{ + // Convert file URL for external use (see above) + rtl::OUString externalUrl = translateToExternalUrl(rFileUrl); + if( 0 == externalUrl.getLength() ) + externalUrl = rFileUrl; + + if( externalUrl.getLength() && !isDangerousUrl( externalUrl ) ) + { + NSString* pString = CreateNSString( externalUrl ); + NSURL* pURL = [NSURL URLWithString: pString]; + + if( pURL ) + { + NSDocumentController* pCtrl = [NSDocumentController sharedDocumentController]; + [pCtrl noteNewRecentDocumentURL: pURL]; + } + if( pString ) + [pString release]; + } +} + + // ----------------------------------------------------------------------- SalTimer* AquaSalInstance::CreateSalTimer() diff --git a/vcl/inc/vcl/salinst.hxx b/vcl/inc/vcl/salinst.hxx index 650e57cdccc4..f8c148859516 100644 --- a/vcl/inc/vcl/salinst.hxx +++ b/vcl/inc/vcl/salinst.hxx @@ -184,6 +184,7 @@ public: CreateClipboard( const com::sun::star::uno::Sequence< com::sun::star::uno::Any >& i_rArguments ); virtual com::sun::star::uno::Reference< com::sun::star::uno::XInterface > CreateDragSource(); virtual com::sun::star::uno::Reference< com::sun::star::uno::XInterface > CreateDropTarget(); + virtual void AddToRecentDocumentList(const rtl::OUString& rFileUrl, const rtl::OUString& rMimeType) = 0; }; // called from SVMain diff --git a/vcl/inc/vcl/svapp.hxx b/vcl/inc/vcl/svapp.hxx index f853fae6c268..1e0c5218d1c5 100644 --- a/vcl/inc/vcl/svapp.hxx +++ b/vcl/inc/vcl/svapp.hxx @@ -479,6 +479,20 @@ public: */ static const ::rtl::OUString& GetDesktopEnvironment(); + /** Add a file to the system shells recent document list if there is any. + This function may have no effect under Unix because there is no + standard API among the different desktop managers. + + @param rFileUrl + The file url of the document. + + @param rMimeType + The mime content type of the document specified by aFileUrl. + If an empty string will be provided "application/octet-stream" + will be used. + */ + static void AddToRecentDocumentList(const rtl::OUString& rFileUrl, const rtl::OUString& rMimeType); + private: DECL_STATIC_LINK( Application, PostEventHandler, void* ); diff --git a/vcl/os2/inc/salinst.h b/vcl/os2/inc/salinst.h index 119324c1acd6..ba8dc7ddc43f 100644 --- a/vcl/os2/inc/salinst.h +++ b/vcl/os2/inc/salinst.h @@ -96,6 +96,7 @@ public: virtual void DestroyMenuItem( SalMenuItem* ); virtual SalSession* CreateSalSession(); virtual void* GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes ); + virtual void AddToRecentDocumentList(const rtl::OUString& rFileUrl, const rtl::OUString& rMimeType); }; SalFrame* ImplSalCreateFrame( Os2SalInstance* pInst, HWND hWndParent, ULONG nSalFrameStyle ); diff --git a/vcl/os2/source/app/salinst.cxx b/vcl/os2/source/app/salinst.cxx index a14881c253ee..d4d324ad469c 100644 --- a/vcl/os2/source/app/salinst.cxx +++ b/vcl/os2/source/app/salinst.cxx @@ -811,6 +811,10 @@ void* Os2SalInstance::GetConnectionIdentifier( ConnectionIdentifierType& rReturn return (void*) ""; } +void Os2SalInstance::AddToRecentDocumentList(const rtl::OUString& /*rFileUrl*/, const rtl::OUString& /*rMimeType*/) +{ +} + // ----------------------------------------------------------------------- SalTimer* Os2SalInstance::CreateSalTimer() diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index b53ceceeb757..6057409baa14 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -1989,6 +1989,12 @@ const ::rtl::OUString& Application::GetDesktopEnvironment() return SalGetDesktopEnvironment(); } +void Application::AddToRecentDocumentList(const rtl::OUString& rFileUrl, const rtl::OUString& rMimeType) +{ + ImplSVData* pSVData = ImplGetSVData(); + pSVData->mpDefInst->AddToRecentDocumentList(rFileUrl, rMimeType); +} + BOOL Application::IsAccessibilityEnabled() { return FALSE; diff --git a/vcl/unx/gtk/app/gtkinst.cxx b/vcl/unx/gtk/app/gtkinst.cxx index 8bed40fa539f..af3a1df97a8c 100644 --- a/vcl/unx/gtk/app/gtkinst.cxx +++ b/vcl/unx/gtk/app/gtkinst.cxx @@ -216,6 +216,34 @@ SalObject* GtkInstance::CreateObject( SalFrame* pParent, SystemWindowData* pWind return new GtkSalObject( static_cast(pParent), bShow ); } +extern "C" +{ + typedef void*(* getDefaultFnc)(); + typedef void(* addItemFnc)(void *, const char *); +} + +void GtkInstance::AddToRecentDocumentList(const rtl::OUString& rFileUrl, const rtl::OUString& rMimeType) +{ +#if GTK_CHECK_VERSION(2,10,0) + GtkRecentManager *manager = gtk_recent_manager_get_default (); + gtk_recent_manager_add_item (manager, rtl::OUStringToOString(rFileUrl, RTL_TEXTENCODING_UTF8).getStr()); + (void)rMimeType; +#else + static getDefaultFnc sym_gtk_recent_manager_get_default = + (getDefaultFnc)osl_getAsciiFunctionSymbol( GetSalData()->m_pPlugin, "gtk_recent_manager_get_default" ); + + static addItemFnc sym_gtk_recent_manager_add_item = + (addItemFnc)osl_getAsciiFunctionSymbol( GetSalData()->m_pPlugin, "gtk_recent_manager_add_item"); + if (sym_gtk_recent_manager_get_default && sym_gtk_recent_manager_add_item) + { + sym_gtk_recent_manager_add_item(sym_gtk_recent_manager_get_default(), + rtl::OUStringToOString(rFileUrl, RTL_TEXTENCODING_UTF8).getStr()); + } + else + X11SalInstance::AddToRecentDocumentList(rFileUrl, rMimeType); +#endif +} + GtkYieldMutex::GtkYieldMutex() { } diff --git a/vcl/unx/headless/svpinst.cxx b/vcl/unx/headless/svpinst.cxx index 87d0e4662f29..7b93e59b6acd 100644 --- a/vcl/unx/headless/svpinst.cxx +++ b/vcl/unx/headless/svpinst.cxx @@ -504,6 +504,10 @@ void SvpSalInstance::StartTimer( ULONG nMS ) } } +void SvpSalInstance::AddToRecentDocumentList(const rtl::OUString&, const rtl::OUString&) +{ +} + SvpSalTimer::~SvpSalTimer() { } diff --git a/vcl/unx/headless/svpinst.hxx b/vcl/unx/headless/svpinst.hxx index 71c463f071a9..e77debb53f1d 100644 --- a/vcl/unx/headless/svpinst.hxx +++ b/vcl/unx/headless/svpinst.hxx @@ -193,6 +193,8 @@ public: virtual SalSession* CreateSalSession(); virtual void* GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes ); + + virtual void AddToRecentDocumentList(const rtl::OUString& rFileUrl, const rtl::OUString& rMimeType); }; #endif // _SV_SALINST_HXX diff --git a/vcl/unx/inc/plugins/gtk/gtkinst.hxx b/vcl/unx/inc/plugins/gtk/gtkinst.hxx index 22c50f627e0c..16dce4688ede 100644 --- a/vcl/unx/inc/plugins/gtk/gtkinst.hxx +++ b/vcl/unx/inc/plugins/gtk/gtkinst.hxx @@ -91,6 +91,7 @@ public: virtual SalFrame* CreateChildFrame( SystemParentData* pParent, ULONG nStyle ); virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, BOOL bShow = TRUE ); virtual SalSystem* CreateSalSystem(); + virtual void AddToRecentDocumentList(const rtl::OUString& rFileUrl, const rtl::OUString& rMimeType); }; class GtkSalSystem : public X11SalSystem diff --git a/vcl/unx/inc/salinst.h b/vcl/unx/inc/salinst.h index bef5cfd5e9b4..399326c44f27 100644 --- a/vcl/unx/inc/salinst.h +++ b/vcl/unx/inc/salinst.h @@ -121,6 +121,8 @@ public: CreateClipboard( const com::sun::star::uno::Sequence< com::sun::star::uno::Any >& i_rArguments ); virtual com::sun::star::uno::Reference< com::sun::star::uno::XInterface > CreateDragSource(); virtual com::sun::star::uno::Reference< com::sun::star::uno::XInterface > CreateDropTarget(); + virtual void AddToRecentDocumentList(const rtl::OUString& rFileUrl, const rtl::OUString& rMimeType); + bool isPrinterInit() const { diff --git a/vcl/unx/source/app/salinst.cxx b/vcl/unx/source/app/salinst.cxx index d84b7fa5df6d..1dc2d1404009 100644 --- a/vcl/unx/source/app/salinst.cxx +++ b/vcl/unx/source/app/salinst.cxx @@ -35,6 +35,8 @@ #include #include +#include + #include "salunx.h" #include "saldata.hxx" @@ -413,3 +415,20 @@ void X11SalInstance::FillFontPathList( std::list< rtl::OString >& o_rFontPaths ) #endif /* SOLARIS */ } +extern "C" { static void SAL_CALL thisModule() {} } + +void X11SalInstance::AddToRecentDocumentList(const rtl::OUString& rFileUrl, const rtl::OUString& rMimeType) +{ + const rtl::OUString SYM_ADD_TO_RECENTLY_USED_FILE_LIST(RTL_CONSTASCII_USTRINGPARAM("add_to_recently_used_file_list")); + const rtl::OUString LIB_RECENT_FILE(RTL_CONSTASCII_USTRINGPARAM("librecentfile.so")); + typedef void (*PFUNC_ADD_TO_RECENTLY_USED_LIST)(const rtl::OUString&, const rtl::OUString&); + + PFUNC_ADD_TO_RECENTLY_USED_LIST add_to_recently_used_file_list = 0; + + osl::Module module; + module.loadRelative( &thisModule, LIB_RECENT_FILE ); + if (module.is()) + add_to_recently_used_file_list = (PFUNC_ADD_TO_RECENTLY_USED_LIST)module.getFunctionSymbol(SYM_ADD_TO_RECENTLY_USED_FILE_LIST); + if (add_to_recently_used_file_list) + add_to_recently_used_file_list(rFileUrl, rMimeType); +} diff --git a/vcl/win/inc/salinst.h b/vcl/win/inc/salinst.h index 26afe892b9a3..33a1a941ed49 100644 --- a/vcl/win/inc/salinst.h +++ b/vcl/win/inc/salinst.h @@ -88,6 +88,7 @@ public: virtual void DestroyMenuItem( SalMenuItem* ); virtual SalSession* CreateSalSession(); virtual void* GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes ); + virtual void AddToRecentDocumentList(const rtl::OUString& rFileUrl, const rtl::OUString& rMimeType); static int WorkaroundExceptionHandlingInUSER32Lib(int nExcept, LPEXCEPTION_POINTERS pExceptionInfo); }; diff --git a/vcl/win/source/app/salinst.cxx b/vcl/win/source/app/salinst.cxx index d57cdd48eed2..2b5ac6d3162d 100644 --- a/vcl/win/source/app/salinst.cxx +++ b/vcl/win/source/app/salinst.cxx @@ -39,7 +39,7 @@ #ifdef __MINGW32__ #include #endif - +#include #include #include #include @@ -65,11 +65,13 @@ #if defined _MSC_VER #pragma warning(push, 1) +#pragma warning( disable: 4917 ) #endif #include #include #include +#include #if defined _MSC_VER #pragma warning(pop) @@ -456,10 +458,10 @@ void InitSalData() { SalData* pSalData = new SalData; CoInitialize(0); - - // init GDIPlus - static Gdiplus::GdiplusStartupInput gdiplusStartupInput; - Gdiplus::GdiplusStartup(&pSalData->gdiplusToken, &gdiplusStartupInput, NULL); + + // init GDIPlus + static Gdiplus::GdiplusStartupInput gdiplusStartupInput; + Gdiplus::GdiplusStartup(&pSalData->gdiplusToken, &gdiplusStartupInput, NULL); } @@ -471,7 +473,7 @@ void DeInitSalData() // deinit GDIPlus if(pSalData) { - Gdiplus::GdiplusShutdown(pSalData->gdiplusToken); + Gdiplus::GdiplusShutdown(pSalData->gdiplusToken); } delete pSalData; @@ -1089,6 +1091,26 @@ void* WinSalInstance::GetConnectionIdentifier( ConnectionIdentifierType& rReturn // ----------------------------------------------------------------------- +/** Add a file to the system shells recent document list if there is any. + This function may have no effect under Unix because there is no + standard API among the different desktop managers. + + @param aFileUrl + The file url of the document. +*/ +void WinSalInstance::AddToRecentDocumentList(const rtl::OUString& rFileUrl, const rtl::OUString& /*rMimeType*/) +{ + rtl::OUString system_path; + osl::FileBase::RC rc = osl::FileBase::getSystemPathFromFileURL(rFileUrl, system_path); + + OSL_ENSURE(osl::FileBase::E_None == rc, "Invalid file url"); + + if (osl::FileBase::E_None == rc) + SHAddToRecentDocs(SHARD_PATHW, system_path.getStr()); +} + +// ----------------------------------------------------------------------- + SalTimer* WinSalInstance::CreateSalTimer() { return new WinSalTimer(); -- cgit From f5463072488be735e80f463b412c927eb4b9c467 Mon Sep 17 00:00:00 2001 From: Kurt Zenker Date: Wed, 14 Oct 2009 15:14:05 +0000 Subject: CWS-TOOLING: integrate CWS impress177 2009-10-07 13:02:12 +0200 sj r276751 : #i104579# fixed horz and vert adjustment for master styles (excluding notes master) 2009-10-06 18:09:14 +0200 sj r276724 : #i104579# fixed horz and vert adjustment for master styles 2009-10-05 15:02:38 +0200 sj r276679 : #i104685# fixed text color problem 2009-10-02 14:01:22 +0200 aw r276641 : #i105508# added own flag for ClipOnBounds to SdrBlockTextPrimitive2D and the helper createTextPrimitive; adapted usages; corrected VerticalText stuff; corrected ClipOnBounds for CustomShapes 2009-09-30 11:55:44 +0200 cl r276550 : CWS-TOOLING: rebase CWS impress177 to trunk@276429 (milestone: DEV300:m60) 2009-09-28 17:57:37 +0200 cl r276498 : #i94900# after a paste special make sure the stylesheets for outline shapes are correct 2009-09-24 17:36:29 +0200 af r276425 : #i103464# Restore device more reliably. 2009-09-24 12:29:31 +0200 sj r276417 : #i104685# fixed text color propblem 2009-09-22 16:48:06 +0200 sj r276360 : #i104682# fixed table border line thickness 2009-09-22 16:46:29 +0200 sj r276359 : #i104682# fixed table border line thickness 2009-09-22 10:29:30 +0200 sj r276346 : #104579# fixed horz and vert adjustment for master styles 2009-09-21 14:18:29 +0200 af r276330 : #i100905# Fixed crash when region is split into bands. 2009-09-15 15:44:30 +0200 cl r276181 : #i103179# always hide presentation shapes from master page if rendered as slide background 2009-09-15 10:44:52 +0200 cl r276155 : #i104579# return correct IsEmptyPresObj state 2009-09-14 16:51:41 +0200 cl r276132 : #i96538# restored OOo 3.0 numbering behaviour --- vcl/source/gdi/region.cxx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'vcl') diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx index b98712419cf1..43bb224aaa94 100644 --- a/vcl/source/gdi/region.cxx +++ b/vcl/source/gdi/region.cxx @@ -153,7 +153,8 @@ void ImplAddMissingBands ( // We still have to cover two cases: // 1. The region does not yet contain any bands. // 2. The intervall nTop->nBottom extends past the bottom most band. - if (nCurrentTop < nBottom && (pBand==NULL || nBottom>pBand->mnYBottom)) + if (nCurrentTop <= nBottom + && (pBand==NULL || nBottom>pBand->mnYBottom)) { // When there is no previous band then the new one will be the // first. Otherwise the new band is inserted behind the last band. @@ -232,8 +233,9 @@ ImplRegion* ImplRectilinearPolygonToBands (const PolyPolygon& rPolyPoly) ImplRegionBand* pTopBand = pBand; // If necessary split the band at nTop so that nTop is contained // in the lower band. - if ( // Prevent the current band from becoming 0 pixel high - pBand->mnYTopmnYTopmnYBottom>=nTop // do not split a band that is just one pixel high @@ -248,8 +250,9 @@ ImplRegion* ImplRectilinearPolygonToBands (const PolyPolygon& rPolyPoly) pBand = pBand->mpNextBand; // The lowest band may have to be split at nBottom so that // nBottom itself remains in the upper band. - if ( // allow the current band becoming 1 pixel high - pBand->mnYTop<=nBottom + if (pBand!=NULL + // allow the current band becoming 1 pixel high + && pBand->mnYTop<=nBottom // prevent splitting off a band that is 0 pixel high && pBand->mnYBottom>nBottom // do not split a band that is just one pixel high -- cgit From d7851c0ddb30a34a7481e4af2c0510fc76f98d27 Mon Sep 17 00:00:00 2001 From: Vladimir Glazounov Date: Wed, 21 Oct 2009 10:43:22 +0000 Subject: CWS-TOOLING: integrate CWS buildverbosity 2009-10-13 15:51:48 +0200 fs r276867 : allow building with 'nodep'=='' 2009-10-11 22:39:56 +0200 fs r276820 : silence a compiler warning in a file only used when VERBOSE!="" 2009-10-09 14:37:43 +0200 fs r276807 : let not override the non-presence of $VERBOSE the given command line arguments 2009-10-09 14:36:25 +0200 fs r276806 : also deliver spirit/home/classic/debug/impl 2009-10-08 13:38:07 +0200 fs r276789 : not that many line feeds in --show mode 2009-10-08 13:13:01 +0200 fs r276788 : minor adjustments requested by hjs: - replaced space/tab mixes at beginning of lines with mere tab - made "nothing to update" message for the ZIPALLTARGET target more prominent - removed useless "echo > /dev/nul" statements 2009-10-07 13:32:12 +0200 fs r276753 : #i105585# 2009-10-07 11:31:59 +0200 fs r276742 : #i10000# missing dependency between stoc/security and stoc/util 2009-10-06 22:59:59 +0200 fs r276729 : CWS-TOOLING: rebase CWS buildverbosity to trunk@276699 (milestone: DEV300:m61) 2009-09-29 12:04:58 +0200 fs r276518 : #i10000# 2009-09-29 12:04:25 +0200 fs r276517 : oops 2009-09-29 12:01:07 +0200 fs r276516 : #i84497# removed some more (non-diagnostic) 'echo ------' directives 2009-09-29 11:59:29 +0200 fs r276515 : #i84497# removed some more (non-diagnostic) 'echo ------' directives 2009-09-29 11:52:32 +0200 fs r276514 : #i84497# removed the various 'echo ------------' directives from verbose mode, as per hjs' request 2009-09-29 11:44:16 +0200 fs r276513 : do not duplicate IDLC call commands with different verbosity switches 2009-09-28 21:43:50 +0200 thb r276502 : #i84497# fixed potential recursive macro def + extra ls * solenv/inc/settings.mk: now setting via VERBOSE!:=, removes warning and my spurious "recursive macro definition" error * solenv/inc/tg_app.mk: one extra ls silenced for app target (and quiet mode, that goes without saying) 2009-09-23 08:57:01 +0200 fs r276366 : use ULFEX_VERBOSITY instead of duplicating the ULFEX call 2009-09-21 11:42:26 +0200 fs r276320 : ignore output paths 2009-09-21 11:04:27 +0200 fs r276318 : silence another compiler warning, which only hits us when actually using this (debug) file, which is the case only when slideshow is compiled with a env variable VERBOSE, thus came up in CWS buildverbosity 2009-09-21 10:30:14 +0200 fs r276313 : make some output depend on VERBOSE==TRUE, not COMMAND_ECHO="" While both are equivalent at the moment, COMMAND_ECHO finally is an implementation default of the VERBOSE flag only, so better rely on VERBOSE as the primary verbosity flag 2009-09-21 09:56:57 +0200 fs r276311 : forgot to re-generate from tg_zip before committing 2009-09-21 09:52:11 +0200 fs r276310 : #i84497# even less verbosity 2009-09-17 11:02:47 +0200 fs r276232 : #i84497# verbose implies VERBOSE nowadays, and VERBOSE==FALSE should not lead to -DVERBOSE 2009-09-15 22:59:37 +0200 fs r276189 : #i105022# copy fix for this P1 into this CWS 2009-09-15 11:56:35 +0200 fs r276165 : CWS-TOOLING: rebase CWS buildverbosity to trunk@276043 (milestone: DEV300:m58) 2009-09-14 17:45:10 +0200 fs r276137 : #i84497# don't duplicate zip lines w/ and w/o -q switch, use a variable instead (maintenance) 2009-09-14 15:01:33 +0200 fs r276124 : #i10000# 2009-09-11 23:58:46 +0200 thb r276083 : #i84497#: More quiet-build fine tuning - silenced rsc for real (properly filtering options for cpp, and a pretty brutal amputation of the tool blurp, which would have needed cmd opt parser duplication) - silenced deliver.pl - silenced checkdll.sh - silenced zip via -q (in quiet mode) - silenced various idl, resource, transex whatever tool, passing appropriate options down to them '-QQ' sometimes - silenced dmake, pointless blurb that something does *not* need update removed - silenced the old starview idl compiler, to not output tool's name & progress chars in quiet mode 2009-09-11 21:13:59 +0200 thb r276081 : #i84497#: More bits on the quiet mode of the build. The bulk of the changes is disabling those annoying "echo ------------------" lines for the quiet build, which has the stretch goal of outputting *exactly* one line per file compiled/linked/processed. Apart from that, silenced a few especialy annoying module-specific makefiles (basically adding $(COMMAND_ECHO) in front of a gazillion rules). Additionally, slightly tweaked what idlc regards verbose, normal, and quiet mode; this was to have it echo exactly one line per idl file processed (the fact that quiet mode did not echo *anything* for idl files was a bit too much for my taste) 2009-09-04 09:14:35 +0200 fs r275777 : don't emit the link parameters if VERBOSE!=TRUE 2009-09-02 10:31:15 +0200 fs r275700 : #i10000# 2009-09-02 08:44:14 +0200 fs r275697 : update svn:ignore to ignore the output paths 2009-09-02 08:40:54 +0200 fs r275695 : #i84497# less verbose output during build, unless a dedicated '-verbose' switch is given 2009-09-02 08:40:28 +0200 fs r275694 : GRAPHITE is missing in the BUILD_TYPE 2009-09-02 08:40:05 +0200 fs r275693 : #i84497# less verbose output during build, unless a dedicated '-verbose' switch is given 2009-09-02 08:39:25 +0200 fs r275692 : #i84497# less verbose output during build, unless a dedicated '-verbose' switch is given 2009-09-02 08:39:02 +0200 fs r275691 : #i84497# less verbose output during build, unless a dedicated '-verbose' switch is given 2009-09-02 08:38:09 +0200 fs r275690 : #i84497# less verbose output during build 2009-09-02 08:37:06 +0200 fs r275689 : #i84497# don't emit that much noise, unless a '-verbose' switch is given --- vcl/source/window/makefile.mk | 6 +++--- vcl/unx/source/gdi/makefile.mk | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'vcl') diff --git a/vcl/source/window/makefile.mk b/vcl/source/window/makefile.mk index cdd4aef73bb0..169cf44b2b13 100644 --- a/vcl/source/window/makefile.mk +++ b/vcl/source/window/makefile.mk @@ -96,10 +96,10 @@ SLOFILES= \ $(INCCOM)$/cuilib.hxx: makefile.mk .IF "$(GUI)"=="UNX" - $(RM) $@ - echo \#define DLL_NAME \"libcui$(DLLPOSTFIX)$(DLLPOST)\" >$@ + @$(RM) $@ + @echo \#define DLL_NAME \"libcui$(DLLPOSTFIX)$(DLLPOST)\" >$@ .ELSE - echo $(EMQ)#define DLL_NAME $(EMQ)"cui$(DLLPOSTFIX)$(DLLPOST)$(EMQ)" >$@ + @echo $(EMQ)#define DLL_NAME $(EMQ)"cui$(DLLPOSTFIX)$(DLLPOST)$(EMQ)" >$@ .ENDIF $(SLO)$/abstdlg.obj : $(INCCOM)$/cuilib.hxx diff --git a/vcl/unx/source/gdi/makefile.mk b/vcl/unx/source/gdi/makefile.mk index bdd400baa8ad..fb513a66a841 100644 --- a/vcl/unx/source/gdi/makefile.mk +++ b/vcl/unx/source/gdi/makefile.mk @@ -107,8 +107,8 @@ ALLTAR : $(MACOSXRC) XSALSETLIBNAME=$(DLLPRE)spa$(DLLPOSTFIX)$(DLLPOST) $(INCCOM)$/rtsname.hxx: - rm -f $(INCCOM)$/rtsname.hxx ; \ - echo "#define _XSALSET_LIBNAME "\"$(XSALSETLIBNAME)\" > $(INCCOM)$/rtsname.hxx + @rm -f $(INCCOM)$/rtsname.hxx ; \ + echo "#define _XSALSET_LIBNAME "\"$(XSALSETLIBNAME)\" > $(INCCOM)$/rtsname.hxx $(SLO)$/salpimpl.obj : $(INCCOM)$/rtsname.hxx $(SLO)$/salprnpsp.obj : $(INCCOM)$/rtsname.hxx -- cgit From 29dd8bbd9e39cde1a5e0e7e7cca02f894559e6c0 Mon Sep 17 00:00:00 2001 From: Vladimir Glazounov Date: Wed, 21 Oct 2009 14:48:59 +0000 Subject: CWS-TOOLING: integrate CWS fwk123 2009-10-14 10:18:49 +0200 cd r276885 : #i99971# Use AttachThreadInput to force SetForegroundWindow 2009-10-14 08:56:20 +0200 mav r276881 : #i105476# let the allocated memory live long anough 2009-10-14 08:53:51 +0200 mav r276880 : #i105476# let ZipFile use mutex while creating the requested stream 2009-10-14 08:51:52 +0200 mav r276879 : #i105476# let buffered IO use mutex ( patch from MHU ) 2009-10-09 12:20:22 +0200 cd r276803 : #i99971# Use configuration to control window to front/focus handling 2009-10-09 12:19:22 +0200 cd r276802 : #i99971# New configuration item to force set focus and window to front for new document windows 2009-10-09 12:18:23 +0200 cd r276801 : #i99971# Introduction of a new show flag to force window to front 2009-10-06 11:04:16 +0200 ab r276695 : #i105386# Call xmlInitParser() before registering input callbacks --- vcl/inc/vcl/window.hxx | 1 + vcl/source/window/window.cxx | 2 +- vcl/win/source/window/salframe.cxx | 12 +++++++++++- 3 files changed, 13 insertions(+), 2 deletions(-) (limited to 'vcl') diff --git a/vcl/inc/vcl/window.hxx b/vcl/inc/vcl/window.hxx index 3f05383d4f80..eba46362d94e 100644 --- a/vcl/inc/vcl/window.hxx +++ b/vcl/inc/vcl/window.hxx @@ -165,6 +165,7 @@ namespace vcl { struct ControlLayoutData; } #define SHOW_NOPARENTUPDATE ((USHORT)0x0001) #define SHOW_NOFOCUSCHANGE ((USHORT)0x0002) #define SHOW_NOACTIVATE ((USHORT)0x0004) +#define SHOW_FOREGROUNDTASK ((USHORT)0x0008) // Flags for SetZOrder() #define WINDOW_ZORDER_BEFOR ((USHORT)0x0001) diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 6aff4779d8b2..63bf407ce49f 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -6514,7 +6514,7 @@ void Window::Show( BOOL bVisible, USHORT nFlags ) // nach vorne, wenn es gewuenscht ist if ( ImplIsOverlapWindow() && !(nFlags & SHOW_NOACTIVATE) ) { - ImplStartToTop( 0 ); + ImplStartToTop(( nFlags & SHOW_FOREGROUNDTASK ) ? TOTOP_FOREGROUNDTASK : 0 ); ImplFocusToTop( 0, FALSE ); } diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx index 4a49d83918da..78c4e4e6ddcc 100644 --- a/vcl/win/source/window/salframe.cxx +++ b/vcl/win/source/window/salframe.cxx @@ -2157,7 +2157,17 @@ static void ImplSalToTop( HWND hWnd, USHORT nFlags ) BringWindowToTop( hWnd ); if ( nFlags & SAL_FRAME_TOTOP_FOREGROUNDTASK ) - SetForegroundWindow( hWnd ); + { + // This magic code is necessary to connect the input focus of the + // current window thread and the thread which owns the window that + // should be the new foreground window. + HWND hCurrWnd = GetForegroundWindow(); + DWORD myThreadID = GetCurrentThreadId(); + DWORD currThreadID = GetWindowThreadProcessId(hCurrWnd,NULL); + AttachThreadInput(myThreadID, currThreadID,TRUE); + SetForegroundWindow(hWnd); + AttachThreadInput(myThreadID,currThreadID,FALSE); + } if ( nFlags & SAL_FRAME_TOTOP_RESTOREWHENMIN ) { -- cgit