diff options
author | Gregor Hartmann <gh@openoffice.org> | 2001-04-04 12:18:57 +0000 |
---|---|---|
committer | Gregor Hartmann <gh@openoffice.org> | 2001-04-04 12:18:57 +0000 |
commit | 026c87bb65461164bd64056d14dd1730d10fb5ab (patch) | |
tree | 3e6adc2b489567896fc380f44757b65f7ce46ee8 /basic | |
parent | df08510a8dc24b6e0cc361aac5f88a1e5f980c7c (diff) |
#82970##83872#Clipboard works
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/app/app.cxx | 25 | ||||
-rw-r--r-- | basic/source/app/appbased.cxx | 10 | ||||
-rw-r--r-- | basic/source/app/appwin.cxx | 39 | ||||
-rw-r--r-- | basic/source/app/dialogs.cxx | 11 | ||||
-rw-r--r-- | basic/source/app/msgedit.cxx | 10 |
5 files changed, 60 insertions, 35 deletions
diff --git a/basic/source/app/app.cxx b/basic/source/app/app.cxx index 1770f6d28e96..cf807e7b4097 100644 --- a/basic/source/app/app.cxx +++ b/basic/source/app/app.cxx @@ -2,9 +2,9 @@ * * $RCSfile: app.cxx,v $ * - * $Revision: 1.13 $ + * $Revision: 1.14 $ * - * last change: $Author: gh $ $Date: 2001-03-14 11:33:53 $ + * last change: $Author: gh $ $Date: 2001-04-04 13:18:57 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -158,6 +158,9 @@ Reference< XContentProviderManager > InitializeUCB( void ) try { +#ifdef DEBUG + ::rtl::OUString aTemp ( getPathToSystemRegistry() ); +#endif ////////////////////////////////////////////////////////////////////// // Bootstrap readonly service factory Reference< XMultiServiceFactory > xSMgr( createRegistryServiceFactory( getPathToSystemRegistry(), sal_True ) ); @@ -183,6 +186,17 @@ Reference< XContentProviderManager > InitializeUCB( void ) xIR->registerImplementation( OUString::createFromAscii( "com.sun.star.loader.SharedLibrary" ), OUString::createFromAscii(SAL_MODULENAME( "fileacc" )), Reference< XSimpleRegistry >() ); + //Clipboard + xIR->registerImplementation( OUString::createFromAscii( "com.sun.star.loader.SharedLibrary" ), + OUString::createFromAscii(SAL_MODULENAME( "sysdtrans" )), + Reference< XSimpleRegistry >() ); + xIR->registerImplementation( OUString::createFromAscii( "com.sun.star.loader.SharedLibrary" ), + OUString::createFromAscii(SAL_MODULENAME( "mcnttype" )), + Reference< XSimpleRegistry >() ); + xIR->registerImplementation( OUString::createFromAscii( "com.sun.star.loader.SharedLibrary" ), + OUString::createFromAscii(SAL_MODULENAME( "ftransl" )), + Reference< XSimpleRegistry >() ); + /* // Packages xIR->registerImplementation( OUString::createFromAscii( "com.sun.star.loader.SharedLibrary" ), @@ -206,8 +220,11 @@ Reference< XContentProviderManager > InitializeUCB( void ) */ // i18n +// xIR->registerImplementation( OUString::createFromAscii( "com.sun.star.loader.SharedLibrary" ), +// OUString::createFromAscii(SVLIBRARY( "int" )), +// Reference< XSimpleRegistry >() ); xIR->registerImplementation( OUString::createFromAscii( "com.sun.star.loader.SharedLibrary" ), - OUString::createFromAscii(SVLIBRARY( "int" )), + OUString::createFromAscii(SVLIBRARY( "i18n" )), Reference< XSimpleRegistry >() ); ////////////////////////////////////////////////////////////////////// @@ -533,6 +550,7 @@ BasicFrame::BasicFrame() : WorkWindow( NULL, pHelpMenu->SetActivateHdl( LINK( this, BasicFrame, InitMenu ) ); pHelpMenu->SetDeactivateHdl( LINK( this, BasicFrame, DeInitMenu ) ); + LoadLRU(); LoadIniFile(); @@ -1015,7 +1033,6 @@ IMPL_LINK_INLINE_START( BasicFrame, DeInitMenu, Menu *, pMenu ) pMenu->EnableItem( RID_RUNPREVERR ); if( pWork ) pWork->DeInitMenu( pMenu ); */ - SetAutoRun( FALSE ); String aString; pStatus->Message( aString ); diff --git a/basic/source/app/appbased.cxx b/basic/source/app/appbased.cxx index 6ea0fe312550..f2ecdbe00d98 100644 --- a/basic/source/app/appbased.cxx +++ b/basic/source/app/appbased.cxx @@ -2,9 +2,9 @@ * * $RCSfile: appbased.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: gh $ $Date: 2001-03-14 11:33:53 $ + * last change: $Author: gh $ $Date: 2001-04-04 13:18:57 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -75,8 +75,8 @@ #include <sbmeth.hxx> #endif -#ifndef _CLIP_HXX //autogen -#include <vcl/clip.hxx> +#ifndef _SVTOOLS_STRINGTRANSFER_HXX_ +#include <svtools/stringtransfer.hxx> #endif #ifndef _BASIC_TTRESHLP_HXX @@ -302,7 +302,7 @@ void AppBasEd::Disassemble() { String aText; if( pFrame->Basic().Disassemble( pMod, aText ) ) - Clipboard::CopyString( aText ); + ::svt::OStringTransfer::CopyString( aText ); } void AppBasEd::Run() diff --git a/basic/source/app/appwin.cxx b/basic/source/app/appwin.cxx index 2cd1cc4196bf..18c4a8051fb4 100644 --- a/basic/source/app/appwin.cxx +++ b/basic/source/app/appwin.cxx @@ -2,9 +2,9 @@ * * $RCSfile: appwin.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 16:12:08 $ + * last change: $Author: gh $ $Date: 2001-04-04 13:18:57 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -65,8 +65,8 @@ #ifndef _FSYS_HXX //autogen #include <tools/fsys.hxx> #endif -#ifndef _CLIP_HXX //autogen -#include <vcl/clip.hxx> +#ifndef _SVTOOLS_STRINGTRANSFER_HXX_ +#include <svtools/stringtransfer.hxx> #endif #include "basic.hrc" @@ -269,14 +269,14 @@ void AppWin::Activate() // Set up the menu long AppWin::InitMenu( Menu* pMenu ) { - Clipboard cb; + + ::rtl::OUString aTemp; TextSelection r = pDataEdit->GetSelection(); BOOL bMarked = r.HasRange(); pMenu->EnableItem( RID_EDITREPEAT, (aFind.Len() != 0 ) ); pMenu->EnableItem( RID_EDITCUT, bMarked ); pMenu->EnableItem( RID_EDITCOPY, bMarked ); -// pMenu->EnableItem( RID_EDITPASTE, (cb.GetDataLen( FORMAT_STRING ) != 0 ) ); - pMenu->EnableItem( RID_EDITPASTE, (cb.HasFormat( FORMAT_STRING ) ) ); + pMenu->EnableItem( RID_EDITPASTE, ( ::svt::OStringTransfer::PasteString( aTemp ) ) ); pMenu->EnableItem( RID_EDITDEL, bMarked ); // pMenu->EnableItem( RID_HELPTOPIC, bMarked ); @@ -327,11 +327,20 @@ void AppWin::Command( const CommandEvent& rCEvt ) case RID_EDITREPEAT: Repeat(); break; case RID_EDITCUT: - if( bHasMark ) pDataEdit->Cut(); break; + if( bHasMark ) + pDataEdit->Cut(); + break; case RID_EDITCOPY: - if( bHasMark ) pDataEdit->Copy(); break; + if( bHasMark ) + pDataEdit->Copy(); + break; case RID_EDITPASTE: - if( Clipboard::HasFormat( FORMAT_STRING ) ) pDataEdit->Paste(); break; + { + ::rtl::OUString aTemp; + if( ::svt::OStringTransfer::PasteString( aTemp ) ) + pDataEdit->Paste(); + } + break; case RID_EDITDEL: /*if( bHasMark ) */pDataEdit->Delete(); break; @@ -497,27 +506,27 @@ void AppWin::Load( const String& aName ) USHORT AppWin::ImplSave() { SkipReload(); - BOOL bResult = SAVE_RES_NOT_SAVED; + USHORT nResult = SAVE_RES_NOT_SAVED; String s1 = *pNoName; String s2 = GetText().Copy( 0, s1.Len() ); if( s1 == s2 ) - bResult = SaveAs(); + nResult = SaveAs(); else { String aName = GetText(); if ( pDataEdit->Save( aName ) ) { - bResult = SAVE_RES_SAVED; + nResult = SAVE_RES_SAVED; bHasFile = TRUE; } else { - bResult = SAVE_RES_ERROR; + nResult = SAVE_RES_ERROR; ErrorBox( this, ResId( IDS_WRITEERROR ) ).Execute(); } UpdateFileInfo( HAS_BEEN_LOADED ); } SkipReload( FALSE ); - return bResult; + return nResult; } // mit neuem Namen speichern diff --git a/basic/source/app/dialogs.cxx b/basic/source/app/dialogs.cxx index 66afb5b5d677..f3b3bb6056f0 100644 --- a/basic/source/app/dialogs.cxx +++ b/basic/source/app/dialogs.cxx @@ -2,9 +2,9 @@ * * $RCSfile: dialogs.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: hjs $ $Date: 2000-11-06 12:09:11 $ + * last change: $Author: gh $ $Date: 2001-04-04 13:18:57 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -103,8 +103,8 @@ HACK( #define protected public ) #ifndef _FSYS_HXX //autogen #include <tools/fsys.hxx> #endif -#ifndef _SV_CLIP_HXX //autogen -#include <vcl/clip.hxx> +#ifndef _SVTOOLS_STRINGTRANSFER_HXX_ +#include <svtools/stringtransfer.hxx> #endif #ifndef _SV_SPLITWIN_HXX //autogen #include <vcl/splitwin.hxx> @@ -718,8 +718,7 @@ IMPL_LINK( DisplayHidDlg, CopyToClipboard, void*, EMPTYARG ) aSammel += '\n'; aSammel += aMlbSlots.GetSelectEntry( i ); } - Clipboard::Clear(); - Clipboard::CopyString( aSammel ); + ::svt::OStringTransfer::CopyString( aSammel ); return 0; } diff --git a/basic/source/app/msgedit.cxx b/basic/source/app/msgedit.cxx index 6de5e44a892c..0d44a9027b2d 100644 --- a/basic/source/app/msgedit.cxx +++ b/basic/source/app/msgedit.cxx @@ -2,9 +2,9 @@ * * $RCSfile: msgedit.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 16:12:09 $ + * last change: $Author: gh $ $Date: 2001-04-04 13:18:57 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -83,8 +83,8 @@ Version 3 Changed Charset from CHARSET_IBMPC to RTL_TEXTENCODING_UTF8 #ifndef _FSYS_HXX //autogen #include <tools/fsys.hxx> #endif -#ifndef _CLIP_HXX //autogen -#include <vcl/clip.hxx> +#ifndef _SVTOOLS_STRINGTRANSFER_HXX_ +#include <svtools/stringtransfer.hxx> #endif #ifndef NOOLDSV //autogen #include <vcl/system.hxx> @@ -373,7 +373,7 @@ void MsgEdit::Delete() } void MsgEdit::Cut(){ Copy(); Delete(); bModified = TRUE; lModify.Call( NULL ); } -void MsgEdit::Copy(){ Clipboard::Clear();Clipboard::CopyString( GetSelected() ); } +void MsgEdit::Copy(){ ::svt::OStringTransfer::CopyString( GetSelected() ); } /**/void MsgEdit::Paste(){ Sound::Beep(); } void MsgEdit::Undo(){ Sound::Beep(); } void MsgEdit::Redo(){ Sound::Beep(); } |