summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sfx2/source/inc/cfg.hxx13
-rw-r--r--svx/source/dialog/cfg.cxx385
-rw-r--r--svx/source/dialog/dlgfact.cxx14
-rw-r--r--svx/source/dialog/eventdlg.cxx19
-rw-r--r--svx/source/dialog/macropg.cxx105
-rw-r--r--svx/source/dialog/macropg.src9
-rw-r--r--svx/source/dialog/scriptdlg.hrc28
-rw-r--r--svx/source/dialog/scriptdlg.hxx22
-rw-r--r--svx/source/dialog/scriptdlg.src40
-rw-r--r--svx/source/dialog/selector.cxx31
-rw-r--r--svx/source/dialog/selector.hrc17
-rw-r--r--svx/source/dialog/selector.hxx12
-rw-r--r--svx/source/dialog/selector.src34
13 files changed, 442 insertions, 287 deletions
diff --git a/sfx2/source/inc/cfg.hxx b/sfx2/source/inc/cfg.hxx
index 4cd2a9709007..39f9e1a6ce07 100644
--- a/sfx2/source/inc/cfg.hxx
+++ b/sfx2/source/inc/cfg.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: cfg.hxx,v $
*
- * $Revision: 1.24 $
+ * $Revision: 1.25 $
*
- * last change: $Author: hr $ $Date: 2004-07-23 13:54:55 $
+ * last change: $Author: obo $ $Date: 2004-08-13 13:22:41 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -182,10 +182,15 @@ class SfxConfigGroupListBox_Impl : public SvTreeListBox
SfxSlotPool* pSlotPool;
BOOL bShowSF; // show Scripting Framework scripts
BOOL bShowBasic; // show Basic scripts
- ImageList m_aImagesNormal;
- ImageList m_aImagesHighContrast;
Image m_hdImage;
Image m_hdImage_hc;
+ Image m_libImage;
+ Image m_libImage_hc;
+ Image m_macImage;
+ Image m_macImage_hc;
+ Image m_docImage;
+ Image m_docImage_hc;
+
::rtl::OUString m_sMyMacros;
::rtl::OUString m_sProdMacros;
Image GetImage( ::com::sun::star::uno::Reference< ::drafts::com::sun::star::script::browse::XBrowseNode > node, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xCtx, bool bIsRootNode, bool bHighContrast );
diff --git a/svx/source/dialog/cfg.cxx b/svx/source/dialog/cfg.cxx
index e3c637f896f3..51788a2711a7 100644
--- a/svx/source/dialog/cfg.cxx
+++ b/svx/source/dialog/cfg.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: cfg.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: obo $ $Date: 2004-08-13 10:33:33 $
+ * last change: $Author: obo $ $Date: 2004-08-13 13:31:20 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -149,6 +149,8 @@
#define PRTSTR(x) rtl::OUStringToOString(x, RTL_TEXTENCODING_ASCII_US).pData->buffer
+#define ENTRY_HEIGHT 16
+
static const char ITEM_DESCRIPTOR_COMMANDURL[] = "CommandURL";
static const char ITEM_DESCRIPTOR_HELPURL[] = "HelpURL";
static const char ITEM_DESCRIPTOR_CONTAINER[] = "ItemDescriptorContainer";
@@ -162,6 +164,9 @@ static const char ITEM_DESCRIPTOR_UINAME[] = "UIName";
static const char ITEM_MENUBAR_URL[] = "private:resource/menubar/menubar";
static const char ITEM_TOOLBAR_URL[] = "private:resource/toolbar/";
+static const char CUSTOM_TOOLBAR_STR[] = "custom_toolbar_";
+static const char CUSTOM_MENU_STR[] = "vnd.openoffice.org:CustomMenu";
+
static const char __FAR_DATA pSeparatorStr[] =
"----------------------------------";
static const char __FAR_DATA pMenuSeparatorStr[] = " | ";
@@ -299,7 +304,7 @@ generateCustomURL(
sal_Int32 suffix = 1 )
{
OUString url = OUString::createFromAscii( ITEM_TOOLBAR_URL );
- url += OUString::createFromAscii( "custom_toolbar_" );
+ url += OUString::createFromAscii( CUSTOM_TOOLBAR_STR );
url += OUString::valueOf( suffix );
// now check is there is an already existing entry with this url
@@ -327,11 +332,11 @@ generateCustomURL(
}
OUString
-generateCustomMenuName(
+generateCustomMenuURL(
SvxEntries* entries,
sal_Int32 suffix = 1 )
{
- OUString url = OUString::createFromAscii( "vnd.openoffice.org:CustomMenu" );
+ OUString url = OUString::createFromAscii( CUSTOM_MENU_STR );
url += OUString::valueOf( suffix );
// now check is there is an already existing entry with this url
@@ -352,7 +357,7 @@ generateCustomMenuName(
if ( iter != entries->end() )
{
// url already exists so try the next number up
- return generateCustomMenuName( entries, ++suffix );
+ return generateCustomMenuURL( entries, ++suffix );
}
return url;
@@ -412,6 +417,7 @@ OUString GetModuleName( const OUString& aModuleId )
{
return OUString::createFromAscii("Math");
}
+ return OUString();
}
bool GetMenuItemData(
@@ -1316,23 +1322,25 @@ MenuSaveInData::Reset()
}
}
-/*
+/******************************************************************************
+ *
* SvxMenuEntriesListBox is the listbox in which the menu items for a
* particular menu are shown. We have a custom listbox because we need
* to add drag'n'drop support from the Macro Selector and within the
* listbox
- */
+ *
+ *****************************************************************************/
SvxMenuEntriesListBox::SvxMenuEntriesListBox(
Window* pParent, const ResId& rResId)
: SvTreeListBox( pParent, rResId )
- , pPage( (SvxConfigPage*) pParent )
+ , pPage( (SvxMenuConfigPage*) pParent )
, m_bIsInternalDrag( FALSE )
{
SetWindowBits(
GetStyle() | WB_CLIPCHILDREN | WB_HSCROLL | WB_HIDESELECTION );
SetSpaceBetweenEntries( 0 );
- SetEntryHeight( 16 );
+ SetEntryHeight( ENTRY_HEIGHT );
SetHighlightRange(); // SetHighlightRange( 1, 0xffff );
SetSelectionMode(SINGLE_SELECTION);
@@ -1425,6 +1433,31 @@ BOOL SvxMenuEntriesListBox::NotifyCopying(
return FALSE;
}
+void SvxMenuEntriesListBox::KeyInput( const KeyEvent& rKeyEvent )
+{
+ KeyCode keycode = rKeyEvent.GetKeyCode();
+
+ // support DELETE for removing the current entry
+ if ( keycode == KEY_DELETE )
+ {
+ pPage->DeleteSelectedContent();
+ }
+ // support CTRL+UP and CTRL+DOWN for moving selected entries
+ else if ( keycode.GetCode() == KEY_UP && keycode.IsMod1() )
+ {
+ pPage->MoveEntry( TRUE );
+ }
+ else if ( keycode.GetCode() == KEY_DOWN && keycode.IsMod1() )
+ {
+ pPage->MoveEntry( FALSE );
+ }
+ else
+ {
+ // pass on to superclass
+ SvTreeListBox::KeyInput( rKeyEvent );
+ }
+}
+
/******************************************************************************
*
* SvxConfigPage is the abstract base class on which the Menu and Toolbar
@@ -1982,36 +2015,41 @@ IMPL_LINK( SvxConfigPage, AsyncInfoMsg, String*, pMsg )
IMPL_LINK( SvxConfigPage, MoveHdl, Button *, pButton )
{
- MoveEntry( pButton );
-
+ MoveEntry( pButton == &aMoveUpButton );
return 0;
}
-void SvxConfigPage::MoveEntry( Button *pButton )
+void SvxConfigPage::MoveEntry( bool bMoveUp )
{
+ OSL_TRACE("SvxConfigPage::MoveEntry");
+
SvLBoxEntry *pSourceEntry = aContentsListBox->FirstSelected();
SvLBoxEntry *pTargetEntry = NULL;
+ SvLBoxEntry *pToSelect = NULL;
if ( !pSourceEntry )
{
return;
}
- if ( pButton == &aMoveDownButton )
- {
- pTargetEntry = aContentsListBox->NextSibling( pSourceEntry );
- }
- else if ( pButton == &aMoveUpButton )
+ if ( bMoveUp )
{
// Move Up is just a Move Down with the source and target reversed
pTargetEntry = pSourceEntry;
pSourceEntry = aContentsListBox->PrevSibling( pTargetEntry );
+ pToSelect = pTargetEntry;
+ }
+ else
+ {
+ pTargetEntry = aContentsListBox->NextSibling( pSourceEntry );
+ pToSelect = pSourceEntry;
}
if ( MoveEntryData( pSourceEntry, pTargetEntry ) )
{
aContentsListBox->GetModel()->Move( pSourceEntry, pTargetEntry );
- aContentsListBox->MakeVisible( pSourceEntry );
+ aContentsListBox->Select( pToSelect );
+ aContentsListBox->MakeVisible( pToSelect );
UpdateButtonStates();
}
@@ -2070,14 +2108,15 @@ bool SvxConfigPage::MoveEntryData(
}
SvxMenuConfigPage::SvxMenuConfigPage(
- Window *pParent, const SfxItemSet& rSet ) :
-
+ Window *pParent, const SfxItemSet& rSet )
+ :
SvxConfigPage( pParent, rSet )
{
aContentsListBox = new SvxMenuEntriesListBox( this, ResId( BOX_ENTRIES ) );
FreeResource();
PositionContentsListBox();
+ aContentsListBox->SetZOrder( &aAddCommandsButton, WINDOW_ZORDER_BEFOR );
aTopLevelListBox.SetSelectHdl(
LINK( this, SvxMenuConfigPage, SelectMenu ) );
@@ -2197,6 +2236,56 @@ void SvxMenuConfigPage::UpdateButtonStates()
}
}
+void SvxMenuConfigPage::DeleteSelectedTopLevel()
+{
+ SvxConfigEntry* pMenuData = GetTopLevelSelection();
+
+ SvxEntries* pParentEntries =
+ FindParentForChild( GetSaveInData()->GetEntries(), pMenuData );
+
+ RemoveEntry( pParentEntries, pMenuData );
+ delete pMenuData;
+
+ ReloadTopLevelListBox();
+
+ GetSaveInData()->SetModified( TRUE );
+}
+
+bool SvxMenuConfigPage::DeleteSelectedContent()
+{
+ SvLBoxEntry *pActEntry = aContentsListBox->FirstSelected();
+
+ if ( pActEntry != NULL )
+ {
+ // get currently selected menu entry
+ SvxConfigEntry* pMenuEntry =
+ (SvxConfigEntry*) pActEntry->GetUserData();
+
+ // get currently selected menu
+ SvxConfigEntry* pMenu = GetTopLevelSelection();
+
+ // remove menu entry from the list for this menu
+ RemoveEntry( pMenu->GetEntries(), pMenuEntry );
+
+ // remove menu entry from UI
+ aContentsListBox->GetModel()->Remove( pActEntry );
+
+ // if this is a submenu entry, redraw the menus list box
+ if ( pMenuEntry->IsPopup() )
+ {
+ ReloadTopLevelListBox();
+ }
+
+ // delete data for menu entry
+ delete pMenuEntry;
+
+ GetSaveInData()->SetModified( TRUE );
+
+ return TRUE;
+ }
+ return FALSE;
+}
+
IMPL_LINK( SvxMenuConfigPage, SelectMenu, ListBox *, pBox )
{
aContentsListBox->Clear();
@@ -2228,18 +2317,7 @@ IMPL_LINK( SvxMenuConfigPage, MenuSelectHdl, MenuButton *, pButton )
{
case ID_DELETE:
{
- SvxConfigEntry* pMenuData = GetTopLevelSelection();
-
- SvxEntries* pParentEntries =
- FindParentForChild( GetSaveInData()->GetEntries(), pMenuData );
-
- RemoveEntry( pParentEntries, pMenuData );
- delete pMenuData;
-
- ReloadTopLevelListBox();
-
- GetSaveInData()->SetModified( TRUE );
-
+ DeleteSelectedTopLevel();
break;
}
case ID_RENAME:
@@ -2345,35 +2423,7 @@ IMPL_LINK( SvxMenuConfigPage, EntrySelectHdl, MenuButton *, pButton )
}
case ID_DELETE:
{
- SvLBoxEntry *pActEntry = aContentsListBox->FirstSelected();
-
- if ( pActEntry != NULL )
- {
- // get currently selected menu entry
- SvxConfigEntry* pMenuEntry =
- (SvxConfigEntry*) pActEntry->GetUserData();
-
- // get currently selected menu
- SvxConfigEntry* pMenu = GetTopLevelSelection();
-
- // remove menu entry from the list for this menu
- RemoveEntry( pMenu->GetEntries(), pMenuEntry );
-
- // remove menu entry from UI
- aContentsListBox->GetModel()->Remove( pActEntry );
-
- // if this is a submenu entry, redraw the menus list box
- if ( pMenuEntry->IsPopup() )
- {
- ReloadTopLevelListBox();
- }
-
- // delete data for menu entry
- delete pMenuEntry;
-
- GetSaveInData()->SetModified( TRUE );
- }
-
+ DeleteSelectedContent();
break;
}
case ID_RENAME:
@@ -2440,9 +2490,7 @@ IMPL_LINK( SvxMenuConfigPage, NewMenuHdl, Button *, pButton )
if ( ret == RET_OK )
{
GetSaveInData()->SetEntries( pDialog->GetEntries() );
-
ReloadTopLevelListBox( pDialog->GetSelectedEntry() );
-
GetSaveInData()->SetModified( TRUE );
}
@@ -2537,7 +2585,7 @@ SvxMainMenuOrganizerDialog::SvxMainMenuOrganizerDialog(
new SvxConfigEntry( 1, newname, String(), TRUE );
pNewEntryData->SetUserDefined( TRUE );
pNewEntryData->SetMain( TRUE );
- pNewEntryData->SetCommand( generateCustomMenuName( pEntries ) );
+ pNewEntryData->SetCommand( generateCustomMenuURL( pEntries ) );
pNewMenuEntry =
aMenuListBox.InsertEntry( stripHotKey( pNewEntryData->GetName() ) );
@@ -2872,6 +2920,7 @@ SvxConfigEntry::GetProperties(
return aPropSeq;
}
+/*
SvxMenuConfigEntry::SvxMenuConfigEntry(
const uno::Sequence< beans::PropertyValue >& rProperties,
const uno::Reference< container::XNameAccess >& rCommandToLabelMap )
@@ -2905,6 +2954,7 @@ SvxMenuConfigEntry::SvxMenuConfigEntry(
}
}
}
+*/
SvxConfigEntry::SvxConfigEntry( USHORT nInitId, const String& rInitStr,
const String& rHelpText, bool bPopup )
@@ -3003,15 +3053,15 @@ bool SvxConfigEntry::IsRenamable()
SvxToolbarConfigPage::SvxToolbarConfigPage(
Window *pParent, const SfxItemSet& rSet )
- : SvxConfigPage( pParent, rSet )
+ :
+ SvxConfigPage( pParent, rSet )
{
SetHelpId( HID_SVX_CONFIG_TOOLBAR );
- aContentsListBox = new SvxToolbarEntriesListBox(
- this, ResId( BOX_ENTRIES ) );
+ aContentsListBox = new SvxToolbarEntriesListBox(this, ResId(BOX_ENTRIES));
FreeResource();
-
PositionContentsListBox();
+ aContentsListBox->SetZOrder( &aAddCommandsButton, WINDOW_ZORDER_BEFOR );
aContentsListBox->SetHelpId( HID_SVX_CONFIG_TOOLBAR_CONTENTS );
@@ -3092,15 +3142,95 @@ SvxToolbarConfigPage::~SvxToolbarConfigPage()
delete aContentsListBox;
}
+void SvxToolbarConfigPage::DeleteSelectedTopLevel()
+{
+ USHORT nSelectionPos = aTopLevelListBox.GetSelectEntryPos();
+ ToolbarSaveInData* pSaveInData = (ToolbarSaveInData*) GetSaveInData();
+ pSaveInData->RemoveToolbar( GetTopLevelSelection() );
+
+ if ( aTopLevelListBox.GetEntryCount() > 1 )
+ {
+ // select next entry after the one being deleted
+ // selection position is indexed from 0 so need to
+ // subtract one from the entry count
+ if ( nSelectionPos != aTopLevelListBox.GetEntryCount() - 1 )
+ {
+ aTopLevelListBox.SelectEntryPos( nSelectionPos + 1, TRUE );
+ }
+ else
+ {
+ aTopLevelListBox.SelectEntryPos( nSelectionPos - 1, TRUE );
+ }
+ aTopLevelListBox.GetSelectHdl().Call( this );
+
+ // and now remove the entry
+ aTopLevelListBox.RemoveEntry( nSelectionPos );
+ }
+ else
+ {
+ ReloadTopLevelListBox();
+ }
+}
+
+bool SvxToolbarConfigPage::DeleteSelectedContent()
+{
+ SvLBoxEntry *pActEntry = aContentsListBox->FirstSelected();
+
+ if ( pActEntry != NULL )
+ {
+ // get currently selected entry
+ SvxConfigEntry* pEntry =
+ (SvxConfigEntry*) pActEntry->GetUserData();
+
+ SvxConfigEntry* pToolbar = GetTopLevelSelection();
+
+ // remove entry from the list for this toolbar
+ RemoveEntry( pToolbar->GetEntries(), pEntry );
+
+ // remove toolbar entry from UI
+ aContentsListBox->GetModel()->Remove( pActEntry );
+
+ // delete data for toolbar entry
+ delete pEntry;
+
+ (( ToolbarSaveInData* ) GetSaveInData())->ApplyToolbar( pToolbar );
+ UpdateButtonStates();
+
+ // if this is the last entry in the toolbar and it is a user
+ // defined toolbar pop up a dialog asking the user if they
+ // want to delete the toolbar
+ if ( aContentsListBox->GetEntryCount() == 0 &&
+ GetTopLevelSelection()->IsDeletable() )
+ {
+ QueryBox qbox( this,
+ ResId( QBX_CONFIRM_DELETE_TOOLBAR, DIALOG_MGR() ) );
+
+ if ( qbox.Execute() == RET_YES )
+ {
+ DeleteSelectedTopLevel();
+ }
+ }
+
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
IMPL_LINK( SvxToolbarConfigPage, MoveHdl, Button *, pButton )
{
- MoveEntry( pButton );
+ MoveEntry( pButton == &aMoveUpButton );
+ return 0;
+}
+
+void SvxToolbarConfigPage::MoveEntry( bool bMoveUp )
+{
+ OSL_TRACE("SvxToolbarConfigPage::MoveEntry");
+ SvxConfigPage::MoveEntry( bMoveUp );
// Apply change to currently selected toolbar
SvxConfigEntry* pToolbar = GetTopLevelSelection();
((ToolbarSaveInData*)GetSaveInData())->ApplyToolbar( pToolbar );
-
- return 0;
}
IMPL_LINK( SvxToolbarConfigPage, ToolbarSelectHdl, MenuButton *, pButton )
@@ -3116,31 +3246,7 @@ IMPL_LINK( SvxToolbarConfigPage, ToolbarSelectHdl, MenuButton *, pButton )
{
case ID_DELETE:
{
- pSaveInData->RemoveToolbar( pToolbar );
-
- if ( aTopLevelListBox.GetEntryCount() > 1 )
- {
- // select next entry after the one being deleted
- // selection position is indexed from 0 so need to
- // subtract one from the entry count
- if ( nSelectionPos != aTopLevelListBox.GetEntryCount() - 1 )
- {
- aTopLevelListBox.SelectEntryPos( nSelectionPos + 1, TRUE );
- }
- else
- {
- aTopLevelListBox.SelectEntryPos( nSelectionPos - 1, TRUE );
- }
- aTopLevelListBox.GetSelectHdl().Call( this );
-
- // and now remove the entry
- aTopLevelListBox.RemoveEntry( nSelectionPos );
- }
- else
- {
- ReloadTopLevelListBox();
- }
-
+ DeleteSelectedTopLevel();
break;
}
case ID_RENAME:
@@ -3244,7 +3350,7 @@ IMPL_LINK( SvxToolbarConfigPage, ToolbarSelectHdl, MenuButton *, pButton )
IMPL_LINK( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton )
{
- bool bModified = FALSE;
+ bool bNeedsApply = FALSE;
// get currently selected toolbar
SvxConfigEntry* pToolbar = GetTopLevelSelection();
@@ -3275,7 +3381,7 @@ IMPL_LINK( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton )
pEntry->SetName( aNewName );
aContentsListBox->SetEntryText( pActEntry, aNewName );
- bModified = TRUE;
+ bNeedsApply = TRUE;
}
delete pNameDialog;
@@ -3310,7 +3416,7 @@ IMPL_LINK( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton )
pEntry->SetName( aSystemName );
aContentsListBox->SetEntryText(
pActEntry, stripHotKey( aSystemName ) );
- bModified = TRUE;
+ bNeedsApply = TRUE;
}
uno::Reference< graphic::XGraphic > backup =
@@ -3353,7 +3459,7 @@ IMPL_LINK( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton )
GetSaveInData()->PersistChanges(
GetSaveInData()->GetImageManager() );
- bModified = TRUE;
+ bNeedsApply = TRUE;
}
catch ( uno::Exception& )
{
@@ -3372,31 +3478,12 @@ IMPL_LINK( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton )
aContentsListBox->SetCheckButtonState(
pNewLBEntry, SV_BUTTON_TRISTATE );
- bModified = TRUE;
+ bNeedsApply = TRUE;
break;
}
case ID_DELETE:
{
- SvLBoxEntry *pActEntry = aContentsListBox->FirstSelected();
-
- if ( pActEntry != NULL )
- {
- // get currently selected entry
- SvxConfigEntry* pEntry =
- (SvxConfigEntry*) pActEntry->GetUserData();
-
- // remove entry from the list for this toolbar
- RemoveEntry( pToolbar->GetEntries(), pEntry );
-
- // remove toolbar entry from UI
- aContentsListBox->GetModel()->Remove( pActEntry );
-
- // delete data for toolbar entry
- delete pEntry;
-
- bModified = TRUE;
- }
-
+ DeleteSelectedContent();
break;
}
case ID_ICON_ONLY:
@@ -3485,7 +3572,7 @@ IMPL_LINK( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton )
GetSaveInData()->PersistChanges(
GetSaveInData()->GetImageManager() );
- bModified = TRUE;
+ bNeedsApply = TRUE;
}
catch ( uno::Exception& )
{
@@ -3554,7 +3641,7 @@ IMPL_LINK( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton )
GetSaveInData()->PersistChanges(
GetSaveInData()->GetImageManager() );
- bModified = TRUE;
+ bNeedsApply = TRUE;
}
catch ( uno::Exception& )
{
@@ -3564,7 +3651,7 @@ IMPL_LINK( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton )
}
}
- if ( bModified == TRUE )
+ if ( bNeedsApply == TRUE )
{
(( ToolbarSaveInData* ) GetSaveInData())->ApplyToolbar( pToolbar );
UpdateButtonStates();
@@ -3894,7 +3981,7 @@ SvxEntries* ToolbarSaveInData::GetEntries()
pEntry->SetMain( TRUE );
pEntry->SetStyle( GetSystemStyle( url ) );
- OUString custom = OUString::createFromAscii( "custom_" );
+ OUString custom = OUString::createFromAscii(CUSTOM_TOOLBAR_STR);
if ( systemname.indexOf( custom ) == 0 )
{
pEntry->SetUserDefined( TRUE );
@@ -4580,7 +4667,7 @@ SvxToolbarEntriesListBox::SvxToolbarEntriesListBox(
Window* pParent, const ResId& aResId )
:
SvxMenuEntriesListBox( pParent, aResId ),
- pPage( ( SvxConfigPage* ) pParent )
+ pPage( ( SvxToolbarConfigPage* ) pParent )
{
m_pButtonData = new SvLBoxButtonData( this );
BuildCheckBoxButtonImages( m_pButtonData );
@@ -4693,21 +4780,47 @@ void SvxToolbarEntriesListBox::DataChanged( const DataChangedEvent& rDCEvt )
// --------------------------------------------------------
-void SvxToolbarEntriesListBox::CheckButtonHdl()
+void SvxToolbarEntriesListBox::ChangeVisibility( SvLBoxEntry* pEntry )
{
- SvLBoxEntry* pEntry = GetHdlEntry();
+ if ( pEntry != NULL )
+ {
+ SvxConfigEntry* pEntryData =
+ (SvxConfigEntry*) pEntry->GetUserData();
- SvxConfigEntry* pEntryData =
- (SvxConfigEntry*) pEntry->GetUserData();
+ if ( pEntryData->IsBinding() )
+ {
+ pEntryData->SetVisible( !pEntryData->IsVisible() );
+
+ SvxConfigEntry* pToolbar = pPage->GetTopLevelSelection();
+
+ ToolbarSaveInData* pToolbarSaveInData = ( ToolbarSaveInData* )
+ pPage->GetSaveInData();
- pEntryData->SetVisible( !pEntryData->IsVisible() );
+ pToolbarSaveInData->ApplyToolbar( pToolbar );
- SvxConfigEntry* pToolbar = pPage->GetTopLevelSelection();
+ SetCheckButtonState( pEntry, pEntryData->IsVisible() ?
+ SV_BUTTON_CHECKED : SV_BUTTON_UNCHECKED );
+ }
+ }
+}
- ToolbarSaveInData* pToolbarSaveInData = ( ToolbarSaveInData* )
- pPage->GetSaveInData();
+void SvxToolbarEntriesListBox::CheckButtonHdl()
+{
+ ChangeVisibility( GetHdlEntry() );
+}
- pToolbarSaveInData->ApplyToolbar( pToolbar );
+void SvxToolbarEntriesListBox::KeyInput( const KeyEvent& rKeyEvent )
+{
+ // space key will change visibility of toolbar items
+ if ( rKeyEvent.GetKeyCode() == KEY_SPACE )
+ {
+ ChangeVisibility( GetCurEntry() );
+ }
+ else
+ {
+ // pass on to superclass
+ SvxMenuEntriesListBox::KeyInput( rKeyEvent );
+ }
}
BOOL SvxToolbarEntriesListBox::NotifyMoving(
diff --git a/svx/source/dialog/dlgfact.cxx b/svx/source/dialog/dlgfact.cxx
index 531de7b5ec94..70878a80c327 100644
--- a/svx/source/dialog/dlgfact.cxx
+++ b/svx/source/dialog/dlgfact.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: dlgfact.cxx,v $
*
- * $Revision: 1.12 $
+ * $Revision: 1.13 $
*
- * last change: $Author: hr $ $Date: 2004-08-02 17:43:55 $
+ * last change: $Author: obo $ $Date: 2004-08-13 13:26:30 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1159,15 +1159,7 @@ VclAbstractDialog * AbstractDialogFactory_Impl::CreateSvxScriptOrgDialog( Window
{
OSL_TRACE("in ADF_Impl::CreateSvxScriptOrgDialog");
Dialog* pDlg=NULL;
- rtl::OUString aResName;
- ResMgr* pBasResMgr = NULL;
- OSL_TRACE("creating dialog");
- aResName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "basctl" ));
- aResName += rtl::OUString::valueOf( sal_Int32( SUPD ));
-
- pBasResMgr = ResMgr::CreateResMgr( rtl::OUStringToOString( aResName, RTL_TEXTENCODING_ASCII_US ));
-
- pDlg = new SvxScriptOrgDialog( pParent, pBasResMgr, rLanguage);
+ pDlg = new SvxScriptOrgDialog( pParent, rLanguage);
if ( pDlg )
return new VclAbstractDialog_Impl( pDlg );
diff --git a/svx/source/dialog/eventdlg.cxx b/svx/source/dialog/eventdlg.cxx
index 5b0515f02201..6e9af795afd6 100644
--- a/svx/source/dialog/eventdlg.cxx
+++ b/svx/source/dialog/eventdlg.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: eventdlg.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: obo $ $Date: 2004-07-06 13:11:49 $
+ * last change: $Author: obo $ $Date: 2004-08-13 13:25:59 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -77,7 +77,6 @@
#include "eventdlg.hxx"
-#include "eventdlg.hrc"
#include <sfx2/viewfrm.hxx>
#include <sfx2/evntconf.hxx>
#include <sfx2/macrconf.hxx>
@@ -99,6 +98,7 @@
#include "dialmgr.hxx"
#include "dialogs.hrc"
+#include "eventdlg.hrc"
using namespace ::com::sun::star;
@@ -114,14 +114,17 @@ SvxEventConfigPage::SvxEventConfigPage( Window* pParent, const SfxItemSet& rSet
bAppConfig ( TRUE )
{
- mpImpl->pStrEvent = new String( SVX_RES( STR_EVENT ) );
- mpImpl->pAssignedMacro = new String( SVX_RES( STR_ASSMACRO ) );
- mpImpl->pEventLB = new _HeaderTabListBox( this, SVX_RES( LB_EVENT ) );
- mpImpl->pAssignPB = new PushButton( this, SVX_RES( PB_ASSIGN ) );
- mpImpl->pDeletePB = new PushButton( this, SVX_RES( PB_DELETE ) );
+ mpImpl->pStrEvent = new String( ResId( STR_EVENT ));
+ mpImpl->pAssignedMacro = new String( ResId( STR_ASSMACRO ));
+ mpImpl->pEventLB = new _HeaderTabListBox( this, ResId( LB_EVENT ));
+ mpImpl->pAssignPB = new PushButton( this, ResId( PB_ASSIGN ));
+ mpImpl->pDeletePB = new PushButton( this, ResId( PB_DELETE ));
FreeResource();
+ // must be done after FreeResource is called
+ InitResources();
+
aSaveInListBox.SetSelectHdl( LINK( this, SvxEventConfigPage,
SelectHdl_Impl ) );
diff --git a/svx/source/dialog/macropg.cxx b/svx/source/dialog/macropg.cxx
index 226fe6363ce9..b9d474b09716 100644
--- a/svx/source/dialog/macropg.cxx
+++ b/svx/source/dialog/macropg.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: macropg.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: obo $ $Date: 2004-07-06 13:12:31 $
+ * last change: $Author: obo $ $Date: 2004-08-13 13:26:09 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -259,7 +259,26 @@ _SvxMacroTabPage::_SvxMacroTabPage( Window* pParent, const ResId& rResId, const
bInitialized(false)
{
mpImpl = new _SvxMacroTabPage_Impl;
+}
+
+_SvxMacroTabPage::~_SvxMacroTabPage()
+{
+ // need to delete the user data
+ SvHeaderTabListBox& rListBox = mpImpl->pEventLB->GetListBox();
+ SvLBoxEntry* pE = rListBox.GetEntry( 0 );
+ while( pE )
+ {
+ ::rtl::OUString* pEventName = (::rtl::OUString*)pE->GetUserData();
+ delete pEventName;
+ pE->SetUserData((void*)0);
+ pE = rListBox.NextSibling( pE );
+ }
+ aUIStrings.clear();
+ DELETEZ( mpImpl );
+}
+void _SvxMacroTabPage::InitResources()
+{
OSL_TRACE("test event string is %s",::rtl::OUStringToOString( ::rtl::OUString(SVX_RES(RID_SVXSTR_EVENT_STARTAPP)), RTL_TEXTENCODING_ASCII_US ).pData->buffer);
// the event name to UI string mappings for App Events
aUIStrings[ ::rtl::OUString::createFromAscii("OnStartApp") ] = new ::rtl::OUString( SVX_RES( RID_SVXSTR_EVENT_STARTAPP ));
@@ -281,39 +300,39 @@ _SvxMacroTabPage::_SvxMacroTabPage( Window* pParent, const ResId& rResId, const
// the event name to UI string mappings for forms & dialogs
//
- aUIStrings[ ::rtl::OUString::createFromAscii( "approveAction" ) ] = new ::rtl::OUString( ResId( RID_SVXSTR_EVENT_APPROVEACTIONPERFORMED ));
- aUIStrings[ ::rtl::OUString::createFromAscii( "actionPerformed" ) ] = new ::rtl::OUString( ResId( RID_SVXSTR_EVENT_ACTIONPERFORMED ));
- aUIStrings[ ::rtl::OUString::createFromAscii( "changed" ) ] = new ::rtl::OUString( ResId( RID_SVXSTR_EVENT_CHANGED ));
- aUIStrings[ ::rtl::OUString::createFromAscii( "textChanged" ) ] = new ::rtl::OUString( ResId( RID_SVXSTR_EVENT_TEXTCHANGED ));
- aUIStrings[ ::rtl::OUString::createFromAscii( "itemStateChanged" ) ] = new ::rtl::OUString( ResId( RID_SVXSTR_EVENT_ITEMSTATECHANGED ));
- aUIStrings[ ::rtl::OUString::createFromAscii( "focusGained" ) ] = new ::rtl::OUString( ResId( RID_SVXSTR_EVENT_FOCUSGAINED ));
- aUIStrings[ ::rtl::OUString::createFromAscii( "focusLost" ) ] = new ::rtl::OUString( ResId( RID_SVXSTR_EVENT_FOCUSLOST ));
- aUIStrings[ ::rtl::OUString::createFromAscii( "keyPressed" ) ] = new ::rtl::OUString( ResId( RID_SVXSTR_EVENT_KEYTYPED ));
- aUIStrings[ ::rtl::OUString::createFromAscii( "keyReleased" ) ] = new ::rtl::OUString( ResId( RID_SVXSTR_EVENT_KEYUP ));
- aUIStrings[ ::rtl::OUString::createFromAscii( "mouseEntered" ) ] = new ::rtl::OUString( ResId( RID_SVXSTR_EVENT_MOUSEENTERED ));
- aUIStrings[ ::rtl::OUString::createFromAscii( "mouseDragged" ) ] = new ::rtl::OUString( ResId( RID_SVXSTR_EVENT_MOUSEDRAGGED ));
- aUIStrings[ ::rtl::OUString::createFromAscii( "mouseMoved" ) ] = new ::rtl::OUString( ResId( RID_SVXSTR_EVENT_MOUSEMOVED ));
- aUIStrings[ ::rtl::OUString::createFromAscii( "mousePressed" ) ] = new ::rtl::OUString( ResId( RID_SVXSTR_EVENT_MOUSEPRESSED ));
- aUIStrings[ ::rtl::OUString::createFromAscii( "mouseReleased" ) ] = new ::rtl::OUString( ResId( RID_SVXSTR_EVENT_MOUSERELEASED ));
- aUIStrings[ ::rtl::OUString::createFromAscii( "mouseExited" ) ] = new ::rtl::OUString( ResId( RID_SVXSTR_EVENT_MOUSEEXITED ));
- aUIStrings[ ::rtl::OUString::createFromAscii( "approveReset" ) ] = new ::rtl::OUString( ResId( RID_SVXSTR_EVENT_APPROVERESETTED ));
- aUIStrings[ ::rtl::OUString::createFromAscii( "resetted" ) ] = new ::rtl::OUString( ResId( RID_SVXSTR_EVENT_RESETTED ));
- aUIStrings[ ::rtl::OUString::createFromAscii( "approveSubmit" ) ] = new ::rtl::OUString( ResId( RID_SVXSTR_EVENT_SUBMITTED ));
- aUIStrings[ ::rtl::OUString::createFromAscii( "approveUpdate" ) ] = new ::rtl::OUString( ResId( RID_SVXSTR_EVENT_BEFOREUPDATE ));
- aUIStrings[ ::rtl::OUString::createFromAscii( "updated" ) ] = new ::rtl::OUString( ResId( RID_SVXSTR_EVENT_AFTERUPDATE ));
- aUIStrings[ ::rtl::OUString::createFromAscii( "loaded" ) ] = new ::rtl::OUString( ResId( RID_SVXSTR_EVENT_LOADED ));
- aUIStrings[ ::rtl::OUString::createFromAscii( "reloading" ) ] = new ::rtl::OUString( ResId( RID_SVXSTR_EVENT_RELOADING ));
- aUIStrings[ ::rtl::OUString::createFromAscii( "reloaded" ) ] = new ::rtl::OUString( ResId( RID_SVXSTR_EVENT_RELOADED ));
- aUIStrings[ ::rtl::OUString::createFromAscii( "unloading" ) ] = new ::rtl::OUString( ResId( RID_SVXSTR_EVENT_UNLOADING ));
- aUIStrings[ ::rtl::OUString::createFromAscii( "unloaded" ) ] = new ::rtl::OUString( ResId( RID_SVXSTR_EVENT_UNLOADED ));
- aUIStrings[ ::rtl::OUString::createFromAscii( "confirmDelete" ) ] = new ::rtl::OUString( ResId( RID_SVXSTR_EVENT_CONFIRMDELETE ));
- aUIStrings[ ::rtl::OUString::createFromAscii( "approveRowChange" ) ] = new ::rtl::OUString( ResId( RID_SVXSTR_EVENT_APPROVEROWCHANGE ));
- aUIStrings[ ::rtl::OUString::createFromAscii( "rowChanged" ) ] = new ::rtl::OUString( ResId( RID_SVXSTR_EVENT_ROWCHANGE ));
- aUIStrings[ ::rtl::OUString::createFromAscii( "approveCursorMove" ) ] = new ::rtl::OUString( ResId( RID_SVXSTR_EVENT_POSITIONING ));
- aUIStrings[ ::rtl::OUString::createFromAscii( "cursorMoved" ) ] = new ::rtl::OUString( ResId( RID_SVXSTR_EVENT_POSITIONED ));
- aUIStrings[ ::rtl::OUString::createFromAscii( "approveParameter" ) ] = new ::rtl::OUString( ResId( RID_SVXSTR_EVENT_APPROVEPARAMETER ));
- aUIStrings[ ::rtl::OUString::createFromAscii( "errorOccured" ) ] = new ::rtl::OUString( ResId( RID_SVXSTR_EVENT_ERROROCCURED ));
- aUIStrings[ ::rtl::OUString::createFromAscii( "adjustmentValueChanged" ) ] = new ::rtl::OUString( ResId( RID_SVXSTR_EVENT_ADJUSTMENTVALUECHANGED ));
+ aUIStrings[ ::rtl::OUString::createFromAscii( "approveAction" ) ] = new ::rtl::OUString( SVX_RES( RID_SVXSTR_EVENT_APPROVEACTIONPERFORMED ));
+ aUIStrings[ ::rtl::OUString::createFromAscii( "actionPerformed" ) ] = new ::rtl::OUString( SVX_RES( RID_SVXSTR_EVENT_ACTIONPERFORMED ));
+ aUIStrings[ ::rtl::OUString::createFromAscii( "changed" ) ] = new ::rtl::OUString( SVX_RES( RID_SVXSTR_EVENT_CHANGED ));
+ aUIStrings[ ::rtl::OUString::createFromAscii( "textChanged" ) ] = new ::rtl::OUString( SVX_RES( RID_SVXSTR_EVENT_TEXTCHANGED ));
+ aUIStrings[ ::rtl::OUString::createFromAscii( "itemStateChanged" ) ] = new ::rtl::OUString( SVX_RES( RID_SVXSTR_EVENT_ITEMSTATECHANGED ));
+ aUIStrings[ ::rtl::OUString::createFromAscii( "focusGained" ) ] = new ::rtl::OUString( SVX_RES( RID_SVXSTR_EVENT_FOCUSGAINED ));
+ aUIStrings[ ::rtl::OUString::createFromAscii( "focusLost" ) ] = new ::rtl::OUString( SVX_RES( RID_SVXSTR_EVENT_FOCUSLOST ));
+ aUIStrings[ ::rtl::OUString::createFromAscii( "keyPressed" ) ] = new ::rtl::OUString( SVX_RES( RID_SVXSTR_EVENT_KEYTYPED ));
+ aUIStrings[ ::rtl::OUString::createFromAscii( "keyReleased" ) ] = new ::rtl::OUString( SVX_RES( RID_SVXSTR_EVENT_KEYUP ));
+ aUIStrings[ ::rtl::OUString::createFromAscii( "mouseEntered" ) ] = new ::rtl::OUString( SVX_RES( RID_SVXSTR_EVENT_MOUSEENTERED ));
+ aUIStrings[ ::rtl::OUString::createFromAscii( "mouseDragged" ) ] = new ::rtl::OUString( SVX_RES( RID_SVXSTR_EVENT_MOUSEDRAGGED ));
+ aUIStrings[ ::rtl::OUString::createFromAscii( "mouseMoved" ) ] = new ::rtl::OUString( SVX_RES( RID_SVXSTR_EVENT_MOUSEMOVED ));
+ aUIStrings[ ::rtl::OUString::createFromAscii( "mousePressed" ) ] = new ::rtl::OUString( SVX_RES( RID_SVXSTR_EVENT_MOUSEPRESSED ));
+ aUIStrings[ ::rtl::OUString::createFromAscii( "mouseReleased" ) ] = new ::rtl::OUString( SVX_RES( RID_SVXSTR_EVENT_MOUSERELEASED ));
+ aUIStrings[ ::rtl::OUString::createFromAscii( "mouseExited" ) ] = new ::rtl::OUString( SVX_RES( RID_SVXSTR_EVENT_MOUSEEXITED ));
+ aUIStrings[ ::rtl::OUString::createFromAscii( "approveReset" ) ] = new ::rtl::OUString( SVX_RES( RID_SVXSTR_EVENT_APPROVERESETTED ));
+ aUIStrings[ ::rtl::OUString::createFromAscii( "resetted" ) ] = new ::rtl::OUString( SVX_RES( RID_SVXSTR_EVENT_RESETTED ));
+ aUIStrings[ ::rtl::OUString::createFromAscii( "approveSubmit" ) ] = new ::rtl::OUString( SVX_RES( RID_SVXSTR_EVENT_SUBMITTED ));
+ aUIStrings[ ::rtl::OUString::createFromAscii( "approveUpdate" ) ] = new ::rtl::OUString( SVX_RES( RID_SVXSTR_EVENT_BEFOREUPDATE ));
+ aUIStrings[ ::rtl::OUString::createFromAscii( "updated" ) ] = new ::rtl::OUString( SVX_RES( RID_SVXSTR_EVENT_AFTERUPDATE ));
+ aUIStrings[ ::rtl::OUString::createFromAscii( "loaded" ) ] = new ::rtl::OUString( SVX_RES( RID_SVXSTR_EVENT_LOADED ));
+ aUIStrings[ ::rtl::OUString::createFromAscii( "reloading" ) ] = new ::rtl::OUString( SVX_RES( RID_SVXSTR_EVENT_RELOADING ));
+ aUIStrings[ ::rtl::OUString::createFromAscii( "reloaded" ) ] = new ::rtl::OUString( SVX_RES( RID_SVXSTR_EVENT_RELOADED ));
+ aUIStrings[ ::rtl::OUString::createFromAscii( "unloading" ) ] = new ::rtl::OUString( SVX_RES( RID_SVXSTR_EVENT_UNLOADING ));
+ aUIStrings[ ::rtl::OUString::createFromAscii( "unloaded" ) ] = new ::rtl::OUString( SVX_RES( RID_SVXSTR_EVENT_UNLOADED ));
+ aUIStrings[ ::rtl::OUString::createFromAscii( "confirmDelete" ) ] = new ::rtl::OUString( SVX_RES( RID_SVXSTR_EVENT_CONFIRMDELETE ));
+ aUIStrings[ ::rtl::OUString::createFromAscii( "approveRowChange" ) ] = new ::rtl::OUString( SVX_RES( RID_SVXSTR_EVENT_APPROVEROWCHANGE ));
+ aUIStrings[ ::rtl::OUString::createFromAscii( "rowChanged" ) ] = new ::rtl::OUString( SVX_RES( RID_SVXSTR_EVENT_ROWCHANGE ));
+ aUIStrings[ ::rtl::OUString::createFromAscii( "approveCursorMove" ) ] = new ::rtl::OUString( SVX_RES( RID_SVXSTR_EVENT_POSITIONING ));
+ aUIStrings[ ::rtl::OUString::createFromAscii( "cursorMoved" ) ] = new ::rtl::OUString( SVX_RES( RID_SVXSTR_EVENT_POSITIONED ));
+ aUIStrings[ ::rtl::OUString::createFromAscii( "approveParameter" ) ] = new ::rtl::OUString( SVX_RES( RID_SVXSTR_EVENT_APPROVEPARAMETER ));
+ aUIStrings[ ::rtl::OUString::createFromAscii( "errorOccured" ) ] = new ::rtl::OUString( SVX_RES( RID_SVXSTR_EVENT_ERROROCCURED ));
+ aUIStrings[ ::rtl::OUString::createFromAscii( "adjustmentValueChanged" ) ] = new ::rtl::OUString( SVX_RES( RID_SVXSTR_EVENT_ADJUSTMENTVALUECHANGED ));
UIEventsStringHash::iterator ui_it = aUIStrings.begin();
UIEventsStringHash::iterator ui_it_end = aUIStrings.end();
@@ -324,22 +343,6 @@ _SvxMacroTabPage::_SvxMacroTabPage( Window* pParent, const ResId& rResId, const
OSL_TRACE("hash size %d",aUIStrings.size());
}
-_SvxMacroTabPage::~_SvxMacroTabPage()
-{
- // need to delete the user data
- SvHeaderTabListBox& rListBox = mpImpl->pEventLB->GetListBox();
- SvLBoxEntry* pE = rListBox.GetEntry( 0 );
- while( pE )
- {
- ::rtl::OUString* pEventName = (::rtl::OUString*)pE->GetUserData();
- delete pEventName;
- pE->SetUserData((void*)0);
- pE = rListBox.NextSibling( pE );
- }
- aUIStrings.clear();
- DELETEZ( mpImpl );
-}
-
// the following method is called when the user clicks OK
// We use the contents of the hashes to replace the settings
BOOL _SvxMacroTabPage::FillItemSet( SfxItemSet& rSet )
diff --git a/svx/source/dialog/macropg.src b/svx/source/dialog/macropg.src
index b617ed00e6ef..474d9ef1716d 100644
--- a/svx/source/dialog/macropg.src
+++ b/svx/source/dialog/macropg.src
@@ -2,9 +2,9 @@
*
* $RCSfile: macropg.src,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: obo $ $Date: 2004-07-07 13:49:19 $
+ * last change: $Author: obo $ $Date: 2004-08-13 13:27:12 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -248,6 +248,11 @@ String RID_SVXSTR_EVENT_ERROROCCURED
Text [ de ] = "Fehler aufgetreten" ;
Text [ en-US ] = "Error occurred" ;
};
+String RID_SVXSTR_EVENT_ADJUSTMENTVALUECHANGED
+{
+ Text [ de ] = "Beim Justieren";
+ Text [ en-US ] = "While adjusting";
+};
String RID_SVXSTR_EVENT_FOCUSGAINED
{
Text [ de ] = "Bei Fokuserhalt" ;
diff --git a/svx/source/dialog/scriptdlg.hrc b/svx/source/dialog/scriptdlg.hrc
index 7d23ddeb9c01..9eb42212e5d6 100644
--- a/svx/source/dialog/scriptdlg.hrc
+++ b/svx/source/dialog/scriptdlg.hrc
@@ -2,9 +2,9 @@
*
* $RCSfile: scriptdlg.hrc,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: obo $ $Date: 2004-08-11 13:10:12 $
+ * last change: $Author: obo $ $Date: 2004-08-13 13:27:32 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -76,20 +76,14 @@
#define SF_PB_DEL 8
#define SF_PB_HELP 9
-#define IMG_PLUS 1
-#define IMG_PLUS_HC 2
-#define IMG_MINUS 3
-#define IMG_MINUS_HC 4
-#define IMG_HARDDISK 5
-#define IMG_HARDDISK_HC 6
-
-#define RID_IMGLST_OBJECTS ( RID_BASICIDE_START + 7 )
-#define RID_IMGLST_OBJECTS_HC ( RID_BASICIDE_START + 13 )
-
-#define IMGID_APPICON ( SID_BASICIDE_IMAGESTART + 1 )
-#define IMGID_LIB ( SID_BASICIDE_IMAGESTART + 2 )
-#define IMGID_MODULE ( SID_BASICIDE_IMAGESTART + 3 )
-#define IMGID_DOCUMENT ( SID_BASICIDE_IMAGESTART + 8 )
+#define IMG_HARDDISK 1
+#define IMG_HARDDISK_HC 2
+#define IMG_LIB 3
+#define IMG_LIB_HC 4
+#define IMG_MACRO 5
+#define IMG_MACRO_HC 6
+#define IMG_DOCUMENT 7
+#define IMG_DOCUMENT_HC 8
// NewObjectDialog
#define FT_NEWLIB 10
@@ -99,6 +93,7 @@
#define ED_LIBNAME 14
#define PB_OK 15
#define PB_CANCEL 16
+#define DLG_NEWLIB 17
#define STR_FT_RENAME 18
#define STR_RENAME 19
@@ -114,4 +109,3 @@ some of its own resource files to svx - where they are added to svx resource fil
#endif // _SCRIPTDLG_HRC
-
diff --git a/svx/source/dialog/scriptdlg.hxx b/svx/source/dialog/scriptdlg.hxx
index 8ce5b7b19ec5..08d9f9e2fc1c 100644
--- a/svx/source/dialog/scriptdlg.hxx
+++ b/svx/source/dialog/scriptdlg.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: scriptdlg.hxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: obo $ $Date: 2004-08-11 13:10:25 $
+ * last change: $Author: obo $ $Date: 2004-08-13 13:27:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -110,10 +110,15 @@ class SFTreeListBox : public SvTreeListBox
friend class SvxScriptOrgDialog;
private:
USHORT nMode;
- ImageList m_aImagesNormal;
- ImageList m_aImagesHighContrast;
Image m_hdImage;
Image m_hdImage_hc;
+ Image m_libImage;
+ Image m_libImage_hc;
+ Image m_macImage;
+ Image m_macImage_hc;
+ Image m_docImage;
+ Image m_docImage_hc;
+
::rtl::OUString m_sMyMacros;
::rtl::OUString m_sProdMacros;
@@ -121,8 +126,6 @@ private:
getLangNodeFromRootNode( ::com::sun::star::uno::Reference< ::drafts::com::sun::star::script::browse::XBrowseNode >& root, ::rtl::OUString& language );
void delUserData( SvLBoxEntry* pEntry );
- void setEntryBitmap(SvLBoxEntry * pEntry, USHORT nBitmap);
-
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > getDocumentModel( ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xCtx, ::rtl::OUString& docName );
::rtl::OUString SFTreeListBox::xModelToDocTitle( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel );
::rtl::OUString SFTreeListBox::parseLocationName( const ::rtl::OUString& location );
@@ -140,7 +143,7 @@ protected:
public:
void Init( const ::rtl::OUString& language );
void RequestSubEntries( SvLBoxEntry* pRootEntry, ::com::sun::star::uno::Reference< ::drafts::com::sun::star::script::browse::XBrowseNode >& node );
- SFTreeListBox( Window* pParent, const ResId& rRes, ResMgr* pBasResMgr );
+ SFTreeListBox( Window* pParent, const ResId& rRes );
~SFTreeListBox();
void UpdateEntries();
@@ -213,7 +216,6 @@ protected:
::rtl::OUString m_sLanguage;
static Selection_hash m_lastSelection;
-/*
const String m_delErrStr;
const String m_delErrTitleStr;
const String m_delQueryStr;
@@ -224,7 +226,6 @@ protected:
const String m_renameErrStr;
const String m_renameDupStr;
const String m_renameErrTitleStr;
-*/
DECL_LINK( MacroSelectHdl, SvTreeListBox * );
DECL_LINK( MacroDoubleClickHdl, SvTreeListBox * );
@@ -248,8 +249,7 @@ protected:
public:
// prob need another arg in the ctor
// to specify the language or provider
- SvxScriptOrgDialog( Window* pParent, ResMgr* pBasResMgr,
- ::rtl::OUString language );
+ SvxScriptOrgDialog( Window* pParent, ::rtl::OUString language );
~SvxScriptOrgDialog();
virtual short Execute();
diff --git a/svx/source/dialog/scriptdlg.src b/svx/source/dialog/scriptdlg.src
index 631916a2cfb6..996bc644de02 100644
--- a/svx/source/dialog/scriptdlg.src
+++ b/svx/source/dialog/scriptdlg.src
@@ -2,9 +2,9 @@
*
* $RCSfile: scriptdlg.src,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: obo $ $Date: 2004-08-11 13:10:40 $
+ * last change: $Author: obo $ $Date: 2004-08-13 13:26:50 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -71,8 +71,8 @@ ModalDialog RID_DLG_SCRIPTORGANIZER
OutputSize = TRUE ;
Size = MAP_APPFONT ( 210 , 165 ) ;
Text [ de ] = "%MACROLANG Makros" ;
- Text [ en-US ] = "%MACROLANG Macros";
Moveable = TRUE ;
+ Text [ en-US ] = "%MACROLANG Macros";
Closeable = TRUE ;
HelpId = HID_SCRIPTORG_DIALOG;
FixedText SF_TXT_SCRIPTS
@@ -100,24 +100,34 @@ ModalDialog RID_DLG_SCRIPTORGANIZER
ImageBitmap = Bitmap { File = "harddisk_16_h.bmp" ; };
MASKCOLOR
};
- Image IMG_PLUS
+ Image IMG_LIB
{
- ImageBitmap = Bitmap { File = "plus.bmp" ; };
+ ImageBitmap = Bitmap { File = "im30820.png"; };
MASKCOLOR
};
- Image IMG_MINUS
+ Image IMG_LIB_HC
{
- ImageBitmap = Bitmap { File = "minus.bmp" ; };
+ ImageBitmap = Bitmap { File = "imh30820.png"; };
MASKCOLOR
};
- Image IMG_PLUS_HC
+ Image IMG_MACRO
{
- ImageBitmap = Bitmap { File = "plus_sch.bmp" ; };
+ ImageBitmap = Bitmap { File = "im30821.png"; };
MASKCOLOR
};
- Image IMG_MINUS_HC
+ Image IMG_MACRO_HC
{
- ImageBitmap = Bitmap { File = "minus_sch.bmp" ; };
+ ImageBitmap = Bitmap { File = "imh30821.png"; };
+ MASKCOLOR
+ };
+ Image IMG_DOCUMENT
+ {
+ ImageBitmap = Bitmap { File = "im30826.png"; };
+ MASKCOLOR
+ };
+ Image IMG_DOCUMENT_HC
+ {
+ ImageBitmap = Bitmap { File = "imh30826.png"; };
MASKCOLOR
};
String STR_MYMACROS
@@ -186,9 +196,9 @@ ModalDialog RID_DLG_SCRIPTORGANIZER
Size = MAP_APPFONT ( 60 , 14 ) ;
TabStop = TRUE ;
};
-};
-ModalDialog RID_SVX_MDLG_SCRIPTORG_NEWLIB
+};
+ModalDialog RID_DLG_NEWLIB
{
Text [ de ] = "Bibliothek erstellen" ;
Text [ en-US ] = "Create Library" ;
@@ -249,9 +259,6 @@ ModalDialog RID_SVX_MDLG_SCRIPTORG_NEWLIB
Text [ en-US ] = "Enter the new name for the selected object." ;
};
};
-
-// global strings
-
String RID_SVXSTR_DELQUERY
{
Text [ de ] = "Mchten Sie das folgende Objekt lschen?";
@@ -371,4 +378,3 @@ String RID_SVXSTR_ERROR_MESSAGE_LABEL
Text [ de ] = "Meldung:";
Text [ en-US ] = "Message:";
};
-
diff --git a/svx/source/dialog/selector.cxx b/svx/source/dialog/selector.cxx
index 8bad09ec721f..49f98f8b4b0b 100644
--- a/svx/source/dialog/selector.cxx
+++ b/svx/source/dialog/selector.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: selector.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: hr $ $Date: 2004-08-02 15:14:39 $
+ * last change: $Author: obo $ $Date: 2004-08-13 13:26:19 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -356,7 +356,13 @@ SvxConfigGroupListBox_Impl::SvxConfigGroupListBox_Impl(
m_sMyMacros(ResId(STR_MYMACROS)),
m_sProdMacros(ResId(STR_PRODMACROS)),
m_hdImage(ResId(IMG_HARDDISK)),
- m_hdImage_hc(ResId(IMG_HARDDISK_HC))
+ m_hdImage_hc(ResId(IMG_HARDDISK_HC)),
+ m_libImage(ResId(IMG_LIB)),
+ m_libImage_hc(ResId(IMG_LIB_HC)),
+ m_macImage(ResId(IMG_MACRO)),
+ m_macImage_hc(ResId(IMG_MACRO_HC)),
+ m_docImage(ResId(IMG_DOC)),
+ m_docImage_hc(ResId(IMG_DOC_HC))
{
FreeResource();
SetWindowBits( GetStyle() | WB_CLIPCHILDREN | WB_HSCROLL | WB_HASBUTTONS | WB_HASLINES | WB_HASLINESATROOT | WB_HASBUTTONSATROOT );
@@ -373,13 +379,6 @@ SvxConfigGroupListBox_Impl::SvxConfigGroupListBox_Impl(
aNavigatorImages.GetImage( RID_SVXIMG_EXPANDEDNODE ),
BMP_COLOR_HIGHCONTRAST );
- ::rtl::OUString aResName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "basctl" ));
- aResName += rtl::OUString::valueOf( sal_Int32( SUPD ));
- ResMgr* pBasResMgr = ResMgr::CreateResMgr( rtl::OUStringToOString( aResName, RTL_TEXTENCODING_ASCII_US ));
- m_aImagesNormal = ImageList(ResId(RID_IMGLST_OBJECTS, pBasResMgr ));
- m_aImagesHighContrast = ImageList(ResId(RID_IMGLST_OBJECTS_HC, pBasResMgr ));
- //m_hdImage = Image(ResId(IMG_HARDDISK));
- //m_hdImage_hc = Image(ResId(IMG_HARDDISK_HC));
// Check configuration to see whether only Basic macros,
// only Scripting Framework scripts, or both should be listed
Any value;
@@ -821,9 +820,9 @@ Image SvxConfigGroupListBox_Impl::GetImage( Reference< browse::XBrowseNode > nod
else
{
if( bHighContrast == BMP_COLOR_NORMAL )
- aImage = m_aImagesNormal.GetImage(IMGID_DOCUMENT);
+ aImage = m_docImage;
else
- aImage = m_aImagesHighContrast.GetImage(IMGID_DOCUMENT);
+ aImage = m_docImage_hc;
}
}
}
@@ -832,16 +831,16 @@ Image SvxConfigGroupListBox_Impl::GetImage( Reference< browse::XBrowseNode > nod
if( node->getType() == browse::BrowseNodeTypes::SCRIPT )
{
if( bHighContrast == BMP_COLOR_NORMAL )
- aImage = m_aImagesNormal.GetImage(IMGID_MODULE);
+ aImage = m_macImage;
else
- aImage = m_aImagesHighContrast.GetImage(IMGID_MODULE);
+ aImage = m_macImage_hc;
}
else
{
if( bHighContrast == BMP_COLOR_NORMAL )
- aImage = m_aImagesNormal.GetImage(IMGID_LIB);
+ aImage = m_libImage;
else
- aImage = m_aImagesHighContrast.GetImage(IMGID_LIB);
+ aImage = m_libImage_hc;
}
}
return aImage;
diff --git a/svx/source/dialog/selector.hrc b/svx/source/dialog/selector.hrc
index 9de2b32b00a0..579a2608fefd 100644
--- a/svx/source/dialog/selector.hrc
+++ b/svx/source/dialog/selector.hrc
@@ -2,9 +2,9 @@
*
* $RCSfile: selector.hrc,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: hr $ $Date: 2004-07-23 14:17:32 $
+ * last change: $Author: obo $ $Date: 2004-08-13 13:27:01 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -71,6 +71,12 @@
#define TXT_SELECTOR_DESCRIPTION 10
#define IMG_HARDDISK 1
#define IMG_HARDDISK_HC 2
+#define IMG_LIB 3
+#define IMG_LIB_HC 4
+#define IMG_MACRO 5
+#define IMG_MACRO_HC 6
+#define IMG_DOC 7
+#define IMG_DOC_HC 8
#define STR_SELECTOR_ADD 310
#define STR_SELECTOR_CLOSE 311
@@ -84,9 +90,4 @@
#define STR_MYMACROS 319
#define STR_PRODMACROS 320
-#define RID_IMGLST_OBJECTS ( RID_BASICIDE_START + 7 )
-#define RID_IMGLST_OBJECTS_HC (RID_BASICIDE_START + 13)
-#define IMGID_APPICON ( SID_BASICIDE_IMAGESTART + 1 )
-#define IMGID_LIB ( SID_BASICIDE_IMAGESTART + 2 )
-#define IMGID_MODULE ( SID_BASICIDE_IMAGESTART + 3 )
-#define IMGID_DOCUMENT ( SID_BASICIDE_IMAGESTART + 8 )
+
diff --git a/svx/source/dialog/selector.hxx b/svx/source/dialog/selector.hxx
index d987bf0bc5b5..b10a65205e54 100644
--- a/svx/source/dialog/selector.hxx
+++ b/svx/source/dialog/selector.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: selector.hxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: hr $ $Date: 2004-08-02 15:14:51 $
+ * last change: $Author: obo $ $Date: 2004-08-13 13:29:09 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -184,10 +184,14 @@ class SvxConfigGroupListBox_Impl : public SvTreeListBox
// show Basic scripts?
BOOL bShowBasic;
- ImageList m_aImagesNormal;
- ImageList m_aImagesHighContrast;
Image m_hdImage;
Image m_hdImage_hc;
+ Image m_libImage;
+ Image m_libImage_hc;
+ Image m_macImage;
+ Image m_macImage_hc;
+ Image m_docImage;
+ Image m_docImage_hc;
::rtl::OUString m_sMyMacros;
::rtl::OUString m_sProdMacros;
Image GetImage( ::com::sun::star::uno::Reference< ::drafts::com::sun::star::script::browse::XBrowseNode > node, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xCtx, bool bIsRootNode, bool bHighContrast );
diff --git a/svx/source/dialog/selector.src b/svx/source/dialog/selector.src
index 26360e33bfe4..43c73db2ec0e 100644
--- a/svx/source/dialog/selector.src
+++ b/svx/source/dialog/selector.src
@@ -2,9 +2,9 @@
*
* $RCSfile: selector.src,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: hr $ $Date: 2004-07-23 14:18:03 $
+ * last change: $Author: obo $ $Date: 2004-08-13 13:26:40 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -181,6 +181,36 @@ ModelessDialog RID_DLG_SCRIPTSELECTOR
ImageBitmap = Bitmap { File = "harddisk_16_h.bmp" ; };
MASKCOLOR
};
+ Image IMG_LIB
+ {
+ ImageBitmap = Bitmap { File = "im30820.png"; };
+ MASKCOLOR
+ };
+ Image IMG_LIB_HC
+ {
+ ImageBitmap = Bitmap { File = "imh30820.png"; };
+ MASKCOLOR
+ };
+ Image IMG_MACRO
+ {
+ ImageBitmap = Bitmap { File = "im30821.png"; };
+ MASKCOLOR
+ };
+ Image IMG_MACRO_HC
+ {
+ ImageBitmap = Bitmap { File = "imh30821.png"; };
+ MASKCOLOR
+ };
+ Image IMG_DOC
+ {
+ ImageBitmap = Bitmap { File = "im30826.png"; };
+ MASKCOLOR
+ };
+ Image IMG_DOC_HC
+ {
+ ImageBitmap = Bitmap { File = "imh30826.png"; };
+ MASKCOLOR
+ };
};
FixedText TXT_SELECTOR_COMMANDS
{