summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rsc/inc/vclrsc.hxx6
-rw-r--r--rsc/source/parser/rscicpx.cxx10
-rw-r--r--rsc/source/parser/rscinit.cxx2
-rw-r--r--svtools/inc/fileview.hxx4
-rw-r--r--svtools/inc/svtools/headbar.hxx8
-rw-r--r--svtools/inc/svtools/roadmapwizard.hxx4
-rw-r--r--svtools/inc/tabbar.hxx10
-rw-r--r--svtools/inc/taskbar.hxx6
-rw-r--r--svtools/source/contnr/fileview.cxx6
-rw-r--r--svtools/source/contnr/templwin.cxx6
-rw-r--r--svtools/source/control/headbar.cxx26
-rw-r--r--svtools/source/control/inettbc.cxx3
-rw-r--r--svtools/source/control/tabbar.cxx25
-rw-r--r--svtools/source/control/taskstat.cxx6
-rw-r--r--svtools/source/dialogs/addresstemplate.cxx3
-rw-r--r--svtools/source/dialogs/filedlg2.cxx75
-rw-r--r--svtools/source/dialogs/roadmapwizard.cxx8
-rw-r--r--svtools/source/dialogs/wizardmachine.cxx6
-rw-r--r--svtools/source/misc/helpagentwindow.cxx3
-rw-r--r--toolkit/inc/layout/layout.hxx21
-rw-r--r--toolkit/source/awt/vclxdialog.cxx3
-rw-r--r--toolkit/source/awt/vclxwindow.cxx27
-rw-r--r--toolkit/source/layout/vcl/wrapper.cxx44
-rw-r--r--tools/inc/tools/rc.h1
-rw-r--r--tools/inc/tools/rc.hxx3
-rw-r--r--tools/inc/tools/resmgr.hxx9
-rw-r--r--tools/source/rc/resmgr.cxx159
-rw-r--r--vcl/inc/vcl/btndlg.hxx4
-rw-r--r--vcl/inc/vcl/help.hxx8
-rw-r--r--vcl/inc/vcl/menu.hxx4
-rwxr-xr-xvcl/inc/vcl/smartid.hxx87
-rw-r--r--vcl/inc/vcl/status.hxx10
-rw-r--r--vcl/inc/vcl/tabctrl.hxx11
-rw-r--r--vcl/inc/vcl/toolbox.h2
-rw-r--r--vcl/inc/vcl/toolbox.hxx10
-rw-r--r--vcl/inc/vcl/window.h7
-rw-r--r--vcl/inc/vcl/window.hxx15
-rw-r--r--vcl/prj/d.lst1
-rw-r--r--vcl/source/app/help.cxx14
-rw-r--r--vcl/source/control/tabctrl.cxx47
-rw-r--r--vcl/source/helper/makefile.mk1
-rwxr-xr-xvcl/source/helper/smartid.cxx264
-rw-r--r--vcl/source/window/btndlg.cxx11
-rw-r--r--vcl/source/window/menu.cxx41
-rw-r--r--vcl/source/window/msgbox.cxx5
-rw-r--r--vcl/source/window/printdlg.cxx24
-rw-r--r--vcl/source/window/status.cxx29
-rw-r--r--vcl/source/window/toolbox.cxx14
-rw-r--r--vcl/source/window/toolbox2.cxx24
-rw-r--r--vcl/source/window/window.cxx84
-rw-r--r--vcl/source/window/window2.cxx104
51 files changed, 404 insertions, 901 deletions
diff --git a/rsc/inc/vclrsc.hxx b/rsc/inc/vclrsc.hxx
index 19677171dcb2..d4084f2bc239 100644
--- a/rsc/inc/vclrsc.hxx
+++ b/rsc/inc/vclrsc.hxx
@@ -162,9 +162,11 @@ typedef sal_Int64 WinBits;
// - Help-Types -
// --------------
+#if 0
// from vcl/inc/help.hxx
-#define OOO_HELP_INDEX ((ULONG)0xFFFFFFFF)
-#define OOO_HELP_HELPONHELP ((ULONG)0xFFFFFFFE)
+#define OOO_HELP_INDEX ".help:index"
+#define OOO_HELP_HELPONHELP ".help:helponhelp"
+#endif
// --------------
// - FieldTypes -
diff --git a/rsc/source/parser/rscicpx.cxx b/rsc/source/parser/rscicpx.cxx
index 625417769f45..2d0f9a4edbeb 100644
--- a/rsc/source/parser/rscicpx.cxx
+++ b/rsc/source/parser/rscicpx.cxx
@@ -297,7 +297,7 @@ RscTop * RscTypCont::InitClassWindow( RscTop * pSuper, RscEnum * pMapUnit,
InsWinBit( pClassWindow, "DialogControl", nTabControlId );
nId = aNmTb.Put( "HelpID", VARNAME );
- pClassWindow->SetVariable( nId, &aIdLong );
+ pClassWindow->SetVariable( nId, &aString, NULL, 0, WINDOW_HELPID );
nRsc_XYMAPMODEId = nId = aNmTb.Put( "_XYMapMode", VARNAME );
@@ -325,7 +325,7 @@ RscTop * RscTypCont::InitClassWindow( RscTop * pSuper, RscEnum * pMapUnit,
nId = aNmTb.Put( "ExtraLong", VARNAME );
pClassWindow->SetVariable( nId, &aLong, NULL, 0, WINDOW_EXTRALONG );
nId = aNmTb.Put( "UniqueId", VARNAME );
- pClassWindow->SetVariable( nId, &aLong, NULL, 0, WINDOW_UNIQUEID );
+ pClassWindow->SetVariable( nId, &aString, NULL, 0, WINDOW_UNIQUEID );
// BorderStyle
RscEnum* pBorderStyleEnum = new RscEnum( pHS->getID( "WindowBorderStyle" ), RSC_NOTYPE );
@@ -1201,7 +1201,7 @@ RscTop * RscTypCont::InitClassMenuItem( RscTop * pSuper,
pClassMenuItem->SetVariable( nId, &aLangString, NULL, 0,
RSC_MENUITEM_HELPTEXT );
nId = aNmTb.Put( "HelpID", VARNAME );
- pClassMenuItem->SetVariable( nId, &aIdLong, NULL, 0,
+ pClassMenuItem->SetVariable( nId, &aString, NULL, 0,
RSC_MENUITEM_HELPID );
nId = aNmTb.Put( "AccelKey", VARNAME );
pClassMenuItem->SetVariable( nId, pClassKeyCode, NULL, 0,
@@ -1276,7 +1276,7 @@ RscTop * RscTypCont::InitClassMessBox( RscTop * pSuper,
nId = aNmTb.Put( "DefButton", VARNAME );
pClassMessBox->SetVariable( nId, pMessDefButton );
nId = aNmTb.Put( "HelpID", VARNAME );
- pClassMessBox->SetVariable( nId, &aIdLong );
+ pClassMessBox->SetVariable( nId, &aString );
nId = aNmTb.Put( "SysModal", VARNAME );
pClassMessBox->SetVariable( nId, &aBool );
nId = aNmTb.Put( "Title", VARNAME );
@@ -2015,7 +2015,7 @@ RscTop * RscTypCont::InitClassToolBoxItem( RscTop * pSuper,
pClassToolBoxItem->SetVariable( nId, pClient, NULL, VAR_NODATAINST, 0, l_nVarId );
}
nId = aNmTb.Put( "HelpID", VARNAME );
- pClassToolBoxItem->SetVariable( nId, &aIdLong, NULL, 0,
+ pClassToolBoxItem->SetVariable( nId, &aString, NULL, 0,
RSC_TOOLBOXITEM_HELPID );
nId = aNmTb.Put( "Text", VARNAME );
pClassToolBoxItem->SetVariable( nId, &aLangString, NULL, 0,
diff --git a/rsc/source/parser/rscinit.cxx b/rsc/source/parser/rscinit.cxx
index a763b92f0bb1..54a56a3840d2 100644
--- a/rsc/source/parser/rscinit.cxx
+++ b/rsc/source/parser/rscinit.cxx
@@ -210,9 +210,11 @@ void RscTypCont::Init()
aNmTb.Put( "TRUE", BOOLEAN, (long)TRUE );
aNmTb.Put( "FALSE", BOOLEAN, (long)FALSE );
+ #if 0
/* Vordefinierte HilfeId's */
aNmTb.Put( "HELP_INDEX", NUMBER, OOO_HELP_INDEX );
aNmTb.Put( "HELP_HELPONHELP", NUMBER, OOO_HELP_HELPONHELP );
+ #endif
aNmTb.Put( "XSCALE", XSCALE , (long)0 );
aNmTb.Put( "YSCALE", YSCALE , (long)0 );
diff --git a/svtools/inc/fileview.hxx b/svtools/inc/fileview.hxx
index 74476541dcd8..db704a0e6784 100644
--- a/svtools/inc/fileview.hxx
+++ b/svtools/inc/fileview.hxx
@@ -104,8 +104,8 @@ public:
sal_Bool GetParentURL( String& _rParentURL ) const;
sal_Bool CreateNewFolder( const String& rNewFolder );
- void SetHelpId( sal_uInt32 nHelpId );
- sal_uInt32 GetHelpId( ) const;
+ void SetHelpId( const rtl::OString& rHelpId );
+ const rtl::OString& GetHelpId( ) const;
void SetSizePixel( const Size& rNewSize );
using Window::SetPosSizePixel;
virtual void SetPosSizePixel( const Point& rNewPos, const Size& rNewSize );
diff --git a/svtools/inc/svtools/headbar.hxx b/svtools/inc/svtools/headbar.hxx
index 1ef7687cfb1d..c225a95d1f55 100644
--- a/svtools/inc/svtools/headbar.hxx
+++ b/svtools/inc/svtools/headbar.hxx
@@ -360,15 +360,15 @@ public:
void SetHelpText( USHORT nItemId, const XubString& rText );
XubString GetHelpText( USHORT nItemId ) const;
- void SetHelpId( USHORT nItemId, ULONG nHelpId );
- ULONG GetHelpId( USHORT nItemId ) const;
+ void SetHelpId( USHORT nItemId, const rtl::OString& nHelpId );
+ rtl::OString GetHelpId( USHORT nItemId ) const;
Size CalcWindowSizePixel() const;
inline void SetHelpText( const String& rText ) { Window::SetHelpText( rText ); }
inline const String& GetHelpText() const { return Window::GetHelpText(); }
- inline void SetHelpId( ULONG nId ) { Window::SetHelpId( nId ); }
- inline ULONG GetHelpId() const { return Window::GetHelpId(); }
+ inline void SetHelpId( const rtl::OString& rId ) { Window::SetHelpId( rId ); }
+ inline const rtl::OString& GetHelpId() const { return Window::GetHelpId(); }
inline void SetStartDragHdl( const Link& rLink ) { maStartDragHdl = rLink; }
inline const Link& GetStartDragHdl() const { return maStartDragHdl; }
diff --git a/svtools/inc/svtools/roadmapwizard.hxx b/svtools/inc/svtools/roadmapwizard.hxx
index 49a0f441c49c..957620a645c7 100644
--- a/svtools/inc/svtools/roadmapwizard.hxx
+++ b/svtools/inc/svtools/roadmapwizard.hxx
@@ -85,8 +85,8 @@ namespace svt
void SetRoadmapBitmap( const BitmapEx& _rBitmap );
const BitmapEx& GetRoadmapBitmap( ) const;
- void SetRoadmapSmartHelpId( const SmartId& _rId, SmartIdUpdateMode _aMode = SMART_SET_SMART );
- SmartId GetRoadmapSmartHelpId() const;
+ void SetRoadmapHelpId( const rtl::OString& _rId );
+ const rtl::OString& GetRoadmapHelpId() const;
void SetRoadmapInteractive( sal_Bool _bInteractive );
sal_Bool IsRoadmapInteractive();
diff --git a/svtools/inc/tabbar.hxx b/svtools/inc/tabbar.hxx
index cf89d4426726..5816499d1b87 100644
--- a/svtools/inc/tabbar.hxx
+++ b/svtools/inc/tabbar.hxx
@@ -511,8 +511,8 @@ public:
XubString GetPageText( USHORT nPageId ) const;
void SetHelpText( USHORT nPageId, const XubString& rText );
XubString GetHelpText( USHORT nPageId ) const;
- void SetHelpId( USHORT nPageId, ULONG nHelpId );
- ULONG GetHelpId( USHORT nPageId ) const;
+ void SetHelpId( USHORT nPageId, const rtl::OString& nHelpId );
+ rtl::OString GetHelpId( USHORT nPageId ) const;
long GetSplitSize() const { return mnSplitSize; }
long GetMinSize() const;
@@ -521,9 +521,9 @@ public:
{ Window::SetHelpText( rText ); }
XubString GetHelpText() const
{ return Window::GetHelpText(); };
- void SetHelpId( ULONG nId )
- { Window::SetHelpId( nId ); }
- ULONG GetHelpId() const
+ void SetHelpId( const rtl::OString& rId )
+ { Window::SetHelpId( rId ); }
+ const rtl::OString& GetHelpId() const
{ return Window::GetHelpId(); }
void SetStyle( WinBits nStyle );
diff --git a/svtools/inc/taskbar.hxx b/svtools/inc/taskbar.hxx
index 46853fa07c03..d4a6699e2d5e 100644
--- a/svtools/inc/taskbar.hxx
+++ b/svtools/inc/taskbar.hxx
@@ -268,7 +268,7 @@ private:
Image maImage;
XubString maQuickHelpText;
XubString maHelpText;
- ULONG mnHelpId;
+ rtl::OString maHelpId;
USHORT mnFlags;
public:
@@ -289,8 +289,8 @@ public:
const XubString& GetQuickHelpText() const { return maQuickHelpText; }
void SetHelpText( const XubString& rStr ) { maHelpText = rStr; }
const XubString& GetHelpText() const { return maHelpText; }
- void SetHelpId( ULONG nHelpId ) { mnHelpId = nHelpId; }
- ULONG GetHelpId() const { return mnHelpId; }
+ void SetHelpId( const rtl::OString& rHelpId ) { maHelpId = rHelpId; }
+ const rtl::OString& GetHelpId() const { return maHelpId; }
void SetFlags( USHORT nFlags ) { mnFlags = nFlags; }
USHORT GetFlags() const { return mnFlags; }
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx
index 8538e344bdc1..9c6474283279 100644
--- a/svtools/source/contnr/fileview.cxx
+++ b/svtools/source/contnr/fileview.cxx
@@ -1324,16 +1324,16 @@ sal_Bool SvtFileView::GetParentURL( String& rParentURL ) const
// -----------------------------------------------------------------------
-sal_uInt32 SvtFileView::GetHelpId( ) const
+const rtl::OString& SvtFileView::GetHelpId( ) const
{
return mpImp->mpView->GetHelpId( );
}
// -----------------------------------------------------------------------
-void SvtFileView::SetHelpId( sal_uInt32 nHelpId )
+void SvtFileView::SetHelpId( const rtl::OString& rHelpId )
{
- mpImp->mpView->SetHelpId( nHelpId );
+ mpImp->mpView->SetHelpId( rHelpId );
}
// -----------------------------------------------------------------------
diff --git a/svtools/source/contnr/templwin.cxx b/svtools/source/contnr/templwin.cxx
index 47b5ab9aa4b9..578150967727 100644
--- a/svtools/source/contnr/templwin.cxx
+++ b/svtools/source/contnr/templwin.cxx
@@ -346,7 +346,8 @@ SvtIconWindow_Impl::SvtIconWindow_Impl( Window* pParent ) :
aDummyHeaderBar.Show();
aIconCtrl.SetAccessibleName( String( RTL_CONSTASCII_USTRINGPARAM("Groups") ) );
- aIconCtrl.SetHelpId( HID_TEMPLATEDLG_ICONCTRL );
+ // FIMXE: HELPID
+ aIconCtrl.SetHelpId( "" /*HID_TEMPLATEDLG_ICONCTRL*/ );
aIconCtrl.SetChoiceWithCursor( TRUE );
aIconCtrl.SetSelectionMode( SINGLE_SELECTION );
aIconCtrl.Show();
@@ -609,7 +610,8 @@ SvtFileViewWindow_Impl::SvtFileViewWindow_Impl( SvtTemplateWindow* pParent ) :
{
aFileView.SetStyle( aFileView.GetStyle() | WB_DIALOGCONTROL | WB_TABSTOP );
- aFileView.SetHelpId( HID_TEMPLATEDLG_FILEVIEW );
+ // FIXME: HELPID
+ aFileView.SetHelpId( "" /*HID_TEMPLATEDLG_FILEVIEW*/ );
aFileView.Show();
aFileView.SetPosPixel( Point( 0, 0 ) );
aFileView.EnableAutoResize();
diff --git a/svtools/source/control/headbar.cxx b/svtools/source/control/headbar.cxx
index 1ae223bebf06..7b1f2ad87108 100644
--- a/svtools/source/control/headbar.cxx
+++ b/svtools/source/control/headbar.cxx
@@ -53,7 +53,7 @@ struct ImplHeadItem
USHORT mnId;
HeaderBarItemBits mnBits;
long mnSize;
- ULONG mnHelpId;
+ rtl::OString maHelpId;
Image maImage;
XubString maOutText;
XubString maText;
@@ -1132,13 +1132,13 @@ void HeaderBar::RequestHelp( const HelpEvent& rHEvt )
}
else if ( rHEvt.GetMode() & HELPMODE_EXTENDED )
{
- ULONG nHelpId = GetHelpId( nItemId );
- if ( nHelpId )
+ rtl::OUString aHelpId( rtl::OStringToOUString( GetHelpId( nItemId ), RTL_TEXTENCODING_UTF8 ) );
+ if ( aHelpId.getLength() )
{
// Wenn eine Hilfe existiert, dann ausloesen
Help* pHelp = Application::GetHelp();
if ( pHelp )
- pHelp->Start( nHelpId, this );
+ pHelp->Start( aHelpId, this );
return;
}
}
@@ -1266,7 +1266,6 @@ void HeaderBar::InsertItem( USHORT nItemId, const XubString& rText,
pItem->mnId = nItemId;
pItem->mnBits = nBits;
pItem->mnSize = nSize;
- pItem->mnHelpId = 0;
pItem->maText = rText;
pItem->mpUserData = 0;
mpItemList->Insert( pItem, nPos );
@@ -1291,7 +1290,6 @@ void HeaderBar::InsertItem( USHORT nItemId,
pItem->mnId = nItemId;
pItem->mnBits = nBits;
pItem->mnSize = nSize;
- pItem->mnHelpId = 0;
pItem->maImage = rImage;
pItem->maText = rText;
pItem->mpUserData = 0;
@@ -1563,11 +1561,11 @@ XubString HeaderBar::GetHelpText( USHORT nItemId ) const
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
{
ImplHeadItem* pItem = mpItemList->GetObject( nPos );
- if ( !pItem->maHelpText.Len() && pItem->mnHelpId )
+ if ( !pItem->maHelpText.Len() && pItem->maHelpId.getLength() )
{
Help* pHelp = Application::GetHelp();
if ( pHelp )
- pItem->maHelpText = pHelp->GetHelpText( pItem->mnHelpId, this );
+ pItem->maHelpText = pHelp->GetHelpText( rtl::OStringToOUString( pItem->maHelpId, RTL_TEXTENCODING_UTF8 ), this );
}
return pItem->maHelpText;
@@ -1578,22 +1576,22 @@ XubString HeaderBar::GetHelpText( USHORT nItemId ) const
// -----------------------------------------------------------------------
-void HeaderBar::SetHelpId( USHORT nItemId, ULONG nHelpId )
+void HeaderBar::SetHelpId( USHORT nItemId, const rtl::OString& rHelpId )
{
USHORT nPos = GetItemPos( nItemId );
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
- mpItemList->GetObject( nPos )->mnHelpId = nHelpId;
+ mpItemList->GetObject( nPos )->maHelpId = rHelpId;
}
// -----------------------------------------------------------------------
-ULONG HeaderBar::GetHelpId( USHORT nItemId ) const
+rtl::OString HeaderBar::GetHelpId( USHORT nItemId ) const
{
USHORT nPos = GetItemPos( nItemId );
+ rtl::OString aRet;
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
- return mpItemList->GetObject( nPos )->mnHelpId;
- else
- return 0;
+ aRet = mpItemList->GetObject( nPos )->maHelpId;
+ return aRet;
}
// -----------------------------------------------------------------------
diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx
index 02a578629039..85325911114f 100644
--- a/svtools/source/control/inettbc.cxx
+++ b/svtools/source/control/inettbc.cxx
@@ -858,7 +858,8 @@ SvtURLBox::SvtURLBox( Window* pParent, const ResId& _rResId, INetProtocol eSmart
void SvtURLBox::ImplInit()
{
pImp = new SvtURLBox_Impl();
- SetHelpId( SID_OPENURL );
+ // FIXME: HELPID
+ SetHelpId( ""/*SID_OPENURL*/ );
EnableAutocomplete( FALSE );
SetText( String() );
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx
index c4896ba8b812..f49ae2e432a6 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -58,7 +58,7 @@ struct ImplTabBarItem
XubString maHelpText;
Rectangle maRect;
long mnWidth;
- ULONG mnHelpId;
+ rtl::OString maHelpId;
BOOL mbShort;
BOOL mbSelect;
BOOL mbEnable;
@@ -70,7 +70,6 @@ struct ImplTabBarItem
mnId = nItemId;
mnBits = nPageBits;
mnWidth = 0;
- mnHelpId = 0;
mbShort = FALSE;
mbSelect = FALSE;
mbEnable = TRUE;
@@ -1338,13 +1337,13 @@ void TabBar::RequestHelp( const HelpEvent& rHEvt )
}
else if ( rHEvt.GetMode() & HELPMODE_EXTENDED )
{
- ULONG nHelpId = GetHelpId( nItemId );
- if ( nHelpId )
+ rtl::OUString aHelpId( rtl::OStringToOUString( GetHelpId( nItemId ), RTL_TEXTENCODING_UTF8 ) );
+ if ( aHelpId.getLength() )
{
// Wenn eine Hilfe existiert, dann ausloesen
Help* pHelp = Application::GetHelp();
if ( pHelp )
- pHelp->Start( nHelpId, this );
+ pHelp->Start( aHelpId, this );
return;
}
}
@@ -2309,11 +2308,11 @@ XubString TabBar::GetHelpText( USHORT nPageId ) const
if ( nPos != TABBAR_PAGE_NOTFOUND )
{
ImplTabBarItem* pItem = mpItemList->GetObject( nPos );
- if ( !pItem->maHelpText.Len() && pItem->mnHelpId )
+ if ( !pItem->maHelpText.Len() && pItem->maHelpId.getLength() )
{
Help* pHelp = Application::GetHelp();
if ( pHelp )
- pItem->maHelpText = pHelp->GetHelpText( pItem->mnHelpId, this );
+ pItem->maHelpText = pHelp->GetHelpText( rtl::OStringToOUString( pItem->maHelpId, RTL_TEXTENCODING_UTF8 ), this );
}
return pItem->maHelpText;
@@ -2324,22 +2323,22 @@ XubString TabBar::GetHelpText( USHORT nPageId ) const
// -----------------------------------------------------------------------
-void TabBar::SetHelpId( USHORT nPageId, ULONG nHelpId )
+void TabBar::SetHelpId( USHORT nPageId, const rtl::OString& rHelpId )
{
USHORT nPos = GetPagePos( nPageId );
if ( nPos != TABBAR_PAGE_NOTFOUND )
- mpItemList->GetObject( nPos )->mnHelpId = nHelpId;
+ mpItemList->GetObject( nPos )->maHelpId = rHelpId;
}
// -----------------------------------------------------------------------
-ULONG TabBar::GetHelpId( USHORT nPageId ) const
+rtl::OString TabBar::GetHelpId( USHORT nPageId ) const
{
USHORT nPos = GetPagePos( nPageId );
+ rtl::OString aRet;
if ( nPos != TABBAR_PAGE_NOTFOUND )
- return mpItemList->GetObject( nPos )->mnHelpId;
- else
- return 0;
+ aRet = mpItemList->GetObject( nPos )->maHelpId;
+ return aRet;
}
// -----------------------------------------------------------------------
diff --git a/svtools/source/control/taskstat.cxx b/svtools/source/control/taskstat.cxx
index 2fdab63be37f..ba5e8d53b8b2 100644
--- a/svtools/source/control/taskstat.cxx
+++ b/svtools/source/control/taskstat.cxx
@@ -517,13 +517,13 @@ void TaskStatusBar::RequestHelp( const HelpEvent& rHEvt )
{
if ( pItem )
{
- ULONG nHelpId = pItem->maItem.GetHelpId();
- if ( nHelpId )
+ rtl::OUString aHelpId( rtl::OStringToOUString( pItem->maItem.GetHelpId(), RTL_TEXTENCODING_UTF8 ) );
+ if ( aHelpId.getLength() )
{
// Wenn eine Hilfe existiert, dann ausloesen
Help* pHelp = Application::GetHelp();
if ( pHelp )
- pHelp->Start( nHelpId, this );
+ pHelp->Start( aHelpId, this );
return;
}
}
diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx
index 2849ddb71d10..82b8cd2c5c04 100644
--- a/svtools/source/dialogs/addresstemplate.cxx
+++ b/svtools/source/dialogs/addresstemplate.cxx
@@ -609,7 +609,8 @@ void AssignmentPersistentData::Commit()
m_pImpl->pFields[row * 2 + column]->SetDropDownLineCount(15);
m_pImpl->pFields[row * 2 + column]->SetSelectHdl(LINK(this, AddressBookSourceDialog, OnFieldSelect));
- m_pImpl->pFields[row * 2 + column]->SetHelpId(HID_ADDRTEMPL_FIELD_ASSIGNMENT);
+ // FIXME: HELPID
+ m_pImpl->pFields[row * 2 + column]->SetHelpId( "" /*HID_ADDRTEMPL_FIELD_ASSIGNMENT*/);
}
}
diff --git a/svtools/source/dialogs/filedlg2.cxx b/svtools/source/dialogs/filedlg2.cxx
index b0e77d658931..1f6af3f36660 100644
--- a/svtools/source/dialogs/filedlg2.cxx
+++ b/svtools/source/dialogs/filedlg2.cxx
@@ -68,9 +68,9 @@ DECLARE_LIST( UniStringList, UniString* )
// #define STD_BTN_WIDTH 90
// #define STD_BTN_HEIGHT 35
-#define INITCONTROL( p, ControlClass, nBits, aPos, aSize, aTitel, nHelpId ) \
+#define INITCONTROL( p, ControlClass, nBits, aPos, aSize, aTitel, rHelpId ) \
p = new ControlClass( GetPathDialog(), WinBits( nBits ) ); \
- p->SetHelpId( nHelpId ); \
+ p->SetHelpId( rHelpId ); \
p->SetPosSizePixel( aPos, aSize ); \
p->SetText( aTitel ); \
p->Show();
@@ -132,7 +132,8 @@ ImpPathDialog::ImpPathDialog( PathDialog* pDlg, RESOURCE_TYPE nType, BOOL bCreat
pNewDirBtn->Enable( bCreateDir );
}
- pDlg->SetHelpId( HID_FILEDLG_PATHDLG );
+ // FIXME: HELPID
+ pDlg->SetHelpId( ""/*HID_FILEDLG_PATHDLG*/ );
lang::Locale aLocale = Application::GetSettings().GetLocale();
xCollator = ::vcl::unohelper::CreateCollator();
@@ -173,29 +174,35 @@ void ImpPathDialog::InitControls()
long nH = 0;
UniString aEmptyStr;
+ // FIXME: HELPID
INITCONTROL( pDirTitel, FixedText, 0,
- aPnt, aFTSiz, UniString( SvtResId( STR_FILEDLG_DIR ) ), HID_FILEDLG_DIR );
+ aPnt, aFTSiz, UniString( SvtResId( STR_FILEDLG_DIR ) ), ""/*HID_FILEDLG_DIR*/ );
aPnt.Y() += aFTSiz.Height() + a3Siz.Height();
- INITCONTROL( pEdit, Edit, WB_BORDER, aPnt, aEDSiz, aPath.GetFull(), HID_FILEDLG_EDIT );
+ // FIXME: HELPID
+ INITCONTROL( pEdit, Edit, WB_BORDER, aPnt, aEDSiz, aPath.GetFull(), ""/*HID_FILEDLG_EDIT*/ );
aPnt.Y() += aEDSiz.Height() + a3Siz.Height();
#ifndef UNX
long nLbH2 = pDlg->LogicToPixel( Size( 0, 60 ), MAP_APPFONT ).Height();
+ // FIXME: HELPID
INITCONTROL( pDirList, KbdListBox, WB_AUTOHSCROLL | WB_BORDER,
- aPnt, Size( aEDSiz.Width(), nLbH1 ), aEmptyStr, HID_FILEDLG_DIRS );
+ aPnt, Size( aEDSiz.Width(), nLbH1 ), aEmptyStr, ""/*HID_FILEDLG_DIRS*/ );
aPnt.Y() += nLbH1 + a6Siz.Height();
+ // FIXME: HELPID
INITCONTROL( pDriveTitle, FixedText, 0,
- aPnt, aFTSiz, UniString( SvtResId( STR_FILEDLG_DRIVES ) ), HID_FILEDLG_DRIVE );
+ aPnt, aFTSiz, UniString( SvtResId( STR_FILEDLG_DRIVES ) ), ""/*HID_FILEDLG_DRIVE*/ );
aPnt.Y() += aFTSiz.Height() + a3Siz.Height();
+ // FIXME: HELPID
INITCONTROL( pDriveList, ListBox, WB_DROPDOWN,
- aPnt, Size( aEDSiz.Width(), nLbH2 ), aEmptyStr, HID_FILEDLG_DRIVES );
+ aPnt, Size( aEDSiz.Width(), nLbH2 ), aEmptyStr, ""/*HID_FILEDLG_DRIVES*/ );
nH = aPnt.Y() + aEDSiz.Height() + a6Siz.Height();
#else
long nNewH = nLbH1 + 3 * a3Siz.Height() +
aFTSiz.Height() + aEDSiz.Height();
+ // FIXME: HELPID
INITCONTROL( pDirList, KbdListBox, WB_AUTOHSCROLL | WB_BORDER,
- aPnt, Size( aEDSiz.Width(), nNewH ), aEmptyStr, HID_FILEDLG_DIRS );
+ aPnt, Size( aEDSiz.Width(), nNewH ), aEmptyStr, ""/*HID_FILEDLG_DIRS*/ );
nH = aPnt.Y() + nNewH + a6Siz.Height();
pDriveTitle = NULL;
pDriveList = NULL;
@@ -226,17 +233,19 @@ void ImpPathDialog::InitControls()
aPnt.X() = 2 * a6Siz.Width() + aEDSiz.Width();
aPnt.Y() = a6Siz.Height();
INITCONTROL( pOkBtn, PushButton, WB_DEFBUTTON,
- aPnt, aBtnSiz, aOkStr, 0 );
+ aPnt, aBtnSiz, aOkStr, "" );
aPnt.Y() += aBtnSiz.Height() + a3Siz.Height();
INITCONTROL( pCancelBtn, CancelButton, 0,
- aPnt, aBtnSiz, aCancelStr, 0 );
+ aPnt, aBtnSiz, aCancelStr, "" );
aPnt.Y() += aBtnSiz.Height() + a3Siz.Height();
+ // FIXME: HELPID
INITCONTROL( pNewDirBtn, PushButton, WB_DEFBUTTON,
- aPnt, aBtnSiz, aNewDirStr, HID_FILEDLG_NEWDIR );
+ aPnt, aBtnSiz, aNewDirStr, ""/*HID_FILEDLG_NEWDIR*/ );
#if defined(UNX) || defined(OS2)
aPnt.Y() += aBtnSiz.Height() + a3Siz.Height();
+ // FIXME: HELPID
INITCONTROL( pHomeBtn, PushButton, WB_DEFBUTTON,
- aPnt, aBtnSiz, aHomeDirStr, HID_FILEDLG_HOME );
+ aPnt, aBtnSiz, aHomeDirStr, ""/*HID_FILEDLG_HOME*/ );
#else
pHomeBtn = NULL;
#endif
@@ -714,7 +723,8 @@ ImpFileDialog::ImpFileDialog( PathDialog* pDlg, WinBits nWinBits, RESOURCE_TYPE
if ( nType == WINDOW_FILEDIALOG )
InitControls();
- pDlg->SetHelpId( HID_FILEDLG_OPENDLG );
+ // FIXME: HELPID
+ pDlg->SetHelpId( ""/*HID_FILEDLG_OPENDLG*/ );
}
@@ -742,36 +752,47 @@ void ImpFileDialog::InitControls()
const int nW = 160;
const int nH = 48; // Um den Dialog in eine akzeptable Form zu bringen
+ // FIXME: HELPID
INITCONTROL( pFileTitel, FixedText, 0,
- Point(10, 12), Size(nW, 18), UniString( SvtResId( STR_FILEDLG_FILE ) ), HID_FILEDLG_FILE );
+ Point(10, 12), Size(nW, 18), UniString( SvtResId( STR_FILEDLG_FILE ) ), ""/*HID_FILEDLG_FILE*/ );
+ // FIXME: HELPID
INITCONTROL( pEdit, Edit, WB_BORDER,
- Point(10, 31), Size(nW, 20), aEmptyStr, HID_FILEDLG_EDIT ); // aMask()
+ Point(10, 31), Size(nW, 20), aEmptyStr, ""/*HID_FILEDLG_EDIT*/ ); // aMask()
+ // FIXME: HELPID
INITCONTROL( pFileList, ListBox, WB_SORT | WB_AUTOHSCROLL | WB_BORDER,
- Point(10, 58), Size(nW, 180-nH), aEmptyStr, HID_FILEDLG_FILES );
+ Point(10, 58), Size(nW, 180-nH), aEmptyStr, ""/*HID_FILEDLG_FILES*/ );
+ // FIXME: HELPID
INITCONTROL( pDirTitel, FixedText, 0,
- Point(nW+20, 12), Size(nW, 18), UniString( SvtResId( STR_FILEDLG_DIR ) ), HID_FILEDLG_DIR );
+ Point(nW+20, 12), Size(nW, 18), UniString( SvtResId( STR_FILEDLG_DIR ) ), ""/*HID_FILEDLG_DIR*/ );
+ // FIXME: HELPID
INITCONTROL( pDirPath, FixedInfo, WB_PATHELLIPSIS,
- Point(nW+20, 33), Size(nW, 20), aPath.GetFull(), HID_FILEDLG_PATH );
+ Point(nW+20, 33), Size(nW, 20), aPath.GetFull(), ""/*HID_FILEDLG_PATH*/ );
+ // FIXME: HELPID
INITCONTROL( pDirList, KbdListBox, WB_AUTOHSCROLL | WB_BORDER,
- Point(nW+20, 58), Size(nW, 180-nH ), aEmptyStr, HID_FILEDLG_DIRS );
+ Point(nW+20, 58), Size(nW, 180-nH ), aEmptyStr, ""/*HID_FILEDLG_DIRS*/ );
+ // FIXME: HELPID
INITCONTROL( pTypeTitel, FixedText, 0,
- Point(10, 246-nH), Size(nW, 18), UniString( SvtResId( STR_FILEDLG_TYPE ) ), HID_FILEDLG_TYPE );
+ Point(10, 246-nH), Size(nW, 18), UniString( SvtResId( STR_FILEDLG_TYPE ) ), ""/*HID_FILEDLG_TYPE*/ );
#ifndef UNX
+ // FIXME: HELPID
INITCONTROL( pTypeList, ListBox, WB_DROPDOWN,
- Point(10, 265-nH ), Size(nW, 100 ), aEmptyStr, HID_FILEDLG_TYPES );
+ Point(10, 265-nH ), Size(nW, 100 ), aEmptyStr, ""/*HID_FILEDLG_TYPES*/ );
+ // FIXME: HELPID
INITCONTROL( pDriveTitle, FixedText, 0,
- Point(nW+20, 246-nH), Size(nW, 18), UniString( SvtResId( STR_FILEDLG_DRIVES ) ), HID_FILEDLG_DRIVE );
+ Point(nW+20, 246-nH), Size(nW, 18), UniString( SvtResId( STR_FILEDLG_DRIVES ) ), ""/*HID_FILEDLG_DRIVE*/ );
+ // FIXME: HELPID
INITCONTROL( pDriveList, ListBox, WB_DROPDOWN,
- Point(nW+20, 265-nH ), Size(nW, 100 ), aEmptyStr, HID_FILEDLG_DRIVES );
+ Point(nW+20, 265-nH ), Size(nW, 100 ), aEmptyStr, ""/*HID_FILEDLG_DRIVES*/ );
pNewDirBtn = NULL;
pHomeBtn = NULL;
#else
+ // FIXME: HELPID
INITCONTROL( pTypeList, ListBox, WB_DROPDOWN,
- Point(10, 265-nH ), Size(2*nW+20, 100 ), aEmptyStr, HID_FILEDLG_TYPES );
+ Point(10, 265-nH ), Size(2*nW+20, 100 ), aEmptyStr, ""/*HID_FILEDLG_TYPES*/ );
pDriveTitle = NULL;
pDriveList = NULL;
@@ -782,10 +803,10 @@ void ImpFileDialog::InitControls()
const long nButtonStartX = 2*nW+20+15;
INITCONTROL( pOkBtn, PushButton, WB_DEFBUTTON,
Point(nButtonStartX, 10), Size(STD_BTN_WIDTH, STD_BTN_HEIGHT),
- Button::GetStandardText( BUTTON_OK ), 0 );
+ Button::GetStandardText( BUTTON_OK ), "" );
INITCONTROL( pCancelBtn, CancelButton, 0,
Point(nButtonStartX, 45 ), Size(STD_BTN_WIDTH, STD_BTN_HEIGHT),
- Button::GetStandardText( BUTTON_CANCEL ), 0 );
+ Button::GetStandardText( BUTTON_CANCEL ), "" );
pLoadBtn = 0;
diff --git a/svtools/source/dialogs/roadmapwizard.cxx b/svtools/source/dialogs/roadmapwizard.cxx
index 2c71e60e8101..4898ed5d5f86 100644
--- a/svtools/source/dialogs/roadmapwizard.cxx
+++ b/svtools/source/dialogs/roadmapwizard.cxx
@@ -225,15 +225,15 @@ namespace svt
}
//--------------------------------------------------------------------
- void RoadmapWizard::SetRoadmapSmartHelpId( const SmartId& _rId, SmartIdUpdateMode _aMode )
+ void RoadmapWizard::SetRoadmapHelpId( const rtl::OString& _rId )
{
- m_pImpl->pRoadmap->SetSmartHelpId( _rId, _aMode );
+ m_pImpl->pRoadmap->SetHelpId( _rId );
}
//--------------------------------------------------------------------
- SmartId RoadmapWizard::GetRoadmapSmartHelpId() const
+ const rtl::OString& RoadmapWizard::GetRoadmapHelpId() const
{
- return m_pImpl->pRoadmap->GetSmartHelpId();
+ return m_pImpl->pRoadmap->GetHelpId();
}
//--------------------------------------------------------------------
diff --git a/svtools/source/dialogs/wizardmachine.cxx b/svtools/source/dialogs/wizardmachine.cxx
index 6a09f85036fd..24c68a9cdb00 100644
--- a/svtools/source/dialogs/wizardmachine.cxx
+++ b/svtools/source/dialogs/wizardmachine.cxx
@@ -177,7 +177,8 @@ namespace svt
if (_nButtonFlags & WZB_PREVIOUS)
{
m_pPrevPage = new PushButton(this, WB_TABSTOP);
- m_pPrevPage->SetSmartHelpId( SmartId(HID_WIZARD_PREVIOUS) );
+ // FIXME: HELPID
+ m_pPrevPage->SetHelpId( "" /*HID_WIZARD_PREVIOUS*/ );
m_pPrevPage->SetSizePixel( LogicToPixel( Size( 50, 14 ), MAP_APPFONT ) );
m_pPrevPage->SetText(String(SvtResId(STR_WIZDLG_PREVIOUS)));
m_pPrevPage->Show();
@@ -194,7 +195,8 @@ namespace svt
if (_nButtonFlags & WZB_NEXT)
{
m_pNextPage = new PushButton(this, WB_TABSTOP);
- m_pNextPage->SetSmartHelpId( SmartId(HID_WIZARD_NEXT) );
+ // FIXME: HELPID
+ m_pNextPage->SetHelpId( "" /*HID_WIZARD_NEXT*/ );
m_pNextPage->SetSizePixel( LogicToPixel( Size( 50, 14 ), MAP_APPFONT ) );
m_pNextPage->SetText(String(SvtResId(STR_WIZDLG_NEXT)));
m_pNextPage->Show();
diff --git a/svtools/source/misc/helpagentwindow.cxx b/svtools/source/misc/helpagentwindow.cxx
index 55800a213a2e..930d3412c632 100644
--- a/svtools/source/misc/helpagentwindow.cxx
+++ b/svtools/source/misc/helpagentwindow.cxx
@@ -109,7 +109,8 @@ namespace svt
AlwaysEnableInput( TRUE, TRUE );
// unique id for the testtool
- SetUniqueId( HID_HELPAGENT_WINDOW );
+ // FIXME: HELPID
+ SetUniqueId( ""/*HID_HELPAGENT_WINDOW*/ );
}
//--------------------------------------------------------------------
diff --git a/toolkit/inc/layout/layout.hxx b/toolkit/inc/layout/layout.hxx
index 78c7ea29272a..5d013e8a74c4 100644
--- a/toolkit/inc/layout/layout.hxx
+++ b/toolkit/inc/layout/layout.hxx
@@ -40,7 +40,6 @@
#include <vcl/combobox.h>
#include <vcl/fldunit.hxx>
#include <vcl/lstbox.h>
-#include <vcl/smartid.hxx>
#include <vcl/wintypes.hxx>
class Button;
@@ -162,10 +161,8 @@ public:
String GetText() const;
void SetStyle( WinBits style );
void SetUpdateMode( bool mode );
- void SetHelpId( sal_uIntPtr id );
- sal_uIntPtr GetHelpId() const;
- void SetSmartHelpId( SmartId const&, SmartIdUpdateMode mode=SMART_SET_SMART );
- SmartId GetSmartHelpId() const;
+ void SetHelpId( const rtl::OString& id );
+ const rtl::OString& GetHelpId() const;
void EnterWait ();
void LeaveWait ();
bool IsWait () const;
@@ -582,20 +579,20 @@ public:
#define DECL_MESSAGE_BOX_CTORS(Name)\
public:\
Name##Box (::Window *parent, char const* message,\
- char const* yes=0, char const* no=0, sal_uIntPtr help_id=0,\
+ char const* yes=0, char const* no=0, const rtl::OString& help_id=rtl::OString(),\
char const* xml_file="message-box.xml", char const* id="message-box");\
Name##Box (::Window *parent, rtl::OUString const& message,\
rtl::OUString yes=String (),\
rtl::OUString no=String (),\
- sal_uIntPtr help_id=0,\
+ const rtl::OString& help_id=rtl::OString(),\
char const* xml_file="message-box.xml", char const* id="message-box");\
Name##Box (::Window *parent, WinBits, char const* message,\
- char const* yes=0, char const* no=0, sal_uIntPtr help_id=0,\
+ char const* yes=0, char const* no=0, const rtl::OString& help_id=rtl::OString(),\
char const* xml_file="message-box.xml", char const* id="message-box");\
Name##Box (::Window *parent, WinBits, rtl::OUString const& message,\
rtl::OUString yes=String (),\
rtl::OUString no=String (),\
- sal_uIntPtr help_id=0,\
+ const rtl::OString& help_id=rtl::OString(),\
char const* xml_file="message-box.xml", char const* id="message-box")\
class TOOLKIT_DLLPUBLIC MessageBox : public Dialog
@@ -616,10 +613,10 @@ protected:
YesButton yesButton;
void bits_init (WinBits bits, rtl::OUString const& message,
- rtl::OUString yes, rtl::OUString, sal_uIntPtr help_id);
+ rtl::OUString yes, rtl::OUString, const rtl::OString& help_id);
void init (rtl::OUString const& message,
- rtl::OUString const& yes, rtl::OUString const& no, sal_uIntPtr help_id);
- void init (char const* message, char const* yes, char const* no, sal_uIntPtr help_id);
+ rtl::OUString const& yes, rtl::OUString const& no, const rtl::OString& help_id);
+ void init (char const* message, char const* yes, char const* no, const rtl::OString& help_id);
};
#define CLASS_MESSAGE_BOX(Name)\
diff --git a/toolkit/source/awt/vclxdialog.cxx b/toolkit/source/awt/vclxdialog.cxx
index 43861c3ed347..dd4b4e740ab1 100644
--- a/toolkit/source/awt/vclxdialog.cxx
+++ b/toolkit/source/awt/vclxdialog.cxx
@@ -208,11 +208,14 @@ void VCLXDialog::setTitle( const ::rtl::OUString& Title ) throw(::com::sun::star
void VCLXDialog::setHelpId( sal_Int32 id ) throw(::com::sun::star::uno::RuntimeException)
{
+ // no more numerical help id
+ #if 0
::vos::OGuard aGuard( GetMutex() );
Window* pWindow = GetWindow();
if ( pWindow )
pWindow->SetHelpId( id );
+ #endif
}
::rtl::OUString VCLXDialog::getTitle() throw(::com::sun::star::uno::RuntimeException)
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index 248571819067..69371342a9a7 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -1708,17 +1708,7 @@ void VCLXWindow::setProperty( const ::rtl::OUString& PropertyName, const ::com::
::rtl::OUString aURL;
if ( Value >>= aURL )
{
- String aHelpURL( aURL );
- String aPattern( RTL_CONSTASCII_USTRINGPARAM( "HID:" ) );
- if ( aHelpURL.CompareIgnoreCaseToAscii( aPattern, aPattern.Len() ) == COMPARE_EQUAL )
- {
- String aID = aHelpURL.Copy( aPattern.Len() );
- pWindow->SetHelpId( aID.ToInt32() );
- }
- else
- {
- pWindow->SetSmartHelpId( SmartId( aHelpURL ) );
- }
+ pWindow->SetHelpId( rtl::OUStringToOString( aURL, RTL_TEXTENCODING_UTF8 ) );
}
}
break;
@@ -2189,19 +2179,8 @@ void VCLXWindow::setProperty( const ::rtl::OUString& PropertyName, const ::com::
break;
case BASEPROPERTY_HELPURL:
{
- SmartId aSmartId = GetWindow()->GetSmartHelpId();
- if( aSmartId.HasString() )
- {
- String aStrHelpId = aSmartId.GetStr();
- aProp <<= ::rtl::OUString( aStrHelpId );
- }
- else
- {
- ::rtl::OUStringBuffer aURL;
- aURL.appendAscii( "HID:" );
- aURL.append( (sal_Int32) GetWindow()->GetHelpId() );
- aProp <<= aURL.makeStringAndClear();
- }
+ rtl::OUString aHelpId( rtl::OStringToOUString( GetWindow()->GetHelpId(), RTL_TEXTENCODING_UTF8 ) );
+ aProp <<= ::rtl::OUString( aHelpId );
}
break;
case BASEPROPERTY_FONTDESCRIPTOR:
diff --git a/toolkit/source/layout/vcl/wrapper.cxx b/toolkit/source/layout/vcl/wrapper.cxx
index a8133250eb58..3b23ee92636b 100644
--- a/toolkit/source/layout/vcl/wrapper.cxx
+++ b/toolkit/source/layout/vcl/wrapper.cxx
@@ -304,13 +304,17 @@ void Window::setRes (ResId const& res)
{
return Resource::ReadStringRes ();
}
+ rtl::OString ReadByteStringRes()
+ {
+ return Resource::ReadByteStringRes();
+ }
};
Resource_open_up r (res);
#endif /* !RESOURCE_PUBLISH_PROTECTED */
- if (sal_uInt32 help_id = (sal_uInt32)r.GetLongRes (static_cast<char *> (r.GetClassRes ()) + 12))
- SetHelpId (help_id);
sal_uInt32 mask = r.ReadLongRes ();
+ if (mask & WINDOW_HELPID)
+ SetHelpId (r.ReadByteStringRes());
if ( mask & WINDOW_TEXT )
SetText( r.ReadStringRes ());
}
@@ -366,26 +370,16 @@ VCLXWindow* Window::GetVCLXWindow() const
return GetWindow()->GetParent();
}
-void Window::SetHelpId( sal_uIntPtr id )
+void Window::SetHelpId( const rtl::OString& id )
{
GetWindow()->SetHelpId( id );
}
-sal_uIntPtr Window::GetHelpId() const
+const rtl::OString& Window::GetHelpId() const
{
return GetWindow()->GetHelpId();
}
-void Window::SetSmartHelpId( SmartId const& id, SmartIdUpdateMode mode )
-{
- GetWindow()->SetSmartHelpId( id, mode );
-}
-
-SmartId Window::GetSmartHelpId() const
-{
- return GetWindow()->GetSmartHelpId();
-}
-
void Window::EnterWait ()
{
GetWindow()->EnterWait ();
@@ -866,7 +860,7 @@ void Dialog::Initialize (SfxChildWinInfo*)
, yesButton (this, "BTN_YES")
MessageBox::MessageBox (::Window *parent, char const* message,
- char const* yes, char const* no, sal_uIntPtr help_id,
+ char const* yes, char const* no, const rtl::OString& help_id,
char const* xml_file, char const* id)
: MESSAGE_BOX_MEMBER_INIT
{
@@ -876,7 +870,7 @@ MessageBox::MessageBox (::Window *parent, char const* message,
}
MessageBox::MessageBox (::Window *parent, OUString const& message,
- OUString yes, OUString no, sal_uIntPtr help_id,
+ OUString yes, OUString no, const rtl::OString& help_id,
char const* xml_file, char const* id)
: MESSAGE_BOX_MEMBER_INIT
{
@@ -890,7 +884,7 @@ MessageBox::MessageBox (::Window *parent, OUString const& message,
#endif /* !__GNUC__ */
MessageBox::MessageBox (::Window *parent, WinBits bits, char const* message,
- char const* yes, char const* no, sal_uIntPtr help_id,
+ char const* yes, char const* no, const rtl::OString& help_id,
char const* xml_file, char const* id)
: MESSAGE_BOX_MEMBER_INIT
{
@@ -903,7 +897,7 @@ MessageBox::MessageBox (::Window *parent, WinBits bits, char const* message,
}
MessageBox::MessageBox (::Window *parent, WinBits bits, OUString const& message,
- OUString yes, OUString no, sal_uIntPtr help_id,
+ OUString yes, OUString no, const rtl::OString& help_id,
char const* xml_file, char const* id)
: MESSAGE_BOX_MEMBER_INIT
{
@@ -916,7 +910,7 @@ MessageBox::MessageBox (::Window *parent, WinBits bits, OUString const& message,
}
void MessageBox::bits_init (WinBits bits, OUString const& message,
- OUString yes, OUString no, sal_uIntPtr help_id)
+ OUString yes, OUString no, const rtl::OString& help_id)
{
if ( bits & ( WB_OK_CANCEL | WB_OK ))
yes = Button::GetStandardText ( BUTTON_OK );
@@ -941,12 +935,12 @@ void MessageBox::bits_init (WinBits bits, OUString const& message,
init (message, yes, no, help_id);
}
-void MessageBox::init (char const* message, char const* yes, char const* no, sal_uIntPtr help_id)
+void MessageBox::init (char const* message, char const* yes, char const* no, const rtl::OString& help_id)
{
init ( OUString::createFromAscii (message), OUString::createFromAscii (yes), OUString::createFromAscii (no), help_id);
}
-void MessageBox::init (OUString const& message, OUString const& yes, OUString const& no, sal_uIntPtr help_id)
+void MessageBox::init (OUString const& message, OUString const& yes, OUString const& no, const rtl::OString& help_id)
{
imageError.Hide ();
imageInfo.Hide ();
@@ -974,28 +968,28 @@ void MessageBox::init (OUString const& message, OUString const& yes, OUString co
#undef MESSAGE_BOX_IMPL
#define MESSAGE_BOX_IMPL(Name)\
Name##Box::Name##Box (::Window *parent, char const* message,\
- char const* yes, char const* no, sal_uIntPtr help_id,\
+ char const* yes, char const* no, const rtl::OString& help_id,\
char const* xml_file, char const* id)\
: MessageBox (parent, message, yes, no, help_id, xml_file, id)\
{\
image##Name.Show ();\
}\
Name##Box::Name##Box (::Window *parent, OUString const& message,\
- OUString yes, OUString no, sal_uIntPtr help_id,\
+ OUString yes, OUString no, const rtl::OString& help_id,\
char const* xml_file, char const* id)\
: MessageBox (parent, message, yes, no, help_id, xml_file, id)\
{\
image##Name.Show ();\
}\
Name##Box::Name##Box (::Window *parent, WinBits bits, char const* message,\
- char const* yes, char const* no, sal_uIntPtr help_id,\
+ char const* yes, char const* no, const rtl::OString& help_id,\
char const* xml_file, char const* id)\
: MessageBox (parent, bits, message, yes, no, help_id, xml_file, id)\
{\
image##Name.Show ();\
}\
Name##Box::Name##Box (::Window *parent, WinBits bits, OUString const& message,\
- OUString yes, OUString no, sal_uIntPtr help_id,\
+ OUString yes, OUString no, const rtl::OString& help_id,\
char const* xml_file, char const* id)\
: MessageBox (parent, bits, message, yes, no, help_id, xml_file, id)\
{\
diff --git a/tools/inc/tools/rc.h b/tools/inc/tools/rc.h
index bd499717a3a4..e11aed2937fd 100644
--- a/tools/inc/tools/rc.h
+++ b/tools/inc/tools/rc.h
@@ -50,6 +50,7 @@ typedef short RSWND_STYLE;
#define WINDOW_EXTRALONG 0x0800
#define WINDOW_UNIQUEID 0x1000
#define WINDOW_BORDER_STYLE 0x2000
+#define WINDOW_HELPID 0x4000
// Definition der Struktur die alle "WorkWindow"-Resourcen haben
#define WORKWIN_SHOWNORMAL 0
diff --git a/tools/inc/tools/rc.hxx b/tools/inc/tools/rc.hxx
index 4bf1827a1ab6..15e077c3c62c 100644
--- a/tools/inc/tools/rc.hxx
+++ b/tools/inc/tools/rc.hxx
@@ -87,6 +87,9 @@ class TOOLS_DLLPUBLIC Resource
// read a string from resource data and increment pointer
UniString ReadStringRes()
{ return m_pResMgr->ReadString(); }
+ // read a byte string from resource data and increment pointer
+ rtl::OString ReadByteStringRes()
+ { return m_pResMgr->ReadByteString(); }
// Gibt die Resource frei (this-Zeiger fuer Fehlerueberpruefung)
// free the resource from m_pResMgr's stack (pass this ptr for validation)
diff --git a/tools/inc/tools/resmgr.hxx b/tools/inc/tools/resmgr.hxx
index b19524139078..93442701d939 100644
--- a/tools/inc/tools/resmgr.hxx
+++ b/tools/inc/tools/resmgr.hxx
@@ -181,8 +181,10 @@ public:
static sal_uInt32 GetObjSize( RSHEADER_TYPE* pHT )
{ return( pHT->GetGlobOff() ); }
- // Liefert einen String aus der Resource
+ // returns a string and its length out of the resource
static sal_uInt32 GetString( UniString& rStr, const BYTE* pStr );
+ // returns a byte string and its length out of the resource
+ static sal_uInt32 GetByteString( rtl::OString& rStr, const BYTE* pStr );
// Groesse eines Strings in der Resource
static sal_uInt32 GetStringSize( sal_uInt32 nLen )
@@ -209,9 +211,10 @@ public:
INT16 ReadShort();
INT32 ReadLong();
UniString ReadString();
+ rtl::OString ReadByteString();
- // generate auto help id for current resource stack
- ULONG GetAutoHelpId();
+ // generate auto help id for current resource stack
+ rtl::OString GetAutoHelpId();
static void SetReadStringHook( ResHookProc pProc );
static ResHookProc GetReadStringHook();
diff --git a/tools/source/rc/resmgr.cxx b/tools/source/rc/resmgr.cxx
index daeaf8e4c3a5..df8506bb090b 100644
--- a/tools/source/rc/resmgr.cxx
+++ b/tools/source/rc/resmgr.cxx
@@ -46,6 +46,7 @@
#include <osl/file.hxx>
#include <osl/mutex.hxx>
#include <rtl/ustrbuf.hxx>
+#include <rtl/strbuf.hxx>
#include <tools/urlobj.hxx>
#include <rtl/instance.hxx>
#include <rtl/bootstrap.hxx>
@@ -1370,6 +1371,13 @@ sal_uInt32 ResMgr::GetString( UniString& rStr, const BYTE* pStr )
return nRet;
}
+sal_uInt32 ResMgr::GetByteString( rtl::OString& rStr, const BYTE* pStr )
+{
+ sal_uInt32 nRet = GetStringSize( pStr );
+ rStr = rtl::OString( (const sal_Char*)pStr, nRet );
+ return nRet;
+}
+
// ------------------------------------------------------------------
sal_uInt32 ResMgr::GetStringSize( const BYTE* pStr )
@@ -1765,90 +1773,93 @@ UniString ResMgr::ReadString()
return aRet;
}
+rtl::OString ResMgr::ReadByteString()
+{
+ osl::Guard<osl::Mutex> aGuard( getResMgrMutex() );
+
+ if( pFallbackResMgr )
+ return pFallbackResMgr->ReadByteString();
+
+ rtl::OString aRet;
+
+ const ImpRCStack& rTop = aStack[nCurStack];
+ if( (rTop.Flags & RC_NOTFOUND) )
+ {
+ #if OSL_DEBUG_LEVEL > 0
+ aRet = OString( "<resource not found>" );
+ #endif
+ }
+ else
+ Increment( GetByteString( aRet, (const BYTE*)GetClass() ) );
+
+ return aRet;
+}
+
// -----------------------------------------------------------------------
-ULONG ResMgr::GetAutoHelpId()
+rtl::OString ResMgr::GetAutoHelpId()
{
osl::Guard<osl::Mutex> aGuard( getResMgrMutex() );
if( pFallbackResMgr )
return pFallbackResMgr->GetAutoHelpId();
- DBG_ASSERT( nCurStack, "resource stack empty in Auto help id generation" );
- if( nCurStack < 1 || nCurStack > 2 )
- return 0;
-
- const ImpRCStack *pRC = StackTop( nCurStack==1 ? 0 : 1 );
-
- DBG_ASSERT( pRC->pResource, "MM hat gesagt, dass der immer einen hat" );
- ULONG nGID = pRC->pResource->GetId();
-
- if( !nGID || nGID > 32767 )
- return 0;
-
- ULONG nHID = 0;
-
- // GGGg gggg::gggg gggg::ggLL LLLl::llll llll
- switch( pRC->pResource->GetRT() ) { // maximal 7
- case RSC_DOCKINGWINDOW:
- nHID += 0x20000000L;
- case RSC_WORKWIN:
- nHID += 0x20000000L;
- case RSC_MODELESSDIALOG:
- nHID += 0x20000000L;
- case RSC_FLOATINGWINDOW:
- nHID += 0x20000000L;
- case RSC_MODALDIALOG:
- nHID += 0x20000000L;
- case RSC_TABPAGE:
- nHID += 0x20000000L;
-
- if( nCurStack == 2 ) {
- pRC = StackTop();
- ULONG nLID = pRC->pResource->GetId();
-
- if( !nLID || nLID > 511 )
- return 0;
-
- switch( pRC->pResource->GetRT() ) { // maximal 32
- case RSC_TABCONTROL: nHID |= 0x0000; break;
- case RSC_RADIOBUTTON: nHID |= 0x0200; break;
- case RSC_CHECKBOX: nHID |= 0x0400; break;
- case RSC_TRISTATEBOX: nHID |= 0x0600; break;
- case RSC_EDIT: nHID |= 0x0800; break;
- case RSC_MULTILINEEDIT: nHID |= 0x0A00; break;
- case RSC_MULTILISTBOX: nHID |= 0x0C00; break;
- case RSC_LISTBOX: nHID |= 0x0E00; break;
- case RSC_COMBOBOX: nHID |= 0x1000; break;
- case RSC_PUSHBUTTON: nHID |= 0x1200; break;
- case RSC_SPINFIELD: nHID |= 0x1400; break;
- case RSC_PATTERNFIELD: nHID |= 0x1600; break;
- case RSC_NUMERICFIELD: nHID |= 0x1800; break;
- case RSC_METRICFIELD: nHID |= 0x1A00; break;
- case RSC_CURRENCYFIELD: nHID |= 0x1C00; break;
- case RSC_DATEFIELD: nHID |= 0x1E00; break;
- case RSC_TIMEFIELD: nHID |= 0x2000; break;
- case RSC_IMAGERADIOBUTTON: nHID |= 0x2200; break;
- case RSC_NUMERICBOX: nHID |= 0x2400; break;
- case RSC_METRICBOX: nHID |= 0x2600; break;
- case RSC_CURRENCYBOX: nHID |= 0x2800; break;
- case RSC_DATEBOX: nHID |= 0x2A00; break;
- case RSC_TIMEBOX: nHID |= 0x2C00; break;
- case RSC_IMAGEBUTTON: nHID |= 0x2E00; break;
- case RSC_MENUBUTTON: nHID |= 0x3000; break;
- case RSC_MOREBUTTON: nHID |= 0x3200; break;
- default:
- return 0;
- } // of switch
- nHID |= nLID;
- } // of if
- break;
+ OSL_ENSURE( nCurStack, "resource stack empty in Auto help id generation" );
+ if( nCurStack < 1 )
+ return rtl::OString();
+
+ // prepare HID, start with resource prefix
+ rtl::OStringBuffer aHID( 32 );
+ aHID.append( rtl::OUStringToOString( pImpRes->aPrefix, RTL_TEXTENCODING_UTF8 ) );
+ aHID.append( ':' );
+
+ // append type
+ const ImpRCStack *pRC = StackTop();
+ OSL_ENSURE( pRC, "missing resource stack level" );
+
+ switch( pRC->pResource->GetRT() ) { // maximal 32
+ case RSC_TABCONTROL: aHID.append( "TabControl" ); break;
+ case RSC_RADIOBUTTON: aHID.append( "RadioButton" ); break;
+ case RSC_CHECKBOX: aHID.append( "CheckBox" ); break;
+ case RSC_TRISTATEBOX: aHID.append( "TristateBox" ); break;
+ case RSC_EDIT: aHID.append( "Edit" ); break;
+ case RSC_MULTILINEEDIT: aHID.append( "MultilineEdit" ); break;
+ case RSC_MULTILISTBOX: aHID.append( "MultiListBox" ); break;
+ case RSC_LISTBOX: aHID.append( "ListBox" ); break;
+ case RSC_COMBOBOX: aHID.append( "Combobox" ); break;
+ case RSC_PUSHBUTTON: aHID.append( "PushButton" ); break;
+ case RSC_SPINFIELD: aHID.append( "SpinField" ); break;
+ case RSC_PATTERNFIELD: aHID.append( "PatternField" ); break;
+ case RSC_NUMERICFIELD: aHID.append( "NumericField" ); break;
+ case RSC_METRICFIELD: aHID.append( "MetricField" ); break;
+ case RSC_CURRENCYFIELD: aHID.append( "CurrencyField" ); break;
+ case RSC_DATEFIELD: aHID.append( "DateField" ); break;
+ case RSC_TIMEFIELD: aHID.append( "TimeField" ); break;
+ case RSC_IMAGERADIOBUTTON: aHID.append( "ImageRadioButton" ); break;
+ case RSC_NUMERICBOX: aHID.append( "NumericBox" ); break;
+ case RSC_METRICBOX: aHID.append( "MetricBox" ); break;
+ case RSC_CURRENCYBOX: aHID.append( "CurrencyBox" ); break;
+ case RSC_DATEBOX: aHID.append( "DateBox" ); break;
+ case RSC_TIMEBOX: aHID.append( "TimeBox" ); break;
+ case RSC_IMAGEBUTTON: aHID.append( "ImageButton" ); break;
+ case RSC_MENUBUTTON: aHID.append( "MenuButton" ); break;
+ case RSC_MOREBUTTON: aHID.append( "MoreButton" ); break;
default:
- return 0;
- } // of switch
- nHID |= nGID << 14;
+ ;
+ }
+
+ // append resource id hierarchy
+ for( int nOff = nCurStack-1; nOff >= 0; nOff-- )
+ {
+ aHID.append( ':' );
+ pRC = StackTop( nOff );
+
+ OSL_ENSURE( pRC->pResource, "missing resource in resource stack level !" );
+ if( pRC->pResource )
+ aHID.append( sal_Int32( pRC->pResource->GetId() ) );
+ }
- return nHID;
+ return aHID.makeStringAndClear();
}
// -----------------------------------------------------------------------
diff --git a/vcl/inc/vcl/btndlg.hxx b/vcl/inc/vcl/btndlg.hxx
index dbeb8350a0d4..3186ba5f6399 100644
--- a/vcl/inc/vcl/btndlg.hxx
+++ b/vcl/inc/vcl/btndlg.hxx
@@ -104,8 +104,8 @@ public:
XubString GetButtonText( USHORT nId ) const;
void SetButtonHelpText( USHORT nId, const XubString& rText );
XubString GetButtonHelpText( USHORT nId ) const;
- void SetButtonHelpId( USHORT nId, ULONG nHelpId );
- ULONG GetButtonHelpId( USHORT nId ) const;
+ void SetButtonHelpId( USHORT nId, const rtl::OString& rHelpId );
+ rtl::OString GetButtonHelpId( USHORT nId ) const;
void SetFocusButton( USHORT nId = BUTTONDIALOG_BUTTON_NOTFOUND ) { mnFocusButtonId = nId; }
USHORT GetFocusButton() const { return mnFocusButtonId; }
diff --git a/vcl/inc/vcl/help.hxx b/vcl/inc/vcl/help.hxx
index 4bca986812ed..c0e9c6bacf50 100644
--- a/vcl/inc/vcl/help.hxx
+++ b/vcl/inc/vcl/help.hxx
@@ -51,8 +51,8 @@ class Window;
#define QUICKHELP_BIDI_RTL ((USHORT)0x8000)
// By changes you must also change: rsc/vclrsc.hxx
-#define OOO_HELP_INDEX ((ULONG)0xFFFFFFFF)
-#define OOO_HELP_HELPONHELP ((ULONG)0xFFFFFFFE)
+#define OOO_HELP_INDEX ".help:index"
+#define OOO_HELP_HELPONHELP ".help:helponhelp"
// --------
// - Help -
@@ -70,10 +70,8 @@ public:
void SetHelpFile( const String& rFileName ) { maHelpFile = rFileName; }
const String& GetHelpFile() const { return maHelpFile; }
- virtual BOOL Start( ULONG nHelpId, const Window* pWindow );
virtual BOOL Start( const XubString& rKeyWord, const Window* pWindow );
- virtual void OpenHelpAgent( ULONG nHelpId );
- virtual XubString GetHelpText( ULONG nHelpId, const Window* pWindow );
+ virtual void OpenHelpAgent( const String& rHelpId );
virtual XubString GetHelpText( const String& aHelpURL, const Window* pWindow );
static void EnableContextHelp();
diff --git a/vcl/inc/vcl/menu.hxx b/vcl/inc/vcl/menu.hxx
index c0cc3b5b51d6..6279c0634797 100644
--- a/vcl/inc/vcl/menu.hxx
+++ b/vcl/inc/vcl/menu.hxx
@@ -290,8 +290,8 @@ public:
void SetHelpCommand( USHORT nItemId, const XubString& rString );
const XubString& GetHelpCommand( USHORT nItemId ) const;
- void SetHelpId( USHORT nItemId, ULONG nHelpId );
- ULONG GetHelpId( USHORT nItemId ) const;
+ void SetHelpId( USHORT nItemId, const rtl::OString& rHelpId );
+ rtl::OString GetHelpId( USHORT nItemId ) const;
void SetActivateHdl( const Link& rLink ) { aActivateHdl = rLink; }
const Link& GetActivateHdl() const { return aActivateHdl; }
diff --git a/vcl/inc/vcl/smartid.hxx b/vcl/inc/vcl/smartid.hxx
deleted file mode 100755
index 2cc5f347b2cb..000000000000
--- a/vcl/inc/vcl/smartid.hxx
+++ /dev/null
@@ -1,87 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _SMARTID_HXX_
-#define _SMARTID_HXX_
-
-#include <tools/string.hxx>
-#include <vcl/dllapi.h>
-
-/// SMART_SET_SMART only sets the Ids that are defined in the SmartId
-/// the other types set whatever is given. This can also be used to reset an Id
-enum SmartIdUpdateMode { SMART_SET_SMART, SMART_SET_NUM, SMART_SET_STR, SMART_SET_ALL };
-
-struct ImplSmartIdData;
-
-/*
-
-SmartId is a substitute for Numeric HelpIds. They can handle Numeric and String HelpIds and offer commonly needed operators.
-
-Matching Ids:
-if part of an Id is not set (HasNumeric HasString is False) then this part will never match to anything. Not even unset values
-
-*/
-class VCL_DLLPUBLIC SmartId
-{
-private:
- ImplSmartIdData* mpData;
- SAL_DLLPRIVATE ImplSmartIdData* GetSmartIdData();
-
-public:
- explicit SmartId( const String& rId );
- explicit SmartId( ULONG nId );
- SmartId( const String& rId, ULONG nId );
-
- SmartId();
-
- SmartId( const SmartId& rId );
- SmartId& operator = ( const SmartId& rId );
-
- ~SmartId();
-
- void UpdateId( const SmartId& rId, SmartIdUpdateMode aMode = SMART_SET_SMART );
-
- BOOL HasNumeric() const;
- BOOL HasString() const;
- BOOL HasAny() const;
- ULONG GetNum() const;
- String GetStr() const;
-
- String GetText() const; /// return String for UI usage
-
- BOOL Matches( const String &rId )const;
- BOOL Matches( const ULONG nId ) const;
-/// In case both Ids have both values set only the StringId is used for Matching
- BOOL Matches( const SmartId &rId ) const;
-
- BOOL Equals( const SmartId &rId ) const;
-
- BOOL operator == ( const SmartId& rRight ) const;
- BOOL operator < ( const SmartId& rRight ) const;
-};
-
-#endif
diff --git a/vcl/inc/vcl/status.hxx b/vcl/inc/vcl/status.hxx
index 810ecf230960..907d08272cbb 100644
--- a/vcl/inc/vcl/status.hxx
+++ b/vcl/inc/vcl/status.hxx
@@ -183,8 +183,8 @@ public:
using Window::GetQuickHelpText;
const XubString& GetQuickHelpText( USHORT nItemId ) const;
- void SetHelpId( USHORT nItemId, ULONG nHelpId );
- ULONG GetHelpId( USHORT nItemId ) const;
+ void SetHelpId( USHORT nItemId, const rtl::OString& rHelpId );
+ rtl::OString GetHelpId( USHORT nItemId ) const;
void SetBottomBorder( BOOL bBottomBorder = TRUE );
BOOL IsBottomBorder() const { return mbBottomBorder; }
@@ -205,9 +205,9 @@ public:
const XubString& GetHelpText() const
{ return Window::GetHelpText(); }
- void SetHelpId( ULONG nId )
- { Window::SetHelpId( nId ); }
- ULONG GetHelpId() const
+ void SetHelpId( const rtl::OString& rId )
+ { Window::SetHelpId( rId ); }
+ const rtl::OString& GetHelpId() const
{ return Window::GetHelpId(); }
Size CalcWindowSizePixel() const;
diff --git a/vcl/inc/vcl/tabctrl.hxx b/vcl/inc/vcl/tabctrl.hxx
index 4c63b12f15fe..ad702ac4dc54 100644
--- a/vcl/inc/vcl/tabctrl.hxx
+++ b/vcl/inc/vcl/tabctrl.hxx
@@ -70,7 +70,6 @@ private:
BOOL mbRestoreUnqId;
BOOL mbSingleLine;
BOOL mbScroll;
- BOOL mbRestoreSmartId;
BOOL mbSmallInvalidate;
BOOL mbExtraSpace;
Link maActivateHdl;
@@ -177,8 +176,8 @@ public:
void SetHelpText( USHORT nPageId, const XubString& rText );
const XubString& GetHelpText( USHORT nPageId ) const;
- void SetHelpId( USHORT nPageId, ULONG nHelpId );
- ULONG GetHelpId( USHORT nPageId ) const;
+ void SetHelpId( USHORT nPageId, const rtl::OString& rHelpId );
+ rtl::OString GetHelpId( USHORT nPageId ) const;
void SetPageImage( USHORT nPageId, const Image& rImage );
const Image* GetPageImage( USHORT nPageId ) const;
@@ -188,9 +187,9 @@ public:
const XubString& GetHelpText() const
{ return Control::GetHelpText(); }
- void SetHelpId( ULONG nId )
- { Control::SetHelpId( nId ); }
- ULONG GetHelpId() const
+ void SetHelpId( const rtl::OString& rId )
+ { Control::SetHelpId( rId ); }
+ const rtl::OString& GetHelpId() const
{ return Control::GetHelpId(); }
void SetActivatePageHdl( const Link& rLink ) { maActivateHdl = rLink; }
diff --git a/vcl/inc/vcl/toolbox.h b/vcl/inc/vcl/toolbox.h
index 33e4e8d2e013..7cdeb0b17a5a 100644
--- a/vcl/inc/vcl/toolbox.h
+++ b/vcl/inc/vcl/toolbox.h
@@ -68,7 +68,7 @@ struct ImplToolItem
XubString maQuickHelpText;
XubString maHelpText;
String maCommandStr;
- ULONG mnHelpId;
+ rtl::OString maHelpId;
Rectangle maRect;
Rectangle maCalcRect;
// the overall horizontal item size, including one or more of [image size + textlength + dropdown arrow]
diff --git a/vcl/inc/vcl/toolbox.hxx b/vcl/inc/vcl/toolbox.hxx
index 5cc102842dc3..aa7ddd886bbb 100644
--- a/vcl/inc/vcl/toolbox.hxx
+++ b/vcl/inc/vcl/toolbox.hxx
@@ -511,8 +511,8 @@ public:
void SetHelpText( USHORT nItemId, const XubString& rText );
const XubString& GetHelpText( USHORT nItemId ) const;
- void SetHelpId( USHORT nItemId, ULONG nHelpId );
- ULONG GetHelpId( USHORT nItemId ) const;
+ void SetHelpId( USHORT nItemId, const rtl::OString& rHelpId );
+ rtl::OString GetHelpId( USHORT nItemId ) const;
// window size according to current alignment, floating state and number of lines
Size CalcWindowSizePixel() const;
@@ -569,9 +569,9 @@ public:
const XubString& GetHelpText() const
{ return DockingWindow::GetHelpText(); }
- void SetHelpId( ULONG nId )
- { DockingWindow::SetHelpId( nId ); }
- ULONG GetHelpId() const
+ void SetHelpId( const rtl::OString& rId )
+ { DockingWindow::SetHelpId( rId ); }
+ const rtl::OString& GetHelpId() const
{ return DockingWindow::GetHelpId(); }
void SetClickHdl( const Link& rLink ) { maClickHdl = rLink; }
diff --git a/vcl/inc/vcl/window.h b/vcl/inc/vcl/window.h
index 9d917a09b6de..13b906991077 100644
--- a/vcl/inc/vcl/window.h
+++ b/vcl/inc/vcl/window.h
@@ -57,7 +57,6 @@ class Cursor;
class ImplDevFontList;
class ImplFontCache;
class SalControlHandle;
-class SmartId;
class VCLXWindow;
class SalFrame;
class SalObject;
@@ -122,8 +121,6 @@ struct ImplWinData
BOOL mbMouseOver; // tracks mouse over for native widget paint effect
SalControlHandle* mpSalControlHandle; // native data for NWF
BOOL mbEnableNativeWidget; // toggle native widget rendering
- SmartId* mpSmartHelpId;
- SmartId* mpSmartUniqueId;
::std::list< Window* >
maTopWindowChildren;
};
@@ -256,8 +253,8 @@ public:
long mnY;
long mnAbsScreenX;
Point maPos;
- ULONG mnHelpId;
- ULONG mnUniqId;
+ rtl::OString maHelpId;
+ rtl::OString maUniqId;
XubString maHelpText;
XubString maQuickHelpText;
InputContext maInputContext;
diff --git a/vcl/inc/vcl/window.hxx b/vcl/inc/vcl/window.hxx
index 3d1cc91ee468..0152ef3d919f 100644
--- a/vcl/inc/vcl/window.hxx
+++ b/vcl/inc/vcl/window.hxx
@@ -50,7 +50,6 @@
#include <rtl/ustring.hxx>
#include <cppuhelper/weakref.hxx>
#include <com/sun/star/uno/Reference.hxx>
-#include <vcl/smartid.hxx>
class VirtualDevice;
struct ImplDelData;
@@ -951,16 +950,12 @@ public:
void SetQuickHelpText( const XubString& rHelpText );
const XubString& GetQuickHelpText() const;
- void SetHelpId( ULONG nHelpId ); /// deprecated
- ULONG GetHelpId() const; /// deprecated
- void SetSmartHelpId( const SmartId& aId, SmartIdUpdateMode aMode = SMART_SET_SMART );
- SmartId GetSmartHelpId() const;
+ void SetHelpId( const rtl::OString& );
+ const rtl::OString& GetHelpId() const;
- void SetUniqueId( ULONG nUniqueId ); /// deprecated
- ULONG GetUniqueId() const; /// deprecated
- void SetSmartUniqueId( const SmartId& aId, SmartIdUpdateMode aMode = SMART_SET_SMART );
- SmartId GetSmartUniqueId() const;
- SmartId GetSmartUniqueOrHelpId() const;
+ void SetUniqueId( const rtl::OString& );
+ const rtl::OString& GetUniqueId() const;
+ const rtl::OString& GetUniqueOrHelpId() const;
Window* FindWindow( const Point& rPos ) const;
diff --git a/vcl/prj/d.lst b/vcl/prj/d.lst
index 8345b155ce58..a5803df239c9 100644
--- a/vcl/prj/d.lst
+++ b/vcl/prj/d.lst
@@ -144,7 +144,6 @@ mkdir: %_DEST%\inc%_EXT%\vcl
..\inc\vcl\pdfextoutdevdata.hxx %_DEST%\inc%_EXT%\vcl\pdfextoutdevdata.hxx
..\inc\vcl\pngread.hxx %_DEST%\inc%_EXT%\vcl\pngread.hxx
..\inc\vcl\pngwrite.hxx %_DEST%\inc%_EXT%\vcl\pngwrite.hxx
-..\inc\vcl\smartid.hxx %_DEST%\inc%_EXT%\vcl\smartid.hxx
..\inc\vcl\configsettings.hxx %_DEST%\inc%_EXT%\vcl\configsettings.hxx
..\inc\vcl\ImageListProvider.hxx %_DEST%\inc%_EXT%\vcl\ImageListProvider.hxx
..\inc\vcl\fontmanager.hxx %_DEST%\inc%_EXT%\vcl\fontmanager.hxx
diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx
index b4ab10887fcd..97be0ae9e2d4 100644
--- a/vcl/source/app/help.cxx
+++ b/vcl/source/app/help.cxx
@@ -62,12 +62,7 @@ Help::~Help()
// -----------------------------------------------------------------------
-BOOL Help::Start( ULONG, const Window* )
-{
- return FALSE;
-}
-
-void Help::OpenHelpAgent( ULONG )
+void Help::OpenHelpAgent( const String& )
{
}
@@ -80,13 +75,6 @@ BOOL Help::Start( const XubString&, const Window* )
// -----------------------------------------------------------------------
-XubString Help::GetHelpText( ULONG, const Window* )
-{
- return ImplGetSVEmptyStr();
-}
-
-// -----------------------------------------------------------------------
-
XubString Help::GetHelpText( const String&, const Window* )
{
return ImplGetSVEmptyStr();
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index 89fbe6d3db78..3353c1b41d85 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -42,7 +42,6 @@
#include "vcl/controldata.hxx"
#include "vcl/sound.hxx"
#include "vcl/lstbox.hxx"
-#include "vcl/smartid.hxx"
#include "vcl/window.h"
@@ -59,7 +58,7 @@ struct ImplTabItem
String maText;
String maFormatText;
String maHelpText;
- ULONG mnHelpId;
+ rtl::OString maHelpId;
Rectangle maRect;
USHORT mnLine;
bool mbFullVisible;
@@ -67,7 +66,7 @@ struct ImplTabItem
Image maTabImage;
ImplTabItem()
- : mnId( 0 ), mnTabPageResId( 0 ), mpTabPage( NULL ), mnHelpId( 0 ),
+ : mnId( 0 ), mnTabPageResId( 0 ), mpTabPage( NULL ),
mnLine( 0 ), mbFullVisible( FALSE ), mbEnabled( true )
{}
};
@@ -151,7 +150,6 @@ void TabControl::ImplInit( Window* pParent, WinBits nStyle )
mbRestoreUnqId = FALSE;
mbSingleLine = FALSE;
mbScroll = FALSE;
- mbRestoreSmartId = FALSE;
mbSmallInvalidate = FALSE;
mbExtraSpace = FALSE;
mpTabCtrlData = new ImplTabCtrlData;
@@ -705,11 +703,9 @@ void TabControl::ImplChangeTabPage( USHORT nId, USHORT nOldId )
if ( pOldPage )
{
if ( mbRestoreHelpId )
- pCtrlParent->SetHelpId( 0 );
+ pCtrlParent->SetHelpId( rtl::OString() );
if ( mbRestoreUnqId )
- pCtrlParent->SetUniqueId( 0 );
- if( mbRestoreSmartId )
- pCtrlParent->SetSmartHelpId( SmartId() );
+ pCtrlParent->SetUniqueId( rtl::OString() );
pOldPage->DeactivatePage();
}
@@ -719,21 +715,16 @@ void TabControl::ImplChangeTabPage( USHORT nId, USHORT nOldId )
// activate page here so the conbtrols can be switched
// also set the help id of the parent window to that of the tab page
- if ( !GetHelpId() )
+ if ( !GetHelpId().getLength() )
{
mbRestoreHelpId = TRUE;
pCtrlParent->SetHelpId( pPage->GetHelpId() );
}
- if ( !pCtrlParent->GetUniqueId() )
+ if ( !pCtrlParent->GetUniqueId().getLength() )
{
mbRestoreUnqId = TRUE;
pCtrlParent->SetUniqueId( pPage->GetUniqueId() );
}
- if( ! GetSmartHelpId().HasAny() )
- {
- mbRestoreSmartId = TRUE;
- pCtrlParent->SetSmartHelpId( pPage->GetSmartHelpId() );
- }
pPage->ActivatePage();
@@ -1490,13 +1481,13 @@ void TabControl::RequestHelp( const HelpEvent& rHEvt )
}
else if ( rHEvt.GetMode() & HELPMODE_EXTENDED )
{
- ULONG nHelpId = GetHelpId( nItemId );
- if ( nHelpId )
+ rtl::OUString aHelpId( rtl::OStringToOUString( GetHelpId( nItemId ), RTL_TEXTENCODING_UTF8 ) );
+ if ( aHelpId.getLength() )
{
// Wenn eine Hilfe existiert, dann ausloesen
Help* pHelp = Application::GetHelp();
if ( pHelp )
- pHelp->Start( nHelpId, this );
+ pHelp->Start( aHelpId, this );
return;
}
}
@@ -1578,7 +1569,7 @@ void TabControl::Command( const CommandEvent& rCEvt )
aMenu.InsertItem( it->mnId, it->maText, MIB_CHECKABLE | MIB_RADIOCHECK );
if ( it->mnId == mnCurPageId )
aMenu.CheckItem( it->mnId );
- aMenu.SetHelpId( it->mnId, it->mnHelpId );
+ aMenu.SetHelpId( it->mnId, it->maHelpId );
}
USHORT nId = aMenu.Execute( this, aMenuPos );
@@ -1830,7 +1821,6 @@ void TabControl::InsertPage( USHORT nPageId, const XubString& rText,
pItem->mnId = nPageId;
pItem->mpTabPage = NULL;
pItem->mnTabPageResId = 0;
- pItem->mnHelpId = 0;
pItem->maText = rText;
pItem->mbFullVisible = FALSE;
@@ -2158,11 +2148,11 @@ const XubString& TabControl::GetHelpText( USHORT nPageId ) const
if ( pItem )
{
- if ( !pItem->maHelpText.Len() && pItem->mnHelpId )
+ if ( !pItem->maHelpText.Len() && pItem->maHelpId.getLength() )
{
Help* pHelp = Application::GetHelp();
if ( pHelp )
- pItem->maHelpText = pHelp->GetHelpText( pItem->mnHelpId, this );
+ pItem->maHelpText = pHelp->GetHelpText( rtl::OStringToOUString( pItem->maHelpId, RTL_TEXTENCODING_UTF8 ), this );
}
return pItem->maHelpText;
@@ -2173,24 +2163,25 @@ const XubString& TabControl::GetHelpText( USHORT nPageId ) const
// -----------------------------------------------------------------------
-void TabControl::SetHelpId( USHORT nPageId, ULONG nHelpId )
+void TabControl::SetHelpId( USHORT nPageId, const rtl::OString& rHelpId )
{
ImplTabItem* pItem = ImplGetItem( nPageId );
if ( pItem )
- pItem->mnHelpId = nHelpId;
+ pItem->maHelpId = rHelpId;
}
// -----------------------------------------------------------------------
-ULONG TabControl::GetHelpId( USHORT nPageId ) const
+rtl::OString TabControl::GetHelpId( USHORT nPageId ) const
{
+ rtl::OString aRet;
ImplTabItem* pItem = ImplGetItem( nPageId );
if ( pItem )
- return pItem->mnHelpId;
- else
- return 0;
+ aRet = pItem->maHelpId;
+
+ return aRet;
}
// -----------------------------------------------------------------------
diff --git a/vcl/source/helper/makefile.mk b/vcl/source/helper/makefile.mk
index e708bdec9eaa..1a417417dbe4 100644
--- a/vcl/source/helper/makefile.mk
+++ b/vcl/source/helper/makefile.mk
@@ -46,7 +46,6 @@ SLOFILES=\
$(SLO)$/canvastools.obj \
$(SLO)$/xconnection.obj \
$(SLO)$/threadex.obj \
- $(SLO)$/smartid.obj \
$(SLO)$/lazydelete.obj
# --- Targets ------------------------------------------------------
diff --git a/vcl/source/helper/smartid.cxx b/vcl/source/helper/smartid.cxx
deleted file mode 100755
index c367aeb2bce5..000000000000
--- a/vcl/source/helper/smartid.cxx
+++ /dev/null
@@ -1,264 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_vcl.hxx"
-#include <vcl/smartid.hxx>
-
-struct ImplSmartIdData
-{
- String aUId;
- ULONG nUId;
- BOOL bHasStringId;
- BOOL bHasNumericId;
-};
-
-
-ImplSmartIdData* SmartId::GetSmartIdData()
-{
- if ( !mpData )
- {
- mpData = new ImplSmartIdData;
-// mpData->aUId = "";
- mpData->nUId = 0;
- mpData->bHasStringId = FALSE;
- mpData->bHasNumericId = FALSE;
- }
- return mpData;
-}
-
-
-SmartId::SmartId( const String& rId )
-: mpData( NULL )
-{
- GetSmartIdData()->aUId = rId;
- GetSmartIdData()->bHasStringId = TRUE;
-}
-
-SmartId::SmartId( ULONG nId )
-: mpData( NULL )
-{
- GetSmartIdData()->nUId = nId;
- GetSmartIdData()->bHasNumericId = TRUE;
-}
-
-SmartId::SmartId( const String& rId, ULONG nId )
-: mpData( NULL )
-{
- GetSmartIdData()->aUId = rId;
- GetSmartIdData()->bHasStringId = TRUE;
- GetSmartIdData()->nUId = nId;
- GetSmartIdData()->bHasNumericId = TRUE;
-}
-
-SmartId::SmartId()
-: mpData( NULL )
-{}
-
-SmartId::SmartId( const SmartId& rId )
-: mpData( NULL )
-{
- if ( rId.mpData )
- {
- GetSmartIdData();
- mpData->aUId = rId.mpData->aUId;
- mpData->bHasStringId = rId.mpData->bHasStringId;
- mpData->nUId = rId.mpData->nUId;
- mpData->bHasNumericId = rId.mpData->bHasNumericId;
- }
-}
-
-SmartId& SmartId::operator = ( const SmartId& rId )
-{
- if ( rId.mpData )
- GetSmartIdData();
- else
- {
- delete mpData;
- mpData = NULL;
- }
- if ( mpData && rId.mpData )
- {
- mpData->aUId = rId.mpData->aUId;
- mpData->bHasStringId = rId.mpData->bHasStringId;
- mpData->nUId = rId.mpData->nUId;
- mpData->bHasNumericId = rId.mpData->bHasNumericId;
- }
- return *this;
-}
-
-SmartId::~SmartId()
-{
- if ( mpData )
- delete mpData;
-#ifdef DBG_UTIL
- if ( mpData )
- mpData = (ImplSmartIdData*)0xDeadBeef;
-#endif
-}
-
-void SmartId::UpdateId( const SmartId& rId, SmartIdUpdateMode aMode )
-{
- // Check if ImplData is needed
- if ( aMode != SMART_SET_SMART || ( rId.HasString() || rId.HasNumeric() ) )
- GetSmartIdData();
-
- if ( aMode == SMART_SET_STR || aMode == SMART_SET_ALL || ( aMode == SMART_SET_SMART && rId.HasString() ) )
- {
- GetSmartIdData()->aUId = rId.GetStr();
- GetSmartIdData()->bHasStringId = rId.HasString();
- }
- if ( aMode == SMART_SET_NUM || aMode == SMART_SET_ALL || ( aMode == SMART_SET_SMART && rId.HasNumeric() ) )
- {
- GetSmartIdData()->nUId = rId.GetNum();
- GetSmartIdData()->bHasNumericId = rId.HasNumeric();
- }
-
- // remove ImplData when no IDs are set. This is Important because Implementation of Equals() Matches and HasAny relies on it
- if ( mpData && !mpData->bHasStringId && !mpData->bHasNumericId )
- {
- delete mpData;
- mpData = NULL;
- }
-}
-
-BOOL SmartId::HasNumeric() const
-{
- if ( !mpData )
- return FALSE;
- else
- return mpData->bHasNumericId;
-}
-
-BOOL SmartId::HasString() const
-{
- if ( !mpData )
- return FALSE;
- else
- return mpData->bHasStringId;
-}
-
-BOOL SmartId::HasAny() const
-{
- return mpData != NULL;
-}
-
-ULONG SmartId::GetNum() const
-{
- if ( !mpData )
- return 0;
- else
- return mpData->nUId;
-}
-
-String SmartId::GetStr() const
-{
- if ( !mpData )
- return String();
- else
- return mpData->aUId;
-}
-
-
-String SmartId::GetText() const // return String for UI usage
-{
- String aRes;
- if ( HasNumeric() )
- aRes = String::CreateFromInt64( GetNum() );
- if ( HasString() )
- {
- if ( HasNumeric() )
- aRes.AppendAscii( "/" );
- aRes.Append( GetStr() );
- }
- return aRes;
-}
-
-BOOL SmartId::Matches( const String &rId )const
-{
- if ( HasString() )
- return GetStr().EqualsIgnoreCaseAscii( rId );
- else
- return FALSE;
-}
-
-BOOL SmartId::Matches( const ULONG nId ) const
-{
- if ( HasNumeric() )
- return GetNum() == nId;
- else
- return FALSE;
-}
-
-/******************************************************************************
-If Both Ids have nither Strings nor Numbers they don't match
-If both Ids have Strings the result of Matching these is returned.
-Numbers are then Ignored.
-Else Matching Numbers is attempted.
-******************************************************************************/
-BOOL SmartId::Matches( const SmartId &rId ) const
-{
- if ( !mpData || !rId.mpData )
- return FALSE;
- else if ( HasString() && rId.HasString() )
- return Matches( rId.GetStr() );
- else
- return rId.HasNumeric() && Matches( rId.GetNum() );
-}
-
-BOOL SmartId::Equals( const SmartId &rId ) const
-{
- if ( mpData && rId.mpData )
- return mpData->aUId.EqualsIgnoreCaseAscii( rId.mpData->aUId )
- && mpData->bHasStringId == rId.mpData->bHasStringId
- && mpData->nUId == rId.mpData->nUId
- && mpData->bHasNumericId == rId.mpData->bHasNumericId;
- else if ( !mpData && !rId.mpData )
- return TRUE;
- else
- return FALSE;
-}
-
-BOOL SmartId::operator == ( const SmartId& rRight ) const
-{
- return Equals( rRight );
-}
-
-BOOL SmartId::operator < ( const SmartId& rRight ) const
-{
- if ( HasString() && rRight.HasString() && GetStr() != rRight.GetStr() )
- return GetStr() < rRight.GetStr();
- else if ( HasNumeric() && rRight.HasNumeric() && GetNum() != rRight.GetNum() )
- return GetNum() < rRight.GetNum();
- else
- { // Sort Strings to Front
- if ( HasString() )
- return rRight.HasString() && rRight.HasNumeric();
- else
- return rRight.HasString() || (!HasNumeric() && rRight.HasNumeric());
- }
-}
diff --git a/vcl/source/window/btndlg.cxx b/vcl/source/window/btndlg.cxx
index e835fe749ed1..9a0452027737 100644
--- a/vcl/source/window/btndlg.cxx
+++ b/vcl/source/window/btndlg.cxx
@@ -530,22 +530,19 @@ XubString ButtonDialog::GetButtonHelpText( USHORT nId ) const
// -----------------------------------------------------------------------
-void ButtonDialog::SetButtonHelpId( USHORT nId, ULONG nHelpId )
+void ButtonDialog::SetButtonHelpId( USHORT nId, const rtl::OString& rHelpId )
{
ImplBtnDlgItem* pItem = ImplGetItem( nId );
if ( pItem )
- pItem->mpPushButton->SetHelpId( nHelpId );
+ pItem->mpPushButton->SetHelpId( rHelpId );
}
// -----------------------------------------------------------------------
-ULONG ButtonDialog::GetButtonHelpId( USHORT nId ) const
+rtl::OString ButtonDialog::GetButtonHelpId( USHORT nId ) const
{
ImplBtnDlgItem* pItem = ImplGetItem( nId );
- if ( pItem )
- return pItem->mpPushButton->GetHelpId();
- else
- return 0;
+ return pItem ? rtl::OString( pItem->mpPushButton->GetHelpId() ) : rtl::OString();
}
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index ddfb1125d0d7..38741f7cc1af 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -156,7 +156,7 @@ struct MenuItemData
XubString aTipHelpText; // TipHelp-String (eg, expanded filenames)
XubString aCommandStr; // CommandString
XubString aHelpCommandStr; // Help command string (to reference external help)
- ULONG nHelpId; // Help-Id
+ rtl::OString aHelpId; // Help-Id
ULONG nUserValue; // User value
Image aImage; // Image
KeyCode aAccelKey; // Accelerator-Key
@@ -251,7 +251,6 @@ MenuItemData* MenuItemList::Insert( USHORT nId, MenuItemType eType,
pData->nBits = nBits;
pData->pSubMenu = NULL;
pData->pAutoSubMenu = NULL;
- pData->nHelpId = 0;
pData->nUserValue = 0;
pData->bChecked = FALSE;
pData->bEnabled = TRUE;
@@ -283,7 +282,6 @@ void MenuItemList::InsertSeparator( USHORT nPos )
pData->nBits = 0;
pData->pSubMenu = NULL;
pData->pAutoSubMenu = NULL;
- pData->nHelpId = 0;
pData->nUserValue = 0;
pData->bChecked = FALSE;
pData->bEnabled = TRUE;
@@ -843,14 +841,14 @@ static BOOL ImplHandleHelpEvent( Window* pMenuWindow, Menu* pMenu, USHORT nHighl
// Ist eine ID vorhanden, dann Hilfe mit der ID aufrufen, sonst
// den Hilfe-Index
String aCommand = pMenu->GetItemCommand( nId );
- ULONG nHelpId = pMenu->GetHelpId( nId );
+ rtl::OString aHelpId( pMenu->GetHelpId( nId ) );
+ if( ! aHelpId.getLength() )
+ aHelpId = OOO_HELP_INDEX;
if ( aCommand.Len() )
pHelp->Start( aCommand, NULL );
- else if ( nHelpId )
- pHelp->Start( nHelpId, NULL );
else
- pHelp->Start( OOO_HELP_INDEX, NULL );
+ pHelp->Start( rtl::OStringToOUString( aHelpId, RTL_TEXTENCODING_UTF8 ), NULL );
}
bDone = TRUE;
}
@@ -1282,15 +1280,14 @@ void Menu::InsertItem( const ResId& rResId, USHORT nPos )
SetHelpText( nItemId, aHelpText );
}
- ULONG nHelpId = 0;
if ( nObjMask & RSC_MENUITEM_HELPID )
{
- nHelpId = ReadLongRes();
+ rtl::OString aHelpId( ReadByteStringRes() );
if ( !bSep )
- SetHelpId( nItemId, nHelpId );
+ SetHelpId( nItemId, aHelpId );
}
- if( !bSep /* && SvHelpSettings::HelpText( aHelpText, nHelpId ) */ )
+ if( !bSep )
SetHelpText( nItemId, aHelpText );
if ( nObjMask & RSC_MENUITEM_KEYCODE )
@@ -1415,7 +1412,7 @@ void ImplCopyItem( Menu* pThis, const Menu& rMenu, USHORT nPos, USHORT nNewPos,
pThis->CheckItem( nId, TRUE );
if ( !rMenu.IsItemEnabled( nId ) )
pThis->EnableItem( nId, FALSE );
- pThis->SetHelpId( nId, pData->nHelpId );
+ pThis->SetHelpId( nId, pData->aHelpId );
pThis->SetHelpText( nId, pData->aHelpText );
pThis->SetAccelKey( nId, pData->aAccelKey );
pThis->SetItemCommand( nId, pData->aCommandStr );
@@ -1991,7 +1988,7 @@ const XubString& Menu::ImplGetHelpText( USHORT nItemId ) const
if ( pData )
{
if ( !pData->aHelpText.Len() &&
- (( pData->nHelpId ) || ( pData->aCommandStr.Len() )))
+ (( pData->aHelpId.getLength() ) || ( pData->aCommandStr.Len() )))
{
Help* pHelp = Application::GetHelp();
if ( pHelp )
@@ -1999,8 +1996,8 @@ const XubString& Menu::ImplGetHelpText( USHORT nItemId ) const
if ( pData->aCommandStr.Len() )
pData->aHelpText = pHelp->GetHelpText( pData->aCommandStr, NULL );
- if( !pData->aHelpText.Len() && pData->nHelpId )
- pData->aHelpText = pHelp->GetHelpText( pData->nHelpId, NULL );
+ if( !pData->aHelpText.Len() && pData->aHelpId.getLength() )
+ pData->aHelpText = pHelp->GetHelpText( rtl::OStringToOUString( pData->aHelpId, RTL_TEXTENCODING_UTF8 ), NULL );
}
}
@@ -2033,22 +2030,24 @@ const XubString& Menu::GetTipHelpText( USHORT nItemId ) const
return ImplGetSVEmptyStr();
}
-void Menu::SetHelpId( USHORT nItemId, ULONG nHelpId )
+void Menu::SetHelpId( USHORT nItemId, const rtl::OString& rHelpId )
{
MenuItemData* pData = pItemList->GetData( nItemId );
if ( pData )
- pData->nHelpId = nHelpId;
+ pData->aHelpId = rHelpId;
}
-ULONG Menu::GetHelpId( USHORT nItemId ) const
+rtl::OString Menu::GetHelpId( USHORT nItemId ) const
{
+ rtl::OString aRet;
+
MenuItemData* pData = pItemList->GetData( nItemId );
if ( pData )
- return pData->nHelpId;
- else
- return 0;
+ aRet = pData->aHelpId;
+
+ return aRet;
}
Menu& Menu::operator=( const Menu& rMenu )
diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx
index 7f7a65cd7fb9..d21d881b38f0 100644
--- a/vcl/source/window/msgbox.cxx
+++ b/vcl/source/window/msgbox.cxx
@@ -196,10 +196,9 @@ MessBox::MessBox( Window* pParent, const ResId& rResId ) :
USHORT nLoButtons = ReadShortRes();
USHORT nHiDefButton = ReadShortRes();
USHORT nLoDefButton = ReadShortRes();
- USHORT nHiHelpId = ReadShortRes();
- USHORT nLoHelpId = ReadShortRes();
+ rtl::OString aHelpId( ReadByteStringRes() );
/* USHORT bSysModal = */ ReadShortRes();
- SetHelpId( ((ULONG)nHiHelpId << 16) + nLoHelpId );
+ SetHelpId( aHelpId );
WinBits nBits = (((ULONG)nHiButtons << 16) + nLoButtons) |
(((ULONG)nHiDefButton << 16) + nLoDefButton);
ImplInit( pParent, nBits | WB_MOVEABLE | WB_HORZ | WB_CENTER );
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 35077b1cff0e..50bd0744dc3f 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -46,7 +46,7 @@
#include "unotools/localedatawrapper.hxx"
-#include "rtl/ustrbuf.hxx"
+#include "rtl/strbuf.hxx"
#include "com/sun/star/lang/XMultiServiceFactory.hpp"
#include "com/sun/star/container/XNameAccess.hpp"
@@ -61,8 +61,8 @@ using namespace com::sun::star::container;
using namespace com::sun::star::beans;
#define HELPID_PREFIX ".HelpId:vcl:PrintDialog"
-#define SMHID2( a, b ) SetSmartHelpId( SmartId( String( RTL_CONSTASCII_USTRINGPARAM( HELPID_PREFIX ":" a ":" b ) ), HID_PRINTDLG ) )
-#define SMHID1( a ) SetSmartHelpId( SmartId( String( RTL_CONSTASCII_USTRINGPARAM( HELPID_PREFIX ":" a ) ), HID_PRINTDLG ) )
+#define SMHID2( a, b ) SetHelpId( rtl::OString( HELPID_PREFIX ":" a ":" b ) )
+#define SMHID1( a ) SetHelpId( rtl::OString( HELPID_PREFIX ":" a ) )
PrintDialog::PrintPreviewWindow::PrintPreviewWindow( Window* i_pParent, const ResId& i_rId )
: Window( i_pParent, i_rId )
@@ -1125,24 +1125,24 @@ bool PrintDialog::isSingleJobs()
static void setSmartId( Window* i_pWindow, const char* i_pType, sal_Int32 i_nId = -1, const rtl::OUString& i_rPropName = rtl::OUString() )
{
- rtl::OUStringBuffer aBuf( 256 );
- aBuf.appendAscii( HELPID_PREFIX );
+ rtl::OStringBuffer aBuf( 256 );
+ aBuf.append( HELPID_PREFIX );
if( i_rPropName.getLength() )
{
- aBuf.append( sal_Unicode( ':' ) );
- aBuf.append( i_rPropName );
+ aBuf.append( ':' );
+ aBuf.append( rtl::OUStringToOString( i_rPropName, RTL_TEXTENCODING_UTF8 ) );
}
if( i_pType )
{
- aBuf.append( sal_Unicode( ':' ) );
- aBuf.appendAscii( i_pType );
+ aBuf.append( ':' );
+ aBuf.append( i_pType );
}
if( i_nId >= 0 )
{
- aBuf.append( sal_Unicode( ':' ) );
+ aBuf.append( ':' );
aBuf.append( i_nId );
}
- i_pWindow->SetSmartHelpId( SmartId( aBuf.makeStringAndClear(), HID_PRINTDLG ) );
+ i_pWindow->SetHelpId( aBuf.makeStringAndClear() );
}
static void setHelpText( Window* /*i_pWindow*/, const Sequence< rtl::OUString >& /*i_rHelpTexts*/, sal_Int32 /*i_nIndex*/ )
@@ -2128,7 +2128,7 @@ IMPL_LINK( PrintDialog, ClickHdl, Button*, pButton )
if( pHelp )
{
// FIXME: find out proper help URL and use here
- pHelp->Start( HID_PRINTDLG, GetParent() );
+ pHelp->Start( rtl::OStringToOUString( GetHelpId(), RTL_TEXTENCODING_UTF8 ), GetParent() );
}
}
else if( pButton == &maForwardBtn )
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index c139ae1ffb30..1fbfcd7344d7 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -89,7 +89,7 @@ struct ImplStatusItem
XubString maText;
XubString maHelpText;
XubString maQuickHelpText;
- ULONG mnHelpId;
+ rtl::OString maHelpId;
void* mpUserData;
BOOL mbVisible;
XubString maAccessibleName;
@@ -904,9 +904,9 @@ void StatusBar::RequestHelp( const HelpEvent& rHEvt )
else if ( rHEvt.GetMode() & HELPMODE_EXTENDED )
{
String aCommand = GetItemCommand( nItemId );
- ULONG nHelpId = GetHelpId( nItemId );
+ rtl::OString aHelpId( GetHelpId( nItemId ) );
- if ( aCommand.Len() || nHelpId )
+ if ( aCommand.Len() || aHelpId.getLength() )
{
// Wenn eine Hilfe existiert, dann ausloesen
Help* pHelp = Application::GetHelp();
@@ -914,8 +914,8 @@ void StatusBar::RequestHelp( const HelpEvent& rHEvt )
{
if ( aCommand.Len() )
pHelp->Start( aCommand, this );
- else if ( nHelpId )
- pHelp->Start( nHelpId, this );
+ else if ( aHelpId.getLength() )
+ pHelp->Start( rtl::OStringToOUString( aHelpId, RTL_TEXTENCODING_UTF8 ), this );
}
return;
}
@@ -1031,7 +1031,6 @@ void StatusBar::InsertItem( USHORT nItemId, ULONG nWidth,
pItem->mnBits = nBits;
pItem->mnWidth = (long)nWidth+nFudge+STATUSBAR_OFFSET;
pItem->mnOffset = nOffset;
- pItem->mnHelpId = 0;
pItem->mpUserData = 0;
pItem->mbVisible = TRUE;
@@ -1473,15 +1472,15 @@ const XubString& StatusBar::GetHelpText( USHORT nItemId ) const
if ( nPos != STATUSBAR_ITEM_NOTFOUND )
{
ImplStatusItem* pItem = mpItemList->GetObject( nPos );
- if ( !pItem->maHelpText.Len() && ( pItem->mnHelpId || pItem->maCommand.Len() ))
+ if ( !pItem->maHelpText.Len() && ( pItem->maHelpId.getLength() || pItem->maCommand.Len() ))
{
Help* pHelp = Application::GetHelp();
if ( pHelp )
{
if ( pItem->maCommand.Len() )
pItem->maHelpText = pHelp->GetHelpText( pItem->maCommand, this );
- if ( !pItem->maHelpText.Len() && pItem->mnHelpId )
- pItem->maHelpText = pHelp->GetHelpText( pItem->mnHelpId, this );
+ if ( !pItem->maHelpText.Len() && pItem->maHelpId.getLength() )
+ pItem->maHelpText = pHelp->GetHelpText( rtl::OStringToOUString( pItem->maHelpId, RTL_TEXTENCODING_UTF8 ), this );
}
}
@@ -1518,24 +1517,24 @@ const XubString& StatusBar::GetQuickHelpText( USHORT nItemId ) const
// -----------------------------------------------------------------------
-void StatusBar::SetHelpId( USHORT nItemId, ULONG nHelpId )
+void StatusBar::SetHelpId( USHORT nItemId, const rtl::OString& rHelpId )
{
USHORT nPos = GetItemPos( nItemId );
if ( nPos != STATUSBAR_ITEM_NOTFOUND )
- mpItemList->GetObject( nPos )->mnHelpId = nHelpId;
+ mpItemList->GetObject( nPos )->maHelpId = rHelpId;
}
// -----------------------------------------------------------------------
-ULONG StatusBar::GetHelpId( USHORT nItemId ) const
+rtl::OString StatusBar::GetHelpId( USHORT nItemId ) const
{
USHORT nPos = GetItemPos( nItemId );
+ rtl::OString aRet;
if ( nPos != STATUSBAR_ITEM_NOTFOUND )
- return mpItemList->GetObject( nPos )->mnHelpId;
- else
- return 0;
+ aRet = mpItemList->GetObject( nPos )->maHelpId;
+ return aRet;
}
// -----------------------------------------------------------------------
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 9ad0b8734437..561e03c83a7c 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -4821,15 +4821,15 @@ const XubString& ToolBox::ImplGetHelpText( USHORT nItemId ) const
if ( pItem )
{
- if ( !pItem->maHelpText.Len() && ( pItem->mnHelpId || pItem->maCommandStr.Len() ))
+ if ( !pItem->maHelpText.Len() && ( pItem->maHelpId.getLength() || pItem->maCommandStr.Len() ))
{
Help* pHelp = Application::GetHelp();
if ( pHelp )
{
if ( pItem->maCommandStr.Len() )
pItem->maHelpText = pHelp->GetHelpText( pItem->maCommandStr, this );
- if ( !pItem->maHelpText.Len() && pItem->mnHelpId )
- pItem->maHelpText = pHelp->GetHelpText( pItem->mnHelpId, this );
+ if ( !pItem->maHelpText.Len() && pItem->maHelpId.getLength() )
+ pItem->maHelpText = pHelp->GetHelpText( rtl::OStringToOUString( pItem->maHelpId, RTL_TEXTENCODING_UTF8 ), this );
}
}
@@ -4895,9 +4895,9 @@ void ToolBox::RequestHelp( const HelpEvent& rHEvt )
else if ( rHEvt.GetMode() & HELPMODE_EXTENDED )
{
String aCommand = GetItemCommand( nItemId );
- ULONG nHelpId = GetHelpId( nItemId );
+ rtl::OString aHelpId( GetHelpId( nItemId ) );
- if ( aCommand.Len() || nHelpId )
+ if ( aCommand.Len() || aHelpId.getLength() )
{
// Wenn eine Hilfe existiert, dann ausloesen
Help* pHelp = Application::GetHelp();
@@ -4905,8 +4905,8 @@ void ToolBox::RequestHelp( const HelpEvent& rHEvt )
{
if ( aCommand.Len() )
pHelp->Start( aCommand, this );
- else if ( nHelpId )
- pHelp->Start( nHelpId, this );
+ else if ( aHelpId.getLength() )
+ pHelp->Start( rtl::OStringToOUString( aHelpId, RTL_TEXTENCODING_UTF8 ), this );
}
return;
}
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 334cdd2d0a64..c9b8a6ab0f08 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -99,7 +99,6 @@ ImplToolItem::ImplToolItem()
mnId = 0;
mpWindow = NULL;
mpUserData = NULL;
- mnHelpId = 0;
meType = TOOLBOXITEM_BUTTON;
mnBits = 0;
meState = STATE_NOCHECK;
@@ -124,7 +123,6 @@ ImplToolItem::ImplToolItem( USHORT nItemId, const Image& rImage,
mnId = nItemId;
mpWindow = NULL;
mpUserData = NULL;
- mnHelpId = 0;
meType = TOOLBOXITEM_BUTTON;
mnBits = nItemBits;
meState = STATE_NOCHECK;
@@ -149,7 +147,6 @@ ImplToolItem::ImplToolItem( USHORT nItemId, const XubString& rText,
mnId = nItemId;
mpWindow = NULL;
mpUserData = NULL;
- mnHelpId = 0;
meType = TOOLBOXITEM_BUTTON;
mnBits = nItemBits;
meState = STATE_NOCHECK;
@@ -175,7 +172,6 @@ ImplToolItem::ImplToolItem( USHORT nItemId, const Image& rImage,
mnId = nItemId;
mpWindow = NULL;
mpUserData = NULL;
- mnHelpId = 0;
meType = TOOLBOXITEM_BUTTON;
mnBits = nItemBits;
meState = STATE_NOCHECK;
@@ -204,7 +200,7 @@ ImplToolItem::ImplToolItem( const ImplToolItem& rItem ) :
maQuickHelpText ( rItem.maQuickHelpText ),
maHelpText ( rItem.maHelpText ),
maCommandStr ( rItem.maCommandStr ),
- mnHelpId ( rItem.mnHelpId ),
+ maHelpId ( rItem.maHelpId ),
maRect ( rItem.maRect ),
maCalcRect ( rItem.maCalcRect ),
maItemSize ( rItem.maItemSize ),
@@ -243,7 +239,7 @@ ImplToolItem& ImplToolItem::operator=( const ImplToolItem& rItem )
maQuickHelpText = rItem.maQuickHelpText;
maHelpText = rItem.maHelpText;
maCommandStr = rItem.maCommandStr;
- mnHelpId = rItem.mnHelpId;
+ maHelpId = rItem.maHelpId;
maRect = rItem.maRect;
maCalcRect = rItem.maCalcRect;
mnSepSize = rItem.mnSepSize;
@@ -595,7 +591,7 @@ void ToolBox::InsertItem( const ResId& rResId, USHORT nPos )
aItem.mnBits = (ToolBoxItemBits)ReadLongRes();
if( nObjMask & RSC_TOOLBOXITEM_HELPID )
- aItem.mnHelpId = ReadLongRes();
+ aItem.maHelpId = ReadByteStringRes();
if ( nObjMask & RSC_TOOLBOXITEM_TEXT )
{
@@ -1923,24 +1919,26 @@ const XubString& ToolBox::GetHelpText( USHORT nItemId ) const
// -----------------------------------------------------------------------
-void ToolBox::SetHelpId( USHORT nItemId, ULONG nHelpId )
+void ToolBox::SetHelpId( USHORT nItemId, const rtl::OString& rHelpId )
{
ImplToolItem* pItem = ImplGetItem( nItemId );
if ( pItem )
- pItem->mnHelpId = nHelpId;
+ pItem->maHelpId = rHelpId;
}
// -----------------------------------------------------------------------
-ULONG ToolBox::GetHelpId( USHORT nItemId ) const
+rtl::OString ToolBox::GetHelpId( USHORT nItemId ) const
{
+ rtl::OString aRet;
+
ImplToolItem* pItem = ImplGetItem( nItemId );
if ( pItem )
- return pItem->mnHelpId;
- else
- return 0;
+ aRet = pItem->maHelpId;
+
+ return aRet;
}
// -----------------------------------------------------------------------
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index b47aa50a2e72..babf30015ef1 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -612,8 +612,6 @@ void Window::ImplInitWindowData( WindowType nType )
mpWindowImpl->mnX = 0; // X-Position to Parent
mpWindowImpl->mnY = 0; // Y-Position to Parent
mpWindowImpl->mnAbsScreenX = 0; // absolute X-position on screen, used for RTL window positioning
- mpWindowImpl->mnHelpId = 0; // help id
- mpWindowImpl->mnUniqId = 0; // unique id
mpWindowImpl->mpChildClipRegion = NULL; // Child-Clip-Region when ClipChildren
mpWindowImpl->mpPaintRegion = NULL; // Paint-ClipRegion
mpWindowImpl->mnStyle = 0; // style (init in ImplInitWindow)
@@ -1179,20 +1177,14 @@ void Window::ImplCallMove()
// -----------------------------------------------------------------------
-static ULONG ImplAutoHelpID( ResMgr* pResMgr )
+static rtl::OString ImplAutoHelpID( ResMgr* pResMgr )
{
- if ( !Application::IsAutoHelpIdEnabled() )
- return 0;
-
- ULONG nHID = 0;
+ rtl::OString aRet;
- DBG_ASSERT( pResMgr, "No res mgr for auto help id" );
- if( ! pResMgr )
- return 0;
+ if( pResMgr && Application::IsAutoHelpIdEnabled() )
+ aRet = pResMgr->GetAutoHelpId();
- nHID = pResMgr->GetAutoHelpId();
-
- return nHID;
+ return aRet;
}
// -----------------------------------------------------------------------
@@ -1212,22 +1204,21 @@ WinBits Window::ImplInitRes( const ResId& rResId )
void Window::ImplLoadRes( const ResId& rResId )
{
- // newer move this line after IncrementRes
- char* pRes = (char*)GetClassRes();
- pRes += 12;
- sal_uInt32 nHelpId = (sal_uInt32)GetLongRes( (void*)pRes );
- if ( !nHelpId )
- nHelpId = ImplAutoHelpID( rResId.GetResMgr() );
- SetHelpId( nHelpId );
-
ULONG nObjMask = ReadLongRes();
// ResourceStyle
ULONG nRSStyle = ReadLongRes();
// WinBits
ReadLongRes();
+
+
// HelpId
- ReadLongRes();
+ rtl::OString aHelpId;
+ if( nObjMask & WINDOW_HELPID )
+ aHelpId = ReadByteStringRes();
+ if( ! aHelpId.getLength() )
+ aHelpId = ImplAutoHelpID( rResId.GetResMgr() );
+ SetHelpId( aHelpId );
BOOL bPos = FALSE;
BOOL bSize = FALSE;
@@ -1294,7 +1285,7 @@ void Window::ImplLoadRes( const ResId& rResId )
if ( nObjMask & WINDOW_EXTRALONG )
SetData( (void*)ReadLongRes() );
if ( nObjMask & WINDOW_UNIQUEID )
- SetUniqueId( (ULONG)ReadLongRes() );
+ SetUniqueId( ReadByteStringRes() );
if ( nObjMask & WINDOW_BORDER_STYLE )
{
@@ -1323,8 +1314,6 @@ ImplWinData* Window::ImplGetWinData() const
mpWindowImpl->mpWinData->mbMouseOver = FALSE;
mpWindowImpl->mpWinData->mbEnableNativeWidget = (pNoNWF && *pNoNWF) ? FALSE : TRUE; // TRUE: try to draw this control with native theme API
mpWindowImpl->mpWinData->mpSalControlHandle = NULL;
- mpWindowImpl->mpWinData->mpSmartHelpId = NULL;
- mpWindowImpl->mpWinData->mpSmartUniqueId = NULL;
}
return mpWindowImpl->mpWinData;
@@ -4726,11 +4715,6 @@ Window::~Window()
delete mpWindowImpl->mpWinData->mpSalControlHandle;
mpWindowImpl->mpWinData->mpSalControlHandle = NULL;
- if ( mpWindowImpl->mpWinData->mpSmartHelpId )
- delete mpWindowImpl->mpWinData->mpSmartHelpId;
- if ( mpWindowImpl->mpWinData->mpSmartUniqueId )
- delete mpWindowImpl->mpWinData->mpSmartUniqueId;
-
delete mpWindowImpl->mpWinData;
}
@@ -4971,29 +4955,18 @@ void Window::RequestHelp( const HelpEvent& rHEvt )
}
else
{
- SmartId aSmartId = GetSmartHelpId();
-
- ULONG nNumHelpId = 0;
- String aStrHelpId;
- if( aSmartId.HasString() )
- aStrHelpId = aSmartId.GetStr();
- if( aSmartId.HasNumeric() )
- nNumHelpId = aSmartId.GetNum();
-
- if ( !nNumHelpId && aStrHelpId.Len() == 0 && ImplGetParent() )
+ String aStrHelpId( rtl::OStringToOUString( GetHelpId(), RTL_TEXTENCODING_UTF8 ) );
+ if ( aStrHelpId.Len() == 0 && ImplGetParent() )
ImplGetParent()->RequestHelp( rHEvt );
else
{
- if ( !nNumHelpId && aStrHelpId.Len() == 0 )
- nNumHelpId = OOO_HELP_INDEX;
-
Help* pHelp = Application::GetHelp();
if ( pHelp )
{
if( aStrHelpId.Len() > 0 )
pHelp->Start( aStrHelpId, this );
else
- pHelp->Start( nNumHelpId, this );
+ pHelp->Start( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OOO_HELP_INDEX ) ), this );
}
}
}
@@ -8122,32 +8095,22 @@ const XubString& Window::GetHelpText() const
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
- SmartId aSmartId = GetSmartHelpId();
-
- ULONG nNumHelpId = 0;
- String aStrHelpId;
- if( aSmartId.HasString() )
- aStrHelpId = aSmartId.GetStr();
- if( aSmartId.HasNumeric() )
- nNumHelpId = aSmartId.GetNum();
+ String aStrHelpId( rtl::OStringToOUString( GetHelpId(), RTL_TEXTENCODING_UTF8 ) );
bool bStrHelpId = (aStrHelpId.Len() > 0);
- if ( !mpWindowImpl->maHelpText.Len() && (nNumHelpId || bStrHelpId) )
+ if ( !mpWindowImpl->maHelpText.Len() && bStrHelpId )
{
if ( !IsDialog() && (mpWindowImpl->mnType != WINDOW_TABPAGE) && (mpWindowImpl->mnType != WINDOW_FLOATINGWINDOW) )
{
Help* pHelp = Application::GetHelp();
if ( pHelp )
{
- if( bStrHelpId )
- ((Window*)this)->mpWindowImpl->maHelpText = pHelp->GetHelpText( aStrHelpId, this );
- else
- ((Window*)this)->mpWindowImpl->maHelpText = pHelp->GetHelpText( nNumHelpId, this );
+ ((Window*)this)->mpWindowImpl->maHelpText = pHelp->GetHelpText( aStrHelpId, this );
mpWindowImpl->mbHelpTextDynamic = FALSE;
}
}
}
- else if( mpWindowImpl->mbHelpTextDynamic && (nNumHelpId || bStrHelpId) )
+ else if( mpWindowImpl->mbHelpTextDynamic && bStrHelpId )
{
static const char* pEnv = getenv( "HELP_DEBUG" );
if( pEnv && *pEnv )
@@ -8155,10 +8118,7 @@ const XubString& Window::GetHelpText() const
rtl::OUStringBuffer aTxt( 64+mpWindowImpl->maHelpText.Len() );
aTxt.append( mpWindowImpl->maHelpText );
aTxt.appendAscii( "\n------------------\n" );
- if( bStrHelpId )
- aTxt.append( rtl::OUString( aStrHelpId ) );
- else
- aTxt.append( sal_Int32( nNumHelpId ) );
+ aTxt.append( rtl::OUString( aStrHelpId ) );
mpWindowImpl->maHelpText = aTxt.makeStringAndClear();
}
mpWindowImpl->mbHelpTextDynamic = FALSE;
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index 02b2713b01cc..e5b58a8b6f3c 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -1442,115 +1442,31 @@ Window* Window::ImplGetTopmostFrameWindow()
return pTopmostParent->mpWindowImpl->mpFrameWindow;
}
-// making these Methods out of line to be able to change them lateron without complete rebuild
-// TODO: Set the SmartId in here and remove mpWindowImpl->mnHelpId
-void Window::SetHelpId( ULONG nHelpId )
+void Window::SetHelpId( const rtl::OString& rHelpId )
{
- SetSmartHelpId(SmartId(nHelpId));
+ mpWindowImpl->maHelpId = rHelpId;
}
-ULONG Window::GetHelpId() const
+const rtl::OString& Window::GetHelpId() const
{
- return mpWindowImpl->mnHelpId;
+ return mpWindowImpl->maHelpId;
}
-void Window::SetSmartHelpId( const SmartId& aId, SmartIdUpdateMode aMode )
+void Window::SetUniqueId( const rtl::OString& rUniqueId )
{
- // create SmartId if required
- if ( (aMode == SMART_SET_STR) || (aMode == SMART_SET_ALL) || ( (aMode == SMART_SET_SMART) && aId.HasString() ) )
- {
- if ( !ImplGetWinData()->mpSmartHelpId )
- ImplGetWinData()->mpSmartHelpId = new SmartId();
- }
-
- // if we have a SmartId (eather from earlier call or just created) fill with new values
- if ( mpWindowImpl->mpWinData && mpWindowImpl->mpWinData->mpSmartHelpId )
- ImplGetWinData()->mpSmartHelpId->UpdateId( aId, aMode );
-
- if ( (aMode == SMART_SET_NUM) || (aMode == SMART_SET_ALL) || ( (aMode == SMART_SET_SMART) && aId.HasNumeric() ) )
- {
- mpWindowImpl->mnHelpId = aId.GetNum();
- }
-}
-
-SmartId Window::GetSmartHelpId() const
-{
- if ( mpWindowImpl->mpWinData && mpWindowImpl->mpWinData->mpSmartHelpId )
- {
- if ( mpWindowImpl->mnHelpId || mpWindowImpl->mpWinData->mpSmartHelpId->HasNumeric() )
- mpWindowImpl->mpWinData->mpSmartHelpId->UpdateId( SmartId( mpWindowImpl->mnHelpId ), SMART_SET_NUM );
- return *mpWindowImpl->mpWinData->mpSmartHelpId;
- }
- else
- {
- if ( mpWindowImpl->mnHelpId )
- return SmartId( mpWindowImpl->mnHelpId );
- else
- return SmartId();
- }
-}
-
-
-// making these Methods out of line to be able to change them lateron without complete rebuild
-// TODO: Set the SmartId in here and remove mpWindowImpl->mnUniqId
-void Window::SetUniqueId( ULONG nUniqueId ) { mpWindowImpl->mnUniqId = nUniqueId; }
-ULONG Window::GetUniqueId() const { return mpWindowImpl->mnUniqId; }
-
-
-void Window::SetSmartUniqueId( const SmartId& aId, SmartIdUpdateMode aMode )
-{
- // create SmartId if required
- if ( (aMode == SMART_SET_STR) || (aMode == SMART_SET_ALL) || ( (aMode == SMART_SET_SMART) && aId.HasString() ) )
- {
- if ( !ImplGetWinData()->mpSmartUniqueId )
- ImplGetWinData()->mpSmartUniqueId = new SmartId();
- }
-
- // if we have a SmartId (eather from earlier call or just created) fill with new values
- if ( mpWindowImpl->mpWinData && mpWindowImpl->mpWinData->mpSmartUniqueId )
- ImplGetWinData()->mpSmartUniqueId->UpdateId( aId, aMode );
-
- if ( (aMode == SMART_SET_NUM) || (aMode == SMART_SET_ALL) || ( (aMode == SMART_SET_SMART) && aId.HasNumeric() ) )
- mpWindowImpl->mnUniqId = aId.GetNum();
+ mpWindowImpl->maUniqId = rUniqueId;
}
-SmartId Window::GetSmartUniqueId() const
+const rtl::OString& Window::GetUniqueId() const
{
- if ( mpWindowImpl->mpWinData && mpWindowImpl->mpWinData->mpSmartUniqueId )
- {
- if ( mpWindowImpl->mnUniqId || mpWindowImpl->mpWinData->mpSmartUniqueId->HasNumeric() )
- mpWindowImpl->mpWinData->mpSmartUniqueId->UpdateId( SmartId( mpWindowImpl->mnUniqId ), SMART_SET_NUM );
- return *mpWindowImpl->mpWinData->mpSmartUniqueId;
- }
- else
- {
- if ( mpWindowImpl->mnUniqId )
- return SmartId( mpWindowImpl->mnUniqId );
- else
- return SmartId();
- }
+ return mpWindowImpl->maUniqId;
}
-SmartId Window::GetSmartUniqueOrHelpId() const
+const rtl::OString& Window::GetUniqueOrHelpId() const
{
- if ( ( mpWindowImpl->mpWinData && mpWindowImpl->mpWinData->mpSmartHelpId ) || mpWindowImpl->mnHelpId )
- {
- if ( ( mpWindowImpl->mpWinData && mpWindowImpl->mpWinData->mpSmartUniqueId ) || mpWindowImpl->mnUniqId )
- {
- SmartId aTemp = GetSmartHelpId();
- aTemp.UpdateId( GetSmartUniqueId() );
- return aTemp;
- }
- else
- return GetSmartHelpId();
- }
- else
- return GetSmartUniqueId();
+ return mpWindowImpl->maUniqId.getLength() ? mpWindowImpl->maUniqId : mpWindowImpl->maHelpId;
}
-
-
-
// --------- old inline methods ---------------
Window* Window::ImplGetWindow()