summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorThomas Benisch <tbe@openoffice.org>2001-03-23 15:13:46 +0000
committerThomas Benisch <tbe@openoffice.org>2001-03-23 15:13:46 +0000
commitd6d355d11df9b9d000e9b126aecf99b3209c2ec1 (patch)
treed6c7ba9ece24c76aa57a6cf4e2a68cdd806a3ff0 /basctl
parent4324a64ad957790114510f79a95664b7f2490f5a (diff)
removed StarBASIC and code cleanup
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/dlged/dlged.cxx208
-rw-r--r--basctl/source/dlged/dlgedfac.cxx67
-rw-r--r--basctl/source/dlged/dlgedfunc.cxx154
-rw-r--r--basctl/source/dlged/dlgedmod.cxx20
-rw-r--r--basctl/source/dlged/dlgedpage.cxx359
-rw-r--r--basctl/source/inc/dlged.hxx49
-rw-r--r--basctl/source/inc/dlgedfac.hxx28
-rw-r--r--basctl/source/inc/dlgedfunc.hxx14
-rw-r--r--basctl/source/inc/dlgedmod.hxx18
-rw-r--r--basctl/source/inc/dlgedpage.hxx71
10 files changed, 184 insertions, 804 deletions
diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index 08b2250d09c1..55b1857952ae 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: dlged.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: tbe $ $Date: 2001-03-20 14:37:42 $
+ * last change: $Author: tbe $ $Date: 2001-03-23 16:06:53 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -59,24 +59,34 @@
*
************************************************************************/
-#ifndef _SFXAPP_HXX
-#include <sfx2/app.hxx>
+#ifndef _BASCTL_DLGED_HXX
+#include "dlged.hxx"
#endif
-#ifndef _SFX_CHILDWIN_HXX
-#include <sfx2/childwin.hxx>
+
+#ifndef _BASCTL_DLGEDFUNC_HXX
+#include "dlgedfunc.hxx"
#endif
+
+#ifndef _BASCTL_DLGEDFAC_HXX
+#include "dlgedfac.hxx"
+#endif
+
+#ifndef _BASCTL_DLGEDVIEW_HXX
+#include "dlgedview.hxx"
+#endif
+
+#ifndef _BASCTL_DLGEDOBJ_HXX
+#include "dlgedobj.hxx"
+#endif
+
#ifndef _SV_SCRBAR_HXX
#include <vcl/scrbar.hxx>
#endif
-#ifndef _SBXCLASS_HXX
-#include <svtools/sbx.hxx>
-#endif
+
#ifndef _SHL_HXX //autogen
#include <tools/shl.hxx>
#endif
-#ifndef _SVDVIEW_HXX //autogen
-#include <svx/svdview.hxx>
-#endif
+
#ifndef _SFXITEMPOOL_HXX
#include <svtools/itempool.hxx>
#endif
@@ -101,43 +111,12 @@
#include <com/sun/star/util/XCloneable.hpp>
#endif
-#pragma hdrstop
-
-#ifndef _SVXIDS_HRC
-#include <svx/svxids.hrc>
-#endif
-#ifndef _SFXVIEWFRM_HXX
-#include <sfx2/viewfrm.hxx>
-#endif
-#include <svx/svdlayer.hxx>
-
-#include "vcsbxdef.hxx"
-
-#ifndef _BASCTL_DLGED_HXX
-#include "dlged.hxx"
-#endif
-
-#ifndef _BASCTL_DLGEDFUNC_HXX
-#include "dlgedfunc.hxx"
-#endif
-
-#ifndef _BASCTL_DLGEDFAC_HXX
-#include "dlgedfac.hxx"
-#endif
-
-#ifndef _BASCTL_DLGEDVIEW_HXX
-#include "dlgedview.hxx"
-#endif
-
-#ifndef _BASCTL_DLGEDOBJ_HXX
-#include "dlgedobj.hxx"
-#endif
-
#ifndef _COMPHELPER_PROCESSFACTORY_HXX_
#include <comphelper/processfactory.hxx>
#endif
-#include <xmlscript/xmldlg_imexp.hxx>
+#include "vcsbxdef.hxx"
+
using namespace comphelper;
using namespace ::com::sun::star;
@@ -146,7 +125,7 @@ using namespace ::com::sun::star::uno;
//----------------------------------------------------------------------------
-IMPL_LINK( VCDlgEditor, ClipboardCleared, Clipboard *, EMPTYARG )
+IMPL_LINK( DlgEditor, ClipboardCleared, Clipboard *, EMPTYARG ) // not working yet
{
if( !bClipPrivate )
return 0;
@@ -165,7 +144,7 @@ IMPL_LINK( VCDlgEditor, ClipboardCleared, Clipboard *, EMPTYARG )
//----------------------------------------------------------------------------
-void VCDlgEditor::ShowDialog()
+void DlgEditor::ShowDialog()
{
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMSF = getProcessServiceFactory();
@@ -190,7 +169,7 @@ void VCDlgEditor::ShowDialog()
//----------------------------------------------------------------------------
-BOOL VCDlgEditor::UnmarkDialog()
+BOOL DlgEditor::UnmarkDialog()
{
SdrObject* pDlgObj = pSdrModel->GetPage(0)->GetObj(0);
SdrPageView* pPgView = pSdrView->GetPageViewPvNum(0);
@@ -205,7 +184,7 @@ BOOL VCDlgEditor::UnmarkDialog()
//----------------------------------------------------------------------------
-void VCDlgEditor::RemarkDialog()
+void DlgEditor::RemarkDialog()
{
SdrObject* pDlgObj = pSdrModel->GetPage(0)->GetObj(0);
SdrPageView* pPgView = pSdrView->GetPageViewPvNum(0);
@@ -215,10 +194,9 @@ void VCDlgEditor::RemarkDialog()
//----------------------------------------------------------------------------
-VCDlgEditor::VCDlgEditor( StarBASIC* pBas ) :
+DlgEditor::DlgEditor() :
pHScroll(NULL),
pVScroll(NULL),
- pBasic( pBas ),
eMode( VCDLGED_SELECT ), // eActObj( OBJ_DLG_PUSHBUTTON ),
bFirstDraw(FALSE),
bGridSnap(FALSE),
@@ -238,36 +216,26 @@ VCDlgEditor::VCDlgEditor( StarBASIC* pBas ) :
rAdmin.NewStandardLayer();
rAdmin.NewLayer( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "HiddenLayer" ) ) );
- pSdrPage = new DlgEdPage( *pSdrModel, pBasic, this );
+ pSdrPage = new DlgEdPage( *pSdrModel );
pSdrModel->InsertPage( pSdrPage );
- pObjFac = new VCDlgEditFactory( this );
+ pObjFac = new DlgEdFactory();
- //SdrObjFactory::InsertMakeObjectHdl( LINK( pObjFac, VCDlgEditFactory, MakeObject ) );
pFunc = new DlgEdFuncSelect( this );
- aClip.SetClearedHdl( LINK( this, VCDlgEditor, ClipboardCleared ) );
+ aClip.SetClearedHdl( LINK( this, DlgEditor, ClipboardCleared ) );
aPaintTimer.SetTimeout( 1 );
- aPaintTimer.SetTimeoutHdl( LINK( this, VCDlgEditor, PaintTimeout ) );
+ aPaintTimer.SetTimeoutHdl( LINK( this, DlgEditor, PaintTimeout ) );
}
//----------------------------------------------------------------------------
-VCDlgEditor::~VCDlgEditor()
+DlgEditor::~DlgEditor()
{
ClipboardCleared( NULL );
- /*
- if( pSbxForm.Is() )
- pSbxForm->PrepareDelete();
- pSdrPage->SetDeleteSbxObject( FALSE );
- ((DlgPage*)pSdrPage)->SetSbxForm( (VCSbxDialog*)NULL );
- */
-
- SdrObjFactory::RemoveMakeObjectHdl( LINK( pObjFac, VCDlgEditFactory, MakeObject ) );
delete pObjFac;
-
delete pFunc;
delete pSdrView;
delete pSdrModel;
@@ -275,9 +243,9 @@ VCDlgEditor::~VCDlgEditor()
//----------------------------------------------------------------------------
-void VCDlgEditor::SetWindow( Window* pWindow )
+void DlgEditor::SetWindow( Window* pWindow )
{
- VCDlgEditor::pWindow = pWindow;
+ DlgEditor::pWindow = pWindow;
pWindow->SetMapMode( MapMode( MAP_100TH_MM ) );
pSdrPage->SetSize( pWindow->PixelToLogic( Size( 1280, 1024 ) ) );
@@ -286,7 +254,6 @@ void VCDlgEditor::SetWindow( Window* pWindow )
pSdrView->SetLayerVisible( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "HiddenLayer" ) ), FALSE );
pSdrView->SetMoveSnapOnlyTopLeft( TRUE );
- //Size aGridSize( 60, 60 ); //Twips
Size aGridSize( 100, 100 ); // 100TH_MM
bGridSnap = TRUE;
bGridVisible = TRUE;
@@ -301,7 +268,7 @@ void VCDlgEditor::SetWindow( Window* pWindow )
//----------------------------------------------------------------------------
-void VCDlgEditor::SetScrollBars( ScrollBar* pHS, ScrollBar* pVS )
+void DlgEditor::SetScrollBars( ScrollBar* pHS, ScrollBar* pVS )
{
pHScroll = pHS;
pVScroll = pVS;
@@ -325,7 +292,7 @@ void VCDlgEditor::SetScrollBars( ScrollBar* pHS, ScrollBar* pVS )
//----------------------------------------------------------------------------
-void VCDlgEditor::DoScroll( ScrollBar* pActScroll )
+void DlgEditor::DoScroll( ScrollBar* pActScroll )
{
if( !pHScroll || !pVScroll )
return;
@@ -358,7 +325,7 @@ void VCDlgEditor::DoScroll( ScrollBar* pActScroll )
//----------------------------------------------------------------------------
-void VCDlgEditor::SetDialog( uno::Reference< container::XNameContainer > xUnoControlDialogModel )
+void DlgEditor::SetDialog( uno::Reference< container::XNameContainer > xUnoControlDialogModel )
{
/* FOR TEST
// my dialog model -- delete this later
@@ -443,14 +410,15 @@ void VCDlgEditor::SetDialog( uno::Reference< container::XNameContainer > xUnoCon
// create dialog form
pDlgEdForm = new DlgEdForm();
- uno::Reference< awt::XControlModel > xDlgMod( m_xUnoControlDialogModel, uno::UNO_QUERY );
+ uno::Reference< awt::XControlModel > xDlgMod( m_xUnoControlDialogModel , uno::UNO_QUERY );
pDlgEdForm->SetUnoControlModel(xDlgMod);
pDlgEdForm->StartListening();
- pDlgEdForm->SetDlgEditor( this );
pDlgEdForm->SortByTabIndex(); // for backward compatibility
pDlgEdForm->SetRectFromProps();
+ pDlgEdForm->SetDlgEditor( this );
+ ((DlgEdPage*)pSdrModel->GetPage(0))->SetDlgEdForm( pDlgEdForm );
pSdrModel->GetPage(0)->InsertObject( pDlgEdForm );
- pDlgEdForm->SendRepaintBroadcast(); //?
+ pDlgEdForm->SendRepaintBroadcast();
// create controls
Reference< ::com::sun::star::container::XNameAccess > xNameAcc( m_xUnoControlDialogModel, UNO_QUERY );
@@ -474,72 +442,18 @@ void VCDlgEditor::SetDialog( uno::Reference< container::XNameContainer > xUnoCon
pCtrlObj->SetChanged();
pSdrModel->GetPage(0)->InsertObject( pCtrlObj );
pCtrlObj->UpdateStep();
- pCtrlObj->SendRepaintBroadcast(); //?
- }
- }
-
- bFirstDraw = TRUE;
-
- pSdrModel->SetChanged( FALSE );
-}
-
-//----------------------------------------------------------------------------
-
-/*
-void VCDlgEditor::SetVCSbxForm( VCSbxDialogRef pForm )
-{
-
- DBG_ASSERT( pForm.Is(), "Kein Dialog -> und tschuess..." );
- pSbxForm = pForm;
-
- ((DlgPage*)pSdrModel->GetPage(0))->SetName( pSbxForm->GetName() );
- ((DlgPage*)pSdrModel->GetPage(0))->SetSbxForm( (VCSbxDialog*)pSbxForm );
-
- // Drawobject draufklemmen und in Drawing einfuegen
- VCSbxDialogObject* pObj = new VCSbxDialogObject( pSbxForm );
- pSdrModel->GetPage(0)->InsertObject( pObj );
-
- // Durch das folgende Update wird SVLook am Container richtig
- // gesetzt
- pSbxForm->UpdateItem( 0 );
-
- pObj->SendRepaintBroadcast();
-
- // Childs einfuegen
- // und Zeichenobject draufklemmen
- USHORT nCount = pSbxForm->GetObjects()->Count();
- USHORT i;
- for( i=0; i < nCount; i++ )
- {
- SbxVariable* pCtl = pSbxForm->GetObjects()->Get( i );
- DBG_ASSERT( pCtl->IsA( TYPE( VCSbxControl ) ), "Is sich nix Control !!!" );
- if( (pCtl->GetSbxId() >= SBXID_FIRSTCONTROL) &&
- (pCtl->GetSbxId() <= SBXID_LASTCONTROL) )
- {
- VCSbxDrawObject* pDrawObj = new VCSbxDrawObject( (VCSbxControl*)pCtl );
- pSdrModel->GetPage(0)->InsertObject( pDrawObj );
- pDrawObj->GetControl()->UpdateStep( pSbxForm->GetCurStep() );
- pDrawObj->SendRepaintBroadcast();
+ pCtrlObj->SendRepaintBroadcast();
}
}
bFirstDraw = TRUE;
pSdrModel->SetChanged( FALSE );
-
-}
-*/
-
-//----------------------------------------------------------------------------
-
-StarBASIC* VCDlgEditor::GetBasic() const
-{
- return pBasic;
}
//----------------------------------------------------------------------------
-void VCDlgEditor::MouseButtonDown( const MouseEvent& rMEvt )
+void DlgEditor::MouseButtonDown( const MouseEvent& rMEvt )
{
if( pWindow )
pWindow->GrabFocus();
@@ -548,7 +462,7 @@ void VCDlgEditor::MouseButtonDown( const MouseEvent& rMEvt )
//----------------------------------------------------------------------------
-void VCDlgEditor::MouseButtonUp( const MouseEvent& rMEvt )
+void DlgEditor::MouseButtonUp( const MouseEvent& rMEvt )
{
BOOL bRet = pFunc->MouseButtonUp( rMEvt );
@@ -558,21 +472,21 @@ void VCDlgEditor::MouseButtonUp( const MouseEvent& rMEvt )
//----------------------------------------------------------------------------
-void VCDlgEditor::MouseMove( const MouseEvent& rMEvt )
+void DlgEditor::MouseMove( const MouseEvent& rMEvt )
{
pFunc->MouseMove( rMEvt );
}
//----------------------------------------------------------------------------
-BOOL VCDlgEditor::KeyInput( const KeyEvent& rKEvt )
+BOOL DlgEditor::KeyInput( const KeyEvent& rKEvt )
{
return pFunc->KeyInput( rKEvt );
}
//----------------------------------------------------------------------------
-void VCDlgEditor::Paint( const Rectangle& rRect )
+void DlgEditor::Paint( const Rectangle& rRect )
{
aPaintRect = rRect;
PaintTimeout( &aPaintTimer );
@@ -580,7 +494,7 @@ void VCDlgEditor::Paint( const Rectangle& rRect )
//----------------------------------------------------------------------------
-IMPL_LINK( VCDlgEditor, PaintTimeout, Timer *, EMPTYARG )
+IMPL_LINK( DlgEditor, PaintTimeout, Timer *, EMPTYARG )
{
static int nInPaint = FALSE;
if( !pSdrView )
@@ -662,7 +576,7 @@ IMPL_LINK( VCDlgEditor, PaintTimeout, Timer *, EMPTYARG )
//----------------------------------------------------------------------------
-void VCDlgEditor::SetMode( VCDlgMode eNewMode )
+void DlgEditor::SetMode( VCDlgMode eNewMode )
{
if( eMode != eNewMode )
{
@@ -682,7 +596,7 @@ void VCDlgEditor::SetMode( VCDlgMode eNewMode )
//----------------------------------------------------------------------------
-void VCDlgEditor::SetInsertObj( USHORT eObj )
+void DlgEditor::SetInsertObj( USHORT eObj )
{
eActObj = eObj;
@@ -692,14 +606,14 @@ void VCDlgEditor::SetInsertObj( USHORT eObj )
//----------------------------------------------------------------------------
-USHORT VCDlgEditor::GetInsertObj() const
+USHORT DlgEditor::GetInsertObj() const
{
return eActObj;
}
//----------------------------------------------------------------------------
-void VCDlgEditor::Cut()
+void DlgEditor::Cut() // not working yet
{
if( !pSdrView->HasMarkedObj() )
return;
@@ -725,7 +639,7 @@ void VCDlgEditor::Cut()
//----------------------------------------------------------------------------
-void VCDlgEditor::Copy()
+void DlgEditor::Copy() // not working yet
{
if( !pSdrView->HasMarkedObj() )
return;
@@ -749,7 +663,7 @@ void VCDlgEditor::Copy()
//----------------------------------------------------------------------------
-void VCDlgEditor::Paste()
+void DlgEditor::Paste() // not working yet
{
SdrModel** ppClipPrivate = (SdrModel**)GetAppData( SHL_VCED );
@@ -768,7 +682,7 @@ void VCDlgEditor::Paste()
//----------------------------------------------------------------------------
-void VCDlgEditor::Delete()
+void DlgEditor::Delete()
{
if( !pSdrView->HasMarkedObj() )
return;
@@ -830,14 +744,14 @@ void VCDlgEditor::Delete()
//----------------------------------------------------------------------------
-BOOL VCDlgEditor::IsModified() const
+BOOL DlgEditor::IsModified() const
{
return pSdrModel->IsChanged() || bDialogModelChanged;
}
//----------------------------------------------------------------------------
-void VCDlgEditor::ClearModifyFlag()
+void DlgEditor::ClearModifyFlag()
{
pSdrModel->SetChanged( FALSE );
bDialogModelChanged = FALSE;
@@ -853,7 +767,7 @@ void VCDlgEditor::ClearModifyFlag()
//----------------------------------------------------------------------------
-void lcl_PrintHeader( Printer* pPrinter, const String& rTitle )
+void lcl_PrintHeader( Printer* pPrinter, const String& rTitle ) // not working yet
{
short nLeftMargin = LMARGPRN;
Size aSz = pPrinter->GetOutputSize();
@@ -898,7 +812,7 @@ void lcl_PrintHeader( Printer* pPrinter, const String& rTitle )
//----------------------------------------------------------------------------
-void VCDlgEditor::PrintData( Printer* pPrinter, const String& rTitle )
+void DlgEditor::PrintData( Printer* pPrinter, const String& rTitle ) // not working yet
{
if( pSdrView )
{
diff --git a/basctl/source/dlged/dlgedfac.cxx b/basctl/source/dlged/dlgedfac.cxx
index 6b14e3618e52..ffe0b01423a3 100644
--- a/basctl/source/dlged/dlgedfac.cxx
+++ b/basctl/source/dlged/dlgedfac.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: dlgedfac.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: tbe $ $Date: 2001-03-12 11:31:19 $
+ * last change: $Author: tbe $ $Date: 2001-03-23 16:08:20 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -59,65 +59,57 @@
*
************************************************************************/
-#pragma hdrstop
-#ifndef _COMPHELPER_STLTYPES_HXX_
-#include <comphelper/stl_types.hxx>
+#ifndef _BASCTL_DLGEDFAC_HXX
+#include "dlgedfac.hxx"
#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
-#include <com/sun/star/beans/PropertyValue.hpp>
+#ifndef _BASCTL_DLGEDOBJ_HXX
+#include "dlgedobj.hxx"
#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
-#include <com/sun/star/beans/XPropertySet.hpp>
+#ifndef _BASCTL_PROPBRW_HXX
+#include "propbrw.hxx"
#endif
-
-#define _SI_NOVCDRAWVIEW
-#define _SI_VCDRAWOBJ
+#ifndef __VC_VCSBXDEF_HXX
#include "vcsbx.hxx"
-#include "vcsbxdo.hxx"
-
-#ifndef _BASCTL_DLGED_HXX
-#include "dlged.hxx"
#endif
-#ifndef _BASCTL_DLGEDOBJ_HXX
-#include "dlgedobj.hxx"
+#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
+#include <com/sun/star/container/XNameContainer.hpp>
#endif
-#ifndef _BASCTL_DLGEDFAC_HXX
-#include "dlgedfac.hxx"
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
+#include <com/sun/star/beans/PropertyValue.hpp>
#endif
-#ifndef _BASCTL_PROPBRW_HXX
-#include "propbrw.hxx"
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
+#include <com/sun/star/beans/XPropertySet.hpp>
#endif
-using namespace ::rtl;
+
using namespace ::com::sun::star;
//----------------------------------------------------------------------------
-VCDlgEditFactory::VCDlgEditFactory( VCDlgEditor* pDlgEd )
+DlgEdFactory::DlgEdFactory()
{
- pDlgEditor = pDlgEd;
-
- SdrObjFactory::InsertMakeObjectHdl(LINK(this, VCDlgEditFactory, MakeObject));
+ SdrObjFactory::InsertMakeObjectHdl( LINK(this, DlgEdFactory, MakeObject) );
- // Registrieung von globalen fenstern
- //FmFieldWinMgr::RegisterChildWindow();
PropBrwMgr::RegisterChildWindow();
- //FmExplorerWinMgr::RegisterChildWindow();
- //FmFilterNavigatorWinMgr::RegisterChildWindow();
+}
- //ImplSmartRegisterUnoServices();
+//----------------------------------------------------------------------------
+
+DlgEdFactory::~DlgEdFactory()
+{
+ SdrObjFactory::RemoveMakeObjectHdl( LINK(this, DlgEdFactory, MakeObject) );
}
//----------------------------------------------------------------------------
-IMPL_LINK( VCDlgEditFactory, MakeObject, SdrObjFactory *, pObjFactory )
+IMPL_LINK( DlgEdFactory, MakeObject, SdrObjFactory *, pObjFactory )
{
static sal_Bool bNeedsInit = sal_True;
static uno::Reference< lang::XMultiServiceFactory > xDialogSFact;
@@ -135,7 +127,7 @@ IMPL_LINK( VCDlgEditFactory, MakeObject, SdrObjFactory *, pObjFactory )
}
if( (pObjFactory->nInventor == VCSbxInventor) &&
- (pObjFactory->nIdentifier >=OBJ_DLG_CHECKBOX) &&
+ (pObjFactory->nIdentifier >= OBJ_DLG_CHECKBOX) &&
(pObjFactory->nIdentifier <= OBJ_DLG_URLBUTTON) )
{
switch( pObjFactory->nIdentifier )
@@ -182,16 +174,12 @@ IMPL_LINK( VCDlgEditFactory, MakeObject, SdrObjFactory *, pObjFactory )
pObjFactory->pNewObj = new DlgEdObj(rtl::OUString::createFromAscii("com.sun.star.awt.UnoControlImageControlModel"), xDialogSFact);
break;
case OBJ_DLG_SPINBUTTON:
- //pControl = new VCSbxSpinButton( TRUE );
break;
case OBJ_DLG_HSCROLLBAR:
- //pControl = new VCSbxHScrollBar( TRUE );
break;
case OBJ_DLG_VSCROLLBAR:
- //pControl = new VCSbxVScrollBar( TRUE );
break;
case OBJ_DLG_URLBUTTON:
- //pControl = new VCSbxURLButton( TRUE );
break;
}
@@ -202,9 +190,6 @@ IMPL_LINK( VCDlgEditFactory, MakeObject, SdrObjFactory *, pObjFactory )
}
}
- if( aOldMakeObjLink.IsSet() )
- aOldMakeObjLink.Call( pObjFactory );
-
return 0;
}
diff --git a/basctl/source/dlged/dlgedfunc.cxx b/basctl/source/dlged/dlgedfunc.cxx
index c8c79cb744ea..af3c4e99c5d0 100644
--- a/basctl/source/dlged/dlgedfunc.cxx
+++ b/basctl/source/dlged/dlgedfunc.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: dlgedfunc.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: tbe $ $Date: 2001-03-07 18:08:43 $
+ * last change: $Author: tbe $ $Date: 2001-03-23 16:09:30 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -67,14 +67,14 @@
#endif
#pragma hdrstop
-#ifndef _BASCTL_DLGED_HXX
-#include "dlged.hxx"
-#endif
-
#ifndef _BASCTL_DLGEDFUNC_HXX
#include "dlgedfunc.hxx"
#endif
+#ifndef _BASCTL_DLGED_HXX
+#include "dlged.hxx"
+#endif
+
#ifndef _BASCTL_DLGEDOBJ_HXX
#include "dlgedobj.hxx"
#endif
@@ -142,7 +142,7 @@ void DlgEdFunc::ForceScroll( const Point& rPos )
//----------------------------------------------------------------------------
-DlgEdFunc::DlgEdFunc( VCDlgEditor* pParent )
+DlgEdFunc::DlgEdFunc( DlgEditor* pParent )
{
DlgEdFunc::pParent = pParent;
aScrollTimer.SetTimeoutHdl( LINK( this, DlgEdFunc, ScrollTimeout ) );
@@ -197,7 +197,7 @@ BOOL DlgEdFunc::KeyInput( const KeyEvent& rKEvt )
//----------------------------------------------------------------------------
-DlgEdFuncInsert::DlgEdFuncInsert( VCDlgEditor* pParent ) :
+DlgEdFuncInsert::DlgEdFuncInsert( DlgEditor* pParent ) :
DlgEdFunc( pParent )
{
pParent->GetView()->SetCreateMode( TRUE );
@@ -214,7 +214,6 @@ DlgEdFuncInsert::~DlgEdFuncInsert()
BOOL DlgEdFuncInsert::MouseButtonDown( const MouseEvent& rMEvt )
{
-
if( !rMEvt.IsLeft() )
return TRUE;
@@ -233,50 +232,18 @@ BOOL DlgEdFuncInsert::MouseButtonDown( const MouseEvent& rMEvt )
SdrHdl* pHdl = pView->HitHandle(aPos, *pWindow);
- // Selektiertes Object getroffen ?
- // Wenn ja, draggen
+ // if selected object was hit, drag object
if ( pHdl!=NULL || pView->IsMarkedHit(aPos, nHitLog) )
pView->BegDragObj(aPos, (OutputDevice*) NULL, pHdl, nDrgLog);
else
if ( pView->HasMarkedObj() )
pView->UnmarkAll();
- // Keine Aktion im Gange ?
- // Dann Object erzeugen
+ // if no action, create object
if ( rMEvt.IsLeft() && !pView->IsAction() )
pView->BegCreateObj(aPos);
return TRUE;
-
- /*
- if( !rMEvt.IsLeft() )
- return TRUE;
-
- SdrView* pView = pParent->GetView();
- Window* pWindow= pParent->GetWindow();
- pView->SetActualWin( pWindow );
-
- //pView->MouseButtonDown( rMEvt, pWindow );
-
- const Point aLogPt( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
-
- // Focus anziehen fuer Key-Inputs
- pWindow->GrabFocus();
-
- pView->MouseButtonDown( rMEvt, pWindow );
-
-
- SdrObject* pCreateObj = pView->GetCreateObj();
-
- // Wir wollen das Inserten mitbekommen
- //if ( pCreateObj && !pCreateObj->GetUserCall() )
- // pCreateObj->SetUserCall( pUserCall );
-
- pWindow->SetPointer( pView->GetPreferedPointer( aLogPt, pWindow ) );
-
- return TRUE; // delete this
- */
-
}
//----------------------------------------------------------------------------
@@ -294,7 +261,7 @@ BOOL DlgEdFuncInsert::MouseButtonUp( const MouseEvent& rMEvt )
pWindow->ReleaseMouse();
- // Object erzeugen aktiv ?
+ // object creation active?
if ( pView->IsCreateObj() )
{
pView->EndCreateObj(SDRCREATE_FORCEEND);
@@ -331,33 +298,6 @@ BOOL DlgEdFuncInsert::MouseButtonUp( const MouseEvent& rMEvt )
pView->EndDragObj( rMEvt.IsMod1() );
return TRUE;
}
-
-
- /*
- SdrView* pView = pParent->GetView();
- Window* pWindow= pParent->GetWindow();
- pView->SetActualWin( pWindow );
-
- //pView->MouseButtonUp( rMEvt, pWindow );
-
-
- //if ( bSdrMode )
- //{
- if ( pView->IsInsObjPoint() )
- pView->EndInsObjPoint( SDRCREATE_FORCEEND );
- else
- pView->MouseButtonUp( rMEvt, pWindow );
-
- pWindow->ReleaseMouse();
- pWindow->SetPointer( pView->GetPreferedPointer( pWindow->PixelToLogic( rMEvt.GetPosPixel() ), pWindow ) );
- //}
- //else
- // Control::MouseButtonUp( rMEvt );
-
-
- return TRUE; // delete this
- */
-
}
//----------------------------------------------------------------------------
@@ -380,51 +320,11 @@ BOOL DlgEdFuncInsert::MouseMove( const MouseEvent& rMEvt )
pWindow->SetPointer( pView->GetPreferedPointer( aPos, pWindow, nHitLog ) );
return TRUE;
-
- /*
- SdrView* pView = pParent->GetView();
- Window* pWindow= pParent->GetWindow();
- pView->SetActualWin( pWindow );
-
- //pView->MouseMove( rMEvt, pWindow );
-
-
- const Point aLogPos( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
-
- //if ( bSdrMode )
- //{
- pView->MouseMove( rMEvt, pWindow );
-
- //if( ( SID_BEZIER_INSERT == nPolyEdit ) &&
- // !pView->HitHandle( aLogPos, *this ) &&
- // !pView->IsInsObjPoint() )
- //{
- // SetPointer( POINTER_CROSS );
- //}
- //else
- pWindow->SetPointer( pView->GetPreferedPointer( aLogPos, pWindow ) );
- //}
- //else
- // Control::MouseButtonUp( rMEvt );
-
- //if ( aMousePosLink.IsSet() )
- //{
- // if ( Rectangle( Point(), aGraphSize ).IsInside( aLogPos ) )
- // aMousePos = aLogPos;
- // else
- // aMousePos = Point();
-
- // aMousePosLink.Call( this );
- //}
-
- return TRUE; // delete this
- */
-
}
//----------------------------------------------------------------------------
-DlgEdFuncSelect::DlgEdFuncSelect( VCDlgEditor* pParent ) :
+DlgEdFuncSelect::DlgEdFuncSelect( DlgEditor* pParent ) :
DlgEdFunc( pParent ),
bMarkAction(FALSE)
{
@@ -440,7 +340,7 @@ DlgEdFuncSelect::~DlgEdFuncSelect()
BOOL DlgEdFuncSelect::MouseButtonDown( const MouseEvent& rMEvt )
{
- // View vom Parent holen
+ // get view from parent
SdrView* pView = pParent->GetView();
Window* pWindow = pParent->GetWindow();
pView->SetActualWin( pWindow );
@@ -458,48 +358,36 @@ BOOL DlgEdFuncSelect::MouseButtonDown( const MouseEvent& rMEvt )
SdrObject* pObj;
SdrPageView* pPV;
- // Selektiertes Object getroffen ?
+ // hit selected object?
if ( pHdl!=NULL || pView->IsMarkedHit(aMDPos, nHitLog) )
{
pView->BegDragObj(aMDPos, (OutputDevice*) NULL, pHdl, nDrgLog);
}
else
{
- // Wenn nicht Multi-Select, dann alles deselektieren
+ // if not multi selection, unmark all
if ( !rMEvt.IsShift() )
pView->UnmarkAll();
else
{
if( pView->PickObj( aMDPos, nHitLog, pObj, pPV ) )
{
-
if( pObj->ISA( DlgEdForm ) )
pView->UnmarkAll();
else
pParent->UnmarkDialog();
-
- /*
- if( pObj->IsA( TYPE( VCSbxDialogObject ) ) )
- pView->UnmarkAll();
- else
- pParent->UnmarkDialog();
- */
}
}
if ( pView->MarkObj(aMDPos, nHitLog) )
{
- /**********************************************************
- * Objekt verschieben
- **********************************************************/
+ // drag object
pHdl=pView->HitHandle(aMDPos, *pWindow);
pView->BegDragObj(aMDPos, (OutputDevice*) NULL, pHdl, nDrgLog);
}
else
{
- /**********************************************************
- * Objekt selektieren
- **********************************************************/
+ // select object
pView->BegMarkObj(aMDPos, (OutputDevice*) NULL);
bMarkAction = TRUE;
}
@@ -515,7 +403,7 @@ BOOL DlgEdFuncSelect::MouseButtonUp( const MouseEvent& rMEvt )
{
DlgEdFunc::MouseButtonUp( rMEvt );
- // View vom Parent holen
+ // get view from parent
SdrView* pView = pParent->GetView();
Window* pWindow= pParent->GetWindow();
pView->SetActualWin( pWindow );
@@ -529,9 +417,7 @@ BOOL DlgEdFuncSelect::MouseButtonUp( const MouseEvent& rMEvt )
{
if ( pView->IsDragObj() )
{
- /******************************************************************
- * Objekt wurde verschoben
- ******************************************************************/
+ // object was dragged
pView->EndDragObj( rMEvt.IsMod1() );
pView->ForceMarkedToAnotherPage();
}
@@ -558,7 +444,7 @@ BOOL DlgEdFuncSelect::MouseButtonUp( const MouseEvent& rMEvt )
// SdrMark* pMark = rMarkList.GetMark(0);
// SdrObject* pObj = pMark->GetObj();
//
-// // Hier koennen Objecte editiert werden
+// // edit objects here
// }
// }
// }
diff --git a/basctl/source/dlged/dlgedmod.cxx b/basctl/source/dlged/dlgedmod.cxx
index 57153fff2bb7..5b2e2534409a 100644
--- a/basctl/source/dlged/dlgedmod.cxx
+++ b/basctl/source/dlged/dlgedmod.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: dlgedmod.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: tbe $ $Date: 2001-02-26 10:45:50 $
+ * last change: $Author: tbe $ $Date: 2001-03-23 16:11:00 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -59,23 +59,17 @@
*
************************************************************************/
-#pragma hdrstop
-#include <svx/svdobj.hxx>
-#include <svx/svxids.hrc>
-
-#ifndef _BASCTL_DLGED_HXX
-#include "dlged.hxx"
+#ifndef _BASCTL_DLGEDMOD_HXX
+#include "dlgedmod.hxx"
#endif
#ifndef _BASCTL_DLGEDPAGE_HXX
#include "dlgedpage.hxx"
#endif
-#include <svx/xoutx.hxx>
-
-#ifndef _SVDORECT_HXX
-#include <svx/svdorect.hxx>
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
#endif
@@ -151,7 +145,7 @@ FASTBOOL DlgEdModel::operator==(const DlgEdModel&) const
SdrPage* DlgEdModel::AllocPage(FASTBOOL bMasterPage)
{
DBG_CHKTHIS(DlgEdModel, 0);
- return new DlgPage(*this, NULL, bMasterPage);
+ return new DlgEdPage(*this, bMasterPage);
}
//----------------------------------------------------------------------------
diff --git a/basctl/source/dlged/dlgedpage.cxx b/basctl/source/dlged/dlgedpage.cxx
index 5c8ee3e75426..714ce535f27c 100644
--- a/basctl/source/dlged/dlgedpage.cxx
+++ b/basctl/source/dlged/dlgedpage.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: dlgedpage.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: tbe $ $Date: 2001-02-26 10:48:07 $
+ * last change: $Author: tbe $ $Date: 2001-03-23 16:13:27 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -59,376 +59,45 @@
*
************************************************************************/
-#ifndef _SV_HELP_HXX //autogen
-#include <vcl/help.hxx>
-#endif
-#ifndef _SFXINTITEM_HXX
-#include <svtools/intitem.hxx>
-#endif
-#ifndef _SFXSTRITEM_HXX
-#include <svtools/stritem.hxx>
-#endif
-#ifndef _SB_SBSTAR_HXX
-#include <basic/sbstar.hxx>
-#endif
-#ifndef _WRKWIN_HXX
-#include <vcl/wrkwin.hxx>
-#endif
-#ifndef _SFXAPP_HXX
-#include <sfx2/app.hxx>
-#endif
-#ifndef _SFXVIEW_HXX
-#include <sfx2/childwin.hxx>
-#endif
-#ifndef _SFXVIEWFRM_HXX
-#include <sfx2/viewfrm.hxx>
-#endif
-
-#ifndef _SHL_HXX
-#include <tools/shl.hxx>
-#endif
-#ifndef _SVDIO_HXX
-#include <svx/svdio.hxx>
-#endif
-
-#include <vcl/color.hxx>
-
-#ifndef _SVDVIEW_HXX //autogen
-#include <svx/svdview.hxx>
-#endif
-
-#pragma hdrstop
-
-#include <svx/svdobj.hxx>
-
-#include <svx/svxids.hrc>
-
-#ifndef _BASCTL_DLGED_HXX
-#include "dlged.hxx"
-#endif
#ifndef _BASCTL_DLGEDPAGE_HXX
#include "dlgedpage.hxx"
#endif
-#ifndef _SVDORECT_HXX
-#include <svx/svdorect.hxx>
+#ifndef _BASCTL_DLGEDMOD_HXX
+#include "dlgedmod.hxx"
#endif
-TYPEINIT1( DlgPage, SdrPage );
+TYPEINIT1( DlgEdPage, SdrPage );
//----------------------------------------------------------------------------
-DlgPage::DlgPage( DlgEdModel& rModel, StarBASIC* pBas, FASTBOOL bMasterPage ) :
- SdrPage( rModel, bMasterPage ),
- pBasic(pBas)
+DlgEdPage::DlgEdPage( DlgEdModel& rModel, FASTBOOL bMasterPage ) :
+ SdrPage( rModel, bMasterPage )
{
- if( pBasic )
- pBasic->AddRef();
- //pPool = rModel.pVCItemPool; // GetVCItemPool() wuerde ggf. einen erzeugen
}
//----------------------------------------------------------------------------
-DlgPage::~DlgPage()
+DlgEdPage::DlgEdPage( const DlgEdPage& rPage )
+ : SdrPage( rPage )
{
- //if( pBasic && pSbxForm && pSbxForm->Type() == TYPE( VCSbxForm ) )
- // pBasic->Remove( pSbxForm );
-
- Clear();
-
- //if( pVCManager )
- // delete pVCManager;
-
- if( pBasic )
- pBasic->ReleaseRef();
-
-}
-
-//----------------------------------------------------------------------------
-
-void DlgPage::SetName( const String& rName )
-{
- aPageName = rName;
- //if( pSbxForm )
- // pSbxForm->SetName( aPageName );
+ pDlgEdForm = rPage.pDlgEdForm;
}
//----------------------------------------------------------------------------
-void DlgPage::SetBasic( StarBASIC* pBas )
+DlgEdPage::~DlgEdPage()
{
- if( pBas == pBasic )
- return;
-
- StarBASIC* pOldBasic = pBasic;
- pBasic = pBas;
-
- if( pBasic )
- pBasic->AddRef();
- /*
- if( pSbxForm )
- {
- if( pOldBasic )
- pOldBasic->Remove( pSbxForm );
- if( pBasic )
- pBasic->Insert( pSbxForm );
- }
- */
- if( pOldBasic )
- pOldBasic->ReleaseRef();
-}
-
-//----------------------------------------------------------------------------
-
-BOOL DlgPage::RequestHelp( Window* pWindow, SdrView* pView,
- const HelpEvent& rEvt )
-{
- if( !pView->IsAction() )
- {
- Point aPos = rEvt.GetMousePosPixel();
- aPos = pWindow->ScreenToOutputPixel( aPos );
- aPos = pWindow->PixelToLogic( aPos );
-
- SdrObject* pObj;
- SdrPageView* pPV;
- if( pView->PickObj( aPos, 0, pObj, pPV ) )
- {
- /*
- // Ein Object getroffen
- if( pObj->IsA( TYPE( VCSbxDrawObject ) ) )
- {
- SfxItemSet* pItemSet = ((VCSbxDrawObject*)pObj)->GetItemSet();
- String aHelpText = ((SfxStringItem&)pItemSet->Get( VCATTR_HELPTEXT )).GetValue();
- if( !aHelpText.Len() )
- {
- // keonnen wir eine URL anzeigen?
- VCSbxDrawObject* pControl = (VCSbxDrawObject*)pObj;
- if( pControl->GetControl()->IsA(TYPE(VCSbxURLButton)))
- {
- VCURLButton* pBtn = (VCURLButton*)(pControl->GetControl()->GetVCControl());
- aHelpText = pBtn->GetURL();
- INetURLObject aUrl( aHelpText );
- aHelpText = aUrl.GetURLNoPass();
- }
- }
- if( aHelpText.Len())
- {
- // Hilfe anzeigen
- Rectangle aItemRect = pObj->GetBoundRect();
- aItemRect = pWindow->LogicToPixel( aItemRect );
- Point aPt = pWindow->OutputToScreenPixel( aItemRect.TopLeft() );
- aItemRect.Left() = aPt.X();
- aItemRect.Top() = aPt.Y();
- aPt = pWindow->OutputToScreenPixel( aItemRect.BottomRight() );
- aItemRect.Right() = aPt.X();
- aItemRect.Bottom() = aPt.Y();
- if( rEvt.GetMode() == HELPMODE_BALLOON )
- Help::ShowBalloon( pWindow, aItemRect.Center(), aItemRect, aHelpText);
- else
- Help::ShowQuickHelp( pWindow, aItemRect, aHelpText );
-
-
- }
- return TRUE;
- }
- */
- }
- }
- return FALSE;
-}
-
-//----------------------------------------------------------------------------
-
-void DlgPage::RequestBasic()
-{
-}
-
-//----------------------------------------------------------------------------
-
-void DlgPage::WriteData( SvStream& rOut ) const
-{
-
- /*
- CharSet eOldCharSet = rOut.GetStreamCharSet( );
- rOut.SetStreamCharSet( RTL_TEXTENCODING_MS_1252 );
-
- if( pSbxForm )
- {
- SdrDownCompat aCompat( rOut, STREAM_WRITE);
- rOut << (UINT16)1;
- UINT32 nMyVer = 0x13081961;
- rOut << nMyVer;
- rOut << *pSbxForm;
- }
- else
- {
- SdrDownCompat aCompat( rOut, STREAM_WRITE);
- rOut << (UINT16)0;
- }
-
- SdrPage::WriteData( rOut );
-
- SdrDownCompat aCompat( rOut, STREAM_WRITE);
- rOut.WriteByteString( GetName() );
-
- // Magic-Number schreiben, da Carsten vergessen hat,
- // eine (erhoehbare!) Versionsnummer einzubauen
- rOut << (ULONG)0x11051967;
- rOut << (ULONG)0x19670511;
-
- USHORT nVer = 1;
- rOut << nVer; // Versionsnummer innerhalb meines Blockes
- {
- SdrDownCompat aCompat( rOut, STREAM_WRITE);
- // VCForms speichern
- ULONG nFormCount = 0;
- if( pVCManager )
- {
- nFormCount = pVCManager->FormCount();
- rOut << nFormCount;
- for( ULONG nCurForm=0; nCurForm < nFormCount; nCurForm++ )
- {
- rOut << *(pVCManager->GetFormByPos(nCurForm));
- }
- }
- else
- rOut << nFormCount;
- }
- rOut.SetStreamCharSet( eOldCharSet );
- */
-}
-
-//----------------------------------------------------------------------------
-
-void DlgPage::ReadData( const SdrIOHeader& rHead, SvStream& rIn )
-{
- /*
- // macht JOE jetzt
- CharSet eOldCharSet = rIn.GetStreamCharSet( );
- rIn.SetStreamCharSet( RTL_TEXTENCODING_MS_1252 );
-
- {
- SdrDownCompat aCompat( rIn, STREAM_READ );
- UINT16 n;
- rIn >> n;
- if( n )
- {
- GetSbxForm();
-
- UINT32 nMyVer;
- rIn >> nMyVer;
- if( nMyVer == 0x13081961 )
- rIn >> *pSbxForm;
- }
- }
-
- // Joe liest jetzt auch die Dok-Controls ein!
- SdrPage::ReadData( rHead, rIn );
-
- {
- SdrDownCompat aCompat( rIn, STREAM_READ );
- String aName;
- rIn.ReadByteString( aName );
- SetName( aName );
-
- ULONG nMagic1=0, nMagic2=0;
- ULONG nFPos = rIn.Tell();
- // Magic-Number lesen
- rIn >> nMagic1; rIn >> nMagic2;
- if( nMagic1 == 0x11051967 && nMagic2 == 0x19670511 )
- {
- // es ist noch was da
- USHORT nVer;
- rIn >> nVer; // Versionsnummer innerhalb meines Blockes
- {
- SdrDownCompat aCompat( rIn, STREAM_READ);
- // VCForms laden
- ULONG nFormCount;
- rIn >> nFormCount;
- if( nFormCount )
- {
- // diese Dummy-Referenz sorgt dafuer, dass ein
- // VCManager angelegt wird, falls noch keiner da ist
- VCSbxFormRef aDummyRef = DlgPage::GetSbxForm();
- DBG_ASSERT(pVCManager,"No VCManager!");
- for( ULONG nCurForm=0; nCurForm < nFormCount; nCurForm++ )
- {
- VCForm* pForm = new VCForm;
- rIn >> *pForm;
- pVCManager->InsertForm( pForm );
- }
- }
- }
- }
- else
- rIn.Seek( nFPos );
-
- // Ueber alle Controls gehen und die Dinger in ihre Forms einfuegen.
- // Das kann ich nicht im VCSbxDrawObject::ReadData machen, weil
- // die Forms dann noch nicht geladen sind!
- if( pVCManager )
- {
- ULONG nCtrlCount = pVCManager->GetChildCount();
- for( ULONG nCur=0; nCur < nCtrlCount; nCur++ )
- {
- VCControl* pVCControl = pVCManager->GetChildByPos(nCur);
- String aFormName( pVCControl->GetFormName() );
- if( aFormName.Len() )
- {
- // in eine neue Form packen, diese ggf. erzeugen
- VCForm* pForm = pVCManager->GetFormByName( aFormName );
- DBG_ASSERT(pForm,"No Form!");
- pVCControl->SetVCForm( pForm );
- }
- }
- }
- }
- rIn.SetStreamCharSet( eOldCharSet );
- */
-}
-
-//----------------------------------------------------------------------------
-
-void DlgPage::SetModel(SdrModel* pNewModel)
-{
- DBG_ASSERT(pNewModel,"DlgPage::SetModel: pNewModel==0");
- SdrModel* pOldModel = GetModel();
- SdrPage::SetModel( pNewModel );
- /*
- if( pOldModel != pNewModel )
- {
- VCItemPool* pNewPool = ((VCDrawModel*)pNewModel)->GetVCItemPool();
- if( pVCManager )
- {
- ULONG nCount = pVCManager->GetChildCount();
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
- {
- VCControl* pCtrl = pVCManager->GetChildByPos( nCur );
- pCtrl->SetPool( pNewPool );
- }
- }
- if( pSbxForm && pSbxForm->Type() == TYPE(VCSbxForm) )
- pSbxForm->SetPool( pNewPool, FALSE );
- }
- */
-}
-
-//----------------------------------------------------------------------------
-
-SdrPage* DlgPage::Clone() const
-{
- return new DlgPage( *this );
+ Clear();
}
//----------------------------------------------------------------------------
-DlgPage::DlgPage( const DlgPage& rPage )
- : SdrPage( rPage ),
- pBasic(0)
+SdrPage* DlgEdPage::Clone() const
{
- //pPool = ((DlgEdModel*)GetModel())->pVCItemPool; // GetVCItemPool() wuerde ggf. einen erzeugen
+ return new DlgEdPage( *this );
}
//----------------------------------------------------------------------------
diff --git a/basctl/source/inc/dlged.hxx b/basctl/source/inc/dlged.hxx
index 3859ea6f3952..ed7980423b40 100644
--- a/basctl/source/inc/dlged.hxx
+++ b/basctl/source/inc/dlged.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: dlged.hxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: tbe $ $Date: 2001-03-06 14:50:13 $
+ * last change: $Author: tbe $ $Date: 2001-03-23 16:07:09 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -66,14 +66,10 @@
#include <dlgedpage.hxx>
#endif
-#ifndef _BASCTL_DLGEDMOD_HXX //autogen
+#ifndef _BASCTL_DLGEDMOD_HXX
#include <dlgedmod.hxx>
#endif
-#ifndef _BASCTL_DLGEDOBJ_HXX
-#include <dlgedobj.hxx>
-#endif
-
#ifndef _CLIP_HXX //autogen
#include <vcl/clip.hxx>
#endif
@@ -85,36 +81,33 @@
enum VCDlgMode { VCDLGED_INSERT, VCDLGED_SELECT, VCDLGED_TEST, VCDLGED_BLOCK_PAINT };
//============================================================================
-// VCDlgEditor
+// DlgEditor
//============================================================================
-class DlgEdForm;
-class DlgEdFunc;
-class VCDlgEditFactory;
+class ScrollBar;
class SdrModel;
class SdrPage;
class SdrView;
-class StarBASIC;
-//class VCDlgEditor;
-class ScrollBar;
+class DlgEdForm;
+class DlgEdFactory;
+class DlgEdFunc;
class Printer;
-class VCDlgEditor /* : public LinkHdl */
+class DlgEditor
{
-//#if __PRIVATE
- DECL_LINK( ClipboardCleared, Clipboard * );
+private:
+ DECL_LINK( ClipboardCleared, Clipboard * ); // not working yet
DECL_LINK( PaintTimeout, Timer * );
-//#endif
+
protected:
ScrollBar* pHScroll;
ScrollBar* pVScroll;
- StarBASIC* pBasic;
DlgEdModel* pSdrModel;
DlgEdPage* pSdrPage;
SdrView* pSdrView;
DlgEdForm* pDlgEdForm;
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > m_xUnoControlDialogModel;
- VCDlgEditFactory* pObjFac;
+ DlgEdFactory* pObjFac;
Window* pWindow;
DlgEdFunc* pFunc;
VCDlgMode eMode;
@@ -130,11 +123,9 @@ protected:
Rectangle aPaintRect;
BOOL bDialogModelChanged;
- // Data for new library container mechanism
-
public:
- VCDlgEditor( StarBASIC* pBasic );
- ~VCDlgEditor();
+ DlgEditor();
+ ~DlgEditor();
void SetWindow( Window* pWindow );
Window* GetWindow() const { return pWindow; }
@@ -152,8 +143,6 @@ public:
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > GetDialog() const
{return m_xUnoControlDialogModel;}
- StarBASIC* GetBasic() const;
-
SdrModel* GetModel() const { return pSdrModel; }
SdrView* GetView() const { return pSdrView; }
SdrPage* GetPage() const { return pSdrPage; }
@@ -181,12 +170,12 @@ public:
VCDlgMode GetMode() const { return eMode; }
BOOL IsCreateOK() const { return bCreateOK; }
- void Cut();
- void Copy();
- void Paste();
+ void Cut(); // not working yet
+ void Copy(); // not working yet
+ void Paste(); // not working yet
void Delete();
- void PrintData( Printer*, const String& rTitle );
+ void PrintData( Printer*, const String& rTitle ); // not working yet
};
#endif //_BASCTL_DLGED_HXX
diff --git a/basctl/source/inc/dlgedfac.hxx b/basctl/source/inc/dlgedfac.hxx
index e5d4c79dd17c..cee51ab9a63f 100644
--- a/basctl/source/inc/dlgedfac.hxx
+++ b/basctl/source/inc/dlgedfac.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: dlgedfac.hxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: tbe $ $Date: 2001-02-26 10:53:39 $
+ * last change: $Author: tbe $ $Date: 2001-03-23 16:08:37 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -59,28 +59,24 @@
*
************************************************************************/
+
#ifndef _BASCTL_DLGEDFAC_HXX
#define _BASCTL_DLGEDFAC_HXX
+#ifndef _SVDOBJ_HXX
+#include <svx/svdobj.hxx>
+#endif
+
+
//============================================================================
-// VCDlgEditFactory
+// DlgEdFactory
//============================================================================
-class SdrObjFactory;
-class StarBASIC;
-class VCDlgEditor;
-
-class VCDlgEditFactory /* : public LinkHdl */
+class DlgEdFactory
{
-protected:
- Link aOldMakeObjLink;
- VCDlgEditor* pDlgEditor;
-
public:
- VCDlgEditFactory( VCDlgEditor* pDlgEd );
-
- void SetOldMakeObjHdl( const Link& rLink ) { aOldMakeObjLink = rLink; }
- Link GetOldMakeObjHdl() const { return aOldMakeObjLink; }
+ DlgEdFactory();
+ ~DlgEdFactory();
DECL_LINK( MakeObject, SdrObjFactory * );
};
diff --git a/basctl/source/inc/dlgedfunc.hxx b/basctl/source/inc/dlgedfunc.hxx
index 9fe4c903da9e..90f1e9dab6ec 100644
--- a/basctl/source/inc/dlgedfunc.hxx
+++ b/basctl/source/inc/dlgedfunc.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: dlgedfunc.hxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: tbe $ $Date: 2001-02-26 10:54:38 $
+ * last change: $Author: tbe $ $Date: 2001-03-23 16:10:03 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -66,7 +66,7 @@
#include <vcl/timer.hxx>
#endif
-class VCDlgEditor;
+class DlgEditor;
class Timer;
class MouseEvent;
class Point;
@@ -78,14 +78,14 @@ class Point;
class DlgEdFunc /* : public LinkHdl */
{
protected:
- VCDlgEditor* pParent;
+ DlgEditor* pParent;
Timer aScrollTimer;
DECL_LINK( ScrollTimeout, Timer * );
void ForceScroll( const Point& rPos );
public:
- DlgEdFunc( VCDlgEditor* pParent );
+ DlgEdFunc( DlgEditor* pParent );
virtual ~DlgEdFunc();
virtual BOOL MouseButtonDown( const MouseEvent& rMEvt );
@@ -101,7 +101,7 @@ public:
class DlgEdFuncInsert : public DlgEdFunc
{
public:
- DlgEdFuncInsert( VCDlgEditor* pParent );
+ DlgEdFuncInsert( DlgEditor* pParent );
~DlgEdFuncInsert();
virtual BOOL MouseButtonDown( const MouseEvent& rMEvt );
@@ -119,7 +119,7 @@ protected:
BOOL bMarkAction;
public:
- DlgEdFuncSelect( VCDlgEditor* pParent );
+ DlgEdFuncSelect( DlgEditor* pParent );
~DlgEdFuncSelect();
virtual BOOL MouseButtonDown( const MouseEvent& rMEvt );
diff --git a/basctl/source/inc/dlgedmod.hxx b/basctl/source/inc/dlgedmod.hxx
index d22743f67cf7..bc8438e24b7a 100644
--- a/basctl/source/inc/dlgedmod.hxx
+++ b/basctl/source/inc/dlgedmod.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: dlgedmod.hxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: tbe $ $Date: 2001-02-26 10:56:29 $
+ * last change: $Author: tbe $ $Date: 2001-03-23 16:11:20 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -59,13 +59,10 @@
*
************************************************************************/
+
#ifndef _BASCTL_DLGEDMOD_HXX
#define _BASCTL_DLGEDMOD_HXX
-#ifndef _ERRCODE_HXX //autogen
-#include <tools/errcode.hxx>
-#endif
-
#ifndef _SVDMODEL_HXX
#include <svx/svdmodel.hxx>
#endif
@@ -75,13 +72,13 @@
// DlgEdModel
//============================================================================
-class DlgPage;
+class DlgEdPage;
class Window;
class SfxObjectShell;
class DlgEdModel : public SdrModel
{
- friend class DlgPage;
+ friend class DlgEdPage;
private:
SfxObjectShell* pObjectShell;
@@ -101,11 +98,6 @@ public:
FASTBOOL bUseExtColorTable );
virtual ~DlgEdModel();
- // ruft SetChanged auf!! Aufgabe: Der Writer kann nicht SetChanged
- // ueberladen, da diese Funktion auch beim Umformatieren
- // des Textes (veraendert im Writer-Sinne nicht das Model!)
- // gerufen wird, und deshalb an sehr vielen Stellen abgeklemmt
- // werden muesste.
virtual void DlgEdModelChanged( FASTBOOL bChanged = TRUE );
SfxObjectShell* GetObjectShell() const { return pObjectShell; }
diff --git a/basctl/source/inc/dlgedpage.hxx b/basctl/source/inc/dlgedpage.hxx
index fca48b2baecd..fc3e5eef1478 100644
--- a/basctl/source/inc/dlgedpage.hxx
+++ b/basctl/source/inc/dlgedpage.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: dlgedpage.hxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: tbe $ $Date: 2001-02-26 11:08:34 $
+ * last change: $Author: tbe $ $Date: 2001-03-23 16:13:46 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -62,78 +62,33 @@
#ifndef _BASCTL_DLGEDPAGE_HXX
#define _BASCTL_DLGEDPAGE_HXX
-#ifndef _LINK_HXX //autogen
-#include <tools/link.hxx>
-#endif
-#ifndef _SVDUNDO_HXX //autogen
-#include "svx/svdundo.hxx"
-#endif
-#ifndef _SVDPAGE_HXX //autogen
+#ifndef _SVDPAGE_HXX
#include "svx/svdpage.hxx"
#endif
-#ifndef _SVDOBJ_HXX //autogen
-#include "svx/svdobj.hxx"
-#endif
-#ifndef _TOOLS_SOALR_H
-#include <tools/solar.h>
-#endif
-
-class SfxPoolItem;
-
//============================================================================
-// DlgPage
+// DlgEdPage
//============================================================================
-class StarBASIC;
-class VCDlgEditor;
class DlgEdModel;
-class HelpEvent; // this probably doesn't work, need include file vcsbx.hxx
+class DlgEdForm;
-class DlgPage : public SdrPage
+class DlgEdPage : public SdrPage
{
-
-protected:
- StarBASIC* pBasic;
- String aPageName;
+private:
+ DlgEdForm* pDlgEdForm;
public:
TYPEINFO();
- DlgPage( DlgEdModel& rModel, StarBASIC* pBasic, FASTBOOL bMasterPage=FALSE );
- DlgPage( const DlgPage& );
- ~DlgPage();
-
- void SetName(const String& rPageName);
- const String& GetName() const { return aPageName; }
-
- void SetBasic( StarBASIC* pBas );
- StarBASIC* GetBasic() const { return pBasic; }
-
- BOOL RequestHelp( Window* pWin, SdrView* pView, const HelpEvent& rEvt );
- virtual void RequestBasic();
-
- virtual void WriteData(SvStream& rOut) const;
- virtual void ReadData(const SdrIOHeader& rHead, SvStream& rIn);
- virtual void SetModel(SdrModel* pNewModel);
+ DlgEdPage( DlgEdModel& rModel, FASTBOOL bMasterPage=FALSE );
+ DlgEdPage( const DlgEdPage& );
+ virtual ~DlgEdPage();
virtual SdrPage* Clone() const;
-};
-
-//============================================================================
-// DlgEdPage
-//============================================================================
-
-class DlgEdPage : public DlgPage
-{
-protected:
- VCDlgEditor* pEditor;
-
-public:
- DlgEdPage( DlgEdModel& rModel, StarBASIC* pBasic, VCDlgEditor* pEd ) :
- DlgPage( rModel, pBasic ) { pEditor=pEd; }
- VCDlgEditor* GetDlgEd() const { return pEditor; }
+ void SetDlgEdForm( DlgEdForm* pForm ) { pDlgEdForm = pForm; }
+ DlgEdForm* GetDlgEdForm() const { return pDlgEdForm; }
};
#endif //_BASCTL_DLGEDPAGE_HXX