diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2008-01-28 13:03:10 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2008-01-28 13:03:10 +0000 |
commit | a28d13d209d5b32e0abd37199d9b0f24d927bd66 (patch) | |
tree | 6afc625570bf6417acb6a934484a82bd38752fd6 /vcl/source | |
parent | 3d3afca03aa65383c96ebf52773948a1de9fc6e9 (diff) |
INTEGRATION: CWS ab42 (1.267.10); FILE MERGED
2008/01/09 15:30:30 ab 1.267.10.1: #i83633# Added support for String help Ids in Window::GetHelpText()
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/window/window.cxx | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 1522792346f2..c7d44a5fbd57 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -4,9 +4,9 @@ * * $RCSfile: window.cxx,v $ * - * $Revision: 1.271 $ + * $Revision: 1.272 $ * - * last change: $Author: ihi $ $Date: 2008-01-14 16:23:26 $ + * last change: $Author: vg $ $Date: 2008-01-28 14:03:10 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -8051,13 +8051,28 @@ const XubString& Window::GetHelpText() const { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); - if ( !mpWindowImpl->maHelpText.Len() && mpWindowImpl->mnHelpId ) + SmartId aSmartId = GetSmartHelpId(); + + ULONG nNumHelpId = 0; + String aStrHelpId; + if( aSmartId.HasString() ) + aStrHelpId = aSmartId.GetStr(); + if( aSmartId.HasNumeric() ) + nNumHelpId = aSmartId.GetNum(); + bool bStrHelpId = (aStrHelpId.Len() > 0); + + if ( !mpWindowImpl->maHelpText.Len() && (nNumHelpId || bStrHelpId) ) { if ( !IsDialog() && (mpWindowImpl->mnType != WINDOW_TABPAGE) && (mpWindowImpl->mnType != WINDOW_FLOATINGWINDOW) ) { Help* pHelp = Application::GetHelp(); if ( pHelp ) - ((Window*)this)->mpWindowImpl->maHelpText = pHelp->GetHelpText( GetHelpId(), this ); + { + if( bStrHelpId ) + ((Window*)this)->mpWindowImpl->maHelpText = pHelp->GetHelpText( aStrHelpId, this ); + else + ((Window*)this)->mpWindowImpl->maHelpText = pHelp->GetHelpText( nNumHelpId, this ); + } } } |