summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-01-06 11:22:44 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-01-06 11:46:14 +0000
commitea89ba42e2d09b074043b70f2d38b9f5b4684261 (patch)
treecf51ba91ac0072a43d4246a7f179cf6b505c9929 /basctl
parent8c51c5fa11bc09153bc3401045621b34fe21a0a4 (diff)
convert module and dialog tabpages to .ui
Change-Id: I2954a734b44be22d4d7ffae17480dde1c0ac64e7
Diffstat (limited to 'basctl')
-rw-r--r--basctl/UIConfig_basicide.mk2
-rw-r--r--basctl/inc/basidesh.hrc2
-rw-r--r--basctl/inc/helpid.hrc1
-rw-r--r--basctl/source/basicide/moduldl2.cxx1
-rw-r--r--basctl/source/basicide/moduldlg.cxx166
-rw-r--r--basctl/source/basicide/moduldlg.hrc58
-rw-r--r--basctl/source/basicide/moduldlg.hxx16
-rw-r--r--basctl/source/basicide/moduldlg.src110
-rw-r--r--basctl/uiconfig/basicide/ui/dialogpage.ui206
-rw-r--r--basctl/uiconfig/basicide/ui/modulepage.ui206
10 files changed, 514 insertions, 254 deletions
diff --git a/basctl/UIConfig_basicide.mk b/basctl/UIConfig_basicide.mk
index acdaf02e2ef4..ca9e9b5ab26e 100644
--- a/basctl/UIConfig_basicide.mk
+++ b/basctl/UIConfig_basicide.mk
@@ -31,11 +31,13 @@ $(eval $(call gb_UIConfig_add_toolbarfiles,modules/BasicIDE,\
$(eval $(call gb_UIConfig_add_uifiles,modules/BasicIDE,\
basctl/uiconfig/basicide/ui/basicmacrodialog \
basctl/uiconfig/basicide/ui/defaultlanguage \
+ basctl/uiconfig/basicide/ui/dialogpage \
basctl/uiconfig/basicide/ui/exportdialog \
basctl/uiconfig/basicide/ui/gotolinedialog \
basctl/uiconfig/basicide/ui/importlibdialog \
basctl/uiconfig/basicide/ui/libpage \
basctl/uiconfig/basicide/ui/managebreakpoints \
+ basctl/uiconfig/basicide/ui/modulepage \
basctl/uiconfig/basicide/ui/newlibdialog \
basctl/uiconfig/basicide/ui/organizedialog \
))
diff --git a/basctl/inc/basidesh.hrc b/basctl/inc/basidesh.hrc
index 14a7ce80ddb1..4fee05a021d3 100644
--- a/basctl/inc/basidesh.hrc
+++ b/basctl/inc/basidesh.hrc
@@ -30,8 +30,6 @@
#define RID_POPUP_BRKDLG ( RID_BASICIDE_START + 10 )
#define RID_POPUP_BRKPROPS ( RID_BASICIDE_START + 11 )
#define RID_POPUP_TABBAR ( RID_BASICIDE_START + 12 )
-#define RID_TP_MODULS ( RID_BASICIDE_START + 37 )
-#define RID_TP_DLGS ( RID_BASICIDE_START + 39 )
#define RID_POPUP_DLGED ( RID_BASICIDE_START + 62 )
#define RID_PRINTDLG_STRLIST ( RID_BASICIDE_START + 78 )
diff --git a/basctl/inc/helpid.hrc b/basctl/inc/helpid.hrc
index a23f1a8ed871..433a167f368c 100644
--- a/basctl/inc/helpid.hrc
+++ b/basctl/inc/helpid.hrc
@@ -24,7 +24,6 @@
#define HID_BASICIDE_MACROS "BASCTL_HID_BASICIDE_MACROS"
#define HID_BASICIDE_LIBS "BASCTL_HID_BASICIDE_LIBS"
-#define HID_BASICIDE_MODULES_TREE "BASCTL_HID_BASICIDE_MODULES_TREE"
#define HID_BASICIDE_OBJECTCAT "BASCTL_HID_BASICIDE_OBJECTCAT"
#define HID_BASICIDE_OBJCAT_SHOW "BASCTL_HID_BASICIDE_OBJCAT_SHOW"
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index 451cd4330715..a27cf45f7590 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -20,7 +20,6 @@
#include <vcl/layout.hxx>
#include <sot/storinfo.hxx>
-#include <moduldlg.hrc>
#include <moduldlg.hxx>
#include <basidesh.hrc>
#include <basidesh.hxx>
diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx
index 48bf93efbfb5..0d27f1bc9f66 100644
--- a/basctl/source/basicide/moduldlg.cxx
+++ b/basctl/source/basicide/moduldlg.cxx
@@ -19,7 +19,6 @@
#include "baside2.hrc"
#include "basidesh.hrc"
-#include "moduldlg.hrc"
#include "moduldlg.hxx"
#include "localizationmgr.hxx"
@@ -53,9 +52,24 @@ using namespace ::com::sun::star::resource;
// ==============
//
-ExtTreeListBox::ExtTreeListBox (Window* pParent, ResId const& rRes) :
- TreeListBox( pParent, rRes )
-{ }
+ExtTreeListBox::ExtTreeListBox(Window* pParent, ResId const& rRes)
+ : TreeListBox(pParent, rRes)
+{
+}
+
+ExtTreeListBox::ExtTreeListBox(Window* pParent, WinBits nStyle)
+ : TreeListBox(pParent, nStyle)
+{
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeExtTreeListBox(Window *pParent, VclBuilder::stringmap &rMap)
+{
+ WinBits nWinBits = WB_TABSTOP;
+ OString sBorder = VclBuilder::extractCustomProperty(rMap);
+ if (!sBorder.isEmpty())
+ nWinBits |= WB_BORDER;
+ return new ExtTreeListBox(pParent, nWinBits);
+}
ExtTreeListBox::~ExtTreeListBox ()
{ }
@@ -514,14 +528,14 @@ IMPL_LINK( OrganizeDialog, ActivatePageHdl, TabControl *, pTabCtrl )
TabPage* pNewTabPage = 0;
if (sPageName == "modules")
{
- ObjectPage* pObjectPage = new ObjectPage(pTabCtrl, IDEResId(RID_TP_MODULS), BROWSEMODE_MODULES);
+ ObjectPage* pObjectPage = new ObjectPage(pTabCtrl, "ModulePage", BROWSEMODE_MODULES);
pNewTabPage = pObjectPage;
pObjectPage->SetTabDlg(this);
pObjectPage->SetCurrentEntry(m_aCurEntry);
}
else if (sPageName == "dialogs")
{
- ObjectPage* pObjectPage = new ObjectPage( pTabCtrl, IDEResId( RID_TP_DLGS ), BROWSEMODE_DIALOGS );
+ ObjectPage* pObjectPage = new ObjectPage( pTabCtrl, "DialogPage", BROWSEMODE_DIALOGS );
pNewTabPage = pObjectPage;
pObjectPage->SetTabDlg(this);
pObjectPage->SetCurrentEntry(m_aCurEntry);
@@ -547,54 +561,58 @@ IMPL_LINK( OrganizeDialog, ActivatePageHdl, TabControl *, pTabCtrl )
// ==========
//
-ObjectPage::ObjectPage( Window * pParent, const ResId& rResId, sal_uInt16 nMode ) :
- TabPage( pParent, rResId ),
- aLibText( this, IDEResId( RID_STR_LIB ) ),
- aBasicBox( this, IDEResId( RID_TRLBOX ) ),
- aEditButton( this, IDEResId( RID_PB_EDIT ) ),
- aNewModButton( this, IDEResId( RID_PB_NEWMOD ) ),
- aNewDlgButton( this, IDEResId( RID_PB_NEWDLG ) ),
- aDelButton( this, IDEResId( RID_PB_DELETE ) )
+ObjectPage::ObjectPage(Window *pParent, const OString &rName, sal_uInt16 nMode)
+ : TabPage(pParent, rName, OUString("modules/BasicIDE/ui/") +
+ OStringToOUString(rName, RTL_TEXTENCODING_UTF8).toAsciiLowerCase() +
+ OUString(".ui"))
{
- FreeResource();
+ get(m_pBasicBox, "library");
+ Size aSize(m_pBasicBox->LogicToPixel(Size(130, 117), MAP_APPFONT));
+ m_pBasicBox->set_height_request(aSize.Height());
+ m_pBasicBox->set_width_request(aSize.Width());
+ get(m_pEditButton, "edit");
+ get(m_pNewModButton, "newmodule");
+ get(m_pNewDlgButton, "newdialog");
+ get(m_pDelButton, "delete");
+
pTabDlg = 0;
- aEditButton.SetClickHdl( LINK( this, ObjectPage, ButtonHdl ) );
- aDelButton.SetClickHdl( LINK( this, ObjectPage, ButtonHdl ) );
- aBasicBox.SetSelectHdl( LINK( this, ObjectPage, BasicBoxHighlightHdl ) );
+ m_pEditButton->SetClickHdl( LINK( this, ObjectPage, ButtonHdl ) );
+ m_pDelButton->SetClickHdl( LINK( this, ObjectPage, ButtonHdl ) );
+ m_pBasicBox->SetSelectHdl( LINK( this, ObjectPage, BasicBoxHighlightHdl ) );
if( nMode & BROWSEMODE_MODULES )
{
- aNewModButton.SetClickHdl( LINK( this, ObjectPage, ButtonHdl ) );
- aNewDlgButton.Hide();
+ m_pNewModButton->SetClickHdl( LINK( this, ObjectPage, ButtonHdl ) );
+ m_pNewDlgButton->Hide();
}
else if ( nMode & BROWSEMODE_DIALOGS )
{
- aNewDlgButton.SetClickHdl( LINK( this, ObjectPage, ButtonHdl ) );
- aNewModButton.Hide();
+ m_pNewDlgButton->SetClickHdl( LINK( this, ObjectPage, ButtonHdl ) );
+ m_pNewModButton->Hide();
}
- aBasicBox.SetDragDropMode( SV_DRAGDROP_CTRL_MOVE | SV_DRAGDROP_CTRL_COPY );
- aBasicBox.EnableInplaceEditing(true);
- aBasicBox.SetMode( nMode );
- aBasicBox.SetStyle( WB_BORDER | WB_TABSTOP |
+ m_pBasicBox->SetDragDropMode( SV_DRAGDROP_CTRL_MOVE | SV_DRAGDROP_CTRL_COPY );
+ m_pBasicBox->EnableInplaceEditing(true);
+ m_pBasicBox->SetMode( nMode );
+ m_pBasicBox->SetStyle( WB_BORDER | WB_TABSTOP |
WB_HASLINES | WB_HASLINESATROOT |
WB_HASBUTTONS | WB_HASBUTTONSATROOT |
WB_HSCROLL );
- aBasicBox.ScanAllEntries();
+ m_pBasicBox->ScanAllEntries();
- aEditButton.GrabFocus();
+ m_pEditButton->GrabFocus();
CheckButtons();
}
void ObjectPage::SetCurrentEntry (EntryDescriptor& rDesc)
{
- aBasicBox.SetCurrentEntry( rDesc );
+ m_pBasicBox->SetCurrentEntry( rDesc );
}
void ObjectPage::ActivatePage()
{
- aBasicBox.UpdateEntries();
+ m_pBasicBox->UpdateEntries();
}
void ObjectPage::DeactivatePage()
@@ -604,24 +622,24 @@ void ObjectPage::DeactivatePage()
void ObjectPage::CheckButtons()
{
// enable/disable edit button
- SvTreeListEntry* pCurEntry = aBasicBox.GetCurEntry();
- EntryDescriptor aDesc = aBasicBox.GetEntryDescriptor(pCurEntry);
+ SvTreeListEntry* pCurEntry = m_pBasicBox->GetCurEntry();
+ EntryDescriptor aDesc = m_pBasicBox->GetEntryDescriptor(pCurEntry);
ScriptDocument aDocument( aDesc.GetDocument() );
OUString aLibName( aDesc.GetLibName() );
OUString aLibSubName( aDesc.GetLibSubName() );
bool bVBAEnabled = aDocument.isInVBAMode();
- sal_uInt16 nMode = aBasicBox.GetMode();
+ sal_uInt16 nMode = m_pBasicBox->GetMode();
- sal_uInt16 nDepth = pCurEntry ? aBasicBox.GetModel()->GetDepth( pCurEntry ) : 0;
+ sal_uInt16 nDepth = pCurEntry ? m_pBasicBox->GetModel()->GetDepth( pCurEntry ) : 0;
if ( nDepth >= 2 )
{
if( bVBAEnabled && ( nMode & BROWSEMODE_MODULES ) && ( nDepth == 2 ) )
- aEditButton.Disable();
+ m_pEditButton->Disable();
else
- aEditButton.Enable();
+ m_pEditButton->Enable();
}
else
- aEditButton.Disable();
+ m_pEditButton->Disable();
// enable/disable new module/dialog buttons
LibraryLocation eLocation( aDesc.GetLocation() );
@@ -638,25 +656,25 @@ void ObjectPage::CheckButtons()
}
if ( bReadOnly || eLocation == LIBRARY_LOCATION_SHARE )
{
- aNewModButton.Disable();
- aNewDlgButton.Disable();
+ m_pNewModButton->Disable();
+ m_pNewDlgButton->Disable();
}
else
{
- aNewModButton.Enable();
- aNewDlgButton.Enable();
+ m_pNewModButton->Enable();
+ m_pNewDlgButton->Enable();
}
// enable/disable delete button
if ( nDepth >= 2 && !bReadOnly && eLocation != LIBRARY_LOCATION_SHARE )
{
if( bVBAEnabled && ( nMode & BROWSEMODE_MODULES ) && ( ( nDepth == 2 ) || aLibSubName == IDE_RESSTR(RID_STR_DOCUMENT_OBJECTS) ) )
- aDelButton.Disable();
+ m_pDelButton->Disable();
else
- aDelButton.Enable();
+ m_pDelButton->Enable();
}
else
- aDelButton.Disable();
+ m_pDelButton->Disable();
}
IMPL_LINK( ObjectPage, BasicBoxHighlightHdl, TreeListBox *, pBox )
@@ -670,18 +688,18 @@ IMPL_LINK( ObjectPage, BasicBoxHighlightHdl, TreeListBox *, pBox )
IMPL_LINK( ObjectPage, ButtonHdl, Button *, pButton )
{
- if ( pButton == &aEditButton )
+ if (pButton == m_pEditButton)
{
SfxAllItemSet aArgs( SFX_APP()->GetPool() );
SfxRequest aRequest( SID_BASICIDE_APPEAR, SFX_CALLMODE_SYNCHRON, aArgs );
SFX_APP()->ExecuteSlot( aRequest );
SfxDispatcher* pDispatcher = GetDispatcher();
- SvTreeListEntry* pCurEntry = aBasicBox.GetCurEntry();
+ SvTreeListEntry* pCurEntry = m_pBasicBox->GetCurEntry();
DBG_ASSERT( pCurEntry, "Entry?!" );
- if ( aBasicBox.GetModel()->GetDepth( pCurEntry ) >= 2 )
+ if ( m_pBasicBox->GetModel()->GetDepth( pCurEntry ) >= 2 )
{
- EntryDescriptor aDesc = aBasicBox.GetEntryDescriptor(pCurEntry);
+ EntryDescriptor aDesc = m_pBasicBox->GetEntryDescriptor(pCurEntry);
if ( pDispatcher )
{
OUString aModName( aDesc.GetName() );
@@ -692,15 +710,15 @@ IMPL_LINK( ObjectPage, ButtonHdl, Button *, pButton )
aModName = aModName.getToken( 0, ' ', nIndex );
}
SbxItem aSbxItem( SID_BASICIDE_ARG_SBX, aDesc.GetDocument(), aDesc.GetLibName(),
- aModName, aBasicBox.ConvertType( aDesc.GetType() ) );
+ aModName, m_pBasicBox->ConvertType( aDesc.GetType() ) );
pDispatcher->Execute( SID_BASICIDE_SHOWSBX, SFX_CALLMODE_SYNCHRON, &aSbxItem, 0L );
}
}
else // Nur Lib selektiert
{
- DBG_ASSERT( aBasicBox.GetModel()->GetDepth( pCurEntry ) == 1, "Kein LibEntry?!" );
+ DBG_ASSERT( m_pBasicBox->GetModel()->GetDepth( pCurEntry ) == 1, "Kein LibEntry?!" );
ScriptDocument aDocument( ScriptDocument::getApplicationScriptDocument() );
- SvTreeListEntry* pParentEntry = aBasicBox.GetParent( pCurEntry );
+ SvTreeListEntry* pParentEntry = m_pBasicBox->GetParent( pCurEntry );
if ( pParentEntry )
{
DocumentEntry* pDocumentEntry = (DocumentEntry*)pParentEntry->GetUserData();
@@ -708,7 +726,7 @@ IMPL_LINK( ObjectPage, ButtonHdl, Button *, pButton )
aDocument = pDocumentEntry->GetDocument();
}
SfxUsrAnyItem aDocItem( SID_BASICIDE_ARG_DOCUMENT_MODEL, makeAny( aDocument.getDocumentOrNull() ) );
- OUString aLibName( aBasicBox.GetEntryText( pCurEntry ) );
+ OUString aLibName( m_pBasicBox->GetEntryText( pCurEntry ) );
SfxStringItem aLibNameItem( SID_BASICIDE_ARG_LIBNAME, aLibName );
if ( pDispatcher )
{
@@ -717,11 +735,11 @@ IMPL_LINK( ObjectPage, ButtonHdl, Button *, pButton )
}
EndTabDialog( 1 );
}
- else if ( pButton == &aNewModButton )
+ else if (pButton == m_pNewModButton)
NewModule();
- else if ( pButton == &aNewDlgButton )
+ else if (pButton == m_pNewDlgButton)
NewDialog();
- else if ( pButton == &aDelButton )
+ else if (pButton == m_pDelButton)
DeleteCurrent();
return 0;
@@ -731,8 +749,8 @@ bool ObjectPage::GetSelection( ScriptDocument& rDocument, OUString& rLibName )
{
bool bRet = false;
- SvTreeListEntry* pCurEntry = aBasicBox.GetCurEntry();
- EntryDescriptor aDesc = aBasicBox.GetEntryDescriptor(pCurEntry);
+ SvTreeListEntry* pCurEntry = m_pBasicBox->GetCurEntry();
+ EntryDescriptor aDesc = m_pBasicBox->GetEntryDescriptor(pCurEntry);
rDocument = aDesc.GetDocument();
rLibName = aDesc.GetLibName();
if ( rLibName.isEmpty() )
@@ -785,7 +803,7 @@ void ObjectPage::NewModule()
{
OUString aModName;
createModImpl( static_cast<Window*>( this ), aDocument,
- aBasicBox, aLibName, aModName, true );
+ *m_pBasicBox, aLibName, aModName, true );
}
}
@@ -823,22 +841,22 @@ void ObjectPage::NewDialog()
pDispatcher->Execute( SID_BASICIDE_SBXINSERTED,
SFX_CALLMODE_SYNCHRON, &aSbxItem, 0L );
LibraryLocation eLocation = aDocument.getLibraryLocation( aLibName );
- SvTreeListEntry* pRootEntry = aBasicBox.FindRootEntry( aDocument, eLocation );
+ SvTreeListEntry* pRootEntry = m_pBasicBox->FindRootEntry( aDocument, eLocation );
if ( pRootEntry )
{
- if ( !aBasicBox.IsExpanded( pRootEntry ) )
- aBasicBox.Expand( pRootEntry );
- SvTreeListEntry* pLibEntry = aBasicBox.FindEntry( pRootEntry, aLibName, OBJ_TYPE_LIBRARY );
+ if ( !m_pBasicBox->IsExpanded( pRootEntry ) )
+ m_pBasicBox->Expand( pRootEntry );
+ SvTreeListEntry* pLibEntry = m_pBasicBox->FindEntry( pRootEntry, aLibName, OBJ_TYPE_LIBRARY );
DBG_ASSERT( pLibEntry, "Libeintrag nicht gefunden!" );
if ( pLibEntry )
{
- if ( !aBasicBox.IsExpanded( pLibEntry ) )
- aBasicBox.Expand( pLibEntry );
- SvTreeListEntry* pEntry = aBasicBox.FindEntry( pLibEntry, aDlgName, OBJ_TYPE_DIALOG );
+ if ( !m_pBasicBox->IsExpanded( pLibEntry ) )
+ m_pBasicBox->Expand( pLibEntry );
+ SvTreeListEntry* pEntry = m_pBasicBox->FindEntry( pLibEntry, aDlgName, OBJ_TYPE_DIALOG );
if ( !pEntry )
{
SAL_WNODEPRECATED_DECLARATIONS_PUSH
- pEntry = aBasicBox.AddEntry(
+ pEntry = m_pBasicBox->AddEntry(
aDlgName,
Image( IDEResId( RID_IMG_DIALOG ) ),
pLibEntry, false,
@@ -847,8 +865,8 @@ void ObjectPage::NewDialog()
SAL_WNODEPRECATED_DECLARATIONS_POP
DBG_ASSERT( pEntry, "InsertEntry fehlgeschlagen!" );
}
- aBasicBox.SetCurEntry( pEntry );
- aBasicBox.Select( aBasicBox.GetCurEntry() ); // OV-Bug?!
+ m_pBasicBox->SetCurEntry( pEntry );
+ m_pBasicBox->Select( m_pBasicBox->GetCurEntry() ); // OV-Bug?!
}
}
}
@@ -858,9 +876,9 @@ void ObjectPage::NewDialog()
void ObjectPage::DeleteCurrent()
{
- SvTreeListEntry* pCurEntry = aBasicBox.GetCurEntry();
+ SvTreeListEntry* pCurEntry = m_pBasicBox->GetCurEntry();
DBG_ASSERT( pCurEntry, "Kein aktueller Eintrag!" );
- EntryDescriptor aDesc( aBasicBox.GetEntryDescriptor( pCurEntry ) );
+ EntryDescriptor aDesc( m_pBasicBox->GetEntryDescriptor( pCurEntry ) );
ScriptDocument aDocument( aDesc.GetDocument() );
DBG_ASSERT( aDocument.isAlive(), "ObjectPage::DeleteCurrent: no document!" );
if ( !aDocument.isAlive() )
@@ -872,12 +890,12 @@ void ObjectPage::DeleteCurrent()
if ( ( eType == OBJ_TYPE_MODULE && QueryDelModule( aName, this ) ) ||
( eType == OBJ_TYPE_DIALOG && QueryDelDialog( aName, this ) ) )
{
- aBasicBox.GetModel()->Remove( pCurEntry );
- if ( aBasicBox.GetCurEntry() ) // OV-Bug ?
- aBasicBox.Select( aBasicBox.GetCurEntry() );
+ m_pBasicBox->GetModel()->Remove( pCurEntry );
+ if ( m_pBasicBox->GetCurEntry() ) // OV-Bug ?
+ m_pBasicBox->Select( m_pBasicBox->GetCurEntry() );
if (SfxDispatcher* pDispatcher = GetDispatcher())
{
- SbxItem aSbxItem( SID_BASICIDE_ARG_SBX, aDocument, aLibName, aName, aBasicBox.ConvertType( eType ) );
+ SbxItem aSbxItem( SID_BASICIDE_ARG_SBX, aDocument, aLibName, aName, m_pBasicBox->ConvertType( eType ) );
pDispatcher->Execute( SID_BASICIDE_SBXDELETED,
SFX_CALLMODE_SYNCHRON, &aSbxItem, 0L );
}
diff --git a/basctl/source/basicide/moduldlg.hrc b/basctl/source/basicide/moduldlg.hrc
deleted file mode 100644
index acbc5422f24b..000000000000
--- a/basctl/source/basicide/moduldlg.hrc
+++ /dev/null
@@ -1,58 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef BASCTL_MODULDLG_HRC
-#define BASCTL_MODULDLG_HRC
-
-#include <svl/solar.hrc>
-
-#define RID_STR_LIB 1
-#define RID_TRLBOX 2
-// free
-#define RID_PB_EDIT 4
-
-#define RID_PB_NEWMOD 6
-#define RID_PB_NEWDLG 7
-#define RID_PB_DELETE 8
-#define RID_PB_NEWLIB 9
-#define RID_PB_APPEND 10
-#define RID_PB_PASSWORD 11
-#define RID_LB_BASICS 12
-#define RID_STR_BASICS 13
-
-#define RID_PB_EXPORT 14
-
-#define RID_TC_ORGANIZE 30
-
-#define RID_PB_OK 31
-#define RID_PB_CANCEL 32
-#define RID_CTRL_LIBS 33
-#define RID_FL_OPTIONS 34
-#define RID_CB_REF 35
-#define RID_CB_REPL 36
-#define RID_FT_STORAGENAME 38
-
-#define RID_FT_NEWLIB 40
-#define RID_ED_LIBNAME 41
-#define RB_EXPORTASPACKAGE 42
-#define RB_EXPORTASBASIC 43
-
-#endif // BASCTL_MODULDLG_HRC
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basctl/source/basicide/moduldlg.hxx b/basctl/source/basicide/moduldlg.hxx
index 6a486416bb67..e755b74423fb 100644
--- a/basctl/source/basicide/moduldlg.hxx
+++ b/basctl/source/basicide/moduldlg.hxx
@@ -111,7 +111,8 @@ protected:
SvTreeListEntry*& rpNewParent, sal_uLong& rNewChildPos, sal_Bool bMove );
public:
- ExtTreeListBox( Window* pParent, const ResId& rRes );
+ ExtTreeListBox(Window* pParent, const ResId& rRes);
+ ExtTreeListBox(Window* pParent, WinBits nStyle);
~ExtTreeListBox();
};
@@ -182,12 +183,11 @@ public:
class ObjectPage: public TabPage
{
protected:
- FixedText aLibText;
- ExtTreeListBox aBasicBox;
- PushButton aEditButton;
- PushButton aNewModButton;
- PushButton aNewDlgButton;
- PushButton aDelButton;
+ ExtTreeListBox* m_pBasicBox;
+ PushButton* m_pEditButton;
+ PushButton* m_pNewModButton;
+ PushButton* m_pNewDlgButton;
+ PushButton* m_pDelButton;
DECL_LINK( BasicBoxHighlightHdl, TreeListBox * );
DECL_LINK( ButtonHdl, Button * );
@@ -204,7 +204,7 @@ protected:
virtual void DeactivatePage();
public:
- ObjectPage( Window* pParent, const ResId& rResId, sal_uInt16 nMode );
+ ObjectPage(Window* pParent, const OString& rName, sal_uInt16 nMode);
void SetCurrentEntry( EntryDescriptor& rDesc );
void SetTabDlg( TabDialog* p ) { pTabDlg = p;}
diff --git a/basctl/source/basicide/moduldlg.src b/basctl/source/basicide/moduldlg.src
index 0b417933eede..190778663fb3 100644
--- a/basctl/source/basicide/moduldlg.src
+++ b/basctl/source/basicide/moduldlg.src
@@ -18,118 +18,8 @@
*/
#include "helpid.hrc"
-#include <moduldlg.hrc>
#include <basidesh.hrc>
-TabPage RID_TP_MODULS
-{
- HelpId = "basctl:TabPage:RID_TP_MODULS" ;
- Hide = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 210 , 140 ) ;
- FixedText RID_STR_LIB
- {
- Pos = MAP_APPFONT ( 6 , 6 ) ;
- Size = MAP_APPFONT ( 130 , 10 ) ;
- Text [ en-US ] = "M~odule" ;
- };
- Control RID_TRLBOX
- {
- HelpId = HID_BASICIDE_MODULES_TREE ;
- Pos = MAP_APPFONT ( 6 , 17 ) ;
- Size = MAP_APPFONT ( 130 , 117 ) ;
- TabStop = TRUE ;
- Border = TRUE ;
- };
- PushButton RID_PB_EDIT
- {
- HelpID = "basctl:PushButton:RID_TP_MODULS:RID_PB_EDIT";
- Text [ en-US ] = "~Edit";
- Pos = MAP_APPFONT ( 144 , 6 ) ;
- Size = MAP_APPFONT ( 60 , 14 ) ;
- TabStop = TRUE ;
- DefButton = TRUE ;
- };
- PushButton RID_PB_NEWMOD
- {
- HelpID = "basctl:PushButton:RID_TP_MODULS:RID_PB_NEWMOD";
- Pos = MAP_APPFONT ( 144 , 103 ) ;
- Size = MAP_APPFONT ( 60 , 14 ) ;
- Text [ en-US ] = "~New..." ;
- TabStop = TRUE ;
- };
- PushButton RID_PB_NEWDLG
- {
- HelpID = "basctl:PushButton:RID_TP_MODULS:RID_PB_NEWDLG";
- Pos = MAP_APPFONT ( 144 , 103 ) ;
- Size = MAP_APPFONT ( 60 , 14 ) ;
- Text [ en-US ] = "~New..." ;
- TabStop = TRUE ;
- };
- PushButton RID_PB_DELETE
- {
- HelpID = "basctl:PushButton:RID_TP_MODULS:RID_PB_DELETE";
- Pos = MAP_APPFONT ( 144 , 120 ) ;
- Size = MAP_APPFONT ( 60 , 14 ) ;
- Text [ en-US ] = "~Delete" ;
- TabStop = TRUE ;
- };
-};
-TabPage RID_TP_DLGS
-{
- HelpID = "basctl:TabPage:RID_TP_DLGS";
- Hide = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 210 , 140 ) ;
- FixedText RID_STR_LIB
- {
- Pos = MAP_APPFONT ( 6 , 6 ) ;
- Size = MAP_APPFONT ( 130 , 10 ) ;
- Text [ en-US ] = "Dialog" ;
- };
- Control RID_TRLBOX
- {
- HelpId = HID_BASICIDE_MODULES_TREE ;
- Pos = MAP_APPFONT ( 6 , 17 ) ;
- Size = MAP_APPFONT ( 130 , 117 ) ;
- TabStop = TRUE ;
- Border = TRUE ;
- };
- PushButton RID_PB_EDIT
- {
- HelpID = "basctl:PushButton:RID_TP_DLGS:RID_PB_EDIT";
- Text [ en-US ] = "~Edit";
- Pos = MAP_APPFONT ( 144 , 6 ) ;
- Size = MAP_APPFONT ( 60 , 14 ) ;
- TabStop = TRUE ;
- DefButton = TRUE ;
- };
- PushButton RID_PB_NEWMOD
- {
- HelpID = "basctl:PushButton:RID_TP_DLGS:RID_PB_NEWMOD";
- Pos = MAP_APPFONT ( 144 , 103 ) ;
- Size = MAP_APPFONT ( 60 , 14 ) ;
- Text [ en-US ] = "~New..." ;
- TabStop = TRUE ;
- };
- PushButton RID_PB_NEWDLG
- {
- HelpID = "basctl:PushButton:RID_TP_DLGS:RID_PB_NEWDLG";
- Pos = MAP_APPFONT ( 144 , 103 ) ;
- Size = MAP_APPFONT ( 60 , 14 ) ;
- Text [ en-US ] = "~New..." ;
- TabStop = TRUE ;
- };
- PushButton RID_PB_DELETE
- {
- HelpID = "basctl:PushButton:RID_TP_DLGS:RID_PB_DELETE";
- Pos = MAP_APPFONT ( 144 , 120 ) ;
- Size = MAP_APPFONT ( 60 , 14 ) ;
- Text [ en-US ] = "~Delete" ;
- TabStop = TRUE ;
- };
-};
-
String RID_STR_EXPORTPACKAGE
{
Text [ en-US ] = "Export library as extension";
diff --git a/basctl/uiconfig/basicide/ui/dialogpage.ui b/basctl/uiconfig/basicide/ui/dialogpage.ui
new file mode 100644
index 000000000000..b2c1ad7e46e7
--- /dev/null
+++ b/basctl/uiconfig/basicide/ui/dialogpage.ui
@@ -0,0 +1,206 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.0 on Mon Jan 6 11:33:55 2014 -->
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <!-- interface-requires LibreOffice 1.0 -->
+ <object class="GtkGrid" id="DialogPage">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="row_spacing">12</property>
+ <child>
+ <object class="GtkGrid" id="grid2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="row_spacing">12</property>
+ <property name="column_spacing">12</property>
+ <child>
+ <object class="GtkGrid" id="grid3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Dialog</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">library:border</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="basctllo-ExtTreeListBox" id="library:border">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="CheckBox List-selection1"/>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButtonBox" id="buttonbox1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <property name="layout_style">start</property>
+ <child>
+ <object class="GtkButton" id="edit">
+ <property name="label">gtk-edit</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="newmodule">
+ <property name="label" translatable="yes">_New...</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ <property name="secondary">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="newdialog">
+ <property name="label" translatable="yes">_New...</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ <property name="secondary">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="delete">
+ <property name="label">gtk-delete</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ <property name="secondary">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="password">
+ <property name="label" translatable="yes">_Password...</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="no_show_all">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="import">
+ <property name="label" translatable="yes">_Import...</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="no_show_all">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">5</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="export">
+ <property name="label" translatable="yes">_Export...</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="no_show_all">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">6</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ <object class="GtkSizeGroup" id="sizegroup1">
+ <widgets>
+ <widget name="edit"/>
+ <widget name="newmodule"/>
+ <widget name="newdialog"/>
+ <widget name="delete"/>
+ <widget name="password"/>
+ <widget name="import"/>
+ <widget name="export"/>
+ </widgets>
+ </object>
+</interface>
diff --git a/basctl/uiconfig/basicide/ui/modulepage.ui b/basctl/uiconfig/basicide/ui/modulepage.ui
new file mode 100644
index 000000000000..100058779f73
--- /dev/null
+++ b/basctl/uiconfig/basicide/ui/modulepage.ui
@@ -0,0 +1,206 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.0 on Mon Jan 6 11:33:29 2014 -->
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <!-- interface-requires LibreOffice 1.0 -->
+ <object class="GtkGrid" id="ModulePage">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="row_spacing">12</property>
+ <child>
+ <object class="GtkGrid" id="grid2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="row_spacing">12</property>
+ <property name="column_spacing">12</property>
+ <child>
+ <object class="GtkGrid" id="grid3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">M_odule</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">library:border</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="basctllo-ExtTreeListBox" id="library:border">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="CheckBox List-selection1"/>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButtonBox" id="buttonbox1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <property name="layout_style">start</property>
+ <child>
+ <object class="GtkButton" id="edit">
+ <property name="label">gtk-edit</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="newmodule">
+ <property name="label" translatable="yes">_New...</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ <property name="secondary">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="newdialog">
+ <property name="label" translatable="yes">_New...</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ <property name="secondary">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="delete">
+ <property name="label">gtk-delete</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ <property name="secondary">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="password">
+ <property name="label" translatable="yes">_Password...</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="no_show_all">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="import">
+ <property name="label" translatable="yes">_Import...</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="no_show_all">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">5</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="export">
+ <property name="label" translatable="yes">_Export...</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="no_show_all">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">6</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ <object class="GtkSizeGroup" id="sizegroup1">
+ <widgets>
+ <widget name="edit"/>
+ <widget name="newmodule"/>
+ <widget name="newdialog"/>
+ <widget name="delete"/>
+ <widget name="password"/>
+ <widget name="import"/>
+ <widget name="export"/>
+ </widgets>
+ </object>
+</interface>