summaryrefslogtreecommitdiff
path: root/cui/source/dialogs
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-10-10 22:27:52 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-10-11 09:21:42 +0100
commit258483a58e49733b80745ffd97ba5b27a125da19 (patch)
tree4cb9b8d36455d128fc4379f51bd29b54a7eebba4 /cui/source/dialogs
parentf9775fcbe8454539ddb0e0576159c2e609b03b0c (diff)
convert insert plugin to .ui
Change-Id: I229b152ba132329ca20cff0afd4f84e1c052b97f
Diffstat (limited to 'cui/source/dialogs')
-rw-r--r--cui/source/dialogs/insdlg.cxx36
-rw-r--r--cui/source/dialogs/svuidlg.hrc7
-rw-r--r--cui/source/dialogs/svuidlg.src60
3 files changed, 20 insertions, 83 deletions
diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx
index b221f4e31d1d..43786ca67ede 100644
--- a/cui/source/dialogs/insdlg.cxx
+++ b/cui/source/dialogs/insdlg.cxx
@@ -39,13 +39,13 @@
#include <tools/urlobj.hxx>
#include <tools/debug.hxx>
#include <svl/urihelper.hxx>
-#include <svtools/svmedit.hxx>
#include <vcl/button.hxx>
#include <vcl/fixed.hxx>
#include <vcl/group.hxx>
#include <vcl/lstbox.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/svapp.hxx>
+#include <vcl/vclmedit.hxx>
#include <sot/clsids.hxx>
#include <sfx2/frmdescr.hxx>
#include <sfx2/viewsh.hxx>
@@ -98,6 +98,15 @@ InsertObjectDialog_Impl::InsertObjectDialog_Impl( Window * pParent, const ResId
{
}
+InsertObjectDialog_Impl::InsertObjectDialog_Impl(Window * pParent, const OString& rID,
+ const OUString& rUIXMLDescription,
+ const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& xStorage)
+ : ModalDialog(pParent, rID, rUIXMLDescription)
+ , m_xStorage( xStorage )
+ , aCnt( m_xStorage )
+{
+}
+
// -----------------------------------------------------------------------
IMPL_LINK_NOARG_INLINE_START(SvInsertOleDlg, DoubleClickHdl)
@@ -411,7 +420,7 @@ IMPL_LINK_NOARG(SvInsertPlugInDialog, BrowseHdl)
{
Sequence< OUString > aPathSeq( xFilePicker->getFiles() );
INetURLObject aObj( aPathSeq[0] );
- aEdFileurl.SetText( aObj.PathToFileName() );
+ m_pEdFileurl->SetText(aObj.PathToFileName());
}
}
}
@@ -421,20 +430,15 @@ IMPL_LINK_NOARG(SvInsertPlugInDialog, BrowseHdl)
// -----------------------------------------------------------------------
-SvInsertPlugInDialog::SvInsertPlugInDialog( Window* pParent, const uno::Reference < embed::XStorage >& xStorage )
- : InsertObjectDialog_Impl( pParent, CUI_RES( MD_INSERT_OBJECT_PLUGIN ), xStorage ),
- aGbFileurl( this, CUI_RES( GB_FILEURL ) ),
- aEdFileurl( this, CUI_RES( ED_FILEURL ) ),
- aBtnFileurl( this, CUI_RES( BTN_FILEURL ) ),
- aGbPluginsOptions( this, CUI_RES( GB_PLUGINS_OPTIONS ) ),
- aEdPluginsOptions( this, CUI_RES( ED_PLUGINS_OPTIONS ) ),
- aOKButton1( this, CUI_RES( 1 ) ),
- aCancelButton1( this, CUI_RES( 1 ) ),
- aHelpButton1( this, CUI_RES( 1 ) ),
- m_pURL(0)
+SvInsertPlugInDialog::SvInsertPlugInDialog(Window* pParent,
+ const uno::Reference < embed::XStorage >& xStorage)
+ : InsertObjectDialog_Impl(pParent, "InsertPluginDialog", "cui/ui/insertplugin.ui", xStorage)
+ , m_pURL(0)
{
- FreeResource();
- aBtnFileurl.SetClickHdl( LINK( this, SvInsertPlugInDialog, BrowseHdl ) );
+ get(m_pEdFileurl, "urled");
+ get(m_pBtnFileurl, "urlbtn");
+ get(m_pEdPluginsOptions, "pluginoptions");
+ m_pBtnFileurl->SetClickHdl(LINK(this, SvInsertPlugInDialog, BrowseHdl));
}
SvInsertPlugInDialog::~SvInsertPlugInDialog()
@@ -464,7 +468,7 @@ static void Plugin_ImplFillCommandSequence( const String& aCommands, uno::Sequen
short SvInsertPlugInDialog::Execute()
{
short nRet = RET_OK;
- m_aCommands.Erase();
+ m_aCommands = OUString();
DBG_ASSERT( m_xStorage.is(), "No storage!");
if ( m_xStorage.is() && ( nRet = Dialog::Execute() ) == RET_OK )
{
diff --git a/cui/source/dialogs/svuidlg.hrc b/cui/source/dialogs/svuidlg.hrc
index a41e84247f6a..17e3ad4ad44e 100644
--- a/cui/source/dialogs/svuidlg.hrc
+++ b/cui/source/dialogs/svuidlg.hrc
@@ -73,13 +73,6 @@
#define BTN_FILEPATH 11
#define CB_FILELINK 12
-#define MD_INSERT_OBJECT_PLUGIN 32008
-#define ED_FILEURL 10
-#define BTN_FILEURL 11
-#define GB_FILEURL 12
-#define ED_PLUGINS_OPTIONS 20
-#define GB_PLUGINS_OPTIONS 21
-
#define MD_INSERT_OBJECT_APPLET 32009
#define FT_CLASSFILE 10
#define ED_CLASSFILE 11
diff --git a/cui/source/dialogs/svuidlg.src b/cui/source/dialogs/svuidlg.src
index f1f97034fcce..af30d3a71a94 100644
--- a/cui/source/dialogs/svuidlg.src
+++ b/cui/source/dialogs/svuidlg.src
@@ -385,66 +385,6 @@ ModalDialog MD_INSERT_OLEOBJECT
};
Text [ en-US ] = "Insert OLE Object" ;
};
-ModalDialog MD_INSERT_OBJECT_PLUGIN
-{
- HelpID = "cui:ModalDialog:MD_INSERT_OBJECT_PLUGIN";
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 284 , 123 ) ;
- Moveable = TRUE ;
- Edit ED_FILEURL
- {
- HelpID = "cui:Edit:MD_INSERT_OBJECT_PLUGIN:ED_FILEURL";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 12 , 14 ) ;
- Size = MAP_APPFONT ( 204 , 12 ) ;
- };
- PushButton BTN_FILEURL
- {
- HelpID = "cui:PushButton:MD_INSERT_OBJECT_PLUGIN:BTN_FILEURL";
- Pos = MAP_APPFONT ( 166 , 29 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- Text [ en-US ] = "~Browse..." ;
- };
- FixedLine GB_FILEURL
- {
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( 216 , 8 ) ;
- Text [ en-US ] = "File / URL" ;
- };
- MultiLineEdit ED_PLUGINS_OPTIONS
- {
- HelpID = "cui:MultiLineEdit:MD_INSERT_OBJECT_PLUGIN:ED_PLUGINS_OPTIONS";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 12 , 66 ) ;
- Size = MAP_APPFONT ( 204 , 45 ) ;
- VScroll = TRUE ;
- IgnoreTab = TRUE;
- };
- FixedLine GB_PLUGINS_OPTIONS
- {
- Pos = MAP_APPFONT ( 6 , 55 ) ;
- Size = MAP_APPFONT ( 216 , 8 ) ;
- Text [ en-US ] = "Options" ;
- };
- OKButton 1
- {
- Pos = MAP_APPFONT ( 228 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- DefButton = TRUE ;
- };
- CancelButton 1
- {
- Pos = MAP_APPFONT ( 228 , 23 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- };
- HelpButton 1
- {
- Pos = MAP_APPFONT ( 228 , 43 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- };
- Text [ en-US ] = "Insert Plug-in" ;
-};
ModalDialog MD_INSERT_OBJECT_APPLET
{
HelpID = "cui:ModalDialog:MD_INSERT_OBJECT_APPLET";