diff options
author | Thomas Benisch <tbe@openoffice.org> | 2001-11-14 21:45:02 +0000 |
---|---|---|
committer | Thomas Benisch <tbe@openoffice.org> | 2001-11-14 21:45:02 +0000 |
commit | 72393b81674057ebaabdfd1230c0590ae0e10427 (patch) | |
tree | 8d9525bebc04a401a0895e2f7f82d9805b9d279a /basctl | |
parent | 0d8c034ed546408a01ca0ab71fab17b65b7827b1 (diff) |
#86383# Basic libraries cannot be added
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/source/basicide/basobj2.cxx | 16 | ||||
-rw-r--r-- | basctl/source/basicide/moduldl2.cxx | 306 | ||||
-rw-r--r-- | basctl/source/basicide/moduldlg.cxx | 28 | ||||
-rw-r--r-- | basctl/source/basicide/moduldlg.hrc | 5 | ||||
-rw-r--r-- | basctl/source/basicide/moduldlg.hxx | 32 | ||||
-rw-r--r-- | basctl/source/basicide/moduldlg.src | 35 |
6 files changed, 310 insertions, 112 deletions
diff --git a/basctl/source/basicide/basobj2.cxx b/basctl/source/basicide/basobj2.cxx index 5f79d564b58b..20fd764a1a4e 100644 --- a/basctl/source/basicide/basobj2.cxx +++ b/basctl/source/basicide/basobj2.cxx @@ -2,9 +2,9 @@ * * $RCSfile: basobj2.cxx,v $ * - * $Revision: 1.17 $ + * $Revision: 1.18 $ * - * last change: $Author: tbe $ $Date: 2001-09-25 09:12:40 $ + * last change: $Author: tbe $ $Date: 2001-11-14 22:43:37 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -193,9 +193,18 @@ void BasicIDE::DecBasicDialogCount() Sequence< ::rtl::OUString > BasicIDE::GetLibraryNames( SfxObjectShell* pShell ) { + Reference< script::XLibraryContainer > xModLibContainer( GetModuleLibraryContainer( pShell ), UNO_QUERY ); + Reference< script::XLibraryContainer > xDlgLibContainer( GetDialogLibraryContainer( pShell ), UNO_QUERY ); + + return GetMergedLibraryNames( xModLibContainer, xDlgLibContainer ); +} + +//---------------------------------------------------------------------------- + +Sequence< ::rtl::OUString > BasicIDE::GetMergedLibraryNames( const Reference< script::XLibraryContainer >& xModLibContainer, const Reference< script::XLibraryContainer >& xDlgLibContainer ) +{ // create a sorted list of module library names ::std::vector<String> aModLibList; - Reference< script::XLibraryContainer > xModLibContainer = GetModuleLibraryContainer( pShell ); if ( xModLibContainer.is() ) { Sequence< ::rtl::OUString > aModLibNames = xModLibContainer->getElementNames(); @@ -208,7 +217,6 @@ Sequence< ::rtl::OUString > BasicIDE::GetLibraryNames( SfxObjectShell* pShell ) // create a sorted list of dialog library names ::std::vector<String> aDlgLibList; - Reference< script::XLibraryContainer > xDlgLibContainer = GetDialogLibraryContainer( pShell ); if ( xDlgLibContainer.is() ) { Sequence< ::rtl::OUString > aDlgLibNames = xDlgLibContainer->getElementNames(); diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index 1d06c6a685ae..0562d6b06511 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -2,9 +2,9 @@ * * $RCSfile: moduldl2.cxx,v $ * - * $Revision: 1.25 $ + * $Revision: 1.26 $ * - * last change: $Author: tbe $ $Date: 2001-11-09 15:41:40 $ + * last change: $Author: tbe $ $Date: 2001-11-14 22:43:37 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -189,7 +189,7 @@ void BasicLibLBoxString::Paint( const Point& rPos, SvLBox& rDev, USHORT, SvLBoxE BasicCheckBox::BasicCheckBox( Window* pParent, const ResId& rResId ) : SvTabListBox( pParent, rResId ) { - nMode = 0; + nMode = LIBMODE_MANAGER; pBasMgr = 0; long aTabs[] = { 1, 12 }; // Mindestens einen braucht die TabPos... // 12 wegen der Checkbox @@ -201,7 +201,7 @@ BasicCheckBox::BasicCheckBox( Window* pParent, const ResId& rResId ) : __EXPORT BasicCheckBox::~BasicCheckBox() { - //delete pCheckButton; + delete pCheckButton; } @@ -231,7 +231,6 @@ void __EXPORT BasicCheckBox::CheckButtonHdl() void BasicCheckBox::Init() { - /* BasicCheckBoxBitmaps theBmps; pCheckButton = new SvLBoxButtonData; @@ -241,13 +240,29 @@ void BasicCheckBox::Init() pCheckButton->aBmps[SV_BMP_HIUNCHECKED] = theBmps.GetHiUncheckedBmp(); pCheckButton->aBmps[SV_BMP_TRISTATE] = theBmps.GetTriStateBmp(); pCheckButton->aBmps[SV_BMP_HITRISTATE] = theBmps.GetHiTriStateBmp(); - EnableCheckButton( pCheckButton ); - */ + + if ( nMode == LIBMODE_CHOOSER ) + EnableCheckButton( pCheckButton ); + else + EnableCheckButton( 0 ); + SetHighlightRange(); } //---------------------------------------------------------------------------- +void BasicCheckBox::SetMode( USHORT n ) +{ + nMode = n; + + if ( nMode == LIBMODE_CHOOSER ) + EnableCheckButton( pCheckButton ); + else + EnableCheckButton( 0 ); +} + +//---------------------------------------------------------------------------- + SvLBoxEntry* BasicCheckBox::InsertEntry( const String& rStr, ULONG nPos ) { // return SvTreeListBox::InsertEntry( rStr, NULL, FALSE, nPos ); @@ -294,7 +309,6 @@ ULONG BasicCheckBox::GetSelectEntryPos() const //---------------------------------------------------------------------------- -/* ULONG BasicCheckBox::GetCheckedEntryCount() const { ULONG nCheckCount = 0; @@ -308,11 +322,9 @@ ULONG BasicCheckBox::GetCheckedEntryCount() const return nCheckCount; } -*/ //---------------------------------------------------------------------------- -/* void BasicCheckBox::CheckEntryPos( ULONG nPos, BOOL bCheck ) { if ( nPos < GetEntryCount() ) @@ -326,32 +338,32 @@ void BasicCheckBox::CheckEntryPos( ULONG nPos, BOOL bCheck ) : SvButtonState(SV_BUTTON_UNCHECKED) ); } } -*/ //---------------------------------------------------------------------------- -/* BOOL BasicCheckBox::IsChecked( ULONG nPos ) const { if ( nPos < GetEntryCount() ) return (GetCheckButtonState( GetEntry( nPos ) ) == SV_BUTTON_CHECKED); return FALSE; } -*/ //---------------------------------------------------------------------------- void BasicCheckBox::InitEntry( SvLBoxEntry* pEntry, const XubString& rTxt, const Image& rImg1, const Image& rImg2 ) { SvTabListBox::InitEntry( pEntry, rTxt, rImg1, rImg2 ); - USHORT nCount = pEntry->ItemCount(); - // initialize all columns with own string class (column 0 == bitmap) - for ( USHORT nCol = 1; nCol < nCount; ++nCol ) + if ( nMode == LIBMODE_MANAGER ) { - SvLBoxString* pCol = (SvLBoxString*)pEntry->GetItem( nCol ); - BasicLibLBoxString* pStr = new BasicLibLBoxString( pEntry, 0, pCol->GetText() ); - pEntry->ReplaceItem( pStr, nCol ); + // initialize all columns with own string class (column 0 == bitmap) + USHORT nCount = pEntry->ItemCount(); + for ( USHORT nCol = 1; nCol < nCount; ++nCol ) + { + SvLBoxString* pCol = (SvLBoxString*)pEntry->GetItem( nCol ); + BasicLibLBoxString* pStr = new BasicLibLBoxString( pEntry, 0, pCol->GetText() ); + pEntry->ReplaceItem( pStr, nCol ); + } } } @@ -457,7 +469,6 @@ BOOL __EXPORT BasicCheckBox::EditedEntry( SvLBoxEntry* pEntry, const String& rNe //---------------------------------------------------------------------------- -/* BasicCheckBoxBitmaps::BasicCheckBoxBitmaps() : Resource ( ResId( RID_RES_CHECKBITMAPS ) ), aUncheckedBmp ( ResId( CHKBTN_UNCHECKED ) ), @@ -469,7 +480,6 @@ BasicCheckBoxBitmaps::BasicCheckBoxBitmaps() : { FreeResource(); } -*/ //---------------------------------------------------------------------------- @@ -882,6 +892,7 @@ void LibPage::InsertLib() // BasicManager* pBasMgr = BasicIDE::FindBasicManager( aCurBasMgr ); BasicManager* pBasMgr = aLibBox.GetBasicManager(); DBG_ASSERT( pBasMgr, "BasMgr?!" ); + SfxObjectShell* pShell = BasicIDE::FindDocShell( pBasMgr ); Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory() ); Reference < XFilePicker > xFP; @@ -896,9 +907,11 @@ void LibPage::InsertLib() xFP->setTitle( String( IDEResId( RID_STR_APPENDLIBS ) ) ); Reference< XFilterManager > xFltMgr(xFP, UNO_QUERY); - xFltMgr->appendFilter( String( IDEResId( RID_STR_BASIC ) ), String( RTL_CONSTASCII_USTRINGPARAM( "*.sbl" ) ) ); - xFltMgr->appendFilter( String( IDEResId( RID_STR_DOC ) ), String( RTL_CONSTASCII_USTRINGPARAM( "*.sdw;*.sdc;*.sdd" ) ) ); + //xFltMgr->appendFilter( String( IDEResId( RID_STR_BASIC ) ), String( RTL_CONSTASCII_USTRINGPARAM( "*.xlc;*.sbl" ) ) ); + //xFltMgr->appendFilter( String( IDEResId( RID_STR_DOC ) ), String( RTL_CONSTASCII_USTRINGPARAM( "*.sdw;*.sdc;*.sdd" ) ) ); + xFltMgr->appendFilter( String( IDEResId( RID_STR_BASIC ) ), String( RTL_CONSTASCII_USTRINGPARAM( "*.xlc;*.xlb;*.sbl;*.sxw;*.sxc;*.sxd;*.sdw;*.sdc;*.sdd" ) ) ); + // TODO: setting of display directory doesn't work correctly at the moment String aPath( IDE_DLL()->GetExtraData()->GetAddLibPath() ); if ( aPath.Len() ) { @@ -913,7 +926,7 @@ void LibPage::InsertLib() aFileURL.setFinalSlash(); aPath = aFileURL.getFSysPath( INetURLObject::FSYS_DETECT ); xFP->setDisplayDirectory( aPath ); - xFltMgr->setCurrentFilter( String( IDEResId( RID_STR_DOC ) ) ); + xFltMgr->setCurrentFilter( String( IDEResId( RID_STR_BASIC ) ) ); } if( xFP->execute() == RET_OK ) @@ -924,8 +937,249 @@ void LibPage::InsertLib() IDE_DLL()->GetExtraData()->SetAddLibFilter( xFltMgr->getCurrentFilter() ); INetURLObject aFileURL( aPath ); - String aFullName( aFileURL.getFSysPath( INetURLObject::FSYS_DETECT ) ); + INetURLObject aModFileURL( aFileURL ); + INetURLObject aDlgFileURL( aFileURL ); + + String aModFileName = String::CreateFromAscii( "script" ); + String aDlgFileName = String::CreateFromAscii( "dialog" ); + String aFileName = aFileURL.getName().GetToken( 0, '.' ); + if ( aFileName == aModFileName ) + { + aDlgFileURL.setName( aDlgFileName ); + aDlgFileURL.setExtension( aFileURL.getExtension() ); + } + else if ( aFileName == aDlgFileName ) + { + aModFileURL.setName( aModFileName ); + aModFileURL.setExtension( aFileURL.getExtension() ); + } + + ::rtl::OUString aModStorageURL( aModFileURL.GetMainURL() ); + ::rtl::OUString aDlgStorageURL( aDlgFileURL.GetMainURL() ); + + Reference< script::XLibraryContainer2 > xModLibContImport; + Reference< script::XLibraryContainer2 > xDlgLibContImport; + + if( xMSF.is() ) + { + Sequence <Any> aSeqModURL(1); + aSeqModURL[0] <<= aModStorageURL; + xModLibContImport = Reference< script::XLibraryContainer2 >( xMSF->createInstanceWithArguments( + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.script.ScriptLibraryContainer" ) ), aSeqModURL ), UNO_QUERY ); + + Sequence <Any> aSeqDlgURL(1); + aSeqDlgURL[0] <<= aDlgStorageURL; + xDlgLibContImport = Reference< script::XLibraryContainer2 >( xMSF->createInstanceWithArguments( + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.script.DialogLibraryContainer" ) ), aSeqDlgURL ), UNO_QUERY ); + } + + if ( xModLibContImport.is() || xDlgLibContImport.is() ) + { + LibDialog* pLibDlg = 0; + + Reference< script::XLibraryContainer > xModLibContImp( xModLibContImport, UNO_QUERY ); + Reference< script::XLibraryContainer > xDlgLibContImp( xDlgLibContImport, UNO_QUERY ); + Sequence< ::rtl::OUString > aLibNames = BasicIDE::GetMergedLibraryNames( xModLibContImp, xDlgLibContImp ); + sal_Int32 nLibCount = aLibNames.getLength(); + const ::rtl::OUString* pLibNames = aLibNames.getConstArray(); + for ( sal_Int32 i = 0 ; i < nLibCount ; i++ ) + { + if ( !pLibDlg ) + { + pLibDlg = new LibDialog( this ); + pLibDlg->SetStorageName( aFileURL.getName() ); + pLibDlg->GetLibBox().SetMode( LIBMODE_CHOOSER ); + } + + String aLibName( pLibNames[ i ] ); + String aOULibName( aLibName ); + if ( !( ( xModLibContImport.is() && xModLibContImport->hasByName( aOULibName ) && xModLibContImport->isLibraryLink( aOULibName ) ) || + ( xDlgLibContImport.is() && xDlgLibContImport->hasByName( aOULibName ) && xDlgLibContImport->isLibraryLink( aOULibName ) ) ) ) + { + SvLBoxEntry* pEntry = pLibDlg->GetLibBox().InsertEntry( aLibName ); + USHORT nPos = (USHORT) pLibDlg->GetLibBox().GetModel()->GetAbsPos( pEntry ); + pLibDlg->GetLibBox().CheckEntryPos( nPos, TRUE); + } + } + + if ( !pLibDlg ) + InfoBox( this, String( IDEResId( RID_STR_NOLIBINSTORAGE ) ) ).Execute(); + else + { + BOOL bChanges = FALSE; + if ( pLibDlg->Execute() ) + { + ULONG nNewPos = aLibBox.GetEntryCount(); + BOOL bReplace = pLibDlg->IsReplace(); + BOOL bReference = pLibDlg->IsReference(); + for ( USHORT nLib = 0; nLib < pLibDlg->GetLibBox().GetEntryCount(); nLib++ ) + { + if ( pLibDlg->GetLibBox().IsChecked( nLib ) ) + { + SvLBoxEntry* pEntry = pLibDlg->GetLibBox().GetEntry( nLib ); + DBG_ASSERT( pEntry, "Entry?!" ); + String aLibName( pLibDlg->GetLibBox().GetEntryText( pEntry, 0 ) ); + ::rtl::OUString aOULibName( aLibName ); + Reference< script::XLibraryContainer2 > xModLibContainer( BasicIDE::GetModuleLibraryContainer( pShell ), UNO_QUERY ); + Reference< script::XLibraryContainer2 > xDlgLibContainer( BasicIDE::GetDialogLibraryContainer( pShell ), UNO_QUERY ); + + // check, if the library is already existing + if ( ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) ) || + ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aOULibName ) ) ) + { + if ( bReplace ) + { + // check, if the library is the Standard library + if ( aLibName.EqualsAscii( "Standard" ) ) + { + ErrorBox( this, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_REPLACESTDLIB ) ) ).Execute(); + continue; + } + + // check, if the library is readonly and not a link + if ( ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) && xModLibContainer->isLibraryReadOnly( aOULibName ) && !xModLibContainer->isLibraryLink( aOULibName ) ) || + ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aOULibName ) && xDlgLibContainer->isLibraryReadOnly( aOULibName ) && !xDlgLibContainer->isLibraryLink( aOULibName ) ) ) + { + // TODO: error message: library is readonly? + continue; + } + + // remove listbox entry + SvLBoxEntry* pEntry = aLibBox.FindEntry( aLibName ); + if ( pEntry ) + aLibBox.SvTreeListBox::GetModel()->Remove( pEntry ); + + // remove module library + if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) ) + xModLibContainer->removeLibrary( aOULibName ); + + // remove dialog library + if ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aOULibName ) ) + xDlgLibContainer->removeLibrary( aOULibName ); + } + else + { + if ( bReference ) + { + // Referenz nicht moeglich, wenn Lib mit + // Namen schon existiert, ausser bei Replace. + String aErrStr( IDEResId( RID_STR_REFNOTPOSSIBLE ) ); + aErrStr.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "XX" ) ), aLibName ); + aErrStr += '\n'; + aErrStr += String( IDEResId( RID_STR_SBXNAMEALLREADYUSED ) ); + ErrorBox( this, WB_OK | WB_DEF_OK, aErrStr ).Execute(); + continue; + } + else + { + // TODO: error message: library already existing? + continue; + } + } + } + + // copy module library + if ( xModLibContImport.is() && xModLibContImport->hasByName( aOULibName ) && xModLibContainer.is() && !xModLibContainer->hasByName( aOULibName ) ) + { + Reference< container::XNameContainer > xModLib; + if ( bReference ) + { + // create library link + xModLib = Reference< container::XNameContainer >( xModLibContainer->createLibraryLink( aOULibName, aModStorageURL, TRUE ), UNO_QUERY); + } + else + { + // create library + xModLib = xModLibContainer->createLibrary( aOULibName ); + if ( xModLib.is() ) + { + // get import library + Reference< container::XNameContainer > xModLibImport; + Any aElement = xModLibContImport->getByName( aOULibName ); + aElement >>= xModLibImport; + + if ( xModLibImport.is() ) + { + // load library + if ( !xModLibContImport->isLibraryLoaded( aOULibName ) ) + xModLibContImport->loadLibrary( aOULibName ); + + // copy all modules + Sequence< ::rtl::OUString > aModNames = xModLibImport->getElementNames(); + sal_Int32 nModCount = aModNames.getLength(); + const ::rtl::OUString* pModNames = aModNames.getConstArray(); + for ( sal_Int32 i = 0 ; i < nModCount ; i++ ) + { + ::rtl::OUString aOUModName( pModNames[ i ] ); + Any aElement = xModLibImport->getByName( aOUModName ); + xModLib->insertByName( aOUModName, aElement ); + } + } + } + } + } + + // copy dialog library + if ( xDlgLibContImport.is() && xDlgLibContImport->hasByName( aOULibName ) && xDlgLibContainer.is() && !xDlgLibContainer->hasByName( aOULibName ) ) + { + Reference< container::XNameContainer > xDlgLib; + if ( bReference ) + { + // create library link + xDlgLib = Reference< container::XNameContainer >( xDlgLibContainer->createLibraryLink( aOULibName, aDlgStorageURL, TRUE ), UNO_QUERY); + } + else + { + // create library + xDlgLib = xDlgLibContainer->createLibrary( aOULibName ); + if ( xDlgLib.is() ) + { + // get import library + Reference< container::XNameContainer > xDlgLibImport; + Any aElement = xDlgLibContImport->getByName( aOULibName ); + aElement >>= xDlgLibImport; + + if ( xDlgLibImport.is() ) + { + // load library + if ( !xDlgLibContImport->isLibraryLoaded( aOULibName ) ) + xDlgLibContImport->loadLibrary( aOULibName ); + + // copy all dialogs + Sequence< ::rtl::OUString > aDlgNames = xDlgLibImport->getElementNames(); + sal_Int32 nDlgCount = aDlgNames.getLength(); + const ::rtl::OUString* pDlgNames = aDlgNames.getConstArray(); + for ( sal_Int32 i = 0 ; i < nDlgCount ; i++ ) + { + ::rtl::OUString aOUDlgName( pDlgNames[ i ] ); + Any aElement = xDlgLibImport->getByName( aOUDlgName ); + xDlgLib->insertByName( aOUDlgName, aElement ); + } + } + } + } + } + + // insert listbox entry + ImpInsertLibEntry( aLibName, aLibBox.GetEntryCount() ); + bChanges = TRUE; + } + } + + SvLBoxEntry* pFirstNew = aLibBox.GetEntry( nNewPos ); + if ( pFirstNew ) + aLibBox.SetCurEntry( pFirstNew ); + } + + delete pLibDlg; + if ( bChanges ) + BasicIDE::MarkDocShellModified( pShell ); + } + } + + + /* if ( SvStorage::IsStorageFile( aFullName ) ) { SvStorageRef xStorage = new SvStorage( aFullName, STREAM_READ | STREAM_SHARE_DENYWRITE ); @@ -1047,6 +1301,8 @@ void LibPage::InsertLib() // Datei kommen? InfoBox( this, String( IDEResId( RID_STR_NOLIBINSTORAGE ) ) ).Execute(); } + */ + } } diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx index 4daac44e73ee..b0e59a1addc8 100644 --- a/basctl/source/basicide/moduldlg.cxx +++ b/basctl/source/basicide/moduldlg.cxx @@ -2,9 +2,9 @@ * * $RCSfile: moduldlg.cxx,v $ * - * $Revision: 1.13 $ + * $Revision: 1.14 $ * - * last change: $Author: tbe $ $Date: 2001-11-12 22:37:13 $ + * last change: $Author: tbe $ $Date: 2001-11-14 22:43:37 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1068,17 +1068,10 @@ LibDialog::LibDialog( Window* pParent ) aLibBox( this, IDEResId( RID_CTRL_LIBS ) ), aFixedLine( this, IDEResId( RID_FL_OPTIONS ) ), aReferenceBox( this, IDEResId( RID_CB_REF ) ), - aSepFileBox( this, IDEResId( RID_CB_SEP ) ), aReplaceBox( this, IDEResId( RID_CB_REPL ) ) { SetText( String( IDEResId( RID_STR_APPENDLIBS ) ) ); FreeResource(); - - aReferenceBox.SetClickHdl( LINK( this, LibDialog, CheckBoxSelectHdl ) ); - aSepFileBox.SetClickHdl( LINK( this, LibDialog, CheckBoxSelectHdl ) ); - - bSepFileEnabled = FALSE; - aSepFileBox.Enable( FALSE ); } @@ -1092,20 +1085,3 @@ void LibDialog::SetStorageName( const String& rName ) aName += rName; aStorageName.SetText( aName ); } - -IMPL_LINK( LibDialog, CheckBoxSelectHdl, CheckBox*, EMPTYARG ) -{ - // Referenz und separate Datei schliessen sich aus... - if ( aReferenceBox.IsChecked() ) - aSepFileBox.Enable( FALSE ); - else if ( bSepFileEnabled ) - aSepFileBox.Enable( TRUE ); - - if ( aSepFileBox.IsChecked() ) - aReferenceBox.Enable( FALSE ); - else - aReferenceBox.Enable( TRUE ); - - return 1; -} - diff --git a/basctl/source/basicide/moduldlg.hrc b/basctl/source/basicide/moduldlg.hrc index 8b4f5eb61cdc..03fb5beae56d 100644 --- a/basctl/source/basicide/moduldlg.hrc +++ b/basctl/source/basicide/moduldlg.hrc @@ -2,9 +2,9 @@ * * $RCSfile: moduldlg.hrc,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: tbe $ $Date: 2001-09-27 12:12:19 $ + * last change: $Author: tbe $ $Date: 2001-11-14 22:45:02 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -88,7 +88,6 @@ #define RID_FL_OPTIONS 34 #define RID_CB_REF 35 #define RID_CB_REPL 36 -#define RID_CB_SEP 37 #define RID_FT_STORAGENAME 38 #define RID_FT_NEWLIB 40 diff --git a/basctl/source/basicide/moduldlg.hxx b/basctl/source/basicide/moduldlg.hxx index 04c380e080de..d05c53681354 100644 --- a/basctl/source/basicide/moduldlg.hxx +++ b/basctl/source/basicide/moduldlg.hxx @@ -2,9 +2,9 @@ * * $RCSfile: moduldlg.hxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: tbe $ $Date: 2001-11-07 10:18:27 $ + * last change: $Author: tbe $ $Date: 2001-11-14 22:45:02 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -148,7 +148,7 @@ class BasicCheckBox : public SvTabListBox { private: USHORT nMode; - //SvLBoxButtonData* pCheckButton; + SvLBoxButtonData* pCheckButton; BasicManager* pBasMgr; void Init(); @@ -166,9 +166,9 @@ public: void SelectEntryPos( ULONG nPos, BOOL bSelect = TRUE ); ULONG GetSelectEntryPos() const; - //ULONG GetCheckedEntryCount() const; - //void CheckEntryPos( ULONG nPos, BOOL bCheck = TRUE ); - //BOOL IsChecked( ULONG nPos ) const; + ULONG GetCheckedEntryCount() const; + void CheckEntryPos( ULONG nPos, BOOL bCheck = TRUE ); + BOOL IsChecked( ULONG nPos ) const; virtual void InitEntry( SvLBoxEntry*, const XubString&, const Image&, const Image& ); virtual BOOL EditingEntry( SvLBoxEntry* pEntry, Selection& rSel ); @@ -177,11 +177,11 @@ public: void SetBasicManager( BasicManager* pMgr ) { pBasMgr = pMgr; } BasicManager* GetBasicManager() const { return pBasMgr; } - void SetMode( USHORT n ) { nMode = n; } + void SetMode( USHORT n ); USHORT GetMode() const { return nMode; } }; -/* + class BasicCheckBoxBitmaps : public Resource { private: @@ -202,7 +202,7 @@ public: const Bitmap& GetTriStateBmp () const { return aTriStateBmp; } const Bitmap& GetHiTriStateBmp () const { return aHiTriStateBmp; } }; -*/ + class LibDialog: public ModalDialog { @@ -210,20 +210,11 @@ private: OKButton aOKButton; CancelButton aCancelButton; FixedText aStorageName; - BasicCheckBox aLibBox; - FixedLine aFixedLine; CheckBox aReferenceBox; - CheckBox aSepFileBox; CheckBox aReplaceBox; - BOOL bSepFileEnabled; - -protected: - DECL_LINK( CheckBoxSelectHdl, CheckBox* ); - - public: LibDialog( Window* pParent ); ~LibDialog(); @@ -233,11 +224,6 @@ public: BasicCheckBox& GetLibBox() { return aLibBox; } BOOL IsReference() const { return aReferenceBox.IsChecked(); } BOOL IsReplace() const { return aReplaceBox.IsChecked(); } - BOOL IsSeparateFile() const { return aSepFileBox.IsChecked(); } - - void SetSeparateFileEnabled( BOOL b ) { bSepFileEnabled = b; - aSepFileBox.Enable( b ); } - BOOL IsSeparateFileEnabled() const { return bSepFileEnabled; } }; diff --git a/basctl/source/basicide/moduldlg.src b/basctl/source/basicide/moduldlg.src index 34ff81358245..f078d13af2d6 100644 --- a/basctl/source/basicide/moduldlg.src +++ b/basctl/source/basicide/moduldlg.src @@ -2,9 +2,9 @@ * * $RCSfile: moduldlg.src,v $ * - * $Revision: 1.38 $ + * $Revision: 1.39 $ * - * last change: $Author: kz $ $Date: 2001-11-13 22:55:45 $ + * last change: $Author: tbe $ $Date: 2001-11-14 22:45:02 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -671,7 +671,7 @@ ModalDialog RID_DLG_LIBS // HelpId = HID_BASICIDE_LIBS_DLG ; OutputSize = TRUE ; SVLook = TRUE ; - Size = MAP_APPFONT ( 168 , 145 ) ; + Size = MAP_APPFONT ( 168 , 132 ) ; Moveable = TRUE ; Closeable = TRUE ; OKButton RID_PB_OK @@ -756,36 +756,9 @@ ModalDialog RID_DLG_LIBS Text[ catalan ] = "Insereix com a referncia (noms de lectura)"; Text[ finnish ] = "Lis viite (vain luku)"; }; - CheckBox RID_CB_SEP - { - Pos = MAP_APPFONT ( 12 , 113 ) ; - Size = MAP_APPFONT ( 146 , 10 ) ; - Text = "Als separate Datei speichern" ; - Text [ English ] = "Als separate Datei speichern" ; - Text [ portuguese ] = "Guardar como ficheiro separado" ; - Text [ english_us ] = "Save as separate file" ; - Text [ portuguese_brazilian ] = "Als separate Datei speichern" ; - Text [ swedish ] = "Spara som separat fil" ; - Text [ danish ] = "Gem som separat fil" ; - Text [ italian ] = "Sava come file a parte" ; - Text [ spanish ] = "Guardar como archivo separado" ; - Text [ french ] = "Enregistrer comme fichier distinct" ; - Text [ dutch ] = "Als separaat bestand opslaan" ; - Text[ chinese_simplified ] = "另存文件"; - Text[ russian ] = " "; - Text[ polish ] = "Zapisz w oddzielnym pliku"; - Text[ japanese ] = "別のファイルとして保存"; - Text[ chinese_traditional ] = "另存檔案"; - Text[ arabic ] = " "; - Text[ greek ] = " "; - Text[ korean ] = "개별 파일로 저장"; - Text[ turkish ] = "Ayr dosya olarak kaydet"; - Text[ catalan ] = "Desa com a fitxer independent"; - Text[ finnish ] = "Tallenna erillisen tiedostona"; - }; CheckBox RID_CB_REPL { - Pos = MAP_APPFONT ( 12 , 126 ) ; + Pos = MAP_APPFONT ( 12 , 113 ) ; Size = MAP_APPFONT ( 146 , 10 ) ; Text = "Existierende Bibliotheken ersetzen" ; Text [ English ] = "Replace existing Libaries" ; |