summaryrefslogtreecommitdiff
path: root/cui/source/factory
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
parentaa7147590570dcb0813b6fcebb6496179b9df5cb (diff)
CWS changehid: #i111874#: change code to support HelpIds as byte strings
Diffstat (limited to 'cui/source/factory')
-rw-r--r--cui/source/factory/dlgfact.cxx56
-rw-r--r--cui/source/factory/dlgfact.hxx12
2 files changed, 28 insertions, 40 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 );
}
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 844439efbf61..d57057501fe0 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -414,9 +414,9 @@ class AbstractSvxNameDialog_Impl :public AbstractSvxNameDialog
DECL_ABSTDLG_BASE(AbstractSvxNameDialog_Impl,SvxNameDialog)
virtual void GetName( String& rName ) ;
virtual void SetCheckNameHdl( const Link& rLink, bool bCheckImmediately = false ) ;
- virtual void SetEditHelpId(ULONG nHelpId) ;
+ virtual void SetEditHelpId(const rtl::OString&) ;
//from class Window
- virtual void SetHelpId( ULONG nHelpId ) ;
+ virtual void SetHelpId( const rtl::OString& ) ;
virtual void SetText( const XubString& rStr ) ;
private:
Link aCheckNameHdl;
@@ -486,7 +486,7 @@ class AbstractSvxMultiFileDialog_Impl :public AbstractSvxMultiFileDialog
virtual void EnableRadioButtonMode();
virtual void SetTitle( const String& rNewTitle );
//From Class Window
- virtual void SetHelpId( ULONG nHelpId ) ;
+ virtual void SetHelpId( const rtl::OString& ) ;
};
//for SvxMultiFileDialog end
@@ -636,10 +636,10 @@ public:
const SfxItemSet& rAttr,
SvxDistributeHorizontal eHor = SvxDistributeHorizontalNone,
SvxDistributeVertical eVer = SvxDistributeVerticalNone);
- virtual SfxAbstractInsertObjectDialog* CreateInsertObjectDialog( Window* pParent, USHORT nSlotId,
+ virtual SfxAbstractInsertObjectDialog* CreateInsertObjectDialog( Window* pParent, const rtl::OUString& rCommmand,
const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& xStor,
const SvObjectServerList* pList = 0 );
- virtual VclAbstractDialog* CreateEditObjectDialog( Window* pParent, USHORT nSlotId,
+ virtual VclAbstractDialog* CreateEditObjectDialog( Window* pParent, const rtl::OUString& rCommmand,
const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject >& xObj );
virtual SfxAbstractPasteDialog* CreatePasteDialog( Window* pParent );
virtual SfxAbstractLinksDialog* CreateLinksDialog( Window* pParent, sfx2::LinkManager* pMgr, BOOL bHTML, sfx2::SvBaseLink* p=0 );
@@ -795,7 +795,7 @@ public:
virtual VclAbstractDialog* CreateOptionsDialog(
Window* pParent, const rtl::OUString& rExtensionId, const rtl::OUString& rApplicationContext );
- virtual SvxAbstractInsRowColDlg* CreateSvxInsRowColDlg( Window* pParent, bool bCol, ULONG nHelpId );
+ virtual SvxAbstractInsRowColDlg* CreateSvxInsRowColDlg( Window* pParent, bool bCol, const rtl::OString& sHelpId );
};
#endif