summaryrefslogtreecommitdiff
path: root/cui/source/customize
diff options
context:
space:
mode:
Diffstat (limited to 'cui/source/customize')
-rw-r--r--cui/source/customize/acccfg.cxx3
-rw-r--r--cui/source/customize/cfgutil.cxx228
2 files changed, 2 insertions, 229 deletions
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index c0869ce94f30..7deecf88fc99 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -1440,9 +1440,6 @@ void SfxAcceleratorConfigPage::Reset( const SfxItemSet& rSet )
const SfxPoolItem* pFontItem=0;
if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_SPECIALCHAR, TRUE, &pFontItem ) )
m_pFontItem = PTR_CAST( SfxStringItem, pFontItem );
-
- if ( m_pStringItem )
- pGroupLBox->AddAndSelect( m_pStringItem, m_pFontItem );
}
}
diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index 942e90136bc7..f501a334beed 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -350,8 +350,7 @@ 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() );
@@ -359,7 +358,6 @@ void SfxConfigFunctionListBox_Impl::ClearAll()
}
if ( pData->nKind == SFX_CFGGROUP_SCRIPTCONTAINER
- || pData->nKind == SFX_CFGGROUP_DOCBASICMGR
)
{
XInterface* xi = static_cast<XInterface *>(pData->pObject);
@@ -385,8 +383,7 @@ SfxMacroInfo* SfxConfigFunctionListBox_Impl::GetMacroInfo()
if ( pEntry )
{
SfxGroupInfo_Impl *pData = (SfxGroupInfo_Impl*) pEntry->GetUserData();
- if ( pData && ( pData->nKind == SFX_CFGFUNCTION_MACRO ||
- pData->nKind == SFX_CFGFUNCTION_SCRIPT ) )
+ if ( pData && ( pData->nKind == SFX_CFGFUNCTION_SCRIPT ) )
return (SfxMacroInfo*) pData->pObject;
}
@@ -504,7 +501,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);
@@ -520,30 +516,6 @@ void SfxConfigGroupListBox_Impl::ClearAll()
Clear();
}
-void SfxConfigGroupListBox_Impl::SetScriptType()
-{
- 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;
@@ -562,18 +534,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 );
}
@@ -581,27 +541,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
@@ -724,46 +663,6 @@ void SfxConfigGroupListBox_Impl::Init(const css::uno::Reference< css::lang::XMul
InitStyles();
}
- /*
-
- // Verwendet wird der aktuelle Slotpool
- if ( nMode )
- {
- pSlotPool = pPool ? pPool : &SFX_SLOTPOOL();
- for ( USHORT 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 )
- {
- USHORT 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 );
- }
- }
- }
- }
-*/
OSL_TRACE("** ** About to initialise SF Scripts");
// Add Scripting Framework entries
Reference< browse::XBrowseNode > rootNode;
@@ -917,14 +816,6 @@ void SfxConfigGroupListBox_Impl::Init(const css::uno::Reference< css::lang::XMul
pEntry->EnableChildsOnDemand( 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( TRUE );
}
@@ -1105,7 +996,6 @@ void SfxConfigGroupListBox_Impl::GroupSelected()
pFunctionListBox->SetUpdateMode(FALSE);
pFunctionListBox->ClearAll();
if ( pInfo->nKind != SFX_CFGGROUP_FUNCTION &&
- pInfo->nKind != SFX_CFGGROUP_BASICMOD &&
pInfo->nKind != SFX_CFGGROUP_SCRIPTCONTAINER &&
pInfo->nKind != SFX_CFGGROUP_STYLES )
{
@@ -1137,45 +1027,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 ( USHORT 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() );
- USHORT 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 ) )
@@ -1319,62 +1170,6 @@ void SfxConfigGroupListBox_Impl::RequestingChilds( SvLBoxEntry *pEntry )
pInfo->bWasOpened = 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 ( USHORT 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( 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 ( USHORT nMod=0; nMod<pLib->GetModules()->Count(); nMod++ )
- {
- SbModule* pMod = (SbModule*)pLib->GetModules()->Get( nMod );
-
- 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 ) )
@@ -1497,25 +1292,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(),