Kaydet (Commit) 2024ffae authored tarafından Rüdiger Timm's avatar Rüdiger Timm

INTEGRATION: CWS sfxcleanup (1.53.156); FILE MERGED

2006/04/28 13:35:20 mba 1.53.156.2: RESYNC: (1.53-1.54); FILE MERGED
2006/03/04 13:02:54 mba 1.53.156.1: #132394#: remove superfluous code
üst d8f6f088
......@@ -4,9 +4,9 @@
*
* $RCSfile: cfg.cxx,v $
*
* $Revision: 1.54 $
* $Revision: 1.55 $
*
* last change: $Author: vg $ $Date: 2006-04-04 08:32:36 $
* last change: $Author: rt $ $Date: 2006-05-02 16:30:58 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
......@@ -71,7 +71,6 @@
#endif
#include "app.hxx"
#include "appdata.hxx"
#include "msg.hxx"
#include "msgpool.hxx"
#include "sfxresid.hxx"
......@@ -354,67 +353,7 @@ void SfxStylesInfo_Impl::getLabel4Style(SfxStyleInfo_Impl& aStyle)
}
return lStyles;
}
/*
struct SfxStatBarInfo_Impl
{
USHORT nId;
String aHelpText;
SfxStatBarInfo_Impl(USHORT nID, String aString) :
nId(nID),
aHelpText(aString)
{}
};
*/
//DECL_PTRARRAY(SfxStbInfoArr_Impl, SfxStatBarInfo_Impl*, 20, 4);
SV_IMPL_PTRARR(SfxGroupInfoArr_Impl, SfxGroupInfoPtr);
/*
SfxMenuConfigEntry::SfxMenuConfigEntry( USHORT nInitId, const String& rInitStr,
const String& rHelpText, BOOL bPopup )
: nId( nInitId )
, bPopUp(bPopup)
, aHelpText(rHelpText)
, aStr(rInitStr)
, bConfigure( TRUE )
, bStrEdited( FALSE )
{
if ( SfxMacroConfig::IsMacroSlot( nId ) )
{
SFX_APP()->GetMacroConfig()->RegisterSlotId( nId );
SfxMacroInfo* pInfo = SFX_APP()->GetMacroConfig()->GetMacroInfo( nId );
if ( pInfo )
aCommand = pInfo->GetURL();
bStrEdited = TRUE;
}
}
void SfxMenuConfigEntry::SetId( USHORT nNew )
{
if ( SfxMacroConfig::IsMacroSlot( nId ) )
SFX_APP()->GetMacroConfig()->ReleaseSlotId( nId );
nId = nNew;
if ( SfxMacroConfig::IsMacroSlot( nId ) )
{
SFX_APP()->GetMacroConfig()->RegisterSlotId( nId );
SfxMacroInfo* pInfo = SFX_APP()->GetMacroConfig()->GetMacroInfo( nId );
if ( pInfo )
aCommand = pInfo->GetURL();
bStrEdited = TRUE;
}
else
{
// Remove command string to fix problems if macro menu entry is overwritten
// by a normal function!
aCommand = String();
}
}
SfxMenuConfigEntry::~SfxMenuConfigEntry()
{
if ( SfxMacroConfig::IsMacroSlot( nId ) )
SFX_APP()->GetMacroConfig()->ReleaseSlotId( nId );
}
*/
SfxConfigFunctionListBox_Impl::SfxConfigFunctionListBox_Impl( Window* pParent, const ResId& rResId)
: SvTreeListBox( pParent, rResId )
, pCurEntry( 0 )
......@@ -593,10 +532,8 @@ USHORT SfxConfigFunctionListBox_Impl::GetId( SvLBoxEntry *pEntry )
return 0;
}
/*
String SfxConfigFunctionListBox_Impl::GetHelpText( SvLBoxEntry *pEntry )
/* Beschreibung
Gibt den Helptext des selektierten Entry zur"uck.
*/
{
// Information zum selektierten Entry aus den Userdaten holen
SfxGroupInfo_Impl *pInfo = pEntry ? (SfxGroupInfo_Impl*) pEntry->GetUserData(): 0;
......@@ -640,7 +577,7 @@ String SfxConfigFunctionListBox_Impl::GetHelpText( SvLBoxEntry *pEntry )
}
return String();
}
}*/
void SfxConfigFunctionListBox_Impl::FunctionSelected()
/* Beschreibung
......@@ -1889,572 +1826,3 @@ void SfxConfigGroupListBox_Impl::SelectMacro( const String& rBasic,
pEntry = NextSibling( pEntry );
}
}
/*
void SfxConfigDialog::ActivateToolBoxConfig( USHORT nId )
{
SetCurPageId( TP_CONFIG_OBJECTBAR );
nObjectBar = nId;
}
void SfxConfigDialog::PageCreated( USHORT nId, SfxTabPage& rPage )
{
switch ( nId )
{
case TP_CONFIG_ACCEL:
if ( pMacroInfo )
((SfxAcceleratorConfigPage&)rPage).SelectMacro( pMacroInfo );
break;
case TP_CONFIG_MENU:
if ( pMacroInfo )
((SfxMenuConfigPage&)rPage).SelectMacro( pMacroInfo );
break;
case TP_CONFIG_EVENT:
if ( pMacroInfo )
((SfxEventConfigPage&)rPage).SelectMacro( pMacroInfo );
break;
default:
break;
}
}
void SfxConfigDialog::ActivateMacroConfig(const SfxMacroInfoItem *pInfo)
{
pMacroInfo = pInfo;
}
void SfxConfigDialog::ActivateTabPage( USHORT nSlotId )
{
switch ( nSlotId )
{
case SID_CONFIG:
break;
case SID_TOOLBOXOPTIONS:
SetCurPageId( TP_CONFIG_OBJECTBAR );
break;
// case SID_CONFIGSTATUSBAR:
// SetCurPageId( TP_CONFIG_STATBAR );
// break;
case SID_CONFIGMENU:
SetCurPageId( TP_CONFIG_MENU );
break;
case SID_CONFIGACCEL:
SetCurPageId( TP_CONFIG_ACCEL );
break;
case SID_CONFIGEVENT:
SetCurPageId( TP_CONFIG_EVENT );
break;
}
}
SfxTabPage *CreateMenuConfigPage( Window *pParent, const SfxItemSet& rSet )
{
return new SfxMenuConfigPage( pParent, rSet );
}
SfxTabPage *CreateAccelConfigPage( Window *pParent, const SfxItemSet& rSet )
{
return new SfxAcceleratorConfigPage( pParent, rSet );
}
/*
SfxTabPage *CreateStatusBarConfigPage( Window *pParent, const SfxItemSet& rSet )
{
return new SfxStatusBarConfigPage( pParent, rSet );
}
SfxTabPage *CreateObjectBarConfigPage( Window *pParent, const SfxItemSet& rSet )
{
return NULL;
}
SfxTabPage *CreateEventConfigPage( Window *pParent, const SfxItemSet& rSet )
{
return new SfxEventConfigPage( pParent, rSet );
}
SfxConfigDialog::SfxConfigDialog( Window * pParent, const SfxItemSet* pSet, SfxViewFrame* pFrame )
: SfxTabDialog( pFrame, pParent, SfxResId( DLG_CONFIG ), pSet )
, pMacroInfo( 0 )
, pViewFrame( pFrame )
, nObjectBar( 0 )
{
FreeResource();
AddTabPage( TP_CONFIG_MENU, CreateMenuConfigPage, NULL );
AddTabPage( TP_CONFIG_ACCEL, CreateAccelConfigPage, NULL );
// AddTabPage( TP_CONFIG_STATBAR, CreateStatusBarConfigPage, NULL );
AddTabPage( TP_CONFIG_OBJECTBAR, CreateObjectBarConfigPage, NULL );
AddTabPage( TP_CONFIG_EVENT, CreateEventConfigPage, NULL );
}
SfxConfigDialog::~SfxConfigDialog()
{
}
short SfxConfigDialog::Ok()
{
USHORT nRet = SfxTabDialog::Ok();
// configurations in documents are stored with the documents
SFX_APP()->GetConfigManager_Impl()->StoreConfiguration();
return nRet;
}
// SfxStatusBarConfigPage::Ctor() **********************************************
SfxStatusBarConfigPage::SfxStatusBarConfigPage( Window *pParent, const SfxItemSet& rSet ) :
SfxTabPage( pParent, SfxResId( TP_CONFIG_STATBAR ), rSet ),
aEntriesBox ( this, ResId( BOX_STATBAR_ENTRIES ) ),
aStatusBarGroup ( this, ResId( GRP_STATBAR ) ),
aLoadButton ( this, ResId( BTN_LOAD ) ),
aSaveButton ( this, ResId( BTN_SAVE ) ),
aResetButton ( this, ResId( BTN_RESET ) ),
pMgr( 0 ),
bMgrCreated( FALSE )
{
FreeResource();
aLoadButton .SetClickHdl ( LINK( this, SfxStatusBarConfigPage, Load ) );
aSaveButton .SetClickHdl ( LINK( this, SfxStatusBarConfigPage, Save ) );
aResetButton .SetClickHdl ( LINK( this, SfxStatusBarConfigPage, Default ) );
aEntriesBox .SetSelectHdl( LINK(this,SfxStatusBarConfigPage, SelectHdl));
USHORT nGroup = 0;
String aGroupName = SFX_SLOTPOOL().SeekGroup(nGroup);
while (aGroupName.Len() != 0)
{
for (const SfxSlot *pSlot = SFX_SLOTPOOL().FirstSlot(); pSlot;
pSlot = SFX_SLOTPOOL().NextSlot())
{
if ( !pSlot->GetType() ||
pSlot->GetType()->Type() == TYPE(SfxVoidItem) ||
!(pSlot->GetMode() & SFX_SLOT_STATUSBARCONFIG) )
continue;
USHORT nId = pSlot->GetSlotId();
USHORT i;
for (i=0; i<aListOfIds.Count(); i++)
if (aListOfIds[i] >= nId) break;
if (i<aListOfIds.Count() && aListOfIds[i] == nId)
continue;
else
aListOfIds.Insert(nId, i);
}
aGroupName = SFX_SLOTPOOL().SeekGroup(++nGroup);
}
}
void SfxStatusBarConfigPage::Init()
{
SvLBoxEntry *pEntry;
USHORT nUsed=0;
SvUShorts aListOfPos;
pArr = new SfxStbInfoArr_Impl;
for (USHORT i=0; i<aListOfIds.Count(); i++)
{
USHORT nId = aListOfIds[i];
String aName = SFX_SLOTPOOL().GetSlotName_Impl( nId );
if ( !aName.Len() )
continue;
SfxStatBarInfo_Impl* pInfo = new SfxStatBarInfo_Impl (nId, String());
pArr->Append(pInfo);
USHORT nPos = pMgr->GetItemPos(nId);
if (nPos != STATUSBAR_ITEM_NOTFOUND)
{
USHORT np;
for (np=0; np<aListOfPos.Count(); np++)
if (aListOfPos[np] > nPos) break;
aListOfPos.Insert(nPos,np);
pEntry = aEntriesBox.InsertEntry(aName, (SvLBoxEntry*)0L, FALSE, (ULONG) np);
aEntriesBox.SetCheckButtonState(pEntry, SV_BUTTON_CHECKED);
nUsed++;
}
else
{
pEntry = aEntriesBox.InsertEntry(aName, (SvLBoxEntry*)0L);
}
pEntry->SetUserData(pInfo);
}
}
void SfxStatusBarConfigPage::ResetConfig()
{
aEntriesBox.Clear();
for (USHORT n=0; n<pArr->Count(); n++)
delete (*pArr)[n];
delete pArr;
}
SfxStatusBarConfigPage::~SfxStatusBarConfigPage()
{
if ( bMgrCreated )
delete pMgr;
ResetConfig();
}
IMPL_LINK( SfxStatusBarConfigPage, SelectHdl, SvTreeListBox *, pBox )
{
return 0;
}
void SfxStatusBarConfigPage::Apply( SfxStatusBarManager* pStbMgr, BOOL bIsDefault )
{
if ( !pStbMgr )
return;
if ( bIsDefault )
{
pStbMgr->UseDefault();
pStbMgr->SetDefault(TRUE);
return;
}
pStbMgr->Clear();
long nWidth = 100;
for ( SvLBoxEntry *pEntry = aEntriesBox.First(); pEntry; pEntry = aEntriesBox.Next(pEntry) )
{
if (aEntriesBox.GetCheckButtonState(pEntry) == SV_BUTTON_CHECKED)
{
USHORT nId =
((SfxStatBarInfo_Impl*) pEntry->GetUserData())->nId;
pStbMgr->AddItem(nId, nWidth);
}
}
pStbMgr->SetDefault( FALSE );
}
IMPL_LINK( SfxStatusBarConfigPage, Default, PushButton *, pPushButton )
{
// creating a ConfigItem without ConfigManager forces it to use its default
SfxStatusBarManager* pStbMgr = new SfxStatusBarManager( this, *pMgr, NULL );
SfxStatusBarManager* pOld = pMgr;
pMgr = pStbMgr;
aEntriesBox.bDefault = TRUE;
aEntriesBox.bModified = !pOld->IsDefault();
aEntriesBox.SetUpdateMode(FALSE);
ResetConfig();
Init();
aEntriesBox.SetUpdateMode(TRUE);
aEntriesBox.Invalidate();
pMgr = pOld;
StatusBar* pBar = pStbMgr->GetStatusBar();
delete pStbMgr;
delete pBar;
return 0;
}
IMPL_LINK( SfxStatusBarConfigPage, Load, Button *, pButton )
{
String aCfgName = SfxConfigDialog::FileDialog_Impl( this,
WB_OPEN | WB_STDMODAL | WB_3DLOOK, String( SfxResId( STR_LOADSTATBARCONFIG) ) );
if ( aCfgName.Len() )
{
GetTabDialog()->EnterWait();
BOOL bCreated = FALSE;
BOOL bLoadedDocument = FALSE;
SfxObjectShellRef xDoc;
//REMOVE SfxConfigManager* pCfgMgr = SFX_APP()->GetConfigManager_Impl();
//REMOVE if ( pCfgMgr->GetURL() != aCfgName )
//REMOVE {
//REMOVE // it was not the global configuration manager
//REMOVE // first check if URL points to a document already loaded
//REMOVE xDoc = SFX_APP()->DocAlreadyLoaded( aCfgName, TRUE, TRUE );
//REMOVE if ( xDoc.Is() )
//REMOVE bLoadedDocument = TRUE;
//REMOVE else
//REMOVE // try to load a document from the URL
//REMOVE xDoc = MakeObjectShellForOrganizer_Impl( aCfgName, TRUE );
//REMOVE if ( xDoc.Is() )
//REMOVE {
//REMOVE // get config manager, force creation if there was none before
//REMOVE pCfgMgr = xDoc->GetConfigManager( TRUE );
//REMOVE }
//REMOVE else
//REMOVE {
//REMOVE // URL doesn't point to a document, must be a single storage
//REMOVE bCreated = TRUE;
//REMOVE SvStorageRef xStor = new SvStorage( aCfgName, STREAM_STD_READ );
//REMOVE if ( xStor->GetError() == ERRCODE_NONE )
//REMOVE pCfgMgr = new SfxConfigManager( xStor );
//REMOVE else
//REMOVE pCfgMgr = NULL;
//REMOVE }
//REMOVE }
//REMOVE
//REMOVE if ( pCfgMgr )
//REMOVE {
//REMOVE // create new StatusBarManager and read configuration
//REMOVE // constructing with a SfxConfigManager reads in configuration
//REMOVE SfxStatusBarManager* pStbMgr = new SfxStatusBarManager( this, *pMgr, pCfgMgr );
//REMOVE
//REMOVE // put new configuration into TabPage
//REMOVE SfxStatusBarManager* pOld = pMgr;
//REMOVE pMgr = pStbMgr;
//REMOVE aEntriesBox.SetUpdateMode( FALSE );
//REMOVE ResetConfig();
//REMOVE Init();
//REMOVE aEntriesBox.SetUpdateMode( TRUE );
//REMOVE aEntriesBox.Invalidate();
//REMOVE aEntriesBox.bDefault = FALSE;
//REMOVE aEntriesBox.bModified = TRUE;
//REMOVE pMgr = pOld;
//REMOVE
//REMOVE StatusBar* pBar = pStbMgr->GetStatusBar();
//REMOVE delete pStbMgr;
//REMOVE delete pBar;
//REMOVE
//REMOVE if ( bCreated )
//REMOVE delete pCfgMgr;
//REMOVE else
//REMOVE pCfgMgr->ReInitialize( pMgr->GetType() );
//REMOVE
//REMOVE if ( bLoadedDocument && !xDoc->GetConfigManager()->HasConfigItem( pMgr->GetType() ) )
//REMOVE // config item has global configuration until now, must be changed
//REMOVE pMgr->GetConfigManager()->ReConnect( pMgr->GetType(), pCfgMgr );
//REMOVE }
GetTabDialog()->LeaveWait();
}
return TRUE;
}
IMPL_LINK( SfxStatusBarConfigPage, Save, Button *, pButton )
{
String aCfgName = SfxConfigDialog::FileDialog_Impl( this,
WB_SAVEAS | WB_STDMODAL | WB_3DLOOK, String( SfxResId( STR_SAVESTATBARCONFIG) ) );
if ( aCfgName.Len() )
{
GetTabDialog()->EnterWait();
BOOL bCreated = FALSE;
SfxObjectShellRef xDoc;
BOOL bLoadedDocument = FALSE;
//REMOVE SfxConfigManager* pCfgMgr = SFX_APP()->GetConfigManager_Impl();
//REMOVE if ( pCfgMgr->GetURL() != aCfgName )
//REMOVE {
//REMOVE // it was not the global configuration manager
//REMOVE // first check if URL points to a document already loaded
//REMOVE xDoc = SFX_APP()->DocAlreadyLoaded( aCfgName, TRUE, TRUE );
//REMOVE if ( xDoc.Is() )
//REMOVE bLoadedDocument = TRUE;
//REMOVE else
//REMOVE // try to load a document from the URL
//REMOVE xDoc = MakeObjectShellForOrganizer_Impl( aCfgName, TRUE );
//REMOVE if ( xDoc.Is() )
//REMOVE {
//REMOVE // get config manager, force creation if there was none before
//REMOVE pCfgMgr = xDoc->GetConfigManager( TRUE );
//REMOVE }
//REMOVE else
//REMOVE {
//REMOVE // URL doesn't point to a document, must be a single storage
//REMOVE bCreated = TRUE;
//REMOVE SvStorageRef xStor = new SvStorage( aCfgName, STREAM_STD_WRITE, STORAGE_TRANSACTED );
//REMOVE if ( xStor->GetError() == ERRCODE_NONE )
//REMOVE pCfgMgr = new SfxConfigManager( xStor );
//REMOVE else
//REMOVE pCfgMgr = NULL;
//REMOVE }
//REMOVE }
//REMOVE
//REMOVE if ( pCfgMgr )
//REMOVE {
//REMOVE // create new StatusBarManager and apply changes
//REMOVE SfxStatusBarManager* pStbMgr = new SfxStatusBarManager( this, *pMgr, pCfgMgr );
//REMOVE Apply( pStbMgr, FALSE );
//REMOVE pCfgMgr->StoreConfigItem( *pStbMgr );
//REMOVE if ( bLoadedDocument )
//REMOVE {
//REMOVE SfxRequest aReq( SID_SAVEDOC, SFX_CALLMODE_SYNCHRON, xDoc->GetPool() );
//REMOVE xDoc->ExecuteSlot( aReq );
//REMOVE }
//REMOVE else
//REMOVE pCfgMgr->StoreConfiguration();
//REMOVE
//REMOVE StatusBar* pBar = pStbMgr->GetStatusBar();
//REMOVE delete pStbMgr;
//REMOVE delete pBar;
//REMOVE
//REMOVE if ( bCreated )
//REMOVE delete pCfgMgr;
//REMOVE }
GetTabDialog()->LeaveWait();
}
return TRUE;
}
SfxStatusBarConfigListBox::SfxStatusBarConfigListBox( Window* pParent, const ResId& rResId)
: SvTreeListBox(pParent, rResId)
, bModified(FALSE)
, bDefault(TRUE)
, pCurEntry(0)
{
pButton = new SvLBoxButtonData( this );
EnableCheckButton(pButton);
DragDropMode aDDMode = SV_DRAGDROP_CTRL_MOVE;
SetDragDropMode( aDDMode );
SetHighlightRange(); // OV Selektion ueber gesamte Zeilenbreite
// Timer f"ur die BallonHelp
aTimer.SetTimeout( 200 );
aTimer.SetTimeoutHdl(
LINK( this, SfxStatusBarConfigListBox, TimerHdl ) );
}
SfxStatusBarConfigListBox::~SfxStatusBarConfigListBox()
{
delete pButton;
}
void SfxStatusBarConfigListBox::KeyInput( const KeyEvent& rKEvt )
{
USHORT aCode = rKEvt.GetKeyCode().GetCode();
if( aCode == KEY_SPACE )
{
SvLBoxEntry* pEntry = (SvLBoxEntry*) FirstSelected();
if( pEntry && (GetCheckButtonState( pEntry ) == SV_BUTTON_UNCHECKED) )
SetCheckButtonState(pEntry, SV_BUTTON_CHECKED);
else
SetCheckButtonState(pEntry, SV_BUTTON_UNCHECKED);
GetCheckButtonHdl().Call(this);
}
else
SvTreeListBox::KeyInput( rKEvt );
}
BOOL SfxStatusBarConfigListBox::NotifyAcceptDrop( SvLBoxEntry* pEntry )
{
return SvTreeListBox::NotifyAcceptDrop(pEntry);
}
BOOL SfxStatusBarConfigListBox::NotifyMoving(SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos)
{
BOOL bRet =
SvTreeListBox::NotifyMoving(pTarget, pEntry, rpNewParent, rNewChildPos);
if (bRet)
{
bModified = TRUE;
bDefault = FALSE;
}
return bRet;
}
void SfxStatusBarConfigListBox::CheckButtonHdl()
{
bDefault = FALSE;
bModified = TRUE;
}
void SfxStatusBarConfigListBox::MouseMove( const MouseEvent& rMEvt )
// Beschreibung
// Virtuelle Methode, die gerufen wird, wenn der Mauszeiger "uber der TreeListBox bewegt wurde.
// Wenn die Position des Mauszeigers "uber dem aktuell selektierten Entry liegt, wird ein Timer
// aufgesetzt, um ggf. einen Hilfetext einzublenden.
{
Point aMousePos = rMEvt.GetPosPixel();
SvLBoxEntry *pEntry = GetCurEntry();
pCurEntry = pEntry;
if ( pEntry && GetEntry( aMousePos ) == pEntry )
aTimer.Start();
else
{
Help::ShowBalloon( this, aMousePos, String() );
aTimer.Stop();
}
}
IMPL_LINK( SfxStatusBarConfigListBox, TimerHdl, Timer*, pTimer)
// Beschreibung
// Timer-Handler f"ur die Einblendung eines Hilfetextes. Wenn nach Ablauf des Timers
// der Mauszeiger immer noch auf dem aktuell selektierten Eintrag steht, wird der
// Helptext des Entries als Balloon-Help eingeblendet.
{
if ( pTimer )
pTimer->Stop();
Point aMousePos = GetPointerPosPixel();
SvLBoxEntry *pEntry = GetCurEntry();
if ( pEntry && GetEntry( aMousePos ) == pEntry && pEntry == pCurEntry )
{
SfxStatBarInfo_Impl* pInfo = (SfxStatBarInfo_Impl*) pEntry->GetUserData();
if ( !pInfo->aHelpText.Len() )
pInfo->aHelpText = Application::GetHelp()->GetHelpText( pInfo->nId, this );
Help::ShowBalloon( this, OutputToScreenPixel( aMousePos ), pInfo->aHelpText );
}
return 0L;
}
BOOL SfxStatusBarConfigPage::FillItemSet( SfxItemSet& )
{
if ( aEntriesBox.bModified )
{
Apply( pMgr, aEntriesBox.bDefault );
aEntriesBox.bModified = FALSE;
pMgr->StoreConfig();
return TRUE;
}
return FALSE;
}
void SfxStatusBarConfigPage::Reset( const SfxItemSet& )
{
if ( !pMgr )
{
SfxViewFrame* pCurrent = GetTabDialog()->GetViewFrame();
while ( pCurrent->GetParentViewFrame_Impl() )
pCurrent = pCurrent->GetParentViewFrame_Impl();
SfxWorkWindow* pWorkWin = pCurrent->GetFrame()->GetWorkWindow_Impl();
pMgr = pWorkWin->GetStatusBarManager_Impl();
if ( !pMgr )
{
pMgr = pWorkWin->MakeStatusBarManager_Impl( TRUE );
bMgrCreated = TRUE;
}
aEntriesBox.bDefault = pMgr->IsDefault();
Init();
}
}
String SfxConfigDialog::FileDialog_Impl( Window *pParent, WinBits nBits, const String& rTitle )
{
BOOL bSave = ( ( nBits & WB_SAVEAS ) == WB_SAVEAS );
short nDialogType = bSave? ::sfx2::FILESAVE_SIMPLE : ::sfx2::FILEOPEN_SIMPLE;
sfx2::FileDialogHelper aFileDlg( nDialogType, 0 );
aFileDlg.SetTitle( rTitle );
// aFileDlg.SetDialogHelpId( bSave? HID_CONFIG_SAVE : HID_CONFIG_LOAD );
aFileDlg.AddFilter( String(SfxResId(STR_FILTERNAME_ALL) ), DEFINE_CONST_UNICODE(FILEDIALOG_FILTER_ALL) );
aFileDlg.AddFilter( String(SfxResId(STR_FILTERNAME_CFG)),DEFINE_CONST_UNICODE("*.cfg") );
if ( ERRCODE_NONE == aFileDlg.Execute() )
return aFileDlg.GetPath();
else
return String();
}
*/
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment