summaryrefslogtreecommitdiff
path: root/cui/source
diff options
context:
space:
mode:
authorCarsten Driesner <cd@openoffice.org>2011-02-07 13:06:08 +0100
committerCarsten Driesner <cd@openoffice.org>2011-02-07 13:06:08 +0100
commit7fa8864a0f2c4d318c17ee05c19c31c85788a10e (patch)
tree70bc1d108e0b5615a90389d03066e1bd786274c4 /cui/source
parentf163f1264a44ff606e7431c16c86ad2c9ba4acb6 (diff)
parentc395e5608ce118f4296083632d6662f278f0b8fc (diff)
removetooltypes01: Rebase to DEV300m99
Diffstat (limited to 'cui/source')
-rw-r--r--cui/source/customize/acccfg.cxx4
-rw-r--r--cui/source/customize/acccfg.hrc2
-rw-r--r--cui/source/customize/acccfg.src4
-rw-r--r--cui/source/customize/cfg.cxx1
-rw-r--r--cui/source/customize/cfgutil.cxx570
-rw-r--r--cui/source/customize/eventdlg.cxx1
-rw-r--r--cui/source/customize/macropg.cxx9
-rw-r--r--cui/source/customize/selector.cxx1
-rwxr-xr-xcui/source/dialogs/SpellDialog.cxx38
-rw-r--r--cui/source/inc/SpellDialog.hxx4
-rw-r--r--cui/source/inc/cfgutil.hxx36
-rw-r--r--cui/source/inc/macroass.hxx8
-rw-r--r--cui/source/inc/macropg.hxx2
-rwxr-xr-x[-rw-r--r--]cui/source/options/optlingu.src7
-rw-r--r--cui/source/tabpages/macroass.cxx245
-rw-r--r--cui/source/tabpages/macroass.hrc2
-rw-r--r--cui/source/tabpages/macroass.src13
-rw-r--r--cui/source/tabpages/page.h6
-rw-r--r--cui/source/tabpages/page.src2
19 files changed, 208 insertions, 747 deletions
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index 5a1ed913b46a..80847fd8ae27 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -36,7 +36,6 @@
#include <dialmgr.hxx>
#include <sfx2/msg.hxx>
-#include <sfx2/macrconf.hxx>
#include <sfx2/app.hxx>
#include <sfx2/filedlghelper.hxx>
#include <sfx2/minfitem.hxx>
@@ -1442,9 +1441,6 @@ void SfxAcceleratorConfigPage::Reset( const SfxItemSet& rSet )
const SfxPoolItem* pFontItem=0;
if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_SPECIALCHAR, sal_True, &pFontItem ) )
m_pFontItem = PTR_CAST( SfxStringItem, pFontItem );
-
- if ( m_pStringItem )
- pGroupLBox->AddAndSelect( m_pStringItem, m_pFontItem );
}
}
diff --git a/cui/source/customize/acccfg.hrc b/cui/source/customize/acccfg.hrc
index be0771b83fc8..d358b757949c 100644
--- a/cui/source/customize/acccfg.hrc
+++ b/cui/source/customize/acccfg.hrc
@@ -63,7 +63,7 @@
#define STR_PDF_EXPORT_SEND 59
#define STR_RECHECK_DOCUMENT 60
#define IMG_INFO 61
-#define STR_BASICNAME 62
+ // FREE
#define BMP_COLLAPSED 63
#define BMP_EXPANDED 64
#define BMP_COLLAPSED_HC 65
diff --git a/cui/source/customize/acccfg.src b/cui/source/customize/acccfg.src
index de5d4b89f186..a03fa9c3eb00 100644
--- a/cui/source/customize/acccfg.src
+++ b/cui/source/customize/acccfg.src
@@ -271,10 +271,6 @@ Resource RID_SVXPAGE_CONFIGGROUPBOX
ImageBitmap = Bitmap { File = "imh30826.png"; };
MASKCOLOR
};
- String STR_BASICNAME
- {
- Text = "%PRODUCTNAME Basic" ;
- };
Image BMP_COLLAPSED
{
ImageBitmap = Bitmap
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 7be7b5d88b15..359d4417fae1 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -54,7 +54,6 @@
#include <sfx2/msg.hxx>
#include <sfx2/msgpool.hxx>
#include <sfx2/mnumgr.hxx>
-#include <sfx2/macrconf.hxx>
#include <sfx2/minfitem.hxx>
#include <sfx2/objsh.hxx>
#include <sfx2/request.hxx>
diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index fc3e44bb4585..59fc088abe1e 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -59,7 +59,6 @@
#include <tools/urlobj.hxx>
#include "cuires.hrc"
#include <sfx2/app.hxx>
-#include <sfx2/macrconf.hxx>
#include <sfx2/minfitem.hxx>
#include <unotools/processfactory.hxx>
#include <comphelper/documentinfo.hxx>
@@ -350,16 +349,13 @@ void SfxConfigFunctionListBox_Impl::ClearAll()
{
SfxGroupInfo_Impl *pData = aArr[i];
- if ( pData->nKind == SFX_CFGFUNCTION_MACRO ||
- pData->nKind == SFX_CFGFUNCTION_SCRIPT )
+ if ( pData->nKind == SFX_CFGFUNCTION_SCRIPT )
{
- SfxMacroInfo *pInfo = (SfxMacroInfo*) pData->pObject;
- SFX_APP()->GetMacroConfig()->ReleaseSlotId( pInfo->GetSlotId() );
- delete pInfo;
+ String* pScriptURI = (String*)pData->pObject;
+ delete pScriptURI;
}
if ( pData->nKind == SFX_CFGGROUP_SCRIPTCONTAINER
- || pData->nKind == SFX_CFGGROUP_DOCBASICMGR
)
{
XInterface* xi = static_cast<XInterface *>(pData->pObject);
@@ -376,21 +372,16 @@ void SfxConfigFunctionListBox_Impl::ClearAll()
Clear();
}
-SfxMacroInfo* SfxConfigFunctionListBox_Impl::GetMacroInfo()
-/* Beschreibung
- Gibt die MacroInfo des selektierten Entry zur"uck ( sofern vorhanden ).
-*/
+String SfxConfigFunctionListBox_Impl::GetSelectedScriptURI()
{
SvLBoxEntry *pEntry = FirstSelected();
if ( pEntry )
{
SfxGroupInfo_Impl *pData = (SfxGroupInfo_Impl*) pEntry->GetUserData();
- if ( pData && ( pData->nKind == SFX_CFGFUNCTION_MACRO ||
- pData->nKind == SFX_CFGFUNCTION_SCRIPT ) )
- return (SfxMacroInfo*) pData->pObject;
+ if ( pData && ( pData->nKind == SFX_CFGFUNCTION_SCRIPT ) )
+ return *(String*)pData->pObject;
}
-
- return 0;
+ return String();
}
String SfxConfigFunctionListBox_Impl::GetCurCommand()
@@ -449,7 +440,6 @@ struct SvxConfigGroupBoxResource_Impl : public Resource
String m_sDlgMacros;
String m_aHumanAppName;
String m_aStrGroupStyles;
- String m_aScriptType;
Image m_collapsedImage;
Image m_collapsedImage_hc;
Image m_expandedImage;
@@ -474,7 +464,6 @@ SvxConfigGroupBoxResource_Impl::SvxConfigGroupBoxResource_Impl() :
m_sDlgMacros(String(CUI_RES(STR_DLG_MACROS))),
m_aHumanAppName(String(CUI_RES(STR_HUMAN_APPNAME))),
m_aStrGroupStyles(String(CUI_RES(STR_GROUP_STYLES))),
- m_aScriptType(String(CUI_RES(STR_BASICNAME))),
m_collapsedImage(CUI_RES(BMP_COLLAPSED)),
m_collapsedImage_hc(CUI_RES(BMP_COLLAPSED_HC)),
m_expandedImage(CUI_RES(BMP_EXPANDED)),
@@ -486,42 +475,11 @@ SvxConfigGroupBoxResource_Impl::SvxConfigGroupBoxResource_Impl() :
SfxConfigGroupListBox_Impl::SfxConfigGroupListBox_Impl(
Window* pParent, const ResId& rResId, sal_uLong nConfigMode )
: SvTreeListBox( pParent, rResId )
- , pImp(new SvxConfigGroupBoxResource_Impl()), pFunctionListBox(0), nMode( nConfigMode ), bShowSF( sal_False ), bShowBasic( sal_True ), pStylesInfo(0)
+ , pImp(new SvxConfigGroupBoxResource_Impl()), pFunctionListBox(0), nMode( nConfigMode ), pStylesInfo(0)
{
SetStyle( GetStyle() | WB_CLIPCHILDREN | WB_HSCROLL | WB_HASBUTTONS | WB_HASLINES | WB_HASLINESATROOT | WB_HASBUTTONSATROOT );
SetNodeBitmaps( pImp->m_collapsedImage, pImp->m_expandedImage, BMP_COLOR_NORMAL );
SetNodeBitmaps( pImp->m_collapsedImage_hc, pImp->m_expandedImage_hc, BMP_COLOR_HIGHCONTRAST );
-
- // Check configuration to see whether only Basic macros,
- // only Scripting Framework scripts, or both should be listed
- Any value;
- sal_Bool tmp = false;
-
- value = ::utl::ConfigManager::GetConfigManager()->GetLocalProperty(
- ::rtl::OUString::createFromAscii(
- "Office.Scripting/ScriptDisplaySettings/ShowBasic" ) );
-
- value >>= tmp;
-
- if (tmp == sal_True) {
- bShowBasic = sal_True;
- }
- else {
- bShowBasic = sal_False;
- }
-
- value = ::utl::ConfigManager::GetConfigManager()->GetLocalProperty(
- ::rtl::OUString::createFromAscii(
- "Office.Scripting/ScriptDisplaySettings/ShowSF" ) );
-
- value >>= tmp;
-
- if (tmp == sal_True) {
- bShowSF = sal_True;
- }
- else {
- bShowSF = sal_False;
- }
}
@@ -537,7 +495,6 @@ void SfxConfigGroupListBox_Impl::ClearAll()
{
SfxGroupInfo_Impl *pData = aArr[i];
if ( pData->nKind == SFX_CFGGROUP_SCRIPTCONTAINER
- || pData->nKind == SFX_CFGGROUP_DOCBASICMGR
)
{
XInterface* xi = static_cast<XInterface *>(pData->pObject);
@@ -553,31 +510,6 @@ void SfxConfigGroupListBox_Impl::ClearAll()
Clear();
}
-void SfxConfigGroupListBox_Impl::SetScriptType( const String& rScriptType )
-{
- pImp->m_aScriptType = rScriptType;
- sal_uLong nPos=0;
- SvLBoxEntry *pEntry = (SvLBoxEntry*) GetModel()->GetEntryAtAbsPos( nPos++ );
- while ( pEntry )
- {
- SfxGroupInfo_Impl *pInfo = (SfxGroupInfo_Impl*) pEntry->GetUserData();
- if ( pInfo->nKind == SFX_CFGGROUP_BASICLIB && ( IsExpanded( pEntry ) || pInfo->bWasOpened ) )
- {
- Collapse( pEntry );
- SvLBoxEntry *pChild = FirstChild( pEntry );
- while (pChild)
- {
- GetModel()->Remove( pChild );
- pChild = FirstChild( pEntry );
- }
-
- Expand( pEntry );
- }
-
- pEntry = (SvLBoxEntry*) GetModel()->GetEntryAtAbsPos( nPos++ );
- }
-}
-
void SfxConfigGroupListBox_Impl::SetStylesInfo(SfxStylesInfo_Impl* pStyles)
{
pStylesInfo = pStyles;
@@ -596,18 +528,6 @@ String SfxConfigGroupListBox_Impl::GetGroup()
if ( pInfo->nKind == SFX_CFGGROUP_FUNCTION )
return GetEntryText( pEntry );
- if ( pInfo->nKind == SFX_CFGGROUP_BASICMGR )
- {
- BasicManager *pMgr = (BasicManager*) pInfo->pObject;
- return pMgr->GetName();
- }
-
- if ( pInfo->nKind == SFX_CFGGROUP_DOCBASICMGR )
- {
- Reference< XModel > xDoc( static_cast< XModel* >( pInfo->pObject ) );
- return ::comphelper::DocumentInfo::getDocumentTitle( xDoc );
- }
-
pEntry = GetParent( pEntry );
}
@@ -615,27 +535,6 @@ String SfxConfigGroupListBox_Impl::GetGroup()
}
//-----------------------------------------------
-BasicManager* SfxConfigGroupListBox_Impl::GetBasicManager( const SvLBoxEntry& _rEntry )
-{
- BasicManager* pBasMgr = NULL;
-
- SfxGroupInfo_Impl* pInfo = (SfxGroupInfo_Impl*) _rEntry.GetUserData();
- switch ( pInfo->nKind )
- {
- case SFX_CFGGROUP_BASICMGR :
- pBasMgr = (BasicManager*) pInfo->pObject;
- break;
- case SFX_CFGGROUP_DOCBASICMGR :
- {
- Reference< XModel > xDoc( static_cast< XModel* >( pInfo->pObject ) );
- pBasMgr = ::basic::BasicManagerRepository::getDocumentBasicManager( xDoc );
- }
- break;
- }
- return pBasMgr;
-}
-
-//-----------------------------------------------
void SfxConfigGroupListBox_Impl::InitModule()
{
try
@@ -758,253 +657,144 @@ void SfxConfigGroupListBox_Impl::Init(const css::uno::Reference< css::lang::XMul
InitStyles();
}
- /*
-
- // Verwendet wird der aktuelle Slotpool
- if ( nMode )
+ OSL_TRACE("** ** About to initialise SF Scripts");
+ // Add Scripting Framework entries
+ Reference< browse::XBrowseNode > rootNode;
+ Reference< XComponentContext > xCtx;
+ try
{
- pSlotPool = pPool ? pPool : &SFX_SLOTPOOL();
- for ( sal_uInt16 i=1; i<pSlotPool->GetGroupCount(); i++ )
- {
- // Gruppe anw"ahlen ( Gruppe 0 ist intern )
- String aName = pSlotPool->SeekGroup( i );
- const SfxSlot *pSfxSlot = pSlotPool->FirstSlot();
- if ( pSfxSlot )
- {
- // Check if all entries are not useable. Don't
- // insert a group without any useable function.
- sal_Bool bActiveEntries = sal_False;
- while ( pSfxSlot )
- {
- sal_uInt16 nId = pSfxSlot->GetSlotId();
- if ( pSfxSlot->GetMode() & nMode )
- {
- bActiveEntries = sal_True;
- break;
- }
-
- pSfxSlot = pSlotPool->NextSlot();
- }
-
- if ( bActiveEntries )
- {
- // Wenn Gruppe nicht leer
- SvLBoxEntry *pEntry = InsertEntry( aName, NULL );
- SfxGroupInfo_Impl *pInfo = new SfxGroupInfo_Impl( SFX_CFGGROUP_FUNCTION, i );
- aArr.Insert( pInfo, aArr.Count() );
- pEntry->SetUserData( pInfo );
- }
- }
- }
+ Reference < beans::XPropertySet > xProps(
+ ::comphelper::getProcessServiceFactory(), UNO_QUERY_THROW );
+ xCtx.set( xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))), UNO_QUERY_THROW );
+ Reference< browse::XBrowseNodeFactory > xFac( xCtx->getValueByName(
+ ::rtl::OUString::createFromAscii( "/singletons/com.sun.star.script.browse.theBrowseNodeFactory") ), UNO_QUERY_THROW );
+ rootNode.set( xFac->createView( browse::BrowseNodeFactoryViewTypes::MACROSELECTOR ) );
+ //rootNode.set( xFac->createView( browse::BrowseNodeFactoryViewTypes::MACROORGANIZER ) );
}
-*/
- SfxApplication *pSfxApp = SFX_APP();
- if ( bShowBasic )
+ catch( Exception& e )
{
- // Basics einsammeln
- pSfxApp->EnterBasicCall();
- String aMacroName(' ');
- aMacroName += pImp->m_sDlgMacros;
-
- // Zuerst AppBasic
- BasicManager *pAppBasicMgr = pSfxApp->GetBasicManager();
- sal_Bool bInsert = sal_True;
- /*
- if ( pArr )
- {
- bInsert = sal_False;
- for ( sal_uInt16 n=0; n<pArr->Count(); n++ )
- {
- if ( *(*pArr)[n] == pSfxApp->GetName() )
- {
- bInsert = sal_True;
- break;
- }
- }
- }
- */
-
- if ( bInsert )
- {
- pAppBasicMgr->SetName( pSfxApp->GetName() );
- if ( pAppBasicMgr->GetLibCount() )
- {
- // Nur einf"ugen, wenn Bibliotheken vorhanden
- String aAppBasTitle( pImp->m_aHumanAppName );
- aAppBasTitle += aMacroName;
- SvLBoxEntry *pEntry = InsertEntry( aAppBasTitle, 0 );
- SfxGroupInfo_Impl *pInfo = new SfxGroupInfo_Impl( SFX_CFGGROUP_BASICMGR, 0, pAppBasicMgr );
- // aArr.Insert( pInfo, aArr.Count() );
- pEntry->SetUserData( pInfo );
- pEntry->EnableChildsOnDemand( sal_True );
- // Expand( pEntry );
- }
- }
-
- Reference< XModel > xDoc( lcl_getScriptableDocument_nothrow( m_xFrame ) );
- if ( xDoc.is() )
- {
- BasicManager* pBasicMgr = ::basic::BasicManagerRepository::getDocumentBasicManager( xDoc );
- if ( pBasicMgr != pAppBasicMgr && pBasicMgr->GetLibCount() )
- {
- String sDocTitle( ::comphelper::DocumentInfo::getDocumentTitle( xDoc ) );
- pBasicMgr->SetName( sDocTitle );
-
- // Nur einf"ugen, wenn eigenes Basic mit Bibliotheken
- SvLBoxEntry *pEntry = InsertEntry( sDocTitle.Append( aMacroName ), NULL );
- xDoc->acquire();
- SfxGroupInfo_Impl *pInfo =
- new SfxGroupInfo_Impl( SFX_CFGGROUP_DOCBASICMGR, 0, xDoc.get() );
- pEntry->SetUserData( pInfo );
- pEntry->EnableChildsOnDemand( sal_True );
- }
- }
-
- pSfxApp->LeaveBasicCall();
+ OSL_TRACE(" Caught some exception whilst retrieving browse nodes from factory... Exception: %s",
+ ::rtl::OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ).pData->buffer );
+ // TODO exception handling
}
- OSL_TRACE("** ** About to initialise SF Scripts");
- if ( bShowSF )
+
+ if ( rootNode.is() )
{
- OSL_TRACE("** ** bShowSF");
- // Add Scripting Framework entries
- Reference< browse::XBrowseNode > rootNode;
- Reference< XComponentContext > xCtx;
- try
+ if ( nMode )
{
- Reference < beans::XPropertySet > xProps(
- ::comphelper::getProcessServiceFactory(), UNO_QUERY_THROW );
- xCtx.set( xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))), UNO_QUERY_THROW );
- Reference< browse::XBrowseNodeFactory > xFac( xCtx->getValueByName(
- ::rtl::OUString::createFromAscii( "/singletons/com.sun.star.script.browse.theBrowseNodeFactory") ), UNO_QUERY_THROW );
- rootNode.set( xFac->createView( browse::BrowseNodeFactoryViewTypes::MACROSELECTOR ) );
- //rootNode.set( xFac->createView( browse::BrowseNodeFactoryViewTypes::MACROORGANIZER ) );
+ //We call acquire on the XBrowseNode so that it does not
+ //get autodestructed and become invalid when accessed later.
+ rootNode->acquire();
+
+ SfxGroupInfo_Impl *pInfo =
+ new SfxGroupInfo_Impl( SFX_CFGGROUP_SCRIPTCONTAINER, 0,
+ static_cast<void *>(rootNode.get()));
+
+ String aTitle(pImp->m_sDlgMacros);
+ SvLBoxEntry *pNewEntry = InsertEntry( aTitle, NULL );
+ pNewEntry->SetUserData( pInfo );
+ pNewEntry->EnableChildsOnDemand( sal_True );
+ aArr.Insert( pInfo, aArr.Count() );
}
- catch( Exception& e )
+ else
{
- OSL_TRACE(" Caught some exception whilst retrieving browse nodes from factory... Exception: %s",
- ::rtl::OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ).pData->buffer );
- // TODO exception handling
- }
-
+ //We are only showing scripts not slot APIs so skip
+ //Root node and show location nodes
+ try {
+ if ( rootNode->hasChildNodes() )
+ {
+ Sequence< Reference< browse::XBrowseNode > > children =
+ rootNode->getChildNodes();
+ sal_Bool bIsRootNode = sal_False;
- if ( rootNode.is() )
- {
- if ( nMode )
- {
- //We call acquire on the XBrowseNode so that it does not
- //get autodestructed and become invalid when accessed later.
- rootNode->acquire();
-
- SfxGroupInfo_Impl *pInfo =
- new SfxGroupInfo_Impl( SFX_CFGGROUP_SCRIPTCONTAINER, 0,
- static_cast<void *>(rootNode.get()));
-
- String aTitle(pImp->m_sDlgMacros);
- SvLBoxEntry *pNewEntry = InsertEntry( aTitle, NULL );
- pNewEntry->SetUserData( pInfo );
- pNewEntry->EnableChildsOnDemand( sal_True );
- aArr.Insert( pInfo, aArr.Count() );
- }
- else
- {
- //We are only showing scripts not slot APIs so skip
- //Root node and show location nodes
- try {
- if ( rootNode->hasChildNodes() )
+ ::rtl::OUString user = ::rtl::OUString::createFromAscii("user");
+ ::rtl::OUString share = ::rtl::OUString::createFromAscii("share");
+ if ( rootNode->getName().equals(::rtl::OUString::createFromAscii("Root") ))
{
- Sequence< Reference< browse::XBrowseNode > > children =
- rootNode->getChildNodes();
- sal_Bool bIsRootNode = sal_False;
-
- ::rtl::OUString user = ::rtl::OUString::createFromAscii("user");
- ::rtl::OUString share = ::rtl::OUString::createFromAscii("share");
- if ( rootNode->getName().equals(::rtl::OUString::createFromAscii("Root") ))
- {
- bIsRootNode = sal_True;
- }
+ bIsRootNode = sal_True;
+ }
- //To mimic current starbasic behaviour we
- //need to make sure that only the current document
- //is displayed in the config tree. Tests below
- //set the bDisplay flag to sal_False if the current
- //node is a first level child of the Root and is NOT
- //either the current document, user or share
- ::rtl::OUString currentDocTitle;
- Reference< XModel > xDocument( lcl_getScriptableDocument_nothrow( m_xFrame ) );
- if ( xDocument.is() )
- {
- currentDocTitle = ::comphelper::DocumentInfo::getDocumentTitle( xDocument );
- }
+ //To mimic current starbasic behaviour we
+ //need to make sure that only the current document
+ //is displayed in the config tree. Tests below
+ //set the bDisplay flag to FALSE if the current
+ //node is a first level child of the Root and is NOT
+ //either the current document, user or share
+ ::rtl::OUString currentDocTitle;
+ Reference< XModel > xDocument( lcl_getScriptableDocument_nothrow( m_xFrame ) );
+ if ( xDocument.is() )
+ {
+ currentDocTitle = ::comphelper::DocumentInfo::getDocumentTitle( xDocument );
+ }
- for ( sal_Int32 n = 0; n < children.getLength(); n++ )
+ for ( sal_Int32 n = 0; n < children.getLength(); n++ )
+ {
+ Reference< browse::XBrowseNode >& theChild = children[n];
+ sal_Bool bDisplay = sal_True;
+ ::rtl::OUString uiName = theChild->getName();
+ if ( bIsRootNode )
{
- Reference< browse::XBrowseNode >& theChild = children[n];
- sal_Bool bDisplay = sal_True;
- ::rtl::OUString uiName = theChild->getName();
- if ( bIsRootNode )
+ if ( ! ((theChild->getName().equals( user ) || theChild->getName().equals( share ) ||
+ theChild->getName().equals( currentDocTitle ) ) ) )
+ {
+ bDisplay=sal_False;
+ }
+ else
{
- if ( ! ((theChild->getName().equals( user ) || theChild->getName().equals( share ) ||
- theChild->getName().equals( currentDocTitle ) ) ) )
+ if ( uiName.equals( user ) )
{
- bDisplay=sal_False;
+ uiName = pImp->m_sMyMacros;
}
- else
+ else if ( uiName.equals( share ) )
{
- if ( uiName.equals( user ) )
- {
- uiName = pImp->m_sMyMacros;
- }
- else if ( uiName.equals( share ) )
- {
- uiName = pImp->m_sProdMacros;
- }
+ uiName = pImp->m_sProdMacros;
}
}
- if (children[n]->getType() != browse::BrowseNodeTypes::SCRIPT && bDisplay )
- {
+ }
+ if (children[n]->getType() != browse::BrowseNodeTypes::SCRIPT && bDisplay )
+ {
// We call acquire on the XBrowseNode so that it does not
// get autodestructed and become invalid when accessed later.
- theChild->acquire();
+ theChild->acquire();
- SfxGroupInfo_Impl* pInfo =
- new SfxGroupInfo_Impl(SFX_CFGGROUP_SCRIPTCONTAINER,
- 0, static_cast<void *>( theChild.get()));
+ SfxGroupInfo_Impl* pInfo =
+ new SfxGroupInfo_Impl(SFX_CFGGROUP_SCRIPTCONTAINER,
+ 0, static_cast<void *>( theChild.get()));
- Image aImage = GetImage( theChild, xCtx, bIsRootNode,BMP_COLOR_NORMAL );
- SvLBoxEntry* pNewEntry =
- InsertEntry( uiName, NULL);
- SetExpandedEntryBmp(pNewEntry, aImage, BMP_COLOR_NORMAL);
- SetCollapsedEntryBmp(pNewEntry, aImage, BMP_COLOR_NORMAL);
- aImage = GetImage( theChild, xCtx, bIsRootNode,BMP_COLOR_HIGHCONTRAST );
- SetExpandedEntryBmp(pNewEntry, aImage, BMP_COLOR_HIGHCONTRAST);
- SetCollapsedEntryBmp(pNewEntry, aImage, BMP_COLOR_HIGHCONTRAST);
+ Image aImage = GetImage( theChild, xCtx, bIsRootNode,BMP_COLOR_NORMAL );
+ SvLBoxEntry* pNewEntry =
+ InsertEntry( uiName, NULL);
+ SetExpandedEntryBmp(pNewEntry, aImage, BMP_COLOR_NORMAL);
+ SetCollapsedEntryBmp(pNewEntry, aImage, BMP_COLOR_NORMAL);
+ aImage = GetImage( theChild, xCtx, bIsRootNode,BMP_COLOR_HIGHCONTRAST );
+ SetExpandedEntryBmp(pNewEntry, aImage, BMP_COLOR_HIGHCONTRAST);
+ SetCollapsedEntryBmp(pNewEntry, aImage, BMP_COLOR_HIGHCONTRAST);
- pNewEntry->SetUserData( pInfo );
- aArr.Insert( pInfo, aArr.Count() );
+ pNewEntry->SetUserData( pInfo );
+ aArr.Insert( pInfo, aArr.Count() );
- if ( children[n]->hasChildNodes() )
- {
- Sequence< Reference< browse::XBrowseNode > > grandchildren =
- children[n]->getChildNodes();
+ if ( children[n]->hasChildNodes() )
+ {
+ Sequence< Reference< browse::XBrowseNode > > grandchildren =
+ children[n]->getChildNodes();
- for ( sal_Int32 m = 0; m < grandchildren.getLength(); m++ )
+ for ( sal_Int32 m = 0; m < grandchildren.getLength(); m++ )
+ {
+ if ( grandchildren[m]->getType() == browse::BrowseNodeTypes::CONTAINER )
{
- if ( grandchildren[m]->getType() == browse::BrowseNodeTypes::CONTAINER )
- {
- pNewEntry->EnableChildsOnDemand( sal_True );
- m = grandchildren.getLength();
- }
+ pNewEntry->EnableChildsOnDemand( sal_True );
+ m = grandchildren.getLength();
}
}
}
}
}
}
- catch (RuntimeException&) {
- // do nothing, the entry will not be displayed in the UI
- }
+ }
+ catch (RuntimeException&) {
+ // do nothing, the entry will not be displayed in the UI
}
}
}
@@ -1020,14 +810,6 @@ void SfxConfigGroupListBox_Impl::Init(const css::uno::Reference< css::lang::XMul
pEntry->EnableChildsOnDemand( sal_True );
}
-/* {
- String sSymbols( String::CreateFromAscii("Symbols") );
- SvLBoxEntry *pEntry = InsertEntry( sSymbols, 0 );
- SfxGroupInfo_Impl *pInfo = new SfxGroupInfo_Impl( SFX_CFGGROUP_SPECIALCHARACTERS, 0, 0 ); // TODO last parameter should contain user data
- aArr.Insert( pInfo, aArr.Count() );
- pEntry->SetUserData( pInfo );
- } */
-
MakeVisible( GetEntry( 0,0 ) );
SetUpdateMode( sal_True );
}
@@ -1208,7 +990,6 @@ void SfxConfigGroupListBox_Impl::GroupSelected()
pFunctionListBox->SetUpdateMode(sal_False);
pFunctionListBox->ClearAll();
if ( pInfo->nKind != SFX_CFGGROUP_FUNCTION &&
- pInfo->nKind != SFX_CFGGROUP_BASICMOD &&
pInfo->nKind != SFX_CFGGROUP_SCRIPTCONTAINER &&
pInfo->nKind != SFX_CFGGROUP_STYLES )
{
@@ -1220,7 +1001,7 @@ void SfxConfigGroupListBox_Impl::GroupSelected()
{
case SFX_CFGGROUP_FUNCTION :
{
- sal_uInt16 nGroup = pInfo->nOrd;
+ sal_uInt16 nGroup = pInfo->nUniqueID;
css::uno::Reference< css::frame::XDispatchInformationProvider > xProvider (m_xFrame, css::uno::UNO_QUERY_THROW);
css::uno::Sequence< css::frame::DispatchInformation > lCommands = xProvider->getConfigurableDispatchInformation(nGroup);
sal_Int32 c = lCommands.getLength();
@@ -1240,45 +1021,6 @@ void SfxConfigGroupListBox_Impl::GroupSelected()
break;
}
- case SFX_CFGGROUP_BASICMOD :
- {
- SvLBoxEntry *pLibEntry = GetParent( pEntry );
- SfxGroupInfo_Impl *pLibInfo =
- (SfxGroupInfo_Impl*) pLibEntry->GetUserData();
- SvLBoxEntry *pBasEntry = GetParent( pLibEntry );
- SfxGroupInfo_Impl *pBasInfo =
- (SfxGroupInfo_Impl*) pBasEntry->GetUserData();
-
- StarBASIC *pLib = (StarBASIC*) pLibInfo->pObject;
- Reference< XModel > xDoc;
- if ( pBasInfo->nKind == SFX_CFGGROUP_DOCBASICMGR )
- xDoc = static_cast< XModel* >( pBasInfo->pObject );
-
- SbModule *pMod = (SbModule*) pInfo->pObject;
- for ( sal_uInt16 nMeth=0; nMeth < pMod->GetMethods()->Count(); nMeth++ )
- {
- SbxMethod *pMeth = (SbxMethod*)pMod->GetMethods()->Get(nMeth);
- SfxMacroInfoPtr pInf = new SfxMacroInfo( !xDoc.is(),
- pLib->GetName(),
- pMod->GetName(),
- pMeth->GetName());
- if ( pMeth->GetInfo() )
- pInf->SetHelpText( pMeth->GetInfo()->GetComment() );
- sal_uInt16 nId = SFX_APP()->GetMacroConfig()->GetSlotId( pInf );
- if ( !nId )
- break; // Kein Slot mehr frei
-
- SvLBoxEntry* pFuncEntry =
- pFunctionListBox->InsertEntry( pMeth->GetName(), NULL );
- SfxGroupInfo_Impl *pGrpInfo =
- new SfxGroupInfo_Impl( SFX_CFGFUNCTION_MACRO, nId, pInf );
- pFunctionListBox->aArr.Insert( pGrpInfo, pFunctionListBox->aArr.Count() );
- pFuncEntry->SetUserData( pGrpInfo );
- }
-
- break;
- }
-
case SFX_CFGGROUP_SCRIPTCONTAINER:
{
if ( !GetChildCount( pEntry ) )
@@ -1308,13 +1050,8 @@ void SfxConfigGroupListBox_Impl::GroupSelected()
xPropSet->getPropertyValue( String::CreateFromAscii( "URI" ) );
value >>= uri;
- SfxMacroInfo* aInfo = new SfxMacroInfo( (String)uri );
- aInfo->SetHelpText( uri );
- SFX_APP()->GetMacroConfig()->GetSlotId( aInfo );
-
- SfxGroupInfo_Impl* pGrpInfo =
- new SfxGroupInfo_Impl(SFX_CFGFUNCTION_SCRIPT,
- aInfo->GetSlotId(), aInfo);
+ String* pScriptURI = new String( uri );
+ SfxGroupInfo_Impl* pGrpInfo = new SfxGroupInfo_Impl( SFX_CFGFUNCTION_SCRIPT, 0, pScriptURI );
Image aImage = GetImage( children[n], Reference< XComponentContext >(), sal_False, BMP_COLOR_NORMAL );
SvLBoxEntry* pNewEntry =
@@ -1422,66 +1159,6 @@ void SfxConfigGroupListBox_Impl::RequestingChilds( SvLBoxEntry *pEntry )
pInfo->bWasOpened = sal_True;
switch ( pInfo->nKind )
{
- case SFX_CFGGROUP_BASICMGR :
- case SFX_CFGGROUP_DOCBASICMGR :
- {
- if ( !GetChildCount( pEntry ) )
- {
- // Erstmaliges "Offnen
- BasicManager* pMgr( GetBasicManager( *pEntry ) );
-
- SvLBoxEntry *pLibEntry = 0;
- for ( sal_uInt16 nLib=0; nLib<pMgr->GetLibCount(); nLib++)
- {
- StarBASIC* pLib = pMgr->GetLib( nLib );
- pLibEntry = InsertEntry( pMgr->GetLibName( nLib ), pEntry );
- SfxGroupInfo_Impl *pGrpInfo = new SfxGroupInfo_Impl( SFX_CFGGROUP_BASICLIB, nLib, pLib );
- aArr.Insert( pGrpInfo, aArr.Count() );
- pLibEntry->SetUserData( pGrpInfo );
- pLibEntry->EnableChildsOnDemand( sal_True );
- }
- }
-
- break;
- }
-
- case SFX_CFGGROUP_BASICLIB :
- {
- if ( !GetChildCount( pEntry ) )
- {
- // Erstmaliges "Offnen
- StarBASIC *pLib = (StarBASIC*) pInfo->pObject;
- if ( !pLib )
- {
- // Lib mu\s nachgeladen werden
- SvLBoxEntry *pParent = GetParent( pEntry );
- BasicManager *pMgr( GetBasicManager( *pParent ) );
-
- if ( pMgr->LoadLib( pInfo->nOrd ) )
- pInfo->pObject = pLib = pMgr->GetLib( pInfo->nOrd );
- else
- break;
- }
-
- SvLBoxEntry *pModEntry = 0;
- for ( sal_uInt16 nMod=0; nMod<pLib->GetModules()->Count(); nMod++ )
- {
- SbModule* pMod = (SbModule*)pLib->GetModules()->Get( nMod );
-
- sal_Bool bIsStarScript = sal_False; //pMod->ISA( SbJScriptModule );
- sal_Bool bWantsStarScript = pImp->m_aScriptType.EqualsAscii("StarScript");
- if ( bIsStarScript != bWantsStarScript )
- continue;
- pModEntry = InsertEntry( pMod->GetName(), pEntry );
- SfxGroupInfo_Impl *pGrpInfo = new SfxGroupInfo_Impl( SFX_CFGGROUP_BASICMOD, 0, pMod );
- aArr.Insert( pGrpInfo, aArr.Count() );
- pModEntry->SetUserData( pGrpInfo );
- }
- }
-
- break;
- }
-
case SFX_CFGGROUP_SCRIPTCONTAINER:
{
if ( !GetChildCount( pEntry ) )
@@ -1604,25 +1281,6 @@ void SfxConfigGroupListBox_Impl::RequestingChilds( SvLBoxEntry *pEntry )
}
}
-void SfxConfigGroupListBox_Impl::AddAndSelect( const SfxStringItem* , const SfxStringItem* )
-{
- /*
- if ( pText )
- {
- Select( GetEntry( GetEntryCount()-1) );
- SvLBoxEntry* pFuncEntry = pFunctionListBox->InsertEntry( pText->GetValue(), NULL );
- SfxGroupInfo_Impl *pGrpInfo = new SfxGroupInfo_Impl( SFX_CFGGROUP_SPECIALCHARACTERS, 0, 0 );
- String aCommand = String::CreateFromAscii(".uno:InsertSymbol?Symbols:string=");
- aCommand += pText->GetValue();
- pFunctionListBox->aArr.Insert( pGrpInfo, pFunctionListBox->aArr.Count() );
- pGrpInfo->sCommand = aCommand;
- pGrpInfo->sLabel = String::CreateFromAscii("Symbols: ");
- pGrpInfo->sLabel += pText->GetValue();
- pFuncEntry->SetUserData( pGrpInfo );
- }
- */
-}
-
void SfxConfigGroupListBox_Impl::SelectMacro( const SfxMacroInfoItem *pItem )
{
SelectMacro( pItem->GetBasicManager()->GetName(),
diff --git a/cui/source/customize/eventdlg.cxx b/cui/source/customize/eventdlg.cxx
index 7b5633ddfadd..de4b8dcbf462 100644
--- a/cui/source/customize/eventdlg.cxx
+++ b/cui/source/customize/eventdlg.cxx
@@ -43,7 +43,6 @@
#include <sfx2/viewfrm.hxx>
#include <sfx2/evntconf.hxx>
-#include <sfx2/macrconf.hxx>
#include <sfx2/minfitem.hxx>
#include <sfx2/app.hxx>
#include <sfx2/objsh.hxx>
diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx
index 8c69015c3a9c..3d0763b8d378 100644
--- a/cui/source/customize/macropg.cxx
+++ b/cui/source/customize/macropg.cxx
@@ -38,7 +38,6 @@
#include <tools/diagnose_ex.h>
#include <sfx2/app.hxx>
#include <sfx2/objsh.hxx>
-#include <sfx2/macrconf.hxx>
#include <sfx2/sfxdefs.hxx>
#include <com/sun/star/container/NoSuchElementException.hpp>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
@@ -212,7 +211,7 @@ void _HeaderTabListBox::Enable( bool bEnable, bool bChild )
// assign button ("Add Command") is enabled only if it is not read only
// delete button ("Remove Command") is enabled if a current binding exists
// and it is not read only
-void _SvxMacroTabPage::EnableButtons( const String& /*rLangName*/ )
+void _SvxMacroTabPage::EnableButtons()
{
const SvLBoxEntry* pE = mpImpl->pEventLB->GetListBox().FirstSelected();
if ( pE )
@@ -592,7 +591,7 @@ void _SvxMacroTabPage::DisplayAppEvents( bool appEvents)
}
rListBox.SetUpdateMode( sal_True );
- EnableButtons( String() );
+ EnableButtons();
}
// select event handler on the listbox
@@ -610,7 +609,7 @@ IMPL_STATIC_LINK( _SvxMacroTabPage, SelectEvent_Impl, SvTabListBox*, EMPTYARG )
return 0;
}
- pThis->EnableButtons( String() );
+ pThis->EnableButtons();
return 0;
}
@@ -736,7 +735,7 @@ long _SvxMacroTabPage::GenericHandler_Impl( _SvxMacroTabPage* pThis, PushButton*
rListBox.MakeVisible( pE );
rListBox.SetUpdateMode( sal_True );
- pThis->EnableButtons( String() );
+ pThis->EnableButtons();
return 0;
}
diff --git a/cui/source/customize/selector.cxx b/cui/source/customize/selector.cxx
index 32883bd66429..5a1cc3b91e29 100644
--- a/cui/source/customize/selector.cxx
+++ b/cui/source/customize/selector.cxx
@@ -39,7 +39,6 @@
#include <sfx2/app.hxx>
#include <sfx2/msg.hxx>
#include <sfx2/msgpool.hxx>
-#include <sfx2/macrconf.hxx>
#include <sfx2/minfitem.hxx>
#include <sfx2/objsh.hxx>
#include <sfx2/dispatch.hxx>
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index 9829318c5554..8ded7a2cc78b 100755
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -88,14 +88,16 @@ struct SpellDialog_Impl
// -----------------------------------------------------------------------
//#define VENDOR_IMAGE_HEIGHT 44 //as specified
-#define SPELLUNDO_CHANGE_LANGUAGE (TEXTUNDO_USER + 1)
-#define SPELLUNDO_CHANGE_TEXTENGINE (TEXTUNDO_USER + 2)
-#define SPELLUNDO_CHANGE_NEXTERROR (TEXTUNDO_USER + 3)
-#define SPELLUNDO_CHANGE_ADD_TO_DICTIONARY (TEXTUNDO_USER + 4)
-#define SPELLUNDO_CHANGE_GROUP (TEXTUNDO_USER + 5) //undo list
-#define SPELLUNDO_MOVE_ERROREND (TEXTUNDO_USER + 6)
-#define SPELLUNDO_UNDO_EDIT_MODE (TEXTUNDO_USER + 7)
-#define SPELLUNDO_ADD_IGNORE_RULE (TEXTUNDO_USER + 8)
+#define SPELLUNDO_START 200
+
+#define SPELLUNDO_CHANGE_LANGUAGE (SPELLUNDO_START + 1)
+#define SPELLUNDO_CHANGE_TEXTENGINE (SPELLUNDO_START + 2)
+#define SPELLUNDO_CHANGE_NEXTERROR (SPELLUNDO_START + 3)
+#define SPELLUNDO_CHANGE_ADD_TO_DICTIONARY (SPELLUNDO_START + 4)
+#define SPELLUNDO_CHANGE_GROUP (SPELLUNDO_START + 5) //undo list
+#define SPELLUNDO_MOVE_ERROREND (SPELLUNDO_START + 6)
+#define SPELLUNDO_UNDO_EDIT_MODE (SPELLUNDO_START + 7)
+#define SPELLUNDO_ADD_IGNORE_RULE (SPELLUNDO_START + 8)
namespace svx{
class SpellUndoAction_Impl : public SfxUndoAction
@@ -628,7 +630,7 @@ IMPL_LINK( SpellDialog, ChangeHdl, Button *, EMPTYARG )
aSentenceED.ChangeMarkedWord(aString, GetSelectedLang_Impl());
SpellContinue_Impl();
bModified = false;
- aSentenceED.UndoActionEnd( SPELLUNDO_CHANGE_GROUP );
+ aSentenceED.UndoActionEnd();
}
if(!aChangePB.IsEnabled())
aIgnorePB.GrabFocus();
@@ -670,7 +672,7 @@ IMPL_LINK( SpellDialog, ChangeAllHdl, Button *, EMPTYARG )
aSentenceED.ChangeMarkedWord(aString, eLang);
SpellContinue_Impl();
bModified = false;
- aSentenceED.UndoActionEnd( SPELLUNDO_CHANGE_GROUP );
+ aSentenceED.UndoActionEnd();
return 1;
}
// -----------------------------------------------------------------------
@@ -715,7 +717,7 @@ IMPL_LINK( SpellDialog, IgnoreAllHdl, Button *, pButton )
SpellContinue_Impl();
bModified = false;
- aSentenceED.UndoActionEnd( SPELLUNDO_CHANGE_GROUP );
+ aSentenceED.UndoActionEnd();
return 1;
}
/*-- 06.11.2003 11:24:08---------------------------------------------------
@@ -1044,7 +1046,7 @@ IMPL_LINK(SpellDialog, AddToDictionaryHdl, MenuButton*, pButton )
// go on
SpellContinue_Impl();
- aSentenceED.UndoActionEnd( SPELLUNDO_CHANGE_GROUP );
+ aSentenceED.UndoActionEnd();
return 0;
}
/*-------------------------------------------------------------------------
@@ -1755,7 +1757,7 @@ void SentenceEditWindow_Impl::ChangeMarkedWord(const String& rNewWord, LanguageT
TextSelection aSel(TextPaM(0, m_nErrorStart), TextPaM(0, m_nErrorEnd));
//Remove spell errror attribute
ExtTextEngine* pTextEngine = GetTextEngine();
- pTextEngine->UndoActionStart( TEXTUNDO_INSERT );
+ pTextEngine->UndoActionStart();
const TextCharAttrib* pErrorAttrib = pTextEngine->FindCharAttrib( TextPaM(0, m_nErrorStart), TEXTATTR_SPELL_ERROR );
DBG_ASSERT(pErrorAttrib, "no error attribute found");
// Reference <XSpellAlternatives> xAlternatives;
@@ -1808,7 +1810,7 @@ void SentenceEditWindow_Impl::ChangeMarkedWord(const String& rNewWord, LanguageT
if(pSpellErrorDescription)
SetAttrib( SpellErrorAttrib(*pSpellErrorDescription), 0, m_nErrorStart, m_nErrorEnd );
SetAttrib( SpellLanguageAttrib(eLanguage), 0, m_nErrorStart, m_nErrorEnd );
- pTextEngine->UndoActionEnd( TEXTUNDO_INSERT );
+ pTextEngine->UndoActionEnd();
}
/* -----------------08.10.2003 13:18-----------------
@@ -2032,7 +2034,7 @@ svx::SpellPortions SentenceEditWindow_Impl::CreateSpellPortions( bool bSetIgnore
-----------------------------------------------------------------------*/
void SentenceEditWindow_Impl::Undo()
{
- SfxUndoManager& rUndoMgr = GetTextEngine()->GetUndoManager();
+ ::svl::IUndoManager& rUndoMgr = GetTextEngine()->GetUndoManager();
DBG_ASSERT(GetUndoActionCount(), "no undo actions available" );
if(!GetUndoActionCount())
return;
@@ -2060,7 +2062,7 @@ void SentenceEditWindow_Impl::ResetUndo()
-----------------------------------------------------------------------*/
void SentenceEditWindow_Impl::AddUndoAction( SfxUndoAction *pAction, sal_Bool bTryMerg )
{
- SfxUndoManager& rUndoMgr = GetTextEngine()->GetUndoManager();
+ ::svl::IUndoManager& rUndoMgr = GetTextEngine()->GetUndoManager();
rUndoMgr.AddUndoAction(pAction, bTryMerg);
GetSpellDialog()->aUndoPB.Enable();
}
@@ -2082,9 +2084,9 @@ void SentenceEditWindow_Impl::UndoActionStart( sal_uInt16 nId )
/*-- 12.11.2003 12:12:38---------------------------------------------------
-----------------------------------------------------------------------*/
-void SentenceEditWindow_Impl::UndoActionEnd( sal_uInt16 nId )
+void SentenceEditWindow_Impl::UndoActionEnd()
{
- GetTextEngine()->UndoActionEnd(nId);
+ GetTextEngine()->UndoActionEnd();
}
/*-- 12.11.2003 12:12:38---------------------------------------------------
diff --git a/cui/source/inc/SpellDialog.hxx b/cui/source/inc/SpellDialog.hxx
index a5cf23069c37..bb12f284d53d 100644
--- a/cui/source/inc/SpellDialog.hxx
+++ b/cui/source/inc/SpellDialog.hxx
@@ -119,9 +119,9 @@ public:
void ResetUndo();
void Undo();
void AddUndoAction( SfxUndoAction *pAction, sal_Bool bTryMerg=sal_False );
- sal_uInt16 GetUndoActionCount();
+ sal_uInt16 GetUndoActionCount();
void UndoActionStart( sal_uInt16 nId );
- void UndoActionEnd( sal_uInt16 nId );
+ void UndoActionEnd();
void MoveErrorEnd(long nOffset);
diff --git a/cui/source/inc/cfgutil.hxx b/cui/source/inc/cfgutil.hxx
index 62a73e008aac..8f80928c33ed 100644
--- a/cui/source/inc/cfgutil.hxx
+++ b/cui/source/inc/cfgutil.hxx
@@ -50,7 +50,6 @@ class SfxSlotPool;
class SfxStringItem;
class SfxFontItem;
class SfxMacroInfoItem;
-class SfxMacroInfo;
struct SfxStyleInfo_Impl;
struct SfxStylesInfo_Impl;
@@ -95,29 +94,27 @@ struct SfxStylesInfo_Impl
static ::rtl::OUString generateCommand(const ::rtl::OUString& sFamily, const ::rtl::OUString& sStyle);
};
-#define SFX_CFGGROUP_FUNCTION 1
-#define SFX_CFGGROUP_BASICMGR 2
-#define SFX_CFGGROUP_DOCBASICMGR 3
-#define SFX_CFGGROUP_BASICLIB 4
-#define SFX_CFGGROUP_BASICMOD 5
-#define SFX_CFGFUNCTION_MACRO 6
-#define SFX_CFGFUNCTION_SLOT 7
-#define SFX_CFGGROUP_SCRIPTCONTAINER 8
-#define SFX_CFGFUNCTION_SCRIPT 9
-#define SFX_CFGGROUP_STYLES 10
-#define SFX_CFGGROUP_SPECIALCHARACTERS 11
+#define SFX_CFGGROUP_FUNCTION 1
+#define SFX_CFGFUNCTION_SLOT 2
+#define SFX_CFGGROUP_SCRIPTCONTAINER 3
+#define SFX_CFGFUNCTION_SCRIPT 4
+#define SFX_CFGGROUP_STYLES 5
struct SfxGroupInfo_Impl
{
- sal_uInt16 nKind;
- sal_uInt16 nOrd;
+ sal_uInt16 nKind;
+ sal_uInt16 nUniqueID;
void* pObject;
sal_Bool bWasOpened;
String sCommand;
String sLabel;
SfxGroupInfo_Impl( sal_uInt16 n, sal_uInt16 nr, void* pObj = 0 ) :
- nKind( n ), nOrd( nr ), pObject( pObj ), bWasOpened(sal_False) {}
+ nKind( n ), nUniqueID( nr ), pObject( pObj ), bWasOpened(sal_False) {}
+};
+
+struct CuiMacroInfo
+{
};
typedef SfxGroupInfo_Impl* SfxGroupInfoPtr;
@@ -143,7 +140,7 @@ public:
String GetHelpText( SvLBoxEntry *pEntry );
String GetCurCommand();
String GetCurLabel();
- SfxMacroInfo* GetMacroInfo();
+ String GetSelectedScriptURI();
void FunctionSelected();
void SetStylesInfo(SfxStylesInfo_Impl* pStyles);
};
@@ -155,9 +152,7 @@ class SfxConfigGroupListBox_Impl : public SvTreeListBox
//SfxSlotPool* pSlotPool;
SfxConfigFunctionListBox_Impl* pFunctionListBox;
SfxGroupInfoArr_Impl aArr;
- sal_uLong nMode;
- sal_Bool bShowSF; // show Scripting Framework scripts
- sal_Bool bShowBasic; // show Basic scripts
+ sal_uLong nMode;
::rtl::OUString m_sModuleLongName;
css::uno::Reference< css::lang::XMultiServiceFactory > m_xSMGR;
@@ -198,11 +193,8 @@ public:
void Open( SvLBoxEntry*, sal_Bool );
void GroupSelected();
void SelectMacro( const SfxMacroInfoItem* );
- void AddAndSelect( const SfxStringItem*, const SfxStringItem* );
void SelectMacro( const String&, const String& );
String GetGroup();
- BasicManager* GetBasicManager( const SvLBoxEntry& _rEntry );
- void SetScriptType( const String& rScriptType );
void SetStylesInfo(SfxStylesInfo_Impl* pStyles);
};
diff --git a/cui/source/inc/macroass.hxx b/cui/source/inc/macroass.hxx
index 320ea812725f..7ffd559680f3 100644
--- a/cui/source/inc/macroass.hxx
+++ b/cui/source/inc/macroass.hxx
@@ -41,9 +41,6 @@ class SvTabListBox;
class Edit;
class String;
-typedef SvStringsDtor* (*FNGetRangeHdl)( _SfxMacroTabPage*, const String& rLanguage );
-typedef SvStringsDtor* (*FNGetMacrosOfRangeHdl)( _SfxMacroTabPage*, const String& rLanguage, const String& rRange );
-
class SfxConfigGroupListBox_Impl;
class SfxConfigFunctionListBox_Impl;
class _HeaderTabListBox;
@@ -59,7 +56,6 @@ class _SfxMacroTabPage : public SfxTabPage
DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, DoubleClickHdl_Impl, Control* );
DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, AssignDeleteHdl_Impl, PushButton * );
- DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, ChangeScriptHdl_Impl, RadioButton * );
DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, TimeOut_Impl, Timer* );
protected:
@@ -70,7 +66,7 @@ protected:
void InitAndSetHandler();
void FillEvents();
void FillMacroList();
- void EnableButtons( const String& rLanguage );
+ void EnableButtons();
public:
@@ -82,7 +78,7 @@ public:
void SetMacroTbl( const SvxMacroTableDtor& rTbl );
void ClearMacroTbl();
- virtual void ScriptChanged( const String& rLanguage );
+ virtual void ScriptChanged();
virtual void PageCreated (SfxAllItemSet aSet);
// --------- Erben aus der Basis -------------
diff --git a/cui/source/inc/macropg.hxx b/cui/source/inc/macropg.hxx
index c1e864d6b58b..99614fd81172 100644
--- a/cui/source/inc/macropg.hxx
+++ b/cui/source/inc/macropg.hxx
@@ -90,7 +90,7 @@ protected:
_SvxMacroTabPage( Window* pParent, const ResId& rId, const SfxItemSet& rItemSet );
- void EnableButtons( const String& rLanguage );
+ void EnableButtons();
::com::sun::star::uno::Any GetPropsByName( const ::rtl::OUString& eventName, EventsHash& eventsHash );
::std::pair< ::rtl::OUString, ::rtl::OUString > GetPairFromAny( ::com::sun::star::uno::Any aAny );
diff --git a/cui/source/options/optlingu.src b/cui/source/options/optlingu.src
index ace1f8e193bf..12192ad8ac4b 100644..100755
--- a/cui/source/options/optlingu.src
+++ b/cui/source/options/optlingu.src
@@ -354,11 +354,4 @@ QueryBox RID_SFXQB_DELDICT
DefButton = WB_DEF_NO ;
Message [ en-US ] = "Do you want to delete the dictionary?" ;
};
- // RID_SFXQB_DEL_IGNORELIST ----------------------------------------------
-QueryBox RID_SFXQB_DEL_IGNORELIST
-{
- Buttons = WB_YES_NO ;
- DefButton = WB_DEF_NO ;
- Message [ en-US ] = "Do you want to delete the ignore list?" ;
-};
// ******************************************************************* EOF
diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx
index 267f77e5c035..c0ce0f3b411a 100644
--- a/cui/source/tabpages/macroass.cxx
+++ b/cui/source/tabpages/macroass.cxx
@@ -43,10 +43,11 @@
#include <svtools/svmedit.hxx>
#include "cfgutil.hxx"
#include <sfx2/app.hxx>
+#include <sfx2/evntconf.hxx>
#include <sfx2/objsh.hxx>
#include "macroass.hrc"
#include "cuires.hrc"
-#include <sfx2/macrconf.hxx>
+#include <vcl/fixed.hxx>
#include "headertablistbox.hxx"
using ::com::sun::star::uno::Reference;
@@ -63,7 +64,6 @@ public:
PushButton* pDeletePB;
String* pStrEvent;
String* pAssignedMacro;
- ListBox* pScriptTypeLB;
_HeaderTabListBox* pEventLB;
SfxConfigGroupListBox_Impl* pGroupLB;
FixedText* pFT_MacroLBLabel;
@@ -71,8 +71,6 @@ public:
FixedText* pMacroFT;
String* pMacroStr;
- FNGetRangeHdl fnGetRange;
- FNGetMacrosOfRangeHdl fnGetMacroOfRange;
sal_Bool bReadOnly;
Timer maFillGroupTimer;
@@ -84,15 +82,12 @@ _SfxMacroTabPage_Impl::_SfxMacroTabPage_Impl( void ) :
pDeletePB( NULL ),
pStrEvent( NULL ),
pAssignedMacro( NULL ),
- pScriptTypeLB( NULL ),
pEventLB( NULL ),
pGroupLB( NULL ),
pFT_MacroLBLabel( NULL ),
pMacroLB( NULL ),
pMacroFT( NULL ),
pMacroStr( NULL ),
- fnGetRange( NULL ),
- fnGetMacroOfRange( NULL ),
bReadOnly( sal_False ),
bGotEvents( sal_False )
{
@@ -104,7 +99,6 @@ _SfxMacroTabPage_Impl::~_SfxMacroTabPage_Impl()
delete pDeletePB;
delete pStrEvent;
delete pAssignedMacro;
- delete pScriptTypeLB;
delete pEventLB;
delete pGroupLB;
delete pMacroLB;
@@ -114,9 +108,6 @@ _SfxMacroTabPage_Impl::~_SfxMacroTabPage_Impl()
}
-SvStringsDtor* _ImpGetRangeHdl( _SfxMacroTabPage*, const String& rLanguage );
-SvStringsDtor* _ImpGetMacrosOfRangeHdl( _SfxMacroTabPage*, const String& rLanguage, const String& rRange );
-
static sal_uInt16 __FAR_DATA aPageRg[] = {
SID_ATTR_MACROITEM, SID_ATTR_MACROITEM,
0
@@ -139,7 +130,7 @@ static long nTabs[] =
#define LB_EVENTS_ITEMPOS 1
#define LB_MACROS_ITEMPOS 2
-String ConvertToUIName_Impl( SvxMacro *pMacro, const String& /*rLanguage*/ )
+String ConvertToUIName_Impl( SvxMacro *pMacro )
{
String aName( pMacro->GetMacName() );
String aEntry;
@@ -161,7 +152,7 @@ String ConvertToUIName_Impl( SvxMacro *pMacro, const String& /*rLanguage*/ )
return aName;
}
-void _SfxMacroTabPage::EnableButtons( const String& rLangName )
+void _SfxMacroTabPage::EnableButtons()
{
// Solange die Eventbox leer ist, nichts tun
const SvLBoxEntry* pE = mpImpl->pEventLB->GetListBox().FirstSelected();
@@ -171,26 +162,14 @@ void _SfxMacroTabPage::EnableButtons( const String& rLangName )
const SvxMacro* pM = aTbl.Get( (sal_uInt16)(sal_uLong) pE->GetUserData() );
mpImpl->pDeletePB->Enable( 0 != pM && !mpImpl->bReadOnly );
- // Bei gleichem ScriptType Zuweisung nur, wenn Macro sich
- // ge"andert hat; bei verschiedenem ScriptType, wenn Script nicht leer
String sEventMacro;
sEventMacro = ((SvLBoxString*)pE->GetItem( LB_MACROS_ITEMPOS ))->GetText();
- if ( rLangName.EqualsAscii("JavaScript") )
- {
- DBG_ERROR( "_SfxMacroTabPage::EnableButtons(): this is not an up to date usage!" );
- }
- else
- {
- SfxMacroInfo* pInfo = mpImpl->pMacroLB->GetMacroInfo();
- String sSelMacro;
- if ( pInfo )
- sSelMacro = pInfo->GetMacroName();
- if( pM && rLangName != pM->GetLanguage() )
- mpImpl->pAssignPB->Enable( pInfo != 0 && !mpImpl->bReadOnly );
- else
- mpImpl->pAssignPB->Enable( pInfo && !mpImpl->bReadOnly && !sSelMacro.EqualsIgnoreCaseAscii( sEventMacro ) );
- }
+
+ String sScriptURI = mpImpl->pMacroLB->GetSelectedScriptURI();
+ mpImpl->pAssignPB->Enable( !mpImpl->bReadOnly && !sScriptURI.EqualsIgnoreCaseAscii( sEventMacro ) );
}
+ else
+ mpImpl->pAssignPB->Enable( FALSE );
}
_SfxMacroTabPage::_SfxMacroTabPage( Window* pParent, const ResId& rResId, const SfxItemSet& rAttrSet )
@@ -198,8 +177,6 @@ _SfxMacroTabPage::_SfxMacroTabPage( Window* pParent, const ResId& rResId, const
{
mpImpl = new _SfxMacroTabPage_Impl;
- mpImpl->fnGetRange = &_ImpGetRangeHdl;
- mpImpl->fnGetMacroOfRange = &_ImpGetMacrosOfRangeHdl;
}
_SfxMacroTabPage::~_SfxMacroTabPage()
@@ -216,7 +193,7 @@ void _SfxMacroTabPage::AddEvent( const String & rEventName, sal_uInt16 nEventId
SvxMacro* pM = aTbl.Get( nEventId );
if( pM )
{
- String sNew( ConvertToUIName_Impl( pM, mpImpl->pScriptTypeLB->GetSelectEntry() ) );
+ String sNew( ConvertToUIName_Impl( pM ) );
sTmp += sNew;
}
@@ -224,17 +201,16 @@ void _SfxMacroTabPage::AddEvent( const String & rEventName, sal_uInt16 nEventId
pE->SetUserData( reinterpret_cast< void* >( sal::static_int_cast< sal_IntPtr >( nEventId )) );
}
-void _SfxMacroTabPage::ScriptChanged( const String& aLangName )
+void _SfxMacroTabPage::ScriptChanged()
{
// neue Bereiche und deren Funktionen besorgen
{
- mpImpl->pGroupLB->SetScriptType( aLangName );
mpImpl->pGroupLB->Show();
mpImpl->pMacroLB->Show();
mpImpl->pMacroFT->SetText( *mpImpl->pMacroStr );
}
- EnableButtons( aLangName );
+ EnableButtons();
}
sal_Bool _SfxMacroTabPage::FillItemSet( SfxItemSet& rSet )
@@ -311,24 +287,8 @@ IMPL_STATIC_LINK( _SfxMacroTabPage, SelectEvent_Impl, SvTabListBox*, EMPTYARG )
return 0;
}
- sal_uInt16 nEventId = (sal_uInt16)(sal_uLong)pE->GetUserData();
- String aLanguage = pImpl->pScriptTypeLB->GetSelectEntry();
-
- const SvxMacro* pM = pThis->aTbl.Get( nEventId );
- if( pM )
- {
- if( aLanguage != pM->GetLanguage() )
- {
- pImpl->pScriptTypeLB->SelectEntry( pM->GetLanguage() );
- pThis->ScriptChanged( pM->GetLanguage() );
- }
- else
- {
- DBG_ASSERT( !aLanguage.EqualsAscii("JavaScript"), "_SfxMacroTabPage, SelectEvent_Impl(): outdated use!" );
- }
- }
-
- pThis->EnableButtons( aLanguage );
+ pThis->ScriptChanged();
+ pThis->EnableButtons();
return 0;
}
@@ -336,26 +296,14 @@ IMPL_STATIC_LINK( _SfxMacroTabPage, SelectGroup_Impl, ListBox*, EMPTYARG )
{
_SfxMacroTabPage_Impl* pImpl = pThis->mpImpl;
String sSel( pImpl->pGroupLB->GetGroup() );
- String aLanguage = pImpl->pScriptTypeLB->GetSelectEntry();
- if( !aLanguage.EqualsAscii( "JavaScript" ) )
- {
- pImpl->pGroupLB->GroupSelected();
- SfxMacroInfo* pMacro = pImpl->pMacroLB->GetMacroInfo();
- String aLabelText;
- if( pMacro )
- {
- aLabelText = pImpl->maStaticMacroLBLabel;
- aLabelText += pMacro->GetModuleName();
- }
- else
- {
- // Wenn dort ein Macro drin ist, wurde es selektiert und der
- // AssignButton schon in SelectMacro richtig enabled
- pImpl->pAssignPB->Enable( sal_False );
- }
-
- pImpl->pFT_MacroLBLabel->SetText( aLabelText );
- }
+ pImpl->pGroupLB->GroupSelected();
+ const String sScriptURI = pImpl->pMacroLB->GetSelectedScriptURI();
+ String aLabelText;
+ if( sScriptURI.Len() > 0 )
+ aLabelText = pImpl->maStaticMacroLBLabel;
+ pImpl->pFT_MacroLBLabel->SetText( aLabelText );
+
+ pThis->EnableButtons();
return 0;
}
@@ -363,7 +311,7 @@ IMPL_STATIC_LINK( _SfxMacroTabPage, SelectMacro_Impl, ListBox*, EMPTYARG )
{
_SfxMacroTabPage_Impl* pImpl = pThis->mpImpl;
pImpl->pMacroLB->FunctionSelected();
- pThis->EnableButtons( pImpl->pScriptTypeLB->GetSelectEntry() );
+ pThis->EnableButtons();
return 0;
}
@@ -387,51 +335,31 @@ IMPL_STATIC_LINK( _SfxMacroTabPage, AssignDeleteHdl_Impl, PushButton*, pBtn )
SvxMacro *pRemoveMacro = pThis->aTbl.Remove( nEvent );
delete pRemoveMacro;
- String aLanguage = pImpl->pScriptTypeLB->GetSelectEntry();
- String sNew;
+ String sScriptURI;
if( bAssEnabled )
{
- String sGroup;
- String sMacro;
- String aEntryText( sNew );
- DBG_ASSERT( !aLanguage.EqualsAscii("JavaScript"), "_SfxMacroTabPage, AssignDeleteHdl_Impl(): outdated use!" );
-
- SfxMacroInfo* pMacro = pImpl->pMacroLB->GetMacroInfo();
- sMacro = pMacro->GetQualifiedName();
- sGroup = pImpl->pGroupLB->GetGroup();
- sNew = pMacro->GetMacroName();
-
- if( sMacro.CompareToAscii( "vnd.sun.star.script:", 20 ) == COMPARE_EQUAL )
+ sScriptURI = pImpl->pMacroLB->GetSelectedScriptURI();
+ if( sScriptURI.CompareToAscii( "vnd.sun.star.script:", 20 ) == COMPARE_EQUAL )
{
- OSL_TRACE("ASSIGN_DELETE: Its a script");
pThis->aTbl.Insert(
- nEvent, new SvxMacro( sMacro, String::CreateFromAscii("Script") ) );
+ nEvent, new SvxMacro( sScriptURI, String::CreateFromAscii( SVX_MACRO_LANGUAGE_SF ) ) );
}
else
{
- OSL_TRACE("ASSIGN_DELETE: Its a basic macro");
- String sBasicName/*(SfxResId(STR_BASICNAME))*/;
- if ( aLanguage == sBasicName )
- pThis->aTbl.Insert( nEvent, new SvxMacro( sMacro, sGroup, STARBASIC ) );
- else
- pThis->aTbl.Insert( nEvent, new SvxMacro( sMacro, aLanguage ) );
+ OSL_ENSURE( false, "_SfxMacroTabPage::AssignDeleteHdl_Impl: this branch is *not* dead? (out of interest: tell fs, please!)" );
+ pThis->aTbl.Insert(
+ nEvent, new SvxMacro( sScriptURI, String::CreateFromAscii( SVX_MACRO_LANGUAGE_STARBASIC ) ) );
}
}
pImpl->pEventLB->SetUpdateMode( sal_False );
- pE->ReplaceItem( new SvLBoxString( pE, 0, sNew ), LB_MACROS_ITEMPOS );
+ pE->ReplaceItem( new SvLBoxString( pE, 0, sScriptURI ), LB_MACROS_ITEMPOS );
rListBox.GetModel()->InvalidateEntry( pE );
rListBox.Select( pE );
rListBox.MakeVisible( pE );
rListBox.SetUpdateMode( sal_True );
- pThis->EnableButtons( aLanguage );
- return 0;
-}
-
-IMPL_STATIC_LINK( _SfxMacroTabPage, ChangeScriptHdl_Impl, RadioButton*, EMPTYARG )
-{
- pThis->ScriptChanged( pThis->mpImpl->pScriptTypeLB->GetSelectEntry() );
+ pThis->EnableButtons();
return 0;
}
@@ -469,8 +397,6 @@ void _SfxMacroTabPage::InitAndSetHandler()
mpImpl->pGroupLB->SetSelectHdl( STATIC_LINK( this, _SfxMacroTabPage, SelectGroup_Impl ));
mpImpl->pMacroLB->SetSelectHdl( STATIC_LINK( this, _SfxMacroTabPage, SelectMacro_Impl ));
- mpImpl->pScriptTypeLB->SetSelectHdl( STATIC_LINK( this, _SfxMacroTabPage, ChangeScriptHdl_Impl ));
-
rListBox.SetSelectionMode( SINGLE_SELECTION );
rListBox.SetTabs( &nTabs[0], MAP_APPFONT );
Size aSize( nTabs[ 2 ], 0 );
@@ -486,11 +412,6 @@ void _SfxMacroTabPage::InitAndSetHandler()
mpImpl->pGroupLB->Enable( sal_True );
mpImpl->pMacroLB->Enable( sal_True );
- mpImpl->pScriptTypeLB->SetDropDownLineCount( 3 );
- String sBasicName/*(SfxResId(STR_BASICNAME))*/;
- mpImpl->pScriptTypeLB->InsertEntry( sBasicName );
- mpImpl->pScriptTypeLB->SelectEntry( sBasicName );
-
mpImpl->pGroupLB->SetFunctionListBox( mpImpl->pMacroLB );
mpImpl->maFillGroupTimer.SetTimeoutHdl( STATIC_LINK( this, _SfxMacroTabPage, TimeOut_Impl ) );
@@ -500,30 +421,18 @@ void _SfxMacroTabPage::InitAndSetHandler()
void _SfxMacroTabPage::FillMacroList()
{
- String aLanguage = mpImpl->pScriptTypeLB->GetSelectEntry();
- if( ! aLanguage.EqualsAscii("JavaScript") )
- {
- // 2 Listboxen
- SvStringsDtor* pArr = (*mpImpl->fnGetRange)( this, String(/*SfxResId(STR_BASICNAME)*/) );
- if( pArr )
- {
- mpImpl->pGroupLB->Init(
- ::com::sun::star::uno::Reference<
- ::com::sun::star::lang::XMultiServiceFactory >(),
- GetFrame(),
- ::rtl::OUString() );
-
- delete pArr;
- }
- }
+ mpImpl->pGroupLB->Init(
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::lang::XMultiServiceFactory >(),
+ GetFrame(),
+ ::rtl::OUString() );
}
void _SfxMacroTabPage::FillEvents()
{
SvHeaderTabListBox& rListBox = mpImpl->pEventLB->GetListBox();
- String aLanguage = mpImpl->pScriptTypeLB->GetSelectEntry();
- sal_uLong nEntryCnt = rListBox.GetEntryCount();
+ sal_uLong nEntryCnt = rListBox.GetEntryCount();
// Events aus der Tabelle holen und die EventListBox entsprechen fuellen
for( sal_uLong n = 0 ; n < nEntryCnt ; ++n )
@@ -538,7 +447,7 @@ void _SfxMacroTabPage::FillEvents()
String sNew;
sal_uInt16 nEventId = ( sal_uInt16 ) ( sal_uLong ) pE->GetUserData();
if( aTbl.IsKeyValid( nEventId ) )
- sNew = ConvertToUIName_Impl( aTbl.Get( nEventId ), aLanguage );
+ sNew = ConvertToUIName_Impl( aTbl.Get( nEventId ) );
if( sOld != sNew )
{
@@ -549,78 +458,6 @@ void _SfxMacroTabPage::FillEvents()
}
}
-SvStringsDtor* __EXPORT _ImpGetRangeHdl( _SfxMacroTabPage* /*pTbPg*/, const String& rLanguage )
-{
- SvStringsDtor* pNew = new SvStringsDtor;
- SfxApplication* pSfxApp = SFX_APP();
-
- if ( !rLanguage.EqualsAscii("JavaScript") )
- {
- pSfxApp->EnterBasicCall();
-
- // AppBasic einf"ugen
- String* pNewEntry = new String( pSfxApp->GetName() );
- pNew->Insert( pNewEntry, pNew->Count() );
-
- // Aktuelles Dokument
- SfxObjectShell* pDoc = SfxObjectShell::Current();
- if ( pDoc )
- {
- String aTitle = pDoc->GetTitle();
-
- // Hack f"ur Aufruf aus der Basic-IDE : das Basic ermitteln, das
- // gerade bearbeitet wird
-
- String aAppName(DEFINE_CONST_UNICODE("BASIC - "));
- sal_uInt16 nLen = aAppName.Len();
- if ( aTitle.CompareIgnoreCaseToAscii( aAppName, nLen ) == COMPARE_EQUAL )
- {
- // Basic-Namensprefix entfernen
- aTitle.Erase( 0, nLen );
- sal_uInt16 nIndex=0, nCount=aTitle.GetTokenCount('.');
- if ( nCount > 1 )
- {
- // Namen der Library entfernen
- aTitle.GetToken( nCount-2, '.', nIndex );
- aTitle.Erase( nIndex-1 );
- }
-
- // Wenn das App-Basic gerade in der Basic-IDE bearbeitet wird, kein
- // Dokument verwenden
- pDoc = SfxObjectShell::GetFirst();
- while( pDoc )
- {
- if ( aTitle == pDoc->GetTitle() )
- break;
- pDoc = SfxObjectShell::GetNext( *pDoc );
- }
- }
-
- if ( pDoc && pDoc->GetBasicManager() != SFX_APP()->GetBasicManager() &&
- pDoc->GetBasicManager()->GetLibCount() )
- {
- pNewEntry = new String( aTitle );
- pNew->Insert( pNewEntry, pNew->Count() );
- }
- }
-
- pSfxApp->LeaveBasicCall();
- }
-
- return pNew;
-}
-
-// besorgen der Funktionen eines Bereiches
-SvStringsDtor* __EXPORT _ImpGetMacrosOfRangeHdl(
- _SfxMacroTabPage* /*pTbPg*/,
- const String& /*rLanguage*/,
- const String& /*rRange*/ )
-{
- SvStringsDtor* pNew = new SvStringsDtor;
- return pNew;
-}
-
-
SfxMacroTabPage::SfxMacroTabPage( Window* pParent, const ResId& rResId, const Reference< XFrame >& rxDocumentFrame, const SfxItemSet& rSet )
: _SfxMacroTabPage( pParent, rResId, rSet )
{
@@ -629,8 +466,6 @@ SfxMacroTabPage::SfxMacroTabPage( Window* pParent, const ResId& rResId, const Re
mpImpl->pEventLB = new _HeaderTabListBox( this, CUI_RES( LB_EVENT ) );
mpImpl->pAssignPB = new PushButton( this, CUI_RES( PB_ASSIGN ) );
mpImpl->pDeletePB = new PushButton( this, CUI_RES( PB_DELETE ) );
- mpImpl->pScriptTypeLB = new ListBox(this, CUI_RES( LB_SCRIPTTYPE ) );
- mpImpl->pScriptTypeLB->Hide();
mpImpl->pMacroFT = new FixedText( this, CUI_RES( FT_MACRO ) );
mpImpl->pGroupLB = new SfxConfigGroupListBox_Impl( this, CUI_RES( LB_GROUP ) );
mpImpl->pFT_MacroLBLabel = new FixedText( this, CUI_RES( FT_LABEL4LB_MACROS ) );
@@ -644,7 +479,7 @@ SfxMacroTabPage::SfxMacroTabPage( Window* pParent, const ResId& rResId, const Re
InitAndSetHandler();
- ScriptChanged( String( /*SfxResId(STR_BASICNAME)*/ ) );
+ ScriptChanged();
}
SfxTabPage* SfxMacroTabPage::Create( Window* pParent, const SfxItemSet& rAttrSet )
diff --git a/cui/source/tabpages/macroass.hrc b/cui/source/tabpages/macroass.hrc
index 614711e1981e..73292a7f1b0e 100644
--- a/cui/source/tabpages/macroass.hrc
+++ b/cui/source/tabpages/macroass.hrc
@@ -38,7 +38,7 @@
#define FT_MACRO 5
#define LB_GROUP 6
#define LB_MACROS 7
-#define LB_SCRIPTTYPE 8
+ // FREE
#define FT_LABEL4LB_MACROS 9
#define STR_JAVASCRIPT 10
#define STR_MACROS 11
diff --git a/cui/source/tabpages/macroass.src b/cui/source/tabpages/macroass.src
index 9a5bb519d460..05e81658b8a3 100644
--- a/cui/source/tabpages/macroass.src
+++ b/cui/source/tabpages/macroass.src
@@ -78,7 +78,7 @@ TabPage RID_SVXPAGE_EVENTASSIGN
Pos = MAP_APPFONT ( COL2 , ROW7 ) ;
Size = MAP_APPFONT ( WIDTH1 , RSC_CD_FIXEDTEXT_HEIGHT + HEIGHT_EXTRA7 ) ;
WordBreak = TRUE;
- Text [ en-US ] = "~Existing macros in:\n" ;
+ Text [ en-US ] = "~Existing macros\n" ;
};
Control LB_MACROS
{
@@ -107,17 +107,6 @@ TabPage RID_SVXPAGE_EVENTASSIGN
TabStop = TRUE ;
Text [ en-US ] = "~Remove" ;
};
- ListBox LB_SCRIPTTYPE
- {
- HelpID = "cui:ListBox:RID_SVXPAGE_EVENTASSIGN:LB_SCRIPTTYPE";
- Pos = MAP_APPFONT ( COL4 , ROW4 ) ;
- Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , 60 ) ;
- // en-US was missing
- Text [ en-US ] = "~Scripting Language" ;
- TabStop = TRUE ;
- Disable = FALSE ;
- DropDown = TRUE ;
- };
String STR_MACROS
{
Text [ en-US ] = "Macros" ;
diff --git a/cui/source/tabpages/page.h b/cui/source/tabpages/page.h
index 2bc5583fe859..9de1ee21d3e5 100644
--- a/cui/source/tabpages/page.h
+++ b/cui/source/tabpages/page.h
@@ -29,6 +29,11 @@
// define ----------------------------------------------------------------
+//!! the values of the following defines must correspond to the array position
+//!! of the respective paper size in the file i18npool/source/paper/paper.cxx
+//!! There are enums for them in i18npool/inc/i18npool/paper.hxx but unfortunately
+//!! the resource compiler does not understand enums, thus the enum values need
+//!! to be duplicated here for use in the src file.
#define PAPERSIZE_A0 0
#define PAPERSIZE_A1 1
#define PAPERSIZE_A2 2
@@ -66,6 +71,7 @@
#define PAPERSIZE_B4_JIS 34
#define PAPERSIZE_B5_JIS 35
#define PAPERSIZE_B6_JIS 36
+#define PAPERSIZE_A6 56
#endif
diff --git a/cui/source/tabpages/page.src b/cui/source/tabpages/page.src
index 5c919f1df17a..2618b0b9389a 100644
--- a/cui/source/tabpages/page.src
+++ b/cui/source/tabpages/page.src
@@ -389,6 +389,7 @@ StringArray RID_SVXSTRARY_PAPERSIZE_STD
{
ItemList [ en-US ] =
{
+ < "A6" ; PAPERSIZE_A6 ; > ;
< "A5" ; PAPERSIZE_A5 ; > ;
< "A4" ; PAPERSIZE_A4 ; > ;
< "A3" ; PAPERSIZE_A3 ; > ;
@@ -423,6 +424,7 @@ StringArray RID_SVXSTRARY_PAPERSIZE_DRAW
{
ItemList [ en-US ] =
{
+ < "A6" ; PAPERSIZE_A6 ; > ;
< "A5" ; PAPERSIZE_A5 ; > ;
< "A4" ; PAPERSIZE_A4 ; > ;
< "A3" ; PAPERSIZE_A3 ; > ;