summaryrefslogtreecommitdiff
path: root/cui/source/factory/dlgfact.cxx
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2010-07-10 18:21:24 +0200
committerMathias Bauer <mba@openoffice.org>2010-07-10 18:21:24 +0200
commitc61aa274cb5631305cfbaea6f1894db756e911c8 (patch)
tree7ba0d80cc7314143cf37d016e0e15c558781cec5 /cui/source/factory/dlgfact.cxx
parentaa7147590570dcb0813b6fcebb6496179b9df5cb (diff)
CWS changehid: #i111874#: change code to support HelpIds as byte strings
Diffstat (limited to 'cui/source/factory/dlgfact.cxx')
-rw-r--r--cui/source/factory/dlgfact.cxx56
1 files changed, 22 insertions, 34 deletions
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 91ec831ab5dc..00412e7bf400 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -723,15 +723,13 @@ void AbstractSvxNameDialog_Impl::SetCheckNameHdl( const Link& rLink, bool bCheck
else
pDlg->SetCheckNameHdl( Link(), bCheckImmediately );
}
-void AbstractSvxNameDialog_Impl::SetEditHelpId(ULONG nHelpId)
+void AbstractSvxNameDialog_Impl::SetEditHelpId(const rtl::OString& aHelpId)
{
- pDlg->SetEditHelpId( nHelpId );
+ pDlg->SetEditHelpId( aHelpId );
}
-void AbstractSvxNameDialog_Impl::SetHelpId( ULONG nHelpId )
+void AbstractSvxNameDialog_Impl::SetHelpId( const rtl::OString& aHelpId )
{
- // FIXME: HELPID
- pDlg->SetHelpId( ""/*nHelpId*/ );
- (void)nHelpId;
+ pDlg->SetHelpId( aHelpId );
}
void AbstractSvxNameDialog_Impl::SetText( const XubString& rStr )
{
@@ -843,11 +841,9 @@ void AbstractSvxMultiFileDialog_Impl::SetTitle( const String& rNewTitle )
pDlg->SetText( rNewTitle );
}
-void AbstractSvxMultiFileDialog_Impl::SetHelpId( ULONG nHelpId )
+void AbstractSvxMultiFileDialog_Impl::SetHelpId( const rtl::OString& aHelpId )
{
- // FIXME: HELPID
- pDlg->SetHelpId( ""/*nHelpId*/ );
- (void)nHelpId;
+ pDlg->SetHelpId( aHelpId );
}
Window * AbstractSvxHpLinkDlg_Impl::GetWindow()
@@ -1877,49 +1873,41 @@ GetTabPageRanges AbstractDialogFactory_Impl::GetTabPageRangesFunc( USHORT nId )
return 0;
}
-SfxAbstractInsertObjectDialog* AbstractDialogFactory_Impl::CreateInsertObjectDialog( Window* pParent, USHORT nSlotId,
+SfxAbstractInsertObjectDialog* AbstractDialogFactory_Impl::CreateInsertObjectDialog( Window* pParent, const rtl::OUString& rCommand,
const Reference < com::sun::star::embed::XStorage >& xStor,
const SvObjectServerList* pList )
{
InsertObjectDialog_Impl* pDlg=0;
- switch ( nSlotId )
- {
- case SID_INSERT_OBJECT : pDlg = new SvInsertOleDlg( pParent, xStor, pList ); break;
- case SID_INSERT_PLUGIN : pDlg = new SvInsertPlugInDialog( pParent, xStor ); break;
- case SID_INSERT_APPLET : pDlg = new SvInsertAppletDialog( pParent, xStor ); break;
- case SID_INSERT_FLOATINGFRAME : pDlg = new SfxInsertFloatingFrameDialog( pParent, xStor ); break;
- default: break;
- }
+ if ( rCommand.equalsAscii(".uno:InsertObject" ) )
+ pDlg = new SvInsertOleDlg( pParent, xStor, pList );
+ else if ( rCommand.equalsAscii(".uno:InsertPlugin" ) )
+ pDlg = new SvInsertPlugInDialog( pParent, xStor );
+ else if ( rCommand.equalsAscii(".uno:InsertObjectFloatingFrame" ) )
+ pDlg = new SfxInsertFloatingFrameDialog( pParent, xStor );
if ( pDlg )
{
- // FIXME: HELPID
- pDlg->SetHelpId( ""/*nSlotId*/ );
+ pDlg->SetHelpId( rtl::OString( rCommand, rCommand.getLength(), RTL_TEXTENCODING_UTF8 ) );
return new AbstractInsertObjectDialog_Impl( pDlg );
}
return 0;
}
-VclAbstractDialog* AbstractDialogFactory_Impl::CreateEditObjectDialog( Window* pParent, USHORT nSlotId,
+VclAbstractDialog* AbstractDialogFactory_Impl::CreateEditObjectDialog( Window* pParent, const rtl::OUString& rCommand,
const Reference < com::sun::star::embed::XEmbeddedObject >& xObj )
{
InsertObjectDialog_Impl* pDlg=0;
- switch ( nSlotId )
- {
- case SID_INSERT_APPLET : pDlg = new SvInsertAppletDialog( pParent, xObj ); break;
- case SID_INSERT_FLOATINGFRAME : pDlg = new SfxInsertFloatingFrameDialog( pParent, xObj ); break;
- default: break;
- }
-
- if ( pDlg )
+ if ( rCommand.equalsAscii(".uno:InsertObjectFloatingFrame" ) )
{
- // FIXME: HELPID
- pDlg->SetHelpId( ""/*nSlotId*/ );
+ pDlg = new SfxInsertFloatingFrameDialog( pParent, xObj );
+ pDlg->SetHelpId( rtl::OString( rCommand, rCommand.getLength(), RTL_TEXTENCODING_UTF8 ) );
return new VclAbstractDialog_Impl( pDlg );
}
return 0;
}
+
+
SfxAbstractPasteDialog* AbstractDialogFactory_Impl::CreatePasteDialog( Window* pParent )
{
return new AbstractPasteDialog_Impl( new SvPasteObjectDialog( pParent ) );
@@ -1954,7 +1942,7 @@ VclAbstractDialog* AbstractDialogFactory_Impl::CreateOptionsDialog(
return new VclAbstractDialog_Impl( new OfaTreeOptionsDialog( pParent, rExtensionId ) );
}
-SvxAbstractInsRowColDlg* AbstractDialogFactory_Impl::CreateSvxInsRowColDlg( Window* pParent, bool bCol, ULONG nHelpId )
+SvxAbstractInsRowColDlg* AbstractDialogFactory_Impl::CreateSvxInsRowColDlg( Window* pParent, bool bCol, const rtl::OString& sHelpId )
{
- return new SvxInsRowColDlg( pParent, bCol, nHelpId );
+ return new SvxInsRowColDlg( pParent, bCol, sHelpId );
}